aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-07-20 09:27:39 -0400
committerMatthew Hoops2011-07-20 09:27:39 -0400
commitad293b249e74dd1cfbdbd721d02145efbdaf9eca (patch)
treee568d96f6d7f64c5e58b4c7cd1c4fda7e649bfc7
parentd7411acc2b1c7702280dbff1c3e1bafee528184b (diff)
parente25e85fbb047fef895ede97c3c2c73451631052c (diff)
downloadscummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.gz
scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.tar.bz2
scummvm-rg350-ad293b249e74dd1cfbdbd721d02145efbdaf9eca.zip
Merge remote branch 'upstream/master' into pegasus
-rw-r--r--.gitignore9
-rw-r--r--AUTHORS37
-rw-r--r--NEWS30
-rw-r--r--README3
-rw-r--r--audio/decoders/aac.cpp120
-rw-r--r--audio/decoders/aac.h12
-rw-r--r--audio/decoders/adpcm.cpp6
-rw-r--r--audio/decoders/codec.h44
-rw-r--r--audio/decoders/qdm2.cpp116
-rw-r--r--audio/decoders/qdm2.h15
-rw-r--r--audio/decoders/quicktime.cpp55
-rw-r--r--audio/decoders/quicktime.h2
-rw-r--r--audio/decoders/quicktime_intern.h5
-rw-r--r--audio/decoders/voc.cpp6
-rw-r--r--audio/mididrv.cpp21
-rw-r--r--audio/mpu401.cpp5
-rw-r--r--audio/rate.cpp3
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.cpp26
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_midi.cpp49
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_midi.h6
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp2
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp4
-rw-r--r--audio/softsynth/mt32.cpp4
-rw-r--r--audio/softsynth/opl/mame.cpp2
-rw-r--r--backends/audiocd/audiocd.h2
-rw-r--r--backends/events/ps3sdl/ps3sdl-events.cpp163
-rw-r--r--backends/events/ps3sdl/ps3sdl-events.h38
-rw-r--r--backends/events/sdl/sdl-events.cpp21
-rw-r--r--backends/events/sdl/sdl-events.h10
-rw-r--r--backends/events/webossdl/webossdl-events.cpp2
-rw-r--r--backends/events/wincesdl/wincesdl-events.cpp3
-rw-r--r--backends/fs/ds/ds-fs-factory.cpp2
-rw-r--r--backends/fs/posix/posix-fs-factory.cpp2
-rw-r--r--backends/fs/posix/posix-fs-factory.h1
-rw-r--r--backends/fs/posix/posix-fs.cpp2
-rw-r--r--backends/fs/ps2/ps2-fs-factory.cpp2
-rw-r--r--backends/fs/ps3/ps3-fs-factory.cpp26
-rw-r--r--backends/fs/ps3/ps3-fs-factory.h36
-rw-r--r--backends/fs/psp/psp-fs-factory.cpp2
-rw-r--r--backends/fs/wii/wii-fs-factory.cpp2
-rw-r--r--backends/fs/windows/windows-fs.cpp12
-rw-r--r--backends/fs/windows/windows-fs.h11
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp14
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.h10
-rw-r--r--backends/graphics/gph/gph-graphics.cpp16
-rw-r--r--backends/graphics/gph/gph-graphics.h8
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp10
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h4
-rw-r--r--backends/graphics/opengl/gltexture.cpp2
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp24
-rw-r--r--backends/graphics/opengl/opengl-graphics.h4
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp66
-rw-r--r--backends/graphics/openpandora/op-graphics.cpp4
-rw-r--r--backends/graphics/openpandora/op-graphics.h8
-rw-r--r--backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp6
-rw-r--r--backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h4
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp (renamed from backends/graphics/sdl/sdl-graphics.cpp)154
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.h (renamed from backends/graphics/sdl/sdl-graphics.h)16
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.cpp6
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.h4
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.cpp32
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.h7
-rw-r--r--backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp2
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp6
-rw-r--r--backends/mixer/sdl/sdl-mixer.h2
-rw-r--r--backends/mixer/sdl13/sdl13-mixer.cpp109
-rw-r--r--backends/mixer/sdl13/sdl13-mixer.h67
-rw-r--r--backends/mixer/wincesdl/wincesdl-mixer.cpp11
-rw-r--r--backends/modular-backend.h10
-rw-r--r--backends/module.mk24
-rw-r--r--backends/platform/android/android.cpp2
-rw-r--r--backends/platform/android/jni.cpp3
-rw-r--r--backends/platform/dc/dc-fs.cpp2
-rw-r--r--backends/platform/dc/dcmain.cpp12
-rw-r--r--backends/platform/dc/plugins.cpp2
-rw-r--r--backends/platform/dc/selector.cpp27
-rw-r--r--backends/platform/dingux/dingux.cpp2
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.cpp4
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/README (renamed from backends/platform/gph/devices/gp2x/mmuhack/readme.txt)8
-rw-r--r--backends/platform/iphone/osys_main.cpp12
-rw-r--r--backends/platform/iphone/osys_main.h2
-rw-r--r--backends/platform/n64/osys_n64.h3
-rw-r--r--backends/platform/n64/osys_n64_base.cpp12
-rw-r--r--backends/platform/n64/osys_n64_events.cpp2
-rw-r--r--backends/platform/null/null.cpp14
-rwxr-xr-xbackends/platform/openpandora/build/PXML.xml83
-rw-r--r--backends/platform/openpandora/build/PXML_schema.xsd341
-rwxr-xr-xbackends/platform/openpandora/build/pnd_make.sh340
-rwxr-xr-xbackends/platform/openpandora/build/runscummvm.sh3
-rwxr-xr-xbackends/platform/openpandora/op-bundle.mk3
-rw-r--r--backends/platform/ps2/systemps2.cpp4
-rw-r--r--backends/platform/psp/cursor.cpp10
-rw-r--r--backends/platform/psp/display_client.cpp32
-rw-r--r--backends/platform/psp/display_client.h10
-rw-r--r--backends/platform/psp/display_manager.cpp10
-rw-r--r--backends/platform/psp/display_manager.h6
-rw-r--r--backends/platform/psp/dummy.cpp12
-rw-r--r--backends/platform/psp/image_viewer.cpp90
-rw-r--r--backends/platform/psp/image_viewer.h28
-rw-r--r--backends/platform/psp/input.cpp32
-rw-r--r--backends/platform/psp/input.h20
-rw-r--r--backends/platform/psp/osys_psp.cpp15
-rw-r--r--backends/platform/psp/png_loader.cpp22
-rw-r--r--backends/platform/psp/png_loader.h2
-rw-r--r--backends/platform/psp/powerman.cpp2
-rw-r--r--backends/platform/psp/rtc.cpp2
-rw-r--r--backends/platform/psp/trace.cpp36
-rwxr-xr-xbackends/platform/sdl/macosx/appmenu_osx.h32
-rwxr-xr-xbackends/platform/sdl/macosx/appmenu_osx.mm110
-rw-r--r--backends/platform/sdl/macosx/macosx.cpp14
-rw-r--r--backends/platform/sdl/main.cpp1
-rw-r--r--backends/platform/sdl/module.mk9
-rw-r--r--backends/platform/sdl/posix/posix-main.cpp2
-rw-r--r--backends/platform/sdl/posix/posix.cpp11
-rw-r--r--backends/platform/sdl/ps3/ps3-main.cpp49
-rw-r--r--backends/platform/sdl/ps3/ps3.cpp94
-rw-r--r--backends/platform/sdl/ps3/ps3.h47
-rw-r--r--backends/platform/sdl/sdl-sys.h25
-rw-r--r--backends/platform/sdl/sdl.cpp96
-rw-r--r--backends/platform/sdl/sdl.h8
-rw-r--r--backends/platform/sdl/win32/win32.cpp118
-rw-r--r--backends/platform/sdl/win32/win32.h2
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp4
-rw-r--r--backends/platform/wii/osystem.cpp18
-rw-r--r--backends/platform/wii/osystem.h2
-rw-r--r--backends/platform/wii/osystem_gfx.cpp1
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp14
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp14
-rw-r--r--backends/platform/wince/CELauncherDialog.cpp6
-rw-r--r--backends/platform/wince/README-WinCE.txt40
-rw-r--r--backends/platform/wince/wince-sdl.cpp109
-rw-r--r--backends/platform/wince/wince-sdl.h3
-rw-r--r--backends/plugins/elf/elf-loader.cpp26
-rw-r--r--backends/plugins/elf/elf-provider.cpp8
-rw-r--r--backends/plugins/elf/memory-manager.cpp64
-rw-r--r--backends/plugins/elf/memory-manager.h26
-rw-r--r--backends/plugins/elf/mips-loader.cpp6
-rw-r--r--backends/plugins/elf/shorts-segment-manager.cpp2
-rw-r--r--backends/taskbar/unity/unity-taskbar.cpp114
-rw-r--r--backends/taskbar/unity/unity-taskbar.h58
-rw-r--r--backends/taskbar/win32/mingw-compat.h154
-rw-r--r--backends/taskbar/win32/win32-taskbar.cpp414
-rw-r--r--backends/taskbar/win32/win32-taskbar.h71
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.cpp6
-rw-r--r--base/commandLine.cpp37
-rw-r--r--base/main.cpp10
-rw-r--r--base/plugins.cpp43
-rw-r--r--base/plugins.h20
-rw-r--r--base/version.cpp5
-rw-r--r--common/EventRecorder.cpp4
-rw-r--r--common/archive.cpp4
-rw-r--r--common/archive.h2
-rw-r--r--common/array.h7
-rw-r--r--common/bitstream.cpp217
-rw-r--r--common/bitstream.h173
-rw-r--r--common/config-file.cpp6
-rw-r--r--common/config-manager.cpp18
-rw-r--r--common/config-manager.h2
-rw-r--r--common/cosinetables.cpp8274
-rw-r--r--common/cosinetables.h37
-rw-r--r--common/dct.cpp208
-rw-r--r--common/dct.h76
-rw-r--r--common/debug.cpp18
-rw-r--r--common/error.cpp3
-rw-r--r--common/error.h2
-rw-r--r--common/fft.cpp243
-rw-r--r--common/fft.h78
-rw-r--r--common/forbidden.h7
-rw-r--r--common/hashmap.h11
-rw-r--r--common/huffman.cpp86
-rw-r--r--common/huffman.h82
-rw-r--r--common/math.h80
-rw-r--r--common/module.mk11
-rw-r--r--common/ptr.h2
-rw-r--r--common/quicktime.cpp4
-rw-r--r--common/rdft.cpp102
-rw-r--r--common/rdft.h70
-rw-r--r--common/scummsys.h13
-rw-r--r--common/sinetables.cpp8274
-rw-r--r--common/sinetables.h37
-rw-r--r--common/singleton.h6
-rw-r--r--common/str.cpp26
-rw-r--r--common/str.h13
-rw-r--r--common/system.cpp28
-rw-r--r--common/system.h26
-rw-r--r--common/taskbar.h133
-rw-r--r--common/textconsole.cpp9
-rw-r--r--common/translation.cpp59
-rw-r--r--common/util.h5
-rw-r--r--common/winexe_ne.cpp2
-rw-r--r--common/winexe_pe.h2
-rw-r--r--common/xmlparser.cpp10
-rw-r--r--common/xmlparser.h3
-rwxr-xr-xconfigure261
-rw-r--r--devtools/convbdf.c6
-rw-r--r--devtools/create_hugo/create_hugo.cpp2
-rw-r--r--devtools/create_hugo/staticdisplay.h2
-rw-r--r--devtools/create_kyradat/extract.cpp2
-rw-r--r--devtools/create_mads/main.cpp4
-rw-r--r--devtools/create_mads/parser.cpp22
-rw-r--r--devtools/create_project/create_project.cpp7
-rw-r--r--devtools/create_project/msvc10/create_project.vcxproj22
-rw-r--r--devtools/create_project/scripts/installer.vbs5
-rw-r--r--devtools/create_project/scripts/postbuild.cmd18
-rw-r--r--devtools/create_toon/create_toon.cpp6
-rw-r--r--devtools/create_toon/create_toon.h6
-rwxr-xr-xdevtools/credits.pl36
-rw-r--r--devtools/skycpt/cptcompiler.cpp2
-rw-r--r--devtools/tasmrecover/.gitignore4
-rw-r--r--devtools/tasmrecover/dreamweb/LICENSE339
-rw-r--r--devtools/tasmrecover/dreamweb/backdrop.asm876
-rw-r--r--devtools/tasmrecover/dreamweb/debug.asm381
-rw-r--r--devtools/tasmrecover/dreamweb/dreamweb.asm6283
-rw-r--r--devtools/tasmrecover/dreamweb/keypad.asm1762
-rw-r--r--devtools/tasmrecover/dreamweb/look.asm166
-rw-r--r--devtools/tasmrecover/dreamweb/monitor.asm1497
-rw-r--r--devtools/tasmrecover/dreamweb/newplace.asm584
-rw-r--r--devtools/tasmrecover/dreamweb/object.asm2610
-rw-r--r--devtools/tasmrecover/dreamweb/print.asm591
-rw-r--r--devtools/tasmrecover/dreamweb/saveload.asm1519
-rw-r--r--devtools/tasmrecover/dreamweb/sblaster.asm1292
-rw-r--r--devtools/tasmrecover/dreamweb/sprite.asm5033
-rw-r--r--devtools/tasmrecover/dreamweb/talk.asm583
-rw-r--r--devtools/tasmrecover/dreamweb/titles.asm585
-rw-r--r--devtools/tasmrecover/dreamweb/use.asm3828
-rw-r--r--devtools/tasmrecover/dreamweb/vars.asm563
-rw-r--r--devtools/tasmrecover/dreamweb/vgafades.asm866
-rw-r--r--devtools/tasmrecover/dreamweb/vgagrafx.asm1762
-rwxr-xr-xdevtools/tasmrecover/tasm-recover68
-rw-r--r--devtools/tasmrecover/tasm/__init__.py0
-rw-r--r--devtools/tasmrecover/tasm/cpp.py634
-rw-r--r--devtools/tasmrecover/tasm/lex.py73
-rw-r--r--devtools/tasmrecover/tasm/op.py431
-rw-r--r--devtools/tasmrecover/tasm/parser.py282
-rw-r--r--devtools/tasmrecover/tasm/proc.py192
-rwxr-xr-xdevtools/update-version.pl2
-rw-r--r--dists/nsis/graphics/scummvm-install.icobin15086 -> 0 bytes
-rw-r--r--dists/ps3/ICON0.PNGbin0 -> 43210 bytes
-rw-r--r--dists/ps3/PIC1.PNGbin0 -> 3193068 bytes
-rw-r--r--dists/ps3/readme-ps3.md49
-rw-r--r--dists/ps3/sfo.xml33
-rw-r--r--dists/redhat/scummvm.spec4
-rw-r--r--dists/redhat/scummvm.spec.in4
-rw-r--r--dists/scummvm.rc6
-rw-r--r--dists/scummvm.rc.in6
-rw-r--r--dists/win32/ScummVM.iss10
-rw-r--r--dists/win32/graphics/left.bmp (renamed from dists/nsis/graphics/left.bmp)bin154542 -> 154542 bytes
-rw-r--r--dists/win32/graphics/scummvm-install.icobin0 -> 77799 bytes
-rw-r--r--dists/win32/plugins/Games.dllbin0 -> 105472 bytes
-rw-r--r--dists/win32/scummvm.gdf.xml44
-rw-r--r--dists/win32/scummvm.nsi (renamed from dists/nsis/scummvm.nsi)147
-rw-r--r--dists/win32/scummvm.nsi.in (renamed from dists/nsis/scummvm.nsi.in)147
-rw-r--r--[-rwxr-xr-x]doc/QuickStart (renamed from doc/translations/README-translation_template.txt)0
-rw-r--r--doc/de/Liesmich770
-rw-r--r--doc/de/Schnellstart176
-rw-r--r--[-rwxr-xr-x]doc/fr/QuickStart_fr (renamed from doc/translations/README-fr.txt)0
-rw-r--r--doc/he/bink-md5s.txt28
-rw-r--r--doc/he/md5s.txt2861
-rw-r--r--doc/he/smacker-md5s.txt46
-rw-r--r--doc/he/u32.txt39
-rw-r--r--doc/he/versions.html754
-rwxr-xr-xdoc/translations/README-de.txt178
-rw-r--r--engines/advancedDetector.cpp23
-rw-r--r--engines/advancedDetector.h3
-rw-r--r--engines/agi/agi.cpp2
-rw-r--r--engines/agi/detection.cpp2
-rw-r--r--engines/agi/preagi_winnie.cpp81
-rw-r--r--engines/agi/sound.cpp2
-rw-r--r--engines/agi/sound_2gs.cpp12
-rw-r--r--engines/agi/sound_2gs.h4
-rw-r--r--engines/agi/sound_midi.cpp10
-rw-r--r--engines/agi/sound_pcjr.h4
-rw-r--r--engines/agi/sound_sarien.cpp4
-rw-r--r--engines/agi/text.cpp5
-rw-r--r--engines/agi/wagparser.cpp4
-rw-r--r--engines/agos/script_pn.cpp8
-rw-r--r--engines/agos/string.cpp12
-rw-r--r--engines/cine/detection.cpp2
-rw-r--r--engines/cine/prc.cpp4
-rw-r--r--engines/cine/various.cpp7
-rw-r--r--engines/cruise/background.cpp2
-rw-r--r--engines/cruise/cruise_main.cpp12
-rw-r--r--engines/cruise/mainDraw.cpp8
-rw-r--r--engines/cruise/script.cpp4
-rw-r--r--engines/dialogs.cpp12
-rw-r--r--engines/draci/script.cpp4
-rw-r--r--engines/draci/sound.cpp13
-rw-r--r--engines/drascula/detection.cpp2
-rw-r--r--engines/drascula/graphics.cpp4
-rw-r--r--engines/drascula/interface.cpp2
-rw-r--r--engines/drascula/resource.cpp2
-rw-r--r--engines/drascula/rooms.cpp2
-rw-r--r--engines/dreamweb/README12
-rw-r--r--engines/dreamweb/console.cpp33
-rw-r--r--engines/dreamweb/console.h43
-rw-r--r--engines/dreamweb/detection.cpp144
-rw-r--r--engines/dreamweb/detection_tables.h189
-rw-r--r--engines/dreamweb/dreamgen.cpp22108
-rw-r--r--engines/dreamweb/dreamgen.h2091
-rw-r--r--engines/dreamweb/dreamweb.cpp648
-rw-r--r--engines/dreamweb/dreamweb.h157
-rw-r--r--engines/dreamweb/module.mk16
-rw-r--r--engines/dreamweb/runtime.h583
-rw-r--r--engines/dreamweb/structs.h68
-rw-r--r--engines/dreamweb/stubs.cpp1258
-rw-r--r--engines/dreamweb/stubs.h73
-rw-r--r--engines/engine.cpp31
-rw-r--r--engines/engine.h23
-rw-r--r--engines/engines.mk5
-rw-r--r--engines/game.cpp34
-rw-r--r--engines/game.h22
-rw-r--r--engines/gob/inter_fascin.cpp2
-rw-r--r--engines/gob/video_v6.cpp2
-rw-r--r--engines/groovie/detection.cpp14
-rw-r--r--engines/groovie/music.cpp8
-rw-r--r--engines/groovie/player.h4
-rw-r--r--engines/groovie/saveload.cpp4
-rw-r--r--engines/groovie/script.cpp6
-rw-r--r--engines/hugo/console.cpp12
-rw-r--r--engines/hugo/dialogs.cpp10
-rw-r--r--engines/hugo/display.cpp2
-rw-r--r--engines/hugo/file_v1d.cpp2
-rw-r--r--engines/hugo/file_v1w.cpp2
-rw-r--r--engines/hugo/file_v2d.cpp2
-rw-r--r--engines/hugo/file_v3d.cpp4
-rw-r--r--engines/hugo/hugo.cpp6
-rw-r--r--engines/hugo/hugo.h2
-rw-r--r--engines/hugo/inventory.h2
-rw-r--r--engines/hugo/object.cpp4
-rw-r--r--engines/hugo/parser.cpp6
-rw-r--r--engines/hugo/parser.h4
-rw-r--r--engines/hugo/schedule.cpp4
-rw-r--r--engines/hugo/schedule.h2
-rw-r--r--engines/hugo/sound.cpp4
-rw-r--r--engines/hugo/util.cpp2
-rw-r--r--engines/kyra/debugger.cpp9
-rw-r--r--engines/kyra/detection_tables.h30
-rw-r--r--engines/kyra/gui.cpp19
-rw-r--r--engines/kyra/gui_lok.cpp14
-rw-r--r--engines/kyra/gui_lol.cpp10
-rw-r--r--engines/kyra/gui_v2.cpp9
-rw-r--r--engines/kyra/kyra_hof.cpp8
-rw-r--r--engines/kyra/kyra_lok.cpp8
-rw-r--r--engines/kyra/kyra_mr.cpp8
-rw-r--r--engines/kyra/kyra_v1.cpp5
-rw-r--r--engines/kyra/kyra_v1.h19
-rw-r--r--engines/kyra/lol.cpp8
-rw-r--r--engines/kyra/lol.h2
-rw-r--r--engines/kyra/saveload_hof.cpp2
-rw-r--r--engines/kyra/saveload_lok.cpp2
-rw-r--r--engines/kyra/saveload_lol.cpp2
-rw-r--r--engines/kyra/saveload_mr.cpp2
-rw-r--r--engines/kyra/screen.cpp2
-rw-r--r--engines/kyra/script_lol.cpp34
-rw-r--r--engines/kyra/sequences_lol.cpp4
-rw-r--r--engines/kyra/sound.cpp4
-rw-r--r--engines/kyra/sound.h2
-rw-r--r--engines/kyra/sound_intern.h2
-rw-r--r--engines/kyra/sound_midi.cpp3
-rw-r--r--engines/kyra/sound_towns.cpp12
-rw-r--r--engines/lastexpress/data/animation.cpp12
-rw-r--r--engines/lastexpress/data/background.cpp2
-rw-r--r--engines/lastexpress/data/font.cpp8
-rw-r--r--engines/lastexpress/data/scene.cpp8
-rw-r--r--engines/lastexpress/data/sequence.cpp14
-rw-r--r--engines/lastexpress/data/snd.cpp396
-rw-r--r--engines/lastexpress/data/snd.h14
-rw-r--r--engines/lastexpress/data/subtitle.cpp4
-rw-r--r--engines/lastexpress/debug.cpp11
-rw-r--r--engines/lastexpress/detection.cpp38
-rw-r--r--engines/lastexpress/entities/abbot.cpp10
-rw-r--r--engines/lastexpress/entities/alexei.cpp3
-rw-r--r--engines/lastexpress/entities/alouan.cpp3
-rw-r--r--engines/lastexpress/entities/anna.cpp65
-rw-r--r--engines/lastexpress/entities/august.cpp28
-rw-r--r--engines/lastexpress/entities/boutarel.cpp8
-rw-r--r--engines/lastexpress/entities/chapters.cpp147
-rw-r--r--engines/lastexpress/entities/cooks.cpp8
-rw-r--r--engines/lastexpress/entities/coudert.cpp26
-rw-r--r--engines/lastexpress/entities/entity.cpp15
-rw-r--r--engines/lastexpress/entities/entity.h24
-rw-r--r--engines/lastexpress/entities/entity_intern.h4
-rw-r--r--engines/lastexpress/entities/francois.cpp12
-rw-r--r--engines/lastexpress/entities/gendarmes.cpp18
-rw-r--r--engines/lastexpress/entities/gendarmes.h4
-rw-r--r--engines/lastexpress/entities/hadija.cpp3
-rw-r--r--engines/lastexpress/entities/ivo.cpp6
-rw-r--r--engines/lastexpress/entities/kahina.cpp18
-rw-r--r--engines/lastexpress/entities/kronos.cpp16
-rw-r--r--engines/lastexpress/entities/mahmud.cpp24
-rw-r--r--engines/lastexpress/entities/max.cpp48
-rw-r--r--engines/lastexpress/entities/mertens.cpp26
-rw-r--r--engines/lastexpress/entities/milos.cpp29
-rw-r--r--engines/lastexpress/entities/mmeboutarel.cpp10
-rw-r--r--engines/lastexpress/entities/pascale.cpp24
-rw-r--r--engines/lastexpress/entities/rebecca.cpp10
-rw-r--r--engines/lastexpress/entities/salko.cpp11
-rw-r--r--engines/lastexpress/entities/servers0.cpp3
-rw-r--r--engines/lastexpress/entities/servers1.cpp3
-rw-r--r--engines/lastexpress/entities/sophie.cpp3
-rw-r--r--engines/lastexpress/entities/tables.cpp22
-rw-r--r--engines/lastexpress/entities/tatiana.cpp30
-rw-r--r--engines/lastexpress/entities/train.cpp50
-rw-r--r--engines/lastexpress/entities/vassili.cpp10
-rw-r--r--engines/lastexpress/entities/verges.cpp32
-rw-r--r--engines/lastexpress/entities/vesna.cpp10
-rw-r--r--engines/lastexpress/entities/yasmin.cpp3
-rw-r--r--engines/lastexpress/fight/fight.cpp409
-rw-r--r--engines/lastexpress/fight/fight.h125
-rw-r--r--engines/lastexpress/fight/fighter.cpp249
-rw-r--r--engines/lastexpress/fight/fighter.h123
-rw-r--r--engines/lastexpress/fight/fighter_anna.cpp187
-rw-r--r--engines/lastexpress/fight/fighter_anna.h48
-rw-r--r--engines/lastexpress/fight/fighter_ivo.cpp245
-rw-r--r--engines/lastexpress/fight/fighter_ivo.h51
-rw-r--r--engines/lastexpress/fight/fighter_milos.cpp222
-rw-r--r--engines/lastexpress/fight/fighter_milos.h51
-rw-r--r--engines/lastexpress/fight/fighter_salko.cpp202
-rw-r--r--engines/lastexpress/fight/fighter_salko.h51
-rw-r--r--engines/lastexpress/fight/fighter_vesna.cpp265
-rw-r--r--engines/lastexpress/fight/fighter_vesna.h51
-rw-r--r--engines/lastexpress/game/action.cpp72
-rw-r--r--engines/lastexpress/game/beetle.cpp14
-rw-r--r--engines/lastexpress/game/entities.cpp28
-rw-r--r--engines/lastexpress/game/fight.cpp1583
-rw-r--r--engines/lastexpress/game/fight.h266
-rw-r--r--engines/lastexpress/game/inventory.cpp19
-rw-r--r--engines/lastexpress/game/logic.cpp29
-rw-r--r--engines/lastexpress/game/object.cpp2
-rw-r--r--engines/lastexpress/game/savegame.cpp81
-rw-r--r--engines/lastexpress/game/savepoint.cpp6
-rw-r--r--engines/lastexpress/game/scenes.cpp24
-rw-r--r--engines/lastexpress/game/sound.h389
-rw-r--r--engines/lastexpress/game/state.cpp2
-rw-r--r--engines/lastexpress/game/state.h2
-rw-r--r--engines/lastexpress/graphics.cpp6
-rw-r--r--engines/lastexpress/helpers.h1
-rw-r--r--engines/lastexpress/lastexpress.cpp35
-rw-r--r--engines/lastexpress/menu/clock.cpp106
-rw-r--r--engines/lastexpress/menu/clock.h53
-rw-r--r--engines/lastexpress/menu/menu.cpp (renamed from engines/lastexpress/game/menu.cpp)274
-rw-r--r--engines/lastexpress/menu/menu.h (renamed from engines/lastexpress/game/menu.h)0
-rw-r--r--engines/lastexpress/menu/trainline.cpp142
-rw-r--r--engines/lastexpress/menu/trainline.h51
-rw-r--r--engines/lastexpress/module.mk16
-rw-r--r--engines/lastexpress/resource.cpp4
-rw-r--r--engines/lastexpress/resource.h2
-rw-r--r--engines/lastexpress/shared.h80
-rw-r--r--engines/lastexpress/sound/entry.cpp465
-rw-r--r--engines/lastexpress/sound/entry.h196
-rw-r--r--engines/lastexpress/sound/queue.cpp400
-rw-r--r--engines/lastexpress/sound/queue.h121
-rw-r--r--engines/lastexpress/sound/sound.cpp (renamed from engines/lastexpress/game/sound.cpp)882
-rw-r--r--engines/lastexpress/sound/sound.h93
-rw-r--r--engines/lure/debugger.cpp14
-rw-r--r--engines/lure/disk.cpp3
-rw-r--r--engines/lure/hotspots.cpp3
-rw-r--r--engines/lure/memory.cpp8
-rw-r--r--engines/lure/res_struct.h2
-rw-r--r--engines/lure/sound.cpp2
-rw-r--r--engines/m4/animation.cpp18
-rw-r--r--engines/m4/assets.cpp8
-rw-r--r--engines/m4/assets.h4
-rw-r--r--engines/m4/detection.cpp38
-rw-r--r--engines/m4/dialogs.cpp6
-rw-r--r--engines/m4/events.cpp2
-rw-r--r--engines/m4/font.h2
-rw-r--r--engines/m4/globals.cpp4
-rw-r--r--engines/m4/graphics.cpp12
-rw-r--r--engines/m4/graphics.h2
-rw-r--r--engines/m4/m4.cpp2
-rw-r--r--engines/m4/m4.h2
-rw-r--r--engines/m4/m4_views.cpp2
-rw-r--r--engines/m4/mads_anim.cpp2
-rw-r--r--engines/m4/mads_logic.cpp32
-rw-r--r--engines/m4/mads_logic.h4
-rw-r--r--engines/m4/mads_menus.cpp10
-rw-r--r--engines/m4/mads_player.cpp18
-rw-r--r--engines/m4/mads_scene.cpp20
-rw-r--r--engines/m4/mads_views.cpp40
-rw-r--r--engines/m4/mads_views.h12
-rw-r--r--engines/m4/resource.cpp2
-rw-r--r--engines/m4/resource.h2
-rw-r--r--engines/m4/scene.cpp6
-rw-r--r--engines/m4/sound.cpp4
-rw-r--r--engines/m4/sprite.cpp2
-rw-r--r--engines/made/database.cpp8
-rw-r--r--engines/made/detection.cpp4
-rw-r--r--engines/mohawk/bitmap.cpp2
-rw-r--r--engines/mohawk/console.cpp23
-rw-r--r--engines/mohawk/cstime.cpp2
-rw-r--r--engines/mohawk/cursors.cpp14
-rw-r--r--engines/mohawk/cursors.h2
-rw-r--r--engines/mohawk/detection_tables.h138
-rw-r--r--engines/mohawk/livingbooks.cpp518
-rw-r--r--engines/mohawk/livingbooks.h61
-rw-r--r--engines/mohawk/livingbooks_code.cpp555
-rw-r--r--engines/mohawk/livingbooks_code.h14
-rw-r--r--engines/mohawk/mohawk.h4
-rw-r--r--engines/mohawk/myst.cpp4
-rw-r--r--engines/mohawk/myst_scripts.cpp179
-rw-r--r--engines/mohawk/myst_stacks/demo.cpp2
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp20
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp4
-rw-r--r--engines/mohawk/resource.cpp601
-rw-r--r--engines/mohawk/resource.h146
-rw-r--r--engines/mohawk/riven.cpp12
-rw-r--r--engines/mohawk/riven_external.cpp8
-rw-r--r--engines/mohawk/riven_saveload.cpp93
-rw-r--r--engines/mohawk/riven_scripts.cpp2
-rw-r--r--engines/mohawk/sound.cpp13
-rw-r--r--engines/mohawk/video.cpp8
-rw-r--r--engines/parallaction/dialogue.cpp28
-rw-r--r--engines/parallaction/exec_br.cpp6
-rw-r--r--engines/parallaction/gfxbase.cpp10
-rw-r--r--engines/parallaction/graphics.cpp6
-rw-r--r--engines/parallaction/graphics.h1
-rw-r--r--engines/parallaction/gui_br.cpp4
-rw-r--r--engines/parallaction/gui_ns.cpp22
-rw-r--r--engines/parallaction/objects.cpp8
-rw-r--r--engines/parallaction/parallaction.cpp10
-rw-r--r--engines/parallaction/parallaction_ns.cpp4
-rw-r--r--engines/parallaction/parser_br.cpp16
-rw-r--r--engines/parallaction/parser_ns.cpp10
-rw-r--r--engines/parallaction/sound.h4
-rw-r--r--engines/parallaction/sound_ns.cpp8
-rw-r--r--engines/parallaction/walk.cpp6
-rw-r--r--engines/queen/talk.cpp2
-rw-r--r--engines/saga/actor.cpp3
-rw-r--r--engines/saga/actor.h6
-rw-r--r--engines/saga/actor_walk.cpp10
-rw-r--r--engines/saga/animation.cpp4
-rw-r--r--engines/saga/detection.cpp3
-rw-r--r--engines/saga/detection_tables.h18
-rw-r--r--engines/saga/events.cpp2
-rw-r--r--engines/saga/introproc_ite.cpp33
-rw-r--r--engines/saga/introproc_saga2.cpp2
-rw-r--r--engines/saga/isomap.cpp2
-rw-r--r--engines/saga/music.cpp9
-rw-r--r--engines/saga/palanim.cpp4
-rw-r--r--engines/saga/resource.cpp6
-rw-r--r--engines/saga/saga.cpp7
-rw-r--r--engines/saga/saga.h14
-rw-r--r--engines/saga/scene.cpp2
-rw-r--r--engines/saga/scene.h2
-rw-r--r--engines/saga/sndres.cpp9
-rw-r--r--engines/saga/sprite.cpp8
-rw-r--r--engines/savestate.cpp43
-rw-r--r--engines/savestate.h165
-rw-r--r--engines/sci/console.cpp18
-rw-r--r--engines/sci/decompressor.cpp46
-rw-r--r--engines/sci/detection.cpp125
-rw-r--r--engines/sci/detection_tables.h198
-rw-r--r--engines/sci/engine/features.h2
-rw-r--r--engines/sci/engine/kernel.h2
-rw-r--r--engines/sci/engine/kernel_tables.h6
-rw-r--r--engines/sci/engine/kevent.cpp2
-rw-r--r--engines/sci/engine/kfile.cpp6
-rw-r--r--engines/sci/engine/kgraphics.cpp12
-rw-r--r--engines/sci/engine/kmisc.cpp6
-rw-r--r--engines/sci/engine/kmovement.cpp4
-rw-r--r--engines/sci/engine/kpathing.cpp6
-rw-r--r--engines/sci/engine/kscripts.cpp2
-rw-r--r--engines/sci/engine/kstring.cpp23
-rw-r--r--engines/sci/engine/kvideo.cpp6
-rw-r--r--engines/sci/engine/object.cpp10
-rw-r--r--engines/sci/engine/object.h4
-rw-r--r--engines/sci/engine/savegame.h2
-rw-r--r--engines/sci/engine/script.cpp2
-rw-r--r--engines/sci/engine/script_patches.cpp10
-rw-r--r--engines/sci/engine/scriptdebug.cpp12
-rw-r--r--engines/sci/engine/segment.cpp2
-rw-r--r--engines/sci/engine/selector.cpp2
-rw-r--r--engines/sci/engine/selector.h2
-rw-r--r--engines/sci/engine/state.cpp4
-rw-r--r--engines/sci/engine/static_selectors.cpp8
-rw-r--r--engines/sci/engine/vm.cpp24
-rw-r--r--engines/sci/engine/vm_types.cpp12
-rw-r--r--engines/sci/engine/workarounds.cpp5
-rw-r--r--engines/sci/event.cpp4
-rw-r--r--engines/sci/graphics/animate.cpp4
-rw-r--r--engines/sci/graphics/compare.h2
-rw-r--r--engines/sci/graphics/coordadjuster.h4
-rw-r--r--engines/sci/graphics/menu.cpp4
-rw-r--r--engines/sci/graphics/palette.cpp8
-rw-r--r--engines/sci/graphics/palette.h2
-rw-r--r--engines/sci/graphics/picture.cpp6
-rw-r--r--engines/sci/graphics/ports.cpp2
-rw-r--r--engines/sci/graphics/screen.cpp2
-rw-r--r--engines/sci/graphics/text16.cpp2
-rw-r--r--engines/sci/graphics/view.cpp6
-rw-r--r--engines/sci/parser/said.cpp10
-rw-r--r--engines/sci/resource.cpp30
-rw-r--r--engines/sci/resource_audio.cpp6
-rw-r--r--engines/sci/sci.cpp7
-rw-r--r--engines/sci/sci.h4
-rw-r--r--engines/sci/sound/audio.cpp2
-rw-r--r--engines/sci/sound/drivers/amigamac.cpp6
-rw-r--r--engines/sci/sound/music.cpp4
-rw-r--r--engines/sci/video/robot_decoder.cpp24
-rw-r--r--engines/sci/video/seq_decoder.h2
-rw-r--r--engines/scumm/actor.cpp2
-rw-r--r--engines/scumm/charset.cpp910
-rw-r--r--engines/scumm/charset.h88
-rw-r--r--engines/scumm/costume.cpp10
-rw-r--r--engines/scumm/cursor.cpp6
-rw-r--r--engines/scumm/detection.cpp27
-rw-r--r--engines/scumm/detection_tables.h8
-rw-r--r--engines/scumm/gfx.cpp47
-rw-r--r--engines/scumm/gfx.h23
-rw-r--r--engines/scumm/gfx_towns.cpp72
-rw-r--r--engines/scumm/he/animation_he.cpp128
-rw-r--r--engines/scumm/he/animation_he.h35
-rw-r--r--engines/scumm/he/logic_he.cpp2
-rw-r--r--engines/scumm/he/resource_he.cpp2
-rw-r--r--engines/scumm/he/resource_he.h2
-rw-r--r--engines/scumm/he/script_v100he.cpp2
-rw-r--r--engines/scumm/he/script_v60he.cpp14
-rw-r--r--engines/scumm/he/script_v72he.cpp2
-rw-r--r--engines/scumm/he/script_v90he.cpp2
-rw-r--r--engines/scumm/imuse/imuse.cpp166
-rw-r--r--engines/scumm/imuse/imuse.h7
-rw-r--r--engines/scumm/imuse/imuse_internal.h42
-rw-r--r--engines/scumm/imuse/imuse_part.cpp12
-rw-r--r--engines/scumm/imuse/imuse_player.cpp55
-rw-r--r--engines/scumm/imuse/instrument.cpp100
-rw-r--r--engines/scumm/imuse/instrument.h7
-rw-r--r--engines/scumm/imuse/pcspk.cpp835
-rw-r--r--engines/scumm/imuse/pcspk.h161
-rw-r--r--engines/scumm/imuse/sysex_samnmax.cpp3
-rw-r--r--engines/scumm/imuse/sysex_scumm.cpp81
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.cpp2
-rw-r--r--engines/scumm/input.cpp2
-rw-r--r--engines/scumm/module.mk1
-rw-r--r--engines/scumm/palette.cpp6
-rw-r--r--engines/scumm/player_towns.cpp56
-rw-r--r--engines/scumm/player_towns.h12
-rw-r--r--engines/scumm/resource.cpp7
-rw-r--r--engines/scumm/saveload.cpp16
-rw-r--r--engines/scumm/script_v4.cpp12
-rw-r--r--engines/scumm/script_v5.cpp18
-rw-r--r--engines/scumm/scumm.cpp104
-rw-r--r--engines/scumm/scumm.h27
-rw-r--r--engines/scumm/smush/smush_player.cpp4
-rw-r--r--engines/scumm/sound.cpp19
-rw-r--r--engines/scumm/string.cpp8
-rw-r--r--engines/scumm/vars.cpp6
-rw-r--r--engines/scumm/verbs.cpp18
-rw-r--r--engines/sky/detection.cpp2
-rw-r--r--engines/sword1/animation.cpp4
-rw-r--r--engines/sword2/animation.cpp2
-rw-r--r--engines/sword2/controls.cpp2
-rw-r--r--engines/sword2/render.cpp10
-rw-r--r--engines/sword25/detection_tables.h20
-rw-r--r--engines/sword25/fmv/theora_decoder.cpp11
-rw-r--r--engines/sword25/gfx/animation.h2
-rw-r--r--engines/sword25/gfx/animationresource.cpp6
-rw-r--r--engines/sword25/gfx/animationtemplateregistry.cpp2
-rw-r--r--engines/sword25/gfx/fontresource.cpp2
-rw-r--r--engines/sword25/gfx/graphicengine.cpp4
-rw-r--r--engines/sword25/gfx/image/art.cpp73
-rw-r--r--engines/sword25/gfx/image/art.h5
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp29
-rw-r--r--engines/sword25/gfx/image/vectorimage.cpp4
-rw-r--r--engines/sword25/gfx/image/vectorimagerenderer.cpp7
-rw-r--r--engines/sword25/gfx/screenshot.cpp6
-rw-r--r--engines/sword25/gfx/staticbitmap.cpp5
-rw-r--r--engines/sword25/gfx/text.cpp2
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.cpp33
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.h7
-rw-r--r--engines/sword25/kernel/outputpersistenceblock.cpp12
-rw-r--r--engines/sword25/kernel/persistenceblock.h42
-rw-r--r--engines/sword25/kernel/persistenceservice.cpp32
-rw-r--r--engines/sword25/kernel/persistenceservice.h1
-rw-r--r--engines/sword25/math/regionregistry.cpp2
-rw-r--r--engines/sword25/package/packagemanager.cpp2
-rw-r--r--engines/sword25/package/packagemanager.h5
-rw-r--r--engines/sword25/sfx/soundengine.cpp150
-rw-r--r--engines/sword25/sfx/soundengine.h18
-rw-r--r--engines/sword25/sword25.cpp2
-rw-r--r--engines/sword25/util/lua/lapi.cpp4
-rw-r--r--engines/sword25/util/lua/lauxlib.cpp8
-rw-r--r--engines/sword25/util/lua/ldblib.cpp2
-rw-r--r--engines/sword25/util/lua/ldebug.cpp2
-rw-r--r--engines/sword25/util/lua/ldo.cpp2
-rw-r--r--engines/sword25/util/lua/lgc.cpp4
-rw-r--r--engines/sword25/util/lua/liolib.cpp42
-rw-r--r--engines/sword25/util/lua/llex.cpp2
-rw-r--r--engines/sword25/util/lua/llimits.h4
-rw-r--r--engines/sword25/util/lua/loadlib.cpp4
-rw-r--r--engines/sword25/util/lua/lobject.h2
-rw-r--r--engines/sword25/util/lua/lopcodes.h10
-rw-r--r--engines/sword25/util/lua/lstate.cpp2
-rw-r--r--engines/sword25/util/lua/lstrlib.cpp2
-rw-r--r--engines/sword25/util/lua/ltable.cpp14
-rw-r--r--engines/sword25/util/lua/lua.h2
-rw-r--r--engines/sword25/util/lua/lualib.h2
-rw-r--r--engines/sword25/util/lua/lvm.cpp4
-rw-r--r--engines/sword25/util/lua/scummvm_file.cpp48
-rw-r--r--engines/sword25/util/lua/scummvm_file.h1
-rw-r--r--engines/teenagent/animation.cpp4
-rw-r--r--engines/teenagent/inventory.cpp2
-rw-r--r--engines/teenagent/inventory.h4
-rw-r--r--engines/teenagent/resources.cpp11
-rw-r--r--engines/teenagent/resources.h6
-rw-r--r--engines/teenagent/scene.cpp8
-rw-r--r--engines/teenagent/teenagent.cpp135
-rw-r--r--engines/testbed/config-params.cpp2
-rw-r--r--engines/testbed/config-params.h10
-rw-r--r--engines/tinsel/coroutine.h17
-rw-r--r--engines/tinsel/detection_tables.h6
-rw-r--r--engines/tinsel/pcode.cpp8
-rw-r--r--engines/tinsel/saveload.cpp2
-rw-r--r--engines/tinsel/sched.cpp9
-rw-r--r--engines/tinsel/tinlib.cpp42
-rw-r--r--engines/toon/anim.cpp12
-rw-r--r--engines/toon/anim.h1
-rw-r--r--engines/toon/character.cpp9
-rw-r--r--engines/toon/font.cpp14
-rw-r--r--engines/toon/movie.cpp3
-rw-r--r--engines/toon/path.cpp28
-rw-r--r--engines/toon/picture.cpp11
-rw-r--r--engines/toon/picture.h2
-rw-r--r--engines/toon/tools.cpp2
-rw-r--r--engines/toon/toon.cpp19
-rw-r--r--engines/toon/toon.h6
-rw-r--r--engines/touche/menu.cpp2
-rw-r--r--engines/touche/resource.cpp22
-rw-r--r--engines/tsage/blueforce_logic.cpp2
-rw-r--r--engines/tsage/converse.cpp8
-rw-r--r--engines/tsage/converse.h3
-rw-r--r--engines/tsage/core.cpp66
-rw-r--r--engines/tsage/core.h69
-rw-r--r--engines/tsage/debugger.cpp8
-rw-r--r--engines/tsage/detection_tables.h42
-rw-r--r--engines/tsage/dialogs.cpp10
-rw-r--r--engines/tsage/events.cpp9
-rw-r--r--engines/tsage/events.h1
-rw-r--r--engines/tsage/globals.cpp19
-rw-r--r--engines/tsage/globals.h8
-rw-r--r--engines/tsage/graphics.cpp14
-rw-r--r--engines/tsage/resources.cpp15
-rw-r--r--engines/tsage/ringworld_demo.cpp9
-rw-r--r--engines/tsage/ringworld_demo.h3
-rw-r--r--engines/tsage/ringworld_logic.cpp59
-rw-r--r--engines/tsage/ringworld_scenes1.cpp161
-rw-r--r--engines/tsage/ringworld_scenes1.h25
-rw-r--r--engines/tsage/ringworld_scenes10.cpp43
-rw-r--r--engines/tsage/ringworld_scenes10.h8
-rw-r--r--engines/tsage/ringworld_scenes2.cpp37
-rw-r--r--engines/tsage/ringworld_scenes2.h4
-rw-r--r--engines/tsage/ringworld_scenes3.cpp260
-rw-r--r--engines/tsage/ringworld_scenes3.h20
-rw-r--r--engines/tsage/ringworld_scenes4.cpp8
-rw-r--r--engines/tsage/ringworld_scenes4.h2
-rw-r--r--engines/tsage/ringworld_scenes5.cpp94
-rw-r--r--engines/tsage/ringworld_scenes5.h10
-rw-r--r--engines/tsage/ringworld_scenes6.cpp36
-rw-r--r--engines/tsage/ringworld_scenes6.h8
-rw-r--r--engines/tsage/ringworld_scenes8.cpp49
-rw-r--r--engines/tsage/ringworld_scenes8.h14
-rw-r--r--engines/tsage/saveload.cpp19
-rw-r--r--engines/tsage/saveload.h3
-rw-r--r--engines/tsage/scenes.cpp13
-rw-r--r--engines/tsage/scenes.h4
-rw-r--r--engines/tsage/sound.cpp2910
-rw-r--r--engines/tsage/sound.h465
-rw-r--r--engines/tsage/tsage.cpp15
-rw-r--r--engines/tsage/tsage.h6
-rw-r--r--graphics/cursorman.cpp2
-rw-r--r--graphics/font.cpp764
-rw-r--r--graphics/font.h63
-rw-r--r--graphics/fontman.cpp6
-rw-r--r--graphics/fonts/bdf.cpp796
-rw-r--r--graphics/fonts/bdf.h100
-rw-r--r--graphics/fonts/consolefont.cpp4
-rw-r--r--graphics/fonts/newfont.cpp4
-rw-r--r--graphics/fonts/newfont_big.cpp4
-rw-r--r--graphics/fonts/winfont.cpp20
-rw-r--r--graphics/fonts/winfont.h2
-rw-r--r--graphics/jpeg.h2
-rw-r--r--graphics/module.mk1
-rw-r--r--graphics/png.cpp119
-rw-r--r--graphics/scaler.cpp4
-rw-r--r--graphics/scaler/aspect.cpp2
-rw-r--r--graphics/sjis.cpp509
-rw-r--r--graphics/sjis.h98
-rw-r--r--graphics/surface.cpp2
-rw-r--r--graphics/surface.h2
-rw-r--r--graphics/yuv_to_rgb.cpp2
-rw-r--r--graphics/yuv_to_rgb.h1
-rw-r--r--gui/ThemeEngine.cpp11
-rw-r--r--gui/ThemeParser.cpp22
-rw-r--r--gui/credits.h24
-rw-r--r--gui/debugger.h1
-rw-r--r--gui/gui-manager.cpp2
-rw-r--r--gui/massadd.cpp23
-rw-r--r--gui/massadd.h1
-rw-r--r--gui/options.cpp10
-rw-r--r--gui/saveload.cpp35
-rw-r--r--gui/themes/translations.datbin212190 -> 226564 bytes
-rw-r--r--icons/count.icobin0 -> 1150 bytes
-rw-r--r--icons/scummvm.icobin91198 -> 94081 bytes
-rw-r--r--po/POTFILES3
-rw-r--r--po/ca_ES.po87
-rw-r--r--po/cs_CZ.po107
-rw-r--r--po/da_DA.po87
-rw-r--r--po/de_DE.po316
-rw-r--r--po/es_ES.po87
-rw-r--r--po/fr_FR.po89
-rw-r--r--po/hu_HU.po245
-rw-r--r--po/it_IT.po87
-rw-r--r--po/nb_NO.po87
-rw-r--r--po/nn_NO.po87
-rw-r--r--po/pl_PL.po87
-rw-r--r--po/pt_BR.po87
-rw-r--r--po/ru_RU.po291
-rw-r--r--po/scummvm.pot87
-rw-r--r--po/se_SE.po87
-rw-r--r--po/uk_UA.po87
-rw-r--r--ports.mk96
-rw-r--r--video/bink_decoder.cpp1643
-rw-r--r--video/bink_decoder.h334
-rw-r--r--video/binkdata.h578
-rw-r--r--video/codecs/cdtoons.cpp1
-rw-r--r--video/codecs/truemotion1.cpp2
-rw-r--r--video/codecs/truemotion1.h4
-rw-r--r--video/module.mk5
-rw-r--r--video/qt_decoder.cpp2
-rw-r--r--video/smk_decoder.cpp10
830 files changed, 103858 insertions, 14931 deletions
diff --git a/.gitignore b/.gitignore
index 6294cb451d..99902064ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ lib*.a
/MT32_CONTROL.ROM
/MT32_PCM.ROM
/ScummVM.app
+/scummvm-ps3.pkg
/*.ipk
/.project
/.cproject
@@ -27,6 +28,7 @@ lib*.a
/Icon.*
/build
+/staging
/backends/platform/dc/gui
/backends/platform/dc/graphics
@@ -85,6 +87,7 @@ project.xcworkspace
/dists/msvc*/[Dd]ebug*/
/dists/msvc*/[Rr]elease*/
+/dists/msvc*/[Aa]nalysis*/
/dists/msvc*/*.lib
/dists/msvc*/*.SAV
/dists/msvc*/*.dat
@@ -155,3 +158,9 @@ ipch/
#Ignore default Visual Studio build folders
[Dd]ebug/
[Rr]elease/
+
+#Ignore Qt Creator project files
+ScummVM.config
+ScummVM.creator
+ScummVM.files
+ScummVM.includes
diff --git a/AUTHORS b/AUTHORS
index 89ad7dc1b2..d7b16e3d3b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2,13 +2,13 @@ ScummVM Team
************
Project Leaders
---------------
- Max Horn
Eugene Sandulenko
Retired Project Leaders
-----------------------
James Brown
Vincent Hamm - ScummVM co-founder, Original Cruise/CinE author
+ Max Horn
Ludvig Strigeus - Original ScummVM and SimonVM author
Engine Teams
@@ -18,8 +18,8 @@ ScummVM Team
James Brown - (retired)
Jonathan Gray - (retired)
Vincent Hamm - (retired)
- Max Horn
- Travis Howell - (retired)
+ Max Horn - (retired)
+ Travis Howell
Pawel Kolodziejski - Codecs, iMUSE, Smush, etc.
Gregory Montoir
Eugene Sandulenko - FT INSANE, MM NES, MM C64, game detection,
@@ -28,7 +28,7 @@ ScummVM Team
HE:
Jonathan Gray - (retired)
- Travis Howell - (retired)
+ Travis Howell
Gregory Montoir
Eugene Sandulenko
@@ -37,7 +37,7 @@ ScummVM Team
Matthew Hoops
Filippos Karapetis
Pawel Kolodziejski
- Walter van Niftrik
+ Walter van Niftrik - (retired)
Kari Salminen
Eugene Sandulenko
David Symonds - (retired)
@@ -45,7 +45,7 @@ ScummVM Team
AGOS:
Torbjorn Andersson
Paul Gilbert
- Travis Howell - (retired)
+ Travis Howell
Oliver Kiehl - (retired)
Ludvig Strigeus - (retired)
@@ -68,6 +68,10 @@ ScummVM Team
Filippos Karapetis
Pawel Kolodziejski
+ DreamWeb:
+ Vladimir Menshakov
+ Torbjorn Andersson
+
Gob:
Torbjorn Andersson
Arnaud Boutonne
@@ -134,10 +138,10 @@ ScummVM Team
SCI:
Greg Frieger
Paul Gilbert
- Max Horn
+ Max Horn - (retired)
Filippos Karapetis
Martin Kiewitz
- Walter van Niftrik
+ Walter van Niftrik - (retired)
Willem Jan Palenstijn
Jordi Vilalta Prat
Lars Skovlund
@@ -160,7 +164,7 @@ ScummVM Team
Sword25:
Eugene Sandulenko
Filippos Karapetis
- Max Horn
+ Max Horn - (retired)
Paul Gilbert
Torbjorn Andersson
@@ -173,7 +177,7 @@ ScummVM Team
Fabio Battaglia - PSX version support
Paul Gilbert
Sven Hesse
- Max Horn
+ Max Horn - (retired)
Filippos Karapetis
Joost Peters
@@ -223,7 +227,7 @@ ScummVM Team
PocketPC / WinCE:
Nicolas Bacca - (retired)
Ismail Khatib
- Kostas Nakos - (retired)
+ Kostas Nakos - (retired)
PlayStation 2:
Robert Goeffringmann - (retired)
@@ -234,7 +238,7 @@ ScummVM Team
Yotam Barnoy
SDL (Win/Linux/OS X/etc.):
- Max Horn
+ Max Horn - (retired)
Eugene Sandulenko - Asm routines, GFX layers
SymbianOS:
@@ -251,7 +255,7 @@ ScummVM Team
----------------
Infrastructure:
Max Horn - Backend & Engine APIs, file API, sound mixer,
- audiostreams, data structures, etc.
+ audiostreams, data structures, etc. (retired)
Eugene Sandulenko
Johannes Schickel
@@ -281,7 +285,6 @@ ScummVM Team
James Brown - IRC Logs maintainer
Thierry Crozat - Wiki maintainer
Andre Heider - Buildbot maintainer
- Max Horn - Forum, IRC channel and Mailing list maintainer
Joost Peters - Doxygen Project Documentation maintainer
Jordi Vilalta Prat - Wiki maintainer
Eugene Sandulenko - Forum, IRC channel, Screen Shots and Mailing
@@ -335,7 +338,7 @@ Other contributions
Willem Jan Palenstijn
Mac OS X:
- Max Horn
+ Max Horn - (retired)
Oystein Eftevaag
Mandriva:
@@ -358,7 +361,7 @@ Other contributions
Markus Strangl
Win32:
- Travis Howell - (retired)
+ Travis Howell
Win64:
Chris Gray - (retired)
@@ -449,7 +452,7 @@ Other contributions
Tim Phillips - Initial MI1 CD music support
Quietust - Sound support for Amiga SCUMM V2/V3 games, MM
NES support
- segra - Improved support for Apple II/C64 versions of MM
+ Robert Crossfield - Improved support for Apple II/C64 versions of MM
Andreas Roever - Broken Sword I & II MPEG2 cutscene support
Edward Rudd - Fixes for playing MP3 versions of MI1/Loom audio
Daniel Schepler - Final MI1 CD music support, initial Ogg Vorbis
diff --git a/NEWS b/NEWS
index 6fda0a8f39..4d5fa5c325 100644
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,39 @@ For a more comprehensive changelog of the latest experimental code, see:
https://github.com/scummvm/scummvm/commits/
1.4.0 (????-??-??)
+ SCUMM:
+ - Implemented PC Speaker support for SCUMM v5 games.
+
SDL ports:
- Added support for OpenGL (GSoC Task).
+1.3.1 (2011-07-12)
+ General:
+ - Improved audio device detection and fallback.
+ There should be no more silent errors due to invalid audio devices.
+ Instead ScummVM should pick up a suitable alternative device.
+
+ Mohawk:
+ - Added detection entries for more variants of some Living Books
+ games.
+
+ Tinsel:
+ - Fixed a regression that made Discworld uncompletable.
+
+ SAGA:
+ - Fixed a regression in Inherit the Earth's dragon walk code which
+ was causing crashes there.
+ - Fixed a regression causing various crashes in I Have No Mouth and
+ I Must Scream.
+
+ SCI:
+ - Added detection entries for some Macintosh game versions.
+ - Audio settings are now stored correctly for the CD version of EcoQuest 1.
+
+ SCUMM:
+ - Fixed graphics bug in FM-TOWNS versions of games on ARM devices
+ (Android, iPhone, etc.).
+
1.3.0 (2011-05-28)
New Games:
- Added support for Backyard Baseball.
diff --git a/README b/README
index e13a8c9a01..48929816fd 100644
--- a/README
+++ b/README
@@ -219,6 +219,7 @@ AGI Games by Sierra:
AGOS Games by Adventuresoft/Horrorsoft:
Elvira - Mistress of the Dark [elvira1]
Elvira II - The Jaws of Cerberus [elvira2]
+ Personal Nightmare [pn]
Waxworks [waxworks]
Simon the Sorcerer 1 [simon1]
Simon the Sorcerer 2 [simon2]
@@ -942,6 +943,7 @@ arguments -- see the next section.
-z, --list-games Display list of supported games and exit
-t, --list-targets Display list of configured targets and exit
--list-saves=TARGET Display a list of savegames for the game (TARGET) specified
+ --console Enable the console window (default: enabled) (Windows only)
-c, --config=CONFIG Use alternate configuration file
-p, --path=PATH Path to where the game is installed
@@ -1974,6 +1976,7 @@ The following keywords are recognized:
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
diff --git a/audio/decoders/aac.cpp b/audio/decoders/aac.cpp
index 7949b5b561..50325dc9f0 100644
--- a/audio/decoders/aac.cpp
+++ b/audio/decoders/aac.cpp
@@ -28,74 +28,34 @@
#ifdef USE_FAAD
#include "common/debug.h"
+#include "common/memstream.h"
#include "common/stream.h"
#include "common/textconsole.h"
#include "common/util.h"
#include "audio/audiostream.h"
+#include "audio/decoders/codec.h"
+#include "audio/decoders/raw.h"
#include <neaacdec.h>
namespace Audio {
-class AACStream : public AudioStream {
+class AACDecoder : public Codec {
public:
- AACStream(Common::SeekableReadStream *stream,
- DisposeAfterUse::Flag disposeStream,
- Common::SeekableReadStream *extraData,
+ AACDecoder(Common::SeekableReadStream *extraData,
DisposeAfterUse::Flag disposeExtraData);
- ~AACStream();
+ ~AACDecoder();
- int readBuffer(int16 *buffer, const int numSamples);
-
- bool endOfData() const { return _inBufferPos >= _inBufferSize && !_remainingSamples; }
- bool isStereo() const { return _channels == 2; }
- int getRate() const { return _rate; }
+ AudioStream *decodeFrame(Common::SeekableReadStream &stream);
private:
NeAACDecHandle _handle;
byte _channels;
unsigned long _rate;
-
- byte *_inBuffer;
- uint32 _inBufferSize;
- uint32 _inBufferPos;
-
- int16 *_remainingSamples;
- uint32 _remainingSamplesSize;
- uint32 _remainingSamplesPos;
-
- void init(Common::SeekableReadStream *extraData);
};
-AACStream::AACStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeStream,
- Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData) {
-
- _remainingSamples = 0;
- _inBufferPos = 0;
-
- init(extraData);
-
- // Copy all the data to a pointer so it can be passed through
- // (At least MPEG-4 chunks shouldn't be large)
- _inBufferSize = stream->size();
- _inBuffer = new byte[_inBufferSize];
- stream->read(_inBuffer, _inBufferSize);
-
- if (disposeStream == DisposeAfterUse::YES)
- delete stream;
-
- if (disposeExtraData == DisposeAfterUse::YES)
- delete extraData;
-}
-
-AACStream::~AACStream() {
- NeAACDecClose(_handle);
- delete[] _inBuffer;
- delete[] _remainingSamples;
-}
-
-void AACStream::init(Common::SeekableReadStream *extraData) {
+AACDecoder::AACDecoder(Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData) {
// Open the library
_handle = NeAACDecOpen();
@@ -117,59 +77,55 @@ void AACStream::init(Common::SeekableReadStream *extraData) {
if (err < 0)
error("Could not initialize AAC decoder: %s", NeAACDecGetErrorMessage(err));
-}
-int AACStream::readBuffer(int16 *buffer, const int numSamples) {
- int samples = 0;
+ if (disposeExtraData == DisposeAfterUse::YES)
+ delete extraData;
+}
- assert((numSamples % _channels) == 0);
+AACDecoder::~AACDecoder() {
+ NeAACDecClose(_handle);
+}
- // Dip into our remaining samples pool if it's available
- if (_remainingSamples) {
- samples = MIN<int>(numSamples, _remainingSamplesSize - _remainingSamplesPos);
-
- memcpy(buffer, _remainingSamples + _remainingSamplesPos, samples * 2);
- _remainingSamplesPos += samples;
+AudioStream *AACDecoder::decodeFrame(Common::SeekableReadStream &stream) {
+ // read everything into a buffer
+ uint32 inBufferPos = 0;
+ uint32 inBufferSize = stream.size();
+ byte *inBuffer = new byte[inBufferSize];
+ stream.read(inBuffer, inBufferSize);
- if (_remainingSamplesPos == _remainingSamplesSize) {
- delete[] _remainingSamples;
- _remainingSamples = 0;
- }
- }
+ QueuingAudioStream *audioStream = makeQueuingAudioStream(_rate, _channels == 2);
// Decode until we have enough samples (or there's no more left)
- while (samples < numSamples && !endOfData()) {
+ while (inBufferPos < inBufferSize) {
NeAACDecFrameInfo frameInfo;
- uint16 *decodedSamples = (uint16 *)NeAACDecDecode(_handle, &frameInfo, _inBuffer + _inBufferPos, _inBufferSize - _inBufferPos);
+ void *decodedSamples = NeAACDecDecode(_handle, &frameInfo, inBuffer + inBufferPos, inBufferSize - inBufferPos);
if (frameInfo.error != 0)
error("Failed to decode AAC frame: %s", NeAACDecGetErrorMessage(frameInfo.error));
- int decodedSampleSize = frameInfo.samples;
- int copySamples = (decodedSampleSize > (numSamples - samples)) ? (numSamples - samples) : decodedSampleSize;
+ byte *buffer = (byte *)malloc(frameInfo.samples * 2);
+ memcpy(buffer, decodedSamples, frameInfo.samples * 2);
- memcpy(buffer + samples, decodedSamples, copySamples * 2);
- samples += copySamples;
+ byte flags = FLAG_16BITS;
- // Copy leftover samples for use in a later readBuffer() call
- if (copySamples != decodedSampleSize) {
- _remainingSamplesSize = decodedSampleSize - copySamples;
- _remainingSamples = new int16[_remainingSamplesSize];
- _remainingSamplesPos = 0;
- memcpy(_remainingSamples, decodedSamples + copySamples, _remainingSamplesSize * 2);
- }
+ if (_channels == 2)
+ flags |= FLAG_STEREO;
- _inBufferPos += frameInfo.bytesconsumed;
+#ifdef SCUMM_LITTLE_ENDIAN
+ flags |= FLAG_LITTLE_ENDIAN;
+#endif
+
+ audioStream->queueBuffer(buffer, frameInfo.samples * 2, DisposeAfterUse::YES, flags);
+
+ inBufferPos += frameInfo.bytesconsumed;
}
- return samples;
+ return audioStream;
}
// Factory function
-AudioStream *makeAACStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeStream,
- Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData) {
-
- return new AACStream(stream, disposeStream, extraData, disposeExtraData);
+Codec *makeAACDecoder(Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData) {
+ return new AACDecoder(extraData, disposeExtraData);
}
} // End of namespace Audio
diff --git a/audio/decoders/aac.h b/audio/decoders/aac.h
index efcbcc6f42..c5085fadaa 100644
--- a/audio/decoders/aac.h
+++ b/audio/decoders/aac.h
@@ -43,23 +43,19 @@ namespace Common {
namespace Audio {
-class AudioStream;
+class Codec;
/**
- * Create a new AudioStream from the AAC data of an MPEG-4 file in the given stream.
+ * Create a new Codec for decoding AAC data of an MPEG-4 file in the given stream.
*
* @note This should *only* be called by our QuickTime/MPEG-4 decoder since it relies
* on the MPEG-4 extra data. If you want to decode a file using AAC, go use
* makeQuickTimeStream() instead!
- * @param stream the SeekableReadStream from which to read the AAC data
- * @param disposeStream whether to delete the stream after use
* @param extraData the SeekableReadStream from which to read the AAC extra data
* @param disposeExtraData whether to delete the extra data stream after use
- * @return a new AudioStream, or NULL, if an error occurred
+ * @return a new Codec, or NULL, if an error occurred
*/
-AudioStream *makeAACStream(
- Common::SeekableReadStream *stream,
- DisposeAfterUse::Flag disposeStream,
+Codec *makeAACDecoder(
Common::SeekableReadStream *extraData,
DisposeAfterUse::Flag disposeExtraData = DisposeAfterUse::NO);
diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp
index d28ed222a5..116f2f776a 100644
--- a/audio/decoders/adpcm.cpp
+++ b/audio/decoders/adpcm.cpp
@@ -234,7 +234,7 @@ int MSIma_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) {
while (samples < numSamples && _samplesLeft[0] != 0) {
for (int i = 0; i < _channels; i++) {
- buffer[samples] = _buffer[i][8 - _samplesLeft[i]];
+ buffer[samples + i] = _buffer[i][8 - _samplesLeft[i]];
_samplesLeft[i]--;
}
@@ -342,14 +342,14 @@ do { \
_topNibble = true; \
} \
} while (0)
-
+
int DK3_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) {
int samples = 0;
assert((numSamples % 4) == 0);
- while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
+ while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
if ((_stream->pos() % _blockAlign) == 0) {
_stream->readUint16LE(); // Unknown
uint16 rate = _stream->readUint16LE(); // Copy of rate
diff --git a/audio/decoders/codec.h b/audio/decoders/codec.h
new file mode 100644
index 0000000000..93b6878dee
--- /dev/null
+++ b/audio/decoders/codec.h
@@ -0,0 +1,44 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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_DECODERS_CODEC_H
+#define AUDIO_DECODERS_CODEC_H
+
+namespace Common {
+ class SeekableReadStream;
+}
+
+namespace Audio {
+
+class AudioStream;
+
+class Codec {
+public:
+ Codec() {}
+ virtual ~Codec() {}
+
+ virtual AudioStream *decodeFrame(Common::SeekableReadStream &data) = 0;
+};
+
+} // End of namespace Audio
+
+#endif
diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index a178c363b5..19b30217e9 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -28,10 +28,13 @@
#ifdef AUDIO_QDM2_H
#include "audio/audiostream.h"
+#include "audio/decoders/codec.h"
#include "audio/decoders/qdm2data.h"
+#include "audio/decoders/raw.h"
#include "common/array.h"
#include "common/debug.h"
+#include "common/math.h"
#include "common/stream.h"
#include "common/textconsole.h"
@@ -150,19 +153,14 @@ struct RDFTContext {
FFTContext fft;
};
-class QDM2Stream : public AudioStream {
+class QDM2Stream : public Codec {
public:
- QDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData);
+ QDM2Stream(Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData);
~QDM2Stream();
- bool isStereo() const { return _channels == 2; }
- bool endOfData() const { return _stream->pos() >= _stream->size() && _outputSamples.size() == 0 && _subPacket == 0; }
- int getRate() const { return _sampleRate; }
- int readBuffer(int16 *buffer, const int numSamples);
+ AudioStream *decodeFrame(Common::SeekableReadStream &stream);
private:
- Common::SeekableReadStream *_stream;
-
// Parameters from codec header, do not change during playback
uint8 _channels;
uint16 _sampleRate;
@@ -204,7 +202,6 @@ private:
// I/O data
uint8 *_compressedData;
float _outputBuffer[1024];
- Common::Array<int16> _outputSamples;
// Synthesis filter
int16 ff_mpa_synth_window[512];
@@ -285,7 +282,7 @@ private:
void qdm2_fft_tone_synthesizer(uint8 sub_packet);
void qdm2_calculate_fft(int channel);
void qdm2_synthesis_filter(uint8 index);
- int qdm2_decodeFrame(Common::SeekableReadStream *in);
+ bool qdm2_decodeFrame(Common::SeekableReadStream &in, QueuingAudioStream *audioStream);
};
// Fix compilation for non C99-compliant compilers, like MSVC
@@ -293,21 +290,6 @@ private:
typedef signed long long int int64_t;
#endif
-// Integer log2 function. This is much faster than invoking
-// double precision C99 log2 math functions or equivalent, since
-// this is only used to determine maximum number of bits needed
-// i.e. only non-fractional part is needed. Also, the double
-// version is incorrect for exact cases due to floating point
-// rounding errors.
-static inline int scummvm_log2(int n) {
- int ret = -1;
- while(n != 0) {
- n /= 2;
- ret++;
- }
- return ret;
-}
-
#define QDM2_LIST_ADD(list, size, packet) \
do { \
if (size > 0) \
@@ -1711,7 +1693,7 @@ void QDM2Stream::initVlc(void) {
}
}
-QDM2Stream::QDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData) {
+QDM2Stream::QDM2Stream(Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData) {
uint32 tmp;
int32 tmp_s;
int tmp_val;
@@ -1719,7 +1701,6 @@ QDM2Stream::QDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadS
debug(1, "QDM2Stream::QDM2Stream() Call");
- _stream = stream;
_compressedData = NULL;
_subPacket = 0;
_superBlockStart = 0;
@@ -1841,11 +1822,11 @@ QDM2Stream::QDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadS
warning("QDM2Stream::QDM2Stream() u4 field not 0");
}
- _fftOrder = scummvm_log2(_frameSize) + 1;
+ _fftOrder = Common::intLog2(_frameSize) + 1;
_fftFrameSize = 2 * _frameSize; // complex has two floats
// something like max decodable tones
- _groupOrder = scummvm_log2(_blockSize) + 1;
+ _groupOrder = Common::intLog2(_blockSize) + 1;
_sFrameSize = _blockSize / 16; // 16 iterations per super block
_subSampling = _fftOrder - 7;
@@ -1906,11 +1887,13 @@ QDM2Stream::QDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadS
initNoiseSamples();
_compressedData = new uint8[_packetSize];
+
+ if (disposeExtraData == DisposeAfterUse::YES)
+ delete extraData;
}
QDM2Stream::~QDM2Stream() {
delete[] _compressedData;
- delete _stream;
}
static int qdm2_get_vlc(GetBitContext *gb, VLC *vlc, int flag, int depth) {
@@ -3158,30 +3141,30 @@ void QDM2Stream::qdm2_synthesis_filter(uint8 index)
_outputBuffer[_channels * i + ch] += (float)(samples[_channels * sub_sampling * i + ch] >> (sizeof(int16)*8-16));
}
-int QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream *in) {
- debug(1, "QDM2Stream::qdm2_decodeFrame in->pos(): %d in->size(): %d", in->pos(), in->size());
+bool QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream &in, QueuingAudioStream *audioStream) {
+ debug(1, "QDM2Stream::qdm2_decodeFrame in.pos(): %d in.size(): %d", in.pos(), in.size());
int ch, i;
const int frame_size = (_sFrameSize * _channels);
// If we're in any packet but the first, seek back to the first
if (_subPacket == 0)
- _superBlockStart = in->pos();
+ _superBlockStart = in.pos();
else
- in->seek(_superBlockStart);
+ in.seek(_superBlockStart);
// select input buffer
- if (in->eos() || in->pos() >= in->size()) {
+ if (in.eos() || in.pos() >= in.size()) {
debug(1, "QDM2Stream::qdm2_decodeFrame End of Input Stream");
- return 0;
+ return false;
}
- if ((in->size() - in->pos()) < _packetSize) {
- debug(1, "QDM2Stream::qdm2_decodeFrame Insufficient Packet Data in Input Stream Found: %d Need: %d", in->size() - in->pos(), _packetSize);
- return 0;
+ if ((in.size() - in.pos()) < _packetSize) {
+ debug(1, "QDM2Stream::qdm2_decodeFrame Insufficient Packet Data in Input Stream Found: %d Need: %d", in.size() - in.pos(), _packetSize);
+ return false;
}
- if (!in->eos()) {
- in->read(_compressedData, _packetSize);
+ if (!in.eos()) {
+ in.read(_compressedData, _packetSize);
debug(1, "QDM2Stream::qdm2_decodeFrame constructed input data");
}
@@ -3190,7 +3173,7 @@ int QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream *in) {
memset(&_outputBuffer[frame_size], 0, frame_size * sizeof(float));
debug(1, "QDM2Stream::qdm2_decodeFrame cleared outputBuffer");
- if (!in->eos()) {
+ if (!in.eos()) {
// decode block of QDM2 compressed data
debug(1, "QDM2Stream::qdm2_decodeFrame decode block of QDM2 compressed data");
if (_subPacket == 0) {
@@ -3218,7 +3201,7 @@ int QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream *in) {
if (!_hasErrors && _subPacketListC[0].packet != NULL) {
error("QDM2 : has errors, and C list is not empty");
- return 0;
+ return false;
}
}
@@ -3236,6 +3219,12 @@ int QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream *in) {
debug(1, "QDM2Stream::qdm2_decodeFrame clip and convert output float[] to 16bit signed samples");
}
+ if (frame_size == 0)
+ return false;
+
+ // Prepare a buffer for queuing
+ uint16 *outputBuffer = (uint16 *)malloc(frame_size * 2);
+
for (i = 0; i < frame_size; i++) {
int value = (int)_outputBuffer[i];
@@ -3244,34 +3233,35 @@ int QDM2Stream::qdm2_decodeFrame(Common::SeekableReadStream *in) {
else if (value < -SOFTCLIP_THRESHOLD)
value = (value < -HARDCLIP_THRESHOLD) ? -32767 : -_softclipTable[-value - SOFTCLIP_THRESHOLD];
- _outputSamples.push_back(value);
+ outputBuffer[i] = value;
}
- return frame_size;
-}
-int QDM2Stream::readBuffer(int16 *buffer, const int numSamples) {
- debug(1, "QDM2Stream::readBuffer numSamples: %d", numSamples);
- int32 decodedSamples = _outputSamples.size();
- int32 i;
+ // Queue the translated buffer to our stream
+ byte flags = FLAG_16BITS;
- while (decodedSamples < numSamples) {
- i = qdm2_decodeFrame(_stream);
- if (i == 0)
- break; // Out Of Decode Frames...
- decodedSamples += i;
- }
+ if (_channels == 2)
+ flags |= FLAG_STEREO;
+
+#ifdef SCUMM_LITTLE_ENDIAN
+ flags |= FLAG_LITTLE_ENDIAN;
+#endif
+
+ audioStream->queueBuffer((byte *)outputBuffer, frame_size * 2, DisposeAfterUse::YES, flags);
+
+ return true;
+}
- if (decodedSamples > numSamples)
- decodedSamples = numSamples;
+AudioStream *QDM2Stream::decodeFrame(Common::SeekableReadStream &stream) {
+ QueuingAudioStream *audioStream = makeQueuingAudioStream(_sampleRate, _channels == 2);
- for (i = 0; i < decodedSamples; i++)
- buffer[i] = _outputSamples.remove_at(0);
+ while (qdm2_decodeFrame(stream, audioStream))
+ ;
- return decodedSamples;
+ return audioStream;
}
-AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData) {
- return new QDM2Stream(stream, extraData);
+Codec *makeQDM2Decoder(Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData) {
+ return new QDM2Stream(extraData, disposeExtraData);
}
} // End of namespace Audio
diff --git a/audio/decoders/qdm2.h b/audio/decoders/qdm2.h
index c0ec647bfd..f0793e3c1e 100644
--- a/audio/decoders/qdm2.h
+++ b/audio/decoders/qdm2.h
@@ -26,22 +26,25 @@
#ifndef AUDIO_QDM2_H
#define AUDIO_QDM2_H
+#include "common/types.h"
+
namespace Common {
class SeekableReadStream;
}
namespace Audio {
-class AudioStream;
+class Codec;
/**
- * Create a new AudioStream from the QDM2 data in the given stream.
+ * Create a new Codec from the QDM2 data in the given stream.
*
- * @param stream the SeekableReadStream from which to read the FLAC data
- * @param extraData the QuickTime extra data stream
- * @return a new AudioStream, or NULL, if an error occurred
+ * @param extraData the QuickTime extra data stream
+ * @param disposeExtraData the QuickTime extra data stream
+ * @return a new Codec, or NULL, if an error occurred
*/
-AudioStream *makeQDM2Stream(Common::SeekableReadStream *stream, Common::SeekableReadStream *extraData);
+Codec *makeQDM2Decoder(Common::SeekableReadStream *extraData,
+ DisposeAfterUse::Flag disposeExtraData = DisposeAfterUse::NO);
} // End of namespace Audio
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 0f2e76658b..a39fedc1d6 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -30,6 +30,7 @@
#include "common/textconsole.h"
#include "audio/audiostream.h"
+#include "audio/decoders/codec.h"
#include "audio/decoders/quicktime.h"
#include "audio/decoders/quicktime_intern.h"
@@ -86,6 +87,9 @@ void QuickTimeAudioDecoder::init() {
// Make sure the bits per sample transfers to the sample size
if (entry->getCodecTag() == MKTAG('r', 'a', 'w', ' ') || entry->getCodecTag() == MKTAG('t', 'w', 'o', 's'))
_tracks[_audioTrackIndex]->sampleSize = (entry->_bitsPerSample / 8) * entry->_channels;
+
+ // Initialize the codec (if necessary)
+ entry->initCodec();
}
}
}
@@ -217,10 +221,13 @@ void QuickTimeAudioDecoder::setAudioStreamPos(const Timestamp &where) {
Audio::QuickTimeAudioDecoder::AudioSampleDesc *entry = (Audio::QuickTimeAudioDecoder::AudioSampleDesc *)_tracks[_audioTrackIndex]->sampleDescs[0];
_audStream = Audio::makeQueuingAudioStream(entry->_sampleRate, entry->_channels == 2);
+ // Reinitialize the codec
+ entry->initCodec();
+
// First, we need to track down what audio sample we need
Audio::Timestamp curAudioTime = where.convertToFramerate(_tracks[_audioTrackIndex]->timeScale);
uint32 sample = curAudioTime.totalNumberOfFrames();
- uint32 seekSample = sample;
+ uint32 seekSample = sample;
if (!isOldDemuxing()) {
// We shouldn't have audio samples that are a different duration
@@ -246,7 +253,7 @@ void QuickTimeAudioDecoder::setAudioStreamPos(const Timestamp &where) {
totalSamples += chunkSampleCount;
}
-
+
// Reposition the audio stream
queueNextAudioChunk();
if (sample != totalSamples) {
@@ -266,6 +273,11 @@ QuickTimeAudioDecoder::AudioSampleDesc::AudioSampleDesc(Common::QuickTimeParser:
_samplesPerFrame = 0;
_bytesPerFrame = 0;
_bitsPerSample = 0;
+ _codec = 0;
+}
+
+QuickTimeAudioDecoder::AudioSampleDesc::~AudioSampleDesc() {
+ delete _codec;
}
bool QuickTimeAudioDecoder::AudioSampleDesc::isAudioCodecSupported() const {
@@ -313,7 +325,12 @@ AudioStream *QuickTimeAudioDecoder::AudioSampleDesc::createAudioStream(Common::S
if (!stream)
return 0;
- if (_codecTag == MKTAG('t', 'w', 'o', 's') || _codecTag == MKTAG('r', 'a', 'w', ' ')) {
+ if (_codec) {
+ // If we've loaded a codec, make sure we use first
+ AudioStream *audioStream = _codec->decodeFrame(*stream);
+ delete stream;
+ return audioStream;
+ } else if (_codecTag == MKTAG('t', 'w', 'o', 's') || _codecTag == MKTAG('r', 'a', 'w', ' ')) {
// Fortunately, most of the audio used in Myst videos is raw...
uint16 flags = 0;
if (_codecTag == MKTAG('r', 'a', 'w', ' '))
@@ -330,24 +347,32 @@ AudioStream *QuickTimeAudioDecoder::AudioSampleDesc::createAudioStream(Common::S
} else if (_codecTag == MKTAG('i', 'm', 'a', '4')) {
// Riven uses this codec (as do some Myst ME videos)
return makeADPCMStream(stream, DisposeAfterUse::YES, stream->size(), kADPCMApple, _sampleRate, _channels, 34);
- } else if (_codecTag == MKTAG('m', 'p', '4', 'a')) {
- // The 7th Guest iOS uses an MPEG-4 codec
-#ifdef USE_FAAD
- if (_parentTrack->objectTypeMP4 == 0x40)
- return makeAACStream(stream, DisposeAfterUse::YES, _parentTrack->extraData);
-#endif
-#ifdef AUDIO_QDM2_H
- } else if (_codecTag == MKTAG('Q', 'D', 'M', '2')) {
- // Myst ME uses this codec for many videos
- return makeQDM2Stream(stream, _parentTrack->extraData);
-#endif
}
error("Unsupported audio codec");
-
return NULL;
}
+void QuickTimeAudioDecoder::AudioSampleDesc::initCodec() {
+ delete _codec; _codec = 0;
+
+ switch (_codecTag) {
+ case MKTAG('Q', 'D', 'M', '2'):
+#ifdef AUDIO_QDM2_H
+ _codec = makeQDM2Decoder(_parentTrack->extraData);
+#endif
+ break;
+ case MKTAG('m', 'p', '4', 'a'):
+#ifdef USE_FAAD
+ if (_parentTrack->objectTypeMP4 == 0x40)
+ _codec = makeAACDecoder(_parentTrack->extraData);
+#endif
+ break;
+ default:
+ break;
+ }
+}
+
/**
* A wrapper around QuickTimeAudioDecoder that implements the RewindableAudioStream API
*/
diff --git a/audio/decoders/quicktime.h b/audio/decoders/quicktime.h
index 413f527221..9f6c6c20e0 100644
--- a/audio/decoders/quicktime.h
+++ b/audio/decoders/quicktime.h
@@ -45,7 +45,7 @@ namespace Common {
namespace Audio {
class SeekableAudioStream;
-
+
/**
* Try to load a QuickTime sound file from the given file name and create a SeekableAudioStream
* from that data.
diff --git a/audio/decoders/quicktime_intern.h b/audio/decoders/quicktime_intern.h
index f288d5604b..7ce06b85fe 100644
--- a/audio/decoders/quicktime_intern.h
+++ b/audio/decoders/quicktime_intern.h
@@ -45,6 +45,7 @@ namespace Common {
namespace Audio {
class AudioStream;
+class Codec;
class QueuingAudioStream;
class QuickTimeAudioDecoder : public Common::QuickTimeParser {
@@ -68,10 +69,12 @@ protected:
class AudioSampleDesc : public Common::QuickTimeParser::SampleDesc {
public:
AudioSampleDesc(Common::QuickTimeParser::Track *parentTrack, uint32 codecTag);
+ ~AudioSampleDesc();
bool isAudioCodecSupported() const;
uint32 getAudioChunkSampleCount(uint chunk) const;
AudioStream *createAudioStream(Common::SeekableReadStream *stream) const;
+ void initCodec();
// TODO: Make private in the long run
uint16 _bitsPerSample;
@@ -79,6 +82,8 @@ protected:
uint32 _sampleRate;
uint32 _samplesPerFrame;
uint32 _bytesPerFrame;
+
+ Codec *_codec;
};
// Common::QuickTimeParser API
diff --git a/audio/decoders/voc.cpp b/audio/decoders/voc.cpp
index 74ea4440a1..be53f945ac 100644
--- a/audio/decoders/voc.cpp
+++ b/audio/decoders/voc.cpp
@@ -118,7 +118,11 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate,
debug(9, "VOC Data Block: %d, %d, %d", rate, packing, len);
if (packing == 0) {
if (size) {
- ret_sound = (byte *)realloc(ret_sound, size + len);
+ byte *tmp = (byte *)realloc(ret_sound, size + len);
+ if (!tmp)
+ error("Cannot reallocate memory for VOC Data Block");
+
+ ret_sound = tmp;
} else {
ret_sound = (byte *)malloc(len);
}
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index 0ca70b24f8..27f02c9053 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -128,7 +128,8 @@ Common::String MidiDriver::getDeviceString(DeviceHandle handle, DeviceStringType
MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
// Query the selected music device (defaults to MT_AUTO device).
- DeviceHandle hdl = getDeviceHandle(ConfMan.get("music_driver"));
+ Common::String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
+ DeviceHandle hdl = getDeviceHandle(selDevStr.empty() ? Common::String("auto") : selDevStr);
DeviceHandle reslt = 0;
_forceTypeMT32 = false;
@@ -200,7 +201,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
if (getMusicType(hdl) == MT_INVALID) {
// If the expressly selected driver or device cannot be found (no longer compiled in, turned off, etc.)
// we display a warning and continue.
- failedDevStr = ConfMan.get("music_driver");
+ failedDevStr = selDevStr;
Common::String warningMsg = Common::String::format(_("The selected audio device '%s' was not found (e.g. might be turned off or disconnected). Attempting to fall back to the next available device..."), failedDevStr.c_str());
GUI::MessageDialog dialog(warningMsg);
dialog.runModal();
@@ -229,14 +230,16 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
if ((flags & MDT_MIDI) && !skipMidi) {
// If a preferred MT32 or GM device has been selected that device gets returned if available.
Common::String devStr;
- if (flags & MDT_PREFER_MT32)
- devStr = ConfMan.get("mt32_device");
+ if (flags & MDT_PREFER_MT32)
+ devStr = ConfMan.hasKey("mt32_device") ? ConfMan.get("mt32_device") : Common::String("null");
else if (flags & MDT_PREFER_GM)
- devStr = ConfMan.get("gm_device");
+ devStr = ConfMan.hasKey("gm_device") ? ConfMan.get("gm_device") : Common::String("null");
else
devStr = "auto";
-
- hdl = getDeviceHandle(devStr);
+
+ // Default to Null device here, since we also register a default null setting for
+ // the MT32 or GM device in the config manager.
+ hdl = getDeviceHandle(devStr.empty() ? Common::String("null") : devStr);
const MusicType type = getMusicType(hdl);
// If we have a "Don't use GM/MT-32" setting we skip this part and jump
@@ -261,7 +264,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
// If the preferred (expressly requested) device cannot be used we display a warning and continue.
// Don't warn about the failing device if we did already (this becomes relevant if the failing
// device is selected as preferred device and also as GM or MT-32 device).
- if (failedDevStr != getDeviceString(hdl, MidiDriver::kDeviceName)) {
+ if (failedDevStr != getDeviceString(hdl, MidiDriver::kDeviceName)) {
Common::String warningMsg = Common::String::format(_("The preferred audio device '%s' cannot be used. See log file for more information. Attempting to fall back to the next available device..."), getDeviceString(hdl, MidiDriver::kDeviceName).c_str());
GUI::MessageDialog dialog(warningMsg);
dialog.runModal();
@@ -285,7 +288,7 @@ MidiDriver::DeviceHandle MidiDriver::detectDevice(int flags) {
}
}
- // Now we default to the first available device with music type 'MT_GM' if not
+ // Now we default to the first available device with music type 'MT_GM' if not
// MT-32 is preferred or if MT-32 is preferred but all other devices have failed.
if (!(flags & MDT_PREFER_MT32) || flags == (MDT_PREFER_MT32 | MDT_MIDI)) {
for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) {
diff --git a/audio/mpu401.cpp b/audio/mpu401.cpp
index caad945258..966e367a93 100644
--- a/audio/mpu401.cpp
+++ b/audio/mpu401.cpp
@@ -33,7 +33,10 @@ void MidiChannel_MPU401::init(MidiDriver *owner, byte channel) {
bool MidiChannel_MPU401::allocate() {
if (_allocated)
return false;
- return (_allocated = true);
+
+ _allocated = true;
+
+ return true;
}
MidiDriver *MidiChannel_MPU401::device() {
diff --git a/audio/rate.cpp b/audio/rate.cpp
index 83abd6150b..0fc23a8a54 100644
--- a/audio/rate.cpp
+++ b/audio/rate.cpp
@@ -298,6 +298,9 @@ public:
_bufferSize = osamp;
}
+ if (!_buffer)
+ error("[CopyRateConverter::flow] Cannot allocate memory for temp buffer");
+
// Read up to 'osamp' samples into our temporary buffer
len = input.readBuffer(_buffer, osamp);
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.cpp b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
index beee5f1cad..28591117f0 100644
--- a/audio/softsynth/fmtowns_pc98/towns_audio.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
@@ -67,7 +67,7 @@ public:
void updateEnvelopeGenerator();
- void setInstrument(uint8 *instr);
+ void setInstrument(uint8 *instr);
void setLevel(uint8 lvl);
void setPitch(uint32 pt);
void setBalance(uint8 blc);
@@ -272,12 +272,12 @@ private:
static const uint8 _fmDefaultInstrument[];
};
-TownsAudioInterfaceInternal::TownsAudioInterfaceInternal(Audio::Mixer *mixer, TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver, bool externalMutexHandling) :
+TownsAudioInterfaceInternal::TownsAudioInterfaceInternal(Audio::Mixer *mixer, TownsAudioInterface *owner, TownsAudioInterfacePluginDriver *driver, bool externalMutexHandling) :
TownsPC98_FmSynth(mixer, kTypeTowns, externalMutexHandling),
_fmInstruments(0), _pcmInstruments(0), _pcmChan(0), _waveTables(0), _waveTablesTotalDataSize(0),
_baserate(55125.0f / (float)mixer->getOutputRate()), _tickLength(0), _timer(0), _drv(driver), _drvOwner(owner),
_pcmSfxChanMask(0), _musicVolume(Audio::Mixer::kMaxMixerVolume), _sfxVolume(Audio::Mixer::kMaxMixerVolume),
- _outputVolumeFlags(0), _fmChanPlaying(0),
+ _outputVolumeFlags(0), _fmChanPlaying(0),
_numReservedChannels(0), _numWaveTables(0), _updateOutputVol(false), _ready(false) {
#define INTCB(x) &TownsAudioInterfaceInternal::intf_##x
@@ -431,7 +431,7 @@ void TownsAudioInterfaceInternal::releaseRef(TownsAudioInterface *owner) {
return;
_refCount--;
-
+
if (_refCount) {
if (_refInstance)
_refInstance->removePluginDriver(owner);
@@ -484,7 +484,7 @@ int TownsAudioInterfaceInternal::processCommand(int command, va_list &args) {
if (command < 0 || command > 81)
return 4;
-
+
Common::StackLock lock(_mutex);
int res = (this->*_intfOpcodes[command])(args);
@@ -564,7 +564,7 @@ void TownsAudioInterfaceInternal::nextTickEx(int32 *buffer, uint32 bufferSize) {
}
finOutL += oL;
finOutR += oR;
-
+
if (!(_pcmChan[ii]._activeKey || _pcmChan[ii]._activeEffect))
_pcmChan[ii]._activeOutput = false;
}
@@ -996,7 +996,7 @@ int TownsAudioInterfaceInternal::intf_setOutputMute(va_list &args) {
if (mute & 2)
memset(&_outputMute[12], 1, 4);
if (mute & 1)
- memset(&_outputMute[8], 1, 4);
+ memset(&_outputMute[8], 1, 4);
_outputMute[(f < 0x80) ? 11 : 15] = 0;
f += f;
@@ -1009,8 +1009,8 @@ int TownsAudioInterfaceInternal::intf_setOutputMute(va_list &args) {
_outputMute[(f < 0x80) ? 0 : 4] = 0;
f += f;
_outputMute[(f < 0x80) ? 1 : 5] = 0;
- f += f;
-
+ f += f;
+
updateOutputVolume();
return 0;
}
@@ -1581,7 +1581,7 @@ void TownsAudio_PcmChannel::clear() {
_envTotalLevel = _envAttackRate = _envDecayRate = _envSustainLevel = _envSustainRate = _envReleaseRate = 0;
_envStep = _envCurrentLevel = 0;
- _envState = kEnvReady;
+ _envState = kEnvReady;
_activeKey = _activeEffect = _activeOutput = _keyPressed = _reserved = false;
@@ -1650,7 +1650,7 @@ void TownsAudio_PcmChannel::keyOn(uint8 note, uint8 velo, TownsAudio_WaveTable *
_activeEffect = true;
else
_keyPressed = _activeKey = true;
-
+
_activeOutput = true;
}
@@ -1742,7 +1742,7 @@ void TownsAudio_PcmChannel::setBalance(uint8 blc) {
void TownsAudio_PcmChannel::updateOutput() {
if (_activeKey || _activeEffect) {
_pos += _step;
-
+
if (&_data[_pos >> 11] >= _loopEnd) {
if (_loopLen) {
_pos -= _loopLen;
@@ -1811,7 +1811,7 @@ void TownsAudio_PcmChannel::setVelo(uint8 velo) {
_envTotalLevel = ((_envTotalLevel * lvl) >> 14) & 0xff;
_envSustainLevel = ((_envSustainLevel * lvl) >> 14) & 0xff;
envAttack();
- _tl = (_envCurrentLevel >> 8) << 1;
+ _tl = (_envCurrentLevel >> 8) << 1;
}
}
diff --git a/audio/softsynth/fmtowns_pc98/towns_midi.cpp b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
index 071a697615..d69ed73ee6 100644
--- a/audio/softsynth/fmtowns_pc98/towns_midi.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
@@ -36,7 +36,7 @@ public:
void setupProgram(const uint8 *data, uint8 mLevelPara, uint8 tLevelPara);
void setupEffects(int index, uint8 flags, const uint8 *effectData);
void setModWheel(uint8 value);
-
+
void connect(TownsMidiInputChannel *chan);
void disconnect();
@@ -100,7 +100,7 @@ private:
uint8 _operator1Tl;
uint8 _sustainNoteOff;
int16 _duration;
-
+
uint16 _freq;
int16 _freqAdjust;
@@ -134,7 +134,7 @@ public:
void controlChange(byte control, byte value);
void pitchBendFactor(byte value);
void priority(byte value);
- void sysEx_customInstrument(uint32 type, const byte *instr);
+ void sysEx_customInstrument(uint32 type, const byte *instr);
private:
void controlModulationWheel(byte value);
@@ -145,7 +145,7 @@ private:
void releasePedal();
TownsMidiOutputChannel *_out;
-
+
uint8 *_instrument;
uint8 _prg;
uint8 _chanIndex;
@@ -175,7 +175,7 @@ private:
class TownsMidiChanState {
public:
TownsMidiChanState();
- ~TownsMidiChanState() {}
+ ~TownsMidiChanState() {}
uint8 get(uint8 type);
uint8 unk1;
@@ -247,7 +247,7 @@ void TownsMidiOutputChannel::setupProgram(const uint8 *data, uint8 mLevelPara, u
// music (unsuitable data is just forced into the wrong audio device).
static const uint8 mul[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 12, 12, 15, 15 };
- uint8 chan = _chanMap[_chan];
+ uint8 chan = _chanMap[_chan];
uint8 mulAmsFms1 = _driver->_chanState[chan].mulAmsFms = data[0];
uint8 tl1 = _driver->_chanState[chan].tl = (data[1] | 0x3f) - mLevelPara;
@@ -296,7 +296,7 @@ void TownsMidiOutputChannel::setupProgram(const uint8 *data, uint8 mLevelPara, u
void TownsMidiOutputChannel::setupEffects(int index, uint8 flags, const uint8 *effectData) {
uint16 effectMaxLevel[] = { 0x2FF, 0x1F, 0x07, 0x3F, 0x0F, 0x0F, 0x0F, 0x03, 0x3F, 0x0F, 0x0F, 0x0F, 0x03, 0x3E, 0x1F };
uint8 effectType[] = { 0x1D, 0x1C, 0x1B, 0x00, 0x03, 0x04, 0x07, 0x08, 0x0D, 0x10, 0x11, 0x14, 0x15, 0x1e, 0x1f, 0x00 };
-
+
EffectEnvelope *s = &_effectEnvelopes[index];
EffectDef *d = &_effectDefs[index];
@@ -354,7 +354,7 @@ void TownsMidiOutputChannel::connect(TownsMidiInputChannel *chan) {
void TownsMidiOutputChannel::disconnect() {
keyOff();
-
+
TownsMidiOutputChannel *p = _prev;
TownsMidiOutputChannel *n = _next;
@@ -448,10 +448,10 @@ int TownsMidiOutputChannel::advanceEffectEnvelope(EffectEnvelope *s, EffectDef *
s->state = kEnvReady;
return 0;
}
- }
+ }
int32 t = s->currentLevel + s->incrPerStep;
-
+
s->incrCountRem += s->incrPerStepRem;
if (s->incrCountRem >= s->numSteps) {
s->incrCountRem -= s->numSteps;
@@ -464,9 +464,10 @@ int TownsMidiOutputChannel::advanceEffectEnvelope(EffectEnvelope *s, EffectDef *
s->currentLevel = t;
s->modWheelLast = s->modWheelState;
t = getEffectModLevel(t, s->modWheelState);
- if (t != d->phase)
+ if (t != d->phase) {
d->phase = t;
- retFlags |= 1;
+ retFlags |= 1;
+ }
}
if (--s->stepCounter)
@@ -492,7 +493,7 @@ void TownsMidiOutputChannel::initNextEnvelopeState(EffectEnvelope *s) {
if (v & 0x80)
e = _driver->randomValue(e);
-
+
if (!e)
e = 1;
@@ -525,7 +526,7 @@ void TownsMidiOutputChannel::initNextEnvelopeState(EffectEnvelope *s) {
int16 TownsMidiOutputChannel::getEffectStartLevel(uint8 type) {
uint8 chan = (type < 13) ? _chanMap2[_chan] : ((type < 26) ? _chanMap[_chan] : _chan);
-
+
if (type == 28)
return 15;
else if (type == 29)
@@ -539,8 +540,8 @@ int16 TownsMidiOutputChannel::getEffectStartLevel(uint8 type) {
uint8 res = (_driver->_chanState[chan].get(def[0] >> 5) & def[2]) >> def[1];
if (def[3])
res = def[3] - res;
-
- return res;
+
+ return res;
}
int TownsMidiOutputChannel::getEffectModLevel(int lvl, int mod) {
@@ -554,12 +555,12 @@ int TownsMidiOutputChannel::getEffectModLevel(int lvl, int mod) {
return ((lvl + 1) * mod) >> 5;
if (mod < 0) {
- if (lvl < 0)
+ if (lvl < 0)
return _driver->_operatorLevelTable[((-lvl) << 5) - mod];
else
return -_driver->_operatorLevelTable[(lvl << 5) - mod];
} else {
- if (lvl < 0)
+ if (lvl < 0)
return -_driver->_operatorLevelTable[((-lvl) << 5) + mod];
else
return _driver->_operatorLevelTable[((-lvl) << 5) + mod];
@@ -577,7 +578,7 @@ void TownsMidiOutputChannel::keyOff() {
}
void TownsMidiOutputChannel::keyOnSetFreq(uint16 frq) {
- uint16 note = (frq << 1) >> 8;
+ uint16 note = (frq << 1) >> 8;
frq = (_freqMSB[note] << 11) | _freqLSB[note] ;
out(0xa4, frq >> 8);
out(0xa0, frq & 0xff);
@@ -701,7 +702,7 @@ void TownsMidiInputChannel::noteOff(byte note) {
void TownsMidiInputChannel::noteOn(byte note, byte velocity) {
TownsMidiOutputChannel *oc = _driver->allocateOutputChannel(_priority);
-
+
if (!oc)
return;
@@ -711,7 +712,7 @@ void TownsMidiInputChannel::noteOn(byte note, byte velocity) {
oc->_note = note;
oc->_sustainNoteOff = 0;
oc->_duration = _instrument[29] * 63;
-
+
oc->_operator1Tl = (_instrument[1] & 0x3f) + _driver->_operatorLevelTable[((velocity >> 1) << 5) + (_instrument[4] >> 2)];
if (oc->_operator1Tl > 63)
oc->_operator1Tl = 63;
@@ -840,7 +841,7 @@ MidiDriver_TOWNS::MidiDriver_TOWNS(Audio::Mixer *mixer) : _timerProc(0), _timerP
_channels = new TownsMidiInputChannel*[32];
for (int i = 0; i < 32; i++)
_channels[i] = new TownsMidiInputChannel(this, i > 8 ? (i + 1) : i);
-
+
_out = new TownsMidiOutputChannel*[6];
for (int i = 0; i < 6; i++)
_out[i] = new TownsMidiOutputChannel(this, i);
@@ -964,7 +965,7 @@ MidiChannel *MidiDriver_TOWNS::allocateChannel() {
if (!_isOpen)
return 0;
- for (int i = 0; i < 32; ++i) {
+ for (int i = 0; i < 32; ++i) {
TownsMidiInputChannel *chan = _channels[i];
if (chan->allocate())
return chan;
@@ -1023,7 +1024,7 @@ TownsMidiOutputChannel *MidiDriver_TOWNS::allocateOutputChannel(uint8 pri) {
res = _out[_allocCurPos];
}
}
-
+
if (res)
res->disconnect();
diff --git a/audio/softsynth/fmtowns_pc98/towns_midi.h b/audio/softsynth/fmtowns_pc98/towns_midi.h
index 9aa7c93b35..8c764c55d9 100644
--- a/audio/softsynth/fmtowns_pc98/towns_midi.h
+++ b/audio/softsynth/fmtowns_pc98/towns_midi.h
@@ -57,7 +57,7 @@ private:
void updateOutputChannels();
TownsMidiOutputChannel *allocateOutputChannel(uint8 pri);
-
+
int randomValue(int para);
TownsMidiInputChannel **_channels;
@@ -72,11 +72,11 @@ private:
uint32 _tickCounter;
uint8 _allocCurPos;
uint8 _rand;
-
+
bool _isOpen;
uint8 *_operatorLevelTable;
-
+
const uint16 _baseTempo;
};
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
index 49fe97caf1..001d258873 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
@@ -1265,7 +1265,7 @@ void TownsPC98_AudioDriver::fadeStep() {
void TownsPC98_AudioDriver::pause() {
_musicPlaying = false;
}
-
+
void TownsPC98_AudioDriver::cont() {
_musicPlaying = true;
}
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
index 63007ba93c..b4967a556f 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
@@ -1160,12 +1160,12 @@ int TownsPC98_FmSynth::readBuffer(int16 *buffer, const int numSamples) {
for (int i = 0; i < 2; i++) {
if (_timers[i].enabled && _timers[i].cb) {
if (!_timers[i].smpTillCb) {
-
+
if (locked && _externalMutex) {
_mutex.unlock();
locked = false;
}
-
+
(this->*_timers[i].cb)();
if (!locked && _externalMutex) {
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 6d13ec33b4..6703a6f7b7 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -564,8 +564,8 @@ bool MT32EmuMusicPlugin::checkDevice(MidiDriver::DeviceHandle) const {
warning("The MT-32 emulator requires one of the two following file sets (not bundled with ScummVM):\n Either 'MT32_CONTROL.ROM' and 'MT32_PCM.ROM' or 'CM32L_CONTROL.ROM' and 'CM32L_PCM.ROM'");
return false;
}
-
- return true;
+
+ return true;
}
Common::Error MT32EmuMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp
index 74699ba4c6..15e869ba33 100644
--- a/audio/softsynth/opl/mame.cpp
+++ b/audio/softsynth/opl/mame.cpp
@@ -725,6 +725,8 @@ static int OPLOpenTable(void) {
ENV_CURVE = (int *)malloc(sizeof(int) * (2*EG_ENT+1));
+ if (!ENV_CURVE)
+ error("[OPLOpenTable] Cannot allocate memory");
/* envelope counter -> envelope output table */
for (i=0; i < EG_ENT; i++) {
diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h
index 92b7598cb5..0afc6af991 100644
--- a/backends/audiocd/audiocd.h
+++ b/backends/audiocd/audiocd.h
@@ -113,7 +113,7 @@ public:
* @return true if the CD drive was inited succesfully
*/
virtual bool openCD(int drive) = 0;
-
+
/**
* Poll CD status.
* @return true if CD audio is playing
diff --git a/backends/events/ps3sdl/ps3sdl-events.cpp b/backends/events/ps3sdl/ps3sdl-events.cpp
new file mode 100644
index 0000000000..eefc641844
--- /dev/null
+++ b/backends/events/ps3sdl/ps3sdl-events.cpp
@@ -0,0 +1,163 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+
+#if defined(PLAYSTATION3)
+
+#include "backends/events/ps3sdl/ps3sdl-events.h"
+#include "backends/platform/sdl/sdl.h"
+#include "engines/engine.h"
+
+#include "common/util.h"
+#include "common/events.h"
+
+enum {
+ BTN_LEFT = 0,
+ BTN_DOWN = 1,
+ BTN_RIGHT = 2,
+ BTN_UP = 3,
+
+ BTN_START = 4,
+ BTN_R3 = 5,
+ BTN_L3 = 6,
+ BTN_SELECT = 7,
+
+ BTN_SQUARE = 8,
+ BTN_CROSS = 9,
+ BTN_CIRCLE = 10,
+ BTN_TRIANGLE = 11,
+
+ BTN_R1 = 12,
+ BTN_L1 = 13,
+ BTN_R2 = 14,
+ BTN_L2 = 15
+};
+
+bool PS3SdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
+
+ event.kbd.flags = 0;
+
+ switch (ev.jbutton.button) {
+ case BTN_CROSS: // Left mouse button
+ event.type = Common::EVENT_LBUTTONDOWN;
+ fillMouseEvent(event, _km.x, _km.y);
+ break;
+ case BTN_CIRCLE: // Right mouse button
+ event.type = Common::EVENT_RBUTTONDOWN;
+ fillMouseEvent(event, _km.x, _km.y);
+ break;
+ case BTN_TRIANGLE: // Game menu
+ event.type = Common::EVENT_KEYDOWN;
+ event.kbd.keycode = Common::KEYCODE_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, (SDLMod) ev.key.keysym.mod, 0);
+ break;
+ case BTN_SELECT: // Virtual keyboard
+ event.type = Common::EVENT_KEYDOWN;
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, (SDLMod) ev.key.keysym.mod, 0);
+ break;
+ case BTN_SQUARE: // Escape
+ event.type = Common::EVENT_KEYDOWN;
+ event.kbd.keycode = Common::KEYCODE_ESCAPE;
+ event.kbd.ascii = mapKey(SDLK_ESCAPE, (SDLMod) ev.key.keysym.mod, 0);
+ break;
+ case BTN_L1: // Predictive input dialog
+ event.type = Common::EVENT_PREDICTIVE_DIALOG;
+ break;
+ case BTN_START: // ScummVM in game menu
+ event.type = Common::EVENT_MAINMENU;
+ break;
+ }
+ return true;
+}
+
+bool PS3SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
+
+ event.kbd.flags = 0;
+
+ switch (ev.jbutton.button) {
+ case BTN_CROSS: // Left mouse button
+ event.type = Common::EVENT_LBUTTONUP;
+ fillMouseEvent(event, _km.x, _km.y);
+ break;
+ case BTN_CIRCLE: // Right mouse button
+ event.type = Common::EVENT_RBUTTONUP;
+ fillMouseEvent(event, _km.x, _km.y);
+ break;
+ case BTN_TRIANGLE: // Game menu
+ event.type = Common::EVENT_KEYUP;
+ event.kbd.keycode = Common::KEYCODE_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, (SDLMod) ev.key.keysym.mod, 0);
+ break;
+ case BTN_SELECT: // Virtual keyboard
+ event.type = Common::EVENT_KEYUP;
+ event.kbd.keycode = Common::KEYCODE_F7;
+ event.kbd.ascii = mapKey(SDLK_F7, (SDLMod) ev.key.keysym.mod, 0);
+ break;
+ case BTN_SQUARE: // Escape
+ event.type = Common::EVENT_KEYUP;
+ event.kbd.keycode = Common::KEYCODE_ESCAPE;
+ event.kbd.ascii = mapKey(SDLK_ESCAPE, (SDLMod) ev.key.keysym.mod, 0);
+ break;
+ }
+ return true;
+}
+
+/**
+ * The XMB (PS3 in game menu) needs the screen buffers to be constantly flip while open.
+ * This pauses execution and keeps redrawing the screen until the XMB is closed.
+ */
+void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
+ if (event->type == SDL_ACTIVEEVENT) {
+ if (event->active.state == SDL_APPMOUSEFOCUS && !event->active.gain) {
+ // XMB opened
+ if (g_engine)
+ g_engine->pauseEngine(true);
+
+ for (;;) {
+ if (!SDL_PollEvent(event)) {
+ // Locking the screen forces a full redraw
+ Graphics::Surface* screen = g_system->lockScreen();
+ if (screen) {
+ g_system->unlockScreen();
+ g_system->updateScreen();
+ }
+ SDL_Delay(10);
+ continue;
+ }
+ if (event->type == SDL_QUIT)
+ return;
+ if (event->type != SDL_ACTIVEEVENT)
+ continue;
+ if (event->active.state == SDL_APPMOUSEFOCUS && event->active.gain) {
+ // XMB closed
+ if (g_engine)
+ g_engine->pauseEngine(false);
+ return;
+ }
+ }
+ }
+ }
+}
+
+#endif
diff --git a/backends/events/ps3sdl/ps3sdl-events.h b/backends/events/ps3sdl/ps3sdl-events.h
new file mode 100644
index 0000000000..8cf2f43426
--- /dev/null
+++ b/backends/events/ps3sdl/ps3sdl-events.h
@@ -0,0 +1,38 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if !defined(BACKEND_EVENTS_PS3_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
+#define BACKEND_EVENTS_PS3_H
+
+#include "backends/events/sdl/sdl-events.h"
+
+/**
+ * SDL Events manager for the PS3.
+ */
+class PS3SdlEventSource : public SdlEventSource {
+protected:
+ void preprocessEvents(SDL_Event *event);
+ bool handleJoyButtonDown(SDL_Event &ev, Common::Event &event);
+ bool handleJoyButtonUp(SDL_Event &ev, Common::Event &event);
+};
+
+#endif /* BACKEND_EVENTS_PS3_H */
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 835d98e718..4489a2e580 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -206,7 +206,6 @@ bool SdlEventSource::pollEvent(Common::Event &event) {
}
SDL_Event ev;
- ev.type = SDL_NOEVENT;
while (SDL_PollEvent(&ev)) {
preprocessEvents(&ev);
if (dispatchSDLEvent(ev, event))
@@ -304,7 +303,7 @@ bool SdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
- event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
+ event.kbd.ascii = mapKey(ev.key.keysym.sym, (SDLMod)ev.key.keysym.mod, (Uint16)ev.key.keysym.unicode);
return true;
}
@@ -348,7 +347,7 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_KEYUP;
event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
- event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
+ event.kbd.ascii = mapKey(ev.key.keysym.sym, (SDLMod)ev.key.keysym.mod, (Uint16)ev.key.keysym.unicode);
// Ctrl-Alt-<key> will change the GFX mode
SDLModToOSystemKeyFlags(mod, event);
@@ -418,19 +417,19 @@ bool SdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
switch (ev.jbutton.button) {
case JOY_BUT_ESCAPE:
event.kbd.keycode = Common::KEYCODE_ESCAPE;
- event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_ESCAPE, (SDLMod)ev.key.keysym.mod, 0);
break;
case JOY_BUT_PERIOD:
event.kbd.keycode = Common::KEYCODE_PERIOD;
- event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_PERIOD, (SDLMod)ev.key.keysym.mod, 0);
break;
case JOY_BUT_SPACE:
event.kbd.keycode = Common::KEYCODE_SPACE;
- event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_SPACE, (SDLMod)ev.key.keysym.mod, 0);
break;
case JOY_BUT_F5:
event.kbd.keycode = Common::KEYCODE_F5;
- event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_F5, (SDLMod)ev.key.keysym.mod, 0);
break;
}
}
@@ -449,19 +448,19 @@ bool SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
switch (ev.jbutton.button) {
case JOY_BUT_ESCAPE:
event.kbd.keycode = Common::KEYCODE_ESCAPE;
- event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_ESCAPE, (SDLMod)ev.key.keysym.mod, 0);
break;
case JOY_BUT_PERIOD:
event.kbd.keycode = Common::KEYCODE_PERIOD;
- event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_PERIOD, (SDLMod)ev.key.keysym.mod, 0);
break;
case JOY_BUT_SPACE:
event.kbd.keycode = Common::KEYCODE_SPACE;
- event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_SPACE, (SDLMod)ev.key.keysym.mod, 0);
break;
case JOY_BUT_F5:
event.kbd.keycode = Common::KEYCODE_F5;
- event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ event.kbd.ascii = mapKey(SDLK_F5, (SDLMod)ev.key.keysym.mod, 0);
break;
}
}
diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index 227d6e1607..805b76b108 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -20,19 +20,19 @@
*
*/
-#if !defined(BACKEND_EVENTS_SDL_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
+#ifndef BACKEND_EVENTS_SDL_H
#define BACKEND_EVENTS_SDL_H
-#include "backends/events/default/default-events.h"
-
#include "backends/platform/sdl/sdl-sys.h"
+#include "common/events.h"
+
/**
* The SDL event source.
*/
class SdlEventSource : public Common::EventSource {
-public:
+public:
SdlEventSource();
virtual ~SdlEventSource();
@@ -69,7 +69,7 @@ protected:
/** Scroll lock state - since SDL doesn't track it */
bool _scrollLock;
-
+
/** Joystick */
SDL_Joystick *_joystick;
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
index 4a17bc2066..102eb5802e 100644
--- a/backends/events/webossdl/webossdl-events.cpp
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -89,7 +89,7 @@ void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod,
event.kbd.flags |= Common::KBD_SHIFT;
if (mod & KMOD_CTRL)
event.kbd.flags |= Common::KBD_CTRL;
-
+
// Holding down the gesture area emulates the ALT key
if (gestureDown)
event.kbd.flags |= Common::KBD_ALT;
diff --git a/backends/events/wincesdl/wincesdl-events.cpp b/backends/events/wincesdl/wincesdl-events.cpp
index 4fab47a58e..1116cbbb8d 100644
--- a/backends/events/wincesdl/wincesdl-events.cpp
+++ b/backends/events/wincesdl/wincesdl-events.cpp
@@ -183,7 +183,8 @@ bool WINCESdlEventSource::pollEvent(Common::Event &event) {
if (_tapTime) { // second tap
if (_closeClick && (GetTickCount() - _tapTime < 1000)) {
if (event.mouse.y <= 20 &&
- _graphicsMan->_panelInitialized) {
+ _graphicsMan->_panelInitialized &&
+ !_graphicsMan->_noDoubleTapPT) {
// top of screen (show panel)
_graphicsMan->swap_panel_visibility();
} else if (!_graphicsMan->_noDoubleTapRMB) {
diff --git a/backends/fs/ds/ds-fs-factory.cpp b/backends/fs/ds/ds-fs-factory.cpp
index 3fd97d07eb..4e09c3446b 100644
--- a/backends/fs/ds/ds-fs-factory.cpp
+++ b/backends/fs/ds/ds-fs-factory.cpp
@@ -27,7 +27,9 @@
#include "backends/fs/ds/ds-fs.h"
#include "dsmain.h" //for the isGBAMPAvailable() function
+namespace Common {
DECLARE_SINGLETON(DSFilesystemFactory);
+}
AbstractFSNode *DSFilesystemFactory::makeRootFileNode() const {
if (DS::isGBAMPAvailable()) {
diff --git a/backends/fs/posix/posix-fs-factory.cpp b/backends/fs/posix/posix-fs-factory.cpp
index 829355be84..776ea86155 100644
--- a/backends/fs/posix/posix-fs-factory.cpp
+++ b/backends/fs/posix/posix-fs-factory.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#if defined(POSIX)
+#if defined(POSIX) || defined(PLAYSTATION3)
// Re-enable some forbidden symbols to avoid clashes with stat.h and unistd.h.
// Also with clock() in sys/time.h in some Mac OS X SDKs.
diff --git a/backends/fs/posix/posix-fs-factory.h b/backends/fs/posix/posix-fs-factory.h
index a7075db94c..c7cec6fab5 100644
--- a/backends/fs/posix/posix-fs-factory.h
+++ b/backends/fs/posix/posix-fs-factory.h
@@ -30,6 +30,7 @@
* Parts of this class are documented in the base interface class, FilesystemFactory.
*/
class POSIXFilesystemFactory : public FilesystemFactory {
+protected:
virtual AbstractFSNode *makeRootFileNode() const;
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 0b94c37b16..320c5a6f39 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#if defined(POSIX)
+#if defined(POSIX) || defined(PLAYSTATION3)
// Re-enable some forbidden symbols to avoid clashes with stat.h and unistd.h.
// Also with clock() in sys/time.h in some Mac OS X SDKs.
diff --git a/backends/fs/ps2/ps2-fs-factory.cpp b/backends/fs/ps2/ps2-fs-factory.cpp
index cad92b5dec..ef7b2013a3 100644
--- a/backends/fs/ps2/ps2-fs-factory.cpp
+++ b/backends/fs/ps2/ps2-fs-factory.cpp
@@ -27,7 +27,9 @@
#include "backends/fs/ps2/ps2-fs-factory.h"
#include "backends/fs/ps2/ps2-fs.h"
+namespace Common {
DECLARE_SINGLETON(Ps2FilesystemFactory);
+}
AbstractFSNode *Ps2FilesystemFactory::makeRootFileNode() const {
return new Ps2FilesystemNode();
diff --git a/backends/fs/ps3/ps3-fs-factory.cpp b/backends/fs/ps3/ps3-fs-factory.cpp
new file mode 100644
index 0000000000..3257246c50
--- /dev/null
+++ b/backends/fs/ps3/ps3-fs-factory.cpp
@@ -0,0 +1,26 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "backends/fs/ps3/ps3-fs-factory.h"
+
+AbstractFSNode *PS3FilesystemFactory::makeCurrentDirectoryFileNode() const {
+ return makeRootFileNode();
+}
diff --git a/backends/fs/ps3/ps3-fs-factory.h b/backends/fs/ps3/ps3-fs-factory.h
new file mode 100644
index 0000000000..6c1988b1c9
--- /dev/null
+++ b/backends/fs/ps3/ps3-fs-factory.h
@@ -0,0 +1,36 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 PS3_FILESYSTEM_FACTORY_H
+#define PS3_FILESYSTEM_FACTORY_H
+
+#include "backends/fs/posix/posix-fs-factory.h"
+
+/**
+ * Creates PS3FilesystemFactory objects.
+ *
+ * Parts of this class are documented in the base interface class, FilesystemFactory.
+ */
+class PS3FilesystemFactory : public POSIXFilesystemFactory {
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+};
+
+#endif /*PS3_FILESYSTEM_FACTORY_H*/
diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp
index ef1df246ba..bb3aca8ee6 100644
--- a/backends/fs/psp/psp-fs-factory.cpp
+++ b/backends/fs/psp/psp-fs-factory.cpp
@@ -43,7 +43,9 @@
#include <unistd.h>
+namespace Common {
DECLARE_SINGLETON(PSPFilesystemFactory);
+}
AbstractFSNode *PSPFilesystemFactory::makeRootFileNode() const {
return new PSPFilesystemNode();
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp
index 34cde8ef46..fbc9ef1da8 100644
--- a/backends/fs/wii/wii-fs-factory.cpp
+++ b/backends/fs/wii/wii-fs-factory.cpp
@@ -40,7 +40,9 @@
#include <smb.h>
#endif
+namespace Common {
DECLARE_SINGLETON(WiiFilesystemFactory);
+}
WiiFilesystemFactory::WiiFilesystemFactory() :
_dvdMounted(false),
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 9e864753c9..c32ad2da94 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -54,7 +54,7 @@ bool WindowsFilesystemNode::isWritable() const {
return _access(_path.c_str(), W_OK) == 0;
}
-void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const char *base, WIN32_FIND_DATA* find_data) {
+void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const char *base, bool hidden, WIN32_FIND_DATA* find_data) {
WindowsFilesystemNode entry;
char *asciiName = toAscii(find_data->cFileName);
bool isDirectory;
@@ -63,6 +63,10 @@ void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const c
if (!strcmp(asciiName, ".") || !strcmp(asciiName, ".."))
return;
+ // Skip hidden files if asked
+ if ((find_data->dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) && !hidden)
+ return;
+
isDirectory = (find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? true : false);
if ((!isDirectory && mode == Common::FSNode::kListDirectoriesOnly) ||
@@ -163,8 +167,6 @@ AbstractFSNode *WindowsFilesystemNode::getChild(const Common::String &n) const {
bool WindowsFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
- //TODO: honor the hidden flag
-
if (_isPseudoRoot) {
#ifndef _WIN32_WCE
// Drives enumeration
@@ -200,10 +202,10 @@ bool WindowsFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
if (handle == INVALID_HANDLE_VALUE)
return false;
- addFile(myList, mode, _path.c_str(), &desc);
+ addFile(myList, mode, _path.c_str(), hidden, &desc);
while (FindNextFile(handle, &desc))
- addFile(myList, mode, _path.c_str(), &desc);
+ addFile(myList, mode, _path.c_str(), hidden, &desc);
FindClose(handle);
}
diff --git a/backends/fs/windows/windows-fs.h b/backends/fs/windows/windows-fs.h
index 37d1e9099b..351307bef0 100644
--- a/backends/fs/windows/windows-fs.h
+++ b/backends/fs/windows/windows-fs.h
@@ -93,12 +93,13 @@ private:
* Adds a single WindowsFilesystemNode to a given list.
* This method is used by getChildren() to populate the directory entries list.
*
- * @param list List to put the file entry node in.
- * @param mode Mode to use while adding the file entry to the list.
- * @param base Common::String with the directory being listed.
- * @param find_data Describes a file that the FindFirstFile, FindFirstFileEx, or FindNextFile functions find.
+ * @param list List to put the file entry node in.
+ * @param mode Mode to use while adding the file entry to the list.
+ * @param base Common::String with the directory being listed.
+ * @param hidden true if hidden files should be added, false otherwise
+ * @param find_data Describes a file that the FindFirstFile, FindFirstFileEx, or FindNextFile functions find.
*/
- static void addFile(AbstractFSList &list, ListMode mode, const char *base, WIN32_FIND_DATA* find_data);
+ static void addFile(AbstractFSList &list, ListMode mode, const char *base, bool hidden, WIN32_FIND_DATA* find_data);
/**
* Converts a Unicode string to Ascii format.
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index 8a141e97a5..8075d0d45b 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -36,7 +36,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
};
DINGUXSdlGraphicsManager::DINGUXSdlGraphicsManager(SdlEventSource *boss)
- : SdlGraphicsManager(boss) {
+ : SurfaceSdlGraphicsManager(boss) {
}
const OSystem::GraphicsMode *DINGUXSdlGraphicsManager::getSupportedGraphicsModes() const {
@@ -415,7 +415,7 @@ void DINGUXSdlGraphicsManager::showOverlay() {
_mouseCurState.x = _mouseCurState.x / 2;
_mouseCurState.y = _mouseCurState.y / 2;
}
- SdlGraphicsManager::showOverlay();
+ SurfaceSdlGraphicsManager::showOverlay();
}
void DINGUXSdlGraphicsManager::hideOverlay() {
@@ -423,7 +423,7 @@ void DINGUXSdlGraphicsManager::hideOverlay() {
_mouseCurState.x = _mouseCurState.x * 2;
_mouseCurState.y = _mouseCurState.y * 2;
}
- SdlGraphicsManager::hideOverlay();
+ SurfaceSdlGraphicsManager::hideOverlay();
}
bool DINGUXSdlGraphicsManager::loadGFXMode() {
@@ -462,7 +462,7 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() {
}
- return SdlGraphicsManager::loadGFXMode();
+ return SurfaceSdlGraphicsManager::loadGFXMode();
}
bool DINGUXSdlGraphicsManager::hasFeature(OSystem::Feature f) {
@@ -492,11 +492,11 @@ bool DINGUXSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
}
}
-SdlGraphicsManager::MousePos* DINGUXSdlGraphicsManager::getMouseCurState() {
+SurfaceSdlGraphicsManager::MousePos *DINGUXSdlGraphicsManager::getMouseCurState() {
return &_mouseCurState;
}
-SdlGraphicsManager::VideoState* DINGUXSdlGraphicsManager::getVideoMode() {
+SurfaceSdlGraphicsManager::VideoState *DINGUXSdlGraphicsManager::getVideoMode() {
return &_videoMode;
}
@@ -507,7 +507,7 @@ void DINGUXSdlGraphicsManager::warpMouse(int x, int y) {
y = y / 2;
}
}
- SdlGraphicsManager::warpMouse(x, y);
+ SurfaceSdlGraphicsManager::warpMouse(x, y);
}
void DINGUXSdlGraphicsManager::adjustMouseEvent(const Common::Event &event) {
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.h b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
index 9fb1170503..84a784b771 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
@@ -23,16 +23,16 @@
#ifndef BACKENDS_GRAPHICS_SDL_DINGUX_H
#define BACKENDS_GRAPHICS_SDL_DINGUX_H
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
-#include "graphics/scaler/aspect.h" // for aspect2Real
+#include "graphics/scaler/aspect.h" // for aspect2Real
#include "graphics/scaler/downscaler.h"
enum {
GFX_HALF = 12
};
-class DINGUXSdlGraphicsManager : public SdlGraphicsManager {
+class DINGUXSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
DINGUXSdlGraphicsManager(SdlEventSource *boss);
@@ -54,8 +54,8 @@ public:
void undrawMouse();
virtual void warpMouse(int x, int y);
- SdlGraphicsManager::MousePos *getMouseCurState();
- SdlGraphicsManager::VideoState *getVideoMode();
+ SurfaceSdlGraphicsManager::MousePos *getMouseCurState();
+ SurfaceSdlGraphicsManager::VideoState *getVideoMode();
virtual void adjustMouseEvent(const Common::Event &event);
};
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index eb748f2fc2..82a32203fb 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -36,7 +36,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
};
GPHGraphicsManager::GPHGraphicsManager(SdlEventSource *sdlEventSource)
- : SdlGraphicsManager(sdlEventSource) {
+ : SurfaceSdlGraphicsManager(sdlEventSource) {
}
const OSystem::GraphicsMode *GPHGraphicsManager::getSupportedGraphicsModes() const {
@@ -443,7 +443,7 @@ void GPHGraphicsManager::showOverlay() {
_mouseCurState.x = _mouseCurState.x / 2;
_mouseCurState.y = _mouseCurState.y / 2;
}
- SdlGraphicsManager::showOverlay();
+ SurfaceSdlGraphicsManager::showOverlay();
}
void GPHGraphicsManager::hideOverlay() {
@@ -451,7 +451,7 @@ void GPHGraphicsManager::hideOverlay() {
_mouseCurState.x = _mouseCurState.x * 2;
_mouseCurState.y = _mouseCurState.y * 2;
}
- SdlGraphicsManager::hideOverlay();
+ SurfaceSdlGraphicsManager::hideOverlay();
}
@@ -503,7 +503,7 @@ void GPHGraphicsManager::hideOverlay() {
//
// }
-// return SdlGraphicsManager::loadGFXMode();
+// return SurfaceSdlGraphicsManager::loadGFXMode();
//}
bool GPHGraphicsManager::loadGFXMode() {
@@ -531,7 +531,7 @@ bool GPHGraphicsManager::loadGFXMode() {
_videoMode.hardwareWidth = _videoMode.screenWidth * _videoMode.scaleFactor;
_videoMode.hardwareHeight = effectiveScreenHeight();
}
- return SdlGraphicsManager::loadGFXMode();
+ return SurfaceSdlGraphicsManager::loadGFXMode();
}
bool GPHGraphicsManager::hasFeature(OSystem::Feature f) {
@@ -561,11 +561,11 @@ bool GPHGraphicsManager::getFeatureState(OSystem::Feature f) {
}
}
-SdlGraphicsManager::MousePos* GPHGraphicsManager::getMouseCurState() {
+SurfaceSdlGraphicsManager::MousePos *GPHGraphicsManager::getMouseCurState() {
return &_mouseCurState;
}
-SdlGraphicsManager::VideoState* GPHGraphicsManager::getVideoMode() {
+SurfaceSdlGraphicsManager::VideoState *GPHGraphicsManager::getVideoMode() {
return &_videoMode;
}
@@ -576,7 +576,7 @@ void GPHGraphicsManager::warpMouse(int x, int y) {
y = y / 2;
}
}
- SdlGraphicsManager::warpMouse(x, y);
+ SurfaceSdlGraphicsManager::warpMouse(x, y);
}
void GPHGraphicsManager::adjustMouseEvent(const Common::Event &event) {
diff --git a/backends/graphics/gph/gph-graphics.h b/backends/graphics/gph/gph-graphics.h
index fc3dc5730d..45b8618569 100644
--- a/backends/graphics/gph/gph-graphics.h
+++ b/backends/graphics/gph/gph-graphics.h
@@ -23,7 +23,7 @@
#ifndef BACKENDS_GRAPHICS_GPH_H
#define BACKENDS_GRAPHICS_GPH_H
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
#include "graphics/scaler/aspect.h" // for aspect2Real
#include "graphics/scaler/downscaler.h"
@@ -31,7 +31,7 @@ enum {
GFX_HALF = 12
};
-class GPHGraphicsManager : public SdlGraphicsManager {
+class GPHGraphicsManager : public SurfaceSdlGraphicsManager {
public:
GPHGraphicsManager(SdlEventSource *boss);
@@ -53,8 +53,8 @@ public:
void undrawMouse();
virtual void warpMouse(int x, int y);
- SdlGraphicsManager::MousePos *getMouseCurState();
- SdlGraphicsManager::VideoState *getVideoMode();
+ SurfaceSdlGraphicsManager::MousePos *getMouseCurState();
+ SurfaceSdlGraphicsManager::VideoState *getVideoMode();
virtual void adjustMouseEvent(const Common::Event &event);
};
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index 42db89ee33..732074b7e2 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -46,7 +46,7 @@ static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
};
LinuxmotoSdlGraphicsManager::LinuxmotoSdlGraphicsManager(SdlEventSource *sdlEventSource)
- : SdlGraphicsManager(sdlEventSource) {
+ : SurfaceSdlGraphicsManager(sdlEventSource) {
}
const OSystem::GraphicsMode *LinuxmotoSdlGraphicsManager::getSupportedGraphicsModes() const {
@@ -166,7 +166,7 @@ bool LinuxmotoSdlGraphicsManager::loadGFXMode() {
_videoMode.hardwareHeight = effectiveScreenHeight();
}
- return SdlGraphicsManager::loadGFXMode();
+ return SurfaceSdlGraphicsManager::loadGFXMode();
}
void LinuxmotoSdlGraphicsManager::drawMouse() {
@@ -457,7 +457,7 @@ void LinuxmotoSdlGraphicsManager::showOverlay() {
_mouseCurState.x = _mouseCurState.x / 2;
_mouseCurState.y = _mouseCurState.y / 2;
}
- SdlGraphicsManager::showOverlay();
+ SurfaceSdlGraphicsManager::showOverlay();
}
void LinuxmotoSdlGraphicsManager::hideOverlay() {
@@ -465,7 +465,7 @@ void LinuxmotoSdlGraphicsManager::hideOverlay() {
_mouseCurState.x = _mouseCurState.x * 2;
_mouseCurState.y = _mouseCurState.y * 2;
}
- SdlGraphicsManager::hideOverlay();
+ SurfaceSdlGraphicsManager::hideOverlay();
}
void LinuxmotoSdlGraphicsManager::warpMouse(int x, int y) {
@@ -475,7 +475,7 @@ void LinuxmotoSdlGraphicsManager::warpMouse(int x, int y) {
y = y / 2;
}
}
- SdlGraphicsManager::warpMouse(x, y);
+ SurfaceSdlGraphicsManager::warpMouse(x, y);
}
void LinuxmotoSdlGraphicsManager::adjustMouseEvent(const Common::Event &event) {
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
index c428f00447..938512f323 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
@@ -23,9 +23,9 @@
#ifndef BACKENDS_GRAPHICS_SDL_LINUXMOTO_H
#define BACKENDS_GRAPHICS_SDL_LINUXMOTO_H
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
-class LinuxmotoSdlGraphicsManager : public SdlGraphicsManager {
+class LinuxmotoSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
LinuxmotoSdlGraphicsManager(SdlEventSource *sdlEventSource);
diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp
index 3d1027b44f..b7f5c90105 100644
--- a/backends/graphics/opengl/gltexture.cpp
+++ b/backends/graphics/opengl/gltexture.cpp
@@ -108,7 +108,7 @@ void GLTexture::refresh() {
void GLTexture::allocBuffer(GLuint w, GLuint h) {
_realWidth = w;
_realHeight = h;
-
+
if (w <= _textureWidth && h <= _textureHeight && !_refresh)
// Already allocated a sufficiently large buffer
return;
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index c0551de386..046be4c669 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -179,7 +179,7 @@ bool OpenGLGraphicsManager::setGraphicsMode(int mode) {
}
int OpenGLGraphicsManager::getGraphicsMode() const {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
return _videoMode.mode;
}
@@ -420,12 +420,12 @@ void OpenGLGraphicsManager::fillScreen(uint32 col) {
}
void OpenGLGraphicsManager::updateScreen() {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
internUpdateScreen();
}
void OpenGLGraphicsManager::setShakePos(int shakeOffset) {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
_shakePos = shakeOffset;
}
@@ -440,7 +440,7 @@ void OpenGLGraphicsManager::clearFocusRectangle() {
//
void OpenGLGraphicsManager::showOverlay() {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
if (_overlayVisible)
return;
@@ -451,7 +451,7 @@ void OpenGLGraphicsManager::showOverlay() {
}
void OpenGLGraphicsManager::hideOverlay() {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
if (!_overlayVisible)
return;
@@ -483,7 +483,7 @@ void OpenGLGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) {
}
void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
- assert (_transactionMode == kTransactionNone);
+ assert(_transactionMode == kTransactionNone);
if (_overlayTexture == NULL)
return;
@@ -642,7 +642,7 @@ void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int
void OpenGLGraphicsManager::setCursorPalette(const byte *colors, uint start, uint num) {
assert(colors);
-
+
// Save the cursor palette
memcpy(_cursorPalette + start * 3, colors, num * 3);
@@ -1315,7 +1315,7 @@ bool OpenGLGraphicsManager::notifyEvent(const Common::Event &event) {
bool OpenGLGraphicsManager::saveScreenshot(const char *filename) {
int width = _videoMode.hardwareWidth;
int height = _videoMode.hardwareHeight;
-
+
// A line of a BMP image must have a size divisible by 4.
// We calculate the padding bytes needed here.
// Since we use a 3 byte per pixel mode, we can use width % 4 here, since
@@ -1358,7 +1358,7 @@ bool OpenGLGraphicsManager::saveScreenshot(const char *filename) {
out.writeUint32LE(0);
out.writeUint32LE(0);
out.writeUint32LE(0);
- out.writeUint32LE(0);
+ out.writeUint32LE(0);
// Write pixel data to BMP
out.write(pixels, lineSize * height);
@@ -1413,7 +1413,7 @@ void OpenGLGraphicsManager::updateOSD() {
int dstX = (_osdSurface.w - width) / 2;
int dstY = (_osdSurface.h - height) / 2;
- // Draw a dark gray rect
+ // Draw a dark gray rect (R = 40, G = 40, B = 40)
const uint16 color = 0x294B;
_osdSurface.fillRect(Common::Rect(dstX, dstY, dstX + width, dstY + height), color);
@@ -1423,9 +1423,9 @@ void OpenGLGraphicsManager::updateOSD() {
dstX, dstY + i * lineHeight + vOffset + lineSpacing, width,
0xFFFF, Graphics::kTextAlignCenter);
}
-
+
// Update the texture
- _osdTexture->updateBuffer(_osdSurface.pixels, _osdSurface.pitch, 0, 0,
+ _osdTexture->updateBuffer(_osdSurface.pixels, _osdSurface.pitch, 0, 0,
_osdSurface.w, _osdSurface.h);
}
#endif
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 463715aad8..56f7d92a12 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -185,7 +185,7 @@ protected:
/**
* Set the scale factor.
- *
+ *
* This can only be used in a GFX transaction.
*
* @param newScale New scale factor.
@@ -332,7 +332,7 @@ protected:
GLTexture *_osdTexture;
Graphics::Surface _osdSurface;
uint8 _osdAlpha;
- uint32 _osdFadeStartTime;
+ uint32 _osdFadeStartTime;
bool _requireOSDUpdate;
enum {
kOSDFadeOutDelay = 2 * 1000,
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 87457c3c08..bd7dd32e3b 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -54,6 +54,10 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager()
SDL_ShowCursor(SDL_DISABLE);
// Get desktop resolution
+ // TODO: In case the OpenGL manager is created *after* a plain SDL manager
+ // has been used, this will return the last setup graphics mode rather
+ // than the desktop resolution. We should really look into a way to
+ // properly retrieve the desktop resolution.
const SDL_VideoInfo *videoInfo = SDL_GetVideoInfo();
if (videoInfo->current_w > 0 && videoInfo->current_h > 0) {
_desktopWidth = videoInfo->current_w;
@@ -110,16 +114,16 @@ void OpenGLSdlGraphicsManager::detectSupportedFormats() {
// use.
const Graphics::PixelFormat RGBList[] = {
#if defined(ENABLE_32BIT)
- Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0), // RGBA8888
+ Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0), // RGBA8888
#ifndef USE_GLES
Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24), // ARGB8888
#endif
- Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0), // RGB888
+ Graphics::PixelFormat(3, 8, 8, 8, 0, 16, 8, 0, 0), // RGB888
#endif
- Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), // RGB565
- Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0), // RGB5551
- Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0), // RGB555
- Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0), // RGBA4444
+ Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), // RGB565
+ Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0), // RGB5551
+ Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0), // RGB555
+ Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0), // RGBA4444
#ifndef USE_GLES
Graphics::PixelFormat(2, 4, 4, 4, 4, 8, 4, 0, 12) // ARGB4444
#endif
@@ -302,7 +306,7 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() {
int screenAspectRatio = _videoMode.screenWidth * 10000 / _videoMode.screenHeight;
int desiredAspectRatio = getAspectRatio();
-
+
// Do not downscale dimensions, only enlarge them if needed
if (screenAspectRatio > desiredAspectRatio)
_videoMode.hardwareHeight = (_videoMode.overlayWidth * 10000 + 5000) / desiredAspectRatio;
@@ -385,7 +389,7 @@ void OpenGLSdlGraphicsManager::internUpdateScreen() {
OpenGLGraphicsManager::internUpdateScreen();
// Swap OpenGL buffers
- SDL_GL_SwapBuffers();
+ SDL_GL_SwapBuffers();
}
#ifdef USE_OSD
@@ -394,27 +398,27 @@ void OpenGLSdlGraphicsManager::displayModeChangedMsg() {
if (newModeName) {
const int scaleFactor = getScale();
- char buffer[128];
- sprintf(buffer, "%s: %s\n%d x %d -> %d x %d",
+ Common::String osdMessage = Common::String::format(
+ "%s: %s\n%d x %d -> %d x %d",
_("Current display mode"),
newModeName,
_videoMode.screenWidth * scaleFactor,
_videoMode.screenHeight * scaleFactor,
_hwscreen->w, _hwscreen->h
);
- displayMessageOnOSD(buffer);
+ displayMessageOnOSD(osdMessage.c_str());
}
}
void OpenGLSdlGraphicsManager::displayScaleChangedMsg() {
- char buffer[128];
const int scaleFactor = getScale();
- sprintf(buffer, "%s: x%d\n%d x %d -> %d x %d",
+ Common::String osdMessage = Common::String::format(
+ "%s: x%d\n%d x %d -> %d x %d",
_("Current scale"),
scaleFactor,
_videoMode.screenWidth, _videoMode.screenHeight,
_videoMode.overlayWidth, _videoMode.overlayHeight
);
- displayMessageOnOSD(buffer);
+ displayMessageOnOSD(osdMessage.c_str());
}
#endif
@@ -450,18 +454,18 @@ void OpenGLSdlGraphicsManager::toggleFullScreen(int loop) {
_ignoreResizeFrames = 10;
#ifdef USE_OSD
- char buffer[128];
+ Common::String osdMessage;
if (getFullscreenMode())
- sprintf(buffer, "%s\n%d x %d",
+ osdMessage = Common::String::format("%s\n%d x %d",
_("Fullscreen mode"),
_hwscreen->w, _hwscreen->h
);
else
- sprintf(buffer, "%s\n%d x %d",
+ osdMessage = Common::String::format("%s\n%d x %d",
_("Windowed mode"),
_hwscreen->w, _hwscreen->h
);
- displayMessageOnOSD(buffer);
+ displayMessageOnOSD(osdMessage.c_str());
#endif
}
@@ -478,19 +482,19 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
// Alt-S create a screenshot
if (event.kbd.keycode == 's') {
- char filename[20];
+ Common::String filename;
for (int n = 0;; n++) {
SDL_RWops *file;
- sprintf(filename, "scummvm%05d.bmp", n);
- file = SDL_RWFromFile(filename, "r");
+ filename = Common::String::format("scummvm%05d.bmp", n);
+ file = SDL_RWFromFile(filename.c_str(), "r");
if (!file)
break;
SDL_RWclose(file);
}
- if (saveScreenshot(filename))
- debug("Saved screenshot '%s'", filename);
+ if (saveScreenshot(filename.c_str()))
+ debug("Saved screenshot '%s'", filename.c_str());
else
warning("Could not save screenshot");
return true;
@@ -511,18 +515,18 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
setFeatureState(OSystem::kFeatureAspectRatioCorrection, !getFeatureState(OSystem::kFeatureAspectRatioCorrection));
endGFXTransaction();
#ifdef USE_OSD
- char buffer[128];
+ Common::String osdMessage;
if (getFeatureState(OSystem::kFeatureAspectRatioCorrection))
- sprintf(buffer, "%s\n%d x %d -> %d x %d",
- _("Enabled aspect ratio correction"),
+ osdMessage = Common::String::format("%s\n%d x %d -> %d x %d",
+ _("Enabled aspect ratio correction"),
_videoMode.screenWidth, _videoMode.screenHeight,
_hwscreen->w, _hwscreen->h);
else
- sprintf(buffer, "%s\n%d x %d -> %d x %d",
- _("Disabled aspect ratio correction"),
+ osdMessage = Common::String::format("%s\n%d x %d -> %d x %d",
+ _("Disabled aspect ratio correction"),
_videoMode.screenWidth, _videoMode.screenHeight,
_hwscreen->w, _hwscreen->h);
- displayMessageOnOSD(buffer);
+ displayMessageOnOSD(osdMessage.c_str());
#endif
internUpdateScreen();
return true;
@@ -557,7 +561,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
// Check if the desktop resolution has been detected
if (_desktopWidth > 0 && _desktopHeight > 0)
// If the new scale factor is too big, do not scale
- if (_videoMode.screenWidth * factor > _desktopWidth ||
+ if (_videoMode.screenWidth * factor > _desktopWidth ||
_videoMode.screenHeight * factor > _desktopHeight)
return false;
@@ -607,7 +611,7 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
break;
case Common::EVENT_KEYUP:
return isHotkey(event);
- // HACK: Handle special SDL event
+ // HACK: Handle special SDL event
// The new screen size is saved on the mouse event as part of HACK,
// there is no common resize event.
case OSystem_SDL::kSdlEventResize:
diff --git a/backends/graphics/openpandora/op-graphics.cpp b/backends/graphics/openpandora/op-graphics.cpp
index c8617635a5..5f0301a0c8 100644
--- a/backends/graphics/openpandora/op-graphics.cpp
+++ b/backends/graphics/openpandora/op-graphics.cpp
@@ -32,7 +32,7 @@
#include "common/textconsole.h"
OPGraphicsManager::OPGraphicsManager(SdlEventSource *sdlEventSource)
- : SdlGraphicsManager(sdlEventSource) {
+ : SurfaceSdlGraphicsManager(sdlEventSource) {
}
bool OPGraphicsManager::loadGFXMode() {
@@ -47,7 +47,7 @@ bool OPGraphicsManager::loadGFXMode() {
if (_videoMode.screenHeight != 200 && _videoMode.screenHeight != 400)
_videoMode.aspectRatioCorrection = false;
- return SdlGraphicsManager::loadGFXMode();
+ return SurfaceSdlGraphicsManager::loadGFXMode();
}
#endif
diff --git a/backends/graphics/openpandora/op-graphics.h b/backends/graphics/openpandora/op-graphics.h
index 4bb89ca1e6..ed26df7475 100644
--- a/backends/graphics/openpandora/op-graphics.h
+++ b/backends/graphics/openpandora/op-graphics.h
@@ -23,7 +23,7 @@
#ifndef BACKENDS_GRAPHICS_OP_H
#define BACKENDS_GRAPHICS_OP_H
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
#include "graphics/scaler/aspect.h" // for aspect2Real
#include "graphics/scaler/downscaler.h"
@@ -31,7 +31,7 @@ enum {
GFX_HALF = 12
};
-class OPGraphicsManager : public SdlGraphicsManager {
+class OPGraphicsManager : public SurfaceSdlGraphicsManager {
public:
OPGraphicsManager(SdlEventSource *sdlEventSource);
@@ -53,8 +53,8 @@ public:
// void undrawMouse();
// virtual void warpMouse(int x, int y);
-// SdlGraphicsManager::MousePos *getMouseCurState();
-// SdlGraphicsManager::VideoState *getVideoMode();
+// SurfaceSdlGraphicsManager::MousePos *getMouseCurState();
+// SurfaceSdlGraphicsManager::VideoState *getVideoMode();
// virtual void adjustMouseEvent(const Common::Event &event);
};
diff --git a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
index f6832978a8..95e0875f55 100644
--- a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
+++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
@@ -29,7 +29,7 @@
#include "backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h"
SamsungTVSdlGraphicsManager::SamsungTVSdlGraphicsManager(SdlEventSource *sdlEventSource)
- : SdlGraphicsManager(sdlEventSource) {
+ : SurfaceSdlGraphicsManager(sdlEventSource) {
}
bool SamsungTVSdlGraphicsManager::hasFeature(OSystem::Feature f) {
@@ -41,7 +41,7 @@ bool SamsungTVSdlGraphicsManager::hasFeature(OSystem::Feature f) {
void SamsungTVSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
switch (f) {
case OSystem::kFeatureAspectRatioCorrection:
- SdlGraphicsManager::setFeatureState(f, enable);
+ SurfaceSdlGraphicsManager::setFeatureState(f, enable);
break;
default:
break;
@@ -51,7 +51,7 @@ void SamsungTVSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enabl
bool SamsungTVSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
switch (f) {
case OSystem::kFeatureAspectRatioCorrection:
- return SdlGraphicsManager::getFeatureState(f);
+ return SurfaceSdlGraphicsManager::getFeatureState(f);
default:
return false;
}
diff --git a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
index dc65c3a696..2d0ff636f4 100644
--- a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
+++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
@@ -25,9 +25,9 @@
#if defined(SAMSUNGTV)
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
-class SamsungTVSdlGraphicsManager : public SdlGraphicsManager {
+class SamsungTVSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
SamsungTVSdlGraphicsManager(SdlEventSource *sdlEventSource);
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 9063f55744..2d41ecead4 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -24,7 +24,7 @@
#if defined(SDL_BACKEND)
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
#include "backends/events/sdl/sdl-events.h"
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
@@ -120,7 +120,7 @@ static AspectRatio getDesiredAspectRatio() {
}
#endif
-SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *sdlEventSource)
+SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource)
:
_sdlEventSource(sdlEventSource),
#ifdef USE_OSD
@@ -195,7 +195,7 @@ SdlGraphicsManager::SdlGraphicsManager(SdlEventSource *sdlEventSource)
#endif
}
-SdlGraphicsManager::~SdlGraphicsManager() {
+SurfaceSdlGraphicsManager::~SurfaceSdlGraphicsManager() {
// Unregister the event observer
if (g_system->getEventManager()->getEventDispatcher() != NULL)
g_system->getEventManager()->getEventDispatcher()->unregisterObserver(this);
@@ -214,12 +214,12 @@ SdlGraphicsManager::~SdlGraphicsManager() {
free(_mouseData);
}
-void SdlGraphicsManager::initEventObserver() {
+void SurfaceSdlGraphicsManager::initEventObserver() {
// Register the graphics manager as a event observer
g_system->getEventManager()->getEventDispatcher()->registerObserver(this, 10, false);
}
-bool SdlGraphicsManager::hasFeature(OSystem::Feature f) {
+bool SurfaceSdlGraphicsManager::hasFeature(OSystem::Feature f) {
return
(f == OSystem::kFeatureFullscreenMode) ||
(f == OSystem::kFeatureAspectRatioCorrection) ||
@@ -227,7 +227,7 @@ bool SdlGraphicsManager::hasFeature(OSystem::Feature f) {
(f == OSystem::kFeatureIconifyWindow);
}
-void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
+void SurfaceSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
switch (f) {
case OSystem::kFeatureFullscreenMode:
setFullscreenMode(enable);
@@ -248,7 +248,7 @@ void SdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
}
}
-bool SdlGraphicsManager::getFeatureState(OSystem::Feature f) {
+bool SurfaceSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
assert(_transactionMode == kTransactionNone);
switch (f) {
@@ -263,23 +263,23 @@ bool SdlGraphicsManager::getFeatureState(OSystem::Feature f) {
}
}
-const OSystem::GraphicsMode *SdlGraphicsManager::supportedGraphicsModes() {
+const OSystem::GraphicsMode *SurfaceSdlGraphicsManager::supportedGraphicsModes() {
return s_supportedGraphicsModes;
}
-const OSystem::GraphicsMode *SdlGraphicsManager::getSupportedGraphicsModes() const {
+const OSystem::GraphicsMode *SurfaceSdlGraphicsManager::getSupportedGraphicsModes() const {
return s_supportedGraphicsModes;
}
-int SdlGraphicsManager::getDefaultGraphicsMode() const {
+int SurfaceSdlGraphicsManager::getDefaultGraphicsMode() const {
return GFX_DOUBLESIZE;
}
-void SdlGraphicsManager::resetGraphicsScale() {
+void SurfaceSdlGraphicsManager::resetGraphicsScale() {
setGraphicsMode(s_gfxModeSwitchTable[_scalerType][0]);
}
-void SdlGraphicsManager::beginGFXTransaction() {
+void SurfaceSdlGraphicsManager::beginGFXTransaction() {
assert(_transactionMode == kTransactionNone);
_transactionMode = kTransactionActive;
@@ -297,7 +297,7 @@ void SdlGraphicsManager::beginGFXTransaction() {
_oldVideoMode = _videoMode;
}
-OSystem::TransactionError SdlGraphicsManager::endGFXTransaction() {
+OSystem::TransactionError SurfaceSdlGraphicsManager::endGFXTransaction() {
int errors = OSystem::kTransactionSuccess;
assert(_transactionMode != kTransactionNone);
@@ -398,12 +398,12 @@ OSystem::TransactionError SdlGraphicsManager::endGFXTransaction() {
}
#ifdef USE_RGB_COLOR
-Common::List<Graphics::PixelFormat> SdlGraphicsManager::getSupportedFormats() const {
+Common::List<Graphics::PixelFormat> SurfaceSdlGraphicsManager::getSupportedFormats() const {
assert(!_supportedFormats.empty());
return _supportedFormats;
}
-void SdlGraphicsManager::detectSupportedFormats() {
+void SurfaceSdlGraphicsManager::detectSupportedFormats() {
// Clear old list
_supportedFormats.clear();
@@ -487,7 +487,7 @@ void SdlGraphicsManager::detectSupportedFormats() {
}
#endif
-bool SdlGraphicsManager::setGraphicsMode(int mode) {
+bool SurfaceSdlGraphicsManager::setGraphicsMode(int mode) {
Common::StackLock lock(_graphicsMutex);
assert(_transactionMode == kTransactionActive);
@@ -557,7 +557,7 @@ bool SdlGraphicsManager::setGraphicsMode(int mode) {
return true;
}
-void SdlGraphicsManager::setGraphicsModeIntern() {
+void SurfaceSdlGraphicsManager::setGraphicsModeIntern() {
Common::StackLock lock(_graphicsMutex);
ScalerProc *newScalerProc = 0;
@@ -630,12 +630,12 @@ void SdlGraphicsManager::setGraphicsModeIntern() {
blitCursor();
}
-int SdlGraphicsManager::getGraphicsMode() const {
- assert (_transactionMode == kTransactionNone);
+int SurfaceSdlGraphicsManager::getGraphicsMode() const {
+ assert(_transactionMode == kTransactionNone);
return _videoMode.mode;
}
-void SdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *format) {
+void SurfaceSdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *format) {
assert(_transactionMode == kTransactionActive);
#ifdef USE_RGB_COLOR
@@ -665,7 +665,7 @@ void SdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelFormat *f
_transactionDetails.sizeChanged = true;
}
-int SdlGraphicsManager::effectiveScreenHeight() const {
+int SurfaceSdlGraphicsManager::effectiveScreenHeight() const {
return _videoMode.scaleFactor *
(_videoMode.aspectRatioCorrection
? real2Aspect(_videoMode.screenHeight)
@@ -713,7 +713,7 @@ static void fixupResolutionForAspectRatio(AspectRatio desiredAspectRatio, int &w
height = bestMode->h;
}
-bool SdlGraphicsManager::loadGFXMode() {
+bool SurfaceSdlGraphicsManager::loadGFXMode() {
_forceFull = true;
#if !defined(__MAEMO__) && !defined(DINGUX) && !defined(GPH_DEVICE) && !defined(LINUXMOTO) && !defined(OPENPANDORA)
@@ -752,6 +752,12 @@ bool SdlGraphicsManager::loadGFXMode() {
error("allocating _screen failed");
#endif
+ // SDL 1.2 palettes default to all black,
+ // SDL 1.3 palettes default to all white,
+ // Thus set our own default palette to all black.
+ // SDL_SetColors does nothing for non indexed surfaces.
+ SDL_SetColors(_screen, _currentPalette, 0, 256);
+
//
// Create the surface that contains the scaled graphics in 16 bit mode
//
@@ -853,7 +859,7 @@ bool SdlGraphicsManager::loadGFXMode() {
return true;
}
-void SdlGraphicsManager::unloadGFXMode() {
+void SurfaceSdlGraphicsManager::unloadGFXMode() {
if (_screen) {
SDL_FreeSurface(_screen);
_screen = NULL;
@@ -888,7 +894,7 @@ void SdlGraphicsManager::unloadGFXMode() {
DestroyScalers();
}
-bool SdlGraphicsManager::hotswapGFXMode() {
+bool SurfaceSdlGraphicsManager::hotswapGFXMode() {
if (!_screen)
return false;
@@ -940,15 +946,15 @@ bool SdlGraphicsManager::hotswapGFXMode() {
return true;
}
-void SdlGraphicsManager::updateScreen() {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::updateScreen() {
+ assert(_transactionMode == kTransactionNone);
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
internUpdateScreen();
}
-void SdlGraphicsManager::internUpdateScreen() {
+void SurfaceSdlGraphicsManager::internUpdateScreen() {
SDL_Surface *srcSurf, *origSurf;
int height, width;
ScalerProc *scalerProc;
@@ -1191,14 +1197,14 @@ void SdlGraphicsManager::internUpdateScreen() {
_mouseNeedsRedraw = false;
}
-bool SdlGraphicsManager::saveScreenshot(const char *filename) {
+bool SurfaceSdlGraphicsManager::saveScreenshot(const char *filename) {
assert(_hwscreen != NULL);
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
return SDL_SaveBMP(_hwscreen, filename) == 0;
}
-void SdlGraphicsManager::setFullscreenMode(bool enable) {
+void SurfaceSdlGraphicsManager::setFullscreenMode(bool enable) {
Common::StackLock lock(_graphicsMutex);
if (_oldVideoMode.setup && _oldVideoMode.fullscreen == enable)
@@ -1210,7 +1216,7 @@ void SdlGraphicsManager::setFullscreenMode(bool enable) {
}
}
-void SdlGraphicsManager::setAspectRatioCorrection(bool enable) {
+void SurfaceSdlGraphicsManager::setAspectRatioCorrection(bool enable) {
Common::StackLock lock(_graphicsMutex);
if (_oldVideoMode.setup && _oldVideoMode.aspectRatioCorrection == enable)
@@ -1222,12 +1228,12 @@ void SdlGraphicsManager::setAspectRatioCorrection(bool enable) {
}
}
-void SdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) {
+ assert(_transactionMode == kTransactionNone);
assert(src);
if (_screen == NULL) {
- warning("SdlGraphicsManager::copyRectToScreen: _screen == NULL");
+ warning("SurfaceSdlGraphicsManager::copyRectToScreen: _screen == NULL");
return;
}
@@ -1272,8 +1278,8 @@ void SdlGraphicsManager::copyRectToScreen(const byte *src, int pitch, int x, int
SDL_UnlockSurface(_screen);
}
-Graphics::Surface *SdlGraphicsManager::lockScreen() {
- assert (_transactionMode == kTransactionNone);
+Graphics::Surface *SurfaceSdlGraphicsManager::lockScreen() {
+ assert(_transactionMode == kTransactionNone);
// Lock the graphics mutex
g_system->lockMutex(_graphicsMutex);
@@ -1299,8 +1305,8 @@ Graphics::Surface *SdlGraphicsManager::lockScreen() {
return &_framebuffer;
}
-void SdlGraphicsManager::unlockScreen() {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::unlockScreen() {
+ assert(_transactionMode == kTransactionNone);
// paranoia check
assert(_screenIsLocked);
@@ -1316,14 +1322,14 @@ void SdlGraphicsManager::unlockScreen() {
g_system->unlockMutex(_graphicsMutex);
}
-void SdlGraphicsManager::fillScreen(uint32 col) {
+void SurfaceSdlGraphicsManager::fillScreen(uint32 col) {
Graphics::Surface *screen = lockScreen();
if (screen && screen->pixels)
memset(screen->pixels, col, screen->h * screen->pitch);
unlockScreen();
}
-void SdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool realCoordinates) {
+void SurfaceSdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool realCoordinates) {
if (_forceFull)
return;
@@ -1391,15 +1397,15 @@ void SdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool realCoord
}
}
-int16 SdlGraphicsManager::getHeight() {
+int16 SurfaceSdlGraphicsManager::getHeight() {
return _videoMode.screenHeight;
}
-int16 SdlGraphicsManager::getWidth() {
+int16 SurfaceSdlGraphicsManager::getWidth() {
return _videoMode.screenWidth;
}
-void SdlGraphicsManager::setPalette(const byte *colors, uint start, uint num) {
+void SurfaceSdlGraphicsManager::setPalette(const byte *colors, uint start, uint num) {
assert(colors);
#ifdef USE_RGB_COLOR
@@ -1411,7 +1417,7 @@ void SdlGraphicsManager::setPalette(const byte *colors, uint start, uint num) {
// But it could indicate a programming error, so let's warn about it.
if (!_screen)
- warning("SdlGraphicsManager::setPalette: _screen == NULL");
+ warning("SurfaceSdlGraphicsManager::setPalette: _screen == NULL");
const byte *b = colors;
uint i;
@@ -1433,7 +1439,7 @@ void SdlGraphicsManager::setPalette(const byte *colors, uint start, uint num) {
blitCursor();
}
-void SdlGraphicsManager::grabPalette(byte *colors, uint start, uint num) {
+void SurfaceSdlGraphicsManager::grabPalette(byte *colors, uint start, uint num) {
assert(colors);
#ifdef USE_RGB_COLOR
@@ -1449,7 +1455,7 @@ void SdlGraphicsManager::grabPalette(byte *colors, uint start, uint num) {
}
}
-void SdlGraphicsManager::setCursorPalette(const byte *colors, uint start, uint num) {
+void SurfaceSdlGraphicsManager::setCursorPalette(const byte *colors, uint start, uint num) {
assert(colors);
const byte *b = colors;
uint i;
@@ -1464,13 +1470,13 @@ void SdlGraphicsManager::setCursorPalette(const byte *colors, uint start, uint n
blitCursor();
}
-void SdlGraphicsManager::setShakePos(int shake_pos) {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::setShakePos(int shake_pos) {
+ assert(_transactionMode == kTransactionNone);
_newShakePos = shake_pos;
}
-void SdlGraphicsManager::setFocusRectangle(const Common::Rect &rect) {
+void SurfaceSdlGraphicsManager::setFocusRectangle(const Common::Rect &rect) {
#ifdef USE_SDL_DEBUG_FOCUSRECT
// Only enable focus rectangle debug code, when the user wants it
if (!_enableFocusRectDebugCode)
@@ -1480,7 +1486,7 @@ void SdlGraphicsManager::setFocusRectangle(const Common::Rect &rect) {
_focusRect = rect;
if (rect.left < 0 || rect.top < 0 || rect.right > _videoMode.screenWidth || rect.bottom > _videoMode.screenHeight)
- warning("SdlGraphicsManager::setFocusRectangle: Got a rect which does not fit inside the screen bounds: %d,%d,%d,%d", rect.left, rect.top, rect.right, rect.bottom);
+ warning("SurfaceSdlGraphicsManager::setFocusRectangle: Got a rect which does not fit inside the screen bounds: %d,%d,%d,%d", rect.left, rect.top, rect.right, rect.bottom);
// It's gross but we actually sometimes get rects, which are not inside the screen bounds,
// thus we need to clip the rect here...
@@ -1492,7 +1498,7 @@ void SdlGraphicsManager::setFocusRectangle(const Common::Rect &rect) {
#endif
}
-void SdlGraphicsManager::clearFocusRectangle() {
+void SurfaceSdlGraphicsManager::clearFocusRectangle() {
#ifdef USE_SDL_DEBUG_FOCUSRECT
// Only enable focus rectangle debug code, when the user wants it
if (!_enableFocusRectDebugCode)
@@ -1510,8 +1516,8 @@ void SdlGraphicsManager::clearFocusRectangle() {
#pragma mark --- Overlays ---
#pragma mark -
-void SdlGraphicsManager::showOverlay() {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::showOverlay() {
+ assert(_transactionMode == kTransactionNone);
int x, y;
@@ -1533,8 +1539,8 @@ void SdlGraphicsManager::showOverlay() {
clearOverlay();
}
-void SdlGraphicsManager::hideOverlay() {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::hideOverlay() {
+ assert(_transactionMode == kTransactionNone);
if (!_overlayVisible)
return;
@@ -1557,8 +1563,8 @@ void SdlGraphicsManager::hideOverlay() {
_forceFull = true;
}
-void SdlGraphicsManager::clearOverlay() {
- //assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::clearOverlay() {
+ //assert(_transactionMode == kTransactionNone);
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
@@ -1590,8 +1596,8 @@ void SdlGraphicsManager::clearOverlay() {
_forceFull = true;
}
-void SdlGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) {
+ assert(_transactionMode == kTransactionNone);
if (_overlayscreen == NULL)
return;
@@ -1610,8 +1616,8 @@ void SdlGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) {
SDL_UnlockSurface(_overlayscreen);
}
-void SdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
+ assert(_transactionMode == kTransactionNone);
if (_overlayscreen == NULL)
return;
@@ -1660,7 +1666,7 @@ void SdlGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch, i
#pragma mark --- Mouse ---
#pragma mark -
-bool SdlGraphicsManager::showMouse(bool visible) {
+bool SurfaceSdlGraphicsManager::showMouse(bool visible) {
if (_mouseVisible == visible)
return visible;
@@ -1671,7 +1677,7 @@ bool SdlGraphicsManager::showMouse(bool visible) {
return last;
}
-void SdlGraphicsManager::setMousePos(int x, int y) {
+void SurfaceSdlGraphicsManager::setMousePos(int x, int y) {
if (x != _mouseCurState.x || y != _mouseCurState.y) {
_mouseNeedsRedraw = true;
_mouseCurState.x = x;
@@ -1679,7 +1685,7 @@ void SdlGraphicsManager::setMousePos(int x, int y) {
}
}
-void SdlGraphicsManager::warpMouse(int x, int y) {
+void SurfaceSdlGraphicsManager::warpMouse(int x, int y) {
int y1 = y;
// Don't change actual mouse position, when mouse is outside of our window (in case of windowed mode)
@@ -1708,7 +1714,7 @@ void SdlGraphicsManager::warpMouse(int x, int y) {
}
}
-void SdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) {
+void SurfaceSdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, uint32 keycolor, int cursorTargetScale, const Graphics::PixelFormat *format) {
#ifdef USE_RGB_COLOR
if (!format)
_cursorFormat = Graphics::PixelFormat::createFormatCLUT8();
@@ -1765,7 +1771,7 @@ void SdlGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int hot
blitCursor();
}
-void SdlGraphicsManager::blitCursor() {
+void SurfaceSdlGraphicsManager::blitCursor() {
byte *dstPtr;
const byte *srcPtr = _mouseData;
#ifdef USE_RGB_COLOR
@@ -1956,7 +1962,7 @@ static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height
}
#endif
-void SdlGraphicsManager::undrawMouse() {
+void SurfaceSdlGraphicsManager::undrawMouse() {
const int x = _mouseBackup.x;
const int y = _mouseBackup.y;
@@ -1969,7 +1975,7 @@ void SdlGraphicsManager::undrawMouse() {
addDirtyRect(x, y - _currentShakePos, _mouseBackup.w, _mouseBackup.h);
}
-void SdlGraphicsManager::drawMouse() {
+void SurfaceSdlGraphicsManager::drawMouse() {
if (!_mouseVisible || !_mouseSurface) {
_mouseBackup.x = _mouseBackup.y = _mouseBackup.w = _mouseBackup.h = 0;
return;
@@ -2036,8 +2042,8 @@ void SdlGraphicsManager::drawMouse() {
#pragma mark -
#ifdef USE_OSD
-void SdlGraphicsManager::displayMessageOnOSD(const char *msg) {
- assert (_transactionMode == kTransactionNone);
+void SurfaceSdlGraphicsManager::displayMessageOnOSD(const char *msg) {
+ assert(_transactionMode == kTransactionNone);
assert(msg);
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
@@ -2123,7 +2129,7 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) {
}
#endif
-bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
+bool SurfaceSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
// Ctrl-Alt-a toggles aspect ratio correction
if (key == 'a') {
@@ -2212,7 +2218,7 @@ bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) {
}
}
-bool SdlGraphicsManager::isScalerHotkey(const Common::Event &event) {
+bool SurfaceSdlGraphicsManager::isScalerHotkey(const Common::Event &event) {
if ((event.kbd.flags & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) {
const bool isNormalNumber = (Common::KEYCODE_1 <= event.kbd.keycode && event.kbd.keycode <= Common::KEYCODE_9);
const bool isKeypadNumber = (Common::KEYCODE_KP1 <= event.kbd.keycode && event.kbd.keycode <= Common::KEYCODE_KP9);
@@ -2229,7 +2235,7 @@ bool SdlGraphicsManager::isScalerHotkey(const Common::Event &event) {
return false;
}
-void SdlGraphicsManager::adjustMouseEvent(const Common::Event &event) {
+void SurfaceSdlGraphicsManager::adjustMouseEvent(const Common::Event &event) {
if (!event.synthetic) {
Common::Event newEvent(event);
newEvent.synthetic = true;
@@ -2243,7 +2249,7 @@ void SdlGraphicsManager::adjustMouseEvent(const Common::Event &event) {
}
}
-void SdlGraphicsManager::toggleFullScreen() {
+void SurfaceSdlGraphicsManager::toggleFullScreen() {
beginGFXTransaction();
setFullscreenMode(!_videoMode.fullscreen);
endGFXTransaction();
@@ -2255,7 +2261,7 @@ void SdlGraphicsManager::toggleFullScreen() {
#endif
}
-bool SdlGraphicsManager::notifyEvent(const Common::Event &event) {
+bool SurfaceSdlGraphicsManager::notifyEvent(const Common::Event &event) {
switch ((int)event.type) {
case Common::EVENT_KEYDOWN:
// Alt-Return and Alt-Enter toggle full screen mode
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index 9627ab23a3..cd8710d443 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef BACKENDS_GRAPHICS_SDL_H
-#define BACKENDS_GRAPHICS_SDL_H
+#ifndef BACKENDS_GRAPHICS_SURFACESDL_GRAPHICS_H
+#define BACKENDS_GRAPHICS_SURFACESDL_GRAPHICS_H
#include "backends/graphics/graphics.h"
#include "graphics/pixelformat.h"
@@ -74,10 +74,10 @@ public:
/**
* SDL graphics manager
*/
-class SdlGraphicsManager : public GraphicsManager, public Common::EventObserver {
+class SurfaceSdlGraphicsManager : public GraphicsManager, public Common::EventObserver {
public:
- SdlGraphicsManager(SdlEventSource *sdlEventSource);
- virtual ~SdlGraphicsManager();
+ SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSource);
+ virtual ~SurfaceSdlGraphicsManager();
virtual void initEventObserver();
@@ -100,7 +100,7 @@ public:
virtual void beginGFXTransaction();
virtual OSystem::TransactionError endGFXTransaction();
-
+
virtual int16 getHeight();
virtual int16 getWidth();
@@ -132,7 +132,7 @@ public:
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL);
virtual void setCursorPalette(const byte *colors, uint start, uint num);
-
+
#ifdef USE_OSD
virtual void displayMessageOnOSD(const char *msg);
#endif
@@ -149,7 +149,7 @@ protected:
/** Transparency level of the OSD */
uint8 _osdAlpha;
/** When to start the fade out */
- uint32 _osdFadeStartTime;
+ uint32 _osdFadeStartTime;
/** Enum with OSD options */
enum {
kOSDFadeOutDelay = 2 * 1000, /** < Delay before the OSD is faded out (in milliseconds) */
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
index a88c8a8ffe..4a9a219641 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
@@ -28,7 +28,7 @@
#include "backends/platform/symbian/src/SymbianActions.h"
SymbianSdlGraphicsManager::SymbianSdlGraphicsManager(SdlEventSource *sdlEventSource)
- : SdlGraphicsManager(sdlEventSource) {
+ : SurfaceSdlGraphicsManager(sdlEventSource) {
}
int SymbianSdlGraphicsManager::getDefaultGraphicsMode() const {
@@ -47,7 +47,7 @@ const OSystem::GraphicsMode *SymbianSdlGraphicsManager::getSupportedGraphicsMode
// make sure we always go to normal, even if the string might be set wrong!
bool SymbianSdlGraphicsManager::setGraphicsMode(int /*name*/) {
// let parent OSystem_SDL handle it
- return SdlGraphicsManager::setGraphicsMode(getDefaultGraphicsMode());
+ return SurfaceSdlGraphicsManager::setGraphicsMode(getDefaultGraphicsMode());
}
bool SymbianSdlGraphicsManager::hasFeature(OSystem::Feature f) {
@@ -72,7 +72,7 @@ void SymbianSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable)
GUI::Actions::Instance()->beginMapping(enable);
break;
default:
- SdlGraphicsManager::setFeatureState(f, enable);
+ SurfaceSdlGraphicsManager::setFeatureState(f, enable);
}
}
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.h b/backends/graphics/symbiansdl/symbiansdl-graphics.h
index 1bad32a9b6..404ca87a0a 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.h
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.h
@@ -23,9 +23,9 @@
#ifndef BACKENDS_GRAPHICS_SYMBIAN_SDL_H
#define BACKENDS_GRAPHICS_SYMBIAN_SDL_H
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
-class SymbianSdlGraphicsManager : public SdlGraphicsManager {
+class SymbianSdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
SymbianSdlGraphicsManager(SdlEventSource *sdlEventSource);
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp
index 8ba7b5821d..2ca78cedde 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.cpp
+++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp
@@ -43,8 +43,8 @@
#include "backends/platform/wince/CEgui/ItemAction.h"
WINCESdlGraphicsManager::WINCESdlGraphicsManager(SdlEventSource *sdlEventSource)
- : SdlGraphicsManager(sdlEventSource),
- _panelInitialized(false), _noDoubleTapRMB(false),
+ : SurfaceSdlGraphicsManager(sdlEventSource),
+ _panelInitialized(false), _noDoubleTapRMB(false), _noDoubleTapPT(false),
_toolbarHighDrawn(false), _newOrientation(0), _orientationLandscape(0),
_panelVisible(true), _saveActiveToolbar(NAME_MAIN_PANEL), _panelStateForced(false),
_canBeAspectScaled(false), _scalersChanged(false), _saveToolbarState(false),
@@ -149,7 +149,7 @@ void WINCESdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
return;
default:
- SdlGraphicsManager::setFeatureState(f, enable);
+ SurfaceSdlGraphicsManager::setFeatureState(f, enable);
}
}
@@ -160,7 +160,7 @@ bool WINCESdlGraphicsManager::getFeatureState(OSystem::Feature f) {
case OSystem::kFeatureVirtualKeyboard:
return (_panelStateForced);
default:
- return SdlGraphicsManager::getFeatureState(f);
+ return SurfaceSdlGraphicsManager::getFeatureState(f);
}
}
@@ -204,7 +204,7 @@ void WINCESdlGraphicsManager::initSize(uint w, uint h, const Graphics::PixelForm
_videoMode.overlayWidth = w;
_videoMode.overlayHeight = h;
- SdlGraphicsManager::initSize(w, h, format);
+ SurfaceSdlGraphicsManager::initSize(w, h, format);
if (_scalersChanged) {
unloadGFXMode();
@@ -478,6 +478,9 @@ void WINCESdlGraphicsManager::update_game_settings() {
if (ConfMan.hasKey("no_doubletap_rightclick"))
_noDoubleTapRMB = ConfMan.getBool("no_doubletap_rightclick");
+
+ if (ConfMan.hasKey("no_doubletap_paneltoggle"))
+ _noDoubleTapPT = ConfMan.getBool("no_doubletap_paneltoggle");
}
void WINCESdlGraphicsManager::internUpdateScreen() {
@@ -1185,7 +1188,7 @@ void WINCESdlGraphicsManager::setMousePos(int x, int y) {
Graphics::Surface *WINCESdlGraphicsManager::lockScreen() {
// Make sure mouse pointer is not painted over the playfield at the time of locking
undrawMouse();
- return SdlGraphicsManager::lockScreen();
+ return SurfaceSdlGraphicsManager::lockScreen();
}
void WINCESdlGraphicsManager::showOverlay() {
@@ -1293,7 +1296,7 @@ void WINCESdlGraphicsManager::warpMouse(int x, int y) {
}
void WINCESdlGraphicsManager::unlockScreen() {
- SdlGraphicsManager::unlockScreen();
+ SurfaceSdlGraphicsManager::unlockScreen();
}
void WINCESdlGraphicsManager::internDrawMouse() {
@@ -1468,7 +1471,7 @@ void WINCESdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool mous
if (_forceFull || _paletteDirtyEnd)
return;
- SdlGraphicsManager::addDirtyRect(x, y, w, h, false);
+ SurfaceSdlGraphicsManager::addDirtyRect(x, y, w, h, false);
}
void WINCESdlGraphicsManager::swap_panel_visibility() {
@@ -1599,6 +1602,19 @@ void WINCESdlGraphicsManager::swap_mouse_visibility() {
undrawMouse();
}
+void WINCESdlGraphicsManager::init_panel() {
+ _panelVisible = true;
+ if (_panelInitialized) {
+ _toolbarHandler.setVisible(true);
+ _toolbarHandler.setActive(NAME_MAIN_PANEL);
+ }
+}
+
+void WINCESdlGraphicsManager::reset_panel() {
+ _panelVisible = false;
+ _toolbarHandler.setVisible(false);
+}
+
// Smartphone actions
void WINCESdlGraphicsManager::initZones() {
int i;
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h
index 2727bc0d27..92894e0dcd 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.h
+++ b/backends/graphics/wincesdl/wincesdl-graphics.h
@@ -23,7 +23,7 @@
#ifndef BACKENDS_GRAPHICS_WINCE_SDL_H
#define BACKENDS_GRAPHICS_WINCE_SDL_H
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
#include "backends/platform/wince/CEgui/CEGUI.h"
// Internal GUI names
@@ -39,7 +39,7 @@
extern bool _hasSmartphoneResolution;
-class WINCESdlGraphicsManager : public SdlGraphicsManager {
+class WINCESdlGraphicsManager : public SurfaceSdlGraphicsManager {
public:
WINCESdlGraphicsManager(SdlEventSource *sdlEventSource);
@@ -90,6 +90,8 @@ public:
void swap_zoom_up();
void swap_zoom_down();
void swap_mouse_visibility();
+ void init_panel();
+ void reset_panel();
void swap_freeLook();
bool getFreeLookState();
@@ -115,6 +117,7 @@ public:
bool _panelInitialized; // only initialize the toolbar once
bool _noDoubleTapRMB; // disable double tap -> rmb click
+ bool _noDoubleTapPT; // disable double tap for toolbar toggling
CEGUI::ToolbarHandler _toolbarHandler;
diff --git a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
index 001389b1c0..3e5b9940e0 100644
--- a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
+++ b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
@@ -28,7 +28,7 @@ DoubleBufferSDLMixerManager::DoubleBufferSDLMixerManager()
:
_soundMutex(0), _soundCond(0), _soundThread(0),
_soundThreadIsRunning(false), _soundThreadShouldQuit(false) {
-
+
}
DoubleBufferSDLMixerManager::~DoubleBufferSDLMixerManager() {
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index f0b0885dd7..001309a777 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -70,7 +70,7 @@ void SdlMixerManager::init() {
warning("Could not open audio device: %s", SDL_GetError());
_mixer = new Audio::MixerImpl(g_system, desired.freq);
- assert(_mixer);
+ assert(_mixer);
_mixer->setReady(false);
} else {
debug(1, "Output sample rate: %d Hz", _obtained.freq);
@@ -84,8 +84,12 @@ void SdlMixerManager::init() {
if (_obtained.format != desired.format)
warning("SDL mixer sound format: %d differs from desired: %d", _obtained.format, desired.format);
+#ifndef __SYMBIAN32__
+ // The SymbianSdlMixerManager does stereo->mono downmixing,
+ // but otherwise we require stereo output.
if (_obtained.channels != 2)
error("SDL mixer output requires stereo output device");
+#endif
_mixer = new Audio::MixerImpl(g_system, _obtained.freq);
assert(_mixer);
diff --git a/backends/mixer/sdl/sdl-mixer.h b/backends/mixer/sdl/sdl-mixer.h
index 82ffa4f901..6fee26bd1f 100644
--- a/backends/mixer/sdl/sdl-mixer.h
+++ b/backends/mixer/sdl/sdl-mixer.h
@@ -73,7 +73,7 @@ protected:
bool _audioSuspended;
/**
- * Returns the desired audio specification
+ * Returns the desired audio specification
*/
virtual SDL_AudioSpec getAudioSpec(uint32 rate);
diff --git a/backends/mixer/sdl13/sdl13-mixer.cpp b/backends/mixer/sdl13/sdl13-mixer.cpp
new file mode 100644
index 0000000000..84777c8bab
--- /dev/null
+++ b/backends/mixer/sdl13/sdl13-mixer.cpp
@@ -0,0 +1,109 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/scummsys.h"
+
+#if defined(SDL_BACKEND)
+
+#include "backends/mixer/sdl13/sdl13-mixer.h"
+#include "common/debug.h"
+#include "common/system.h"
+#include "common/config-manager.h"
+#include "common/textconsole.h"
+
+#ifdef GP2X
+#define SAMPLES_PER_SEC 11025
+#else
+#define SAMPLES_PER_SEC 22050
+#endif
+//#define SAMPLES_PER_SEC 44100
+
+Sdl13MixerManager::Sdl13MixerManager()
+ :
+ SdlMixerManager(),
+ _device(0) {
+
+}
+
+Sdl13MixerManager::~Sdl13MixerManager() {
+ _mixer->setReady(false);
+
+ SDL_CloseAudioDevice(_device);
+
+ delete _mixer;
+}
+
+void Sdl13MixerManager::init() {
+ // Start SDL Audio subsystem
+ if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) {
+ error("Could not initialize SDL: %s", SDL_GetError());
+ }
+
+ // Get the desired audio specs
+ SDL_AudioSpec desired = getAudioSpec(SAMPLES_PER_SEC);
+
+ // Start SDL audio with the desired specs
+ _device = SDL_OpenAudioDevice(NULL, 0, &desired, &_obtained,
+ SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
+
+ if (_device <= 0) {
+ warning("Could not open audio device: %s", SDL_GetError());
+
+ _mixer = new Audio::MixerImpl(g_system, desired.freq);
+ assert(_mixer);
+ _mixer->setReady(false);
+ } else {
+ debug(1, "Output sample rate: %d Hz", _obtained.freq);
+
+ _mixer = new Audio::MixerImpl(g_system, _obtained.freq);
+ assert(_mixer);
+ _mixer->setReady(true);
+
+ startAudio();
+ }
+}
+
+void Sdl13MixerManager::startAudio() {
+ // Start the sound system
+ SDL_PauseAudioDevice(_device, 0);
+}
+
+void Sdl13MixerManager::suspendAudio() {
+ SDL_CloseAudioDevice(_device);
+ _audioSuspended = true;
+}
+
+int Sdl13MixerManager::resumeAudio() {
+ if (!_audioSuspended)
+ return -2;
+
+ _device = SDL_OpenAudioDevice(NULL, 0, &_obtained, NULL, 0);
+ if (_device <= 0) {
+ return -1;
+ }
+
+ SDL_PauseAudioDevice(_device, 0);
+ _audioSuspended = false;
+ return 0;
+}
+
+#endif
diff --git a/backends/mixer/sdl13/sdl13-mixer.h b/backends/mixer/sdl13/sdl13-mixer.h
new file mode 100644
index 0000000000..9e07ea8673
--- /dev/null
+++ b/backends/mixer/sdl13/sdl13-mixer.h
@@ -0,0 +1,67 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BACKENDS_MIXER_SDL13_H
+#define BACKENDS_MIXER_SDL13_H
+
+#include "backends/mixer/sdl/sdl-mixer.h"
+
+/**
+ * SDL mixer manager. It wraps the actual implementation
+ * of the Audio:Mixer used by the engine, and setups
+ * the SDL audio subsystem and the callback for the
+ * audio mixer implementation.
+ */
+class Sdl13MixerManager : public SdlMixerManager {
+public:
+ Sdl13MixerManager();
+ virtual ~Sdl13MixerManager();
+
+ /**
+ * Initialize and setups the mixer
+ */
+ virtual void init();
+
+ /**
+ * Pauses the audio system
+ */
+ virtual void suspendAudio();
+
+ /**
+ * Resumes the audio system
+ */
+ virtual int resumeAudio();
+
+protected:
+
+ /**
+ * The opened SDL audio device
+ */
+ SDL_AudioDeviceID _device;
+
+ /**
+ * Starts SDL audio
+ */
+ virtual void startAudio();
+};
+
+#endif
diff --git a/backends/mixer/wincesdl/wincesdl-mixer.cpp b/backends/mixer/wincesdl/wincesdl-mixer.cpp
index 36ac310ad9..c7659cb0f5 100644
--- a/backends/mixer/wincesdl/wincesdl-mixer.cpp
+++ b/backends/mixer/wincesdl/wincesdl-mixer.cpp
@@ -131,15 +131,20 @@ uint32 WINCESdlMixerManager::compute_sample_rate() {
ConfMan.setBool("FM_medium_quality", true);
ConfMan.flushToDisk();
}
+ } else {
+ if (!ConfMan.hasKey("FM_high_quality") && !ConfMan.hasKey("FM_medium_quality")) {
+ ConfMan.setBool("FM_high_quality", true);
+ ConfMan.flushToDisk();
+ }
}
// See if the output frequency is forced by the game
if (gameid == "ft" || gameid == "dig" || gameid == "comi" || gameid == "queen" || gameid == "sword" || gameid == "agi")
sampleRate = SAMPLES_PER_SEC_NEW;
else {
- if (ConfMan.hasKey("high_sample_rate") && ConfMan.getBool("high_sample_rate"))
- sampleRate = SAMPLES_PER_SEC_NEW;
- else
+ if (ConfMan.hasKey("high_sample_rate") && !ConfMan.getBool("high_sample_rate"))
sampleRate = SAMPLES_PER_SEC_OLD;
+ else
+ sampleRate = SAMPLES_PER_SEC_NEW;
}
#ifdef USE_VORBIS
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index 3593130bf5..b864da0df5 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -30,17 +30,17 @@ class MutexManager;
/**
* Base class for modular backends.
- *
+ *
* It wraps most functions to their manager equivalent, but not
* all OSystem functions are implemented here.
- *
+ *
* A backend derivated from this class, will need to implement
* these functions on its own:
* OSystem::pollEvent()
* OSystem::getMillis()
* OSystem::delayMillis()
* OSystem::getTimeAndDate()
- *
+ *
* And, it should also initialize all the managers variables
* declared in this class, or override their related functions.
*/
@@ -107,11 +107,11 @@ public:
/** @name Events and Time */
//@{
-
+
virtual Common::HardwareKeySet *getHardwareKeySet() { return 0; }
//@}
-
+
/** @name Mutex handling */
//@{
diff --git a/backends/module.mk b/backends/module.mk
index d1feae4317..63774cc4d0 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -60,14 +60,19 @@ endif
# derive from the SDL backend, and they all need the following files.
ifdef SDL_BACKEND
MODULE_OBJS += \
- audiocd/sdl/sdl-audiocd.o \
events/sdl/sdl-events.o \
- graphics/sdl/sdl-graphics.o \
+ graphics/surfacesdl/surfacesdl-graphics.o \
mixer/doublebuffersdl/doublebuffersdl-mixer.o \
mixer/sdl/sdl-mixer.o \
mutex/sdl/sdl-mutex.o \
plugins/sdl/sdl-provider.o \
timer/sdl/sdl-timer.o
+
+# SDL 1.3 removed audio CD support
+ifndef USE_SDL13
+MODULE_OBJS += \
+ audiocd/sdl/sdl-audiocd.o
+endif
endif
ifdef POSIX
@@ -75,7 +80,8 @@ MODULE_OBJS += \
fs/posix/posix-fs.o \
fs/posix/posix-fs-factory.o \
plugins/posix/posix-provider.o \
- saves/posix/posix-saves.o
+ saves/posix/posix-saves.o \
+ taskbar/unity/unity-taskbar.o
endif
ifdef MACOSX
@@ -89,7 +95,8 @@ MODULE_OBJS += \
fs/windows/windows-fs.o \
fs/windows/windows-fs-factory.o \
midi/windows.o \
- plugins/win32/win32-provider.o
+ plugins/win32/win32-provider.o \
+ taskbar/win32/win32-taskbar.o
endif
ifdef AMIGAOS
@@ -99,6 +106,15 @@ MODULE_OBJS += \
midi/camd.o
endif
+ifdef PLAYSTATION3
+MODULE_OBJS += \
+ fs/posix/posix-fs.o \
+ fs/posix/posix-fs-factory.o \
+ fs/ps3/ps3-fs-factory.o \
+ events/ps3sdl/ps3sdl-events.o \
+ mixer/sdl13/sdl13-mixer.o
+endif
+
ifeq ($(BACKEND),ds)
MODULE_OBJS += \
fs/ds/ds-fs.o \
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 90660cf82c..17c7d4f9cb 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -423,7 +423,7 @@ void OSystem_Android::setFeatureState(Feature f, bool enable) {
showVirtualKeyboard(enable);
break;
case kFeatureCursorPalette:
- _use_mouse_palette = !enable;
+ _use_mouse_palette = enable;
if (!enable)
disableCursorPalette();
break;
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index c4daf24e16..e3b4ef7401 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -22,8 +22,9 @@
#if defined(__ANDROID__)
-// Allow use of stuff in <time.h>
+// Allow use of stuff in <time.h> and abort()
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_abort
// Disable printf override in common/forbidden.h to avoid
// clashes with log.h from the Android SDK.
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index ac709f62b9..c46f9df093 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -124,7 +124,7 @@ bool RoninCDDirectoryNode::getChildren(AbstractFSList &myList, ListMode mode, bo
if (mode == Common::FSNode::kListFilesOnly)
continue;
- myList.push_back(new RoninCDDirectoryNode(newPath+"/"));
+ myList.push_back(new RoninCDDirectoryNode(newPath));
} else {
// Honor the chosen mode
if (mode == Common::FSNode::kListDirectoriesOnly)
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 3faf0185ad..06738a687d 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -234,7 +234,7 @@ void OSystem_Dreamcast::logMessage(LogMessageType::Type type, const char *messag
namespace DC_Flash {
static int syscall_info_flash(int sect, int *info)
{
- return (*(int (**)(int, void*, int, int))0x8c0000b8)(sect,info,0,0);
+ return (*(int (**)(int, void*, int, int))0x8c0000b8)(sect,info,0,0);
}
static int syscall_read_flash(int offs, void *buf, int cnt)
@@ -255,24 +255,24 @@ namespace DC_Flash {
}
return (unsigned short)~n;
}
-
+
static int flash_read_sector(int partition, int sec, unsigned char *dst)
{
int s, r, n, b, bmb, got=0;
int info[2];
char buf[64];
char bm[64];
-
+
if((r = syscall_info_flash(partition, info))<0)
return r;
-
+
if((r = syscall_read_flash(info[0], buf, 64))<0)
return r;
-
+
if(memcmp(buf, "KATANA_FLASH", 12) ||
buf[16] != partition || buf[17] != 0)
return -2;
-
+
n = (info[1]>>6)-1-((info[1] + 0x7fff)>>15);
bmb = n+1;
for(b = 0; b < n; b++) {
diff --git a/backends/platform/dc/plugins.cpp b/backends/platform/dc/plugins.cpp
index fff3c147ec..2942a4f155 100644
--- a/backends/platform/dc/plugins.cpp
+++ b/backends/platform/dc/plugins.cpp
@@ -51,7 +51,7 @@ static void drawPluginProgress(const Common::String &filename)
ta_begin_frame();
draw_solid_quad(80.0, 270.0, 560.0, 300.0,
0xff808080, 0xff808080, 0xff808080, 0xff808080);
- draw_solid_quad(85.0, 275.0, 555.0, 295.0,
+ draw_solid_quad(85.0, 275.0, 555.0, 295.0,
0xff202020, 0xff202020, 0xff202020, 0xff202020);
draw_solid_quad(85.0, 275.0, 85.0+470.0*ffree, 295.0,
fcol, fcol, fcol, fcol);
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 859f2a40ed..339e5df62d 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -185,12 +185,24 @@ static void makeDefIcon(Icon &icon)
icon.load(scummvm_icon, sizeof(scummvm_icon));
}
+static bool sameOrSubdir(const char *dir1, const char *dir2)
+{
+ int l1 = strlen(dir1), l2 = strlen(dir2);
+ if (l1<=l2)
+ return !strcmp(dir1, dir2);
+ else
+ return !memcmp(dir1, dir2, l2);
+}
+
static bool uniqueGame(const char *base, const char *dir,
Common::Language lang, Common::Platform plf,
Game *games, int cnt)
{
while (cnt--)
- if (!strcmp(dir, games->dir) &&
+ if (/*Don't detect the same game in a subdir,
+ this is a workaround for the detector bug in toon... */
+ sameOrSubdir(dir, games->dir) &&
+ /*!strcmp(dir, games->dir) &&*/
!stricmp(base, games->filename_base) &&
lang == games->language &&
plf == games->platform)
@@ -237,19 +249,24 @@ static int findGames(Game *games, int max, bool use_ini)
}
while ((curr_game < max || use_ini) && curr_dir < num_dirs) {
- strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 252);
- dirs[curr_dir].name[251] = '\0';
+ strncpy(dirs[curr_dir].name, dirs[curr_dir].node.getPath().c_str(), 251);
+ dirs[curr_dir].name[250] = '\0';
+ if (!dirs[curr_dir].name[0] ||
+ dirs[curr_dir].name[strlen(dirs[curr_dir].name)-1] != '/')
+ strcat(dirs[curr_dir].name, "/");
dirs[curr_dir].deficon[0] = '\0';
Common::FSList files, fslist;
dirs[curr_dir++].node.getChildren(fslist, Common::FSNode::kListAll);
for (Common::FSList::const_iterator entry = fslist.begin(); entry != fslist.end();
++entry) {
if (entry->isDirectory()) {
- if (!use_ini && num_dirs < MAX_DIR &&
- strcasecmp(entry->getDisplayName().c_str(), "install")) {
+ if (!use_ini && num_dirs < MAX_DIR) {
dirs[num_dirs].node = *entry;
num_dirs++;
}
+ /* Toonstruck detector needs directories to be present too */
+ if(!use_ini)
+ files.push_back(*entry);
} else
if (isIcon(*entry))
strcpy(dirs[curr_dir-1].deficon, entry->getDisplayName().c_str());
diff --git a/backends/platform/dingux/dingux.cpp b/backends/platform/dingux/dingux.cpp
index 1af53aeae1..674c2ea780 100644
--- a/backends/platform/dingux/dingux.cpp
+++ b/backends/platform/dingux/dingux.cpp
@@ -33,7 +33,7 @@ void OSystem_SDL_Dingux::initBackend() {
// Create the graphics manager
if (_graphicsManager == 0) {
- _graphicsManager = new DINGUXSdlGraphicsManager(_eventSource);
+ _graphicsManager = new DINGUXSdlGraphicsManager(_eventSource);
}
// Call parent implementation of this method
diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp
index db9b1c2609..03729c5e6e 100644
--- a/backends/platform/ds/arm9/source/gbampsave.cpp
+++ b/backends/platform/ds/arm9/source/gbampsave.cpp
@@ -52,7 +52,7 @@ Common::OutSaveFile *GBAMPSaveFileManager::openForSaving(const Common::String &f
fileSpec += filename;
// consolePrintf("Opening the file: %s\n", fileSpec.c_str());
-
+
Common::WriteStream *stream = DS::DSFileStream::makeFromPath(fileSpec, true);
// Use a write buffer
stream = Common::wrapBufferedWriteStream(stream, SAVE_BUFFER_SIZE);
@@ -66,7 +66,7 @@ Common::InSaveFile *GBAMPSaveFileManager::openForLoading(const Common::String &f
fileSpec += filename;
// consolePrintf("Opening the file: %s\n", fileSpec.c_str());
-
+
return DS::DSFileStream::makeFromPath(fileSpec, false);
}
diff --git a/backends/platform/gph/devices/gp2x/mmuhack/readme.txt b/backends/platform/gph/devices/gp2x/mmuhack/README
index bea49d7d6d..6db7d81845 100644
--- a/backends/platform/gph/devices/gp2x/mmuhack/readme.txt
+++ b/backends/platform/gph/devices/gp2x/mmuhack/README
@@ -1,3 +1,10 @@
+PLEASE NOTE:
+
+The binary object 'mmuhack.o' is stored in the source tree as it is very awkward to
+build it manually each time and would require the use of 2 toolchains to do so.
+
+Notes on how to rebuild from the included source can be found below.
+
About
-----
@@ -107,4 +114,3 @@ Credits
Original idea/implementation: Squidge (this whole thing is also known as squidgehack)
Kernel module: NK
Documentation: notaz
-
diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp
index 9325ed50bf..4bc567c39d 100644
--- a/backends/platform/iphone/osys_main.cpp
+++ b/backends/platform/iphone/osys_main.cpp
@@ -242,6 +242,18 @@ void OSystem_IPHONE::addSysArchivesToSearchSet(Common::SearchSet &s, int priorit
}
}
+void OSystem_IPHONE::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
void iphone_main(int argc, char *argv[]) {
//OSystem_IPHONE::migrateApp();
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 14325f8090..37896cceeb 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -180,6 +180,8 @@ public:
virtual Common::String getDefaultConfigFileName();
+ virtual void logMessage(LogMessageType::Type type, const char *message);
+
protected:
void internUpdateScreen();
void dirtyFullScreen();
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index dfa8f58cce..354f25a1cf 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -107,7 +107,7 @@ protected:
// 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;
-
+
int _cursorKeycolor;
uint16 _overlayHeight, _overlayWidth;
@@ -199,6 +199,7 @@ public:
virtual Audio::Mixer *getMixer();
virtual void getTimeAndDate(TimeDate &t) const;
virtual void setTimerCallback(TimerProc callback, int interval);
+ virtual void logMessage(LogMessageType::Type type, const char *message);
void rebuildOffscreenGameBuffer(void);
void rebuildOffscreenMouseBuffer(void);
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 69e8da3526..4bc3780fe2 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -870,6 +870,18 @@ void OSystem_N64::getTimeAndDate(TimeDate &t) const {
return;
}
+void OSystem_N64::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
void OSystem_N64::setTimerCallback(TimerProc callback, int interval) {
assert (interval > 0);
diff --git a/backends/platform/n64/osys_n64_events.cpp b/backends/platform/n64/osys_n64_events.cpp
index 2645cfea2a..62f11aef64 100644
--- a/backends/platform/n64/osys_n64_events.cpp
+++ b/backends/platform/n64/osys_n64_events.cpp
@@ -162,7 +162,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) {
uint16 newButtons = 0;
if (_controllerPort >= 0)
newButtons = _ctrlData.c[_controllerPort].buttons; // Read from controller
-
+
uint16 newMouseButtons = 0;
if (_mousePort >= 0)
newMouseButtons = _ctrlData.c[_mousePort].buttons;
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp
index 106cde1699..4690a67c55 100644
--- a/backends/platform/null/null.cpp
+++ b/backends/platform/null/null.cpp
@@ -52,6 +52,8 @@ public:
virtual uint32 getMillis();
virtual void delayMillis(uint msecs);
virtual void getTimeAndDate(TimeDate &t) const {}
+
+ virtual void logMessage(LogMessageType::Type type, const char *message);
};
OSystem_NULL::OSystem_NULL() {
@@ -97,6 +99,18 @@ uint32 OSystem_NULL::getMillis() {
void OSystem_NULL::delayMillis(uint msecs) {
}
+void OSystem_NULL::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
OSystem *OSystem_NULL_create() {
return new OSystem_NULL();
}
diff --git a/backends/platform/openpandora/build/PXML.xml b/backends/platform/openpandora/build/PXML.xml
index f4d2e2a595..a87c49e2b8 100755
--- a/backends/platform/openpandora/build/PXML.xml
+++ b/backends/platform/openpandora/build/PXML.xml
@@ -1,34 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<PXML xmlns="http://openpandora.org/namespaces/PXML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PXML_schema.xsd">
-
- <application id="scummvm.djwillis.0001" appdata="scummvm">
-
- <title lang="en_US">ScummVM</title>
-
- <exec command="./runscummvm.sh"/>
- <icon src="icon/scummvm.png"/>
-
- <previewpics>
- <pic src="icon/preview-pic.png"/>
- </previewpics>
-
- <info name="ScummVM Documentation" type="text/html" src="docs/index.html"/>
-
- <description lang="en_US">Point & click game interpreter.</description>
-
- <author name="DJWillis" website="http://www.scummvm.org/"/>
-
- <version major="1" minor="1" release="1" build="1"/><!--This programs version-->
- <osversion major="1" minor="0" release="0" build="0"/><!--The minimum OS version required-->
-
- <categories>
- <category name="Game"><!--category like "Games", "Graphics", "Internet" etc-->
- <subcategory name="Adventure Games"/><!--subcategory, like "Board Games", "Strategy", "First Person Shooters"-->
- </category>
- </categories>
-
- <clockspeed frequency="500"/><!--Frequency in Hz-->
-
- </application>
-
+ <!-- This is the package, in our case ScummVM -->
+ <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="4" release="0" build="1" type="alpha"/>
+ <!-- Both title and titles are needed -->
+ <title lang="en_US">ScummVM</title>
+ <titles>
+ <title lang="en_US">ScummVM</title>
+ </titles>
+ <descriptions>
+ <description lang="en_US">
+ 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!
+
+ ScummVM supports many adventure games, including LucasArts SCUMM games (such as Monkey Island 1-3, Day of the Tentacle, Sam &amp; Max, ...), many of Sierra's AGI and SCI games (such as King's Quest 1-6, Space Quest 1-5, ...), Discworld 1 and 2, Simon the Sorcerer 1 and 2, Beneath A Steel Sky, Lure of the Temptress, Broken Sword 1 and 2, Flight of the Amazon Queen, Gobliiins 1-3, The Legend of Kyrandia 1-3, many of Humongous Entertainment's children's SCUMM games (including Freddi Fish and Putt Putt games) and many more.
+ </description>
+ </descriptions>
+ <icon src="icon/scummvm.png"/>
+ </package>
+
+ <!-- This is the application, the ScummVM binary -->
+ <application id="scummvm.djwillis.0001" appdata="scummvm">
+ <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="4" release="0" build="1" type="alpha"/>
+ <!-- Both title and titles are needed -->
+ <title lang="en_US">ScummVM</title>
+ <titles>
+ <title lang="en_US">ScummVM</title>
+ </titles>
+ <descriptions>
+ <description lang="en_US">
+ 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!
+
+ ScummVM supports many adventure games, including LucasArts SCUMM games (such as Monkey Island 1-3, Day of the Tentacle, Sam &amp; Max, ...), many of Sierra's AGI and SCI games (such as King's Quest 1-6, Space Quest 1-5, ...), Discworld 1 and 2, Simon the Sorcerer 1 and 2, Beneath A Steel Sky, Lure of the Temptress, Broken Sword 1 and 2, Flight of the Amazon Queen, Gobliiins 1-3, The Legend of Kyrandia 1-3, many of Humongous Entertainment's children's SCUMM games (including Freddi Fish and Putt Putt games) and many more.
+ </description>
+ </descriptions>
+ <licenses>
+ <license name="GPLv2" url="http://www.gnu.org/licenses/gpl-2.0.html" sourcecodeurl="http://www.scummvm.org"/>
+ </licenses>
+ <icon src="icon/scummvm.png"/>
+ <previewpics>
+ <pic src="icon/preview-pic.png"/>
+ </previewpics>
+ <info name="ScummVM Documentation" type="text/html" src="docs/index.html"/>
+ <categories>
+ <category name="Game">
+ <subcategory name="AdventureGame"/>
+ </category>
+ </categories>
+ </application>
</PXML>
diff --git a/backends/platform/openpandora/build/PXML_schema.xsd b/backends/platform/openpandora/build/PXML_schema.xsd
new file mode 100644
index 0000000000..335efe5002
--- /dev/null
+++ b/backends/platform/openpandora/build/PXML_schema.xsd
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema targetNamespace="http://openpandora.org/namespaces/PXML" xmlns="http://openpandora.org/namespaces/PXML" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
+
+
+ <!-- declare some simpleTypes for later usage -->
+
+ <!-- Specify params allows with the 'x11' entry in exec -->
+ <xs:simpleType name="x11Param">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="req" />
+ <xs:enumeration value="stop" />
+ <xs:enumeration value="ignore" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- Specify the valid documentation formats in the <info> block -->
+ <xs:simpleType name="docType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="text/html" />
+ <xs:enumeration value="text/plain" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- Make sure that version numbers only consist of letters, numbers and + as well as - -->
+ <xs:simpleType name="versionNumber">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="1"/>
+ <xs:pattern value="[a-zA-Z0-9+-]*" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- Specify what is valid as release type -->
+ <xs:simpleType name="releaseType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="alpha" />
+ <xs:enumeration value="beta" />
+ <xs:enumeration value="release" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- Specify what makes an email address "valid" -->
+ <xs:simpleType name="emailAddress">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[^@]+@[^\.]+\..+"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- some restrictions regarding file names that are eg not allowed/possible when using sd cards formated as fat32 -->
+ <xs:simpleType name="dumbPath">
+ <xs:restriction base="xs:normalizedString">
+ <xs:pattern value="[^?>:]+" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="dumbFolderName">
+ <xs:restriction base="xs:normalizedString">
+ <xs:pattern value="[^?>:/]+" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- Specify lang codes -->
+ <xs:simpleType name="isoLangcode">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="2"/>
+ <xs:pattern value="[a-zA-Z]{2,3}(_[a-zA-Z0-9]{2,3})*" />
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="isoLangcode_en_US">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="en_US" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- Definition of all allowed categories following the FDO specs -->
+ <xs:simpleType name="fdoCategory">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="AudioVideo|Audio|Video|Development|Education|Game|Graphics|Network|Office|Settings|System|Utility"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!-- Definition of all allowed subcategories following the FDO specs (should be based upon the given main categories, but would significantly increase complexity of the schema) -->
+ <xs:simpleType name="fdoSubCategory">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="Building|Debugger|IDE|GUIDesigner|Profiling|RevisionControl|Translation|Calendar|ContactManagement|Database|Dictionary|Chart|Email|Finance|FlowChart|PDA|ProjectManagement|Presentation|Spreadsheet|WordProcessor|2DGraphics|VectorGraphics|RasterGraphics|3DGraphics|Scanning|OCR|Photography|Publishing|Viewer|TextTools|DesktopSettings|HardwareSettings|Printing|PackageManager|Dialup|InstantMessaging|Chat|IRCClient|FileTransfer|HamRadio|News|P2P|RemoteAccess|Telephony|TelephonyTools|VideoConference|WebBrowser|WebDevelopment|Midi|Mixer|Sequencer|Tuner|TV|AudioVideoEditing|Player|Recorder|DiscBurning|ActionGame|AdventureGame|ArcadeGame|BoardGame|BlocksGame|CardGame|KidsGame|LogicGame|RolePlaying|Simulation|SportsGame|StrategyGame|Art|Construction|Music|Languages|Science|ArtificialIntelligence|Astronomy|Biology|Chemistry|ComputerScience|DataVisualization|Economy|Electricity|Geography|Geology|Geoscience|History|ImageProcessing|Literature|Math|NumericalAnalysis|MedicalSoftware|Physics|Robotics|Sports|ParallelComputing|Amusement|Archiving|Compression|Electronics|Emulator|Engineering|FileTools|FileManager|TerminalEmulator|Filesystem|Monitor|Security|Accessibility|Calculator|Clock|TextEditor|Documentation|Core|KDE|GNOME|GTK|Qt|Motif|Java|ConsoleOnly"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <!-- Create some way to enforce entries to be nonempty -->
+ <xs:simpleType name="nonempty_token">
+ <xs:restriction base="xs:token">
+ <xs:minLength value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="nonempty_string">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="nonempty_normalizedString">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+
+
+ <!-- declare some complexTypes for later usage -->
+
+ <!-- type used for file associations -->
+ <xs:complexType name="association_data">
+ <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+ <xs:attribute name="filetype" use="required" type="nonempty_token" />
+ <xs:attribute name="exec" use="required" type="nonempty_token" />
+ </xs:complexType>
+
+ <!-- type used for author info -->
+ <xs:complexType name="author_data">
+ <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+ <xs:attribute name="website" use="optional" type="xs:anyURI" />
+ <xs:attribute name="email" use="optional" type="emailAddress" />
+ </xs:complexType>
+
+ <!-- type used for version informations (full entry as well as os version) -->
+ <xs:complexType name="app_version_info">
+ <xs:attribute name="major" use="required" type="versionNumber" />
+ <xs:attribute name="minor" use="required" type="versionNumber" />
+ <xs:attribute name="release" use="required" type="versionNumber" />
+ <xs:attribute name="build" use="required" type="versionNumber" />
+ <xs:attribute name="type" use="optional" type="releaseType" />
+ </xs:complexType>
+ <xs:complexType name="os_version_info">
+ <xs:attribute name="major" use="required" type="versionNumber" />
+ <xs:attribute name="minor" use="required" type="versionNumber" />
+ <xs:attribute name="release" use="required" type="versionNumber" />
+ <xs:attribute name="build" use="required" type="versionNumber" />
+ </xs:complexType>
+
+ <!-- type used for exec entries -->
+ <xs:complexType name="exec_params">
+ <xs:attribute name="command" use="required" type="nonempty_token" />
+ <xs:attribute name="arguments" use="optional" type="nonempty_token" />
+ <xs:attribute name="background" use="optional" type="xs:boolean" />
+ <xs:attribute name="startdir" use="optional" type="dumbPath" />
+ <xs:attribute name="standalone" use="optional" type="xs:boolean" />
+ <xs:attribute name="x11" use="optional" type="x11Param" />
+ </xs:complexType>
+
+ <!-- type used for tiles or descriptions, once in 'normal' version, once enforcing usage of en_US -->
+ <xs:complexType name="title_or_description">
+ <xs:simpleContent>
+ <xs:extension base="nonempty_string">
+ <xs:attribute name="lang" use="required" type="isoLangcode" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="title_or_description_enUS">
+ <xs:simpleContent>
+ <xs:extension base="nonempty_string">
+ <xs:attribute name="lang" use="required" type="isoLangcode_en_US" />
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- type used for referencing images -->
+ <xs:complexType name="image_entry">
+ <xs:attribute name="src" use="required" type="dumbPath" />
+ </xs:complexType>
+
+ <!-- type for referencing manuals/readme docs -->
+ <xs:complexType name="information_entry">
+ <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+ <xs:attribute name="type" use="required" type="docType" />
+ <xs:attribute name="src" use="required" type="dumbPath" />
+ </xs:complexType>
+
+ <!-- type used for the license information -->
+ <xs:complexType name="license_info">
+ <xs:attribute name="name" use="required" type="nonempty_normalizedString" />
+ <xs:attribute name="url" use="optional" type="xs:anyURI" />
+ <xs:attribute name="sourcecodeurl" use="optional" type="xs:anyURI" />
+ </xs:complexType>
+
+
+
+ <!-- Combine the symple and complex types into the "real" PXML specification -->
+
+ <xs:element name="PXML">
+ <xs:complexType>
+ <xs:sequence>
+ <!-- specify the <package> tag with info about the complete package, information providable:
+ author
+ version
+ title(s)
+ description(s)
+ icon
+ -->
+ <xs:element name="package" minOccurs="1" maxOccurs="1">
+ <xs:complexType>
+ <xs:all>
+ <!--Author info-->
+ <xs:element name="author" type="author_data" minOccurs="1" />
+ <!--App version info-->
+ <xs:element name="version" type="app_version_info" minOccurs="1" />
+ <!--Title-->
+ <xs:element name="titles" minOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
+ <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Description-->
+ <xs:element name="descriptions" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="title" type="title_or_description_enUS" minOccurs="0" maxOccurs="1" />
+ <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Icon-->
+ <xs:element name="icon" type="image_entry" minOccurs="0" />
+ </xs:all>
+ <!--Package ID-->
+ <xs:attribute name="id" use="required" type="dumbFolderName" />
+ </xs:complexType>
+ </xs:element>
+ <!-- specify the <application> tag with info about a single program
+ executable call
+ author
+ version (of the application)
+ osversion (min OS version supported)
+ title(s) (allowing compatibility to <HF6, too!)
+ description(s) (allowing compatibility to <HF6, too!)
+ icon
+ license
+ preview pictures
+ info/manual/readme entry
+ categories
+ associations to file types
+ clockspeed
+ -->
+ <xs:element name="application" minOccurs="1" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:all>
+ <!--Execution params -->
+ <xs:element name="exec" type="exec_params" minOccurs="1" />
+ <!--Author info-->
+ <xs:element name="author" type="author_data" minOccurs="1" />
+ <!--App version info-->
+ <xs:element name="version" type="app_version_info" minOccurs="1" />
+ <!--OS Version info-->
+ <xs:element name="osversion" type="os_version_info" minOccurs="0" />
+ <!--Title-->
+ <!-- via <titles> element, used for HF6+ -->
+ <xs:element name="titles" minOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="title" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
+ <xs:element name="title" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Title-->
+ <!-- via <title> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
+ <xs:element name="title" type="title_or_description_enUS" minOccurs="0" />
+ <!--Description-->
+ <!-- via <descriptions> element, used for HF6+ -->
+ <xs:element name="descriptions" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="description" type="title_or_description_enUS" minOccurs="1" maxOccurs="1" />
+ <xs:element name="description" type="title_or_description" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Description-->
+ <!-- via <description> element, only one for en_US allowed, meant for backwards compatibility with libpnd from <HF6 -->
+ <xs:element name="description" type="title_or_description_enUS" minOccurs="0" />
+ <!--Icon-->
+ <xs:element name="icon" type="image_entry" minOccurs="0" />
+ <!--License-->
+ <xs:element name="licenses" minOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="license" type="license_info" minOccurs="1" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Preview pics-->
+ <xs:element name="previewpics" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="pic" type="image_entry" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Info (aka manual or readme entry)-->
+ <xs:element name="info" type="information_entry" minOccurs="0" />
+ <!--Categories-->
+ <xs:element name="categories" minOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="category" minOccurs="1" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="subcategory" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="name" type="fdoSubCategory" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="fdoCategory" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Associations-->
+ <xs:element name="associations" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="association" type="association_data" maxOccurs="unbounded" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!--Clockspeed-->
+ <xs:element name="clockspeed" minOccurs="0">
+ <xs:complexType>
+ <xs:attribute name="frequency" use="required" type="xs:positiveInteger" />
+ </xs:complexType>
+ </xs:element>
+ </xs:all>
+ <!--AppID-->
+ <xs:attribute name="id" use="required" type="dumbFolderName" />
+ <xs:attribute name="appdata" use="optional" type="dumbFolderName" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema> \ No newline at end of file
diff --git a/backends/platform/openpandora/build/pnd_make.sh b/backends/platform/openpandora/build/pnd_make.sh
index b19de87bb4..0c03e8154d 100755
--- a/backends/platform/openpandora/build/pnd_make.sh
+++ b/backends/platform/openpandora/build/pnd_make.sh
@@ -1,65 +1,321 @@
-#!/bin/sh
+#!/bin/bash
+#
+# pnd_make.sh
+#
+# This script is meant to ease generation of a pnd file. Please consult the output
+# when running --help for a list of available parameters and an explaination of
+# those.
+#
+# Required tools when running the script:
+# bash
+# echo, cat, mv, rm
+# mkisofs or mksquashfs (the latter when using the -c param!)
+# xmllint (optional, only for validation of the PXML against the schema)
-######adjust path of genpxml.sh if you want to use that "feture"#####
-TEMP=`getopt -o p:d:x:i:c -- "$@"`
+PXML_schema=$(dirname ${0})/PXML_schema.xsd
+GENPXML_PATH=$(dirname ${0})/genpxml.sh
-if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+# useful functions ...
+black='\E[30m'
+red='\E[31m'
+green='\E[32m'
+yellow='\E[33m'
+blue='\E[34m'
+magenta='\E[35m'
+cyan='\E[36m'
+white='\E[37m'
-eval set -- "$TEMP"
-while true ; do
- case "$1" in
- -p) echo "PNDNAME set to $2" ;PNDNAME=$2;shift 2;;
- -d) echo "FOLDER set to $2" ;FOLDER=$2;shift 2 ;;
- -x) echo "PXML set to $2" ;PXML=$2;shift 2 ;;
- -i) echo "ICON set to $2" ;ICON=$2;shift 2 ;;
- -c) echo "-c set, will create compressed squasfs image instead of iso $2" ;SQUASH=1;shift 1 ;;
- --) shift ; break ;;
- *) echo "Error while parsing arguments! $2" ; exit 1 ;;
- esac
+check_for_tool()
+{
+ which $1 &> /dev/null
+ if [ "$?" -ne "0" ];
+ then
+ cecho "ERROR: Could not find the program '$1'. Please make sure
+that it is available in your PATH since it is required to complete your request." $red
+ exit 1
+ fi
+}
+
+cecho () # Color-echo. Argument $1 = message, Argument $2 = color
+{
+ local default_msg="No message passed." # Doesn't really need to be a local variable.
+ message=${1:-$default_msg} # Defaults to default message.
+ color=${2:-$black} # Defaults to black, if not specified.
+ echo -e "$color$message"
+ tput sgr0 # Reset to normal.
+ return
+}
+
+
+print_help()
+{
+ cat << EOSTREAM
+pnd_make.sh - A script to package "something" into a PND.
+
+Usage:
+ $(basename ${0}) {--directory|-d} <folder> {--pndname|-p} <file> [{--compress-squashfs|-c}]
+ [{--genpxml} <file>] [{--icon|-i} <file>] [{--pxml|-x} <file>]
+ [{--schema|-s} <file>] [{--help|-h}]
+
+
+Switches:
+ --compress-squashfs / -c Define whether or not the pnd should be compressed using
+ squashfs. If this parameter is selected, a compressed pnd
+ will be created.
+
+ --directory / -d Sets the folder that is to be used for the resulting pnd
+ to <folder>. This option is mandatory for the script to
+ function correctly.
+
+ --genpxml Sets the script used for generating a PXML file (if none
+ is available already) to <file>. Please make sure to either
+ provide a full path or prefix a script in the current folder
+ with './' so that the script can actually be executed. If
+ this variable is not specified, $GENPXML_PATH
+ will be used.
+
+ --help / -h Displays this help text.
+
+ --icon / -i Sets the icon that will be appended in the pnd to <file>.
+
+ --pndname / -p Sets the output filename of the resulting pnd to <file>.
+ This option is mandatory for the script to function
+ correctly.
+
+ --pxml / -x Sets the PXML file that is to be used to <file>. If you
+ neither provide a PXML file or set this entry to 'guess',
+ an existing 'PXML.xml' in your selected '--directory'
+ will be used, or the script $GENPXML_PATH
+ will be called to try to generate a basic PXML file for you.
+
+ --schema / -s Sets the schema file, that is to be used for validation,
+ to <file. If this is not defined, the script will try to
+ use the file '$PXML_schema'. If this fails,
+ a warning is issued.
+
+If you select the option to create a compressed squashfs, a version >=4.0 of squashfs
+is required to be available in your PATH.
+EOSTREAM
+}
+
+
+# Parse command line parameters
+while [ "${1}" != "" ]; do
+ if [ "${1}" = "--compress-squashfs" ] || [ "${1}" = "-c" ];
+ then
+ SQUASH=1
+ shift 1
+ elif [ "${1}" = "--directory" ] || [ "${1}" = "-d" ];
+ then
+ FOLDER=$2
+ shift 2
+ elif [ "${1}" = "--genpxml" ];
+ then
+ GENPXML_PATH=$2
+ shift 2
+ elif [ "${1}" = "--help" ] || [ "${1}" = "-h" ];
+ then
+ print_help
+ exit 0
+ elif [ "${1}" = "--icon" ] || [ "${1}" = "-i" ];
+ then
+ ICON=$2
+ shift 2
+ elif [ "${1}" = "--pndname" ] || [ "${1}" = "-p" ];
+ then
+ PNDNAME=$2
+ shift 2
+ elif [ "${1}" = "--pxml" ] || [ "${1}" = "-x" ];
+ then
+ PXML=$2
+ shift 2
+ elif [ "${1}" = "--schema" ] || [ "${1}" = "-f" ]
+ then
+ PXML_schema=$2
+ shift 2
+ else
+ cecho "ERROR: '$1' is not a known argument. Printing --help and aborting." $red
+ print_help
+ exit 1
+ fi
done
-rnd=$RANDOM; # random number for genpxml and index$rnd.xml
-#generate pxml if guess or empty
-if [ ! $PXML ] || [ $PXML = "guess" ] && [ $PNDNAME ] && [ $FOLDER ]; then
- PXMLtxt=$(/home/user/libpnd/pandora-libraries/testdata/scripts/genpxml.sh $FOLDER $ICON)
- PXML=$FOLDER/PXML.xml
- echo "$PXMLtxt" > $FOLDER/PXML.xml
+# Generate a PXML if the param is set to Guess or it is empty.
+if [ ! $PXML ] || [ $PXML = "guess" ] && [ $PNDNAME ] && [ $FOLDER ];
+then
+ if [ -f $FOLDER/PXML.xml ]; # use the already existing PXML.xml file if there is one...
+ then
+ PXML=$FOLDER/PXML.xml
+ PXML_ALREADY_EXISTING="true"
+ else
+ if [ -f $GENPXML_PATH ];
+ then
+ $GENPXML_PATH --src $FOLDER --dest $FOLDER --author $USER
+ if [ -f $FOLDER/PXML.xml ];
+ then
+ PXML_GENERATED="true"
+ else
+ cecho "ERROR: Generating a PXML file using '$GENPXML_PATH' failed.
+Please generate a PXML file manually." $red
+ exit 1
+ fi
+ else
+ cecho "ERROR: Could not find '$GENPXML_PATH' for generating a PXML file." $red
+ exit 1
+ fi
+ fi
fi
-#check arguments
-if [ ! $PNDNAME ] || [ ! $FOLDER ] || [ ! $PXML ]; then
- echo " Usage: pnd_make.sh -p your.pnd -d folder/containing/your/app/ -x
- your.pxml (or \"guess\" to try to generate it from the folder) -i icon.png"
+
+# Probe if required variables were set
+echo -e
+cecho "Checking if all required variables were set." $green
+if [ ! $PNDNAME ] || [ ! $FOLDER ] || [ ! $PXML ];
+then
+ echo -e
+ cecho "ERROR: Not all required options were set! Please see the --help information below." $red
+ echo -e
+ print_help
exit 1
+else
+ echo "PNDNAME set to '$PNDNAME'."
+fi
+# Check if the selected folder actually exists
+if [ ! -d $FOLDER ];
+then
+ echo -e
+ cecho "ERROR: '$FOLDER' doesn't exist or is not a folder." $red
+ exit 1
+else
+ echo "FOLDER set to '$FOLDER'."
+fi
+# Check if the selected PXML file actually exists
+if [ ! -f $PXML ];
+then
+ echo -e
+ cecho "ERROR: '$PXML' doesn't exist or is not a file." $red
+ exit 1
+else
+ if [ $PXML_ALREADY_EXISTING ];
+ then
+ echo "You have not explicitly specified a PXML to use, but an existing file was
+found. Will be using this one."
+ elif [ $PXML_GENERATED ];
+ then
+ echo "A PXML file was generated for you using '$GENPXML_PATH'. This file will
+not be removed at the end of this script because you might want to review it, adjust
+single entries and rerun the script to generate a pnd with a PXML file with all the
+information you want to have listed."
+ fi
+ echo "PXML set to '$PXML'."
fi
-if [ ! -d $FOLDER ]; then echo "$FOLDER doesnt exist"; exit 1; fi #check if folder actually exists
-if [ ! -f $PXML ]; then echo "$PXML doesnt exist"; exit 1; fi #check if pxml actually exists
-#make iso from folder
-if [ ! $SQUASH ]; then
- mkisofs -o $PNDNAME.iso -R $FOLDER
+# Print the other variables:
+if [ $ICON ];
+then
+ if [ ! -f $ICON ]
+ then
+ cecho "WARNING: '$ICON' doesn't exist, will not append the selected icon to the pnd." $red
+ else
+ echo "ICON set to '$ICON'."
+ USE_ICON="true"
+ fi
+fi
+if [ $SQUASH ];
+then
+ echo "Will use a squashfs for '$PNDNAME'."
+fi
+
+
+# Validate the PXML file (if xmllint is available)
+# Errors and problems in this section will be shown but are not fatal.
+echo -e
+cecho "Trying to validate '$PXML' now. Will be using '$PXML_schema' to do so." $green
+which xmllint &> /dev/null
+if [ "$?" -ne "0" ];
+then
+ VALIDATED=false
+ cecho "WARNING: Could not find 'xmllint'. Validity check of '$PXML' is not possible!" $red
else
- if [ $(mksquashfs -version | awk '{if ($3 >= 4) print 1}') = 1 ]; then
- echo "your squashfs version is older then version 4, please upgrade to 4.0 or later"
+ if [ ! -f "$PXML_schema" ];
+ then
+ VALIDATED=false
+ cecho "WARNING: Could not find '$PXML_schema'. If you want to validate your
+PXML file please make sure to provide a schema using the --schema option." $red
+ else
+ xmllint --noout --schema $PXML_schema $PXML
+ if [ "$?" -ne "0" ]; then VALIDATED=false; else VALIDATED=true; fi
+ fi
+fi
+# Print some message at the end about the validation in case the user missed the output above
+if [ $VALIDATED = "false" ]
+then
+ cecho "WARNING: Could not successfully validate '$PXML'. Please check the output
+above. This does not mean that your pnd will be broken. Either you are not following the strict
+syntax required for validation or you don't have all files/programs required for validating." $red
+else
+ cecho "Your file '$PXML' was validated successfully. The resulting pnd should
+work nicely with libpnd." $green
+fi
+
+
+# Make iso from folder
+echo -e
+cecho "Creating an iso file based on '$FOLDER'." $green
+if [ $SQUASH ];
+then
+ check_for_tool mksquashfs
+ if [ $(mksquashfs -version | awk 'BEGIN{r=0} $3>=4{r=1} END{print r}') -eq 0 ];
+ then
+ cecho "ERROR: Your squashfs version is older then version 4, please upgrade to 4.0 or later" $red
exit 1
fi
- mksquashfs -no-recovery -nopad $FOLDER $PNDNAME.iso
+ mksquashfs $FOLDER $PNDNAME.iso -nopad -no-recovery
+else
+ check_for_tool mkisofs
+ mkisofs -o $PNDNAME.iso -R $FOLDER
+fi
+
+# Check that the iso file was actually created before continuing
+if [ ! -f $PNDNAME.iso ];
+then
+ cecho "ERROR: The temporary file '$PNDNAME.iso' could not be created.
+Please check the output above for any errors and retry after fixing them. Aborting." $red
+ exit 1
fi
-#append pxml to iso
-cat $PNDNAME.iso $PXML > $PNDNAME
+
+
+# Append pxml to iso
+echo -e
+cecho "Appending '$PXML' to the created iso file." $green
+cat $PNDNAME.iso $PXML > $PNDNAME
rm $PNDNAME.iso #cleanup
-#append icon if specified
-if [ $ICON ]; then # check if we want to add an icon
- if [ ! -f $ICON ]; then #does the icon actually exist?
- echo "$ICON doesnt exist"
- else # yes
+
+# Append icon if specified and available
+if [ $USE_ICON ];
+then
+ echo -e
+ cecho "Appending the icon '$ICON' to the pnd." $green
mv $PNDNAME $PNDNAME.tmp
cat $PNDNAME.tmp $ICON > $PNDNAME # append icon
rm $PNDNAME.tmp #cleanup
- fi
fi
-if [ $PXML = "guess" ];then rm $FOLDER/PXML.xml; fi #cleanup
+
+# Final message
+echo -e
+if [ -f $PNDNAME ];
+then
+ cecho "Successfully finished creating the pnd '$PNDNAME'." $green
+else
+ cecho "There seems to have been a problem and '$PNDNAME' was not created. Please check
+the output above for any error messages. A possible cause for this is that there was
+not enough space available." $red
+ exit 1
+fi
+
+
+#if [ $PXML = "guess" ];then rm $FOLDER/PXML.xml; fi #cleanup
diff --git a/backends/platform/openpandora/build/runscummvm.sh b/backends/platform/openpandora/build/runscummvm.sh
index 48d24a2b81..c641235219 100755
--- a/backends/platform/openpandora/build/runscummvm.sh
+++ b/backends/platform/openpandora/build/runscummvm.sh
@@ -11,4 +11,5 @@ mkdir saves
mkdir runtime
cd runtime
-../bin/scummvm --fullscreen --gfx-mode=2x --config=../scummvm.config
+../bin/scummvm --fullscreen --gfx-mode=2x --config=../scummvm.config --themepath=../data
+
diff --git a/backends/platform/openpandora/op-bundle.mk b/backends/platform/openpandora/op-bundle.mk
index 163f4711ce..089430f43c 100755
--- a/backends/platform/openpandora/op-bundle.mk
+++ b/backends/platform/openpandora/op-bundle.mk
@@ -75,11 +75,10 @@ endif
$(CP) $(libloc)/../arm-angstrom-linux-gnueabi/usr/lib/libFLAC.so.8.2.0 $(bundle_name)/scummvm/lib/libFLAC.so.8
- $(srcdir)/backends/platform/openpandora/build/pnd_make.sh -p $(bundle_name).pnd -d $(bundle_name)/scummvm -x $(bundle_name)/scummvm/data/PXML.xml -i $(bundle_name)/scummvm/icon/scummvm.png
+ $(srcdir)/backends/platform/openpandora/build/pnd_make.sh -p $(bundle_name).pnd -c -d $(bundle_name)/scummvm -x $(bundle_name)/scummvm/data/PXML.xml -i $(bundle_name)/scummvm/icon/scummvm.png
$(CP) $(srcdir)/backends/platform/openpandora/build/README-PND.txt $(bundle_name)
tar -cvjf $(bundle_name)-pnd.tar.bz2 $(bundle_name).pnd $(bundle_name)/README-PND.txt
rm -R ./$(bundle_name)
-# rm $(bundle_name).pnd
.PHONY: op-bundle op-pnd
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index d3acd06089..c75d7493a2 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -66,7 +66,7 @@
#include "engines/engine.h"
-#include "graphics/font.h"
+#include "graphics/fonts/bdf.h"
#include "graphics/surface.h"
#include "icon.h"
@@ -96,7 +96,7 @@ OSystem_PS2 *g_systemPs2;
#define FOREVER 2147483647
namespace Graphics {
- extern const NewFont g_sysfont;
+ extern const BdfFont g_sysfont;
};
PS2Device detectBootPath(const char *elfPath, char *bootPath);
diff --git a/backends/platform/psp/cursor.cpp b/backends/platform/psp/cursor.cpp
index 18a61f3df4..b295507de1 100644
--- a/backends/platform/psp/cursor.cpp
+++ b/backends/platform/psp/cursor.cpp
@@ -324,18 +324,18 @@ inline void Cursor::setRendererModePalettized(bool palettized) {
_renderer.setAlphaReverse(false);
_renderer.setColorTest(false);
} else { // 16 bits, no palette
- // Color test is an easy way for the hardware to make our keycolor
+ // Color test is an easy way for the hardware to make our keycolor
// transparent.
- _renderer.setColorTest(true);
-
+ _renderer.setColorTest(true);
+
// Alpha blending is not strictly required, but makes the cursor look
// much better
_renderer.setAlphaBlending(true);
-
+
// Pixel formats without alpha (5650) are considered to have their alpha set.
// Since pixel formats with alpha don't have their alpha bits set, we reverse
// the alpha format for them so that 0 alpha is 1.
- if (_buffer.getPixelFormat() != PSPPixelFormat::Type_5650)
+ if (_buffer.getPixelFormat() != PSPPixelFormat::Type_5650)
_renderer.setAlphaReverse(true);
else
_renderer.setAlphaReverse(false);
diff --git a/backends/platform/psp/display_client.cpp b/backends/platform/psp/display_client.cpp
index 14b96d9cae..bc29166895 100644
--- a/backends/platform/psp/display_client.cpp
+++ b/backends/platform/psp/display_client.cpp
@@ -389,31 +389,31 @@ void Buffer::copyToArray(byte *dst, int pitch) {
void Buffer::setSize(uint32 width, uint32 height, HowToSize textureOrSource/*=kSizeByTextureSize*/) {
DEBUG_ENTER_FUNC();
-
+
// We can size the buffer either by texture size (multiple of 2^n) or source size.
// At higher sizes, increasing the texture size to 2^n is a waste of space. At these sizes kSizeBySourceSize should be used.
-
+
_sourceSize.width = width;
_sourceSize.height = height;
_textureSize.width = scaleUpToPowerOfTwo(width); // can only scale up to 512
_textureSize.height = scaleUpToPowerOfTwo(height);
-
+
if (textureOrSource == kSizeByTextureSize) {
_width = _textureSize.width;
_height = _textureSize.height;
} else { // sizeBySourceSize
_width = _sourceSize.width;
_height = _sourceSize.height;
-
- // adjust allocated width to be divisible by 32.
+
+ // adjust allocated width to be divisible by 32.
// The GU can only handle multiples of 16 bytes. A 4 bit image x 32 will give us 16 bytes
// We don't necessarily know the depth of the pixels here. So just make it divisible by 32.
uint32 checkDiv = _width & 31;
if (checkDiv)
_width += 32 - checkDiv;
}
-
+
PSP_DEBUG_PRINT("width[%u], height[%u], texW[%u], texH[%u], sourceW[%d], sourceH[%d] %s\n", _width, _height, _textureSize.width, _textureSize.height, _sourceSize.width, _sourceSize.height, textureOrSource ? "size by source" : "size by texture");
}
@@ -558,10 +558,10 @@ void GuRenderer::render() {
// Loop over patches of 512x512 pixel textures and draw them
for (uint32 j = 0; j < _buffer->getSourceHeight(); j += 512) {
_textureLoadOffset.y = j;
-
+
for (uint32 i = 0; i < _buffer->getSourceWidth(); i += 512) {
_textureLoadOffset.x = i;
-
+
guLoadTexture();
Vertex *vertices = guGetVertices();
fillVertices(vertices);
@@ -573,8 +573,8 @@ void GuRenderer::render() {
inline void GuRenderer::guProgramDrawBehavior() {
DEBUG_ENTER_FUNC();
- PSP_DEBUG_PRINT("blending[%s] colorTest[%s] reverseAlpha[%s] keyColor[%u]\n",
- _blending ? "on" : "off", _colorTest ? "on" : "off",
+ PSP_DEBUG_PRINT("blending[%s] colorTest[%s] reverseAlpha[%s] keyColor[%u]\n",
+ _blending ? "on" : "off", _colorTest ? "on" : "off",
_alphaReverse ? "on" : "off", _keyColor);
if (_blending) {
@@ -591,7 +591,7 @@ inline void GuRenderer::guProgramDrawBehavior() {
if (_colorTest) {
sceGuEnable(GU_COLOR_TEST);
sceGuColorFunc(GU_NOTEQUAL, // show only colors not equal to this color
- _keyColor,
+ _keyColor,
0x00ffffff); // match everything but alpha
} else
sceGuDisable(GU_COLOR_TEST);
@@ -663,10 +663,10 @@ inline void GuRenderer::guLoadTexture() {
byte *startPoint = _buffer->getPixels();
if (_textureLoadOffset.x)
startPoint += _buffer->_pixelFormat.pixelsToBytes(_textureLoadOffset.x);
- if (_textureLoadOffset.y)
+ if (_textureLoadOffset.y)
startPoint += _buffer->getWidthInBytes() * _textureLoadOffset.y;
-
- sceGuTexImage(0,
+
+ sceGuTexImage(0,
_buffer->getTextureWidth(), // texture width (must be power of 2)
_buffer->getTextureHeight(), // texture height (must be power of 2)
_buffer->getWidth(), // width of a line of the image (to get to the next line)
@@ -698,7 +698,7 @@ void GuRenderer::fillVertices(Vertex *vertices) {
// These coordinates describe an area within the texture. ie. we already loaded a square of texture,
// now the coordinates within it are 0 to the edge of the area of the texture we want to draw
float textureStartX = textureFix + _offsetInBuffer.x;
- float textureStartY = textureFix + _offsetInBuffer.y;
+ float textureStartY = textureFix + _offsetInBuffer.y;
int textureLeftX = _drawSize.width - _textureLoadOffset.x;
if (textureLeftX > 512)
@@ -720,7 +720,7 @@ void GuRenderer::fillVertices(Vertex *vertices) {
float imageStartY = gapY + scaledOffsetOnScreenY + (scaleSourceToOutput(false, stretch(false, _textureLoadOffset.y)));
float imageEndX, imageEndY;
-
+
imageEndX = imageStartX + scaleSourceToOutput(true, stretch(true, textureLeftX));
imageEndY = imageStartY + scaleSourceToOutput(false, stretch(false, textureLeftY));
diff --git a/backends/platform/psp/display_client.h b/backends/platform/psp/display_client.h
index f190658a26..e384bfb82b 100644
--- a/backends/platform/psp/display_client.h
+++ b/backends/platform/psp/display_client.h
@@ -171,12 +171,12 @@ protected:
class GuRenderer {
public:
// Constructors
- GuRenderer() : _useGlobalScaler(false), _buffer(0), _palette(0),
- _blending(false), _alphaReverse(false), _colorTest(false),
+ GuRenderer() : _useGlobalScaler(false), _buffer(0), _palette(0),
+ _blending(false), _alphaReverse(false), _colorTest(false),
_keyColor(0), _fullScreen(false), _stretch(false), _stretchX(1.0f), _stretchY(1.0f) {}
- GuRenderer(Buffer *buffer, Palette *palette) :
- _useGlobalScaler(false), _buffer(buffer), _palette(palette),
- _blending(false), _alphaReverse(false), _colorTest(false),
+ GuRenderer(Buffer *buffer, Palette *palette) :
+ _useGlobalScaler(false), _buffer(buffer), _palette(palette),
+ _blending(false), _alphaReverse(false), _colorTest(false),
_keyColor(0), _fullScreen(false), _stretch(false), _stretchX(1.0f), _stretchY(1.0f) {}
static void setDisplayManager(DisplayManager *dm) { _displayManager = dm; } // Called by the Display Manager
diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp
index 899b79727f..422805714f 100644
--- a/backends/platform/psp/display_manager.cpp
+++ b/backends/platform/psp/display_manager.cpp
@@ -62,7 +62,9 @@ const OSystem::GraphicsMode DisplayManager::_supportedModes[] = {
// Class VramAllocator -----------------------------------
+namespace Common {
DECLARE_SINGLETON(VramAllocator);
+}
//#define __PSP_DEBUG_FUNCS__ /* For debugging the stack */
//#define __PSP_DEBUG_PRINT__
@@ -299,7 +301,7 @@ void DisplayManager::init() {
#endif
// Init overlay since we never change the size
- _overlay->deallocate();
+ _overlay->deallocate();
_overlay->setBytesPerPixel(sizeof(OverlayColor));
_overlay->setSize(PSP_SCREEN_WIDTH, PSP_SCREEN_HEIGHT);
_overlay->allocate();
@@ -432,13 +434,13 @@ bool DisplayManager::renderAll() {
_screen->render();
_screen->setClean(); // clean out dirty bit
-
+
if (_imageViewer->isVisible())
_imageViewer->render();
_imageViewer->setClean();
if (_overlay->isVisible())
- _overlay->render();
+ _overlay->render();
_overlay->setClean();
if (_cursor->isVisible())
@@ -448,7 +450,7 @@ bool DisplayManager::renderAll() {
if (_keyboard->isVisible())
_keyboard->render();
_keyboard->setClean();
-
+
_masterGuRenderer.guPostRender();
return true; // rendered successfully
diff --git a/backends/platform/psp/display_manager.h b/backends/platform/psp/display_manager.h
index 5176bee3fe..38c43d60a3 100644
--- a/backends/platform/psp/display_manager.h
+++ b/backends/platform/psp/display_manager.h
@@ -72,7 +72,7 @@ private:
*/
class MasterGuRenderer : public PspThreadable {
public:
- MasterGuRenderer() : _lastRenderTime(0), _renderFinished(true),
+ MasterGuRenderer() : _lastRenderTime(0), _renderFinished(true),
_renderSema(1, 1), _callbackId(-1) {}
void guInit();
void guPreRender();
@@ -108,7 +108,7 @@ public:
KEEP_ASPECT_RATIO,
STRETCHED_FULL_SCREEN
};
- DisplayManager() : _screen(0), _cursor(0), _overlay(0), _keyboard(0),
+ DisplayManager() : _screen(0), _cursor(0), _overlay(0), _keyboard(0),
_imageViewer(0), _lastUpdateTime(0), _graphicsMode(0) {}
~DisplayManager();
@@ -127,7 +127,7 @@ public:
void setOverlay(Overlay *overlay) { _overlay = overlay; }
void setKeyboard(PSPKeyboard *keyboard) { _keyboard = keyboard; }
void setImageViewer(ImageViewer *imageViewer) { _imageViewer = imageViewer; }
-
+
void setSizeAndPixelFormat(uint width, uint height, const Graphics::PixelFormat *format);
// Getters
diff --git a/backends/platform/psp/dummy.cpp b/backends/platform/psp/dummy.cpp
index 86ab30b3e2..748ac8cbf3 100644
--- a/backends/platform/psp/dummy.cpp
+++ b/backends/platform/psp/dummy.cpp
@@ -26,31 +26,31 @@
#include <stdio.h>
#include <png.h>
#include <sys/socket.h>
-
+
//void userWriteFn(png_structp png_ptr, png_bytep data, png_size_t length) {
//}
//void userFlushFn(png_structp png_ptr) {
//}
-
+
// Dummy functions are pulled in so that we don't need to build the plugins with certain libs
-
+
int dummyFunc() {
// For Broken Sword 2.5
volatile int i;
i = clock();
rename("dummyA", "dummyB");
-
+
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
png_set_write_fn(png_ptr, NULL, NULL, NULL);
png_infop info_ptr;
png_write_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
png_destroy_write_struct(&png_ptr, &info_ptr);
-
+
// For lua's usage of libc: very heavy usage so it pulls in sockets?
setsockopt(0, 0, 0, NULL, 0);
getsockopt(0, 0, 0, NULL, NULL);
-
+
return i;
} \ No newline at end of file
diff --git a/backends/platform/psp/image_viewer.cpp b/backends/platform/psp/image_viewer.cpp
index 97d582b63a..1ed7698bc8 100644
--- a/backends/platform/psp/image_viewer.cpp
+++ b/backends/platform/psp/image_viewer.cpp
@@ -34,45 +34,45 @@
#include "backends/platform/psp/input.h"
#include "backends/platform/psp/display_manager.h"
#include "backends/platform/psp/display_client.h"
-#include "backends/platform/psp/image_viewer.h"
-#include "backends/platform/psp/png_loader.h"
+#include "backends/platform/psp/image_viewer.h"
+#include "backends/platform/psp/png_loader.h"
#include "backends/platform/psp/thread.h"
static const char *imageName = "psp_image";
#define PSP_SCREEN_HEIGHT 272
#define PSP_SCREEN_WIDTH 480
-
+
bool ImageViewer::load(int imageNum) {
if (_init)
unload();
-
+
// build string
char number[8];
sprintf(number, "%d", imageNum);
- Common::String imageNameStr(imageName);
+ Common::String imageNameStr(imageName);
Common::String specificImageName = imageNameStr + Common::String(number) + Common::String(".png");
-
+
// search for image file
if (!SearchMan.hasFile(specificImageName)) {
PSP_ERROR("file %s not found\n", specificImageName.c_str());
return false;
}
-
+
Common::ScopedPtr<Common::SeekableReadStream> file(SearchMan.createReadStreamForMember(specificImageName));
-
+
_buffer = new Buffer();
_palette = new Palette();
_renderer = new GuRenderer();
-
+
assert(_buffer);
assert(_palette);
assert(_renderer);
-
+
// Load a PNG into our buffer and palette. Size it by the actual size of the image
PngLoader image(file, *_buffer, *_palette, Buffer::kSizeBySourceSize);
-
+
PngLoader::Status status = image.allocate(); // allocate the buffers for the file
-
+
char error[100];
if (status == PngLoader::BAD_FILE) {
sprintf(error, "Cannot display %s. Not a proper PNG file", specificImageName.c_str());
@@ -89,29 +89,29 @@ bool ImageViewer::load(int imageNum) {
if (!image.load()) {
sprintf(error, "Cannot display %s. Not a proper PNG file", specificImageName.c_str());
GUI::TimedMessageDialog dialog(error, 4000);
- dialog.runModal();
+ dialog.runModal();
return false;
}
-
+
setConstantRendererOptions();
setFullScreenImageParams(); // prepare renderer for full screen view
-
+
_imageNum = imageNum; // now we can say we displayed this image
_init = true;
-
+
return true;
}
void ImageViewer::setConstantRendererOptions() {
_renderer->setBuffer(_buffer);
_renderer->setPalette(_palette);
-
+
_renderer->setAlphaBlending(false);
_renderer->setColorTest(false);
_renderer->setUseGlobalScaler(false);
_renderer->setStretch(true);
_renderer->setOffsetInBuffer(0, 0);
- _renderer->setDrawWholeBuffer();
+ _renderer->setDrawWholeBuffer();
}
void ImageViewer::unload() {
@@ -130,32 +130,32 @@ void ImageViewer::resetOnEngineDone() {
void ImageViewer::setVisible(bool visible) {
DEBUG_ENTER_FUNC();
-
+
if (_visible == visible)
return;
-
+
// from here on, we're making the loader visible
if (visible && g_engine) { // we can only run the image viewer when there's an engine
g_engine->pauseEngine(true);
-
+
load(_imageNum ? _imageNum : 1); // load the 1st image or the current
}
if (visible && _init) { // we managed to load
_visible = true;
setViewerButtons(true);
-
+
{ // so dialog goes out of scope, destroying all allocations
GUI::TimedMessageDialog dialog("Image Viewer", 1000);
dialog.runModal();
}
-
+
runLoop(); // only listen to viewer events
} else { // we were asked to make invisible or failed to load
_visible = false;
unload();
setViewerButtons(false);
-
+
if (g_engine && g_engine->isPaused())
g_engine->pauseEngine(false);
}
@@ -175,7 +175,7 @@ void ImageViewer::runLoop() {
void ImageViewer::setViewerButtons(bool active) {
_inputHandler->setImageViewerMode(active);
-}
+}
void ImageViewer::loadNextImage() {
if (!load(_imageNum+1)) { // try to load the next image
@@ -190,21 +190,21 @@ void ImageViewer::loadLastImage() {
if (!load(_imageNum-1))
if (!load(_imageNum))
setVisible(false); // we can't even show the old image so hide
- }
+ }
setDirty();
}
void ImageViewer::setFullScreenImageParams() {
// we try to fit the image fullscreen at least in one dimension
uint32 width = _buffer->getSourceWidth();
- uint32 height = _buffer->getSourceHeight();
+ uint32 height = _buffer->getSourceHeight();
_centerX = PSP_SCREEN_WIDTH / 2.0f;
_centerY = PSP_SCREEN_HEIGHT / 2.0f;
-
+
// see if we fit width wise
if (PSP_SCREEN_HEIGHT >= (int)((height * PSP_SCREEN_WIDTH) / (float)width)) {
- setZoom(PSP_SCREEN_WIDTH / (float)width);
+ setZoom(PSP_SCREEN_WIDTH / (float)width);
} else {
setZoom(PSP_SCREEN_HEIGHT / (float)height);
}
@@ -233,32 +233,32 @@ void ImageViewer::render() {
break;
}
_renderer->render();
- }
+ }
}
void ImageViewer::modifyZoom(bool up) {
float factor = _zoomFactor;
- if (up)
+ if (up)
factor += 0.1f;
else // down
factor -= 0.1f;
-
- setZoom(factor);
+
+ setZoom(factor);
}
-void ImageViewer::setZoom(float value) {
+void ImageViewer::setZoom(float value) {
if (value <= 0.0f) // don't want 0 or negative zoom
return;
_zoomFactor = value;
- _renderer->setStretchXY(value, value);
+ _renderer->setStretchXY(value, value);
setOffsetParams();
}
void ImageViewer::moveImageX(float val) {
float newVal = _centerX + val;
-
- if (newVal - (_visibleWidth / 2) > PSP_SCREEN_WIDTH - 4 || newVal + (_visibleWidth / 2) < 4)
+
+ if (newVal - (_visibleWidth / 2) > PSP_SCREEN_WIDTH - 4 || newVal + (_visibleWidth / 2) < 4)
return;
_centerX = newVal;
setOffsetParams();
@@ -266,22 +266,22 @@ void ImageViewer::moveImageX(float val) {
void ImageViewer::moveImageY(float val) {
float newVal = _centerY + val;
-
- if (newVal - (_visibleHeight / 2) > PSP_SCREEN_HEIGHT - 4 || newVal + (_visibleHeight / 2) < 4)
+
+ if (newVal - (_visibleHeight / 2) > PSP_SCREEN_HEIGHT - 4 || newVal + (_visibleHeight / 2) < 4)
return;
_centerY = newVal;
setOffsetParams();
}
-// Set the renderer with the proper offset on the screen
+// Set the renderer with the proper offset on the screen
//
void ImageViewer::setOffsetParams() {
_visibleWidth = _zoomFactor * _buffer->getSourceWidth();
- _visibleHeight = _zoomFactor * _buffer->getSourceHeight();
-
+ _visibleHeight = _zoomFactor * _buffer->getSourceHeight();
+
int offsetX = _centerX - (int)(_visibleWidth * 0.5f);
int offsetY = _centerY - (int)(_visibleHeight * 0.5f);
-
+
_renderer->setOffsetOnScreen(offsetX, offsetY);
setDirty();
}
@@ -290,8 +290,8 @@ void ImageViewer::setOffsetParams() {
//
void ImageViewer::handleEvent(uint32 event) {
DEBUG_ENTER_FUNC();
-
- switch (event) {
+
+ switch (event) {
case EVENT_HIDE:
setVisible(false);
break;
diff --git a/backends/platform/psp/image_viewer.h b/backends/platform/psp/image_viewer.h
index 4c3eaf7b4a..ad188536a3 100644
--- a/backends/platform/psp/image_viewer.h
+++ b/backends/platform/psp/image_viewer.h
@@ -54,10 +54,10 @@ private:
float _visibleHeight, _visibleWidth;
float _centerX, _centerY;
Event _movement;
-
+
InputHandler *_inputHandler;
DisplayManager *_displayManager;
-
+
void setFullScreenImageParams();
void loadNextImage();
void loadLastImage();
@@ -66,19 +66,19 @@ private:
void moveImageX(float val);
void moveImageY(float val);
bool load(int imageNum);
- void unload();
+ void unload();
void runLoop(); // to get total pausing we have to do our own loop
-
+
void setZoom(float value);
void setOffsetParams();
void modifyZoom(bool up); // up or down
void setVisible(bool visible);
-
+
public:
- ImageViewer() : _buffer(0), _palette(0), _visible(false),
- _dirty(false), _init(false), _imageNum(0),
- _zoomFactor(0.0f), _visibleHeight(0.0f), _visibleWidth(0.0f),
+ ImageViewer() : _buffer(0), _palette(0), _visible(false),
+ _dirty(false), _init(false), _imageNum(0),
+ _zoomFactor(0.0f), _visibleHeight(0.0f), _visibleWidth(0.0f),
_centerX(0.0f), _centerY(0.0f), _movement(EVENT_MOVE_STOP),
_inputHandler(0), _displayManager(0) {}
~ImageViewer() { unload(); } // deallocate images
@@ -88,15 +88,15 @@ public:
bool isDirty() { return _dirty; }
void setDirty() { _dirty = true; }
void setClean() { if (!_visible) // otherwise we want to keep rendering
- _dirty = false;
- }
+ _dirty = false;
+ }
void resetOnEngineDone();
-
+
void handleEvent(uint32 event);
-
+
// pointer setters
- void setInputHandler(InputHandler *inputHandler) { _inputHandler = inputHandler; }
+ void setInputHandler(InputHandler *inputHandler) { _inputHandler = inputHandler; }
void setDisplayManager(DisplayManager *displayManager) { _displayManager = displayManager; }
};
-#endif /* PSP_IMAGE_VIEWER_H */ \ No newline at end of file
+#endif /* PSP_IMAGE_VIEWER_H */ \ No newline at end of file
diff --git a/backends/platform/psp/input.cpp b/backends/platform/psp/input.cpp
index 17f8954e3b..a9ad441b4d 100644
--- a/backends/platform/psp/input.cpp
+++ b/backends/platform/psp/input.cpp
@@ -198,7 +198,7 @@ bool ButtonPad::getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &
uint32 curButtonState = PSP_ALL_BUTTONS & pad.Buttons; // we only care about these
if (_combosEnabled)
- modifyButtonsForCombos(pad); // change buttons for combos
+ modifyButtonsForCombos(pad); // change buttons for combos
return getEventFromButtonState(event, pspEvent, curButtonState);
}
@@ -460,7 +460,7 @@ bool InputHandler::handlePspEvent(Common::Event &event, PspEvent &pspEvent) {
/*case PSP_EVENT_CHANGE_SPEED:
handleSpeedChange(pspEvent.data);
break;*/
- case PSP_EVENT_IMAGE_VIEWER:
+ case PSP_EVENT_IMAGE_VIEWER:
_imageViewer->handleEvent(pspEvent.data);
break;
case PSP_EVENT_IMAGE_VIEWER_SET_BUTTONS:
@@ -530,7 +530,7 @@ void InputHandler::setImageViewerMode(bool active) {
_nub.init();
_buttonPad.enableCombos(true); // re-enable combos
_buttonPad.initButtons();
- }
+ }
}
void InputHandler::setButtonsForImageViewer() {
@@ -538,32 +538,32 @@ void InputHandler::setButtonsForImageViewer() {
// Dpad
_buttonPad.clearButtons();
- _buttonPad.getButton(ButtonPad::BTN_UP, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_ZOOM_IN,
+ _buttonPad.getButton(ButtonPad::BTN_UP, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_ZOOM_IN,
+ PSP_EVENT_NONE, false);
+ _buttonPad.getButton(ButtonPad::BTN_DOWN, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_ZOOM_OUT,
PSP_EVENT_NONE, false);
- _buttonPad.getButton(ButtonPad::BTN_DOWN, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_ZOOM_OUT,
+ _buttonPad.getButton(ButtonPad::BTN_LEFT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_LAST_IMAGE,
PSP_EVENT_NONE, false);
- _buttonPad.getButton(ButtonPad::BTN_LEFT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_LAST_IMAGE,
+ _buttonPad.getButton(ButtonPad::BTN_RIGHT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_NEXT_IMAGE,
PSP_EVENT_NONE, false);
- _buttonPad.getButton(ButtonPad::BTN_RIGHT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_NEXT_IMAGE,
- PSP_EVENT_NONE, false);
- _buttonPad.getButton(ButtonPad::BTN_LTRIGGER, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
+ _buttonPad.getButton(ButtonPad::BTN_LTRIGGER, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
PSP_EVENT_NONE, false);
- _buttonPad.getButton(ButtonPad::BTN_RTRIGGER, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
+ _buttonPad.getButton(ButtonPad::BTN_RTRIGGER, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
PSP_EVENT_NONE, false);
- _buttonPad.getButton(ButtonPad::BTN_START, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
+ _buttonPad.getButton(ButtonPad::BTN_START, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
PSP_EVENT_NONE, false);
- _buttonPad.getButton(ButtonPad::BTN_SELECT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
+ _buttonPad.getButton(ButtonPad::BTN_SELECT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_HIDE,
PSP_EVENT_NONE, false);
//Nub
_nub.getPad().clearButtons();
- _nub.getPad().getButton(ButtonPad::BTN_UP, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_UP,
+ _nub.getPad().getButton(ButtonPad::BTN_UP, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_UP,
PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_STOP);
- _nub.getPad().getButton(ButtonPad::BTN_DOWN, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_DOWN,
+ _nub.getPad().getButton(ButtonPad::BTN_DOWN, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_DOWN,
PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_STOP);
- _nub.getPad().getButton(ButtonPad::BTN_LEFT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_LEFT,
+ _nub.getPad().getButton(ButtonPad::BTN_LEFT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_LEFT,
PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_STOP);
- _nub.getPad().getButton(ButtonPad::BTN_RIGHT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_RIGHT,
+ _nub.getPad().getButton(ButtonPad::BTN_RIGHT, UNSHIFTED).setPspEvent(PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_RIGHT,
PSP_EVENT_IMAGE_VIEWER, ImageViewer::EVENT_MOVE_STOP);
}
diff --git a/backends/platform/psp/input.h b/backends/platform/psp/input.h
index 8315a3766c..ef2e1b84a4 100644
--- a/backends/platform/psp/input.h
+++ b/backends/platform/psp/input.h
@@ -122,16 +122,16 @@ public:
ButtonPad();
void initButtons(); // set the buttons to the mode that's selected
void clearButtons(); // empty the buttons of all events
-
+
bool getEvent(Common::Event &event, PspEvent &pspEvent, SceCtrlData &pad);
bool getEventFromButtonState(Common::Event &event, PspEvent &pspEvent, uint32 buttonState);
-
+
void setShifted(ShiftMode shifted) { _shifted = shifted; }
void setPadMode(PspPadMode mode) { _padMode = mode; }
bool isButtonDown() { return _prevButtonState; }
-
+
void enableCombos(bool value) { _combosEnabled = value; }
- Button &getButton(ButtonType type, ShiftMode mode) { return _button[type][mode]; }
+ Button &getButton(ButtonType type, ShiftMode mode) { return _button[type][mode]; }
};
class Nub {
@@ -140,17 +140,17 @@ private:
ShiftMode _shifted;
bool _dpadMode;
-
+
ButtonPad _buttonPad; // private buttonpad for dpad mode
-
+
int32 modifyNubAxisMotion(int32 input);
void translateToDpadState(int dpadX, int dpadY, uint32 &buttonState); // convert nub data to dpad data
public:
Nub() : _shifted(UNSHIFTED), _dpadMode(false) { }
- void init() { _buttonPad.initButtons(); }
+ void init() { _buttonPad.initButtons(); }
void setCursor(Cursor *cursor) { _cursor = cursor; }
-
+
// setters
void setDpadMode(bool active) { _dpadMode = active; }
void setShifted(ShiftMode shifted) { _shifted = shifted; }
@@ -163,7 +163,7 @@ public:
class InputHandler {
public:
- InputHandler() : _keyboard(0), _cursor(0), _imageViewer(0), _padMode(PAD_MODE_NORMAL),
+ InputHandler() : _keyboard(0), _cursor(0), _imageViewer(0), _padMode(PAD_MODE_NORMAL),
_lastPadCheckTime(0) {}
// pointer setters
void setKeyboard(PSPKeyboard *keyboard) { _keyboard = keyboard; }
@@ -175,7 +175,7 @@ public:
void setImageViewerMode(bool active);
private:
- Nub _nub;
+ Nub _nub;
ButtonPad _buttonPad;
// Pointers to relevant other classes
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 01124b420e..5fa5110684 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -20,8 +20,7 @@
*
*/
-// Allow use of stuff in <time.h>
-#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include <pspuser.h>
#include <pspgu.h>
@@ -84,7 +83,7 @@ void OSystem_PSP::initBackend() {
_inputHandler.setKeyboard(&_keyboard);
_inputHandler.setImageViewer(&_imageViewer);
_inputHandler.init();
-
+
// Set pointers for image viewer
_imageViewer.setInputHandler(&_inputHandler);
_imageViewer.setDisplayManager(&_displayManager);
@@ -422,7 +421,15 @@ void OSystem_PSP::quit() {
}
void OSystem_PSP::logMessage(LogMessageType::Type type, const char *message) {
- EventsBaseBackend::logMessage(type, message);
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
if (type == LogMessageType::kError)
PspDebugTrace(false, "%s", message); // write to file
diff --git a/backends/platform/psp/png_loader.cpp b/backends/platform/psp/png_loader.cpp
index 2f4857569e..16377539c8 100644
--- a/backends/platform/psp/png_loader.cpp
+++ b/backends/platform/psp/png_loader.cpp
@@ -36,7 +36,7 @@
PngLoader::Status PngLoader::allocate() {
DEBUG_ENTER_FUNC();
-
+
if (!findImageDimensions()) {
PSP_ERROR("failed to get image dimensions\n");
return BAD_FILE;
@@ -45,7 +45,7 @@ PngLoader::Status PngLoader::allocate() {
_buffer->setSize(_width, _height, _sizeBy);
uint32 bitsPerPixel = _bitDepth * _channels;
-
+
if (_paletteSize) { // 8 or 4-bit image
if (bitsPerPixel == 4) {
_buffer->setPixelFormat(PSPPixelFormat::Type_Palette_4bit);
@@ -130,7 +130,7 @@ bool PngLoader::basicImageLoad() {
png_get_IHDR(_pngPtr, _infoPtr, (png_uint_32 *)&_width, (png_uint_32 *)&_height, &_bitDepth,
&_colorType, &interlaceType, int_p_NULL, int_p_NULL);
_channels = png_get_channels(_pngPtr, _infoPtr);
-
+
if (_colorType & PNG_COLOR_MASK_PALETTE)
_paletteSize = _infoPtr->num_palette;
@@ -141,7 +141,7 @@ bool PngLoader::basicImageLoad() {
bool PngLoader::findImageDimensions() {
DEBUG_ENTER_FUNC();
- bool status = basicImageLoad();
+ bool status = basicImageLoad();
PSP_DEBUG_PRINT("width[%d], height[%d], paletteSize[%d], bitDepth[%d], channels[%d], rowBytes[%d]\n", _width, _height, _paletteSize, _bitDepth, _channels, _infoPtr->rowbytes);
png_destroy_read_struct(&_pngPtr, &_infoPtr, png_infopp_NULL);
@@ -157,7 +157,7 @@ bool PngLoader::loadImageIntoBuffer() {
if (!basicImageLoad()) {
png_destroy_read_struct(&_pngPtr, &_infoPtr, png_infopp_NULL);
return false;
- }
+ }
png_set_strip_16(_pngPtr); // Strip off 16 bit channels in case they occur
if (_paletteSize) {
@@ -178,16 +178,16 @@ bool PngLoader::loadImageIntoBuffer() {
}
uint32 rowBytes = png_get_rowbytes(_pngPtr, _infoPtr);
-
- // there seems to be a bug in libpng where it doesn't increase the rowbytes or the
+
+ // there seems to be a bug in libpng where it doesn't increase the rowbytes or the
// channel even after we add the alpha channel
if (_channels == 3 && (rowBytes / _width) == 3) {
_channels = 4;
- rowBytes = _width * _channels;
- }
-
+ rowBytes = _width * _channels;
+ }
+
PSP_DEBUG_PRINT("rowBytes[%d], channels[%d]\n", rowBytes, _channels);
-
+
unsigned char *line = (unsigned char*) malloc(rowBytes);
if (!line) {
png_destroy_read_struct(&_pngPtr, png_infopp_NULL, png_infopp_NULL);
diff --git a/backends/platform/psp/png_loader.h b/backends/platform/psp/png_loader.h
index 616a79405e..0ff9d8a65d 100644
--- a/backends/platform/psp/png_loader.h
+++ b/backends/platform/psp/png_loader.h
@@ -61,7 +61,7 @@ public:
Buffer::HowToSize sizeBy = Buffer::kSizeByTextureSize) :
_file(file), _buffer(&buffer), _palette(&palette),
_width(0), _height(0), _paletteSize(0),
- _bitDepth(0), _sizeBy(sizeBy), _pngPtr(0),
+ _bitDepth(0), _sizeBy(sizeBy), _pngPtr(0),
_infoPtr(0), _colorType(0), _channels(0) {}
PngLoader::Status allocate();
diff --git a/backends/platform/psp/powerman.cpp b/backends/platform/psp/powerman.cpp
index fe9dcfa673..b72d05809d 100644
--- a/backends/platform/psp/powerman.cpp
+++ b/backends/platform/psp/powerman.cpp
@@ -30,7 +30,9 @@
//#define __PSP_DEBUG_PRINT__
#include "backends/platform/psp/trace.h"
+namespace Common {
DECLARE_SINGLETON(PowerManager);
+}
// Function to debug the Power Manager (we have no output to screen)
inline void PowerManager::debugPM() {
diff --git a/backends/platform/psp/rtc.cpp b/backends/platform/psp/rtc.cpp
index 3d6d4295a6..6c8e919986 100644
--- a/backends/platform/psp/rtc.cpp
+++ b/backends/platform/psp/rtc.cpp
@@ -34,7 +34,9 @@
// Class PspRtc ---------------------------------------------------------------
+namespace Common {
DECLARE_SINGLETON(PspRtc);
+}
void PspRtc::init() { // init our starting ticks
uint32 ticks[2];
diff --git a/backends/platform/psp/trace.cpp b/backends/platform/psp/trace.cpp
index 373e00415b..b799b4e870 100644
--- a/backends/platform/psp/trace.cpp
+++ b/backends/platform/psp/trace.cpp
@@ -75,38 +75,38 @@ void PspDebugTrace(bool alsoToScreen, const char *format, ...) {
#define GET_RET(retAddr) \
asm volatile ("move %0,$ra\n\t" \
: "=&r" (retAddr) : )
-
+
#define GET_SP(stackPtr) \
asm volatile ("move %0,$sp\n\t" \
: "=&r" (stackPtr) : )
// Function to retrieve a backtrace for the MIPS processor
-// This is not trivial since the MIPS doesn't use a frame pointer.
+// This is not trivial since the MIPS doesn't use a frame pointer.
// Takes the number of levels wanted above the calling function (included) and an array of void *
-//
+//
void mipsBacktrace(uint32 levels, void **addresses) {
- // get the current return address
+ // get the current return address
register byte *retAddr;
register byte *stackPointer;
- GET_RET(retAddr);
+ GET_RET(retAddr);
GET_SP(stackPointer);
char string[100];
-
+
if (!levels)
return;
-
+
memset(addresses, 0, sizeof(void *) * levels);
-
+
uint32 curLevel = 0;
-
+
const uint32 SP_SUBTRACT = 0x27bd8000; // The instruction to subtract from the SP looks like this
const uint32 SP_SUB_HIGH_MASK = 0xffff8000; // The mask to check for the subtract SP instruction
const uint32 SP_SUB_LOW_MASK = 0x0000ffff; // The mask that gives us how much was subtracted
-
+
// make sure we go out of the stack of this current level
// we already have the return address for this level from the register
if (curLevel < levels) {
- void *thisFunc = (void *)mipsBacktrace;
+ void *thisFunc = (void *)mipsBacktrace;
for (uint32 *seekPtr = (uint32 *)thisFunc; ; seekPtr++) {
if ((*seekPtr & SP_SUB_HIGH_MASK) == SP_SUBTRACT) {
// we found the $sp subtraction at the beginning of the function
@@ -120,10 +120,10 @@ void mipsBacktrace(uint32 levels, void **addresses) {
fputs(string, stderr);
}
break;
- }
- }
+ }
+ }
}
-
+
// keep scanning while more levels are requested
while (curLevel < levels) {
// now scan backwards from the return address to find the size of the stack
@@ -139,13 +139,13 @@ void mipsBacktrace(uint32 levels, void **addresses) {
sprintf(string, "invalid retAddr %p\n", retAddr);
fputs(string, stderr);
return;
- }
+ }
//sprintf(string, "retAddr[%p]\n", retAddr);
//fputs(string, stderr);
addresses[curLevel++] = retAddr;
break;
- }
- }
+ }
+ }
}
-}
+}
diff --git a/backends/platform/sdl/macosx/appmenu_osx.h b/backends/platform/sdl/macosx/appmenu_osx.h
new file mode 100755
index 0000000000..005414b789
--- /dev/null
+++ b/backends/platform/sdl/macosx/appmenu_osx.h
@@ -0,0 +1,32 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 APPMENU_OSX_H
+#define APPMENU_OSX_H
+
+#if defined(MACOSX)
+
+void replaceApplicationMenuItems();
+
+#endif // MACOSX
+
+#endif
diff --git a/backends/platform/sdl/macosx/appmenu_osx.mm b/backends/platform/sdl/macosx/appmenu_osx.mm
new file mode 100755
index 0000000000..bb089a6b61
--- /dev/null
+++ b/backends/platform/sdl/macosx/appmenu_osx.mm
@@ -0,0 +1,110 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "backends/platform/sdl/macosx/appmenu_osx.h"
+#include "common/translation.h"
+
+#include <Cocoa/Cocoa.h>
+
+// Apple removed setAppleMenu from the header files in 10.4,
+// but as the method still exists we declare it ourselves here.
+// Yes, this works :)
+@interface NSApplication(MissingFunction)
+- (void)setAppleMenu:(NSMenu *)menu;
+@end
+
+void replaceApplicationMenuItems() {
+
+ // Code mainly copied and adapted from SDLmain.m
+ NSMenu *appleMenu;
+ NSMenu *windowMenu;
+ NSMenuItem *menuItem;
+
+ // For some reason [[NSApp mainMenu] removeAllItems] doesn't work and crashes, so we need
+ // to remove the SDL generated menus one by one
+ [[NSApp mainMenu] removeItemAtIndex:0]; // Remove application menu
+ [[NSApp mainMenu] removeItemAtIndex:0]; // Remove "Windows" menu
+
+ // Create new application menu
+ appleMenu = [[NSMenu alloc] initWithTitle:@""];
+
+ // Get current encoding
+#ifdef USE_TRANSLATION
+ NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding]));
+#else
+ NSStringEncoding stringEncoding = NSASCIIStringEncoding;
+#endif
+
+ // Add "About ScummVM" menu item
+ [appleMenu addItemWithTitle:[NSString stringWithCString:_("About ScummVM") encoding:stringEncoding] action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+
+ // Add separator
+ [appleMenu addItem:[NSMenuItem separatorItem]];
+
+ // Add "Hide ScummVM" menu item
+ [appleMenu addItemWithTitle:[NSString stringWithCString:_("Hide ScummVM") encoding:stringEncoding] action:@selector(hide:) keyEquivalent:@"h"];
+
+ // Add "Hide Others" menu item
+ menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:[NSString stringWithCString:_("Hide Others") encoding:stringEncoding] action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
+ [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
+
+ // Add "Show All" menu item
+ [appleMenu addItemWithTitle:[NSString stringWithCString:_("Show All") encoding:stringEncoding] action:@selector(unhideAllApplications:) keyEquivalent:@""];
+
+ // Add separator
+ [appleMenu addItem:[NSMenuItem separatorItem]];
+
+ // Add "Quit ScummVM" menu item
+ [appleMenu addItemWithTitle:[NSString stringWithCString:_("Quit ScummVM") encoding:stringEncoding] action:@selector(terminate:) keyEquivalent:@"q"];
+
+ // Put application menu into the menubar
+ menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+ [menuItem setSubmenu:appleMenu];
+ [[NSApp mainMenu] addItem:menuItem];
+
+ // Tell the application object that this is now the application menu
+ [NSApp setAppleMenu:appleMenu];
+
+
+ // Create new "Window" menu
+ windowMenu = [[NSMenu alloc] initWithTitle:[NSString stringWithCString:_("Window") encoding:stringEncoding]];
+
+ // Add "Minimize" menu item
+ menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithCString:_("Minimize") encoding:stringEncoding] action:@selector(performMiniaturize:) keyEquivalent:@"m"];
+ [windowMenu addItem:menuItem];
+
+ // Put menu into the menubar
+ menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithCString:_("Window") encoding:stringEncoding] action:nil keyEquivalent:@""];
+ [menuItem setSubmenu:windowMenu];
+ [[NSApp mainMenu] addItem:menuItem];
+
+ // Tell the application object that this is now the window menu.
+ [NSApp setWindowsMenu:windowMenu];
+
+ // Finally give up our references to the objects
+ [appleMenu release];
+ [windowMenu release];
+ [menuItem release];
+}
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index 9b11eb2c09..ddfc99570a 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -29,9 +29,12 @@
#include "backends/platform/sdl/macosx/macosx.h"
#include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h"
+#include "backends/platform/sdl/macosx/appmenu_osx.h"
#include "common/archive.h"
+#include "common/config-manager.h"
#include "common/fs.h"
+#include "common/translation.h"
#include "ApplicationServices/ApplicationServices.h" // for LSOpenFSRef
#include "CoreFoundation/CoreFoundation.h" // for CF* stuff
@@ -51,6 +54,15 @@ void OSystem_MacOSX::initBackend() {
_mixerManager->init();
}
+#ifdef USE_TRANSLATION
+ // We need to initialize the translataion manager here for the following
+ // call to replaceApplicationMenuItems() work correctly
+ TransMan.setLanguage(ConfMan.get("gui_language").c_str());
+#endif // USE_TRANSLATION
+
+ // Replace the SDL generated menu items with our own translated ones on Mac OS X
+ replaceApplicationMenuItems();
+
// Invoke parent implementation of this method
OSystem_POSIX::initBackend();
}
@@ -74,7 +86,7 @@ void OSystem_MacOSX::addSysArchivesToSearchSet(Common::SearchSet &s, int priorit
}
void OSystem_MacOSX::setupIcon() {
- // Don't set icon on OS X, as we use a nicer external icon there.
+ // Don't set icon on OS X, as we use a nicer external icon there.
}
bool OSystem_MacOSX::hasFeature(Feature f) {
diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp
index 1992bdd3f2..3947d010c4 100644
--- a/backends/platform/sdl/main.cpp
+++ b/backends/platform/sdl/main.cpp
@@ -34,6 +34,7 @@
!defined(CAANOO) && \
!defined(LINUXMOTO) && \
!defined(SAMSUNGTV) && \
+ !defined(PLAYSTATION3) && \
!defined(OPENPANDORA)
#include "backends/platform/sdl/sdl.h"
diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk
index efc5168d5b..f1afe37349 100644
--- a/backends/platform/sdl/module.mk
+++ b/backends/platform/sdl/module.mk
@@ -14,7 +14,8 @@ endif
ifdef MACOSX
MODULE_OBJS += \
macosx/macosx-main.o \
- macosx/macosx.o
+ macosx/macosx.o \
+ macosx/appmenu_osx.o
endif
ifdef WIN32
@@ -29,6 +30,12 @@ MODULE_OBJS += \
amigaos/amigaos.o
endif
+ifdef PLAYSTATION3
+MODULE_OBJS += \
+ ps3/ps3-main.o \
+ ps3/ps3.o
+endif
+
# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)
diff --git a/backends/platform/sdl/posix/posix-main.cpp b/backends/platform/sdl/posix/posix-main.cpp
index f78e001398..3bf7a5138a 100644
--- a/backends/platform/sdl/posix/posix-main.cpp
+++ b/backends/platform/sdl/posix/posix-main.cpp
@@ -22,7 +22,7 @@
#include "common/scummsys.h"
-#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA)
+#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) && !defined(PLAYSTATION3)
#include "backends/platform/sdl/posix/posix.h"
#include "backends/plugins/sdl/sdl-provider.h"
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index d757186134..05c779a4e0 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -33,6 +33,7 @@
#include "backends/platform/sdl/posix/posix.h"
#include "backends/saves/posix/posix-saves.h"
#include "backends/fs/posix/posix-fs-factory.h"
+#include "backends/taskbar/unity/unity-taskbar.h"
#include <errno.h>
#include <sys/stat.h>
@@ -49,6 +50,11 @@ void OSystem_POSIX::init() {
// Initialze File System Factory
_fsFactory = new POSIXFilesystemFactory();
+#if defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+ // Initialize taskbar manager
+ _taskbarManager = new UnityTaskbarManager();
+#endif
+
// Invoke parent implementation of this method
OSystem_SDL::init();
}
@@ -60,6 +66,11 @@ void OSystem_POSIX::initBackend() {
// Invoke parent implementation of this method
OSystem_SDL::initBackend();
+
+#if defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+ // Register the taskbar manager as an event source (this is necessary for the glib event loop to be run)
+ _eventManager->getEventDispatcher()->registerSource((UnityTaskbarManager *)_taskbarManager, false);
+#endif
}
bool OSystem_POSIX::hasFeature(Feature f) {
diff --git a/backends/platform/sdl/ps3/ps3-main.cpp b/backends/platform/sdl/ps3/ps3-main.cpp
new file mode 100644
index 0000000000..ba548a3749
--- /dev/null
+++ b/backends/platform/sdl/ps3/ps3-main.cpp
@@ -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.
+ *
+ */
+
+#include "common/scummsys.h"
+
+#include "backends/platform/sdl/ps3/ps3.h"
+#include "backends/plugins/sdl/sdl-provider.h"
+#include "base/main.h"
+
+int main(int argc, char *argv[]) {
+
+ // Create our OSystem instance
+ g_system = new OSystem_PS3();
+ assert(g_system);
+
+ // Pre initialize the backend
+ ((OSystem_PS3 *)g_system)->init();
+
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
+#endif
+
+ // Invoke the actual ScummVM main entry point:
+ int res = scummvm_main(argc, argv);
+
+ // Free OSystem
+ delete (OSystem_PS3 *)g_system;
+
+ return res;
+}
diff --git a/backends/platform/sdl/ps3/ps3.cpp b/backends/platform/sdl/ps3/ps3.cpp
new file mode 100644
index 0000000000..33586ce693
--- /dev/null
+++ b/backends/platform/sdl/ps3/ps3.cpp
@@ -0,0 +1,94 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h // sys/stat.h includes sys/time.h
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "backends/platform/sdl/ps3/ps3.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
+#include "backends/saves/default/default-saves.h"
+#include "backends/fs/ps3/ps3-fs-factory.h"
+#include "backends/events/ps3sdl/ps3sdl-events.h"
+#include "backends/mixer/sdl13/sdl13-mixer.h"
+
+#include <dirent.h>
+#include <sys/stat.h>
+
+int access(const char *pathname, int mode) {
+ struct stat sb;
+
+ if (stat(pathname, &sb) == -1) {
+ return -1;
+ }
+
+ return 0;
+}
+
+OSystem_PS3::OSystem_PS3(Common::String baseConfigName)
+ : _baseConfigName(baseConfigName) {
+}
+
+void OSystem_PS3::init() {
+ // Initialze File System Factory
+ _fsFactory = new PS3FilesystemFactory();
+
+ // Invoke parent implementation of this method
+ OSystem_SDL::init();
+}
+
+void OSystem_PS3::initBackend() {
+ ConfMan.set("joystick_num", 0);
+ ConfMan.set("vkeybdpath", PREFIX "/data");
+ ConfMan.registerDefault("fullscreen", true);
+ ConfMan.registerDefault("aspect_ratio", true);
+
+ // Create the savefile manager
+ if (_savefileManager == 0)
+ _savefileManager = new DefaultSaveFileManager(PREFIX "/saves");
+
+ // Create the mixer manager
+ if (_mixer == 0) {
+ _mixerManager = new Sdl13MixerManager();
+
+ // Setup and start mixer
+ _mixerManager->init();
+ }
+
+ // Event source
+ if (_eventSource == 0)
+ _eventSource = new PS3SdlEventSource();
+
+ // Invoke parent implementation of this method
+ OSystem_SDL::initBackend();
+}
+
+Common::String OSystem_PS3::getDefaultConfigFileName() {
+ return PREFIX "/" + _baseConfigName;
+}
+
+Common::WriteStream *OSystem_PS3::createLogFile() {
+ Common::FSNode file(PREFIX "/scummvm.log");
+ return file.createWriteStream();
+}
diff --git a/backends/platform/sdl/ps3/ps3.h b/backends/platform/sdl/ps3/ps3.h
new file mode 100644
index 0000000000..daed7599a9
--- /dev/null
+++ b/backends/platform/sdl/ps3/ps3.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 PLATFORM_SDL_PS3_H
+#define PLATFORM_SDL_PS3_H
+
+#include "backends/platform/sdl/sdl.h"
+
+class OSystem_PS3 : public OSystem_SDL {
+public:
+ // Let the subclasses be able to change _baseConfigName in the constructor
+ OSystem_PS3(Common::String baseConfigName = "scummvm.ini");
+ virtual ~OSystem_PS3() {}
+
+ virtual void init();
+ virtual void initBackend();
+
+protected:
+ // Base string for creating the default path and filename
+ // for the configuration file
+ Common::String _baseConfigName;
+
+ virtual Common::String getDefaultConfigFileName();
+
+ virtual Common::WriteStream *createLogFile();
+};
+
+#endif
diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h
index 77515ff4e5..ca3c586e03 100644
--- a/backends/platform/sdl/sdl-sys.h
+++ b/backends/platform/sdl/sdl-sys.h
@@ -27,7 +27,7 @@
// fashion, even on the Symbian port.
// Moreover, it contains a workaround for the fact that SDL_rwops.h uses
// a FILE pointer in one place, which conflicts with common/forbidden.h.
-
+// The SDL 1.3 headers also include strings.h
#include "common/scummsys.h"
@@ -39,6 +39,16 @@ typedef struct { int FAKE; } FAKE_FILE;
#define FILE FAKE_FILE
#endif
+#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strcasecmp)
+#undef strcasecmp
+#define strcasecmp FAKE_strcasecmp
+#endif
+
+#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strncasecmp)
+#undef strncasecmp
+#define strncasecmp FAKE_strncasecmp
+#endif
+
#if defined(__SYMBIAN32__)
#include <esdl\SDL.h>
#else
@@ -47,8 +57,19 @@ typedef struct { int FAKE; } FAKE_FILE;
// Finally forbid FILE again (if it was forbidden to start with)
#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_FILE)
-#undef FILE
+#undef FILE
#define FILE FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strcasecmp)
+#undef strcasecmp
+#define strcasecmp FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
+
+#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strncasecmp)
+#undef strncasecmp
+#define strncasecmp FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
+
+
#endif
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index afc6c850d9..d05cca4d1f 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -31,14 +31,22 @@
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
#include "common/EventRecorder.h"
+#include "common/taskbar.h"
#include "common/textconsole.h"
#include "backends/saves/default/default-saves.h"
+
+// Audio CD support was removed with SDL 1.3
+#if SDL_VERSION_ATLEAST(1, 3, 0)
+#include "backends/audiocd/default/default-audiocd.h"
+#else
#include "backends/audiocd/sdl/sdl-audiocd.h"
+#endif
+
#include "backends/events/sdl/sdl-events.h"
#include "backends/mutex/sdl/sdl-mutex.h"
#include "backends/timer/sdl/sdl-timer.h"
-#include "backends/graphics/sdl/sdl-graphics.h"
+#include "backends/graphics/surfacesdl/surfacesdl-graphics.h"
#ifdef USE_OPENGL
#include "backends/graphics/openglsdl/openglsdl-graphics.h"
#endif
@@ -125,6 +133,11 @@ void OSystem_SDL::init() {
if (_timerManager == 0)
_timerManager = new SdlTimerManager();
+#if defined(USE_TASKBAR)
+ if (_taskbarManager == 0)
+ _taskbarManager = new Common::TaskbarManager();
+#endif
+
#ifdef USE_OPENGL
// Setup a list with both SDL and OpenGL graphics modes
setupGraphicsModes();
@@ -167,27 +180,11 @@ void OSystem_SDL::initBackend() {
}
#endif
if (_graphicsManager == 0) {
- _graphicsManager = new SdlGraphicsManager(_eventSource);
+ _graphicsManager = new SurfaceSdlGraphicsManager(_eventSource);
graphicsManagerType = 0;
}
}
- // Creates the backend managers, if they don't exist yet (we check
- // for this to allow subclasses to provide their own).
- if (_eventManager == 0)
- _eventManager = new DefaultEventManager(_eventSource);
-
- // We have to initialize the graphics manager before the event manager
- // so the virtual keyboard can be initialized, but we have to add the
- // graphics manager as an event observer after initializing the event
- // manager.
- if (graphicsManagerType == 0)
- ((SdlGraphicsManager *)_graphicsManager)->initEventObserver();
-#ifdef USE_OPENGL
- else if (graphicsManagerType == 1)
- ((OpenGLSdlGraphicsManager *)_graphicsManager)->initEventObserver();
-#endif
-
if (_savefileManager == 0)
_savefileManager = new DefaultSaveFileManager();
@@ -198,8 +195,15 @@ void OSystem_SDL::initBackend() {
_mixerManager->init();
}
- if (_audiocdManager == 0)
+ if (_audiocdManager == 0) {
+ // Audio CD support was removed with SDL 1.3
+#if SDL_VERSION_ATLEAST(1, 3, 0)
+ _audiocdManager = new DefaultAudioCDManager();
+#else
_audiocdManager = new SdlAudioCDManager();
+#endif
+
+ }
// Setup a custom program icon.
setupIcon();
@@ -207,7 +211,34 @@ void OSystem_SDL::initBackend() {
_inited = true;
ModularBackend::initBackend();
+
+ // We have to initialize the graphics manager before the event manager
+ // so the virtual keyboard can be initialized, but we have to add the
+ // graphics manager as an event observer after initializing the event
+ // manager.
+ if (graphicsManagerType == 0)
+ ((SurfaceSdlGraphicsManager *)_graphicsManager)->initEventObserver();
+#ifdef USE_OPENGL
+ else if (graphicsManagerType == 1)
+ ((OpenGLSdlGraphicsManager *)_graphicsManager)->initEventObserver();
+#endif
+
+}
+
+#if defined(USE_TASKBAR)
+void OSystem_SDL::engineInit() {
+ // Add the started engine to the list of recent tasks
+ _taskbarManager->addRecent(ConfMan.getActiveDomainName(), ConfMan.get("description"));
+
+ // Set the overlay icon the current running engine
+ _taskbarManager->setOverlayIcon(ConfMan.getActiveDomainName(), ConfMan.get("description"));
+}
+
+void OSystem_SDL::engineDone() {
+ // Remove overlay icon
+ _taskbarManager->setOverlayIcon("", "");
}
+#endif
void OSystem_SDL::initSDL() {
// Check if SDL has not been initialized
@@ -275,10 +306,22 @@ void OSystem_SDL::fatalError() {
void OSystem_SDL::logMessage(LogMessageType::Type type, const char *message) {
- ModularBackend::logMessage(type, message);
+ // First log to stdout/stderr
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+
+ // Then log into file (via the logger)
if (_logger)
_logger->print(message);
+ // Finally, some Windows / WinCE specific logging code.
#if defined( USE_WINDBG )
#if defined( _WIN32_WCE )
TCHAR buf_unicode[1024];
@@ -301,7 +344,7 @@ void OSystem_SDL::logMessage(LogMessageType::Type type, const char *message) {
}
Common::String OSystem_SDL::getSystemLanguage() const {
-#ifdef USE_DETECTLANG
+#if defined(USE_DETECTLANG) && !defined(_WIN32_WCE)
#ifdef WIN32
// We can not use "setlocale" (at least not for MSVC builds), since it
// will return locales like: "English_USA.1252", thus we need a special
@@ -368,7 +411,7 @@ void OSystem_SDL::setupIcon() {
if (sscanf(scummvm_icon[0], "%d %d %d %d", &w, &h, &ncols, &nbytes) != 4) {
warning("Wrong format of scummvm_icon[0] (%s)", scummvm_icon[0]);
-
+
return;
}
if ((w > 512) || (h > 512) || (ncols > 255) || (nbytes > 1)) {
@@ -384,6 +427,7 @@ void OSystem_SDL::setupIcon() {
for (i = 0; i < ncols; i++) {
unsigned char code;
char color[32];
+ memset(color, 0, sizeof(color));
unsigned int col;
if (sscanf(scummvm_icon[1 + i], "%c c %s", &code, color) != 2) {
warning("Wrong format of scummvm_icon[%d] (%s)", 1 + i, scummvm_icon[1 + i]);
@@ -472,7 +516,7 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
// Check if mode is from SDL or OpenGL
if (mode < _sdlModesCount) {
- srcMode = SdlGraphicsManager::supportedGraphicsModes();
+ srcMode = SurfaceSdlGraphicsManager::supportedGraphicsModes();
i = 0;
} else {
srcMode = OpenGLSdlGraphicsManager::supportedGraphicsModes();
@@ -487,8 +531,8 @@ bool OSystem_SDL::setGraphicsMode(int mode) {
if (_graphicsMode >= _sdlModesCount && mode < _sdlModesCount) {
debug(1, "switching to plain SDL graphics");
delete _graphicsManager;
- _graphicsManager = new SdlGraphicsManager(_eventSource);
- ((SdlGraphicsManager *)_graphicsManager)->initEventObserver();
+ _graphicsManager = new SurfaceSdlGraphicsManager(_eventSource);
+ ((SurfaceSdlGraphicsManager *)_graphicsManager)->initEventObserver();
_graphicsManager->beginGFXTransaction();
} else if (_graphicsMode < _sdlModesCount && mode >= _sdlModesCount) {
debug(1, "switching to OpenGL graphics");
@@ -514,7 +558,7 @@ int OSystem_SDL::getGraphicsMode() const {
}
void OSystem_SDL::setupGraphicsModes() {
- const OSystem::GraphicsMode *sdlGraphicsModes = SdlGraphicsManager::supportedGraphicsModes();
+ const OSystem::GraphicsMode *sdlGraphicsModes = SurfaceSdlGraphicsManager::supportedGraphicsModes();
const OSystem::GraphicsMode *openglGraphicsModes = OpenGLSdlGraphicsManager::supportedGraphicsModes();
_sdlModesCount = 0;
_glModesCount = 0;
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 9c08752054..395b2b3aac 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -30,7 +30,7 @@
#include "backends/events/sdl/sdl-events.h"
#include "backends/log/log.h"
-/**
+/**
* Base OSystem class for all SDL ports.
*/
class OSystem_SDL : public ModularBackend {
@@ -38,7 +38,7 @@ public:
OSystem_SDL();
virtual ~OSystem_SDL();
- /**
+ /**
* Pre-initialize backend. It should be called after
* instantiating the backend. Early needed managers are
* created here.
@@ -54,6 +54,10 @@ public:
// Override functions from ModularBackend and OSystem
virtual void initBackend();
+#if defined(USE_TASKBAR)
+ virtual void engineInit();
+ virtual void engineDone();
+#endif
virtual Common::HardwareKeySet *getHardwareKeySet();
virtual void quit();
virtual void fatalError();
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index 5b14be4417..a2c8e43424 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -23,10 +23,6 @@
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
-#include "common/scummsys.h"
-#include "common/error.h"
-#include "common/textconsole.h"
-
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
@@ -34,58 +30,52 @@
#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one...
#include <shellapi.h>
+#include "common/scummsys.h"
+#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
+
+#include <SDL_syswm.h> // For setting the icon
+
#include "backends/platform/sdl/win32/win32.h"
#include "backends/fs/windows/windows-fs-factory.h"
+#include "backends/taskbar/win32/win32-taskbar.h"
#include "common/memstream.h"
#define DEFAULT_CONFIG_FILE "scummvm.ini"
-//#define HIDE_CONSOLE
+void OSystem_Win32::init() {
+ // Initialize File System Factory
+ _fsFactory = new WindowsFilesystemFactory();
-#ifdef HIDE_CONSOLE
-struct SdlConsoleHidingWin32 {
- DWORD myPid;
- DWORD myTid;
- HWND consoleHandle;
-};
+#if defined(USE_TASKBAR)
+ // Initialize taskbar manager
+ _taskbarManager = new Win32TaskbarManager();
+#endif
-// console hiding for win32
-static BOOL CALLBACK initBackendFindConsoleWin32Proc(HWND hWnd, LPARAM lParam) {
- DWORD pid, tid;
- SdlConsoleHidingWin32 *variables = (SdlConsoleHidingWin32 *)lParam;
- tid = GetWindowThreadProcessId(hWnd, &pid);
- if ((tid == variables->myTid) && (pid == variables->myPid)) {
- variables->consoleHandle = hWnd;
- return FALSE;
- }
- return TRUE;
+ // Invoke parent implementation of this method
+ OSystem_SDL::init();
}
-#endif
+void OSystem_Win32::initBackend() {
+ // Console window is enabled by default on Windows
+ ConfMan.registerDefault("console", true);
-void OSystem_Win32::init() {
-#ifdef HIDE_CONSOLE
- // console hiding for win32
- SdlConsoleHidingWin32 consoleHidingWin32;
- consoleHidingWin32.consoleHandle = 0;
- consoleHidingWin32.myPid = GetCurrentProcessId();
- consoleHidingWin32.myTid = GetCurrentThreadId();
- EnumWindows (initBackendFindConsoleWin32Proc, (LPARAM)&consoleHidingWin32);
-
- if (!ConfMan.getBool("show_console")) {
- if (consoleHidingWin32.consoleHandle) {
- // We won't find a window with our TID/PID in case we were started from command-line
- ShowWindow(consoleHidingWin32.consoleHandle, SW_HIDE);
+ // Enable or disable the window console window
+ if (ConfMan.getBool("console")) {
+ if (AllocConsole()) {
+ freopen("CONIN$","r",stdin);
+ freopen("CONOUT$","w",stdout);
+ freopen("CONOUT$","w",stderr);
}
+ SetConsoleTitle("ScummVM Status Window");
+ } else {
+ FreeConsole();
}
-#endif
-
- // Initialze File System Factory
- _fsFactory = new WindowsFilesystemFactory();
// Invoke parent implementation of this method
- OSystem_SDL::init();
+ OSystem_SDL::initBackend();
}
@@ -131,6 +121,28 @@ bool OSystem_Win32::displayLogFile() {
return false;
}
+void OSystem_Win32::setupIcon() {
+ HMODULE handle = GetModuleHandle(NULL);
+ HICON ico = LoadIcon(handle, MAKEINTRESOURCE(1001 /* IDI_ICON */));
+ if (ico) {
+ SDL_SysWMinfo wminfo;
+ SDL_VERSION(&wminfo.version);
+ if (SDL_GetWMInfo(&wminfo)) {
+ // Replace the handle to the icon associated with the window class by our custom icon
+ SetClassLongPtr(wminfo.window, GCLP_HICON, (ULONG_PTR)ico);
+
+ // Since there wasn't any default icon, we can't use the return value from SetClassLong
+ // to check for errors (it would be 0 in both cases: error or no previous value for the
+ // icon handle). Instead we check for the last-error code value.
+ if (GetLastError() == ERROR_SUCCESS)
+ return;
+ }
+ }
+
+ // If no icon has been set, fallback to default path
+ OSystem_SDL::setupIcon();
+}
+
Common::String OSystem_Win32::getDefaultConfigFileName() {
char configFile[MAXPATHLEN];
@@ -149,18 +161,31 @@ Common::String OSystem_Win32::getDefaultConfigFileName() {
error("Unable to access user profile directory");
strcat(configFile, "\\Application Data");
- CreateDirectory(configFile, NULL);
+
+ // If the directory already exists (as it should in most cases),
+ // we don't want to fail, but we need to stop on other errors (such as ERROR_PATH_NOT_FOUND)
+ if (!CreateDirectory(configFile, NULL)) {
+ if (GetLastError() != ERROR_ALREADY_EXISTS)
+ error("Cannot create Application data folder");
+ }
}
strcat(configFile, "\\ScummVM");
- CreateDirectory(configFile, NULL);
+ if (!CreateDirectory(configFile, NULL)) {
+ if (GetLastError() != ERROR_ALREADY_EXISTS)
+ error("Cannot create ScummVM application data folder");
+ }
+
strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
FILE *tmp = NULL;
if ((tmp = fopen(configFile, "r")) == NULL) {
// Check windows directory
char oldConfigFile[MAXPATHLEN];
- GetWindowsDirectory(oldConfigFile, MAXPATHLEN);
+ uint ret = GetWindowsDirectory(oldConfigFile, MAXPATHLEN);
+ if (ret == 0 || ret > MAXPATHLEN)
+ error("Cannot retrieve the path of the Windows directory");
+
strcat(oldConfigFile, "\\" DEFAULT_CONFIG_FILE);
if ((tmp = fopen(oldConfigFile, "r"))) {
strcpy(configFile, oldConfigFile);
@@ -172,7 +197,10 @@ Common::String OSystem_Win32::getDefaultConfigFileName() {
}
} else {
// Check windows directory
- GetWindowsDirectory(configFile, MAXPATHLEN);
+ uint ret = GetWindowsDirectory(configFile, MAXPATHLEN);
+ if (ret == 0 || ret > MAXPATHLEN)
+ error("Cannot retrieve the path of the Windows directory");
+
strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
}
@@ -300,7 +328,7 @@ Common::SeekableReadStream *Win32ResourceArchive::createReadStreamForMember(cons
} // End of anonymous namespace
void OSystem_Win32::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
- s.add("Win32Res", new Win32ResourceArchive());
+ s.add("Win32Res", new Win32ResourceArchive(), priority);
OSystem_SDL::addSysArchivesToSearchSet(s, priority);
}
diff --git a/backends/platform/sdl/win32/win32.h b/backends/platform/sdl/win32/win32.h
index ef7b6af3f1..b56997a63b 100644
--- a/backends/platform/sdl/win32/win32.h
+++ b/backends/platform/sdl/win32/win32.h
@@ -28,6 +28,7 @@
class OSystem_Win32 : public OSystem_SDL {
public:
virtual void init();
+ virtual void initBackend();
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
@@ -46,6 +47,7 @@ protected:
*/
Common::String _logFilePath;
+ virtual void setupIcon();
virtual Common::String getDefaultConfigFileName();
virtual Common::WriteStream *createLogFile();
};
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index 9cccc81d19..b1bd976f9e 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -57,7 +57,7 @@ char *GetExecutablePath() {
OSystem_SDL_Symbian::OSystem_SDL_Symbian()
:
_RFs(0) {
-
+
}
void OSystem_SDL_Symbian::init() {
@@ -171,7 +171,7 @@ Common::String OSystem_SDL_Symbian::getDefaultConfigFileName() {
}
void OSystem_SDL_Symbian::setupIcon() {
- // Don't for Symbian: it uses the EScummVM.aif file for the icon.
+ // Don't for Symbian: it uses the EScummVM.aif file for the icon.
}
RFs& OSystem_SDL_Symbian::FsSession() {
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp
index c6b23783b8..258a782cc4 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -19,11 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-// Allow use of stuff in <time.h>
-#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
-
-#define FORBIDDEN_SYMBOL_EXCEPTION_printf
-#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include <unistd.h>
@@ -291,6 +287,18 @@ void OSystem_Wii::showOptionsDialog() {
_padAcceleration = 9 - ConfMan.getInt("wii_pad_acceleration");
}
+void OSystem_Wii::logMessage(LogMessageType::Type type, const char *message) {
+ FILE *output = 0;
+
+ if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
+ output = stdout;
+ else
+ output = stderr;
+
+ fputs(message, output);
+ fflush(output);
+}
+
#ifndef GAMECUBE
Common::String OSystem_Wii::getSystemLanguage() const {
const char *wiiCountries[] = {
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 6863a6840e..64197f913a 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -211,6 +211,8 @@ public:
virtual FilesystemFactory *getFilesystemFactory();
virtual void getTimeAndDate(TimeDate &t) const;
+ virtual void logMessage(LogMessageType::Type type, const char *message);
+
#ifndef GAMECUBE
virtual Common::String getSystemLanguage() const;
#endif // GAMECUBE
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 859e3a1395..443e738a4a 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -20,6 +20,7 @@
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_abort
#include <malloc.h>
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index a4786d330d..5980a41caa 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -137,6 +137,7 @@ void CEActionsPocket::initInstanceGame() {
bool is_tinsel = (gameid == "tinsel");
bool is_cruise = (gameid == "cruise");
bool is_made = (gameid == "made");
+ bool is_sci = (gameid == "sci");
GUI_Actions::initInstanceGame();
@@ -214,12 +215,14 @@ void CEActionsPocket::initInstanceGame() {
_key_action[POCKET_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start
else if (gameid == "atlantis")
_key_action[POCKET_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch
+ else if (is_simon)
+ _key_action[POCKET_ACTION_MULTI].setKey(Common::ASCII_F10, SDLK_F10); // F10
else
_key_action[POCKET_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V
// Key bind method
_action_enabled[POCKET_ACTION_BINDKEYS] = true;
// Disable double-tap right-click for convenience
- if (is_tinsel || is_cruise)
+ if (is_tinsel || is_cruise || is_sci)
if (!ConfMan.hasKey("no_doubletap_rightclick")) {
ConfMan.setBool("no_doubletap_rightclick", true);
ConfMan.flushToDisk();
@@ -267,6 +270,15 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
else
_key_action[action].setKey(SDLK_s);
}
+ if (action == POCKET_ACTION_SKIP && ConfMan.get("gameid") == "agi") {
+ // In several AGI games (for example SQ2) it is needed to press F10 to exit from
+ // a screen. But we still want be able to skip normally with the skip button.
+ // Because of this, we inject a F10 keystroke here (this works and doesn't seem
+ // to have side-effects)
+ _key_action[action].setKey(Common::ASCII_F10, SDLK_F10); // F10
+ EventsBuffer::simulateKey(&_key_action[action], true);
+ _key_action[action].setKey(KEY_ALL_SKIP);
+ }
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case POCKET_ACTION_KEYBOARD:
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index b12dadabb6..2cce288323 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -128,6 +128,7 @@ void CEActionsSmartphone::initInstanceGame() {
bool is_tinsel = (gameid == "tinsel");
bool is_cruise = (gameid == "cruise");
bool is_made = (gameid == "made");
+ bool is_sci = (gameid == "sci");
GUI_Actions::initInstanceGame();
@@ -180,12 +181,14 @@ void CEActionsSmartphone::initInstanceGame() {
_key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F1, SDLK_F1); // bargon : F1 to start
else if (gameid == "atlantis")
_key_action[SMARTPHONE_ACTION_MULTI].setKey(0, SDLK_KP0); // fate of atlantis : Ins to sucker-punch
+ else if (is_simon)
+ _key_action[SMARTPHONE_ACTION_MULTI].setKey(Common::ASCII_F10, SDLK_F10); // F10
else
_key_action[SMARTPHONE_ACTION_MULTI].setKey('V', SDLK_v, KMOD_SHIFT); // FT cheat : shift-V
// Bind keys
_action_enabled[SMARTPHONE_ACTION_BINDKEYS] = true;
// Disable double-tap right-click for convenience
- if (is_tinsel || is_cruise)
+ if (is_tinsel || is_cruise || is_sci)
if (!ConfMan.hasKey("no_doubletap_rightclick")) {
ConfMan.setBool("no_doubletap_rightclick", true);
ConfMan.flushToDisk();
@@ -231,6 +234,15 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
else
_key_action[action].setKey(SDLK_s);
}
+ if (action == SMARTPHONE_ACTION_SKIP && ConfMan.get("gameid") == "agi") {
+ // In several AGI games (for example SQ2) it is needed to press F10 to exit from
+ // a screen. But we still want be able to skip normally with the skip button.
+ // Because of this, we inject a F10 keystroke here (this works and doesn't seem
+ // to have side-effects)
+ _key_action[action].setKey(Common::ASCII_F10, SDLK_F10); // F10
+ EventsBuffer::simulateKey(&_key_action[action], true);
+ _key_action[action].setKey(KEY_ALL_SKIP);
+ }
EventsBuffer::simulateKey(&_key_action[action], true);
return true;
case SMARTPHONE_ACTION_RIGHTCLICK:
diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp
index 9c832dd585..dd6076e0af 100644
--- a/backends/platform/wince/CELauncherDialog.cpp
+++ b/backends/platform/wince/CELauncherDialog.cpp
@@ -24,6 +24,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "backends/platform/wince/wince-sdl.h"
+#include "backends/graphics/wincesdl/wincesdl-graphics.h"
#include "CELauncherDialog.h"
@@ -34,6 +35,7 @@
#include "gui/browser.h"
#include "gui/message.h"
#include "gui/ThemeEval.h"
+#include "gui/widgets/list.h"
#include "common/config-manager.h"
@@ -63,9 +65,13 @@ public:
};
CELauncherDialog::CELauncherDialog() : GUI::LauncherDialog() {
+ ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->reset_panel();
}
void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+ if ((cmd == 'STRT') || (cmd == kListItemActivatedCmd) || (cmd == kListItemDoubleClickedCmd)) {
+ ((WINCESdlGraphicsManager *)((OSystem_SDL *)g_system)->getGraphicsManager())->init_panel();
+ }
LauncherDialog::handleCommand(sender, cmd, data);
if (cmd == 'ABOU') {
CEAboutDialog about;
diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt
index c48d9ca998..60bcf710bb 100644
--- a/backends/platform/wince/README-WinCE.txt
+++ b/backends/platform/wince/README-WinCE.txt
@@ -1,10 +1,35 @@
ScummVM Windows CE FAQ
-Last updated: 2011-05-27
-Release version: 1.3.0
+Last updated: 2011-07-20
+Release version: x.x.x
------------------------------------------------------------------------
New in this version
-------------------
+x.x.x:
+- Changed default values for "high_sample_rate" & "FM_high_quality" to "true" as
+ most devices today are fast enough to handle this. It's still possible to set
+ this to "false" if you have a slower device.
+- Fix for TeenAgent & Hugo engines (both weren't running at all, crashed right
+ at the beginning)
+- Replaced the game mass-adding functionality with the functionality used on all
+ other platforms. It now shows progress while searching for games.
+
+1.3.1:
+- Fix for Normal2xAspect scaler which was causing screen update issues in some
+ games.
+- Fix for Normal1xAspect scaler which caused problems in the bottom part of the
+ screen when toolbar was hidden.
+- Fix for freelook mode.
+- Fix for timer manager, caused timing issues in some games.
+- Activated runtime language detection for ScummVM gui.
+- Toolbar is now hidden when returning to the game list.
+- Double-tap right-click emulation is now turned off for SCI games by default.
+- Added a new option "no_doubletap_paneltoggle" for scummvm.ini to disable
+ toolbar toggling when double-tapping on the top part of the screen.
+- SDL library related fixes:
+ * Fix for screen/mouse-cursor rotation issues (fixes erratic touchscreen
+ behaviour)
+ * Fix for hardware keyboard on some devices (HTC Touch Pro, etc.)
1.3.0:
This is the first official Windows CE release since 1.1.1.
@@ -345,14 +370,13 @@ Some parameters are specific to this port :
Game specific sections (f.e. [monkey2]) - performance options
* high_sample_rate bool Desktop quality (22 kHz) sound output if
- set. The default is 11 kHz.
- If you have a fast device, you can set this
- to true to enjoy better sound effects and
- music.
+ set. This is the default.
+ If you have a slow device, you can set this
+ to false to prevent lags/delays in the game.
* FM_high_quality bool Desktop quality FM synthesis if set. Lower
- quality otherwise. The default is low
+ quality otherwise. The default is high
quality. You can change this if you have a
- fast device.
+ slow device.
* sound_thread_priority int Set the priority of the sound thread (0, 1,
2). Depending on the release, this is set
to 1 internally (above normal).
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index 3ab9dc8aa4..1abc3cb350 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -42,6 +42,7 @@
#include "audio/mixer_intern.h"
#include "audio/fmopl.h"
+#include "backends/mutex/sdl/sdl-mutex.h"
#include "backends/timer/sdl/sdl-timer.h"
#include "gui/Actions.h"
@@ -353,9 +354,9 @@ void drawError(char *error) {
}
// ********************************************************************************************
-static DefaultTimerManager *_int_timer = NULL;
static Uint32 timer_handler_wrapper(Uint32 interval) {
- _int_timer->handler();
+ DefaultTimerManager *tm = (DefaultTimerManager *)g_system->getTimerManager();
+ tm->handler();
return interval;
}
@@ -379,21 +380,7 @@ void OSystem_WINCE3::initBackend() {
((WINCESdlEventSource *)_eventSource)->init((WINCESdlGraphicsManager *)_graphicsManager);
-
- // FIXME: This timer manager is *not accesible* from the outside.
- // Instead the timer manager setup by OSystem_SDL is visible on the outside.
- // Since the WinCE backend actually seems to work, my guess is that
- // SDL_AddTimer works after all and the following code is redundant.
- // However it may be, this must be resolved one way or another.
-
- // Create the timer. CE SDL does not support multiple timers (SDL_AddTimer).
- // We work around this by using the SetTimer function, since we only use
- // one timer in scummvm (for the time being)
- _int_timer = new DefaultTimerManager();
- //_timerID = NULL; // OSystem_SDL will call removetimer with this, it's ok
- SDL_SetTimer(10, &timer_handler_wrapper);
-
- // Chain init
+ // Call parent implementation of this method
OSystem_SDL::initBackend();
// Initialize global key mapping
@@ -404,9 +391,6 @@ void OSystem_WINCE3::initBackend() {
GUI_Actions::Instance()->saveMapping(); // write defaults
}
- // Call parent implementation of this method
- //OSystem_SDL::initBackend();
-
_inited = true;
}
@@ -555,6 +539,24 @@ void OSystem_WINCE3::initSDL() {
}
}
+void OSystem_WINCE3::init() {
+ // Create SdlMutexManager instance as the TimerManager relies on the
+ // MutexManager being already initialized
+ if (_mutexManager == 0)
+ _mutexManager = new SdlMutexManager();
+
+ // Create the timer. CE SDL does not support multiple timers (SDL_AddTimer).
+ // We work around this by using the SetTimer function, since we only use
+ // one timer in scummvm (for the time being)
+ if (_timerManager == 0) {
+ _timerManager = new DefaultTimerManager();
+ SDL_SetTimer(10, &timer_handler_wrapper);
+ }
+
+ // Call parent implementation of this method
+ OSystem_SDL::init();
+}
+
void OSystem_WINCE3::quit() {
fclose(stdout_file);
fclose(stderr_file);
@@ -578,6 +580,73 @@ void OSystem_WINCE3::getTimeAndDate(TimeDate &t) const {
t.tm_sec = systime.wSecond;
}
+Common::String OSystem_WINCE3::getSystemLanguage() const {
+#ifdef USE_DETECTLANG
+ // We can not use "setlocale" (at least not for MSVC builds), since it
+ // will return locales like: "English_USA.1252", thus we need a special
+ // way to determine the locale string for Win32.
+ char langName[9];
+ char ctryName[9];
+ TCHAR langNameW[32];
+ TCHAR ctryNameW[32];
+ int i = 0;
+ bool localeFound = false;
+ Common::String localeName;
+
+ // Really not nice, but the only way to map Windows CE language/country codes to posix NLS names,
+ // because Windows CE doesn't support LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME,
+ // according to this: http://msdn.microsoft.com/en-us/library/aa912934.aspx
+ //
+ // See http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx for a translation table
+ // This table has to be updated manually when new translations are added
+ const char *posixMappingTable[][3] = {
+ {"CAT", "ESP", "ca_ES"},
+ {"CSY", "CZE", "cs_CZ"},
+ {"DAN", "DNK", "da_DA"},
+ {"DEU", "DEU", "de_DE"},
+ {"ESN", "ESP", "es_ES"},
+ {"ESP", "ESP", "es_ES"},
+ {"FRA", "FRA", "fr_FR"},
+ {"HUN", "HUN", "hu_HU"},
+ {"ITA", "ITA", "it_IT"},
+ {"NOR", "NOR", "nb_NO"},
+ {"NON", "NOR", "nn_NO"},
+ {"PLK", "POL", "pl_PL"},
+ {"PTB", "BRA", "pt_BR"},
+ {"RUS", "RUS", "ru_RU"},
+ {"SVE", "SWE", "se_SE"},
+ {"UKR", "UKR", "uk_UA"},
+ {NULL, NULL, NULL}
+ };
+
+ if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME, langNameW, sizeof(langNameW)) != 0 &&
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVCTRYNAME, ctryNameW, sizeof(ctryNameW)) != 0) {
+ WideCharToMultiByte(CP_ACP, 0, langNameW, -1, langName, (wcslen(langNameW) + 1), NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, ctryNameW, -1, ctryName, (wcslen(ctryNameW) + 1), NULL, NULL);
+
+ debug(1, "Trying to find posix locale name for %s_%s", langName, ctryName);
+ while (posixMappingTable[i][0] && !localeFound) {
+ if ( (!strcmp(posixMappingTable[i][0], langName) || !strcmp(posixMappingTable[i][0], "*")) &&
+ (!strcmp(posixMappingTable[i][1], ctryName) || !strcmp(posixMappingTable[i][0], "*")) ) {
+ localeFound = true;
+ localeName = posixMappingTable[i][2];
+ }
+ i++;
+ }
+ if (!localeFound) warning("No posix locale name found for %s_%s", langName, ctryName);
+ }
+
+ if (localeFound) {
+ debug(1, "Found posix locale name: %s", localeName.c_str());
+ return localeName;
+ } else {
+ return ModularBackend::getSystemLanguage();
+ }
+#else // USE_DETECTLANG
+ return ModularBackend::getSystemLanguage();
+#endif // USE_DETECTLANG
+}
+
int OSystem_WINCE3::_platformScreenWidth;
int OSystem_WINCE3::_platformScreenHeight;
bool OSystem_WINCE3::_isOzone;
diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h
index adb63eb936..b4f323c9e2 100644
--- a/backends/platform/wince/wince-sdl.h
+++ b/backends/platform/wince/wince-sdl.h
@@ -52,7 +52,10 @@ public:
void initBackend();
// Overloaded from SDL backend
+ void init();
void quit();
+ virtual Common::String getSystemLanguage() const;
+
// Overloaded from OSystem
void engineInit();
void getTimeAndDate(TimeDate &t) const;
diff --git a/backends/plugins/elf/elf-loader.cpp b/backends/plugins/elf/elf-loader.cpp
index b25bcf835b..4335ea6108 100644
--- a/backends/plugins/elf/elf-loader.cpp
+++ b/backends/plugins/elf/elf-loader.cpp
@@ -169,7 +169,7 @@ bool DLObject::loadSegment(Elf32_Phdr *phdr) {
warning("elfloader: Out of memory.");
return false;
}
-
+
debug(2, "elfloader: Allocated segment @ %p", _segment);
// Get offset to load segment into
@@ -222,7 +222,7 @@ Elf32_Shdr * DLObject::loadSectionHeaders(Elf32_Ehdr *ehdr) {
int DLObject::findSymbolTableSection(Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) {
int SymbolTableSection = -1;
-
+
// Loop over sections, looking for symbol table linked to a string table
for (uint32 i = 0; i < ehdr->e_shnum; i++) {
if (shdr[i].sh_type == SHT_SYMTAB &&
@@ -233,7 +233,7 @@ int DLObject::findSymbolTableSection(Elf32_Ehdr *ehdr, Elf32_Shdr *shdr) {
break;
}
}
-
+
return SymbolTableSection;
}
@@ -315,12 +315,12 @@ void DLObject::relocateSymbols(ptrdiff_t offset) {
}
// Track the size of the plugin through memory manager without loading
-// the plugin into memory.
+// the plugin into memory.
//
void DLObject::trackSize(const char *path) {
-
+
_file = Common::FSNode(path).createReadStream();
-
+
if (!_file) {
warning("elfloader: File %s not found.", path);
return;
@@ -334,11 +334,11 @@ void DLObject::trackSize(const char *path) {
_file = 0;
return;
}
-
+
ELFMemMan.trackPlugin(true); // begin tracking the plugin size
-
+
// Load the segments
- for (uint32 i = 0; i < ehdr.e_phnum; i++) {
+ for (uint32 i = 0; i < ehdr.e_phnum; i++) {
debug(2, "elfloader: Loading segment %d", i);
if (!readProgramHeaders(&ehdr, &phdr, i)) {
@@ -351,7 +351,7 @@ void DLObject::trackSize(const char *path) {
ELFMemMan.trackAlloc(phdr.p_align, phdr.p_memsz);
}
}
-
+
ELFMemMan.trackPlugin(false); // we're done tracking the plugin size
delete _file;
@@ -367,7 +367,7 @@ bool DLObject::load() {
return false;
//Load the segments
- for (uint32 i = 0; i < ehdr.e_phnum; i++) {
+ for (uint32 i = 0; i < ehdr.e_phnum; i++) {
debug(2, "elfloader: Loading segment %d", i);
if (readProgramHeaders(&ehdr, &phdr, i) == false)
@@ -386,12 +386,12 @@ bool DLObject::load() {
free(shdr);
return false;
}
-
+
if (!loadStringTable(shdr)) {
free(shdr);
return false;
}
-
+
// Offset by our segment allocated address
// must use _segmentVMA here for multiple segments (MIPS)
_segmentOffset = ptrdiff_t(_segment) - _segmentVMA;
diff --git a/backends/plugins/elf/elf-provider.cpp b/backends/plugins/elf/elf-provider.cpp
index 480f7068c4..84054f44cb 100644
--- a/backends/plugins/elf/elf-provider.cpp
+++ b/backends/plugins/elf/elf-provider.cpp
@@ -100,7 +100,7 @@ DynamicPlugin::VoidFunc ELFPlugin::findSymbol(const char *symbol) {
void ELFPlugin::trackSize() {
// All we need to do is create our object, track its size, then delete it
DLObject *obj = makeDLObject();
-
+
obj->trackSize(_filename.c_str());
delete obj;
}
@@ -180,7 +180,7 @@ void ELFPlugin::unloadPlugin() {
PluginList ELFPluginProvider::getPlugins() {
PluginList pl = FilePluginProvider::getPlugins();
-#if defined(UNCACHED_PLUGINS) && !defined(ELF_NO_MEM_MANAGER)
+#if defined(UNCACHED_PLUGINS) && !defined(ELF_NO_MEM_MANAGER)
// This static downcast is safe because all of the plugins must
// be ELF plugins
for (PluginList::iterator p = pl.begin(); p != pl.end(); ++p) {
@@ -190,8 +190,8 @@ PluginList ELFPluginProvider::getPlugins() {
// The Memory Manager should now allocate space based on the information
// it collected
ELFMemMan.allocateHeap();
-#endif
-
+#endif
+
return pl;
}
diff --git a/backends/plugins/elf/memory-manager.cpp b/backends/plugins/elf/memory-manager.cpp
index 39f5e9071d..058d818dc4 100644
--- a/backends/plugins/elf/memory-manager.cpp
+++ b/backends/plugins/elf/memory-manager.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "common/scummsys.h"
+#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
@@ -28,12 +28,14 @@
#include "common/debug.h"
#include "common/util.h"
#include <malloc.h>
-
-DECLARE_SINGLETON(ELFMemoryManager);
-ELFMemoryManager::ELFMemoryManager() :
- _heap(0), _heapSize(0), _heapAlign(0),
- _trackAllocs(false), _measuredSize(0), _measuredAlign(0),
+namespace Common {
+DECLARE_SINGLETON(ELFMemoryManager);
+}
+
+ELFMemoryManager::ELFMemoryManager() :
+ _heap(0), _heapSize(0), _heapAlign(0),
+ _trackAllocs(false), _measuredSize(0), _measuredAlign(0),
_bytesAllocated(0) {}
ELFMemoryManager::~ELFMemoryManager() {
@@ -46,23 +48,23 @@ void ELFMemoryManager::trackPlugin(bool value) {
if (value == _trackAllocs)
return;
-
+
_trackAllocs = value;
-
+
if (_trackAllocs) { // start measuring
// start tracking allocations
_measuredAlign = 0;
-
+
} else { // we're done measuring
// get the total allocated size
uint32 measuredSize = _allocList.back().end() - _allocList.front().start;
_heapSize = MAX(_heapSize, measuredSize);
_heapAlign = MAX(_heapAlign, _measuredAlign);
-
+
_allocList.clear();
_bytesAllocated = 0; // reset
-
+
debug(2, "measured a plugin of size %d. Max size %d. Max align %d", measuredSize, _heapSize, _heapAlign);
}
}
@@ -70,7 +72,7 @@ void ELFMemoryManager::trackPlugin(bool value) {
void ELFMemoryManager::trackAlloc(uint32 align, uint32 size) {
if (!_measuredAlign)
_measuredAlign = align;
-
+
// use the allocate function to simulate allocation
allocateOnHeap(align, size);
}
@@ -79,20 +81,20 @@ void ELFMemoryManager::allocateHeap() {
// The memory manager should only allocate once
assert (!_heap);
assert (_heapSize);
-
+
// clear the list
_allocList.clear();
_bytesAllocated = 0;
-
+
debug(2, "ELFMemoryManager: allocating %d bytes aligned at %d as the \
plugin heap", _heapSize, _heapAlign);
-
+
// prepare the heap
- if (_heapAlign)
+ if (_heapAlign)
_heap = ::memalign(_heapAlign, _heapSize);
else
_heap = ::malloc(_heapSize);
-
+
assert(_heap);
}
@@ -106,7 +108,7 @@ void *ELFMemoryManager::pluginAllocate(uint32 size) {
void *ELFMemoryManager::pluginAllocate(uint32 align, uint32 size) {
if (_heap) {
return allocateOnHeap(align, size);
- }
+ }
return ::memalign(align, size);
}
@@ -120,16 +122,16 @@ void ELFMemoryManager::pluginDeallocate(void *ptr) {
// Allocate space for the request in our heap
void *ELFMemoryManager::allocateOnHeap(uint32 align, uint32 size) {
byte *lastAddress = (byte *)_heap;
-
+
// We can't allow allocations smaller than sizeof(Allocation). This could
- // only be from non-plugin allocations and would cause infinite recursion
+ // only be from non-plugin allocations and would cause infinite recursion
// when allocating our Allocation in the list.
if (size <= sizeof(Allocation))
return 0;
-
+
Common::List<Allocation>::iterator i;
for (i = _allocList.begin(); i != _allocList.end(); i++) {
- if (i->start - lastAddress > (int)size)
+ if (i->start - lastAddress > (int)size)
break;
lastAddress = i->end();
// align to desired alignment
@@ -137,20 +139,20 @@ void *ELFMemoryManager::allocateOnHeap(uint32 align, uint32 size) {
lastAddress = (byte *)( ((uint32)lastAddress + align - 1) & ~(align - 1) );
}
}
-
+
// Check if we exceeded our heap limit
// We skip this case if we're only tracking allocations
if (!_trackAllocs && ((uint32)lastAddress + size > (uint32)_heap + _heapSize)) {
debug(2, "failed to find space to allocate %d bytes", size);
return 0;
}
-
+
_allocList.insert(i, Allocation(lastAddress, size));
_bytesAllocated += size;
-
- debug(7, "ELFMemoryManager: allocated %d bytes at %p. Total %d bytes",
+
+ debug(7, "ELFMemoryManager: allocated %d bytes at %p. Total %d bytes",
size, lastAddress, _bytesAllocated);
-
+
return lastAddress;
}
@@ -159,14 +161,14 @@ void ELFMemoryManager::deallocateFromHeap(void *ptr) {
for (i = _allocList.begin(); i != _allocList.end(); i++) {
if (i->start == ptr) {
_bytesAllocated -= (*i).size;
-
- debug(7, "ELFMemoryManager: freed %d bytes at %p. Total %d bytes",
+
+ debug(7, "ELFMemoryManager: freed %d bytes at %p. Total %d bytes",
(*i).size, (*i).start, _bytesAllocated);
-
+
_allocList.erase(i);
break;
}
- }
+ }
}
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */
diff --git a/backends/plugins/elf/memory-manager.h b/backends/plugins/elf/memory-manager.h
index ac70e5e3bb..032ecb2be5 100644
--- a/backends/plugins/elf/memory-manager.h
+++ b/backends/plugins/elf/memory-manager.h
@@ -30,17 +30,17 @@
#include "common/singleton.h"
#include "common/list.h"
#include "common/mutex.h"
-
+
/**
- * A 'foolproof' way to prevent memory fragmentation. This class is used to
- * serve as a permanent allocation to prevent the process of loading and
+ * A 'foolproof' way to prevent memory fragmentation. This class is used to
+ * serve as a permanent allocation to prevent the process of loading and
* unloading plugins from causing heavy fragmentation.
**/
-
+
#define ELFMemMan ELFMemoryManager::instance()
-
+
class ELFMemoryManager : public Common::Singleton<ELFMemoryManager> {
-public:
+public:
void trackPlugin(bool value);
void trackAlloc(uint32 align, uint32 size);
@@ -49,7 +49,7 @@ public:
void *pluginAllocate(uint32 size);
void *pluginAllocate(uint32 align, uint32 size);
void pluginDeallocate(void *ptr);
-
+
private:
friend class Common::Singleton<ELFMemoryManager>;
@@ -58,7 +58,7 @@ private:
void *allocateOnHeap(uint32 align, uint32 size);
void deallocateFromHeap(void *ptr);
-
+
struct Allocation {
byte *start;
uint32 size;
@@ -70,17 +70,17 @@ private:
void *_heap;
uint32 _heapAlign; // alignment of the heap
uint32 _heapSize; // size of the heap
-
+
// tracking allocations
bool _trackAllocs; // whether we are currently tracking
- uint32 _measuredSize;
- uint32 _measuredAlign;
-
+ uint32 _measuredSize;
+ uint32 _measuredAlign;
+
// real allocations
Common::List<Allocation> _allocList;
uint32 _bytesAllocated;
};
-
+
#endif /* defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER) */
#endif /* ELF_MEMORY_MANAGER_H */
diff --git a/backends/plugins/elf/mips-loader.cpp b/backends/plugins/elf/mips-loader.cpp
index 8ce1a69583..e043c9647f 100644
--- a/backends/plugins/elf/mips-loader.cpp
+++ b/backends/plugins/elf/mips-loader.cpp
@@ -53,7 +53,7 @@ bool MIPSDLObject::relocate(Elf32_Off offset, Elf32_Word size, byte *relSegment)
debug(2, "elfloader: Loaded relocation table. %d entries. base address=%p", cnt, relSegment);
Elf32_Addr adjustedMainSegment = Elf32_Addr(_segment) - _segmentVMA; // adjust for VMA offset
-
+
bool seenHi16 = false; // For treating HI/LO16 commands
int32 firstHi16 = -1; // Mark the point of the first hi16 seen
Elf32_Addr ahl = 0; // Calculated addend
@@ -259,7 +259,7 @@ void MIPSDLObject::relocateSymbols(ptrdiff_t offset) {
if (!ShortsMan.inGeneralSegment((char *)s->st_value)) {
if (s->st_value < _segmentVMA)
s->st_value = _segmentVMA; // deal with symbols referring to sections, which start before the VMA
-
+
s->st_value += offset;
if (s->st_value < Elf32_Addr(_segment) || s->st_value > Elf32_Addr(_segment) + _segmentSize)
@@ -287,7 +287,7 @@ bool MIPSDLObject::loadSegment(Elf32_Phdr *phdr) {
}
debug(2, "elfloader: Allocated segment @ %p", _segment);
-
+
// Get offset to load segment into
baseAddress = _segment;
_segmentSize = phdr->p_memsz;
diff --git a/backends/plugins/elf/shorts-segment-manager.cpp b/backends/plugins/elf/shorts-segment-manager.cpp
index b3a9531c2d..caa328a4f2 100644
--- a/backends/plugins/elf/shorts-segment-manager.cpp
+++ b/backends/plugins/elf/shorts-segment-manager.cpp
@@ -33,7 +33,9 @@ extern char __plugin_hole_start; // Indicates start of hole in program file for
extern char __plugin_hole_end; // Indicates end of hole in program file
extern char _gp[]; // Value of gp register
+namespace Common {
DECLARE_SINGLETON(ShortSegmentManager); // For singleton
+}
ShortSegmentManager::ShortSegmentManager() {
_shortsStart = &__plugin_hole_start ; //shorts segment begins at the plugin hole we made when linking
diff --git a/backends/taskbar/unity/unity-taskbar.cpp b/backends/taskbar/unity/unity-taskbar.cpp
new file mode 100644
index 0000000000..da053734d2
--- /dev/null
+++ b/backends/taskbar/unity/unity-taskbar.cpp
@@ -0,0 +1,114 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#include "common/scummsys.h"
+
+#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+
+#include "backends/taskbar/unity/unity-taskbar.h"
+
+#include "common/textconsole.h"
+
+#include <unity.h>
+
+UnityTaskbarManager::UnityTaskbarManager() {
+ g_type_init();
+
+ _loop = g_main_loop_new(NULL, FALSE);
+
+ _launcher = unity_launcher_entry_get_for_desktop_id("scummvm.desktop");
+}
+
+UnityTaskbarManager::~UnityTaskbarManager() {
+ g_main_loop_unref(_loop);
+ _loop = NULL;
+}
+
+void UnityTaskbarManager::setProgressValue(int completed, int total) {
+ if (_launcher == NULL)
+ return;
+
+ double percentage = (double)completed / (double)total;
+ unity_launcher_entry_set_progress(_launcher, percentage);
+ unity_launcher_entry_set_progress_visible(_launcher, TRUE);
+}
+
+void UnityTaskbarManager::setProgressState(TaskbarProgressState state) {
+ if (_launcher == NULL)
+ return;
+
+ switch (state) {
+ default:
+ warning("[UnityTaskbarManager::setProgressState] Unknown state / Not implemented (%d)", state);
+ // fallback to noprogress state
+
+ case kTaskbarNoProgress:
+ unity_launcher_entry_set_progress_visible(_launcher, FALSE);
+ break;
+
+ // Unity only support two progress states as of 3.0: visible or not visible
+ // We show progress in all of those states
+ case kTaskbarIndeterminate:
+ case kTaskbarNormal:
+ case kTaskbarError:
+ case kTaskbarPaused:
+ unity_launcher_entry_set_progress_visible(_launcher, TRUE);
+ break;
+ }
+}
+
+void UnityTaskbarManager::addRecent(const Common::String &name, const Common::String &description) {
+ warning("[UnityTaskbarManager::addRecent] Not implemented");
+}
+
+void UnityTaskbarManager::setCount(int count) {
+ if (_launcher == NULL)
+ return;
+
+ unity_launcher_entry_set_count(_launcher, count);
+
+ unity_launcher_entry_set_count_visible(_launcher, (count == 0) ? FALSE : TRUE);
+}
+
+// Unity requires the glib event loop to the run to function properly
+// as events are sent asynchronously
+bool UnityTaskbarManager::pollEvent(Common::Event &event) {
+ if (!_loop)
+ return false;
+
+ // Get context
+ GMainContext *context = g_main_loop_get_context(_loop);
+ if (!context)
+ return false;
+
+ // Dispatch events
+ g_main_context_iteration(context, FALSE);
+
+ return false;
+}
+
+#endif
diff --git a/backends/taskbar/unity/unity-taskbar.h b/backends/taskbar/unity/unity-taskbar.h
new file mode 100644
index 0000000000..06ea0ca769
--- /dev/null
+++ b/backends/taskbar/unity/unity-taskbar.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.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef BACKEND_UNITY_TASKBAR_H
+#define BACKEND_UNITY_TASKBAR_H
+
+#if defined(POSIX) && defined(USE_TASKBAR) && defined(USE_TASKBAR_UNITY)
+
+#include "common/events.h"
+#include "common/str.h"
+#include "common/taskbar.h"
+
+typedef struct _GMainLoop GMainLoop;
+typedef struct _UnityLauncherEntry UnityLauncherEntry;
+
+class UnityTaskbarManager : public Common::TaskbarManager, public Common::EventSource {
+public:
+ UnityTaskbarManager();
+ virtual ~UnityTaskbarManager();
+
+ virtual void setProgressValue(int completed, int total);
+ virtual void setProgressState(TaskbarProgressState state);
+ virtual void addRecent(const Common::String &name, const Common::String &description);
+ virtual void setCount(int count);
+
+ // Implementation of the EventSource interface
+ virtual bool pollEvent(Common::Event &event);
+
+private:
+ GMainLoop *_loop;
+ UnityLauncherEntry *_launcher;
+};
+
+#endif
+
+#endif // BACKEND_UNITY_TASKBAR_H
diff --git a/backends/taskbar/win32/mingw-compat.h b/backends/taskbar/win32/mingw-compat.h
new file mode 100644
index 0000000000..30ce818141
--- /dev/null
+++ b/backends/taskbar/win32/mingw-compat.h
@@ -0,0 +1,154 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+// TODO: Remove header when the latest changes to the Windows SDK have been integrated into MingW
+// For reference, the interface definitions here are imported the SDK headers and from the
+// EcWin7 project (https://code.google.com/p/dukto/)
+
+#ifndef BACKEND_WIN32_TASKBAR_MINGW_H
+#define BACKEND_WIN32_TASKBAR_MINGW_H
+
+#if defined(WIN32)
+#if defined(__GNUC__)
+#ifdef __MINGW32__
+
+#ifdef _WIN32_WINNT
+ #undef _WIN32_WINNT
+#endif
+#define _WIN32_WINNT 0x0501
+#include <windows.h>
+#include <commctrl.h>
+#include <initguid.h>
+#include <shlwapi.h>
+#include <shlguid.h>
+#define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
+
+extern const GUID CLSID_ShellLink;
+
+// Shard enumeration value
+#define SHARD_LINK 0x00000006
+
+// Taskbar GUID definitions
+DEFINE_GUID(CLSID_TaskbarList,0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x0,0x60,0x97,0xc9,0xa0,0x90);
+DEFINE_GUID(IID_ITaskbarList3,0xea1afb91,0x9e28,0x4b86,0x90,0xE9,0x9e,0x9f,0x8a,0x5e,0xef,0xaf);
+DEFINE_GUID(IID_IPropertyStore,0x886d8eeb,0x8cf2,0x4446,0x8d,0x02,0xcd,0xba,0x1d,0xbd,0xcf,0x99);
+
+// Property key
+typedef struct _tagpropertykey {
+ GUID fmtid;
+ DWORD pid;
+} PROPERTYKEY;
+
+#define REFPROPERTYKEY const PROPERTYKEY &
+
+typedef struct tagPROPVARIANT PROPVARIANT;
+#define REFPROPVARIANT const PROPVARIANT &
+
+// Property store
+DECLARE_INTERFACE_(IPropertyStore, IUnknown) {
+ STDMETHOD (GetCount) (DWORD *cProps) PURE;
+ STDMETHOD (GetAt) (DWORD iProp, PROPERTYKEY *pkey) PURE;
+ STDMETHOD (GetValue) (REFPROPERTYKEY key, PROPVARIANT *pv) PURE;
+ STDMETHOD (SetValue) (REFPROPERTYKEY key, REFPROPVARIANT propvar) PURE;
+ STDMETHOD (Commit) (void) PURE;
+
+private:
+ ~IPropertyStore();
+};
+typedef IPropertyStore *LPIPropertyStore;
+
+// Mingw-specific defines for taskbar integration
+typedef enum THUMBBUTTONMASK {
+ THB_BITMAP = 0x1,
+ THB_ICON = 0x2,
+ THB_TOOLTIP = 0x4,
+ THB_FLAGS = 0x8
+} THUMBBUTTONMASK;
+
+typedef enum THUMBBUTTONFLAGS {
+ THBF_ENABLED = 0,
+ THBF_DISABLED = 0x1,
+ THBF_DISMISSONCLICK = 0x2,
+ THBF_NOBACKGROUND = 0x4,
+ THBF_HIDDEN = 0x8,
+ THBF_NONINTERACTIVE = 0x10
+} THUMBBUTTONFLAGS;
+
+typedef struct THUMBBUTTON {
+ THUMBBUTTONMASK dwMask;
+ UINT iId;
+ UINT iBitmap;
+ HICON hIcon;
+ WCHAR szTip[260];
+ THUMBBUTTONFLAGS dwFlags;
+} THUMBBUTTON;
+typedef struct THUMBBUTTON *LPTHUMBBUTTON;
+
+typedef enum TBPFLAG {
+ TBPF_NOPROGRESS = 0,
+ TBPF_INDETERMINATE = 0x1,
+ TBPF_NORMAL = 0x2,
+ TBPF_ERROR = 0x4,
+ TBPF_PAUSED = 0x8
+} TBPFLAG;
+
+// Taskbar interface
+DECLARE_INTERFACE_(ITaskbarList3, IUnknown) {
+ // IUnknown
+ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE;
+ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
+ STDMETHOD_(ULONG,Release) (THIS) PURE;
+ // ITaskbarList
+ STDMETHOD(HrInit) (THIS) PURE;
+ STDMETHOD(AddTab) (THIS_ HWND hwnd) PURE;
+ STDMETHOD(DeleteTab) (THIS_ HWND hwnd) PURE;
+ STDMETHOD(ActivateTab) (THIS_ HWND hwnd) PURE;
+ STDMETHOD(SetActiveAlt) (THIS_ HWND hwnd) PURE;
+ STDMETHOD (MarkFullscreenWindow) (THIS_ HWND hwnd, int fFullscreen) PURE;
+ // ITaskbarList3
+ STDMETHOD (SetProgressValue) (THIS_ HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
+ STDMETHOD (SetProgressState) (THIS_ HWND hwnd, TBPFLAG tbpFlags) PURE;
+ STDMETHOD (RegisterTab) (THIS_ HWND hwndTab, HWND hwndMDI) PURE;
+ STDMETHOD (UnregisterTab) (THIS_ HWND hwndTab) PURE;
+ STDMETHOD (SetTabOrder) (THIS_ HWND hwndTab, HWND hwndInsertBefore) PURE;
+ STDMETHOD (SetTabActive) (THIS_ HWND hwndTab, HWND hwndMDI, DWORD dwReserved) PURE;
+ STDMETHOD (ThumbBarAddButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE;
+ STDMETHOD (ThumbBarUpdateButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE;
+ STDMETHOD (ThumbBarSetImageList) (THIS_ HWND hwnd, HIMAGELIST himl) PURE;
+ STDMETHOD (SetOverlayIcon) (THIS_ HWND hwnd, HICON hIcon, LPCWSTR pszDescription) PURE;
+ STDMETHOD (SetThumbnailTooltip) (THIS_ HWND hwnd, LPCWSTR pszTip) PURE;
+ STDMETHOD (SetThumbnailClip) (THIS_ HWND hwnd, RECT *prcClip) PURE;
+
+private:
+ ~ITaskbarList3();
+};
+
+typedef ITaskbarList3 *LPITaskbarList3;
+
+#endif // __MINGW32__
+#endif // __GNUC__
+#endif // WIN32
+
+#endif // BACKEND_WIN32_TASKBAR_MINGW_H
diff --git a/backends/taskbar/win32/win32-taskbar.cpp b/backends/taskbar/win32/win32-taskbar.cpp
new file mode 100644
index 0000000000..04889f3dd7
--- /dev/null
+++ b/backends/taskbar/win32/win32-taskbar.cpp
@@ -0,0 +1,414 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+// We cannot use common/scummsys.h directly as it will include
+// windows.h and we need to do it by hand to allow excluded functions
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+
+#if defined(WIN32) && defined(USE_TASKBAR)
+
+// Needed for taskbar functions
+#if defined(__GNUC__)
+#ifdef __MINGW32__
+ #include "backends/taskbar/win32/mingw-compat.h"
+#else
+ #error Only compilation with MingW is supported
+#endif
+#else
+ // We need certain functions that are excluded by default
+ #undef NONLS
+ #undef NOICONS
+ #include <windows.h>
+ #if defined(ARRAYSIZE)
+ #undef ARRAYSIZE
+ #endif
+
+ // Default MSVC headers for ITaskbarList3 and IShellLink
+ #include <SDKDDKVer.h>
+#endif
+#include <shlobj.h>
+
+// For HWND
+#include <SDL_syswm.h>
+
+#include "common/scummsys.h"
+
+#include "backends/taskbar/win32/win32-taskbar.h"
+
+#include "common/config-manager.h"
+#include "common/textconsole.h"
+#include "common/file.h"
+
+// System.Title property key, values taken from http://msdn.microsoft.com/en-us/library/bb787584.aspx
+const PROPERTYKEY PKEY_Title = { /* fmtid = */ { 0xF29F85E0, 0x4FF9, 0x1068, { 0xAB, 0x91, 0x08, 0x00, 0x2B, 0x27, 0xB3, 0xD9 } }, /* propID = */ 2 };
+
+Win32TaskbarManager::Win32TaskbarManager() : _taskbar(NULL), _count(0), _icon(NULL) {
+ // Do nothing if not running on Windows 7 or later
+ if (!isWin7OrLater())
+ return;
+
+ CoInitialize(NULL);
+
+ // Try creating instance (on fail, _taskbar will contain NULL)
+ HRESULT hr = CoCreateInstance(CLSID_TaskbarList,
+ 0,
+ CLSCTX_INPROC_SERVER,
+ IID_ITaskbarList3,
+ reinterpret_cast<void**> (&(_taskbar)));
+
+ if (SUCCEEDED(hr)) {
+ // Initialize taskbar object
+ if (FAILED(_taskbar->HrInit())) {
+ _taskbar->Release();
+ _taskbar = NULL;
+ }
+ } else {
+ warning("[Win32TaskbarManager::init] Cannot create taskbar instance");
+ }
+}
+
+Win32TaskbarManager::~Win32TaskbarManager() {
+ if (_taskbar)
+ _taskbar->Release();
+ _taskbar = NULL;
+
+ if (_icon)
+ DestroyIcon(_icon);
+
+ CoUninitialize();
+}
+
+void Win32TaskbarManager::setOverlayIcon(const Common::String &name, const Common::String &description) {
+ //warning("[Win32TaskbarManager::setOverlayIcon] Setting overlay icon to: %s (%s)", name.c_str(), description.c_str());
+
+ if (_taskbar == NULL)
+ return;
+
+ if (name.empty()) {
+ _taskbar->SetOverlayIcon(getHwnd(), NULL, L"");
+ return;
+ }
+
+ // Compute full icon path
+ Common::String path = getIconPath(name);
+ if (path.empty())
+ return;
+
+ HICON pIcon = (HICON)::LoadImage(NULL, path.c_str(), IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
+ if (!pIcon) {
+ warning("[Win32TaskbarManager::setOverlayIcon] Cannot load icon!");
+ return;
+ }
+
+ // Sets the overlay icon
+ LPWSTR desc = ansiToUnicode(description.c_str());
+ _taskbar->SetOverlayIcon(getHwnd(), pIcon, desc);
+
+ DestroyIcon(pIcon);
+
+ delete[] desc;
+}
+
+void Win32TaskbarManager::setProgressValue(int completed, int total) {
+ if (_taskbar == NULL)
+ return;
+
+ _taskbar->SetProgressValue(getHwnd(), completed, total);
+}
+
+void Win32TaskbarManager::setProgressState(TaskbarProgressState state) {
+ if (_taskbar == NULL)
+ return;
+
+ _taskbar->SetProgressState(getHwnd(), (TBPFLAG)state);
+}
+
+void Win32TaskbarManager::setCount(int count) {
+ if (_taskbar == NULL)
+ return;
+
+ if (count == 0) {
+ _taskbar->SetOverlayIcon(getHwnd(), NULL, L"");
+ return;
+ }
+
+ // FIXME: This isn't really nice and could use a cleanup.
+ // The only good thing is that it doesn't use GDI+
+ // and thus does not have a dependancy on it,
+ // with the downside of being a lot more ugly.
+ // Maybe replace it by a Graphic::Surface, use
+ // ScummVM font drawing and extract the contents at
+ // the end?
+
+ if (_count != count || _icon == NULL) {
+ // Cleanup previous icon
+ _count = count;
+ if (_icon)
+ DestroyIcon(_icon);
+
+ Common::String countString = (count < 100 ? Common::String::format("%d", count) : "9+");
+
+ // Create transparent background
+ BITMAPV5HEADER bi;
+ ZeroMemory(&bi, sizeof(BITMAPV5HEADER));
+ bi.bV5Size = sizeof(BITMAPV5HEADER);
+ bi.bV5Width = 16;
+ bi.bV5Height = 16;
+ bi.bV5Planes = 1;
+ bi.bV5BitCount = 32;
+ bi.bV5Compression = BI_RGB;
+ // Set 32 BPP alpha format
+ bi.bV5RedMask = 0x00FF0000;
+ bi.bV5GreenMask = 0x0000FF00;
+ bi.bV5BlueMask = 0x000000FF;
+ bi.bV5AlphaMask = 0xFF000000;
+
+ // Get DC
+ HDC hdc;
+ hdc = GetDC(NULL);
+ HDC hMemDC = CreateCompatibleDC(hdc);
+ ReleaseDC(NULL, hdc);
+
+ // Create a bitmap mask
+ HBITMAP hBitmapMask = CreateBitmap(16, 16, 1, 1, NULL);
+
+ // Create the DIB section with an alpha channel
+ void *lpBits;
+ HBITMAP hBitmap = CreateDIBSection(hdc, (BITMAPINFO *)&bi, DIB_RGB_COLORS, (void **)&lpBits, NULL, 0);
+ HBITMAP hOldBitmap = (HBITMAP)SelectObject(hMemDC, hBitmap);
+
+ // Load the icon background
+ HICON hIconBackground = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(1002 /* IDI_COUNT */));
+ DrawIconEx(hMemDC, 0, 0, hIconBackground, 16, 16, 0, 0, DI_NORMAL);
+ DeleteObject(hIconBackground);
+
+ // Draw the count
+ LOGFONT lFont;
+ memset(&lFont, 0, sizeof(LOGFONT));
+ lFont.lfHeight = 10;
+ lFont.lfWeight = FW_BOLD;
+ lFont.lfItalic = 1;
+ strcpy(lFont.lfFaceName, "Arial");
+
+ HFONT hFont = CreateFontIndirect(&lFont);
+ SelectObject(hMemDC, hFont);
+
+ RECT rect;
+ SetRect(&rect, 4, 4, 12, 12);
+ SetTextColor(hMemDC, RGB(48, 48, 48));
+ SetBkMode(hMemDC, TRANSPARENT);
+ DrawText(hMemDC, countString.c_str(), -1, &rect, DT_NOCLIP|DT_CENTER);
+
+ // Set the text alpha to fully opaque (we consider the data inside the text rect)
+ DWORD *lpdwPixel = (DWORD *)lpBits;
+ for (int x = 3; x < 12; x++) {
+ for(int y = 3; y < 12; y++) {
+ unsigned char *p = (unsigned char *)(lpdwPixel + x * 16 + y);
+
+ if (p[0] != 0 && p[1] != 0 && p[2] != 0)
+ p[3] = 255;
+ }
+ }
+
+ // Cleanup DC
+ DeleteObject(hFont);
+ SelectObject(hMemDC, hOldBitmap);
+ DeleteDC(hMemDC);
+
+ // Prepare our new icon
+ ICONINFO ii;
+ ii.fIcon = FALSE;
+ ii.xHotspot = 0;
+ ii.yHotspot = 0;
+ ii.hbmMask = hBitmapMask;
+ ii.hbmColor = hBitmap;
+
+ _icon = CreateIconIndirect(&ii);
+
+ DeleteObject(hBitmap);
+ DeleteObject(hBitmapMask);
+
+ if (!_icon) {
+ warning("[Win32TaskbarManager::setCount] Cannot create icon for count");
+ return;
+ }
+ }
+
+ // Sets the overlay icon
+ LPWSTR desc = ansiToUnicode(Common::String::format("Found games: %d", count).c_str());
+ _taskbar->SetOverlayIcon(getHwnd(), _icon, desc);
+ delete[] desc;
+}
+
+void Win32TaskbarManager::addRecent(const Common::String &name, const Common::String &description) {
+ //warning("[Win32TaskbarManager::addRecent] Adding recent list entry: %s (%s)", name.c_str(), description.c_str());
+
+ if (_taskbar == NULL)
+ return;
+
+ // ANSI version doesn't seem to work correctly with Win7 jump lists, so explicitly use Unicode interface.
+ IShellLinkW *link;
+
+ // Get the ScummVM executable path.
+ WCHAR path[MAX_PATH];
+ GetModuleFileNameW(NULL, path, MAX_PATH);
+
+ // Create a shell link.
+ if (SUCCEEDED(CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC, IID_IShellLinkW, reinterpret_cast<void**> (&link)))) {
+ // Convert game name and description to Unicode.
+ LPWSTR game = ansiToUnicode(name.c_str());
+ LPWSTR desc = ansiToUnicode(description.c_str());
+
+ // Set link properties.
+ link->SetPath(path);
+ link->SetArguments(game);
+
+ Common::String iconPath = getIconPath(name);
+ if (iconPath.empty()) {
+ link->SetIconLocation(path, 0); // No game-specific icon available
+ } else {
+ LPWSTR icon = ansiToUnicode(iconPath.c_str());
+
+ link->SetIconLocation(icon, 0);
+
+ delete[] icon;
+ }
+
+ // The link's display name must be set via property store.
+ IPropertyStore* propStore;
+ HRESULT hr = link->QueryInterface(IID_IPropertyStore, reinterpret_cast<void**> (&(propStore)));
+ if (SUCCEEDED(hr)) {
+ PROPVARIANT pv;
+ pv.vt = VT_LPWSTR;
+ pv.pwszVal = desc;
+
+ hr = propStore->SetValue(PKEY_Title, pv);
+
+ propStore->Commit();
+ propStore->Release();
+ }
+
+ // SHAddToRecentDocs will cause the games to be added to the Recent list, allowing the user to pin them.
+ SHAddToRecentDocs(SHARD_LINK, link);
+ link->Release();
+ delete[] game;
+ delete[] desc;
+ }
+}
+
+Common::String Win32TaskbarManager::getIconPath(Common::String target) {
+ // We first try to look for a iconspath configuration variable then
+ // fallback to the extra path
+ //
+ // Icons can be either in a subfolder named "icons" or directly in the path
+
+ Common::String iconsPath = ConfMan.get("iconspath");
+ Common::String extraPath = ConfMan.get("extrapath");
+
+#define TRY_ICON_PATH(path) { \
+ Common::FSNode node((path)); \
+ if (node.exists()) \
+ return (path); \
+}
+
+ if (!iconsPath.empty()) {
+ TRY_ICON_PATH(iconsPath + "/" + target + ".ico");
+ TRY_ICON_PATH(iconsPath + "/" + ConfMan.get("gameid") + ".ico");
+ TRY_ICON_PATH(iconsPath + "/icons/" + target + ".ico");
+ TRY_ICON_PATH(iconsPath + "/icons/" + ConfMan.get("gameid") + ".ico");
+ }
+
+ if (!extraPath.empty()) {
+ TRY_ICON_PATH(extraPath + "/" + target + ".ico");
+ TRY_ICON_PATH(extraPath + "/" + ConfMan.get("gameid") + ".ico");
+ TRY_ICON_PATH(extraPath + "/icons/" + target + ".ico");
+ TRY_ICON_PATH(extraPath + "/icons/" + ConfMan.get("gameid") + ".ico");
+ }
+
+ return "";
+}
+
+// VerSetConditionMask and VerifyVersionInfo didn't appear until Windows 2000,
+// so we need to check for them at runtime
+LONGLONG VerSetConditionMaskFunc(ULONGLONG dwlConditionMask, DWORD dwTypeMask, BYTE dwConditionMask) {
+ typedef BOOL (WINAPI *VerSetConditionMaskFunction)(ULONGLONG conditionMask, DWORD typeMask, BYTE conditionOperator);
+
+ VerSetConditionMaskFunction verSetConditionMask = (VerSetConditionMaskFunction)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "VerSetConditionMask");
+ if (verSetConditionMask == NULL)
+ return 0;
+
+ return verSetConditionMask(dwlConditionMask, dwTypeMask, dwConditionMask);
+}
+
+BOOL VerifyVersionInfoFunc(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwTypeMask, DWORDLONG dwlConditionMask) {
+ typedef BOOL (WINAPI *VerifyVersionInfoFunction)(LPOSVERSIONINFOEXA versionInformation, DWORD typeMask, DWORDLONG conditionMask);
+
+ VerifyVersionInfoFunction verifyVersionInfo = (VerifyVersionInfoFunction)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "VerifyVersionInfoA");
+ if (verifyVersionInfo == NULL)
+ return FALSE;
+
+ return verifyVersionInfo(lpVersionInformation, dwTypeMask, dwlConditionMask);
+}
+
+bool Win32TaskbarManager::isWin7OrLater() {
+ OSVERSIONINFOEX versionInfo;
+ DWORDLONG conditionMask = 0;
+
+ ZeroMemory(&versionInfo, sizeof(OSVERSIONINFOEX));
+ versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
+ versionInfo.dwMajorVersion = 6;
+ versionInfo.dwMinorVersion = 1;
+
+ conditionMask = VerSetConditionMaskFunc(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
+ conditionMask = VerSetConditionMaskFunc(conditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
+
+ return VerifyVersionInfoFunc(&versionInfo, VER_MAJORVERSION | VER_MINORVERSION, conditionMask);
+}
+
+LPWSTR Win32TaskbarManager::ansiToUnicode(const char *s) {
+ DWORD size = MultiByteToWideChar(0, 0, s, -1, NULL, 0);
+
+ if (size > 0) {
+ LPWSTR result = new WCHAR[size];
+ if (MultiByteToWideChar(0, 0, s, -1, result, size) != 0)
+ return result;
+ }
+
+ return NULL;
+}
+
+HWND Win32TaskbarManager::getHwnd() {
+ SDL_SysWMinfo wmi;
+ SDL_VERSION(&wmi.version);
+
+ if(!SDL_GetWMInfo(&wmi))
+ return NULL;
+
+ return wmi.window;
+}
+
+#endif
diff --git a/backends/taskbar/win32/win32-taskbar.h b/backends/taskbar/win32/win32-taskbar.h
new file mode 100644
index 0000000000..c9d1761017
--- /dev/null
+++ b/backends/taskbar/win32/win32-taskbar.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.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef BACKEND_WIN32_TASKBAR_H
+#define BACKEND_WIN32_TASKBAR_H
+
+#if defined(WIN32) && defined(USE_TASKBAR)
+
+#include "common/str.h"
+#include "common/taskbar.h"
+
+struct ITaskbarList3;
+
+class Win32TaskbarManager : public Common::TaskbarManager {
+public:
+ Win32TaskbarManager();
+ virtual ~Win32TaskbarManager();
+
+ virtual void setOverlayIcon(const Common::String &name, const Common::String &description);
+ virtual void setProgressValue(int completed, int total);
+ virtual void setProgressState(TaskbarProgressState state);
+ virtual void setCount(int count);
+ virtual void addRecent(const Common::String &name, const Common::String &description);
+
+private:
+ ITaskbarList3 *_taskbar;
+
+ // Count handling
+ HICON _icon;
+ int _count;
+
+ /**
+ * Get the path to an icon for the game
+ *
+ * @param target The game target
+ *
+ * @return The icon path (or "" if no icon was found)
+ */
+ Common::String getIconPath(Common::String target);
+
+ // Helper functions
+ bool isWin7OrLater();
+ LPWSTR ansiToUnicode(const char *s);
+ HWND getHwnd();
+};
+
+#endif
+
+#endif // BACKEND_WIN32_TASKBAR_H
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp
index 5e4ce11fe4..58f0c468f6 100644
--- a/backends/vkeybd/virtual-keyboard-parser.cpp
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp
@@ -205,6 +205,9 @@ bool VirtualKeyboardParser::parserCallback_event(ParserNode *node) {
evt->type = VirtualKeyboard::kVKEventModifier;
byte *flags = (byte*) malloc(sizeof(byte));
+ if (!flags)
+ error("[VirtualKeyboardParser::parserCallback_event] Cannot allocate memory");
+
*(flags) = parseFlags(node->values["modifiers"]);
evt->data = flags;
@@ -217,6 +220,9 @@ bool VirtualKeyboardParser::parserCallback_event(ParserNode *node) {
evt->type = VirtualKeyboard::kVKEventSwitchMode;
String& mode = node->values["mode"];
char *str = (char*) malloc(sizeof(char) * mode.size() + 1);
+ if (!str)
+ error("[VirtualKeyboardParser::parserCallback_event] Cannot allocate memory");
+
memcpy(str, mode.c_str(), sizeof(char) * mode.size());
str[mode.size()] = 0;
evt->data = str;
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index e34cde4779..6550f60670 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -25,6 +25,8 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_exit
+#include <limits.h>
+
#include "engines/metaengine.h"
#include "base/commandLine.h"
#include "base/plugins.h"
@@ -63,6 +65,9 @@ static const char HELP_STRING[] =
" -z, --list-games Display list of supported games and exit\n"
" -t, --list-targets Display list of configured targets and exit\n"
" --list-saves=TARGET Display a list of savegames for the game (TARGET) specified\n"
+#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+ " --console Enable the console window (default:enabled)\n"
+#endif
"\n"
" -c, --config=CONFIG Use alternate configuration file\n"
" -p, --path=PATH Path to where the game is installed\n"
@@ -179,13 +184,15 @@ void registerDefaults() {
ConfMan.registerDefault("native_mt32", false);
ConfMan.registerDefault("enable_gs", false);
ConfMan.registerDefault("midi_gain", 100);
-// ConfMan.registerDefault("music_driver", ???);
+ ConfMan.registerDefault("music_driver", "auto");
ConfMan.registerDefault("mt32_device", "null");
ConfMan.registerDefault("gm_device", "null");
ConfMan.registerDefault("cdrom", 0);
+ ConfMan.registerDefault("enable_unsupported_game_warning", true);
+
// Game specific
ConfMan.registerDefault("path", "");
ConfMan.registerDefault("platform", Common::kPlatformPC);
@@ -227,13 +234,6 @@ void registerDefaults() {
ConfMan.registerDefault("record_temp_file_name", "record.tmp");
ConfMan.registerDefault("record_time_file_name", "record.time");
-#if 0
- // NEW CODE TO HIDE CONSOLE FOR WIN32
-#ifdef WIN32
- // console hiding for win32
- ConfMan.registerDefault("show_console", false);
-#endif
-#endif
}
//
@@ -262,17 +262,19 @@ void registerDefaults() {
if (!option) usage("Option '%s' requires an argument", argv[isLongCmd ? i : i-1]);
// Use this for options which have a required integer value
+// (we don't check ERANGE because WinCE doesn't support errno, so we're stuck just rejecting LONG_MAX/LONG_MIN..)
#define DO_OPTION_INT(shortCmd, longCmd) \
DO_OPTION(shortCmd, longCmd) \
- char *endptr = 0; \
- strtol(option, &endptr, 0); \
- if (endptr == NULL || *endptr != 0) usage("--%s: Invalid number '%s'", longCmd, option);
+ char *endptr; \
+ long int retval = strtol(option, &endptr, 0); \
+ if (*endptr != '\0' || retval == LONG_MAX || retval == LONG_MIN) \
+ usage("--%s: Invalid number '%s'", longCmd, option);
// Use this for boolean options; this distinguishes between "-x" and "-X",
// resp. between "--some-option" and "--no-some-option".
#define DO_OPTION_BOOL(shortCmd, longCmd) \
if (isLongCmd ? (!strcmp(s+2, longCmd) || !strcmp(s+2, "no-"longCmd)) : (tolower(s[1]) == shortCmd)) { \
- bool boolValue = (islower(s[1]) != 0); \
+ bool boolValue = (islower(static_cast<unsigned char>(s[1])) != 0); \
s += 2; \
if (isLongCmd) { \
boolValue = !strcmp(s, longCmd); \
@@ -548,14 +550,11 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
#endif
-#if 0
- // NEW CODE TO HIDE CONSOLE FOR WIN32
-#ifdef WIN32
- // console hiding for win32
- DO_LONG_OPTION_BOOL("show-console")
+#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
+ // Optional console window on Windows (default: enabled)
+ DO_LONG_OPTION_BOOL("console")
END_OPTION
#endif
-#endif
unknownOption:
// If we get till here, the option is unhandled and hence unknown.
@@ -663,7 +662,7 @@ static Common::Error listSaves(const char *target) {
" ---- ------------------------------------------------------\n");
for (SaveStateList::const_iterator x = saveList.begin(); x != saveList.end(); ++x) {
- printf(" %-4s %s\n", x->save_slot().c_str(), x->description().c_str());
+ printf(" %-4d %s\n", x->getSaveSlot(), x->getDescription().c_str());
// TODO: Could also iterate over the full hashmap, printing all key-value pairs
}
} else {
diff --git a/base/main.cpp b/base/main.cpp
index 906f4c9242..717ccb3344 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -333,7 +333,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
PluginManager::instance().init();
PluginManager::instance().loadAllPlugins(); // load plugins for cached plugin manager
-
+
// If we received an invalid music parameter via command line we check this here.
// We can't check this before loading the music plugins.
// On the other hand we cannot load the plugins before we know the file paths (in case of external plugins).
@@ -385,7 +385,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
system.getAudioCDManager();
MusicManager::instance();
Common::DebugManager::instance();
-
+
// Init the event manager. As the virtual keyboard is loaded here, it must
// take place after the backend is initiated and the screen has been setup
system.getEventManager()->init();
@@ -424,10 +424,10 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
PluginManager::instance().unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false);
// reallocate the config manager to get rid of any fragmentation
ConfMan.defragment();
- #endif
-
+ #endif
+
// Did an error occur ?
- if (result.getCode() != Common::kNoError) {
+ if (result.getCode() != Common::kNoError && result.getCode() != Common::kUserCanceled) {
// Shows an informative error dialog if starting the selected game failed.
GUI::displayErrorDialog(result, _("Error running game:"));
}
diff --git a/base/plugins.cpp b/base/plugins.cpp
index de135da946..8bb91aa338 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -106,6 +106,9 @@ public:
#if PLUGIN_ENABLED_STATIC(DRASCULA)
LINK_PLUGIN(DRASCULA)
#endif
+ #if PLUGIN_ENABLED_STATIC(DREAMWEB)
+ LINK_PLUGIN(DREAMWEB)
+ #endif
#if PLUGIN_ENABLED_STATIC(GOB)
LINK_PLUGIN(GOB)
#endif
@@ -313,7 +316,7 @@ PluginManager &PluginManager::instance() {
if (_instance)
return *_instance;
-#if defined(UNCACHED_PLUGINS) && defined(DYNAMIC_MODULES)
+#if defined(UNCACHED_PLUGINS) && defined(DYNAMIC_MODULES)
_instance = new PluginManagerUncached();
#else
_instance = new PluginManager();
@@ -348,7 +351,7 @@ void PluginManager::addPluginProvider(PluginProvider *pp) {
void PluginManagerUncached::init() {
unloadAllPlugins();
_allEnginePlugins.clear();
-
+
// Resize our pluginsInMem list to prevent fragmentation
_pluginsInMem[PLUGIN_TYPE_ENGINE].resize(2);
unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false); // empty the engine plugins
@@ -357,7 +360,7 @@ void PluginManagerUncached::init() {
pp != _providers.end();
++pp) {
PluginList pl((*pp)->getPlugins());
-
+
for (PluginList::iterator p = pl.begin(); p != pl.end(); ++p) {
// This is a 'hack' based on the assumption that we have no sound
// file plugins. Currently this is the case. If it changes, we
@@ -365,15 +368,15 @@ void PluginManagerUncached::init() {
// music or an engine plugin.
if ((*pp)->isFilePluginProvider()) {
_allEnginePlugins.push_back(*p);
- } else if ((*p)->loadPlugin()) { // and this is the proper method
+ } else if ((*p)->loadPlugin()) { // and this is the proper method
if ((*p)->getType() == PLUGIN_TYPE_ENGINE) {
(*p)->unloadPlugin();
_allEnginePlugins.push_back(*p);
} else { // add non-engine plugins to the 'in-memory' list
// these won't ever get unloaded
- addToPluginsInMemList(*p);
+ addToPluginsInMemList(*p);
}
- }
+ }
}
}
}
@@ -403,7 +406,7 @@ bool PluginManagerUncached::loadPluginFromGameId(const Common::String &gameId) {
bool PluginManagerUncached::loadPluginByFileName(const Common::String &filename) {
if (filename.empty())
return false;
-
+
unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false);
PluginList::iterator i;
@@ -417,7 +420,7 @@ bool PluginManagerUncached::loadPluginByFileName(const Common::String &filename)
return false;
}
-/**
+/**
* Update the config manager with a plugin file name that we found can handle
* the game.
**/
@@ -435,7 +438,7 @@ void PluginManagerUncached::updateConfigWithFileName(const Common::String &gameI
}
}
-void PluginManagerUncached::loadFirstPlugin() {
+void PluginManagerUncached::loadFirstPlugin() {
unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false);
// let's try to find one we can load
@@ -517,7 +520,7 @@ void PluginManager::addToPluginsInMemList(Plugin *plugin) {
bool found = false;
// The plugin is valid, see if it provides the same module as an
// already loaded one and should replace it.
-
+
PluginList::iterator pl = _pluginsInMem[plugin->getType()].begin();
while (!found && pl != _pluginsInMem[plugin->getType()].end()) {
if (!strcmp(plugin->getName(), (*pl)->getName())) {
@@ -540,9 +543,11 @@ void PluginManager::addToPluginsInMemList(Plugin *plugin) {
#include "engines/metaengine.h"
+namespace Common {
DECLARE_SINGLETON(EngineManager);
+}
-/**
+/**
* This function works for both cached and uncached PluginManagers.
* For the cached version, most of the logic here will short circuit.
*
@@ -554,24 +559,24 @@ GameDescriptor EngineManager::findGame(const Common::String &gameName, const Eng
// First look for the game using the plugins in memory. This is critical
// for calls coming from inside games
- result = findGameInLoadedPlugins(gameName, plugin);
+ result = findGameInLoadedPlugins(gameName, plugin);
if (!result.gameid().empty()) {
return result;
}
-
+
// Now look for the game using the gameId. This is much faster than scanning plugin
// by plugin
if (PluginMan.loadPluginFromGameId(gameName)) {
- result = findGameInLoadedPlugins(gameName, plugin);
+ result = findGameInLoadedPlugins(gameName, plugin);
if (!result.gameid().empty()) {
return result;
}
}
-
+
// We failed to find it using the gameid. Scan the list of plugins
PluginMan.loadFirstPlugin();
do {
- result = findGameInLoadedPlugins(gameName, plugin);
+ result = findGameInLoadedPlugins(gameName, plugin);
if (!result.gameid().empty()) {
// Update with new plugin file name
PluginMan.updateConfigWithFileName(gameName);
@@ -582,7 +587,7 @@ GameDescriptor EngineManager::findGame(const Common::String &gameName, const Eng
return result;
}
-/**
+/**
* Find the game within the plugins loaded in memory
**/
GameDescriptor EngineManager::findGameInLoadedPlugins(const Common::String &gameName, const EnginePlugin **plugin) const {
@@ -594,7 +599,7 @@ GameDescriptor EngineManager::findGameInLoadedPlugins(const Common::String &game
*plugin = 0;
EnginePlugin::List::const_iterator iter;
-
+
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
result = (**iter)->findGame(gameName.c_str());
if (!result.gameid().empty()) {
@@ -631,7 +636,9 @@ const EnginePlugin::List &EngineManager::getPlugins() const {
#include "audio/musicplugin.h"
+namespace Common {
DECLARE_SINGLETON(MusicManager);
+}
const MusicPlugin::List &MusicManager::getPlugins() const {
return (const MusicPlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_MUSIC);
diff --git a/base/plugins.h b/base/plugins.h
index a1ae734159..fffb5fb910 100644
--- a/base/plugins.h
+++ b/base/plugins.h
@@ -143,7 +143,7 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX];
// Abstract plugins
/**
- * Abstract base class for the plugin objects which handle plugins
+ * Abstract base class for the plugin objects which handle plugins
* instantiation. Subclasses for this may be used for engine plugins and other
* types of plugins. An existing PluginObject refers to an executable file
* loaded in memory and ready to run. The plugin, on the other hand, is just
@@ -310,7 +310,7 @@ protected:
bool tryLoadPlugin(Plugin *plugin);
void addToPluginsInMemList(Plugin *plugin);
-
+
static PluginManager *_instance;
PluginManager();
@@ -326,9 +326,9 @@ public:
virtual void init() {}
virtual void loadFirstPlugin() {}
virtual bool loadNextPlugin() { return false; }
- virtual bool loadPluginFromGameId(const Common::String &gameId) { return false; }
- virtual void updateConfigWithFileName(const Common::String &gameId) {}
-
+ virtual bool loadPluginFromGameId(const Common::String &gameId) { return false; }
+ virtual void updateConfigWithFileName(const Common::String &gameId) {}
+
// Functions used only by the cached PluginManager
virtual void loadAllPlugins();
void unloadAllPlugins();
@@ -338,7 +338,7 @@ public:
const PluginList &getPlugins(PluginType t) { return _pluginsInMem[t]; }
};
-/**
+/**
* Uncached version of plugin manager
* Keeps only one dynamic plugin in memory at a time
**/
@@ -349,15 +349,15 @@ protected:
PluginList::iterator _currentPlugin;
PluginManagerUncached() {}
- bool loadPluginByFileName(const Common::String &filename);
+ bool loadPluginByFileName(const Common::String &filename);
public:
virtual void init();
virtual void loadFirstPlugin();
virtual bool loadNextPlugin();
- virtual bool loadPluginFromGameId(const Common::String &gameId);
- virtual void updateConfigWithFileName(const Common::String &gameId);
-
+ virtual bool loadPluginFromGameId(const Common::String &gameId);
+ virtual void updateConfigWithFileName(const Common::String &gameId);
+
virtual void loadAllPlugins() {} // we don't allow this
};
diff --git a/base/version.cpp b/base/version.cpp
index 3083034714..c91698cba9 100644
--- a/base/version.cpp
+++ b/base/version.cpp
@@ -60,6 +60,11 @@ const char *gScummVMBuildDate = __DATE__ " " __TIME__;
const char *gScummVMVersionDate = SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
const char *gScummVMFeatures = ""
+#ifdef TAINTED_BUILD
+ // TAINTED means the build contains engines/subengines not enabled by default
+ "TAINTED "
+#endif
+
#ifdef USE_TREMOR
#ifdef USE_TREMOLO
// libTremolo is used on WinCE for better ogg performance
diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp
index eb22e1ea88..4441070050 100644
--- a/common/EventRecorder.cpp
+++ b/common/EventRecorder.cpp
@@ -27,10 +27,10 @@
#include "common/savefile.h"
#include "common/textconsole.h"
-DECLARE_SINGLETON(Common::EventRecorder);
-
namespace Common {
+DECLARE_SINGLETON(EventRecorder);
+
#define RECORD_SIGNATURE 0x54455354
#define RECORD_VERSION 1
diff --git a/common/archive.cpp b/common/archive.cpp
index 0ef3893a8c..102d7aaa3f 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -285,7 +285,7 @@ void SearchManager::clear() {
addDirectory(".", ".", -2);
}
-} // namespace Common
+DECLARE_SINGLETON(SearchManager);
-DECLARE_SINGLETON(Common::SearchManager);
+} // namespace Common
diff --git a/common/archive.h b/common/archive.h
index 3c75970d60..8400c56d69 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -143,7 +143,7 @@ class SearchSet : public Archive {
ArchiveNodeList::iterator find(const String &name);
ArchiveNodeList::const_iterator find(const String &name) const;
- // Add an archive keeping the list sorted by ascending priorities.
+ // Add an archive keeping the list sorted by descending priority.
void insert(const Node& node);
public:
diff --git a/common/array.h b/common/array.h
index 7ab4a1b042..e5434091fb 100644
--- a/common/array.h
+++ b/common/array.h
@@ -252,6 +252,13 @@ public:
_size = newSize;
}
+ void assign(const_iterator first, const_iterator last) {
+ resize(distance(first, last)); // FIXME: ineffective?
+ T *dst = _storage;
+ while (first != last)
+ *dst++ = *first++;
+ }
+
protected:
static uint roundUpCapacity(uint capacity) {
// Round up capacity to the next power of 2;
diff --git a/common/bitstream.cpp b/common/bitstream.cpp
new file mode 100644
index 0000000000..b41ad237e0
--- /dev/null
+++ b/common/bitstream.cpp
@@ -0,0 +1,217 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' BitStream implementation
+
+#include "common/bitstream.h"
+#include "common/memstream.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
+#include "common/util.h"
+
+namespace Common {
+
+BitStream::BitStream() {
+}
+
+BitStream::~BitStream() {
+}
+
+void BitStream::skip(uint32 n) {
+ while (n-- > 0)
+ getBit();
+}
+
+
+BitStreamBE::BitStreamBE(SeekableReadStream &stream, uint32 bitCount) : _value(0), _inValue(0) {
+ if ((bitCount % 8) != 0)
+ error("Big-endian bit stream size has to be divisible by 8");
+
+ // Read the number of bytes of the stream
+
+ uint32 byteSize = bitCount / 8;
+ byte *data = (byte *)malloc(byteSize);
+
+ if (stream.read(data, byteSize) != byteSize) {
+ free(data);
+ error("Bad BitStreamBE size");
+ }
+
+ _stream = new MemoryReadStream(data, byteSize, DisposeAfterUse::YES);
+}
+
+BitStreamBE::BitStreamBE(const byte *data, uint32 bitCount) : _value(0), _inValue(0) {
+ if ((bitCount % 8) != 0)
+ error("Big-endian bit stream size has to be divisible by 8");
+
+ // Copy the number of bytes from the data array
+
+ uint32 byteSize = bitCount / 8;
+ byte *dataN = (byte *)malloc(byteSize);
+
+ memcpy(dataN, data, byteSize);
+
+ _stream = new MemoryReadStream(dataN, byteSize, DisposeAfterUse::YES);
+}
+
+BitStreamBE::~BitStreamBE() {
+ delete _stream;
+}
+
+uint32 BitStreamBE::getBit() {
+ if (_inValue == 0) {
+ // Need to get new byte
+
+ if (_stream->eos())
+ error("End of bit stream reached");
+
+ _value = _stream->readByte();
+ }
+
+ // Get the current bit
+ int b = ((_value & 0x80) == 0) ? 0 : 1;
+
+ // Shift to the next bit
+ _value <<= 1;
+
+ // Increase the position within the current byte
+ _inValue = (_inValue + 1) % 8;
+
+ return b;
+}
+
+uint32 BitStreamBE::getBits(uint32 n) {
+ if (n > 32)
+ error("Too many bits requested to be read");
+
+ // Read the number of bits
+ uint32 v = 0;
+ while (n-- > 0)
+ v = (v << 1) | getBit();
+
+ return v;
+}
+
+void BitStreamBE::addBit(uint32 &x, uint32 n) {
+ x = (x << 1) | getBit();
+}
+
+uint32 BitStreamBE::pos() const {
+ if (_stream->pos() == 0)
+ return 0;
+
+ uint32 p = (_inValue == 0) ? _stream->pos() : (_stream->pos() - 1);
+ return p * 8 + _inValue;
+}
+
+uint32 BitStreamBE::size() const {
+ return _stream->size() * 8;
+}
+
+
+BitStream32LE::BitStream32LE(SeekableReadStream &stream, uint32 bitCount) : _value(0), _inValue(0) {
+ if ((bitCount % 32) != 0)
+ error("32bit little-endian bit stream size has to be divisible by 32");
+
+ // Read the number of bytes of the stream
+
+ uint32 byteSize = bitCount / 8;
+ byte *data = (byte *)malloc(byteSize);
+
+ if (stream.read(data, byteSize) != byteSize) {
+ free(data);
+ error("Bad BitStream32LE size");
+ }
+
+ _stream = new MemoryReadStream(data, byteSize, DisposeAfterUse::YES);
+}
+
+BitStream32LE::BitStream32LE(const byte *data, uint32 bitCount) : _value(0), _inValue(0) {
+ if ((bitCount % 32) != 0)
+ error("32bit little-endian bit stream size has to be divisible by 32");
+
+ // Copy the number of bytes from the data array
+
+ uint32 byteSize = bitCount / 8;
+ byte *dataN = (byte *)malloc(byteSize);
+
+ memcpy(dataN, data, byteSize);
+
+ _stream = new MemoryReadStream(dataN, byteSize, DisposeAfterUse::YES);
+}
+
+BitStream32LE::~BitStream32LE() {
+ delete _stream;
+}
+
+uint32 BitStream32LE::getBit() {
+ if (_inValue == 0) {
+ // Need to get new 32bit value
+
+ if (_stream->eos())
+ error("End of bit stream reached");
+
+ _value = _stream->readUint32LE();
+ }
+
+ // Get the current bit
+ int b = ((_value & 1) == 0) ? 0 : 1;
+
+ // Shift to the next bit
+ _value >>= 1;
+
+ // Increase the position within the current byte
+ _inValue = (_inValue + 1) % 32;
+
+ return b;
+}
+
+uint32 BitStream32LE::getBits(uint32 n) {
+ if (n > 32)
+ error("Too many bits requested to be read");
+
+ // Read the number of bits
+ uint32 v = 0;
+ for (uint32 i = 0; i < n; i++)
+ v = (v >> 1) | (((uint32) getBit()) << 31);
+
+ v >>= (32 - n);
+ return v;
+}
+
+void BitStream32LE::addBit(uint32 &x, uint32 n) {
+ x = (x & ~(1 << n)) | (getBit() << n);
+}
+
+uint32 BitStream32LE::pos() const {
+ if (_stream->pos() == 0)
+ return 0;
+
+ uint32 p = ((_inValue == 0) ? _stream->pos() : (_stream->pos() - 1)) & 0xFFFFFFFC;
+ return p * 8 + _inValue;
+}
+
+uint32 BitStream32LE::size() const {
+ return _stream->size() * 8;
+}
+
+} // End of namespace Common
diff --git a/common/bitstream.h b/common/bitstream.h
new file mode 100644
index 0000000000..7be0dccf45
--- /dev/null
+++ b/common/bitstream.h
@@ -0,0 +1,173 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' BitStream implementation
+
+#ifndef COMMON_BITSTREAM_H
+#define COMMON_BITSTREAM_H
+
+#include "common/scummsys.h"
+
+namespace Common {
+
+class SeekableReadStream;
+
+/**
+ * A bit stream, giving access to data one bit at a time.
+ *
+ * Used in engines:
+ * - scumm
+ */
+class BitStream {
+public:
+ BitStream();
+ virtual ~BitStream();
+
+ /** Read a bit from the bitstream. */
+ virtual uint32 getBit() = 0;
+
+ /** Read a number of bits, creating a multi-bit value. */
+ virtual uint32 getBits(uint32 n) = 0;
+
+ /** Add more bits, creating a multi-bit value in stages. */
+ virtual void addBit(uint32 &x, uint32 n) = 0;
+
+ /** Skip a number of bits. */
+ void skip(uint32 n);
+
+ /** Get the current position, in bits. */
+ virtual uint32 pos() const = 0;
+ /** Return the number of bits in the stream. */
+ virtual uint32 size() const = 0;
+};
+
+/**
+ * A big-endian bit stream.
+ *
+ * The input data is read one byte at a time. Their bits are handed out
+ * in the order of MSB to LSB. When all 8 bits of a byte have been consumed,
+ * another input data byte is read.
+ */
+class BitStreamBE : public BitStream {
+public:
+ /**
+ * Create a big endian bit stream.
+ *
+ * Reads and copies bitCount bits from the provided stream.
+ * Ownership of the stream is not transferred.
+ */
+ BitStreamBE(SeekableReadStream &stream, uint32 bitCount);
+
+ /**
+ * Create a big endian bit stream.
+ *
+ * Reads and copies bitCount bits from the provided data.
+ * Ownership of the data is not transferred.
+ */
+ BitStreamBE(const byte *data, uint32 bitCount);
+
+ ~BitStreamBE();
+
+ uint32 getBit();
+
+ /**
+ * Read a number of bits, creating a multi-bit value.
+ *
+ * The bits are read one at a time, in the order MSB to LSB and
+ * or'd together to create a multi-bit value.
+ */
+ uint32 getBits(uint32 n);
+
+ /**
+ * Add more bits, creating a multi-bit value in stages.
+ *
+ * Shifts in n new bits into the value x, in the order of MSB to LSB.
+ */
+ void addBit(uint32 &x, uint32 n);
+
+ uint32 pos() const;
+ uint32 size() const;
+
+private:
+ SeekableReadStream *_stream;
+
+ byte _value; ///< Current byte.
+ uint8 _inValue; ///< Position within the current byte.
+};
+
+/**
+ * A little-endian bit stream, reading 32bit values at a time.
+ *
+ * The input data is read one little-endian uint32 at a time. Their bits are
+ * handed out in the order of LSB to MSB. When all 8 bits of a byte have been
+ * consumed, another little-endian input data uint32 is read.
+ */
+class BitStream32LE : public BitStream {
+public:
+ /**
+ * Create a little-endian bit stream.
+ *
+ * Reads and copies bitCount bits from the provided stream.
+ * Ownership of the stream is not transferred.
+ */
+ BitStream32LE(SeekableReadStream &stream, uint32 bitCount);
+
+ /**
+ * Create a little-endian bit stream.
+ *
+ * Reads and copies bitCount bits from the provided data.
+ * Ownership of the data is not transferred.
+ */
+ BitStream32LE(const byte *data, uint32 bitCount);
+
+ ~BitStream32LE();
+
+ uint32 getBit();
+
+ /**
+ * Read a number of bits, creating a multi-bit value.
+ *
+ * The bits are read one at a time, in the order LSB to MSB and
+ * or'd together to create a multi-bit value.
+ */
+ uint32 getBits(uint32 n);
+
+ /**
+ * Add more bits, creating a multi-bit value in stages.
+ *
+ * Shifts in n new bits into the value x, in the order of LSB to MSB.
+ */
+ void addBit(uint32 &x, uint32 n);
+
+ uint32 pos() const;
+ uint32 size() const;
+
+private:
+ SeekableReadStream *_stream;
+
+ uint32 _value; ///< Current 32bit value.
+ uint8 _inValue; ///< Position within the current 32bit value.
+};
+
+} // End of namespace Common
+
+#endif // COMMON_BITSTREAM_H
diff --git a/common/config-file.cpp b/common/config-file.cpp
index 55941131ac..ea3feff8ae 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -38,7 +38,7 @@ namespace Common {
*/
bool ConfigFile::isValidName(const Common::String &name) {
const char *p = name.c_str();
- while (*p && (isalnum(*p) || *p == '-' || *p == '_' || *p == '.'))
+ while (*p && (isalnum(static_cast<unsigned char>(*p)) || *p == '-' || *p == '_' || *p == '.'))
p++;
return *p == 0;
}
@@ -116,7 +116,7 @@ bool ConfigFile::loadFromStream(SeekableReadStream &stream) {
// is, verify that it only consists of alphanumerics,
// periods, dashes and underscores). Mohawk Living Books games
// can have periods in their section names.
- while (*p && (isalnum(*p) || *p == '-' || *p == '_' || *p == '.'))
+ while (*p && (isalnum(static_cast<unsigned char>(*p)) || *p == '-' || *p == '_' || *p == '.'))
p++;
if (*p == '\0')
@@ -139,7 +139,7 @@ bool ConfigFile::loadFromStream(SeekableReadStream &stream) {
// Skip leading whitespaces
const char *t = line.c_str();
- while (isspace(*t))
+ while (isspace(static_cast<unsigned char>(*t)))
t++;
// Skip empty lines / lines with only whitespace
diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index 03fcb20abf..fbdb611f3c 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -27,17 +27,17 @@
#include "common/system.h"
#include "common/textconsole.h"
-DECLARE_SINGLETON(Common::ConfigManager);
-
static bool isValidDomainName(const Common::String &domName) {
const char *p = domName.c_str();
- while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
+ while (*p && (isalnum(static_cast<unsigned char>(*p)) || *p == '-' || *p == '_'))
p++;
return *p == 0;
}
namespace Common {
+DECLARE_SINGLETON(ConfigManager);
+
const char *ConfigManager::kApplicationDomain = "scummvm";
const char *ConfigManager::kTransientDomain = "__TRANSIENT";
@@ -187,7 +187,7 @@ void ConfigManager::loadFromStream(SeekableReadStream &stream) {
// Get the domain name, and check whether it's valid (that
// is, verify that it only consists of alphanumerics,
// dashes and underscores).
- while (*p && (isalnum(*p) || *p == '-' || *p == '_'))
+ while (*p && (isalnum(static_cast<unsigned char>(*p)) || *p == '-' || *p == '_'))
p++;
if (*p == '\0')
@@ -205,7 +205,7 @@ void ConfigManager::loadFromStream(SeekableReadStream &stream) {
// Skip leading whitespaces
const char *t = line.c_str();
- while (isspace(*t))
+ while (isspace(static_cast<unsigned char>(*t)))
t++;
// Skip empty lines / lines with only whitespace
@@ -491,11 +491,9 @@ int ConfigManager::getInt(const String &key, const String &domName) const {
bool ConfigManager::getBool(const String &key, const String &domName) const {
String value(get(key, domName));
-
- if ((value == "true") || (value == "yes") || (value == "1"))
- return true;
- if ((value == "false") || (value == "no") || (value == "0"))
- return false;
+ bool val;
+ if (Common::parseBool(value, val))
+ return val;
error("ConfigManager::getBool(%s,%s): '%s' is not a valid bool",
key.c_str(), domName.c_str(), value.c_str());
diff --git a/common/config-manager.h b/common/config-manager.h
index 6f3f554459..78a62b9808 100644
--- a/common/config-manager.h
+++ b/common/config-manager.h
@@ -147,7 +147,7 @@ public:
static void defragment(); // move in memory to reduce fragmentation
void copyFrom(ConfigManager &source);
-
+
private:
friend class Singleton<SingletonBaseType>;
ConfigManager();
diff --git a/common/cosinetables.cpp b/common/cosinetables.cpp
new file mode 100644
index 0000000000..30f55b55fc
--- /dev/null
+++ b/common/cosinetables.cpp
@@ -0,0 +1,8274 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' cosine tables
+
+#include "common/cosinetables.h"
+#include "common/scummsys.h"
+
+namespace Common {
+
+static const float cosTable16[8] = {
+ 1.000000f, 0.923880f, 0.707107f, 0.382683f, 0.000000f, 0.382683f, 0.707107f, 0.923880f
+};
+
+static const float cosTable32[16] = {
+ 1.000000f, 0.980785f, 0.923880f, 0.831470f, 0.707107f, 0.555570f, 0.382683f, 0.195090f,
+ 0.000000f, 0.195090f, 0.382683f, 0.555570f, 0.707107f, 0.831470f, 0.923880f, 0.980785f
+};
+
+static const float cosTable64[32] = {
+ 1.000000f, 0.995185f, 0.980785f, 0.956940f, 0.923880f, 0.881921f, 0.831470f, 0.773010f,
+ 0.707107f, 0.634393f, 0.555570f, 0.471397f, 0.382683f, 0.290285f, 0.195090f, 0.098017f,
+ 0.000000f, 0.098017f, 0.195090f, 0.290285f, 0.382683f, 0.471397f, 0.555570f, 0.634393f,
+ 0.707107f, 0.773010f, 0.831470f, 0.881921f, 0.923880f, 0.956940f, 0.980785f, 0.995185f
+};
+
+static const float cosTable128[64] = {
+ 1.000000f, 0.998795f, 0.995185f, 0.989177f, 0.980785f, 0.970031f, 0.956940f, 0.941544f,
+ 0.923880f, 0.903989f, 0.881921f, 0.857729f, 0.831470f, 0.803208f, 0.773010f, 0.740951f,
+ 0.707107f, 0.671559f, 0.634393f, 0.595699f, 0.555570f, 0.514103f, 0.471397f, 0.427555f,
+ 0.382683f, 0.336890f, 0.290285f, 0.242980f, 0.195090f, 0.146730f, 0.098017f, 0.049068f,
+ 0.000000f, 0.049068f, 0.098017f, 0.146730f, 0.195090f, 0.242980f, 0.290285f, 0.336890f,
+ 0.382683f, 0.427555f, 0.471397f, 0.514103f, 0.555570f, 0.595699f, 0.634393f, 0.671559f,
+ 0.707107f, 0.740951f, 0.773010f, 0.803208f, 0.831470f, 0.857729f, 0.881921f, 0.903989f,
+ 0.923880f, 0.941544f, 0.956940f, 0.970031f, 0.980785f, 0.989177f, 0.995185f, 0.998795f
+};
+
+static const float cosTable256[128] = {
+ 1.000000f, 0.999699f, 0.998795f, 0.997290f, 0.995185f, 0.992480f, 0.989177f, 0.985278f,
+ 0.980785f, 0.975702f, 0.970031f, 0.963776f, 0.956940f, 0.949528f, 0.941544f, 0.932993f,
+ 0.923880f, 0.914210f, 0.903989f, 0.893224f, 0.881921f, 0.870087f, 0.857729f, 0.844854f,
+ 0.831470f, 0.817585f, 0.803208f, 0.788346f, 0.773010f, 0.757209f, 0.740951f, 0.724247f,
+ 0.707107f, 0.689541f, 0.671559f, 0.653173f, 0.634393f, 0.615232f, 0.595699f, 0.575808f,
+ 0.555570f, 0.534998f, 0.514103f, 0.492898f, 0.471397f, 0.449611f, 0.427555f, 0.405241f,
+ 0.382683f, 0.359895f, 0.336890f, 0.313682f, 0.290285f, 0.266713f, 0.242980f, 0.219101f,
+ 0.195090f, 0.170962f, 0.146730f, 0.122411f, 0.098017f, 0.073565f, 0.049068f, 0.024541f,
+ 0.000000f, 0.024541f, 0.049068f, 0.073565f, 0.098017f, 0.122411f, 0.146730f, 0.170962f,
+ 0.195090f, 0.219101f, 0.242980f, 0.266713f, 0.290285f, 0.313682f, 0.336890f, 0.359895f,
+ 0.382683f, 0.405241f, 0.427555f, 0.449611f, 0.471397f, 0.492898f, 0.514103f, 0.534998f,
+ 0.555570f, 0.575808f, 0.595699f, 0.615232f, 0.634393f, 0.653173f, 0.671559f, 0.689541f,
+ 0.707107f, 0.724247f, 0.740951f, 0.757209f, 0.773010f, 0.788346f, 0.803208f, 0.817585f,
+ 0.831470f, 0.844854f, 0.857729f, 0.870087f, 0.881921f, 0.893224f, 0.903989f, 0.914210f,
+ 0.923880f, 0.932993f, 0.941544f, 0.949528f, 0.956940f, 0.963776f, 0.970031f, 0.975702f,
+ 0.980785f, 0.985278f, 0.989177f, 0.992480f, 0.995185f, 0.997290f, 0.998795f, 0.999699f
+};
+
+static const float cosTable512[256] = {
+ 1.000000f, 0.999925f, 0.999699f, 0.999322f, 0.998795f, 0.998118f, 0.997290f, 0.996313f,
+ 0.995185f, 0.993907f, 0.992480f, 0.990903f, 0.989177f, 0.987301f, 0.985278f, 0.983105f,
+ 0.980785f, 0.978317f, 0.975702f, 0.972940f, 0.970031f, 0.966976f, 0.963776f, 0.960431f,
+ 0.956940f, 0.953306f, 0.949528f, 0.945607f, 0.941544f, 0.937339f, 0.932993f, 0.928506f,
+ 0.923880f, 0.919114f, 0.914210f, 0.909168f, 0.903989f, 0.898674f, 0.893224f, 0.887640f,
+ 0.881921f, 0.876070f, 0.870087f, 0.863973f, 0.857729f, 0.851355f, 0.844854f, 0.838225f,
+ 0.831470f, 0.824589f, 0.817585f, 0.810457f, 0.803208f, 0.795837f, 0.788346f, 0.780737f,
+ 0.773010f, 0.765167f, 0.757209f, 0.749136f, 0.740951f, 0.732654f, 0.724247f, 0.715731f,
+ 0.707107f, 0.698376f, 0.689541f, 0.680601f, 0.671559f, 0.662416f, 0.653173f, 0.643832f,
+ 0.634393f, 0.624860f, 0.615232f, 0.605511f, 0.595699f, 0.585798f, 0.575808f, 0.565732f,
+ 0.555570f, 0.545325f, 0.534998f, 0.524590f, 0.514103f, 0.503538f, 0.492898f, 0.482184f,
+ 0.471397f, 0.460539f, 0.449611f, 0.438616f, 0.427555f, 0.416430f, 0.405241f, 0.393992f,
+ 0.382683f, 0.371317f, 0.359895f, 0.348419f, 0.336890f, 0.325310f, 0.313682f, 0.302006f,
+ 0.290285f, 0.278520f, 0.266713f, 0.254866f, 0.242980f, 0.231058f, 0.219101f, 0.207111f,
+ 0.195090f, 0.183040f, 0.170962f, 0.158858f, 0.146730f, 0.134581f, 0.122411f, 0.110222f,
+ 0.098017f, 0.085797f, 0.073565f, 0.061321f, 0.049068f, 0.036807f, 0.024541f, 0.012272f,
+ 0.000000f, 0.012272f, 0.024541f, 0.036807f, 0.049068f, 0.061321f, 0.073565f, 0.085797f,
+ 0.098017f, 0.110222f, 0.122411f, 0.134581f, 0.146730f, 0.158858f, 0.170962f, 0.183040f,
+ 0.195090f, 0.207111f, 0.219101f, 0.231058f, 0.242980f, 0.254866f, 0.266713f, 0.278520f,
+ 0.290285f, 0.302006f, 0.313682f, 0.325310f, 0.336890f, 0.348419f, 0.359895f, 0.371317f,
+ 0.382683f, 0.393992f, 0.405241f, 0.416430f, 0.427555f, 0.438616f, 0.449611f, 0.460539f,
+ 0.471397f, 0.482184f, 0.492898f, 0.503538f, 0.514103f, 0.524590f, 0.534998f, 0.545325f,
+ 0.555570f, 0.565732f, 0.575808f, 0.585798f, 0.595699f, 0.605511f, 0.615232f, 0.624860f,
+ 0.634393f, 0.643832f, 0.653173f, 0.662416f, 0.671559f, 0.680601f, 0.689541f, 0.698376f,
+ 0.707107f, 0.715731f, 0.724247f, 0.732654f, 0.740951f, 0.749136f, 0.757209f, 0.765167f,
+ 0.773010f, 0.780737f, 0.788346f, 0.795837f, 0.803208f, 0.810457f, 0.817585f, 0.824589f,
+ 0.831470f, 0.838225f, 0.844854f, 0.851355f, 0.857729f, 0.863973f, 0.870087f, 0.876070f,
+ 0.881921f, 0.887640f, 0.893224f, 0.898674f, 0.903989f, 0.909168f, 0.914210f, 0.919114f,
+ 0.923880f, 0.928506f, 0.932993f, 0.937339f, 0.941544f, 0.945607f, 0.949528f, 0.953306f,
+ 0.956940f, 0.960431f, 0.963776f, 0.966976f, 0.970031f, 0.972940f, 0.975702f, 0.978317f,
+ 0.980785f, 0.983105f, 0.985278f, 0.987301f, 0.989177f, 0.990903f, 0.992480f, 0.993907f,
+ 0.995185f, 0.996313f, 0.997290f, 0.998118f, 0.998795f, 0.999322f, 0.999699f, 0.999925f
+};
+
+static const float cosTable1024[512] = {
+ 1.000000f, 0.999981f, 0.999925f, 0.999831f, 0.999699f, 0.999529f, 0.999322f, 0.999078f,
+ 0.998795f, 0.998476f, 0.998118f, 0.997723f, 0.997290f, 0.996820f, 0.996313f, 0.995767f,
+ 0.995185f, 0.994565f, 0.993907f, 0.993212f, 0.992480f, 0.991710f, 0.990903f, 0.990058f,
+ 0.989177f, 0.988258f, 0.987301f, 0.986308f, 0.985278f, 0.984210f, 0.983105f, 0.981964f,
+ 0.980785f, 0.979570f, 0.978317f, 0.977028f, 0.975702f, 0.974339f, 0.972940f, 0.971504f,
+ 0.970031f, 0.968522f, 0.966976f, 0.965394f, 0.963776f, 0.962121f, 0.960431f, 0.958703f,
+ 0.956940f, 0.955141f, 0.953306f, 0.951435f, 0.949528f, 0.947586f, 0.945607f, 0.943593f,
+ 0.941544f, 0.939459f, 0.937339f, 0.935184f, 0.932993f, 0.930767f, 0.928506f, 0.926210f,
+ 0.923880f, 0.921514f, 0.919114f, 0.916679f, 0.914210f, 0.911706f, 0.909168f, 0.906596f,
+ 0.903989f, 0.901349f, 0.898674f, 0.895966f, 0.893224f, 0.890449f, 0.887640f, 0.884797f,
+ 0.881921f, 0.879012f, 0.876070f, 0.873095f, 0.870087f, 0.867046f, 0.863973f, 0.860867f,
+ 0.857729f, 0.854558f, 0.851355f, 0.848120f, 0.844854f, 0.841555f, 0.838225f, 0.834863f,
+ 0.831470f, 0.828045f, 0.824589f, 0.821102f, 0.817585f, 0.814036f, 0.810457f, 0.806848f,
+ 0.803208f, 0.799537f, 0.795837f, 0.792107f, 0.788346f, 0.784557f, 0.780737f, 0.776888f,
+ 0.773010f, 0.769103f, 0.765167f, 0.761202f, 0.757209f, 0.753187f, 0.749136f, 0.745058f,
+ 0.740951f, 0.736817f, 0.732654f, 0.728464f, 0.724247f, 0.720003f, 0.715731f, 0.711432f,
+ 0.707107f, 0.702755f, 0.698376f, 0.693971f, 0.689541f, 0.685084f, 0.680601f, 0.676093f,
+ 0.671559f, 0.667000f, 0.662416f, 0.657807f, 0.653173f, 0.648514f, 0.643832f, 0.639124f,
+ 0.634393f, 0.629638f, 0.624860f, 0.620057f, 0.615232f, 0.610383f, 0.605511f, 0.600616f,
+ 0.595699f, 0.590760f, 0.585798f, 0.580814f, 0.575808f, 0.570781f, 0.565732f, 0.560662f,
+ 0.555570f, 0.550458f, 0.545325f, 0.540171f, 0.534998f, 0.529804f, 0.524590f, 0.519356f,
+ 0.514103f, 0.508830f, 0.503538f, 0.498228f, 0.492898f, 0.487550f, 0.482184f, 0.476799f,
+ 0.471397f, 0.465977f, 0.460539f, 0.455084f, 0.449611f, 0.444122f, 0.438616f, 0.433094f,
+ 0.427555f, 0.422000f, 0.416430f, 0.410843f, 0.405241f, 0.399624f, 0.393992f, 0.388345f,
+ 0.382683f, 0.377007f, 0.371317f, 0.365613f, 0.359895f, 0.354164f, 0.348419f, 0.342661f,
+ 0.336890f, 0.331106f, 0.325310f, 0.319502f, 0.313682f, 0.307850f, 0.302006f, 0.296151f,
+ 0.290285f, 0.284408f, 0.278520f, 0.272621f, 0.266713f, 0.260794f, 0.254866f, 0.248928f,
+ 0.242980f, 0.237024f, 0.231058f, 0.225084f, 0.219101f, 0.213110f, 0.207111f, 0.201105f,
+ 0.195090f, 0.189069f, 0.183040f, 0.177004f, 0.170962f, 0.164913f, 0.158858f, 0.152797f,
+ 0.146730f, 0.140658f, 0.134581f, 0.128498f, 0.122411f, 0.116319f, 0.110222f, 0.104122f,
+ 0.098017f, 0.091909f, 0.085797f, 0.079682f, 0.073565f, 0.067444f, 0.061321f, 0.055195f,
+ 0.049068f, 0.042938f, 0.036807f, 0.030675f, 0.024541f, 0.018407f, 0.012272f, 0.006136f,
+ 0.000000f, 0.006136f, 0.012272f, 0.018407f, 0.024541f, 0.030675f, 0.036807f, 0.042938f,
+ 0.049068f, 0.055195f, 0.061321f, 0.067444f, 0.073565f, 0.079682f, 0.085797f, 0.091909f,
+ 0.098017f, 0.104122f, 0.110222f, 0.116319f, 0.122411f, 0.128498f, 0.134581f, 0.140658f,
+ 0.146730f, 0.152797f, 0.158858f, 0.164913f, 0.170962f, 0.177004f, 0.183040f, 0.189069f,
+ 0.195090f, 0.201105f, 0.207111f, 0.213110f, 0.219101f, 0.225084f, 0.231058f, 0.237024f,
+ 0.242980f, 0.248928f, 0.254866f, 0.260794f, 0.266713f, 0.272621f, 0.278520f, 0.284408f,
+ 0.290285f, 0.296151f, 0.302006f, 0.307850f, 0.313682f, 0.319502f, 0.325310f, 0.331106f,
+ 0.336890f, 0.342661f, 0.348419f, 0.354164f, 0.359895f, 0.365613f, 0.371317f, 0.377007f,
+ 0.382683f, 0.388345f, 0.393992f, 0.399624f, 0.405241f, 0.410843f, 0.416430f, 0.422000f,
+ 0.427555f, 0.433094f, 0.438616f, 0.444122f, 0.449611f, 0.455084f, 0.460539f, 0.465977f,
+ 0.471397f, 0.476799f, 0.482184f, 0.487550f, 0.492898f, 0.498228f, 0.503538f, 0.508830f,
+ 0.514103f, 0.519356f, 0.524590f, 0.529804f, 0.534998f, 0.540171f, 0.545325f, 0.550458f,
+ 0.555570f, 0.560662f, 0.565732f, 0.570781f, 0.575808f, 0.580814f, 0.585798f, 0.590760f,
+ 0.595699f, 0.600616f, 0.605511f, 0.610383f, 0.615232f, 0.620057f, 0.624860f, 0.629638f,
+ 0.634393f, 0.639124f, 0.643832f, 0.648514f, 0.653173f, 0.657807f, 0.662416f, 0.667000f,
+ 0.671559f, 0.676093f, 0.680601f, 0.685084f, 0.689541f, 0.693971f, 0.698376f, 0.702755f,
+ 0.707107f, 0.711432f, 0.715731f, 0.720003f, 0.724247f, 0.728464f, 0.732654f, 0.736817f,
+ 0.740951f, 0.745058f, 0.749136f, 0.753187f, 0.757209f, 0.761202f, 0.765167f, 0.769103f,
+ 0.773010f, 0.776888f, 0.780737f, 0.784557f, 0.788346f, 0.792107f, 0.795837f, 0.799537f,
+ 0.803208f, 0.806848f, 0.810457f, 0.814036f, 0.817585f, 0.821102f, 0.824589f, 0.828045f,
+ 0.831470f, 0.834863f, 0.838225f, 0.841555f, 0.844854f, 0.848120f, 0.851355f, 0.854558f,
+ 0.857729f, 0.860867f, 0.863973f, 0.867046f, 0.870087f, 0.873095f, 0.876070f, 0.879012f,
+ 0.881921f, 0.884797f, 0.887640f, 0.890449f, 0.893224f, 0.895966f, 0.898674f, 0.901349f,
+ 0.903989f, 0.906596f, 0.909168f, 0.911706f, 0.914210f, 0.916679f, 0.919114f, 0.921514f,
+ 0.923880f, 0.926210f, 0.928506f, 0.930767f, 0.932993f, 0.935184f, 0.937339f, 0.939459f,
+ 0.941544f, 0.943593f, 0.945607f, 0.947586f, 0.949528f, 0.951435f, 0.953306f, 0.955141f,
+ 0.956940f, 0.958703f, 0.960431f, 0.962121f, 0.963776f, 0.965394f, 0.966976f, 0.968522f,
+ 0.970031f, 0.971504f, 0.972940f, 0.974339f, 0.975702f, 0.977028f, 0.978317f, 0.979570f,
+ 0.980785f, 0.981964f, 0.983105f, 0.984210f, 0.985278f, 0.986308f, 0.987301f, 0.988258f,
+ 0.989177f, 0.990058f, 0.990903f, 0.991710f, 0.992480f, 0.993212f, 0.993907f, 0.994565f,
+ 0.995185f, 0.995767f, 0.996313f, 0.996820f, 0.997290f, 0.997723f, 0.998118f, 0.998476f,
+ 0.998795f, 0.999078f, 0.999322f, 0.999529f, 0.999699f, 0.999831f, 0.999925f, 0.999981f
+};
+
+static const float cosTable2048[1024] = {
+ 1.000000f, 0.999995f, 0.999981f, 0.999958f, 0.999925f, 0.999882f, 0.999831f, 0.999769f,
+ 0.999699f, 0.999619f, 0.999529f, 0.999431f, 0.999322f, 0.999205f, 0.999078f, 0.998941f,
+ 0.998795f, 0.998640f, 0.998476f, 0.998302f, 0.998118f, 0.997925f, 0.997723f, 0.997511f,
+ 0.997290f, 0.997060f, 0.996820f, 0.996571f, 0.996313f, 0.996045f, 0.995767f, 0.995481f,
+ 0.995185f, 0.994879f, 0.994565f, 0.994240f, 0.993907f, 0.993564f, 0.993212f, 0.992850f,
+ 0.992480f, 0.992099f, 0.991710f, 0.991311f, 0.990903f, 0.990485f, 0.990058f, 0.989622f,
+ 0.989177f, 0.988722f, 0.988258f, 0.987784f, 0.987301f, 0.986809f, 0.986308f, 0.985798f,
+ 0.985278f, 0.984748f, 0.984210f, 0.983662f, 0.983105f, 0.982539f, 0.981964f, 0.981379f,
+ 0.980785f, 0.980182f, 0.979570f, 0.978948f, 0.978317f, 0.977677f, 0.977028f, 0.976370f,
+ 0.975702f, 0.975025f, 0.974339f, 0.973644f, 0.972940f, 0.972227f, 0.971504f, 0.970772f,
+ 0.970031f, 0.969281f, 0.968522f, 0.967754f, 0.966976f, 0.966190f, 0.965394f, 0.964590f,
+ 0.963776f, 0.962953f, 0.962121f, 0.961280f, 0.960431f, 0.959572f, 0.958703f, 0.957826f,
+ 0.956940f, 0.956045f, 0.955141f, 0.954228f, 0.953306f, 0.952375f, 0.951435f, 0.950486f,
+ 0.949528f, 0.948561f, 0.947586f, 0.946601f, 0.945607f, 0.944605f, 0.943593f, 0.942573f,
+ 0.941544f, 0.940506f, 0.939459f, 0.938404f, 0.937339f, 0.936266f, 0.935184f, 0.934093f,
+ 0.932993f, 0.931884f, 0.930767f, 0.929641f, 0.928506f, 0.927363f, 0.926210f, 0.925049f,
+ 0.923880f, 0.922701f, 0.921514f, 0.920318f, 0.919114f, 0.917901f, 0.916679f, 0.915449f,
+ 0.914210f, 0.912962f, 0.911706f, 0.910441f, 0.909168f, 0.907886f, 0.906596f, 0.905297f,
+ 0.903989f, 0.902673f, 0.901349f, 0.900016f, 0.898674f, 0.897325f, 0.895966f, 0.894599f,
+ 0.893224f, 0.891841f, 0.890449f, 0.889048f, 0.887640f, 0.886223f, 0.884797f, 0.883363f,
+ 0.881921f, 0.880471f, 0.879012f, 0.877545f, 0.876070f, 0.874587f, 0.873095f, 0.871595f,
+ 0.870087f, 0.868571f, 0.867046f, 0.865514f, 0.863973f, 0.862424f, 0.860867f, 0.859302f,
+ 0.857729f, 0.856147f, 0.854558f, 0.852961f, 0.851355f, 0.849742f, 0.848120f, 0.846491f,
+ 0.844854f, 0.843208f, 0.841555f, 0.839894f, 0.838225f, 0.836548f, 0.834863f, 0.833170f,
+ 0.831470f, 0.829761f, 0.828045f, 0.826321f, 0.824589f, 0.822850f, 0.821102f, 0.819348f,
+ 0.817585f, 0.815814f, 0.814036f, 0.812251f, 0.810457f, 0.808656f, 0.806848f, 0.805031f,
+ 0.803208f, 0.801376f, 0.799537f, 0.797691f, 0.795837f, 0.793975f, 0.792107f, 0.790230f,
+ 0.788346f, 0.786455f, 0.784557f, 0.782651f, 0.780737f, 0.778817f, 0.776888f, 0.774953f,
+ 0.773010f, 0.771061f, 0.769103f, 0.767139f, 0.765167f, 0.763188f, 0.761202f, 0.759209f,
+ 0.757209f, 0.755201f, 0.753187f, 0.751165f, 0.749136f, 0.747101f, 0.745058f, 0.743008f,
+ 0.740951f, 0.738887f, 0.736817f, 0.734739f, 0.732654f, 0.730563f, 0.728464f, 0.726359f,
+ 0.724247f, 0.722128f, 0.720003f, 0.717870f, 0.715731f, 0.713585f, 0.711432f, 0.709273f,
+ 0.707107f, 0.704934f, 0.702755f, 0.700569f, 0.698376f, 0.696177f, 0.693971f, 0.691759f,
+ 0.689541f, 0.687315f, 0.685084f, 0.682846f, 0.680601f, 0.678350f, 0.676093f, 0.673829f,
+ 0.671559f, 0.669283f, 0.667000f, 0.664711f, 0.662416f, 0.660114f, 0.657807f, 0.655493f,
+ 0.653173f, 0.650847f, 0.648514f, 0.646176f, 0.643832f, 0.641481f, 0.639124f, 0.636762f,
+ 0.634393f, 0.632019f, 0.629638f, 0.627252f, 0.624860f, 0.622461f, 0.620057f, 0.617647f,
+ 0.615232f, 0.612810f, 0.610383f, 0.607950f, 0.605511f, 0.603067f, 0.600616f, 0.598161f,
+ 0.595699f, 0.593232f, 0.590760f, 0.588282f, 0.585798f, 0.583309f, 0.580814f, 0.578314f,
+ 0.575808f, 0.573297f, 0.570781f, 0.568259f, 0.565732f, 0.563199f, 0.560662f, 0.558119f,
+ 0.555570f, 0.553017f, 0.550458f, 0.547894f, 0.545325f, 0.542751f, 0.540171f, 0.537587f,
+ 0.534998f, 0.532403f, 0.529804f, 0.527199f, 0.524590f, 0.521975f, 0.519356f, 0.516732f,
+ 0.514103f, 0.511469f, 0.508830f, 0.506187f, 0.503538f, 0.500885f, 0.498228f, 0.495565f,
+ 0.492898f, 0.490226f, 0.487550f, 0.484869f, 0.482184f, 0.479494f, 0.476799f, 0.474100f,
+ 0.471397f, 0.468689f, 0.465977f, 0.463260f, 0.460539f, 0.457813f, 0.455084f, 0.452350f,
+ 0.449611f, 0.446869f, 0.444122f, 0.441371f, 0.438616f, 0.435857f, 0.433094f, 0.430326f,
+ 0.427555f, 0.424780f, 0.422000f, 0.419217f, 0.416430f, 0.413638f, 0.410843f, 0.408044f,
+ 0.405241f, 0.402435f, 0.399624f, 0.396810f, 0.393992f, 0.391170f, 0.388345f, 0.385516f,
+ 0.382683f, 0.379847f, 0.377007f, 0.374164f, 0.371317f, 0.368467f, 0.365613f, 0.362756f,
+ 0.359895f, 0.357031f, 0.354164f, 0.351293f, 0.348419f, 0.345541f, 0.342661f, 0.339777f,
+ 0.336890f, 0.334000f, 0.331106f, 0.328210f, 0.325310f, 0.322408f, 0.319502f, 0.316593f,
+ 0.313682f, 0.310767f, 0.307850f, 0.304929f, 0.302006f, 0.299080f, 0.296151f, 0.293219f,
+ 0.290285f, 0.287347f, 0.284408f, 0.281465f, 0.278520f, 0.275572f, 0.272621f, 0.269668f,
+ 0.266713f, 0.263755f, 0.260794f, 0.257831f, 0.254866f, 0.251898f, 0.248928f, 0.245955f,
+ 0.242980f, 0.240003f, 0.237024f, 0.234042f, 0.231058f, 0.228072f, 0.225084f, 0.222094f,
+ 0.219101f, 0.216107f, 0.213110f, 0.210112f, 0.207111f, 0.204109f, 0.201105f, 0.198098f,
+ 0.195090f, 0.192080f, 0.189069f, 0.186055f, 0.183040f, 0.180023f, 0.177004f, 0.173984f,
+ 0.170962f, 0.167938f, 0.164913f, 0.161886f, 0.158858f, 0.155828f, 0.152797f, 0.149765f,
+ 0.146730f, 0.143695f, 0.140658f, 0.137620f, 0.134581f, 0.131540f, 0.128498f, 0.125455f,
+ 0.122411f, 0.119365f, 0.116319f, 0.113271f, 0.110222f, 0.107172f, 0.104122f, 0.101070f,
+ 0.098017f, 0.094963f, 0.091909f, 0.088854f, 0.085797f, 0.082740f, 0.079682f, 0.076624f,
+ 0.073565f, 0.070505f, 0.067444f, 0.064383f, 0.061321f, 0.058258f, 0.055195f, 0.052132f,
+ 0.049068f, 0.046003f, 0.042938f, 0.039873f, 0.036807f, 0.033741f, 0.030675f, 0.027608f,
+ 0.024541f, 0.021474f, 0.018407f, 0.015339f, 0.012272f, 0.009204f, 0.006136f, 0.003068f,
+ 0.000000f, 0.003068f, 0.006136f, 0.009204f, 0.012272f, 0.015339f, 0.018407f, 0.021474f,
+ 0.024541f, 0.027608f, 0.030675f, 0.033741f, 0.036807f, 0.039873f, 0.042938f, 0.046003f,
+ 0.049068f, 0.052132f, 0.055195f, 0.058258f, 0.061321f, 0.064383f, 0.067444f, 0.070505f,
+ 0.073565f, 0.076624f, 0.079682f, 0.082740f, 0.085797f, 0.088854f, 0.091909f, 0.094963f,
+ 0.098017f, 0.101070f, 0.104122f, 0.107172f, 0.110222f, 0.113271f, 0.116319f, 0.119365f,
+ 0.122411f, 0.125455f, 0.128498f, 0.131540f, 0.134581f, 0.137620f, 0.140658f, 0.143695f,
+ 0.146730f, 0.149765f, 0.152797f, 0.155828f, 0.158858f, 0.161886f, 0.164913f, 0.167938f,
+ 0.170962f, 0.173984f, 0.177004f, 0.180023f, 0.183040f, 0.186055f, 0.189069f, 0.192080f,
+ 0.195090f, 0.198098f, 0.201105f, 0.204109f, 0.207111f, 0.210112f, 0.213110f, 0.216107f,
+ 0.219101f, 0.222094f, 0.225084f, 0.228072f, 0.231058f, 0.234042f, 0.237024f, 0.240003f,
+ 0.242980f, 0.245955f, 0.248928f, 0.251898f, 0.254866f, 0.257831f, 0.260794f, 0.263755f,
+ 0.266713f, 0.269668f, 0.272621f, 0.275572f, 0.278520f, 0.281465f, 0.284408f, 0.287347f,
+ 0.290285f, 0.293219f, 0.296151f, 0.299080f, 0.302006f, 0.304929f, 0.307850f, 0.310767f,
+ 0.313682f, 0.316593f, 0.319502f, 0.322408f, 0.325310f, 0.328210f, 0.331106f, 0.334000f,
+ 0.336890f, 0.339777f, 0.342661f, 0.345541f, 0.348419f, 0.351293f, 0.354164f, 0.357031f,
+ 0.359895f, 0.362756f, 0.365613f, 0.368467f, 0.371317f, 0.374164f, 0.377007f, 0.379847f,
+ 0.382683f, 0.385516f, 0.388345f, 0.391170f, 0.393992f, 0.396810f, 0.399624f, 0.402435f,
+ 0.405241f, 0.408044f, 0.410843f, 0.413638f, 0.416430f, 0.419217f, 0.422000f, 0.424780f,
+ 0.427555f, 0.430326f, 0.433094f, 0.435857f, 0.438616f, 0.441371f, 0.444122f, 0.446869f,
+ 0.449611f, 0.452350f, 0.455084f, 0.457813f, 0.460539f, 0.463260f, 0.465977f, 0.468689f,
+ 0.471397f, 0.474100f, 0.476799f, 0.479494f, 0.482184f, 0.484869f, 0.487550f, 0.490226f,
+ 0.492898f, 0.495565f, 0.498228f, 0.500885f, 0.503538f, 0.506187f, 0.508830f, 0.511469f,
+ 0.514103f, 0.516732f, 0.519356f, 0.521975f, 0.524590f, 0.527199f, 0.529804f, 0.532403f,
+ 0.534998f, 0.537587f, 0.540171f, 0.542751f, 0.545325f, 0.547894f, 0.550458f, 0.553017f,
+ 0.555570f, 0.558119f, 0.560662f, 0.563199f, 0.565732f, 0.568259f, 0.570781f, 0.573297f,
+ 0.575808f, 0.578314f, 0.580814f, 0.583309f, 0.585798f, 0.588282f, 0.590760f, 0.593232f,
+ 0.595699f, 0.598161f, 0.600616f, 0.603067f, 0.605511f, 0.607950f, 0.610383f, 0.612810f,
+ 0.615232f, 0.617647f, 0.620057f, 0.622461f, 0.624860f, 0.627252f, 0.629638f, 0.632019f,
+ 0.634393f, 0.636762f, 0.639124f, 0.641481f, 0.643832f, 0.646176f, 0.648514f, 0.650847f,
+ 0.653173f, 0.655493f, 0.657807f, 0.660114f, 0.662416f, 0.664711f, 0.667000f, 0.669283f,
+ 0.671559f, 0.673829f, 0.676093f, 0.678350f, 0.680601f, 0.682846f, 0.685084f, 0.687315f,
+ 0.689541f, 0.691759f, 0.693971f, 0.696177f, 0.698376f, 0.700569f, 0.702755f, 0.704934f,
+ 0.707107f, 0.709273f, 0.711432f, 0.713585f, 0.715731f, 0.717870f, 0.720003f, 0.722128f,
+ 0.724247f, 0.726359f, 0.728464f, 0.730563f, 0.732654f, 0.734739f, 0.736817f, 0.738887f,
+ 0.740951f, 0.743008f, 0.745058f, 0.747101f, 0.749136f, 0.751165f, 0.753187f, 0.755201f,
+ 0.757209f, 0.759209f, 0.761202f, 0.763188f, 0.765167f, 0.767139f, 0.769103f, 0.771061f,
+ 0.773010f, 0.774953f, 0.776888f, 0.778817f, 0.780737f, 0.782651f, 0.784557f, 0.786455f,
+ 0.788346f, 0.790230f, 0.792107f, 0.793975f, 0.795837f, 0.797691f, 0.799537f, 0.801376f,
+ 0.803208f, 0.805031f, 0.806848f, 0.808656f, 0.810457f, 0.812251f, 0.814036f, 0.815814f,
+ 0.817585f, 0.819348f, 0.821102f, 0.822850f, 0.824589f, 0.826321f, 0.828045f, 0.829761f,
+ 0.831470f, 0.833170f, 0.834863f, 0.836548f, 0.838225f, 0.839894f, 0.841555f, 0.843208f,
+ 0.844854f, 0.846491f, 0.848120f, 0.849742f, 0.851355f, 0.852961f, 0.854558f, 0.856147f,
+ 0.857729f, 0.859302f, 0.860867f, 0.862424f, 0.863973f, 0.865514f, 0.867046f, 0.868571f,
+ 0.870087f, 0.871595f, 0.873095f, 0.874587f, 0.876070f, 0.877545f, 0.879012f, 0.880471f,
+ 0.881921f, 0.883363f, 0.884797f, 0.886223f, 0.887640f, 0.889048f, 0.890449f, 0.891841f,
+ 0.893224f, 0.894599f, 0.895966f, 0.897325f, 0.898674f, 0.900016f, 0.901349f, 0.902673f,
+ 0.903989f, 0.905297f, 0.906596f, 0.907886f, 0.909168f, 0.910441f, 0.911706f, 0.912962f,
+ 0.914210f, 0.915449f, 0.916679f, 0.917901f, 0.919114f, 0.920318f, 0.921514f, 0.922701f,
+ 0.923880f, 0.925049f, 0.926210f, 0.927363f, 0.928506f, 0.929641f, 0.930767f, 0.931884f,
+ 0.932993f, 0.934093f, 0.935184f, 0.936266f, 0.937339f, 0.938404f, 0.939459f, 0.940506f,
+ 0.941544f, 0.942573f, 0.943593f, 0.944605f, 0.945607f, 0.946601f, 0.947586f, 0.948561f,
+ 0.949528f, 0.950486f, 0.951435f, 0.952375f, 0.953306f, 0.954228f, 0.955141f, 0.956045f,
+ 0.956940f, 0.957826f, 0.958703f, 0.959572f, 0.960431f, 0.961280f, 0.962121f, 0.962953f,
+ 0.963776f, 0.964590f, 0.965394f, 0.966190f, 0.966976f, 0.967754f, 0.968522f, 0.969281f,
+ 0.970031f, 0.970772f, 0.971504f, 0.972227f, 0.972940f, 0.973644f, 0.974339f, 0.975025f,
+ 0.975702f, 0.976370f, 0.977028f, 0.977677f, 0.978317f, 0.978948f, 0.979570f, 0.980182f,
+ 0.980785f, 0.981379f, 0.981964f, 0.982539f, 0.983105f, 0.983662f, 0.984210f, 0.984748f,
+ 0.985278f, 0.985798f, 0.986308f, 0.986809f, 0.987301f, 0.987784f, 0.988258f, 0.988722f,
+ 0.989177f, 0.989622f, 0.990058f, 0.990485f, 0.990903f, 0.991311f, 0.991710f, 0.992099f,
+ 0.992480f, 0.992850f, 0.993212f, 0.993564f, 0.993907f, 0.994240f, 0.994565f, 0.994879f,
+ 0.995185f, 0.995481f, 0.995767f, 0.996045f, 0.996313f, 0.996571f, 0.996820f, 0.997060f,
+ 0.997290f, 0.997511f, 0.997723f, 0.997925f, 0.998118f, 0.998302f, 0.998476f, 0.998640f,
+ 0.998795f, 0.998941f, 0.999078f, 0.999205f, 0.999322f, 0.999431f, 0.999529f, 0.999619f,
+ 0.999699f, 0.999769f, 0.999831f, 0.999882f, 0.999925f, 0.999958f, 0.999981f, 0.999995f
+};
+
+static const float cosTable4096[2048] = {
+ 1.000000f, 0.999999f, 0.999995f, 0.999989f, 0.999981f, 0.999971f, 0.999958f, 0.999942f,
+ 0.999925f, 0.999905f, 0.999882f, 0.999858f, 0.999831f, 0.999801f, 0.999769f, 0.999735f,
+ 0.999699f, 0.999660f, 0.999619f, 0.999575f, 0.999529f, 0.999481f, 0.999431f, 0.999378f,
+ 0.999322f, 0.999265f, 0.999205f, 0.999142f, 0.999078f, 0.999011f, 0.998941f, 0.998870f,
+ 0.998795f, 0.998719f, 0.998640f, 0.998559f, 0.998476f, 0.998390f, 0.998302f, 0.998211f,
+ 0.998118f, 0.998023f, 0.997925f, 0.997825f, 0.997723f, 0.997618f, 0.997511f, 0.997402f,
+ 0.997290f, 0.997176f, 0.997060f, 0.996941f, 0.996820f, 0.996697f, 0.996571f, 0.996443f,
+ 0.996313f, 0.996180f, 0.996045f, 0.995907f, 0.995767f, 0.995625f, 0.995481f, 0.995334f,
+ 0.995185f, 0.995033f, 0.994879f, 0.994723f, 0.994565f, 0.994404f, 0.994240f, 0.994075f,
+ 0.993907f, 0.993737f, 0.993564f, 0.993389f, 0.993212f, 0.993032f, 0.992850f, 0.992666f,
+ 0.992480f, 0.992291f, 0.992099f, 0.991906f, 0.991710f, 0.991511f, 0.991311f, 0.991108f,
+ 0.990903f, 0.990695f, 0.990485f, 0.990273f, 0.990058f, 0.989841f, 0.989622f, 0.989400f,
+ 0.989177f, 0.988950f, 0.988722f, 0.988491f, 0.988258f, 0.988022f, 0.987784f, 0.987544f,
+ 0.987301f, 0.987057f, 0.986809f, 0.986560f, 0.986308f, 0.986054f, 0.985798f, 0.985539f,
+ 0.985278f, 0.985014f, 0.984748f, 0.984480f, 0.984210f, 0.983937f, 0.983662f, 0.983385f,
+ 0.983105f, 0.982824f, 0.982539f, 0.982253f, 0.981964f, 0.981673f, 0.981379f, 0.981083f,
+ 0.980785f, 0.980485f, 0.980182f, 0.979877f, 0.979570f, 0.979260f, 0.978948f, 0.978634f,
+ 0.978317f, 0.977998f, 0.977677f, 0.977354f, 0.977028f, 0.976700f, 0.976370f, 0.976037f,
+ 0.975702f, 0.975365f, 0.975025f, 0.974684f, 0.974339f, 0.973993f, 0.973644f, 0.973293f,
+ 0.972940f, 0.972584f, 0.972227f, 0.971866f, 0.971504f, 0.971139f, 0.970772f, 0.970403f,
+ 0.970031f, 0.969657f, 0.969281f, 0.968903f, 0.968522f, 0.968139f, 0.967754f, 0.967366f,
+ 0.966976f, 0.966584f, 0.966190f, 0.965793f, 0.965394f, 0.964993f, 0.964590f, 0.964184f,
+ 0.963776f, 0.963366f, 0.962953f, 0.962538f, 0.962121f, 0.961702f, 0.961280f, 0.960857f,
+ 0.960431f, 0.960002f, 0.959572f, 0.959139f, 0.958703f, 0.958266f, 0.957826f, 0.957385f,
+ 0.956940f, 0.956494f, 0.956045f, 0.955594f, 0.955141f, 0.954686f, 0.954228f, 0.953768f,
+ 0.953306f, 0.952842f, 0.952375f, 0.951906f, 0.951435f, 0.950962f, 0.950486f, 0.950008f,
+ 0.949528f, 0.949046f, 0.948561f, 0.948075f, 0.947586f, 0.947094f, 0.946601f, 0.946105f,
+ 0.945607f, 0.945107f, 0.944605f, 0.944100f, 0.943593f, 0.943084f, 0.942573f, 0.942060f,
+ 0.941544f, 0.941026f, 0.940506f, 0.939984f, 0.939459f, 0.938932f, 0.938404f, 0.937872f,
+ 0.937339f, 0.936803f, 0.936266f, 0.935726f, 0.935184f, 0.934639f, 0.934093f, 0.933544f,
+ 0.932993f, 0.932440f, 0.931884f, 0.931327f, 0.930767f, 0.930205f, 0.929641f, 0.929075f,
+ 0.928506f, 0.927935f, 0.927363f, 0.926787f, 0.926210f, 0.925631f, 0.925049f, 0.924465f,
+ 0.923880f, 0.923291f, 0.922701f, 0.922109f, 0.921514f, 0.920917f, 0.920318f, 0.919717f,
+ 0.919114f, 0.918508f, 0.917901f, 0.917291f, 0.916679f, 0.916065f, 0.915449f, 0.914830f,
+ 0.914210f, 0.913587f, 0.912962f, 0.912335f, 0.911706f, 0.911075f, 0.910441f, 0.909806f,
+ 0.909168f, 0.908528f, 0.907886f, 0.907242f, 0.906596f, 0.905947f, 0.905297f, 0.904644f,
+ 0.903989f, 0.903332f, 0.902673f, 0.902012f, 0.901349f, 0.900683f, 0.900016f, 0.899346f,
+ 0.898674f, 0.898001f, 0.897325f, 0.896646f, 0.895966f, 0.895284f, 0.894599f, 0.893913f,
+ 0.893224f, 0.892534f, 0.891841f, 0.891146f, 0.890449f, 0.889750f, 0.889048f, 0.888345f,
+ 0.887640f, 0.886932f, 0.886223f, 0.885511f, 0.884797f, 0.884081f, 0.883363f, 0.882643f,
+ 0.881921f, 0.881197f, 0.880471f, 0.879743f, 0.879012f, 0.878280f, 0.877545f, 0.876809f,
+ 0.876070f, 0.875329f, 0.874587f, 0.873842f, 0.873095f, 0.872346f, 0.871595f, 0.870842f,
+ 0.870087f, 0.869330f, 0.868571f, 0.867809f, 0.867046f, 0.866281f, 0.865514f, 0.864744f,
+ 0.863973f, 0.863199f, 0.862424f, 0.861646f, 0.860867f, 0.860085f, 0.859302f, 0.858516f,
+ 0.857729f, 0.856939f, 0.856147f, 0.855354f, 0.854558f, 0.853760f, 0.852961f, 0.852159f,
+ 0.851355f, 0.850549f, 0.849742f, 0.848932f, 0.848120f, 0.847307f, 0.846491f, 0.845673f,
+ 0.844854f, 0.844032f, 0.843208f, 0.842383f, 0.841555f, 0.840725f, 0.839894f, 0.839060f,
+ 0.838225f, 0.837387f, 0.836548f, 0.835706f, 0.834863f, 0.834018f, 0.833170f, 0.832321f,
+ 0.831470f, 0.830616f, 0.829761f, 0.828904f, 0.828045f, 0.827184f, 0.826321f, 0.825456f,
+ 0.824589f, 0.823721f, 0.822850f, 0.821977f, 0.821102f, 0.820226f, 0.819348f, 0.818467f,
+ 0.817585f, 0.816701f, 0.815814f, 0.814926f, 0.814036f, 0.813144f, 0.812251f, 0.811355f,
+ 0.810457f, 0.809558f, 0.808656f, 0.807753f, 0.806848f, 0.805940f, 0.805031f, 0.804120f,
+ 0.803208f, 0.802293f, 0.801376f, 0.800458f, 0.799537f, 0.798615f, 0.797691f, 0.796765f,
+ 0.795837f, 0.794907f, 0.793975f, 0.793042f, 0.792107f, 0.791169f, 0.790230f, 0.789289f,
+ 0.788346f, 0.787402f, 0.786455f, 0.785507f, 0.784557f, 0.783605f, 0.782651f, 0.781695f,
+ 0.780737f, 0.779778f, 0.778817f, 0.777853f, 0.776888f, 0.775922f, 0.774953f, 0.773983f,
+ 0.773010f, 0.772036f, 0.771061f, 0.770083f, 0.769103f, 0.768122f, 0.767139f, 0.766154f,
+ 0.765167f, 0.764179f, 0.763188f, 0.762196f, 0.761202f, 0.760207f, 0.759209f, 0.758210f,
+ 0.757209f, 0.756206f, 0.755201f, 0.754195f, 0.753187f, 0.752177f, 0.751165f, 0.750152f,
+ 0.749136f, 0.748119f, 0.747101f, 0.746080f, 0.745058f, 0.744034f, 0.743008f, 0.741980f,
+ 0.740951f, 0.739920f, 0.738887f, 0.737853f, 0.736817f, 0.735779f, 0.734739f, 0.733697f,
+ 0.732654f, 0.731609f, 0.730563f, 0.729514f, 0.728464f, 0.727413f, 0.726359f, 0.725304f,
+ 0.724247f, 0.723188f, 0.722128f, 0.721066f, 0.720003f, 0.718937f, 0.717870f, 0.716801f,
+ 0.715731f, 0.714659f, 0.713585f, 0.712509f, 0.711432f, 0.710353f, 0.709273f, 0.708191f,
+ 0.707107f, 0.706021f, 0.704934f, 0.703845f, 0.702755f, 0.701663f, 0.700569f, 0.699473f,
+ 0.698376f, 0.697277f, 0.696177f, 0.695075f, 0.693971f, 0.692866f, 0.691759f, 0.690651f,
+ 0.689541f, 0.688429f, 0.687315f, 0.686200f, 0.685084f, 0.683965f, 0.682846f, 0.681724f,
+ 0.680601f, 0.679476f, 0.678350f, 0.677222f, 0.676093f, 0.674962f, 0.673829f, 0.672695f,
+ 0.671559f, 0.670422f, 0.669283f, 0.668142f, 0.667000f, 0.665856f, 0.664711f, 0.663564f,
+ 0.662416f, 0.661266f, 0.660114f, 0.658961f, 0.657807f, 0.656651f, 0.655493f, 0.654334f,
+ 0.653173f, 0.652011f, 0.650847f, 0.649681f, 0.648514f, 0.647346f, 0.646176f, 0.645005f,
+ 0.643832f, 0.642657f, 0.641481f, 0.640303f, 0.639124f, 0.637944f, 0.636762f, 0.635578f,
+ 0.634393f, 0.633207f, 0.632019f, 0.630829f, 0.629638f, 0.628446f, 0.627252f, 0.626056f,
+ 0.624860f, 0.623661f, 0.622461f, 0.621260f, 0.620057f, 0.618853f, 0.617647f, 0.616440f,
+ 0.615232f, 0.614022f, 0.612810f, 0.611597f, 0.610383f, 0.609167f, 0.607950f, 0.606731f,
+ 0.605511f, 0.604290f, 0.603067f, 0.601842f, 0.600616f, 0.599389f, 0.598161f, 0.596931f,
+ 0.595699f, 0.594467f, 0.593232f, 0.591997f, 0.590760f, 0.589521f, 0.588282f, 0.587040f,
+ 0.585798f, 0.584554f, 0.583309f, 0.582062f, 0.580814f, 0.579565f, 0.578314f, 0.577062f,
+ 0.575808f, 0.574553f, 0.573297f, 0.572040f, 0.570781f, 0.569521f, 0.568259f, 0.566996f,
+ 0.565732f, 0.564466f, 0.563199f, 0.561931f, 0.560662f, 0.559391f, 0.558119f, 0.556845f,
+ 0.555570f, 0.554294f, 0.553017f, 0.551738f, 0.550458f, 0.549177f, 0.547894f, 0.546610f,
+ 0.545325f, 0.544039f, 0.542751f, 0.541462f, 0.540171f, 0.538880f, 0.537587f, 0.536293f,
+ 0.534998f, 0.533701f, 0.532403f, 0.531104f, 0.529804f, 0.528502f, 0.527199f, 0.525895f,
+ 0.524590f, 0.523283f, 0.521975f, 0.520666f, 0.519356f, 0.518045f, 0.516732f, 0.515418f,
+ 0.514103f, 0.512786f, 0.511469f, 0.510150f, 0.508830f, 0.507509f, 0.506187f, 0.504863f,
+ 0.503538f, 0.502212f, 0.500885f, 0.499557f, 0.498228f, 0.496897f, 0.495565f, 0.494232f,
+ 0.492898f, 0.491563f, 0.490226f, 0.488889f, 0.487550f, 0.486210f, 0.484869f, 0.483527f,
+ 0.482184f, 0.480839f, 0.479494f, 0.478147f, 0.476799f, 0.475450f, 0.474100f, 0.472749f,
+ 0.471397f, 0.470043f, 0.468689f, 0.467333f, 0.465977f, 0.464619f, 0.463260f, 0.461900f,
+ 0.460539f, 0.459177f, 0.457813f, 0.456449f, 0.455084f, 0.453717f, 0.452350f, 0.450981f,
+ 0.449611f, 0.448241f, 0.446869f, 0.445496f, 0.444122f, 0.442747f, 0.441371f, 0.439994f,
+ 0.438616f, 0.437237f, 0.435857f, 0.434476f, 0.433094f, 0.431711f, 0.430326f, 0.428941f,
+ 0.427555f, 0.426168f, 0.424780f, 0.423390f, 0.422000f, 0.420609f, 0.419217f, 0.417824f,
+ 0.416430f, 0.415034f, 0.413638f, 0.412241f, 0.410843f, 0.409444f, 0.408044f, 0.406643f,
+ 0.405241f, 0.403838f, 0.402435f, 0.401030f, 0.399624f, 0.398218f, 0.396810f, 0.395401f,
+ 0.393992f, 0.392582f, 0.391170f, 0.389758f, 0.388345f, 0.386931f, 0.385516f, 0.384100f,
+ 0.382683f, 0.381266f, 0.379847f, 0.378428f, 0.377007f, 0.375586f, 0.374164f, 0.372741f,
+ 0.371317f, 0.369892f, 0.368467f, 0.367040f, 0.365613f, 0.364185f, 0.362756f, 0.361326f,
+ 0.359895f, 0.358463f, 0.357031f, 0.355598f, 0.354164f, 0.352729f, 0.351293f, 0.349856f,
+ 0.348419f, 0.346980f, 0.345541f, 0.344101f, 0.342661f, 0.341219f, 0.339777f, 0.338334f,
+ 0.336890f, 0.335445f, 0.334000f, 0.332553f, 0.331106f, 0.329658f, 0.328210f, 0.326760f,
+ 0.325310f, 0.323859f, 0.322408f, 0.320955f, 0.319502f, 0.318048f, 0.316593f, 0.315138f,
+ 0.313682f, 0.312225f, 0.310767f, 0.309309f, 0.307850f, 0.306390f, 0.304929f, 0.303468f,
+ 0.302006f, 0.300543f, 0.299080f, 0.297616f, 0.296151f, 0.294685f, 0.293219f, 0.291752f,
+ 0.290285f, 0.288816f, 0.287347f, 0.285878f, 0.284408f, 0.282937f, 0.281465f, 0.279993f,
+ 0.278520f, 0.277046f, 0.275572f, 0.274097f, 0.272621f, 0.271145f, 0.269668f, 0.268191f,
+ 0.266713f, 0.265234f, 0.263755f, 0.262275f, 0.260794f, 0.259313f, 0.257831f, 0.256349f,
+ 0.254866f, 0.253382f, 0.251898f, 0.250413f, 0.248928f, 0.247442f, 0.245955f, 0.244468f,
+ 0.242980f, 0.241492f, 0.240003f, 0.238514f, 0.237024f, 0.235533f, 0.234042f, 0.232550f,
+ 0.231058f, 0.229565f, 0.228072f, 0.226578f, 0.225084f, 0.223589f, 0.222094f, 0.220598f,
+ 0.219101f, 0.217604f, 0.216107f, 0.214609f, 0.213110f, 0.211611f, 0.210112f, 0.208612f,
+ 0.207111f, 0.205610f, 0.204109f, 0.202607f, 0.201105f, 0.199602f, 0.198098f, 0.196595f,
+ 0.195090f, 0.193586f, 0.192080f, 0.190575f, 0.189069f, 0.187562f, 0.186055f, 0.184548f,
+ 0.183040f, 0.181532f, 0.180023f, 0.178514f, 0.177004f, 0.175494f, 0.173984f, 0.172473f,
+ 0.170962f, 0.169450f, 0.167938f, 0.166426f, 0.164913f, 0.163400f, 0.161886f, 0.160372f,
+ 0.158858f, 0.157343f, 0.155828f, 0.154313f, 0.152797f, 0.151281f, 0.149765f, 0.148248f,
+ 0.146730f, 0.145213f, 0.143695f, 0.142177f, 0.140658f, 0.139139f, 0.137620f, 0.136101f,
+ 0.134581f, 0.133061f, 0.131540f, 0.130019f, 0.128498f, 0.126977f, 0.125455f, 0.123933f,
+ 0.122411f, 0.120888f, 0.119365f, 0.117842f, 0.116319f, 0.114795f, 0.113271f, 0.111747f,
+ 0.110222f, 0.108697f, 0.107172f, 0.105647f, 0.104122f, 0.102596f, 0.101070f, 0.099544f,
+ 0.098017f, 0.096490f, 0.094963f, 0.093436f, 0.091909f, 0.090381f, 0.088854f, 0.087326f,
+ 0.085797f, 0.084269f, 0.082740f, 0.081211f, 0.079682f, 0.078153f, 0.076624f, 0.075094f,
+ 0.073565f, 0.072035f, 0.070505f, 0.068974f, 0.067444f, 0.065913f, 0.064383f, 0.062852f,
+ 0.061321f, 0.059790f, 0.058258f, 0.056727f, 0.055195f, 0.053664f, 0.052132f, 0.050600f,
+ 0.049068f, 0.047535f, 0.046003f, 0.044471f, 0.042938f, 0.041406f, 0.039873f, 0.038340f,
+ 0.036807f, 0.035274f, 0.033741f, 0.032208f, 0.030675f, 0.029142f, 0.027608f, 0.026075f,
+ 0.024541f, 0.023008f, 0.021474f, 0.019940f, 0.018407f, 0.016873f, 0.015339f, 0.013805f,
+ 0.012272f, 0.010738f, 0.009204f, 0.007670f, 0.006136f, 0.004602f, 0.003068f, 0.001534f,
+ 0.000000f, 0.001534f, 0.003068f, 0.004602f, 0.006136f, 0.007670f, 0.009204f, 0.010738f,
+ 0.012272f, 0.013805f, 0.015339f, 0.016873f, 0.018407f, 0.019940f, 0.021474f, 0.023008f,
+ 0.024541f, 0.026075f, 0.027608f, 0.029142f, 0.030675f, 0.032208f, 0.033741f, 0.035274f,
+ 0.036807f, 0.038340f, 0.039873f, 0.041406f, 0.042938f, 0.044471f, 0.046003f, 0.047535f,
+ 0.049068f, 0.050600f, 0.052132f, 0.053664f, 0.055195f, 0.056727f, 0.058258f, 0.059790f,
+ 0.061321f, 0.062852f, 0.064383f, 0.065913f, 0.067444f, 0.068974f, 0.070505f, 0.072035f,
+ 0.073565f, 0.075094f, 0.076624f, 0.078153f, 0.079682f, 0.081211f, 0.082740f, 0.084269f,
+ 0.085797f, 0.087326f, 0.088854f, 0.090381f, 0.091909f, 0.093436f, 0.094963f, 0.096490f,
+ 0.098017f, 0.099544f, 0.101070f, 0.102596f, 0.104122f, 0.105647f, 0.107172f, 0.108697f,
+ 0.110222f, 0.111747f, 0.113271f, 0.114795f, 0.116319f, 0.117842f, 0.119365f, 0.120888f,
+ 0.122411f, 0.123933f, 0.125455f, 0.126977f, 0.128498f, 0.130019f, 0.131540f, 0.133061f,
+ 0.134581f, 0.136101f, 0.137620f, 0.139139f, 0.140658f, 0.142177f, 0.143695f, 0.145213f,
+ 0.146730f, 0.148248f, 0.149765f, 0.151281f, 0.152797f, 0.154313f, 0.155828f, 0.157343f,
+ 0.158858f, 0.160372f, 0.161886f, 0.163400f, 0.164913f, 0.166426f, 0.167938f, 0.169450f,
+ 0.170962f, 0.172473f, 0.173984f, 0.175494f, 0.177004f, 0.178514f, 0.180023f, 0.181532f,
+ 0.183040f, 0.184548f, 0.186055f, 0.187562f, 0.189069f, 0.190575f, 0.192080f, 0.193586f,
+ 0.195090f, 0.196595f, 0.198098f, 0.199602f, 0.201105f, 0.202607f, 0.204109f, 0.205610f,
+ 0.207111f, 0.208612f, 0.210112f, 0.211611f, 0.213110f, 0.214609f, 0.216107f, 0.217604f,
+ 0.219101f, 0.220598f, 0.222094f, 0.223589f, 0.225084f, 0.226578f, 0.228072f, 0.229565f,
+ 0.231058f, 0.232550f, 0.234042f, 0.235533f, 0.237024f, 0.238514f, 0.240003f, 0.241492f,
+ 0.242980f, 0.244468f, 0.245955f, 0.247442f, 0.248928f, 0.250413f, 0.251898f, 0.253382f,
+ 0.254866f, 0.256349f, 0.257831f, 0.259313f, 0.260794f, 0.262275f, 0.263755f, 0.265234f,
+ 0.266713f, 0.268191f, 0.269668f, 0.271145f, 0.272621f, 0.274097f, 0.275572f, 0.277046f,
+ 0.278520f, 0.279993f, 0.281465f, 0.282937f, 0.284408f, 0.285878f, 0.287347f, 0.288816f,
+ 0.290285f, 0.291752f, 0.293219f, 0.294685f, 0.296151f, 0.297616f, 0.299080f, 0.300543f,
+ 0.302006f, 0.303468f, 0.304929f, 0.306390f, 0.307850f, 0.309309f, 0.310767f, 0.312225f,
+ 0.313682f, 0.315138f, 0.316593f, 0.318048f, 0.319502f, 0.320955f, 0.322408f, 0.323859f,
+ 0.325310f, 0.326760f, 0.328210f, 0.329658f, 0.331106f, 0.332553f, 0.334000f, 0.335445f,
+ 0.336890f, 0.338334f, 0.339777f, 0.341219f, 0.342661f, 0.344101f, 0.345541f, 0.346980f,
+ 0.348419f, 0.349856f, 0.351293f, 0.352729f, 0.354164f, 0.355598f, 0.357031f, 0.358463f,
+ 0.359895f, 0.361326f, 0.362756f, 0.364185f, 0.365613f, 0.367040f, 0.368467f, 0.369892f,
+ 0.371317f, 0.372741f, 0.374164f, 0.375586f, 0.377007f, 0.378428f, 0.379847f, 0.381266f,
+ 0.382683f, 0.384100f, 0.385516f, 0.386931f, 0.388345f, 0.389758f, 0.391170f, 0.392582f,
+ 0.393992f, 0.395401f, 0.396810f, 0.398218f, 0.399624f, 0.401030f, 0.402435f, 0.403838f,
+ 0.405241f, 0.406643f, 0.408044f, 0.409444f, 0.410843f, 0.412241f, 0.413638f, 0.415034f,
+ 0.416430f, 0.417824f, 0.419217f, 0.420609f, 0.422000f, 0.423390f, 0.424780f, 0.426168f,
+ 0.427555f, 0.428941f, 0.430326f, 0.431711f, 0.433094f, 0.434476f, 0.435857f, 0.437237f,
+ 0.438616f, 0.439994f, 0.441371f, 0.442747f, 0.444122f, 0.445496f, 0.446869f, 0.448241f,
+ 0.449611f, 0.450981f, 0.452350f, 0.453717f, 0.455084f, 0.456449f, 0.457813f, 0.459177f,
+ 0.460539f, 0.461900f, 0.463260f, 0.464619f, 0.465977f, 0.467333f, 0.468689f, 0.470043f,
+ 0.471397f, 0.472749f, 0.474100f, 0.475450f, 0.476799f, 0.478147f, 0.479494f, 0.480839f,
+ 0.482184f, 0.483527f, 0.484869f, 0.486210f, 0.487550f, 0.488889f, 0.490226f, 0.491563f,
+ 0.492898f, 0.494232f, 0.495565f, 0.496897f, 0.498228f, 0.499557f, 0.500885f, 0.502212f,
+ 0.503538f, 0.504863f, 0.506187f, 0.507509f, 0.508830f, 0.510150f, 0.511469f, 0.512786f,
+ 0.514103f, 0.515418f, 0.516732f, 0.518045f, 0.519356f, 0.520666f, 0.521975f, 0.523283f,
+ 0.524590f, 0.525895f, 0.527199f, 0.528502f, 0.529804f, 0.531104f, 0.532403f, 0.533701f,
+ 0.534998f, 0.536293f, 0.537587f, 0.538880f, 0.540171f, 0.541462f, 0.542751f, 0.544039f,
+ 0.545325f, 0.546610f, 0.547894f, 0.549177f, 0.550458f, 0.551738f, 0.553017f, 0.554294f,
+ 0.555570f, 0.556845f, 0.558119f, 0.559391f, 0.560662f, 0.561931f, 0.563199f, 0.564466f,
+ 0.565732f, 0.566996f, 0.568259f, 0.569521f, 0.570781f, 0.572040f, 0.573297f, 0.574553f,
+ 0.575808f, 0.577062f, 0.578314f, 0.579565f, 0.580814f, 0.582062f, 0.583309f, 0.584554f,
+ 0.585798f, 0.587040f, 0.588282f, 0.589521f, 0.590760f, 0.591997f, 0.593232f, 0.594467f,
+ 0.595699f, 0.596931f, 0.598161f, 0.599389f, 0.600616f, 0.601842f, 0.603067f, 0.604290f,
+ 0.605511f, 0.606731f, 0.607950f, 0.609167f, 0.610383f, 0.611597f, 0.612810f, 0.614022f,
+ 0.615232f, 0.616440f, 0.617647f, 0.618853f, 0.620057f, 0.621260f, 0.622461f, 0.623661f,
+ 0.624860f, 0.626056f, 0.627252f, 0.628446f, 0.629638f, 0.630829f, 0.632019f, 0.633207f,
+ 0.634393f, 0.635578f, 0.636762f, 0.637944f, 0.639124f, 0.640303f, 0.641481f, 0.642657f,
+ 0.643832f, 0.645005f, 0.646176f, 0.647346f, 0.648514f, 0.649681f, 0.650847f, 0.652011f,
+ 0.653173f, 0.654334f, 0.655493f, 0.656651f, 0.657807f, 0.658961f, 0.660114f, 0.661266f,
+ 0.662416f, 0.663564f, 0.664711f, 0.665856f, 0.667000f, 0.668142f, 0.669283f, 0.670422f,
+ 0.671559f, 0.672695f, 0.673829f, 0.674962f, 0.676093f, 0.677222f, 0.678350f, 0.679476f,
+ 0.680601f, 0.681724f, 0.682846f, 0.683965f, 0.685084f, 0.686200f, 0.687315f, 0.688429f,
+ 0.689541f, 0.690651f, 0.691759f, 0.692866f, 0.693971f, 0.695075f, 0.696177f, 0.697277f,
+ 0.698376f, 0.699473f, 0.700569f, 0.701663f, 0.702755f, 0.703845f, 0.704934f, 0.706021f,
+ 0.707107f, 0.708191f, 0.709273f, 0.710353f, 0.711432f, 0.712509f, 0.713585f, 0.714659f,
+ 0.715731f, 0.716801f, 0.717870f, 0.718937f, 0.720003f, 0.721066f, 0.722128f, 0.723188f,
+ 0.724247f, 0.725304f, 0.726359f, 0.727413f, 0.728464f, 0.729514f, 0.730563f, 0.731609f,
+ 0.732654f, 0.733697f, 0.734739f, 0.735779f, 0.736817f, 0.737853f, 0.738887f, 0.739920f,
+ 0.740951f, 0.741980f, 0.743008f, 0.744034f, 0.745058f, 0.746080f, 0.747101f, 0.748119f,
+ 0.749136f, 0.750152f, 0.751165f, 0.752177f, 0.753187f, 0.754195f, 0.755201f, 0.756206f,
+ 0.757209f, 0.758210f, 0.759209f, 0.760207f, 0.761202f, 0.762196f, 0.763188f, 0.764179f,
+ 0.765167f, 0.766154f, 0.767139f, 0.768122f, 0.769103f, 0.770083f, 0.771061f, 0.772036f,
+ 0.773010f, 0.773983f, 0.774953f, 0.775922f, 0.776888f, 0.777853f, 0.778817f, 0.779778f,
+ 0.780737f, 0.781695f, 0.782651f, 0.783605f, 0.784557f, 0.785507f, 0.786455f, 0.787402f,
+ 0.788346f, 0.789289f, 0.790230f, 0.791169f, 0.792107f, 0.793042f, 0.793975f, 0.794907f,
+ 0.795837f, 0.796765f, 0.797691f, 0.798615f, 0.799537f, 0.800458f, 0.801376f, 0.802293f,
+ 0.803208f, 0.804120f, 0.805031f, 0.805940f, 0.806848f, 0.807753f, 0.808656f, 0.809558f,
+ 0.810457f, 0.811355f, 0.812251f, 0.813144f, 0.814036f, 0.814926f, 0.815814f, 0.816701f,
+ 0.817585f, 0.818467f, 0.819348f, 0.820226f, 0.821102f, 0.821977f, 0.822850f, 0.823721f,
+ 0.824589f, 0.825456f, 0.826321f, 0.827184f, 0.828045f, 0.828904f, 0.829761f, 0.830616f,
+ 0.831470f, 0.832321f, 0.833170f, 0.834018f, 0.834863f, 0.835706f, 0.836548f, 0.837387f,
+ 0.838225f, 0.839060f, 0.839894f, 0.840725f, 0.841555f, 0.842383f, 0.843208f, 0.844032f,
+ 0.844854f, 0.845673f, 0.846491f, 0.847307f, 0.848120f, 0.848932f, 0.849742f, 0.850549f,
+ 0.851355f, 0.852159f, 0.852961f, 0.853760f, 0.854558f, 0.855354f, 0.856147f, 0.856939f,
+ 0.857729f, 0.858516f, 0.859302f, 0.860085f, 0.860867f, 0.861646f, 0.862424f, 0.863199f,
+ 0.863973f, 0.864744f, 0.865514f, 0.866281f, 0.867046f, 0.867809f, 0.868571f, 0.869330f,
+ 0.870087f, 0.870842f, 0.871595f, 0.872346f, 0.873095f, 0.873842f, 0.874587f, 0.875329f,
+ 0.876070f, 0.876809f, 0.877545f, 0.878280f, 0.879012f, 0.879743f, 0.880471f, 0.881197f,
+ 0.881921f, 0.882643f, 0.883363f, 0.884081f, 0.884797f, 0.885511f, 0.886223f, 0.886932f,
+ 0.887640f, 0.888345f, 0.889048f, 0.889750f, 0.890449f, 0.891146f, 0.891841f, 0.892534f,
+ 0.893224f, 0.893913f, 0.894599f, 0.895284f, 0.895966f, 0.896646f, 0.897325f, 0.898001f,
+ 0.898674f, 0.899346f, 0.900016f, 0.900683f, 0.901349f, 0.902012f, 0.902673f, 0.903332f,
+ 0.903989f, 0.904644f, 0.905297f, 0.905947f, 0.906596f, 0.907242f, 0.907886f, 0.908528f,
+ 0.909168f, 0.909806f, 0.910441f, 0.911075f, 0.911706f, 0.912335f, 0.912962f, 0.913587f,
+ 0.914210f, 0.914830f, 0.915449f, 0.916065f, 0.916679f, 0.917291f, 0.917901f, 0.918508f,
+ 0.919114f, 0.919717f, 0.920318f, 0.920917f, 0.921514f, 0.922109f, 0.922701f, 0.923291f,
+ 0.923880f, 0.924465f, 0.925049f, 0.925631f, 0.926210f, 0.926787f, 0.927363f, 0.927935f,
+ 0.928506f, 0.929075f, 0.929641f, 0.930205f, 0.930767f, 0.931327f, 0.931884f, 0.932440f,
+ 0.932993f, 0.933544f, 0.934093f, 0.934639f, 0.935184f, 0.935726f, 0.936266f, 0.936803f,
+ 0.937339f, 0.937872f, 0.938404f, 0.938932f, 0.939459f, 0.939984f, 0.940506f, 0.941026f,
+ 0.941544f, 0.942060f, 0.942573f, 0.943084f, 0.943593f, 0.944100f, 0.944605f, 0.945107f,
+ 0.945607f, 0.946105f, 0.946601f, 0.947094f, 0.947586f, 0.948075f, 0.948561f, 0.949046f,
+ 0.949528f, 0.950008f, 0.950486f, 0.950962f, 0.951435f, 0.951906f, 0.952375f, 0.952842f,
+ 0.953306f, 0.953768f, 0.954228f, 0.954686f, 0.955141f, 0.955594f, 0.956045f, 0.956494f,
+ 0.956940f, 0.957385f, 0.957826f, 0.958266f, 0.958703f, 0.959139f, 0.959572f, 0.960002f,
+ 0.960431f, 0.960857f, 0.961280f, 0.961702f, 0.962121f, 0.962538f, 0.962953f, 0.963366f,
+ 0.963776f, 0.964184f, 0.964590f, 0.964993f, 0.965394f, 0.965793f, 0.966190f, 0.966584f,
+ 0.966976f, 0.967366f, 0.967754f, 0.968139f, 0.968522f, 0.968903f, 0.969281f, 0.969657f,
+ 0.970031f, 0.970403f, 0.970772f, 0.971139f, 0.971504f, 0.971866f, 0.972227f, 0.972584f,
+ 0.972940f, 0.973293f, 0.973644f, 0.973993f, 0.974339f, 0.974684f, 0.975025f, 0.975365f,
+ 0.975702f, 0.976037f, 0.976370f, 0.976700f, 0.977028f, 0.977354f, 0.977677f, 0.977998f,
+ 0.978317f, 0.978634f, 0.978948f, 0.979260f, 0.979570f, 0.979877f, 0.980182f, 0.980485f,
+ 0.980785f, 0.981083f, 0.981379f, 0.981673f, 0.981964f, 0.982253f, 0.982539f, 0.982824f,
+ 0.983105f, 0.983385f, 0.983662f, 0.983937f, 0.984210f, 0.984480f, 0.984748f, 0.985014f,
+ 0.985278f, 0.985539f, 0.985798f, 0.986054f, 0.986308f, 0.986560f, 0.986809f, 0.987057f,
+ 0.987301f, 0.987544f, 0.987784f, 0.988022f, 0.988258f, 0.988491f, 0.988722f, 0.988950f,
+ 0.989177f, 0.989400f, 0.989622f, 0.989841f, 0.990058f, 0.990273f, 0.990485f, 0.990695f,
+ 0.990903f, 0.991108f, 0.991311f, 0.991511f, 0.991710f, 0.991906f, 0.992099f, 0.992291f,
+ 0.992480f, 0.992666f, 0.992850f, 0.993032f, 0.993212f, 0.993389f, 0.993564f, 0.993737f,
+ 0.993907f, 0.994075f, 0.994240f, 0.994404f, 0.994565f, 0.994723f, 0.994879f, 0.995033f,
+ 0.995185f, 0.995334f, 0.995481f, 0.995625f, 0.995767f, 0.995907f, 0.996045f, 0.996180f,
+ 0.996313f, 0.996443f, 0.996571f, 0.996697f, 0.996820f, 0.996941f, 0.997060f, 0.997176f,
+ 0.997290f, 0.997402f, 0.997511f, 0.997618f, 0.997723f, 0.997825f, 0.997925f, 0.998023f,
+ 0.998118f, 0.998211f, 0.998302f, 0.998390f, 0.998476f, 0.998559f, 0.998640f, 0.998719f,
+ 0.998795f, 0.998870f, 0.998941f, 0.999011f, 0.999078f, 0.999142f, 0.999205f, 0.999265f,
+ 0.999322f, 0.999378f, 0.999431f, 0.999481f, 0.999529f, 0.999575f, 0.999619f, 0.999660f,
+ 0.999699f, 0.999735f, 0.999769f, 0.999801f, 0.999831f, 0.999858f, 0.999882f, 0.999905f,
+ 0.999925f, 0.999942f, 0.999958f, 0.999971f, 0.999981f, 0.999989f, 0.999995f, 0.999999f
+};
+
+static const float cosTable8192[4096] = {
+ 1.000000f, 1.000000f, 0.999999f, 0.999997f, 0.999995f, 0.999993f, 0.999989f, 0.999986f,
+ 0.999981f, 0.999976f, 0.999971f, 0.999964f, 0.999958f, 0.999950f, 0.999942f, 0.999934f,
+ 0.999925f, 0.999915f, 0.999905f, 0.999894f, 0.999882f, 0.999870f, 0.999858f, 0.999844f,
+ 0.999831f, 0.999816f, 0.999801f, 0.999786f, 0.999769f, 0.999753f, 0.999735f, 0.999717f,
+ 0.999699f, 0.999680f, 0.999660f, 0.999640f, 0.999619f, 0.999597f, 0.999575f, 0.999553f,
+ 0.999529f, 0.999506f, 0.999481f, 0.999456f, 0.999431f, 0.999404f, 0.999378f, 0.999350f,
+ 0.999322f, 0.999294f, 0.999265f, 0.999235f, 0.999205f, 0.999174f, 0.999142f, 0.999110f,
+ 0.999078f, 0.999044f, 0.999011f, 0.998976f, 0.998941f, 0.998906f, 0.998870f, 0.998833f,
+ 0.998795f, 0.998758f, 0.998719f, 0.998680f, 0.998640f, 0.998600f, 0.998559f, 0.998518f,
+ 0.998476f, 0.998433f, 0.998390f, 0.998346f, 0.998302f, 0.998257f, 0.998211f, 0.998165f,
+ 0.998118f, 0.998071f, 0.998023f, 0.997974f, 0.997925f, 0.997876f, 0.997825f, 0.997774f,
+ 0.997723f, 0.997671f, 0.997618f, 0.997565f, 0.997511f, 0.997457f, 0.997402f, 0.997347f,
+ 0.997290f, 0.997234f, 0.997176f, 0.997119f, 0.997060f, 0.997001f, 0.996941f, 0.996881f,
+ 0.996820f, 0.996759f, 0.996697f, 0.996634f, 0.996571f, 0.996507f, 0.996443f, 0.996378f,
+ 0.996313f, 0.996247f, 0.996180f, 0.996113f, 0.996045f, 0.995976f, 0.995907f, 0.995838f,
+ 0.995767f, 0.995697f, 0.995625f, 0.995553f, 0.995481f, 0.995408f, 0.995334f, 0.995260f,
+ 0.995185f, 0.995109f, 0.995033f, 0.994957f, 0.994879f, 0.994802f, 0.994723f, 0.994644f,
+ 0.994565f, 0.994484f, 0.994404f, 0.994322f, 0.994240f, 0.994158f, 0.994075f, 0.993991f,
+ 0.993907f, 0.993822f, 0.993737f, 0.993651f, 0.993564f, 0.993477f, 0.993389f, 0.993301f,
+ 0.993212f, 0.993122f, 0.993032f, 0.992942f, 0.992850f, 0.992759f, 0.992666f, 0.992573f,
+ 0.992480f, 0.992385f, 0.992291f, 0.992195f, 0.992099f, 0.992003f, 0.991906f, 0.991808f,
+ 0.991710f, 0.991611f, 0.991511f, 0.991411f, 0.991311f, 0.991210f, 0.991108f, 0.991006f,
+ 0.990903f, 0.990799f, 0.990695f, 0.990590f, 0.990485f, 0.990379f, 0.990273f, 0.990166f,
+ 0.990058f, 0.989950f, 0.989841f, 0.989732f, 0.989622f, 0.989511f, 0.989400f, 0.989289f,
+ 0.989177f, 0.989064f, 0.988950f, 0.988836f, 0.988722f, 0.988607f, 0.988491f, 0.988374f,
+ 0.988258f, 0.988140f, 0.988022f, 0.987903f, 0.987784f, 0.987664f, 0.987544f, 0.987423f,
+ 0.987301f, 0.987179f, 0.987057f, 0.986933f, 0.986809f, 0.986685f, 0.986560f, 0.986434f,
+ 0.986308f, 0.986181f, 0.986054f, 0.985926f, 0.985798f, 0.985668f, 0.985539f, 0.985408f,
+ 0.985278f, 0.985146f, 0.985014f, 0.984882f, 0.984748f, 0.984615f, 0.984480f, 0.984346f,
+ 0.984210f, 0.984074f, 0.983937f, 0.983800f, 0.983662f, 0.983524f, 0.983385f, 0.983246f,
+ 0.983105f, 0.982965f, 0.982824f, 0.982682f, 0.982539f, 0.982396f, 0.982253f, 0.982109f,
+ 0.981964f, 0.981819f, 0.981673f, 0.981526f, 0.981379f, 0.981232f, 0.981083f, 0.980935f,
+ 0.980785f, 0.980635f, 0.980485f, 0.980334f, 0.980182f, 0.980030f, 0.979877f, 0.979724f,
+ 0.979570f, 0.979415f, 0.979260f, 0.979104f, 0.978948f, 0.978791f, 0.978634f, 0.978476f,
+ 0.978317f, 0.978158f, 0.977998f, 0.977838f, 0.977677f, 0.977516f, 0.977354f, 0.977191f,
+ 0.977028f, 0.976864f, 0.976700f, 0.976535f, 0.976370f, 0.976204f, 0.976037f, 0.975870f,
+ 0.975702f, 0.975534f, 0.975365f, 0.975195f, 0.975025f, 0.974855f, 0.974684f, 0.974512f,
+ 0.974339f, 0.974166f, 0.973993f, 0.973819f, 0.973644f, 0.973469f, 0.973293f, 0.973117f,
+ 0.972940f, 0.972762f, 0.972584f, 0.972406f, 0.972227f, 0.972047f, 0.971866f, 0.971685f,
+ 0.971504f, 0.971322f, 0.971139f, 0.970956f, 0.970772f, 0.970588f, 0.970403f, 0.970217f,
+ 0.970031f, 0.969845f, 0.969657f, 0.969470f, 0.969281f, 0.969092f, 0.968903f, 0.968713f,
+ 0.968522f, 0.968331f, 0.968139f, 0.967947f, 0.967754f, 0.967560f, 0.967366f, 0.967172f,
+ 0.966976f, 0.966781f, 0.966584f, 0.966387f, 0.966190f, 0.965992f, 0.965793f, 0.965594f,
+ 0.965394f, 0.965194f, 0.964993f, 0.964792f, 0.964590f, 0.964387f, 0.964184f, 0.963980f,
+ 0.963776f, 0.963571f, 0.963366f, 0.963160f, 0.962953f, 0.962746f, 0.962538f, 0.962330f,
+ 0.962121f, 0.961912f, 0.961702f, 0.961492f, 0.961280f, 0.961069f, 0.960857f, 0.960644f,
+ 0.960431f, 0.960217f, 0.960002f, 0.959787f, 0.959572f, 0.959355f, 0.959139f, 0.958921f,
+ 0.958703f, 0.958485f, 0.958266f, 0.958046f, 0.957826f, 0.957606f, 0.957385f, 0.957163f,
+ 0.956940f, 0.956717f, 0.956494f, 0.956270f, 0.956045f, 0.955820f, 0.955594f, 0.955368f,
+ 0.955141f, 0.954914f, 0.954686f, 0.954457f, 0.954228f, 0.953998f, 0.953768f, 0.953537f,
+ 0.953306f, 0.953074f, 0.952842f, 0.952609f, 0.952375f, 0.952141f, 0.951906f, 0.951671f,
+ 0.951435f, 0.951199f, 0.950962f, 0.950724f, 0.950486f, 0.950247f, 0.950008f, 0.949768f,
+ 0.949528f, 0.949287f, 0.949046f, 0.948804f, 0.948561f, 0.948318f, 0.948075f, 0.947830f,
+ 0.947586f, 0.947340f, 0.947094f, 0.946848f, 0.946601f, 0.946353f, 0.946105f, 0.945857f,
+ 0.945607f, 0.945358f, 0.945107f, 0.944856f, 0.944605f, 0.944353f, 0.944100f, 0.943847f,
+ 0.943593f, 0.943339f, 0.943084f, 0.942829f, 0.942573f, 0.942317f, 0.942060f, 0.941802f,
+ 0.941544f, 0.941285f, 0.941026f, 0.940766f, 0.940506f, 0.940245f, 0.939984f, 0.939722f,
+ 0.939459f, 0.939196f, 0.938932f, 0.938668f, 0.938404f, 0.938138f, 0.937872f, 0.937606f,
+ 0.937339f, 0.937072f, 0.936803f, 0.936535f, 0.936266f, 0.935996f, 0.935726f, 0.935455f,
+ 0.935184f, 0.934912f, 0.934639f, 0.934366f, 0.934093f, 0.933818f, 0.933544f, 0.933269f,
+ 0.932993f, 0.932716f, 0.932440f, 0.932162f, 0.931884f, 0.931606f, 0.931327f, 0.931047f,
+ 0.930767f, 0.930486f, 0.930205f, 0.929923f, 0.929641f, 0.929358f, 0.929075f, 0.928791f,
+ 0.928506f, 0.928221f, 0.927935f, 0.927649f, 0.927363f, 0.927075f, 0.926787f, 0.926499f,
+ 0.926210f, 0.925921f, 0.925631f, 0.925340f, 0.925049f, 0.924758f, 0.924465f, 0.924173f,
+ 0.923880f, 0.923586f, 0.923291f, 0.922997f, 0.922701f, 0.922405f, 0.922109f, 0.921812f,
+ 0.921514f, 0.921216f, 0.920917f, 0.920618f, 0.920318f, 0.920018f, 0.919717f, 0.919416f,
+ 0.919114f, 0.918811f, 0.918508f, 0.918205f, 0.917901f, 0.917596f, 0.917291f, 0.916985f,
+ 0.916679f, 0.916372f, 0.916065f, 0.915757f, 0.915449f, 0.915140f, 0.914830f, 0.914520f,
+ 0.914210f, 0.913899f, 0.913587f, 0.913275f, 0.912962f, 0.912649f, 0.912335f, 0.912021f,
+ 0.911706f, 0.911391f, 0.911075f, 0.910758f, 0.910441f, 0.910124f, 0.909806f, 0.909487f,
+ 0.909168f, 0.908848f, 0.908528f, 0.908207f, 0.907886f, 0.907564f, 0.907242f, 0.906919f,
+ 0.906596f, 0.906272f, 0.905947f, 0.905622f, 0.905297f, 0.904971f, 0.904644f, 0.904317f,
+ 0.903989f, 0.903661f, 0.903332f, 0.903003f, 0.902673f, 0.902343f, 0.902012f, 0.901681f,
+ 0.901349f, 0.901016f, 0.900683f, 0.900350f, 0.900016f, 0.899681f, 0.899346f, 0.899011f,
+ 0.898674f, 0.898338f, 0.898001f, 0.897663f, 0.897325f, 0.896986f, 0.896646f, 0.896307f,
+ 0.895966f, 0.895625f, 0.895284f, 0.894942f, 0.894599f, 0.894256f, 0.893913f, 0.893569f,
+ 0.893224f, 0.892879f, 0.892534f, 0.892187f, 0.891841f, 0.891493f, 0.891146f, 0.890797f,
+ 0.890449f, 0.890099f, 0.889750f, 0.889399f, 0.889048f, 0.888697f, 0.888345f, 0.887993f,
+ 0.887640f, 0.887286f, 0.886932f, 0.886578f, 0.886223f, 0.885867f, 0.885511f, 0.885154f,
+ 0.884797f, 0.884439f, 0.884081f, 0.883723f, 0.883363f, 0.883004f, 0.882643f, 0.882283f,
+ 0.881921f, 0.881559f, 0.881197f, 0.880834f, 0.880471f, 0.880107f, 0.879743f, 0.879378f,
+ 0.879012f, 0.878646f, 0.878280f, 0.877913f, 0.877545f, 0.877177f, 0.876809f, 0.876440f,
+ 0.876070f, 0.875700f, 0.875329f, 0.874958f, 0.874587f, 0.874215f, 0.873842f, 0.873469f,
+ 0.873095f, 0.872721f, 0.872346f, 0.871971f, 0.871595f, 0.871219f, 0.870842f, 0.870465f,
+ 0.870087f, 0.869709f, 0.869330f, 0.868951f, 0.868571f, 0.868190f, 0.867809f, 0.867428f,
+ 0.867046f, 0.866664f, 0.866281f, 0.865898f, 0.865514f, 0.865129f, 0.864744f, 0.864359f,
+ 0.863973f, 0.863586f, 0.863199f, 0.862812f, 0.862424f, 0.862035f, 0.861646f, 0.861257f,
+ 0.860867f, 0.860476f, 0.860085f, 0.859694f, 0.859302f, 0.858909f, 0.858516f, 0.858123f,
+ 0.857729f, 0.857334f, 0.856939f, 0.856543f, 0.856147f, 0.855751f, 0.855354f, 0.854956f,
+ 0.854558f, 0.854159f, 0.853760f, 0.853361f, 0.852961f, 0.852560f, 0.852159f, 0.851757f,
+ 0.851355f, 0.850953f, 0.850549f, 0.850146f, 0.849742f, 0.849337f, 0.848932f, 0.848526f,
+ 0.848120f, 0.847714f, 0.847307f, 0.846899f, 0.846491f, 0.846082f, 0.845673f, 0.845264f,
+ 0.844854f, 0.844443f, 0.844032f, 0.843620f, 0.843208f, 0.842796f, 0.842383f, 0.841969f,
+ 0.841555f, 0.841140f, 0.840725f, 0.840310f, 0.839894f, 0.839477f, 0.839060f, 0.838643f,
+ 0.838225f, 0.837806f, 0.837387f, 0.836968f, 0.836548f, 0.836127f, 0.835706f, 0.835285f,
+ 0.834863f, 0.834440f, 0.834018f, 0.833594f, 0.833170f, 0.832746f, 0.832321f, 0.831895f,
+ 0.831470f, 0.831043f, 0.830616f, 0.830189f, 0.829761f, 0.829333f, 0.828904f, 0.828475f,
+ 0.828045f, 0.827615f, 0.827184f, 0.826753f, 0.826321f, 0.825889f, 0.825456f, 0.825023f,
+ 0.824589f, 0.824155f, 0.823721f, 0.823285f, 0.822850f, 0.822414f, 0.821977f, 0.821540f,
+ 0.821102f, 0.820664f, 0.820226f, 0.819787f, 0.819348f, 0.818908f, 0.818467f, 0.818026f,
+ 0.817585f, 0.817143f, 0.816701f, 0.816258f, 0.815814f, 0.815371f, 0.814926f, 0.814482f,
+ 0.814036f, 0.813591f, 0.813144f, 0.812698f, 0.812251f, 0.811803f, 0.811355f, 0.810906f,
+ 0.810457f, 0.810008f, 0.809558f, 0.809107f, 0.808656f, 0.808205f, 0.807753f, 0.807300f,
+ 0.806848f, 0.806394f, 0.805940f, 0.805486f, 0.805031f, 0.804576f, 0.804120f, 0.803664f,
+ 0.803208f, 0.802750f, 0.802293f, 0.801835f, 0.801376f, 0.800917f, 0.800458f, 0.799998f,
+ 0.799537f, 0.799076f, 0.798615f, 0.798153f, 0.797691f, 0.797228f, 0.796765f, 0.796301f,
+ 0.795837f, 0.795372f, 0.794907f, 0.794442f, 0.793975f, 0.793509f, 0.793042f, 0.792575f,
+ 0.792107f, 0.791638f, 0.791169f, 0.790700f, 0.790230f, 0.789760f, 0.789289f, 0.788818f,
+ 0.788346f, 0.787874f, 0.787402f, 0.786929f, 0.786455f, 0.785981f, 0.785507f, 0.785032f,
+ 0.784557f, 0.784081f, 0.783605f, 0.783128f, 0.782651f, 0.782173f, 0.781695f, 0.781216f,
+ 0.780737f, 0.780258f, 0.779778f, 0.779297f, 0.778817f, 0.778335f, 0.777853f, 0.777371f,
+ 0.776888f, 0.776405f, 0.775922f, 0.775438f, 0.774953f, 0.774468f, 0.773983f, 0.773497f,
+ 0.773010f, 0.772524f, 0.772036f, 0.771549f, 0.771061f, 0.770572f, 0.770083f, 0.769593f,
+ 0.769103f, 0.768613f, 0.768122f, 0.767631f, 0.767139f, 0.766647f, 0.766154f, 0.765661f,
+ 0.765167f, 0.764673f, 0.764179f, 0.763684f, 0.763188f, 0.762693f, 0.762196f, 0.761700f,
+ 0.761202f, 0.760705f, 0.760207f, 0.759708f, 0.759209f, 0.758710f, 0.758210f, 0.757710f,
+ 0.757209f, 0.756708f, 0.756206f, 0.755704f, 0.755201f, 0.754698f, 0.754195f, 0.753691f,
+ 0.753187f, 0.752682f, 0.752177f, 0.751671f, 0.751165f, 0.750659f, 0.750152f, 0.749644f,
+ 0.749136f, 0.748628f, 0.748119f, 0.747610f, 0.747101f, 0.746591f, 0.746080f, 0.745569f,
+ 0.745058f, 0.744546f, 0.744034f, 0.743521f, 0.743008f, 0.742494f, 0.741980f, 0.741466f,
+ 0.740951f, 0.740436f, 0.739920f, 0.739404f, 0.738887f, 0.738370f, 0.737853f, 0.737335f,
+ 0.736817f, 0.736298f, 0.735779f, 0.735259f, 0.734739f, 0.734218f, 0.733697f, 0.733176f,
+ 0.732654f, 0.732132f, 0.731609f, 0.731086f, 0.730563f, 0.730039f, 0.729514f, 0.728990f,
+ 0.728464f, 0.727939f, 0.727413f, 0.726886f, 0.726359f, 0.725832f, 0.725304f, 0.724776f,
+ 0.724247f, 0.723718f, 0.723188f, 0.722659f, 0.722128f, 0.721597f, 0.721066f, 0.720535f,
+ 0.720003f, 0.719470f, 0.718937f, 0.718404f, 0.717870f, 0.717336f, 0.716801f, 0.716266f,
+ 0.715731f, 0.715195f, 0.714659f, 0.714122f, 0.713585f, 0.713047f, 0.712509f, 0.711971f,
+ 0.711432f, 0.710893f, 0.710353f, 0.709813f, 0.709273f, 0.708732f, 0.708191f, 0.707649f,
+ 0.707107f, 0.706564f, 0.706021f, 0.705478f, 0.704934f, 0.704390f, 0.703845f, 0.703300f,
+ 0.702755f, 0.702209f, 0.701663f, 0.701116f, 0.700569f, 0.700021f, 0.699473f, 0.698925f,
+ 0.698376f, 0.697827f, 0.697277f, 0.696728f, 0.696177f, 0.695626f, 0.695075f, 0.694524f,
+ 0.693971f, 0.693419f, 0.692866f, 0.692313f, 0.691759f, 0.691205f, 0.690651f, 0.690096f,
+ 0.689541f, 0.688985f, 0.688429f, 0.687872f, 0.687315f, 0.686758f, 0.686200f, 0.685642f,
+ 0.685084f, 0.684525f, 0.683965f, 0.683406f, 0.682846f, 0.682285f, 0.681724f, 0.681163f,
+ 0.680601f, 0.680039f, 0.679476f, 0.678913f, 0.678350f, 0.677786f, 0.677222f, 0.676658f,
+ 0.676093f, 0.675527f, 0.674962f, 0.674396f, 0.673829f, 0.673262f, 0.672695f, 0.672127f,
+ 0.671559f, 0.670990f, 0.670422f, 0.669852f, 0.669283f, 0.668712f, 0.668142f, 0.667571f,
+ 0.667000f, 0.666428f, 0.665856f, 0.665284f, 0.664711f, 0.664138f, 0.663564f, 0.662990f,
+ 0.662416f, 0.661841f, 0.661266f, 0.660690f, 0.660114f, 0.659538f, 0.658961f, 0.658384f,
+ 0.657807f, 0.657229f, 0.656651f, 0.656072f, 0.655493f, 0.654913f, 0.654334f, 0.653753f,
+ 0.653173f, 0.652592f, 0.652011f, 0.651429f, 0.650847f, 0.650264f, 0.649681f, 0.649098f,
+ 0.648514f, 0.647930f, 0.647346f, 0.646761f, 0.646176f, 0.645590f, 0.645005f, 0.644418f,
+ 0.643832f, 0.643245f, 0.642657f, 0.642069f, 0.641481f, 0.640892f, 0.640303f, 0.639714f,
+ 0.639124f, 0.638534f, 0.637944f, 0.637353f, 0.636762f, 0.636170f, 0.635578f, 0.634986f,
+ 0.634393f, 0.633800f, 0.633207f, 0.632613f, 0.632019f, 0.631424f, 0.630829f, 0.630234f,
+ 0.629638f, 0.629042f, 0.628446f, 0.627849f, 0.627252f, 0.626654f, 0.626056f, 0.625458f,
+ 0.624860f, 0.624260f, 0.623661f, 0.623061f, 0.622461f, 0.621861f, 0.621260f, 0.620659f,
+ 0.620057f, 0.619455f, 0.618853f, 0.618250f, 0.617647f, 0.617044f, 0.616440f, 0.615836f,
+ 0.615232f, 0.614627f, 0.614022f, 0.613416f, 0.612810f, 0.612204f, 0.611597f, 0.610990f,
+ 0.610383f, 0.609775f, 0.609167f, 0.608559f, 0.607950f, 0.607341f, 0.606731f, 0.606121f,
+ 0.605511f, 0.604900f, 0.604290f, 0.603678f, 0.603067f, 0.602455f, 0.601842f, 0.601230f,
+ 0.600616f, 0.600003f, 0.599389f, 0.598775f, 0.598161f, 0.597546f, 0.596931f, 0.596315f,
+ 0.595699f, 0.595083f, 0.594467f, 0.593850f, 0.593232f, 0.592615f, 0.591997f, 0.591378f,
+ 0.590760f, 0.590141f, 0.589521f, 0.588902f, 0.588282f, 0.587661f, 0.587040f, 0.586419f,
+ 0.585798f, 0.585176f, 0.584554f, 0.583931f, 0.583309f, 0.582685f, 0.582062f, 0.581438f,
+ 0.580814f, 0.580189f, 0.579565f, 0.578939f, 0.578314f, 0.577688f, 0.577062f, 0.576435f,
+ 0.575808f, 0.575181f, 0.574553f, 0.573925f, 0.573297f, 0.572669f, 0.572040f, 0.571410f,
+ 0.570781f, 0.570151f, 0.569521f, 0.568890f, 0.568259f, 0.567628f, 0.566996f, 0.566364f,
+ 0.565732f, 0.565099f, 0.564466f, 0.563833f, 0.563199f, 0.562565f, 0.561931f, 0.561297f,
+ 0.560662f, 0.560026f, 0.559391f, 0.558755f, 0.558119f, 0.557482f, 0.556845f, 0.556208f,
+ 0.555570f, 0.554932f, 0.554294f, 0.553656f, 0.553017f, 0.552378f, 0.551738f, 0.551098f,
+ 0.550458f, 0.549818f, 0.549177f, 0.548536f, 0.547894f, 0.547252f, 0.546610f, 0.545968f,
+ 0.545325f, 0.544682f, 0.544039f, 0.543395f, 0.542751f, 0.542106f, 0.541462f, 0.540817f,
+ 0.540171f, 0.539526f, 0.538880f, 0.538234f, 0.537587f, 0.536940f, 0.536293f, 0.535645f,
+ 0.534998f, 0.534349f, 0.533701f, 0.533052f, 0.532403f, 0.531754f, 0.531104f, 0.530454f,
+ 0.529804f, 0.529153f, 0.528502f, 0.527851f, 0.527199f, 0.526547f, 0.525895f, 0.525243f,
+ 0.524590f, 0.523937f, 0.523283f, 0.522629f, 0.521975f, 0.521321f, 0.520666f, 0.520011f,
+ 0.519356f, 0.518700f, 0.518045f, 0.517388f, 0.516732f, 0.516075f, 0.515418f, 0.514760f,
+ 0.514103f, 0.513445f, 0.512786f, 0.512128f, 0.511469f, 0.510810f, 0.510150f, 0.509490f,
+ 0.508830f, 0.508170f, 0.507509f, 0.506848f, 0.506187f, 0.505525f, 0.504863f, 0.504201f,
+ 0.503538f, 0.502876f, 0.502212f, 0.501549f, 0.500885f, 0.500221f, 0.499557f, 0.498893f,
+ 0.498228f, 0.497562f, 0.496897f, 0.496231f, 0.495565f, 0.494899f, 0.494232f, 0.493565f,
+ 0.492898f, 0.492231f, 0.491563f, 0.490895f, 0.490226f, 0.489558f, 0.488889f, 0.488220f,
+ 0.487550f, 0.486880f, 0.486210f, 0.485540f, 0.484869f, 0.484198f, 0.483527f, 0.482856f,
+ 0.482184f, 0.481512f, 0.480839f, 0.480167f, 0.479494f, 0.478821f, 0.478147f, 0.477473f,
+ 0.476799f, 0.476125f, 0.475450f, 0.474775f, 0.474100f, 0.473425f, 0.472749f, 0.472073f,
+ 0.471397f, 0.470720f, 0.470043f, 0.469366f, 0.468689f, 0.468011f, 0.467333f, 0.466655f,
+ 0.465977f, 0.465298f, 0.464619f, 0.463939f, 0.463260f, 0.462580f, 0.461900f, 0.461219f,
+ 0.460539f, 0.459858f, 0.459177f, 0.458495f, 0.457813f, 0.457131f, 0.456449f, 0.455766f,
+ 0.455084f, 0.454400f, 0.453717f, 0.453033f, 0.452350f, 0.451665f, 0.450981f, 0.450296f,
+ 0.449611f, 0.448926f, 0.448241f, 0.447555f, 0.446869f, 0.446183f, 0.445496f, 0.444809f,
+ 0.444122f, 0.443435f, 0.442747f, 0.442059f, 0.441371f, 0.440683f, 0.439994f, 0.439305f,
+ 0.438616f, 0.437927f, 0.437237f, 0.436547f, 0.435857f, 0.435167f, 0.434476f, 0.433785f,
+ 0.433094f, 0.432402f, 0.431711f, 0.431019f, 0.430326f, 0.429634f, 0.428941f, 0.428248f,
+ 0.427555f, 0.426862f, 0.426168f, 0.425474f, 0.424780f, 0.424085f, 0.423390f, 0.422695f,
+ 0.422000f, 0.421305f, 0.420609f, 0.419913f, 0.419217f, 0.418520f, 0.417824f, 0.417127f,
+ 0.416430f, 0.415732f, 0.415034f, 0.414337f, 0.413638f, 0.412940f, 0.412241f, 0.411542f,
+ 0.410843f, 0.410144f, 0.409444f, 0.408744f, 0.408044f, 0.407344f, 0.406643f, 0.405942f,
+ 0.405241f, 0.404540f, 0.403838f, 0.403137f, 0.402435f, 0.401732f, 0.401030f, 0.400327f,
+ 0.399624f, 0.398921f, 0.398218f, 0.397514f, 0.396810f, 0.396106f, 0.395401f, 0.394697f,
+ 0.393992f, 0.393287f, 0.392582f, 0.391876f, 0.391170f, 0.390464f, 0.389758f, 0.389052f,
+ 0.388345f, 0.387638f, 0.386931f, 0.386224f, 0.385516f, 0.384808f, 0.384100f, 0.383392f,
+ 0.382683f, 0.381975f, 0.381266f, 0.380557f, 0.379847f, 0.379138f, 0.378428f, 0.377718f,
+ 0.377007f, 0.376297f, 0.375586f, 0.374875f, 0.374164f, 0.373453f, 0.372741f, 0.372029f,
+ 0.371317f, 0.370605f, 0.369892f, 0.369180f, 0.368467f, 0.367754f, 0.367040f, 0.366327f,
+ 0.365613f, 0.364899f, 0.364185f, 0.363470f, 0.362756f, 0.362041f, 0.361326f, 0.360611f,
+ 0.359895f, 0.359179f, 0.358463f, 0.357747f, 0.357031f, 0.356314f, 0.355598f, 0.354881f,
+ 0.354164f, 0.353446f, 0.352729f, 0.352011f, 0.351293f, 0.350575f, 0.349856f, 0.349138f,
+ 0.348419f, 0.347700f, 0.346980f, 0.346261f, 0.345541f, 0.344821f, 0.344101f, 0.343381f,
+ 0.342661f, 0.341940f, 0.341219f, 0.340498f, 0.339777f, 0.339055f, 0.338334f, 0.337612f,
+ 0.336890f, 0.336168f, 0.335445f, 0.334722f, 0.334000f, 0.333277f, 0.332553f, 0.331830f,
+ 0.331106f, 0.330382f, 0.329658f, 0.328934f, 0.328210f, 0.327485f, 0.326760f, 0.326035f,
+ 0.325310f, 0.324585f, 0.323859f, 0.323134f, 0.322408f, 0.321682f, 0.320955f, 0.320229f,
+ 0.319502f, 0.318775f, 0.318048f, 0.317321f, 0.316593f, 0.315866f, 0.315138f, 0.314410f,
+ 0.313682f, 0.312953f, 0.312225f, 0.311496f, 0.310767f, 0.310038f, 0.309309f, 0.308579f,
+ 0.307850f, 0.307120f, 0.306390f, 0.305660f, 0.304929f, 0.304199f, 0.303468f, 0.302737f,
+ 0.302006f, 0.301275f, 0.300543f, 0.299812f, 0.299080f, 0.298348f, 0.297616f, 0.296883f,
+ 0.296151f, 0.295418f, 0.294685f, 0.293952f, 0.293219f, 0.292486f, 0.291752f, 0.291019f,
+ 0.290285f, 0.289551f, 0.288816f, 0.288082f, 0.287347f, 0.286613f, 0.285878f, 0.285143f,
+ 0.284408f, 0.283672f, 0.282937f, 0.282201f, 0.281465f, 0.280729f, 0.279993f, 0.279256f,
+ 0.278520f, 0.277783f, 0.277046f, 0.276309f, 0.275572f, 0.274834f, 0.274097f, 0.273359f,
+ 0.272621f, 0.271883f, 0.271145f, 0.270407f, 0.269668f, 0.268930f, 0.268191f, 0.267452f,
+ 0.266713f, 0.265973f, 0.265234f, 0.264494f, 0.263755f, 0.263015f, 0.262275f, 0.261534f,
+ 0.260794f, 0.260054f, 0.259313f, 0.258572f, 0.257831f, 0.257090f, 0.256349f, 0.255607f,
+ 0.254866f, 0.254124f, 0.253382f, 0.252640f, 0.251898f, 0.251155f, 0.250413f, 0.249670f,
+ 0.248928f, 0.248185f, 0.247442f, 0.246698f, 0.245955f, 0.245212f, 0.244468f, 0.243724f,
+ 0.242980f, 0.242236f, 0.241492f, 0.240748f, 0.240003f, 0.239258f, 0.238514f, 0.237769f,
+ 0.237024f, 0.236278f, 0.235533f, 0.234788f, 0.234042f, 0.233296f, 0.232550f, 0.231804f,
+ 0.231058f, 0.230312f, 0.229565f, 0.228819f, 0.228072f, 0.227325f, 0.226578f, 0.225831f,
+ 0.225084f, 0.224337f, 0.223589f, 0.222841f, 0.222094f, 0.221346f, 0.220598f, 0.219850f,
+ 0.219101f, 0.218353f, 0.217604f, 0.216856f, 0.216107f, 0.215358f, 0.214609f, 0.213860f,
+ 0.213110f, 0.212361f, 0.211611f, 0.210862f, 0.210112f, 0.209362f, 0.208612f, 0.207862f,
+ 0.207111f, 0.206361f, 0.205610f, 0.204860f, 0.204109f, 0.203358f, 0.202607f, 0.201856f,
+ 0.201105f, 0.200353f, 0.199602f, 0.198850f, 0.198098f, 0.197347f, 0.196595f, 0.195843f,
+ 0.195090f, 0.194338f, 0.193586f, 0.192833f, 0.192080f, 0.191328f, 0.190575f, 0.189822f,
+ 0.189069f, 0.188315f, 0.187562f, 0.186809f, 0.186055f, 0.185301f, 0.184548f, 0.183794f,
+ 0.183040f, 0.182286f, 0.181532f, 0.180777f, 0.180023f, 0.179268f, 0.178514f, 0.177759f,
+ 0.177004f, 0.176249f, 0.175494f, 0.174739f, 0.173984f, 0.173229f, 0.172473f, 0.171718f,
+ 0.170962f, 0.170206f, 0.169450f, 0.168694f, 0.167938f, 0.167182f, 0.166426f, 0.165670f,
+ 0.164913f, 0.164157f, 0.163400f, 0.162643f, 0.161886f, 0.161129f, 0.160372f, 0.159615f,
+ 0.158858f, 0.158101f, 0.157343f, 0.156586f, 0.155828f, 0.155071f, 0.154313f, 0.153555f,
+ 0.152797f, 0.152039f, 0.151281f, 0.150523f, 0.149765f, 0.149006f, 0.148248f, 0.147489f,
+ 0.146730f, 0.145972f, 0.145213f, 0.144454f, 0.143695f, 0.142936f, 0.142177f, 0.141418f,
+ 0.140658f, 0.139899f, 0.139139f, 0.138380f, 0.137620f, 0.136860f, 0.136101f, 0.135341f,
+ 0.134581f, 0.133821f, 0.133061f, 0.132300f, 0.131540f, 0.130780f, 0.130019f, 0.129259f,
+ 0.128498f, 0.127737f, 0.126977f, 0.126216f, 0.125455f, 0.124694f, 0.123933f, 0.123172f,
+ 0.122411f, 0.121649f, 0.120888f, 0.120127f, 0.119365f, 0.118604f, 0.117842f, 0.117080f,
+ 0.116319f, 0.115557f, 0.114795f, 0.114033f, 0.113271f, 0.112509f, 0.111747f, 0.110984f,
+ 0.110222f, 0.109460f, 0.108697f, 0.107935f, 0.107172f, 0.106410f, 0.105647f, 0.104884f,
+ 0.104122f, 0.103359f, 0.102596f, 0.101833f, 0.101070f, 0.100307f, 0.099544f, 0.098780f,
+ 0.098017f, 0.097254f, 0.096490f, 0.095727f, 0.094963f, 0.094200f, 0.093436f, 0.092673f,
+ 0.091909f, 0.091145f, 0.090381f, 0.089617f, 0.088854f, 0.088090f, 0.087326f, 0.086561f,
+ 0.085797f, 0.085033f, 0.084269f, 0.083505f, 0.082740f, 0.081976f, 0.081211f, 0.080447f,
+ 0.079682f, 0.078918f, 0.078153f, 0.077389f, 0.076624f, 0.075859f, 0.075094f, 0.074329f,
+ 0.073565f, 0.072800f, 0.072035f, 0.071270f, 0.070505f, 0.069739f, 0.068974f, 0.068209f,
+ 0.067444f, 0.066679f, 0.065913f, 0.065148f, 0.064383f, 0.063617f, 0.062852f, 0.062086f,
+ 0.061321f, 0.060555f, 0.059790f, 0.059024f, 0.058258f, 0.057493f, 0.056727f, 0.055961f,
+ 0.055195f, 0.054429f, 0.053664f, 0.052898f, 0.052132f, 0.051366f, 0.050600f, 0.049834f,
+ 0.049068f, 0.048302f, 0.047535f, 0.046769f, 0.046003f, 0.045237f, 0.044471f, 0.043705f,
+ 0.042938f, 0.042172f, 0.041406f, 0.040639f, 0.039873f, 0.039107f, 0.038340f, 0.037574f,
+ 0.036807f, 0.036041f, 0.035274f, 0.034508f, 0.033741f, 0.032975f, 0.032208f, 0.031441f,
+ 0.030675f, 0.029908f, 0.029142f, 0.028375f, 0.027608f, 0.026841f, 0.026075f, 0.025308f,
+ 0.024541f, 0.023774f, 0.023008f, 0.022241f, 0.021474f, 0.020707f, 0.019940f, 0.019174f,
+ 0.018407f, 0.017640f, 0.016873f, 0.016106f, 0.015339f, 0.014572f, 0.013805f, 0.013038f,
+ 0.012272f, 0.011505f, 0.010738f, 0.009971f, 0.009204f, 0.008437f, 0.007670f, 0.006903f,
+ 0.006136f, 0.005369f, 0.004602f, 0.003835f, 0.003068f, 0.002301f, 0.001534f, 0.000767f,
+ 0.000000f, 0.000767f, 0.001534f, 0.002301f, 0.003068f, 0.003835f, 0.004602f, 0.005369f,
+ 0.006136f, 0.006903f, 0.007670f, 0.008437f, 0.009204f, 0.009971f, 0.010738f, 0.011505f,
+ 0.012272f, 0.013038f, 0.013805f, 0.014572f, 0.015339f, 0.016106f, 0.016873f, 0.017640f,
+ 0.018407f, 0.019174f, 0.019940f, 0.020707f, 0.021474f, 0.022241f, 0.023008f, 0.023774f,
+ 0.024541f, 0.025308f, 0.026075f, 0.026841f, 0.027608f, 0.028375f, 0.029142f, 0.029908f,
+ 0.030675f, 0.031441f, 0.032208f, 0.032975f, 0.033741f, 0.034508f, 0.035274f, 0.036041f,
+ 0.036807f, 0.037574f, 0.038340f, 0.039107f, 0.039873f, 0.040639f, 0.041406f, 0.042172f,
+ 0.042938f, 0.043705f, 0.044471f, 0.045237f, 0.046003f, 0.046769f, 0.047535f, 0.048302f,
+ 0.049068f, 0.049834f, 0.050600f, 0.051366f, 0.052132f, 0.052898f, 0.053664f, 0.054429f,
+ 0.055195f, 0.055961f, 0.056727f, 0.057493f, 0.058258f, 0.059024f, 0.059790f, 0.060555f,
+ 0.061321f, 0.062086f, 0.062852f, 0.063617f, 0.064383f, 0.065148f, 0.065913f, 0.066679f,
+ 0.067444f, 0.068209f, 0.068974f, 0.069739f, 0.070505f, 0.071270f, 0.072035f, 0.072800f,
+ 0.073565f, 0.074329f, 0.075094f, 0.075859f, 0.076624f, 0.077389f, 0.078153f, 0.078918f,
+ 0.079682f, 0.080447f, 0.081211f, 0.081976f, 0.082740f, 0.083505f, 0.084269f, 0.085033f,
+ 0.085797f, 0.086561f, 0.087326f, 0.088090f, 0.088854f, 0.089617f, 0.090381f, 0.091145f,
+ 0.091909f, 0.092673f, 0.093436f, 0.094200f, 0.094963f, 0.095727f, 0.096490f, 0.097254f,
+ 0.098017f, 0.098780f, 0.099544f, 0.100307f, 0.101070f, 0.101833f, 0.102596f, 0.103359f,
+ 0.104122f, 0.104884f, 0.105647f, 0.106410f, 0.107172f, 0.107935f, 0.108697f, 0.109460f,
+ 0.110222f, 0.110984f, 0.111747f, 0.112509f, 0.113271f, 0.114033f, 0.114795f, 0.115557f,
+ 0.116319f, 0.117080f, 0.117842f, 0.118604f, 0.119365f, 0.120127f, 0.120888f, 0.121649f,
+ 0.122411f, 0.123172f, 0.123933f, 0.124694f, 0.125455f, 0.126216f, 0.126977f, 0.127737f,
+ 0.128498f, 0.129259f, 0.130019f, 0.130780f, 0.131540f, 0.132300f, 0.133061f, 0.133821f,
+ 0.134581f, 0.135341f, 0.136101f, 0.136860f, 0.137620f, 0.138380f, 0.139139f, 0.139899f,
+ 0.140658f, 0.141418f, 0.142177f, 0.142936f, 0.143695f, 0.144454f, 0.145213f, 0.145972f,
+ 0.146730f, 0.147489f, 0.148248f, 0.149006f, 0.149765f, 0.150523f, 0.151281f, 0.152039f,
+ 0.152797f, 0.153555f, 0.154313f, 0.155071f, 0.155828f, 0.156586f, 0.157343f, 0.158101f,
+ 0.158858f, 0.159615f, 0.160372f, 0.161129f, 0.161886f, 0.162643f, 0.163400f, 0.164157f,
+ 0.164913f, 0.165670f, 0.166426f, 0.167182f, 0.167938f, 0.168694f, 0.169450f, 0.170206f,
+ 0.170962f, 0.171718f, 0.172473f, 0.173229f, 0.173984f, 0.174739f, 0.175494f, 0.176249f,
+ 0.177004f, 0.177759f, 0.178514f, 0.179268f, 0.180023f, 0.180777f, 0.181532f, 0.182286f,
+ 0.183040f, 0.183794f, 0.184548f, 0.185301f, 0.186055f, 0.186809f, 0.187562f, 0.188315f,
+ 0.189069f, 0.189822f, 0.190575f, 0.191328f, 0.192080f, 0.192833f, 0.193586f, 0.194338f,
+ 0.195090f, 0.195843f, 0.196595f, 0.197347f, 0.198098f, 0.198850f, 0.199602f, 0.200353f,
+ 0.201105f, 0.201856f, 0.202607f, 0.203358f, 0.204109f, 0.204860f, 0.205610f, 0.206361f,
+ 0.207111f, 0.207862f, 0.208612f, 0.209362f, 0.210112f, 0.210862f, 0.211611f, 0.212361f,
+ 0.213110f, 0.213860f, 0.214609f, 0.215358f, 0.216107f, 0.216856f, 0.217604f, 0.218353f,
+ 0.219101f, 0.219850f, 0.220598f, 0.221346f, 0.222094f, 0.222841f, 0.223589f, 0.224337f,
+ 0.225084f, 0.225831f, 0.226578f, 0.227325f, 0.228072f, 0.228819f, 0.229565f, 0.230312f,
+ 0.231058f, 0.231804f, 0.232550f, 0.233296f, 0.234042f, 0.234788f, 0.235533f, 0.236278f,
+ 0.237024f, 0.237769f, 0.238514f, 0.239258f, 0.240003f, 0.240748f, 0.241492f, 0.242236f,
+ 0.242980f, 0.243724f, 0.244468f, 0.245212f, 0.245955f, 0.246698f, 0.247442f, 0.248185f,
+ 0.248928f, 0.249670f, 0.250413f, 0.251155f, 0.251898f, 0.252640f, 0.253382f, 0.254124f,
+ 0.254866f, 0.255607f, 0.256349f, 0.257090f, 0.257831f, 0.258572f, 0.259313f, 0.260054f,
+ 0.260794f, 0.261534f, 0.262275f, 0.263015f, 0.263755f, 0.264494f, 0.265234f, 0.265973f,
+ 0.266713f, 0.267452f, 0.268191f, 0.268930f, 0.269668f, 0.270407f, 0.271145f, 0.271883f,
+ 0.272621f, 0.273359f, 0.274097f, 0.274834f, 0.275572f, 0.276309f, 0.277046f, 0.277783f,
+ 0.278520f, 0.279256f, 0.279993f, 0.280729f, 0.281465f, 0.282201f, 0.282937f, 0.283672f,
+ 0.284408f, 0.285143f, 0.285878f, 0.286613f, 0.287347f, 0.288082f, 0.288816f, 0.289551f,
+ 0.290285f, 0.291019f, 0.291752f, 0.292486f, 0.293219f, 0.293952f, 0.294685f, 0.295418f,
+ 0.296151f, 0.296883f, 0.297616f, 0.298348f, 0.299080f, 0.299812f, 0.300543f, 0.301275f,
+ 0.302006f, 0.302737f, 0.303468f, 0.304199f, 0.304929f, 0.305660f, 0.306390f, 0.307120f,
+ 0.307850f, 0.308579f, 0.309309f, 0.310038f, 0.310767f, 0.311496f, 0.312225f, 0.312953f,
+ 0.313682f, 0.314410f, 0.315138f, 0.315866f, 0.316593f, 0.317321f, 0.318048f, 0.318775f,
+ 0.319502f, 0.320229f, 0.320955f, 0.321682f, 0.322408f, 0.323134f, 0.323859f, 0.324585f,
+ 0.325310f, 0.326035f, 0.326760f, 0.327485f, 0.328210f, 0.328934f, 0.329658f, 0.330382f,
+ 0.331106f, 0.331830f, 0.332553f, 0.333277f, 0.334000f, 0.334722f, 0.335445f, 0.336168f,
+ 0.336890f, 0.337612f, 0.338334f, 0.339055f, 0.339777f, 0.340498f, 0.341219f, 0.341940f,
+ 0.342661f, 0.343381f, 0.344101f, 0.344821f, 0.345541f, 0.346261f, 0.346980f, 0.347700f,
+ 0.348419f, 0.349138f, 0.349856f, 0.350575f, 0.351293f, 0.352011f, 0.352729f, 0.353446f,
+ 0.354164f, 0.354881f, 0.355598f, 0.356314f, 0.357031f, 0.357747f, 0.358463f, 0.359179f,
+ 0.359895f, 0.360611f, 0.361326f, 0.362041f, 0.362756f, 0.363470f, 0.364185f, 0.364899f,
+ 0.365613f, 0.366327f, 0.367040f, 0.367754f, 0.368467f, 0.369180f, 0.369892f, 0.370605f,
+ 0.371317f, 0.372029f, 0.372741f, 0.373453f, 0.374164f, 0.374875f, 0.375586f, 0.376297f,
+ 0.377007f, 0.377718f, 0.378428f, 0.379138f, 0.379847f, 0.380557f, 0.381266f, 0.381975f,
+ 0.382683f, 0.383392f, 0.384100f, 0.384808f, 0.385516f, 0.386224f, 0.386931f, 0.387638f,
+ 0.388345f, 0.389052f, 0.389758f, 0.390464f, 0.391170f, 0.391876f, 0.392582f, 0.393287f,
+ 0.393992f, 0.394697f, 0.395401f, 0.396106f, 0.396810f, 0.397514f, 0.398218f, 0.398921f,
+ 0.399624f, 0.400327f, 0.401030f, 0.401732f, 0.402435f, 0.403137f, 0.403838f, 0.404540f,
+ 0.405241f, 0.405942f, 0.406643f, 0.407344f, 0.408044f, 0.408744f, 0.409444f, 0.410144f,
+ 0.410843f, 0.411542f, 0.412241f, 0.412940f, 0.413638f, 0.414337f, 0.415034f, 0.415732f,
+ 0.416430f, 0.417127f, 0.417824f, 0.418520f, 0.419217f, 0.419913f, 0.420609f, 0.421305f,
+ 0.422000f, 0.422695f, 0.423390f, 0.424085f, 0.424780f, 0.425474f, 0.426168f, 0.426862f,
+ 0.427555f, 0.428248f, 0.428941f, 0.429634f, 0.430326f, 0.431019f, 0.431711f, 0.432402f,
+ 0.433094f, 0.433785f, 0.434476f, 0.435167f, 0.435857f, 0.436547f, 0.437237f, 0.437927f,
+ 0.438616f, 0.439305f, 0.439994f, 0.440683f, 0.441371f, 0.442059f, 0.442747f, 0.443435f,
+ 0.444122f, 0.444809f, 0.445496f, 0.446183f, 0.446869f, 0.447555f, 0.448241f, 0.448926f,
+ 0.449611f, 0.450296f, 0.450981f, 0.451665f, 0.452350f, 0.453033f, 0.453717f, 0.454400f,
+ 0.455084f, 0.455766f, 0.456449f, 0.457131f, 0.457813f, 0.458495f, 0.459177f, 0.459858f,
+ 0.460539f, 0.461219f, 0.461900f, 0.462580f, 0.463260f, 0.463939f, 0.464619f, 0.465298f,
+ 0.465977f, 0.466655f, 0.467333f, 0.468011f, 0.468689f, 0.469366f, 0.470043f, 0.470720f,
+ 0.471397f, 0.472073f, 0.472749f, 0.473425f, 0.474100f, 0.474775f, 0.475450f, 0.476125f,
+ 0.476799f, 0.477473f, 0.478147f, 0.478821f, 0.479494f, 0.480167f, 0.480839f, 0.481512f,
+ 0.482184f, 0.482856f, 0.483527f, 0.484198f, 0.484869f, 0.485540f, 0.486210f, 0.486880f,
+ 0.487550f, 0.488220f, 0.488889f, 0.489558f, 0.490226f, 0.490895f, 0.491563f, 0.492231f,
+ 0.492898f, 0.493565f, 0.494232f, 0.494899f, 0.495565f, 0.496231f, 0.496897f, 0.497562f,
+ 0.498228f, 0.498893f, 0.499557f, 0.500221f, 0.500885f, 0.501549f, 0.502212f, 0.502876f,
+ 0.503538f, 0.504201f, 0.504863f, 0.505525f, 0.506187f, 0.506848f, 0.507509f, 0.508170f,
+ 0.508830f, 0.509490f, 0.510150f, 0.510810f, 0.511469f, 0.512128f, 0.512786f, 0.513445f,
+ 0.514103f, 0.514760f, 0.515418f, 0.516075f, 0.516732f, 0.517388f, 0.518045f, 0.518700f,
+ 0.519356f, 0.520011f, 0.520666f, 0.521321f, 0.521975f, 0.522629f, 0.523283f, 0.523937f,
+ 0.524590f, 0.525243f, 0.525895f, 0.526547f, 0.527199f, 0.527851f, 0.528502f, 0.529153f,
+ 0.529804f, 0.530454f, 0.531104f, 0.531754f, 0.532403f, 0.533052f, 0.533701f, 0.534349f,
+ 0.534998f, 0.535645f, 0.536293f, 0.536940f, 0.537587f, 0.538234f, 0.538880f, 0.539526f,
+ 0.540171f, 0.540817f, 0.541462f, 0.542106f, 0.542751f, 0.543395f, 0.544039f, 0.544682f,
+ 0.545325f, 0.545968f, 0.546610f, 0.547252f, 0.547894f, 0.548536f, 0.549177f, 0.549818f,
+ 0.550458f, 0.551098f, 0.551738f, 0.552378f, 0.553017f, 0.553656f, 0.554294f, 0.554932f,
+ 0.555570f, 0.556208f, 0.556845f, 0.557482f, 0.558119f, 0.558755f, 0.559391f, 0.560026f,
+ 0.560662f, 0.561297f, 0.561931f, 0.562565f, 0.563199f, 0.563833f, 0.564466f, 0.565099f,
+ 0.565732f, 0.566364f, 0.566996f, 0.567628f, 0.568259f, 0.568890f, 0.569521f, 0.570151f,
+ 0.570781f, 0.571410f, 0.572040f, 0.572669f, 0.573297f, 0.573925f, 0.574553f, 0.575181f,
+ 0.575808f, 0.576435f, 0.577062f, 0.577688f, 0.578314f, 0.578939f, 0.579565f, 0.580189f,
+ 0.580814f, 0.581438f, 0.582062f, 0.582685f, 0.583309f, 0.583931f, 0.584554f, 0.585176f,
+ 0.585798f, 0.586419f, 0.587040f, 0.587661f, 0.588282f, 0.588902f, 0.589521f, 0.590141f,
+ 0.590760f, 0.591378f, 0.591997f, 0.592615f, 0.593232f, 0.593850f, 0.594467f, 0.595083f,
+ 0.595699f, 0.596315f, 0.596931f, 0.597546f, 0.598161f, 0.598775f, 0.599389f, 0.600003f,
+ 0.600616f, 0.601230f, 0.601842f, 0.602455f, 0.603067f, 0.603678f, 0.604290f, 0.604900f,
+ 0.605511f, 0.606121f, 0.606731f, 0.607341f, 0.607950f, 0.608559f, 0.609167f, 0.609775f,
+ 0.610383f, 0.610990f, 0.611597f, 0.612204f, 0.612810f, 0.613416f, 0.614022f, 0.614627f,
+ 0.615232f, 0.615836f, 0.616440f, 0.617044f, 0.617647f, 0.618250f, 0.618853f, 0.619455f,
+ 0.620057f, 0.620659f, 0.621260f, 0.621861f, 0.622461f, 0.623061f, 0.623661f, 0.624260f,
+ 0.624860f, 0.625458f, 0.626056f, 0.626654f, 0.627252f, 0.627849f, 0.628446f, 0.629042f,
+ 0.629638f, 0.630234f, 0.630829f, 0.631424f, 0.632019f, 0.632613f, 0.633207f, 0.633800f,
+ 0.634393f, 0.634986f, 0.635578f, 0.636170f, 0.636762f, 0.637353f, 0.637944f, 0.638534f,
+ 0.639124f, 0.639714f, 0.640303f, 0.640892f, 0.641481f, 0.642069f, 0.642657f, 0.643245f,
+ 0.643832f, 0.644418f, 0.645005f, 0.645590f, 0.646176f, 0.646761f, 0.647346f, 0.647930f,
+ 0.648514f, 0.649098f, 0.649681f, 0.650264f, 0.650847f, 0.651429f, 0.652011f, 0.652592f,
+ 0.653173f, 0.653753f, 0.654334f, 0.654913f, 0.655493f, 0.656072f, 0.656651f, 0.657229f,
+ 0.657807f, 0.658384f, 0.658961f, 0.659538f, 0.660114f, 0.660690f, 0.661266f, 0.661841f,
+ 0.662416f, 0.662990f, 0.663564f, 0.664138f, 0.664711f, 0.665284f, 0.665856f, 0.666428f,
+ 0.667000f, 0.667571f, 0.668142f, 0.668712f, 0.669283f, 0.669852f, 0.670422f, 0.670990f,
+ 0.671559f, 0.672127f, 0.672695f, 0.673262f, 0.673829f, 0.674396f, 0.674962f, 0.675527f,
+ 0.676093f, 0.676658f, 0.677222f, 0.677786f, 0.678350f, 0.678913f, 0.679476f, 0.680039f,
+ 0.680601f, 0.681163f, 0.681724f, 0.682285f, 0.682846f, 0.683406f, 0.683965f, 0.684525f,
+ 0.685084f, 0.685642f, 0.686200f, 0.686758f, 0.687315f, 0.687872f, 0.688429f, 0.688985f,
+ 0.689541f, 0.690096f, 0.690651f, 0.691205f, 0.691759f, 0.692313f, 0.692866f, 0.693419f,
+ 0.693971f, 0.694524f, 0.695075f, 0.695626f, 0.696177f, 0.696728f, 0.697277f, 0.697827f,
+ 0.698376f, 0.698925f, 0.699473f, 0.700021f, 0.700569f, 0.701116f, 0.701663f, 0.702209f,
+ 0.702755f, 0.703300f, 0.703845f, 0.704390f, 0.704934f, 0.705478f, 0.706021f, 0.706564f,
+ 0.707107f, 0.707649f, 0.708191f, 0.708732f, 0.709273f, 0.709813f, 0.710353f, 0.710893f,
+ 0.711432f, 0.711971f, 0.712509f, 0.713047f, 0.713585f, 0.714122f, 0.714659f, 0.715195f,
+ 0.715731f, 0.716266f, 0.716801f, 0.717336f, 0.717870f, 0.718404f, 0.718937f, 0.719470f,
+ 0.720003f, 0.720535f, 0.721066f, 0.721597f, 0.722128f, 0.722659f, 0.723188f, 0.723718f,
+ 0.724247f, 0.724776f, 0.725304f, 0.725832f, 0.726359f, 0.726886f, 0.727413f, 0.727939f,
+ 0.728464f, 0.728990f, 0.729514f, 0.730039f, 0.730563f, 0.731086f, 0.731609f, 0.732132f,
+ 0.732654f, 0.733176f, 0.733697f, 0.734218f, 0.734739f, 0.735259f, 0.735779f, 0.736298f,
+ 0.736817f, 0.737335f, 0.737853f, 0.738370f, 0.738887f, 0.739404f, 0.739920f, 0.740436f,
+ 0.740951f, 0.741466f, 0.741980f, 0.742494f, 0.743008f, 0.743521f, 0.744034f, 0.744546f,
+ 0.745058f, 0.745569f, 0.746080f, 0.746591f, 0.747101f, 0.747610f, 0.748119f, 0.748628f,
+ 0.749136f, 0.749644f, 0.750152f, 0.750659f, 0.751165f, 0.751671f, 0.752177f, 0.752682f,
+ 0.753187f, 0.753691f, 0.754195f, 0.754698f, 0.755201f, 0.755704f, 0.756206f, 0.756708f,
+ 0.757209f, 0.757710f, 0.758210f, 0.758710f, 0.759209f, 0.759708f, 0.760207f, 0.760705f,
+ 0.761202f, 0.761700f, 0.762196f, 0.762693f, 0.763188f, 0.763684f, 0.764179f, 0.764673f,
+ 0.765167f, 0.765661f, 0.766154f, 0.766647f, 0.767139f, 0.767631f, 0.768122f, 0.768613f,
+ 0.769103f, 0.769593f, 0.770083f, 0.770572f, 0.771061f, 0.771549f, 0.772036f, 0.772524f,
+ 0.773010f, 0.773497f, 0.773983f, 0.774468f, 0.774953f, 0.775438f, 0.775922f, 0.776405f,
+ 0.776888f, 0.777371f, 0.777853f, 0.778335f, 0.778817f, 0.779297f, 0.779778f, 0.780258f,
+ 0.780737f, 0.781216f, 0.781695f, 0.782173f, 0.782651f, 0.783128f, 0.783605f, 0.784081f,
+ 0.784557f, 0.785032f, 0.785507f, 0.785981f, 0.786455f, 0.786929f, 0.787402f, 0.787874f,
+ 0.788346f, 0.788818f, 0.789289f, 0.789760f, 0.790230f, 0.790700f, 0.791169f, 0.791638f,
+ 0.792107f, 0.792575f, 0.793042f, 0.793509f, 0.793975f, 0.794442f, 0.794907f, 0.795372f,
+ 0.795837f, 0.796301f, 0.796765f, 0.797228f, 0.797691f, 0.798153f, 0.798615f, 0.799076f,
+ 0.799537f, 0.799998f, 0.800458f, 0.800917f, 0.801376f, 0.801835f, 0.802293f, 0.802750f,
+ 0.803208f, 0.803664f, 0.804120f, 0.804576f, 0.805031f, 0.805486f, 0.805940f, 0.806394f,
+ 0.806848f, 0.807300f, 0.807753f, 0.808205f, 0.808656f, 0.809107f, 0.809558f, 0.810008f,
+ 0.810457f, 0.810906f, 0.811355f, 0.811803f, 0.812251f, 0.812698f, 0.813144f, 0.813591f,
+ 0.814036f, 0.814482f, 0.814926f, 0.815371f, 0.815814f, 0.816258f, 0.816701f, 0.817143f,
+ 0.817585f, 0.818026f, 0.818467f, 0.818908f, 0.819348f, 0.819787f, 0.820226f, 0.820664f,
+ 0.821102f, 0.821540f, 0.821977f, 0.822414f, 0.822850f, 0.823285f, 0.823721f, 0.824155f,
+ 0.824589f, 0.825023f, 0.825456f, 0.825889f, 0.826321f, 0.826753f, 0.827184f, 0.827615f,
+ 0.828045f, 0.828475f, 0.828904f, 0.829333f, 0.829761f, 0.830189f, 0.830616f, 0.831043f,
+ 0.831470f, 0.831895f, 0.832321f, 0.832746f, 0.833170f, 0.833594f, 0.834018f, 0.834440f,
+ 0.834863f, 0.835285f, 0.835706f, 0.836127f, 0.836548f, 0.836968f, 0.837387f, 0.837806f,
+ 0.838225f, 0.838643f, 0.839060f, 0.839477f, 0.839894f, 0.840310f, 0.840725f, 0.841140f,
+ 0.841555f, 0.841969f, 0.842383f, 0.842796f, 0.843208f, 0.843620f, 0.844032f, 0.844443f,
+ 0.844854f, 0.845264f, 0.845673f, 0.846082f, 0.846491f, 0.846899f, 0.847307f, 0.847714f,
+ 0.848120f, 0.848526f, 0.848932f, 0.849337f, 0.849742f, 0.850146f, 0.850549f, 0.850953f,
+ 0.851355f, 0.851757f, 0.852159f, 0.852560f, 0.852961f, 0.853361f, 0.853760f, 0.854159f,
+ 0.854558f, 0.854956f, 0.855354f, 0.855751f, 0.856147f, 0.856543f, 0.856939f, 0.857334f,
+ 0.857729f, 0.858123f, 0.858516f, 0.858909f, 0.859302f, 0.859694f, 0.860085f, 0.860476f,
+ 0.860867f, 0.861257f, 0.861646f, 0.862035f, 0.862424f, 0.862812f, 0.863199f, 0.863586f,
+ 0.863973f, 0.864359f, 0.864744f, 0.865129f, 0.865514f, 0.865898f, 0.866281f, 0.866664f,
+ 0.867046f, 0.867428f, 0.867809f, 0.868190f, 0.868571f, 0.868951f, 0.869330f, 0.869709f,
+ 0.870087f, 0.870465f, 0.870842f, 0.871219f, 0.871595f, 0.871971f, 0.872346f, 0.872721f,
+ 0.873095f, 0.873469f, 0.873842f, 0.874215f, 0.874587f, 0.874958f, 0.875329f, 0.875700f,
+ 0.876070f, 0.876440f, 0.876809f, 0.877177f, 0.877545f, 0.877913f, 0.878280f, 0.878646f,
+ 0.879012f, 0.879378f, 0.879743f, 0.880107f, 0.880471f, 0.880834f, 0.881197f, 0.881559f,
+ 0.881921f, 0.882283f, 0.882643f, 0.883004f, 0.883363f, 0.883723f, 0.884081f, 0.884439f,
+ 0.884797f, 0.885154f, 0.885511f, 0.885867f, 0.886223f, 0.886578f, 0.886932f, 0.887286f,
+ 0.887640f, 0.887993f, 0.888345f, 0.888697f, 0.889048f, 0.889399f, 0.889750f, 0.890099f,
+ 0.890449f, 0.890797f, 0.891146f, 0.891493f, 0.891841f, 0.892187f, 0.892534f, 0.892879f,
+ 0.893224f, 0.893569f, 0.893913f, 0.894256f, 0.894599f, 0.894942f, 0.895284f, 0.895625f,
+ 0.895966f, 0.896307f, 0.896646f, 0.896986f, 0.897325f, 0.897663f, 0.898001f, 0.898338f,
+ 0.898674f, 0.899011f, 0.899346f, 0.899681f, 0.900016f, 0.900350f, 0.900683f, 0.901016f,
+ 0.901349f, 0.901681f, 0.902012f, 0.902343f, 0.902673f, 0.903003f, 0.903332f, 0.903661f,
+ 0.903989f, 0.904317f, 0.904644f, 0.904971f, 0.905297f, 0.905622f, 0.905947f, 0.906272f,
+ 0.906596f, 0.906919f, 0.907242f, 0.907564f, 0.907886f, 0.908207f, 0.908528f, 0.908848f,
+ 0.909168f, 0.909487f, 0.909806f, 0.910124f, 0.910441f, 0.910758f, 0.911075f, 0.911391f,
+ 0.911706f, 0.912021f, 0.912335f, 0.912649f, 0.912962f, 0.913275f, 0.913587f, 0.913899f,
+ 0.914210f, 0.914520f, 0.914830f, 0.915140f, 0.915449f, 0.915757f, 0.916065f, 0.916372f,
+ 0.916679f, 0.916985f, 0.917291f, 0.917596f, 0.917901f, 0.918205f, 0.918508f, 0.918811f,
+ 0.919114f, 0.919416f, 0.919717f, 0.920018f, 0.920318f, 0.920618f, 0.920917f, 0.921216f,
+ 0.921514f, 0.921812f, 0.922109f, 0.922405f, 0.922701f, 0.922997f, 0.923291f, 0.923586f,
+ 0.923880f, 0.924173f, 0.924465f, 0.924758f, 0.925049f, 0.925340f, 0.925631f, 0.925921f,
+ 0.926210f, 0.926499f, 0.926787f, 0.927075f, 0.927363f, 0.927649f, 0.927935f, 0.928221f,
+ 0.928506f, 0.928791f, 0.929075f, 0.929358f, 0.929641f, 0.929923f, 0.930205f, 0.930486f,
+ 0.930767f, 0.931047f, 0.931327f, 0.931606f, 0.931884f, 0.932162f, 0.932440f, 0.932716f,
+ 0.932993f, 0.933269f, 0.933544f, 0.933818f, 0.934093f, 0.934366f, 0.934639f, 0.934912f,
+ 0.935184f, 0.935455f, 0.935726f, 0.935996f, 0.936266f, 0.936535f, 0.936803f, 0.937072f,
+ 0.937339f, 0.937606f, 0.937872f, 0.938138f, 0.938404f, 0.938668f, 0.938932f, 0.939196f,
+ 0.939459f, 0.939722f, 0.939984f, 0.940245f, 0.940506f, 0.940766f, 0.941026f, 0.941285f,
+ 0.941544f, 0.941802f, 0.942060f, 0.942317f, 0.942573f, 0.942829f, 0.943084f, 0.943339f,
+ 0.943593f, 0.943847f, 0.944100f, 0.944353f, 0.944605f, 0.944856f, 0.945107f, 0.945358f,
+ 0.945607f, 0.945857f, 0.946105f, 0.946353f, 0.946601f, 0.946848f, 0.947094f, 0.947340f,
+ 0.947586f, 0.947830f, 0.948075f, 0.948318f, 0.948561f, 0.948804f, 0.949046f, 0.949287f,
+ 0.949528f, 0.949768f, 0.950008f, 0.950247f, 0.950486f, 0.950724f, 0.950962f, 0.951199f,
+ 0.951435f, 0.951671f, 0.951906f, 0.952141f, 0.952375f, 0.952609f, 0.952842f, 0.953074f,
+ 0.953306f, 0.953537f, 0.953768f, 0.953998f, 0.954228f, 0.954457f, 0.954686f, 0.954914f,
+ 0.955141f, 0.955368f, 0.955594f, 0.955820f, 0.956045f, 0.956270f, 0.956494f, 0.956717f,
+ 0.956940f, 0.957163f, 0.957385f, 0.957606f, 0.957826f, 0.958046f, 0.958266f, 0.958485f,
+ 0.958703f, 0.958921f, 0.959139f, 0.959355f, 0.959572f, 0.959787f, 0.960002f, 0.960217f,
+ 0.960431f, 0.960644f, 0.960857f, 0.961069f, 0.961280f, 0.961492f, 0.961702f, 0.961912f,
+ 0.962121f, 0.962330f, 0.962538f, 0.962746f, 0.962953f, 0.963160f, 0.963366f, 0.963571f,
+ 0.963776f, 0.963980f, 0.964184f, 0.964387f, 0.964590f, 0.964792f, 0.964993f, 0.965194f,
+ 0.965394f, 0.965594f, 0.965793f, 0.965992f, 0.966190f, 0.966387f, 0.966584f, 0.966781f,
+ 0.966976f, 0.967172f, 0.967366f, 0.967560f, 0.967754f, 0.967947f, 0.968139f, 0.968331f,
+ 0.968522f, 0.968713f, 0.968903f, 0.969092f, 0.969281f, 0.969470f, 0.969657f, 0.969845f,
+ 0.970031f, 0.970217f, 0.970403f, 0.970588f, 0.970772f, 0.970956f, 0.971139f, 0.971322f,
+ 0.971504f, 0.971685f, 0.971866f, 0.972047f, 0.972227f, 0.972406f, 0.972584f, 0.972762f,
+ 0.972940f, 0.973117f, 0.973293f, 0.973469f, 0.973644f, 0.973819f, 0.973993f, 0.974166f,
+ 0.974339f, 0.974512f, 0.974684f, 0.974855f, 0.975025f, 0.975195f, 0.975365f, 0.975534f,
+ 0.975702f, 0.975870f, 0.976037f, 0.976204f, 0.976370f, 0.976535f, 0.976700f, 0.976864f,
+ 0.977028f, 0.977191f, 0.977354f, 0.977516f, 0.977677f, 0.977838f, 0.977998f, 0.978158f,
+ 0.978317f, 0.978476f, 0.978634f, 0.978791f, 0.978948f, 0.979104f, 0.979260f, 0.979415f,
+ 0.979570f, 0.979724f, 0.979877f, 0.980030f, 0.980182f, 0.980334f, 0.980485f, 0.980635f,
+ 0.980785f, 0.980935f, 0.981083f, 0.981232f, 0.981379f, 0.981526f, 0.981673f, 0.981819f,
+ 0.981964f, 0.982109f, 0.982253f, 0.982396f, 0.982539f, 0.982682f, 0.982824f, 0.982965f,
+ 0.983105f, 0.983246f, 0.983385f, 0.983524f, 0.983662f, 0.983800f, 0.983937f, 0.984074f,
+ 0.984210f, 0.984346f, 0.984480f, 0.984615f, 0.984748f, 0.984882f, 0.985014f, 0.985146f,
+ 0.985278f, 0.985408f, 0.985539f, 0.985668f, 0.985798f, 0.985926f, 0.986054f, 0.986181f,
+ 0.986308f, 0.986434f, 0.986560f, 0.986685f, 0.986809f, 0.986933f, 0.987057f, 0.987179f,
+ 0.987301f, 0.987423f, 0.987544f, 0.987664f, 0.987784f, 0.987903f, 0.988022f, 0.988140f,
+ 0.988258f, 0.988374f, 0.988491f, 0.988607f, 0.988722f, 0.988836f, 0.988950f, 0.989064f,
+ 0.989177f, 0.989289f, 0.989400f, 0.989511f, 0.989622f, 0.989732f, 0.989841f, 0.989950f,
+ 0.990058f, 0.990166f, 0.990273f, 0.990379f, 0.990485f, 0.990590f, 0.990695f, 0.990799f,
+ 0.990903f, 0.991006f, 0.991108f, 0.991210f, 0.991311f, 0.991411f, 0.991511f, 0.991611f,
+ 0.991710f, 0.991808f, 0.991906f, 0.992003f, 0.992099f, 0.992195f, 0.992291f, 0.992385f,
+ 0.992480f, 0.992573f, 0.992666f, 0.992759f, 0.992850f, 0.992942f, 0.993032f, 0.993122f,
+ 0.993212f, 0.993301f, 0.993389f, 0.993477f, 0.993564f, 0.993651f, 0.993737f, 0.993822f,
+ 0.993907f, 0.993991f, 0.994075f, 0.994158f, 0.994240f, 0.994322f, 0.994404f, 0.994484f,
+ 0.994565f, 0.994644f, 0.994723f, 0.994802f, 0.994879f, 0.994957f, 0.995033f, 0.995109f,
+ 0.995185f, 0.995260f, 0.995334f, 0.995408f, 0.995481f, 0.995553f, 0.995625f, 0.995697f,
+ 0.995767f, 0.995838f, 0.995907f, 0.995976f, 0.996045f, 0.996113f, 0.996180f, 0.996247f,
+ 0.996313f, 0.996378f, 0.996443f, 0.996507f, 0.996571f, 0.996634f, 0.996697f, 0.996759f,
+ 0.996820f, 0.996881f, 0.996941f, 0.997001f, 0.997060f, 0.997119f, 0.997176f, 0.997234f,
+ 0.997290f, 0.997347f, 0.997402f, 0.997457f, 0.997511f, 0.997565f, 0.997618f, 0.997671f,
+ 0.997723f, 0.997774f, 0.997825f, 0.997876f, 0.997925f, 0.997974f, 0.998023f, 0.998071f,
+ 0.998118f, 0.998165f, 0.998211f, 0.998257f, 0.998302f, 0.998346f, 0.998390f, 0.998433f,
+ 0.998476f, 0.998518f, 0.998559f, 0.998600f, 0.998640f, 0.998680f, 0.998719f, 0.998758f,
+ 0.998795f, 0.998833f, 0.998870f, 0.998906f, 0.998941f, 0.998976f, 0.999011f, 0.999044f,
+ 0.999078f, 0.999110f, 0.999142f, 0.999174f, 0.999205f, 0.999235f, 0.999265f, 0.999294f,
+ 0.999322f, 0.999350f, 0.999378f, 0.999404f, 0.999431f, 0.999456f, 0.999481f, 0.999506f,
+ 0.999529f, 0.999553f, 0.999575f, 0.999597f, 0.999619f, 0.999640f, 0.999660f, 0.999680f,
+ 0.999699f, 0.999717f, 0.999735f, 0.999753f, 0.999769f, 0.999786f, 0.999801f, 0.999816f,
+ 0.999831f, 0.999844f, 0.999858f, 0.999870f, 0.999882f, 0.999894f, 0.999905f, 0.999915f,
+ 0.999925f, 0.999934f, 0.999942f, 0.999950f, 0.999958f, 0.999964f, 0.999971f, 0.999976f,
+ 0.999981f, 0.999986f, 0.999989f, 0.999993f, 0.999995f, 0.999997f, 0.999999f, 1.000000
+};
+
+static const float cosTable16384[8192] = {
+ 1.000000f, 1.000000f, 1.000000f, 0.999999f, 0.999999f, 0.999998f, 0.999997f, 0.999996f,
+ 0.999995f, 0.999994f, 0.999993f, 0.999991f, 0.999989f, 0.999988f, 0.999986f, 0.999983f,
+ 0.999981f, 0.999979f, 0.999976f, 0.999973f, 0.999971f, 0.999968f, 0.999964f, 0.999961f,
+ 0.999958f, 0.999954f, 0.999950f, 0.999946f, 0.999942f, 0.999938f, 0.999934f, 0.999929f,
+ 0.999925f, 0.999920f, 0.999915f, 0.999910f, 0.999905f, 0.999899f, 0.999894f, 0.999888f,
+ 0.999882f, 0.999876f, 0.999870f, 0.999864f, 0.999858f, 0.999851f, 0.999844f, 0.999838f,
+ 0.999831f, 0.999823f, 0.999816f, 0.999809f, 0.999801f, 0.999793f, 0.999786f, 0.999778f,
+ 0.999769f, 0.999761f, 0.999753f, 0.999744f, 0.999735f, 0.999726f, 0.999717f, 0.999708f,
+ 0.999699f, 0.999689f, 0.999680f, 0.999670f, 0.999660f, 0.999650f, 0.999640f, 0.999629f,
+ 0.999619f, 0.999608f, 0.999597f, 0.999586f, 0.999575f, 0.999564f, 0.999553f, 0.999541f,
+ 0.999529f, 0.999518f, 0.999506f, 0.999493f, 0.999481f, 0.999469f, 0.999456f, 0.999443f,
+ 0.999431f, 0.999418f, 0.999404f, 0.999391f, 0.999378f, 0.999364f, 0.999350f, 0.999336f,
+ 0.999322f, 0.999308f, 0.999294f, 0.999279f, 0.999265f, 0.999250f, 0.999235f, 0.999220f,
+ 0.999205f, 0.999189f, 0.999174f, 0.999158f, 0.999142f, 0.999126f, 0.999110f, 0.999094f,
+ 0.999078f, 0.999061f, 0.999044f, 0.999028f, 0.999011f, 0.998994f, 0.998976f, 0.998959f,
+ 0.998941f, 0.998924f, 0.998906f, 0.998888f, 0.998870f, 0.998851f, 0.998833f, 0.998814f,
+ 0.998795f, 0.998777f, 0.998758f, 0.998738f, 0.998719f, 0.998700f, 0.998680f, 0.998660f,
+ 0.998640f, 0.998620f, 0.998600f, 0.998580f, 0.998559f, 0.998538f, 0.998518f, 0.998497f,
+ 0.998476f, 0.998454f, 0.998433f, 0.998411f, 0.998390f, 0.998368f, 0.998346f, 0.998324f,
+ 0.998302f, 0.998279f, 0.998257f, 0.998234f, 0.998211f, 0.998188f, 0.998165f, 0.998142f,
+ 0.998118f, 0.998094f, 0.998071f, 0.998047f, 0.998023f, 0.997999f, 0.997974f, 0.997950f,
+ 0.997925f, 0.997901f, 0.997876f, 0.997851f, 0.997825f, 0.997800f, 0.997774f, 0.997749f,
+ 0.997723f, 0.997697f, 0.997671f, 0.997645f, 0.997618f, 0.997592f, 0.997565f, 0.997538f,
+ 0.997511f, 0.997484f, 0.997457f, 0.997430f, 0.997402f, 0.997374f, 0.997347f, 0.997319f,
+ 0.997290f, 0.997262f, 0.997234f, 0.997205f, 0.997176f, 0.997148f, 0.997119f, 0.997089f,
+ 0.997060f, 0.997031f, 0.997001f, 0.996971f, 0.996941f, 0.996911f, 0.996881f, 0.996851f,
+ 0.996820f, 0.996790f, 0.996759f, 0.996728f, 0.996697f, 0.996666f, 0.996634f, 0.996603f,
+ 0.996571f, 0.996539f, 0.996507f, 0.996475f, 0.996443f, 0.996411f, 0.996378f, 0.996345f,
+ 0.996313f, 0.996280f, 0.996247f, 0.996213f, 0.996180f, 0.996146f, 0.996113f, 0.996079f,
+ 0.996045f, 0.996011f, 0.995976f, 0.995942f, 0.995907f, 0.995872f, 0.995838f, 0.995803f,
+ 0.995767f, 0.995732f, 0.995697f, 0.995661f, 0.995625f, 0.995589f, 0.995553f, 0.995517f,
+ 0.995481f, 0.995444f, 0.995408f, 0.995371f, 0.995334f, 0.995297f, 0.995260f, 0.995222f,
+ 0.995185f, 0.995147f, 0.995109f, 0.995071f, 0.995033f, 0.994995f, 0.994957f, 0.994918f,
+ 0.994879f, 0.994841f, 0.994802f, 0.994762f, 0.994723f, 0.994684f, 0.994644f, 0.994604f,
+ 0.994565f, 0.994525f, 0.994484f, 0.994444f, 0.994404f, 0.994363f, 0.994322f, 0.994281f,
+ 0.994240f, 0.994199f, 0.994158f, 0.994116f, 0.994075f, 0.994033f, 0.993991f, 0.993949f,
+ 0.993907f, 0.993865f, 0.993822f, 0.993779f, 0.993737f, 0.993694f, 0.993651f, 0.993608f,
+ 0.993564f, 0.993521f, 0.993477f, 0.993433f, 0.993389f, 0.993345f, 0.993301f, 0.993257f,
+ 0.993212f, 0.993167f, 0.993122f, 0.993077f, 0.993032f, 0.992987f, 0.992942f, 0.992896f,
+ 0.992850f, 0.992805f, 0.992759f, 0.992712f, 0.992666f, 0.992620f, 0.992573f, 0.992526f,
+ 0.992480f, 0.992433f, 0.992385f, 0.992338f, 0.992291f, 0.992243f, 0.992195f, 0.992147f,
+ 0.992099f, 0.992051f, 0.992003f, 0.991954f, 0.991906f, 0.991857f, 0.991808f, 0.991759f,
+ 0.991710f, 0.991660f, 0.991611f, 0.991561f, 0.991511f, 0.991462f, 0.991411f, 0.991361f,
+ 0.991311f, 0.991260f, 0.991210f, 0.991159f, 0.991108f, 0.991057f, 0.991006f, 0.990954f,
+ 0.990903f, 0.990851f, 0.990799f, 0.990747f, 0.990695f, 0.990643f, 0.990590f, 0.990538f,
+ 0.990485f, 0.990432f, 0.990379f, 0.990326f, 0.990273f, 0.990219f, 0.990166f, 0.990112f,
+ 0.990058f, 0.990004f, 0.989950f, 0.989896f, 0.989841f, 0.989787f, 0.989732f, 0.989677f,
+ 0.989622f, 0.989567f, 0.989511f, 0.989456f, 0.989400f, 0.989345f, 0.989289f, 0.989233f,
+ 0.989177f, 0.989120f, 0.989064f, 0.989007f, 0.988950f, 0.988893f, 0.988836f, 0.988779f,
+ 0.988722f, 0.988664f, 0.988607f, 0.988549f, 0.988491f, 0.988433f, 0.988374f, 0.988316f,
+ 0.988258f, 0.988199f, 0.988140f, 0.988081f, 0.988022f, 0.987963f, 0.987903f, 0.987844f,
+ 0.987784f, 0.987724f, 0.987664f, 0.987604f, 0.987544f, 0.987484f, 0.987423f, 0.987362f,
+ 0.987301f, 0.987240f, 0.987179f, 0.987118f, 0.987057f, 0.986995f, 0.986933f, 0.986871f,
+ 0.986809f, 0.986747f, 0.986685f, 0.986623f, 0.986560f, 0.986497f, 0.986434f, 0.986371f,
+ 0.986308f, 0.986245f, 0.986181f, 0.986118f, 0.986054f, 0.985990f, 0.985926f, 0.985862f,
+ 0.985798f, 0.985733f, 0.985668f, 0.985604f, 0.985539f, 0.985474f, 0.985408f, 0.985343f,
+ 0.985278f, 0.985212f, 0.985146f, 0.985080f, 0.985014f, 0.984948f, 0.984882f, 0.984815f,
+ 0.984748f, 0.984682f, 0.984615f, 0.984548f, 0.984480f, 0.984413f, 0.984346f, 0.984278f,
+ 0.984210f, 0.984142f, 0.984074f, 0.984006f, 0.983937f, 0.983869f, 0.983800f, 0.983731f,
+ 0.983662f, 0.983593f, 0.983524f, 0.983455f, 0.983385f, 0.983315f, 0.983246f, 0.983176f,
+ 0.983105f, 0.983035f, 0.982965f, 0.982894f, 0.982824f, 0.982753f, 0.982682f, 0.982611f,
+ 0.982539f, 0.982468f, 0.982396f, 0.982325f, 0.982253f, 0.982181f, 0.982109f, 0.982036f,
+ 0.981964f, 0.981891f, 0.981819f, 0.981746f, 0.981673f, 0.981600f, 0.981526f, 0.981453f,
+ 0.981379f, 0.981305f, 0.981232f, 0.981158f, 0.981083f, 0.981009f, 0.980935f, 0.980860f,
+ 0.980785f, 0.980710f, 0.980635f, 0.980560f, 0.980485f, 0.980409f, 0.980334f, 0.980258f,
+ 0.980182f, 0.980106f, 0.980030f, 0.979954f, 0.979877f, 0.979800f, 0.979724f, 0.979647f,
+ 0.979570f, 0.979493f, 0.979415f, 0.979338f, 0.979260f, 0.979182f, 0.979104f, 0.979026f,
+ 0.978948f, 0.978870f, 0.978791f, 0.978713f, 0.978634f, 0.978555f, 0.978476f, 0.978397f,
+ 0.978317f, 0.978238f, 0.978158f, 0.978078f, 0.977998f, 0.977918f, 0.977838f, 0.977758f,
+ 0.977677f, 0.977597f, 0.977516f, 0.977435f, 0.977354f, 0.977273f, 0.977191f, 0.977110f,
+ 0.977028f, 0.976946f, 0.976864f, 0.976782f, 0.976700f, 0.976618f, 0.976535f, 0.976453f,
+ 0.976370f, 0.976287f, 0.976204f, 0.976120f, 0.976037f, 0.975954f, 0.975870f, 0.975786f,
+ 0.975702f, 0.975618f, 0.975534f, 0.975449f, 0.975365f, 0.975280f, 0.975195f, 0.975110f,
+ 0.975025f, 0.974940f, 0.974855f, 0.974769f, 0.974684f, 0.974598f, 0.974512f, 0.974426f,
+ 0.974339f, 0.974253f, 0.974166f, 0.974080f, 0.973993f, 0.973906f, 0.973819f, 0.973732f,
+ 0.973644f, 0.973557f, 0.973469f, 0.973381f, 0.973293f, 0.973205f, 0.973117f, 0.973028f,
+ 0.972940f, 0.972851f, 0.972762f, 0.972673f, 0.972584f, 0.972495f, 0.972406f, 0.972316f,
+ 0.972227f, 0.972137f, 0.972047f, 0.971957f, 0.971866f, 0.971776f, 0.971685f, 0.971595f,
+ 0.971504f, 0.971413f, 0.971322f, 0.971231f, 0.971139f, 0.971048f, 0.970956f, 0.970864f,
+ 0.970772f, 0.970680f, 0.970588f, 0.970495f, 0.970403f, 0.970310f, 0.970217f, 0.970124f,
+ 0.970031f, 0.969938f, 0.969845f, 0.969751f, 0.969657f, 0.969564f, 0.969470f, 0.969375f,
+ 0.969281f, 0.969187f, 0.969092f, 0.968998f, 0.968903f, 0.968808f, 0.968713f, 0.968617f,
+ 0.968522f, 0.968427f, 0.968331f, 0.968235f, 0.968139f, 0.968043f, 0.967947f, 0.967850f,
+ 0.967754f, 0.967657f, 0.967560f, 0.967463f, 0.967366f, 0.967269f, 0.967172f, 0.967074f,
+ 0.966976f, 0.966879f, 0.966781f, 0.966683f, 0.966584f, 0.966486f, 0.966387f, 0.966289f,
+ 0.966190f, 0.966091f, 0.965992f, 0.965893f, 0.965793f, 0.965694f, 0.965594f, 0.965494f,
+ 0.965394f, 0.965294f, 0.965194f, 0.965094f, 0.964993f, 0.964893f, 0.964792f, 0.964691f,
+ 0.964590f, 0.964489f, 0.964387f, 0.964286f, 0.964184f, 0.964082f, 0.963980f, 0.963878f,
+ 0.963776f, 0.963674f, 0.963571f, 0.963469f, 0.963366f, 0.963263f, 0.963160f, 0.963057f,
+ 0.962953f, 0.962850f, 0.962746f, 0.962642f, 0.962538f, 0.962434f, 0.962330f, 0.962226f,
+ 0.962121f, 0.962017f, 0.961912f, 0.961807f, 0.961702f, 0.961597f, 0.961492f, 0.961386f,
+ 0.961280f, 0.961175f, 0.961069f, 0.960963f, 0.960857f, 0.960750f, 0.960644f, 0.960537f,
+ 0.960431f, 0.960324f, 0.960217f, 0.960109f, 0.960002f, 0.959895f, 0.959787f, 0.959679f,
+ 0.959572f, 0.959463f, 0.959355f, 0.959247f, 0.959139f, 0.959030f, 0.958921f, 0.958812f,
+ 0.958703f, 0.958594f, 0.958485f, 0.958376f, 0.958266f, 0.958156f, 0.958046f, 0.957937f,
+ 0.957826f, 0.957716f, 0.957606f, 0.957495f, 0.957385f, 0.957274f, 0.957163f, 0.957052f,
+ 0.956940f, 0.956829f, 0.956717f, 0.956606f, 0.956494f, 0.956382f, 0.956270f, 0.956158f,
+ 0.956045f, 0.955933f, 0.955820f, 0.955707f, 0.955594f, 0.955481f, 0.955368f, 0.955255f,
+ 0.955141f, 0.955028f, 0.954914f, 0.954800f, 0.954686f, 0.954572f, 0.954457f, 0.954343f,
+ 0.954228f, 0.954113f, 0.953998f, 0.953883f, 0.953768f, 0.953653f, 0.953537f, 0.953422f,
+ 0.953306f, 0.953190f, 0.953074f, 0.952958f, 0.952842f, 0.952725f, 0.952609f, 0.952492f,
+ 0.952375f, 0.952258f, 0.952141f, 0.952024f, 0.951906f, 0.951789f, 0.951671f, 0.951553f,
+ 0.951435f, 0.951317f, 0.951199f, 0.951080f, 0.950962f, 0.950843f, 0.950724f, 0.950605f,
+ 0.950486f, 0.950367f, 0.950247f, 0.950128f, 0.950008f, 0.949888f, 0.949768f, 0.949648f,
+ 0.949528f, 0.949408f, 0.949287f, 0.949167f, 0.949046f, 0.948925f, 0.948804f, 0.948683f,
+ 0.948561f, 0.948440f, 0.948318f, 0.948196f, 0.948075f, 0.947953f, 0.947830f, 0.947708f,
+ 0.947586f, 0.947463f, 0.947340f, 0.947217f, 0.947094f, 0.946971f, 0.946848f, 0.946724f,
+ 0.946601f, 0.946477f, 0.946353f, 0.946229f, 0.946105f, 0.945981f, 0.945857f, 0.945732f,
+ 0.945607f, 0.945482f, 0.945358f, 0.945232f, 0.945107f, 0.944982f, 0.944856f, 0.944731f,
+ 0.944605f, 0.944479f, 0.944353f, 0.944227f, 0.944100f, 0.943974f, 0.943847f, 0.943720f,
+ 0.943593f, 0.943466f, 0.943339f, 0.943212f, 0.943084f, 0.942957f, 0.942829f, 0.942701f,
+ 0.942573f, 0.942445f, 0.942317f, 0.942188f, 0.942060f, 0.941931f, 0.941802f, 0.941673f,
+ 0.941544f, 0.941415f, 0.941285f, 0.941156f, 0.941026f, 0.940896f, 0.940766f, 0.940636f,
+ 0.940506f, 0.940376f, 0.940245f, 0.940115f, 0.939984f, 0.939853f, 0.939722f, 0.939591f,
+ 0.939459f, 0.939328f, 0.939196f, 0.939064f, 0.938932f, 0.938800f, 0.938668f, 0.938536f,
+ 0.938404f, 0.938271f, 0.938138f, 0.938005f, 0.937872f, 0.937739f, 0.937606f, 0.937473f,
+ 0.937339f, 0.937205f, 0.937072f, 0.936938f, 0.936803f, 0.936669f, 0.936535f, 0.936400f,
+ 0.936266f, 0.936131f, 0.935996f, 0.935861f, 0.935726f, 0.935590f, 0.935455f, 0.935319f,
+ 0.935184f, 0.935048f, 0.934912f, 0.934775f, 0.934639f, 0.934503f, 0.934366f, 0.934229f,
+ 0.934093f, 0.933956f, 0.933818f, 0.933681f, 0.933544f, 0.933406f, 0.933269f, 0.933131f,
+ 0.932993f, 0.932855f, 0.932716f, 0.932578f, 0.932440f, 0.932301f, 0.932162f, 0.932023f,
+ 0.931884f, 0.931745f, 0.931606f, 0.931466f, 0.931327f, 0.931187f, 0.931047f, 0.930907f,
+ 0.930767f, 0.930627f, 0.930486f, 0.930346f, 0.930205f, 0.930064f, 0.929923f, 0.929782f,
+ 0.929641f, 0.929500f, 0.929358f, 0.929216f, 0.929075f, 0.928933f, 0.928791f, 0.928648f,
+ 0.928506f, 0.928364f, 0.928221f, 0.928078f, 0.927935f, 0.927792f, 0.927649f, 0.927506f,
+ 0.927363f, 0.927219f, 0.927075f, 0.926931f, 0.926787f, 0.926643f, 0.926499f, 0.926355f,
+ 0.926210f, 0.926066f, 0.925921f, 0.925776f, 0.925631f, 0.925486f, 0.925340f, 0.925195f,
+ 0.925049f, 0.924904f, 0.924758f, 0.924612f, 0.924465f, 0.924319f, 0.924173f, 0.924026f,
+ 0.923880f, 0.923733f, 0.923586f, 0.923439f, 0.923291f, 0.923144f, 0.922997f, 0.922849f,
+ 0.922701f, 0.922553f, 0.922405f, 0.922257f, 0.922109f, 0.921960f, 0.921812f, 0.921663f,
+ 0.921514f, 0.921365f, 0.921216f, 0.921067f, 0.920917f, 0.920768f, 0.920618f, 0.920468f,
+ 0.920318f, 0.920168f, 0.920018f, 0.919868f, 0.919717f, 0.919567f, 0.919416f, 0.919265f,
+ 0.919114f, 0.918963f, 0.918811f, 0.918660f, 0.918508f, 0.918357f, 0.918205f, 0.918053f,
+ 0.917901f, 0.917749f, 0.917596f, 0.917444f, 0.917291f, 0.917138f, 0.916985f, 0.916832f,
+ 0.916679f, 0.916526f, 0.916372f, 0.916219f, 0.916065f, 0.915911f, 0.915757f, 0.915603f,
+ 0.915449f, 0.915294f, 0.915140f, 0.914985f, 0.914830f, 0.914675f, 0.914520f, 0.914365f,
+ 0.914210f, 0.914054f, 0.913899f, 0.913743f, 0.913587f, 0.913431f, 0.913275f, 0.913119f,
+ 0.912962f, 0.912806f, 0.912649f, 0.912492f, 0.912335f, 0.912178f, 0.912021f, 0.911864f,
+ 0.911706f, 0.911548f, 0.911391f, 0.911233f, 0.911075f, 0.910917f, 0.910758f, 0.910600f,
+ 0.910441f, 0.910283f, 0.910124f, 0.909965f, 0.909806f, 0.909646f, 0.909487f, 0.909328f,
+ 0.909168f, 0.909008f, 0.908848f, 0.908688f, 0.908528f, 0.908368f, 0.908207f, 0.908047f,
+ 0.907886f, 0.907725f, 0.907564f, 0.907403f, 0.907242f, 0.907081f, 0.906919f, 0.906757f,
+ 0.906596f, 0.906434f, 0.906272f, 0.906110f, 0.905947f, 0.905785f, 0.905622f, 0.905460f,
+ 0.905297f, 0.905134f, 0.904971f, 0.904807f, 0.904644f, 0.904481f, 0.904317f, 0.904153f,
+ 0.903989f, 0.903825f, 0.903661f, 0.903497f, 0.903332f, 0.903168f, 0.903003f, 0.902838f,
+ 0.902673f, 0.902508f, 0.902343f, 0.902178f, 0.902012f, 0.901847f, 0.901681f, 0.901515f,
+ 0.901349f, 0.901183f, 0.901016f, 0.900850f, 0.900683f, 0.900517f, 0.900350f, 0.900183f,
+ 0.900016f, 0.899849f, 0.899681f, 0.899514f, 0.899346f, 0.899179f, 0.899011f, 0.898843f,
+ 0.898674f, 0.898506f, 0.898338f, 0.898169f, 0.898001f, 0.897832f, 0.897663f, 0.897494f,
+ 0.897325f, 0.897155f, 0.896986f, 0.896816f, 0.896646f, 0.896477f, 0.896307f, 0.896137f,
+ 0.895966f, 0.895796f, 0.895625f, 0.895455f, 0.895284f, 0.895113f, 0.894942f, 0.894771f,
+ 0.894599f, 0.894428f, 0.894256f, 0.894085f, 0.893913f, 0.893741f, 0.893569f, 0.893397f,
+ 0.893224f, 0.893052f, 0.892879f, 0.892706f, 0.892534f, 0.892361f, 0.892187f, 0.892014f,
+ 0.891841f, 0.891667f, 0.891493f, 0.891320f, 0.891146f, 0.890972f, 0.890797f, 0.890623f,
+ 0.890449f, 0.890274f, 0.890099f, 0.889925f, 0.889750f, 0.889574f, 0.889399f, 0.889224f,
+ 0.889048f, 0.888873f, 0.888697f, 0.888521f, 0.888345f, 0.888169f, 0.887993f, 0.887816f,
+ 0.887640f, 0.887463f, 0.887286f, 0.887109f, 0.886932f, 0.886755f, 0.886578f, 0.886400f,
+ 0.886223f, 0.886045f, 0.885867f, 0.885689f, 0.885511f, 0.885333f, 0.885154f, 0.884976f,
+ 0.884797f, 0.884618f, 0.884439f, 0.884260f, 0.884081f, 0.883902f, 0.883723f, 0.883543f,
+ 0.883363f, 0.883184f, 0.883004f, 0.882824f, 0.882643f, 0.882463f, 0.882283f, 0.882102f,
+ 0.881921f, 0.881740f, 0.881559f, 0.881378f, 0.881197f, 0.881016f, 0.880834f, 0.880653f,
+ 0.880471f, 0.880289f, 0.880107f, 0.879925f, 0.879743f, 0.879560f, 0.879378f, 0.879195f,
+ 0.879012f, 0.878829f, 0.878646f, 0.878463f, 0.878280f, 0.878096f, 0.877913f, 0.877729f,
+ 0.877545f, 0.877361f, 0.877177f, 0.876993f, 0.876809f, 0.876624f, 0.876440f, 0.876255f,
+ 0.876070f, 0.875885f, 0.875700f, 0.875515f, 0.875329f, 0.875144f, 0.874958f, 0.874773f,
+ 0.874587f, 0.874401f, 0.874215f, 0.874028f, 0.873842f, 0.873655f, 0.873469f, 0.873282f,
+ 0.873095f, 0.872908f, 0.872721f, 0.872534f, 0.872346f, 0.872159f, 0.871971f, 0.871783f,
+ 0.871595f, 0.871407f, 0.871219f, 0.871031f, 0.870842f, 0.870654f, 0.870465f, 0.870276f,
+ 0.870087f, 0.869898f, 0.869709f, 0.869519f, 0.869330f, 0.869140f, 0.868951f, 0.868761f,
+ 0.868571f, 0.868381f, 0.868190f, 0.868000f, 0.867809f, 0.867619f, 0.867428f, 0.867237f,
+ 0.867046f, 0.866855f, 0.866664f, 0.866472f, 0.866281f, 0.866089f, 0.865898f, 0.865706f,
+ 0.865514f, 0.865321f, 0.865129f, 0.864937f, 0.864744f, 0.864552f, 0.864359f, 0.864166f,
+ 0.863973f, 0.863780f, 0.863586f, 0.863393f, 0.863199f, 0.863006f, 0.862812f, 0.862618f,
+ 0.862424f, 0.862230f, 0.862035f, 0.861841f, 0.861646f, 0.861452f, 0.861257f, 0.861062f,
+ 0.860867f, 0.860672f, 0.860476f, 0.860281f, 0.860085f, 0.859890f, 0.859694f, 0.859498f,
+ 0.859302f, 0.859106f, 0.858909f, 0.858713f, 0.858516f, 0.858320f, 0.858123f, 0.857926f,
+ 0.857729f, 0.857531f, 0.857334f, 0.857137f, 0.856939f, 0.856741f, 0.856543f, 0.856345f,
+ 0.856147f, 0.855949f, 0.855751f, 0.855552f, 0.855354f, 0.855155f, 0.854956f, 0.854757f,
+ 0.854558f, 0.854359f, 0.854159f, 0.853960f, 0.853760f, 0.853561f, 0.853361f, 0.853161f,
+ 0.852961f, 0.852760f, 0.852560f, 0.852360f, 0.852159f, 0.851958f, 0.851757f, 0.851556f,
+ 0.851355f, 0.851154f, 0.850953f, 0.850751f, 0.850549f, 0.850348f, 0.850146f, 0.849944f,
+ 0.849742f, 0.849540f, 0.849337f, 0.849135f, 0.848932f, 0.848729f, 0.848526f, 0.848323f,
+ 0.848120f, 0.847917f, 0.847714f, 0.847510f, 0.847307f, 0.847103f, 0.846899f, 0.846695f,
+ 0.846491f, 0.846287f, 0.846082f, 0.845878f, 0.845673f, 0.845469f, 0.845264f, 0.845059f,
+ 0.844854f, 0.844648f, 0.844443f, 0.844238f, 0.844032f, 0.843826f, 0.843620f, 0.843414f,
+ 0.843208f, 0.843002f, 0.842796f, 0.842589f, 0.842383f, 0.842176f, 0.841969f, 0.841762f,
+ 0.841555f, 0.841348f, 0.841140f, 0.840933f, 0.840725f, 0.840518f, 0.840310f, 0.840102f,
+ 0.839894f, 0.839686f, 0.839477f, 0.839269f, 0.839060f, 0.838852f, 0.838643f, 0.838434f,
+ 0.838225f, 0.838015f, 0.837806f, 0.837597f, 0.837387f, 0.837178f, 0.836968f, 0.836758f,
+ 0.836548f, 0.836338f, 0.836127f, 0.835917f, 0.835706f, 0.835496f, 0.835285f, 0.835074f,
+ 0.834863f, 0.834652f, 0.834440f, 0.834229f, 0.834018f, 0.833806f, 0.833594f, 0.833382f,
+ 0.833170f, 0.832958f, 0.832746f, 0.832533f, 0.832321f, 0.832108f, 0.831895f, 0.831683f,
+ 0.831470f, 0.831257f, 0.831043f, 0.830830f, 0.830616f, 0.830403f, 0.830189f, 0.829975f,
+ 0.829761f, 0.829547f, 0.829333f, 0.829119f, 0.828904f, 0.828690f, 0.828475f, 0.828260f,
+ 0.828045f, 0.827830f, 0.827615f, 0.827399f, 0.827184f, 0.826968f, 0.826753f, 0.826537f,
+ 0.826321f, 0.826105f, 0.825889f, 0.825673f, 0.825456f, 0.825240f, 0.825023f, 0.824806f,
+ 0.824589f, 0.824372f, 0.824155f, 0.823938f, 0.823721f, 0.823503f, 0.823285f, 0.823068f,
+ 0.822850f, 0.822632f, 0.822414f, 0.822195f, 0.821977f, 0.821759f, 0.821540f, 0.821321f,
+ 0.821102f, 0.820884f, 0.820664f, 0.820445f, 0.820226f, 0.820007f, 0.819787f, 0.819567f,
+ 0.819348f, 0.819128f, 0.818908f, 0.818687f, 0.818467f, 0.818247f, 0.818026f, 0.817806f,
+ 0.817585f, 0.817364f, 0.817143f, 0.816922f, 0.816701f, 0.816479f, 0.816258f, 0.816036f,
+ 0.815814f, 0.815593f, 0.815371f, 0.815149f, 0.814926f, 0.814704f, 0.814482f, 0.814259f,
+ 0.814036f, 0.813814f, 0.813591f, 0.813368f, 0.813144f, 0.812921f, 0.812698f, 0.812474f,
+ 0.812251f, 0.812027f, 0.811803f, 0.811579f, 0.811355f, 0.811131f, 0.810906f, 0.810682f,
+ 0.810457f, 0.810232f, 0.810008f, 0.809783f, 0.809558f, 0.809332f, 0.809107f, 0.808882f,
+ 0.808656f, 0.808430f, 0.808205f, 0.807979f, 0.807753f, 0.807527f, 0.807300f, 0.807074f,
+ 0.806848f, 0.806621f, 0.806394f, 0.806167f, 0.805940f, 0.805713f, 0.805486f, 0.805259f,
+ 0.805031f, 0.804804f, 0.804576f, 0.804348f, 0.804120f, 0.803892f, 0.803664f, 0.803436f,
+ 0.803208f, 0.802979f, 0.802750f, 0.802522f, 0.802293f, 0.802064f, 0.801835f, 0.801606f,
+ 0.801376f, 0.801147f, 0.800917f, 0.800687f, 0.800458f, 0.800228f, 0.799998f, 0.799768f,
+ 0.799537f, 0.799307f, 0.799076f, 0.798846f, 0.798615f, 0.798384f, 0.798153f, 0.797922f,
+ 0.797691f, 0.797459f, 0.797228f, 0.796996f, 0.796765f, 0.796533f, 0.796301f, 0.796069f,
+ 0.795837f, 0.795605f, 0.795372f, 0.795140f, 0.794907f, 0.794674f, 0.794442f, 0.794209f,
+ 0.793975f, 0.793742f, 0.793509f, 0.793276f, 0.793042f, 0.792808f, 0.792575f, 0.792341f,
+ 0.792107f, 0.791872f, 0.791638f, 0.791404f, 0.791169f, 0.790935f, 0.790700f, 0.790465f,
+ 0.790230f, 0.789995f, 0.789760f, 0.789525f, 0.789289f, 0.789054f, 0.788818f, 0.788582f,
+ 0.788346f, 0.788110f, 0.787874f, 0.787638f, 0.787402f, 0.787165f, 0.786929f, 0.786692f,
+ 0.786455f, 0.786218f, 0.785981f, 0.785744f, 0.785507f, 0.785269f, 0.785032f, 0.784794f,
+ 0.784557f, 0.784319f, 0.784081f, 0.783843f, 0.783605f, 0.783366f, 0.783128f, 0.782889f,
+ 0.782651f, 0.782412f, 0.782173f, 0.781934f, 0.781695f, 0.781456f, 0.781216f, 0.780977f,
+ 0.780737f, 0.780498f, 0.780258f, 0.780018f, 0.779778f, 0.779538f, 0.779297f, 0.779057f,
+ 0.778817f, 0.778576f, 0.778335f, 0.778094f, 0.777853f, 0.777612f, 0.777371f, 0.777130f,
+ 0.776888f, 0.776647f, 0.776405f, 0.776164f, 0.775922f, 0.775680f, 0.775438f, 0.775195f,
+ 0.774953f, 0.774711f, 0.774468f, 0.774225f, 0.773983f, 0.773740f, 0.773497f, 0.773254f,
+ 0.773010f, 0.772767f, 0.772524f, 0.772280f, 0.772036f, 0.771793f, 0.771549f, 0.771305f,
+ 0.771061f, 0.770816f, 0.770572f, 0.770327f, 0.770083f, 0.769838f, 0.769593f, 0.769348f,
+ 0.769103f, 0.768858f, 0.768613f, 0.768368f, 0.768122f, 0.767876f, 0.767631f, 0.767385f,
+ 0.767139f, 0.766893f, 0.766647f, 0.766400f, 0.766154f, 0.765907f, 0.765661f, 0.765414f,
+ 0.765167f, 0.764920f, 0.764673f, 0.764426f, 0.764179f, 0.763931f, 0.763684f, 0.763436f,
+ 0.763188f, 0.762941f, 0.762693f, 0.762444f, 0.762196f, 0.761948f, 0.761700f, 0.761451f,
+ 0.761202f, 0.760954f, 0.760705f, 0.760456f, 0.760207f, 0.759957f, 0.759708f, 0.759459f,
+ 0.759209f, 0.758960f, 0.758710f, 0.758460f, 0.758210f, 0.757960f, 0.757710f, 0.757459f,
+ 0.757209f, 0.756958f, 0.756708f, 0.756457f, 0.756206f, 0.755955f, 0.755704f, 0.755453f,
+ 0.755201f, 0.754950f, 0.754698f, 0.754447f, 0.754195f, 0.753943f, 0.753691f, 0.753439f,
+ 0.753187f, 0.752934f, 0.752682f, 0.752429f, 0.752177f, 0.751924f, 0.751671f, 0.751418f,
+ 0.751165f, 0.750912f, 0.750659f, 0.750405f, 0.750152f, 0.749898f, 0.749644f, 0.749390f,
+ 0.749136f, 0.748882f, 0.748628f, 0.748374f, 0.748119f, 0.747865f, 0.747610f, 0.747355f,
+ 0.747101f, 0.746846f, 0.746591f, 0.746335f, 0.746080f, 0.745825f, 0.745569f, 0.745314f,
+ 0.745058f, 0.744802f, 0.744546f, 0.744290f, 0.744034f, 0.743777f, 0.743521f, 0.743265f,
+ 0.743008f, 0.742751f, 0.742494f, 0.742237f, 0.741980f, 0.741723f, 0.741466f, 0.741209f,
+ 0.740951f, 0.740694f, 0.740436f, 0.740178f, 0.739920f, 0.739662f, 0.739404f, 0.739146f,
+ 0.738887f, 0.738629f, 0.738370f, 0.738112f, 0.737853f, 0.737594f, 0.737335f, 0.737076f,
+ 0.736817f, 0.736557f, 0.736298f, 0.736038f, 0.735779f, 0.735519f, 0.735259f, 0.734999f,
+ 0.734739f, 0.734479f, 0.734218f, 0.733958f, 0.733697f, 0.733437f, 0.733176f, 0.732915f,
+ 0.732654f, 0.732393f, 0.732132f, 0.731871f, 0.731609f, 0.731348f, 0.731086f, 0.730825f,
+ 0.730563f, 0.730301f, 0.730039f, 0.729777f, 0.729514f, 0.729252f, 0.728990f, 0.728727f,
+ 0.728464f, 0.728202f, 0.727939f, 0.727676f, 0.727413f, 0.727149f, 0.726886f, 0.726623f,
+ 0.726359f, 0.726095f, 0.725832f, 0.725568f, 0.725304f, 0.725040f, 0.724776f, 0.724511f,
+ 0.724247f, 0.723983f, 0.723718f, 0.723453f, 0.723188f, 0.722924f, 0.722659f, 0.722393f,
+ 0.722128f, 0.721863f, 0.721597f, 0.721332f, 0.721066f, 0.720800f, 0.720535f, 0.720269f,
+ 0.720003f, 0.719736f, 0.719470f, 0.719204f, 0.718937f, 0.718670f, 0.718404f, 0.718137f,
+ 0.717870f, 0.717603f, 0.717336f, 0.717069f, 0.716801f, 0.716534f, 0.716266f, 0.715999f,
+ 0.715731f, 0.715463f, 0.715195f, 0.714927f, 0.714659f, 0.714390f, 0.714122f, 0.713853f,
+ 0.713585f, 0.713316f, 0.713047f, 0.712778f, 0.712509f, 0.712240f, 0.711971f, 0.711702f,
+ 0.711432f, 0.711163f, 0.710893f, 0.710623f, 0.710353f, 0.710083f, 0.709813f, 0.709543f,
+ 0.709273f, 0.709002f, 0.708732f, 0.708461f, 0.708191f, 0.707920f, 0.707649f, 0.707378f,
+ 0.707107f, 0.706836f, 0.706564f, 0.706293f, 0.706021f, 0.705750f, 0.705478f, 0.705206f,
+ 0.704934f, 0.704662f, 0.704390f, 0.704118f, 0.703845f, 0.703573f, 0.703300f, 0.703028f,
+ 0.702755f, 0.702482f, 0.702209f, 0.701936f, 0.701663f, 0.701389f, 0.701116f, 0.700842f,
+ 0.700569f, 0.700295f, 0.700021f, 0.699747f, 0.699473f, 0.699199f, 0.698925f, 0.698651f,
+ 0.698376f, 0.698102f, 0.697827f, 0.697552f, 0.697277f, 0.697003f, 0.696728f, 0.696452f,
+ 0.696177f, 0.695902f, 0.695626f, 0.695351f, 0.695075f, 0.694799f, 0.694524f, 0.694248f,
+ 0.693971f, 0.693695f, 0.693419f, 0.693143f, 0.692866f, 0.692590f, 0.692313f, 0.692036f,
+ 0.691759f, 0.691482f, 0.691205f, 0.690928f, 0.690651f, 0.690373f, 0.690096f, 0.689818f,
+ 0.689541f, 0.689263f, 0.688985f, 0.688707f, 0.688429f, 0.688151f, 0.687872f, 0.687594f,
+ 0.687315f, 0.687037f, 0.686758f, 0.686479f, 0.686200f, 0.685921f, 0.685642f, 0.685363f,
+ 0.685084f, 0.684804f, 0.684525f, 0.684245f, 0.683965f, 0.683686f, 0.683406f, 0.683126f,
+ 0.682846f, 0.682565f, 0.682285f, 0.682005f, 0.681724f, 0.681443f, 0.681163f, 0.680882f,
+ 0.680601f, 0.680320f, 0.680039f, 0.679758f, 0.679476f, 0.679195f, 0.678913f, 0.678632f,
+ 0.678350f, 0.678068f, 0.677786f, 0.677504f, 0.677222f, 0.676940f, 0.676658f, 0.676375f,
+ 0.676093f, 0.675810f, 0.675527f, 0.675245f, 0.674962f, 0.674679f, 0.674396f, 0.674112f,
+ 0.673829f, 0.673546f, 0.673262f, 0.672978f, 0.672695f, 0.672411f, 0.672127f, 0.671843f,
+ 0.671559f, 0.671275f, 0.670990f, 0.670706f, 0.670422f, 0.670137f, 0.669852f, 0.669567f,
+ 0.669283f, 0.668998f, 0.668712f, 0.668427f, 0.668142f, 0.667857f, 0.667571f, 0.667286f,
+ 0.667000f, 0.666714f, 0.666428f, 0.666142f, 0.665856f, 0.665570f, 0.665284f, 0.664997f,
+ 0.664711f, 0.664424f, 0.664138f, 0.663851f, 0.663564f, 0.663277f, 0.662990f, 0.662703f,
+ 0.662416f, 0.662128f, 0.661841f, 0.661553f, 0.661266f, 0.660978f, 0.660690f, 0.660402f,
+ 0.660114f, 0.659826f, 0.659538f, 0.659250f, 0.658961f, 0.658673f, 0.658384f, 0.658095f,
+ 0.657807f, 0.657518f, 0.657229f, 0.656940f, 0.656651f, 0.656361f, 0.656072f, 0.655782f,
+ 0.655493f, 0.655203f, 0.654913f, 0.654624f, 0.654334f, 0.654044f, 0.653753f, 0.653463f,
+ 0.653173f, 0.652882f, 0.652592f, 0.652301f, 0.652011f, 0.651720f, 0.651429f, 0.651138f,
+ 0.650847f, 0.650555f, 0.650264f, 0.649973f, 0.649681f, 0.649390f, 0.649098f, 0.648806f,
+ 0.648514f, 0.648222f, 0.647930f, 0.647638f, 0.647346f, 0.647054f, 0.646761f, 0.646469f,
+ 0.646176f, 0.645883f, 0.645590f, 0.645298f, 0.645005f, 0.644711f, 0.644418f, 0.644125f,
+ 0.643832f, 0.643538f, 0.643245f, 0.642951f, 0.642657f, 0.642363f, 0.642069f, 0.641775f,
+ 0.641481f, 0.641187f, 0.640892f, 0.640598f, 0.640303f, 0.640009f, 0.639714f, 0.639419f,
+ 0.639124f, 0.638829f, 0.638534f, 0.638239f, 0.637944f, 0.637649f, 0.637353f, 0.637057f,
+ 0.636762f, 0.636466f, 0.636170f, 0.635874f, 0.635578f, 0.635282f, 0.634986f, 0.634690f,
+ 0.634393f, 0.634097f, 0.633800f, 0.633504f, 0.633207f, 0.632910f, 0.632613f, 0.632316f,
+ 0.632019f, 0.631721f, 0.631424f, 0.631127f, 0.630829f, 0.630532f, 0.630234f, 0.629936f,
+ 0.629638f, 0.629340f, 0.629042f, 0.628744f, 0.628446f, 0.628147f, 0.627849f, 0.627550f,
+ 0.627252f, 0.626953f, 0.626654f, 0.626355f, 0.626056f, 0.625757f, 0.625458f, 0.625159f,
+ 0.624860f, 0.624560f, 0.624260f, 0.623961f, 0.623661f, 0.623361f, 0.623061f, 0.622761f,
+ 0.622461f, 0.622161f, 0.621861f, 0.621560f, 0.621260f, 0.620959f, 0.620659f, 0.620358f,
+ 0.620057f, 0.619756f, 0.619455f, 0.619154f, 0.618853f, 0.618552f, 0.618250f, 0.617949f,
+ 0.617647f, 0.617346f, 0.617044f, 0.616742f, 0.616440f, 0.616138f, 0.615836f, 0.615534f,
+ 0.615232f, 0.614929f, 0.614627f, 0.614324f, 0.614022f, 0.613719f, 0.613416f, 0.613113f,
+ 0.612810f, 0.612507f, 0.612204f, 0.611901f, 0.611597f, 0.611294f, 0.610990f, 0.610687f,
+ 0.610383f, 0.610079f, 0.609775f, 0.609471f, 0.609167f, 0.608863f, 0.608559f, 0.608254f,
+ 0.607950f, 0.607645f, 0.607341f, 0.607036f, 0.606731f, 0.606426f, 0.606121f, 0.605816f,
+ 0.605511f, 0.605206f, 0.604900f, 0.604595f, 0.604290f, 0.603984f, 0.603678f, 0.603372f,
+ 0.603067f, 0.602761f, 0.602455f, 0.602148f, 0.601842f, 0.601536f, 0.601230f, 0.600923f,
+ 0.600616f, 0.600310f, 0.600003f, 0.599696f, 0.599389f, 0.599082f, 0.598775f, 0.598468f,
+ 0.598161f, 0.597853f, 0.597546f, 0.597238f, 0.596931f, 0.596623f, 0.596315f, 0.596007f,
+ 0.595699f, 0.595391f, 0.595083f, 0.594775f, 0.594467f, 0.594158f, 0.593850f, 0.593541f,
+ 0.593232f, 0.592924f, 0.592615f, 0.592306f, 0.591997f, 0.591688f, 0.591378f, 0.591069f,
+ 0.590760f, 0.590450f, 0.590141f, 0.589831f, 0.589521f, 0.589212f, 0.588902f, 0.588592f,
+ 0.588282f, 0.587971f, 0.587661f, 0.587351f, 0.587040f, 0.586730f, 0.586419f, 0.586109f,
+ 0.585798f, 0.585487f, 0.585176f, 0.584865f, 0.584554f, 0.584243f, 0.583931f, 0.583620f,
+ 0.583309f, 0.582997f, 0.582685f, 0.582374f, 0.582062f, 0.581750f, 0.581438f, 0.581126f,
+ 0.580814f, 0.580502f, 0.580189f, 0.579877f, 0.579565f, 0.579252f, 0.578939f, 0.578627f,
+ 0.578314f, 0.578001f, 0.577688f, 0.577375f, 0.577062f, 0.576748f, 0.576435f, 0.576122f,
+ 0.575808f, 0.575495f, 0.575181f, 0.574867f, 0.574553f, 0.574239f, 0.573925f, 0.573611f,
+ 0.573297f, 0.572983f, 0.572669f, 0.572354f, 0.572040f, 0.571725f, 0.571410f, 0.571096f,
+ 0.570781f, 0.570466f, 0.570151f, 0.569836f, 0.569521f, 0.569205f, 0.568890f, 0.568574f,
+ 0.568259f, 0.567943f, 0.567628f, 0.567312f, 0.566996f, 0.566680f, 0.566364f, 0.566048f,
+ 0.565732f, 0.565416f, 0.565099f, 0.564783f, 0.564466f, 0.564150f, 0.563833f, 0.563516f,
+ 0.563199f, 0.562882f, 0.562565f, 0.562248f, 0.561931f, 0.561614f, 0.561297f, 0.560979f,
+ 0.560662f, 0.560344f, 0.560026f, 0.559709f, 0.559391f, 0.559073f, 0.558755f, 0.558437f,
+ 0.558119f, 0.557800f, 0.557482f, 0.557164f, 0.556845f, 0.556526f, 0.556208f, 0.555889f,
+ 0.555570f, 0.555251f, 0.554932f, 0.554613f, 0.554294f, 0.553975f, 0.553656f, 0.553336f,
+ 0.553017f, 0.552697f, 0.552378f, 0.552058f, 0.551738f, 0.551418f, 0.551098f, 0.550778f,
+ 0.550458f, 0.550138f, 0.549818f, 0.549497f, 0.549177f, 0.548856f, 0.548536f, 0.548215f,
+ 0.547894f, 0.547573f, 0.547252f, 0.546931f, 0.546610f, 0.546289f, 0.545968f, 0.545646f,
+ 0.545325f, 0.545003f, 0.544682f, 0.544360f, 0.544039f, 0.543717f, 0.543395f, 0.543073f,
+ 0.542751f, 0.542429f, 0.542106f, 0.541784f, 0.541462f, 0.541139f, 0.540817f, 0.540494f,
+ 0.540171f, 0.539849f, 0.539526f, 0.539203f, 0.538880f, 0.538557f, 0.538234f, 0.537910f,
+ 0.537587f, 0.537264f, 0.536940f, 0.536617f, 0.536293f, 0.535969f, 0.535645f, 0.535322f,
+ 0.534998f, 0.534674f, 0.534349f, 0.534025f, 0.533701f, 0.533377f, 0.533052f, 0.532728f,
+ 0.532403f, 0.532078f, 0.531754f, 0.531429f, 0.531104f, 0.530779f, 0.530454f, 0.530129f,
+ 0.529804f, 0.529478f, 0.529153f, 0.528828f, 0.528502f, 0.528176f, 0.527851f, 0.527525f,
+ 0.527199f, 0.526873f, 0.526547f, 0.526221f, 0.525895f, 0.525569f, 0.525243f, 0.524916f,
+ 0.524590f, 0.524263f, 0.523937f, 0.523610f, 0.523283f, 0.522956f, 0.522629f, 0.522302f,
+ 0.521975f, 0.521648f, 0.521321f, 0.520994f, 0.520666f, 0.520339f, 0.520011f, 0.519684f,
+ 0.519356f, 0.519028f, 0.518700f, 0.518372f, 0.518045f, 0.517716f, 0.517388f, 0.517060f,
+ 0.516732f, 0.516403f, 0.516075f, 0.515746f, 0.515418f, 0.515089f, 0.514760f, 0.514432f,
+ 0.514103f, 0.513774f, 0.513445f, 0.513116f, 0.512786f, 0.512457f, 0.512128f, 0.511798f,
+ 0.511469f, 0.511139f, 0.510810f, 0.510480f, 0.510150f, 0.509820f, 0.509490f, 0.509160f,
+ 0.508830f, 0.508500f, 0.508170f, 0.507839f, 0.507509f, 0.507179f, 0.506848f, 0.506517f,
+ 0.506187f, 0.505856f, 0.505525f, 0.505194f, 0.504863f, 0.504532f, 0.504201f, 0.503870f,
+ 0.503538f, 0.503207f, 0.502876f, 0.502544f, 0.502212f, 0.501881f, 0.501549f, 0.501217f,
+ 0.500885f, 0.500553f, 0.500221f, 0.499889f, 0.499557f, 0.499225f, 0.498893f, 0.498560f,
+ 0.498228f, 0.497895f, 0.497562f, 0.497230f, 0.496897f, 0.496564f, 0.496231f, 0.495898f,
+ 0.495565f, 0.495232f, 0.494899f, 0.494566f, 0.494232f, 0.493899f, 0.493565f, 0.493232f,
+ 0.492898f, 0.492564f, 0.492231f, 0.491897f, 0.491563f, 0.491229f, 0.490895f, 0.490561f,
+ 0.490226f, 0.489892f, 0.489558f, 0.489223f, 0.488889f, 0.488554f, 0.488220f, 0.487885f,
+ 0.487550f, 0.487215f, 0.486880f, 0.486545f, 0.486210f, 0.485875f, 0.485540f, 0.485205f,
+ 0.484869f, 0.484534f, 0.484198f, 0.483863f, 0.483527f, 0.483191f, 0.482856f, 0.482520f,
+ 0.482184f, 0.481848f, 0.481512f, 0.481176f, 0.480839f, 0.480503f, 0.480167f, 0.479830f,
+ 0.479494f, 0.479157f, 0.478821f, 0.478484f, 0.478147f, 0.477810f, 0.477473f, 0.477136f,
+ 0.476799f, 0.476462f, 0.476125f, 0.475788f, 0.475450f, 0.475113f, 0.474775f, 0.474438f,
+ 0.474100f, 0.473763f, 0.473425f, 0.473087f, 0.472749f, 0.472411f, 0.472073f, 0.471735f,
+ 0.471397f, 0.471058f, 0.470720f, 0.470382f, 0.470043f, 0.469705f, 0.469366f, 0.469028f,
+ 0.468689f, 0.468350f, 0.468011f, 0.467672f, 0.467333f, 0.466994f, 0.466655f, 0.466316f,
+ 0.465977f, 0.465637f, 0.465298f, 0.464958f, 0.464619f, 0.464279f, 0.463939f, 0.463600f,
+ 0.463260f, 0.462920f, 0.462580f, 0.462240f, 0.461900f, 0.461560f, 0.461219f, 0.460879f,
+ 0.460539f, 0.460198f, 0.459858f, 0.459517f, 0.459177f, 0.458836f, 0.458495f, 0.458154f,
+ 0.457813f, 0.457472f, 0.457131f, 0.456790f, 0.456449f, 0.456108f, 0.455766f, 0.455425f,
+ 0.455084f, 0.454742f, 0.454400f, 0.454059f, 0.453717f, 0.453375f, 0.453033f, 0.452692f,
+ 0.452350f, 0.452008f, 0.451665f, 0.451323f, 0.450981f, 0.450639f, 0.450296f, 0.449954f,
+ 0.449611f, 0.449269f, 0.448926f, 0.448583f, 0.448241f, 0.447898f, 0.447555f, 0.447212f,
+ 0.446869f, 0.446526f, 0.446183f, 0.445839f, 0.445496f, 0.445153f, 0.444809f, 0.444466f,
+ 0.444122f, 0.443779f, 0.443435f, 0.443091f, 0.442747f, 0.442403f, 0.442059f, 0.441715f,
+ 0.441371f, 0.441027f, 0.440683f, 0.440339f, 0.439994f, 0.439650f, 0.439305f, 0.438961f,
+ 0.438616f, 0.438272f, 0.437927f, 0.437582f, 0.437237f, 0.436892f, 0.436547f, 0.436202f,
+ 0.435857f, 0.435512f, 0.435167f, 0.434821f, 0.434476f, 0.434131f, 0.433785f, 0.433439f,
+ 0.433094f, 0.432748f, 0.432402f, 0.432057f, 0.431711f, 0.431365f, 0.431019f, 0.430673f,
+ 0.430326f, 0.429980f, 0.429634f, 0.429288f, 0.428941f, 0.428595f, 0.428248f, 0.427902f,
+ 0.427555f, 0.427208f, 0.426862f, 0.426515f, 0.426168f, 0.425821f, 0.425474f, 0.425127f,
+ 0.424780f, 0.424432f, 0.424085f, 0.423738f, 0.423390f, 0.423043f, 0.422695f, 0.422348f,
+ 0.422000f, 0.421653f, 0.421305f, 0.420957f, 0.420609f, 0.420261f, 0.419913f, 0.419565f,
+ 0.419217f, 0.418869f, 0.418520f, 0.418172f, 0.417824f, 0.417475f, 0.417127f, 0.416778f,
+ 0.416430f, 0.416081f, 0.415732f, 0.415383f, 0.415034f, 0.414685f, 0.414337f, 0.413987f,
+ 0.413638f, 0.413289f, 0.412940f, 0.412591f, 0.412241f, 0.411892f, 0.411542f, 0.411193f,
+ 0.410843f, 0.410493f, 0.410144f, 0.409794f, 0.409444f, 0.409094f, 0.408744f, 0.408394f,
+ 0.408044f, 0.407694f, 0.407344f, 0.406994f, 0.406643f, 0.406293f, 0.405942f, 0.405592f,
+ 0.405241f, 0.404891f, 0.404540f, 0.404189f, 0.403838f, 0.403488f, 0.403137f, 0.402786f,
+ 0.402435f, 0.402084f, 0.401732f, 0.401381f, 0.401030f, 0.400679f, 0.400327f, 0.399976f,
+ 0.399624f, 0.399273f, 0.398921f, 0.398569f, 0.398218f, 0.397866f, 0.397514f, 0.397162f,
+ 0.396810f, 0.396458f, 0.396106f, 0.395754f, 0.395401f, 0.395049f, 0.394697f, 0.394344f,
+ 0.393992f, 0.393640f, 0.393287f, 0.392934f, 0.392582f, 0.392229f, 0.391876f, 0.391523f,
+ 0.391170f, 0.390817f, 0.390464f, 0.390111f, 0.389758f, 0.389405f, 0.389052f, 0.388698f,
+ 0.388345f, 0.387992f, 0.387638f, 0.387285f, 0.386931f, 0.386577f, 0.386224f, 0.385870f,
+ 0.385516f, 0.385162f, 0.384808f, 0.384454f, 0.384100f, 0.383746f, 0.383392f, 0.383038f,
+ 0.382683f, 0.382329f, 0.381975f, 0.381620f, 0.381266f, 0.380911f, 0.380557f, 0.380202f,
+ 0.379847f, 0.379492f, 0.379138f, 0.378783f, 0.378428f, 0.378073f, 0.377718f, 0.377363f,
+ 0.377007f, 0.376652f, 0.376297f, 0.375942f, 0.375586f, 0.375231f, 0.374875f, 0.374520f,
+ 0.374164f, 0.373808f, 0.373453f, 0.373097f, 0.372741f, 0.372385f, 0.372029f, 0.371673f,
+ 0.371317f, 0.370961f, 0.370605f, 0.370249f, 0.369892f, 0.369536f, 0.369180f, 0.368823f,
+ 0.368467f, 0.368110f, 0.367754f, 0.367397f, 0.367040f, 0.366684f, 0.366327f, 0.365970f,
+ 0.365613f, 0.365256f, 0.364899f, 0.364542f, 0.364185f, 0.363828f, 0.363470f, 0.363113f,
+ 0.362756f, 0.362398f, 0.362041f, 0.361683f, 0.361326f, 0.360968f, 0.360611f, 0.360253f,
+ 0.359895f, 0.359537f, 0.359179f, 0.358821f, 0.358463f, 0.358105f, 0.357747f, 0.357389f,
+ 0.357031f, 0.356673f, 0.356314f, 0.355956f, 0.355598f, 0.355239f, 0.354881f, 0.354522f,
+ 0.354164f, 0.353805f, 0.353446f, 0.353087f, 0.352729f, 0.352370f, 0.352011f, 0.351652f,
+ 0.351293f, 0.350934f, 0.350575f, 0.350215f, 0.349856f, 0.349497f, 0.349138f, 0.348778f,
+ 0.348419f, 0.348059f, 0.347700f, 0.347340f, 0.346980f, 0.346621f, 0.346261f, 0.345901f,
+ 0.345541f, 0.345181f, 0.344821f, 0.344461f, 0.344101f, 0.343741f, 0.343381f, 0.343021f,
+ 0.342661f, 0.342300f, 0.341940f, 0.341580f, 0.341219f, 0.340859f, 0.340498f, 0.340138f,
+ 0.339777f, 0.339416f, 0.339055f, 0.338695f, 0.338334f, 0.337973f, 0.337612f, 0.337251f,
+ 0.336890f, 0.336529f, 0.336168f, 0.335806f, 0.335445f, 0.335084f, 0.334722f, 0.334361f,
+ 0.334000f, 0.333638f, 0.333277f, 0.332915f, 0.332553f, 0.332192f, 0.331830f, 0.331468f,
+ 0.331106f, 0.330744f, 0.330382f, 0.330020f, 0.329658f, 0.329296f, 0.328934f, 0.328572f,
+ 0.328210f, 0.327848f, 0.327485f, 0.327123f, 0.326760f, 0.326398f, 0.326035f, 0.325673f,
+ 0.325310f, 0.324948f, 0.324585f, 0.324222f, 0.323859f, 0.323497f, 0.323134f, 0.322771f,
+ 0.322408f, 0.322045f, 0.321682f, 0.321318f, 0.320955f, 0.320592f, 0.320229f, 0.319865f,
+ 0.319502f, 0.319139f, 0.318775f, 0.318412f, 0.318048f, 0.317684f, 0.317321f, 0.316957f,
+ 0.316593f, 0.316230f, 0.315866f, 0.315502f, 0.315138f, 0.314774f, 0.314410f, 0.314046f,
+ 0.313682f, 0.313318f, 0.312953f, 0.312589f, 0.312225f, 0.311860f, 0.311496f, 0.311132f,
+ 0.310767f, 0.310403f, 0.310038f, 0.309673f, 0.309309f, 0.308944f, 0.308579f, 0.308214f,
+ 0.307850f, 0.307485f, 0.307120f, 0.306755f, 0.306390f, 0.306025f, 0.305660f, 0.305294f,
+ 0.304929f, 0.304564f, 0.304199f, 0.303833f, 0.303468f, 0.303103f, 0.302737f, 0.302372f,
+ 0.302006f, 0.301640f, 0.301275f, 0.300909f, 0.300543f, 0.300177f, 0.299812f, 0.299446f,
+ 0.299080f, 0.298714f, 0.298348f, 0.297982f, 0.297616f, 0.297250f, 0.296883f, 0.296517f,
+ 0.296151f, 0.295785f, 0.295418f, 0.295052f, 0.294685f, 0.294319f, 0.293952f, 0.293586f,
+ 0.293219f, 0.292852f, 0.292486f, 0.292119f, 0.291752f, 0.291385f, 0.291019f, 0.290652f,
+ 0.290285f, 0.289918f, 0.289551f, 0.289184f, 0.288816f, 0.288449f, 0.288082f, 0.287715f,
+ 0.287347f, 0.286980f, 0.286613f, 0.286245f, 0.285878f, 0.285510f, 0.285143f, 0.284775f,
+ 0.284408f, 0.284040f, 0.283672f, 0.283304f, 0.282937f, 0.282569f, 0.282201f, 0.281833f,
+ 0.281465f, 0.281097f, 0.280729f, 0.280361f, 0.279993f, 0.279624f, 0.279256f, 0.278888f,
+ 0.278520f, 0.278151f, 0.277783f, 0.277415f, 0.277046f, 0.276678f, 0.276309f, 0.275940f,
+ 0.275572f, 0.275203f, 0.274834f, 0.274466f, 0.274097f, 0.273728f, 0.273359f, 0.272990f,
+ 0.272621f, 0.272252f, 0.271883f, 0.271514f, 0.271145f, 0.270776f, 0.270407f, 0.270038f,
+ 0.269668f, 0.269299f, 0.268930f, 0.268560f, 0.268191f, 0.267821f, 0.267452f, 0.267082f,
+ 0.266713f, 0.266343f, 0.265973f, 0.265604f, 0.265234f, 0.264864f, 0.264494f, 0.264125f,
+ 0.263755f, 0.263385f, 0.263015f, 0.262645f, 0.262275f, 0.261905f, 0.261534f, 0.261164f,
+ 0.260794f, 0.260424f, 0.260054f, 0.259683f, 0.259313f, 0.258943f, 0.258572f, 0.258202f,
+ 0.257831f, 0.257461f, 0.257090f, 0.256719f, 0.256349f, 0.255978f, 0.255607f, 0.255236f,
+ 0.254866f, 0.254495f, 0.254124f, 0.253753f, 0.253382f, 0.253011f, 0.252640f, 0.252269f,
+ 0.251898f, 0.251527f, 0.251155f, 0.250784f, 0.250413f, 0.250042f, 0.249670f, 0.249299f,
+ 0.248928f, 0.248556f, 0.248185f, 0.247813f, 0.247442f, 0.247070f, 0.246698f, 0.246327f,
+ 0.245955f, 0.245583f, 0.245212f, 0.244840f, 0.244468f, 0.244096f, 0.243724f, 0.243352f,
+ 0.242980f, 0.242608f, 0.242236f, 0.241864f, 0.241492f, 0.241120f, 0.240748f, 0.240375f,
+ 0.240003f, 0.239631f, 0.239258f, 0.238886f, 0.238514f, 0.238141f, 0.237769f, 0.237396f,
+ 0.237024f, 0.236651f, 0.236278f, 0.235906f, 0.235533f, 0.235160f, 0.234788f, 0.234415f,
+ 0.234042f, 0.233669f, 0.233296f, 0.232923f, 0.232550f, 0.232177f, 0.231804f, 0.231431f,
+ 0.231058f, 0.230685f, 0.230312f, 0.229939f, 0.229565f, 0.229192f, 0.228819f, 0.228445f,
+ 0.228072f, 0.227699f, 0.227325f, 0.226952f, 0.226578f, 0.226205f, 0.225831f, 0.225458f,
+ 0.225084f, 0.224710f, 0.224337f, 0.223963f, 0.223589f, 0.223215f, 0.222841f, 0.222468f,
+ 0.222094f, 0.221720f, 0.221346f, 0.220972f, 0.220598f, 0.220224f, 0.219850f, 0.219475f,
+ 0.219101f, 0.218727f, 0.218353f, 0.217979f, 0.217604f, 0.217230f, 0.216856f, 0.216481f,
+ 0.216107f, 0.215732f, 0.215358f, 0.214983f, 0.214609f, 0.214234f, 0.213860f, 0.213485f,
+ 0.213110f, 0.212736f, 0.212361f, 0.211986f, 0.211611f, 0.211237f, 0.210862f, 0.210487f,
+ 0.210112f, 0.209737f, 0.209362f, 0.208987f, 0.208612f, 0.208237f, 0.207862f, 0.207487f,
+ 0.207111f, 0.206736f, 0.206361f, 0.205986f, 0.205610f, 0.205235f, 0.204860f, 0.204484f,
+ 0.204109f, 0.203734f, 0.203358f, 0.202983f, 0.202607f, 0.202231f, 0.201856f, 0.201480f,
+ 0.201105f, 0.200729f, 0.200353f, 0.199978f, 0.199602f, 0.199226f, 0.198850f, 0.198474f,
+ 0.198098f, 0.197722f, 0.197347f, 0.196971f, 0.196595f, 0.196219f, 0.195843f, 0.195466f,
+ 0.195090f, 0.194714f, 0.194338f, 0.193962f, 0.193586f, 0.193209f, 0.192833f, 0.192457f,
+ 0.192080f, 0.191704f, 0.191328f, 0.190951f, 0.190575f, 0.190198f, 0.189822f, 0.189445f,
+ 0.189069f, 0.188692f, 0.188315f, 0.187939f, 0.187562f, 0.187185f, 0.186809f, 0.186432f,
+ 0.186055f, 0.185678f, 0.185301f, 0.184925f, 0.184548f, 0.184171f, 0.183794f, 0.183417f,
+ 0.183040f, 0.182663f, 0.182286f, 0.181909f, 0.181532f, 0.181154f, 0.180777f, 0.180400f,
+ 0.180023f, 0.179646f, 0.179268f, 0.178891f, 0.178514f, 0.178136f, 0.177759f, 0.177382f,
+ 0.177004f, 0.176627f, 0.176249f, 0.175872f, 0.175494f, 0.175117f, 0.174739f, 0.174362f,
+ 0.173984f, 0.173606f, 0.173229f, 0.172851f, 0.172473f, 0.172095f, 0.171718f, 0.171340f,
+ 0.170962f, 0.170584f, 0.170206f, 0.169828f, 0.169450f, 0.169072f, 0.168694f, 0.168316f,
+ 0.167938f, 0.167560f, 0.167182f, 0.166804f, 0.166426f, 0.166048f, 0.165670f, 0.165291f,
+ 0.164913f, 0.164535f, 0.164157f, 0.163778f, 0.163400f, 0.163022f, 0.162643f, 0.162265f,
+ 0.161886f, 0.161508f, 0.161129f, 0.160751f, 0.160372f, 0.159994f, 0.159615f, 0.159237f,
+ 0.158858f, 0.158480f, 0.158101f, 0.157722f, 0.157343f, 0.156965f, 0.156586f, 0.156207f,
+ 0.155828f, 0.155450f, 0.155071f, 0.154692f, 0.154313f, 0.153934f, 0.153555f, 0.153176f,
+ 0.152797f, 0.152418f, 0.152039f, 0.151660f, 0.151281f, 0.150902f, 0.150523f, 0.150144f,
+ 0.149765f, 0.149385f, 0.149006f, 0.148627f, 0.148248f, 0.147868f, 0.147489f, 0.147110f,
+ 0.146730f, 0.146351f, 0.145972f, 0.145592f, 0.145213f, 0.144833f, 0.144454f, 0.144075f,
+ 0.143695f, 0.143316f, 0.142936f, 0.142556f, 0.142177f, 0.141797f, 0.141418f, 0.141038f,
+ 0.140658f, 0.140279f, 0.139899f, 0.139519f, 0.139139f, 0.138760f, 0.138380f, 0.138000f,
+ 0.137620f, 0.137240f, 0.136860f, 0.136480f, 0.136101f, 0.135721f, 0.135341f, 0.134961f,
+ 0.134581f, 0.134201f, 0.133821f, 0.133441f, 0.133061f, 0.132680f, 0.132300f, 0.131920f,
+ 0.131540f, 0.131160f, 0.130780f, 0.130399f, 0.130019f, 0.129639f, 0.129259f, 0.128878f,
+ 0.128498f, 0.128118f, 0.127737f, 0.127357f, 0.126977f, 0.126596f, 0.126216f, 0.125835f,
+ 0.125455f, 0.125075f, 0.124694f, 0.124314f, 0.123933f, 0.123552f, 0.123172f, 0.122791f,
+ 0.122411f, 0.122030f, 0.121649f, 0.121269f, 0.120888f, 0.120507f, 0.120127f, 0.119746f,
+ 0.119365f, 0.118984f, 0.118604f, 0.118223f, 0.117842f, 0.117461f, 0.117080f, 0.116700f,
+ 0.116319f, 0.115938f, 0.115557f, 0.115176f, 0.114795f, 0.114414f, 0.114033f, 0.113652f,
+ 0.113271f, 0.112890f, 0.112509f, 0.112128f, 0.111747f, 0.111366f, 0.110984f, 0.110603f,
+ 0.110222f, 0.109841f, 0.109460f, 0.109079f, 0.108697f, 0.108316f, 0.107935f, 0.107554f,
+ 0.107172f, 0.106791f, 0.106410f, 0.106028f, 0.105647f, 0.105266f, 0.104884f, 0.104503f,
+ 0.104122f, 0.103740f, 0.103359f, 0.102977f, 0.102596f, 0.102214f, 0.101833f, 0.101451f,
+ 0.101070f, 0.100688f, 0.100307f, 0.099925f, 0.099544f, 0.099162f, 0.098780f, 0.098399f,
+ 0.098017f, 0.097635f, 0.097254f, 0.096872f, 0.096490f, 0.096109f, 0.095727f, 0.095345f,
+ 0.094963f, 0.094582f, 0.094200f, 0.093818f, 0.093436f, 0.093055f, 0.092673f, 0.092291f,
+ 0.091909f, 0.091527f, 0.091145f, 0.090763f, 0.090381f, 0.089999f, 0.089617f, 0.089236f,
+ 0.088854f, 0.088472f, 0.088090f, 0.087708f, 0.087326f, 0.086943f, 0.086561f, 0.086179f,
+ 0.085797f, 0.085415f, 0.085033f, 0.084651f, 0.084269f, 0.083887f, 0.083505f, 0.083122f,
+ 0.082740f, 0.082358f, 0.081976f, 0.081594f, 0.081211f, 0.080829f, 0.080447f, 0.080065f,
+ 0.079682f, 0.079300f, 0.078918f, 0.078536f, 0.078153f, 0.077771f, 0.077389f, 0.077006f,
+ 0.076624f, 0.076241f, 0.075859f, 0.075477f, 0.075094f, 0.074712f, 0.074329f, 0.073947f,
+ 0.073565f, 0.073182f, 0.072800f, 0.072417f, 0.072035f, 0.071652f, 0.071270f, 0.070887f,
+ 0.070505f, 0.070122f, 0.069739f, 0.069357f, 0.068974f, 0.068592f, 0.068209f, 0.067827f,
+ 0.067444f, 0.067061f, 0.066679f, 0.066296f, 0.065913f, 0.065531f, 0.065148f, 0.064765f,
+ 0.064383f, 0.064000f, 0.063617f, 0.063234f, 0.062852f, 0.062469f, 0.062086f, 0.061704f,
+ 0.061321f, 0.060938f, 0.060555f, 0.060172f, 0.059790f, 0.059407f, 0.059024f, 0.058641f,
+ 0.058258f, 0.057875f, 0.057493f, 0.057110f, 0.056727f, 0.056344f, 0.055961f, 0.055578f,
+ 0.055195f, 0.054812f, 0.054429f, 0.054046f, 0.053664f, 0.053281f, 0.052898f, 0.052515f,
+ 0.052132f, 0.051749f, 0.051366f, 0.050983f, 0.050600f, 0.050217f, 0.049834f, 0.049451f,
+ 0.049068f, 0.048685f, 0.048302f, 0.047919f, 0.047535f, 0.047152f, 0.046769f, 0.046386f,
+ 0.046003f, 0.045620f, 0.045237f, 0.044854f, 0.044471f, 0.044088f, 0.043705f, 0.043321f,
+ 0.042938f, 0.042555f, 0.042172f, 0.041789f, 0.041406f, 0.041022f, 0.040639f, 0.040256f,
+ 0.039873f, 0.039490f, 0.039107f, 0.038723f, 0.038340f, 0.037957f, 0.037574f, 0.037190f,
+ 0.036807f, 0.036424f, 0.036041f, 0.035657f, 0.035274f, 0.034891f, 0.034508f, 0.034124f,
+ 0.033741f, 0.033358f, 0.032975f, 0.032591f, 0.032208f, 0.031825f, 0.031441f, 0.031058f,
+ 0.030675f, 0.030291f, 0.029908f, 0.029525f, 0.029142f, 0.028758f, 0.028375f, 0.027991f,
+ 0.027608f, 0.027225f, 0.026841f, 0.026458f, 0.026075f, 0.025691f, 0.025308f, 0.024925f,
+ 0.024541f, 0.024158f, 0.023774f, 0.023391f, 0.023008f, 0.022624f, 0.022241f, 0.021857f,
+ 0.021474f, 0.021091f, 0.020707f, 0.020324f, 0.019940f, 0.019557f, 0.019174f, 0.018790f,
+ 0.018407f, 0.018023f, 0.017640f, 0.017256f, 0.016873f, 0.016490f, 0.016106f, 0.015723f,
+ 0.015339f, 0.014956f, 0.014572f, 0.014189f, 0.013805f, 0.013422f, 0.013038f, 0.012655f,
+ 0.012272f, 0.011888f, 0.011505f, 0.011121f, 0.010738f, 0.010354f, 0.009971f, 0.009587f,
+ 0.009204f, 0.008820f, 0.008437f, 0.008053f, 0.007670f, 0.007286f, 0.006903f, 0.006519f,
+ 0.006136f, 0.005752f, 0.005369f, 0.004985f, 0.004602f, 0.004218f, 0.003835f, 0.003451f,
+ 0.003068f, 0.002684f, 0.002301f, 0.001917f, 0.001534f, 0.001150f, 0.000767f, 0.000383f,
+ 0.000000f, 0.000383f, 0.000767f, 0.001150f, 0.001534f, 0.001917f, 0.002301f, 0.002684f,
+ 0.003068f, 0.003451f, 0.003835f, 0.004218f, 0.004602f, 0.004985f, 0.005369f, 0.005752f,
+ 0.006136f, 0.006519f, 0.006903f, 0.007286f, 0.007670f, 0.008053f, 0.008437f, 0.008820f,
+ 0.009204f, 0.009587f, 0.009971f, 0.010354f, 0.010738f, 0.011121f, 0.011505f, 0.011888f,
+ 0.012272f, 0.012655f, 0.013038f, 0.013422f, 0.013805f, 0.014189f, 0.014572f, 0.014956f,
+ 0.015339f, 0.015723f, 0.016106f, 0.016490f, 0.016873f, 0.017256f, 0.017640f, 0.018023f,
+ 0.018407f, 0.018790f, 0.019174f, 0.019557f, 0.019940f, 0.020324f, 0.020707f, 0.021091f,
+ 0.021474f, 0.021857f, 0.022241f, 0.022624f, 0.023008f, 0.023391f, 0.023774f, 0.024158f,
+ 0.024541f, 0.024925f, 0.025308f, 0.025691f, 0.026075f, 0.026458f, 0.026841f, 0.027225f,
+ 0.027608f, 0.027991f, 0.028375f, 0.028758f, 0.029142f, 0.029525f, 0.029908f, 0.030291f,
+ 0.030675f, 0.031058f, 0.031441f, 0.031825f, 0.032208f, 0.032591f, 0.032975f, 0.033358f,
+ 0.033741f, 0.034124f, 0.034508f, 0.034891f, 0.035274f, 0.035657f, 0.036041f, 0.036424f,
+ 0.036807f, 0.037190f, 0.037574f, 0.037957f, 0.038340f, 0.038723f, 0.039107f, 0.039490f,
+ 0.039873f, 0.040256f, 0.040639f, 0.041022f, 0.041406f, 0.041789f, 0.042172f, 0.042555f,
+ 0.042938f, 0.043321f, 0.043705f, 0.044088f, 0.044471f, 0.044854f, 0.045237f, 0.045620f,
+ 0.046003f, 0.046386f, 0.046769f, 0.047152f, 0.047535f, 0.047919f, 0.048302f, 0.048685f,
+ 0.049068f, 0.049451f, 0.049834f, 0.050217f, 0.050600f, 0.050983f, 0.051366f, 0.051749f,
+ 0.052132f, 0.052515f, 0.052898f, 0.053281f, 0.053664f, 0.054046f, 0.054429f, 0.054812f,
+ 0.055195f, 0.055578f, 0.055961f, 0.056344f, 0.056727f, 0.057110f, 0.057493f, 0.057875f,
+ 0.058258f, 0.058641f, 0.059024f, 0.059407f, 0.059790f, 0.060172f, 0.060555f, 0.060938f,
+ 0.061321f, 0.061704f, 0.062086f, 0.062469f, 0.062852f, 0.063234f, 0.063617f, 0.064000f,
+ 0.064383f, 0.064765f, 0.065148f, 0.065531f, 0.065913f, 0.066296f, 0.066679f, 0.067061f,
+ 0.067444f, 0.067827f, 0.068209f, 0.068592f, 0.068974f, 0.069357f, 0.069739f, 0.070122f,
+ 0.070505f, 0.070887f, 0.071270f, 0.071652f, 0.072035f, 0.072417f, 0.072800f, 0.073182f,
+ 0.073565f, 0.073947f, 0.074329f, 0.074712f, 0.075094f, 0.075477f, 0.075859f, 0.076241f,
+ 0.076624f, 0.077006f, 0.077389f, 0.077771f, 0.078153f, 0.078536f, 0.078918f, 0.079300f,
+ 0.079682f, 0.080065f, 0.080447f, 0.080829f, 0.081211f, 0.081594f, 0.081976f, 0.082358f,
+ 0.082740f, 0.083122f, 0.083505f, 0.083887f, 0.084269f, 0.084651f, 0.085033f, 0.085415f,
+ 0.085797f, 0.086179f, 0.086561f, 0.086943f, 0.087326f, 0.087708f, 0.088090f, 0.088472f,
+ 0.088854f, 0.089236f, 0.089617f, 0.089999f, 0.090381f, 0.090763f, 0.091145f, 0.091527f,
+ 0.091909f, 0.092291f, 0.092673f, 0.093055f, 0.093436f, 0.093818f, 0.094200f, 0.094582f,
+ 0.094963f, 0.095345f, 0.095727f, 0.096109f, 0.096490f, 0.096872f, 0.097254f, 0.097635f,
+ 0.098017f, 0.098399f, 0.098780f, 0.099162f, 0.099544f, 0.099925f, 0.100307f, 0.100688f,
+ 0.101070f, 0.101451f, 0.101833f, 0.102214f, 0.102596f, 0.102977f, 0.103359f, 0.103740f,
+ 0.104122f, 0.104503f, 0.104884f, 0.105266f, 0.105647f, 0.106028f, 0.106410f, 0.106791f,
+ 0.107172f, 0.107554f, 0.107935f, 0.108316f, 0.108697f, 0.109079f, 0.109460f, 0.109841f,
+ 0.110222f, 0.110603f, 0.110984f, 0.111366f, 0.111747f, 0.112128f, 0.112509f, 0.112890f,
+ 0.113271f, 0.113652f, 0.114033f, 0.114414f, 0.114795f, 0.115176f, 0.115557f, 0.115938f,
+ 0.116319f, 0.116700f, 0.117080f, 0.117461f, 0.117842f, 0.118223f, 0.118604f, 0.118984f,
+ 0.119365f, 0.119746f, 0.120127f, 0.120507f, 0.120888f, 0.121269f, 0.121649f, 0.122030f,
+ 0.122411f, 0.122791f, 0.123172f, 0.123552f, 0.123933f, 0.124314f, 0.124694f, 0.125075f,
+ 0.125455f, 0.125835f, 0.126216f, 0.126596f, 0.126977f, 0.127357f, 0.127737f, 0.128118f,
+ 0.128498f, 0.128878f, 0.129259f, 0.129639f, 0.130019f, 0.130399f, 0.130780f, 0.131160f,
+ 0.131540f, 0.131920f, 0.132300f, 0.132680f, 0.133061f, 0.133441f, 0.133821f, 0.134201f,
+ 0.134581f, 0.134961f, 0.135341f, 0.135721f, 0.136101f, 0.136480f, 0.136860f, 0.137240f,
+ 0.137620f, 0.138000f, 0.138380f, 0.138760f, 0.139139f, 0.139519f, 0.139899f, 0.140279f,
+ 0.140658f, 0.141038f, 0.141418f, 0.141797f, 0.142177f, 0.142556f, 0.142936f, 0.143316f,
+ 0.143695f, 0.144075f, 0.144454f, 0.144833f, 0.145213f, 0.145592f, 0.145972f, 0.146351f,
+ 0.146730f, 0.147110f, 0.147489f, 0.147868f, 0.148248f, 0.148627f, 0.149006f, 0.149385f,
+ 0.149765f, 0.150144f, 0.150523f, 0.150902f, 0.151281f, 0.151660f, 0.152039f, 0.152418f,
+ 0.152797f, 0.153176f, 0.153555f, 0.153934f, 0.154313f, 0.154692f, 0.155071f, 0.155450f,
+ 0.155828f, 0.156207f, 0.156586f, 0.156965f, 0.157343f, 0.157722f, 0.158101f, 0.158480f,
+ 0.158858f, 0.159237f, 0.159615f, 0.159994f, 0.160372f, 0.160751f, 0.161129f, 0.161508f,
+ 0.161886f, 0.162265f, 0.162643f, 0.163022f, 0.163400f, 0.163778f, 0.164157f, 0.164535f,
+ 0.164913f, 0.165291f, 0.165670f, 0.166048f, 0.166426f, 0.166804f, 0.167182f, 0.167560f,
+ 0.167938f, 0.168316f, 0.168694f, 0.169072f, 0.169450f, 0.169828f, 0.170206f, 0.170584f,
+ 0.170962f, 0.171340f, 0.171718f, 0.172095f, 0.172473f, 0.172851f, 0.173229f, 0.173606f,
+ 0.173984f, 0.174362f, 0.174739f, 0.175117f, 0.175494f, 0.175872f, 0.176249f, 0.176627f,
+ 0.177004f, 0.177382f, 0.177759f, 0.178136f, 0.178514f, 0.178891f, 0.179268f, 0.179646f,
+ 0.180023f, 0.180400f, 0.180777f, 0.181154f, 0.181532f, 0.181909f, 0.182286f, 0.182663f,
+ 0.183040f, 0.183417f, 0.183794f, 0.184171f, 0.184548f, 0.184925f, 0.185301f, 0.185678f,
+ 0.186055f, 0.186432f, 0.186809f, 0.187185f, 0.187562f, 0.187939f, 0.188315f, 0.188692f,
+ 0.189069f, 0.189445f, 0.189822f, 0.190198f, 0.190575f, 0.190951f, 0.191328f, 0.191704f,
+ 0.192080f, 0.192457f, 0.192833f, 0.193209f, 0.193586f, 0.193962f, 0.194338f, 0.194714f,
+ 0.195090f, 0.195466f, 0.195843f, 0.196219f, 0.196595f, 0.196971f, 0.197347f, 0.197722f,
+ 0.198098f, 0.198474f, 0.198850f, 0.199226f, 0.199602f, 0.199978f, 0.200353f, 0.200729f,
+ 0.201105f, 0.201480f, 0.201856f, 0.202231f, 0.202607f, 0.202983f, 0.203358f, 0.203734f,
+ 0.204109f, 0.204484f, 0.204860f, 0.205235f, 0.205610f, 0.205986f, 0.206361f, 0.206736f,
+ 0.207111f, 0.207487f, 0.207862f, 0.208237f, 0.208612f, 0.208987f, 0.209362f, 0.209737f,
+ 0.210112f, 0.210487f, 0.210862f, 0.211237f, 0.211611f, 0.211986f, 0.212361f, 0.212736f,
+ 0.213110f, 0.213485f, 0.213860f, 0.214234f, 0.214609f, 0.214983f, 0.215358f, 0.215732f,
+ 0.216107f, 0.216481f, 0.216856f, 0.217230f, 0.217604f, 0.217979f, 0.218353f, 0.218727f,
+ 0.219101f, 0.219475f, 0.219850f, 0.220224f, 0.220598f, 0.220972f, 0.221346f, 0.221720f,
+ 0.222094f, 0.222468f, 0.222841f, 0.223215f, 0.223589f, 0.223963f, 0.224337f, 0.224710f,
+ 0.225084f, 0.225458f, 0.225831f, 0.226205f, 0.226578f, 0.226952f, 0.227325f, 0.227699f,
+ 0.228072f, 0.228445f, 0.228819f, 0.229192f, 0.229565f, 0.229939f, 0.230312f, 0.230685f,
+ 0.231058f, 0.231431f, 0.231804f, 0.232177f, 0.232550f, 0.232923f, 0.233296f, 0.233669f,
+ 0.234042f, 0.234415f, 0.234788f, 0.235160f, 0.235533f, 0.235906f, 0.236278f, 0.236651f,
+ 0.237024f, 0.237396f, 0.237769f, 0.238141f, 0.238514f, 0.238886f, 0.239258f, 0.239631f,
+ 0.240003f, 0.240375f, 0.240748f, 0.241120f, 0.241492f, 0.241864f, 0.242236f, 0.242608f,
+ 0.242980f, 0.243352f, 0.243724f, 0.244096f, 0.244468f, 0.244840f, 0.245212f, 0.245583f,
+ 0.245955f, 0.246327f, 0.246698f, 0.247070f, 0.247442f, 0.247813f, 0.248185f, 0.248556f,
+ 0.248928f, 0.249299f, 0.249670f, 0.250042f, 0.250413f, 0.250784f, 0.251155f, 0.251527f,
+ 0.251898f, 0.252269f, 0.252640f, 0.253011f, 0.253382f, 0.253753f, 0.254124f, 0.254495f,
+ 0.254866f, 0.255236f, 0.255607f, 0.255978f, 0.256349f, 0.256719f, 0.257090f, 0.257461f,
+ 0.257831f, 0.258202f, 0.258572f, 0.258943f, 0.259313f, 0.259683f, 0.260054f, 0.260424f,
+ 0.260794f, 0.261164f, 0.261534f, 0.261905f, 0.262275f, 0.262645f, 0.263015f, 0.263385f,
+ 0.263755f, 0.264125f, 0.264494f, 0.264864f, 0.265234f, 0.265604f, 0.265973f, 0.266343f,
+ 0.266713f, 0.267082f, 0.267452f, 0.267821f, 0.268191f, 0.268560f, 0.268930f, 0.269299f,
+ 0.269668f, 0.270038f, 0.270407f, 0.270776f, 0.271145f, 0.271514f, 0.271883f, 0.272252f,
+ 0.272621f, 0.272990f, 0.273359f, 0.273728f, 0.274097f, 0.274466f, 0.274834f, 0.275203f,
+ 0.275572f, 0.275940f, 0.276309f, 0.276678f, 0.277046f, 0.277415f, 0.277783f, 0.278151f,
+ 0.278520f, 0.278888f, 0.279256f, 0.279624f, 0.279993f, 0.280361f, 0.280729f, 0.281097f,
+ 0.281465f, 0.281833f, 0.282201f, 0.282569f, 0.282937f, 0.283304f, 0.283672f, 0.284040f,
+ 0.284408f, 0.284775f, 0.285143f, 0.285510f, 0.285878f, 0.286245f, 0.286613f, 0.286980f,
+ 0.287347f, 0.287715f, 0.288082f, 0.288449f, 0.288816f, 0.289184f, 0.289551f, 0.289918f,
+ 0.290285f, 0.290652f, 0.291019f, 0.291385f, 0.291752f, 0.292119f, 0.292486f, 0.292852f,
+ 0.293219f, 0.293586f, 0.293952f, 0.294319f, 0.294685f, 0.295052f, 0.295418f, 0.295785f,
+ 0.296151f, 0.296517f, 0.296883f, 0.297250f, 0.297616f, 0.297982f, 0.298348f, 0.298714f,
+ 0.299080f, 0.299446f, 0.299812f, 0.300177f, 0.300543f, 0.300909f, 0.301275f, 0.301640f,
+ 0.302006f, 0.302372f, 0.302737f, 0.303103f, 0.303468f, 0.303833f, 0.304199f, 0.304564f,
+ 0.304929f, 0.305294f, 0.305660f, 0.306025f, 0.306390f, 0.306755f, 0.307120f, 0.307485f,
+ 0.307850f, 0.308214f, 0.308579f, 0.308944f, 0.309309f, 0.309673f, 0.310038f, 0.310403f,
+ 0.310767f, 0.311132f, 0.311496f, 0.311860f, 0.312225f, 0.312589f, 0.312953f, 0.313318f,
+ 0.313682f, 0.314046f, 0.314410f, 0.314774f, 0.315138f, 0.315502f, 0.315866f, 0.316230f,
+ 0.316593f, 0.316957f, 0.317321f, 0.317684f, 0.318048f, 0.318412f, 0.318775f, 0.319139f,
+ 0.319502f, 0.319865f, 0.320229f, 0.320592f, 0.320955f, 0.321318f, 0.321682f, 0.322045f,
+ 0.322408f, 0.322771f, 0.323134f, 0.323497f, 0.323859f, 0.324222f, 0.324585f, 0.324948f,
+ 0.325310f, 0.325673f, 0.326035f, 0.326398f, 0.326760f, 0.327123f, 0.327485f, 0.327848f,
+ 0.328210f, 0.328572f, 0.328934f, 0.329296f, 0.329658f, 0.330020f, 0.330382f, 0.330744f,
+ 0.331106f, 0.331468f, 0.331830f, 0.332192f, 0.332553f, 0.332915f, 0.333277f, 0.333638f,
+ 0.334000f, 0.334361f, 0.334722f, 0.335084f, 0.335445f, 0.335806f, 0.336168f, 0.336529f,
+ 0.336890f, 0.337251f, 0.337612f, 0.337973f, 0.338334f, 0.338695f, 0.339055f, 0.339416f,
+ 0.339777f, 0.340138f, 0.340498f, 0.340859f, 0.341219f, 0.341580f, 0.341940f, 0.342300f,
+ 0.342661f, 0.343021f, 0.343381f, 0.343741f, 0.344101f, 0.344461f, 0.344821f, 0.345181f,
+ 0.345541f, 0.345901f, 0.346261f, 0.346621f, 0.346980f, 0.347340f, 0.347700f, 0.348059f,
+ 0.348419f, 0.348778f, 0.349138f, 0.349497f, 0.349856f, 0.350215f, 0.350575f, 0.350934f,
+ 0.351293f, 0.351652f, 0.352011f, 0.352370f, 0.352729f, 0.353087f, 0.353446f, 0.353805f,
+ 0.354164f, 0.354522f, 0.354881f, 0.355239f, 0.355598f, 0.355956f, 0.356314f, 0.356673f,
+ 0.357031f, 0.357389f, 0.357747f, 0.358105f, 0.358463f, 0.358821f, 0.359179f, 0.359537f,
+ 0.359895f, 0.360253f, 0.360611f, 0.360968f, 0.361326f, 0.361683f, 0.362041f, 0.362398f,
+ 0.362756f, 0.363113f, 0.363470f, 0.363828f, 0.364185f, 0.364542f, 0.364899f, 0.365256f,
+ 0.365613f, 0.365970f, 0.366327f, 0.366684f, 0.367040f, 0.367397f, 0.367754f, 0.368110f,
+ 0.368467f, 0.368823f, 0.369180f, 0.369536f, 0.369892f, 0.370249f, 0.370605f, 0.370961f,
+ 0.371317f, 0.371673f, 0.372029f, 0.372385f, 0.372741f, 0.373097f, 0.373453f, 0.373808f,
+ 0.374164f, 0.374520f, 0.374875f, 0.375231f, 0.375586f, 0.375942f, 0.376297f, 0.376652f,
+ 0.377007f, 0.377363f, 0.377718f, 0.378073f, 0.378428f, 0.378783f, 0.379138f, 0.379492f,
+ 0.379847f, 0.380202f, 0.380557f, 0.380911f, 0.381266f, 0.381620f, 0.381975f, 0.382329f,
+ 0.382683f, 0.383038f, 0.383392f, 0.383746f, 0.384100f, 0.384454f, 0.384808f, 0.385162f,
+ 0.385516f, 0.385870f, 0.386224f, 0.386577f, 0.386931f, 0.387285f, 0.387638f, 0.387992f,
+ 0.388345f, 0.388698f, 0.389052f, 0.389405f, 0.389758f, 0.390111f, 0.390464f, 0.390817f,
+ 0.391170f, 0.391523f, 0.391876f, 0.392229f, 0.392582f, 0.392934f, 0.393287f, 0.393640f,
+ 0.393992f, 0.394344f, 0.394697f, 0.395049f, 0.395401f, 0.395754f, 0.396106f, 0.396458f,
+ 0.396810f, 0.397162f, 0.397514f, 0.397866f, 0.398218f, 0.398569f, 0.398921f, 0.399273f,
+ 0.399624f, 0.399976f, 0.400327f, 0.400679f, 0.401030f, 0.401381f, 0.401732f, 0.402084f,
+ 0.402435f, 0.402786f, 0.403137f, 0.403488f, 0.403838f, 0.404189f, 0.404540f, 0.404891f,
+ 0.405241f, 0.405592f, 0.405942f, 0.406293f, 0.406643f, 0.406994f, 0.407344f, 0.407694f,
+ 0.408044f, 0.408394f, 0.408744f, 0.409094f, 0.409444f, 0.409794f, 0.410144f, 0.410493f,
+ 0.410843f, 0.411193f, 0.411542f, 0.411892f, 0.412241f, 0.412591f, 0.412940f, 0.413289f,
+ 0.413638f, 0.413987f, 0.414337f, 0.414685f, 0.415034f, 0.415383f, 0.415732f, 0.416081f,
+ 0.416430f, 0.416778f, 0.417127f, 0.417475f, 0.417824f, 0.418172f, 0.418520f, 0.418869f,
+ 0.419217f, 0.419565f, 0.419913f, 0.420261f, 0.420609f, 0.420957f, 0.421305f, 0.421653f,
+ 0.422000f, 0.422348f, 0.422695f, 0.423043f, 0.423390f, 0.423738f, 0.424085f, 0.424432f,
+ 0.424780f, 0.425127f, 0.425474f, 0.425821f, 0.426168f, 0.426515f, 0.426862f, 0.427208f,
+ 0.427555f, 0.427902f, 0.428248f, 0.428595f, 0.428941f, 0.429288f, 0.429634f, 0.429980f,
+ 0.430326f, 0.430673f, 0.431019f, 0.431365f, 0.431711f, 0.432057f, 0.432402f, 0.432748f,
+ 0.433094f, 0.433439f, 0.433785f, 0.434131f, 0.434476f, 0.434821f, 0.435167f, 0.435512f,
+ 0.435857f, 0.436202f, 0.436547f, 0.436892f, 0.437237f, 0.437582f, 0.437927f, 0.438272f,
+ 0.438616f, 0.438961f, 0.439305f, 0.439650f, 0.439994f, 0.440339f, 0.440683f, 0.441027f,
+ 0.441371f, 0.441715f, 0.442059f, 0.442403f, 0.442747f, 0.443091f, 0.443435f, 0.443779f,
+ 0.444122f, 0.444466f, 0.444809f, 0.445153f, 0.445496f, 0.445839f, 0.446183f, 0.446526f,
+ 0.446869f, 0.447212f, 0.447555f, 0.447898f, 0.448241f, 0.448583f, 0.448926f, 0.449269f,
+ 0.449611f, 0.449954f, 0.450296f, 0.450639f, 0.450981f, 0.451323f, 0.451665f, 0.452008f,
+ 0.452350f, 0.452692f, 0.453033f, 0.453375f, 0.453717f, 0.454059f, 0.454400f, 0.454742f,
+ 0.455084f, 0.455425f, 0.455766f, 0.456108f, 0.456449f, 0.456790f, 0.457131f, 0.457472f,
+ 0.457813f, 0.458154f, 0.458495f, 0.458836f, 0.459177f, 0.459517f, 0.459858f, 0.460198f,
+ 0.460539f, 0.460879f, 0.461219f, 0.461560f, 0.461900f, 0.462240f, 0.462580f, 0.462920f,
+ 0.463260f, 0.463600f, 0.463939f, 0.464279f, 0.464619f, 0.464958f, 0.465298f, 0.465637f,
+ 0.465977f, 0.466316f, 0.466655f, 0.466994f, 0.467333f, 0.467672f, 0.468011f, 0.468350f,
+ 0.468689f, 0.469028f, 0.469366f, 0.469705f, 0.470043f, 0.470382f, 0.470720f, 0.471058f,
+ 0.471397f, 0.471735f, 0.472073f, 0.472411f, 0.472749f, 0.473087f, 0.473425f, 0.473763f,
+ 0.474100f, 0.474438f, 0.474775f, 0.475113f, 0.475450f, 0.475788f, 0.476125f, 0.476462f,
+ 0.476799f, 0.477136f, 0.477473f, 0.477810f, 0.478147f, 0.478484f, 0.478821f, 0.479157f,
+ 0.479494f, 0.479830f, 0.480167f, 0.480503f, 0.480839f, 0.481176f, 0.481512f, 0.481848f,
+ 0.482184f, 0.482520f, 0.482856f, 0.483191f, 0.483527f, 0.483863f, 0.484198f, 0.484534f,
+ 0.484869f, 0.485205f, 0.485540f, 0.485875f, 0.486210f, 0.486545f, 0.486880f, 0.487215f,
+ 0.487550f, 0.487885f, 0.488220f, 0.488554f, 0.488889f, 0.489223f, 0.489558f, 0.489892f,
+ 0.490226f, 0.490561f, 0.490895f, 0.491229f, 0.491563f, 0.491897f, 0.492231f, 0.492564f,
+ 0.492898f, 0.493232f, 0.493565f, 0.493899f, 0.494232f, 0.494566f, 0.494899f, 0.495232f,
+ 0.495565f, 0.495898f, 0.496231f, 0.496564f, 0.496897f, 0.497230f, 0.497562f, 0.497895f,
+ 0.498228f, 0.498560f, 0.498893f, 0.499225f, 0.499557f, 0.499889f, 0.500221f, 0.500553f,
+ 0.500885f, 0.501217f, 0.501549f, 0.501881f, 0.502212f, 0.502544f, 0.502876f, 0.503207f,
+ 0.503538f, 0.503870f, 0.504201f, 0.504532f, 0.504863f, 0.505194f, 0.505525f, 0.505856f,
+ 0.506187f, 0.506517f, 0.506848f, 0.507179f, 0.507509f, 0.507839f, 0.508170f, 0.508500f,
+ 0.508830f, 0.509160f, 0.509490f, 0.509820f, 0.510150f, 0.510480f, 0.510810f, 0.511139f,
+ 0.511469f, 0.511798f, 0.512128f, 0.512457f, 0.512786f, 0.513116f, 0.513445f, 0.513774f,
+ 0.514103f, 0.514432f, 0.514760f, 0.515089f, 0.515418f, 0.515746f, 0.516075f, 0.516403f,
+ 0.516732f, 0.517060f, 0.517388f, 0.517716f, 0.518045f, 0.518372f, 0.518700f, 0.519028f,
+ 0.519356f, 0.519684f, 0.520011f, 0.520339f, 0.520666f, 0.520994f, 0.521321f, 0.521648f,
+ 0.521975f, 0.522302f, 0.522629f, 0.522956f, 0.523283f, 0.523610f, 0.523937f, 0.524263f,
+ 0.524590f, 0.524916f, 0.525243f, 0.525569f, 0.525895f, 0.526221f, 0.526547f, 0.526873f,
+ 0.527199f, 0.527525f, 0.527851f, 0.528176f, 0.528502f, 0.528828f, 0.529153f, 0.529478f,
+ 0.529804f, 0.530129f, 0.530454f, 0.530779f, 0.531104f, 0.531429f, 0.531754f, 0.532078f,
+ 0.532403f, 0.532728f, 0.533052f, 0.533377f, 0.533701f, 0.534025f, 0.534349f, 0.534674f,
+ 0.534998f, 0.535322f, 0.535645f, 0.535969f, 0.536293f, 0.536617f, 0.536940f, 0.537264f,
+ 0.537587f, 0.537910f, 0.538234f, 0.538557f, 0.538880f, 0.539203f, 0.539526f, 0.539849f,
+ 0.540171f, 0.540494f, 0.540817f, 0.541139f, 0.541462f, 0.541784f, 0.542106f, 0.542429f,
+ 0.542751f, 0.543073f, 0.543395f, 0.543717f, 0.544039f, 0.544360f, 0.544682f, 0.545003f,
+ 0.545325f, 0.545646f, 0.545968f, 0.546289f, 0.546610f, 0.546931f, 0.547252f, 0.547573f,
+ 0.547894f, 0.548215f, 0.548536f, 0.548856f, 0.549177f, 0.549497f, 0.549818f, 0.550138f,
+ 0.550458f, 0.550778f, 0.551098f, 0.551418f, 0.551738f, 0.552058f, 0.552378f, 0.552697f,
+ 0.553017f, 0.553336f, 0.553656f, 0.553975f, 0.554294f, 0.554613f, 0.554932f, 0.555251f,
+ 0.555570f, 0.555889f, 0.556208f, 0.556526f, 0.556845f, 0.557164f, 0.557482f, 0.557800f,
+ 0.558119f, 0.558437f, 0.558755f, 0.559073f, 0.559391f, 0.559709f, 0.560026f, 0.560344f,
+ 0.560662f, 0.560979f, 0.561297f, 0.561614f, 0.561931f, 0.562248f, 0.562565f, 0.562882f,
+ 0.563199f, 0.563516f, 0.563833f, 0.564150f, 0.564466f, 0.564783f, 0.565099f, 0.565416f,
+ 0.565732f, 0.566048f, 0.566364f, 0.566680f, 0.566996f, 0.567312f, 0.567628f, 0.567943f,
+ 0.568259f, 0.568574f, 0.568890f, 0.569205f, 0.569521f, 0.569836f, 0.570151f, 0.570466f,
+ 0.570781f, 0.571096f, 0.571410f, 0.571725f, 0.572040f, 0.572354f, 0.572669f, 0.572983f,
+ 0.573297f, 0.573611f, 0.573925f, 0.574239f, 0.574553f, 0.574867f, 0.575181f, 0.575495f,
+ 0.575808f, 0.576122f, 0.576435f, 0.576748f, 0.577062f, 0.577375f, 0.577688f, 0.578001f,
+ 0.578314f, 0.578627f, 0.578939f, 0.579252f, 0.579565f, 0.579877f, 0.580189f, 0.580502f,
+ 0.580814f, 0.581126f, 0.581438f, 0.581750f, 0.582062f, 0.582374f, 0.582685f, 0.582997f,
+ 0.583309f, 0.583620f, 0.583931f, 0.584243f, 0.584554f, 0.584865f, 0.585176f, 0.585487f,
+ 0.585798f, 0.586109f, 0.586419f, 0.586730f, 0.587040f, 0.587351f, 0.587661f, 0.587971f,
+ 0.588282f, 0.588592f, 0.588902f, 0.589212f, 0.589521f, 0.589831f, 0.590141f, 0.590450f,
+ 0.590760f, 0.591069f, 0.591378f, 0.591688f, 0.591997f, 0.592306f, 0.592615f, 0.592924f,
+ 0.593232f, 0.593541f, 0.593850f, 0.594158f, 0.594467f, 0.594775f, 0.595083f, 0.595391f,
+ 0.595699f, 0.596007f, 0.596315f, 0.596623f, 0.596931f, 0.597238f, 0.597546f, 0.597853f,
+ 0.598161f, 0.598468f, 0.598775f, 0.599082f, 0.599389f, 0.599696f, 0.600003f, 0.600310f,
+ 0.600616f, 0.600923f, 0.601230f, 0.601536f, 0.601842f, 0.602148f, 0.602455f, 0.602761f,
+ 0.603067f, 0.603372f, 0.603678f, 0.603984f, 0.604290f, 0.604595f, 0.604900f, 0.605206f,
+ 0.605511f, 0.605816f, 0.606121f, 0.606426f, 0.606731f, 0.607036f, 0.607341f, 0.607645f,
+ 0.607950f, 0.608254f, 0.608559f, 0.608863f, 0.609167f, 0.609471f, 0.609775f, 0.610079f,
+ 0.610383f, 0.610687f, 0.610990f, 0.611294f, 0.611597f, 0.611901f, 0.612204f, 0.612507f,
+ 0.612810f, 0.613113f, 0.613416f, 0.613719f, 0.614022f, 0.614324f, 0.614627f, 0.614929f,
+ 0.615232f, 0.615534f, 0.615836f, 0.616138f, 0.616440f, 0.616742f, 0.617044f, 0.617346f,
+ 0.617647f, 0.617949f, 0.618250f, 0.618552f, 0.618853f, 0.619154f, 0.619455f, 0.619756f,
+ 0.620057f, 0.620358f, 0.620659f, 0.620959f, 0.621260f, 0.621560f, 0.621861f, 0.622161f,
+ 0.622461f, 0.622761f, 0.623061f, 0.623361f, 0.623661f, 0.623961f, 0.624260f, 0.624560f,
+ 0.624860f, 0.625159f, 0.625458f, 0.625757f, 0.626056f, 0.626355f, 0.626654f, 0.626953f,
+ 0.627252f, 0.627550f, 0.627849f, 0.628147f, 0.628446f, 0.628744f, 0.629042f, 0.629340f,
+ 0.629638f, 0.629936f, 0.630234f, 0.630532f, 0.630829f, 0.631127f, 0.631424f, 0.631721f,
+ 0.632019f, 0.632316f, 0.632613f, 0.632910f, 0.633207f, 0.633504f, 0.633800f, 0.634097f,
+ 0.634393f, 0.634690f, 0.634986f, 0.635282f, 0.635578f, 0.635874f, 0.636170f, 0.636466f,
+ 0.636762f, 0.637057f, 0.637353f, 0.637649f, 0.637944f, 0.638239f, 0.638534f, 0.638829f,
+ 0.639124f, 0.639419f, 0.639714f, 0.640009f, 0.640303f, 0.640598f, 0.640892f, 0.641187f,
+ 0.641481f, 0.641775f, 0.642069f, 0.642363f, 0.642657f, 0.642951f, 0.643245f, 0.643538f,
+ 0.643832f, 0.644125f, 0.644418f, 0.644711f, 0.645005f, 0.645298f, 0.645590f, 0.645883f,
+ 0.646176f, 0.646469f, 0.646761f, 0.647054f, 0.647346f, 0.647638f, 0.647930f, 0.648222f,
+ 0.648514f, 0.648806f, 0.649098f, 0.649390f, 0.649681f, 0.649973f, 0.650264f, 0.650555f,
+ 0.650847f, 0.651138f, 0.651429f, 0.651720f, 0.652011f, 0.652301f, 0.652592f, 0.652882f,
+ 0.653173f, 0.653463f, 0.653753f, 0.654044f, 0.654334f, 0.654624f, 0.654913f, 0.655203f,
+ 0.655493f, 0.655782f, 0.656072f, 0.656361f, 0.656651f, 0.656940f, 0.657229f, 0.657518f,
+ 0.657807f, 0.658095f, 0.658384f, 0.658673f, 0.658961f, 0.659250f, 0.659538f, 0.659826f,
+ 0.660114f, 0.660402f, 0.660690f, 0.660978f, 0.661266f, 0.661553f, 0.661841f, 0.662128f,
+ 0.662416f, 0.662703f, 0.662990f, 0.663277f, 0.663564f, 0.663851f, 0.664138f, 0.664424f,
+ 0.664711f, 0.664997f, 0.665284f, 0.665570f, 0.665856f, 0.666142f, 0.666428f, 0.666714f,
+ 0.667000f, 0.667286f, 0.667571f, 0.667857f, 0.668142f, 0.668427f, 0.668712f, 0.668998f,
+ 0.669283f, 0.669567f, 0.669852f, 0.670137f, 0.670422f, 0.670706f, 0.670990f, 0.671275f,
+ 0.671559f, 0.671843f, 0.672127f, 0.672411f, 0.672695f, 0.672978f, 0.673262f, 0.673546f,
+ 0.673829f, 0.674112f, 0.674396f, 0.674679f, 0.674962f, 0.675245f, 0.675527f, 0.675810f,
+ 0.676093f, 0.676375f, 0.676658f, 0.676940f, 0.677222f, 0.677504f, 0.677786f, 0.678068f,
+ 0.678350f, 0.678632f, 0.678913f, 0.679195f, 0.679476f, 0.679758f, 0.680039f, 0.680320f,
+ 0.680601f, 0.680882f, 0.681163f, 0.681443f, 0.681724f, 0.682005f, 0.682285f, 0.682565f,
+ 0.682846f, 0.683126f, 0.683406f, 0.683686f, 0.683965f, 0.684245f, 0.684525f, 0.684804f,
+ 0.685084f, 0.685363f, 0.685642f, 0.685921f, 0.686200f, 0.686479f, 0.686758f, 0.687037f,
+ 0.687315f, 0.687594f, 0.687872f, 0.688151f, 0.688429f, 0.688707f, 0.688985f, 0.689263f,
+ 0.689541f, 0.689818f, 0.690096f, 0.690373f, 0.690651f, 0.690928f, 0.691205f, 0.691482f,
+ 0.691759f, 0.692036f, 0.692313f, 0.692590f, 0.692866f, 0.693143f, 0.693419f, 0.693695f,
+ 0.693971f, 0.694248f, 0.694524f, 0.694799f, 0.695075f, 0.695351f, 0.695626f, 0.695902f,
+ 0.696177f, 0.696452f, 0.696728f, 0.697003f, 0.697277f, 0.697552f, 0.697827f, 0.698102f,
+ 0.698376f, 0.698651f, 0.698925f, 0.699199f, 0.699473f, 0.699747f, 0.700021f, 0.700295f,
+ 0.700569f, 0.700842f, 0.701116f, 0.701389f, 0.701663f, 0.701936f, 0.702209f, 0.702482f,
+ 0.702755f, 0.703028f, 0.703300f, 0.703573f, 0.703845f, 0.704118f, 0.704390f, 0.704662f,
+ 0.704934f, 0.705206f, 0.705478f, 0.705750f, 0.706021f, 0.706293f, 0.706564f, 0.706836f,
+ 0.707107f, 0.707378f, 0.707649f, 0.707920f, 0.708191f, 0.708461f, 0.708732f, 0.709002f,
+ 0.709273f, 0.709543f, 0.709813f, 0.710083f, 0.710353f, 0.710623f, 0.710893f, 0.711163f,
+ 0.711432f, 0.711702f, 0.711971f, 0.712240f, 0.712509f, 0.712778f, 0.713047f, 0.713316f,
+ 0.713585f, 0.713853f, 0.714122f, 0.714390f, 0.714659f, 0.714927f, 0.715195f, 0.715463f,
+ 0.715731f, 0.715999f, 0.716266f, 0.716534f, 0.716801f, 0.717069f, 0.717336f, 0.717603f,
+ 0.717870f, 0.718137f, 0.718404f, 0.718670f, 0.718937f, 0.719204f, 0.719470f, 0.719736f,
+ 0.720003f, 0.720269f, 0.720535f, 0.720800f, 0.721066f, 0.721332f, 0.721597f, 0.721863f,
+ 0.722128f, 0.722393f, 0.722659f, 0.722924f, 0.723188f, 0.723453f, 0.723718f, 0.723983f,
+ 0.724247f, 0.724511f, 0.724776f, 0.725040f, 0.725304f, 0.725568f, 0.725832f, 0.726095f,
+ 0.726359f, 0.726623f, 0.726886f, 0.727149f, 0.727413f, 0.727676f, 0.727939f, 0.728202f,
+ 0.728464f, 0.728727f, 0.728990f, 0.729252f, 0.729514f, 0.729777f, 0.730039f, 0.730301f,
+ 0.730563f, 0.730825f, 0.731086f, 0.731348f, 0.731609f, 0.731871f, 0.732132f, 0.732393f,
+ 0.732654f, 0.732915f, 0.733176f, 0.733437f, 0.733697f, 0.733958f, 0.734218f, 0.734479f,
+ 0.734739f, 0.734999f, 0.735259f, 0.735519f, 0.735779f, 0.736038f, 0.736298f, 0.736557f,
+ 0.736817f, 0.737076f, 0.737335f, 0.737594f, 0.737853f, 0.738112f, 0.738370f, 0.738629f,
+ 0.738887f, 0.739146f, 0.739404f, 0.739662f, 0.739920f, 0.740178f, 0.740436f, 0.740694f,
+ 0.740951f, 0.741209f, 0.741466f, 0.741723f, 0.741980f, 0.742237f, 0.742494f, 0.742751f,
+ 0.743008f, 0.743265f, 0.743521f, 0.743777f, 0.744034f, 0.744290f, 0.744546f, 0.744802f,
+ 0.745058f, 0.745314f, 0.745569f, 0.745825f, 0.746080f, 0.746335f, 0.746591f, 0.746846f,
+ 0.747101f, 0.747355f, 0.747610f, 0.747865f, 0.748119f, 0.748374f, 0.748628f, 0.748882f,
+ 0.749136f, 0.749390f, 0.749644f, 0.749898f, 0.750152f, 0.750405f, 0.750659f, 0.750912f,
+ 0.751165f, 0.751418f, 0.751671f, 0.751924f, 0.752177f, 0.752429f, 0.752682f, 0.752934f,
+ 0.753187f, 0.753439f, 0.753691f, 0.753943f, 0.754195f, 0.754447f, 0.754698f, 0.754950f,
+ 0.755201f, 0.755453f, 0.755704f, 0.755955f, 0.756206f, 0.756457f, 0.756708f, 0.756958f,
+ 0.757209f, 0.757459f, 0.757710f, 0.757960f, 0.758210f, 0.758460f, 0.758710f, 0.758960f,
+ 0.759209f, 0.759459f, 0.759708f, 0.759957f, 0.760207f, 0.760456f, 0.760705f, 0.760954f,
+ 0.761202f, 0.761451f, 0.761700f, 0.761948f, 0.762196f, 0.762444f, 0.762693f, 0.762941f,
+ 0.763188f, 0.763436f, 0.763684f, 0.763931f, 0.764179f, 0.764426f, 0.764673f, 0.764920f,
+ 0.765167f, 0.765414f, 0.765661f, 0.765907f, 0.766154f, 0.766400f, 0.766647f, 0.766893f,
+ 0.767139f, 0.767385f, 0.767631f, 0.767876f, 0.768122f, 0.768368f, 0.768613f, 0.768858f,
+ 0.769103f, 0.769348f, 0.769593f, 0.769838f, 0.770083f, 0.770327f, 0.770572f, 0.770816f,
+ 0.771061f, 0.771305f, 0.771549f, 0.771793f, 0.772036f, 0.772280f, 0.772524f, 0.772767f,
+ 0.773010f, 0.773254f, 0.773497f, 0.773740f, 0.773983f, 0.774225f, 0.774468f, 0.774711f,
+ 0.774953f, 0.775195f, 0.775438f, 0.775680f, 0.775922f, 0.776164f, 0.776405f, 0.776647f,
+ 0.776888f, 0.777130f, 0.777371f, 0.777612f, 0.777853f, 0.778094f, 0.778335f, 0.778576f,
+ 0.778817f, 0.779057f, 0.779297f, 0.779538f, 0.779778f, 0.780018f, 0.780258f, 0.780498f,
+ 0.780737f, 0.780977f, 0.781216f, 0.781456f, 0.781695f, 0.781934f, 0.782173f, 0.782412f,
+ 0.782651f, 0.782889f, 0.783128f, 0.783366f, 0.783605f, 0.783843f, 0.784081f, 0.784319f,
+ 0.784557f, 0.784794f, 0.785032f, 0.785269f, 0.785507f, 0.785744f, 0.785981f, 0.786218f,
+ 0.786455f, 0.786692f, 0.786929f, 0.787165f, 0.787402f, 0.787638f, 0.787874f, 0.788110f,
+ 0.788346f, 0.788582f, 0.788818f, 0.789054f, 0.789289f, 0.789525f, 0.789760f, 0.789995f,
+ 0.790230f, 0.790465f, 0.790700f, 0.790935f, 0.791169f, 0.791404f, 0.791638f, 0.791872f,
+ 0.792107f, 0.792341f, 0.792575f, 0.792808f, 0.793042f, 0.793276f, 0.793509f, 0.793742f,
+ 0.793975f, 0.794209f, 0.794442f, 0.794674f, 0.794907f, 0.795140f, 0.795372f, 0.795605f,
+ 0.795837f, 0.796069f, 0.796301f, 0.796533f, 0.796765f, 0.796996f, 0.797228f, 0.797459f,
+ 0.797691f, 0.797922f, 0.798153f, 0.798384f, 0.798615f, 0.798846f, 0.799076f, 0.799307f,
+ 0.799537f, 0.799768f, 0.799998f, 0.800228f, 0.800458f, 0.800687f, 0.800917f, 0.801147f,
+ 0.801376f, 0.801606f, 0.801835f, 0.802064f, 0.802293f, 0.802522f, 0.802750f, 0.802979f,
+ 0.803208f, 0.803436f, 0.803664f, 0.803892f, 0.804120f, 0.804348f, 0.804576f, 0.804804f,
+ 0.805031f, 0.805259f, 0.805486f, 0.805713f, 0.805940f, 0.806167f, 0.806394f, 0.806621f,
+ 0.806848f, 0.807074f, 0.807300f, 0.807527f, 0.807753f, 0.807979f, 0.808205f, 0.808430f,
+ 0.808656f, 0.808882f, 0.809107f, 0.809332f, 0.809558f, 0.809783f, 0.810008f, 0.810232f,
+ 0.810457f, 0.810682f, 0.810906f, 0.811131f, 0.811355f, 0.811579f, 0.811803f, 0.812027f,
+ 0.812251f, 0.812474f, 0.812698f, 0.812921f, 0.813144f, 0.813368f, 0.813591f, 0.813814f,
+ 0.814036f, 0.814259f, 0.814482f, 0.814704f, 0.814926f, 0.815149f, 0.815371f, 0.815593f,
+ 0.815814f, 0.816036f, 0.816258f, 0.816479f, 0.816701f, 0.816922f, 0.817143f, 0.817364f,
+ 0.817585f, 0.817806f, 0.818026f, 0.818247f, 0.818467f, 0.818687f, 0.818908f, 0.819128f,
+ 0.819348f, 0.819567f, 0.819787f, 0.820007f, 0.820226f, 0.820445f, 0.820664f, 0.820884f,
+ 0.821102f, 0.821321f, 0.821540f, 0.821759f, 0.821977f, 0.822195f, 0.822414f, 0.822632f,
+ 0.822850f, 0.823068f, 0.823285f, 0.823503f, 0.823721f, 0.823938f, 0.824155f, 0.824372f,
+ 0.824589f, 0.824806f, 0.825023f, 0.825240f, 0.825456f, 0.825673f, 0.825889f, 0.826105f,
+ 0.826321f, 0.826537f, 0.826753f, 0.826968f, 0.827184f, 0.827399f, 0.827615f, 0.827830f,
+ 0.828045f, 0.828260f, 0.828475f, 0.828690f, 0.828904f, 0.829119f, 0.829333f, 0.829547f,
+ 0.829761f, 0.829975f, 0.830189f, 0.830403f, 0.830616f, 0.830830f, 0.831043f, 0.831257f,
+ 0.831470f, 0.831683f, 0.831895f, 0.832108f, 0.832321f, 0.832533f, 0.832746f, 0.832958f,
+ 0.833170f, 0.833382f, 0.833594f, 0.833806f, 0.834018f, 0.834229f, 0.834440f, 0.834652f,
+ 0.834863f, 0.835074f, 0.835285f, 0.835496f, 0.835706f, 0.835917f, 0.836127f, 0.836338f,
+ 0.836548f, 0.836758f, 0.836968f, 0.837178f, 0.837387f, 0.837597f, 0.837806f, 0.838015f,
+ 0.838225f, 0.838434f, 0.838643f, 0.838852f, 0.839060f, 0.839269f, 0.839477f, 0.839686f,
+ 0.839894f, 0.840102f, 0.840310f, 0.840518f, 0.840725f, 0.840933f, 0.841140f, 0.841348f,
+ 0.841555f, 0.841762f, 0.841969f, 0.842176f, 0.842383f, 0.842589f, 0.842796f, 0.843002f,
+ 0.843208f, 0.843414f, 0.843620f, 0.843826f, 0.844032f, 0.844238f, 0.844443f, 0.844648f,
+ 0.844854f, 0.845059f, 0.845264f, 0.845469f, 0.845673f, 0.845878f, 0.846082f, 0.846287f,
+ 0.846491f, 0.846695f, 0.846899f, 0.847103f, 0.847307f, 0.847510f, 0.847714f, 0.847917f,
+ 0.848120f, 0.848323f, 0.848526f, 0.848729f, 0.848932f, 0.849135f, 0.849337f, 0.849540f,
+ 0.849742f, 0.849944f, 0.850146f, 0.850348f, 0.850549f, 0.850751f, 0.850953f, 0.851154f,
+ 0.851355f, 0.851556f, 0.851757f, 0.851958f, 0.852159f, 0.852360f, 0.852560f, 0.852760f,
+ 0.852961f, 0.853161f, 0.853361f, 0.853561f, 0.853760f, 0.853960f, 0.854159f, 0.854359f,
+ 0.854558f, 0.854757f, 0.854956f, 0.855155f, 0.855354f, 0.855552f, 0.855751f, 0.855949f,
+ 0.856147f, 0.856345f, 0.856543f, 0.856741f, 0.856939f, 0.857137f, 0.857334f, 0.857531f,
+ 0.857729f, 0.857926f, 0.858123f, 0.858320f, 0.858516f, 0.858713f, 0.858909f, 0.859106f,
+ 0.859302f, 0.859498f, 0.859694f, 0.859890f, 0.860085f, 0.860281f, 0.860476f, 0.860672f,
+ 0.860867f, 0.861062f, 0.861257f, 0.861452f, 0.861646f, 0.861841f, 0.862035f, 0.862230f,
+ 0.862424f, 0.862618f, 0.862812f, 0.863006f, 0.863199f, 0.863393f, 0.863586f, 0.863780f,
+ 0.863973f, 0.864166f, 0.864359f, 0.864552f, 0.864744f, 0.864937f, 0.865129f, 0.865321f,
+ 0.865514f, 0.865706f, 0.865898f, 0.866089f, 0.866281f, 0.866472f, 0.866664f, 0.866855f,
+ 0.867046f, 0.867237f, 0.867428f, 0.867619f, 0.867809f, 0.868000f, 0.868190f, 0.868381f,
+ 0.868571f, 0.868761f, 0.868951f, 0.869140f, 0.869330f, 0.869519f, 0.869709f, 0.869898f,
+ 0.870087f, 0.870276f, 0.870465f, 0.870654f, 0.870842f, 0.871031f, 0.871219f, 0.871407f,
+ 0.871595f, 0.871783f, 0.871971f, 0.872159f, 0.872346f, 0.872534f, 0.872721f, 0.872908f,
+ 0.873095f, 0.873282f, 0.873469f, 0.873655f, 0.873842f, 0.874028f, 0.874215f, 0.874401f,
+ 0.874587f, 0.874773f, 0.874958f, 0.875144f, 0.875329f, 0.875515f, 0.875700f, 0.875885f,
+ 0.876070f, 0.876255f, 0.876440f, 0.876624f, 0.876809f, 0.876993f, 0.877177f, 0.877361f,
+ 0.877545f, 0.877729f, 0.877913f, 0.878096f, 0.878280f, 0.878463f, 0.878646f, 0.878829f,
+ 0.879012f, 0.879195f, 0.879378f, 0.879560f, 0.879743f, 0.879925f, 0.880107f, 0.880289f,
+ 0.880471f, 0.880653f, 0.880834f, 0.881016f, 0.881197f, 0.881378f, 0.881559f, 0.881740f,
+ 0.881921f, 0.882102f, 0.882283f, 0.882463f, 0.882643f, 0.882824f, 0.883004f, 0.883184f,
+ 0.883363f, 0.883543f, 0.883723f, 0.883902f, 0.884081f, 0.884260f, 0.884439f, 0.884618f,
+ 0.884797f, 0.884976f, 0.885154f, 0.885333f, 0.885511f, 0.885689f, 0.885867f, 0.886045f,
+ 0.886223f, 0.886400f, 0.886578f, 0.886755f, 0.886932f, 0.887109f, 0.887286f, 0.887463f,
+ 0.887640f, 0.887816f, 0.887993f, 0.888169f, 0.888345f, 0.888521f, 0.888697f, 0.888873f,
+ 0.889048f, 0.889224f, 0.889399f, 0.889574f, 0.889750f, 0.889925f, 0.890099f, 0.890274f,
+ 0.890449f, 0.890623f, 0.890797f, 0.890972f, 0.891146f, 0.891320f, 0.891493f, 0.891667f,
+ 0.891841f, 0.892014f, 0.892187f, 0.892361f, 0.892534f, 0.892706f, 0.892879f, 0.893052f,
+ 0.893224f, 0.893397f, 0.893569f, 0.893741f, 0.893913f, 0.894085f, 0.894256f, 0.894428f,
+ 0.894599f, 0.894771f, 0.894942f, 0.895113f, 0.895284f, 0.895455f, 0.895625f, 0.895796f,
+ 0.895966f, 0.896137f, 0.896307f, 0.896477f, 0.896646f, 0.896816f, 0.896986f, 0.897155f,
+ 0.897325f, 0.897494f, 0.897663f, 0.897832f, 0.898001f, 0.898169f, 0.898338f, 0.898506f,
+ 0.898674f, 0.898843f, 0.899011f, 0.899179f, 0.899346f, 0.899514f, 0.899681f, 0.899849f,
+ 0.900016f, 0.900183f, 0.900350f, 0.900517f, 0.900683f, 0.900850f, 0.901016f, 0.901183f,
+ 0.901349f, 0.901515f, 0.901681f, 0.901847f, 0.902012f, 0.902178f, 0.902343f, 0.902508f,
+ 0.902673f, 0.902838f, 0.903003f, 0.903168f, 0.903332f, 0.903497f, 0.903661f, 0.903825f,
+ 0.903989f, 0.904153f, 0.904317f, 0.904481f, 0.904644f, 0.904807f, 0.904971f, 0.905134f,
+ 0.905297f, 0.905460f, 0.905622f, 0.905785f, 0.905947f, 0.906110f, 0.906272f, 0.906434f,
+ 0.906596f, 0.906757f, 0.906919f, 0.907081f, 0.907242f, 0.907403f, 0.907564f, 0.907725f,
+ 0.907886f, 0.908047f, 0.908207f, 0.908368f, 0.908528f, 0.908688f, 0.908848f, 0.909008f,
+ 0.909168f, 0.909328f, 0.909487f, 0.909646f, 0.909806f, 0.909965f, 0.910124f, 0.910283f,
+ 0.910441f, 0.910600f, 0.910758f, 0.910917f, 0.911075f, 0.911233f, 0.911391f, 0.911548f,
+ 0.911706f, 0.911864f, 0.912021f, 0.912178f, 0.912335f, 0.912492f, 0.912649f, 0.912806f,
+ 0.912962f, 0.913119f, 0.913275f, 0.913431f, 0.913587f, 0.913743f, 0.913899f, 0.914054f,
+ 0.914210f, 0.914365f, 0.914520f, 0.914675f, 0.914830f, 0.914985f, 0.915140f, 0.915294f,
+ 0.915449f, 0.915603f, 0.915757f, 0.915911f, 0.916065f, 0.916219f, 0.916372f, 0.916526f,
+ 0.916679f, 0.916832f, 0.916985f, 0.917138f, 0.917291f, 0.917444f, 0.917596f, 0.917749f,
+ 0.917901f, 0.918053f, 0.918205f, 0.918357f, 0.918508f, 0.918660f, 0.918811f, 0.918963f,
+ 0.919114f, 0.919265f, 0.919416f, 0.919567f, 0.919717f, 0.919868f, 0.920018f, 0.920168f,
+ 0.920318f, 0.920468f, 0.920618f, 0.920768f, 0.920917f, 0.921067f, 0.921216f, 0.921365f,
+ 0.921514f, 0.921663f, 0.921812f, 0.921960f, 0.922109f, 0.922257f, 0.922405f, 0.922553f,
+ 0.922701f, 0.922849f, 0.922997f, 0.923144f, 0.923291f, 0.923439f, 0.923586f, 0.923733f,
+ 0.923880f, 0.924026f, 0.924173f, 0.924319f, 0.924465f, 0.924612f, 0.924758f, 0.924904f,
+ 0.925049f, 0.925195f, 0.925340f, 0.925486f, 0.925631f, 0.925776f, 0.925921f, 0.926066f,
+ 0.926210f, 0.926355f, 0.926499f, 0.926643f, 0.926787f, 0.926931f, 0.927075f, 0.927219f,
+ 0.927363f, 0.927506f, 0.927649f, 0.927792f, 0.927935f, 0.928078f, 0.928221f, 0.928364f,
+ 0.928506f, 0.928648f, 0.928791f, 0.928933f, 0.929075f, 0.929216f, 0.929358f, 0.929500f,
+ 0.929641f, 0.929782f, 0.929923f, 0.930064f, 0.930205f, 0.930346f, 0.930486f, 0.930627f,
+ 0.930767f, 0.930907f, 0.931047f, 0.931187f, 0.931327f, 0.931466f, 0.931606f, 0.931745f,
+ 0.931884f, 0.932023f, 0.932162f, 0.932301f, 0.932440f, 0.932578f, 0.932716f, 0.932855f,
+ 0.932993f, 0.933131f, 0.933269f, 0.933406f, 0.933544f, 0.933681f, 0.933818f, 0.933956f,
+ 0.934093f, 0.934229f, 0.934366f, 0.934503f, 0.934639f, 0.934775f, 0.934912f, 0.935048f,
+ 0.935184f, 0.935319f, 0.935455f, 0.935590f, 0.935726f, 0.935861f, 0.935996f, 0.936131f,
+ 0.936266f, 0.936400f, 0.936535f, 0.936669f, 0.936803f, 0.936938f, 0.937072f, 0.937205f,
+ 0.937339f, 0.937473f, 0.937606f, 0.937739f, 0.937872f, 0.938005f, 0.938138f, 0.938271f,
+ 0.938404f, 0.938536f, 0.938668f, 0.938800f, 0.938932f, 0.939064f, 0.939196f, 0.939328f,
+ 0.939459f, 0.939591f, 0.939722f, 0.939853f, 0.939984f, 0.940115f, 0.940245f, 0.940376f,
+ 0.940506f, 0.940636f, 0.940766f, 0.940896f, 0.941026f, 0.941156f, 0.941285f, 0.941415f,
+ 0.941544f, 0.941673f, 0.941802f, 0.941931f, 0.942060f, 0.942188f, 0.942317f, 0.942445f,
+ 0.942573f, 0.942701f, 0.942829f, 0.942957f, 0.943084f, 0.943212f, 0.943339f, 0.943466f,
+ 0.943593f, 0.943720f, 0.943847f, 0.943974f, 0.944100f, 0.944227f, 0.944353f, 0.944479f,
+ 0.944605f, 0.944731f, 0.944856f, 0.944982f, 0.945107f, 0.945232f, 0.945358f, 0.945482f,
+ 0.945607f, 0.945732f, 0.945857f, 0.945981f, 0.946105f, 0.946229f, 0.946353f, 0.946477f,
+ 0.946601f, 0.946724f, 0.946848f, 0.946971f, 0.947094f, 0.947217f, 0.947340f, 0.947463f,
+ 0.947586f, 0.947708f, 0.947830f, 0.947953f, 0.948075f, 0.948196f, 0.948318f, 0.948440f,
+ 0.948561f, 0.948683f, 0.948804f, 0.948925f, 0.949046f, 0.949167f, 0.949287f, 0.949408f,
+ 0.949528f, 0.949648f, 0.949768f, 0.949888f, 0.950008f, 0.950128f, 0.950247f, 0.950367f,
+ 0.950486f, 0.950605f, 0.950724f, 0.950843f, 0.950962f, 0.951080f, 0.951199f, 0.951317f,
+ 0.951435f, 0.951553f, 0.951671f, 0.951789f, 0.951906f, 0.952024f, 0.952141f, 0.952258f,
+ 0.952375f, 0.952492f, 0.952609f, 0.952725f, 0.952842f, 0.952958f, 0.953074f, 0.953190f,
+ 0.953306f, 0.953422f, 0.953537f, 0.953653f, 0.953768f, 0.953883f, 0.953998f, 0.954113f,
+ 0.954228f, 0.954343f, 0.954457f, 0.954572f, 0.954686f, 0.954800f, 0.954914f, 0.955028f,
+ 0.955141f, 0.955255f, 0.955368f, 0.955481f, 0.955594f, 0.955707f, 0.955820f, 0.955933f,
+ 0.956045f, 0.956158f, 0.956270f, 0.956382f, 0.956494f, 0.956606f, 0.956717f, 0.956829f,
+ 0.956940f, 0.957052f, 0.957163f, 0.957274f, 0.957385f, 0.957495f, 0.957606f, 0.957716f,
+ 0.957826f, 0.957937f, 0.958046f, 0.958156f, 0.958266f, 0.958376f, 0.958485f, 0.958594f,
+ 0.958703f, 0.958812f, 0.958921f, 0.959030f, 0.959139f, 0.959247f, 0.959355f, 0.959463f,
+ 0.959572f, 0.959679f, 0.959787f, 0.959895f, 0.960002f, 0.960109f, 0.960217f, 0.960324f,
+ 0.960431f, 0.960537f, 0.960644f, 0.960750f, 0.960857f, 0.960963f, 0.961069f, 0.961175f,
+ 0.961280f, 0.961386f, 0.961492f, 0.961597f, 0.961702f, 0.961807f, 0.961912f, 0.962017f,
+ 0.962121f, 0.962226f, 0.962330f, 0.962434f, 0.962538f, 0.962642f, 0.962746f, 0.962850f,
+ 0.962953f, 0.963057f, 0.963160f, 0.963263f, 0.963366f, 0.963469f, 0.963571f, 0.963674f,
+ 0.963776f, 0.963878f, 0.963980f, 0.964082f, 0.964184f, 0.964286f, 0.964387f, 0.964489f,
+ 0.964590f, 0.964691f, 0.964792f, 0.964893f, 0.964993f, 0.965094f, 0.965194f, 0.965294f,
+ 0.965394f, 0.965494f, 0.965594f, 0.965694f, 0.965793f, 0.965893f, 0.965992f, 0.966091f,
+ 0.966190f, 0.966289f, 0.966387f, 0.966486f, 0.966584f, 0.966683f, 0.966781f, 0.966879f,
+ 0.966976f, 0.967074f, 0.967172f, 0.967269f, 0.967366f, 0.967463f, 0.967560f, 0.967657f,
+ 0.967754f, 0.967850f, 0.967947f, 0.968043f, 0.968139f, 0.968235f, 0.968331f, 0.968427f,
+ 0.968522f, 0.968617f, 0.968713f, 0.968808f, 0.968903f, 0.968998f, 0.969092f, 0.969187f,
+ 0.969281f, 0.969375f, 0.969470f, 0.969564f, 0.969657f, 0.969751f, 0.969845f, 0.969938f,
+ 0.970031f, 0.970124f, 0.970217f, 0.970310f, 0.970403f, 0.970495f, 0.970588f, 0.970680f,
+ 0.970772f, 0.970864f, 0.970956f, 0.971048f, 0.971139f, 0.971231f, 0.971322f, 0.971413f,
+ 0.971504f, 0.971595f, 0.971685f, 0.971776f, 0.971866f, 0.971957f, 0.972047f, 0.972137f,
+ 0.972227f, 0.972316f, 0.972406f, 0.972495f, 0.972584f, 0.972673f, 0.972762f, 0.972851f,
+ 0.972940f, 0.973028f, 0.973117f, 0.973205f, 0.973293f, 0.973381f, 0.973469f, 0.973557f,
+ 0.973644f, 0.973732f, 0.973819f, 0.973906f, 0.973993f, 0.974080f, 0.974166f, 0.974253f,
+ 0.974339f, 0.974426f, 0.974512f, 0.974598f, 0.974684f, 0.974769f, 0.974855f, 0.974940f,
+ 0.975025f, 0.975110f, 0.975195f, 0.975280f, 0.975365f, 0.975449f, 0.975534f, 0.975618f,
+ 0.975702f, 0.975786f, 0.975870f, 0.975954f, 0.976037f, 0.976120f, 0.976204f, 0.976287f,
+ 0.976370f, 0.976453f, 0.976535f, 0.976618f, 0.976700f, 0.976782f, 0.976864f, 0.976946f,
+ 0.977028f, 0.977110f, 0.977191f, 0.977273f, 0.977354f, 0.977435f, 0.977516f, 0.977597f,
+ 0.977677f, 0.977758f, 0.977838f, 0.977918f, 0.977998f, 0.978078f, 0.978158f, 0.978238f,
+ 0.978317f, 0.978397f, 0.978476f, 0.978555f, 0.978634f, 0.978713f, 0.978791f, 0.978870f,
+ 0.978948f, 0.979026f, 0.979104f, 0.979182f, 0.979260f, 0.979338f, 0.979415f, 0.979493f,
+ 0.979570f, 0.979647f, 0.979724f, 0.979800f, 0.979877f, 0.979954f, 0.980030f, 0.980106f,
+ 0.980182f, 0.980258f, 0.980334f, 0.980409f, 0.980485f, 0.980560f, 0.980635f, 0.980710f,
+ 0.980785f, 0.980860f, 0.980935f, 0.981009f, 0.981083f, 0.981158f, 0.981232f, 0.981305f,
+ 0.981379f, 0.981453f, 0.981526f, 0.981600f, 0.981673f, 0.981746f, 0.981819f, 0.981891f,
+ 0.981964f, 0.982036f, 0.982109f, 0.982181f, 0.982253f, 0.982325f, 0.982396f, 0.982468f,
+ 0.982539f, 0.982611f, 0.982682f, 0.982753f, 0.982824f, 0.982894f, 0.982965f, 0.983035f,
+ 0.983105f, 0.983176f, 0.983246f, 0.983315f, 0.983385f, 0.983455f, 0.983524f, 0.983593f,
+ 0.983662f, 0.983731f, 0.983800f, 0.983869f, 0.983937f, 0.984006f, 0.984074f, 0.984142f,
+ 0.984210f, 0.984278f, 0.984346f, 0.984413f, 0.984480f, 0.984548f, 0.984615f, 0.984682f,
+ 0.984748f, 0.984815f, 0.984882f, 0.984948f, 0.985014f, 0.985080f, 0.985146f, 0.985212f,
+ 0.985278f, 0.985343f, 0.985408f, 0.985474f, 0.985539f, 0.985604f, 0.985668f, 0.985733f,
+ 0.985798f, 0.985862f, 0.985926f, 0.985990f, 0.986054f, 0.986118f, 0.986181f, 0.986245f,
+ 0.986308f, 0.986371f, 0.986434f, 0.986497f, 0.986560f, 0.986623f, 0.986685f, 0.986747f,
+ 0.986809f, 0.986871f, 0.986933f, 0.986995f, 0.987057f, 0.987118f, 0.987179f, 0.987240f,
+ 0.987301f, 0.987362f, 0.987423f, 0.987484f, 0.987544f, 0.987604f, 0.987664f, 0.987724f,
+ 0.987784f, 0.987844f, 0.987903f, 0.987963f, 0.988022f, 0.988081f, 0.988140f, 0.988199f,
+ 0.988258f, 0.988316f, 0.988374f, 0.988433f, 0.988491f, 0.988549f, 0.988607f, 0.988664f,
+ 0.988722f, 0.988779f, 0.988836f, 0.988893f, 0.988950f, 0.989007f, 0.989064f, 0.989120f,
+ 0.989177f, 0.989233f, 0.989289f, 0.989345f, 0.989400f, 0.989456f, 0.989511f, 0.989567f,
+ 0.989622f, 0.989677f, 0.989732f, 0.989787f, 0.989841f, 0.989896f, 0.989950f, 0.990004f,
+ 0.990058f, 0.990112f, 0.990166f, 0.990219f, 0.990273f, 0.990326f, 0.990379f, 0.990432f,
+ 0.990485f, 0.990538f, 0.990590f, 0.990643f, 0.990695f, 0.990747f, 0.990799f, 0.990851f,
+ 0.990903f, 0.990954f, 0.991006f, 0.991057f, 0.991108f, 0.991159f, 0.991210f, 0.991260f,
+ 0.991311f, 0.991361f, 0.991411f, 0.991462f, 0.991511f, 0.991561f, 0.991611f, 0.991660f,
+ 0.991710f, 0.991759f, 0.991808f, 0.991857f, 0.991906f, 0.991954f, 0.992003f, 0.992051f,
+ 0.992099f, 0.992147f, 0.992195f, 0.992243f, 0.992291f, 0.992338f, 0.992385f, 0.992433f,
+ 0.992480f, 0.992526f, 0.992573f, 0.992620f, 0.992666f, 0.992712f, 0.992759f, 0.992805f,
+ 0.992850f, 0.992896f, 0.992942f, 0.992987f, 0.993032f, 0.993077f, 0.993122f, 0.993167f,
+ 0.993212f, 0.993257f, 0.993301f, 0.993345f, 0.993389f, 0.993433f, 0.993477f, 0.993521f,
+ 0.993564f, 0.993608f, 0.993651f, 0.993694f, 0.993737f, 0.993779f, 0.993822f, 0.993865f,
+ 0.993907f, 0.993949f, 0.993991f, 0.994033f, 0.994075f, 0.994116f, 0.994158f, 0.994199f,
+ 0.994240f, 0.994281f, 0.994322f, 0.994363f, 0.994404f, 0.994444f, 0.994484f, 0.994525f,
+ 0.994565f, 0.994604f, 0.994644f, 0.994684f, 0.994723f, 0.994762f, 0.994802f, 0.994841f,
+ 0.994879f, 0.994918f, 0.994957f, 0.994995f, 0.995033f, 0.995071f, 0.995109f, 0.995147f,
+ 0.995185f, 0.995222f, 0.995260f, 0.995297f, 0.995334f, 0.995371f, 0.995408f, 0.995444f,
+ 0.995481f, 0.995517f, 0.995553f, 0.995589f, 0.995625f, 0.995661f, 0.995697f, 0.995732f,
+ 0.995767f, 0.995803f, 0.995838f, 0.995872f, 0.995907f, 0.995942f, 0.995976f, 0.996011f,
+ 0.996045f, 0.996079f, 0.996113f, 0.996146f, 0.996180f, 0.996213f, 0.996247f, 0.996280f,
+ 0.996313f, 0.996345f, 0.996378f, 0.996411f, 0.996443f, 0.996475f, 0.996507f, 0.996539f,
+ 0.996571f, 0.996603f, 0.996634f, 0.996666f, 0.996697f, 0.996728f, 0.996759f, 0.996790f,
+ 0.996820f, 0.996851f, 0.996881f, 0.996911f, 0.996941f, 0.996971f, 0.997001f, 0.997031f,
+ 0.997060f, 0.997089f, 0.997119f, 0.997148f, 0.997176f, 0.997205f, 0.997234f, 0.997262f,
+ 0.997290f, 0.997319f, 0.997347f, 0.997374f, 0.997402f, 0.997430f, 0.997457f, 0.997484f,
+ 0.997511f, 0.997538f, 0.997565f, 0.997592f, 0.997618f, 0.997645f, 0.997671f, 0.997697f,
+ 0.997723f, 0.997749f, 0.997774f, 0.997800f, 0.997825f, 0.997851f, 0.997876f, 0.997901f,
+ 0.997925f, 0.997950f, 0.997974f, 0.997999f, 0.998023f, 0.998047f, 0.998071f, 0.998094f,
+ 0.998118f, 0.998142f, 0.998165f, 0.998188f, 0.998211f, 0.998234f, 0.998257f, 0.998279f,
+ 0.998302f, 0.998324f, 0.998346f, 0.998368f, 0.998390f, 0.998411f, 0.998433f, 0.998454f,
+ 0.998476f, 0.998497f, 0.998518f, 0.998538f, 0.998559f, 0.998580f, 0.998600f, 0.998620f,
+ 0.998640f, 0.998660f, 0.998680f, 0.998700f, 0.998719f, 0.998738f, 0.998758f, 0.998777f,
+ 0.998795f, 0.998814f, 0.998833f, 0.998851f, 0.998870f, 0.998888f, 0.998906f, 0.998924f,
+ 0.998941f, 0.998959f, 0.998976f, 0.998994f, 0.999011f, 0.999028f, 0.999044f, 0.999061f,
+ 0.999078f, 0.999094f, 0.999110f, 0.999126f, 0.999142f, 0.999158f, 0.999174f, 0.999189f,
+ 0.999205f, 0.999220f, 0.999235f, 0.999250f, 0.999265f, 0.999279f, 0.999294f, 0.999308f,
+ 0.999322f, 0.999336f, 0.999350f, 0.999364f, 0.999378f, 0.999391f, 0.999404f, 0.999418f,
+ 0.999431f, 0.999443f, 0.999456f, 0.999469f, 0.999481f, 0.999493f, 0.999506f, 0.999518f,
+ 0.999529f, 0.999541f, 0.999553f, 0.999564f, 0.999575f, 0.999586f, 0.999597f, 0.999608f,
+ 0.999619f, 0.999629f, 0.999640f, 0.999650f, 0.999660f, 0.999670f, 0.999680f, 0.999689f,
+ 0.999699f, 0.999708f, 0.999717f, 0.999726f, 0.999735f, 0.999744f, 0.999753f, 0.999761f,
+ 0.999769f, 0.999778f, 0.999786f, 0.999793f, 0.999801f, 0.999809f, 0.999816f, 0.999823f,
+ 0.999831f, 0.999838f, 0.999844f, 0.999851f, 0.999858f, 0.999864f, 0.999870f, 0.999876f,
+ 0.999882f, 0.999888f, 0.999894f, 0.999899f, 0.999905f, 0.999910f, 0.999915f, 0.999920f,
+ 0.999925f, 0.999929f, 0.999934f, 0.999938f, 0.999942f, 0.999946f, 0.999950f, 0.999954f,
+ 0.999958f, 0.999961f, 0.999964f, 0.999968f, 0.999971f, 0.999973f, 0.999976f, 0.999979f,
+ 0.999981f, 0.999983f, 0.999986f, 0.999988f, 0.999989f, 0.999991f, 0.999993f, 0.999994f,
+ 0.999995f, 0.999996f, 0.999997f, 0.999998f, 0.999999f, 0.999999f, 1.000000f, 1.000000
+};
+
+static const float cosTable32768[16384] = {
+ 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 0.999999f, 0.999999f,
+ 0.999999f, 0.999999f, 0.999998f, 0.999998f, 0.999997f, 0.999997f, 0.999996f, 0.999996f,
+ 0.999995f, 0.999995f, 0.999994f, 0.999993f, 0.999993f, 0.999992f, 0.999991f, 0.999990f,
+ 0.999989f, 0.999988f, 0.999988f, 0.999987f, 0.999986f, 0.999985f, 0.999983f, 0.999982f,
+ 0.999981f, 0.999980f, 0.999979f, 0.999977f, 0.999976f, 0.999975f, 0.999973f, 0.999972f,
+ 0.999971f, 0.999969f, 0.999968f, 0.999966f, 0.999964f, 0.999963f, 0.999961f, 0.999959f,
+ 0.999958f, 0.999956f, 0.999954f, 0.999952f, 0.999950f, 0.999948f, 0.999946f, 0.999944f,
+ 0.999942f, 0.999940f, 0.999938f, 0.999936f, 0.999934f, 0.999932f, 0.999929f, 0.999927f,
+ 0.999925f, 0.999922f, 0.999920f, 0.999917f, 0.999915f, 0.999913f, 0.999910f, 0.999907f,
+ 0.999905f, 0.999902f, 0.999899f, 0.999897f, 0.999894f, 0.999891f, 0.999888f, 0.999885f,
+ 0.999882f, 0.999879f, 0.999876f, 0.999873f, 0.999870f, 0.999867f, 0.999864f, 0.999861f,
+ 0.999858f, 0.999854f, 0.999851f, 0.999848f, 0.999844f, 0.999841f, 0.999838f, 0.999834f,
+ 0.999831f, 0.999827f, 0.999823f, 0.999820f, 0.999816f, 0.999812f, 0.999809f, 0.999805f,
+ 0.999801f, 0.999797f, 0.999793f, 0.999790f, 0.999786f, 0.999782f, 0.999778f, 0.999774f,
+ 0.999769f, 0.999765f, 0.999761f, 0.999757f, 0.999753f, 0.999748f, 0.999744f, 0.999740f,
+ 0.999735f, 0.999731f, 0.999726f, 0.999722f, 0.999717f, 0.999713f, 0.999708f, 0.999704f,
+ 0.999699f, 0.999694f, 0.999689f, 0.999685f, 0.999680f, 0.999675f, 0.999670f, 0.999665f,
+ 0.999660f, 0.999655f, 0.999650f, 0.999645f, 0.999640f, 0.999635f, 0.999629f, 0.999624f,
+ 0.999619f, 0.999614f, 0.999608f, 0.999603f, 0.999597f, 0.999592f, 0.999586f, 0.999581f,
+ 0.999575f, 0.999570f, 0.999564f, 0.999558f, 0.999553f, 0.999547f, 0.999541f, 0.999535f,
+ 0.999529f, 0.999524f, 0.999518f, 0.999512f, 0.999506f, 0.999500f, 0.999493f, 0.999487f,
+ 0.999481f, 0.999475f, 0.999469f, 0.999462f, 0.999456f, 0.999450f, 0.999443f, 0.999437f,
+ 0.999431f, 0.999424f, 0.999418f, 0.999411f, 0.999404f, 0.999398f, 0.999391f, 0.999384f,
+ 0.999378f, 0.999371f, 0.999364f, 0.999357f, 0.999350f, 0.999343f, 0.999336f, 0.999329f,
+ 0.999322f, 0.999315f, 0.999308f, 0.999301f, 0.999294f, 0.999287f, 0.999279f, 0.999272f,
+ 0.999265f, 0.999257f, 0.999250f, 0.999243f, 0.999235f, 0.999228f, 0.999220f, 0.999212f,
+ 0.999205f, 0.999197f, 0.999189f, 0.999182f, 0.999174f, 0.999166f, 0.999158f, 0.999150f,
+ 0.999142f, 0.999134f, 0.999126f, 0.999118f, 0.999110f, 0.999102f, 0.999094f, 0.999086f,
+ 0.999078f, 0.999069f, 0.999061f, 0.999053f, 0.999044f, 0.999036f, 0.999028f, 0.999019f,
+ 0.999011f, 0.999002f, 0.998994f, 0.998985f, 0.998976f, 0.998968f, 0.998959f, 0.998950f,
+ 0.998941f, 0.998932f, 0.998924f, 0.998915f, 0.998906f, 0.998897f, 0.998888f, 0.998879f,
+ 0.998870f, 0.998860f, 0.998851f, 0.998842f, 0.998833f, 0.998824f, 0.998814f, 0.998805f,
+ 0.998795f, 0.998786f, 0.998777f, 0.998767f, 0.998758f, 0.998748f, 0.998738f, 0.998729f,
+ 0.998719f, 0.998709f, 0.998700f, 0.998690f, 0.998680f, 0.998670f, 0.998660f, 0.998650f,
+ 0.998640f, 0.998630f, 0.998620f, 0.998610f, 0.998600f, 0.998590f, 0.998580f, 0.998569f,
+ 0.998559f, 0.998549f, 0.998538f, 0.998528f, 0.998518f, 0.998507f, 0.998497f, 0.998486f,
+ 0.998476f, 0.998465f, 0.998454f, 0.998444f, 0.998433f, 0.998422f, 0.998411f, 0.998401f,
+ 0.998390f, 0.998379f, 0.998368f, 0.998357f, 0.998346f, 0.998335f, 0.998324f, 0.998313f,
+ 0.998302f, 0.998290f, 0.998279f, 0.998268f, 0.998257f, 0.998245f, 0.998234f, 0.998222f,
+ 0.998211f, 0.998200f, 0.998188f, 0.998176f, 0.998165f, 0.998153f, 0.998142f, 0.998130f,
+ 0.998118f, 0.998106f, 0.998094f, 0.998083f, 0.998071f, 0.998059f, 0.998047f, 0.998035f,
+ 0.998023f, 0.998011f, 0.997999f, 0.997987f, 0.997974f, 0.997962f, 0.997950f, 0.997938f,
+ 0.997925f, 0.997913f, 0.997901f, 0.997888f, 0.997876f, 0.997863f, 0.997851f, 0.997838f,
+ 0.997825f, 0.997813f, 0.997800f, 0.997787f, 0.997774f, 0.997762f, 0.997749f, 0.997736f,
+ 0.997723f, 0.997710f, 0.997697f, 0.997684f, 0.997671f, 0.997658f, 0.997645f, 0.997632f,
+ 0.997618f, 0.997605f, 0.997592f, 0.997579f, 0.997565f, 0.997552f, 0.997538f, 0.997525f,
+ 0.997511f, 0.997498f, 0.997484f, 0.997471f, 0.997457f, 0.997443f, 0.997430f, 0.997416f,
+ 0.997402f, 0.997388f, 0.997374f, 0.997361f, 0.997347f, 0.997333f, 0.997319f, 0.997305f,
+ 0.997290f, 0.997276f, 0.997262f, 0.997248f, 0.997234f, 0.997219f, 0.997205f, 0.997191f,
+ 0.997176f, 0.997162f, 0.997148f, 0.997133f, 0.997119f, 0.997104f, 0.997089f, 0.997075f,
+ 0.997060f, 0.997045f, 0.997031f, 0.997016f, 0.997001f, 0.996986f, 0.996971f, 0.996956f,
+ 0.996941f, 0.996926f, 0.996911f, 0.996896f, 0.996881f, 0.996866f, 0.996851f, 0.996836f,
+ 0.996820f, 0.996805f, 0.996790f, 0.996774f, 0.996759f, 0.996743f, 0.996728f, 0.996712f,
+ 0.996697f, 0.996681f, 0.996666f, 0.996650f, 0.996634f, 0.996619f, 0.996603f, 0.996587f,
+ 0.996571f, 0.996555f, 0.996539f, 0.996523f, 0.996507f, 0.996491f, 0.996475f, 0.996459f,
+ 0.996443f, 0.996427f, 0.996411f, 0.996394f, 0.996378f, 0.996362f, 0.996345f, 0.996329f,
+ 0.996313f, 0.996296f, 0.996280f, 0.996263f, 0.996247f, 0.996230f, 0.996213f, 0.996197f,
+ 0.996180f, 0.996163f, 0.996146f, 0.996129f, 0.996113f, 0.996096f, 0.996079f, 0.996062f,
+ 0.996045f, 0.996028f, 0.996011f, 0.995993f, 0.995976f, 0.995959f, 0.995942f, 0.995925f,
+ 0.995907f, 0.995890f, 0.995872f, 0.995855f, 0.995838f, 0.995820f, 0.995803f, 0.995785f,
+ 0.995767f, 0.995750f, 0.995732f, 0.995714f, 0.995697f, 0.995679f, 0.995661f, 0.995643f,
+ 0.995625f, 0.995607f, 0.995589f, 0.995571f, 0.995553f, 0.995535f, 0.995517f, 0.995499f,
+ 0.995481f, 0.995463f, 0.995444f, 0.995426f, 0.995408f, 0.995389f, 0.995371f, 0.995352f,
+ 0.995334f, 0.995315f, 0.995297f, 0.995278f, 0.995260f, 0.995241f, 0.995222f, 0.995203f,
+ 0.995185f, 0.995166f, 0.995147f, 0.995128f, 0.995109f, 0.995090f, 0.995071f, 0.995052f,
+ 0.995033f, 0.995014f, 0.994995f, 0.994976f, 0.994957f, 0.994937f, 0.994918f, 0.994899f,
+ 0.994879f, 0.994860f, 0.994841f, 0.994821f, 0.994802f, 0.994782f, 0.994762f, 0.994743f,
+ 0.994723f, 0.994703f, 0.994684f, 0.994664f, 0.994644f, 0.994624f, 0.994604f, 0.994585f,
+ 0.994565f, 0.994545f, 0.994525f, 0.994505f, 0.994484f, 0.994464f, 0.994444f, 0.994424f,
+ 0.994404f, 0.994383f, 0.994363f, 0.994343f, 0.994322f, 0.994302f, 0.994281f, 0.994261f,
+ 0.994240f, 0.994220f, 0.994199f, 0.994179f, 0.994158f, 0.994137f, 0.994116f, 0.994096f,
+ 0.994075f, 0.994054f, 0.994033f, 0.994012f, 0.993991f, 0.993970f, 0.993949f, 0.993928f,
+ 0.993907f, 0.993886f, 0.993865f, 0.993843f, 0.993822f, 0.993801f, 0.993779f, 0.993758f,
+ 0.993737f, 0.993715f, 0.993694f, 0.993672f, 0.993651f, 0.993629f, 0.993608f, 0.993586f,
+ 0.993564f, 0.993542f, 0.993521f, 0.993499f, 0.993477f, 0.993455f, 0.993433f, 0.993411f,
+ 0.993389f, 0.993367f, 0.993345f, 0.993323f, 0.993301f, 0.993279f, 0.993257f, 0.993234f,
+ 0.993212f, 0.993190f, 0.993167f, 0.993145f, 0.993122f, 0.993100f, 0.993077f, 0.993055f,
+ 0.993032f, 0.993010f, 0.992987f, 0.992964f, 0.992942f, 0.992919f, 0.992896f, 0.992873f,
+ 0.992850f, 0.992828f, 0.992805f, 0.992782f, 0.992759f, 0.992736f, 0.992712f, 0.992689f,
+ 0.992666f, 0.992643f, 0.992620f, 0.992596f, 0.992573f, 0.992550f, 0.992526f, 0.992503f,
+ 0.992480f, 0.992456f, 0.992433f, 0.992409f, 0.992385f, 0.992362f, 0.992338f, 0.992314f,
+ 0.992291f, 0.992267f, 0.992243f, 0.992219f, 0.992195f, 0.992171f, 0.992147f, 0.992123f,
+ 0.992099f, 0.992075f, 0.992051f, 0.992027f, 0.992003f, 0.991979f, 0.991954f, 0.991930f,
+ 0.991906f, 0.991881f, 0.991857f, 0.991832f, 0.991808f, 0.991783f, 0.991759f, 0.991734f,
+ 0.991710f, 0.991685f, 0.991660f, 0.991636f, 0.991611f, 0.991586f, 0.991561f, 0.991536f,
+ 0.991511f, 0.991487f, 0.991462f, 0.991437f, 0.991411f, 0.991386f, 0.991361f, 0.991336f,
+ 0.991311f, 0.991286f, 0.991260f, 0.991235f, 0.991210f, 0.991184f, 0.991159f, 0.991133f,
+ 0.991108f, 0.991082f, 0.991057f, 0.991031f, 0.991006f, 0.990980f, 0.990954f, 0.990928f,
+ 0.990903f, 0.990877f, 0.990851f, 0.990825f, 0.990799f, 0.990773f, 0.990747f, 0.990721f,
+ 0.990695f, 0.990669f, 0.990643f, 0.990617f, 0.990590f, 0.990564f, 0.990538f, 0.990511f,
+ 0.990485f, 0.990459f, 0.990432f, 0.990406f, 0.990379f, 0.990353f, 0.990326f, 0.990299f,
+ 0.990273f, 0.990246f, 0.990219f, 0.990193f, 0.990166f, 0.990139f, 0.990112f, 0.990085f,
+ 0.990058f, 0.990031f, 0.990004f, 0.989977f, 0.989950f, 0.989923f, 0.989896f, 0.989869f,
+ 0.989841f, 0.989814f, 0.989787f, 0.989759f, 0.989732f, 0.989704f, 0.989677f, 0.989650f,
+ 0.989622f, 0.989594f, 0.989567f, 0.989539f, 0.989511f, 0.989484f, 0.989456f, 0.989428f,
+ 0.989400f, 0.989373f, 0.989345f, 0.989317f, 0.989289f, 0.989261f, 0.989233f, 0.989205f,
+ 0.989177f, 0.989148f, 0.989120f, 0.989092f, 0.989064f, 0.989035f, 0.989007f, 0.988979f,
+ 0.988950f, 0.988922f, 0.988893f, 0.988865f, 0.988836f, 0.988808f, 0.988779f, 0.988750f,
+ 0.988722f, 0.988693f, 0.988664f, 0.988635f, 0.988607f, 0.988578f, 0.988549f, 0.988520f,
+ 0.988491f, 0.988462f, 0.988433f, 0.988404f, 0.988374f, 0.988345f, 0.988316f, 0.988287f,
+ 0.988258f, 0.988228f, 0.988199f, 0.988169f, 0.988140f, 0.988111f, 0.988081f, 0.988052f,
+ 0.988022f, 0.987992f, 0.987963f, 0.987933f, 0.987903f, 0.987874f, 0.987844f, 0.987814f,
+ 0.987784f, 0.987754f, 0.987724f, 0.987694f, 0.987664f, 0.987634f, 0.987604f, 0.987574f,
+ 0.987544f, 0.987514f, 0.987484f, 0.987453f, 0.987423f, 0.987393f, 0.987362f, 0.987332f,
+ 0.987301f, 0.987271f, 0.987240f, 0.987210f, 0.987179f, 0.987149f, 0.987118f, 0.987087f,
+ 0.987057f, 0.987026f, 0.986995f, 0.986964f, 0.986933f, 0.986902f, 0.986871f, 0.986840f,
+ 0.986809f, 0.986778f, 0.986747f, 0.986716f, 0.986685f, 0.986654f, 0.986623f, 0.986591f,
+ 0.986560f, 0.986529f, 0.986497f, 0.986466f, 0.986434f, 0.986403f, 0.986371f, 0.986340f,
+ 0.986308f, 0.986276f, 0.986245f, 0.986213f, 0.986181f, 0.986150f, 0.986118f, 0.986086f,
+ 0.986054f, 0.986022f, 0.985990f, 0.985958f, 0.985926f, 0.985894f, 0.985862f, 0.985830f,
+ 0.985798f, 0.985765f, 0.985733f, 0.985701f, 0.985668f, 0.985636f, 0.985604f, 0.985571f,
+ 0.985539f, 0.985506f, 0.985474f, 0.985441f, 0.985408f, 0.985376f, 0.985343f, 0.985310f,
+ 0.985278f, 0.985245f, 0.985212f, 0.985179f, 0.985146f, 0.985113f, 0.985080f, 0.985047f,
+ 0.985014f, 0.984981f, 0.984948f, 0.984915f, 0.984882f, 0.984848f, 0.984815f, 0.984782f,
+ 0.984748f, 0.984715f, 0.984682f, 0.984648f, 0.984615f, 0.984581f, 0.984548f, 0.984514f,
+ 0.984480f, 0.984447f, 0.984413f, 0.984379f, 0.984346f, 0.984312f, 0.984278f, 0.984244f,
+ 0.984210f, 0.984176f, 0.984142f, 0.984108f, 0.984074f, 0.984040f, 0.984006f, 0.983972f,
+ 0.983937f, 0.983903f, 0.983869f, 0.983835f, 0.983800f, 0.983766f, 0.983731f, 0.983697f,
+ 0.983662f, 0.983628f, 0.983593f, 0.983559f, 0.983524f, 0.983489f, 0.983455f, 0.983420f,
+ 0.983385f, 0.983350f, 0.983315f, 0.983281f, 0.983246f, 0.983211f, 0.983176f, 0.983141f,
+ 0.983105f, 0.983070f, 0.983035f, 0.983000f, 0.982965f, 0.982930f, 0.982894f, 0.982859f,
+ 0.982824f, 0.982788f, 0.982753f, 0.982717f, 0.982682f, 0.982646f, 0.982611f, 0.982575f,
+ 0.982539f, 0.982504f, 0.982468f, 0.982432f, 0.982396f, 0.982360f, 0.982325f, 0.982289f,
+ 0.982253f, 0.982217f, 0.982181f, 0.982145f, 0.982109f, 0.982072f, 0.982036f, 0.982000f,
+ 0.981964f, 0.981928f, 0.981891f, 0.981855f, 0.981819f, 0.981782f, 0.981746f, 0.981709f,
+ 0.981673f, 0.981636f, 0.981600f, 0.981563f, 0.981526f, 0.981490f, 0.981453f, 0.981416f,
+ 0.981379f, 0.981342f, 0.981305f, 0.981269f, 0.981232f, 0.981195f, 0.981158f, 0.981120f,
+ 0.981083f, 0.981046f, 0.981009f, 0.980972f, 0.980935f, 0.980897f, 0.980860f, 0.980823f,
+ 0.980785f, 0.980748f, 0.980710f, 0.980673f, 0.980635f, 0.980598f, 0.980560f, 0.980523f,
+ 0.980485f, 0.980447f, 0.980409f, 0.980372f, 0.980334f, 0.980296f, 0.980258f, 0.980220f,
+ 0.980182f, 0.980144f, 0.980106f, 0.980068f, 0.980030f, 0.979992f, 0.979954f, 0.979915f,
+ 0.979877f, 0.979839f, 0.979800f, 0.979762f, 0.979724f, 0.979685f, 0.979647f, 0.979608f,
+ 0.979570f, 0.979531f, 0.979493f, 0.979454f, 0.979415f, 0.979376f, 0.979338f, 0.979299f,
+ 0.979260f, 0.979221f, 0.979182f, 0.979143f, 0.979104f, 0.979065f, 0.979026f, 0.978987f,
+ 0.978948f, 0.978909f, 0.978870f, 0.978831f, 0.978791f, 0.978752f, 0.978713f, 0.978673f,
+ 0.978634f, 0.978594f, 0.978555f, 0.978516f, 0.978476f, 0.978436f, 0.978397f, 0.978357f,
+ 0.978317f, 0.978278f, 0.978238f, 0.978198f, 0.978158f, 0.978118f, 0.978078f, 0.978038f,
+ 0.977998f, 0.977959f, 0.977918f, 0.977878f, 0.977838f, 0.977798f, 0.977758f, 0.977718f,
+ 0.977677f, 0.977637f, 0.977597f, 0.977556f, 0.977516f, 0.977475f, 0.977435f, 0.977394f,
+ 0.977354f, 0.977313f, 0.977273f, 0.977232f, 0.977191f, 0.977151f, 0.977110f, 0.977069f,
+ 0.977028f, 0.976987f, 0.976946f, 0.976905f, 0.976864f, 0.976823f, 0.976782f, 0.976741f,
+ 0.976700f, 0.976659f, 0.976618f, 0.976576f, 0.976535f, 0.976494f, 0.976453f, 0.976411f,
+ 0.976370f, 0.976328f, 0.976287f, 0.976245f, 0.976204f, 0.976162f, 0.976120f, 0.976079f,
+ 0.976037f, 0.975995f, 0.975954f, 0.975912f, 0.975870f, 0.975828f, 0.975786f, 0.975744f,
+ 0.975702f, 0.975660f, 0.975618f, 0.975576f, 0.975534f, 0.975492f, 0.975449f, 0.975407f,
+ 0.975365f, 0.975323f, 0.975280f, 0.975238f, 0.975195f, 0.975153f, 0.975110f, 0.975068f,
+ 0.975025f, 0.974983f, 0.974940f, 0.974897f, 0.974855f, 0.974812f, 0.974769f, 0.974726f,
+ 0.974684f, 0.974641f, 0.974598f, 0.974555f, 0.974512f, 0.974469f, 0.974426f, 0.974383f,
+ 0.974339f, 0.974296f, 0.974253f, 0.974210f, 0.974166f, 0.974123f, 0.974080f, 0.974036f,
+ 0.973993f, 0.973949f, 0.973906f, 0.973862f, 0.973819f, 0.973775f, 0.973732f, 0.973688f,
+ 0.973644f, 0.973601f, 0.973557f, 0.973513f, 0.973469f, 0.973425f, 0.973381f, 0.973337f,
+ 0.973293f, 0.973249f, 0.973205f, 0.973161f, 0.973117f, 0.973073f, 0.973028f, 0.972984f,
+ 0.972940f, 0.972896f, 0.972851f, 0.972807f, 0.972762f, 0.972718f, 0.972673f, 0.972629f,
+ 0.972584f, 0.972540f, 0.972495f, 0.972450f, 0.972406f, 0.972361f, 0.972316f, 0.972271f,
+ 0.972227f, 0.972182f, 0.972137f, 0.972092f, 0.972047f, 0.972002f, 0.971957f, 0.971911f,
+ 0.971866f, 0.971821f, 0.971776f, 0.971731f, 0.971685f, 0.971640f, 0.971595f, 0.971549f,
+ 0.971504f, 0.971458f, 0.971413f, 0.971367f, 0.971322f, 0.971276f, 0.971231f, 0.971185f,
+ 0.971139f, 0.971093f, 0.971048f, 0.971002f, 0.970956f, 0.970910f, 0.970864f, 0.970818f,
+ 0.970772f, 0.970726f, 0.970680f, 0.970634f, 0.970588f, 0.970542f, 0.970495f, 0.970449f,
+ 0.970403f, 0.970357f, 0.970310f, 0.970264f, 0.970217f, 0.970171f, 0.970124f, 0.970078f,
+ 0.970031f, 0.969985f, 0.969938f, 0.969891f, 0.969845f, 0.969798f, 0.969751f, 0.969704f,
+ 0.969657f, 0.969611f, 0.969564f, 0.969517f, 0.969470f, 0.969423f, 0.969375f, 0.969328f,
+ 0.969281f, 0.969234f, 0.969187f, 0.969140f, 0.969092f, 0.969045f, 0.968998f, 0.968950f,
+ 0.968903f, 0.968855f, 0.968808f, 0.968760f, 0.968713f, 0.968665f, 0.968617f, 0.968570f,
+ 0.968522f, 0.968474f, 0.968427f, 0.968379f, 0.968331f, 0.968283f, 0.968235f, 0.968187f,
+ 0.968139f, 0.968091f, 0.968043f, 0.967995f, 0.967947f, 0.967899f, 0.967850f, 0.967802f,
+ 0.967754f, 0.967706f, 0.967657f, 0.967609f, 0.967560f, 0.967512f, 0.967463f, 0.967415f,
+ 0.967366f, 0.967318f, 0.967269f, 0.967220f, 0.967172f, 0.967123f, 0.967074f, 0.967025f,
+ 0.966976f, 0.966928f, 0.966879f, 0.966830f, 0.966781f, 0.966732f, 0.966683f, 0.966633f,
+ 0.966584f, 0.966535f, 0.966486f, 0.966437f, 0.966387f, 0.966338f, 0.966289f, 0.966239f,
+ 0.966190f, 0.966141f, 0.966091f, 0.966042f, 0.965992f, 0.965942f, 0.965893f, 0.965843f,
+ 0.965793f, 0.965744f, 0.965694f, 0.965644f, 0.965594f, 0.965544f, 0.965494f, 0.965444f,
+ 0.965394f, 0.965344f, 0.965294f, 0.965244f, 0.965194f, 0.965144f, 0.965094f, 0.965044f,
+ 0.964993f, 0.964943f, 0.964893f, 0.964842f, 0.964792f, 0.964741f, 0.964691f, 0.964640f,
+ 0.964590f, 0.964539f, 0.964489f, 0.964438f, 0.964387f, 0.964336f, 0.964286f, 0.964235f,
+ 0.964184f, 0.964133f, 0.964082f, 0.964031f, 0.963980f, 0.963929f, 0.963878f, 0.963827f,
+ 0.963776f, 0.963725f, 0.963674f, 0.963623f, 0.963571f, 0.963520f, 0.963469f, 0.963417f,
+ 0.963366f, 0.963314f, 0.963263f, 0.963211f, 0.963160f, 0.963108f, 0.963057f, 0.963005f,
+ 0.962953f, 0.962902f, 0.962850f, 0.962798f, 0.962746f, 0.962694f, 0.962642f, 0.962590f,
+ 0.962538f, 0.962486f, 0.962434f, 0.962382f, 0.962330f, 0.962278f, 0.962226f, 0.962174f,
+ 0.962121f, 0.962069f, 0.962017f, 0.961964f, 0.961912f, 0.961860f, 0.961807f, 0.961755f,
+ 0.961702f, 0.961649f, 0.961597f, 0.961544f, 0.961492f, 0.961439f, 0.961386f, 0.961333f,
+ 0.961280f, 0.961228f, 0.961175f, 0.961122f, 0.961069f, 0.961016f, 0.960963f, 0.960910f,
+ 0.960857f, 0.960804f, 0.960750f, 0.960697f, 0.960644f, 0.960591f, 0.960537f, 0.960484f,
+ 0.960431f, 0.960377f, 0.960324f, 0.960270f, 0.960217f, 0.960163f, 0.960109f, 0.960056f,
+ 0.960002f, 0.959948f, 0.959895f, 0.959841f, 0.959787f, 0.959733f, 0.959679f, 0.959625f,
+ 0.959572f, 0.959518f, 0.959463f, 0.959409f, 0.959355f, 0.959301f, 0.959247f, 0.959193f,
+ 0.959139f, 0.959084f, 0.959030f, 0.958976f, 0.958921f, 0.958867f, 0.958812f, 0.958758f,
+ 0.958703f, 0.958649f, 0.958594f, 0.958540f, 0.958485f, 0.958430f, 0.958376f, 0.958321f,
+ 0.958266f, 0.958211f, 0.958156f, 0.958101f, 0.958046f, 0.957992f, 0.957937f, 0.957882f,
+ 0.957826f, 0.957771f, 0.957716f, 0.957661f, 0.957606f, 0.957550f, 0.957495f, 0.957440f,
+ 0.957385f, 0.957329f, 0.957274f, 0.957218f, 0.957163f, 0.957107f, 0.957052f, 0.956996f,
+ 0.956940f, 0.956885f, 0.956829f, 0.956773f, 0.956717f, 0.956662f, 0.956606f, 0.956550f,
+ 0.956494f, 0.956438f, 0.956382f, 0.956326f, 0.956270f, 0.956214f, 0.956158f, 0.956101f,
+ 0.956045f, 0.955989f, 0.955933f, 0.955876f, 0.955820f, 0.955764f, 0.955707f, 0.955651f,
+ 0.955594f, 0.955538f, 0.955481f, 0.955425f, 0.955368f, 0.955311f, 0.955255f, 0.955198f,
+ 0.955141f, 0.955084f, 0.955028f, 0.954971f, 0.954914f, 0.954857f, 0.954800f, 0.954743f,
+ 0.954686f, 0.954629f, 0.954572f, 0.954514f, 0.954457f, 0.954400f, 0.954343f, 0.954285f,
+ 0.954228f, 0.954171f, 0.954113f, 0.954056f, 0.953998f, 0.953941f, 0.953883f, 0.953826f,
+ 0.953768f, 0.953711f, 0.953653f, 0.953595f, 0.953537f, 0.953480f, 0.953422f, 0.953364f,
+ 0.953306f, 0.953248f, 0.953190f, 0.953132f, 0.953074f, 0.953016f, 0.952958f, 0.952900f,
+ 0.952842f, 0.952783f, 0.952725f, 0.952667f, 0.952609f, 0.952550f, 0.952492f, 0.952433f,
+ 0.952375f, 0.952317f, 0.952258f, 0.952199f, 0.952141f, 0.952082f, 0.952024f, 0.951965f,
+ 0.951906f, 0.951847f, 0.951789f, 0.951730f, 0.951671f, 0.951612f, 0.951553f, 0.951494f,
+ 0.951435f, 0.951376f, 0.951317f, 0.951258f, 0.951199f, 0.951139f, 0.951080f, 0.951021f,
+ 0.950962f, 0.950902f, 0.950843f, 0.950784f, 0.950724f, 0.950665f, 0.950605f, 0.950546f,
+ 0.950486f, 0.950426f, 0.950367f, 0.950307f, 0.950247f, 0.950188f, 0.950128f, 0.950068f,
+ 0.950008f, 0.949948f, 0.949888f, 0.949829f, 0.949768f, 0.949708f, 0.949648f, 0.949588f,
+ 0.949528f, 0.949468f, 0.949408f, 0.949348f, 0.949287f, 0.949227f, 0.949167f, 0.949106f,
+ 0.949046f, 0.948985f, 0.948925f, 0.948864f, 0.948804f, 0.948743f, 0.948683f, 0.948622f,
+ 0.948561f, 0.948501f, 0.948440f, 0.948379f, 0.948318f, 0.948257f, 0.948196f, 0.948136f,
+ 0.948075f, 0.948014f, 0.947953f, 0.947891f, 0.947830f, 0.947769f, 0.947708f, 0.947647f,
+ 0.947586f, 0.947524f, 0.947463f, 0.947402f, 0.947340f, 0.947279f, 0.947217f, 0.947156f,
+ 0.947094f, 0.947033f, 0.946971f, 0.946910f, 0.946848f, 0.946786f, 0.946724f, 0.946663f,
+ 0.946601f, 0.946539f, 0.946477f, 0.946415f, 0.946353f, 0.946291f, 0.946229f, 0.946167f,
+ 0.946105f, 0.946043f, 0.945981f, 0.945919f, 0.945857f, 0.945794f, 0.945732f, 0.945670f,
+ 0.945607f, 0.945545f, 0.945482f, 0.945420f, 0.945358f, 0.945295f, 0.945232f, 0.945170f,
+ 0.945107f, 0.945045f, 0.944982f, 0.944919f, 0.944856f, 0.944793f, 0.944731f, 0.944668f,
+ 0.944605f, 0.944542f, 0.944479f, 0.944416f, 0.944353f, 0.944290f, 0.944227f, 0.944163f,
+ 0.944100f, 0.944037f, 0.943974f, 0.943910f, 0.943847f, 0.943784f, 0.943720f, 0.943657f,
+ 0.943593f, 0.943530f, 0.943466f, 0.943403f, 0.943339f, 0.943276f, 0.943212f, 0.943148f,
+ 0.943084f, 0.943021f, 0.942957f, 0.942893f, 0.942829f, 0.942765f, 0.942701f, 0.942637f,
+ 0.942573f, 0.942509f, 0.942445f, 0.942381f, 0.942317f, 0.942253f, 0.942188f, 0.942124f,
+ 0.942060f, 0.941995f, 0.941931f, 0.941867f, 0.941802f, 0.941738f, 0.941673f, 0.941609f,
+ 0.941544f, 0.941479f, 0.941415f, 0.941350f, 0.941285f, 0.941221f, 0.941156f, 0.941091f,
+ 0.941026f, 0.940961f, 0.940896f, 0.940831f, 0.940766f, 0.940701f, 0.940636f, 0.940571f,
+ 0.940506f, 0.940441f, 0.940376f, 0.940310f, 0.940245f, 0.940180f, 0.940115f, 0.940049f,
+ 0.939984f, 0.939918f, 0.939853f, 0.939787f, 0.939722f, 0.939656f, 0.939591f, 0.939525f,
+ 0.939459f, 0.939394f, 0.939328f, 0.939262f, 0.939196f, 0.939130f, 0.939064f, 0.938998f,
+ 0.938932f, 0.938866f, 0.938800f, 0.938734f, 0.938668f, 0.938602f, 0.938536f, 0.938470f,
+ 0.938404f, 0.938337f, 0.938271f, 0.938205f, 0.938138f, 0.938072f, 0.938005f, 0.937939f,
+ 0.937872f, 0.937806f, 0.937739f, 0.937673f, 0.937606f, 0.937539f, 0.937473f, 0.937406f,
+ 0.937339f, 0.937272f, 0.937205f, 0.937138f, 0.937072f, 0.937005f, 0.936938f, 0.936871f,
+ 0.936803f, 0.936736f, 0.936669f, 0.936602f, 0.936535f, 0.936468f, 0.936400f, 0.936333f,
+ 0.936266f, 0.936198f, 0.936131f, 0.936063f, 0.935996f, 0.935928f, 0.935861f, 0.935793f,
+ 0.935726f, 0.935658f, 0.935590f, 0.935523f, 0.935455f, 0.935387f, 0.935319f, 0.935251f,
+ 0.935184f, 0.935116f, 0.935048f, 0.934980f, 0.934912f, 0.934844f, 0.934775f, 0.934707f,
+ 0.934639f, 0.934571f, 0.934503f, 0.934434f, 0.934366f, 0.934298f, 0.934229f, 0.934161f,
+ 0.934093f, 0.934024f, 0.933956f, 0.933887f, 0.933818f, 0.933750f, 0.933681f, 0.933612f,
+ 0.933544f, 0.933475f, 0.933406f, 0.933337f, 0.933269f, 0.933200f, 0.933131f, 0.933062f,
+ 0.932993f, 0.932924f, 0.932855f, 0.932786f, 0.932716f, 0.932647f, 0.932578f, 0.932509f,
+ 0.932440f, 0.932370f, 0.932301f, 0.932232f, 0.932162f, 0.932093f, 0.932023f, 0.931954f,
+ 0.931884f, 0.931815f, 0.931745f, 0.931675f, 0.931606f, 0.931536f, 0.931466f, 0.931397f,
+ 0.931327f, 0.931257f, 0.931187f, 0.931117f, 0.931047f, 0.930977f, 0.930907f, 0.930837f,
+ 0.930767f, 0.930697f, 0.930627f, 0.930556f, 0.930486f, 0.930416f, 0.930346f, 0.930275f,
+ 0.930205f, 0.930135f, 0.930064f, 0.929994f, 0.929923f, 0.929853f, 0.929782f, 0.929712f,
+ 0.929641f, 0.929570f, 0.929500f, 0.929429f, 0.929358f, 0.929287f, 0.929216f, 0.929146f,
+ 0.929075f, 0.929004f, 0.928933f, 0.928862f, 0.928791f, 0.928720f, 0.928648f, 0.928577f,
+ 0.928506f, 0.928435f, 0.928364f, 0.928292f, 0.928221f, 0.928150f, 0.928078f, 0.928007f,
+ 0.927935f, 0.927864f, 0.927792f, 0.927721f, 0.927649f, 0.927578f, 0.927506f, 0.927434f,
+ 0.927363f, 0.927291f, 0.927219f, 0.927147f, 0.927075f, 0.927003f, 0.926931f, 0.926859f,
+ 0.926787f, 0.926715f, 0.926643f, 0.926571f, 0.926499f, 0.926427f, 0.926355f, 0.926283f,
+ 0.926210f, 0.926138f, 0.926066f, 0.925993f, 0.925921f, 0.925848f, 0.925776f, 0.925703f,
+ 0.925631f, 0.925558f, 0.925486f, 0.925413f, 0.925340f, 0.925268f, 0.925195f, 0.925122f,
+ 0.925049f, 0.924976f, 0.924904f, 0.924831f, 0.924758f, 0.924685f, 0.924612f, 0.924539f,
+ 0.924465f, 0.924392f, 0.924319f, 0.924246f, 0.924173f, 0.924100f, 0.924026f, 0.923953f,
+ 0.923880f, 0.923806f, 0.923733f, 0.923659f, 0.923586f, 0.923512f, 0.923439f, 0.923365f,
+ 0.923291f, 0.923218f, 0.923144f, 0.923070f, 0.922997f, 0.922923f, 0.922849f, 0.922775f,
+ 0.922701f, 0.922627f, 0.922553f, 0.922479f, 0.922405f, 0.922331f, 0.922257f, 0.922183f,
+ 0.922109f, 0.922034f, 0.921960f, 0.921886f, 0.921812f, 0.921737f, 0.921663f, 0.921588f,
+ 0.921514f, 0.921440f, 0.921365f, 0.921291f, 0.921216f, 0.921141f, 0.921067f, 0.920992f,
+ 0.920917f, 0.920842f, 0.920768f, 0.920693f, 0.920618f, 0.920543f, 0.920468f, 0.920393f,
+ 0.920318f, 0.920243f, 0.920168f, 0.920093f, 0.920018f, 0.919943f, 0.919868f, 0.919792f,
+ 0.919717f, 0.919642f, 0.919567f, 0.919491f, 0.919416f, 0.919340f, 0.919265f, 0.919189f,
+ 0.919114f, 0.919038f, 0.918963f, 0.918887f, 0.918811f, 0.918736f, 0.918660f, 0.918584f,
+ 0.918508f, 0.918433f, 0.918357f, 0.918281f, 0.918205f, 0.918129f, 0.918053f, 0.917977f,
+ 0.917901f, 0.917825f, 0.917749f, 0.917672f, 0.917596f, 0.917520f, 0.917444f, 0.917367f,
+ 0.917291f, 0.917215f, 0.917138f, 0.917062f, 0.916985f, 0.916909f, 0.916832f, 0.916756f,
+ 0.916679f, 0.916602f, 0.916526f, 0.916449f, 0.916372f, 0.916296f, 0.916219f, 0.916142f,
+ 0.916065f, 0.915988f, 0.915911f, 0.915834f, 0.915757f, 0.915680f, 0.915603f, 0.915526f,
+ 0.915449f, 0.915372f, 0.915294f, 0.915217f, 0.915140f, 0.915062f, 0.914985f, 0.914908f,
+ 0.914830f, 0.914753f, 0.914675f, 0.914598f, 0.914520f, 0.914443f, 0.914365f, 0.914287f,
+ 0.914210f, 0.914132f, 0.914054f, 0.913976f, 0.913899f, 0.913821f, 0.913743f, 0.913665f,
+ 0.913587f, 0.913509f, 0.913431f, 0.913353f, 0.913275f, 0.913197f, 0.913119f, 0.913040f,
+ 0.912962f, 0.912884f, 0.912806f, 0.912727f, 0.912649f, 0.912571f, 0.912492f, 0.912414f,
+ 0.912335f, 0.912257f, 0.912178f, 0.912099f, 0.912021f, 0.911942f, 0.911864f, 0.911785f,
+ 0.911706f, 0.911627f, 0.911548f, 0.911470f, 0.911391f, 0.911312f, 0.911233f, 0.911154f,
+ 0.911075f, 0.910996f, 0.910917f, 0.910837f, 0.910758f, 0.910679f, 0.910600f, 0.910521f,
+ 0.910441f, 0.910362f, 0.910283f, 0.910203f, 0.910124f, 0.910044f, 0.909965f, 0.909885f,
+ 0.909806f, 0.909726f, 0.909646f, 0.909567f, 0.909487f, 0.909407f, 0.909328f, 0.909248f,
+ 0.909168f, 0.909088f, 0.909008f, 0.908928f, 0.908848f, 0.908768f, 0.908688f, 0.908608f,
+ 0.908528f, 0.908448f, 0.908368f, 0.908288f, 0.908207f, 0.908127f, 0.908047f, 0.907966f,
+ 0.907886f, 0.907806f, 0.907725f, 0.907645f, 0.907564f, 0.907484f, 0.907403f, 0.907323f,
+ 0.907242f, 0.907161f, 0.907081f, 0.907000f, 0.906919f, 0.906838f, 0.906757f, 0.906677f,
+ 0.906596f, 0.906515f, 0.906434f, 0.906353f, 0.906272f, 0.906191f, 0.906110f, 0.906028f,
+ 0.905947f, 0.905866f, 0.905785f, 0.905704f, 0.905622f, 0.905541f, 0.905460f, 0.905378f,
+ 0.905297f, 0.905215f, 0.905134f, 0.905052f, 0.904971f, 0.904889f, 0.904807f, 0.904726f,
+ 0.904644f, 0.904562f, 0.904481f, 0.904399f, 0.904317f, 0.904235f, 0.904153f, 0.904071f,
+ 0.903989f, 0.903907f, 0.903825f, 0.903743f, 0.903661f, 0.903579f, 0.903497f, 0.903415f,
+ 0.903332f, 0.903250f, 0.903168f, 0.903085f, 0.903003f, 0.902921f, 0.902838f, 0.902756f,
+ 0.902673f, 0.902591f, 0.902508f, 0.902426f, 0.902343f, 0.902260f, 0.902178f, 0.902095f,
+ 0.902012f, 0.901929f, 0.901847f, 0.901764f, 0.901681f, 0.901598f, 0.901515f, 0.901432f,
+ 0.901349f, 0.901266f, 0.901183f, 0.901100f, 0.901016f, 0.900933f, 0.900850f, 0.900767f,
+ 0.900683f, 0.900600f, 0.900517f, 0.900433f, 0.900350f, 0.900266f, 0.900183f, 0.900099f,
+ 0.900016f, 0.899932f, 0.899849f, 0.899765f, 0.899681f, 0.899598f, 0.899514f, 0.899430f,
+ 0.899346f, 0.899262f, 0.899179f, 0.899095f, 0.899011f, 0.898927f, 0.898843f, 0.898759f,
+ 0.898674f, 0.898590f, 0.898506f, 0.898422f, 0.898338f, 0.898254f, 0.898169f, 0.898085f,
+ 0.898001f, 0.897916f, 0.897832f, 0.897747f, 0.897663f, 0.897578f, 0.897494f, 0.897409f,
+ 0.897325f, 0.897240f, 0.897155f, 0.897071f, 0.896986f, 0.896901f, 0.896816f, 0.896731f,
+ 0.896646f, 0.896562f, 0.896477f, 0.896392f, 0.896307f, 0.896222f, 0.896137f, 0.896051f,
+ 0.895966f, 0.895881f, 0.895796f, 0.895711f, 0.895625f, 0.895540f, 0.895455f, 0.895369f,
+ 0.895284f, 0.895198f, 0.895113f, 0.895028f, 0.894942f, 0.894856f, 0.894771f, 0.894685f,
+ 0.894599f, 0.894514f, 0.894428f, 0.894342f, 0.894256f, 0.894171f, 0.894085f, 0.893999f,
+ 0.893913f, 0.893827f, 0.893741f, 0.893655f, 0.893569f, 0.893483f, 0.893397f, 0.893310f,
+ 0.893224f, 0.893138f, 0.893052f, 0.892965f, 0.892879f, 0.892793f, 0.892706f, 0.892620f,
+ 0.892534f, 0.892447f, 0.892361f, 0.892274f, 0.892187f, 0.892101f, 0.892014f, 0.891927f,
+ 0.891841f, 0.891754f, 0.891667f, 0.891580f, 0.891493f, 0.891407f, 0.891320f, 0.891233f,
+ 0.891146f, 0.891059f, 0.890972f, 0.890885f, 0.890797f, 0.890710f, 0.890623f, 0.890536f,
+ 0.890449f, 0.890361f, 0.890274f, 0.890187f, 0.890099f, 0.890012f, 0.889925f, 0.889837f,
+ 0.889750f, 0.889662f, 0.889574f, 0.889487f, 0.889399f, 0.889312f, 0.889224f, 0.889136f,
+ 0.889048f, 0.888961f, 0.888873f, 0.888785f, 0.888697f, 0.888609f, 0.888521f, 0.888433f,
+ 0.888345f, 0.888257f, 0.888169f, 0.888081f, 0.887993f, 0.887904f, 0.887816f, 0.887728f,
+ 0.887640f, 0.887551f, 0.887463f, 0.887375f, 0.887286f, 0.887198f, 0.887109f, 0.887021f,
+ 0.886932f, 0.886844f, 0.886755f, 0.886666f, 0.886578f, 0.886489f, 0.886400f, 0.886311f,
+ 0.886223f, 0.886134f, 0.886045f, 0.885956f, 0.885867f, 0.885778f, 0.885689f, 0.885600f,
+ 0.885511f, 0.885422f, 0.885333f, 0.885243f, 0.885154f, 0.885065f, 0.884976f, 0.884886f,
+ 0.884797f, 0.884708f, 0.884618f, 0.884529f, 0.884439f, 0.884350f, 0.884260f, 0.884171f,
+ 0.884081f, 0.883992f, 0.883902f, 0.883812f, 0.883723f, 0.883633f, 0.883543f, 0.883453f,
+ 0.883363f, 0.883273f, 0.883184f, 0.883094f, 0.883004f, 0.882914f, 0.882824f, 0.882733f,
+ 0.882643f, 0.882553f, 0.882463f, 0.882373f, 0.882283f, 0.882192f, 0.882102f, 0.882012f,
+ 0.881921f, 0.881831f, 0.881740f, 0.881650f, 0.881559f, 0.881469f, 0.881378f, 0.881288f,
+ 0.881197f, 0.881106f, 0.881016f, 0.880925f, 0.880834f, 0.880743f, 0.880653f, 0.880562f,
+ 0.880471f, 0.880380f, 0.880289f, 0.880198f, 0.880107f, 0.880016f, 0.879925f, 0.879834f,
+ 0.879743f, 0.879651f, 0.879560f, 0.879469f, 0.879378f, 0.879286f, 0.879195f, 0.879104f,
+ 0.879012f, 0.878921f, 0.878829f, 0.878738f, 0.878646f, 0.878555f, 0.878463f, 0.878371f,
+ 0.878280f, 0.878188f, 0.878096f, 0.878005f, 0.877913f, 0.877821f, 0.877729f, 0.877637f,
+ 0.877545f, 0.877453f, 0.877361f, 0.877269f, 0.877177f, 0.877085f, 0.876993f, 0.876901f,
+ 0.876809f, 0.876716f, 0.876624f, 0.876532f, 0.876440f, 0.876347f, 0.876255f, 0.876163f,
+ 0.876070f, 0.875978f, 0.875885f, 0.875793f, 0.875700f, 0.875607f, 0.875515f, 0.875422f,
+ 0.875329f, 0.875237f, 0.875144f, 0.875051f, 0.874958f, 0.874865f, 0.874773f, 0.874680f,
+ 0.874587f, 0.874494f, 0.874401f, 0.874308f, 0.874215f, 0.874121f, 0.874028f, 0.873935f,
+ 0.873842f, 0.873749f, 0.873655f, 0.873562f, 0.873469f, 0.873375f, 0.873282f, 0.873188f,
+ 0.873095f, 0.873001f, 0.872908f, 0.872814f, 0.872721f, 0.872627f, 0.872534f, 0.872440f,
+ 0.872346f, 0.872252f, 0.872159f, 0.872065f, 0.871971f, 0.871877f, 0.871783f, 0.871689f,
+ 0.871595f, 0.871501f, 0.871407f, 0.871313f, 0.871219f, 0.871125f, 0.871031f, 0.870936f,
+ 0.870842f, 0.870748f, 0.870654f, 0.870559f, 0.870465f, 0.870370f, 0.870276f, 0.870182f,
+ 0.870087f, 0.869992f, 0.869898f, 0.869803f, 0.869709f, 0.869614f, 0.869519f, 0.869425f,
+ 0.869330f, 0.869235f, 0.869140f, 0.869045f, 0.868951f, 0.868856f, 0.868761f, 0.868666f,
+ 0.868571f, 0.868476f, 0.868381f, 0.868285f, 0.868190f, 0.868095f, 0.868000f, 0.867905f,
+ 0.867809f, 0.867714f, 0.867619f, 0.867523f, 0.867428f, 0.867333f, 0.867237f, 0.867142f,
+ 0.867046f, 0.866951f, 0.866855f, 0.866759f, 0.866664f, 0.866568f, 0.866472f, 0.866377f,
+ 0.866281f, 0.866185f, 0.866089f, 0.865993f, 0.865898f, 0.865802f, 0.865706f, 0.865610f,
+ 0.865514f, 0.865418f, 0.865321f, 0.865225f, 0.865129f, 0.865033f, 0.864937f, 0.864841f,
+ 0.864744f, 0.864648f, 0.864552f, 0.864455f, 0.864359f, 0.864262f, 0.864166f, 0.864069f,
+ 0.863973f, 0.863876f, 0.863780f, 0.863683f, 0.863586f, 0.863490f, 0.863393f, 0.863296f,
+ 0.863199f, 0.863103f, 0.863006f, 0.862909f, 0.862812f, 0.862715f, 0.862618f, 0.862521f,
+ 0.862424f, 0.862327f, 0.862230f, 0.862133f, 0.862035f, 0.861938f, 0.861841f, 0.861744f,
+ 0.861646f, 0.861549f, 0.861452f, 0.861354f, 0.861257f, 0.861160f, 0.861062f, 0.860964f,
+ 0.860867f, 0.860769f, 0.860672f, 0.860574f, 0.860476f, 0.860379f, 0.860281f, 0.860183f,
+ 0.860085f, 0.859988f, 0.859890f, 0.859792f, 0.859694f, 0.859596f, 0.859498f, 0.859400f,
+ 0.859302f, 0.859204f, 0.859106f, 0.859007f, 0.858909f, 0.858811f, 0.858713f, 0.858615f,
+ 0.858516f, 0.858418f, 0.858320f, 0.858221f, 0.858123f, 0.858024f, 0.857926f, 0.857827f,
+ 0.857729f, 0.857630f, 0.857531f, 0.857433f, 0.857334f, 0.857235f, 0.857137f, 0.857038f,
+ 0.856939f, 0.856840f, 0.856741f, 0.856642f, 0.856543f, 0.856444f, 0.856345f, 0.856246f,
+ 0.856147f, 0.856048f, 0.855949f, 0.855850f, 0.855751f, 0.855651f, 0.855552f, 0.855453f,
+ 0.855354f, 0.855254f, 0.855155f, 0.855056f, 0.854956f, 0.854857f, 0.854757f, 0.854658f,
+ 0.854558f, 0.854458f, 0.854359f, 0.854259f, 0.854159f, 0.854060f, 0.853960f, 0.853860f,
+ 0.853760f, 0.853660f, 0.853561f, 0.853461f, 0.853361f, 0.853261f, 0.853161f, 0.853061f,
+ 0.852961f, 0.852861f, 0.852760f, 0.852660f, 0.852560f, 0.852460f, 0.852360f, 0.852259f,
+ 0.852159f, 0.852059f, 0.851958f, 0.851858f, 0.851757f, 0.851657f, 0.851556f, 0.851456f,
+ 0.851355f, 0.851255f, 0.851154f, 0.851053f, 0.850953f, 0.850852f, 0.850751f, 0.850650f,
+ 0.850549f, 0.850449f, 0.850348f, 0.850247f, 0.850146f, 0.850045f, 0.849944f, 0.849843f,
+ 0.849742f, 0.849641f, 0.849540f, 0.849438f, 0.849337f, 0.849236f, 0.849135f, 0.849033f,
+ 0.848932f, 0.848831f, 0.848729f, 0.848628f, 0.848526f, 0.848425f, 0.848323f, 0.848222f,
+ 0.848120f, 0.848019f, 0.847917f, 0.847815f, 0.847714f, 0.847612f, 0.847510f, 0.847408f,
+ 0.847307f, 0.847205f, 0.847103f, 0.847001f, 0.846899f, 0.846797f, 0.846695f, 0.846593f,
+ 0.846491f, 0.846389f, 0.846287f, 0.846185f, 0.846082f, 0.845980f, 0.845878f, 0.845776f,
+ 0.845673f, 0.845571f, 0.845469f, 0.845366f, 0.845264f, 0.845161f, 0.845059f, 0.844956f,
+ 0.844854f, 0.844751f, 0.844648f, 0.844546f, 0.844443f, 0.844340f, 0.844238f, 0.844135f,
+ 0.844032f, 0.843929f, 0.843826f, 0.843723f, 0.843620f, 0.843517f, 0.843414f, 0.843311f,
+ 0.843208f, 0.843105f, 0.843002f, 0.842899f, 0.842796f, 0.842692f, 0.842589f, 0.842486f,
+ 0.842383f, 0.842279f, 0.842176f, 0.842072f, 0.841969f, 0.841866f, 0.841762f, 0.841659f,
+ 0.841555f, 0.841451f, 0.841348f, 0.841244f, 0.841140f, 0.841037f, 0.840933f, 0.840829f,
+ 0.840725f, 0.840622f, 0.840518f, 0.840414f, 0.840310f, 0.840206f, 0.840102f, 0.839998f,
+ 0.839894f, 0.839790f, 0.839686f, 0.839581f, 0.839477f, 0.839373f, 0.839269f, 0.839165f,
+ 0.839060f, 0.838956f, 0.838852f, 0.838747f, 0.838643f, 0.838538f, 0.838434f, 0.838329f,
+ 0.838225f, 0.838120f, 0.838015f, 0.837911f, 0.837806f, 0.837701f, 0.837597f, 0.837492f,
+ 0.837387f, 0.837282f, 0.837178f, 0.837073f, 0.836968f, 0.836863f, 0.836758f, 0.836653f,
+ 0.836548f, 0.836443f, 0.836338f, 0.836232f, 0.836127f, 0.836022f, 0.835917f, 0.835812f,
+ 0.835706f, 0.835601f, 0.835496f, 0.835390f, 0.835285f, 0.835179f, 0.835074f, 0.834968f,
+ 0.834863f, 0.834757f, 0.834652f, 0.834546f, 0.834440f, 0.834335f, 0.834229f, 0.834123f,
+ 0.834018f, 0.833912f, 0.833806f, 0.833700f, 0.833594f, 0.833488f, 0.833382f, 0.833276f,
+ 0.833170f, 0.833064f, 0.832958f, 0.832852f, 0.832746f, 0.832640f, 0.832533f, 0.832427f,
+ 0.832321f, 0.832215f, 0.832108f, 0.832002f, 0.831895f, 0.831789f, 0.831683f, 0.831576f,
+ 0.831470f, 0.831363f, 0.831257f, 0.831150f, 0.831043f, 0.830937f, 0.830830f, 0.830723f,
+ 0.830616f, 0.830510f, 0.830403f, 0.830296f, 0.830189f, 0.830082f, 0.829975f, 0.829868f,
+ 0.829761f, 0.829654f, 0.829547f, 0.829440f, 0.829333f, 0.829226f, 0.829119f, 0.829011f,
+ 0.828904f, 0.828797f, 0.828690f, 0.828582f, 0.828475f, 0.828367f, 0.828260f, 0.828153f,
+ 0.828045f, 0.827938f, 0.827830f, 0.827722f, 0.827615f, 0.827507f, 0.827399f, 0.827292f,
+ 0.827184f, 0.827076f, 0.826968f, 0.826861f, 0.826753f, 0.826645f, 0.826537f, 0.826429f,
+ 0.826321f, 0.826213f, 0.826105f, 0.825997f, 0.825889f, 0.825781f, 0.825673f, 0.825564f,
+ 0.825456f, 0.825348f, 0.825240f, 0.825131f, 0.825023f, 0.824915f, 0.824806f, 0.824698f,
+ 0.824589f, 0.824481f, 0.824372f, 0.824264f, 0.824155f, 0.824047f, 0.823938f, 0.823829f,
+ 0.823721f, 0.823612f, 0.823503f, 0.823394f, 0.823285f, 0.823177f, 0.823068f, 0.822959f,
+ 0.822850f, 0.822741f, 0.822632f, 0.822523f, 0.822414f, 0.822305f, 0.822195f, 0.822086f,
+ 0.821977f, 0.821868f, 0.821759f, 0.821649f, 0.821540f, 0.821431f, 0.821321f, 0.821212f,
+ 0.821102f, 0.820993f, 0.820884f, 0.820774f, 0.820664f, 0.820555f, 0.820445f, 0.820336f,
+ 0.820226f, 0.820116f, 0.820007f, 0.819897f, 0.819787f, 0.819677f, 0.819567f, 0.819457f,
+ 0.819348f, 0.819238f, 0.819128f, 0.819018f, 0.818908f, 0.818798f, 0.818687f, 0.818577f,
+ 0.818467f, 0.818357f, 0.818247f, 0.818137f, 0.818026f, 0.817916f, 0.817806f, 0.817695f,
+ 0.817585f, 0.817474f, 0.817364f, 0.817253f, 0.817143f, 0.817032f, 0.816922f, 0.816811f,
+ 0.816701f, 0.816590f, 0.816479f, 0.816368f, 0.816258f, 0.816147f, 0.816036f, 0.815925f,
+ 0.815814f, 0.815704f, 0.815593f, 0.815482f, 0.815371f, 0.815260f, 0.815149f, 0.815037f,
+ 0.814926f, 0.814815f, 0.814704f, 0.814593f, 0.814482f, 0.814370f, 0.814259f, 0.814148f,
+ 0.814036f, 0.813925f, 0.813814f, 0.813702f, 0.813591f, 0.813479f, 0.813368f, 0.813256f,
+ 0.813144f, 0.813033f, 0.812921f, 0.812809f, 0.812698f, 0.812586f, 0.812474f, 0.812362f,
+ 0.812251f, 0.812139f, 0.812027f, 0.811915f, 0.811803f, 0.811691f, 0.811579f, 0.811467f,
+ 0.811355f, 0.811243f, 0.811131f, 0.811018f, 0.810906f, 0.810794f, 0.810682f, 0.810570f,
+ 0.810457f, 0.810345f, 0.810232f, 0.810120f, 0.810008f, 0.809895f, 0.809783f, 0.809670f,
+ 0.809558f, 0.809445f, 0.809332f, 0.809220f, 0.809107f, 0.808994f, 0.808882f, 0.808769f,
+ 0.808656f, 0.808543f, 0.808430f, 0.808318f, 0.808205f, 0.808092f, 0.807979f, 0.807866f,
+ 0.807753f, 0.807640f, 0.807527f, 0.807414f, 0.807300f, 0.807187f, 0.807074f, 0.806961f,
+ 0.806848f, 0.806734f, 0.806621f, 0.806508f, 0.806394f, 0.806281f, 0.806167f, 0.806054f,
+ 0.805940f, 0.805827f, 0.805713f, 0.805600f, 0.805486f, 0.805372f, 0.805259f, 0.805145f,
+ 0.805031f, 0.804918f, 0.804804f, 0.804690f, 0.804576f, 0.804462f, 0.804348f, 0.804234f,
+ 0.804120f, 0.804006f, 0.803892f, 0.803778f, 0.803664f, 0.803550f, 0.803436f, 0.803322f,
+ 0.803208f, 0.803093f, 0.802979f, 0.802865f, 0.802750f, 0.802636f, 0.802522f, 0.802407f,
+ 0.802293f, 0.802178f, 0.802064f, 0.801949f, 0.801835f, 0.801720f, 0.801606f, 0.801491f,
+ 0.801376f, 0.801261f, 0.801147f, 0.801032f, 0.800917f, 0.800802f, 0.800687f, 0.800573f,
+ 0.800458f, 0.800343f, 0.800228f, 0.800113f, 0.799998f, 0.799883f, 0.799768f, 0.799652f,
+ 0.799537f, 0.799422f, 0.799307f, 0.799192f, 0.799076f, 0.798961f, 0.798846f, 0.798730f,
+ 0.798615f, 0.798500f, 0.798384f, 0.798269f, 0.798153f, 0.798038f, 0.797922f, 0.797806f,
+ 0.797691f, 0.797575f, 0.797459f, 0.797344f, 0.797228f, 0.797112f, 0.796996f, 0.796881f,
+ 0.796765f, 0.796649f, 0.796533f, 0.796417f, 0.796301f, 0.796185f, 0.796069f, 0.795953f,
+ 0.795837f, 0.795721f, 0.795605f, 0.795488f, 0.795372f, 0.795256f, 0.795140f, 0.795023f,
+ 0.794907f, 0.794791f, 0.794674f, 0.794558f, 0.794442f, 0.794325f, 0.794209f, 0.794092f,
+ 0.793975f, 0.793859f, 0.793742f, 0.793626f, 0.793509f, 0.793392f, 0.793276f, 0.793159f,
+ 0.793042f, 0.792925f, 0.792808f, 0.792691f, 0.792575f, 0.792458f, 0.792341f, 0.792224f,
+ 0.792107f, 0.791990f, 0.791872f, 0.791755f, 0.791638f, 0.791521f, 0.791404f, 0.791287f,
+ 0.791169f, 0.791052f, 0.790935f, 0.790817f, 0.790700f, 0.790583f, 0.790465f, 0.790348f,
+ 0.790230f, 0.790113f, 0.789995f, 0.789878f, 0.789760f, 0.789642f, 0.789525f, 0.789407f,
+ 0.789289f, 0.789172f, 0.789054f, 0.788936f, 0.788818f, 0.788700f, 0.788582f, 0.788464f,
+ 0.788346f, 0.788228f, 0.788110f, 0.787992f, 0.787874f, 0.787756f, 0.787638f, 0.787520f,
+ 0.787402f, 0.787284f, 0.787165f, 0.787047f, 0.786929f, 0.786810f, 0.786692f, 0.786574f,
+ 0.786455f, 0.786337f, 0.786218f, 0.786100f, 0.785981f, 0.785863f, 0.785744f, 0.785625f,
+ 0.785507f, 0.785388f, 0.785269f, 0.785151f, 0.785032f, 0.784913f, 0.784794f, 0.784675f,
+ 0.784557f, 0.784438f, 0.784319f, 0.784200f, 0.784081f, 0.783962f, 0.783843f, 0.783724f,
+ 0.783605f, 0.783485f, 0.783366f, 0.783247f, 0.783128f, 0.783009f, 0.782889f, 0.782770f,
+ 0.782651f, 0.782531f, 0.782412f, 0.782292f, 0.782173f, 0.782053f, 0.781934f, 0.781814f,
+ 0.781695f, 0.781575f, 0.781456f, 0.781336f, 0.781216f, 0.781097f, 0.780977f, 0.780857f,
+ 0.780737f, 0.780617f, 0.780498f, 0.780378f, 0.780258f, 0.780138f, 0.780018f, 0.779898f,
+ 0.779778f, 0.779658f, 0.779538f, 0.779418f, 0.779297f, 0.779177f, 0.779057f, 0.778937f,
+ 0.778817f, 0.778696f, 0.778576f, 0.778456f, 0.778335f, 0.778215f, 0.778094f, 0.777974f,
+ 0.777853f, 0.777733f, 0.777612f, 0.777492f, 0.777371f, 0.777251f, 0.777130f, 0.777009f,
+ 0.776888f, 0.776768f, 0.776647f, 0.776526f, 0.776405f, 0.776284f, 0.776164f, 0.776043f,
+ 0.775922f, 0.775801f, 0.775680f, 0.775559f, 0.775438f, 0.775317f, 0.775195f, 0.775074f,
+ 0.774953f, 0.774832f, 0.774711f, 0.774589f, 0.774468f, 0.774347f, 0.774225f, 0.774104f,
+ 0.773983f, 0.773861f, 0.773740f, 0.773618f, 0.773497f, 0.773375f, 0.773254f, 0.773132f,
+ 0.773010f, 0.772889f, 0.772767f, 0.772645f, 0.772524f, 0.772402f, 0.772280f, 0.772158f,
+ 0.772036f, 0.771915f, 0.771793f, 0.771671f, 0.771549f, 0.771427f, 0.771305f, 0.771183f,
+ 0.771061f, 0.770938f, 0.770816f, 0.770694f, 0.770572f, 0.770450f, 0.770327f, 0.770205f,
+ 0.770083f, 0.769961f, 0.769838f, 0.769716f, 0.769593f, 0.769471f, 0.769348f, 0.769226f,
+ 0.769103f, 0.768981f, 0.768858f, 0.768736f, 0.768613f, 0.768490f, 0.768368f, 0.768245f,
+ 0.768122f, 0.767999f, 0.767876f, 0.767754f, 0.767631f, 0.767508f, 0.767385f, 0.767262f,
+ 0.767139f, 0.767016f, 0.766893f, 0.766770f, 0.766647f, 0.766524f, 0.766400f, 0.766277f,
+ 0.766154f, 0.766031f, 0.765907f, 0.765784f, 0.765661f, 0.765538f, 0.765414f, 0.765291f,
+ 0.765167f, 0.765044f, 0.764920f, 0.764797f, 0.764673f, 0.764550f, 0.764426f, 0.764302f,
+ 0.764179f, 0.764055f, 0.763931f, 0.763808f, 0.763684f, 0.763560f, 0.763436f, 0.763312f,
+ 0.763188f, 0.763065f, 0.762941f, 0.762817f, 0.762693f, 0.762569f, 0.762444f, 0.762320f,
+ 0.762196f, 0.762072f, 0.761948f, 0.761824f, 0.761700f, 0.761575f, 0.761451f, 0.761327f,
+ 0.761202f, 0.761078f, 0.760954f, 0.760829f, 0.760705f, 0.760580f, 0.760456f, 0.760331f,
+ 0.760207f, 0.760082f, 0.759957f, 0.759833f, 0.759708f, 0.759583f, 0.759459f, 0.759334f,
+ 0.759209f, 0.759084f, 0.758960f, 0.758835f, 0.758710f, 0.758585f, 0.758460f, 0.758335f,
+ 0.758210f, 0.758085f, 0.757960f, 0.757835f, 0.757710f, 0.757584f, 0.757459f, 0.757334f,
+ 0.757209f, 0.757084f, 0.756958f, 0.756833f, 0.756708f, 0.756582f, 0.756457f, 0.756331f,
+ 0.756206f, 0.756081f, 0.755955f, 0.755829f, 0.755704f, 0.755578f, 0.755453f, 0.755327f,
+ 0.755201f, 0.755076f, 0.754950f, 0.754824f, 0.754698f, 0.754573f, 0.754447f, 0.754321f,
+ 0.754195f, 0.754069f, 0.753943f, 0.753817f, 0.753691f, 0.753565f, 0.753439f, 0.753313f,
+ 0.753187f, 0.753061f, 0.752934f, 0.752808f, 0.752682f, 0.752556f, 0.752429f, 0.752303f,
+ 0.752177f, 0.752050f, 0.751924f, 0.751798f, 0.751671f, 0.751545f, 0.751418f, 0.751292f,
+ 0.751165f, 0.751039f, 0.750912f, 0.750785f, 0.750659f, 0.750532f, 0.750405f, 0.750278f,
+ 0.750152f, 0.750025f, 0.749898f, 0.749771f, 0.749644f, 0.749517f, 0.749390f, 0.749263f,
+ 0.749136f, 0.749009f, 0.748882f, 0.748755f, 0.748628f, 0.748501f, 0.748374f, 0.748247f,
+ 0.748119f, 0.747992f, 0.747865f, 0.747738f, 0.747610f, 0.747483f, 0.747355f, 0.747228f,
+ 0.747101f, 0.746973f, 0.746846f, 0.746718f, 0.746591f, 0.746463f, 0.746335f, 0.746208f,
+ 0.746080f, 0.745952f, 0.745825f, 0.745697f, 0.745569f, 0.745441f, 0.745314f, 0.745186f,
+ 0.745058f, 0.744930f, 0.744802f, 0.744674f, 0.744546f, 0.744418f, 0.744290f, 0.744162f,
+ 0.744034f, 0.743906f, 0.743777f, 0.743649f, 0.743521f, 0.743393f, 0.743265f, 0.743136f,
+ 0.743008f, 0.742880f, 0.742751f, 0.742623f, 0.742494f, 0.742366f, 0.742237f, 0.742109f,
+ 0.741980f, 0.741852f, 0.741723f, 0.741595f, 0.741466f, 0.741337f, 0.741209f, 0.741080f,
+ 0.740951f, 0.740822f, 0.740694f, 0.740565f, 0.740436f, 0.740307f, 0.740178f, 0.740049f,
+ 0.739920f, 0.739791f, 0.739662f, 0.739533f, 0.739404f, 0.739275f, 0.739146f, 0.739017f,
+ 0.738887f, 0.738758f, 0.738629f, 0.738500f, 0.738370f, 0.738241f, 0.738112f, 0.737982f,
+ 0.737853f, 0.737723f, 0.737594f, 0.737464f, 0.737335f, 0.737205f, 0.737076f, 0.736946f,
+ 0.736817f, 0.736687f, 0.736557f, 0.736428f, 0.736298f, 0.736168f, 0.736038f, 0.735908f,
+ 0.735779f, 0.735649f, 0.735519f, 0.735389f, 0.735259f, 0.735129f, 0.734999f, 0.734869f,
+ 0.734739f, 0.734609f, 0.734479f, 0.734349f, 0.734218f, 0.734088f, 0.733958f, 0.733828f,
+ 0.733697f, 0.733567f, 0.733437f, 0.733306f, 0.733176f, 0.733046f, 0.732915f, 0.732785f,
+ 0.732654f, 0.732524f, 0.732393f, 0.732263f, 0.732132f, 0.732001f, 0.731871f, 0.731740f,
+ 0.731609f, 0.731479f, 0.731348f, 0.731217f, 0.731086f, 0.730955f, 0.730825f, 0.730694f,
+ 0.730563f, 0.730432f, 0.730301f, 0.730170f, 0.730039f, 0.729908f, 0.729777f, 0.729646f,
+ 0.729514f, 0.729383f, 0.729252f, 0.729121f, 0.728990f, 0.728858f, 0.728727f, 0.728596f,
+ 0.728464f, 0.728333f, 0.728202f, 0.728070f, 0.727939f, 0.727807f, 0.727676f, 0.727544f,
+ 0.727413f, 0.727281f, 0.727149f, 0.727018f, 0.726886f, 0.726754f, 0.726623f, 0.726491f,
+ 0.726359f, 0.726227f, 0.726095f, 0.725964f, 0.725832f, 0.725700f, 0.725568f, 0.725436f,
+ 0.725304f, 0.725172f, 0.725040f, 0.724908f, 0.724776f, 0.724644f, 0.724511f, 0.724379f,
+ 0.724247f, 0.724115f, 0.723983f, 0.723850f, 0.723718f, 0.723586f, 0.723453f, 0.723321f,
+ 0.723188f, 0.723056f, 0.722924f, 0.722791f, 0.722659f, 0.722526f, 0.722393f, 0.722261f,
+ 0.722128f, 0.721996f, 0.721863f, 0.721730f, 0.721597f, 0.721465f, 0.721332f, 0.721199f,
+ 0.721066f, 0.720933f, 0.720800f, 0.720668f, 0.720535f, 0.720402f, 0.720269f, 0.720136f,
+ 0.720003f, 0.719869f, 0.719736f, 0.719603f, 0.719470f, 0.719337f, 0.719204f, 0.719070f,
+ 0.718937f, 0.718804f, 0.718670f, 0.718537f, 0.718404f, 0.718270f, 0.718137f, 0.718004f,
+ 0.717870f, 0.717737f, 0.717603f, 0.717469f, 0.717336f, 0.717202f, 0.717069f, 0.716935f,
+ 0.716801f, 0.716668f, 0.716534f, 0.716400f, 0.716266f, 0.716132f, 0.715999f, 0.715865f,
+ 0.715731f, 0.715597f, 0.715463f, 0.715329f, 0.715195f, 0.715061f, 0.714927f, 0.714793f,
+ 0.714659f, 0.714525f, 0.714390f, 0.714256f, 0.714122f, 0.713988f, 0.713853f, 0.713719f,
+ 0.713585f, 0.713451f, 0.713316f, 0.713182f, 0.713047f, 0.712913f, 0.712778f, 0.712644f,
+ 0.712509f, 0.712375f, 0.712240f, 0.712106f, 0.711971f, 0.711836f, 0.711702f, 0.711567f,
+ 0.711432f, 0.711297f, 0.711163f, 0.711028f, 0.710893f, 0.710758f, 0.710623f, 0.710488f,
+ 0.710353f, 0.710218f, 0.710083f, 0.709948f, 0.709813f, 0.709678f, 0.709543f, 0.709408f,
+ 0.709273f, 0.709138f, 0.709002f, 0.708867f, 0.708732f, 0.708597f, 0.708461f, 0.708326f,
+ 0.708191f, 0.708055f, 0.707920f, 0.707784f, 0.707649f, 0.707513f, 0.707378f, 0.707242f,
+ 0.707107f, 0.706971f, 0.706836f, 0.706700f, 0.706564f, 0.706429f, 0.706293f, 0.706157f,
+ 0.706021f, 0.705885f, 0.705750f, 0.705614f, 0.705478f, 0.705342f, 0.705206f, 0.705070f,
+ 0.704934f, 0.704798f, 0.704662f, 0.704526f, 0.704390f, 0.704254f, 0.704118f, 0.703981f,
+ 0.703845f, 0.703709f, 0.703573f, 0.703436f, 0.703300f, 0.703164f, 0.703028f, 0.702891f,
+ 0.702755f, 0.702618f, 0.702482f, 0.702345f, 0.702209f, 0.702072f, 0.701936f, 0.701799f,
+ 0.701663f, 0.701526f, 0.701389f, 0.701253f, 0.701116f, 0.700979f, 0.700842f, 0.700706f,
+ 0.700569f, 0.700432f, 0.700295f, 0.700158f, 0.700021f, 0.699884f, 0.699747f, 0.699610f,
+ 0.699473f, 0.699336f, 0.699199f, 0.699062f, 0.698925f, 0.698788f, 0.698651f, 0.698513f,
+ 0.698376f, 0.698239f, 0.698102f, 0.697964f, 0.697827f, 0.697690f, 0.697552f, 0.697415f,
+ 0.697277f, 0.697140f, 0.697003f, 0.696865f, 0.696728f, 0.696590f, 0.696452f, 0.696315f,
+ 0.696177f, 0.696039f, 0.695902f, 0.695764f, 0.695626f, 0.695489f, 0.695351f, 0.695213f,
+ 0.695075f, 0.694937f, 0.694799f, 0.694661f, 0.694524f, 0.694386f, 0.694248f, 0.694109f,
+ 0.693971f, 0.693833f, 0.693695f, 0.693557f, 0.693419f, 0.693281f, 0.693143f, 0.693004f,
+ 0.692866f, 0.692728f, 0.692590f, 0.692451f, 0.692313f, 0.692175f, 0.692036f, 0.691898f,
+ 0.691759f, 0.691621f, 0.691482f, 0.691344f, 0.691205f, 0.691067f, 0.690928f, 0.690789f,
+ 0.690651f, 0.690512f, 0.690373f, 0.690235f, 0.690096f, 0.689957f, 0.689818f, 0.689679f,
+ 0.689541f, 0.689402f, 0.689263f, 0.689124f, 0.688985f, 0.688846f, 0.688707f, 0.688568f,
+ 0.688429f, 0.688290f, 0.688151f, 0.688011f, 0.687872f, 0.687733f, 0.687594f, 0.687455f,
+ 0.687315f, 0.687176f, 0.687037f, 0.686897f, 0.686758f, 0.686619f, 0.686479f, 0.686340f,
+ 0.686200f, 0.686061f, 0.685921f, 0.685782f, 0.685642f, 0.685503f, 0.685363f, 0.685223f,
+ 0.685084f, 0.684944f, 0.684804f, 0.684664f, 0.684525f, 0.684385f, 0.684245f, 0.684105f,
+ 0.683965f, 0.683825f, 0.683686f, 0.683546f, 0.683406f, 0.683266f, 0.683126f, 0.682986f,
+ 0.682846f, 0.682705f, 0.682565f, 0.682425f, 0.682285f, 0.682145f, 0.682005f, 0.681864f,
+ 0.681724f, 0.681584f, 0.681443f, 0.681303f, 0.681163f, 0.681022f, 0.680882f, 0.680741f,
+ 0.680601f, 0.680461f, 0.680320f, 0.680179f, 0.680039f, 0.679898f, 0.679758f, 0.679617f,
+ 0.679476f, 0.679336f, 0.679195f, 0.679054f, 0.678913f, 0.678773f, 0.678632f, 0.678491f,
+ 0.678350f, 0.678209f, 0.678068f, 0.677927f, 0.677786f, 0.677645f, 0.677504f, 0.677363f,
+ 0.677222f, 0.677081f, 0.676940f, 0.676799f, 0.676658f, 0.676516f, 0.676375f, 0.676234f,
+ 0.676093f, 0.675951f, 0.675810f, 0.675669f, 0.675527f, 0.675386f, 0.675245f, 0.675103f,
+ 0.674962f, 0.674820f, 0.674679f, 0.674537f, 0.674396f, 0.674254f, 0.674112f, 0.673971f,
+ 0.673829f, 0.673687f, 0.673546f, 0.673404f, 0.673262f, 0.673120f, 0.672978f, 0.672837f,
+ 0.672695f, 0.672553f, 0.672411f, 0.672269f, 0.672127f, 0.671985f, 0.671843f, 0.671701f,
+ 0.671559f, 0.671417f, 0.671275f, 0.671133f, 0.670990f, 0.670848f, 0.670706f, 0.670564f,
+ 0.670422f, 0.670279f, 0.670137f, 0.669995f, 0.669852f, 0.669710f, 0.669567f, 0.669425f,
+ 0.669283f, 0.669140f, 0.668998f, 0.668855f, 0.668712f, 0.668570f, 0.668427f, 0.668285f,
+ 0.668142f, 0.667999f, 0.667857f, 0.667714f, 0.667571f, 0.667428f, 0.667286f, 0.667143f,
+ 0.667000f, 0.666857f, 0.666714f, 0.666571f, 0.666428f, 0.666285f, 0.666142f, 0.665999f,
+ 0.665856f, 0.665713f, 0.665570f, 0.665427f, 0.665284f, 0.665141f, 0.664997f, 0.664854f,
+ 0.664711f, 0.664568f, 0.664424f, 0.664281f, 0.664138f, 0.663994f, 0.663851f, 0.663708f,
+ 0.663564f, 0.663421f, 0.663277f, 0.663134f, 0.662990f, 0.662847f, 0.662703f, 0.662559f,
+ 0.662416f, 0.662272f, 0.662128f, 0.661985f, 0.661841f, 0.661697f, 0.661553f, 0.661410f,
+ 0.661266f, 0.661122f, 0.660978f, 0.660834f, 0.660690f, 0.660546f, 0.660402f, 0.660258f,
+ 0.660114f, 0.659970f, 0.659826f, 0.659682f, 0.659538f, 0.659394f, 0.659250f, 0.659105f,
+ 0.658961f, 0.658817f, 0.658673f, 0.658529f, 0.658384f, 0.658240f, 0.658095f, 0.657951f,
+ 0.657807f, 0.657662f, 0.657518f, 0.657373f, 0.657229f, 0.657084f, 0.656940f, 0.656795f,
+ 0.656651f, 0.656506f, 0.656361f, 0.656217f, 0.656072f, 0.655927f, 0.655782f, 0.655638f,
+ 0.655493f, 0.655348f, 0.655203f, 0.655058f, 0.654913f, 0.654769f, 0.654624f, 0.654479f,
+ 0.654334f, 0.654189f, 0.654044f, 0.653899f, 0.653753f, 0.653608f, 0.653463f, 0.653318f,
+ 0.653173f, 0.653028f, 0.652882f, 0.652737f, 0.652592f, 0.652447f, 0.652301f, 0.652156f,
+ 0.652011f, 0.651865f, 0.651720f, 0.651574f, 0.651429f, 0.651283f, 0.651138f, 0.650992f,
+ 0.650847f, 0.650701f, 0.650555f, 0.650410f, 0.650264f, 0.650119f, 0.649973f, 0.649827f,
+ 0.649681f, 0.649536f, 0.649390f, 0.649244f, 0.649098f, 0.648952f, 0.648806f, 0.648660f,
+ 0.648514f, 0.648368f, 0.648222f, 0.648076f, 0.647930f, 0.647784f, 0.647638f, 0.647492f,
+ 0.647346f, 0.647200f, 0.647054f, 0.646907f, 0.646761f, 0.646615f, 0.646469f, 0.646322f,
+ 0.646176f, 0.646030f, 0.645883f, 0.645737f, 0.645590f, 0.645444f, 0.645298f, 0.645151f,
+ 0.645005f, 0.644858f, 0.644711f, 0.644565f, 0.644418f, 0.644272f, 0.644125f, 0.643978f,
+ 0.643832f, 0.643685f, 0.643538f, 0.643391f, 0.643245f, 0.643098f, 0.642951f, 0.642804f,
+ 0.642657f, 0.642510f, 0.642363f, 0.642216f, 0.642069f, 0.641922f, 0.641775f, 0.641628f,
+ 0.641481f, 0.641334f, 0.641187f, 0.641040f, 0.640892f, 0.640745f, 0.640598f, 0.640451f,
+ 0.640303f, 0.640156f, 0.640009f, 0.639862f, 0.639714f, 0.639567f, 0.639419f, 0.639272f,
+ 0.639124f, 0.638977f, 0.638829f, 0.638682f, 0.638534f, 0.638387f, 0.638239f, 0.638092f,
+ 0.637944f, 0.637796f, 0.637649f, 0.637501f, 0.637353f, 0.637205f, 0.637057f, 0.636910f,
+ 0.636762f, 0.636614f, 0.636466f, 0.636318f, 0.636170f, 0.636022f, 0.635874f, 0.635726f,
+ 0.635578f, 0.635430f, 0.635282f, 0.635134f, 0.634986f, 0.634838f, 0.634690f, 0.634542f,
+ 0.634393f, 0.634245f, 0.634097f, 0.633949f, 0.633800f, 0.633652f, 0.633504f, 0.633355f,
+ 0.633207f, 0.633058f, 0.632910f, 0.632761f, 0.632613f, 0.632464f, 0.632316f, 0.632167f,
+ 0.632019f, 0.631870f, 0.631721f, 0.631573f, 0.631424f, 0.631275f, 0.631127f, 0.630978f,
+ 0.630829f, 0.630680f, 0.630532f, 0.630383f, 0.630234f, 0.630085f, 0.629936f, 0.629787f,
+ 0.629638f, 0.629489f, 0.629340f, 0.629191f, 0.629042f, 0.628893f, 0.628744f, 0.628595f,
+ 0.628446f, 0.628297f, 0.628147f, 0.627998f, 0.627849f, 0.627700f, 0.627550f, 0.627401f,
+ 0.627252f, 0.627102f, 0.626953f, 0.626804f, 0.626654f, 0.626505f, 0.626355f, 0.626206f,
+ 0.626056f, 0.625907f, 0.625757f, 0.625608f, 0.625458f, 0.625309f, 0.625159f, 0.625009f,
+ 0.624860f, 0.624710f, 0.624560f, 0.624410f, 0.624260f, 0.624111f, 0.623961f, 0.623811f,
+ 0.623661f, 0.623511f, 0.623361f, 0.623211f, 0.623061f, 0.622911f, 0.622761f, 0.622611f,
+ 0.622461f, 0.622311f, 0.622161f, 0.622011f, 0.621861f, 0.621711f, 0.621560f, 0.621410f,
+ 0.621260f, 0.621110f, 0.620959f, 0.620809f, 0.620659f, 0.620508f, 0.620358f, 0.620208f,
+ 0.620057f, 0.619907f, 0.619756f, 0.619606f, 0.619455f, 0.619305f, 0.619154f, 0.619004f,
+ 0.618853f, 0.618702f, 0.618552f, 0.618401f, 0.618250f, 0.618100f, 0.617949f, 0.617798f,
+ 0.617647f, 0.617496f, 0.617346f, 0.617195f, 0.617044f, 0.616893f, 0.616742f, 0.616591f,
+ 0.616440f, 0.616289f, 0.616138f, 0.615987f, 0.615836f, 0.615685f, 0.615534f, 0.615383f,
+ 0.615232f, 0.615080f, 0.614929f, 0.614778f, 0.614627f, 0.614475f, 0.614324f, 0.614173f,
+ 0.614022f, 0.613870f, 0.613719f, 0.613567f, 0.613416f, 0.613265f, 0.613113f, 0.612962f,
+ 0.612810f, 0.612659f, 0.612507f, 0.612355f, 0.612204f, 0.612052f, 0.611901f, 0.611749f,
+ 0.611597f, 0.611445f, 0.611294f, 0.611142f, 0.610990f, 0.610838f, 0.610687f, 0.610535f,
+ 0.610383f, 0.610231f, 0.610079f, 0.609927f, 0.609775f, 0.609623f, 0.609471f, 0.609319f,
+ 0.609167f, 0.609015f, 0.608863f, 0.608711f, 0.608559f, 0.608406f, 0.608254f, 0.608102f,
+ 0.607950f, 0.607798f, 0.607645f, 0.607493f, 0.607341f, 0.607188f, 0.607036f, 0.606884f,
+ 0.606731f, 0.606579f, 0.606426f, 0.606274f, 0.606121f, 0.605969f, 0.605816f, 0.605664f,
+ 0.605511f, 0.605358f, 0.605206f, 0.605053f, 0.604900f, 0.604748f, 0.604595f, 0.604442f,
+ 0.604290f, 0.604137f, 0.603984f, 0.603831f, 0.603678f, 0.603525f, 0.603372f, 0.603220f,
+ 0.603067f, 0.602914f, 0.602761f, 0.602608f, 0.602455f, 0.602302f, 0.602148f, 0.601995f,
+ 0.601842f, 0.601689f, 0.601536f, 0.601383f, 0.601230f, 0.601076f, 0.600923f, 0.600770f,
+ 0.600616f, 0.600463f, 0.600310f, 0.600156f, 0.600003f, 0.599850f, 0.599696f, 0.599543f,
+ 0.599389f, 0.599236f, 0.599082f, 0.598929f, 0.598775f, 0.598622f, 0.598468f, 0.598314f,
+ 0.598161f, 0.598007f, 0.597853f, 0.597700f, 0.597546f, 0.597392f, 0.597238f, 0.597085f,
+ 0.596931f, 0.596777f, 0.596623f, 0.596469f, 0.596315f, 0.596161f, 0.596007f, 0.595853f,
+ 0.595699f, 0.595545f, 0.595391f, 0.595237f, 0.595083f, 0.594929f, 0.594775f, 0.594621f,
+ 0.594467f, 0.594312f, 0.594158f, 0.594004f, 0.593850f, 0.593695f, 0.593541f, 0.593387f,
+ 0.593232f, 0.593078f, 0.592924f, 0.592769f, 0.592615f, 0.592460f, 0.592306f, 0.592151f,
+ 0.591997f, 0.591842f, 0.591688f, 0.591533f, 0.591378f, 0.591224f, 0.591069f, 0.590914f,
+ 0.590760f, 0.590605f, 0.590450f, 0.590295f, 0.590141f, 0.589986f, 0.589831f, 0.589676f,
+ 0.589521f, 0.589366f, 0.589212f, 0.589057f, 0.588902f, 0.588747f, 0.588592f, 0.588437f,
+ 0.588282f, 0.588126f, 0.587971f, 0.587816f, 0.587661f, 0.587506f, 0.587351f, 0.587196f,
+ 0.587040f, 0.586885f, 0.586730f, 0.586575f, 0.586419f, 0.586264f, 0.586109f, 0.585953f,
+ 0.585798f, 0.585642f, 0.585487f, 0.585332f, 0.585176f, 0.585021f, 0.584865f, 0.584710f,
+ 0.584554f, 0.584398f, 0.584243f, 0.584087f, 0.583931f, 0.583776f, 0.583620f, 0.583464f,
+ 0.583309f, 0.583153f, 0.582997f, 0.582841f, 0.582685f, 0.582530f, 0.582374f, 0.582218f,
+ 0.582062f, 0.581906f, 0.581750f, 0.581594f, 0.581438f, 0.581282f, 0.581126f, 0.580970f,
+ 0.580814f, 0.580658f, 0.580502f, 0.580346f, 0.580189f, 0.580033f, 0.579877f, 0.579721f,
+ 0.579565f, 0.579408f, 0.579252f, 0.579096f, 0.578939f, 0.578783f, 0.578627f, 0.578470f,
+ 0.578314f, 0.578157f, 0.578001f, 0.577844f, 0.577688f, 0.577531f, 0.577375f, 0.577218f,
+ 0.577062f, 0.576905f, 0.576748f, 0.576592f, 0.576435f, 0.576278f, 0.576122f, 0.575965f,
+ 0.575808f, 0.575651f, 0.575495f, 0.575338f, 0.575181f, 0.575024f, 0.574867f, 0.574710f,
+ 0.574553f, 0.574396f, 0.574239f, 0.574082f, 0.573925f, 0.573768f, 0.573611f, 0.573454f,
+ 0.573297f, 0.573140f, 0.572983f, 0.572826f, 0.572669f, 0.572511f, 0.572354f, 0.572197f,
+ 0.572040f, 0.571882f, 0.571725f, 0.571568f, 0.571410f, 0.571253f, 0.571096f, 0.570938f,
+ 0.570781f, 0.570623f, 0.570466f, 0.570308f, 0.570151f, 0.569993f, 0.569836f, 0.569678f,
+ 0.569521f, 0.569363f, 0.569205f, 0.569048f, 0.568890f, 0.568732f, 0.568574f, 0.568417f,
+ 0.568259f, 0.568101f, 0.567943f, 0.567786f, 0.567628f, 0.567470f, 0.567312f, 0.567154f,
+ 0.566996f, 0.566838f, 0.566680f, 0.566522f, 0.566364f, 0.566206f, 0.566048f, 0.565890f,
+ 0.565732f, 0.565574f, 0.565416f, 0.565257f, 0.565099f, 0.564941f, 0.564783f, 0.564624f,
+ 0.564466f, 0.564308f, 0.564150f, 0.563991f, 0.563833f, 0.563675f, 0.563516f, 0.563358f,
+ 0.563199f, 0.563041f, 0.562882f, 0.562724f, 0.562565f, 0.562407f, 0.562248f, 0.562090f,
+ 0.561931f, 0.561773f, 0.561614f, 0.561455f, 0.561297f, 0.561138f, 0.560979f, 0.560820f,
+ 0.560662f, 0.560503f, 0.560344f, 0.560185f, 0.560026f, 0.559867f, 0.559709f, 0.559550f,
+ 0.559391f, 0.559232f, 0.559073f, 0.558914f, 0.558755f, 0.558596f, 0.558437f, 0.558278f,
+ 0.558119f, 0.557959f, 0.557800f, 0.557641f, 0.557482f, 0.557323f, 0.557164f, 0.557004f,
+ 0.556845f, 0.556686f, 0.556526f, 0.556367f, 0.556208f, 0.556048f, 0.555889f, 0.555730f,
+ 0.555570f, 0.555411f, 0.555251f, 0.555092f, 0.554932f, 0.554773f, 0.554613f, 0.554454f,
+ 0.554294f, 0.554134f, 0.553975f, 0.553815f, 0.553656f, 0.553496f, 0.553336f, 0.553176f,
+ 0.553017f, 0.552857f, 0.552697f, 0.552537f, 0.552378f, 0.552218f, 0.552058f, 0.551898f,
+ 0.551738f, 0.551578f, 0.551418f, 0.551258f, 0.551098f, 0.550938f, 0.550778f, 0.550618f,
+ 0.550458f, 0.550298f, 0.550138f, 0.549978f, 0.549818f, 0.549657f, 0.549497f, 0.549337f,
+ 0.549177f, 0.549016f, 0.548856f, 0.548696f, 0.548536f, 0.548375f, 0.548215f, 0.548054f,
+ 0.547894f, 0.547734f, 0.547573f, 0.547413f, 0.547252f, 0.547092f, 0.546931f, 0.546771f,
+ 0.546610f, 0.546450f, 0.546289f, 0.546128f, 0.545968f, 0.545807f, 0.545646f, 0.545486f,
+ 0.545325f, 0.545164f, 0.545003f, 0.544843f, 0.544682f, 0.544521f, 0.544360f, 0.544199f,
+ 0.544039f, 0.543878f, 0.543717f, 0.543556f, 0.543395f, 0.543234f, 0.543073f, 0.542912f,
+ 0.542751f, 0.542590f, 0.542429f, 0.542268f, 0.542106f, 0.541945f, 0.541784f, 0.541623f,
+ 0.541462f, 0.541301f, 0.541139f, 0.540978f, 0.540817f, 0.540655f, 0.540494f, 0.540333f,
+ 0.540171f, 0.540010f, 0.539849f, 0.539687f, 0.539526f, 0.539364f, 0.539203f, 0.539041f,
+ 0.538880f, 0.538718f, 0.538557f, 0.538395f, 0.538234f, 0.538072f, 0.537910f, 0.537749f,
+ 0.537587f, 0.537425f, 0.537264f, 0.537102f, 0.536940f, 0.536778f, 0.536617f, 0.536455f,
+ 0.536293f, 0.536131f, 0.535969f, 0.535807f, 0.535645f, 0.535484f, 0.535322f, 0.535160f,
+ 0.534998f, 0.534836f, 0.534674f, 0.534512f, 0.534349f, 0.534187f, 0.534025f, 0.533863f,
+ 0.533701f, 0.533539f, 0.533377f, 0.533214f, 0.533052f, 0.532890f, 0.532728f, 0.532565f,
+ 0.532403f, 0.532241f, 0.532078f, 0.531916f, 0.531754f, 0.531591f, 0.531429f, 0.531266f,
+ 0.531104f, 0.530942f, 0.530779f, 0.530617f, 0.530454f, 0.530291f, 0.530129f, 0.529966f,
+ 0.529804f, 0.529641f, 0.529478f, 0.529316f, 0.529153f, 0.528990f, 0.528828f, 0.528665f,
+ 0.528502f, 0.528339f, 0.528176f, 0.528014f, 0.527851f, 0.527688f, 0.527525f, 0.527362f,
+ 0.527199f, 0.527036f, 0.526873f, 0.526710f, 0.526547f, 0.526384f, 0.526221f, 0.526058f,
+ 0.525895f, 0.525732f, 0.525569f, 0.525406f, 0.525243f, 0.525079f, 0.524916f, 0.524753f,
+ 0.524590f, 0.524426f, 0.524263f, 0.524100f, 0.523937f, 0.523773f, 0.523610f, 0.523447f,
+ 0.523283f, 0.523120f, 0.522956f, 0.522793f, 0.522629f, 0.522466f, 0.522302f, 0.522139f,
+ 0.521975f, 0.521812f, 0.521648f, 0.521485f, 0.521321f, 0.521157f, 0.520994f, 0.520830f,
+ 0.520666f, 0.520503f, 0.520339f, 0.520175f, 0.520011f, 0.519848f, 0.519684f, 0.519520f,
+ 0.519356f, 0.519192f, 0.519028f, 0.518864f, 0.518700f, 0.518536f, 0.518372f, 0.518209f,
+ 0.518045f, 0.517880f, 0.517716f, 0.517552f, 0.517388f, 0.517224f, 0.517060f, 0.516896f,
+ 0.516732f, 0.516568f, 0.516403f, 0.516239f, 0.516075f, 0.515911f, 0.515746f, 0.515582f,
+ 0.515418f, 0.515254f, 0.515089f, 0.514925f, 0.514760f, 0.514596f, 0.514432f, 0.514267f,
+ 0.514103f, 0.513938f, 0.513774f, 0.513609f, 0.513445f, 0.513280f, 0.513116f, 0.512951f,
+ 0.512786f, 0.512622f, 0.512457f, 0.512292f, 0.512128f, 0.511963f, 0.511798f, 0.511634f,
+ 0.511469f, 0.511304f, 0.511139f, 0.510974f, 0.510810f, 0.510645f, 0.510480f, 0.510315f,
+ 0.510150f, 0.509985f, 0.509820f, 0.509655f, 0.509490f, 0.509325f, 0.509160f, 0.508995f,
+ 0.508830f, 0.508665f, 0.508500f, 0.508335f, 0.508170f, 0.508005f, 0.507839f, 0.507674f,
+ 0.507509f, 0.507344f, 0.507179f, 0.507013f, 0.506848f, 0.506683f, 0.506517f, 0.506352f,
+ 0.506187f, 0.506021f, 0.505856f, 0.505690f, 0.505525f, 0.505360f, 0.505194f, 0.505029f,
+ 0.504863f, 0.504698f, 0.504532f, 0.504366f, 0.504201f, 0.504035f, 0.503870f, 0.503704f,
+ 0.503538f, 0.503373f, 0.503207f, 0.503041f, 0.502876f, 0.502710f, 0.502544f, 0.502378f,
+ 0.502212f, 0.502047f, 0.501881f, 0.501715f, 0.501549f, 0.501383f, 0.501217f, 0.501051f,
+ 0.500885f, 0.500719f, 0.500553f, 0.500387f, 0.500221f, 0.500055f, 0.499889f, 0.499723f,
+ 0.499557f, 0.499391f, 0.499225f, 0.499059f, 0.498893f, 0.498726f, 0.498560f, 0.498394f,
+ 0.498228f, 0.498061f, 0.497895f, 0.497729f, 0.497562f, 0.497396f, 0.497230f, 0.497063f,
+ 0.496897f, 0.496731f, 0.496564f, 0.496398f, 0.496231f, 0.496065f, 0.495898f, 0.495732f,
+ 0.495565f, 0.495399f, 0.495232f, 0.495066f, 0.494899f, 0.494732f, 0.494566f, 0.494399f,
+ 0.494232f, 0.494066f, 0.493899f, 0.493732f, 0.493565f, 0.493399f, 0.493232f, 0.493065f,
+ 0.492898f, 0.492731f, 0.492564f, 0.492398f, 0.492231f, 0.492064f, 0.491897f, 0.491730f,
+ 0.491563f, 0.491396f, 0.491229f, 0.491062f, 0.490895f, 0.490728f, 0.490561f, 0.490394f,
+ 0.490226f, 0.490059f, 0.489892f, 0.489725f, 0.489558f, 0.489391f, 0.489223f, 0.489056f,
+ 0.488889f, 0.488722f, 0.488554f, 0.488387f, 0.488220f, 0.488052f, 0.487885f, 0.487718f,
+ 0.487550f, 0.487383f, 0.487215f, 0.487048f, 0.486880f, 0.486713f, 0.486545f, 0.486378f,
+ 0.486210f, 0.486043f, 0.485875f, 0.485708f, 0.485540f, 0.485372f, 0.485205f, 0.485037f,
+ 0.484869f, 0.484702f, 0.484534f, 0.484366f, 0.484198f, 0.484031f, 0.483863f, 0.483695f,
+ 0.483527f, 0.483359f, 0.483191f, 0.483023f, 0.482856f, 0.482688f, 0.482520f, 0.482352f,
+ 0.482184f, 0.482016f, 0.481848f, 0.481680f, 0.481512f, 0.481344f, 0.481176f, 0.481007f,
+ 0.480839f, 0.480671f, 0.480503f, 0.480335f, 0.480167f, 0.479998f, 0.479830f, 0.479662f,
+ 0.479494f, 0.479325f, 0.479157f, 0.478989f, 0.478821f, 0.478652f, 0.478484f, 0.478315f,
+ 0.478147f, 0.477979f, 0.477810f, 0.477642f, 0.477473f, 0.477305f, 0.477136f, 0.476968f,
+ 0.476799f, 0.476631f, 0.476462f, 0.476294f, 0.476125f, 0.475956f, 0.475788f, 0.475619f,
+ 0.475450f, 0.475282f, 0.475113f, 0.474944f, 0.474775f, 0.474607f, 0.474438f, 0.474269f,
+ 0.474100f, 0.473931f, 0.473763f, 0.473594f, 0.473425f, 0.473256f, 0.473087f, 0.472918f,
+ 0.472749f, 0.472580f, 0.472411f, 0.472242f, 0.472073f, 0.471904f, 0.471735f, 0.471566f,
+ 0.471397f, 0.471228f, 0.471058f, 0.470889f, 0.470720f, 0.470551f, 0.470382f, 0.470213f,
+ 0.470043f, 0.469874f, 0.469705f, 0.469536f, 0.469366f, 0.469197f, 0.469028f, 0.468858f,
+ 0.468689f, 0.468519f, 0.468350f, 0.468181f, 0.468011f, 0.467842f, 0.467672f, 0.467503f,
+ 0.467333f, 0.467164f, 0.466994f, 0.466825f, 0.466655f, 0.466485f, 0.466316f, 0.466146f,
+ 0.465977f, 0.465807f, 0.465637f, 0.465467f, 0.465298f, 0.465128f, 0.464958f, 0.464788f,
+ 0.464619f, 0.464449f, 0.464279f, 0.464109f, 0.463939f, 0.463769f, 0.463600f, 0.463430f,
+ 0.463260f, 0.463090f, 0.462920f, 0.462750f, 0.462580f, 0.462410f, 0.462240f, 0.462070f,
+ 0.461900f, 0.461730f, 0.461560f, 0.461390f, 0.461219f, 0.461049f, 0.460879f, 0.460709f,
+ 0.460539f, 0.460369f, 0.460198f, 0.460028f, 0.459858f, 0.459687f, 0.459517f, 0.459347f,
+ 0.459177f, 0.459006f, 0.458836f, 0.458665f, 0.458495f, 0.458325f, 0.458154f, 0.457984f,
+ 0.457813f, 0.457643f, 0.457472f, 0.457302f, 0.457131f, 0.456961f, 0.456790f, 0.456620f,
+ 0.456449f, 0.456278f, 0.456108f, 0.455937f, 0.455766f, 0.455596f, 0.455425f, 0.455254f,
+ 0.455084f, 0.454913f, 0.454742f, 0.454571f, 0.454400f, 0.454230f, 0.454059f, 0.453888f,
+ 0.453717f, 0.453546f, 0.453375f, 0.453204f, 0.453033f, 0.452863f, 0.452692f, 0.452521f,
+ 0.452350f, 0.452179f, 0.452008f, 0.451836f, 0.451665f, 0.451494f, 0.451323f, 0.451152f,
+ 0.450981f, 0.450810f, 0.450639f, 0.450467f, 0.450296f, 0.450125f, 0.449954f, 0.449783f,
+ 0.449611f, 0.449440f, 0.449269f, 0.449097f, 0.448926f, 0.448755f, 0.448583f, 0.448412f,
+ 0.448241f, 0.448069f, 0.447898f, 0.447726f, 0.447555f, 0.447383f, 0.447212f, 0.447040f,
+ 0.446869f, 0.446697f, 0.446526f, 0.446354f, 0.446183f, 0.446011f, 0.445839f, 0.445668f,
+ 0.445496f, 0.445324f, 0.445153f, 0.444981f, 0.444809f, 0.444637f, 0.444466f, 0.444294f,
+ 0.444122f, 0.443950f, 0.443779f, 0.443607f, 0.443435f, 0.443263f, 0.443091f, 0.442919f,
+ 0.442747f, 0.442575f, 0.442403f, 0.442231f, 0.442059f, 0.441887f, 0.441715f, 0.441543f,
+ 0.441371f, 0.441199f, 0.441027f, 0.440855f, 0.440683f, 0.440511f, 0.440339f, 0.440166f,
+ 0.439994f, 0.439822f, 0.439650f, 0.439478f, 0.439305f, 0.439133f, 0.438961f, 0.438789f,
+ 0.438616f, 0.438444f, 0.438272f, 0.438099f, 0.437927f, 0.437754f, 0.437582f, 0.437410f,
+ 0.437237f, 0.437065f, 0.436892f, 0.436720f, 0.436547f, 0.436375f, 0.436202f, 0.436030f,
+ 0.435857f, 0.435685f, 0.435512f, 0.435339f, 0.435167f, 0.434994f, 0.434821f, 0.434649f,
+ 0.434476f, 0.434303f, 0.434131f, 0.433958f, 0.433785f, 0.433612f, 0.433439f, 0.433267f,
+ 0.433094f, 0.432921f, 0.432748f, 0.432575f, 0.432402f, 0.432229f, 0.432057f, 0.431884f,
+ 0.431711f, 0.431538f, 0.431365f, 0.431192f, 0.431019f, 0.430846f, 0.430673f, 0.430500f,
+ 0.430326f, 0.430153f, 0.429980f, 0.429807f, 0.429634f, 0.429461f, 0.429288f, 0.429114f,
+ 0.428941f, 0.428768f, 0.428595f, 0.428422f, 0.428248f, 0.428075f, 0.427902f, 0.427728f,
+ 0.427555f, 0.427382f, 0.427208f, 0.427035f, 0.426862f, 0.426688f, 0.426515f, 0.426341f,
+ 0.426168f, 0.425994f, 0.425821f, 0.425647f, 0.425474f, 0.425300f, 0.425127f, 0.424953f,
+ 0.424780f, 0.424606f, 0.424432f, 0.424259f, 0.424085f, 0.423912f, 0.423738f, 0.423564f,
+ 0.423390f, 0.423217f, 0.423043f, 0.422869f, 0.422695f, 0.422522f, 0.422348f, 0.422174f,
+ 0.422000f, 0.421826f, 0.421653f, 0.421479f, 0.421305f, 0.421131f, 0.420957f, 0.420783f,
+ 0.420609f, 0.420435f, 0.420261f, 0.420087f, 0.419913f, 0.419739f, 0.419565f, 0.419391f,
+ 0.419217f, 0.419043f, 0.418869f, 0.418695f, 0.418520f, 0.418346f, 0.418172f, 0.417998f,
+ 0.417824f, 0.417650f, 0.417475f, 0.417301f, 0.417127f, 0.416952f, 0.416778f, 0.416604f,
+ 0.416430f, 0.416255f, 0.416081f, 0.415906f, 0.415732f, 0.415558f, 0.415383f, 0.415209f,
+ 0.415034f, 0.414860f, 0.414685f, 0.414511f, 0.414337f, 0.414162f, 0.413987f, 0.413813f,
+ 0.413638f, 0.413464f, 0.413289f, 0.413115f, 0.412940f, 0.412765f, 0.412591f, 0.412416f,
+ 0.412241f, 0.412067f, 0.411892f, 0.411717f, 0.411542f, 0.411368f, 0.411193f, 0.411018f,
+ 0.410843f, 0.410668f, 0.410493f, 0.410319f, 0.410144f, 0.409969f, 0.409794f, 0.409619f,
+ 0.409444f, 0.409269f, 0.409094f, 0.408919f, 0.408744f, 0.408569f, 0.408394f, 0.408219f,
+ 0.408044f, 0.407869f, 0.407694f, 0.407519f, 0.407344f, 0.407169f, 0.406994f, 0.406818f,
+ 0.406643f, 0.406468f, 0.406293f, 0.406118f, 0.405942f, 0.405767f, 0.405592f, 0.405417f,
+ 0.405241f, 0.405066f, 0.404891f, 0.404715f, 0.404540f, 0.404365f, 0.404189f, 0.404014f,
+ 0.403838f, 0.403663f, 0.403488f, 0.403312f, 0.403137f, 0.402961f, 0.402786f, 0.402610f,
+ 0.402435f, 0.402259f, 0.402084f, 0.401908f, 0.401732f, 0.401557f, 0.401381f, 0.401206f,
+ 0.401030f, 0.400854f, 0.400679f, 0.400503f, 0.400327f, 0.400151f, 0.399976f, 0.399800f,
+ 0.399624f, 0.399448f, 0.399273f, 0.399097f, 0.398921f, 0.398745f, 0.398569f, 0.398393f,
+ 0.398218f, 0.398042f, 0.397866f, 0.397690f, 0.397514f, 0.397338f, 0.397162f, 0.396986f,
+ 0.396810f, 0.396634f, 0.396458f, 0.396282f, 0.396106f, 0.395930f, 0.395754f, 0.395578f,
+ 0.395401f, 0.395225f, 0.395049f, 0.394873f, 0.394697f, 0.394521f, 0.394344f, 0.394168f,
+ 0.393992f, 0.393816f, 0.393640f, 0.393463f, 0.393287f, 0.393111f, 0.392934f, 0.392758f,
+ 0.392582f, 0.392405f, 0.392229f, 0.392053f, 0.391876f, 0.391700f, 0.391523f, 0.391347f,
+ 0.391170f, 0.390994f, 0.390817f, 0.390641f, 0.390464f, 0.390288f, 0.390111f, 0.389935f,
+ 0.389758f, 0.389582f, 0.389405f, 0.389228f, 0.389052f, 0.388875f, 0.388698f, 0.388522f,
+ 0.388345f, 0.388168f, 0.387992f, 0.387815f, 0.387638f, 0.387461f, 0.387285f, 0.387108f,
+ 0.386931f, 0.386754f, 0.386577f, 0.386400f, 0.386224f, 0.386047f, 0.385870f, 0.385693f,
+ 0.385516f, 0.385339f, 0.385162f, 0.384985f, 0.384808f, 0.384631f, 0.384454f, 0.384277f,
+ 0.384100f, 0.383923f, 0.383746f, 0.383569f, 0.383392f, 0.383215f, 0.383038f, 0.382861f,
+ 0.382683f, 0.382506f, 0.382329f, 0.382152f, 0.381975f, 0.381797f, 0.381620f, 0.381443f,
+ 0.381266f, 0.381088f, 0.380911f, 0.380734f, 0.380557f, 0.380379f, 0.380202f, 0.380025f,
+ 0.379847f, 0.379670f, 0.379492f, 0.379315f, 0.379138f, 0.378960f, 0.378783f, 0.378605f,
+ 0.378428f, 0.378250f, 0.378073f, 0.377895f, 0.377718f, 0.377540f, 0.377363f, 0.377185f,
+ 0.377007f, 0.376830f, 0.376652f, 0.376475f, 0.376297f, 0.376119f, 0.375942f, 0.375764f,
+ 0.375586f, 0.375408f, 0.375231f, 0.375053f, 0.374875f, 0.374697f, 0.374520f, 0.374342f,
+ 0.374164f, 0.373986f, 0.373808f, 0.373631f, 0.373453f, 0.373275f, 0.373097f, 0.372919f,
+ 0.372741f, 0.372563f, 0.372385f, 0.372207f, 0.372029f, 0.371851f, 0.371673f, 0.371495f,
+ 0.371317f, 0.371139f, 0.370961f, 0.370783f, 0.370605f, 0.370427f, 0.370249f, 0.370071f,
+ 0.369892f, 0.369714f, 0.369536f, 0.369358f, 0.369180f, 0.369002f, 0.368823f, 0.368645f,
+ 0.368467f, 0.368289f, 0.368110f, 0.367932f, 0.367754f, 0.367575f, 0.367397f, 0.367219f,
+ 0.367040f, 0.366862f, 0.366684f, 0.366505f, 0.366327f, 0.366148f, 0.365970f, 0.365791f,
+ 0.365613f, 0.365435f, 0.365256f, 0.365078f, 0.364899f, 0.364720f, 0.364542f, 0.364363f,
+ 0.364185f, 0.364006f, 0.363828f, 0.363649f, 0.363470f, 0.363292f, 0.363113f, 0.362934f,
+ 0.362756f, 0.362577f, 0.362398f, 0.362220f, 0.362041f, 0.361862f, 0.361683f, 0.361505f,
+ 0.361326f, 0.361147f, 0.360968f, 0.360789f, 0.360611f, 0.360432f, 0.360253f, 0.360074f,
+ 0.359895f, 0.359716f, 0.359537f, 0.359358f, 0.359179f, 0.359000f, 0.358821f, 0.358642f,
+ 0.358463f, 0.358284f, 0.358105f, 0.357926f, 0.357747f, 0.357568f, 0.357389f, 0.357210f,
+ 0.357031f, 0.356852f, 0.356673f, 0.356494f, 0.356314f, 0.356135f, 0.355956f, 0.355777f,
+ 0.355598f, 0.355418f, 0.355239f, 0.355060f, 0.354881f, 0.354701f, 0.354522f, 0.354343f,
+ 0.354164f, 0.353984f, 0.353805f, 0.353626f, 0.353446f, 0.353267f, 0.353087f, 0.352908f,
+ 0.352729f, 0.352549f, 0.352370f, 0.352190f, 0.352011f, 0.351831f, 0.351652f, 0.351472f,
+ 0.351293f, 0.351113f, 0.350934f, 0.350754f, 0.350575f, 0.350395f, 0.350215f, 0.350036f,
+ 0.349856f, 0.349676f, 0.349497f, 0.349317f, 0.349138f, 0.348958f, 0.348778f, 0.348598f,
+ 0.348419f, 0.348239f, 0.348059f, 0.347879f, 0.347700f, 0.347520f, 0.347340f, 0.347160f,
+ 0.346980f, 0.346801f, 0.346621f, 0.346441f, 0.346261f, 0.346081f, 0.345901f, 0.345721f,
+ 0.345541f, 0.345361f, 0.345181f, 0.345001f, 0.344821f, 0.344641f, 0.344461f, 0.344281f,
+ 0.344101f, 0.343921f, 0.343741f, 0.343561f, 0.343381f, 0.343201f, 0.343021f, 0.342841f,
+ 0.342661f, 0.342481f, 0.342300f, 0.342120f, 0.341940f, 0.341760f, 0.341580f, 0.341399f,
+ 0.341219f, 0.341039f, 0.340859f, 0.340678f, 0.340498f, 0.340318f, 0.340138f, 0.339957f,
+ 0.339777f, 0.339597f, 0.339416f, 0.339236f, 0.339055f, 0.338875f, 0.338695f, 0.338514f,
+ 0.338334f, 0.338153f, 0.337973f, 0.337792f, 0.337612f, 0.337431f, 0.337251f, 0.337070f,
+ 0.336890f, 0.336709f, 0.336529f, 0.336348f, 0.336168f, 0.335987f, 0.335806f, 0.335626f,
+ 0.335445f, 0.335265f, 0.335084f, 0.334903f, 0.334722f, 0.334542f, 0.334361f, 0.334180f,
+ 0.334000f, 0.333819f, 0.333638f, 0.333457f, 0.333277f, 0.333096f, 0.332915f, 0.332734f,
+ 0.332553f, 0.332373f, 0.332192f, 0.332011f, 0.331830f, 0.331649f, 0.331468f, 0.331287f,
+ 0.331106f, 0.330925f, 0.330744f, 0.330563f, 0.330382f, 0.330202f, 0.330020f, 0.329839f,
+ 0.329658f, 0.329477f, 0.329296f, 0.329115f, 0.328934f, 0.328753f, 0.328572f, 0.328391f,
+ 0.328210f, 0.328029f, 0.327848f, 0.327666f, 0.327485f, 0.327304f, 0.327123f, 0.326942f,
+ 0.326760f, 0.326579f, 0.326398f, 0.326217f, 0.326035f, 0.325854f, 0.325673f, 0.325492f,
+ 0.325310f, 0.325129f, 0.324948f, 0.324766f, 0.324585f, 0.324404f, 0.324222f, 0.324041f,
+ 0.323859f, 0.323678f, 0.323497f, 0.323315f, 0.323134f, 0.322952f, 0.322771f, 0.322589f,
+ 0.322408f, 0.322226f, 0.322045f, 0.321863f, 0.321682f, 0.321500f, 0.321318f, 0.321137f,
+ 0.320955f, 0.320774f, 0.320592f, 0.320410f, 0.320229f, 0.320047f, 0.319865f, 0.319684f,
+ 0.319502f, 0.319320f, 0.319139f, 0.318957f, 0.318775f, 0.318593f, 0.318412f, 0.318230f,
+ 0.318048f, 0.317866f, 0.317684f, 0.317503f, 0.317321f, 0.317139f, 0.316957f, 0.316775f,
+ 0.316593f, 0.316411f, 0.316230f, 0.316048f, 0.315866f, 0.315684f, 0.315502f, 0.315320f,
+ 0.315138f, 0.314956f, 0.314774f, 0.314592f, 0.314410f, 0.314228f, 0.314046f, 0.313864f,
+ 0.313682f, 0.313500f, 0.313318f, 0.313135f, 0.312953f, 0.312771f, 0.312589f, 0.312407f,
+ 0.312225f, 0.312043f, 0.311860f, 0.311678f, 0.311496f, 0.311314f, 0.311132f, 0.310949f,
+ 0.310767f, 0.310585f, 0.310403f, 0.310220f, 0.310038f, 0.309856f, 0.309673f, 0.309491f,
+ 0.309309f, 0.309126f, 0.308944f, 0.308762f, 0.308579f, 0.308397f, 0.308214f, 0.308032f,
+ 0.307850f, 0.307667f, 0.307485f, 0.307302f, 0.307120f, 0.306937f, 0.306755f, 0.306572f,
+ 0.306390f, 0.306207f, 0.306025f, 0.305842f, 0.305660f, 0.305477f, 0.305294f, 0.305112f,
+ 0.304929f, 0.304747f, 0.304564f, 0.304381f, 0.304199f, 0.304016f, 0.303833f, 0.303651f,
+ 0.303468f, 0.303285f, 0.303103f, 0.302920f, 0.302737f, 0.302554f, 0.302372f, 0.302189f,
+ 0.302006f, 0.301823f, 0.301640f, 0.301458f, 0.301275f, 0.301092f, 0.300909f, 0.300726f,
+ 0.300543f, 0.300360f, 0.300177f, 0.299995f, 0.299812f, 0.299629f, 0.299446f, 0.299263f,
+ 0.299080f, 0.298897f, 0.298714f, 0.298531f, 0.298348f, 0.298165f, 0.297982f, 0.297799f,
+ 0.297616f, 0.297433f, 0.297250f, 0.297066f, 0.296883f, 0.296700f, 0.296517f, 0.296334f,
+ 0.296151f, 0.295968f, 0.295785f, 0.295601f, 0.295418f, 0.295235f, 0.295052f, 0.294869f,
+ 0.294685f, 0.294502f, 0.294319f, 0.294136f, 0.293952f, 0.293769f, 0.293586f, 0.293402f,
+ 0.293219f, 0.293036f, 0.292852f, 0.292669f, 0.292486f, 0.292302f, 0.292119f, 0.291936f,
+ 0.291752f, 0.291569f, 0.291385f, 0.291202f, 0.291019f, 0.290835f, 0.290652f, 0.290468f,
+ 0.290285f, 0.290101f, 0.289918f, 0.289734f, 0.289551f, 0.289367f, 0.289184f, 0.289000f,
+ 0.288816f, 0.288633f, 0.288449f, 0.288266f, 0.288082f, 0.287898f, 0.287715f, 0.287531f,
+ 0.287347f, 0.287164f, 0.286980f, 0.286796f, 0.286613f, 0.286429f, 0.286245f, 0.286062f,
+ 0.285878f, 0.285694f, 0.285510f, 0.285327f, 0.285143f, 0.284959f, 0.284775f, 0.284591f,
+ 0.284408f, 0.284224f, 0.284040f, 0.283856f, 0.283672f, 0.283488f, 0.283304f, 0.283120f,
+ 0.282937f, 0.282753f, 0.282569f, 0.282385f, 0.282201f, 0.282017f, 0.281833f, 0.281649f,
+ 0.281465f, 0.281281f, 0.281097f, 0.280913f, 0.280729f, 0.280545f, 0.280361f, 0.280177f,
+ 0.279993f, 0.279809f, 0.279624f, 0.279440f, 0.279256f, 0.279072f, 0.278888f, 0.278704f,
+ 0.278520f, 0.278336f, 0.278151f, 0.277967f, 0.277783f, 0.277599f, 0.277415f, 0.277230f,
+ 0.277046f, 0.276862f, 0.276678f, 0.276493f, 0.276309f, 0.276125f, 0.275940f, 0.275756f,
+ 0.275572f, 0.275387f, 0.275203f, 0.275019f, 0.274834f, 0.274650f, 0.274466f, 0.274281f,
+ 0.274097f, 0.273912f, 0.273728f, 0.273544f, 0.273359f, 0.273175f, 0.272990f, 0.272806f,
+ 0.272621f, 0.272437f, 0.272252f, 0.272068f, 0.271883f, 0.271699f, 0.271514f, 0.271330f,
+ 0.271145f, 0.270961f, 0.270776f, 0.270591f, 0.270407f, 0.270222f, 0.270038f, 0.269853f,
+ 0.269668f, 0.269484f, 0.269299f, 0.269114f, 0.268930f, 0.268745f, 0.268560f, 0.268376f,
+ 0.268191f, 0.268006f, 0.267821f, 0.267637f, 0.267452f, 0.267267f, 0.267082f, 0.266898f,
+ 0.266713f, 0.266528f, 0.266343f, 0.266158f, 0.265973f, 0.265789f, 0.265604f, 0.265419f,
+ 0.265234f, 0.265049f, 0.264864f, 0.264679f, 0.264494f, 0.264309f, 0.264125f, 0.263940f,
+ 0.263755f, 0.263570f, 0.263385f, 0.263200f, 0.263015f, 0.262830f, 0.262645f, 0.262460f,
+ 0.262275f, 0.262090f, 0.261905f, 0.261720f, 0.261534f, 0.261349f, 0.261164f, 0.260979f,
+ 0.260794f, 0.260609f, 0.260424f, 0.260239f, 0.260054f, 0.259868f, 0.259683f, 0.259498f,
+ 0.259313f, 0.259128f, 0.258943f, 0.258757f, 0.258572f, 0.258387f, 0.258202f, 0.258016f,
+ 0.257831f, 0.257646f, 0.257461f, 0.257275f, 0.257090f, 0.256905f, 0.256719f, 0.256534f,
+ 0.256349f, 0.256163f, 0.255978f, 0.255793f, 0.255607f, 0.255422f, 0.255236f, 0.255051f,
+ 0.254866f, 0.254680f, 0.254495f, 0.254309f, 0.254124f, 0.253938f, 0.253753f, 0.253568f,
+ 0.253382f, 0.253197f, 0.253011f, 0.252826f, 0.252640f, 0.252454f, 0.252269f, 0.252083f,
+ 0.251898f, 0.251712f, 0.251527f, 0.251341f, 0.251155f, 0.250970f, 0.250784f, 0.250599f,
+ 0.250413f, 0.250227f, 0.250042f, 0.249856f, 0.249670f, 0.249485f, 0.249299f, 0.249113f,
+ 0.248928f, 0.248742f, 0.248556f, 0.248370f, 0.248185f, 0.247999f, 0.247813f, 0.247627f,
+ 0.247442f, 0.247256f, 0.247070f, 0.246884f, 0.246698f, 0.246513f, 0.246327f, 0.246141f,
+ 0.245955f, 0.245769f, 0.245583f, 0.245397f, 0.245212f, 0.245026f, 0.244840f, 0.244654f,
+ 0.244468f, 0.244282f, 0.244096f, 0.243910f, 0.243724f, 0.243538f, 0.243352f, 0.243166f,
+ 0.242980f, 0.242794f, 0.242608f, 0.242422f, 0.242236f, 0.242050f, 0.241864f, 0.241678f,
+ 0.241492f, 0.241306f, 0.241120f, 0.240934f, 0.240748f, 0.240561f, 0.240375f, 0.240189f,
+ 0.240003f, 0.239817f, 0.239631f, 0.239445f, 0.239258f, 0.239072f, 0.238886f, 0.238700f,
+ 0.238514f, 0.238327f, 0.238141f, 0.237955f, 0.237769f, 0.237582f, 0.237396f, 0.237210f,
+ 0.237024f, 0.236837f, 0.236651f, 0.236465f, 0.236278f, 0.236092f, 0.235906f, 0.235719f,
+ 0.235533f, 0.235347f, 0.235160f, 0.234974f, 0.234788f, 0.234601f, 0.234415f, 0.234228f,
+ 0.234042f, 0.233856f, 0.233669f, 0.233483f, 0.233296f, 0.233110f, 0.232923f, 0.232737f,
+ 0.232550f, 0.232364f, 0.232177f, 0.231991f, 0.231804f, 0.231618f, 0.231431f, 0.231245f,
+ 0.231058f, 0.230872f, 0.230685f, 0.230498f, 0.230312f, 0.230125f, 0.229939f, 0.229752f,
+ 0.229565f, 0.229379f, 0.229192f, 0.229005f, 0.228819f, 0.228632f, 0.228445f, 0.228259f,
+ 0.228072f, 0.227885f, 0.227699f, 0.227512f, 0.227325f, 0.227139f, 0.226952f, 0.226765f,
+ 0.226578f, 0.226391f, 0.226205f, 0.226018f, 0.225831f, 0.225644f, 0.225458f, 0.225271f,
+ 0.225084f, 0.224897f, 0.224710f, 0.224523f, 0.224337f, 0.224150f, 0.223963f, 0.223776f,
+ 0.223589f, 0.223402f, 0.223215f, 0.223028f, 0.222841f, 0.222654f, 0.222468f, 0.222281f,
+ 0.222094f, 0.221907f, 0.221720f, 0.221533f, 0.221346f, 0.221159f, 0.220972f, 0.220785f,
+ 0.220598f, 0.220411f, 0.220224f, 0.220037f, 0.219850f, 0.219662f, 0.219475f, 0.219288f,
+ 0.219101f, 0.218914f, 0.218727f, 0.218540f, 0.218353f, 0.218166f, 0.217979f, 0.217791f,
+ 0.217604f, 0.217417f, 0.217230f, 0.217043f, 0.216856f, 0.216668f, 0.216481f, 0.216294f,
+ 0.216107f, 0.215920f, 0.215732f, 0.215545f, 0.215358f, 0.215171f, 0.214983f, 0.214796f,
+ 0.214609f, 0.214422f, 0.214234f, 0.214047f, 0.213860f, 0.213672f, 0.213485f, 0.213298f,
+ 0.213110f, 0.212923f, 0.212736f, 0.212548f, 0.212361f, 0.212174f, 0.211986f, 0.211799f,
+ 0.211611f, 0.211424f, 0.211237f, 0.211049f, 0.210862f, 0.210674f, 0.210487f, 0.210299f,
+ 0.210112f, 0.209924f, 0.209737f, 0.209549f, 0.209362f, 0.209174f, 0.208987f, 0.208799f,
+ 0.208612f, 0.208424f, 0.208237f, 0.208049f, 0.207862f, 0.207674f, 0.207487f, 0.207299f,
+ 0.207111f, 0.206924f, 0.206736f, 0.206549f, 0.206361f, 0.206173f, 0.205986f, 0.205798f,
+ 0.205610f, 0.205423f, 0.205235f, 0.205047f, 0.204860f, 0.204672f, 0.204484f, 0.204297f,
+ 0.204109f, 0.203921f, 0.203734f, 0.203546f, 0.203358f, 0.203170f, 0.202983f, 0.202795f,
+ 0.202607f, 0.202419f, 0.202231f, 0.202044f, 0.201856f, 0.201668f, 0.201480f, 0.201292f,
+ 0.201105f, 0.200917f, 0.200729f, 0.200541f, 0.200353f, 0.200165f, 0.199978f, 0.199790f,
+ 0.199602f, 0.199414f, 0.199226f, 0.199038f, 0.198850f, 0.198662f, 0.198474f, 0.198286f,
+ 0.198098f, 0.197910f, 0.197722f, 0.197535f, 0.197347f, 0.197159f, 0.196971f, 0.196783f,
+ 0.196595f, 0.196407f, 0.196219f, 0.196031f, 0.195843f, 0.195654f, 0.195466f, 0.195278f,
+ 0.195090f, 0.194902f, 0.194714f, 0.194526f, 0.194338f, 0.194150f, 0.193962f, 0.193774f,
+ 0.193586f, 0.193397f, 0.193209f, 0.193021f, 0.192833f, 0.192645f, 0.192457f, 0.192269f,
+ 0.192080f, 0.191892f, 0.191704f, 0.191516f, 0.191328f, 0.191139f, 0.190951f, 0.190763f,
+ 0.190575f, 0.190387f, 0.190198f, 0.190010f, 0.189822f, 0.189634f, 0.189445f, 0.189257f,
+ 0.189069f, 0.188880f, 0.188692f, 0.188504f, 0.188315f, 0.188127f, 0.187939f, 0.187750f,
+ 0.187562f, 0.187374f, 0.187185f, 0.186997f, 0.186809f, 0.186620f, 0.186432f, 0.186244f,
+ 0.186055f, 0.185867f, 0.185678f, 0.185490f, 0.185301f, 0.185113f, 0.184925f, 0.184736f,
+ 0.184548f, 0.184359f, 0.184171f, 0.183982f, 0.183794f, 0.183605f, 0.183417f, 0.183228f,
+ 0.183040f, 0.182851f, 0.182663f, 0.182474f, 0.182286f, 0.182097f, 0.181909f, 0.181720f,
+ 0.181532f, 0.181343f, 0.181154f, 0.180966f, 0.180777f, 0.180589f, 0.180400f, 0.180212f,
+ 0.180023f, 0.179834f, 0.179646f, 0.179457f, 0.179268f, 0.179080f, 0.178891f, 0.178702f,
+ 0.178514f, 0.178325f, 0.178136f, 0.177948f, 0.177759f, 0.177570f, 0.177382f, 0.177193f,
+ 0.177004f, 0.176815f, 0.176627f, 0.176438f, 0.176249f, 0.176061f, 0.175872f, 0.175683f,
+ 0.175494f, 0.175305f, 0.175117f, 0.174928f, 0.174739f, 0.174550f, 0.174362f, 0.174173f,
+ 0.173984f, 0.173795f, 0.173606f, 0.173417f, 0.173229f, 0.173040f, 0.172851f, 0.172662f,
+ 0.172473f, 0.172284f, 0.172095f, 0.171906f, 0.171718f, 0.171529f, 0.171340f, 0.171151f,
+ 0.170962f, 0.170773f, 0.170584f, 0.170395f, 0.170206f, 0.170017f, 0.169828f, 0.169639f,
+ 0.169450f, 0.169261f, 0.169072f, 0.168883f, 0.168694f, 0.168505f, 0.168316f, 0.168127f,
+ 0.167938f, 0.167749f, 0.167560f, 0.167371f, 0.167182f, 0.166993f, 0.166804f, 0.166615f,
+ 0.166426f, 0.166237f, 0.166048f, 0.165859f, 0.165670f, 0.165480f, 0.165291f, 0.165102f,
+ 0.164913f, 0.164724f, 0.164535f, 0.164346f, 0.164157f, 0.163967f, 0.163778f, 0.163589f,
+ 0.163400f, 0.163211f, 0.163022f, 0.162832f, 0.162643f, 0.162454f, 0.162265f, 0.162076f,
+ 0.161886f, 0.161697f, 0.161508f, 0.161319f, 0.161129f, 0.160940f, 0.160751f, 0.160562f,
+ 0.160372f, 0.160183f, 0.159994f, 0.159805f, 0.159615f, 0.159426f, 0.159237f, 0.159047f,
+ 0.158858f, 0.158669f, 0.158480f, 0.158290f, 0.158101f, 0.157912f, 0.157722f, 0.157533f,
+ 0.157343f, 0.157154f, 0.156965f, 0.156775f, 0.156586f, 0.156397f, 0.156207f, 0.156018f,
+ 0.155828f, 0.155639f, 0.155450f, 0.155260f, 0.155071f, 0.154881f, 0.154692f, 0.154502f,
+ 0.154313f, 0.154124f, 0.153934f, 0.153745f, 0.153555f, 0.153366f, 0.153176f, 0.152987f,
+ 0.152797f, 0.152608f, 0.152418f, 0.152229f, 0.152039f, 0.151850f, 0.151660f, 0.151471f,
+ 0.151281f, 0.151092f, 0.150902f, 0.150712f, 0.150523f, 0.150333f, 0.150144f, 0.149954f,
+ 0.149765f, 0.149575f, 0.149385f, 0.149196f, 0.149006f, 0.148817f, 0.148627f, 0.148437f,
+ 0.148248f, 0.148058f, 0.147868f, 0.147679f, 0.147489f, 0.147299f, 0.147110f, 0.146920f,
+ 0.146730f, 0.146541f, 0.146351f, 0.146161f, 0.145972f, 0.145782f, 0.145592f, 0.145403f,
+ 0.145213f, 0.145023f, 0.144833f, 0.144644f, 0.144454f, 0.144264f, 0.144075f, 0.143885f,
+ 0.143695f, 0.143505f, 0.143316f, 0.143126f, 0.142936f, 0.142746f, 0.142556f, 0.142367f,
+ 0.142177f, 0.141987f, 0.141797f, 0.141607f, 0.141418f, 0.141228f, 0.141038f, 0.140848f,
+ 0.140658f, 0.140468f, 0.140279f, 0.140089f, 0.139899f, 0.139709f, 0.139519f, 0.139329f,
+ 0.139139f, 0.138949f, 0.138760f, 0.138570f, 0.138380f, 0.138190f, 0.138000f, 0.137810f,
+ 0.137620f, 0.137430f, 0.137240f, 0.137050f, 0.136860f, 0.136670f, 0.136480f, 0.136291f,
+ 0.136101f, 0.135911f, 0.135721f, 0.135531f, 0.135341f, 0.135151f, 0.134961f, 0.134771f,
+ 0.134581f, 0.134391f, 0.134201f, 0.134011f, 0.133821f, 0.133631f, 0.133441f, 0.133251f,
+ 0.133061f, 0.132870f, 0.132680f, 0.132490f, 0.132300f, 0.132110f, 0.131920f, 0.131730f,
+ 0.131540f, 0.131350f, 0.131160f, 0.130970f, 0.130780f, 0.130590f, 0.130399f, 0.130209f,
+ 0.130019f, 0.129829f, 0.129639f, 0.129449f, 0.129259f, 0.129069f, 0.128878f, 0.128688f,
+ 0.128498f, 0.128308f, 0.128118f, 0.127928f, 0.127737f, 0.127547f, 0.127357f, 0.127167f,
+ 0.126977f, 0.126787f, 0.126596f, 0.126406f, 0.126216f, 0.126026f, 0.125835f, 0.125645f,
+ 0.125455f, 0.125265f, 0.125075f, 0.124884f, 0.124694f, 0.124504f, 0.124314f, 0.124123f,
+ 0.123933f, 0.123743f, 0.123552f, 0.123362f, 0.123172f, 0.122982f, 0.122791f, 0.122601f,
+ 0.122411f, 0.122220f, 0.122030f, 0.121840f, 0.121649f, 0.121459f, 0.121269f, 0.121078f,
+ 0.120888f, 0.120698f, 0.120507f, 0.120317f, 0.120127f, 0.119936f, 0.119746f, 0.119556f,
+ 0.119365f, 0.119175f, 0.118984f, 0.118794f, 0.118604f, 0.118413f, 0.118223f, 0.118032f,
+ 0.117842f, 0.117652f, 0.117461f, 0.117271f, 0.117080f, 0.116890f, 0.116700f, 0.116509f,
+ 0.116319f, 0.116128f, 0.115938f, 0.115747f, 0.115557f, 0.115366f, 0.115176f, 0.114985f,
+ 0.114795f, 0.114604f, 0.114414f, 0.114223f, 0.114033f, 0.113842f, 0.113652f, 0.113461f,
+ 0.113271f, 0.113080f, 0.112890f, 0.112699f, 0.112509f, 0.112318f, 0.112128f, 0.111937f,
+ 0.111747f, 0.111556f, 0.111366f, 0.111175f, 0.110984f, 0.110794f, 0.110603f, 0.110413f,
+ 0.110222f, 0.110032f, 0.109841f, 0.109650f, 0.109460f, 0.109269f, 0.109079f, 0.108888f,
+ 0.108697f, 0.108507f, 0.108316f, 0.108126f, 0.107935f, 0.107744f, 0.107554f, 0.107363f,
+ 0.107172f, 0.106982f, 0.106791f, 0.106600f, 0.106410f, 0.106219f, 0.106028f, 0.105838f,
+ 0.105647f, 0.105456f, 0.105266f, 0.105075f, 0.104884f, 0.104694f, 0.104503f, 0.104312f,
+ 0.104122f, 0.103931f, 0.103740f, 0.103550f, 0.103359f, 0.103168f, 0.102977f, 0.102787f,
+ 0.102596f, 0.102405f, 0.102214f, 0.102024f, 0.101833f, 0.101642f, 0.101451f, 0.101261f,
+ 0.101070f, 0.100879f, 0.100688f, 0.100498f, 0.100307f, 0.100116f, 0.099925f, 0.099734f,
+ 0.099544f, 0.099353f, 0.099162f, 0.098971f, 0.098780f, 0.098590f, 0.098399f, 0.098208f,
+ 0.098017f, 0.097826f, 0.097635f, 0.097445f, 0.097254f, 0.097063f, 0.096872f, 0.096681f,
+ 0.096490f, 0.096300f, 0.096109f, 0.095918f, 0.095727f, 0.095536f, 0.095345f, 0.095154f,
+ 0.094963f, 0.094773f, 0.094582f, 0.094391f, 0.094200f, 0.094009f, 0.093818f, 0.093627f,
+ 0.093436f, 0.093245f, 0.093055f, 0.092864f, 0.092673f, 0.092482f, 0.092291f, 0.092100f,
+ 0.091909f, 0.091718f, 0.091527f, 0.091336f, 0.091145f, 0.090954f, 0.090763f, 0.090572f,
+ 0.090381f, 0.090190f, 0.089999f, 0.089808f, 0.089617f, 0.089427f, 0.089236f, 0.089045f,
+ 0.088854f, 0.088663f, 0.088472f, 0.088281f, 0.088090f, 0.087899f, 0.087708f, 0.087517f,
+ 0.087326f, 0.087135f, 0.086943f, 0.086752f, 0.086561f, 0.086370f, 0.086179f, 0.085988f,
+ 0.085797f, 0.085606f, 0.085415f, 0.085224f, 0.085033f, 0.084842f, 0.084651f, 0.084460f,
+ 0.084269f, 0.084078f, 0.083887f, 0.083696f, 0.083505f, 0.083314f, 0.083122f, 0.082931f,
+ 0.082740f, 0.082549f, 0.082358f, 0.082167f, 0.081976f, 0.081785f, 0.081594f, 0.081403f,
+ 0.081211f, 0.081020f, 0.080829f, 0.080638f, 0.080447f, 0.080256f, 0.080065f, 0.079874f,
+ 0.079682f, 0.079491f, 0.079300f, 0.079109f, 0.078918f, 0.078727f, 0.078536f, 0.078344f,
+ 0.078153f, 0.077962f, 0.077771f, 0.077580f, 0.077389f, 0.077197f, 0.077006f, 0.076815f,
+ 0.076624f, 0.076433f, 0.076241f, 0.076050f, 0.075859f, 0.075668f, 0.075477f, 0.075286f,
+ 0.075094f, 0.074903f, 0.074712f, 0.074521f, 0.074329f, 0.074138f, 0.073947f, 0.073756f,
+ 0.073565f, 0.073373f, 0.073182f, 0.072991f, 0.072800f, 0.072608f, 0.072417f, 0.072226f,
+ 0.072035f, 0.071843f, 0.071652f, 0.071461f, 0.071270f, 0.071078f, 0.070887f, 0.070696f,
+ 0.070505f, 0.070313f, 0.070122f, 0.069931f, 0.069739f, 0.069548f, 0.069357f, 0.069166f,
+ 0.068974f, 0.068783f, 0.068592f, 0.068400f, 0.068209f, 0.068018f, 0.067827f, 0.067635f,
+ 0.067444f, 0.067253f, 0.067061f, 0.066870f, 0.066679f, 0.066487f, 0.066296f, 0.066105f,
+ 0.065913f, 0.065722f, 0.065531f, 0.065339f, 0.065148f, 0.064957f, 0.064765f, 0.064574f,
+ 0.064383f, 0.064191f, 0.064000f, 0.063809f, 0.063617f, 0.063426f, 0.063234f, 0.063043f,
+ 0.062852f, 0.062660f, 0.062469f, 0.062278f, 0.062086f, 0.061895f, 0.061704f, 0.061512f,
+ 0.061321f, 0.061129f, 0.060938f, 0.060747f, 0.060555f, 0.060364f, 0.060172f, 0.059981f,
+ 0.059790f, 0.059598f, 0.059407f, 0.059215f, 0.059024f, 0.058833f, 0.058641f, 0.058450f,
+ 0.058258f, 0.058067f, 0.057875f, 0.057684f, 0.057493f, 0.057301f, 0.057110f, 0.056918f,
+ 0.056727f, 0.056535f, 0.056344f, 0.056152f, 0.055961f, 0.055770f, 0.055578f, 0.055387f,
+ 0.055195f, 0.055004f, 0.054812f, 0.054621f, 0.054429f, 0.054238f, 0.054046f, 0.053855f,
+ 0.053664f, 0.053472f, 0.053281f, 0.053089f, 0.052898f, 0.052706f, 0.052515f, 0.052323f,
+ 0.052132f, 0.051940f, 0.051749f, 0.051557f, 0.051366f, 0.051174f, 0.050983f, 0.050791f,
+ 0.050600f, 0.050408f, 0.050217f, 0.050025f, 0.049834f, 0.049642f, 0.049451f, 0.049259f,
+ 0.049068f, 0.048876f, 0.048685f, 0.048493f, 0.048302f, 0.048110f, 0.047919f, 0.047727f,
+ 0.047535f, 0.047344f, 0.047152f, 0.046961f, 0.046769f, 0.046578f, 0.046386f, 0.046195f,
+ 0.046003f, 0.045812f, 0.045620f, 0.045429f, 0.045237f, 0.045045f, 0.044854f, 0.044662f,
+ 0.044471f, 0.044279f, 0.044088f, 0.043896f, 0.043705f, 0.043513f, 0.043321f, 0.043130f,
+ 0.042938f, 0.042747f, 0.042555f, 0.042364f, 0.042172f, 0.041980f, 0.041789f, 0.041597f,
+ 0.041406f, 0.041214f, 0.041022f, 0.040831f, 0.040639f, 0.040448f, 0.040256f, 0.040065f,
+ 0.039873f, 0.039681f, 0.039490f, 0.039298f, 0.039107f, 0.038915f, 0.038723f, 0.038532f,
+ 0.038340f, 0.038149f, 0.037957f, 0.037765f, 0.037574f, 0.037382f, 0.037190f, 0.036999f,
+ 0.036807f, 0.036616f, 0.036424f, 0.036232f, 0.036041f, 0.035849f, 0.035657f, 0.035466f,
+ 0.035274f, 0.035083f, 0.034891f, 0.034699f, 0.034508f, 0.034316f, 0.034124f, 0.033933f,
+ 0.033741f, 0.033550f, 0.033358f, 0.033166f, 0.032975f, 0.032783f, 0.032591f, 0.032400f,
+ 0.032208f, 0.032016f, 0.031825f, 0.031633f, 0.031441f, 0.031250f, 0.031058f, 0.030866f,
+ 0.030675f, 0.030483f, 0.030291f, 0.030100f, 0.029908f, 0.029717f, 0.029525f, 0.029333f,
+ 0.029142f, 0.028950f, 0.028758f, 0.028567f, 0.028375f, 0.028183f, 0.027991f, 0.027800f,
+ 0.027608f, 0.027416f, 0.027225f, 0.027033f, 0.026841f, 0.026650f, 0.026458f, 0.026266f,
+ 0.026075f, 0.025883f, 0.025691f, 0.025500f, 0.025308f, 0.025116f, 0.024925f, 0.024733f,
+ 0.024541f, 0.024350f, 0.024158f, 0.023966f, 0.023774f, 0.023583f, 0.023391f, 0.023199f,
+ 0.023008f, 0.022816f, 0.022624f, 0.022433f, 0.022241f, 0.022049f, 0.021857f, 0.021666f,
+ 0.021474f, 0.021282f, 0.021091f, 0.020899f, 0.020707f, 0.020516f, 0.020324f, 0.020132f,
+ 0.019940f, 0.019749f, 0.019557f, 0.019365f, 0.019174f, 0.018982f, 0.018790f, 0.018598f,
+ 0.018407f, 0.018215f, 0.018023f, 0.017832f, 0.017640f, 0.017448f, 0.017256f, 0.017065f,
+ 0.016873f, 0.016681f, 0.016490f, 0.016298f, 0.016106f, 0.015914f, 0.015723f, 0.015531f,
+ 0.015339f, 0.015147f, 0.014956f, 0.014764f, 0.014572f, 0.014381f, 0.014189f, 0.013997f,
+ 0.013805f, 0.013614f, 0.013422f, 0.013230f, 0.013038f, 0.012847f, 0.012655f, 0.012463f,
+ 0.012272f, 0.012080f, 0.011888f, 0.011696f, 0.011505f, 0.011313f, 0.011121f, 0.010929f,
+ 0.010738f, 0.010546f, 0.010354f, 0.010162f, 0.009971f, 0.009779f, 0.009587f, 0.009395f,
+ 0.009204f, 0.009012f, 0.008820f, 0.008629f, 0.008437f, 0.008245f, 0.008053f, 0.007862f,
+ 0.007670f, 0.007478f, 0.007286f, 0.007095f, 0.006903f, 0.006711f, 0.006519f, 0.006328f,
+ 0.006136f, 0.005944f, 0.005752f, 0.005561f, 0.005369f, 0.005177f, 0.004985f, 0.004794f,
+ 0.004602f, 0.004410f, 0.004218f, 0.004027f, 0.003835f, 0.003643f, 0.003451f, 0.003260f,
+ 0.003068f, 0.002876f, 0.002684f, 0.002493f, 0.002301f, 0.002109f, 0.001917f, 0.001726f,
+ 0.001534f, 0.001342f, 0.001150f, 0.000959f, 0.000767f, 0.000575f, 0.000383f, 0.000192f,
+ 0.000000f, 0.000192f, 0.000383f, 0.000575f, 0.000767f, 0.000959f, 0.001150f, 0.001342f,
+ 0.001534f, 0.001726f, 0.001917f, 0.002109f, 0.002301f, 0.002493f, 0.002684f, 0.002876f,
+ 0.003068f, 0.003260f, 0.003451f, 0.003643f, 0.003835f, 0.004027f, 0.004218f, 0.004410f,
+ 0.004602f, 0.004794f, 0.004985f, 0.005177f, 0.005369f, 0.005561f, 0.005752f, 0.005944f,
+ 0.006136f, 0.006328f, 0.006519f, 0.006711f, 0.006903f, 0.007095f, 0.007286f, 0.007478f,
+ 0.007670f, 0.007862f, 0.008053f, 0.008245f, 0.008437f, 0.008629f, 0.008820f, 0.009012f,
+ 0.009204f, 0.009395f, 0.009587f, 0.009779f, 0.009971f, 0.010162f, 0.010354f, 0.010546f,
+ 0.010738f, 0.010929f, 0.011121f, 0.011313f, 0.011505f, 0.011696f, 0.011888f, 0.012080f,
+ 0.012272f, 0.012463f, 0.012655f, 0.012847f, 0.013038f, 0.013230f, 0.013422f, 0.013614f,
+ 0.013805f, 0.013997f, 0.014189f, 0.014381f, 0.014572f, 0.014764f, 0.014956f, 0.015147f,
+ 0.015339f, 0.015531f, 0.015723f, 0.015914f, 0.016106f, 0.016298f, 0.016490f, 0.016681f,
+ 0.016873f, 0.017065f, 0.017256f, 0.017448f, 0.017640f, 0.017832f, 0.018023f, 0.018215f,
+ 0.018407f, 0.018598f, 0.018790f, 0.018982f, 0.019174f, 0.019365f, 0.019557f, 0.019749f,
+ 0.019940f, 0.020132f, 0.020324f, 0.020516f, 0.020707f, 0.020899f, 0.021091f, 0.021282f,
+ 0.021474f, 0.021666f, 0.021857f, 0.022049f, 0.022241f, 0.022433f, 0.022624f, 0.022816f,
+ 0.023008f, 0.023199f, 0.023391f, 0.023583f, 0.023774f, 0.023966f, 0.024158f, 0.024350f,
+ 0.024541f, 0.024733f, 0.024925f, 0.025116f, 0.025308f, 0.025500f, 0.025691f, 0.025883f,
+ 0.026075f, 0.026266f, 0.026458f, 0.026650f, 0.026841f, 0.027033f, 0.027225f, 0.027416f,
+ 0.027608f, 0.027800f, 0.027991f, 0.028183f, 0.028375f, 0.028567f, 0.028758f, 0.028950f,
+ 0.029142f, 0.029333f, 0.029525f, 0.029717f, 0.029908f, 0.030100f, 0.030291f, 0.030483f,
+ 0.030675f, 0.030866f, 0.031058f, 0.031250f, 0.031441f, 0.031633f, 0.031825f, 0.032016f,
+ 0.032208f, 0.032400f, 0.032591f, 0.032783f, 0.032975f, 0.033166f, 0.033358f, 0.033550f,
+ 0.033741f, 0.033933f, 0.034124f, 0.034316f, 0.034508f, 0.034699f, 0.034891f, 0.035083f,
+ 0.035274f, 0.035466f, 0.035657f, 0.035849f, 0.036041f, 0.036232f, 0.036424f, 0.036616f,
+ 0.036807f, 0.036999f, 0.037190f, 0.037382f, 0.037574f, 0.037765f, 0.037957f, 0.038149f,
+ 0.038340f, 0.038532f, 0.038723f, 0.038915f, 0.039107f, 0.039298f, 0.039490f, 0.039681f,
+ 0.039873f, 0.040065f, 0.040256f, 0.040448f, 0.040639f, 0.040831f, 0.041022f, 0.041214f,
+ 0.041406f, 0.041597f, 0.041789f, 0.041980f, 0.042172f, 0.042364f, 0.042555f, 0.042747f,
+ 0.042938f, 0.043130f, 0.043321f, 0.043513f, 0.043705f, 0.043896f, 0.044088f, 0.044279f,
+ 0.044471f, 0.044662f, 0.044854f, 0.045045f, 0.045237f, 0.045429f, 0.045620f, 0.045812f,
+ 0.046003f, 0.046195f, 0.046386f, 0.046578f, 0.046769f, 0.046961f, 0.047152f, 0.047344f,
+ 0.047535f, 0.047727f, 0.047919f, 0.048110f, 0.048302f, 0.048493f, 0.048685f, 0.048876f,
+ 0.049068f, 0.049259f, 0.049451f, 0.049642f, 0.049834f, 0.050025f, 0.050217f, 0.050408f,
+ 0.050600f, 0.050791f, 0.050983f, 0.051174f, 0.051366f, 0.051557f, 0.051749f, 0.051940f,
+ 0.052132f, 0.052323f, 0.052515f, 0.052706f, 0.052898f, 0.053089f, 0.053281f, 0.053472f,
+ 0.053664f, 0.053855f, 0.054046f, 0.054238f, 0.054429f, 0.054621f, 0.054812f, 0.055004f,
+ 0.055195f, 0.055387f, 0.055578f, 0.055770f, 0.055961f, 0.056152f, 0.056344f, 0.056535f,
+ 0.056727f, 0.056918f, 0.057110f, 0.057301f, 0.057493f, 0.057684f, 0.057875f, 0.058067f,
+ 0.058258f, 0.058450f, 0.058641f, 0.058833f, 0.059024f, 0.059215f, 0.059407f, 0.059598f,
+ 0.059790f, 0.059981f, 0.060172f, 0.060364f, 0.060555f, 0.060747f, 0.060938f, 0.061129f,
+ 0.061321f, 0.061512f, 0.061704f, 0.061895f, 0.062086f, 0.062278f, 0.062469f, 0.062660f,
+ 0.062852f, 0.063043f, 0.063234f, 0.063426f, 0.063617f, 0.063809f, 0.064000f, 0.064191f,
+ 0.064383f, 0.064574f, 0.064765f, 0.064957f, 0.065148f, 0.065339f, 0.065531f, 0.065722f,
+ 0.065913f, 0.066105f, 0.066296f, 0.066487f, 0.066679f, 0.066870f, 0.067061f, 0.067253f,
+ 0.067444f, 0.067635f, 0.067827f, 0.068018f, 0.068209f, 0.068400f, 0.068592f, 0.068783f,
+ 0.068974f, 0.069166f, 0.069357f, 0.069548f, 0.069739f, 0.069931f, 0.070122f, 0.070313f,
+ 0.070505f, 0.070696f, 0.070887f, 0.071078f, 0.071270f, 0.071461f, 0.071652f, 0.071843f,
+ 0.072035f, 0.072226f, 0.072417f, 0.072608f, 0.072800f, 0.072991f, 0.073182f, 0.073373f,
+ 0.073565f, 0.073756f, 0.073947f, 0.074138f, 0.074329f, 0.074521f, 0.074712f, 0.074903f,
+ 0.075094f, 0.075286f, 0.075477f, 0.075668f, 0.075859f, 0.076050f, 0.076241f, 0.076433f,
+ 0.076624f, 0.076815f, 0.077006f, 0.077197f, 0.077389f, 0.077580f, 0.077771f, 0.077962f,
+ 0.078153f, 0.078344f, 0.078536f, 0.078727f, 0.078918f, 0.079109f, 0.079300f, 0.079491f,
+ 0.079682f, 0.079874f, 0.080065f, 0.080256f, 0.080447f, 0.080638f, 0.080829f, 0.081020f,
+ 0.081211f, 0.081403f, 0.081594f, 0.081785f, 0.081976f, 0.082167f, 0.082358f, 0.082549f,
+ 0.082740f, 0.082931f, 0.083122f, 0.083314f, 0.083505f, 0.083696f, 0.083887f, 0.084078f,
+ 0.084269f, 0.084460f, 0.084651f, 0.084842f, 0.085033f, 0.085224f, 0.085415f, 0.085606f,
+ 0.085797f, 0.085988f, 0.086179f, 0.086370f, 0.086561f, 0.086752f, 0.086943f, 0.087135f,
+ 0.087326f, 0.087517f, 0.087708f, 0.087899f, 0.088090f, 0.088281f, 0.088472f, 0.088663f,
+ 0.088854f, 0.089045f, 0.089236f, 0.089427f, 0.089617f, 0.089808f, 0.089999f, 0.090190f,
+ 0.090381f, 0.090572f, 0.090763f, 0.090954f, 0.091145f, 0.091336f, 0.091527f, 0.091718f,
+ 0.091909f, 0.092100f, 0.092291f, 0.092482f, 0.092673f, 0.092864f, 0.093055f, 0.093245f,
+ 0.093436f, 0.093627f, 0.093818f, 0.094009f, 0.094200f, 0.094391f, 0.094582f, 0.094773f,
+ 0.094963f, 0.095154f, 0.095345f, 0.095536f, 0.095727f, 0.095918f, 0.096109f, 0.096300f,
+ 0.096490f, 0.096681f, 0.096872f, 0.097063f, 0.097254f, 0.097445f, 0.097635f, 0.097826f,
+ 0.098017f, 0.098208f, 0.098399f, 0.098590f, 0.098780f, 0.098971f, 0.099162f, 0.099353f,
+ 0.099544f, 0.099734f, 0.099925f, 0.100116f, 0.100307f, 0.100498f, 0.100688f, 0.100879f,
+ 0.101070f, 0.101261f, 0.101451f, 0.101642f, 0.101833f, 0.102024f, 0.102214f, 0.102405f,
+ 0.102596f, 0.102787f, 0.102977f, 0.103168f, 0.103359f, 0.103550f, 0.103740f, 0.103931f,
+ 0.104122f, 0.104312f, 0.104503f, 0.104694f, 0.104884f, 0.105075f, 0.105266f, 0.105456f,
+ 0.105647f, 0.105838f, 0.106028f, 0.106219f, 0.106410f, 0.106600f, 0.106791f, 0.106982f,
+ 0.107172f, 0.107363f, 0.107554f, 0.107744f, 0.107935f, 0.108126f, 0.108316f, 0.108507f,
+ 0.108697f, 0.108888f, 0.109079f, 0.109269f, 0.109460f, 0.109650f, 0.109841f, 0.110032f,
+ 0.110222f, 0.110413f, 0.110603f, 0.110794f, 0.110984f, 0.111175f, 0.111366f, 0.111556f,
+ 0.111747f, 0.111937f, 0.112128f, 0.112318f, 0.112509f, 0.112699f, 0.112890f, 0.113080f,
+ 0.113271f, 0.113461f, 0.113652f, 0.113842f, 0.114033f, 0.114223f, 0.114414f, 0.114604f,
+ 0.114795f, 0.114985f, 0.115176f, 0.115366f, 0.115557f, 0.115747f, 0.115938f, 0.116128f,
+ 0.116319f, 0.116509f, 0.116700f, 0.116890f, 0.117080f, 0.117271f, 0.117461f, 0.117652f,
+ 0.117842f, 0.118032f, 0.118223f, 0.118413f, 0.118604f, 0.118794f, 0.118984f, 0.119175f,
+ 0.119365f, 0.119556f, 0.119746f, 0.119936f, 0.120127f, 0.120317f, 0.120507f, 0.120698f,
+ 0.120888f, 0.121078f, 0.121269f, 0.121459f, 0.121649f, 0.121840f, 0.122030f, 0.122220f,
+ 0.122411f, 0.122601f, 0.122791f, 0.122982f, 0.123172f, 0.123362f, 0.123552f, 0.123743f,
+ 0.123933f, 0.124123f, 0.124314f, 0.124504f, 0.124694f, 0.124884f, 0.125075f, 0.125265f,
+ 0.125455f, 0.125645f, 0.125835f, 0.126026f, 0.126216f, 0.126406f, 0.126596f, 0.126787f,
+ 0.126977f, 0.127167f, 0.127357f, 0.127547f, 0.127737f, 0.127928f, 0.128118f, 0.128308f,
+ 0.128498f, 0.128688f, 0.128878f, 0.129069f, 0.129259f, 0.129449f, 0.129639f, 0.129829f,
+ 0.130019f, 0.130209f, 0.130399f, 0.130590f, 0.130780f, 0.130970f, 0.131160f, 0.131350f,
+ 0.131540f, 0.131730f, 0.131920f, 0.132110f, 0.132300f, 0.132490f, 0.132680f, 0.132870f,
+ 0.133061f, 0.133251f, 0.133441f, 0.133631f, 0.133821f, 0.134011f, 0.134201f, 0.134391f,
+ 0.134581f, 0.134771f, 0.134961f, 0.135151f, 0.135341f, 0.135531f, 0.135721f, 0.135911f,
+ 0.136101f, 0.136291f, 0.136480f, 0.136670f, 0.136860f, 0.137050f, 0.137240f, 0.137430f,
+ 0.137620f, 0.137810f, 0.138000f, 0.138190f, 0.138380f, 0.138570f, 0.138760f, 0.138949f,
+ 0.139139f, 0.139329f, 0.139519f, 0.139709f, 0.139899f, 0.140089f, 0.140279f, 0.140468f,
+ 0.140658f, 0.140848f, 0.141038f, 0.141228f, 0.141418f, 0.141607f, 0.141797f, 0.141987f,
+ 0.142177f, 0.142367f, 0.142556f, 0.142746f, 0.142936f, 0.143126f, 0.143316f, 0.143505f,
+ 0.143695f, 0.143885f, 0.144075f, 0.144264f, 0.144454f, 0.144644f, 0.144833f, 0.145023f,
+ 0.145213f, 0.145403f, 0.145592f, 0.145782f, 0.145972f, 0.146161f, 0.146351f, 0.146541f,
+ 0.146730f, 0.146920f, 0.147110f, 0.147299f, 0.147489f, 0.147679f, 0.147868f, 0.148058f,
+ 0.148248f, 0.148437f, 0.148627f, 0.148817f, 0.149006f, 0.149196f, 0.149385f, 0.149575f,
+ 0.149765f, 0.149954f, 0.150144f, 0.150333f, 0.150523f, 0.150712f, 0.150902f, 0.151092f,
+ 0.151281f, 0.151471f, 0.151660f, 0.151850f, 0.152039f, 0.152229f, 0.152418f, 0.152608f,
+ 0.152797f, 0.152987f, 0.153176f, 0.153366f, 0.153555f, 0.153745f, 0.153934f, 0.154124f,
+ 0.154313f, 0.154502f, 0.154692f, 0.154881f, 0.155071f, 0.155260f, 0.155450f, 0.155639f,
+ 0.155828f, 0.156018f, 0.156207f, 0.156397f, 0.156586f, 0.156775f, 0.156965f, 0.157154f,
+ 0.157343f, 0.157533f, 0.157722f, 0.157912f, 0.158101f, 0.158290f, 0.158480f, 0.158669f,
+ 0.158858f, 0.159047f, 0.159237f, 0.159426f, 0.159615f, 0.159805f, 0.159994f, 0.160183f,
+ 0.160372f, 0.160562f, 0.160751f, 0.160940f, 0.161129f, 0.161319f, 0.161508f, 0.161697f,
+ 0.161886f, 0.162076f, 0.162265f, 0.162454f, 0.162643f, 0.162832f, 0.163022f, 0.163211f,
+ 0.163400f, 0.163589f, 0.163778f, 0.163967f, 0.164157f, 0.164346f, 0.164535f, 0.164724f,
+ 0.164913f, 0.165102f, 0.165291f, 0.165480f, 0.165670f, 0.165859f, 0.166048f, 0.166237f,
+ 0.166426f, 0.166615f, 0.166804f, 0.166993f, 0.167182f, 0.167371f, 0.167560f, 0.167749f,
+ 0.167938f, 0.168127f, 0.168316f, 0.168505f, 0.168694f, 0.168883f, 0.169072f, 0.169261f,
+ 0.169450f, 0.169639f, 0.169828f, 0.170017f, 0.170206f, 0.170395f, 0.170584f, 0.170773f,
+ 0.170962f, 0.171151f, 0.171340f, 0.171529f, 0.171718f, 0.171906f, 0.172095f, 0.172284f,
+ 0.172473f, 0.172662f, 0.172851f, 0.173040f, 0.173229f, 0.173417f, 0.173606f, 0.173795f,
+ 0.173984f, 0.174173f, 0.174362f, 0.174550f, 0.174739f, 0.174928f, 0.175117f, 0.175305f,
+ 0.175494f, 0.175683f, 0.175872f, 0.176061f, 0.176249f, 0.176438f, 0.176627f, 0.176815f,
+ 0.177004f, 0.177193f, 0.177382f, 0.177570f, 0.177759f, 0.177948f, 0.178136f, 0.178325f,
+ 0.178514f, 0.178702f, 0.178891f, 0.179080f, 0.179268f, 0.179457f, 0.179646f, 0.179834f,
+ 0.180023f, 0.180212f, 0.180400f, 0.180589f, 0.180777f, 0.180966f, 0.181154f, 0.181343f,
+ 0.181532f, 0.181720f, 0.181909f, 0.182097f, 0.182286f, 0.182474f, 0.182663f, 0.182851f,
+ 0.183040f, 0.183228f, 0.183417f, 0.183605f, 0.183794f, 0.183982f, 0.184171f, 0.184359f,
+ 0.184548f, 0.184736f, 0.184925f, 0.185113f, 0.185301f, 0.185490f, 0.185678f, 0.185867f,
+ 0.186055f, 0.186244f, 0.186432f, 0.186620f, 0.186809f, 0.186997f, 0.187185f, 0.187374f,
+ 0.187562f, 0.187750f, 0.187939f, 0.188127f, 0.188315f, 0.188504f, 0.188692f, 0.188880f,
+ 0.189069f, 0.189257f, 0.189445f, 0.189634f, 0.189822f, 0.190010f, 0.190198f, 0.190387f,
+ 0.190575f, 0.190763f, 0.190951f, 0.191139f, 0.191328f, 0.191516f, 0.191704f, 0.191892f,
+ 0.192080f, 0.192269f, 0.192457f, 0.192645f, 0.192833f, 0.193021f, 0.193209f, 0.193397f,
+ 0.193586f, 0.193774f, 0.193962f, 0.194150f, 0.194338f, 0.194526f, 0.194714f, 0.194902f,
+ 0.195090f, 0.195278f, 0.195466f, 0.195654f, 0.195843f, 0.196031f, 0.196219f, 0.196407f,
+ 0.196595f, 0.196783f, 0.196971f, 0.197159f, 0.197347f, 0.197535f, 0.197722f, 0.197910f,
+ 0.198098f, 0.198286f, 0.198474f, 0.198662f, 0.198850f, 0.199038f, 0.199226f, 0.199414f,
+ 0.199602f, 0.199790f, 0.199978f, 0.200165f, 0.200353f, 0.200541f, 0.200729f, 0.200917f,
+ 0.201105f, 0.201292f, 0.201480f, 0.201668f, 0.201856f, 0.202044f, 0.202231f, 0.202419f,
+ 0.202607f, 0.202795f, 0.202983f, 0.203170f, 0.203358f, 0.203546f, 0.203734f, 0.203921f,
+ 0.204109f, 0.204297f, 0.204484f, 0.204672f, 0.204860f, 0.205047f, 0.205235f, 0.205423f,
+ 0.205610f, 0.205798f, 0.205986f, 0.206173f, 0.206361f, 0.206549f, 0.206736f, 0.206924f,
+ 0.207111f, 0.207299f, 0.207487f, 0.207674f, 0.207862f, 0.208049f, 0.208237f, 0.208424f,
+ 0.208612f, 0.208799f, 0.208987f, 0.209174f, 0.209362f, 0.209549f, 0.209737f, 0.209924f,
+ 0.210112f, 0.210299f, 0.210487f, 0.210674f, 0.210862f, 0.211049f, 0.211237f, 0.211424f,
+ 0.211611f, 0.211799f, 0.211986f, 0.212174f, 0.212361f, 0.212548f, 0.212736f, 0.212923f,
+ 0.213110f, 0.213298f, 0.213485f, 0.213672f, 0.213860f, 0.214047f, 0.214234f, 0.214422f,
+ 0.214609f, 0.214796f, 0.214983f, 0.215171f, 0.215358f, 0.215545f, 0.215732f, 0.215920f,
+ 0.216107f, 0.216294f, 0.216481f, 0.216668f, 0.216856f, 0.217043f, 0.217230f, 0.217417f,
+ 0.217604f, 0.217791f, 0.217979f, 0.218166f, 0.218353f, 0.218540f, 0.218727f, 0.218914f,
+ 0.219101f, 0.219288f, 0.219475f, 0.219662f, 0.219850f, 0.220037f, 0.220224f, 0.220411f,
+ 0.220598f, 0.220785f, 0.220972f, 0.221159f, 0.221346f, 0.221533f, 0.221720f, 0.221907f,
+ 0.222094f, 0.222281f, 0.222468f, 0.222654f, 0.222841f, 0.223028f, 0.223215f, 0.223402f,
+ 0.223589f, 0.223776f, 0.223963f, 0.224150f, 0.224337f, 0.224523f, 0.224710f, 0.224897f,
+ 0.225084f, 0.225271f, 0.225458f, 0.225644f, 0.225831f, 0.226018f, 0.226205f, 0.226391f,
+ 0.226578f, 0.226765f, 0.226952f, 0.227139f, 0.227325f, 0.227512f, 0.227699f, 0.227885f,
+ 0.228072f, 0.228259f, 0.228445f, 0.228632f, 0.228819f, 0.229005f, 0.229192f, 0.229379f,
+ 0.229565f, 0.229752f, 0.229939f, 0.230125f, 0.230312f, 0.230498f, 0.230685f, 0.230872f,
+ 0.231058f, 0.231245f, 0.231431f, 0.231618f, 0.231804f, 0.231991f, 0.232177f, 0.232364f,
+ 0.232550f, 0.232737f, 0.232923f, 0.233110f, 0.233296f, 0.233483f, 0.233669f, 0.233856f,
+ 0.234042f, 0.234228f, 0.234415f, 0.234601f, 0.234788f, 0.234974f, 0.235160f, 0.235347f,
+ 0.235533f, 0.235719f, 0.235906f, 0.236092f, 0.236278f, 0.236465f, 0.236651f, 0.236837f,
+ 0.237024f, 0.237210f, 0.237396f, 0.237582f, 0.237769f, 0.237955f, 0.238141f, 0.238327f,
+ 0.238514f, 0.238700f, 0.238886f, 0.239072f, 0.239258f, 0.239445f, 0.239631f, 0.239817f,
+ 0.240003f, 0.240189f, 0.240375f, 0.240561f, 0.240748f, 0.240934f, 0.241120f, 0.241306f,
+ 0.241492f, 0.241678f, 0.241864f, 0.242050f, 0.242236f, 0.242422f, 0.242608f, 0.242794f,
+ 0.242980f, 0.243166f, 0.243352f, 0.243538f, 0.243724f, 0.243910f, 0.244096f, 0.244282f,
+ 0.244468f, 0.244654f, 0.244840f, 0.245026f, 0.245212f, 0.245397f, 0.245583f, 0.245769f,
+ 0.245955f, 0.246141f, 0.246327f, 0.246513f, 0.246698f, 0.246884f, 0.247070f, 0.247256f,
+ 0.247442f, 0.247627f, 0.247813f, 0.247999f, 0.248185f, 0.248370f, 0.248556f, 0.248742f,
+ 0.248928f, 0.249113f, 0.249299f, 0.249485f, 0.249670f, 0.249856f, 0.250042f, 0.250227f,
+ 0.250413f, 0.250599f, 0.250784f, 0.250970f, 0.251155f, 0.251341f, 0.251527f, 0.251712f,
+ 0.251898f, 0.252083f, 0.252269f, 0.252454f, 0.252640f, 0.252826f, 0.253011f, 0.253197f,
+ 0.253382f, 0.253568f, 0.253753f, 0.253938f, 0.254124f, 0.254309f, 0.254495f, 0.254680f,
+ 0.254866f, 0.255051f, 0.255236f, 0.255422f, 0.255607f, 0.255793f, 0.255978f, 0.256163f,
+ 0.256349f, 0.256534f, 0.256719f, 0.256905f, 0.257090f, 0.257275f, 0.257461f, 0.257646f,
+ 0.257831f, 0.258016f, 0.258202f, 0.258387f, 0.258572f, 0.258757f, 0.258943f, 0.259128f,
+ 0.259313f, 0.259498f, 0.259683f, 0.259868f, 0.260054f, 0.260239f, 0.260424f, 0.260609f,
+ 0.260794f, 0.260979f, 0.261164f, 0.261349f, 0.261534f, 0.261720f, 0.261905f, 0.262090f,
+ 0.262275f, 0.262460f, 0.262645f, 0.262830f, 0.263015f, 0.263200f, 0.263385f, 0.263570f,
+ 0.263755f, 0.263940f, 0.264125f, 0.264309f, 0.264494f, 0.264679f, 0.264864f, 0.265049f,
+ 0.265234f, 0.265419f, 0.265604f, 0.265789f, 0.265973f, 0.266158f, 0.266343f, 0.266528f,
+ 0.266713f, 0.266898f, 0.267082f, 0.267267f, 0.267452f, 0.267637f, 0.267821f, 0.268006f,
+ 0.268191f, 0.268376f, 0.268560f, 0.268745f, 0.268930f, 0.269114f, 0.269299f, 0.269484f,
+ 0.269668f, 0.269853f, 0.270038f, 0.270222f, 0.270407f, 0.270591f, 0.270776f, 0.270961f,
+ 0.271145f, 0.271330f, 0.271514f, 0.271699f, 0.271883f, 0.272068f, 0.272252f, 0.272437f,
+ 0.272621f, 0.272806f, 0.272990f, 0.273175f, 0.273359f, 0.273544f, 0.273728f, 0.273912f,
+ 0.274097f, 0.274281f, 0.274466f, 0.274650f, 0.274834f, 0.275019f, 0.275203f, 0.275387f,
+ 0.275572f, 0.275756f, 0.275940f, 0.276125f, 0.276309f, 0.276493f, 0.276678f, 0.276862f,
+ 0.277046f, 0.277230f, 0.277415f, 0.277599f, 0.277783f, 0.277967f, 0.278151f, 0.278336f,
+ 0.278520f, 0.278704f, 0.278888f, 0.279072f, 0.279256f, 0.279440f, 0.279624f, 0.279809f,
+ 0.279993f, 0.280177f, 0.280361f, 0.280545f, 0.280729f, 0.280913f, 0.281097f, 0.281281f,
+ 0.281465f, 0.281649f, 0.281833f, 0.282017f, 0.282201f, 0.282385f, 0.282569f, 0.282753f,
+ 0.282937f, 0.283120f, 0.283304f, 0.283488f, 0.283672f, 0.283856f, 0.284040f, 0.284224f,
+ 0.284408f, 0.284591f, 0.284775f, 0.284959f, 0.285143f, 0.285327f, 0.285510f, 0.285694f,
+ 0.285878f, 0.286062f, 0.286245f, 0.286429f, 0.286613f, 0.286796f, 0.286980f, 0.287164f,
+ 0.287347f, 0.287531f, 0.287715f, 0.287898f, 0.288082f, 0.288266f, 0.288449f, 0.288633f,
+ 0.288816f, 0.289000f, 0.289184f, 0.289367f, 0.289551f, 0.289734f, 0.289918f, 0.290101f,
+ 0.290285f, 0.290468f, 0.290652f, 0.290835f, 0.291019f, 0.291202f, 0.291385f, 0.291569f,
+ 0.291752f, 0.291936f, 0.292119f, 0.292302f, 0.292486f, 0.292669f, 0.292852f, 0.293036f,
+ 0.293219f, 0.293402f, 0.293586f, 0.293769f, 0.293952f, 0.294136f, 0.294319f, 0.294502f,
+ 0.294685f, 0.294869f, 0.295052f, 0.295235f, 0.295418f, 0.295601f, 0.295785f, 0.295968f,
+ 0.296151f, 0.296334f, 0.296517f, 0.296700f, 0.296883f, 0.297066f, 0.297250f, 0.297433f,
+ 0.297616f, 0.297799f, 0.297982f, 0.298165f, 0.298348f, 0.298531f, 0.298714f, 0.298897f,
+ 0.299080f, 0.299263f, 0.299446f, 0.299629f, 0.299812f, 0.299995f, 0.300177f, 0.300360f,
+ 0.300543f, 0.300726f, 0.300909f, 0.301092f, 0.301275f, 0.301458f, 0.301640f, 0.301823f,
+ 0.302006f, 0.302189f, 0.302372f, 0.302554f, 0.302737f, 0.302920f, 0.303103f, 0.303285f,
+ 0.303468f, 0.303651f, 0.303833f, 0.304016f, 0.304199f, 0.304381f, 0.304564f, 0.304747f,
+ 0.304929f, 0.305112f, 0.305294f, 0.305477f, 0.305660f, 0.305842f, 0.306025f, 0.306207f,
+ 0.306390f, 0.306572f, 0.306755f, 0.306937f, 0.307120f, 0.307302f, 0.307485f, 0.307667f,
+ 0.307850f, 0.308032f, 0.308214f, 0.308397f, 0.308579f, 0.308762f, 0.308944f, 0.309126f,
+ 0.309309f, 0.309491f, 0.309673f, 0.309856f, 0.310038f, 0.310220f, 0.310403f, 0.310585f,
+ 0.310767f, 0.310949f, 0.311132f, 0.311314f, 0.311496f, 0.311678f, 0.311860f, 0.312043f,
+ 0.312225f, 0.312407f, 0.312589f, 0.312771f, 0.312953f, 0.313135f, 0.313318f, 0.313500f,
+ 0.313682f, 0.313864f, 0.314046f, 0.314228f, 0.314410f, 0.314592f, 0.314774f, 0.314956f,
+ 0.315138f, 0.315320f, 0.315502f, 0.315684f, 0.315866f, 0.316048f, 0.316230f, 0.316411f,
+ 0.316593f, 0.316775f, 0.316957f, 0.317139f, 0.317321f, 0.317503f, 0.317684f, 0.317866f,
+ 0.318048f, 0.318230f, 0.318412f, 0.318593f, 0.318775f, 0.318957f, 0.319139f, 0.319320f,
+ 0.319502f, 0.319684f, 0.319865f, 0.320047f, 0.320229f, 0.320410f, 0.320592f, 0.320774f,
+ 0.320955f, 0.321137f, 0.321318f, 0.321500f, 0.321682f, 0.321863f, 0.322045f, 0.322226f,
+ 0.322408f, 0.322589f, 0.322771f, 0.322952f, 0.323134f, 0.323315f, 0.323497f, 0.323678f,
+ 0.323859f, 0.324041f, 0.324222f, 0.324404f, 0.324585f, 0.324766f, 0.324948f, 0.325129f,
+ 0.325310f, 0.325492f, 0.325673f, 0.325854f, 0.326035f, 0.326217f, 0.326398f, 0.326579f,
+ 0.326760f, 0.326942f, 0.327123f, 0.327304f, 0.327485f, 0.327666f, 0.327848f, 0.328029f,
+ 0.328210f, 0.328391f, 0.328572f, 0.328753f, 0.328934f, 0.329115f, 0.329296f, 0.329477f,
+ 0.329658f, 0.329839f, 0.330020f, 0.330202f, 0.330382f, 0.330563f, 0.330744f, 0.330925f,
+ 0.331106f, 0.331287f, 0.331468f, 0.331649f, 0.331830f, 0.332011f, 0.332192f, 0.332373f,
+ 0.332553f, 0.332734f, 0.332915f, 0.333096f, 0.333277f, 0.333457f, 0.333638f, 0.333819f,
+ 0.334000f, 0.334180f, 0.334361f, 0.334542f, 0.334722f, 0.334903f, 0.335084f, 0.335265f,
+ 0.335445f, 0.335626f, 0.335806f, 0.335987f, 0.336168f, 0.336348f, 0.336529f, 0.336709f,
+ 0.336890f, 0.337070f, 0.337251f, 0.337431f, 0.337612f, 0.337792f, 0.337973f, 0.338153f,
+ 0.338334f, 0.338514f, 0.338695f, 0.338875f, 0.339055f, 0.339236f, 0.339416f, 0.339597f,
+ 0.339777f, 0.339957f, 0.340138f, 0.340318f, 0.340498f, 0.340678f, 0.340859f, 0.341039f,
+ 0.341219f, 0.341399f, 0.341580f, 0.341760f, 0.341940f, 0.342120f, 0.342300f, 0.342481f,
+ 0.342661f, 0.342841f, 0.343021f, 0.343201f, 0.343381f, 0.343561f, 0.343741f, 0.343921f,
+ 0.344101f, 0.344281f, 0.344461f, 0.344641f, 0.344821f, 0.345001f, 0.345181f, 0.345361f,
+ 0.345541f, 0.345721f, 0.345901f, 0.346081f, 0.346261f, 0.346441f, 0.346621f, 0.346801f,
+ 0.346980f, 0.347160f, 0.347340f, 0.347520f, 0.347700f, 0.347879f, 0.348059f, 0.348239f,
+ 0.348419f, 0.348598f, 0.348778f, 0.348958f, 0.349138f, 0.349317f, 0.349497f, 0.349676f,
+ 0.349856f, 0.350036f, 0.350215f, 0.350395f, 0.350575f, 0.350754f, 0.350934f, 0.351113f,
+ 0.351293f, 0.351472f, 0.351652f, 0.351831f, 0.352011f, 0.352190f, 0.352370f, 0.352549f,
+ 0.352729f, 0.352908f, 0.353087f, 0.353267f, 0.353446f, 0.353626f, 0.353805f, 0.353984f,
+ 0.354164f, 0.354343f, 0.354522f, 0.354701f, 0.354881f, 0.355060f, 0.355239f, 0.355418f,
+ 0.355598f, 0.355777f, 0.355956f, 0.356135f, 0.356314f, 0.356494f, 0.356673f, 0.356852f,
+ 0.357031f, 0.357210f, 0.357389f, 0.357568f, 0.357747f, 0.357926f, 0.358105f, 0.358284f,
+ 0.358463f, 0.358642f, 0.358821f, 0.359000f, 0.359179f, 0.359358f, 0.359537f, 0.359716f,
+ 0.359895f, 0.360074f, 0.360253f, 0.360432f, 0.360611f, 0.360789f, 0.360968f, 0.361147f,
+ 0.361326f, 0.361505f, 0.361683f, 0.361862f, 0.362041f, 0.362220f, 0.362398f, 0.362577f,
+ 0.362756f, 0.362934f, 0.363113f, 0.363292f, 0.363470f, 0.363649f, 0.363828f, 0.364006f,
+ 0.364185f, 0.364363f, 0.364542f, 0.364720f, 0.364899f, 0.365078f, 0.365256f, 0.365435f,
+ 0.365613f, 0.365791f, 0.365970f, 0.366148f, 0.366327f, 0.366505f, 0.366684f, 0.366862f,
+ 0.367040f, 0.367219f, 0.367397f, 0.367575f, 0.367754f, 0.367932f, 0.368110f, 0.368289f,
+ 0.368467f, 0.368645f, 0.368823f, 0.369002f, 0.369180f, 0.369358f, 0.369536f, 0.369714f,
+ 0.369892f, 0.370071f, 0.370249f, 0.370427f, 0.370605f, 0.370783f, 0.370961f, 0.371139f,
+ 0.371317f, 0.371495f, 0.371673f, 0.371851f, 0.372029f, 0.372207f, 0.372385f, 0.372563f,
+ 0.372741f, 0.372919f, 0.373097f, 0.373275f, 0.373453f, 0.373631f, 0.373808f, 0.373986f,
+ 0.374164f, 0.374342f, 0.374520f, 0.374697f, 0.374875f, 0.375053f, 0.375231f, 0.375408f,
+ 0.375586f, 0.375764f, 0.375942f, 0.376119f, 0.376297f, 0.376475f, 0.376652f, 0.376830f,
+ 0.377007f, 0.377185f, 0.377363f, 0.377540f, 0.377718f, 0.377895f, 0.378073f, 0.378250f,
+ 0.378428f, 0.378605f, 0.378783f, 0.378960f, 0.379138f, 0.379315f, 0.379492f, 0.379670f,
+ 0.379847f, 0.380025f, 0.380202f, 0.380379f, 0.380557f, 0.380734f, 0.380911f, 0.381088f,
+ 0.381266f, 0.381443f, 0.381620f, 0.381797f, 0.381975f, 0.382152f, 0.382329f, 0.382506f,
+ 0.382683f, 0.382861f, 0.383038f, 0.383215f, 0.383392f, 0.383569f, 0.383746f, 0.383923f,
+ 0.384100f, 0.384277f, 0.384454f, 0.384631f, 0.384808f, 0.384985f, 0.385162f, 0.385339f,
+ 0.385516f, 0.385693f, 0.385870f, 0.386047f, 0.386224f, 0.386400f, 0.386577f, 0.386754f,
+ 0.386931f, 0.387108f, 0.387285f, 0.387461f, 0.387638f, 0.387815f, 0.387992f, 0.388168f,
+ 0.388345f, 0.388522f, 0.388698f, 0.388875f, 0.389052f, 0.389228f, 0.389405f, 0.389582f,
+ 0.389758f, 0.389935f, 0.390111f, 0.390288f, 0.390464f, 0.390641f, 0.390817f, 0.390994f,
+ 0.391170f, 0.391347f, 0.391523f, 0.391700f, 0.391876f, 0.392053f, 0.392229f, 0.392405f,
+ 0.392582f, 0.392758f, 0.392934f, 0.393111f, 0.393287f, 0.393463f, 0.393640f, 0.393816f,
+ 0.393992f, 0.394168f, 0.394344f, 0.394521f, 0.394697f, 0.394873f, 0.395049f, 0.395225f,
+ 0.395401f, 0.395578f, 0.395754f, 0.395930f, 0.396106f, 0.396282f, 0.396458f, 0.396634f,
+ 0.396810f, 0.396986f, 0.397162f, 0.397338f, 0.397514f, 0.397690f, 0.397866f, 0.398042f,
+ 0.398218f, 0.398393f, 0.398569f, 0.398745f, 0.398921f, 0.399097f, 0.399273f, 0.399448f,
+ 0.399624f, 0.399800f, 0.399976f, 0.400151f, 0.400327f, 0.400503f, 0.400679f, 0.400854f,
+ 0.401030f, 0.401206f, 0.401381f, 0.401557f, 0.401732f, 0.401908f, 0.402084f, 0.402259f,
+ 0.402435f, 0.402610f, 0.402786f, 0.402961f, 0.403137f, 0.403312f, 0.403488f, 0.403663f,
+ 0.403838f, 0.404014f, 0.404189f, 0.404365f, 0.404540f, 0.404715f, 0.404891f, 0.405066f,
+ 0.405241f, 0.405417f, 0.405592f, 0.405767f, 0.405942f, 0.406118f, 0.406293f, 0.406468f,
+ 0.406643f, 0.406818f, 0.406994f, 0.407169f, 0.407344f, 0.407519f, 0.407694f, 0.407869f,
+ 0.408044f, 0.408219f, 0.408394f, 0.408569f, 0.408744f, 0.408919f, 0.409094f, 0.409269f,
+ 0.409444f, 0.409619f, 0.409794f, 0.409969f, 0.410144f, 0.410319f, 0.410493f, 0.410668f,
+ 0.410843f, 0.411018f, 0.411193f, 0.411368f, 0.411542f, 0.411717f, 0.411892f, 0.412067f,
+ 0.412241f, 0.412416f, 0.412591f, 0.412765f, 0.412940f, 0.413115f, 0.413289f, 0.413464f,
+ 0.413638f, 0.413813f, 0.413987f, 0.414162f, 0.414337f, 0.414511f, 0.414685f, 0.414860f,
+ 0.415034f, 0.415209f, 0.415383f, 0.415558f, 0.415732f, 0.415906f, 0.416081f, 0.416255f,
+ 0.416430f, 0.416604f, 0.416778f, 0.416952f, 0.417127f, 0.417301f, 0.417475f, 0.417650f,
+ 0.417824f, 0.417998f, 0.418172f, 0.418346f, 0.418520f, 0.418695f, 0.418869f, 0.419043f,
+ 0.419217f, 0.419391f, 0.419565f, 0.419739f, 0.419913f, 0.420087f, 0.420261f, 0.420435f,
+ 0.420609f, 0.420783f, 0.420957f, 0.421131f, 0.421305f, 0.421479f, 0.421653f, 0.421826f,
+ 0.422000f, 0.422174f, 0.422348f, 0.422522f, 0.422695f, 0.422869f, 0.423043f, 0.423217f,
+ 0.423390f, 0.423564f, 0.423738f, 0.423912f, 0.424085f, 0.424259f, 0.424432f, 0.424606f,
+ 0.424780f, 0.424953f, 0.425127f, 0.425300f, 0.425474f, 0.425647f, 0.425821f, 0.425994f,
+ 0.426168f, 0.426341f, 0.426515f, 0.426688f, 0.426862f, 0.427035f, 0.427208f, 0.427382f,
+ 0.427555f, 0.427728f, 0.427902f, 0.428075f, 0.428248f, 0.428422f, 0.428595f, 0.428768f,
+ 0.428941f, 0.429114f, 0.429288f, 0.429461f, 0.429634f, 0.429807f, 0.429980f, 0.430153f,
+ 0.430326f, 0.430500f, 0.430673f, 0.430846f, 0.431019f, 0.431192f, 0.431365f, 0.431538f,
+ 0.431711f, 0.431884f, 0.432057f, 0.432229f, 0.432402f, 0.432575f, 0.432748f, 0.432921f,
+ 0.433094f, 0.433267f, 0.433439f, 0.433612f, 0.433785f, 0.433958f, 0.434131f, 0.434303f,
+ 0.434476f, 0.434649f, 0.434821f, 0.434994f, 0.435167f, 0.435339f, 0.435512f, 0.435685f,
+ 0.435857f, 0.436030f, 0.436202f, 0.436375f, 0.436547f, 0.436720f, 0.436892f, 0.437065f,
+ 0.437237f, 0.437410f, 0.437582f, 0.437754f, 0.437927f, 0.438099f, 0.438272f, 0.438444f,
+ 0.438616f, 0.438789f, 0.438961f, 0.439133f, 0.439305f, 0.439478f, 0.439650f, 0.439822f,
+ 0.439994f, 0.440166f, 0.440339f, 0.440511f, 0.440683f, 0.440855f, 0.441027f, 0.441199f,
+ 0.441371f, 0.441543f, 0.441715f, 0.441887f, 0.442059f, 0.442231f, 0.442403f, 0.442575f,
+ 0.442747f, 0.442919f, 0.443091f, 0.443263f, 0.443435f, 0.443607f, 0.443779f, 0.443950f,
+ 0.444122f, 0.444294f, 0.444466f, 0.444637f, 0.444809f, 0.444981f, 0.445153f, 0.445324f,
+ 0.445496f, 0.445668f, 0.445839f, 0.446011f, 0.446183f, 0.446354f, 0.446526f, 0.446697f,
+ 0.446869f, 0.447040f, 0.447212f, 0.447383f, 0.447555f, 0.447726f, 0.447898f, 0.448069f,
+ 0.448241f, 0.448412f, 0.448583f, 0.448755f, 0.448926f, 0.449097f, 0.449269f, 0.449440f,
+ 0.449611f, 0.449783f, 0.449954f, 0.450125f, 0.450296f, 0.450467f, 0.450639f, 0.450810f,
+ 0.450981f, 0.451152f, 0.451323f, 0.451494f, 0.451665f, 0.451836f, 0.452008f, 0.452179f,
+ 0.452350f, 0.452521f, 0.452692f, 0.452863f, 0.453033f, 0.453204f, 0.453375f, 0.453546f,
+ 0.453717f, 0.453888f, 0.454059f, 0.454230f, 0.454400f, 0.454571f, 0.454742f, 0.454913f,
+ 0.455084f, 0.455254f, 0.455425f, 0.455596f, 0.455766f, 0.455937f, 0.456108f, 0.456278f,
+ 0.456449f, 0.456620f, 0.456790f, 0.456961f, 0.457131f, 0.457302f, 0.457472f, 0.457643f,
+ 0.457813f, 0.457984f, 0.458154f, 0.458325f, 0.458495f, 0.458665f, 0.458836f, 0.459006f,
+ 0.459177f, 0.459347f, 0.459517f, 0.459687f, 0.459858f, 0.460028f, 0.460198f, 0.460369f,
+ 0.460539f, 0.460709f, 0.460879f, 0.461049f, 0.461219f, 0.461390f, 0.461560f, 0.461730f,
+ 0.461900f, 0.462070f, 0.462240f, 0.462410f, 0.462580f, 0.462750f, 0.462920f, 0.463090f,
+ 0.463260f, 0.463430f, 0.463600f, 0.463769f, 0.463939f, 0.464109f, 0.464279f, 0.464449f,
+ 0.464619f, 0.464788f, 0.464958f, 0.465128f, 0.465298f, 0.465467f, 0.465637f, 0.465807f,
+ 0.465977f, 0.466146f, 0.466316f, 0.466485f, 0.466655f, 0.466825f, 0.466994f, 0.467164f,
+ 0.467333f, 0.467503f, 0.467672f, 0.467842f, 0.468011f, 0.468181f, 0.468350f, 0.468519f,
+ 0.468689f, 0.468858f, 0.469028f, 0.469197f, 0.469366f, 0.469536f, 0.469705f, 0.469874f,
+ 0.470043f, 0.470213f, 0.470382f, 0.470551f, 0.470720f, 0.470889f, 0.471058f, 0.471228f,
+ 0.471397f, 0.471566f, 0.471735f, 0.471904f, 0.472073f, 0.472242f, 0.472411f, 0.472580f,
+ 0.472749f, 0.472918f, 0.473087f, 0.473256f, 0.473425f, 0.473594f, 0.473763f, 0.473931f,
+ 0.474100f, 0.474269f, 0.474438f, 0.474607f, 0.474775f, 0.474944f, 0.475113f, 0.475282f,
+ 0.475450f, 0.475619f, 0.475788f, 0.475956f, 0.476125f, 0.476294f, 0.476462f, 0.476631f,
+ 0.476799f, 0.476968f, 0.477136f, 0.477305f, 0.477473f, 0.477642f, 0.477810f, 0.477979f,
+ 0.478147f, 0.478315f, 0.478484f, 0.478652f, 0.478821f, 0.478989f, 0.479157f, 0.479325f,
+ 0.479494f, 0.479662f, 0.479830f, 0.479998f, 0.480167f, 0.480335f, 0.480503f, 0.480671f,
+ 0.480839f, 0.481007f, 0.481176f, 0.481344f, 0.481512f, 0.481680f, 0.481848f, 0.482016f,
+ 0.482184f, 0.482352f, 0.482520f, 0.482688f, 0.482856f, 0.483023f, 0.483191f, 0.483359f,
+ 0.483527f, 0.483695f, 0.483863f, 0.484031f, 0.484198f, 0.484366f, 0.484534f, 0.484702f,
+ 0.484869f, 0.485037f, 0.485205f, 0.485372f, 0.485540f, 0.485708f, 0.485875f, 0.486043f,
+ 0.486210f, 0.486378f, 0.486545f, 0.486713f, 0.486880f, 0.487048f, 0.487215f, 0.487383f,
+ 0.487550f, 0.487718f, 0.487885f, 0.488052f, 0.488220f, 0.488387f, 0.488554f, 0.488722f,
+ 0.488889f, 0.489056f, 0.489223f, 0.489391f, 0.489558f, 0.489725f, 0.489892f, 0.490059f,
+ 0.490226f, 0.490394f, 0.490561f, 0.490728f, 0.490895f, 0.491062f, 0.491229f, 0.491396f,
+ 0.491563f, 0.491730f, 0.491897f, 0.492064f, 0.492231f, 0.492398f, 0.492564f, 0.492731f,
+ 0.492898f, 0.493065f, 0.493232f, 0.493399f, 0.493565f, 0.493732f, 0.493899f, 0.494066f,
+ 0.494232f, 0.494399f, 0.494566f, 0.494732f, 0.494899f, 0.495066f, 0.495232f, 0.495399f,
+ 0.495565f, 0.495732f, 0.495898f, 0.496065f, 0.496231f, 0.496398f, 0.496564f, 0.496731f,
+ 0.496897f, 0.497063f, 0.497230f, 0.497396f, 0.497562f, 0.497729f, 0.497895f, 0.498061f,
+ 0.498228f, 0.498394f, 0.498560f, 0.498726f, 0.498893f, 0.499059f, 0.499225f, 0.499391f,
+ 0.499557f, 0.499723f, 0.499889f, 0.500055f, 0.500221f, 0.500387f, 0.500553f, 0.500719f,
+ 0.500885f, 0.501051f, 0.501217f, 0.501383f, 0.501549f, 0.501715f, 0.501881f, 0.502047f,
+ 0.502212f, 0.502378f, 0.502544f, 0.502710f, 0.502876f, 0.503041f, 0.503207f, 0.503373f,
+ 0.503538f, 0.503704f, 0.503870f, 0.504035f, 0.504201f, 0.504366f, 0.504532f, 0.504698f,
+ 0.504863f, 0.505029f, 0.505194f, 0.505360f, 0.505525f, 0.505690f, 0.505856f, 0.506021f,
+ 0.506187f, 0.506352f, 0.506517f, 0.506683f, 0.506848f, 0.507013f, 0.507179f, 0.507344f,
+ 0.507509f, 0.507674f, 0.507839f, 0.508005f, 0.508170f, 0.508335f, 0.508500f, 0.508665f,
+ 0.508830f, 0.508995f, 0.509160f, 0.509325f, 0.509490f, 0.509655f, 0.509820f, 0.509985f,
+ 0.510150f, 0.510315f, 0.510480f, 0.510645f, 0.510810f, 0.510974f, 0.511139f, 0.511304f,
+ 0.511469f, 0.511634f, 0.511798f, 0.511963f, 0.512128f, 0.512292f, 0.512457f, 0.512622f,
+ 0.512786f, 0.512951f, 0.513116f, 0.513280f, 0.513445f, 0.513609f, 0.513774f, 0.513938f,
+ 0.514103f, 0.514267f, 0.514432f, 0.514596f, 0.514760f, 0.514925f, 0.515089f, 0.515254f,
+ 0.515418f, 0.515582f, 0.515746f, 0.515911f, 0.516075f, 0.516239f, 0.516403f, 0.516568f,
+ 0.516732f, 0.516896f, 0.517060f, 0.517224f, 0.517388f, 0.517552f, 0.517716f, 0.517880f,
+ 0.518045f, 0.518209f, 0.518372f, 0.518536f, 0.518700f, 0.518864f, 0.519028f, 0.519192f,
+ 0.519356f, 0.519520f, 0.519684f, 0.519848f, 0.520011f, 0.520175f, 0.520339f, 0.520503f,
+ 0.520666f, 0.520830f, 0.520994f, 0.521157f, 0.521321f, 0.521485f, 0.521648f, 0.521812f,
+ 0.521975f, 0.522139f, 0.522302f, 0.522466f, 0.522629f, 0.522793f, 0.522956f, 0.523120f,
+ 0.523283f, 0.523447f, 0.523610f, 0.523773f, 0.523937f, 0.524100f, 0.524263f, 0.524426f,
+ 0.524590f, 0.524753f, 0.524916f, 0.525079f, 0.525243f, 0.525406f, 0.525569f, 0.525732f,
+ 0.525895f, 0.526058f, 0.526221f, 0.526384f, 0.526547f, 0.526710f, 0.526873f, 0.527036f,
+ 0.527199f, 0.527362f, 0.527525f, 0.527688f, 0.527851f, 0.528014f, 0.528176f, 0.528339f,
+ 0.528502f, 0.528665f, 0.528828f, 0.528990f, 0.529153f, 0.529316f, 0.529478f, 0.529641f,
+ 0.529804f, 0.529966f, 0.530129f, 0.530291f, 0.530454f, 0.530617f, 0.530779f, 0.530942f,
+ 0.531104f, 0.531266f, 0.531429f, 0.531591f, 0.531754f, 0.531916f, 0.532078f, 0.532241f,
+ 0.532403f, 0.532565f, 0.532728f, 0.532890f, 0.533052f, 0.533214f, 0.533377f, 0.533539f,
+ 0.533701f, 0.533863f, 0.534025f, 0.534187f, 0.534349f, 0.534512f, 0.534674f, 0.534836f,
+ 0.534998f, 0.535160f, 0.535322f, 0.535484f, 0.535645f, 0.535807f, 0.535969f, 0.536131f,
+ 0.536293f, 0.536455f, 0.536617f, 0.536778f, 0.536940f, 0.537102f, 0.537264f, 0.537425f,
+ 0.537587f, 0.537749f, 0.537910f, 0.538072f, 0.538234f, 0.538395f, 0.538557f, 0.538718f,
+ 0.538880f, 0.539041f, 0.539203f, 0.539364f, 0.539526f, 0.539687f, 0.539849f, 0.540010f,
+ 0.540171f, 0.540333f, 0.540494f, 0.540655f, 0.540817f, 0.540978f, 0.541139f, 0.541301f,
+ 0.541462f, 0.541623f, 0.541784f, 0.541945f, 0.542106f, 0.542268f, 0.542429f, 0.542590f,
+ 0.542751f, 0.542912f, 0.543073f, 0.543234f, 0.543395f, 0.543556f, 0.543717f, 0.543878f,
+ 0.544039f, 0.544199f, 0.544360f, 0.544521f, 0.544682f, 0.544843f, 0.545003f, 0.545164f,
+ 0.545325f, 0.545486f, 0.545646f, 0.545807f, 0.545968f, 0.546128f, 0.546289f, 0.546450f,
+ 0.546610f, 0.546771f, 0.546931f, 0.547092f, 0.547252f, 0.547413f, 0.547573f, 0.547734f,
+ 0.547894f, 0.548054f, 0.548215f, 0.548375f, 0.548536f, 0.548696f, 0.548856f, 0.549016f,
+ 0.549177f, 0.549337f, 0.549497f, 0.549657f, 0.549818f, 0.549978f, 0.550138f, 0.550298f,
+ 0.550458f, 0.550618f, 0.550778f, 0.550938f, 0.551098f, 0.551258f, 0.551418f, 0.551578f,
+ 0.551738f, 0.551898f, 0.552058f, 0.552218f, 0.552378f, 0.552537f, 0.552697f, 0.552857f,
+ 0.553017f, 0.553176f, 0.553336f, 0.553496f, 0.553656f, 0.553815f, 0.553975f, 0.554134f,
+ 0.554294f, 0.554454f, 0.554613f, 0.554773f, 0.554932f, 0.555092f, 0.555251f, 0.555411f,
+ 0.555570f, 0.555730f, 0.555889f, 0.556048f, 0.556208f, 0.556367f, 0.556526f, 0.556686f,
+ 0.556845f, 0.557004f, 0.557164f, 0.557323f, 0.557482f, 0.557641f, 0.557800f, 0.557959f,
+ 0.558119f, 0.558278f, 0.558437f, 0.558596f, 0.558755f, 0.558914f, 0.559073f, 0.559232f,
+ 0.559391f, 0.559550f, 0.559709f, 0.559867f, 0.560026f, 0.560185f, 0.560344f, 0.560503f,
+ 0.560662f, 0.560820f, 0.560979f, 0.561138f, 0.561297f, 0.561455f, 0.561614f, 0.561773f,
+ 0.561931f, 0.562090f, 0.562248f, 0.562407f, 0.562565f, 0.562724f, 0.562882f, 0.563041f,
+ 0.563199f, 0.563358f, 0.563516f, 0.563675f, 0.563833f, 0.563991f, 0.564150f, 0.564308f,
+ 0.564466f, 0.564624f, 0.564783f, 0.564941f, 0.565099f, 0.565257f, 0.565416f, 0.565574f,
+ 0.565732f, 0.565890f, 0.566048f, 0.566206f, 0.566364f, 0.566522f, 0.566680f, 0.566838f,
+ 0.566996f, 0.567154f, 0.567312f, 0.567470f, 0.567628f, 0.567786f, 0.567943f, 0.568101f,
+ 0.568259f, 0.568417f, 0.568574f, 0.568732f, 0.568890f, 0.569048f, 0.569205f, 0.569363f,
+ 0.569521f, 0.569678f, 0.569836f, 0.569993f, 0.570151f, 0.570308f, 0.570466f, 0.570623f,
+ 0.570781f, 0.570938f, 0.571096f, 0.571253f, 0.571410f, 0.571568f, 0.571725f, 0.571882f,
+ 0.572040f, 0.572197f, 0.572354f, 0.572511f, 0.572669f, 0.572826f, 0.572983f, 0.573140f,
+ 0.573297f, 0.573454f, 0.573611f, 0.573768f, 0.573925f, 0.574082f, 0.574239f, 0.574396f,
+ 0.574553f, 0.574710f, 0.574867f, 0.575024f, 0.575181f, 0.575338f, 0.575495f, 0.575651f,
+ 0.575808f, 0.575965f, 0.576122f, 0.576278f, 0.576435f, 0.576592f, 0.576748f, 0.576905f,
+ 0.577062f, 0.577218f, 0.577375f, 0.577531f, 0.577688f, 0.577844f, 0.578001f, 0.578157f,
+ 0.578314f, 0.578470f, 0.578627f, 0.578783f, 0.578939f, 0.579096f, 0.579252f, 0.579408f,
+ 0.579565f, 0.579721f, 0.579877f, 0.580033f, 0.580189f, 0.580346f, 0.580502f, 0.580658f,
+ 0.580814f, 0.580970f, 0.581126f, 0.581282f, 0.581438f, 0.581594f, 0.581750f, 0.581906f,
+ 0.582062f, 0.582218f, 0.582374f, 0.582530f, 0.582685f, 0.582841f, 0.582997f, 0.583153f,
+ 0.583309f, 0.583464f, 0.583620f, 0.583776f, 0.583931f, 0.584087f, 0.584243f, 0.584398f,
+ 0.584554f, 0.584710f, 0.584865f, 0.585021f, 0.585176f, 0.585332f, 0.585487f, 0.585642f,
+ 0.585798f, 0.585953f, 0.586109f, 0.586264f, 0.586419f, 0.586575f, 0.586730f, 0.586885f,
+ 0.587040f, 0.587196f, 0.587351f, 0.587506f, 0.587661f, 0.587816f, 0.587971f, 0.588126f,
+ 0.588282f, 0.588437f, 0.588592f, 0.588747f, 0.588902f, 0.589057f, 0.589212f, 0.589366f,
+ 0.589521f, 0.589676f, 0.589831f, 0.589986f, 0.590141f, 0.590295f, 0.590450f, 0.590605f,
+ 0.590760f, 0.590914f, 0.591069f, 0.591224f, 0.591378f, 0.591533f, 0.591688f, 0.591842f,
+ 0.591997f, 0.592151f, 0.592306f, 0.592460f, 0.592615f, 0.592769f, 0.592924f, 0.593078f,
+ 0.593232f, 0.593387f, 0.593541f, 0.593695f, 0.593850f, 0.594004f, 0.594158f, 0.594312f,
+ 0.594467f, 0.594621f, 0.594775f, 0.594929f, 0.595083f, 0.595237f, 0.595391f, 0.595545f,
+ 0.595699f, 0.595853f, 0.596007f, 0.596161f, 0.596315f, 0.596469f, 0.596623f, 0.596777f,
+ 0.596931f, 0.597085f, 0.597238f, 0.597392f, 0.597546f, 0.597700f, 0.597853f, 0.598007f,
+ 0.598161f, 0.598314f, 0.598468f, 0.598622f, 0.598775f, 0.598929f, 0.599082f, 0.599236f,
+ 0.599389f, 0.599543f, 0.599696f, 0.599850f, 0.600003f, 0.600156f, 0.600310f, 0.600463f,
+ 0.600616f, 0.600770f, 0.600923f, 0.601076f, 0.601230f, 0.601383f, 0.601536f, 0.601689f,
+ 0.601842f, 0.601995f, 0.602148f, 0.602302f, 0.602455f, 0.602608f, 0.602761f, 0.602914f,
+ 0.603067f, 0.603220f, 0.603372f, 0.603525f, 0.603678f, 0.603831f, 0.603984f, 0.604137f,
+ 0.604290f, 0.604442f, 0.604595f, 0.604748f, 0.604900f, 0.605053f, 0.605206f, 0.605358f,
+ 0.605511f, 0.605664f, 0.605816f, 0.605969f, 0.606121f, 0.606274f, 0.606426f, 0.606579f,
+ 0.606731f, 0.606884f, 0.607036f, 0.607188f, 0.607341f, 0.607493f, 0.607645f, 0.607798f,
+ 0.607950f, 0.608102f, 0.608254f, 0.608406f, 0.608559f, 0.608711f, 0.608863f, 0.609015f,
+ 0.609167f, 0.609319f, 0.609471f, 0.609623f, 0.609775f, 0.609927f, 0.610079f, 0.610231f,
+ 0.610383f, 0.610535f, 0.610687f, 0.610838f, 0.610990f, 0.611142f, 0.611294f, 0.611445f,
+ 0.611597f, 0.611749f, 0.611901f, 0.612052f, 0.612204f, 0.612355f, 0.612507f, 0.612659f,
+ 0.612810f, 0.612962f, 0.613113f, 0.613265f, 0.613416f, 0.613567f, 0.613719f, 0.613870f,
+ 0.614022f, 0.614173f, 0.614324f, 0.614475f, 0.614627f, 0.614778f, 0.614929f, 0.615080f,
+ 0.615232f, 0.615383f, 0.615534f, 0.615685f, 0.615836f, 0.615987f, 0.616138f, 0.616289f,
+ 0.616440f, 0.616591f, 0.616742f, 0.616893f, 0.617044f, 0.617195f, 0.617346f, 0.617496f,
+ 0.617647f, 0.617798f, 0.617949f, 0.618100f, 0.618250f, 0.618401f, 0.618552f, 0.618702f,
+ 0.618853f, 0.619004f, 0.619154f, 0.619305f, 0.619455f, 0.619606f, 0.619756f, 0.619907f,
+ 0.620057f, 0.620208f, 0.620358f, 0.620508f, 0.620659f, 0.620809f, 0.620959f, 0.621110f,
+ 0.621260f, 0.621410f, 0.621560f, 0.621711f, 0.621861f, 0.622011f, 0.622161f, 0.622311f,
+ 0.622461f, 0.622611f, 0.622761f, 0.622911f, 0.623061f, 0.623211f, 0.623361f, 0.623511f,
+ 0.623661f, 0.623811f, 0.623961f, 0.624111f, 0.624260f, 0.624410f, 0.624560f, 0.624710f,
+ 0.624860f, 0.625009f, 0.625159f, 0.625309f, 0.625458f, 0.625608f, 0.625757f, 0.625907f,
+ 0.626056f, 0.626206f, 0.626355f, 0.626505f, 0.626654f, 0.626804f, 0.626953f, 0.627102f,
+ 0.627252f, 0.627401f, 0.627550f, 0.627700f, 0.627849f, 0.627998f, 0.628147f, 0.628297f,
+ 0.628446f, 0.628595f, 0.628744f, 0.628893f, 0.629042f, 0.629191f, 0.629340f, 0.629489f,
+ 0.629638f, 0.629787f, 0.629936f, 0.630085f, 0.630234f, 0.630383f, 0.630532f, 0.630680f,
+ 0.630829f, 0.630978f, 0.631127f, 0.631275f, 0.631424f, 0.631573f, 0.631721f, 0.631870f,
+ 0.632019f, 0.632167f, 0.632316f, 0.632464f, 0.632613f, 0.632761f, 0.632910f, 0.633058f,
+ 0.633207f, 0.633355f, 0.633504f, 0.633652f, 0.633800f, 0.633949f, 0.634097f, 0.634245f,
+ 0.634393f, 0.634542f, 0.634690f, 0.634838f, 0.634986f, 0.635134f, 0.635282f, 0.635430f,
+ 0.635578f, 0.635726f, 0.635874f, 0.636022f, 0.636170f, 0.636318f, 0.636466f, 0.636614f,
+ 0.636762f, 0.636910f, 0.637057f, 0.637205f, 0.637353f, 0.637501f, 0.637649f, 0.637796f,
+ 0.637944f, 0.638092f, 0.638239f, 0.638387f, 0.638534f, 0.638682f, 0.638829f, 0.638977f,
+ 0.639124f, 0.639272f, 0.639419f, 0.639567f, 0.639714f, 0.639862f, 0.640009f, 0.640156f,
+ 0.640303f, 0.640451f, 0.640598f, 0.640745f, 0.640892f, 0.641040f, 0.641187f, 0.641334f,
+ 0.641481f, 0.641628f, 0.641775f, 0.641922f, 0.642069f, 0.642216f, 0.642363f, 0.642510f,
+ 0.642657f, 0.642804f, 0.642951f, 0.643098f, 0.643245f, 0.643391f, 0.643538f, 0.643685f,
+ 0.643832f, 0.643978f, 0.644125f, 0.644272f, 0.644418f, 0.644565f, 0.644711f, 0.644858f,
+ 0.645005f, 0.645151f, 0.645298f, 0.645444f, 0.645590f, 0.645737f, 0.645883f, 0.646030f,
+ 0.646176f, 0.646322f, 0.646469f, 0.646615f, 0.646761f, 0.646907f, 0.647054f, 0.647200f,
+ 0.647346f, 0.647492f, 0.647638f, 0.647784f, 0.647930f, 0.648076f, 0.648222f, 0.648368f,
+ 0.648514f, 0.648660f, 0.648806f, 0.648952f, 0.649098f, 0.649244f, 0.649390f, 0.649536f,
+ 0.649681f, 0.649827f, 0.649973f, 0.650119f, 0.650264f, 0.650410f, 0.650555f, 0.650701f,
+ 0.650847f, 0.650992f, 0.651138f, 0.651283f, 0.651429f, 0.651574f, 0.651720f, 0.651865f,
+ 0.652011f, 0.652156f, 0.652301f, 0.652447f, 0.652592f, 0.652737f, 0.652882f, 0.653028f,
+ 0.653173f, 0.653318f, 0.653463f, 0.653608f, 0.653753f, 0.653899f, 0.654044f, 0.654189f,
+ 0.654334f, 0.654479f, 0.654624f, 0.654769f, 0.654913f, 0.655058f, 0.655203f, 0.655348f,
+ 0.655493f, 0.655638f, 0.655782f, 0.655927f, 0.656072f, 0.656217f, 0.656361f, 0.656506f,
+ 0.656651f, 0.656795f, 0.656940f, 0.657084f, 0.657229f, 0.657373f, 0.657518f, 0.657662f,
+ 0.657807f, 0.657951f, 0.658095f, 0.658240f, 0.658384f, 0.658529f, 0.658673f, 0.658817f,
+ 0.658961f, 0.659105f, 0.659250f, 0.659394f, 0.659538f, 0.659682f, 0.659826f, 0.659970f,
+ 0.660114f, 0.660258f, 0.660402f, 0.660546f, 0.660690f, 0.660834f, 0.660978f, 0.661122f,
+ 0.661266f, 0.661410f, 0.661553f, 0.661697f, 0.661841f, 0.661985f, 0.662128f, 0.662272f,
+ 0.662416f, 0.662559f, 0.662703f, 0.662847f, 0.662990f, 0.663134f, 0.663277f, 0.663421f,
+ 0.663564f, 0.663708f, 0.663851f, 0.663994f, 0.664138f, 0.664281f, 0.664424f, 0.664568f,
+ 0.664711f, 0.664854f, 0.664997f, 0.665141f, 0.665284f, 0.665427f, 0.665570f, 0.665713f,
+ 0.665856f, 0.665999f, 0.666142f, 0.666285f, 0.666428f, 0.666571f, 0.666714f, 0.666857f,
+ 0.667000f, 0.667143f, 0.667286f, 0.667428f, 0.667571f, 0.667714f, 0.667857f, 0.667999f,
+ 0.668142f, 0.668285f, 0.668427f, 0.668570f, 0.668712f, 0.668855f, 0.668998f, 0.669140f,
+ 0.669283f, 0.669425f, 0.669567f, 0.669710f, 0.669852f, 0.669995f, 0.670137f, 0.670279f,
+ 0.670422f, 0.670564f, 0.670706f, 0.670848f, 0.670990f, 0.671133f, 0.671275f, 0.671417f,
+ 0.671559f, 0.671701f, 0.671843f, 0.671985f, 0.672127f, 0.672269f, 0.672411f, 0.672553f,
+ 0.672695f, 0.672837f, 0.672978f, 0.673120f, 0.673262f, 0.673404f, 0.673546f, 0.673687f,
+ 0.673829f, 0.673971f, 0.674112f, 0.674254f, 0.674396f, 0.674537f, 0.674679f, 0.674820f,
+ 0.674962f, 0.675103f, 0.675245f, 0.675386f, 0.675527f, 0.675669f, 0.675810f, 0.675951f,
+ 0.676093f, 0.676234f, 0.676375f, 0.676516f, 0.676658f, 0.676799f, 0.676940f, 0.677081f,
+ 0.677222f, 0.677363f, 0.677504f, 0.677645f, 0.677786f, 0.677927f, 0.678068f, 0.678209f,
+ 0.678350f, 0.678491f, 0.678632f, 0.678773f, 0.678913f, 0.679054f, 0.679195f, 0.679336f,
+ 0.679476f, 0.679617f, 0.679758f, 0.679898f, 0.680039f, 0.680179f, 0.680320f, 0.680461f,
+ 0.680601f, 0.680741f, 0.680882f, 0.681022f, 0.681163f, 0.681303f, 0.681443f, 0.681584f,
+ 0.681724f, 0.681864f, 0.682005f, 0.682145f, 0.682285f, 0.682425f, 0.682565f, 0.682705f,
+ 0.682846f, 0.682986f, 0.683126f, 0.683266f, 0.683406f, 0.683546f, 0.683686f, 0.683825f,
+ 0.683965f, 0.684105f, 0.684245f, 0.684385f, 0.684525f, 0.684664f, 0.684804f, 0.684944f,
+ 0.685084f, 0.685223f, 0.685363f, 0.685503f, 0.685642f, 0.685782f, 0.685921f, 0.686061f,
+ 0.686200f, 0.686340f, 0.686479f, 0.686619f, 0.686758f, 0.686897f, 0.687037f, 0.687176f,
+ 0.687315f, 0.687455f, 0.687594f, 0.687733f, 0.687872f, 0.688011f, 0.688151f, 0.688290f,
+ 0.688429f, 0.688568f, 0.688707f, 0.688846f, 0.688985f, 0.689124f, 0.689263f, 0.689402f,
+ 0.689541f, 0.689679f, 0.689818f, 0.689957f, 0.690096f, 0.690235f, 0.690373f, 0.690512f,
+ 0.690651f, 0.690789f, 0.690928f, 0.691067f, 0.691205f, 0.691344f, 0.691482f, 0.691621f,
+ 0.691759f, 0.691898f, 0.692036f, 0.692175f, 0.692313f, 0.692451f, 0.692590f, 0.692728f,
+ 0.692866f, 0.693004f, 0.693143f, 0.693281f, 0.693419f, 0.693557f, 0.693695f, 0.693833f,
+ 0.693971f, 0.694109f, 0.694248f, 0.694386f, 0.694524f, 0.694661f, 0.694799f, 0.694937f,
+ 0.695075f, 0.695213f, 0.695351f, 0.695489f, 0.695626f, 0.695764f, 0.695902f, 0.696039f,
+ 0.696177f, 0.696315f, 0.696452f, 0.696590f, 0.696728f, 0.696865f, 0.697003f, 0.697140f,
+ 0.697277f, 0.697415f, 0.697552f, 0.697690f, 0.697827f, 0.697964f, 0.698102f, 0.698239f,
+ 0.698376f, 0.698513f, 0.698651f, 0.698788f, 0.698925f, 0.699062f, 0.699199f, 0.699336f,
+ 0.699473f, 0.699610f, 0.699747f, 0.699884f, 0.700021f, 0.700158f, 0.700295f, 0.700432f,
+ 0.700569f, 0.700706f, 0.700842f, 0.700979f, 0.701116f, 0.701253f, 0.701389f, 0.701526f,
+ 0.701663f, 0.701799f, 0.701936f, 0.702072f, 0.702209f, 0.702345f, 0.702482f, 0.702618f,
+ 0.702755f, 0.702891f, 0.703028f, 0.703164f, 0.703300f, 0.703436f, 0.703573f, 0.703709f,
+ 0.703845f, 0.703981f, 0.704118f, 0.704254f, 0.704390f, 0.704526f, 0.704662f, 0.704798f,
+ 0.704934f, 0.705070f, 0.705206f, 0.705342f, 0.705478f, 0.705614f, 0.705750f, 0.705885f,
+ 0.706021f, 0.706157f, 0.706293f, 0.706429f, 0.706564f, 0.706700f, 0.706836f, 0.706971f,
+ 0.707107f, 0.707242f, 0.707378f, 0.707513f, 0.707649f, 0.707784f, 0.707920f, 0.708055f,
+ 0.708191f, 0.708326f, 0.708461f, 0.708597f, 0.708732f, 0.708867f, 0.709002f, 0.709138f,
+ 0.709273f, 0.709408f, 0.709543f, 0.709678f, 0.709813f, 0.709948f, 0.710083f, 0.710218f,
+ 0.710353f, 0.710488f, 0.710623f, 0.710758f, 0.710893f, 0.711028f, 0.711163f, 0.711297f,
+ 0.711432f, 0.711567f, 0.711702f, 0.711836f, 0.711971f, 0.712106f, 0.712240f, 0.712375f,
+ 0.712509f, 0.712644f, 0.712778f, 0.712913f, 0.713047f, 0.713182f, 0.713316f, 0.713451f,
+ 0.713585f, 0.713719f, 0.713853f, 0.713988f, 0.714122f, 0.714256f, 0.714390f, 0.714525f,
+ 0.714659f, 0.714793f, 0.714927f, 0.715061f, 0.715195f, 0.715329f, 0.715463f, 0.715597f,
+ 0.715731f, 0.715865f, 0.715999f, 0.716132f, 0.716266f, 0.716400f, 0.716534f, 0.716668f,
+ 0.716801f, 0.716935f, 0.717069f, 0.717202f, 0.717336f, 0.717469f, 0.717603f, 0.717737f,
+ 0.717870f, 0.718004f, 0.718137f, 0.718270f, 0.718404f, 0.718537f, 0.718670f, 0.718804f,
+ 0.718937f, 0.719070f, 0.719204f, 0.719337f, 0.719470f, 0.719603f, 0.719736f, 0.719869f,
+ 0.720003f, 0.720136f, 0.720269f, 0.720402f, 0.720535f, 0.720668f, 0.720800f, 0.720933f,
+ 0.721066f, 0.721199f, 0.721332f, 0.721465f, 0.721597f, 0.721730f, 0.721863f, 0.721996f,
+ 0.722128f, 0.722261f, 0.722393f, 0.722526f, 0.722659f, 0.722791f, 0.722924f, 0.723056f,
+ 0.723188f, 0.723321f, 0.723453f, 0.723586f, 0.723718f, 0.723850f, 0.723983f, 0.724115f,
+ 0.724247f, 0.724379f, 0.724511f, 0.724644f, 0.724776f, 0.724908f, 0.725040f, 0.725172f,
+ 0.725304f, 0.725436f, 0.725568f, 0.725700f, 0.725832f, 0.725964f, 0.726095f, 0.726227f,
+ 0.726359f, 0.726491f, 0.726623f, 0.726754f, 0.726886f, 0.727018f, 0.727149f, 0.727281f,
+ 0.727413f, 0.727544f, 0.727676f, 0.727807f, 0.727939f, 0.728070f, 0.728202f, 0.728333f,
+ 0.728464f, 0.728596f, 0.728727f, 0.728858f, 0.728990f, 0.729121f, 0.729252f, 0.729383f,
+ 0.729514f, 0.729646f, 0.729777f, 0.729908f, 0.730039f, 0.730170f, 0.730301f, 0.730432f,
+ 0.730563f, 0.730694f, 0.730825f, 0.730955f, 0.731086f, 0.731217f, 0.731348f, 0.731479f,
+ 0.731609f, 0.731740f, 0.731871f, 0.732001f, 0.732132f, 0.732263f, 0.732393f, 0.732524f,
+ 0.732654f, 0.732785f, 0.732915f, 0.733046f, 0.733176f, 0.733306f, 0.733437f, 0.733567f,
+ 0.733697f, 0.733828f, 0.733958f, 0.734088f, 0.734218f, 0.734349f, 0.734479f, 0.734609f,
+ 0.734739f, 0.734869f, 0.734999f, 0.735129f, 0.735259f, 0.735389f, 0.735519f, 0.735649f,
+ 0.735779f, 0.735908f, 0.736038f, 0.736168f, 0.736298f, 0.736428f, 0.736557f, 0.736687f,
+ 0.736817f, 0.736946f, 0.737076f, 0.737205f, 0.737335f, 0.737464f, 0.737594f, 0.737723f,
+ 0.737853f, 0.737982f, 0.738112f, 0.738241f, 0.738370f, 0.738500f, 0.738629f, 0.738758f,
+ 0.738887f, 0.739017f, 0.739146f, 0.739275f, 0.739404f, 0.739533f, 0.739662f, 0.739791f,
+ 0.739920f, 0.740049f, 0.740178f, 0.740307f, 0.740436f, 0.740565f, 0.740694f, 0.740822f,
+ 0.740951f, 0.741080f, 0.741209f, 0.741337f, 0.741466f, 0.741595f, 0.741723f, 0.741852f,
+ 0.741980f, 0.742109f, 0.742237f, 0.742366f, 0.742494f, 0.742623f, 0.742751f, 0.742880f,
+ 0.743008f, 0.743136f, 0.743265f, 0.743393f, 0.743521f, 0.743649f, 0.743777f, 0.743906f,
+ 0.744034f, 0.744162f, 0.744290f, 0.744418f, 0.744546f, 0.744674f, 0.744802f, 0.744930f,
+ 0.745058f, 0.745186f, 0.745314f, 0.745441f, 0.745569f, 0.745697f, 0.745825f, 0.745952f,
+ 0.746080f, 0.746208f, 0.746335f, 0.746463f, 0.746591f, 0.746718f, 0.746846f, 0.746973f,
+ 0.747101f, 0.747228f, 0.747355f, 0.747483f, 0.747610f, 0.747738f, 0.747865f, 0.747992f,
+ 0.748119f, 0.748247f, 0.748374f, 0.748501f, 0.748628f, 0.748755f, 0.748882f, 0.749009f,
+ 0.749136f, 0.749263f, 0.749390f, 0.749517f, 0.749644f, 0.749771f, 0.749898f, 0.750025f,
+ 0.750152f, 0.750278f, 0.750405f, 0.750532f, 0.750659f, 0.750785f, 0.750912f, 0.751039f,
+ 0.751165f, 0.751292f, 0.751418f, 0.751545f, 0.751671f, 0.751798f, 0.751924f, 0.752050f,
+ 0.752177f, 0.752303f, 0.752429f, 0.752556f, 0.752682f, 0.752808f, 0.752934f, 0.753061f,
+ 0.753187f, 0.753313f, 0.753439f, 0.753565f, 0.753691f, 0.753817f, 0.753943f, 0.754069f,
+ 0.754195f, 0.754321f, 0.754447f, 0.754573f, 0.754698f, 0.754824f, 0.754950f, 0.755076f,
+ 0.755201f, 0.755327f, 0.755453f, 0.755578f, 0.755704f, 0.755829f, 0.755955f, 0.756081f,
+ 0.756206f, 0.756331f, 0.756457f, 0.756582f, 0.756708f, 0.756833f, 0.756958f, 0.757084f,
+ 0.757209f, 0.757334f, 0.757459f, 0.757584f, 0.757710f, 0.757835f, 0.757960f, 0.758085f,
+ 0.758210f, 0.758335f, 0.758460f, 0.758585f, 0.758710f, 0.758835f, 0.758960f, 0.759084f,
+ 0.759209f, 0.759334f, 0.759459f, 0.759583f, 0.759708f, 0.759833f, 0.759957f, 0.760082f,
+ 0.760207f, 0.760331f, 0.760456f, 0.760580f, 0.760705f, 0.760829f, 0.760954f, 0.761078f,
+ 0.761202f, 0.761327f, 0.761451f, 0.761575f, 0.761700f, 0.761824f, 0.761948f, 0.762072f,
+ 0.762196f, 0.762320f, 0.762444f, 0.762569f, 0.762693f, 0.762817f, 0.762941f, 0.763065f,
+ 0.763188f, 0.763312f, 0.763436f, 0.763560f, 0.763684f, 0.763808f, 0.763931f, 0.764055f,
+ 0.764179f, 0.764302f, 0.764426f, 0.764550f, 0.764673f, 0.764797f, 0.764920f, 0.765044f,
+ 0.765167f, 0.765291f, 0.765414f, 0.765538f, 0.765661f, 0.765784f, 0.765907f, 0.766031f,
+ 0.766154f, 0.766277f, 0.766400f, 0.766524f, 0.766647f, 0.766770f, 0.766893f, 0.767016f,
+ 0.767139f, 0.767262f, 0.767385f, 0.767508f, 0.767631f, 0.767754f, 0.767876f, 0.767999f,
+ 0.768122f, 0.768245f, 0.768368f, 0.768490f, 0.768613f, 0.768736f, 0.768858f, 0.768981f,
+ 0.769103f, 0.769226f, 0.769348f, 0.769471f, 0.769593f, 0.769716f, 0.769838f, 0.769961f,
+ 0.770083f, 0.770205f, 0.770327f, 0.770450f, 0.770572f, 0.770694f, 0.770816f, 0.770938f,
+ 0.771061f, 0.771183f, 0.771305f, 0.771427f, 0.771549f, 0.771671f, 0.771793f, 0.771915f,
+ 0.772036f, 0.772158f, 0.772280f, 0.772402f, 0.772524f, 0.772645f, 0.772767f, 0.772889f,
+ 0.773010f, 0.773132f, 0.773254f, 0.773375f, 0.773497f, 0.773618f, 0.773740f, 0.773861f,
+ 0.773983f, 0.774104f, 0.774225f, 0.774347f, 0.774468f, 0.774589f, 0.774711f, 0.774832f,
+ 0.774953f, 0.775074f, 0.775195f, 0.775317f, 0.775438f, 0.775559f, 0.775680f, 0.775801f,
+ 0.775922f, 0.776043f, 0.776164f, 0.776284f, 0.776405f, 0.776526f, 0.776647f, 0.776768f,
+ 0.776888f, 0.777009f, 0.777130f, 0.777251f, 0.777371f, 0.777492f, 0.777612f, 0.777733f,
+ 0.777853f, 0.777974f, 0.778094f, 0.778215f, 0.778335f, 0.778456f, 0.778576f, 0.778696f,
+ 0.778817f, 0.778937f, 0.779057f, 0.779177f, 0.779297f, 0.779418f, 0.779538f, 0.779658f,
+ 0.779778f, 0.779898f, 0.780018f, 0.780138f, 0.780258f, 0.780378f, 0.780498f, 0.780617f,
+ 0.780737f, 0.780857f, 0.780977f, 0.781097f, 0.781216f, 0.781336f, 0.781456f, 0.781575f,
+ 0.781695f, 0.781814f, 0.781934f, 0.782053f, 0.782173f, 0.782292f, 0.782412f, 0.782531f,
+ 0.782651f, 0.782770f, 0.782889f, 0.783009f, 0.783128f, 0.783247f, 0.783366f, 0.783485f,
+ 0.783605f, 0.783724f, 0.783843f, 0.783962f, 0.784081f, 0.784200f, 0.784319f, 0.784438f,
+ 0.784557f, 0.784675f, 0.784794f, 0.784913f, 0.785032f, 0.785151f, 0.785269f, 0.785388f,
+ 0.785507f, 0.785625f, 0.785744f, 0.785863f, 0.785981f, 0.786100f, 0.786218f, 0.786337f,
+ 0.786455f, 0.786574f, 0.786692f, 0.786810f, 0.786929f, 0.787047f, 0.787165f, 0.787284f,
+ 0.787402f, 0.787520f, 0.787638f, 0.787756f, 0.787874f, 0.787992f, 0.788110f, 0.788228f,
+ 0.788346f, 0.788464f, 0.788582f, 0.788700f, 0.788818f, 0.788936f, 0.789054f, 0.789172f,
+ 0.789289f, 0.789407f, 0.789525f, 0.789642f, 0.789760f, 0.789878f, 0.789995f, 0.790113f,
+ 0.790230f, 0.790348f, 0.790465f, 0.790583f, 0.790700f, 0.790817f, 0.790935f, 0.791052f,
+ 0.791169f, 0.791287f, 0.791404f, 0.791521f, 0.791638f, 0.791755f, 0.791872f, 0.791990f,
+ 0.792107f, 0.792224f, 0.792341f, 0.792458f, 0.792575f, 0.792691f, 0.792808f, 0.792925f,
+ 0.793042f, 0.793159f, 0.793276f, 0.793392f, 0.793509f, 0.793626f, 0.793742f, 0.793859f,
+ 0.793975f, 0.794092f, 0.794209f, 0.794325f, 0.794442f, 0.794558f, 0.794674f, 0.794791f,
+ 0.794907f, 0.795023f, 0.795140f, 0.795256f, 0.795372f, 0.795488f, 0.795605f, 0.795721f,
+ 0.795837f, 0.795953f, 0.796069f, 0.796185f, 0.796301f, 0.796417f, 0.796533f, 0.796649f,
+ 0.796765f, 0.796881f, 0.796996f, 0.797112f, 0.797228f, 0.797344f, 0.797459f, 0.797575f,
+ 0.797691f, 0.797806f, 0.797922f, 0.798038f, 0.798153f, 0.798269f, 0.798384f, 0.798500f,
+ 0.798615f, 0.798730f, 0.798846f, 0.798961f, 0.799076f, 0.799192f, 0.799307f, 0.799422f,
+ 0.799537f, 0.799652f, 0.799768f, 0.799883f, 0.799998f, 0.800113f, 0.800228f, 0.800343f,
+ 0.800458f, 0.800573f, 0.800687f, 0.800802f, 0.800917f, 0.801032f, 0.801147f, 0.801261f,
+ 0.801376f, 0.801491f, 0.801606f, 0.801720f, 0.801835f, 0.801949f, 0.802064f, 0.802178f,
+ 0.802293f, 0.802407f, 0.802522f, 0.802636f, 0.802750f, 0.802865f, 0.802979f, 0.803093f,
+ 0.803208f, 0.803322f, 0.803436f, 0.803550f, 0.803664f, 0.803778f, 0.803892f, 0.804006f,
+ 0.804120f, 0.804234f, 0.804348f, 0.804462f, 0.804576f, 0.804690f, 0.804804f, 0.804918f,
+ 0.805031f, 0.805145f, 0.805259f, 0.805372f, 0.805486f, 0.805600f, 0.805713f, 0.805827f,
+ 0.805940f, 0.806054f, 0.806167f, 0.806281f, 0.806394f, 0.806508f, 0.806621f, 0.806734f,
+ 0.806848f, 0.806961f, 0.807074f, 0.807187f, 0.807300f, 0.807414f, 0.807527f, 0.807640f,
+ 0.807753f, 0.807866f, 0.807979f, 0.808092f, 0.808205f, 0.808318f, 0.808430f, 0.808543f,
+ 0.808656f, 0.808769f, 0.808882f, 0.808994f, 0.809107f, 0.809220f, 0.809332f, 0.809445f,
+ 0.809558f, 0.809670f, 0.809783f, 0.809895f, 0.810008f, 0.810120f, 0.810232f, 0.810345f,
+ 0.810457f, 0.810570f, 0.810682f, 0.810794f, 0.810906f, 0.811018f, 0.811131f, 0.811243f,
+ 0.811355f, 0.811467f, 0.811579f, 0.811691f, 0.811803f, 0.811915f, 0.812027f, 0.812139f,
+ 0.812251f, 0.812362f, 0.812474f, 0.812586f, 0.812698f, 0.812809f, 0.812921f, 0.813033f,
+ 0.813144f, 0.813256f, 0.813368f, 0.813479f, 0.813591f, 0.813702f, 0.813814f, 0.813925f,
+ 0.814036f, 0.814148f, 0.814259f, 0.814370f, 0.814482f, 0.814593f, 0.814704f, 0.814815f,
+ 0.814926f, 0.815037f, 0.815149f, 0.815260f, 0.815371f, 0.815482f, 0.815593f, 0.815704f,
+ 0.815814f, 0.815925f, 0.816036f, 0.816147f, 0.816258f, 0.816368f, 0.816479f, 0.816590f,
+ 0.816701f, 0.816811f, 0.816922f, 0.817032f, 0.817143f, 0.817253f, 0.817364f, 0.817474f,
+ 0.817585f, 0.817695f, 0.817806f, 0.817916f, 0.818026f, 0.818137f, 0.818247f, 0.818357f,
+ 0.818467f, 0.818577f, 0.818687f, 0.818798f, 0.818908f, 0.819018f, 0.819128f, 0.819238f,
+ 0.819348f, 0.819457f, 0.819567f, 0.819677f, 0.819787f, 0.819897f, 0.820007f, 0.820116f,
+ 0.820226f, 0.820336f, 0.820445f, 0.820555f, 0.820664f, 0.820774f, 0.820884f, 0.820993f,
+ 0.821102f, 0.821212f, 0.821321f, 0.821431f, 0.821540f, 0.821649f, 0.821759f, 0.821868f,
+ 0.821977f, 0.822086f, 0.822195f, 0.822305f, 0.822414f, 0.822523f, 0.822632f, 0.822741f,
+ 0.822850f, 0.822959f, 0.823068f, 0.823177f, 0.823285f, 0.823394f, 0.823503f, 0.823612f,
+ 0.823721f, 0.823829f, 0.823938f, 0.824047f, 0.824155f, 0.824264f, 0.824372f, 0.824481f,
+ 0.824589f, 0.824698f, 0.824806f, 0.824915f, 0.825023f, 0.825131f, 0.825240f, 0.825348f,
+ 0.825456f, 0.825564f, 0.825673f, 0.825781f, 0.825889f, 0.825997f, 0.826105f, 0.826213f,
+ 0.826321f, 0.826429f, 0.826537f, 0.826645f, 0.826753f, 0.826861f, 0.826968f, 0.827076f,
+ 0.827184f, 0.827292f, 0.827399f, 0.827507f, 0.827615f, 0.827722f, 0.827830f, 0.827938f,
+ 0.828045f, 0.828153f, 0.828260f, 0.828367f, 0.828475f, 0.828582f, 0.828690f, 0.828797f,
+ 0.828904f, 0.829011f, 0.829119f, 0.829226f, 0.829333f, 0.829440f, 0.829547f, 0.829654f,
+ 0.829761f, 0.829868f, 0.829975f, 0.830082f, 0.830189f, 0.830296f, 0.830403f, 0.830510f,
+ 0.830616f, 0.830723f, 0.830830f, 0.830937f, 0.831043f, 0.831150f, 0.831257f, 0.831363f,
+ 0.831470f, 0.831576f, 0.831683f, 0.831789f, 0.831895f, 0.832002f, 0.832108f, 0.832215f,
+ 0.832321f, 0.832427f, 0.832533f, 0.832640f, 0.832746f, 0.832852f, 0.832958f, 0.833064f,
+ 0.833170f, 0.833276f, 0.833382f, 0.833488f, 0.833594f, 0.833700f, 0.833806f, 0.833912f,
+ 0.834018f, 0.834123f, 0.834229f, 0.834335f, 0.834440f, 0.834546f, 0.834652f, 0.834757f,
+ 0.834863f, 0.834968f, 0.835074f, 0.835179f, 0.835285f, 0.835390f, 0.835496f, 0.835601f,
+ 0.835706f, 0.835812f, 0.835917f, 0.836022f, 0.836127f, 0.836232f, 0.836338f, 0.836443f,
+ 0.836548f, 0.836653f, 0.836758f, 0.836863f, 0.836968f, 0.837073f, 0.837178f, 0.837282f,
+ 0.837387f, 0.837492f, 0.837597f, 0.837701f, 0.837806f, 0.837911f, 0.838015f, 0.838120f,
+ 0.838225f, 0.838329f, 0.838434f, 0.838538f, 0.838643f, 0.838747f, 0.838852f, 0.838956f,
+ 0.839060f, 0.839165f, 0.839269f, 0.839373f, 0.839477f, 0.839581f, 0.839686f, 0.839790f,
+ 0.839894f, 0.839998f, 0.840102f, 0.840206f, 0.840310f, 0.840414f, 0.840518f, 0.840622f,
+ 0.840725f, 0.840829f, 0.840933f, 0.841037f, 0.841140f, 0.841244f, 0.841348f, 0.841451f,
+ 0.841555f, 0.841659f, 0.841762f, 0.841866f, 0.841969f, 0.842072f, 0.842176f, 0.842279f,
+ 0.842383f, 0.842486f, 0.842589f, 0.842692f, 0.842796f, 0.842899f, 0.843002f, 0.843105f,
+ 0.843208f, 0.843311f, 0.843414f, 0.843517f, 0.843620f, 0.843723f, 0.843826f, 0.843929f,
+ 0.844032f, 0.844135f, 0.844238f, 0.844340f, 0.844443f, 0.844546f, 0.844648f, 0.844751f,
+ 0.844854f, 0.844956f, 0.845059f, 0.845161f, 0.845264f, 0.845366f, 0.845469f, 0.845571f,
+ 0.845673f, 0.845776f, 0.845878f, 0.845980f, 0.846082f, 0.846185f, 0.846287f, 0.846389f,
+ 0.846491f, 0.846593f, 0.846695f, 0.846797f, 0.846899f, 0.847001f, 0.847103f, 0.847205f,
+ 0.847307f, 0.847408f, 0.847510f, 0.847612f, 0.847714f, 0.847815f, 0.847917f, 0.848019f,
+ 0.848120f, 0.848222f, 0.848323f, 0.848425f, 0.848526f, 0.848628f, 0.848729f, 0.848831f,
+ 0.848932f, 0.849033f, 0.849135f, 0.849236f, 0.849337f, 0.849438f, 0.849540f, 0.849641f,
+ 0.849742f, 0.849843f, 0.849944f, 0.850045f, 0.850146f, 0.850247f, 0.850348f, 0.850449f,
+ 0.850549f, 0.850650f, 0.850751f, 0.850852f, 0.850953f, 0.851053f, 0.851154f, 0.851255f,
+ 0.851355f, 0.851456f, 0.851556f, 0.851657f, 0.851757f, 0.851858f, 0.851958f, 0.852059f,
+ 0.852159f, 0.852259f, 0.852360f, 0.852460f, 0.852560f, 0.852660f, 0.852760f, 0.852861f,
+ 0.852961f, 0.853061f, 0.853161f, 0.853261f, 0.853361f, 0.853461f, 0.853561f, 0.853660f,
+ 0.853760f, 0.853860f, 0.853960f, 0.854060f, 0.854159f, 0.854259f, 0.854359f, 0.854458f,
+ 0.854558f, 0.854658f, 0.854757f, 0.854857f, 0.854956f, 0.855056f, 0.855155f, 0.855254f,
+ 0.855354f, 0.855453f, 0.855552f, 0.855651f, 0.855751f, 0.855850f, 0.855949f, 0.856048f,
+ 0.856147f, 0.856246f, 0.856345f, 0.856444f, 0.856543f, 0.856642f, 0.856741f, 0.856840f,
+ 0.856939f, 0.857038f, 0.857137f, 0.857235f, 0.857334f, 0.857433f, 0.857531f, 0.857630f,
+ 0.857729f, 0.857827f, 0.857926f, 0.858024f, 0.858123f, 0.858221f, 0.858320f, 0.858418f,
+ 0.858516f, 0.858615f, 0.858713f, 0.858811f, 0.858909f, 0.859007f, 0.859106f, 0.859204f,
+ 0.859302f, 0.859400f, 0.859498f, 0.859596f, 0.859694f, 0.859792f, 0.859890f, 0.859988f,
+ 0.860085f, 0.860183f, 0.860281f, 0.860379f, 0.860476f, 0.860574f, 0.860672f, 0.860769f,
+ 0.860867f, 0.860964f, 0.861062f, 0.861160f, 0.861257f, 0.861354f, 0.861452f, 0.861549f,
+ 0.861646f, 0.861744f, 0.861841f, 0.861938f, 0.862035f, 0.862133f, 0.862230f, 0.862327f,
+ 0.862424f, 0.862521f, 0.862618f, 0.862715f, 0.862812f, 0.862909f, 0.863006f, 0.863103f,
+ 0.863199f, 0.863296f, 0.863393f, 0.863490f, 0.863586f, 0.863683f, 0.863780f, 0.863876f,
+ 0.863973f, 0.864069f, 0.864166f, 0.864262f, 0.864359f, 0.864455f, 0.864552f, 0.864648f,
+ 0.864744f, 0.864841f, 0.864937f, 0.865033f, 0.865129f, 0.865225f, 0.865321f, 0.865418f,
+ 0.865514f, 0.865610f, 0.865706f, 0.865802f, 0.865898f, 0.865993f, 0.866089f, 0.866185f,
+ 0.866281f, 0.866377f, 0.866472f, 0.866568f, 0.866664f, 0.866759f, 0.866855f, 0.866951f,
+ 0.867046f, 0.867142f, 0.867237f, 0.867333f, 0.867428f, 0.867523f, 0.867619f, 0.867714f,
+ 0.867809f, 0.867905f, 0.868000f, 0.868095f, 0.868190f, 0.868285f, 0.868381f, 0.868476f,
+ 0.868571f, 0.868666f, 0.868761f, 0.868856f, 0.868951f, 0.869045f, 0.869140f, 0.869235f,
+ 0.869330f, 0.869425f, 0.869519f, 0.869614f, 0.869709f, 0.869803f, 0.869898f, 0.869992f,
+ 0.870087f, 0.870182f, 0.870276f, 0.870370f, 0.870465f, 0.870559f, 0.870654f, 0.870748f,
+ 0.870842f, 0.870936f, 0.871031f, 0.871125f, 0.871219f, 0.871313f, 0.871407f, 0.871501f,
+ 0.871595f, 0.871689f, 0.871783f, 0.871877f, 0.871971f, 0.872065f, 0.872159f, 0.872252f,
+ 0.872346f, 0.872440f, 0.872534f, 0.872627f, 0.872721f, 0.872814f, 0.872908f, 0.873001f,
+ 0.873095f, 0.873188f, 0.873282f, 0.873375f, 0.873469f, 0.873562f, 0.873655f, 0.873749f,
+ 0.873842f, 0.873935f, 0.874028f, 0.874121f, 0.874215f, 0.874308f, 0.874401f, 0.874494f,
+ 0.874587f, 0.874680f, 0.874773f, 0.874865f, 0.874958f, 0.875051f, 0.875144f, 0.875237f,
+ 0.875329f, 0.875422f, 0.875515f, 0.875607f, 0.875700f, 0.875793f, 0.875885f, 0.875978f,
+ 0.876070f, 0.876163f, 0.876255f, 0.876347f, 0.876440f, 0.876532f, 0.876624f, 0.876716f,
+ 0.876809f, 0.876901f, 0.876993f, 0.877085f, 0.877177f, 0.877269f, 0.877361f, 0.877453f,
+ 0.877545f, 0.877637f, 0.877729f, 0.877821f, 0.877913f, 0.878005f, 0.878096f, 0.878188f,
+ 0.878280f, 0.878371f, 0.878463f, 0.878555f, 0.878646f, 0.878738f, 0.878829f, 0.878921f,
+ 0.879012f, 0.879104f, 0.879195f, 0.879286f, 0.879378f, 0.879469f, 0.879560f, 0.879651f,
+ 0.879743f, 0.879834f, 0.879925f, 0.880016f, 0.880107f, 0.880198f, 0.880289f, 0.880380f,
+ 0.880471f, 0.880562f, 0.880653f, 0.880743f, 0.880834f, 0.880925f, 0.881016f, 0.881106f,
+ 0.881197f, 0.881288f, 0.881378f, 0.881469f, 0.881559f, 0.881650f, 0.881740f, 0.881831f,
+ 0.881921f, 0.882012f, 0.882102f, 0.882192f, 0.882283f, 0.882373f, 0.882463f, 0.882553f,
+ 0.882643f, 0.882733f, 0.882824f, 0.882914f, 0.883004f, 0.883094f, 0.883184f, 0.883273f,
+ 0.883363f, 0.883453f, 0.883543f, 0.883633f, 0.883723f, 0.883812f, 0.883902f, 0.883992f,
+ 0.884081f, 0.884171f, 0.884260f, 0.884350f, 0.884439f, 0.884529f, 0.884618f, 0.884708f,
+ 0.884797f, 0.884886f, 0.884976f, 0.885065f, 0.885154f, 0.885243f, 0.885333f, 0.885422f,
+ 0.885511f, 0.885600f, 0.885689f, 0.885778f, 0.885867f, 0.885956f, 0.886045f, 0.886134f,
+ 0.886223f, 0.886311f, 0.886400f, 0.886489f, 0.886578f, 0.886666f, 0.886755f, 0.886844f,
+ 0.886932f, 0.887021f, 0.887109f, 0.887198f, 0.887286f, 0.887375f, 0.887463f, 0.887551f,
+ 0.887640f, 0.887728f, 0.887816f, 0.887904f, 0.887993f, 0.888081f, 0.888169f, 0.888257f,
+ 0.888345f, 0.888433f, 0.888521f, 0.888609f, 0.888697f, 0.888785f, 0.888873f, 0.888961f,
+ 0.889048f, 0.889136f, 0.889224f, 0.889312f, 0.889399f, 0.889487f, 0.889574f, 0.889662f,
+ 0.889750f, 0.889837f, 0.889925f, 0.890012f, 0.890099f, 0.890187f, 0.890274f, 0.890361f,
+ 0.890449f, 0.890536f, 0.890623f, 0.890710f, 0.890797f, 0.890885f, 0.890972f, 0.891059f,
+ 0.891146f, 0.891233f, 0.891320f, 0.891407f, 0.891493f, 0.891580f, 0.891667f, 0.891754f,
+ 0.891841f, 0.891927f, 0.892014f, 0.892101f, 0.892187f, 0.892274f, 0.892361f, 0.892447f,
+ 0.892534f, 0.892620f, 0.892706f, 0.892793f, 0.892879f, 0.892965f, 0.893052f, 0.893138f,
+ 0.893224f, 0.893310f, 0.893397f, 0.893483f, 0.893569f, 0.893655f, 0.893741f, 0.893827f,
+ 0.893913f, 0.893999f, 0.894085f, 0.894171f, 0.894256f, 0.894342f, 0.894428f, 0.894514f,
+ 0.894599f, 0.894685f, 0.894771f, 0.894856f, 0.894942f, 0.895028f, 0.895113f, 0.895198f,
+ 0.895284f, 0.895369f, 0.895455f, 0.895540f, 0.895625f, 0.895711f, 0.895796f, 0.895881f,
+ 0.895966f, 0.896051f, 0.896137f, 0.896222f, 0.896307f, 0.896392f, 0.896477f, 0.896562f,
+ 0.896646f, 0.896731f, 0.896816f, 0.896901f, 0.896986f, 0.897071f, 0.897155f, 0.897240f,
+ 0.897325f, 0.897409f, 0.897494f, 0.897578f, 0.897663f, 0.897747f, 0.897832f, 0.897916f,
+ 0.898001f, 0.898085f, 0.898169f, 0.898254f, 0.898338f, 0.898422f, 0.898506f, 0.898590f,
+ 0.898674f, 0.898759f, 0.898843f, 0.898927f, 0.899011f, 0.899095f, 0.899179f, 0.899262f,
+ 0.899346f, 0.899430f, 0.899514f, 0.899598f, 0.899681f, 0.899765f, 0.899849f, 0.899932f,
+ 0.900016f, 0.900099f, 0.900183f, 0.900266f, 0.900350f, 0.900433f, 0.900517f, 0.900600f,
+ 0.900683f, 0.900767f, 0.900850f, 0.900933f, 0.901016f, 0.901100f, 0.901183f, 0.901266f,
+ 0.901349f, 0.901432f, 0.901515f, 0.901598f, 0.901681f, 0.901764f, 0.901847f, 0.901929f,
+ 0.902012f, 0.902095f, 0.902178f, 0.902260f, 0.902343f, 0.902426f, 0.902508f, 0.902591f,
+ 0.902673f, 0.902756f, 0.902838f, 0.902921f, 0.903003f, 0.903085f, 0.903168f, 0.903250f,
+ 0.903332f, 0.903415f, 0.903497f, 0.903579f, 0.903661f, 0.903743f, 0.903825f, 0.903907f,
+ 0.903989f, 0.904071f, 0.904153f, 0.904235f, 0.904317f, 0.904399f, 0.904481f, 0.904562f,
+ 0.904644f, 0.904726f, 0.904807f, 0.904889f, 0.904971f, 0.905052f, 0.905134f, 0.905215f,
+ 0.905297f, 0.905378f, 0.905460f, 0.905541f, 0.905622f, 0.905704f, 0.905785f, 0.905866f,
+ 0.905947f, 0.906028f, 0.906110f, 0.906191f, 0.906272f, 0.906353f, 0.906434f, 0.906515f,
+ 0.906596f, 0.906677f, 0.906757f, 0.906838f, 0.906919f, 0.907000f, 0.907081f, 0.907161f,
+ 0.907242f, 0.907323f, 0.907403f, 0.907484f, 0.907564f, 0.907645f, 0.907725f, 0.907806f,
+ 0.907886f, 0.907966f, 0.908047f, 0.908127f, 0.908207f, 0.908288f, 0.908368f, 0.908448f,
+ 0.908528f, 0.908608f, 0.908688f, 0.908768f, 0.908848f, 0.908928f, 0.909008f, 0.909088f,
+ 0.909168f, 0.909248f, 0.909328f, 0.909407f, 0.909487f, 0.909567f, 0.909646f, 0.909726f,
+ 0.909806f, 0.909885f, 0.909965f, 0.910044f, 0.910124f, 0.910203f, 0.910283f, 0.910362f,
+ 0.910441f, 0.910521f, 0.910600f, 0.910679f, 0.910758f, 0.910837f, 0.910917f, 0.910996f,
+ 0.911075f, 0.911154f, 0.911233f, 0.911312f, 0.911391f, 0.911470f, 0.911548f, 0.911627f,
+ 0.911706f, 0.911785f, 0.911864f, 0.911942f, 0.912021f, 0.912099f, 0.912178f, 0.912257f,
+ 0.912335f, 0.912414f, 0.912492f, 0.912571f, 0.912649f, 0.912727f, 0.912806f, 0.912884f,
+ 0.912962f, 0.913040f, 0.913119f, 0.913197f, 0.913275f, 0.913353f, 0.913431f, 0.913509f,
+ 0.913587f, 0.913665f, 0.913743f, 0.913821f, 0.913899f, 0.913976f, 0.914054f, 0.914132f,
+ 0.914210f, 0.914287f, 0.914365f, 0.914443f, 0.914520f, 0.914598f, 0.914675f, 0.914753f,
+ 0.914830f, 0.914908f, 0.914985f, 0.915062f, 0.915140f, 0.915217f, 0.915294f, 0.915372f,
+ 0.915449f, 0.915526f, 0.915603f, 0.915680f, 0.915757f, 0.915834f, 0.915911f, 0.915988f,
+ 0.916065f, 0.916142f, 0.916219f, 0.916296f, 0.916372f, 0.916449f, 0.916526f, 0.916602f,
+ 0.916679f, 0.916756f, 0.916832f, 0.916909f, 0.916985f, 0.917062f, 0.917138f, 0.917215f,
+ 0.917291f, 0.917367f, 0.917444f, 0.917520f, 0.917596f, 0.917672f, 0.917749f, 0.917825f,
+ 0.917901f, 0.917977f, 0.918053f, 0.918129f, 0.918205f, 0.918281f, 0.918357f, 0.918433f,
+ 0.918508f, 0.918584f, 0.918660f, 0.918736f, 0.918811f, 0.918887f, 0.918963f, 0.919038f,
+ 0.919114f, 0.919189f, 0.919265f, 0.919340f, 0.919416f, 0.919491f, 0.919567f, 0.919642f,
+ 0.919717f, 0.919792f, 0.919868f, 0.919943f, 0.920018f, 0.920093f, 0.920168f, 0.920243f,
+ 0.920318f, 0.920393f, 0.920468f, 0.920543f, 0.920618f, 0.920693f, 0.920768f, 0.920842f,
+ 0.920917f, 0.920992f, 0.921067f, 0.921141f, 0.921216f, 0.921291f, 0.921365f, 0.921440f,
+ 0.921514f, 0.921588f, 0.921663f, 0.921737f, 0.921812f, 0.921886f, 0.921960f, 0.922034f,
+ 0.922109f, 0.922183f, 0.922257f, 0.922331f, 0.922405f, 0.922479f, 0.922553f, 0.922627f,
+ 0.922701f, 0.922775f, 0.922849f, 0.922923f, 0.922997f, 0.923070f, 0.923144f, 0.923218f,
+ 0.923291f, 0.923365f, 0.923439f, 0.923512f, 0.923586f, 0.923659f, 0.923733f, 0.923806f,
+ 0.923880f, 0.923953f, 0.924026f, 0.924100f, 0.924173f, 0.924246f, 0.924319f, 0.924392f,
+ 0.924465f, 0.924539f, 0.924612f, 0.924685f, 0.924758f, 0.924831f, 0.924904f, 0.924976f,
+ 0.925049f, 0.925122f, 0.925195f, 0.925268f, 0.925340f, 0.925413f, 0.925486f, 0.925558f,
+ 0.925631f, 0.925703f, 0.925776f, 0.925848f, 0.925921f, 0.925993f, 0.926066f, 0.926138f,
+ 0.926210f, 0.926283f, 0.926355f, 0.926427f, 0.926499f, 0.926571f, 0.926643f, 0.926715f,
+ 0.926787f, 0.926859f, 0.926931f, 0.927003f, 0.927075f, 0.927147f, 0.927219f, 0.927291f,
+ 0.927363f, 0.927434f, 0.927506f, 0.927578f, 0.927649f, 0.927721f, 0.927792f, 0.927864f,
+ 0.927935f, 0.928007f, 0.928078f, 0.928150f, 0.928221f, 0.928292f, 0.928364f, 0.928435f,
+ 0.928506f, 0.928577f, 0.928648f, 0.928720f, 0.928791f, 0.928862f, 0.928933f, 0.929004f,
+ 0.929075f, 0.929146f, 0.929216f, 0.929287f, 0.929358f, 0.929429f, 0.929500f, 0.929570f,
+ 0.929641f, 0.929712f, 0.929782f, 0.929853f, 0.929923f, 0.929994f, 0.930064f, 0.930135f,
+ 0.930205f, 0.930275f, 0.930346f, 0.930416f, 0.930486f, 0.930556f, 0.930627f, 0.930697f,
+ 0.930767f, 0.930837f, 0.930907f, 0.930977f, 0.931047f, 0.931117f, 0.931187f, 0.931257f,
+ 0.931327f, 0.931397f, 0.931466f, 0.931536f, 0.931606f, 0.931675f, 0.931745f, 0.931815f,
+ 0.931884f, 0.931954f, 0.932023f, 0.932093f, 0.932162f, 0.932232f, 0.932301f, 0.932370f,
+ 0.932440f, 0.932509f, 0.932578f, 0.932647f, 0.932716f, 0.932786f, 0.932855f, 0.932924f,
+ 0.932993f, 0.933062f, 0.933131f, 0.933200f, 0.933269f, 0.933337f, 0.933406f, 0.933475f,
+ 0.933544f, 0.933612f, 0.933681f, 0.933750f, 0.933818f, 0.933887f, 0.933956f, 0.934024f,
+ 0.934093f, 0.934161f, 0.934229f, 0.934298f, 0.934366f, 0.934434f, 0.934503f, 0.934571f,
+ 0.934639f, 0.934707f, 0.934775f, 0.934844f, 0.934912f, 0.934980f, 0.935048f, 0.935116f,
+ 0.935184f, 0.935251f, 0.935319f, 0.935387f, 0.935455f, 0.935523f, 0.935590f, 0.935658f,
+ 0.935726f, 0.935793f, 0.935861f, 0.935928f, 0.935996f, 0.936063f, 0.936131f, 0.936198f,
+ 0.936266f, 0.936333f, 0.936400f, 0.936468f, 0.936535f, 0.936602f, 0.936669f, 0.936736f,
+ 0.936803f, 0.936871f, 0.936938f, 0.937005f, 0.937072f, 0.937138f, 0.937205f, 0.937272f,
+ 0.937339f, 0.937406f, 0.937473f, 0.937539f, 0.937606f, 0.937673f, 0.937739f, 0.937806f,
+ 0.937872f, 0.937939f, 0.938005f, 0.938072f, 0.938138f, 0.938205f, 0.938271f, 0.938337f,
+ 0.938404f, 0.938470f, 0.938536f, 0.938602f, 0.938668f, 0.938734f, 0.938800f, 0.938866f,
+ 0.938932f, 0.938998f, 0.939064f, 0.939130f, 0.939196f, 0.939262f, 0.939328f, 0.939394f,
+ 0.939459f, 0.939525f, 0.939591f, 0.939656f, 0.939722f, 0.939787f, 0.939853f, 0.939918f,
+ 0.939984f, 0.940049f, 0.940115f, 0.940180f, 0.940245f, 0.940310f, 0.940376f, 0.940441f,
+ 0.940506f, 0.940571f, 0.940636f, 0.940701f, 0.940766f, 0.940831f, 0.940896f, 0.940961f,
+ 0.941026f, 0.941091f, 0.941156f, 0.941221f, 0.941285f, 0.941350f, 0.941415f, 0.941479f,
+ 0.941544f, 0.941609f, 0.941673f, 0.941738f, 0.941802f, 0.941867f, 0.941931f, 0.941995f,
+ 0.942060f, 0.942124f, 0.942188f, 0.942253f, 0.942317f, 0.942381f, 0.942445f, 0.942509f,
+ 0.942573f, 0.942637f, 0.942701f, 0.942765f, 0.942829f, 0.942893f, 0.942957f, 0.943021f,
+ 0.943084f, 0.943148f, 0.943212f, 0.943276f, 0.943339f, 0.943403f, 0.943466f, 0.943530f,
+ 0.943593f, 0.943657f, 0.943720f, 0.943784f, 0.943847f, 0.943910f, 0.943974f, 0.944037f,
+ 0.944100f, 0.944163f, 0.944227f, 0.944290f, 0.944353f, 0.944416f, 0.944479f, 0.944542f,
+ 0.944605f, 0.944668f, 0.944731f, 0.944793f, 0.944856f, 0.944919f, 0.944982f, 0.945045f,
+ 0.945107f, 0.945170f, 0.945232f, 0.945295f, 0.945358f, 0.945420f, 0.945482f, 0.945545f,
+ 0.945607f, 0.945670f, 0.945732f, 0.945794f, 0.945857f, 0.945919f, 0.945981f, 0.946043f,
+ 0.946105f, 0.946167f, 0.946229f, 0.946291f, 0.946353f, 0.946415f, 0.946477f, 0.946539f,
+ 0.946601f, 0.946663f, 0.946724f, 0.946786f, 0.946848f, 0.946910f, 0.946971f, 0.947033f,
+ 0.947094f, 0.947156f, 0.947217f, 0.947279f, 0.947340f, 0.947402f, 0.947463f, 0.947524f,
+ 0.947586f, 0.947647f, 0.947708f, 0.947769f, 0.947830f, 0.947891f, 0.947953f, 0.948014f,
+ 0.948075f, 0.948136f, 0.948196f, 0.948257f, 0.948318f, 0.948379f, 0.948440f, 0.948501f,
+ 0.948561f, 0.948622f, 0.948683f, 0.948743f, 0.948804f, 0.948864f, 0.948925f, 0.948985f,
+ 0.949046f, 0.949106f, 0.949167f, 0.949227f, 0.949287f, 0.949348f, 0.949408f, 0.949468f,
+ 0.949528f, 0.949588f, 0.949648f, 0.949708f, 0.949768f, 0.949829f, 0.949888f, 0.949948f,
+ 0.950008f, 0.950068f, 0.950128f, 0.950188f, 0.950247f, 0.950307f, 0.950367f, 0.950426f,
+ 0.950486f, 0.950546f, 0.950605f, 0.950665f, 0.950724f, 0.950784f, 0.950843f, 0.950902f,
+ 0.950962f, 0.951021f, 0.951080f, 0.951139f, 0.951199f, 0.951258f, 0.951317f, 0.951376f,
+ 0.951435f, 0.951494f, 0.951553f, 0.951612f, 0.951671f, 0.951730f, 0.951789f, 0.951847f,
+ 0.951906f, 0.951965f, 0.952024f, 0.952082f, 0.952141f, 0.952199f, 0.952258f, 0.952317f,
+ 0.952375f, 0.952433f, 0.952492f, 0.952550f, 0.952609f, 0.952667f, 0.952725f, 0.952783f,
+ 0.952842f, 0.952900f, 0.952958f, 0.953016f, 0.953074f, 0.953132f, 0.953190f, 0.953248f,
+ 0.953306f, 0.953364f, 0.953422f, 0.953480f, 0.953537f, 0.953595f, 0.953653f, 0.953711f,
+ 0.953768f, 0.953826f, 0.953883f, 0.953941f, 0.953998f, 0.954056f, 0.954113f, 0.954171f,
+ 0.954228f, 0.954285f, 0.954343f, 0.954400f, 0.954457f, 0.954514f, 0.954572f, 0.954629f,
+ 0.954686f, 0.954743f, 0.954800f, 0.954857f, 0.954914f, 0.954971f, 0.955028f, 0.955084f,
+ 0.955141f, 0.955198f, 0.955255f, 0.955311f, 0.955368f, 0.955425f, 0.955481f, 0.955538f,
+ 0.955594f, 0.955651f, 0.955707f, 0.955764f, 0.955820f, 0.955876f, 0.955933f, 0.955989f,
+ 0.956045f, 0.956101f, 0.956158f, 0.956214f, 0.956270f, 0.956326f, 0.956382f, 0.956438f,
+ 0.956494f, 0.956550f, 0.956606f, 0.956662f, 0.956717f, 0.956773f, 0.956829f, 0.956885f,
+ 0.956940f, 0.956996f, 0.957052f, 0.957107f, 0.957163f, 0.957218f, 0.957274f, 0.957329f,
+ 0.957385f, 0.957440f, 0.957495f, 0.957550f, 0.957606f, 0.957661f, 0.957716f, 0.957771f,
+ 0.957826f, 0.957882f, 0.957937f, 0.957992f, 0.958046f, 0.958101f, 0.958156f, 0.958211f,
+ 0.958266f, 0.958321f, 0.958376f, 0.958430f, 0.958485f, 0.958540f, 0.958594f, 0.958649f,
+ 0.958703f, 0.958758f, 0.958812f, 0.958867f, 0.958921f, 0.958976f, 0.959030f, 0.959084f,
+ 0.959139f, 0.959193f, 0.959247f, 0.959301f, 0.959355f, 0.959409f, 0.959463f, 0.959518f,
+ 0.959572f, 0.959625f, 0.959679f, 0.959733f, 0.959787f, 0.959841f, 0.959895f, 0.959948f,
+ 0.960002f, 0.960056f, 0.960109f, 0.960163f, 0.960217f, 0.960270f, 0.960324f, 0.960377f,
+ 0.960431f, 0.960484f, 0.960537f, 0.960591f, 0.960644f, 0.960697f, 0.960750f, 0.960804f,
+ 0.960857f, 0.960910f, 0.960963f, 0.961016f, 0.961069f, 0.961122f, 0.961175f, 0.961228f,
+ 0.961280f, 0.961333f, 0.961386f, 0.961439f, 0.961492f, 0.961544f, 0.961597f, 0.961649f,
+ 0.961702f, 0.961755f, 0.961807f, 0.961860f, 0.961912f, 0.961964f, 0.962017f, 0.962069f,
+ 0.962121f, 0.962174f, 0.962226f, 0.962278f, 0.962330f, 0.962382f, 0.962434f, 0.962486f,
+ 0.962538f, 0.962590f, 0.962642f, 0.962694f, 0.962746f, 0.962798f, 0.962850f, 0.962902f,
+ 0.962953f, 0.963005f, 0.963057f, 0.963108f, 0.963160f, 0.963211f, 0.963263f, 0.963314f,
+ 0.963366f, 0.963417f, 0.963469f, 0.963520f, 0.963571f, 0.963623f, 0.963674f, 0.963725f,
+ 0.963776f, 0.963827f, 0.963878f, 0.963929f, 0.963980f, 0.964031f, 0.964082f, 0.964133f,
+ 0.964184f, 0.964235f, 0.964286f, 0.964336f, 0.964387f, 0.964438f, 0.964489f, 0.964539f,
+ 0.964590f, 0.964640f, 0.964691f, 0.964741f, 0.964792f, 0.964842f, 0.964893f, 0.964943f,
+ 0.964993f, 0.965044f, 0.965094f, 0.965144f, 0.965194f, 0.965244f, 0.965294f, 0.965344f,
+ 0.965394f, 0.965444f, 0.965494f, 0.965544f, 0.965594f, 0.965644f, 0.965694f, 0.965744f,
+ 0.965793f, 0.965843f, 0.965893f, 0.965942f, 0.965992f, 0.966042f, 0.966091f, 0.966141f,
+ 0.966190f, 0.966239f, 0.966289f, 0.966338f, 0.966387f, 0.966437f, 0.966486f, 0.966535f,
+ 0.966584f, 0.966633f, 0.966683f, 0.966732f, 0.966781f, 0.966830f, 0.966879f, 0.966928f,
+ 0.966976f, 0.967025f, 0.967074f, 0.967123f, 0.967172f, 0.967220f, 0.967269f, 0.967318f,
+ 0.967366f, 0.967415f, 0.967463f, 0.967512f, 0.967560f, 0.967609f, 0.967657f, 0.967706f,
+ 0.967754f, 0.967802f, 0.967850f, 0.967899f, 0.967947f, 0.967995f, 0.968043f, 0.968091f,
+ 0.968139f, 0.968187f, 0.968235f, 0.968283f, 0.968331f, 0.968379f, 0.968427f, 0.968474f,
+ 0.968522f, 0.968570f, 0.968617f, 0.968665f, 0.968713f, 0.968760f, 0.968808f, 0.968855f,
+ 0.968903f, 0.968950f, 0.968998f, 0.969045f, 0.969092f, 0.969140f, 0.969187f, 0.969234f,
+ 0.969281f, 0.969328f, 0.969375f, 0.969423f, 0.969470f, 0.969517f, 0.969564f, 0.969611f,
+ 0.969657f, 0.969704f, 0.969751f, 0.969798f, 0.969845f, 0.969891f, 0.969938f, 0.969985f,
+ 0.970031f, 0.970078f, 0.970124f, 0.970171f, 0.970217f, 0.970264f, 0.970310f, 0.970357f,
+ 0.970403f, 0.970449f, 0.970495f, 0.970542f, 0.970588f, 0.970634f, 0.970680f, 0.970726f,
+ 0.970772f, 0.970818f, 0.970864f, 0.970910f, 0.970956f, 0.971002f, 0.971048f, 0.971093f,
+ 0.971139f, 0.971185f, 0.971231f, 0.971276f, 0.971322f, 0.971367f, 0.971413f, 0.971458f,
+ 0.971504f, 0.971549f, 0.971595f, 0.971640f, 0.971685f, 0.971731f, 0.971776f, 0.971821f,
+ 0.971866f, 0.971911f, 0.971957f, 0.972002f, 0.972047f, 0.972092f, 0.972137f, 0.972182f,
+ 0.972227f, 0.972271f, 0.972316f, 0.972361f, 0.972406f, 0.972450f, 0.972495f, 0.972540f,
+ 0.972584f, 0.972629f, 0.972673f, 0.972718f, 0.972762f, 0.972807f, 0.972851f, 0.972896f,
+ 0.972940f, 0.972984f, 0.973028f, 0.973073f, 0.973117f, 0.973161f, 0.973205f, 0.973249f,
+ 0.973293f, 0.973337f, 0.973381f, 0.973425f, 0.973469f, 0.973513f, 0.973557f, 0.973601f,
+ 0.973644f, 0.973688f, 0.973732f, 0.973775f, 0.973819f, 0.973862f, 0.973906f, 0.973949f,
+ 0.973993f, 0.974036f, 0.974080f, 0.974123f, 0.974166f, 0.974210f, 0.974253f, 0.974296f,
+ 0.974339f, 0.974383f, 0.974426f, 0.974469f, 0.974512f, 0.974555f, 0.974598f, 0.974641f,
+ 0.974684f, 0.974726f, 0.974769f, 0.974812f, 0.974855f, 0.974897f, 0.974940f, 0.974983f,
+ 0.975025f, 0.975068f, 0.975110f, 0.975153f, 0.975195f, 0.975238f, 0.975280f, 0.975323f,
+ 0.975365f, 0.975407f, 0.975449f, 0.975492f, 0.975534f, 0.975576f, 0.975618f, 0.975660f,
+ 0.975702f, 0.975744f, 0.975786f, 0.975828f, 0.975870f, 0.975912f, 0.975954f, 0.975995f,
+ 0.976037f, 0.976079f, 0.976120f, 0.976162f, 0.976204f, 0.976245f, 0.976287f, 0.976328f,
+ 0.976370f, 0.976411f, 0.976453f, 0.976494f, 0.976535f, 0.976576f, 0.976618f, 0.976659f,
+ 0.976700f, 0.976741f, 0.976782f, 0.976823f, 0.976864f, 0.976905f, 0.976946f, 0.976987f,
+ 0.977028f, 0.977069f, 0.977110f, 0.977151f, 0.977191f, 0.977232f, 0.977273f, 0.977313f,
+ 0.977354f, 0.977394f, 0.977435f, 0.977475f, 0.977516f, 0.977556f, 0.977597f, 0.977637f,
+ 0.977677f, 0.977718f, 0.977758f, 0.977798f, 0.977838f, 0.977878f, 0.977918f, 0.977959f,
+ 0.977998f, 0.978038f, 0.978078f, 0.978118f, 0.978158f, 0.978198f, 0.978238f, 0.978278f,
+ 0.978317f, 0.978357f, 0.978397f, 0.978436f, 0.978476f, 0.978516f, 0.978555f, 0.978594f,
+ 0.978634f, 0.978673f, 0.978713f, 0.978752f, 0.978791f, 0.978831f, 0.978870f, 0.978909f,
+ 0.978948f, 0.978987f, 0.979026f, 0.979065f, 0.979104f, 0.979143f, 0.979182f, 0.979221f,
+ 0.979260f, 0.979299f, 0.979338f, 0.979376f, 0.979415f, 0.979454f, 0.979493f, 0.979531f,
+ 0.979570f, 0.979608f, 0.979647f, 0.979685f, 0.979724f, 0.979762f, 0.979800f, 0.979839f,
+ 0.979877f, 0.979915f, 0.979954f, 0.979992f, 0.980030f, 0.980068f, 0.980106f, 0.980144f,
+ 0.980182f, 0.980220f, 0.980258f, 0.980296f, 0.980334f, 0.980372f, 0.980409f, 0.980447f,
+ 0.980485f, 0.980523f, 0.980560f, 0.980598f, 0.980635f, 0.980673f, 0.980710f, 0.980748f,
+ 0.980785f, 0.980823f, 0.980860f, 0.980897f, 0.980935f, 0.980972f, 0.981009f, 0.981046f,
+ 0.981083f, 0.981120f, 0.981158f, 0.981195f, 0.981232f, 0.981269f, 0.981305f, 0.981342f,
+ 0.981379f, 0.981416f, 0.981453f, 0.981490f, 0.981526f, 0.981563f, 0.981600f, 0.981636f,
+ 0.981673f, 0.981709f, 0.981746f, 0.981782f, 0.981819f, 0.981855f, 0.981891f, 0.981928f,
+ 0.981964f, 0.982000f, 0.982036f, 0.982072f, 0.982109f, 0.982145f, 0.982181f, 0.982217f,
+ 0.982253f, 0.982289f, 0.982325f, 0.982360f, 0.982396f, 0.982432f, 0.982468f, 0.982504f,
+ 0.982539f, 0.982575f, 0.982611f, 0.982646f, 0.982682f, 0.982717f, 0.982753f, 0.982788f,
+ 0.982824f, 0.982859f, 0.982894f, 0.982930f, 0.982965f, 0.983000f, 0.983035f, 0.983070f,
+ 0.983105f, 0.983141f, 0.983176f, 0.983211f, 0.983246f, 0.983281f, 0.983315f, 0.983350f,
+ 0.983385f, 0.983420f, 0.983455f, 0.983489f, 0.983524f, 0.983559f, 0.983593f, 0.983628f,
+ 0.983662f, 0.983697f, 0.983731f, 0.983766f, 0.983800f, 0.983835f, 0.983869f, 0.983903f,
+ 0.983937f, 0.983972f, 0.984006f, 0.984040f, 0.984074f, 0.984108f, 0.984142f, 0.984176f,
+ 0.984210f, 0.984244f, 0.984278f, 0.984312f, 0.984346f, 0.984379f, 0.984413f, 0.984447f,
+ 0.984480f, 0.984514f, 0.984548f, 0.984581f, 0.984615f, 0.984648f, 0.984682f, 0.984715f,
+ 0.984748f, 0.984782f, 0.984815f, 0.984848f, 0.984882f, 0.984915f, 0.984948f, 0.984981f,
+ 0.985014f, 0.985047f, 0.985080f, 0.985113f, 0.985146f, 0.985179f, 0.985212f, 0.985245f,
+ 0.985278f, 0.985310f, 0.985343f, 0.985376f, 0.985408f, 0.985441f, 0.985474f, 0.985506f,
+ 0.985539f, 0.985571f, 0.985604f, 0.985636f, 0.985668f, 0.985701f, 0.985733f, 0.985765f,
+ 0.985798f, 0.985830f, 0.985862f, 0.985894f, 0.985926f, 0.985958f, 0.985990f, 0.986022f,
+ 0.986054f, 0.986086f, 0.986118f, 0.986150f, 0.986181f, 0.986213f, 0.986245f, 0.986276f,
+ 0.986308f, 0.986340f, 0.986371f, 0.986403f, 0.986434f, 0.986466f, 0.986497f, 0.986529f,
+ 0.986560f, 0.986591f, 0.986623f, 0.986654f, 0.986685f, 0.986716f, 0.986747f, 0.986778f,
+ 0.986809f, 0.986840f, 0.986871f, 0.986902f, 0.986933f, 0.986964f, 0.986995f, 0.987026f,
+ 0.987057f, 0.987087f, 0.987118f, 0.987149f, 0.987179f, 0.987210f, 0.987240f, 0.987271f,
+ 0.987301f, 0.987332f, 0.987362f, 0.987393f, 0.987423f, 0.987453f, 0.987484f, 0.987514f,
+ 0.987544f, 0.987574f, 0.987604f, 0.987634f, 0.987664f, 0.987694f, 0.987724f, 0.987754f,
+ 0.987784f, 0.987814f, 0.987844f, 0.987874f, 0.987903f, 0.987933f, 0.987963f, 0.987992f,
+ 0.988022f, 0.988052f, 0.988081f, 0.988111f, 0.988140f, 0.988169f, 0.988199f, 0.988228f,
+ 0.988258f, 0.988287f, 0.988316f, 0.988345f, 0.988374f, 0.988404f, 0.988433f, 0.988462f,
+ 0.988491f, 0.988520f, 0.988549f, 0.988578f, 0.988607f, 0.988635f, 0.988664f, 0.988693f,
+ 0.988722f, 0.988750f, 0.988779f, 0.988808f, 0.988836f, 0.988865f, 0.988893f, 0.988922f,
+ 0.988950f, 0.988979f, 0.989007f, 0.989035f, 0.989064f, 0.989092f, 0.989120f, 0.989148f,
+ 0.989177f, 0.989205f, 0.989233f, 0.989261f, 0.989289f, 0.989317f, 0.989345f, 0.989373f,
+ 0.989400f, 0.989428f, 0.989456f, 0.989484f, 0.989511f, 0.989539f, 0.989567f, 0.989594f,
+ 0.989622f, 0.989650f, 0.989677f, 0.989704f, 0.989732f, 0.989759f, 0.989787f, 0.989814f,
+ 0.989841f, 0.989869f, 0.989896f, 0.989923f, 0.989950f, 0.989977f, 0.990004f, 0.990031f,
+ 0.990058f, 0.990085f, 0.990112f, 0.990139f, 0.990166f, 0.990193f, 0.990219f, 0.990246f,
+ 0.990273f, 0.990299f, 0.990326f, 0.990353f, 0.990379f, 0.990406f, 0.990432f, 0.990459f,
+ 0.990485f, 0.990511f, 0.990538f, 0.990564f, 0.990590f, 0.990617f, 0.990643f, 0.990669f,
+ 0.990695f, 0.990721f, 0.990747f, 0.990773f, 0.990799f, 0.990825f, 0.990851f, 0.990877f,
+ 0.990903f, 0.990928f, 0.990954f, 0.990980f, 0.991006f, 0.991031f, 0.991057f, 0.991082f,
+ 0.991108f, 0.991133f, 0.991159f, 0.991184f, 0.991210f, 0.991235f, 0.991260f, 0.991286f,
+ 0.991311f, 0.991336f, 0.991361f, 0.991386f, 0.991411f, 0.991437f, 0.991462f, 0.991487f,
+ 0.991511f, 0.991536f, 0.991561f, 0.991586f, 0.991611f, 0.991636f, 0.991660f, 0.991685f,
+ 0.991710f, 0.991734f, 0.991759f, 0.991783f, 0.991808f, 0.991832f, 0.991857f, 0.991881f,
+ 0.991906f, 0.991930f, 0.991954f, 0.991979f, 0.992003f, 0.992027f, 0.992051f, 0.992075f,
+ 0.992099f, 0.992123f, 0.992147f, 0.992171f, 0.992195f, 0.992219f, 0.992243f, 0.992267f,
+ 0.992291f, 0.992314f, 0.992338f, 0.992362f, 0.992385f, 0.992409f, 0.992433f, 0.992456f,
+ 0.992480f, 0.992503f, 0.992526f, 0.992550f, 0.992573f, 0.992596f, 0.992620f, 0.992643f,
+ 0.992666f, 0.992689f, 0.992712f, 0.992736f, 0.992759f, 0.992782f, 0.992805f, 0.992828f,
+ 0.992850f, 0.992873f, 0.992896f, 0.992919f, 0.992942f, 0.992964f, 0.992987f, 0.993010f,
+ 0.993032f, 0.993055f, 0.993077f, 0.993100f, 0.993122f, 0.993145f, 0.993167f, 0.993190f,
+ 0.993212f, 0.993234f, 0.993257f, 0.993279f, 0.993301f, 0.993323f, 0.993345f, 0.993367f,
+ 0.993389f, 0.993411f, 0.993433f, 0.993455f, 0.993477f, 0.993499f, 0.993521f, 0.993542f,
+ 0.993564f, 0.993586f, 0.993608f, 0.993629f, 0.993651f, 0.993672f, 0.993694f, 0.993715f,
+ 0.993737f, 0.993758f, 0.993779f, 0.993801f, 0.993822f, 0.993843f, 0.993865f, 0.993886f,
+ 0.993907f, 0.993928f, 0.993949f, 0.993970f, 0.993991f, 0.994012f, 0.994033f, 0.994054f,
+ 0.994075f, 0.994096f, 0.994116f, 0.994137f, 0.994158f, 0.994179f, 0.994199f, 0.994220f,
+ 0.994240f, 0.994261f, 0.994281f, 0.994302f, 0.994322f, 0.994343f, 0.994363f, 0.994383f,
+ 0.994404f, 0.994424f, 0.994444f, 0.994464f, 0.994484f, 0.994505f, 0.994525f, 0.994545f,
+ 0.994565f, 0.994585f, 0.994604f, 0.994624f, 0.994644f, 0.994664f, 0.994684f, 0.994703f,
+ 0.994723f, 0.994743f, 0.994762f, 0.994782f, 0.994802f, 0.994821f, 0.994841f, 0.994860f,
+ 0.994879f, 0.994899f, 0.994918f, 0.994937f, 0.994957f, 0.994976f, 0.994995f, 0.995014f,
+ 0.995033f, 0.995052f, 0.995071f, 0.995090f, 0.995109f, 0.995128f, 0.995147f, 0.995166f,
+ 0.995185f, 0.995203f, 0.995222f, 0.995241f, 0.995260f, 0.995278f, 0.995297f, 0.995315f,
+ 0.995334f, 0.995352f, 0.995371f, 0.995389f, 0.995408f, 0.995426f, 0.995444f, 0.995463f,
+ 0.995481f, 0.995499f, 0.995517f, 0.995535f, 0.995553f, 0.995571f, 0.995589f, 0.995607f,
+ 0.995625f, 0.995643f, 0.995661f, 0.995679f, 0.995697f, 0.995714f, 0.995732f, 0.995750f,
+ 0.995767f, 0.995785f, 0.995803f, 0.995820f, 0.995838f, 0.995855f, 0.995872f, 0.995890f,
+ 0.995907f, 0.995925f, 0.995942f, 0.995959f, 0.995976f, 0.995993f, 0.996011f, 0.996028f,
+ 0.996045f, 0.996062f, 0.996079f, 0.996096f, 0.996113f, 0.996129f, 0.996146f, 0.996163f,
+ 0.996180f, 0.996197f, 0.996213f, 0.996230f, 0.996247f, 0.996263f, 0.996280f, 0.996296f,
+ 0.996313f, 0.996329f, 0.996345f, 0.996362f, 0.996378f, 0.996394f, 0.996411f, 0.996427f,
+ 0.996443f, 0.996459f, 0.996475f, 0.996491f, 0.996507f, 0.996523f, 0.996539f, 0.996555f,
+ 0.996571f, 0.996587f, 0.996603f, 0.996619f, 0.996634f, 0.996650f, 0.996666f, 0.996681f,
+ 0.996697f, 0.996712f, 0.996728f, 0.996743f, 0.996759f, 0.996774f, 0.996790f, 0.996805f,
+ 0.996820f, 0.996836f, 0.996851f, 0.996866f, 0.996881f, 0.996896f, 0.996911f, 0.996926f,
+ 0.996941f, 0.996956f, 0.996971f, 0.996986f, 0.997001f, 0.997016f, 0.997031f, 0.997045f,
+ 0.997060f, 0.997075f, 0.997089f, 0.997104f, 0.997119f, 0.997133f, 0.997148f, 0.997162f,
+ 0.997176f, 0.997191f, 0.997205f, 0.997219f, 0.997234f, 0.997248f, 0.997262f, 0.997276f,
+ 0.997290f, 0.997305f, 0.997319f, 0.997333f, 0.997347f, 0.997361f, 0.997374f, 0.997388f,
+ 0.997402f, 0.997416f, 0.997430f, 0.997443f, 0.997457f, 0.997471f, 0.997484f, 0.997498f,
+ 0.997511f, 0.997525f, 0.997538f, 0.997552f, 0.997565f, 0.997579f, 0.997592f, 0.997605f,
+ 0.997618f, 0.997632f, 0.997645f, 0.997658f, 0.997671f, 0.997684f, 0.997697f, 0.997710f,
+ 0.997723f, 0.997736f, 0.997749f, 0.997762f, 0.997774f, 0.997787f, 0.997800f, 0.997813f,
+ 0.997825f, 0.997838f, 0.997851f, 0.997863f, 0.997876f, 0.997888f, 0.997901f, 0.997913f,
+ 0.997925f, 0.997938f, 0.997950f, 0.997962f, 0.997974f, 0.997987f, 0.997999f, 0.998011f,
+ 0.998023f, 0.998035f, 0.998047f, 0.998059f, 0.998071f, 0.998083f, 0.998094f, 0.998106f,
+ 0.998118f, 0.998130f, 0.998142f, 0.998153f, 0.998165f, 0.998176f, 0.998188f, 0.998200f,
+ 0.998211f, 0.998222f, 0.998234f, 0.998245f, 0.998257f, 0.998268f, 0.998279f, 0.998290f,
+ 0.998302f, 0.998313f, 0.998324f, 0.998335f, 0.998346f, 0.998357f, 0.998368f, 0.998379f,
+ 0.998390f, 0.998401f, 0.998411f, 0.998422f, 0.998433f, 0.998444f, 0.998454f, 0.998465f,
+ 0.998476f, 0.998486f, 0.998497f, 0.998507f, 0.998518f, 0.998528f, 0.998538f, 0.998549f,
+ 0.998559f, 0.998569f, 0.998580f, 0.998590f, 0.998600f, 0.998610f, 0.998620f, 0.998630f,
+ 0.998640f, 0.998650f, 0.998660f, 0.998670f, 0.998680f, 0.998690f, 0.998700f, 0.998709f,
+ 0.998719f, 0.998729f, 0.998738f, 0.998748f, 0.998758f, 0.998767f, 0.998777f, 0.998786f,
+ 0.998795f, 0.998805f, 0.998814f, 0.998824f, 0.998833f, 0.998842f, 0.998851f, 0.998860f,
+ 0.998870f, 0.998879f, 0.998888f, 0.998897f, 0.998906f, 0.998915f, 0.998924f, 0.998932f,
+ 0.998941f, 0.998950f, 0.998959f, 0.998968f, 0.998976f, 0.998985f, 0.998994f, 0.999002f,
+ 0.999011f, 0.999019f, 0.999028f, 0.999036f, 0.999044f, 0.999053f, 0.999061f, 0.999069f,
+ 0.999078f, 0.999086f, 0.999094f, 0.999102f, 0.999110f, 0.999118f, 0.999126f, 0.999134f,
+ 0.999142f, 0.999150f, 0.999158f, 0.999166f, 0.999174f, 0.999182f, 0.999189f, 0.999197f,
+ 0.999205f, 0.999212f, 0.999220f, 0.999228f, 0.999235f, 0.999243f, 0.999250f, 0.999257f,
+ 0.999265f, 0.999272f, 0.999279f, 0.999287f, 0.999294f, 0.999301f, 0.999308f, 0.999315f,
+ 0.999322f, 0.999329f, 0.999336f, 0.999343f, 0.999350f, 0.999357f, 0.999364f, 0.999371f,
+ 0.999378f, 0.999384f, 0.999391f, 0.999398f, 0.999404f, 0.999411f, 0.999418f, 0.999424f,
+ 0.999431f, 0.999437f, 0.999443f, 0.999450f, 0.999456f, 0.999462f, 0.999469f, 0.999475f,
+ 0.999481f, 0.999487f, 0.999493f, 0.999500f, 0.999506f, 0.999512f, 0.999518f, 0.999524f,
+ 0.999529f, 0.999535f, 0.999541f, 0.999547f, 0.999553f, 0.999558f, 0.999564f, 0.999570f,
+ 0.999575f, 0.999581f, 0.999586f, 0.999592f, 0.999597f, 0.999603f, 0.999608f, 0.999614f,
+ 0.999619f, 0.999624f, 0.999629f, 0.999635f, 0.999640f, 0.999645f, 0.999650f, 0.999655f,
+ 0.999660f, 0.999665f, 0.999670f, 0.999675f, 0.999680f, 0.999685f, 0.999689f, 0.999694f,
+ 0.999699f, 0.999704f, 0.999708f, 0.999713f, 0.999717f, 0.999722f, 0.999726f, 0.999731f,
+ 0.999735f, 0.999740f, 0.999744f, 0.999748f, 0.999753f, 0.999757f, 0.999761f, 0.999765f,
+ 0.999769f, 0.999774f, 0.999778f, 0.999782f, 0.999786f, 0.999790f, 0.999793f, 0.999797f,
+ 0.999801f, 0.999805f, 0.999809f, 0.999812f, 0.999816f, 0.999820f, 0.999823f, 0.999827f,
+ 0.999831f, 0.999834f, 0.999838f, 0.999841f, 0.999844f, 0.999848f, 0.999851f, 0.999854f,
+ 0.999858f, 0.999861f, 0.999864f, 0.999867f, 0.999870f, 0.999873f, 0.999876f, 0.999879f,
+ 0.999882f, 0.999885f, 0.999888f, 0.999891f, 0.999894f, 0.999897f, 0.999899f, 0.999902f,
+ 0.999905f, 0.999907f, 0.999910f, 0.999913f, 0.999915f, 0.999917f, 0.999920f, 0.999922f,
+ 0.999925f, 0.999927f, 0.999929f, 0.999932f, 0.999934f, 0.999936f, 0.999938f, 0.999940f,
+ 0.999942f, 0.999944f, 0.999946f, 0.999948f, 0.999950f, 0.999952f, 0.999954f, 0.999956f,
+ 0.999958f, 0.999959f, 0.999961f, 0.999963f, 0.999964f, 0.999966f, 0.999968f, 0.999969f,
+ 0.999971f, 0.999972f, 0.999973f, 0.999975f, 0.999976f, 0.999977f, 0.999979f, 0.999980f,
+ 0.999981f, 0.999982f, 0.999983f, 0.999985f, 0.999986f, 0.999987f, 0.999988f, 0.999988f,
+ 0.999989f, 0.999990f, 0.999991f, 0.999992f, 0.999993f, 0.999993f, 0.999994f, 0.999995f,
+ 0.999995f, 0.999996f, 0.999996f, 0.999997f, 0.999997f, 0.999998f, 0.999998f, 0.999999f,
+ 0.999999f, 0.999999f, 0.999999f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f
+};
+
+static const float cosTable65536[32768] = {
+ 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+ 1.000000f, 1.000000f, 1.000000f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f,
+ 0.999999f, 0.999999f, 0.999999f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999998f,
+ 0.999997f, 0.999997f, 0.999997f, 0.999997f, 0.999996f, 0.999996f, 0.999996f, 0.999996f,
+ 0.999995f, 0.999995f, 0.999995f, 0.999994f, 0.999994f, 0.999994f, 0.999993f, 0.999993f,
+ 0.999993f, 0.999992f, 0.999992f, 0.999991f, 0.999991f, 0.999991f, 0.999990f, 0.999990f,
+ 0.999989f, 0.999989f, 0.999988f, 0.999988f, 0.999988f, 0.999987f, 0.999987f, 0.999986f,
+ 0.999986f, 0.999985f, 0.999985f, 0.999984f, 0.999983f, 0.999983f, 0.999982f, 0.999982f,
+ 0.999981f, 0.999981f, 0.999980f, 0.999979f, 0.999979f, 0.999978f, 0.999977f, 0.999977f,
+ 0.999976f, 0.999976f, 0.999975f, 0.999974f, 0.999973f, 0.999973f, 0.999972f, 0.999971f,
+ 0.999971f, 0.999970f, 0.999969f, 0.999968f, 0.999968f, 0.999967f, 0.999966f, 0.999965f,
+ 0.999964f, 0.999964f, 0.999963f, 0.999962f, 0.999961f, 0.999960f, 0.999959f, 0.999959f,
+ 0.999958f, 0.999957f, 0.999956f, 0.999955f, 0.999954f, 0.999953f, 0.999952f, 0.999951f,
+ 0.999950f, 0.999949f, 0.999948f, 0.999947f, 0.999946f, 0.999945f, 0.999944f, 0.999943f,
+ 0.999942f, 0.999941f, 0.999940f, 0.999939f, 0.999938f, 0.999937f, 0.999936f, 0.999935f,
+ 0.999934f, 0.999933f, 0.999932f, 0.999930f, 0.999929f, 0.999928f, 0.999927f, 0.999926f,
+ 0.999925f, 0.999924f, 0.999922f, 0.999921f, 0.999920f, 0.999919f, 0.999917f, 0.999916f,
+ 0.999915f, 0.999914f, 0.999913f, 0.999911f, 0.999910f, 0.999909f, 0.999907f, 0.999906f,
+ 0.999905f, 0.999903f, 0.999902f, 0.999901f, 0.999899f, 0.999898f, 0.999897f, 0.999895f,
+ 0.999894f, 0.999892f, 0.999891f, 0.999890f, 0.999888f, 0.999887f, 0.999885f, 0.999884f,
+ 0.999882f, 0.999881f, 0.999879f, 0.999878f, 0.999876f, 0.999875f, 0.999873f, 0.999872f,
+ 0.999870f, 0.999869f, 0.999867f, 0.999866f, 0.999864f, 0.999862f, 0.999861f, 0.999859f,
+ 0.999858f, 0.999856f, 0.999854f, 0.999853f, 0.999851f, 0.999849f, 0.999848f, 0.999846f,
+ 0.999844f, 0.999843f, 0.999841f, 0.999839f, 0.999838f, 0.999836f, 0.999834f, 0.999832f,
+ 0.999831f, 0.999829f, 0.999827f, 0.999825f, 0.999823f, 0.999822f, 0.999820f, 0.999818f,
+ 0.999816f, 0.999814f, 0.999812f, 0.999811f, 0.999809f, 0.999807f, 0.999805f, 0.999803f,
+ 0.999801f, 0.999799f, 0.999797f, 0.999795f, 0.999793f, 0.999792f, 0.999790f, 0.999788f,
+ 0.999786f, 0.999784f, 0.999782f, 0.999780f, 0.999778f, 0.999776f, 0.999774f, 0.999771f,
+ 0.999769f, 0.999767f, 0.999765f, 0.999763f, 0.999761f, 0.999759f, 0.999757f, 0.999755f,
+ 0.999753f, 0.999750f, 0.999748f, 0.999746f, 0.999744f, 0.999742f, 0.999740f, 0.999738f,
+ 0.999735f, 0.999733f, 0.999731f, 0.999729f, 0.999726f, 0.999724f, 0.999722f, 0.999720f,
+ 0.999717f, 0.999715f, 0.999713f, 0.999710f, 0.999708f, 0.999706f, 0.999704f, 0.999701f,
+ 0.999699f, 0.999696f, 0.999694f, 0.999692f, 0.999689f, 0.999687f, 0.999685f, 0.999682f,
+ 0.999680f, 0.999677f, 0.999675f, 0.999672f, 0.999670f, 0.999667f, 0.999665f, 0.999663f,
+ 0.999660f, 0.999658f, 0.999655f, 0.999652f, 0.999650f, 0.999647f, 0.999645f, 0.999642f,
+ 0.999640f, 0.999637f, 0.999635f, 0.999632f, 0.999629f, 0.999627f, 0.999624f, 0.999621f,
+ 0.999619f, 0.999616f, 0.999614f, 0.999611f, 0.999608f, 0.999605f, 0.999603f, 0.999600f,
+ 0.999597f, 0.999595f, 0.999592f, 0.999589f, 0.999586f, 0.999584f, 0.999581f, 0.999578f,
+ 0.999575f, 0.999573f, 0.999570f, 0.999567f, 0.999564f, 0.999561f, 0.999558f, 0.999556f,
+ 0.999553f, 0.999550f, 0.999547f, 0.999544f, 0.999541f, 0.999538f, 0.999535f, 0.999532f,
+ 0.999529f, 0.999527f, 0.999524f, 0.999521f, 0.999518f, 0.999515f, 0.999512f, 0.999509f,
+ 0.999506f, 0.999503f, 0.999500f, 0.999497f, 0.999493f, 0.999490f, 0.999487f, 0.999484f,
+ 0.999481f, 0.999478f, 0.999475f, 0.999472f, 0.999469f, 0.999466f, 0.999462f, 0.999459f,
+ 0.999456f, 0.999453f, 0.999450f, 0.999447f, 0.999443f, 0.999440f, 0.999437f, 0.999434f,
+ 0.999431f, 0.999427f, 0.999424f, 0.999421f, 0.999418f, 0.999414f, 0.999411f, 0.999408f,
+ 0.999404f, 0.999401f, 0.999398f, 0.999394f, 0.999391f, 0.999388f, 0.999384f, 0.999381f,
+ 0.999378f, 0.999374f, 0.999371f, 0.999367f, 0.999364f, 0.999361f, 0.999357f, 0.999354f,
+ 0.999350f, 0.999347f, 0.999343f, 0.999340f, 0.999336f, 0.999333f, 0.999329f, 0.999326f,
+ 0.999322f, 0.999319f, 0.999315f, 0.999312f, 0.999308f, 0.999305f, 0.999301f, 0.999297f,
+ 0.999294f, 0.999290f, 0.999287f, 0.999283f, 0.999279f, 0.999276f, 0.999272f, 0.999268f,
+ 0.999265f, 0.999261f, 0.999257f, 0.999254f, 0.999250f, 0.999246f, 0.999243f, 0.999239f,
+ 0.999235f, 0.999231f, 0.999228f, 0.999224f, 0.999220f, 0.999216f, 0.999212f, 0.999209f,
+ 0.999205f, 0.999201f, 0.999197f, 0.999193f, 0.999189f, 0.999186f, 0.999182f, 0.999178f,
+ 0.999174f, 0.999170f, 0.999166f, 0.999162f, 0.999158f, 0.999154f, 0.999150f, 0.999146f,
+ 0.999142f, 0.999138f, 0.999134f, 0.999130f, 0.999126f, 0.999122f, 0.999118f, 0.999114f,
+ 0.999110f, 0.999106f, 0.999102f, 0.999098f, 0.999094f, 0.999090f, 0.999086f, 0.999082f,
+ 0.999078f, 0.999074f, 0.999069f, 0.999065f, 0.999061f, 0.999057f, 0.999053f, 0.999049f,
+ 0.999044f, 0.999040f, 0.999036f, 0.999032f, 0.999028f, 0.999023f, 0.999019f, 0.999015f,
+ 0.999011f, 0.999006f, 0.999002f, 0.998998f, 0.998994f, 0.998989f, 0.998985f, 0.998981f,
+ 0.998976f, 0.998972f, 0.998968f, 0.998963f, 0.998959f, 0.998954f, 0.998950f, 0.998946f,
+ 0.998941f, 0.998937f, 0.998932f, 0.998928f, 0.998924f, 0.998919f, 0.998915f, 0.998910f,
+ 0.998906f, 0.998901f, 0.998897f, 0.998892f, 0.998888f, 0.998883f, 0.998879f, 0.998874f,
+ 0.998870f, 0.998865f, 0.998860f, 0.998856f, 0.998851f, 0.998847f, 0.998842f, 0.998837f,
+ 0.998833f, 0.998828f, 0.998824f, 0.998819f, 0.998814f, 0.998810f, 0.998805f, 0.998800f,
+ 0.998795f, 0.998791f, 0.998786f, 0.998781f, 0.998777f, 0.998772f, 0.998767f, 0.998762f,
+ 0.998758f, 0.998753f, 0.998748f, 0.998743f, 0.998738f, 0.998734f, 0.998729f, 0.998724f,
+ 0.998719f, 0.998714f, 0.998709f, 0.998704f, 0.998700f, 0.998695f, 0.998690f, 0.998685f,
+ 0.998680f, 0.998675f, 0.998670f, 0.998665f, 0.998660f, 0.998655f, 0.998650f, 0.998645f,
+ 0.998640f, 0.998635f, 0.998630f, 0.998625f, 0.998620f, 0.998615f, 0.998610f, 0.998605f,
+ 0.998600f, 0.998595f, 0.998590f, 0.998585f, 0.998580f, 0.998574f, 0.998569f, 0.998564f,
+ 0.998559f, 0.998554f, 0.998549f, 0.998544f, 0.998538f, 0.998533f, 0.998528f, 0.998523f,
+ 0.998518f, 0.998512f, 0.998507f, 0.998502f, 0.998497f, 0.998491f, 0.998486f, 0.998481f,
+ 0.998476f, 0.998470f, 0.998465f, 0.998460f, 0.998454f, 0.998449f, 0.998444f, 0.998438f,
+ 0.998433f, 0.998428f, 0.998422f, 0.998417f, 0.998411f, 0.998406f, 0.998401f, 0.998395f,
+ 0.998390f, 0.998384f, 0.998379f, 0.998373f, 0.998368f, 0.998362f, 0.998357f, 0.998351f,
+ 0.998346f, 0.998340f, 0.998335f, 0.998329f, 0.998324f, 0.998318f, 0.998313f, 0.998307f,
+ 0.998302f, 0.998296f, 0.998290f, 0.998285f, 0.998279f, 0.998273f, 0.998268f, 0.998262f,
+ 0.998257f, 0.998251f, 0.998245f, 0.998240f, 0.998234f, 0.998228f, 0.998222f, 0.998217f,
+ 0.998211f, 0.998205f, 0.998200f, 0.998194f, 0.998188f, 0.998182f, 0.998176f, 0.998171f,
+ 0.998165f, 0.998159f, 0.998153f, 0.998147f, 0.998142f, 0.998136f, 0.998130f, 0.998124f,
+ 0.998118f, 0.998112f, 0.998106f, 0.998100f, 0.998094f, 0.998089f, 0.998083f, 0.998077f,
+ 0.998071f, 0.998065f, 0.998059f, 0.998053f, 0.998047f, 0.998041f, 0.998035f, 0.998029f,
+ 0.998023f, 0.998017f, 0.998011f, 0.998005f, 0.997999f, 0.997993f, 0.997987f, 0.997980f,
+ 0.997974f, 0.997968f, 0.997962f, 0.997956f, 0.997950f, 0.997944f, 0.997938f, 0.997931f,
+ 0.997925f, 0.997919f, 0.997913f, 0.997907f, 0.997901f, 0.997894f, 0.997888f, 0.997882f,
+ 0.997876f, 0.997869f, 0.997863f, 0.997857f, 0.997851f, 0.997844f, 0.997838f, 0.997832f,
+ 0.997825f, 0.997819f, 0.997813f, 0.997806f, 0.997800f, 0.997794f, 0.997787f, 0.997781f,
+ 0.997774f, 0.997768f, 0.997762f, 0.997755f, 0.997749f, 0.997742f, 0.997736f, 0.997730f,
+ 0.997723f, 0.997717f, 0.997710f, 0.997704f, 0.997697f, 0.997691f, 0.997684f, 0.997678f,
+ 0.997671f, 0.997665f, 0.997658f, 0.997651f, 0.997645f, 0.997638f, 0.997632f, 0.997625f,
+ 0.997618f, 0.997612f, 0.997605f, 0.997599f, 0.997592f, 0.997585f, 0.997579f, 0.997572f,
+ 0.997565f, 0.997559f, 0.997552f, 0.997545f, 0.997538f, 0.997532f, 0.997525f, 0.997518f,
+ 0.997511f, 0.997505f, 0.997498f, 0.997491f, 0.997484f, 0.997478f, 0.997471f, 0.997464f,
+ 0.997457f, 0.997450f, 0.997443f, 0.997437f, 0.997430f, 0.997423f, 0.997416f, 0.997409f,
+ 0.997402f, 0.997395f, 0.997388f, 0.997381f, 0.997374f, 0.997368f, 0.997361f, 0.997354f,
+ 0.997347f, 0.997340f, 0.997333f, 0.997326f, 0.997319f, 0.997312f, 0.997305f, 0.997298f,
+ 0.997290f, 0.997283f, 0.997276f, 0.997269f, 0.997262f, 0.997255f, 0.997248f, 0.997241f,
+ 0.997234f, 0.997227f, 0.997219f, 0.997212f, 0.997205f, 0.997198f, 0.997191f, 0.997184f,
+ 0.997176f, 0.997169f, 0.997162f, 0.997155f, 0.997148f, 0.997140f, 0.997133f, 0.997126f,
+ 0.997119f, 0.997111f, 0.997104f, 0.997097f, 0.997089f, 0.997082f, 0.997075f, 0.997067f,
+ 0.997060f, 0.997053f, 0.997045f, 0.997038f, 0.997031f, 0.997023f, 0.997016f, 0.997008f,
+ 0.997001f, 0.996994f, 0.996986f, 0.996979f, 0.996971f, 0.996964f, 0.996956f, 0.996949f,
+ 0.996941f, 0.996934f, 0.996926f, 0.996919f, 0.996911f, 0.996904f, 0.996896f, 0.996889f,
+ 0.996881f, 0.996874f, 0.996866f, 0.996858f, 0.996851f, 0.996843f, 0.996836f, 0.996828f,
+ 0.996820f, 0.996813f, 0.996805f, 0.996797f, 0.996790f, 0.996782f, 0.996774f, 0.996767f,
+ 0.996759f, 0.996751f, 0.996743f, 0.996736f, 0.996728f, 0.996720f, 0.996712f, 0.996705f,
+ 0.996697f, 0.996689f, 0.996681f, 0.996674f, 0.996666f, 0.996658f, 0.996650f, 0.996642f,
+ 0.996634f, 0.996626f, 0.996619f, 0.996611f, 0.996603f, 0.996595f, 0.996587f, 0.996579f,
+ 0.996571f, 0.996563f, 0.996555f, 0.996547f, 0.996539f, 0.996531f, 0.996523f, 0.996515f,
+ 0.996507f, 0.996499f, 0.996491f, 0.996483f, 0.996475f, 0.996467f, 0.996459f, 0.996451f,
+ 0.996443f, 0.996435f, 0.996427f, 0.996419f, 0.996411f, 0.996403f, 0.996394f, 0.996386f,
+ 0.996378f, 0.996370f, 0.996362f, 0.996354f, 0.996345f, 0.996337f, 0.996329f, 0.996321f,
+ 0.996313f, 0.996304f, 0.996296f, 0.996288f, 0.996280f, 0.996271f, 0.996263f, 0.996255f,
+ 0.996247f, 0.996238f, 0.996230f, 0.996222f, 0.996213f, 0.996205f, 0.996197f, 0.996188f,
+ 0.996180f, 0.996171f, 0.996163f, 0.996155f, 0.996146f, 0.996138f, 0.996129f, 0.996121f,
+ 0.996113f, 0.996104f, 0.996096f, 0.996087f, 0.996079f, 0.996070f, 0.996062f, 0.996053f,
+ 0.996045f, 0.996036f, 0.996028f, 0.996019f, 0.996011f, 0.996002f, 0.995993f, 0.995985f,
+ 0.995976f, 0.995968f, 0.995959f, 0.995950f, 0.995942f, 0.995933f, 0.995925f, 0.995916f,
+ 0.995907f, 0.995899f, 0.995890f, 0.995881f, 0.995872f, 0.995864f, 0.995855f, 0.995846f,
+ 0.995838f, 0.995829f, 0.995820f, 0.995811f, 0.995803f, 0.995794f, 0.995785f, 0.995776f,
+ 0.995767f, 0.995759f, 0.995750f, 0.995741f, 0.995732f, 0.995723f, 0.995714f, 0.995705f,
+ 0.995697f, 0.995688f, 0.995679f, 0.995670f, 0.995661f, 0.995652f, 0.995643f, 0.995634f,
+ 0.995625f, 0.995616f, 0.995607f, 0.995598f, 0.995589f, 0.995580f, 0.995571f, 0.995562f,
+ 0.995553f, 0.995544f, 0.995535f, 0.995526f, 0.995517f, 0.995508f, 0.995499f, 0.995490f,
+ 0.995481f, 0.995472f, 0.995463f, 0.995453f, 0.995444f, 0.995435f, 0.995426f, 0.995417f,
+ 0.995408f, 0.995398f, 0.995389f, 0.995380f, 0.995371f, 0.995362f, 0.995352f, 0.995343f,
+ 0.995334f, 0.995325f, 0.995315f, 0.995306f, 0.995297f, 0.995288f, 0.995278f, 0.995269f,
+ 0.995260f, 0.995250f, 0.995241f, 0.995232f, 0.995222f, 0.995213f, 0.995203f, 0.995194f,
+ 0.995185f, 0.995175f, 0.995166f, 0.995156f, 0.995147f, 0.995138f, 0.995128f, 0.995119f,
+ 0.995109f, 0.995100f, 0.995090f, 0.995081f, 0.995071f, 0.995062f, 0.995052f, 0.995043f,
+ 0.995033f, 0.995024f, 0.995014f, 0.995005f, 0.994995f, 0.994985f, 0.994976f, 0.994966f,
+ 0.994957f, 0.994947f, 0.994937f, 0.994928f, 0.994918f, 0.994908f, 0.994899f, 0.994889f,
+ 0.994879f, 0.994870f, 0.994860f, 0.994850f, 0.994841f, 0.994831f, 0.994821f, 0.994811f,
+ 0.994802f, 0.994792f, 0.994782f, 0.994772f, 0.994762f, 0.994753f, 0.994743f, 0.994733f,
+ 0.994723f, 0.994713f, 0.994703f, 0.994694f, 0.994684f, 0.994674f, 0.994664f, 0.994654f,
+ 0.994644f, 0.994634f, 0.994624f, 0.994614f, 0.994604f, 0.994594f, 0.994585f, 0.994575f,
+ 0.994565f, 0.994555f, 0.994545f, 0.994535f, 0.994525f, 0.994515f, 0.994505f, 0.994494f,
+ 0.994484f, 0.994474f, 0.994464f, 0.994454f, 0.994444f, 0.994434f, 0.994424f, 0.994414f,
+ 0.994404f, 0.994394f, 0.994383f, 0.994373f, 0.994363f, 0.994353f, 0.994343f, 0.994333f,
+ 0.994322f, 0.994312f, 0.994302f, 0.994292f, 0.994281f, 0.994271f, 0.994261f, 0.994251f,
+ 0.994240f, 0.994230f, 0.994220f, 0.994210f, 0.994199f, 0.994189f, 0.994179f, 0.994168f,
+ 0.994158f, 0.994148f, 0.994137f, 0.994127f, 0.994116f, 0.994106f, 0.994096f, 0.994085f,
+ 0.994075f, 0.994064f, 0.994054f, 0.994044f, 0.994033f, 0.994023f, 0.994012f, 0.994002f,
+ 0.993991f, 0.993981f, 0.993970f, 0.993960f, 0.993949f, 0.993939f, 0.993928f, 0.993918f,
+ 0.993907f, 0.993896f, 0.993886f, 0.993875f, 0.993865f, 0.993854f, 0.993843f, 0.993833f,
+ 0.993822f, 0.993811f, 0.993801f, 0.993790f, 0.993779f, 0.993769f, 0.993758f, 0.993747f,
+ 0.993737f, 0.993726f, 0.993715f, 0.993705f, 0.993694f, 0.993683f, 0.993672f, 0.993662f,
+ 0.993651f, 0.993640f, 0.993629f, 0.993618f, 0.993608f, 0.993597f, 0.993586f, 0.993575f,
+ 0.993564f, 0.993553f, 0.993542f, 0.993532f, 0.993521f, 0.993510f, 0.993499f, 0.993488f,
+ 0.993477f, 0.993466f, 0.993455f, 0.993444f, 0.993433f, 0.993422f, 0.993411f, 0.993400f,
+ 0.993389f, 0.993378f, 0.993367f, 0.993356f, 0.993345f, 0.993334f, 0.993323f, 0.993312f,
+ 0.993301f, 0.993290f, 0.993279f, 0.993268f, 0.993257f, 0.993245f, 0.993234f, 0.993223f,
+ 0.993212f, 0.993201f, 0.993190f, 0.993178f, 0.993167f, 0.993156f, 0.993145f, 0.993134f,
+ 0.993122f, 0.993111f, 0.993100f, 0.993089f, 0.993077f, 0.993066f, 0.993055f, 0.993044f,
+ 0.993032f, 0.993021f, 0.993010f, 0.992998f, 0.992987f, 0.992976f, 0.992964f, 0.992953f,
+ 0.992942f, 0.992930f, 0.992919f, 0.992908f, 0.992896f, 0.992885f, 0.992873f, 0.992862f,
+ 0.992850f, 0.992839f, 0.992828f, 0.992816f, 0.992805f, 0.992793f, 0.992782f, 0.992770f,
+ 0.992759f, 0.992747f, 0.992736f, 0.992724f, 0.992712f, 0.992701f, 0.992689f, 0.992678f,
+ 0.992666f, 0.992655f, 0.992643f, 0.992631f, 0.992620f, 0.992608f, 0.992596f, 0.992585f,
+ 0.992573f, 0.992561f, 0.992550f, 0.992538f, 0.992526f, 0.992515f, 0.992503f, 0.992491f,
+ 0.992480f, 0.992468f, 0.992456f, 0.992444f, 0.992433f, 0.992421f, 0.992409f, 0.992397f,
+ 0.992385f, 0.992374f, 0.992362f, 0.992350f, 0.992338f, 0.992326f, 0.992314f, 0.992302f,
+ 0.992291f, 0.992279f, 0.992267f, 0.992255f, 0.992243f, 0.992231f, 0.992219f, 0.992207f,
+ 0.992195f, 0.992183f, 0.992171f, 0.992159f, 0.992147f, 0.992135f, 0.992123f, 0.992111f,
+ 0.992099f, 0.992087f, 0.992075f, 0.992063f, 0.992051f, 0.992039f, 0.992027f, 0.992015f,
+ 0.992003f, 0.991991f, 0.991979f, 0.991966f, 0.991954f, 0.991942f, 0.991930f, 0.991918f,
+ 0.991906f, 0.991894f, 0.991881f, 0.991869f, 0.991857f, 0.991845f, 0.991832f, 0.991820f,
+ 0.991808f, 0.991796f, 0.991783f, 0.991771f, 0.991759f, 0.991747f, 0.991734f, 0.991722f,
+ 0.991710f, 0.991697f, 0.991685f, 0.991673f, 0.991660f, 0.991648f, 0.991636f, 0.991623f,
+ 0.991611f, 0.991598f, 0.991586f, 0.991574f, 0.991561f, 0.991549f, 0.991536f, 0.991524f,
+ 0.991511f, 0.991499f, 0.991487f, 0.991474f, 0.991462f, 0.991449f, 0.991437f, 0.991424f,
+ 0.991411f, 0.991399f, 0.991386f, 0.991374f, 0.991361f, 0.991349f, 0.991336f, 0.991323f,
+ 0.991311f, 0.991298f, 0.991286f, 0.991273f, 0.991260f, 0.991248f, 0.991235f, 0.991222f,
+ 0.991210f, 0.991197f, 0.991184f, 0.991172f, 0.991159f, 0.991146f, 0.991133f, 0.991121f,
+ 0.991108f, 0.991095f, 0.991082f, 0.991070f, 0.991057f, 0.991044f, 0.991031f, 0.991018f,
+ 0.991006f, 0.990993f, 0.990980f, 0.990967f, 0.990954f, 0.990941f, 0.990928f, 0.990916f,
+ 0.990903f, 0.990890f, 0.990877f, 0.990864f, 0.990851f, 0.990838f, 0.990825f, 0.990812f,
+ 0.990799f, 0.990786f, 0.990773f, 0.990760f, 0.990747f, 0.990734f, 0.990721f, 0.990708f,
+ 0.990695f, 0.990682f, 0.990669f, 0.990656f, 0.990643f, 0.990630f, 0.990617f, 0.990603f,
+ 0.990590f, 0.990577f, 0.990564f, 0.990551f, 0.990538f, 0.990525f, 0.990511f, 0.990498f,
+ 0.990485f, 0.990472f, 0.990459f, 0.990445f, 0.990432f, 0.990419f, 0.990406f, 0.990393f,
+ 0.990379f, 0.990366f, 0.990353f, 0.990339f, 0.990326f, 0.990313f, 0.990299f, 0.990286f,
+ 0.990273f, 0.990259f, 0.990246f, 0.990233f, 0.990219f, 0.990206f, 0.990193f, 0.990179f,
+ 0.990166f, 0.990152f, 0.990139f, 0.990126f, 0.990112f, 0.990099f, 0.990085f, 0.990072f,
+ 0.990058f, 0.990045f, 0.990031f, 0.990018f, 0.990004f, 0.989991f, 0.989977f, 0.989964f,
+ 0.989950f, 0.989936f, 0.989923f, 0.989909f, 0.989896f, 0.989882f, 0.989869f, 0.989855f,
+ 0.989841f, 0.989828f, 0.989814f, 0.989800f, 0.989787f, 0.989773f, 0.989759f, 0.989746f,
+ 0.989732f, 0.989718f, 0.989704f, 0.989691f, 0.989677f, 0.989663f, 0.989650f, 0.989636f,
+ 0.989622f, 0.989608f, 0.989594f, 0.989581f, 0.989567f, 0.989553f, 0.989539f, 0.989525f,
+ 0.989511f, 0.989498f, 0.989484f, 0.989470f, 0.989456f, 0.989442f, 0.989428f, 0.989414f,
+ 0.989400f, 0.989386f, 0.989373f, 0.989359f, 0.989345f, 0.989331f, 0.989317f, 0.989303f,
+ 0.989289f, 0.989275f, 0.989261f, 0.989247f, 0.989233f, 0.989219f, 0.989205f, 0.989191f,
+ 0.989177f, 0.989162f, 0.989148f, 0.989134f, 0.989120f, 0.989106f, 0.989092f, 0.989078f,
+ 0.989064f, 0.989050f, 0.989035f, 0.989021f, 0.989007f, 0.988993f, 0.988979f, 0.988964f,
+ 0.988950f, 0.988936f, 0.988922f, 0.988908f, 0.988893f, 0.988879f, 0.988865f, 0.988851f,
+ 0.988836f, 0.988822f, 0.988808f, 0.988793f, 0.988779f, 0.988765f, 0.988750f, 0.988736f,
+ 0.988722f, 0.988707f, 0.988693f, 0.988679f, 0.988664f, 0.988650f, 0.988635f, 0.988621f,
+ 0.988607f, 0.988592f, 0.988578f, 0.988563f, 0.988549f, 0.988534f, 0.988520f, 0.988505f,
+ 0.988491f, 0.988476f, 0.988462f, 0.988447f, 0.988433f, 0.988418f, 0.988404f, 0.988389f,
+ 0.988374f, 0.988360f, 0.988345f, 0.988331f, 0.988316f, 0.988301f, 0.988287f, 0.988272f,
+ 0.988258f, 0.988243f, 0.988228f, 0.988214f, 0.988199f, 0.988184f, 0.988169f, 0.988155f,
+ 0.988140f, 0.988125f, 0.988111f, 0.988096f, 0.988081f, 0.988066f, 0.988052f, 0.988037f,
+ 0.988022f, 0.988007f, 0.987992f, 0.987978f, 0.987963f, 0.987948f, 0.987933f, 0.987918f,
+ 0.987903f, 0.987889f, 0.987874f, 0.987859f, 0.987844f, 0.987829f, 0.987814f, 0.987799f,
+ 0.987784f, 0.987769f, 0.987754f, 0.987739f, 0.987724f, 0.987709f, 0.987694f, 0.987679f,
+ 0.987664f, 0.987649f, 0.987634f, 0.987619f, 0.987604f, 0.987589f, 0.987574f, 0.987559f,
+ 0.987544f, 0.987529f, 0.987514f, 0.987499f, 0.987484f, 0.987468f, 0.987453f, 0.987438f,
+ 0.987423f, 0.987408f, 0.987393f, 0.987377f, 0.987362f, 0.987347f, 0.987332f, 0.987317f,
+ 0.987301f, 0.987286f, 0.987271f, 0.987256f, 0.987240f, 0.987225f, 0.987210f, 0.987195f,
+ 0.987179f, 0.987164f, 0.987149f, 0.987133f, 0.987118f, 0.987103f, 0.987087f, 0.987072f,
+ 0.987057f, 0.987041f, 0.987026f, 0.987010f, 0.986995f, 0.986980f, 0.986964f, 0.986949f,
+ 0.986933f, 0.986918f, 0.986902f, 0.986887f, 0.986871f, 0.986856f, 0.986840f, 0.986825f,
+ 0.986809f, 0.986794f, 0.986778f, 0.986763f, 0.986747f, 0.986732f, 0.986716f, 0.986701f,
+ 0.986685f, 0.986669f, 0.986654f, 0.986638f, 0.986623f, 0.986607f, 0.986591f, 0.986576f,
+ 0.986560f, 0.986544f, 0.986529f, 0.986513f, 0.986497f, 0.986481f, 0.986466f, 0.986450f,
+ 0.986434f, 0.986419f, 0.986403f, 0.986387f, 0.986371f, 0.986355f, 0.986340f, 0.986324f,
+ 0.986308f, 0.986292f, 0.986276f, 0.986261f, 0.986245f, 0.986229f, 0.986213f, 0.986197f,
+ 0.986181f, 0.986165f, 0.986150f, 0.986134f, 0.986118f, 0.986102f, 0.986086f, 0.986070f,
+ 0.986054f, 0.986038f, 0.986022f, 0.986006f, 0.985990f, 0.985974f, 0.985958f, 0.985942f,
+ 0.985926f, 0.985910f, 0.985894f, 0.985878f, 0.985862f, 0.985846f, 0.985830f, 0.985814f,
+ 0.985798f, 0.985781f, 0.985765f, 0.985749f, 0.985733f, 0.985717f, 0.985701f, 0.985685f,
+ 0.985668f, 0.985652f, 0.985636f, 0.985620f, 0.985604f, 0.985587f, 0.985571f, 0.985555f,
+ 0.985539f, 0.985523f, 0.985506f, 0.985490f, 0.985474f, 0.985457f, 0.985441f, 0.985425f,
+ 0.985408f, 0.985392f, 0.985376f, 0.985359f, 0.985343f, 0.985327f, 0.985310f, 0.985294f,
+ 0.985278f, 0.985261f, 0.985245f, 0.985228f, 0.985212f, 0.985196f, 0.985179f, 0.985163f,
+ 0.985146f, 0.985130f, 0.985113f, 0.985097f, 0.985080f, 0.985064f, 0.985047f, 0.985031f,
+ 0.985014f, 0.984998f, 0.984981f, 0.984965f, 0.984948f, 0.984931f, 0.984915f, 0.984898f,
+ 0.984882f, 0.984865f, 0.984848f, 0.984832f, 0.984815f, 0.984798f, 0.984782f, 0.984765f,
+ 0.984748f, 0.984732f, 0.984715f, 0.984698f, 0.984682f, 0.984665f, 0.984648f, 0.984632f,
+ 0.984615f, 0.984598f, 0.984581f, 0.984564f, 0.984548f, 0.984531f, 0.984514f, 0.984497f,
+ 0.984480f, 0.984464f, 0.984447f, 0.984430f, 0.984413f, 0.984396f, 0.984379f, 0.984362f,
+ 0.984346f, 0.984329f, 0.984312f, 0.984295f, 0.984278f, 0.984261f, 0.984244f, 0.984227f,
+ 0.984210f, 0.984193f, 0.984176f, 0.984159f, 0.984142f, 0.984125f, 0.984108f, 0.984091f,
+ 0.984074f, 0.984057f, 0.984040f, 0.984023f, 0.984006f, 0.983989f, 0.983972f, 0.983955f,
+ 0.983937f, 0.983920f, 0.983903f, 0.983886f, 0.983869f, 0.983852f, 0.983835f, 0.983817f,
+ 0.983800f, 0.983783f, 0.983766f, 0.983749f, 0.983731f, 0.983714f, 0.983697f, 0.983680f,
+ 0.983662f, 0.983645f, 0.983628f, 0.983611f, 0.983593f, 0.983576f, 0.983559f, 0.983541f,
+ 0.983524f, 0.983507f, 0.983489f, 0.983472f, 0.983455f, 0.983437f, 0.983420f, 0.983402f,
+ 0.983385f, 0.983368f, 0.983350f, 0.983333f, 0.983315f, 0.983298f, 0.983281f, 0.983263f,
+ 0.983246f, 0.983228f, 0.983211f, 0.983193f, 0.983176f, 0.983158f, 0.983141f, 0.983123f,
+ 0.983105f, 0.983088f, 0.983070f, 0.983053f, 0.983035f, 0.983018f, 0.983000f, 0.982982f,
+ 0.982965f, 0.982947f, 0.982930f, 0.982912f, 0.982894f, 0.982877f, 0.982859f, 0.982841f,
+ 0.982824f, 0.982806f, 0.982788f, 0.982770f, 0.982753f, 0.982735f, 0.982717f, 0.982699f,
+ 0.982682f, 0.982664f, 0.982646f, 0.982628f, 0.982611f, 0.982593f, 0.982575f, 0.982557f,
+ 0.982539f, 0.982521f, 0.982504f, 0.982486f, 0.982468f, 0.982450f, 0.982432f, 0.982414f,
+ 0.982396f, 0.982378f, 0.982360f, 0.982343f, 0.982325f, 0.982307f, 0.982289f, 0.982271f,
+ 0.982253f, 0.982235f, 0.982217f, 0.982199f, 0.982181f, 0.982163f, 0.982145f, 0.982127f,
+ 0.982109f, 0.982091f, 0.982072f, 0.982054f, 0.982036f, 0.982018f, 0.982000f, 0.981982f,
+ 0.981964f, 0.981946f, 0.981928f, 0.981909f, 0.981891f, 0.981873f, 0.981855f, 0.981837f,
+ 0.981819f, 0.981800f, 0.981782f, 0.981764f, 0.981746f, 0.981727f, 0.981709f, 0.981691f,
+ 0.981673f, 0.981654f, 0.981636f, 0.981618f, 0.981600f, 0.981581f, 0.981563f, 0.981545f,
+ 0.981526f, 0.981508f, 0.981490f, 0.981471f, 0.981453f, 0.981434f, 0.981416f, 0.981398f,
+ 0.981379f, 0.981361f, 0.981342f, 0.981324f, 0.981305f, 0.981287f, 0.981269f, 0.981250f,
+ 0.981232f, 0.981213f, 0.981195f, 0.981176f, 0.981158f, 0.981139f, 0.981120f, 0.981102f,
+ 0.981083f, 0.981065f, 0.981046f, 0.981028f, 0.981009f, 0.980990f, 0.980972f, 0.980953f,
+ 0.980935f, 0.980916f, 0.980897f, 0.980879f, 0.980860f, 0.980841f, 0.980823f, 0.980804f,
+ 0.980785f, 0.980767f, 0.980748f, 0.980729f, 0.980710f, 0.980692f, 0.980673f, 0.980654f,
+ 0.980635f, 0.980617f, 0.980598f, 0.980579f, 0.980560f, 0.980541f, 0.980523f, 0.980504f,
+ 0.980485f, 0.980466f, 0.980447f, 0.980428f, 0.980409f, 0.980390f, 0.980372f, 0.980353f,
+ 0.980334f, 0.980315f, 0.980296f, 0.980277f, 0.980258f, 0.980239f, 0.980220f, 0.980201f,
+ 0.980182f, 0.980163f, 0.980144f, 0.980125f, 0.980106f, 0.980087f, 0.980068f, 0.980049f,
+ 0.980030f, 0.980011f, 0.979992f, 0.979973f, 0.979954f, 0.979934f, 0.979915f, 0.979896f,
+ 0.979877f, 0.979858f, 0.979839f, 0.979820f, 0.979800f, 0.979781f, 0.979762f, 0.979743f,
+ 0.979724f, 0.979704f, 0.979685f, 0.979666f, 0.979647f, 0.979628f, 0.979608f, 0.979589f,
+ 0.979570f, 0.979550f, 0.979531f, 0.979512f, 0.979493f, 0.979473f, 0.979454f, 0.979435f,
+ 0.979415f, 0.979396f, 0.979376f, 0.979357f, 0.979338f, 0.979318f, 0.979299f, 0.979280f,
+ 0.979260f, 0.979241f, 0.979221f, 0.979202f, 0.979182f, 0.979163f, 0.979143f, 0.979124f,
+ 0.979104f, 0.979085f, 0.979065f, 0.979046f, 0.979026f, 0.979007f, 0.978987f, 0.978968f,
+ 0.978948f, 0.978929f, 0.978909f, 0.978889f, 0.978870f, 0.978850f, 0.978831f, 0.978811f,
+ 0.978791f, 0.978772f, 0.978752f, 0.978732f, 0.978713f, 0.978693f, 0.978673f, 0.978654f,
+ 0.978634f, 0.978614f, 0.978594f, 0.978575f, 0.978555f, 0.978535f, 0.978516f, 0.978496f,
+ 0.978476f, 0.978456f, 0.978436f, 0.978417f, 0.978397f, 0.978377f, 0.978357f, 0.978337f,
+ 0.978317f, 0.978298f, 0.978278f, 0.978258f, 0.978238f, 0.978218f, 0.978198f, 0.978178f,
+ 0.978158f, 0.978138f, 0.978118f, 0.978098f, 0.978078f, 0.978058f, 0.978038f, 0.978019f,
+ 0.977998f, 0.977979f, 0.977959f, 0.977938f, 0.977918f, 0.977898f, 0.977878f, 0.977858f,
+ 0.977838f, 0.977818f, 0.977798f, 0.977778f, 0.977758f, 0.977738f, 0.977718f, 0.977697f,
+ 0.977677f, 0.977657f, 0.977637f, 0.977617f, 0.977597f, 0.977577f, 0.977556f, 0.977536f,
+ 0.977516f, 0.977496f, 0.977475f, 0.977455f, 0.977435f, 0.977415f, 0.977394f, 0.977374f,
+ 0.977354f, 0.977334f, 0.977313f, 0.977293f, 0.977273f, 0.977252f, 0.977232f, 0.977212f,
+ 0.977191f, 0.977171f, 0.977151f, 0.977130f, 0.977110f, 0.977089f, 0.977069f, 0.977049f,
+ 0.977028f, 0.977008f, 0.976987f, 0.976967f, 0.976946f, 0.976926f, 0.976905f, 0.976885f,
+ 0.976864f, 0.976844f, 0.976823f, 0.976803f, 0.976782f, 0.976762f, 0.976741f, 0.976721f,
+ 0.976700f, 0.976680f, 0.976659f, 0.976638f, 0.976618f, 0.976597f, 0.976576f, 0.976556f,
+ 0.976535f, 0.976515f, 0.976494f, 0.976473f, 0.976453f, 0.976432f, 0.976411f, 0.976390f,
+ 0.976370f, 0.976349f, 0.976328f, 0.976308f, 0.976287f, 0.976266f, 0.976245f, 0.976224f,
+ 0.976204f, 0.976183f, 0.976162f, 0.976141f, 0.976120f, 0.976100f, 0.976079f, 0.976058f,
+ 0.976037f, 0.976016f, 0.975995f, 0.975974f, 0.975954f, 0.975933f, 0.975912f, 0.975891f,
+ 0.975870f, 0.975849f, 0.975828f, 0.975807f, 0.975786f, 0.975765f, 0.975744f, 0.975723f,
+ 0.975702f, 0.975681f, 0.975660f, 0.975639f, 0.975618f, 0.975597f, 0.975576f, 0.975555f,
+ 0.975534f, 0.975513f, 0.975492f, 0.975471f, 0.975449f, 0.975428f, 0.975407f, 0.975386f,
+ 0.975365f, 0.975344f, 0.975323f, 0.975301f, 0.975280f, 0.975259f, 0.975238f, 0.975217f,
+ 0.975195f, 0.975174f, 0.975153f, 0.975132f, 0.975110f, 0.975089f, 0.975068f, 0.975047f,
+ 0.975025f, 0.975004f, 0.974983f, 0.974961f, 0.974940f, 0.974919f, 0.974897f, 0.974876f,
+ 0.974855f, 0.974833f, 0.974812f, 0.974791f, 0.974769f, 0.974748f, 0.974726f, 0.974705f,
+ 0.974684f, 0.974662f, 0.974641f, 0.974619f, 0.974598f, 0.974576f, 0.974555f, 0.974533f,
+ 0.974512f, 0.974490f, 0.974469f, 0.974447f, 0.974426f, 0.974404f, 0.974383f, 0.974361f,
+ 0.974339f, 0.974318f, 0.974296f, 0.974275f, 0.974253f, 0.974231f, 0.974210f, 0.974188f,
+ 0.974166f, 0.974145f, 0.974123f, 0.974101f, 0.974080f, 0.974058f, 0.974036f, 0.974015f,
+ 0.973993f, 0.973971f, 0.973949f, 0.973928f, 0.973906f, 0.973884f, 0.973862f, 0.973841f,
+ 0.973819f, 0.973797f, 0.973775f, 0.973753f, 0.973732f, 0.973710f, 0.973688f, 0.973666f,
+ 0.973644f, 0.973622f, 0.973601f, 0.973579f, 0.973557f, 0.973535f, 0.973513f, 0.973491f,
+ 0.973469f, 0.973447f, 0.973425f, 0.973403f, 0.973381f, 0.973359f, 0.973337f, 0.973315f,
+ 0.973293f, 0.973271f, 0.973249f, 0.973227f, 0.973205f, 0.973183f, 0.973161f, 0.973139f,
+ 0.973117f, 0.973095f, 0.973073f, 0.973051f, 0.973028f, 0.973006f, 0.972984f, 0.972962f,
+ 0.972940f, 0.972918f, 0.972896f, 0.972873f, 0.972851f, 0.972829f, 0.972807f, 0.972785f,
+ 0.972762f, 0.972740f, 0.972718f, 0.972696f, 0.972673f, 0.972651f, 0.972629f, 0.972607f,
+ 0.972584f, 0.972562f, 0.972540f, 0.972517f, 0.972495f, 0.972473f, 0.972450f, 0.972428f,
+ 0.972406f, 0.972383f, 0.972361f, 0.972339f, 0.972316f, 0.972294f, 0.972271f, 0.972249f,
+ 0.972227f, 0.972204f, 0.972182f, 0.972159f, 0.972137f, 0.972114f, 0.972092f, 0.972069f,
+ 0.972047f, 0.972024f, 0.972002f, 0.971979f, 0.971957f, 0.971934f, 0.971911f, 0.971889f,
+ 0.971866f, 0.971844f, 0.971821f, 0.971799f, 0.971776f, 0.971753f, 0.971731f, 0.971708f,
+ 0.971685f, 0.971663f, 0.971640f, 0.971617f, 0.971595f, 0.971572f, 0.971549f, 0.971527f,
+ 0.971504f, 0.971481f, 0.971458f, 0.971436f, 0.971413f, 0.971390f, 0.971367f, 0.971345f,
+ 0.971322f, 0.971299f, 0.971276f, 0.971253f, 0.971231f, 0.971208f, 0.971185f, 0.971162f,
+ 0.971139f, 0.971116f, 0.971093f, 0.971071f, 0.971048f, 0.971025f, 0.971002f, 0.970979f,
+ 0.970956f, 0.970933f, 0.970910f, 0.970887f, 0.970864f, 0.970841f, 0.970818f, 0.970795f,
+ 0.970772f, 0.970749f, 0.970726f, 0.970703f, 0.970680f, 0.970657f, 0.970634f, 0.970611f,
+ 0.970588f, 0.970565f, 0.970542f, 0.970518f, 0.970495f, 0.970472f, 0.970449f, 0.970426f,
+ 0.970403f, 0.970380f, 0.970357f, 0.970333f, 0.970310f, 0.970287f, 0.970264f, 0.970241f,
+ 0.970217f, 0.970194f, 0.970171f, 0.970148f, 0.970124f, 0.970101f, 0.970078f, 0.970055f,
+ 0.970031f, 0.970008f, 0.969985f, 0.969961f, 0.969938f, 0.969915f, 0.969891f, 0.969868f,
+ 0.969845f, 0.969821f, 0.969798f, 0.969774f, 0.969751f, 0.969728f, 0.969704f, 0.969681f,
+ 0.969657f, 0.969634f, 0.969611f, 0.969587f, 0.969564f, 0.969540f, 0.969517f, 0.969493f,
+ 0.969470f, 0.969446f, 0.969423f, 0.969399f, 0.969375f, 0.969352f, 0.969328f, 0.969305f,
+ 0.969281f, 0.969258f, 0.969234f, 0.969210f, 0.969187f, 0.969163f, 0.969140f, 0.969116f,
+ 0.969092f, 0.969069f, 0.969045f, 0.969021f, 0.968998f, 0.968974f, 0.968950f, 0.968927f,
+ 0.968903f, 0.968879f, 0.968855f, 0.968832f, 0.968808f, 0.968784f, 0.968760f, 0.968737f,
+ 0.968713f, 0.968689f, 0.968665f, 0.968641f, 0.968617f, 0.968594f, 0.968570f, 0.968546f,
+ 0.968522f, 0.968498f, 0.968474f, 0.968450f, 0.968427f, 0.968403f, 0.968379f, 0.968355f,
+ 0.968331f, 0.968307f, 0.968283f, 0.968259f, 0.968235f, 0.968211f, 0.968187f, 0.968163f,
+ 0.968139f, 0.968115f, 0.968091f, 0.968067f, 0.968043f, 0.968019f, 0.967995f, 0.967971f,
+ 0.967947f, 0.967923f, 0.967899f, 0.967874f, 0.967850f, 0.967826f, 0.967802f, 0.967778f,
+ 0.967754f, 0.967730f, 0.967706f, 0.967681f, 0.967657f, 0.967633f, 0.967609f, 0.967585f,
+ 0.967560f, 0.967536f, 0.967512f, 0.967488f, 0.967463f, 0.967439f, 0.967415f, 0.967391f,
+ 0.967366f, 0.967342f, 0.967318f, 0.967293f, 0.967269f, 0.967245f, 0.967220f, 0.967196f,
+ 0.967172f, 0.967147f, 0.967123f, 0.967099f, 0.967074f, 0.967050f, 0.967025f, 0.967001f,
+ 0.966976f, 0.966952f, 0.966928f, 0.966903f, 0.966879f, 0.966854f, 0.966830f, 0.966805f,
+ 0.966781f, 0.966756f, 0.966732f, 0.966707f, 0.966683f, 0.966658f, 0.966633f, 0.966609f,
+ 0.966584f, 0.966560f, 0.966535f, 0.966511f, 0.966486f, 0.966461f, 0.966437f, 0.966412f,
+ 0.966387f, 0.966363f, 0.966338f, 0.966313f, 0.966289f, 0.966264f, 0.966239f, 0.966215f,
+ 0.966190f, 0.966165f, 0.966141f, 0.966116f, 0.966091f, 0.966066f, 0.966042f, 0.966017f,
+ 0.965992f, 0.965967f, 0.965942f, 0.965918f, 0.965893f, 0.965868f, 0.965843f, 0.965818f,
+ 0.965793f, 0.965769f, 0.965744f, 0.965719f, 0.965694f, 0.965669f, 0.965644f, 0.965619f,
+ 0.965594f, 0.965569f, 0.965544f, 0.965519f, 0.965494f, 0.965469f, 0.965444f, 0.965419f,
+ 0.965394f, 0.965369f, 0.965344f, 0.965319f, 0.965294f, 0.965269f, 0.965244f, 0.965219f,
+ 0.965194f, 0.965169f, 0.965144f, 0.965119f, 0.965094f, 0.965069f, 0.965044f, 0.965018f,
+ 0.964993f, 0.964968f, 0.964943f, 0.964918f, 0.964893f, 0.964867f, 0.964842f, 0.964817f,
+ 0.964792f, 0.964767f, 0.964741f, 0.964716f, 0.964691f, 0.964666f, 0.964640f, 0.964615f,
+ 0.964590f, 0.964565f, 0.964539f, 0.964514f, 0.964489f, 0.964463f, 0.964438f, 0.964413f,
+ 0.964387f, 0.964362f, 0.964336f, 0.964311f, 0.964286f, 0.964260f, 0.964235f, 0.964209f,
+ 0.964184f, 0.964159f, 0.964133f, 0.964108f, 0.964082f, 0.964057f, 0.964031f, 0.964006f,
+ 0.963980f, 0.963955f, 0.963929f, 0.963904f, 0.963878f, 0.963853f, 0.963827f, 0.963802f,
+ 0.963776f, 0.963750f, 0.963725f, 0.963699f, 0.963674f, 0.963648f, 0.963623f, 0.963597f,
+ 0.963571f, 0.963546f, 0.963520f, 0.963494f, 0.963469f, 0.963443f, 0.963417f, 0.963391f,
+ 0.963366f, 0.963340f, 0.963314f, 0.963289f, 0.963263f, 0.963237f, 0.963211f, 0.963186f,
+ 0.963160f, 0.963134f, 0.963108f, 0.963082f, 0.963057f, 0.963031f, 0.963005f, 0.962979f,
+ 0.962953f, 0.962927f, 0.962902f, 0.962876f, 0.962850f, 0.962824f, 0.962798f, 0.962772f,
+ 0.962746f, 0.962720f, 0.962694f, 0.962668f, 0.962642f, 0.962616f, 0.962590f, 0.962564f,
+ 0.962538f, 0.962512f, 0.962486f, 0.962460f, 0.962434f, 0.962408f, 0.962382f, 0.962356f,
+ 0.962330f, 0.962304f, 0.962278f, 0.962252f, 0.962226f, 0.962200f, 0.962174f, 0.962148f,
+ 0.962121f, 0.962095f, 0.962069f, 0.962043f, 0.962017f, 0.961991f, 0.961964f, 0.961938f,
+ 0.961912f, 0.961886f, 0.961860f, 0.961833f, 0.961807f, 0.961781f, 0.961755f, 0.961728f,
+ 0.961702f, 0.961676f, 0.961649f, 0.961623f, 0.961597f, 0.961571f, 0.961544f, 0.961518f,
+ 0.961492f, 0.961465f, 0.961439f, 0.961412f, 0.961386f, 0.961360f, 0.961333f, 0.961307f,
+ 0.961280f, 0.961254f, 0.961228f, 0.961201f, 0.961175f, 0.961148f, 0.961122f, 0.961095f,
+ 0.961069f, 0.961042f, 0.961016f, 0.960989f, 0.960963f, 0.960936f, 0.960910f, 0.960883f,
+ 0.960857f, 0.960830f, 0.960804f, 0.960777f, 0.960750f, 0.960724f, 0.960697f, 0.960670f,
+ 0.960644f, 0.960617f, 0.960591f, 0.960564f, 0.960537f, 0.960511f, 0.960484f, 0.960457f,
+ 0.960431f, 0.960404f, 0.960377f, 0.960350f, 0.960324f, 0.960297f, 0.960270f, 0.960243f,
+ 0.960217f, 0.960190f, 0.960163f, 0.960136f, 0.960109f, 0.960083f, 0.960056f, 0.960029f,
+ 0.960002f, 0.959975f, 0.959948f, 0.959922f, 0.959895f, 0.959868f, 0.959841f, 0.959814f,
+ 0.959787f, 0.959760f, 0.959733f, 0.959706f, 0.959679f, 0.959652f, 0.959625f, 0.959598f,
+ 0.959572f, 0.959545f, 0.959518f, 0.959491f, 0.959463f, 0.959436f, 0.959409f, 0.959382f,
+ 0.959355f, 0.959328f, 0.959301f, 0.959274f, 0.959247f, 0.959220f, 0.959193f, 0.959166f,
+ 0.959139f, 0.959112f, 0.959084f, 0.959057f, 0.959030f, 0.959003f, 0.958976f, 0.958949f,
+ 0.958921f, 0.958894f, 0.958867f, 0.958840f, 0.958812f, 0.958785f, 0.958758f, 0.958731f,
+ 0.958703f, 0.958676f, 0.958649f, 0.958622f, 0.958594f, 0.958567f, 0.958540f, 0.958512f,
+ 0.958485f, 0.958458f, 0.958430f, 0.958403f, 0.958376f, 0.958348f, 0.958321f, 0.958293f,
+ 0.958266f, 0.958239f, 0.958211f, 0.958184f, 0.958156f, 0.958129f, 0.958101f, 0.958074f,
+ 0.958046f, 0.958019f, 0.957992f, 0.957964f, 0.957937f, 0.957909f, 0.957882f, 0.957854f,
+ 0.957826f, 0.957799f, 0.957771f, 0.957744f, 0.957716f, 0.957689f, 0.957661f, 0.957633f,
+ 0.957606f, 0.957578f, 0.957550f, 0.957523f, 0.957495f, 0.957468f, 0.957440f, 0.957412f,
+ 0.957385f, 0.957357f, 0.957329f, 0.957301f, 0.957274f, 0.957246f, 0.957218f, 0.957190f,
+ 0.957163f, 0.957135f, 0.957107f, 0.957079f, 0.957052f, 0.957024f, 0.956996f, 0.956968f,
+ 0.956940f, 0.956913f, 0.956885f, 0.956857f, 0.956829f, 0.956801f, 0.956773f, 0.956745f,
+ 0.956717f, 0.956689f, 0.956662f, 0.956634f, 0.956606f, 0.956578f, 0.956550f, 0.956522f,
+ 0.956494f, 0.956466f, 0.956438f, 0.956410f, 0.956382f, 0.956354f, 0.956326f, 0.956298f,
+ 0.956270f, 0.956242f, 0.956214f, 0.956186f, 0.956158f, 0.956130f, 0.956101f, 0.956073f,
+ 0.956045f, 0.956017f, 0.955989f, 0.955961f, 0.955933f, 0.955905f, 0.955876f, 0.955848f,
+ 0.955820f, 0.955792f, 0.955764f, 0.955736f, 0.955707f, 0.955679f, 0.955651f, 0.955623f,
+ 0.955594f, 0.955566f, 0.955538f, 0.955510f, 0.955481f, 0.955453f, 0.955425f, 0.955396f,
+ 0.955368f, 0.955340f, 0.955311f, 0.955283f, 0.955255f, 0.955226f, 0.955198f, 0.955170f,
+ 0.955141f, 0.955113f, 0.955084f, 0.955056f, 0.955028f, 0.954999f, 0.954971f, 0.954942f,
+ 0.954914f, 0.954885f, 0.954857f, 0.954828f, 0.954800f, 0.954771f, 0.954743f, 0.954714f,
+ 0.954686f, 0.954657f, 0.954629f, 0.954600f, 0.954572f, 0.954543f, 0.954514f, 0.954486f,
+ 0.954457f, 0.954429f, 0.954400f, 0.954371f, 0.954343f, 0.954314f, 0.954285f, 0.954257f,
+ 0.954228f, 0.954199f, 0.954171f, 0.954142f, 0.954113f, 0.954085f, 0.954056f, 0.954027f,
+ 0.953998f, 0.953970f, 0.953941f, 0.953912f, 0.953883f, 0.953855f, 0.953826f, 0.953797f,
+ 0.953768f, 0.953739f, 0.953711f, 0.953682f, 0.953653f, 0.953624f, 0.953595f, 0.953566f,
+ 0.953537f, 0.953508f, 0.953480f, 0.953451f, 0.953422f, 0.953393f, 0.953364f, 0.953335f,
+ 0.953306f, 0.953277f, 0.953248f, 0.953219f, 0.953190f, 0.953161f, 0.953132f, 0.953103f,
+ 0.953074f, 0.953045f, 0.953016f, 0.952987f, 0.952958f, 0.952929f, 0.952900f, 0.952871f,
+ 0.952842f, 0.952813f, 0.952783f, 0.952754f, 0.952725f, 0.952696f, 0.952667f, 0.952638f,
+ 0.952609f, 0.952579f, 0.952550f, 0.952521f, 0.952492f, 0.952463f, 0.952433f, 0.952404f,
+ 0.952375f, 0.952346f, 0.952317f, 0.952287f, 0.952258f, 0.952229f, 0.952199f, 0.952170f,
+ 0.952141f, 0.952112f, 0.952082f, 0.952053f, 0.952024f, 0.951994f, 0.951965f, 0.951936f,
+ 0.951906f, 0.951877f, 0.951847f, 0.951818f, 0.951789f, 0.951759f, 0.951730f, 0.951700f,
+ 0.951671f, 0.951641f, 0.951612f, 0.951582f, 0.951553f, 0.951524f, 0.951494f, 0.951465f,
+ 0.951435f, 0.951406f, 0.951376f, 0.951346f, 0.951317f, 0.951287f, 0.951258f, 0.951228f,
+ 0.951199f, 0.951169f, 0.951139f, 0.951110f, 0.951080f, 0.951051f, 0.951021f, 0.950991f,
+ 0.950962f, 0.950932f, 0.950902f, 0.950873f, 0.950843f, 0.950813f, 0.950784f, 0.950754f,
+ 0.950724f, 0.950694f, 0.950665f, 0.950635f, 0.950605f, 0.950575f, 0.950546f, 0.950516f,
+ 0.950486f, 0.950456f, 0.950426f, 0.950397f, 0.950367f, 0.950337f, 0.950307f, 0.950277f,
+ 0.950247f, 0.950218f, 0.950188f, 0.950158f, 0.950128f, 0.950098f, 0.950068f, 0.950038f,
+ 0.950008f, 0.949978f, 0.949948f, 0.949918f, 0.949888f, 0.949858f, 0.949829f, 0.949798f,
+ 0.949768f, 0.949739f, 0.949708f, 0.949678f, 0.949648f, 0.949618f, 0.949588f, 0.949558f,
+ 0.949528f, 0.949498f, 0.949468f, 0.949438f, 0.949408f, 0.949378f, 0.949348f, 0.949317f,
+ 0.949287f, 0.949257f, 0.949227f, 0.949197f, 0.949167f, 0.949136f, 0.949106f, 0.949076f,
+ 0.949046f, 0.949016f, 0.948985f, 0.948955f, 0.948925f, 0.948895f, 0.948864f, 0.948834f,
+ 0.948804f, 0.948774f, 0.948743f, 0.948713f, 0.948683f, 0.948652f, 0.948622f, 0.948592f,
+ 0.948561f, 0.948531f, 0.948501f, 0.948470f, 0.948440f, 0.948409f, 0.948379f, 0.948349f,
+ 0.948318f, 0.948288f, 0.948257f, 0.948227f, 0.948196f, 0.948166f, 0.948136f, 0.948105f,
+ 0.948075f, 0.948044f, 0.948014f, 0.947983f, 0.947953f, 0.947922f, 0.947891f, 0.947861f,
+ 0.947830f, 0.947800f, 0.947769f, 0.947739f, 0.947708f, 0.947677f, 0.947647f, 0.947616f,
+ 0.947586f, 0.947555f, 0.947524f, 0.947494f, 0.947463f, 0.947432f, 0.947402f, 0.947371f,
+ 0.947340f, 0.947310f, 0.947279f, 0.947248f, 0.947217f, 0.947187f, 0.947156f, 0.947125f,
+ 0.947094f, 0.947064f, 0.947033f, 0.947002f, 0.946971f, 0.946940f, 0.946910f, 0.946879f,
+ 0.946848f, 0.946817f, 0.946786f, 0.946755f, 0.946724f, 0.946694f, 0.946663f, 0.946632f,
+ 0.946601f, 0.946570f, 0.946539f, 0.946508f, 0.946477f, 0.946446f, 0.946415f, 0.946384f,
+ 0.946353f, 0.946322f, 0.946291f, 0.946260f, 0.946229f, 0.946198f, 0.946167f, 0.946136f,
+ 0.946105f, 0.946074f, 0.946043f, 0.946012f, 0.945981f, 0.945950f, 0.945919f, 0.945888f,
+ 0.945857f, 0.945825f, 0.945794f, 0.945763f, 0.945732f, 0.945701f, 0.945670f, 0.945639f,
+ 0.945607f, 0.945576f, 0.945545f, 0.945514f, 0.945482f, 0.945451f, 0.945420f, 0.945389f,
+ 0.945358f, 0.945326f, 0.945295f, 0.945264f, 0.945232f, 0.945201f, 0.945170f, 0.945139f,
+ 0.945107f, 0.945076f, 0.945045f, 0.945013f, 0.944982f, 0.944950f, 0.944919f, 0.944888f,
+ 0.944856f, 0.944825f, 0.944793f, 0.944762f, 0.944731f, 0.944699f, 0.944668f, 0.944636f,
+ 0.944605f, 0.944573f, 0.944542f, 0.944510f, 0.944479f, 0.944447f, 0.944416f, 0.944384f,
+ 0.944353f, 0.944321f, 0.944290f, 0.944258f, 0.944227f, 0.944195f, 0.944163f, 0.944132f,
+ 0.944100f, 0.944069f, 0.944037f, 0.944005f, 0.943974f, 0.943942f, 0.943910f, 0.943879f,
+ 0.943847f, 0.943815f, 0.943784f, 0.943752f, 0.943720f, 0.943689f, 0.943657f, 0.943625f,
+ 0.943593f, 0.943562f, 0.943530f, 0.943498f, 0.943466f, 0.943435f, 0.943403f, 0.943371f,
+ 0.943339f, 0.943307f, 0.943276f, 0.943244f, 0.943212f, 0.943180f, 0.943148f, 0.943116f,
+ 0.943084f, 0.943053f, 0.943021f, 0.942989f, 0.942957f, 0.942925f, 0.942893f, 0.942861f,
+ 0.942829f, 0.942797f, 0.942765f, 0.942733f, 0.942701f, 0.942669f, 0.942637f, 0.942605f,
+ 0.942573f, 0.942541f, 0.942509f, 0.942477f, 0.942445f, 0.942413f, 0.942381f, 0.942349f,
+ 0.942317f, 0.942285f, 0.942253f, 0.942220f, 0.942188f, 0.942156f, 0.942124f, 0.942092f,
+ 0.942060f, 0.942028f, 0.941995f, 0.941963f, 0.941931f, 0.941899f, 0.941867f, 0.941834f,
+ 0.941802f, 0.941770f, 0.941738f, 0.941705f, 0.941673f, 0.941641f, 0.941609f, 0.941576f,
+ 0.941544f, 0.941512f, 0.941479f, 0.941447f, 0.941415f, 0.941382f, 0.941350f, 0.941318f,
+ 0.941285f, 0.941253f, 0.941221f, 0.941188f, 0.941156f, 0.941123f, 0.941091f, 0.941059f,
+ 0.941026f, 0.940994f, 0.940961f, 0.940929f, 0.940896f, 0.940864f, 0.940831f, 0.940799f,
+ 0.940766f, 0.940734f, 0.940701f, 0.940669f, 0.940636f, 0.940604f, 0.940571f, 0.940539f,
+ 0.940506f, 0.940473f, 0.940441f, 0.940408f, 0.940376f, 0.940343f, 0.940310f, 0.940278f,
+ 0.940245f, 0.940213f, 0.940180f, 0.940147f, 0.940115f, 0.940082f, 0.940049f, 0.940016f,
+ 0.939984f, 0.939951f, 0.939918f, 0.939886f, 0.939853f, 0.939820f, 0.939787f, 0.939755f,
+ 0.939722f, 0.939689f, 0.939656f, 0.939623f, 0.939591f, 0.939558f, 0.939525f, 0.939492f,
+ 0.939459f, 0.939426f, 0.939394f, 0.939361f, 0.939328f, 0.939295f, 0.939262f, 0.939229f,
+ 0.939196f, 0.939163f, 0.939130f, 0.939097f, 0.939064f, 0.939031f, 0.938998f, 0.938965f,
+ 0.938932f, 0.938900f, 0.938866f, 0.938833f, 0.938800f, 0.938767f, 0.938734f, 0.938701f,
+ 0.938668f, 0.938635f, 0.938602f, 0.938569f, 0.938536f, 0.938503f, 0.938470f, 0.938437f,
+ 0.938404f, 0.938370f, 0.938337f, 0.938304f, 0.938271f, 0.938238f, 0.938205f, 0.938171f,
+ 0.938138f, 0.938105f, 0.938072f, 0.938039f, 0.938005f, 0.937972f, 0.937939f, 0.937906f,
+ 0.937872f, 0.937839f, 0.937806f, 0.937773f, 0.937739f, 0.937706f, 0.937673f, 0.937639f,
+ 0.937606f, 0.937573f, 0.937539f, 0.937506f, 0.937473f, 0.937439f, 0.937406f, 0.937372f,
+ 0.937339f, 0.937306f, 0.937272f, 0.937239f, 0.937205f, 0.937172f, 0.937138f, 0.937105f,
+ 0.937072f, 0.937038f, 0.937005f, 0.936971f, 0.936938f, 0.936904f, 0.936871f, 0.936837f,
+ 0.936803f, 0.936770f, 0.936736f, 0.936703f, 0.936669f, 0.936636f, 0.936602f, 0.936568f,
+ 0.936535f, 0.936501f, 0.936468f, 0.936434f, 0.936400f, 0.936367f, 0.936333f, 0.936299f,
+ 0.936266f, 0.936232f, 0.936198f, 0.936165f, 0.936131f, 0.936097f, 0.936063f, 0.936030f,
+ 0.935996f, 0.935962f, 0.935928f, 0.935895f, 0.935861f, 0.935827f, 0.935793f, 0.935759f,
+ 0.935726f, 0.935692f, 0.935658f, 0.935624f, 0.935590f, 0.935556f, 0.935523f, 0.935489f,
+ 0.935455f, 0.935421f, 0.935387f, 0.935353f, 0.935319f, 0.935285f, 0.935251f, 0.935217f,
+ 0.935184f, 0.935150f, 0.935116f, 0.935082f, 0.935048f, 0.935014f, 0.934980f, 0.934946f,
+ 0.934912f, 0.934878f, 0.934844f, 0.934810f, 0.934775f, 0.934741f, 0.934707f, 0.934673f,
+ 0.934639f, 0.934605f, 0.934571f, 0.934537f, 0.934503f, 0.934469f, 0.934434f, 0.934400f,
+ 0.934366f, 0.934332f, 0.934298f, 0.934264f, 0.934229f, 0.934195f, 0.934161f, 0.934127f,
+ 0.934093f, 0.934058f, 0.934024f, 0.933990f, 0.933956f, 0.933921f, 0.933887f, 0.933853f,
+ 0.933818f, 0.933784f, 0.933750f, 0.933716f, 0.933681f, 0.933647f, 0.933612f, 0.933578f,
+ 0.933544f, 0.933509f, 0.933475f, 0.933441f, 0.933406f, 0.933372f, 0.933337f, 0.933303f,
+ 0.933269f, 0.933234f, 0.933200f, 0.933165f, 0.933131f, 0.933096f, 0.933062f, 0.933027f,
+ 0.932993f, 0.932958f, 0.932924f, 0.932889f, 0.932855f, 0.932820f, 0.932786f, 0.932751f,
+ 0.932716f, 0.932682f, 0.932647f, 0.932613f, 0.932578f, 0.932544f, 0.932509f, 0.932474f,
+ 0.932440f, 0.932405f, 0.932370f, 0.932336f, 0.932301f, 0.932266f, 0.932232f, 0.932197f,
+ 0.932162f, 0.932128f, 0.932093f, 0.932058f, 0.932023f, 0.931989f, 0.931954f, 0.931919f,
+ 0.931884f, 0.931849f, 0.931815f, 0.931780f, 0.931745f, 0.931710f, 0.931675f, 0.931641f,
+ 0.931606f, 0.931571f, 0.931536f, 0.931501f, 0.931466f, 0.931431f, 0.931397f, 0.931362f,
+ 0.931327f, 0.931292f, 0.931257f, 0.931222f, 0.931187f, 0.931152f, 0.931117f, 0.931082f,
+ 0.931047f, 0.931012f, 0.930977f, 0.930942f, 0.930907f, 0.930872f, 0.930837f, 0.930802f,
+ 0.930767f, 0.930732f, 0.930697f, 0.930662f, 0.930627f, 0.930592f, 0.930556f, 0.930521f,
+ 0.930486f, 0.930451f, 0.930416f, 0.930381f, 0.930346f, 0.930311f, 0.930275f, 0.930240f,
+ 0.930205f, 0.930170f, 0.930135f, 0.930099f, 0.930064f, 0.930029f, 0.929994f, 0.929958f,
+ 0.929923f, 0.929888f, 0.929853f, 0.929817f, 0.929782f, 0.929747f, 0.929712f, 0.929676f,
+ 0.929641f, 0.929606f, 0.929570f, 0.929535f, 0.929500f, 0.929464f, 0.929429f, 0.929393f,
+ 0.929358f, 0.929323f, 0.929287f, 0.929252f, 0.929216f, 0.929181f, 0.929146f, 0.929110f,
+ 0.929075f, 0.929039f, 0.929004f, 0.928968f, 0.928933f, 0.928897f, 0.928862f, 0.928826f,
+ 0.928791f, 0.928755f, 0.928720f, 0.928684f, 0.928648f, 0.928613f, 0.928577f, 0.928542f,
+ 0.928506f, 0.928470f, 0.928435f, 0.928399f, 0.928364f, 0.928328f, 0.928292f, 0.928257f,
+ 0.928221f, 0.928185f, 0.928150f, 0.928114f, 0.928078f, 0.928043f, 0.928007f, 0.927971f,
+ 0.927935f, 0.927900f, 0.927864f, 0.927828f, 0.927792f, 0.927757f, 0.927721f, 0.927685f,
+ 0.927649f, 0.927613f, 0.927578f, 0.927542f, 0.927506f, 0.927470f, 0.927434f, 0.927398f,
+ 0.927363f, 0.927327f, 0.927291f, 0.927255f, 0.927219f, 0.927183f, 0.927147f, 0.927111f,
+ 0.927075f, 0.927039f, 0.927003f, 0.926967f, 0.926931f, 0.926895f, 0.926859f, 0.926823f,
+ 0.926787f, 0.926751f, 0.926715f, 0.926679f, 0.926643f, 0.926607f, 0.926571f, 0.926535f,
+ 0.926499f, 0.926463f, 0.926427f, 0.926391f, 0.926355f, 0.926319f, 0.926283f, 0.926246f,
+ 0.926210f, 0.926174f, 0.926138f, 0.926102f, 0.926066f, 0.926029f, 0.925993f, 0.925957f,
+ 0.925921f, 0.925885f, 0.925848f, 0.925812f, 0.925776f, 0.925740f, 0.925703f, 0.925667f,
+ 0.925631f, 0.925595f, 0.925558f, 0.925522f, 0.925486f, 0.925449f, 0.925413f, 0.925377f,
+ 0.925340f, 0.925304f, 0.925268f, 0.925231f, 0.925195f, 0.925158f, 0.925122f, 0.925086f,
+ 0.925049f, 0.925013f, 0.924976f, 0.924940f, 0.924904f, 0.924867f, 0.924831f, 0.924794f,
+ 0.924758f, 0.924721f, 0.924685f, 0.924648f, 0.924612f, 0.924575f, 0.924539f, 0.924502f,
+ 0.924465f, 0.924429f, 0.924392f, 0.924356f, 0.924319f, 0.924283f, 0.924246f, 0.924209f,
+ 0.924173f, 0.924136f, 0.924100f, 0.924063f, 0.924026f, 0.923990f, 0.923953f, 0.923916f,
+ 0.923880f, 0.923843f, 0.923806f, 0.923769f, 0.923733f, 0.923696f, 0.923659f, 0.923622f,
+ 0.923586f, 0.923549f, 0.923512f, 0.923475f, 0.923439f, 0.923402f, 0.923365f, 0.923328f,
+ 0.923291f, 0.923255f, 0.923218f, 0.923181f, 0.923144f, 0.923107f, 0.923070f, 0.923033f,
+ 0.922997f, 0.922960f, 0.922923f, 0.922886f, 0.922849f, 0.922812f, 0.922775f, 0.922738f,
+ 0.922701f, 0.922664f, 0.922627f, 0.922590f, 0.922553f, 0.922516f, 0.922479f, 0.922442f,
+ 0.922405f, 0.922368f, 0.922331f, 0.922294f, 0.922257f, 0.922220f, 0.922183f, 0.922146f,
+ 0.922109f, 0.922072f, 0.922034f, 0.921997f, 0.921960f, 0.921923f, 0.921886f, 0.921849f,
+ 0.921812f, 0.921774f, 0.921737f, 0.921700f, 0.921663f, 0.921626f, 0.921588f, 0.921551f,
+ 0.921514f, 0.921477f, 0.921440f, 0.921402f, 0.921365f, 0.921328f, 0.921291f, 0.921253f,
+ 0.921216f, 0.921179f, 0.921141f, 0.921104f, 0.921067f, 0.921029f, 0.920992f, 0.920955f,
+ 0.920917f, 0.920880f, 0.920842f, 0.920805f, 0.920768f, 0.920730f, 0.920693f, 0.920655f,
+ 0.920618f, 0.920581f, 0.920543f, 0.920506f, 0.920468f, 0.920431f, 0.920393f, 0.920356f,
+ 0.920318f, 0.920281f, 0.920243f, 0.920206f, 0.920168f, 0.920131f, 0.920093f, 0.920056f,
+ 0.920018f, 0.919980f, 0.919943f, 0.919905f, 0.919868f, 0.919830f, 0.919792f, 0.919755f,
+ 0.919717f, 0.919680f, 0.919642f, 0.919604f, 0.919567f, 0.919529f, 0.919491f, 0.919453f,
+ 0.919416f, 0.919378f, 0.919340f, 0.919303f, 0.919265f, 0.919227f, 0.919189f, 0.919152f,
+ 0.919114f, 0.919076f, 0.919038f, 0.919001f, 0.918963f, 0.918925f, 0.918887f, 0.918849f,
+ 0.918811f, 0.918774f, 0.918736f, 0.918698f, 0.918660f, 0.918622f, 0.918584f, 0.918546f,
+ 0.918508f, 0.918471f, 0.918433f, 0.918395f, 0.918357f, 0.918319f, 0.918281f, 0.918243f,
+ 0.918205f, 0.918167f, 0.918129f, 0.918091f, 0.918053f, 0.918015f, 0.917977f, 0.917939f,
+ 0.917901f, 0.917863f, 0.917825f, 0.917787f, 0.917749f, 0.917710f, 0.917672f, 0.917634f,
+ 0.917596f, 0.917558f, 0.917520f, 0.917482f, 0.917444f, 0.917405f, 0.917367f, 0.917329f,
+ 0.917291f, 0.917253f, 0.917215f, 0.917176f, 0.917138f, 0.917100f, 0.917062f, 0.917024f,
+ 0.916985f, 0.916947f, 0.916909f, 0.916871f, 0.916832f, 0.916794f, 0.916756f, 0.916717f,
+ 0.916679f, 0.916641f, 0.916602f, 0.916564f, 0.916526f, 0.916487f, 0.916449f, 0.916411f,
+ 0.916372f, 0.916334f, 0.916296f, 0.916257f, 0.916219f, 0.916180f, 0.916142f, 0.916103f,
+ 0.916065f, 0.916027f, 0.915988f, 0.915950f, 0.915911f, 0.915873f, 0.915834f, 0.915796f,
+ 0.915757f, 0.915719f, 0.915680f, 0.915642f, 0.915603f, 0.915564f, 0.915526f, 0.915487f,
+ 0.915449f, 0.915410f, 0.915372f, 0.915333f, 0.915294f, 0.915256f, 0.915217f, 0.915178f,
+ 0.915140f, 0.915101f, 0.915062f, 0.915024f, 0.914985f, 0.914946f, 0.914908f, 0.914869f,
+ 0.914830f, 0.914792f, 0.914753f, 0.914714f, 0.914675f, 0.914637f, 0.914598f, 0.914559f,
+ 0.914520f, 0.914482f, 0.914443f, 0.914404f, 0.914365f, 0.914326f, 0.914287f, 0.914249f,
+ 0.914210f, 0.914171f, 0.914132f, 0.914093f, 0.914054f, 0.914015f, 0.913976f, 0.913938f,
+ 0.913899f, 0.913860f, 0.913821f, 0.913782f, 0.913743f, 0.913704f, 0.913665f, 0.913626f,
+ 0.913587f, 0.913548f, 0.913509f, 0.913470f, 0.913431f, 0.913392f, 0.913353f, 0.913314f,
+ 0.913275f, 0.913236f, 0.913197f, 0.913158f, 0.913119f, 0.913080f, 0.913040f, 0.913001f,
+ 0.912962f, 0.912923f, 0.912884f, 0.912845f, 0.912806f, 0.912766f, 0.912727f, 0.912688f,
+ 0.912649f, 0.912610f, 0.912571f, 0.912531f, 0.912492f, 0.912453f, 0.912414f, 0.912374f,
+ 0.912335f, 0.912296f, 0.912257f, 0.912217f, 0.912178f, 0.912139f, 0.912099f, 0.912060f,
+ 0.912021f, 0.911982f, 0.911942f, 0.911903f, 0.911864f, 0.911824f, 0.911785f, 0.911745f,
+ 0.911706f, 0.911667f, 0.911627f, 0.911588f, 0.911548f, 0.911509f, 0.911470f, 0.911430f,
+ 0.911391f, 0.911351f, 0.911312f, 0.911272f, 0.911233f, 0.911193f, 0.911154f, 0.911114f,
+ 0.911075f, 0.911035f, 0.910996f, 0.910956f, 0.910917f, 0.910877f, 0.910837f, 0.910798f,
+ 0.910758f, 0.910719f, 0.910679f, 0.910639f, 0.910600f, 0.910560f, 0.910521f, 0.910481f,
+ 0.910441f, 0.910402f, 0.910362f, 0.910322f, 0.910283f, 0.910243f, 0.910203f, 0.910163f,
+ 0.910124f, 0.910084f, 0.910044f, 0.910005f, 0.909965f, 0.909925f, 0.909885f, 0.909845f,
+ 0.909806f, 0.909766f, 0.909726f, 0.909686f, 0.909646f, 0.909607f, 0.909567f, 0.909527f,
+ 0.909487f, 0.909447f, 0.909407f, 0.909368f, 0.909328f, 0.909288f, 0.909248f, 0.909208f,
+ 0.909168f, 0.909128f, 0.909088f, 0.909048f, 0.909008f, 0.908968f, 0.908928f, 0.908888f,
+ 0.908848f, 0.908808f, 0.908768f, 0.908728f, 0.908688f, 0.908648f, 0.908608f, 0.908568f,
+ 0.908528f, 0.908488f, 0.908448f, 0.908408f, 0.908368f, 0.908328f, 0.908288f, 0.908248f,
+ 0.908207f, 0.908167f, 0.908127f, 0.908087f, 0.908047f, 0.908007f, 0.907966f, 0.907926f,
+ 0.907886f, 0.907846f, 0.907806f, 0.907766f, 0.907725f, 0.907685f, 0.907645f, 0.907605f,
+ 0.907564f, 0.907524f, 0.907484f, 0.907444f, 0.907403f, 0.907363f, 0.907323f, 0.907282f,
+ 0.907242f, 0.907202f, 0.907161f, 0.907121f, 0.907081f, 0.907040f, 0.907000f, 0.906959f,
+ 0.906919f, 0.906879f, 0.906838f, 0.906798f, 0.906757f, 0.906717f, 0.906677f, 0.906636f,
+ 0.906596f, 0.906555f, 0.906515f, 0.906474f, 0.906434f, 0.906393f, 0.906353f, 0.906312f,
+ 0.906272f, 0.906231f, 0.906191f, 0.906150f, 0.906110f, 0.906069f, 0.906028f, 0.905988f,
+ 0.905947f, 0.905907f, 0.905866f, 0.905825f, 0.905785f, 0.905744f, 0.905704f, 0.905663f,
+ 0.905622f, 0.905582f, 0.905541f, 0.905500f, 0.905460f, 0.905419f, 0.905378f, 0.905337f,
+ 0.905297f, 0.905256f, 0.905215f, 0.905175f, 0.905134f, 0.905093f, 0.905052f, 0.905011f,
+ 0.904971f, 0.904930f, 0.904889f, 0.904848f, 0.904807f, 0.904767f, 0.904726f, 0.904685f,
+ 0.904644f, 0.904603f, 0.904562f, 0.904521f, 0.904481f, 0.904440f, 0.904399f, 0.904358f,
+ 0.904317f, 0.904276f, 0.904235f, 0.904194f, 0.904153f, 0.904112f, 0.904071f, 0.904030f,
+ 0.903989f, 0.903948f, 0.903907f, 0.903866f, 0.903825f, 0.903784f, 0.903743f, 0.903702f,
+ 0.903661f, 0.903620f, 0.903579f, 0.903538f, 0.903497f, 0.903456f, 0.903415f, 0.903373f,
+ 0.903332f, 0.903291f, 0.903250f, 0.903209f, 0.903168f, 0.903127f, 0.903085f, 0.903044f,
+ 0.903003f, 0.902962f, 0.902921f, 0.902879f, 0.902838f, 0.902797f, 0.902756f, 0.902715f,
+ 0.902673f, 0.902632f, 0.902591f, 0.902550f, 0.902508f, 0.902467f, 0.902426f, 0.902384f,
+ 0.902343f, 0.902302f, 0.902260f, 0.902219f, 0.902178f, 0.902136f, 0.902095f, 0.902054f,
+ 0.902012f, 0.901971f, 0.901929f, 0.901888f, 0.901847f, 0.901805f, 0.901764f, 0.901722f,
+ 0.901681f, 0.901639f, 0.901598f, 0.901556f, 0.901515f, 0.901473f, 0.901432f, 0.901390f,
+ 0.901349f, 0.901307f, 0.901266f, 0.901224f, 0.901183f, 0.901141f, 0.901100f, 0.901058f,
+ 0.901016f, 0.900975f, 0.900933f, 0.900892f, 0.900850f, 0.900808f, 0.900767f, 0.900725f,
+ 0.900683f, 0.900642f, 0.900600f, 0.900558f, 0.900517f, 0.900475f, 0.900433f, 0.900392f,
+ 0.900350f, 0.900308f, 0.900266f, 0.900225f, 0.900183f, 0.900141f, 0.900099f, 0.900058f,
+ 0.900016f, 0.899974f, 0.899932f, 0.899890f, 0.899849f, 0.899807f, 0.899765f, 0.899723f,
+ 0.899681f, 0.899639f, 0.899598f, 0.899556f, 0.899514f, 0.899472f, 0.899430f, 0.899388f,
+ 0.899346f, 0.899304f, 0.899262f, 0.899220f, 0.899179f, 0.899137f, 0.899095f, 0.899053f,
+ 0.899011f, 0.898969f, 0.898927f, 0.898885f, 0.898843f, 0.898801f, 0.898759f, 0.898717f,
+ 0.898674f, 0.898632f, 0.898590f, 0.898548f, 0.898506f, 0.898464f, 0.898422f, 0.898380f,
+ 0.898338f, 0.898296f, 0.898254f, 0.898211f, 0.898169f, 0.898127f, 0.898085f, 0.898043f,
+ 0.898001f, 0.897958f, 0.897916f, 0.897874f, 0.897832f, 0.897790f, 0.897747f, 0.897705f,
+ 0.897663f, 0.897621f, 0.897578f, 0.897536f, 0.897494f, 0.897452f, 0.897409f, 0.897367f,
+ 0.897325f, 0.897282f, 0.897240f, 0.897198f, 0.897155f, 0.897113f, 0.897071f, 0.897028f,
+ 0.896986f, 0.896943f, 0.896901f, 0.896859f, 0.896816f, 0.896774f, 0.896731f, 0.896689f,
+ 0.896646f, 0.896604f, 0.896562f, 0.896519f, 0.896477f, 0.896434f, 0.896392f, 0.896349f,
+ 0.896307f, 0.896264f, 0.896222f, 0.896179f, 0.896137f, 0.896094f, 0.896051f, 0.896009f,
+ 0.895966f, 0.895924f, 0.895881f, 0.895838f, 0.895796f, 0.895753f, 0.895711f, 0.895668f,
+ 0.895625f, 0.895583f, 0.895540f, 0.895497f, 0.895455f, 0.895412f, 0.895369f, 0.895327f,
+ 0.895284f, 0.895241f, 0.895198f, 0.895156f, 0.895113f, 0.895070f, 0.895028f, 0.894985f,
+ 0.894942f, 0.894899f, 0.894856f, 0.894814f, 0.894771f, 0.894728f, 0.894685f, 0.894642f,
+ 0.894599f, 0.894557f, 0.894514f, 0.894471f, 0.894428f, 0.894385f, 0.894342f, 0.894299f,
+ 0.894256f, 0.894214f, 0.894171f, 0.894128f, 0.894085f, 0.894042f, 0.893999f, 0.893956f,
+ 0.893913f, 0.893870f, 0.893827f, 0.893784f, 0.893741f, 0.893698f, 0.893655f, 0.893612f,
+ 0.893569f, 0.893526f, 0.893483f, 0.893440f, 0.893397f, 0.893354f, 0.893310f, 0.893267f,
+ 0.893224f, 0.893181f, 0.893138f, 0.893095f, 0.893052f, 0.893009f, 0.892965f, 0.892922f,
+ 0.892879f, 0.892836f, 0.892793f, 0.892750f, 0.892706f, 0.892663f, 0.892620f, 0.892577f,
+ 0.892534f, 0.892490f, 0.892447f, 0.892404f, 0.892361f, 0.892317f, 0.892274f, 0.892231f,
+ 0.892187f, 0.892144f, 0.892101f, 0.892057f, 0.892014f, 0.891971f, 0.891927f, 0.891884f,
+ 0.891841f, 0.891797f, 0.891754f, 0.891711f, 0.891667f, 0.891624f, 0.891580f, 0.891537f,
+ 0.891493f, 0.891450f, 0.891407f, 0.891363f, 0.891320f, 0.891276f, 0.891233f, 0.891189f,
+ 0.891146f, 0.891102f, 0.891059f, 0.891015f, 0.890972f, 0.890928f, 0.890885f, 0.890841f,
+ 0.890797f, 0.890754f, 0.890710f, 0.890667f, 0.890623f, 0.890580f, 0.890536f, 0.890492f,
+ 0.890449f, 0.890405f, 0.890361f, 0.890318f, 0.890274f, 0.890230f, 0.890187f, 0.890143f,
+ 0.890099f, 0.890056f, 0.890012f, 0.889968f, 0.889925f, 0.889881f, 0.889837f, 0.889793f,
+ 0.889750f, 0.889706f, 0.889662f, 0.889618f, 0.889574f, 0.889531f, 0.889487f, 0.889443f,
+ 0.889399f, 0.889355f, 0.889312f, 0.889268f, 0.889224f, 0.889180f, 0.889136f, 0.889092f,
+ 0.889048f, 0.889004f, 0.888961f, 0.888917f, 0.888873f, 0.888829f, 0.888785f, 0.888741f,
+ 0.888697f, 0.888653f, 0.888609f, 0.888565f, 0.888521f, 0.888477f, 0.888433f, 0.888389f,
+ 0.888345f, 0.888301f, 0.888257f, 0.888213f, 0.888169f, 0.888125f, 0.888081f, 0.888037f,
+ 0.887993f, 0.887949f, 0.887904f, 0.887860f, 0.887816f, 0.887772f, 0.887728f, 0.887684f,
+ 0.887640f, 0.887595f, 0.887551f, 0.887507f, 0.887463f, 0.887419f, 0.887375f, 0.887330f,
+ 0.887286f, 0.887242f, 0.887198f, 0.887153f, 0.887109f, 0.887065f, 0.887021f, 0.886976f,
+ 0.886932f, 0.886888f, 0.886844f, 0.886799f, 0.886755f, 0.886711f, 0.886666f, 0.886622f,
+ 0.886578f, 0.886533f, 0.886489f, 0.886445f, 0.886400f, 0.886356f, 0.886311f, 0.886267f,
+ 0.886223f, 0.886178f, 0.886134f, 0.886089f, 0.886045f, 0.886000f, 0.885956f, 0.885911f,
+ 0.885867f, 0.885822f, 0.885778f, 0.885733f, 0.885689f, 0.885644f, 0.885600f, 0.885555f,
+ 0.885511f, 0.885466f, 0.885422f, 0.885377f, 0.885333f, 0.885288f, 0.885243f, 0.885199f,
+ 0.885154f, 0.885110f, 0.885065f, 0.885020f, 0.884976f, 0.884931f, 0.884886f, 0.884842f,
+ 0.884797f, 0.884752f, 0.884708f, 0.884663f, 0.884618f, 0.884574f, 0.884529f, 0.884484f,
+ 0.884439f, 0.884395f, 0.884350f, 0.884305f, 0.884260f, 0.884216f, 0.884171f, 0.884126f,
+ 0.884081f, 0.884036f, 0.883992f, 0.883947f, 0.883902f, 0.883857f, 0.883812f, 0.883767f,
+ 0.883723f, 0.883678f, 0.883633f, 0.883588f, 0.883543f, 0.883498f, 0.883453f, 0.883408f,
+ 0.883363f, 0.883318f, 0.883273f, 0.883228f, 0.883184f, 0.883139f, 0.883094f, 0.883049f,
+ 0.883004f, 0.882959f, 0.882914f, 0.882869f, 0.882824f, 0.882779f, 0.882733f, 0.882688f,
+ 0.882643f, 0.882598f, 0.882553f, 0.882508f, 0.882463f, 0.882418f, 0.882373f, 0.882328f,
+ 0.882283f, 0.882237f, 0.882192f, 0.882147f, 0.882102f, 0.882057f, 0.882012f, 0.881966f,
+ 0.881921f, 0.881876f, 0.881831f, 0.881786f, 0.881740f, 0.881695f, 0.881650f, 0.881605f,
+ 0.881559f, 0.881514f, 0.881469f, 0.881424f, 0.881378f, 0.881333f, 0.881288f, 0.881242f,
+ 0.881197f, 0.881152f, 0.881106f, 0.881061f, 0.881016f, 0.880970f, 0.880925f, 0.880880f,
+ 0.880834f, 0.880789f, 0.880743f, 0.880698f, 0.880653f, 0.880607f, 0.880562f, 0.880516f,
+ 0.880471f, 0.880425f, 0.880380f, 0.880334f, 0.880289f, 0.880244f, 0.880198f, 0.880153f,
+ 0.880107f, 0.880061f, 0.880016f, 0.879970f, 0.879925f, 0.879879f, 0.879834f, 0.879788f,
+ 0.879743f, 0.879697f, 0.879651f, 0.879606f, 0.879560f, 0.879515f, 0.879469f, 0.879423f,
+ 0.879378f, 0.879332f, 0.879286f, 0.879241f, 0.879195f, 0.879149f, 0.879104f, 0.879058f,
+ 0.879012f, 0.878967f, 0.878921f, 0.878875f, 0.878829f, 0.878784f, 0.878738f, 0.878692f,
+ 0.878646f, 0.878600f, 0.878555f, 0.878509f, 0.878463f, 0.878417f, 0.878371f, 0.878326f,
+ 0.878280f, 0.878234f, 0.878188f, 0.878142f, 0.878096f, 0.878051f, 0.878005f, 0.877959f,
+ 0.877913f, 0.877867f, 0.877821f, 0.877775f, 0.877729f, 0.877683f, 0.877637f, 0.877591f,
+ 0.877545f, 0.877499f, 0.877453f, 0.877407f, 0.877361f, 0.877315f, 0.877269f, 0.877223f,
+ 0.877177f, 0.877131f, 0.877085f, 0.877039f, 0.876993f, 0.876947f, 0.876901f, 0.876855f,
+ 0.876809f, 0.876763f, 0.876716f, 0.876670f, 0.876624f, 0.876578f, 0.876532f, 0.876486f,
+ 0.876440f, 0.876393f, 0.876347f, 0.876301f, 0.876255f, 0.876209f, 0.876163f, 0.876116f,
+ 0.876070f, 0.876024f, 0.875978f, 0.875931f, 0.875885f, 0.875839f, 0.875793f, 0.875746f,
+ 0.875700f, 0.875654f, 0.875607f, 0.875561f, 0.875515f, 0.875468f, 0.875422f, 0.875376f,
+ 0.875329f, 0.875283f, 0.875237f, 0.875190f, 0.875144f, 0.875098f, 0.875051f, 0.875005f,
+ 0.874958f, 0.874912f, 0.874865f, 0.874819f, 0.874773f, 0.874726f, 0.874680f, 0.874633f,
+ 0.874587f, 0.874540f, 0.874494f, 0.874447f, 0.874401f, 0.874354f, 0.874308f, 0.874261f,
+ 0.874215f, 0.874168f, 0.874121f, 0.874075f, 0.874028f, 0.873982f, 0.873935f, 0.873888f,
+ 0.873842f, 0.873795f, 0.873749f, 0.873702f, 0.873655f, 0.873609f, 0.873562f, 0.873515f,
+ 0.873469f, 0.873422f, 0.873375f, 0.873329f, 0.873282f, 0.873235f, 0.873188f, 0.873142f,
+ 0.873095f, 0.873048f, 0.873001f, 0.872955f, 0.872908f, 0.872861f, 0.872814f, 0.872768f,
+ 0.872721f, 0.872674f, 0.872627f, 0.872580f, 0.872534f, 0.872487f, 0.872440f, 0.872393f,
+ 0.872346f, 0.872299f, 0.872252f, 0.872205f, 0.872159f, 0.872112f, 0.872065f, 0.872018f,
+ 0.871971f, 0.871924f, 0.871877f, 0.871830f, 0.871783f, 0.871736f, 0.871689f, 0.871642f,
+ 0.871595f, 0.871548f, 0.871501f, 0.871454f, 0.871407f, 0.871360f, 0.871313f, 0.871266f,
+ 0.871219f, 0.871172f, 0.871125f, 0.871078f, 0.871031f, 0.870983f, 0.870936f, 0.870889f,
+ 0.870842f, 0.870795f, 0.870748f, 0.870701f, 0.870654f, 0.870606f, 0.870559f, 0.870512f,
+ 0.870465f, 0.870418f, 0.870370f, 0.870323f, 0.870276f, 0.870229f, 0.870182f, 0.870134f,
+ 0.870087f, 0.870040f, 0.869992f, 0.869945f, 0.869898f, 0.869851f, 0.869803f, 0.869756f,
+ 0.869709f, 0.869661f, 0.869614f, 0.869567f, 0.869519f, 0.869472f, 0.869425f, 0.869377f,
+ 0.869330f, 0.869282f, 0.869235f, 0.869188f, 0.869140f, 0.869093f, 0.869045f, 0.868998f,
+ 0.868951f, 0.868903f, 0.868856f, 0.868808f, 0.868761f, 0.868713f, 0.868666f, 0.868618f,
+ 0.868571f, 0.868523f, 0.868476f, 0.868428f, 0.868381f, 0.868333f, 0.868285f, 0.868238f,
+ 0.868190f, 0.868143f, 0.868095f, 0.868048f, 0.868000f, 0.867952f, 0.867905f, 0.867857f,
+ 0.867809f, 0.867762f, 0.867714f, 0.867667f, 0.867619f, 0.867571f, 0.867523f, 0.867476f,
+ 0.867428f, 0.867380f, 0.867333f, 0.867285f, 0.867237f, 0.867190f, 0.867142f, 0.867094f,
+ 0.867046f, 0.866998f, 0.866951f, 0.866903f, 0.866855f, 0.866807f, 0.866759f, 0.866712f,
+ 0.866664f, 0.866616f, 0.866568f, 0.866520f, 0.866472f, 0.866425f, 0.866377f, 0.866329f,
+ 0.866281f, 0.866233f, 0.866185f, 0.866137f, 0.866089f, 0.866041f, 0.865993f, 0.865946f,
+ 0.865898f, 0.865850f, 0.865802f, 0.865754f, 0.865706f, 0.865658f, 0.865610f, 0.865562f,
+ 0.865514f, 0.865466f, 0.865418f, 0.865369f, 0.865321f, 0.865273f, 0.865225f, 0.865177f,
+ 0.865129f, 0.865081f, 0.865033f, 0.864985f, 0.864937f, 0.864889f, 0.864841f, 0.864792f,
+ 0.864744f, 0.864696f, 0.864648f, 0.864600f, 0.864552f, 0.864503f, 0.864455f, 0.864407f,
+ 0.864359f, 0.864311f, 0.864262f, 0.864214f, 0.864166f, 0.864118f, 0.864069f, 0.864021f,
+ 0.863973f, 0.863925f, 0.863876f, 0.863828f, 0.863780f, 0.863731f, 0.863683f, 0.863635f,
+ 0.863586f, 0.863538f, 0.863490f, 0.863441f, 0.863393f, 0.863345f, 0.863296f, 0.863248f,
+ 0.863199f, 0.863151f, 0.863103f, 0.863054f, 0.863006f, 0.862957f, 0.862909f, 0.862860f,
+ 0.862812f, 0.862763f, 0.862715f, 0.862666f, 0.862618f, 0.862570f, 0.862521f, 0.862472f,
+ 0.862424f, 0.862375f, 0.862327f, 0.862278f, 0.862230f, 0.862181f, 0.862133f, 0.862084f,
+ 0.862035f, 0.861987f, 0.861938f, 0.861890f, 0.861841f, 0.861792f, 0.861744f, 0.861695f,
+ 0.861646f, 0.861598f, 0.861549f, 0.861500f, 0.861452f, 0.861403f, 0.861354f, 0.861306f,
+ 0.861257f, 0.861208f, 0.861160f, 0.861111f, 0.861062f, 0.861013f, 0.860964f, 0.860916f,
+ 0.860867f, 0.860818f, 0.860769f, 0.860721f, 0.860672f, 0.860623f, 0.860574f, 0.860525f,
+ 0.860476f, 0.860428f, 0.860379f, 0.860330f, 0.860281f, 0.860232f, 0.860183f, 0.860134f,
+ 0.860085f, 0.860036f, 0.859988f, 0.859939f, 0.859890f, 0.859841f, 0.859792f, 0.859743f,
+ 0.859694f, 0.859645f, 0.859596f, 0.859547f, 0.859498f, 0.859449f, 0.859400f, 0.859351f,
+ 0.859302f, 0.859253f, 0.859204f, 0.859155f, 0.859106f, 0.859057f, 0.859007f, 0.858958f,
+ 0.858909f, 0.858860f, 0.858811f, 0.858762f, 0.858713f, 0.858664f, 0.858615f, 0.858565f,
+ 0.858516f, 0.858467f, 0.858418f, 0.858369f, 0.858320f, 0.858270f, 0.858221f, 0.858172f,
+ 0.858123f, 0.858073f, 0.858024f, 0.857975f, 0.857926f, 0.857876f, 0.857827f, 0.857778f,
+ 0.857729f, 0.857679f, 0.857630f, 0.857581f, 0.857531f, 0.857482f, 0.857433f, 0.857383f,
+ 0.857334f, 0.857285f, 0.857235f, 0.857186f, 0.857137f, 0.857087f, 0.857038f, 0.856988f,
+ 0.856939f, 0.856890f, 0.856840f, 0.856791f, 0.856741f, 0.856692f, 0.856642f, 0.856593f,
+ 0.856543f, 0.856494f, 0.856444f, 0.856395f, 0.856345f, 0.856296f, 0.856246f, 0.856197f,
+ 0.856147f, 0.856098f, 0.856048f, 0.855999f, 0.855949f, 0.855900f, 0.855850f, 0.855800f,
+ 0.855751f, 0.855701f, 0.855651f, 0.855602f, 0.855552f, 0.855503f, 0.855453f, 0.855403f,
+ 0.855354f, 0.855304f, 0.855254f, 0.855205f, 0.855155f, 0.855105f, 0.855056f, 0.855006f,
+ 0.854956f, 0.854906f, 0.854857f, 0.854807f, 0.854757f, 0.854707f, 0.854658f, 0.854608f,
+ 0.854558f, 0.854508f, 0.854458f, 0.854409f, 0.854359f, 0.854309f, 0.854259f, 0.854209f,
+ 0.854159f, 0.854110f, 0.854060f, 0.854010f, 0.853960f, 0.853910f, 0.853860f, 0.853810f,
+ 0.853760f, 0.853710f, 0.853660f, 0.853611f, 0.853561f, 0.853511f, 0.853461f, 0.853411f,
+ 0.853361f, 0.853311f, 0.853261f, 0.853211f, 0.853161f, 0.853111f, 0.853061f, 0.853011f,
+ 0.852961f, 0.852911f, 0.852861f, 0.852810f, 0.852760f, 0.852710f, 0.852660f, 0.852610f,
+ 0.852560f, 0.852510f, 0.852460f, 0.852410f, 0.852360f, 0.852309f, 0.852259f, 0.852209f,
+ 0.852159f, 0.852109f, 0.852059f, 0.852008f, 0.851958f, 0.851908f, 0.851858f, 0.851808f,
+ 0.851757f, 0.851707f, 0.851657f, 0.851607f, 0.851556f, 0.851506f, 0.851456f, 0.851406f,
+ 0.851355f, 0.851305f, 0.851255f, 0.851204f, 0.851154f, 0.851104f, 0.851053f, 0.851003f,
+ 0.850953f, 0.850902f, 0.850852f, 0.850801f, 0.850751f, 0.850701f, 0.850650f, 0.850600f,
+ 0.850549f, 0.850499f, 0.850449f, 0.850398f, 0.850348f, 0.850297f, 0.850247f, 0.850196f,
+ 0.850146f, 0.850095f, 0.850045f, 0.849994f, 0.849944f, 0.849893f, 0.849843f, 0.849792f,
+ 0.849742f, 0.849691f, 0.849641f, 0.849590f, 0.849540f, 0.849489f, 0.849438f, 0.849388f,
+ 0.849337f, 0.849287f, 0.849236f, 0.849185f, 0.849135f, 0.849084f, 0.849033f, 0.848983f,
+ 0.848932f, 0.848881f, 0.848831f, 0.848780f, 0.848729f, 0.848679f, 0.848628f, 0.848577f,
+ 0.848526f, 0.848476f, 0.848425f, 0.848374f, 0.848323f, 0.848273f, 0.848222f, 0.848171f,
+ 0.848120f, 0.848070f, 0.848019f, 0.847968f, 0.847917f, 0.847866f, 0.847815f, 0.847765f,
+ 0.847714f, 0.847663f, 0.847612f, 0.847561f, 0.847510f, 0.847459f, 0.847408f, 0.847358f,
+ 0.847307f, 0.847256f, 0.847205f, 0.847154f, 0.847103f, 0.847052f, 0.847001f, 0.846950f,
+ 0.846899f, 0.846848f, 0.846797f, 0.846746f, 0.846695f, 0.846644f, 0.846593f, 0.846542f,
+ 0.846491f, 0.846440f, 0.846389f, 0.846338f, 0.846287f, 0.846236f, 0.846185f, 0.846133f,
+ 0.846082f, 0.846031f, 0.845980f, 0.845929f, 0.845878f, 0.845827f, 0.845776f, 0.845724f,
+ 0.845673f, 0.845622f, 0.845571f, 0.845520f, 0.845469f, 0.845417f, 0.845366f, 0.845315f,
+ 0.845264f, 0.845212f, 0.845161f, 0.845110f, 0.845059f, 0.845007f, 0.844956f, 0.844905f,
+ 0.844854f, 0.844802f, 0.844751f, 0.844700f, 0.844648f, 0.844597f, 0.844546f, 0.844494f,
+ 0.844443f, 0.844392f, 0.844340f, 0.844289f, 0.844238f, 0.844186f, 0.844135f, 0.844083f,
+ 0.844032f, 0.843980f, 0.843929f, 0.843878f, 0.843826f, 0.843775f, 0.843723f, 0.843672f,
+ 0.843620f, 0.843569f, 0.843517f, 0.843466f, 0.843414f, 0.843363f, 0.843311f, 0.843260f,
+ 0.843208f, 0.843157f, 0.843105f, 0.843054f, 0.843002f, 0.842950f, 0.842899f, 0.842847f,
+ 0.842796f, 0.842744f, 0.842692f, 0.842641f, 0.842589f, 0.842538f, 0.842486f, 0.842434f,
+ 0.842383f, 0.842331f, 0.842279f, 0.842228f, 0.842176f, 0.842124f, 0.842072f, 0.842021f,
+ 0.841969f, 0.841917f, 0.841866f, 0.841814f, 0.841762f, 0.841710f, 0.841659f, 0.841607f,
+ 0.841555f, 0.841503f, 0.841451f, 0.841400f, 0.841348f, 0.841296f, 0.841244f, 0.841192f,
+ 0.841140f, 0.841089f, 0.841037f, 0.840985f, 0.840933f, 0.840881f, 0.840829f, 0.840777f,
+ 0.840725f, 0.840673f, 0.840622f, 0.840570f, 0.840518f, 0.840466f, 0.840414f, 0.840362f,
+ 0.840310f, 0.840258f, 0.840206f, 0.840154f, 0.840102f, 0.840050f, 0.839998f, 0.839946f,
+ 0.839894f, 0.839842f, 0.839790f, 0.839738f, 0.839686f, 0.839634f, 0.839581f, 0.839529f,
+ 0.839477f, 0.839425f, 0.839373f, 0.839321f, 0.839269f, 0.839217f, 0.839165f, 0.839112f,
+ 0.839060f, 0.839008f, 0.838956f, 0.838904f, 0.838852f, 0.838799f, 0.838747f, 0.838695f,
+ 0.838643f, 0.838591f, 0.838538f, 0.838486f, 0.838434f, 0.838382f, 0.838329f, 0.838277f,
+ 0.838225f, 0.838172f, 0.838120f, 0.838068f, 0.838015f, 0.837963f, 0.837911f, 0.837859f,
+ 0.837806f, 0.837754f, 0.837701f, 0.837649f, 0.837597f, 0.837544f, 0.837492f, 0.837440f,
+ 0.837387f, 0.837335f, 0.837282f, 0.837230f, 0.837178f, 0.837125f, 0.837073f, 0.837020f,
+ 0.836968f, 0.836915f, 0.836863f, 0.836810f, 0.836758f, 0.836705f, 0.836653f, 0.836600f,
+ 0.836548f, 0.836495f, 0.836443f, 0.836390f, 0.836338f, 0.836285f, 0.836232f, 0.836180f,
+ 0.836127f, 0.836075f, 0.836022f, 0.835969f, 0.835917f, 0.835864f, 0.835812f, 0.835759f,
+ 0.835706f, 0.835654f, 0.835601f, 0.835548f, 0.835496f, 0.835443f, 0.835390f, 0.835338f,
+ 0.835285f, 0.835232f, 0.835179f, 0.835127f, 0.835074f, 0.835021f, 0.834968f, 0.834916f,
+ 0.834863f, 0.834810f, 0.834757f, 0.834705f, 0.834652f, 0.834599f, 0.834546f, 0.834493f,
+ 0.834440f, 0.834388f, 0.834335f, 0.834282f, 0.834229f, 0.834176f, 0.834123f, 0.834070f,
+ 0.834018f, 0.833965f, 0.833912f, 0.833859f, 0.833806f, 0.833753f, 0.833700f, 0.833647f,
+ 0.833594f, 0.833541f, 0.833488f, 0.833435f, 0.833382f, 0.833329f, 0.833276f, 0.833223f,
+ 0.833170f, 0.833117f, 0.833064f, 0.833011f, 0.832958f, 0.832905f, 0.832852f, 0.832799f,
+ 0.832746f, 0.832693f, 0.832640f, 0.832586f, 0.832533f, 0.832480f, 0.832427f, 0.832374f,
+ 0.832321f, 0.832268f, 0.832215f, 0.832161f, 0.832108f, 0.832055f, 0.832002f, 0.831949f,
+ 0.831895f, 0.831842f, 0.831789f, 0.831736f, 0.831683f, 0.831629f, 0.831576f, 0.831523f,
+ 0.831470f, 0.831416f, 0.831363f, 0.831310f, 0.831257f, 0.831203f, 0.831150f, 0.831097f,
+ 0.831043f, 0.830990f, 0.830937f, 0.830883f, 0.830830f, 0.830777f, 0.830723f, 0.830670f,
+ 0.830616f, 0.830563f, 0.830510f, 0.830456f, 0.830403f, 0.830349f, 0.830296f, 0.830243f,
+ 0.830189f, 0.830136f, 0.830082f, 0.830029f, 0.829975f, 0.829922f, 0.829868f, 0.829815f,
+ 0.829761f, 0.829708f, 0.829654f, 0.829601f, 0.829547f, 0.829494f, 0.829440f, 0.829386f,
+ 0.829333f, 0.829279f, 0.829226f, 0.829172f, 0.829119f, 0.829065f, 0.829011f, 0.828958f,
+ 0.828904f, 0.828851f, 0.828797f, 0.828743f, 0.828690f, 0.828636f, 0.828582f, 0.828529f,
+ 0.828475f, 0.828421f, 0.828367f, 0.828314f, 0.828260f, 0.828206f, 0.828153f, 0.828099f,
+ 0.828045f, 0.827991f, 0.827938f, 0.827884f, 0.827830f, 0.827776f, 0.827722f, 0.827669f,
+ 0.827615f, 0.827561f, 0.827507f, 0.827453f, 0.827399f, 0.827346f, 0.827292f, 0.827238f,
+ 0.827184f, 0.827130f, 0.827076f, 0.827022f, 0.826968f, 0.826915f, 0.826861f, 0.826807f,
+ 0.826753f, 0.826699f, 0.826645f, 0.826591f, 0.826537f, 0.826483f, 0.826429f, 0.826375f,
+ 0.826321f, 0.826267f, 0.826213f, 0.826159f, 0.826105f, 0.826051f, 0.825997f, 0.825943f,
+ 0.825889f, 0.825835f, 0.825781f, 0.825727f, 0.825673f, 0.825618f, 0.825564f, 0.825510f,
+ 0.825456f, 0.825402f, 0.825348f, 0.825294f, 0.825240f, 0.825185f, 0.825131f, 0.825077f,
+ 0.825023f, 0.824969f, 0.824915f, 0.824860f, 0.824806f, 0.824752f, 0.824698f, 0.824644f,
+ 0.824589f, 0.824535f, 0.824481f, 0.824427f, 0.824372f, 0.824318f, 0.824264f, 0.824209f,
+ 0.824155f, 0.824101f, 0.824047f, 0.823992f, 0.823938f, 0.823884f, 0.823829f, 0.823775f,
+ 0.823721f, 0.823666f, 0.823612f, 0.823557f, 0.823503f, 0.823449f, 0.823394f, 0.823340f,
+ 0.823285f, 0.823231f, 0.823177f, 0.823122f, 0.823068f, 0.823013f, 0.822959f, 0.822904f,
+ 0.822850f, 0.822795f, 0.822741f, 0.822686f, 0.822632f, 0.822577f, 0.822523f, 0.822468f,
+ 0.822414f, 0.822359f, 0.822305f, 0.822250f, 0.822195f, 0.822141f, 0.822086f, 0.822032f,
+ 0.821977f, 0.821922f, 0.821868f, 0.821813f, 0.821759f, 0.821704f, 0.821649f, 0.821595f,
+ 0.821540f, 0.821485f, 0.821431f, 0.821376f, 0.821321f, 0.821267f, 0.821212f, 0.821157f,
+ 0.821102f, 0.821048f, 0.820993f, 0.820938f, 0.820884f, 0.820829f, 0.820774f, 0.820719f,
+ 0.820664f, 0.820610f, 0.820555f, 0.820500f, 0.820445f, 0.820390f, 0.820336f, 0.820281f,
+ 0.820226f, 0.820171f, 0.820116f, 0.820061f, 0.820007f, 0.819952f, 0.819897f, 0.819842f,
+ 0.819787f, 0.819732f, 0.819677f, 0.819622f, 0.819567f, 0.819512f, 0.819457f, 0.819402f,
+ 0.819348f, 0.819293f, 0.819238f, 0.819183f, 0.819128f, 0.819073f, 0.819018f, 0.818963f,
+ 0.818908f, 0.818853f, 0.818798f, 0.818742f, 0.818687f, 0.818632f, 0.818577f, 0.818522f,
+ 0.818467f, 0.818412f, 0.818357f, 0.818302f, 0.818247f, 0.818192f, 0.818137f, 0.818081f,
+ 0.818026f, 0.817971f, 0.817916f, 0.817861f, 0.817806f, 0.817750f, 0.817695f, 0.817640f,
+ 0.817585f, 0.817530f, 0.817474f, 0.817419f, 0.817364f, 0.817309f, 0.817253f, 0.817198f,
+ 0.817143f, 0.817088f, 0.817032f, 0.816977f, 0.816922f, 0.816867f, 0.816811f, 0.816756f,
+ 0.816701f, 0.816645f, 0.816590f, 0.816535f, 0.816479f, 0.816424f, 0.816368f, 0.816313f,
+ 0.816258f, 0.816202f, 0.816147f, 0.816092f, 0.816036f, 0.815981f, 0.815925f, 0.815870f,
+ 0.815814f, 0.815759f, 0.815704f, 0.815648f, 0.815593f, 0.815537f, 0.815482f, 0.815426f,
+ 0.815371f, 0.815315f, 0.815260f, 0.815204f, 0.815149f, 0.815093f, 0.815037f, 0.814982f,
+ 0.814926f, 0.814871f, 0.814815f, 0.814760f, 0.814704f, 0.814648f, 0.814593f, 0.814537f,
+ 0.814482f, 0.814426f, 0.814370f, 0.814315f, 0.814259f, 0.814203f, 0.814148f, 0.814092f,
+ 0.814036f, 0.813981f, 0.813925f, 0.813869f, 0.813814f, 0.813758f, 0.813702f, 0.813646f,
+ 0.813591f, 0.813535f, 0.813479f, 0.813423f, 0.813368f, 0.813312f, 0.813256f, 0.813200f,
+ 0.813144f, 0.813089f, 0.813033f, 0.812977f, 0.812921f, 0.812865f, 0.812809f, 0.812754f,
+ 0.812698f, 0.812642f, 0.812586f, 0.812530f, 0.812474f, 0.812418f, 0.812362f, 0.812307f,
+ 0.812251f, 0.812195f, 0.812139f, 0.812083f, 0.812027f, 0.811971f, 0.811915f, 0.811859f,
+ 0.811803f, 0.811747f, 0.811691f, 0.811635f, 0.811579f, 0.811523f, 0.811467f, 0.811411f,
+ 0.811355f, 0.811299f, 0.811243f, 0.811187f, 0.811131f, 0.811075f, 0.811018f, 0.810962f,
+ 0.810906f, 0.810850f, 0.810794f, 0.810738f, 0.810682f, 0.810626f, 0.810570f, 0.810513f,
+ 0.810457f, 0.810401f, 0.810345f, 0.810289f, 0.810232f, 0.810176f, 0.810120f, 0.810064f,
+ 0.810008f, 0.809951f, 0.809895f, 0.809839f, 0.809783f, 0.809726f, 0.809670f, 0.809614f,
+ 0.809558f, 0.809501f, 0.809445f, 0.809389f, 0.809332f, 0.809276f, 0.809220f, 0.809164f,
+ 0.809107f, 0.809051f, 0.808994f, 0.808938f, 0.808882f, 0.808825f, 0.808769f, 0.808713f,
+ 0.808656f, 0.808600f, 0.808543f, 0.808487f, 0.808430f, 0.808374f, 0.808318f, 0.808261f,
+ 0.808205f, 0.808148f, 0.808092f, 0.808035f, 0.807979f, 0.807922f, 0.807866f, 0.807809f,
+ 0.807753f, 0.807696f, 0.807640f, 0.807583f, 0.807527f, 0.807470f, 0.807414f, 0.807357f,
+ 0.807300f, 0.807244f, 0.807187f, 0.807131f, 0.807074f, 0.807017f, 0.806961f, 0.806904f,
+ 0.806848f, 0.806791f, 0.806734f, 0.806678f, 0.806621f, 0.806564f, 0.806508f, 0.806451f,
+ 0.806394f, 0.806338f, 0.806281f, 0.806224f, 0.806167f, 0.806111f, 0.806054f, 0.805997f,
+ 0.805940f, 0.805884f, 0.805827f, 0.805770f, 0.805713f, 0.805656f, 0.805600f, 0.805543f,
+ 0.805486f, 0.805429f, 0.805372f, 0.805316f, 0.805259f, 0.805202f, 0.805145f, 0.805088f,
+ 0.805031f, 0.804974f, 0.804918f, 0.804861f, 0.804804f, 0.804747f, 0.804690f, 0.804633f,
+ 0.804576f, 0.804519f, 0.804462f, 0.804405f, 0.804348f, 0.804291f, 0.804234f, 0.804177f,
+ 0.804120f, 0.804063f, 0.804006f, 0.803949f, 0.803892f, 0.803835f, 0.803778f, 0.803721f,
+ 0.803664f, 0.803607f, 0.803550f, 0.803493f, 0.803436f, 0.803379f, 0.803322f, 0.803265f,
+ 0.803208f, 0.803150f, 0.803093f, 0.803036f, 0.802979f, 0.802922f, 0.802865f, 0.802808f,
+ 0.802750f, 0.802693f, 0.802636f, 0.802579f, 0.802522f, 0.802464f, 0.802407f, 0.802350f,
+ 0.802293f, 0.802236f, 0.802178f, 0.802121f, 0.802064f, 0.802007f, 0.801949f, 0.801892f,
+ 0.801835f, 0.801777f, 0.801720f, 0.801663f, 0.801606f, 0.801548f, 0.801491f, 0.801434f,
+ 0.801376f, 0.801319f, 0.801261f, 0.801204f, 0.801147f, 0.801089f, 0.801032f, 0.800975f,
+ 0.800917f, 0.800860f, 0.800802f, 0.800745f, 0.800687f, 0.800630f, 0.800573f, 0.800515f,
+ 0.800458f, 0.800400f, 0.800343f, 0.800285f, 0.800228f, 0.800170f, 0.800113f, 0.800055f,
+ 0.799998f, 0.799940f, 0.799883f, 0.799825f, 0.799768f, 0.799710f, 0.799652f, 0.799595f,
+ 0.799537f, 0.799480f, 0.799422f, 0.799365f, 0.799307f, 0.799249f, 0.799192f, 0.799134f,
+ 0.799076f, 0.799019f, 0.798961f, 0.798903f, 0.798846f, 0.798788f, 0.798730f, 0.798673f,
+ 0.798615f, 0.798557f, 0.798500f, 0.798442f, 0.798384f, 0.798326f, 0.798269f, 0.798211f,
+ 0.798153f, 0.798095f, 0.798038f, 0.797980f, 0.797922f, 0.797864f, 0.797806f, 0.797749f,
+ 0.797691f, 0.797633f, 0.797575f, 0.797517f, 0.797459f, 0.797402f, 0.797344f, 0.797286f,
+ 0.797228f, 0.797170f, 0.797112f, 0.797054f, 0.796996f, 0.796939f, 0.796881f, 0.796823f,
+ 0.796765f, 0.796707f, 0.796649f, 0.796591f, 0.796533f, 0.796475f, 0.796417f, 0.796359f,
+ 0.796301f, 0.796243f, 0.796185f, 0.796127f, 0.796069f, 0.796011f, 0.795953f, 0.795895f,
+ 0.795837f, 0.795779f, 0.795721f, 0.795663f, 0.795605f, 0.795547f, 0.795488f, 0.795430f,
+ 0.795372f, 0.795314f, 0.795256f, 0.795198f, 0.795140f, 0.795082f, 0.795023f, 0.794965f,
+ 0.794907f, 0.794849f, 0.794791f, 0.794733f, 0.794674f, 0.794616f, 0.794558f, 0.794500f,
+ 0.794442f, 0.794383f, 0.794325f, 0.794267f, 0.794209f, 0.794150f, 0.794092f, 0.794034f,
+ 0.793975f, 0.793917f, 0.793859f, 0.793801f, 0.793742f, 0.793684f, 0.793626f, 0.793567f,
+ 0.793509f, 0.793451f, 0.793392f, 0.793334f, 0.793276f, 0.793217f, 0.793159f, 0.793100f,
+ 0.793042f, 0.792984f, 0.792925f, 0.792867f, 0.792808f, 0.792750f, 0.792691f, 0.792633f,
+ 0.792575f, 0.792516f, 0.792458f, 0.792399f, 0.792341f, 0.792282f, 0.792224f, 0.792165f,
+ 0.792107f, 0.792048f, 0.791990f, 0.791931f, 0.791872f, 0.791814f, 0.791755f, 0.791697f,
+ 0.791638f, 0.791580f, 0.791521f, 0.791462f, 0.791404f, 0.791345f, 0.791287f, 0.791228f,
+ 0.791169f, 0.791111f, 0.791052f, 0.790993f, 0.790935f, 0.790876f, 0.790817f, 0.790759f,
+ 0.790700f, 0.790641f, 0.790583f, 0.790524f, 0.790465f, 0.790406f, 0.790348f, 0.790289f,
+ 0.790230f, 0.790171f, 0.790113f, 0.790054f, 0.789995f, 0.789936f, 0.789878f, 0.789819f,
+ 0.789760f, 0.789701f, 0.789642f, 0.789584f, 0.789525f, 0.789466f, 0.789407f, 0.789348f,
+ 0.789289f, 0.789230f, 0.789172f, 0.789113f, 0.789054f, 0.788995f, 0.788936f, 0.788877f,
+ 0.788818f, 0.788759f, 0.788700f, 0.788641f, 0.788582f, 0.788523f, 0.788464f, 0.788405f,
+ 0.788346f, 0.788287f, 0.788228f, 0.788169f, 0.788110f, 0.788051f, 0.787992f, 0.787933f,
+ 0.787874f, 0.787815f, 0.787756f, 0.787697f, 0.787638f, 0.787579f, 0.787520f, 0.787461f,
+ 0.787402f, 0.787343f, 0.787284f, 0.787224f, 0.787165f, 0.787106f, 0.787047f, 0.786988f,
+ 0.786929f, 0.786870f, 0.786810f, 0.786751f, 0.786692f, 0.786633f, 0.786574f, 0.786514f,
+ 0.786455f, 0.786396f, 0.786337f, 0.786278f, 0.786218f, 0.786159f, 0.786100f, 0.786041f,
+ 0.785981f, 0.785922f, 0.785863f, 0.785803f, 0.785744f, 0.785685f, 0.785625f, 0.785566f,
+ 0.785507f, 0.785447f, 0.785388f, 0.785329f, 0.785269f, 0.785210f, 0.785151f, 0.785091f,
+ 0.785032f, 0.784973f, 0.784913f, 0.784854f, 0.784794f, 0.784735f, 0.784675f, 0.784616f,
+ 0.784557f, 0.784497f, 0.784438f, 0.784378f, 0.784319f, 0.784259f, 0.784200f, 0.784140f,
+ 0.784081f, 0.784021f, 0.783962f, 0.783902f, 0.783843f, 0.783783f, 0.783724f, 0.783664f,
+ 0.783605f, 0.783545f, 0.783485f, 0.783426f, 0.783366f, 0.783307f, 0.783247f, 0.783187f,
+ 0.783128f, 0.783068f, 0.783009f, 0.782949f, 0.782889f, 0.782830f, 0.782770f, 0.782710f,
+ 0.782651f, 0.782591f, 0.782531f, 0.782472f, 0.782412f, 0.782352f, 0.782292f, 0.782233f,
+ 0.782173f, 0.782113f, 0.782053f, 0.781994f, 0.781934f, 0.781874f, 0.781814f, 0.781755f,
+ 0.781695f, 0.781635f, 0.781575f, 0.781515f, 0.781456f, 0.781396f, 0.781336f, 0.781276f,
+ 0.781216f, 0.781156f, 0.781097f, 0.781037f, 0.780977f, 0.780917f, 0.780857f, 0.780797f,
+ 0.780737f, 0.780677f, 0.780617f, 0.780557f, 0.780498f, 0.780438f, 0.780378f, 0.780318f,
+ 0.780258f, 0.780198f, 0.780138f, 0.780078f, 0.780018f, 0.779958f, 0.779898f, 0.779838f,
+ 0.779778f, 0.779718f, 0.779658f, 0.779598f, 0.779538f, 0.779478f, 0.779418f, 0.779357f,
+ 0.779297f, 0.779237f, 0.779177f, 0.779117f, 0.779057f, 0.778997f, 0.778937f, 0.778877f,
+ 0.778817f, 0.778756f, 0.778696f, 0.778636f, 0.778576f, 0.778516f, 0.778456f, 0.778395f,
+ 0.778335f, 0.778275f, 0.778215f, 0.778155f, 0.778094f, 0.778034f, 0.777974f, 0.777914f,
+ 0.777853f, 0.777793f, 0.777733f, 0.777673f, 0.777612f, 0.777552f, 0.777492f, 0.777431f,
+ 0.777371f, 0.777311f, 0.777251f, 0.777190f, 0.777130f, 0.777070f, 0.777009f, 0.776949f,
+ 0.776888f, 0.776828f, 0.776768f, 0.776707f, 0.776647f, 0.776587f, 0.776526f, 0.776466f,
+ 0.776405f, 0.776345f, 0.776284f, 0.776224f, 0.776164f, 0.776103f, 0.776043f, 0.775982f,
+ 0.775922f, 0.775861f, 0.775801f, 0.775740f, 0.775680f, 0.775619f, 0.775559f, 0.775498f,
+ 0.775438f, 0.775377f, 0.775317f, 0.775256f, 0.775195f, 0.775135f, 0.775074f, 0.775014f,
+ 0.774953f, 0.774893f, 0.774832f, 0.774771f, 0.774711f, 0.774650f, 0.774589f, 0.774529f,
+ 0.774468f, 0.774407f, 0.774347f, 0.774286f, 0.774225f, 0.774165f, 0.774104f, 0.774043f,
+ 0.773983f, 0.773922f, 0.773861f, 0.773801f, 0.773740f, 0.773679f, 0.773618f, 0.773558f,
+ 0.773497f, 0.773436f, 0.773375f, 0.773314f, 0.773254f, 0.773193f, 0.773132f, 0.773071f,
+ 0.773010f, 0.772950f, 0.772889f, 0.772828f, 0.772767f, 0.772706f, 0.772645f, 0.772584f,
+ 0.772524f, 0.772463f, 0.772402f, 0.772341f, 0.772280f, 0.772219f, 0.772158f, 0.772097f,
+ 0.772036f, 0.771975f, 0.771915f, 0.771854f, 0.771793f, 0.771732f, 0.771671f, 0.771610f,
+ 0.771549f, 0.771488f, 0.771427f, 0.771366f, 0.771305f, 0.771244f, 0.771183f, 0.771122f,
+ 0.771061f, 0.770999f, 0.770938f, 0.770877f, 0.770816f, 0.770755f, 0.770694f, 0.770633f,
+ 0.770572f, 0.770511f, 0.770450f, 0.770389f, 0.770327f, 0.770266f, 0.770205f, 0.770144f,
+ 0.770083f, 0.770022f, 0.769961f, 0.769899f, 0.769838f, 0.769777f, 0.769716f, 0.769655f,
+ 0.769593f, 0.769532f, 0.769471f, 0.769410f, 0.769348f, 0.769287f, 0.769226f, 0.769165f,
+ 0.769103f, 0.769042f, 0.768981f, 0.768919f, 0.768858f, 0.768797f, 0.768736f, 0.768674f,
+ 0.768613f, 0.768552f, 0.768490f, 0.768429f, 0.768368f, 0.768306f, 0.768245f, 0.768183f,
+ 0.768122f, 0.768061f, 0.767999f, 0.767938f, 0.767876f, 0.767815f, 0.767754f, 0.767692f,
+ 0.767631f, 0.767569f, 0.767508f, 0.767446f, 0.767385f, 0.767323f, 0.767262f, 0.767200f,
+ 0.767139f, 0.767077f, 0.767016f, 0.766954f, 0.766893f, 0.766831f, 0.766770f, 0.766708f,
+ 0.766647f, 0.766585f, 0.766524f, 0.766462f, 0.766400f, 0.766339f, 0.766277f, 0.766216f,
+ 0.766154f, 0.766092f, 0.766031f, 0.765969f, 0.765907f, 0.765846f, 0.765784f, 0.765723f,
+ 0.765661f, 0.765599f, 0.765538f, 0.765476f, 0.765414f, 0.765352f, 0.765291f, 0.765229f,
+ 0.765167f, 0.765106f, 0.765044f, 0.764982f, 0.764920f, 0.764859f, 0.764797f, 0.764735f,
+ 0.764673f, 0.764611f, 0.764550f, 0.764488f, 0.764426f, 0.764364f, 0.764302f, 0.764241f,
+ 0.764179f, 0.764117f, 0.764055f, 0.763993f, 0.763931f, 0.763869f, 0.763808f, 0.763746f,
+ 0.763684f, 0.763622f, 0.763560f, 0.763498f, 0.763436f, 0.763374f, 0.763312f, 0.763250f,
+ 0.763188f, 0.763126f, 0.763065f, 0.763003f, 0.762941f, 0.762879f, 0.762817f, 0.762755f,
+ 0.762693f, 0.762631f, 0.762569f, 0.762507f, 0.762444f, 0.762382f, 0.762320f, 0.762258f,
+ 0.762196f, 0.762134f, 0.762072f, 0.762010f, 0.761948f, 0.761886f, 0.761824f, 0.761762f,
+ 0.761700f, 0.761637f, 0.761575f, 0.761513f, 0.761451f, 0.761389f, 0.761327f, 0.761265f,
+ 0.761202f, 0.761140f, 0.761078f, 0.761016f, 0.760954f, 0.760891f, 0.760829f, 0.760767f,
+ 0.760705f, 0.760643f, 0.760580f, 0.760518f, 0.760456f, 0.760394f, 0.760331f, 0.760269f,
+ 0.760207f, 0.760144f, 0.760082f, 0.760020f, 0.759957f, 0.759895f, 0.759833f, 0.759771f,
+ 0.759708f, 0.759646f, 0.759583f, 0.759521f, 0.759459f, 0.759396f, 0.759334f, 0.759272f,
+ 0.759209f, 0.759147f, 0.759084f, 0.759022f, 0.758960f, 0.758897f, 0.758835f, 0.758772f,
+ 0.758710f, 0.758647f, 0.758585f, 0.758522f, 0.758460f, 0.758397f, 0.758335f, 0.758272f,
+ 0.758210f, 0.758147f, 0.758085f, 0.758022f, 0.757960f, 0.757897f, 0.757835f, 0.757772f,
+ 0.757710f, 0.757647f, 0.757584f, 0.757522f, 0.757459f, 0.757397f, 0.757334f, 0.757271f,
+ 0.757209f, 0.757146f, 0.757084f, 0.757021f, 0.756958f, 0.756896f, 0.756833f, 0.756770f,
+ 0.756708f, 0.756645f, 0.756582f, 0.756520f, 0.756457f, 0.756394f, 0.756331f, 0.756269f,
+ 0.756206f, 0.756143f, 0.756081f, 0.756018f, 0.755955f, 0.755892f, 0.755829f, 0.755767f,
+ 0.755704f, 0.755641f, 0.755578f, 0.755516f, 0.755453f, 0.755390f, 0.755327f, 0.755264f,
+ 0.755201f, 0.755139f, 0.755076f, 0.755013f, 0.754950f, 0.754887f, 0.754824f, 0.754761f,
+ 0.754698f, 0.754636f, 0.754573f, 0.754510f, 0.754447f, 0.754384f, 0.754321f, 0.754258f,
+ 0.754195f, 0.754132f, 0.754069f, 0.754006f, 0.753943f, 0.753880f, 0.753817f, 0.753754f,
+ 0.753691f, 0.753628f, 0.753565f, 0.753502f, 0.753439f, 0.753376f, 0.753313f, 0.753250f,
+ 0.753187f, 0.753124f, 0.753061f, 0.752998f, 0.752934f, 0.752871f, 0.752808f, 0.752745f,
+ 0.752682f, 0.752619f, 0.752556f, 0.752493f, 0.752429f, 0.752366f, 0.752303f, 0.752240f,
+ 0.752177f, 0.752114f, 0.752050f, 0.751987f, 0.751924f, 0.751861f, 0.751798f, 0.751734f,
+ 0.751671f, 0.751608f, 0.751545f, 0.751481f, 0.751418f, 0.751355f, 0.751292f, 0.751228f,
+ 0.751165f, 0.751102f, 0.751039f, 0.750975f, 0.750912f, 0.750849f, 0.750785f, 0.750722f,
+ 0.750659f, 0.750595f, 0.750532f, 0.750469f, 0.750405f, 0.750342f, 0.750278f, 0.750215f,
+ 0.750152f, 0.750088f, 0.750025f, 0.749961f, 0.749898f, 0.749835f, 0.749771f, 0.749708f,
+ 0.749644f, 0.749581f, 0.749517f, 0.749454f, 0.749390f, 0.749327f, 0.749263f, 0.749200f,
+ 0.749136f, 0.749073f, 0.749009f, 0.748946f, 0.748882f, 0.748819f, 0.748755f, 0.748692f,
+ 0.748628f, 0.748565f, 0.748501f, 0.748437f, 0.748374f, 0.748310f, 0.748247f, 0.748183f,
+ 0.748119f, 0.748056f, 0.747992f, 0.747929f, 0.747865f, 0.747801f, 0.747738f, 0.747674f,
+ 0.747610f, 0.747547f, 0.747483f, 0.747419f, 0.747355f, 0.747292f, 0.747228f, 0.747164f,
+ 0.747101f, 0.747037f, 0.746973f, 0.746909f, 0.746846f, 0.746782f, 0.746718f, 0.746654f,
+ 0.746591f, 0.746527f, 0.746463f, 0.746399f, 0.746335f, 0.746272f, 0.746208f, 0.746144f,
+ 0.746080f, 0.746016f, 0.745952f, 0.745889f, 0.745825f, 0.745761f, 0.745697f, 0.745633f,
+ 0.745569f, 0.745505f, 0.745441f, 0.745377f, 0.745314f, 0.745250f, 0.745186f, 0.745122f,
+ 0.745058f, 0.744994f, 0.744930f, 0.744866f, 0.744802f, 0.744738f, 0.744674f, 0.744610f,
+ 0.744546f, 0.744482f, 0.744418f, 0.744354f, 0.744290f, 0.744226f, 0.744162f, 0.744098f,
+ 0.744034f, 0.743970f, 0.743906f, 0.743842f, 0.743777f, 0.743713f, 0.743649f, 0.743585f,
+ 0.743521f, 0.743457f, 0.743393f, 0.743329f, 0.743265f, 0.743200f, 0.743136f, 0.743072f,
+ 0.743008f, 0.742944f, 0.742880f, 0.742815f, 0.742751f, 0.742687f, 0.742623f, 0.742559f,
+ 0.742494f, 0.742430f, 0.742366f, 0.742302f, 0.742237f, 0.742173f, 0.742109f, 0.742045f,
+ 0.741980f, 0.741916f, 0.741852f, 0.741788f, 0.741723f, 0.741659f, 0.741595f, 0.741530f,
+ 0.741466f, 0.741402f, 0.741337f, 0.741273f, 0.741209f, 0.741144f, 0.741080f, 0.741015f,
+ 0.740951f, 0.740887f, 0.740822f, 0.740758f, 0.740694f, 0.740629f, 0.740565f, 0.740500f,
+ 0.740436f, 0.740371f, 0.740307f, 0.740242f, 0.740178f, 0.740114f, 0.740049f, 0.739985f,
+ 0.739920f, 0.739856f, 0.739791f, 0.739727f, 0.739662f, 0.739598f, 0.739533f, 0.739468f,
+ 0.739404f, 0.739339f, 0.739275f, 0.739210f, 0.739146f, 0.739081f, 0.739017f, 0.738952f,
+ 0.738887f, 0.738823f, 0.738758f, 0.738693f, 0.738629f, 0.738564f, 0.738500f, 0.738435f,
+ 0.738370f, 0.738306f, 0.738241f, 0.738176f, 0.738112f, 0.738047f, 0.737982f, 0.737918f,
+ 0.737853f, 0.737788f, 0.737723f, 0.737659f, 0.737594f, 0.737529f, 0.737464f, 0.737400f,
+ 0.737335f, 0.737270f, 0.737205f, 0.737141f, 0.737076f, 0.737011f, 0.736946f, 0.736881f,
+ 0.736817f, 0.736752f, 0.736687f, 0.736622f, 0.736557f, 0.736492f, 0.736428f, 0.736363f,
+ 0.736298f, 0.736233f, 0.736168f, 0.736103f, 0.736038f, 0.735973f, 0.735908f, 0.735844f,
+ 0.735779f, 0.735714f, 0.735649f, 0.735584f, 0.735519f, 0.735454f, 0.735389f, 0.735324f,
+ 0.735259f, 0.735194f, 0.735129f, 0.735064f, 0.734999f, 0.734934f, 0.734869f, 0.734804f,
+ 0.734739f, 0.734674f, 0.734609f, 0.734544f, 0.734479f, 0.734414f, 0.734349f, 0.734283f,
+ 0.734218f, 0.734153f, 0.734088f, 0.734023f, 0.733958f, 0.733893f, 0.733828f, 0.733763f,
+ 0.733697f, 0.733632f, 0.733567f, 0.733502f, 0.733437f, 0.733372f, 0.733306f, 0.733241f,
+ 0.733176f, 0.733111f, 0.733046f, 0.732980f, 0.732915f, 0.732850f, 0.732785f, 0.732720f,
+ 0.732654f, 0.732589f, 0.732524f, 0.732458f, 0.732393f, 0.732328f, 0.732263f, 0.732197f,
+ 0.732132f, 0.732067f, 0.732001f, 0.731936f, 0.731871f, 0.731805f, 0.731740f, 0.731675f,
+ 0.731609f, 0.731544f, 0.731479f, 0.731413f, 0.731348f, 0.731282f, 0.731217f, 0.731152f,
+ 0.731086f, 0.731021f, 0.730955f, 0.730890f, 0.730825f, 0.730759f, 0.730694f, 0.730628f,
+ 0.730563f, 0.730497f, 0.730432f, 0.730366f, 0.730301f, 0.730235f, 0.730170f, 0.730104f,
+ 0.730039f, 0.729973f, 0.729908f, 0.729842f, 0.729777f, 0.729711f, 0.729646f, 0.729580f,
+ 0.729514f, 0.729449f, 0.729383f, 0.729318f, 0.729252f, 0.729186f, 0.729121f, 0.729055f,
+ 0.728990f, 0.728924f, 0.728858f, 0.728793f, 0.728727f, 0.728661f, 0.728596f, 0.728530f,
+ 0.728464f, 0.728399f, 0.728333f, 0.728267f, 0.728202f, 0.728136f, 0.728070f, 0.728004f,
+ 0.727939f, 0.727873f, 0.727807f, 0.727741f, 0.727676f, 0.727610f, 0.727544f, 0.727478f,
+ 0.727413f, 0.727347f, 0.727281f, 0.727215f, 0.727149f, 0.727084f, 0.727018f, 0.726952f,
+ 0.726886f, 0.726820f, 0.726754f, 0.726689f, 0.726623f, 0.726557f, 0.726491f, 0.726425f,
+ 0.726359f, 0.726293f, 0.726227f, 0.726161f, 0.726095f, 0.726030f, 0.725964f, 0.725898f,
+ 0.725832f, 0.725766f, 0.725700f, 0.725634f, 0.725568f, 0.725502f, 0.725436f, 0.725370f,
+ 0.725304f, 0.725238f, 0.725172f, 0.725106f, 0.725040f, 0.724974f, 0.724908f, 0.724842f,
+ 0.724776f, 0.724710f, 0.724644f, 0.724578f, 0.724511f, 0.724445f, 0.724379f, 0.724313f,
+ 0.724247f, 0.724181f, 0.724115f, 0.724049f, 0.723983f, 0.723916f, 0.723850f, 0.723784f,
+ 0.723718f, 0.723652f, 0.723586f, 0.723520f, 0.723453f, 0.723387f, 0.723321f, 0.723255f,
+ 0.723188f, 0.723122f, 0.723056f, 0.722990f, 0.722924f, 0.722857f, 0.722791f, 0.722725f,
+ 0.722659f, 0.722592f, 0.722526f, 0.722460f, 0.722393f, 0.722327f, 0.722261f, 0.722194f,
+ 0.722128f, 0.722062f, 0.721996f, 0.721929f, 0.721863f, 0.721797f, 0.721730f, 0.721664f,
+ 0.721597f, 0.721531f, 0.721465f, 0.721398f, 0.721332f, 0.721265f, 0.721199f, 0.721133f,
+ 0.721066f, 0.721000f, 0.720933f, 0.720867f, 0.720800f, 0.720734f, 0.720668f, 0.720601f,
+ 0.720535f, 0.720468f, 0.720402f, 0.720335f, 0.720269f, 0.720202f, 0.720136f, 0.720069f,
+ 0.720003f, 0.719936f, 0.719869f, 0.719803f, 0.719736f, 0.719670f, 0.719603f, 0.719537f,
+ 0.719470f, 0.719403f, 0.719337f, 0.719270f, 0.719204f, 0.719137f, 0.719070f, 0.719004f,
+ 0.718937f, 0.718870f, 0.718804f, 0.718737f, 0.718670f, 0.718604f, 0.718537f, 0.718471f,
+ 0.718404f, 0.718337f, 0.718270f, 0.718204f, 0.718137f, 0.718070f, 0.718004f, 0.717937f,
+ 0.717870f, 0.717803f, 0.717737f, 0.717670f, 0.717603f, 0.717536f, 0.717469f, 0.717403f,
+ 0.717336f, 0.717269f, 0.717202f, 0.717135f, 0.717069f, 0.717002f, 0.716935f, 0.716868f,
+ 0.716801f, 0.716734f, 0.716668f, 0.716601f, 0.716534f, 0.716467f, 0.716400f, 0.716333f,
+ 0.716266f, 0.716199f, 0.716132f, 0.716066f, 0.715999f, 0.715932f, 0.715865f, 0.715798f,
+ 0.715731f, 0.715664f, 0.715597f, 0.715530f, 0.715463f, 0.715396f, 0.715329f, 0.715262f,
+ 0.715195f, 0.715128f, 0.715061f, 0.714994f, 0.714927f, 0.714860f, 0.714793f, 0.714726f,
+ 0.714659f, 0.714592f, 0.714525f, 0.714457f, 0.714390f, 0.714323f, 0.714256f, 0.714189f,
+ 0.714122f, 0.714055f, 0.713988f, 0.713921f, 0.713853f, 0.713786f, 0.713719f, 0.713652f,
+ 0.713585f, 0.713518f, 0.713451f, 0.713383f, 0.713316f, 0.713249f, 0.713182f, 0.713115f,
+ 0.713047f, 0.712980f, 0.712913f, 0.712846f, 0.712778f, 0.712711f, 0.712644f, 0.712577f,
+ 0.712509f, 0.712442f, 0.712375f, 0.712308f, 0.712240f, 0.712173f, 0.712106f, 0.712038f,
+ 0.711971f, 0.711904f, 0.711836f, 0.711769f, 0.711702f, 0.711634f, 0.711567f, 0.711500f,
+ 0.711432f, 0.711365f, 0.711297f, 0.711230f, 0.711163f, 0.711095f, 0.711028f, 0.710960f,
+ 0.710893f, 0.710826f, 0.710758f, 0.710691f, 0.710623f, 0.710556f, 0.710488f, 0.710421f,
+ 0.710353f, 0.710286f, 0.710218f, 0.710151f, 0.710083f, 0.710016f, 0.709948f, 0.709881f,
+ 0.709813f, 0.709746f, 0.709678f, 0.709611f, 0.709543f, 0.709476f, 0.709408f, 0.709340f,
+ 0.709273f, 0.709205f, 0.709138f, 0.709070f, 0.709002f, 0.708935f, 0.708867f, 0.708800f,
+ 0.708732f, 0.708664f, 0.708597f, 0.708529f, 0.708461f, 0.708394f, 0.708326f, 0.708258f,
+ 0.708191f, 0.708123f, 0.708055f, 0.707988f, 0.707920f, 0.707852f, 0.707784f, 0.707717f,
+ 0.707649f, 0.707581f, 0.707513f, 0.707446f, 0.707378f, 0.707310f, 0.707242f, 0.707175f,
+ 0.707107f, 0.707039f, 0.706971f, 0.706903f, 0.706836f, 0.706768f, 0.706700f, 0.706632f,
+ 0.706564f, 0.706496f, 0.706429f, 0.706361f, 0.706293f, 0.706225f, 0.706157f, 0.706089f,
+ 0.706021f, 0.705953f, 0.705885f, 0.705818f, 0.705750f, 0.705682f, 0.705614f, 0.705546f,
+ 0.705478f, 0.705410f, 0.705342f, 0.705274f, 0.705206f, 0.705138f, 0.705070f, 0.705002f,
+ 0.704934f, 0.704866f, 0.704798f, 0.704730f, 0.704662f, 0.704594f, 0.704526f, 0.704458f,
+ 0.704390f, 0.704322f, 0.704254f, 0.704186f, 0.704118f, 0.704050f, 0.703981f, 0.703913f,
+ 0.703845f, 0.703777f, 0.703709f, 0.703641f, 0.703573f, 0.703505f, 0.703436f, 0.703368f,
+ 0.703300f, 0.703232f, 0.703164f, 0.703096f, 0.703028f, 0.702959f, 0.702891f, 0.702823f,
+ 0.702755f, 0.702687f, 0.702618f, 0.702550f, 0.702482f, 0.702414f, 0.702345f, 0.702277f,
+ 0.702209f, 0.702141f, 0.702072f, 0.702004f, 0.701936f, 0.701868f, 0.701799f, 0.701731f,
+ 0.701663f, 0.701594f, 0.701526f, 0.701458f, 0.701389f, 0.701321f, 0.701253f, 0.701184f,
+ 0.701116f, 0.701048f, 0.700979f, 0.700911f, 0.700842f, 0.700774f, 0.700706f, 0.700637f,
+ 0.700569f, 0.700500f, 0.700432f, 0.700364f, 0.700295f, 0.700227f, 0.700158f, 0.700090f,
+ 0.700021f, 0.699953f, 0.699884f, 0.699816f, 0.699747f, 0.699679f, 0.699610f, 0.699542f,
+ 0.699473f, 0.699405f, 0.699336f, 0.699268f, 0.699199f, 0.699131f, 0.699062f, 0.698994f,
+ 0.698925f, 0.698856f, 0.698788f, 0.698719f, 0.698651f, 0.698582f, 0.698513f, 0.698445f,
+ 0.698376f, 0.698308f, 0.698239f, 0.698170f, 0.698102f, 0.698033f, 0.697964f, 0.697896f,
+ 0.697827f, 0.697758f, 0.697690f, 0.697621f, 0.697552f, 0.697484f, 0.697415f, 0.697346f,
+ 0.697277f, 0.697209f, 0.697140f, 0.697071f, 0.697003f, 0.696934f, 0.696865f, 0.696796f,
+ 0.696728f, 0.696659f, 0.696590f, 0.696521f, 0.696452f, 0.696384f, 0.696315f, 0.696246f,
+ 0.696177f, 0.696108f, 0.696039f, 0.695971f, 0.695902f, 0.695833f, 0.695764f, 0.695695f,
+ 0.695626f, 0.695557f, 0.695489f, 0.695420f, 0.695351f, 0.695282f, 0.695213f, 0.695144f,
+ 0.695075f, 0.695006f, 0.694937f, 0.694868f, 0.694799f, 0.694730f, 0.694661f, 0.694592f,
+ 0.694524f, 0.694454f, 0.694386f, 0.694317f, 0.694248f, 0.694179f, 0.694109f, 0.694040f,
+ 0.693971f, 0.693902f, 0.693833f, 0.693764f, 0.693695f, 0.693626f, 0.693557f, 0.693488f,
+ 0.693419f, 0.693350f, 0.693281f, 0.693212f, 0.693143f, 0.693074f, 0.693004f, 0.692935f,
+ 0.692866f, 0.692797f, 0.692728f, 0.692659f, 0.692590f, 0.692520f, 0.692451f, 0.692382f,
+ 0.692313f, 0.692244f, 0.692175f, 0.692105f, 0.692036f, 0.691967f, 0.691898f, 0.691828f,
+ 0.691759f, 0.691690f, 0.691621f, 0.691552f, 0.691482f, 0.691413f, 0.691344f, 0.691274f,
+ 0.691205f, 0.691136f, 0.691067f, 0.690997f, 0.690928f, 0.690859f, 0.690789f, 0.690720f,
+ 0.690651f, 0.690581f, 0.690512f, 0.690443f, 0.690373f, 0.690304f, 0.690235f, 0.690165f,
+ 0.690096f, 0.690026f, 0.689957f, 0.689888f, 0.689818f, 0.689749f, 0.689679f, 0.689610f,
+ 0.689541f, 0.689471f, 0.689402f, 0.689332f, 0.689263f, 0.689193f, 0.689124f, 0.689054f,
+ 0.688985f, 0.688915f, 0.688846f, 0.688776f, 0.688707f, 0.688637f, 0.688568f, 0.688498f,
+ 0.688429f, 0.688359f, 0.688290f, 0.688220f, 0.688151f, 0.688081f, 0.688011f, 0.687942f,
+ 0.687872f, 0.687803f, 0.687733f, 0.687663f, 0.687594f, 0.687524f, 0.687455f, 0.687385f,
+ 0.687315f, 0.687246f, 0.687176f, 0.687106f, 0.687037f, 0.686967f, 0.686897f, 0.686828f,
+ 0.686758f, 0.686688f, 0.686619f, 0.686549f, 0.686479f, 0.686409f, 0.686340f, 0.686270f,
+ 0.686200f, 0.686131f, 0.686061f, 0.685991f, 0.685921f, 0.685852f, 0.685782f, 0.685712f,
+ 0.685642f, 0.685572f, 0.685503f, 0.685433f, 0.685363f, 0.685293f, 0.685223f, 0.685153f,
+ 0.685084f, 0.685014f, 0.684944f, 0.684874f, 0.684804f, 0.684734f, 0.684664f, 0.684595f,
+ 0.684525f, 0.684455f, 0.684385f, 0.684315f, 0.684245f, 0.684175f, 0.684105f, 0.684035f,
+ 0.683965f, 0.683895f, 0.683825f, 0.683756f, 0.683686f, 0.683616f, 0.683546f, 0.683476f,
+ 0.683406f, 0.683336f, 0.683266f, 0.683196f, 0.683126f, 0.683056f, 0.682986f, 0.682916f,
+ 0.682846f, 0.682775f, 0.682705f, 0.682635f, 0.682565f, 0.682495f, 0.682425f, 0.682355f,
+ 0.682285f, 0.682215f, 0.682145f, 0.682075f, 0.682005f, 0.681934f, 0.681864f, 0.681794f,
+ 0.681724f, 0.681654f, 0.681584f, 0.681514f, 0.681443f, 0.681373f, 0.681303f, 0.681233f,
+ 0.681163f, 0.681093f, 0.681022f, 0.680952f, 0.680882f, 0.680812f, 0.680741f, 0.680671f,
+ 0.680601f, 0.680531f, 0.680461f, 0.680390f, 0.680320f, 0.680250f, 0.680179f, 0.680109f,
+ 0.680039f, 0.679969f, 0.679898f, 0.679828f, 0.679758f, 0.679687f, 0.679617f, 0.679547f,
+ 0.679476f, 0.679406f, 0.679336f, 0.679265f, 0.679195f, 0.679125f, 0.679054f, 0.678984f,
+ 0.678913f, 0.678843f, 0.678773f, 0.678702f, 0.678632f, 0.678561f, 0.678491f, 0.678420f,
+ 0.678350f, 0.678280f, 0.678209f, 0.678139f, 0.678068f, 0.677998f, 0.677927f, 0.677857f,
+ 0.677786f, 0.677716f, 0.677645f, 0.677575f, 0.677504f, 0.677434f, 0.677363f, 0.677293f,
+ 0.677222f, 0.677152f, 0.677081f, 0.677011f, 0.676940f, 0.676869f, 0.676799f, 0.676728f,
+ 0.676658f, 0.676587f, 0.676516f, 0.676446f, 0.676375f, 0.676305f, 0.676234f, 0.676163f,
+ 0.676093f, 0.676022f, 0.675951f, 0.675881f, 0.675810f, 0.675739f, 0.675669f, 0.675598f,
+ 0.675527f, 0.675457f, 0.675386f, 0.675315f, 0.675245f, 0.675174f, 0.675103f, 0.675032f,
+ 0.674962f, 0.674891f, 0.674820f, 0.674749f, 0.674679f, 0.674608f, 0.674537f, 0.674466f,
+ 0.674396f, 0.674325f, 0.674254f, 0.674183f, 0.674112f, 0.674042f, 0.673971f, 0.673900f,
+ 0.673829f, 0.673758f, 0.673687f, 0.673616f, 0.673546f, 0.673475f, 0.673404f, 0.673333f,
+ 0.673262f, 0.673191f, 0.673120f, 0.673049f, 0.672978f, 0.672908f, 0.672837f, 0.672766f,
+ 0.672695f, 0.672624f, 0.672553f, 0.672482f, 0.672411f, 0.672340f, 0.672269f, 0.672198f,
+ 0.672127f, 0.672056f, 0.671985f, 0.671914f, 0.671843f, 0.671772f, 0.671701f, 0.671630f,
+ 0.671559f, 0.671488f, 0.671417f, 0.671346f, 0.671275f, 0.671204f, 0.671133f, 0.671062f,
+ 0.670990f, 0.670919f, 0.670848f, 0.670777f, 0.670706f, 0.670635f, 0.670564f, 0.670493f,
+ 0.670422f, 0.670350f, 0.670279f, 0.670208f, 0.670137f, 0.670066f, 0.669995f, 0.669923f,
+ 0.669852f, 0.669781f, 0.669710f, 0.669639f, 0.669567f, 0.669496f, 0.669425f, 0.669354f,
+ 0.669283f, 0.669211f, 0.669140f, 0.669069f, 0.668998f, 0.668926f, 0.668855f, 0.668784f,
+ 0.668712f, 0.668641f, 0.668570f, 0.668499f, 0.668427f, 0.668356f, 0.668285f, 0.668213f,
+ 0.668142f, 0.668071f, 0.667999f, 0.667928f, 0.667857f, 0.667785f, 0.667714f, 0.667643f,
+ 0.667571f, 0.667500f, 0.667428f, 0.667357f, 0.667286f, 0.667214f, 0.667143f, 0.667071f,
+ 0.667000f, 0.666928f, 0.666857f, 0.666786f, 0.666714f, 0.666643f, 0.666571f, 0.666500f,
+ 0.666428f, 0.666357f, 0.666285f, 0.666214f, 0.666142f, 0.666071f, 0.665999f, 0.665928f,
+ 0.665856f, 0.665785f, 0.665713f, 0.665642f, 0.665570f, 0.665498f, 0.665427f, 0.665355f,
+ 0.665284f, 0.665212f, 0.665141f, 0.665069f, 0.664997f, 0.664926f, 0.664854f, 0.664783f,
+ 0.664711f, 0.664639f, 0.664568f, 0.664496f, 0.664424f, 0.664353f, 0.664281f, 0.664209f,
+ 0.664138f, 0.664066f, 0.663994f, 0.663923f, 0.663851f, 0.663779f, 0.663708f, 0.663636f,
+ 0.663564f, 0.663492f, 0.663421f, 0.663349f, 0.663277f, 0.663205f, 0.663134f, 0.663062f,
+ 0.662990f, 0.662918f, 0.662847f, 0.662775f, 0.662703f, 0.662631f, 0.662559f, 0.662488f,
+ 0.662416f, 0.662344f, 0.662272f, 0.662200f, 0.662128f, 0.662057f, 0.661985f, 0.661913f,
+ 0.661841f, 0.661769f, 0.661697f, 0.661625f, 0.661553f, 0.661482f, 0.661410f, 0.661338f,
+ 0.661266f, 0.661194f, 0.661122f, 0.661050f, 0.660978f, 0.660906f, 0.660834f, 0.660762f,
+ 0.660690f, 0.660618f, 0.660546f, 0.660474f, 0.660402f, 0.660330f, 0.660258f, 0.660186f,
+ 0.660114f, 0.660042f, 0.659970f, 0.659898f, 0.659826f, 0.659754f, 0.659682f, 0.659610f,
+ 0.659538f, 0.659466f, 0.659394f, 0.659322f, 0.659250f, 0.659178f, 0.659105f, 0.659033f,
+ 0.658961f, 0.658889f, 0.658817f, 0.658745f, 0.658673f, 0.658601f, 0.658529f, 0.658456f,
+ 0.658384f, 0.658312f, 0.658240f, 0.658168f, 0.658095f, 0.658023f, 0.657951f, 0.657879f,
+ 0.657807f, 0.657734f, 0.657662f, 0.657590f, 0.657518f, 0.657446f, 0.657373f, 0.657301f,
+ 0.657229f, 0.657157f, 0.657084f, 0.657012f, 0.656940f, 0.656867f, 0.656795f, 0.656723f,
+ 0.656651f, 0.656578f, 0.656506f, 0.656434f, 0.656361f, 0.656289f, 0.656217f, 0.656144f,
+ 0.656072f, 0.656000f, 0.655927f, 0.655855f, 0.655782f, 0.655710f, 0.655638f, 0.655565f,
+ 0.655493f, 0.655420f, 0.655348f, 0.655276f, 0.655203f, 0.655131f, 0.655058f, 0.654986f,
+ 0.654913f, 0.654841f, 0.654769f, 0.654696f, 0.654624f, 0.654551f, 0.654479f, 0.654406f,
+ 0.654334f, 0.654261f, 0.654189f, 0.654116f, 0.654044f, 0.653971f, 0.653899f, 0.653826f,
+ 0.653753f, 0.653681f, 0.653608f, 0.653536f, 0.653463f, 0.653391f, 0.653318f, 0.653245f,
+ 0.653173f, 0.653100f, 0.653028f, 0.652955f, 0.652882f, 0.652810f, 0.652737f, 0.652665f,
+ 0.652592f, 0.652519f, 0.652447f, 0.652374f, 0.652301f, 0.652229f, 0.652156f, 0.652083f,
+ 0.652011f, 0.651938f, 0.651865f, 0.651792f, 0.651720f, 0.651647f, 0.651574f, 0.651502f,
+ 0.651429f, 0.651356f, 0.651283f, 0.651211f, 0.651138f, 0.651065f, 0.650992f, 0.650919f,
+ 0.650847f, 0.650774f, 0.650701f, 0.650628f, 0.650555f, 0.650483f, 0.650410f, 0.650337f,
+ 0.650264f, 0.650191f, 0.650119f, 0.650046f, 0.649973f, 0.649900f, 0.649827f, 0.649754f,
+ 0.649681f, 0.649608f, 0.649536f, 0.649463f, 0.649390f, 0.649317f, 0.649244f, 0.649171f,
+ 0.649098f, 0.649025f, 0.648952f, 0.648879f, 0.648806f, 0.648733f, 0.648660f, 0.648587f,
+ 0.648514f, 0.648441f, 0.648368f, 0.648295f, 0.648222f, 0.648149f, 0.648076f, 0.648003f,
+ 0.647930f, 0.647857f, 0.647784f, 0.647711f, 0.647638f, 0.647565f, 0.647492f, 0.647419f,
+ 0.647346f, 0.647273f, 0.647200f, 0.647127f, 0.647054f, 0.646981f, 0.646907f, 0.646834f,
+ 0.646761f, 0.646688f, 0.646615f, 0.646542f, 0.646469f, 0.646396f, 0.646322f, 0.646249f,
+ 0.646176f, 0.646103f, 0.646030f, 0.645956f, 0.645883f, 0.645810f, 0.645737f, 0.645664f,
+ 0.645590f, 0.645517f, 0.645444f, 0.645371f, 0.645298f, 0.645224f, 0.645151f, 0.645078f,
+ 0.645005f, 0.644931f, 0.644858f, 0.644785f, 0.644711f, 0.644638f, 0.644565f, 0.644492f,
+ 0.644418f, 0.644345f, 0.644272f, 0.644198f, 0.644125f, 0.644052f, 0.643978f, 0.643905f,
+ 0.643832f, 0.643758f, 0.643685f, 0.643611f, 0.643538f, 0.643465f, 0.643391f, 0.643318f,
+ 0.643245f, 0.643171f, 0.643098f, 0.643024f, 0.642951f, 0.642877f, 0.642804f, 0.642730f,
+ 0.642657f, 0.642584f, 0.642510f, 0.642437f, 0.642363f, 0.642290f, 0.642216f, 0.642143f,
+ 0.642069f, 0.641996f, 0.641922f, 0.641849f, 0.641775f, 0.641702f, 0.641628f, 0.641555f,
+ 0.641481f, 0.641407f, 0.641334f, 0.641260f, 0.641187f, 0.641113f, 0.641040f, 0.640966f,
+ 0.640892f, 0.640819f, 0.640745f, 0.640672f, 0.640598f, 0.640524f, 0.640451f, 0.640377f,
+ 0.640303f, 0.640230f, 0.640156f, 0.640083f, 0.640009f, 0.639935f, 0.639862f, 0.639788f,
+ 0.639714f, 0.639640f, 0.639567f, 0.639493f, 0.639419f, 0.639346f, 0.639272f, 0.639198f,
+ 0.639124f, 0.639051f, 0.638977f, 0.638903f, 0.638829f, 0.638756f, 0.638682f, 0.638608f,
+ 0.638534f, 0.638461f, 0.638387f, 0.638313f, 0.638239f, 0.638165f, 0.638092f, 0.638018f,
+ 0.637944f, 0.637870f, 0.637796f, 0.637722f, 0.637649f, 0.637575f, 0.637501f, 0.637427f,
+ 0.637353f, 0.637279f, 0.637205f, 0.637131f, 0.637057f, 0.636984f, 0.636910f, 0.636836f,
+ 0.636762f, 0.636688f, 0.636614f, 0.636540f, 0.636466f, 0.636392f, 0.636318f, 0.636244f,
+ 0.636170f, 0.636096f, 0.636022f, 0.635948f, 0.635874f, 0.635800f, 0.635726f, 0.635652f,
+ 0.635578f, 0.635504f, 0.635430f, 0.635356f, 0.635282f, 0.635208f, 0.635134f, 0.635060f,
+ 0.634986f, 0.634912f, 0.634838f, 0.634764f, 0.634690f, 0.634616f, 0.634542f, 0.634467f,
+ 0.634393f, 0.634319f, 0.634245f, 0.634171f, 0.634097f, 0.634023f, 0.633949f, 0.633874f,
+ 0.633800f, 0.633726f, 0.633652f, 0.633578f, 0.633504f, 0.633429f, 0.633355f, 0.633281f,
+ 0.633207f, 0.633133f, 0.633058f, 0.632984f, 0.632910f, 0.632836f, 0.632761f, 0.632687f,
+ 0.632613f, 0.632539f, 0.632464f, 0.632390f, 0.632316f, 0.632242f, 0.632167f, 0.632093f,
+ 0.632019f, 0.631944f, 0.631870f, 0.631796f, 0.631721f, 0.631647f, 0.631573f, 0.631499f,
+ 0.631424f, 0.631350f, 0.631275f, 0.631201f, 0.631127f, 0.631052f, 0.630978f, 0.630904f,
+ 0.630829f, 0.630755f, 0.630680f, 0.630606f, 0.630532f, 0.630457f, 0.630383f, 0.630308f,
+ 0.630234f, 0.630159f, 0.630085f, 0.630011f, 0.629936f, 0.629862f, 0.629787f, 0.629713f,
+ 0.629638f, 0.629564f, 0.629489f, 0.629415f, 0.629340f, 0.629266f, 0.629191f, 0.629117f,
+ 0.629042f, 0.628968f, 0.628893f, 0.628819f, 0.628744f, 0.628669f, 0.628595f, 0.628520f,
+ 0.628446f, 0.628371f, 0.628297f, 0.628222f, 0.628147f, 0.628073f, 0.627998f, 0.627924f,
+ 0.627849f, 0.627774f, 0.627700f, 0.627625f, 0.627550f, 0.627476f, 0.627401f, 0.627326f,
+ 0.627252f, 0.627177f, 0.627102f, 0.627028f, 0.626953f, 0.626878f, 0.626804f, 0.626729f,
+ 0.626654f, 0.626580f, 0.626505f, 0.626430f, 0.626355f, 0.626281f, 0.626206f, 0.626131f,
+ 0.626056f, 0.625982f, 0.625907f, 0.625832f, 0.625757f, 0.625683f, 0.625608f, 0.625533f,
+ 0.625458f, 0.625383f, 0.625309f, 0.625234f, 0.625159f, 0.625084f, 0.625009f, 0.624934f,
+ 0.624860f, 0.624785f, 0.624710f, 0.624635f, 0.624560f, 0.624485f, 0.624410f, 0.624335f,
+ 0.624260f, 0.624186f, 0.624111f, 0.624036f, 0.623961f, 0.623886f, 0.623811f, 0.623736f,
+ 0.623661f, 0.623586f, 0.623511f, 0.623436f, 0.623361f, 0.623286f, 0.623211f, 0.623136f,
+ 0.623061f, 0.622986f, 0.622911f, 0.622836f, 0.622761f, 0.622686f, 0.622611f, 0.622536f,
+ 0.622461f, 0.622386f, 0.622311f, 0.622236f, 0.622161f, 0.622086f, 0.622011f, 0.621936f,
+ 0.621861f, 0.621786f, 0.621711f, 0.621636f, 0.621560f, 0.621485f, 0.621410f, 0.621335f,
+ 0.621260f, 0.621185f, 0.621110f, 0.621035f, 0.620959f, 0.620884f, 0.620809f, 0.620734f,
+ 0.620659f, 0.620584f, 0.620508f, 0.620433f, 0.620358f, 0.620283f, 0.620208f, 0.620132f,
+ 0.620057f, 0.619982f, 0.619907f, 0.619832f, 0.619756f, 0.619681f, 0.619606f, 0.619531f,
+ 0.619455f, 0.619380f, 0.619305f, 0.619229f, 0.619154f, 0.619079f, 0.619004f, 0.618928f,
+ 0.618853f, 0.618778f, 0.618702f, 0.618627f, 0.618552f, 0.618476f, 0.618401f, 0.618326f,
+ 0.618250f, 0.618175f, 0.618100f, 0.618024f, 0.617949f, 0.617873f, 0.617798f, 0.617723f,
+ 0.617647f, 0.617572f, 0.617496f, 0.617421f, 0.617346f, 0.617270f, 0.617195f, 0.617119f,
+ 0.617044f, 0.616968f, 0.616893f, 0.616818f, 0.616742f, 0.616667f, 0.616591f, 0.616516f,
+ 0.616440f, 0.616365f, 0.616289f, 0.616214f, 0.616138f, 0.616063f, 0.615987f, 0.615912f,
+ 0.615836f, 0.615761f, 0.615685f, 0.615609f, 0.615534f, 0.615458f, 0.615383f, 0.615307f,
+ 0.615232f, 0.615156f, 0.615080f, 0.615005f, 0.614929f, 0.614854f, 0.614778f, 0.614702f,
+ 0.614627f, 0.614551f, 0.614475f, 0.614400f, 0.614324f, 0.614249f, 0.614173f, 0.614097f,
+ 0.614022f, 0.613946f, 0.613870f, 0.613795f, 0.613719f, 0.613643f, 0.613567f, 0.613492f,
+ 0.613416f, 0.613340f, 0.613265f, 0.613189f, 0.613113f, 0.613037f, 0.612962f, 0.612886f,
+ 0.612810f, 0.612734f, 0.612659f, 0.612583f, 0.612507f, 0.612431f, 0.612355f, 0.612280f,
+ 0.612204f, 0.612128f, 0.612052f, 0.611976f, 0.611901f, 0.611825f, 0.611749f, 0.611673f,
+ 0.611597f, 0.611521f, 0.611445f, 0.611370f, 0.611294f, 0.611218f, 0.611142f, 0.611066f,
+ 0.610990f, 0.610914f, 0.610838f, 0.610762f, 0.610687f, 0.610611f, 0.610535f, 0.610459f,
+ 0.610383f, 0.610307f, 0.610231f, 0.610155f, 0.610079f, 0.610003f, 0.609927f, 0.609851f,
+ 0.609775f, 0.609699f, 0.609623f, 0.609547f, 0.609471f, 0.609395f, 0.609319f, 0.609243f,
+ 0.609167f, 0.609091f, 0.609015f, 0.608939f, 0.608863f, 0.608787f, 0.608711f, 0.608635f,
+ 0.608559f, 0.608482f, 0.608406f, 0.608330f, 0.608254f, 0.608178f, 0.608102f, 0.608026f,
+ 0.607950f, 0.607874f, 0.607798f, 0.607721f, 0.607645f, 0.607569f, 0.607493f, 0.607417f,
+ 0.607341f, 0.607264f, 0.607188f, 0.607112f, 0.607036f, 0.606960f, 0.606884f, 0.606807f,
+ 0.606731f, 0.606655f, 0.606579f, 0.606502f, 0.606426f, 0.606350f, 0.606274f, 0.606198f,
+ 0.606121f, 0.606045f, 0.605969f, 0.605892f, 0.605816f, 0.605740f, 0.605664f, 0.605587f,
+ 0.605511f, 0.605435f, 0.605358f, 0.605282f, 0.605206f, 0.605129f, 0.605053f, 0.604977f,
+ 0.604900f, 0.604824f, 0.604748f, 0.604671f, 0.604595f, 0.604519f, 0.604442f, 0.604366f,
+ 0.604290f, 0.604213f, 0.604137f, 0.604060f, 0.603984f, 0.603908f, 0.603831f, 0.603755f,
+ 0.603678f, 0.603602f, 0.603525f, 0.603449f, 0.603372f, 0.603296f, 0.603220f, 0.603143f,
+ 0.603067f, 0.602990f, 0.602914f, 0.602837f, 0.602761f, 0.602684f, 0.602608f, 0.602531f,
+ 0.602455f, 0.602378f, 0.602302f, 0.602225f, 0.602148f, 0.602072f, 0.601995f, 0.601919f,
+ 0.601842f, 0.601766f, 0.601689f, 0.601613f, 0.601536f, 0.601459f, 0.601383f, 0.601306f,
+ 0.601230f, 0.601153f, 0.601076f, 0.601000f, 0.600923f, 0.600846f, 0.600770f, 0.600693f,
+ 0.600616f, 0.600540f, 0.600463f, 0.600387f, 0.600310f, 0.600233f, 0.600156f, 0.600080f,
+ 0.600003f, 0.599926f, 0.599850f, 0.599773f, 0.599696f, 0.599620f, 0.599543f, 0.599466f,
+ 0.599389f, 0.599313f, 0.599236f, 0.599159f, 0.599082f, 0.599006f, 0.598929f, 0.598852f,
+ 0.598775f, 0.598698f, 0.598622f, 0.598545f, 0.598468f, 0.598391f, 0.598314f, 0.598238f,
+ 0.598161f, 0.598084f, 0.598007f, 0.597930f, 0.597853f, 0.597776f, 0.597700f, 0.597623f,
+ 0.597546f, 0.597469f, 0.597392f, 0.597315f, 0.597238f, 0.597161f, 0.597085f, 0.597008f,
+ 0.596931f, 0.596854f, 0.596777f, 0.596700f, 0.596623f, 0.596546f, 0.596469f, 0.596392f,
+ 0.596315f, 0.596238f, 0.596161f, 0.596084f, 0.596007f, 0.595930f, 0.595853f, 0.595776f,
+ 0.595699f, 0.595622f, 0.595545f, 0.595468f, 0.595391f, 0.595314f, 0.595237f, 0.595160f,
+ 0.595083f, 0.595006f, 0.594929f, 0.594852f, 0.594775f, 0.594698f, 0.594621f, 0.594544f,
+ 0.594467f, 0.594389f, 0.594312f, 0.594235f, 0.594158f, 0.594081f, 0.594004f, 0.593927f,
+ 0.593850f, 0.593772f, 0.593695f, 0.593618f, 0.593541f, 0.593464f, 0.593387f, 0.593309f,
+ 0.593232f, 0.593155f, 0.593078f, 0.593001f, 0.592924f, 0.592846f, 0.592769f, 0.592692f,
+ 0.592615f, 0.592537f, 0.592460f, 0.592383f, 0.592306f, 0.592228f, 0.592151f, 0.592074f,
+ 0.591997f, 0.591919f, 0.591842f, 0.591765f, 0.591688f, 0.591610f, 0.591533f, 0.591456f,
+ 0.591378f, 0.591301f, 0.591224f, 0.591146f, 0.591069f, 0.590992f, 0.590914f, 0.590837f,
+ 0.590760f, 0.590682f, 0.590605f, 0.590528f, 0.590450f, 0.590373f, 0.590295f, 0.590218f,
+ 0.590141f, 0.590063f, 0.589986f, 0.589908f, 0.589831f, 0.589754f, 0.589676f, 0.589599f,
+ 0.589521f, 0.589444f, 0.589366f, 0.589289f, 0.589212f, 0.589134f, 0.589057f, 0.588979f,
+ 0.588902f, 0.588824f, 0.588747f, 0.588669f, 0.588592f, 0.588514f, 0.588437f, 0.588359f,
+ 0.588282f, 0.588204f, 0.588126f, 0.588049f, 0.587971f, 0.587894f, 0.587816f, 0.587739f,
+ 0.587661f, 0.587584f, 0.587506f, 0.587428f, 0.587351f, 0.587273f, 0.587196f, 0.587118f,
+ 0.587040f, 0.586963f, 0.586885f, 0.586808f, 0.586730f, 0.586652f, 0.586575f, 0.586497f,
+ 0.586419f, 0.586342f, 0.586264f, 0.586186f, 0.586109f, 0.586031f, 0.585953f, 0.585876f,
+ 0.585798f, 0.585720f, 0.585642f, 0.585565f, 0.585487f, 0.585409f, 0.585332f, 0.585254f,
+ 0.585176f, 0.585098f, 0.585021f, 0.584943f, 0.584865f, 0.584787f, 0.584710f, 0.584632f,
+ 0.584554f, 0.584476f, 0.584398f, 0.584321f, 0.584243f, 0.584165f, 0.584087f, 0.584009f,
+ 0.583931f, 0.583854f, 0.583776f, 0.583698f, 0.583620f, 0.583542f, 0.583464f, 0.583387f,
+ 0.583309f, 0.583231f, 0.583153f, 0.583075f, 0.582997f, 0.582919f, 0.582841f, 0.582763f,
+ 0.582685f, 0.582608f, 0.582530f, 0.582452f, 0.582374f, 0.582296f, 0.582218f, 0.582140f,
+ 0.582062f, 0.581984f, 0.581906f, 0.581828f, 0.581750f, 0.581672f, 0.581594f, 0.581516f,
+ 0.581438f, 0.581360f, 0.581282f, 0.581204f, 0.581126f, 0.581048f, 0.580970f, 0.580892f,
+ 0.580814f, 0.580736f, 0.580658f, 0.580580f, 0.580502f, 0.580424f, 0.580346f, 0.580267f,
+ 0.580189f, 0.580111f, 0.580033f, 0.579955f, 0.579877f, 0.579799f, 0.579721f, 0.579643f,
+ 0.579565f, 0.579486f, 0.579408f, 0.579330f, 0.579252f, 0.579174f, 0.579096f, 0.579018f,
+ 0.578939f, 0.578861f, 0.578783f, 0.578705f, 0.578627f, 0.578548f, 0.578470f, 0.578392f,
+ 0.578314f, 0.578236f, 0.578157f, 0.578079f, 0.578001f, 0.577923f, 0.577844f, 0.577766f,
+ 0.577688f, 0.577610f, 0.577531f, 0.577453f, 0.577375f, 0.577297f, 0.577218f, 0.577140f,
+ 0.577062f, 0.576983f, 0.576905f, 0.576827f, 0.576748f, 0.576670f, 0.576592f, 0.576513f,
+ 0.576435f, 0.576357f, 0.576278f, 0.576200f, 0.576122f, 0.576043f, 0.575965f, 0.575887f,
+ 0.575808f, 0.575730f, 0.575651f, 0.575573f, 0.575495f, 0.575416f, 0.575338f, 0.575259f,
+ 0.575181f, 0.575103f, 0.575024f, 0.574946f, 0.574867f, 0.574789f, 0.574710f, 0.574632f,
+ 0.574553f, 0.574475f, 0.574396f, 0.574318f, 0.574239f, 0.574161f, 0.574082f, 0.574004f,
+ 0.573925f, 0.573847f, 0.573768f, 0.573690f, 0.573611f, 0.573533f, 0.573454f, 0.573376f,
+ 0.573297f, 0.573219f, 0.573140f, 0.573061f, 0.572983f, 0.572904f, 0.572826f, 0.572747f,
+ 0.572669f, 0.572590f, 0.572511f, 0.572433f, 0.572354f, 0.572276f, 0.572197f, 0.572118f,
+ 0.572040f, 0.571961f, 0.571882f, 0.571804f, 0.571725f, 0.571646f, 0.571568f, 0.571489f,
+ 0.571410f, 0.571332f, 0.571253f, 0.571174f, 0.571096f, 0.571017f, 0.570938f, 0.570859f,
+ 0.570781f, 0.570702f, 0.570623f, 0.570545f, 0.570466f, 0.570387f, 0.570308f, 0.570230f,
+ 0.570151f, 0.570072f, 0.569993f, 0.569914f, 0.569836f, 0.569757f, 0.569678f, 0.569599f,
+ 0.569521f, 0.569442f, 0.569363f, 0.569284f, 0.569205f, 0.569126f, 0.569048f, 0.568969f,
+ 0.568890f, 0.568811f, 0.568732f, 0.568653f, 0.568574f, 0.568496f, 0.568417f, 0.568338f,
+ 0.568259f, 0.568180f, 0.568101f, 0.568022f, 0.567943f, 0.567864f, 0.567786f, 0.567707f,
+ 0.567628f, 0.567549f, 0.567470f, 0.567391f, 0.567312f, 0.567233f, 0.567154f, 0.567075f,
+ 0.566996f, 0.566917f, 0.566838f, 0.566759f, 0.566680f, 0.566601f, 0.566522f, 0.566443f,
+ 0.566364f, 0.566285f, 0.566206f, 0.566127f, 0.566048f, 0.565969f, 0.565890f, 0.565811f,
+ 0.565732f, 0.565653f, 0.565574f, 0.565495f, 0.565416f, 0.565336f, 0.565257f, 0.565178f,
+ 0.565099f, 0.565020f, 0.564941f, 0.564862f, 0.564783f, 0.564704f, 0.564624f, 0.564545f,
+ 0.564466f, 0.564387f, 0.564308f, 0.564229f, 0.564150f, 0.564070f, 0.563991f, 0.563912f,
+ 0.563833f, 0.563754f, 0.563675f, 0.563595f, 0.563516f, 0.563437f, 0.563358f, 0.563279f,
+ 0.563199f, 0.563120f, 0.563041f, 0.562962f, 0.562882f, 0.562803f, 0.562724f, 0.562645f,
+ 0.562565f, 0.562486f, 0.562407f, 0.562328f, 0.562248f, 0.562169f, 0.562090f, 0.562010f,
+ 0.561931f, 0.561852f, 0.561773f, 0.561693f, 0.561614f, 0.561535f, 0.561455f, 0.561376f,
+ 0.561297f, 0.561217f, 0.561138f, 0.561058f, 0.560979f, 0.560900f, 0.560820f, 0.560741f,
+ 0.560662f, 0.560582f, 0.560503f, 0.560423f, 0.560344f, 0.560265f, 0.560185f, 0.560106f,
+ 0.560026f, 0.559947f, 0.559867f, 0.559788f, 0.559709f, 0.559629f, 0.559550f, 0.559470f,
+ 0.559391f, 0.559311f, 0.559232f, 0.559152f, 0.559073f, 0.558993f, 0.558914f, 0.558834f,
+ 0.558755f, 0.558675f, 0.558596f, 0.558516f, 0.558437f, 0.558357f, 0.558278f, 0.558198f,
+ 0.558119f, 0.558039f, 0.557959f, 0.557880f, 0.557800f, 0.557721f, 0.557641f, 0.557562f,
+ 0.557482f, 0.557402f, 0.557323f, 0.557243f, 0.557164f, 0.557084f, 0.557004f, 0.556925f,
+ 0.556845f, 0.556765f, 0.556686f, 0.556606f, 0.556526f, 0.556447f, 0.556367f, 0.556287f,
+ 0.556208f, 0.556128f, 0.556048f, 0.555969f, 0.555889f, 0.555809f, 0.555730f, 0.555650f,
+ 0.555570f, 0.555490f, 0.555411f, 0.555331f, 0.555251f, 0.555172f, 0.555092f, 0.555012f,
+ 0.554932f, 0.554853f, 0.554773f, 0.554693f, 0.554613f, 0.554533f, 0.554454f, 0.554374f,
+ 0.554294f, 0.554214f, 0.554134f, 0.554055f, 0.553975f, 0.553895f, 0.553815f, 0.553735f,
+ 0.553656f, 0.553576f, 0.553496f, 0.553416f, 0.553336f, 0.553256f, 0.553176f, 0.553097f,
+ 0.553017f, 0.552937f, 0.552857f, 0.552777f, 0.552697f, 0.552617f, 0.552537f, 0.552457f,
+ 0.552378f, 0.552298f, 0.552218f, 0.552138f, 0.552058f, 0.551978f, 0.551898f, 0.551818f,
+ 0.551738f, 0.551658f, 0.551578f, 0.551498f, 0.551418f, 0.551338f, 0.551258f, 0.551178f,
+ 0.551098f, 0.551018f, 0.550938f, 0.550858f, 0.550778f, 0.550698f, 0.550618f, 0.550538f,
+ 0.550458f, 0.550378f, 0.550298f, 0.550218f, 0.550138f, 0.550058f, 0.549978f, 0.549898f,
+ 0.549818f, 0.549737f, 0.549657f, 0.549577f, 0.549497f, 0.549417f, 0.549337f, 0.549257f,
+ 0.549177f, 0.549097f, 0.549016f, 0.548936f, 0.548856f, 0.548776f, 0.548696f, 0.548616f,
+ 0.548536f, 0.548455f, 0.548375f, 0.548295f, 0.548215f, 0.548135f, 0.548054f, 0.547974f,
+ 0.547894f, 0.547814f, 0.547734f, 0.547653f, 0.547573f, 0.547493f, 0.547413f, 0.547333f,
+ 0.547252f, 0.547172f, 0.547092f, 0.547011f, 0.546931f, 0.546851f, 0.546771f, 0.546690f,
+ 0.546610f, 0.546530f, 0.546450f, 0.546369f, 0.546289f, 0.546209f, 0.546128f, 0.546048f,
+ 0.545968f, 0.545887f, 0.545807f, 0.545727f, 0.545646f, 0.545566f, 0.545486f, 0.545405f,
+ 0.545325f, 0.545245f, 0.545164f, 0.545084f, 0.545003f, 0.544923f, 0.544843f, 0.544762f,
+ 0.544682f, 0.544602f, 0.544521f, 0.544441f, 0.544360f, 0.544280f, 0.544199f, 0.544119f,
+ 0.544039f, 0.543958f, 0.543878f, 0.543797f, 0.543717f, 0.543636f, 0.543556f, 0.543475f,
+ 0.543395f, 0.543314f, 0.543234f, 0.543153f, 0.543073f, 0.542992f, 0.542912f, 0.542831f,
+ 0.542751f, 0.542670f, 0.542590f, 0.542509f, 0.542429f, 0.542348f, 0.542268f, 0.542187f,
+ 0.542106f, 0.542026f, 0.541945f, 0.541865f, 0.541784f, 0.541704f, 0.541623f, 0.541542f,
+ 0.541462f, 0.541381f, 0.541301f, 0.541220f, 0.541139f, 0.541059f, 0.540978f, 0.540897f,
+ 0.540817f, 0.540736f, 0.540655f, 0.540575f, 0.540494f, 0.540413f, 0.540333f, 0.540252f,
+ 0.540171f, 0.540091f, 0.540010f, 0.539929f, 0.539849f, 0.539768f, 0.539687f, 0.539607f,
+ 0.539526f, 0.539445f, 0.539364f, 0.539284f, 0.539203f, 0.539122f, 0.539041f, 0.538961f,
+ 0.538880f, 0.538799f, 0.538718f, 0.538638f, 0.538557f, 0.538476f, 0.538395f, 0.538314f,
+ 0.538234f, 0.538153f, 0.538072f, 0.537991f, 0.537910f, 0.537830f, 0.537749f, 0.537668f,
+ 0.537587f, 0.537506f, 0.537425f, 0.537345f, 0.537264f, 0.537183f, 0.537102f, 0.537021f,
+ 0.536940f, 0.536859f, 0.536778f, 0.536698f, 0.536617f, 0.536536f, 0.536455f, 0.536374f,
+ 0.536293f, 0.536212f, 0.536131f, 0.536050f, 0.535969f, 0.535888f, 0.535807f, 0.535726f,
+ 0.535645f, 0.535564f, 0.535484f, 0.535403f, 0.535322f, 0.535241f, 0.535160f, 0.535079f,
+ 0.534998f, 0.534917f, 0.534836f, 0.534755f, 0.534674f, 0.534593f, 0.534512f, 0.534431f,
+ 0.534349f, 0.534268f, 0.534187f, 0.534106f, 0.534025f, 0.533944f, 0.533863f, 0.533782f,
+ 0.533701f, 0.533620f, 0.533539f, 0.533458f, 0.533377f, 0.533296f, 0.533214f, 0.533133f,
+ 0.533052f, 0.532971f, 0.532890f, 0.532809f, 0.532728f, 0.532647f, 0.532565f, 0.532484f,
+ 0.532403f, 0.532322f, 0.532241f, 0.532160f, 0.532078f, 0.531997f, 0.531916f, 0.531835f,
+ 0.531754f, 0.531673f, 0.531591f, 0.531510f, 0.531429f, 0.531348f, 0.531266f, 0.531185f,
+ 0.531104f, 0.531023f, 0.530942f, 0.530860f, 0.530779f, 0.530698f, 0.530617f, 0.530535f,
+ 0.530454f, 0.530373f, 0.530291f, 0.530210f, 0.530129f, 0.530048f, 0.529966f, 0.529885f,
+ 0.529804f, 0.529722f, 0.529641f, 0.529560f, 0.529478f, 0.529397f, 0.529316f, 0.529234f,
+ 0.529153f, 0.529072f, 0.528990f, 0.528909f, 0.528828f, 0.528746f, 0.528665f, 0.528583f,
+ 0.528502f, 0.528421f, 0.528339f, 0.528258f, 0.528176f, 0.528095f, 0.528014f, 0.527932f,
+ 0.527851f, 0.527769f, 0.527688f, 0.527606f, 0.527525f, 0.527444f, 0.527362f, 0.527281f,
+ 0.527199f, 0.527118f, 0.527036f, 0.526955f, 0.526873f, 0.526792f, 0.526710f, 0.526629f,
+ 0.526547f, 0.526466f, 0.526384f, 0.526303f, 0.526221f, 0.526140f, 0.526058f, 0.525977f,
+ 0.525895f, 0.525813f, 0.525732f, 0.525650f, 0.525569f, 0.525487f, 0.525406f, 0.525324f,
+ 0.525243f, 0.525161f, 0.525079f, 0.524998f, 0.524916f, 0.524835f, 0.524753f, 0.524671f,
+ 0.524590f, 0.524508f, 0.524426f, 0.524345f, 0.524263f, 0.524181f, 0.524100f, 0.524018f,
+ 0.523937f, 0.523855f, 0.523773f, 0.523692f, 0.523610f, 0.523528f, 0.523447f, 0.523365f,
+ 0.523283f, 0.523201f, 0.523120f, 0.523038f, 0.522956f, 0.522875f, 0.522793f, 0.522711f,
+ 0.522629f, 0.522548f, 0.522466f, 0.522384f, 0.522302f, 0.522221f, 0.522139f, 0.522057f,
+ 0.521975f, 0.521894f, 0.521812f, 0.521730f, 0.521648f, 0.521566f, 0.521485f, 0.521403f,
+ 0.521321f, 0.521239f, 0.521157f, 0.521075f, 0.520994f, 0.520912f, 0.520830f, 0.520748f,
+ 0.520666f, 0.520584f, 0.520503f, 0.520421f, 0.520339f, 0.520257f, 0.520175f, 0.520093f,
+ 0.520011f, 0.519929f, 0.519848f, 0.519766f, 0.519684f, 0.519602f, 0.519520f, 0.519438f,
+ 0.519356f, 0.519274f, 0.519192f, 0.519110f, 0.519028f, 0.518946f, 0.518864f, 0.518782f,
+ 0.518700f, 0.518618f, 0.518536f, 0.518454f, 0.518372f, 0.518291f, 0.518209f, 0.518126f,
+ 0.518045f, 0.517963f, 0.517880f, 0.517798f, 0.517716f, 0.517634f, 0.517552f, 0.517470f,
+ 0.517388f, 0.517306f, 0.517224f, 0.517142f, 0.517060f, 0.516978f, 0.516896f, 0.516814f,
+ 0.516732f, 0.516650f, 0.516568f, 0.516486f, 0.516403f, 0.516321f, 0.516239f, 0.516157f,
+ 0.516075f, 0.515993f, 0.515911f, 0.515829f, 0.515746f, 0.515664f, 0.515582f, 0.515500f,
+ 0.515418f, 0.515336f, 0.515254f, 0.515171f, 0.515089f, 0.515007f, 0.514925f, 0.514843f,
+ 0.514760f, 0.514678f, 0.514596f, 0.514514f, 0.514432f, 0.514349f, 0.514267f, 0.514185f,
+ 0.514103f, 0.514021f, 0.513938f, 0.513856f, 0.513774f, 0.513692f, 0.513609f, 0.513527f,
+ 0.513445f, 0.513362f, 0.513280f, 0.513198f, 0.513116f, 0.513033f, 0.512951f, 0.512869f,
+ 0.512786f, 0.512704f, 0.512622f, 0.512539f, 0.512457f, 0.512375f, 0.512292f, 0.512210f,
+ 0.512128f, 0.512045f, 0.511963f, 0.511881f, 0.511798f, 0.511716f, 0.511634f, 0.511551f,
+ 0.511469f, 0.511386f, 0.511304f, 0.511222f, 0.511139f, 0.511057f, 0.510974f, 0.510892f,
+ 0.510810f, 0.510727f, 0.510645f, 0.510562f, 0.510480f, 0.510397f, 0.510315f, 0.510233f,
+ 0.510150f, 0.510068f, 0.509985f, 0.509903f, 0.509820f, 0.509738f, 0.509655f, 0.509573f,
+ 0.509490f, 0.509408f, 0.509325f, 0.509243f, 0.509160f, 0.509078f, 0.508995f, 0.508913f,
+ 0.508830f, 0.508748f, 0.508665f, 0.508583f, 0.508500f, 0.508417f, 0.508335f, 0.508252f,
+ 0.508170f, 0.508087f, 0.508005f, 0.507922f, 0.507839f, 0.507757f, 0.507674f, 0.507592f,
+ 0.507509f, 0.507426f, 0.507344f, 0.507261f, 0.507179f, 0.507096f, 0.507013f, 0.506931f,
+ 0.506848f, 0.506765f, 0.506683f, 0.506600f, 0.506517f, 0.506435f, 0.506352f, 0.506269f,
+ 0.506187f, 0.506104f, 0.506021f, 0.505939f, 0.505856f, 0.505773f, 0.505690f, 0.505608f,
+ 0.505525f, 0.505442f, 0.505360f, 0.505277f, 0.505194f, 0.505111f, 0.505029f, 0.504946f,
+ 0.504863f, 0.504780f, 0.504698f, 0.504615f, 0.504532f, 0.504449f, 0.504366f, 0.504284f,
+ 0.504201f, 0.504118f, 0.504035f, 0.503953f, 0.503870f, 0.503787f, 0.503704f, 0.503621f,
+ 0.503538f, 0.503456f, 0.503373f, 0.503290f, 0.503207f, 0.503124f, 0.503041f, 0.502958f,
+ 0.502876f, 0.502793f, 0.502710f, 0.502627f, 0.502544f, 0.502461f, 0.502378f, 0.502295f,
+ 0.502212f, 0.502130f, 0.502047f, 0.501964f, 0.501881f, 0.501798f, 0.501715f, 0.501632f,
+ 0.501549f, 0.501466f, 0.501383f, 0.501300f, 0.501217f, 0.501134f, 0.501051f, 0.500968f,
+ 0.500885f, 0.500802f, 0.500719f, 0.500636f, 0.500553f, 0.500470f, 0.500387f, 0.500304f,
+ 0.500221f, 0.500138f, 0.500055f, 0.499972f, 0.499889f, 0.499806f, 0.499723f, 0.499640f,
+ 0.499557f, 0.499474f, 0.499391f, 0.499308f, 0.499225f, 0.499142f, 0.499059f, 0.498976f,
+ 0.498893f, 0.498809f, 0.498726f, 0.498643f, 0.498560f, 0.498477f, 0.498394f, 0.498311f,
+ 0.498228f, 0.498145f, 0.498061f, 0.497978f, 0.497895f, 0.497812f, 0.497729f, 0.497646f,
+ 0.497562f, 0.497479f, 0.497396f, 0.497313f, 0.497230f, 0.497147f, 0.497063f, 0.496980f,
+ 0.496897f, 0.496814f, 0.496731f, 0.496647f, 0.496564f, 0.496481f, 0.496398f, 0.496315f,
+ 0.496231f, 0.496148f, 0.496065f, 0.495982f, 0.495898f, 0.495815f, 0.495732f, 0.495649f,
+ 0.495565f, 0.495482f, 0.495399f, 0.495315f, 0.495232f, 0.495149f, 0.495066f, 0.494982f,
+ 0.494899f, 0.494816f, 0.494732f, 0.494649f, 0.494566f, 0.494482f, 0.494399f, 0.494316f,
+ 0.494232f, 0.494149f, 0.494066f, 0.493982f, 0.493899f, 0.493816f, 0.493732f, 0.493649f,
+ 0.493565f, 0.493482f, 0.493399f, 0.493315f, 0.493232f, 0.493148f, 0.493065f, 0.492982f,
+ 0.492898f, 0.492815f, 0.492731f, 0.492648f, 0.492564f, 0.492481f, 0.492398f, 0.492314f,
+ 0.492231f, 0.492147f, 0.492064f, 0.491980f, 0.491897f, 0.491813f, 0.491730f, 0.491646f,
+ 0.491563f, 0.491479f, 0.491396f, 0.491312f, 0.491229f, 0.491145f, 0.491062f, 0.490978f,
+ 0.490895f, 0.490811f, 0.490728f, 0.490644f, 0.490561f, 0.490477f, 0.490394f, 0.490310f,
+ 0.490226f, 0.490143f, 0.490059f, 0.489976f, 0.489892f, 0.489809f, 0.489725f, 0.489641f,
+ 0.489558f, 0.489474f, 0.489391f, 0.489307f, 0.489223f, 0.489140f, 0.489056f, 0.488973f,
+ 0.488889f, 0.488805f, 0.488722f, 0.488638f, 0.488554f, 0.488471f, 0.488387f, 0.488303f,
+ 0.488220f, 0.488136f, 0.488052f, 0.487969f, 0.487885f, 0.487801f, 0.487718f, 0.487634f,
+ 0.487550f, 0.487466f, 0.487383f, 0.487299f, 0.487215f, 0.487132f, 0.487048f, 0.486964f,
+ 0.486880f, 0.486797f, 0.486713f, 0.486629f, 0.486545f, 0.486462f, 0.486378f, 0.486294f,
+ 0.486210f, 0.486126f, 0.486043f, 0.485959f, 0.485875f, 0.485791f, 0.485708f, 0.485624f,
+ 0.485540f, 0.485456f, 0.485372f, 0.485288f, 0.485205f, 0.485121f, 0.485037f, 0.484953f,
+ 0.484869f, 0.484785f, 0.484702f, 0.484618f, 0.484534f, 0.484450f, 0.484366f, 0.484282f,
+ 0.484198f, 0.484114f, 0.484031f, 0.483947f, 0.483863f, 0.483779f, 0.483695f, 0.483611f,
+ 0.483527f, 0.483443f, 0.483359f, 0.483275f, 0.483191f, 0.483107f, 0.483023f, 0.482940f,
+ 0.482856f, 0.482772f, 0.482688f, 0.482604f, 0.482520f, 0.482436f, 0.482352f, 0.482268f,
+ 0.482184f, 0.482100f, 0.482016f, 0.481932f, 0.481848f, 0.481764f, 0.481680f, 0.481596f,
+ 0.481512f, 0.481428f, 0.481344f, 0.481260f, 0.481176f, 0.481091f, 0.481007f, 0.480923f,
+ 0.480839f, 0.480755f, 0.480671f, 0.480587f, 0.480503f, 0.480419f, 0.480335f, 0.480251f,
+ 0.480167f, 0.480083f, 0.479998f, 0.479914f, 0.479830f, 0.479746f, 0.479662f, 0.479578f,
+ 0.479494f, 0.479410f, 0.479325f, 0.479241f, 0.479157f, 0.479073f, 0.478989f, 0.478905f,
+ 0.478821f, 0.478736f, 0.478652f, 0.478568f, 0.478484f, 0.478400f, 0.478315f, 0.478231f,
+ 0.478147f, 0.478063f, 0.477979f, 0.477894f, 0.477810f, 0.477726f, 0.477642f, 0.477558f,
+ 0.477473f, 0.477389f, 0.477305f, 0.477221f, 0.477136f, 0.477052f, 0.476968f, 0.476884f,
+ 0.476799f, 0.476715f, 0.476631f, 0.476546f, 0.476462f, 0.476378f, 0.476294f, 0.476209f,
+ 0.476125f, 0.476041f, 0.475956f, 0.475872f, 0.475788f, 0.475703f, 0.475619f, 0.475535f,
+ 0.475450f, 0.475366f, 0.475282f, 0.475197f, 0.475113f, 0.475029f, 0.474944f, 0.474860f,
+ 0.474775f, 0.474691f, 0.474607f, 0.474522f, 0.474438f, 0.474353f, 0.474269f, 0.474185f,
+ 0.474100f, 0.474016f, 0.473931f, 0.473847f, 0.473763f, 0.473678f, 0.473594f, 0.473509f,
+ 0.473425f, 0.473340f, 0.473256f, 0.473171f, 0.473087f, 0.473002f, 0.472918f, 0.472834f,
+ 0.472749f, 0.472665f, 0.472580f, 0.472496f, 0.472411f, 0.472327f, 0.472242f, 0.472158f,
+ 0.472073f, 0.471988f, 0.471904f, 0.471819f, 0.471735f, 0.471650f, 0.471566f, 0.471481f,
+ 0.471397f, 0.471312f, 0.471228f, 0.471143f, 0.471058f, 0.470974f, 0.470889f, 0.470805f,
+ 0.470720f, 0.470636f, 0.470551f, 0.470466f, 0.470382f, 0.470297f, 0.470213f, 0.470128f,
+ 0.470043f, 0.469959f, 0.469874f, 0.469789f, 0.469705f, 0.469620f, 0.469536f, 0.469451f,
+ 0.469366f, 0.469282f, 0.469197f, 0.469112f, 0.469028f, 0.468943f, 0.468858f, 0.468774f,
+ 0.468689f, 0.468604f, 0.468519f, 0.468435f, 0.468350f, 0.468265f, 0.468181f, 0.468096f,
+ 0.468011f, 0.467926f, 0.467842f, 0.467757f, 0.467672f, 0.467587f, 0.467503f, 0.467418f,
+ 0.467333f, 0.467248f, 0.467164f, 0.467079f, 0.466994f, 0.466909f, 0.466825f, 0.466740f,
+ 0.466655f, 0.466570f, 0.466485f, 0.466401f, 0.466316f, 0.466231f, 0.466146f, 0.466061f,
+ 0.465977f, 0.465892f, 0.465807f, 0.465722f, 0.465637f, 0.465552f, 0.465467f, 0.465383f,
+ 0.465298f, 0.465213f, 0.465128f, 0.465043f, 0.464958f, 0.464873f, 0.464788f, 0.464704f,
+ 0.464619f, 0.464534f, 0.464449f, 0.464364f, 0.464279f, 0.464194f, 0.464109f, 0.464024f,
+ 0.463939f, 0.463854f, 0.463769f, 0.463685f, 0.463600f, 0.463515f, 0.463430f, 0.463345f,
+ 0.463260f, 0.463175f, 0.463090f, 0.463005f, 0.462920f, 0.462835f, 0.462750f, 0.462665f,
+ 0.462580f, 0.462495f, 0.462410f, 0.462325f, 0.462240f, 0.462155f, 0.462070f, 0.461985f,
+ 0.461900f, 0.461815f, 0.461730f, 0.461645f, 0.461560f, 0.461475f, 0.461390f, 0.461304f,
+ 0.461219f, 0.461134f, 0.461049f, 0.460964f, 0.460879f, 0.460794f, 0.460709f, 0.460624f,
+ 0.460539f, 0.460454f, 0.460369f, 0.460283f, 0.460198f, 0.460113f, 0.460028f, 0.459943f,
+ 0.459858f, 0.459773f, 0.459687f, 0.459602f, 0.459517f, 0.459432f, 0.459347f, 0.459262f,
+ 0.459177f, 0.459091f, 0.459006f, 0.458921f, 0.458836f, 0.458751f, 0.458665f, 0.458580f,
+ 0.458495f, 0.458410f, 0.458325f, 0.458239f, 0.458154f, 0.458069f, 0.457984f, 0.457899f,
+ 0.457813f, 0.457728f, 0.457643f, 0.457558f, 0.457472f, 0.457387f, 0.457302f, 0.457217f,
+ 0.457131f, 0.457046f, 0.456961f, 0.456875f, 0.456790f, 0.456705f, 0.456620f, 0.456534f,
+ 0.456449f, 0.456364f, 0.456278f, 0.456193f, 0.456108f, 0.456022f, 0.455937f, 0.455852f,
+ 0.455766f, 0.455681f, 0.455596f, 0.455510f, 0.455425f, 0.455340f, 0.455254f, 0.455169f,
+ 0.455084f, 0.454998f, 0.454913f, 0.454827f, 0.454742f, 0.454657f, 0.454571f, 0.454486f,
+ 0.454400f, 0.454315f, 0.454230f, 0.454144f, 0.454059f, 0.453973f, 0.453888f, 0.453803f,
+ 0.453717f, 0.453632f, 0.453546f, 0.453461f, 0.453375f, 0.453290f, 0.453204f, 0.453119f,
+ 0.453033f, 0.452948f, 0.452863f, 0.452777f, 0.452692f, 0.452606f, 0.452521f, 0.452435f,
+ 0.452350f, 0.452264f, 0.452179f, 0.452093f, 0.452008f, 0.451922f, 0.451836f, 0.451751f,
+ 0.451665f, 0.451580f, 0.451494f, 0.451409f, 0.451323f, 0.451238f, 0.451152f, 0.451067f,
+ 0.450981f, 0.450895f, 0.450810f, 0.450724f, 0.450639f, 0.450553f, 0.450467f, 0.450382f,
+ 0.450296f, 0.450211f, 0.450125f, 0.450039f, 0.449954f, 0.449868f, 0.449783f, 0.449697f,
+ 0.449611f, 0.449526f, 0.449440f, 0.449354f, 0.449269f, 0.449183f, 0.449097f, 0.449012f,
+ 0.448926f, 0.448840f, 0.448755f, 0.448669f, 0.448583f, 0.448498f, 0.448412f, 0.448326f,
+ 0.448241f, 0.448155f, 0.448069f, 0.447983f, 0.447898f, 0.447812f, 0.447726f, 0.447641f,
+ 0.447555f, 0.447469f, 0.447383f, 0.447298f, 0.447212f, 0.447126f, 0.447040f, 0.446955f,
+ 0.446869f, 0.446783f, 0.446697f, 0.446612f, 0.446526f, 0.446440f, 0.446354f, 0.446268f,
+ 0.446183f, 0.446097f, 0.446011f, 0.445925f, 0.445839f, 0.445754f, 0.445668f, 0.445582f,
+ 0.445496f, 0.445410f, 0.445324f, 0.445239f, 0.445153f, 0.445067f, 0.444981f, 0.444895f,
+ 0.444809f, 0.444723f, 0.444637f, 0.444552f, 0.444466f, 0.444380f, 0.444294f, 0.444208f,
+ 0.444122f, 0.444036f, 0.443950f, 0.443864f, 0.443779f, 0.443693f, 0.443607f, 0.443521f,
+ 0.443435f, 0.443349f, 0.443263f, 0.443177f, 0.443091f, 0.443005f, 0.442919f, 0.442833f,
+ 0.442747f, 0.442661f, 0.442575f, 0.442489f, 0.442403f, 0.442317f, 0.442231f, 0.442145f,
+ 0.442059f, 0.441973f, 0.441887f, 0.441801f, 0.441715f, 0.441629f, 0.441543f, 0.441457f,
+ 0.441371f, 0.441285f, 0.441199f, 0.441113f, 0.441027f, 0.440941f, 0.440855f, 0.440769f,
+ 0.440683f, 0.440597f, 0.440511f, 0.440425f, 0.440339f, 0.440253f, 0.440166f, 0.440080f,
+ 0.439994f, 0.439908f, 0.439822f, 0.439736f, 0.439650f, 0.439564f, 0.439478f, 0.439392f,
+ 0.439305f, 0.439219f, 0.439133f, 0.439047f, 0.438961f, 0.438875f, 0.438789f, 0.438702f,
+ 0.438616f, 0.438530f, 0.438444f, 0.438358f, 0.438272f, 0.438185f, 0.438099f, 0.438013f,
+ 0.437927f, 0.437841f, 0.437754f, 0.437668f, 0.437582f, 0.437496f, 0.437410f, 0.437323f,
+ 0.437237f, 0.437151f, 0.437065f, 0.436978f, 0.436892f, 0.436806f, 0.436720f, 0.436633f,
+ 0.436547f, 0.436461f, 0.436375f, 0.436288f, 0.436202f, 0.436116f, 0.436030f, 0.435943f,
+ 0.435857f, 0.435771f, 0.435685f, 0.435598f, 0.435512f, 0.435426f, 0.435339f, 0.435253f,
+ 0.435167f, 0.435080f, 0.434994f, 0.434908f, 0.434821f, 0.434735f, 0.434649f, 0.434562f,
+ 0.434476f, 0.434390f, 0.434303f, 0.434217f, 0.434131f, 0.434044f, 0.433958f, 0.433871f,
+ 0.433785f, 0.433699f, 0.433612f, 0.433526f, 0.433439f, 0.433353f, 0.433267f, 0.433180f,
+ 0.433094f, 0.433007f, 0.432921f, 0.432835f, 0.432748f, 0.432662f, 0.432575f, 0.432489f,
+ 0.432402f, 0.432316f, 0.432229f, 0.432143f, 0.432057f, 0.431970f, 0.431884f, 0.431797f,
+ 0.431711f, 0.431624f, 0.431538f, 0.431451f, 0.431365f, 0.431278f, 0.431192f, 0.431105f,
+ 0.431019f, 0.430932f, 0.430846f, 0.430759f, 0.430673f, 0.430586f, 0.430500f, 0.430413f,
+ 0.430326f, 0.430240f, 0.430153f, 0.430067f, 0.429980f, 0.429894f, 0.429807f, 0.429721f,
+ 0.429634f, 0.429547f, 0.429461f, 0.429374f, 0.429288f, 0.429201f, 0.429114f, 0.429028f,
+ 0.428941f, 0.428855f, 0.428768f, 0.428681f, 0.428595f, 0.428508f, 0.428422f, 0.428335f,
+ 0.428248f, 0.428162f, 0.428075f, 0.427988f, 0.427902f, 0.427815f, 0.427728f, 0.427642f,
+ 0.427555f, 0.427468f, 0.427382f, 0.427295f, 0.427208f, 0.427122f, 0.427035f, 0.426948f,
+ 0.426862f, 0.426775f, 0.426688f, 0.426601f, 0.426515f, 0.426428f, 0.426341f, 0.426255f,
+ 0.426168f, 0.426081f, 0.425994f, 0.425908f, 0.425821f, 0.425734f, 0.425647f, 0.425561f,
+ 0.425474f, 0.425387f, 0.425300f, 0.425214f, 0.425127f, 0.425040f, 0.424953f, 0.424866f,
+ 0.424780f, 0.424693f, 0.424606f, 0.424519f, 0.424432f, 0.424346f, 0.424259f, 0.424172f,
+ 0.424085f, 0.423998f, 0.423912f, 0.423825f, 0.423738f, 0.423651f, 0.423564f, 0.423477f,
+ 0.423390f, 0.423304f, 0.423217f, 0.423130f, 0.423043f, 0.422956f, 0.422869f, 0.422782f,
+ 0.422695f, 0.422609f, 0.422522f, 0.422435f, 0.422348f, 0.422261f, 0.422174f, 0.422087f,
+ 0.422000f, 0.421913f, 0.421826f, 0.421739f, 0.421653f, 0.421566f, 0.421479f, 0.421392f,
+ 0.421305f, 0.421218f, 0.421131f, 0.421044f, 0.420957f, 0.420870f, 0.420783f, 0.420696f,
+ 0.420609f, 0.420522f, 0.420435f, 0.420348f, 0.420261f, 0.420174f, 0.420087f, 0.420000f,
+ 0.419913f, 0.419826f, 0.419739f, 0.419652f, 0.419565f, 0.419478f, 0.419391f, 0.419304f,
+ 0.419217f, 0.419130f, 0.419043f, 0.418956f, 0.418869f, 0.418782f, 0.418695f, 0.418608f,
+ 0.418520f, 0.418433f, 0.418346f, 0.418259f, 0.418172f, 0.418085f, 0.417998f, 0.417911f,
+ 0.417824f, 0.417737f, 0.417650f, 0.417562f, 0.417475f, 0.417388f, 0.417301f, 0.417214f,
+ 0.417127f, 0.417040f, 0.416952f, 0.416865f, 0.416778f, 0.416691f, 0.416604f, 0.416517f,
+ 0.416430f, 0.416342f, 0.416255f, 0.416168f, 0.416081f, 0.415994f, 0.415906f, 0.415819f,
+ 0.415732f, 0.415645f, 0.415558f, 0.415471f, 0.415383f, 0.415296f, 0.415209f, 0.415122f,
+ 0.415034f, 0.414947f, 0.414860f, 0.414773f, 0.414685f, 0.414598f, 0.414511f, 0.414424f,
+ 0.414337f, 0.414249f, 0.414162f, 0.414075f, 0.413987f, 0.413900f, 0.413813f, 0.413726f,
+ 0.413638f, 0.413551f, 0.413464f, 0.413376f, 0.413289f, 0.413202f, 0.413115f, 0.413027f,
+ 0.412940f, 0.412853f, 0.412765f, 0.412678f, 0.412591f, 0.412503f, 0.412416f, 0.412329f,
+ 0.412241f, 0.412154f, 0.412067f, 0.411979f, 0.411892f, 0.411804f, 0.411717f, 0.411630f,
+ 0.411542f, 0.411455f, 0.411368f, 0.411280f, 0.411193f, 0.411105f, 0.411018f, 0.410931f,
+ 0.410843f, 0.410756f, 0.410668f, 0.410581f, 0.410493f, 0.410406f, 0.410319f, 0.410231f,
+ 0.410144f, 0.410056f, 0.409969f, 0.409881f, 0.409794f, 0.409707f, 0.409619f, 0.409532f,
+ 0.409444f, 0.409357f, 0.409269f, 0.409182f, 0.409094f, 0.409007f, 0.408919f, 0.408832f,
+ 0.408744f, 0.408657f, 0.408569f, 0.408482f, 0.408394f, 0.408307f, 0.408219f, 0.408132f,
+ 0.408044f, 0.407957f, 0.407869f, 0.407782f, 0.407694f, 0.407606f, 0.407519f, 0.407431f,
+ 0.407344f, 0.407256f, 0.407169f, 0.407081f, 0.406994f, 0.406906f, 0.406818f, 0.406731f,
+ 0.406643f, 0.406556f, 0.406468f, 0.406380f, 0.406293f, 0.406205f, 0.406118f, 0.406030f,
+ 0.405942f, 0.405855f, 0.405767f, 0.405680f, 0.405592f, 0.405504f, 0.405417f, 0.405329f,
+ 0.405241f, 0.405154f, 0.405066f, 0.404978f, 0.404891f, 0.404803f, 0.404715f, 0.404628f,
+ 0.404540f, 0.404452f, 0.404365f, 0.404277f, 0.404189f, 0.404102f, 0.404014f, 0.403926f,
+ 0.403838f, 0.403751f, 0.403663f, 0.403575f, 0.403488f, 0.403400f, 0.403312f, 0.403224f,
+ 0.403137f, 0.403049f, 0.402961f, 0.402873f, 0.402786f, 0.402698f, 0.402610f, 0.402522f,
+ 0.402435f, 0.402347f, 0.402259f, 0.402171f, 0.402084f, 0.401996f, 0.401908f, 0.401820f,
+ 0.401732f, 0.401645f, 0.401557f, 0.401469f, 0.401381f, 0.401293f, 0.401206f, 0.401118f,
+ 0.401030f, 0.400942f, 0.400854f, 0.400766f, 0.400679f, 0.400591f, 0.400503f, 0.400415f,
+ 0.400327f, 0.400239f, 0.400151f, 0.400064f, 0.399976f, 0.399888f, 0.399800f, 0.399712f,
+ 0.399624f, 0.399536f, 0.399448f, 0.399361f, 0.399273f, 0.399185f, 0.399097f, 0.399009f,
+ 0.398921f, 0.398833f, 0.398745f, 0.398657f, 0.398569f, 0.398481f, 0.398393f, 0.398306f,
+ 0.398218f, 0.398130f, 0.398042f, 0.397954f, 0.397866f, 0.397778f, 0.397690f, 0.397602f,
+ 0.397514f, 0.397426f, 0.397338f, 0.397250f, 0.397162f, 0.397074f, 0.396986f, 0.396898f,
+ 0.396810f, 0.396722f, 0.396634f, 0.396546f, 0.396458f, 0.396370f, 0.396282f, 0.396194f,
+ 0.396106f, 0.396018f, 0.395930f, 0.395842f, 0.395754f, 0.395666f, 0.395578f, 0.395490f,
+ 0.395401f, 0.395313f, 0.395225f, 0.395137f, 0.395049f, 0.394961f, 0.394873f, 0.394785f,
+ 0.394697f, 0.394609f, 0.394521f, 0.394433f, 0.394344f, 0.394256f, 0.394168f, 0.394080f,
+ 0.393992f, 0.393904f, 0.393816f, 0.393728f, 0.393640f, 0.393551f, 0.393463f, 0.393375f,
+ 0.393287f, 0.393199f, 0.393111f, 0.393023f, 0.392934f, 0.392846f, 0.392758f, 0.392670f,
+ 0.392582f, 0.392493f, 0.392405f, 0.392317f, 0.392229f, 0.392141f, 0.392053f, 0.391964f,
+ 0.391876f, 0.391788f, 0.391700f, 0.391612f, 0.391523f, 0.391435f, 0.391347f, 0.391259f,
+ 0.391170f, 0.391082f, 0.390994f, 0.390906f, 0.390817f, 0.390729f, 0.390641f, 0.390553f,
+ 0.390464f, 0.390376f, 0.390288f, 0.390200f, 0.390111f, 0.390023f, 0.389935f, 0.389846f,
+ 0.389758f, 0.389670f, 0.389582f, 0.389493f, 0.389405f, 0.389317f, 0.389228f, 0.389140f,
+ 0.389052f, 0.388963f, 0.388875f, 0.388787f, 0.388698f, 0.388610f, 0.388522f, 0.388433f,
+ 0.388345f, 0.388257f, 0.388168f, 0.388080f, 0.387992f, 0.387903f, 0.387815f, 0.387727f,
+ 0.387638f, 0.387550f, 0.387461f, 0.387373f, 0.387285f, 0.387196f, 0.387108f, 0.387019f,
+ 0.386931f, 0.386843f, 0.386754f, 0.386666f, 0.386577f, 0.386489f, 0.386400f, 0.386312f,
+ 0.386224f, 0.386135f, 0.386047f, 0.385958f, 0.385870f, 0.385781f, 0.385693f, 0.385605f,
+ 0.385516f, 0.385428f, 0.385339f, 0.385251f, 0.385162f, 0.385074f, 0.384985f, 0.384897f,
+ 0.384808f, 0.384720f, 0.384631f, 0.384543f, 0.384454f, 0.384366f, 0.384277f, 0.384189f,
+ 0.384100f, 0.384012f, 0.383923f, 0.383835f, 0.383746f, 0.383658f, 0.383569f, 0.383480f,
+ 0.383392f, 0.383303f, 0.383215f, 0.383126f, 0.383038f, 0.382949f, 0.382861f, 0.382772f,
+ 0.382683f, 0.382595f, 0.382506f, 0.382418f, 0.382329f, 0.382241f, 0.382152f, 0.382063f,
+ 0.381975f, 0.381886f, 0.381797f, 0.381709f, 0.381620f, 0.381532f, 0.381443f, 0.381354f,
+ 0.381266f, 0.381177f, 0.381088f, 0.381000f, 0.380911f, 0.380823f, 0.380734f, 0.380645f,
+ 0.380557f, 0.380468f, 0.380379f, 0.380291f, 0.380202f, 0.380113f, 0.380025f, 0.379936f,
+ 0.379847f, 0.379759f, 0.379670f, 0.379581f, 0.379492f, 0.379404f, 0.379315f, 0.379226f,
+ 0.379138f, 0.379049f, 0.378960f, 0.378871f, 0.378783f, 0.378694f, 0.378605f, 0.378516f,
+ 0.378428f, 0.378339f, 0.378250f, 0.378162f, 0.378073f, 0.377984f, 0.377895f, 0.377806f,
+ 0.377718f, 0.377629f, 0.377540f, 0.377451f, 0.377363f, 0.377274f, 0.377185f, 0.377096f,
+ 0.377007f, 0.376919f, 0.376830f, 0.376741f, 0.376652f, 0.376563f, 0.376475f, 0.376386f,
+ 0.376297f, 0.376208f, 0.376119f, 0.376030f, 0.375942f, 0.375853f, 0.375764f, 0.375675f,
+ 0.375586f, 0.375497f, 0.375408f, 0.375320f, 0.375231f, 0.375142f, 0.375053f, 0.374964f,
+ 0.374875f, 0.374786f, 0.374697f, 0.374609f, 0.374520f, 0.374431f, 0.374342f, 0.374253f,
+ 0.374164f, 0.374075f, 0.373986f, 0.373897f, 0.373808f, 0.373719f, 0.373631f, 0.373542f,
+ 0.373453f, 0.373364f, 0.373275f, 0.373186f, 0.373097f, 0.373008f, 0.372919f, 0.372830f,
+ 0.372741f, 0.372652f, 0.372563f, 0.372474f, 0.372385f, 0.372296f, 0.372207f, 0.372118f,
+ 0.372029f, 0.371940f, 0.371851f, 0.371762f, 0.371673f, 0.371584f, 0.371495f, 0.371406f,
+ 0.371317f, 0.371228f, 0.371139f, 0.371050f, 0.370961f, 0.370872f, 0.370783f, 0.370694f,
+ 0.370605f, 0.370516f, 0.370427f, 0.370338f, 0.370249f, 0.370160f, 0.370071f, 0.369982f,
+ 0.369892f, 0.369803f, 0.369714f, 0.369625f, 0.369536f, 0.369447f, 0.369358f, 0.369269f,
+ 0.369180f, 0.369091f, 0.369002f, 0.368912f, 0.368823f, 0.368734f, 0.368645f, 0.368556f,
+ 0.368467f, 0.368378f, 0.368289f, 0.368199f, 0.368110f, 0.368021f, 0.367932f, 0.367843f,
+ 0.367754f, 0.367665f, 0.367575f, 0.367486f, 0.367397f, 0.367308f, 0.367219f, 0.367130f,
+ 0.367040f, 0.366951f, 0.366862f, 0.366773f, 0.366684f, 0.366594f, 0.366505f, 0.366416f,
+ 0.366327f, 0.366238f, 0.366148f, 0.366059f, 0.365970f, 0.365881f, 0.365791f, 0.365702f,
+ 0.365613f, 0.365524f, 0.365435f, 0.365345f, 0.365256f, 0.365167f, 0.365078f, 0.364988f,
+ 0.364899f, 0.364810f, 0.364720f, 0.364631f, 0.364542f, 0.364453f, 0.364363f, 0.364274f,
+ 0.364185f, 0.364096f, 0.364006f, 0.363917f, 0.363828f, 0.363738f, 0.363649f, 0.363560f,
+ 0.363470f, 0.363381f, 0.363292f, 0.363202f, 0.363113f, 0.363024f, 0.362934f, 0.362845f,
+ 0.362756f, 0.362666f, 0.362577f, 0.362488f, 0.362398f, 0.362309f, 0.362220f, 0.362130f,
+ 0.362041f, 0.361952f, 0.361862f, 0.361773f, 0.361683f, 0.361594f, 0.361505f, 0.361415f,
+ 0.361326f, 0.361236f, 0.361147f, 0.361058f, 0.360968f, 0.360879f, 0.360789f, 0.360700f,
+ 0.360611f, 0.360521f, 0.360432f, 0.360342f, 0.360253f, 0.360163f, 0.360074f, 0.359984f,
+ 0.359895f, 0.359806f, 0.359716f, 0.359627f, 0.359537f, 0.359448f, 0.359358f, 0.359269f,
+ 0.359179f, 0.359090f, 0.359000f, 0.358911f, 0.358821f, 0.358732f, 0.358642f, 0.358553f,
+ 0.358463f, 0.358374f, 0.358284f, 0.358195f, 0.358105f, 0.358016f, 0.357926f, 0.357837f,
+ 0.357747f, 0.357658f, 0.357568f, 0.357479f, 0.357389f, 0.357300f, 0.357210f, 0.357121f,
+ 0.357031f, 0.356941f, 0.356852f, 0.356762f, 0.356673f, 0.356583f, 0.356494f, 0.356404f,
+ 0.356314f, 0.356225f, 0.356135f, 0.356046f, 0.355956f, 0.355866f, 0.355777f, 0.355687f,
+ 0.355598f, 0.355508f, 0.355418f, 0.355329f, 0.355239f, 0.355150f, 0.355060f, 0.354970f,
+ 0.354881f, 0.354791f, 0.354701f, 0.354612f, 0.354522f, 0.354432f, 0.354343f, 0.354253f,
+ 0.354164f, 0.354074f, 0.353984f, 0.353895f, 0.353805f, 0.353715f, 0.353626f, 0.353536f,
+ 0.353446f, 0.353356f, 0.353267f, 0.353177f, 0.353087f, 0.352998f, 0.352908f, 0.352818f,
+ 0.352729f, 0.352639f, 0.352549f, 0.352459f, 0.352370f, 0.352280f, 0.352190f, 0.352100f,
+ 0.352011f, 0.351921f, 0.351831f, 0.351742f, 0.351652f, 0.351562f, 0.351472f, 0.351383f,
+ 0.351293f, 0.351203f, 0.351113f, 0.351023f, 0.350934f, 0.350844f, 0.350754f, 0.350664f,
+ 0.350575f, 0.350485f, 0.350395f, 0.350305f, 0.350215f, 0.350126f, 0.350036f, 0.349946f,
+ 0.349856f, 0.349766f, 0.349676f, 0.349587f, 0.349497f, 0.349407f, 0.349317f, 0.349227f,
+ 0.349138f, 0.349048f, 0.348958f, 0.348868f, 0.348778f, 0.348688f, 0.348598f, 0.348509f,
+ 0.348419f, 0.348329f, 0.348239f, 0.348149f, 0.348059f, 0.347969f, 0.347879f, 0.347790f,
+ 0.347700f, 0.347610f, 0.347520f, 0.347430f, 0.347340f, 0.347250f, 0.347160f, 0.347070f,
+ 0.346980f, 0.346890f, 0.346801f, 0.346711f, 0.346621f, 0.346531f, 0.346441f, 0.346351f,
+ 0.346261f, 0.346171f, 0.346081f, 0.345991f, 0.345901f, 0.345811f, 0.345721f, 0.345631f,
+ 0.345541f, 0.345451f, 0.345361f, 0.345271f, 0.345181f, 0.345091f, 0.345001f, 0.344911f,
+ 0.344821f, 0.344731f, 0.344641f, 0.344551f, 0.344461f, 0.344371f, 0.344281f, 0.344191f,
+ 0.344101f, 0.344011f, 0.343921f, 0.343831f, 0.343741f, 0.343651f, 0.343561f, 0.343471f,
+ 0.343381f, 0.343291f, 0.343201f, 0.343111f, 0.343021f, 0.342931f, 0.342841f, 0.342751f,
+ 0.342661f, 0.342571f, 0.342481f, 0.342391f, 0.342300f, 0.342210f, 0.342120f, 0.342030f,
+ 0.341940f, 0.341850f, 0.341760f, 0.341670f, 0.341580f, 0.341490f, 0.341399f, 0.341309f,
+ 0.341219f, 0.341129f, 0.341039f, 0.340949f, 0.340859f, 0.340769f, 0.340678f, 0.340588f,
+ 0.340498f, 0.340408f, 0.340318f, 0.340228f, 0.340138f, 0.340047f, 0.339957f, 0.339867f,
+ 0.339777f, 0.339687f, 0.339597f, 0.339506f, 0.339416f, 0.339326f, 0.339236f, 0.339146f,
+ 0.339055f, 0.338965f, 0.338875f, 0.338785f, 0.338695f, 0.338604f, 0.338514f, 0.338424f,
+ 0.338334f, 0.338244f, 0.338153f, 0.338063f, 0.337973f, 0.337883f, 0.337792f, 0.337702f,
+ 0.337612f, 0.337522f, 0.337431f, 0.337341f, 0.337251f, 0.337161f, 0.337070f, 0.336980f,
+ 0.336890f, 0.336800f, 0.336709f, 0.336619f, 0.336529f, 0.336438f, 0.336348f, 0.336258f,
+ 0.336168f, 0.336077f, 0.335987f, 0.335897f, 0.335806f, 0.335716f, 0.335626f, 0.335535f,
+ 0.335445f, 0.335355f, 0.335265f, 0.335174f, 0.335084f, 0.334994f, 0.334903f, 0.334813f,
+ 0.334722f, 0.334632f, 0.334542f, 0.334451f, 0.334361f, 0.334271f, 0.334180f, 0.334090f,
+ 0.334000f, 0.333909f, 0.333819f, 0.333729f, 0.333638f, 0.333548f, 0.333457f, 0.333367f,
+ 0.333277f, 0.333186f, 0.333096f, 0.333005f, 0.332915f, 0.332825f, 0.332734f, 0.332644f,
+ 0.332553f, 0.332463f, 0.332373f, 0.332282f, 0.332192f, 0.332101f, 0.332011f, 0.331920f,
+ 0.331830f, 0.331739f, 0.331649f, 0.331559f, 0.331468f, 0.331378f, 0.331287f, 0.331197f,
+ 0.331106f, 0.331016f, 0.330925f, 0.330835f, 0.330744f, 0.330654f, 0.330563f, 0.330473f,
+ 0.330382f, 0.330292f, 0.330202f, 0.330111f, 0.330020f, 0.329930f, 0.329839f, 0.329749f,
+ 0.329658f, 0.329568f, 0.329477f, 0.329387f, 0.329296f, 0.329206f, 0.329115f, 0.329025f,
+ 0.328934f, 0.328844f, 0.328753f, 0.328663f, 0.328572f, 0.328482f, 0.328391f, 0.328300f,
+ 0.328210f, 0.328119f, 0.328029f, 0.327938f, 0.327848f, 0.327757f, 0.327666f, 0.327576f,
+ 0.327485f, 0.327395f, 0.327304f, 0.327213f, 0.327123f, 0.327032f, 0.326942f, 0.326851f,
+ 0.326760f, 0.326670f, 0.326579f, 0.326489f, 0.326398f, 0.326307f, 0.326217f, 0.326126f,
+ 0.326035f, 0.325945f, 0.325854f, 0.325764f, 0.325673f, 0.325582f, 0.325492f, 0.325401f,
+ 0.325310f, 0.325220f, 0.325129f, 0.325038f, 0.324948f, 0.324857f, 0.324766f, 0.324676f,
+ 0.324585f, 0.324494f, 0.324404f, 0.324313f, 0.324222f, 0.324131f, 0.324041f, 0.323950f,
+ 0.323859f, 0.323769f, 0.323678f, 0.323587f, 0.323497f, 0.323406f, 0.323315f, 0.323224f,
+ 0.323134f, 0.323043f, 0.322952f, 0.322861f, 0.322771f, 0.322680f, 0.322589f, 0.322498f,
+ 0.322408f, 0.322317f, 0.322226f, 0.322135f, 0.322045f, 0.321954f, 0.321863f, 0.321772f,
+ 0.321682f, 0.321591f, 0.321500f, 0.321409f, 0.321318f, 0.321228f, 0.321137f, 0.321046f,
+ 0.320955f, 0.320864f, 0.320774f, 0.320683f, 0.320592f, 0.320501f, 0.320410f, 0.320320f,
+ 0.320229f, 0.320138f, 0.320047f, 0.319956f, 0.319865f, 0.319775f, 0.319684f, 0.319593f,
+ 0.319502f, 0.319411f, 0.319320f, 0.319229f, 0.319139f, 0.319048f, 0.318957f, 0.318866f,
+ 0.318775f, 0.318684f, 0.318593f, 0.318503f, 0.318412f, 0.318321f, 0.318230f, 0.318139f,
+ 0.318048f, 0.317957f, 0.317866f, 0.317775f, 0.317684f, 0.317594f, 0.317503f, 0.317412f,
+ 0.317321f, 0.317230f, 0.317139f, 0.317048f, 0.316957f, 0.316866f, 0.316775f, 0.316684f,
+ 0.316593f, 0.316502f, 0.316411f, 0.316321f, 0.316230f, 0.316139f, 0.316048f, 0.315957f,
+ 0.315866f, 0.315775f, 0.315684f, 0.315593f, 0.315502f, 0.315411f, 0.315320f, 0.315229f,
+ 0.315138f, 0.315047f, 0.314956f, 0.314865f, 0.314774f, 0.314683f, 0.314592f, 0.314501f,
+ 0.314410f, 0.314319f, 0.314228f, 0.314137f, 0.314046f, 0.313955f, 0.313864f, 0.313773f,
+ 0.313682f, 0.313591f, 0.313500f, 0.313409f, 0.313318f, 0.313227f, 0.313135f, 0.313044f,
+ 0.312953f, 0.312862f, 0.312771f, 0.312680f, 0.312589f, 0.312498f, 0.312407f, 0.312316f,
+ 0.312225f, 0.312134f, 0.312043f, 0.311952f, 0.311860f, 0.311769f, 0.311678f, 0.311587f,
+ 0.311496f, 0.311405f, 0.311314f, 0.311223f, 0.311132f, 0.311041f, 0.310949f, 0.310858f,
+ 0.310767f, 0.310676f, 0.310585f, 0.310494f, 0.310403f, 0.310311f, 0.310220f, 0.310129f,
+ 0.310038f, 0.309947f, 0.309856f, 0.309765f, 0.309673f, 0.309582f, 0.309491f, 0.309400f,
+ 0.309309f, 0.309218f, 0.309126f, 0.309035f, 0.308944f, 0.308853f, 0.308762f, 0.308670f,
+ 0.308579f, 0.308488f, 0.308397f, 0.308306f, 0.308214f, 0.308123f, 0.308032f, 0.307941f,
+ 0.307850f, 0.307758f, 0.307667f, 0.307576f, 0.307485f, 0.307394f, 0.307302f, 0.307211f,
+ 0.307120f, 0.307029f, 0.306937f, 0.306846f, 0.306755f, 0.306664f, 0.306572f, 0.306481f,
+ 0.306390f, 0.306299f, 0.306207f, 0.306116f, 0.306025f, 0.305933f, 0.305842f, 0.305751f,
+ 0.305660f, 0.305568f, 0.305477f, 0.305386f, 0.305294f, 0.305203f, 0.305112f, 0.305021f,
+ 0.304929f, 0.304838f, 0.304747f, 0.304655f, 0.304564f, 0.304473f, 0.304381f, 0.304290f,
+ 0.304199f, 0.304107f, 0.304016f, 0.303925f, 0.303833f, 0.303742f, 0.303651f, 0.303559f,
+ 0.303468f, 0.303377f, 0.303285f, 0.303194f, 0.303103f, 0.303011f, 0.302920f, 0.302828f,
+ 0.302737f, 0.302646f, 0.302554f, 0.302463f, 0.302372f, 0.302280f, 0.302189f, 0.302097f,
+ 0.302006f, 0.301915f, 0.301823f, 0.301732f, 0.301640f, 0.301549f, 0.301458f, 0.301366f,
+ 0.301275f, 0.301183f, 0.301092f, 0.301000f, 0.300909f, 0.300818f, 0.300726f, 0.300635f,
+ 0.300543f, 0.300452f, 0.300360f, 0.300269f, 0.300177f, 0.300086f, 0.299995f, 0.299903f,
+ 0.299812f, 0.299720f, 0.299629f, 0.299537f, 0.299446f, 0.299354f, 0.299263f, 0.299171f,
+ 0.299080f, 0.298988f, 0.298897f, 0.298805f, 0.298714f, 0.298622f, 0.298531f, 0.298439f,
+ 0.298348f, 0.298256f, 0.298165f, 0.298073f, 0.297982f, 0.297890f, 0.297799f, 0.297707f,
+ 0.297616f, 0.297524f, 0.297433f, 0.297341f, 0.297250f, 0.297158f, 0.297066f, 0.296975f,
+ 0.296883f, 0.296792f, 0.296700f, 0.296609f, 0.296517f, 0.296426f, 0.296334f, 0.296242f,
+ 0.296151f, 0.296059f, 0.295968f, 0.295876f, 0.295785f, 0.295693f, 0.295601f, 0.295510f,
+ 0.295418f, 0.295327f, 0.295235f, 0.295143f, 0.295052f, 0.294960f, 0.294869f, 0.294777f,
+ 0.294685f, 0.294594f, 0.294502f, 0.294410f, 0.294319f, 0.294227f, 0.294136f, 0.294044f,
+ 0.293952f, 0.293861f, 0.293769f, 0.293677f, 0.293586f, 0.293494f, 0.293402f, 0.293311f,
+ 0.293219f, 0.293128f, 0.293036f, 0.292944f, 0.292852f, 0.292761f, 0.292669f, 0.292577f,
+ 0.292486f, 0.292394f, 0.292302f, 0.292211f, 0.292119f, 0.292027f, 0.291936f, 0.291844f,
+ 0.291752f, 0.291661f, 0.291569f, 0.291477f, 0.291385f, 0.291294f, 0.291202f, 0.291110f,
+ 0.291019f, 0.290927f, 0.290835f, 0.290743f, 0.290652f, 0.290560f, 0.290468f, 0.290376f,
+ 0.290285f, 0.290193f, 0.290101f, 0.290009f, 0.289918f, 0.289826f, 0.289734f, 0.289642f,
+ 0.289551f, 0.289459f, 0.289367f, 0.289275f, 0.289184f, 0.289092f, 0.289000f, 0.288908f,
+ 0.288816f, 0.288725f, 0.288633f, 0.288541f, 0.288449f, 0.288357f, 0.288266f, 0.288174f,
+ 0.288082f, 0.287990f, 0.287898f, 0.287807f, 0.287715f, 0.287623f, 0.287531f, 0.287439f,
+ 0.287347f, 0.287256f, 0.287164f, 0.287072f, 0.286980f, 0.286888f, 0.286796f, 0.286705f,
+ 0.286613f, 0.286521f, 0.286429f, 0.286337f, 0.286245f, 0.286153f, 0.286062f, 0.285970f,
+ 0.285878f, 0.285786f, 0.285694f, 0.285602f, 0.285510f, 0.285418f, 0.285327f, 0.285235f,
+ 0.285143f, 0.285051f, 0.284959f, 0.284867f, 0.284775f, 0.284683f, 0.284591f, 0.284499f,
+ 0.284408f, 0.284316f, 0.284224f, 0.284132f, 0.284040f, 0.283948f, 0.283856f, 0.283764f,
+ 0.283672f, 0.283580f, 0.283488f, 0.283396f, 0.283304f, 0.283212f, 0.283120f, 0.283029f,
+ 0.282937f, 0.282845f, 0.282753f, 0.282661f, 0.282569f, 0.282477f, 0.282385f, 0.282293f,
+ 0.282201f, 0.282109f, 0.282017f, 0.281925f, 0.281833f, 0.281741f, 0.281649f, 0.281557f,
+ 0.281465f, 0.281373f, 0.281281f, 0.281189f, 0.281097f, 0.281005f, 0.280913f, 0.280821f,
+ 0.280729f, 0.280637f, 0.280545f, 0.280453f, 0.280361f, 0.280269f, 0.280177f, 0.280085f,
+ 0.279993f, 0.279901f, 0.279809f, 0.279717f, 0.279624f, 0.279532f, 0.279440f, 0.279348f,
+ 0.279256f, 0.279164f, 0.279072f, 0.278980f, 0.278888f, 0.278796f, 0.278704f, 0.278612f,
+ 0.278520f, 0.278428f, 0.278336f, 0.278243f, 0.278151f, 0.278059f, 0.277967f, 0.277875f,
+ 0.277783f, 0.277691f, 0.277599f, 0.277507f, 0.277415f, 0.277322f, 0.277230f, 0.277138f,
+ 0.277046f, 0.276954f, 0.276862f, 0.276770f, 0.276678f, 0.276585f, 0.276493f, 0.276401f,
+ 0.276309f, 0.276217f, 0.276125f, 0.276033f, 0.275940f, 0.275848f, 0.275756f, 0.275664f,
+ 0.275572f, 0.275480f, 0.275387f, 0.275295f, 0.275203f, 0.275111f, 0.275019f, 0.274927f,
+ 0.274834f, 0.274742f, 0.274650f, 0.274558f, 0.274466f, 0.274374f, 0.274281f, 0.274189f,
+ 0.274097f, 0.274005f, 0.273912f, 0.273820f, 0.273728f, 0.273636f, 0.273544f, 0.273451f,
+ 0.273359f, 0.273267f, 0.273175f, 0.273083f, 0.272990f, 0.272898f, 0.272806f, 0.272714f,
+ 0.272621f, 0.272529f, 0.272437f, 0.272345f, 0.272252f, 0.272160f, 0.272068f, 0.271976f,
+ 0.271883f, 0.271791f, 0.271699f, 0.271607f, 0.271514f, 0.271422f, 0.271330f, 0.271237f,
+ 0.271145f, 0.271053f, 0.270961f, 0.270868f, 0.270776f, 0.270684f, 0.270591f, 0.270499f,
+ 0.270407f, 0.270315f, 0.270222f, 0.270130f, 0.270038f, 0.269945f, 0.269853f, 0.269761f,
+ 0.269668f, 0.269576f, 0.269484f, 0.269391f, 0.269299f, 0.269207f, 0.269114f, 0.269022f,
+ 0.268930f, 0.268837f, 0.268745f, 0.268653f, 0.268560f, 0.268468f, 0.268376f, 0.268283f,
+ 0.268191f, 0.268099f, 0.268006f, 0.267914f, 0.267821f, 0.267729f, 0.267637f, 0.267544f,
+ 0.267452f, 0.267359f, 0.267267f, 0.267175f, 0.267082f, 0.266990f, 0.266898f, 0.266805f,
+ 0.266713f, 0.266620f, 0.266528f, 0.266436f, 0.266343f, 0.266251f, 0.266158f, 0.266066f,
+ 0.265973f, 0.265881f, 0.265789f, 0.265696f, 0.265604f, 0.265511f, 0.265419f, 0.265326f,
+ 0.265234f, 0.265142f, 0.265049f, 0.264957f, 0.264864f, 0.264772f, 0.264679f, 0.264587f,
+ 0.264494f, 0.264402f, 0.264309f, 0.264217f, 0.264125f, 0.264032f, 0.263940f, 0.263847f,
+ 0.263755f, 0.263662f, 0.263570f, 0.263477f, 0.263385f, 0.263292f, 0.263200f, 0.263107f,
+ 0.263015f, 0.262922f, 0.262830f, 0.262737f, 0.262645f, 0.262552f, 0.262460f, 0.262367f,
+ 0.262275f, 0.262182f, 0.262090f, 0.261997f, 0.261905f, 0.261812f, 0.261720f, 0.261627f,
+ 0.261534f, 0.261442f, 0.261349f, 0.261257f, 0.261164f, 0.261072f, 0.260979f, 0.260887f,
+ 0.260794f, 0.260702f, 0.260609f, 0.260516f, 0.260424f, 0.260331f, 0.260239f, 0.260146f,
+ 0.260054f, 0.259961f, 0.259868f, 0.259776f, 0.259683f, 0.259591f, 0.259498f, 0.259405f,
+ 0.259313f, 0.259220f, 0.259128f, 0.259035f, 0.258943f, 0.258850f, 0.258757f, 0.258665f,
+ 0.258572f, 0.258479f, 0.258387f, 0.258294f, 0.258202f, 0.258109f, 0.258016f, 0.257924f,
+ 0.257831f, 0.257738f, 0.257646f, 0.257553f, 0.257461f, 0.257368f, 0.257275f, 0.257183f,
+ 0.257090f, 0.256997f, 0.256905f, 0.256812f, 0.256719f, 0.256627f, 0.256534f, 0.256441f,
+ 0.256349f, 0.256256f, 0.256163f, 0.256071f, 0.255978f, 0.255885f, 0.255793f, 0.255700f,
+ 0.255607f, 0.255515f, 0.255422f, 0.255329f, 0.255236f, 0.255144f, 0.255051f, 0.254958f,
+ 0.254866f, 0.254773f, 0.254680f, 0.254588f, 0.254495f, 0.254402f, 0.254309f, 0.254217f,
+ 0.254124f, 0.254031f, 0.253938f, 0.253846f, 0.253753f, 0.253660f, 0.253568f, 0.253475f,
+ 0.253382f, 0.253289f, 0.253197f, 0.253104f, 0.253011f, 0.252918f, 0.252826f, 0.252733f,
+ 0.252640f, 0.252547f, 0.252454f, 0.252362f, 0.252269f, 0.252176f, 0.252083f, 0.251991f,
+ 0.251898f, 0.251805f, 0.251712f, 0.251619f, 0.251527f, 0.251434f, 0.251341f, 0.251248f,
+ 0.251155f, 0.251063f, 0.250970f, 0.250877f, 0.250784f, 0.250691f, 0.250599f, 0.250506f,
+ 0.250413f, 0.250320f, 0.250227f, 0.250135f, 0.250042f, 0.249949f, 0.249856f, 0.249763f,
+ 0.249670f, 0.249578f, 0.249485f, 0.249392f, 0.249299f, 0.249206f, 0.249113f, 0.249020f,
+ 0.248928f, 0.248835f, 0.248742f, 0.248649f, 0.248556f, 0.248463f, 0.248370f, 0.248278f,
+ 0.248185f, 0.248092f, 0.247999f, 0.247906f, 0.247813f, 0.247720f, 0.247627f, 0.247535f,
+ 0.247442f, 0.247349f, 0.247256f, 0.247163f, 0.247070f, 0.246977f, 0.246884f, 0.246791f,
+ 0.246698f, 0.246606f, 0.246513f, 0.246420f, 0.246327f, 0.246234f, 0.246141f, 0.246048f,
+ 0.245955f, 0.245862f, 0.245769f, 0.245676f, 0.245583f, 0.245490f, 0.245397f, 0.245304f,
+ 0.245212f, 0.245119f, 0.245026f, 0.244933f, 0.244840f, 0.244747f, 0.244654f, 0.244561f,
+ 0.244468f, 0.244375f, 0.244282f, 0.244189f, 0.244096f, 0.244003f, 0.243910f, 0.243817f,
+ 0.243724f, 0.243631f, 0.243538f, 0.243445f, 0.243352f, 0.243259f, 0.243166f, 0.243073f,
+ 0.242980f, 0.242887f, 0.242794f, 0.242701f, 0.242608f, 0.242515f, 0.242422f, 0.242329f,
+ 0.242236f, 0.242143f, 0.242050f, 0.241957f, 0.241864f, 0.241771f, 0.241678f, 0.241585f,
+ 0.241492f, 0.241399f, 0.241306f, 0.241213f, 0.241120f, 0.241027f, 0.240934f, 0.240841f,
+ 0.240748f, 0.240654f, 0.240561f, 0.240468f, 0.240375f, 0.240282f, 0.240189f, 0.240096f,
+ 0.240003f, 0.239910f, 0.239817f, 0.239724f, 0.239631f, 0.239538f, 0.239445f, 0.239351f,
+ 0.239258f, 0.239165f, 0.239072f, 0.238979f, 0.238886f, 0.238793f, 0.238700f, 0.238607f,
+ 0.238514f, 0.238420f, 0.238327f, 0.238234f, 0.238141f, 0.238048f, 0.237955f, 0.237862f,
+ 0.237769f, 0.237676f, 0.237582f, 0.237489f, 0.237396f, 0.237303f, 0.237210f, 0.237117f,
+ 0.237024f, 0.236930f, 0.236837f, 0.236744f, 0.236651f, 0.236558f, 0.236465f, 0.236372f,
+ 0.236278f, 0.236185f, 0.236092f, 0.235999f, 0.235906f, 0.235813f, 0.235719f, 0.235626f,
+ 0.235533f, 0.235440f, 0.235347f, 0.235254f, 0.235160f, 0.235067f, 0.234974f, 0.234881f,
+ 0.234788f, 0.234694f, 0.234601f, 0.234508f, 0.234415f, 0.234322f, 0.234228f, 0.234135f,
+ 0.234042f, 0.233949f, 0.233856f, 0.233762f, 0.233669f, 0.233576f, 0.233483f, 0.233389f,
+ 0.233296f, 0.233203f, 0.233110f, 0.233017f, 0.232923f, 0.232830f, 0.232737f, 0.232644f,
+ 0.232550f, 0.232457f, 0.232364f, 0.232271f, 0.232177f, 0.232084f, 0.231991f, 0.231898f,
+ 0.231804f, 0.231711f, 0.231618f, 0.231524f, 0.231431f, 0.231338f, 0.231245f, 0.231151f,
+ 0.231058f, 0.230965f, 0.230872f, 0.230778f, 0.230685f, 0.230592f, 0.230498f, 0.230405f,
+ 0.230312f, 0.230218f, 0.230125f, 0.230032f, 0.229939f, 0.229845f, 0.229752f, 0.229659f,
+ 0.229565f, 0.229472f, 0.229379f, 0.229285f, 0.229192f, 0.229099f, 0.229005f, 0.228912f,
+ 0.228819f, 0.228725f, 0.228632f, 0.228539f, 0.228445f, 0.228352f, 0.228259f, 0.228165f,
+ 0.228072f, 0.227979f, 0.227885f, 0.227792f, 0.227699f, 0.227605f, 0.227512f, 0.227419f,
+ 0.227325f, 0.227232f, 0.227139f, 0.227045f, 0.226952f, 0.226858f, 0.226765f, 0.226672f,
+ 0.226578f, 0.226485f, 0.226391f, 0.226298f, 0.226205f, 0.226111f, 0.226018f, 0.225925f,
+ 0.225831f, 0.225738f, 0.225644f, 0.225551f, 0.225458f, 0.225364f, 0.225271f, 0.225177f,
+ 0.225084f, 0.224991f, 0.224897f, 0.224804f, 0.224710f, 0.224617f, 0.224523f, 0.224430f,
+ 0.224337f, 0.224243f, 0.224150f, 0.224056f, 0.223963f, 0.223869f, 0.223776f, 0.223682f,
+ 0.223589f, 0.223496f, 0.223402f, 0.223309f, 0.223215f, 0.223122f, 0.223028f, 0.222935f,
+ 0.222841f, 0.222748f, 0.222654f, 0.222561f, 0.222468f, 0.222374f, 0.222281f, 0.222187f,
+ 0.222094f, 0.222000f, 0.221907f, 0.221813f, 0.221720f, 0.221626f, 0.221533f, 0.221439f,
+ 0.221346f, 0.221252f, 0.221159f, 0.221065f, 0.220972f, 0.220878f, 0.220785f, 0.220691f,
+ 0.220598f, 0.220504f, 0.220411f, 0.220317f, 0.220224f, 0.220130f, 0.220037f, 0.219943f,
+ 0.219850f, 0.219756f, 0.219662f, 0.219569f, 0.219475f, 0.219382f, 0.219288f, 0.219195f,
+ 0.219101f, 0.219008f, 0.218914f, 0.218821f, 0.218727f, 0.218633f, 0.218540f, 0.218446f,
+ 0.218353f, 0.218259f, 0.218166f, 0.218072f, 0.217979f, 0.217885f, 0.217791f, 0.217698f,
+ 0.217604f, 0.217511f, 0.217417f, 0.217324f, 0.217230f, 0.217136f, 0.217043f, 0.216949f,
+ 0.216856f, 0.216762f, 0.216668f, 0.216575f, 0.216481f, 0.216388f, 0.216294f, 0.216200f,
+ 0.216107f, 0.216013f, 0.215920f, 0.215826f, 0.215732f, 0.215639f, 0.215545f, 0.215451f,
+ 0.215358f, 0.215264f, 0.215171f, 0.215077f, 0.214983f, 0.214890f, 0.214796f, 0.214702f,
+ 0.214609f, 0.214515f, 0.214422f, 0.214328f, 0.214234f, 0.214141f, 0.214047f, 0.213953f,
+ 0.213860f, 0.213766f, 0.213672f, 0.213579f, 0.213485f, 0.213391f, 0.213298f, 0.213204f,
+ 0.213110f, 0.213017f, 0.212923f, 0.212829f, 0.212736f, 0.212642f, 0.212548f, 0.212455f,
+ 0.212361f, 0.212267f, 0.212174f, 0.212080f, 0.211986f, 0.211892f, 0.211799f, 0.211705f,
+ 0.211611f, 0.211518f, 0.211424f, 0.211330f, 0.211237f, 0.211143f, 0.211049f, 0.210955f,
+ 0.210862f, 0.210768f, 0.210674f, 0.210580f, 0.210487f, 0.210393f, 0.210299f, 0.210206f,
+ 0.210112f, 0.210018f, 0.209924f, 0.209831f, 0.209737f, 0.209643f, 0.209549f, 0.209456f,
+ 0.209362f, 0.209268f, 0.209174f, 0.209081f, 0.208987f, 0.208893f, 0.208799f, 0.208706f,
+ 0.208612f, 0.208518f, 0.208424f, 0.208331f, 0.208237f, 0.208143f, 0.208049f, 0.207955f,
+ 0.207862f, 0.207768f, 0.207674f, 0.207580f, 0.207487f, 0.207393f, 0.207299f, 0.207205f,
+ 0.207111f, 0.207018f, 0.206924f, 0.206830f, 0.206736f, 0.206642f, 0.206549f, 0.206455f,
+ 0.206361f, 0.206267f, 0.206173f, 0.206080f, 0.205986f, 0.205892f, 0.205798f, 0.205704f,
+ 0.205610f, 0.205517f, 0.205423f, 0.205329f, 0.205235f, 0.205141f, 0.205047f, 0.204954f,
+ 0.204860f, 0.204766f, 0.204672f, 0.204578f, 0.204484f, 0.204391f, 0.204297f, 0.204203f,
+ 0.204109f, 0.204015f, 0.203921f, 0.203827f, 0.203734f, 0.203640f, 0.203546f, 0.203452f,
+ 0.203358f, 0.203264f, 0.203170f, 0.203076f, 0.202983f, 0.202889f, 0.202795f, 0.202701f,
+ 0.202607f, 0.202513f, 0.202419f, 0.202325f, 0.202231f, 0.202138f, 0.202044f, 0.201950f,
+ 0.201856f, 0.201762f, 0.201668f, 0.201574f, 0.201480f, 0.201386f, 0.201292f, 0.201199f,
+ 0.201105f, 0.201011f, 0.200917f, 0.200823f, 0.200729f, 0.200635f, 0.200541f, 0.200447f,
+ 0.200353f, 0.200259f, 0.200165f, 0.200071f, 0.199978f, 0.199884f, 0.199790f, 0.199696f,
+ 0.199602f, 0.199508f, 0.199414f, 0.199320f, 0.199226f, 0.199132f, 0.199038f, 0.198944f,
+ 0.198850f, 0.198756f, 0.198662f, 0.198568f, 0.198474f, 0.198380f, 0.198286f, 0.198192f,
+ 0.198098f, 0.198004f, 0.197910f, 0.197816f, 0.197722f, 0.197629f, 0.197535f, 0.197441f,
+ 0.197347f, 0.197253f, 0.197159f, 0.197065f, 0.196971f, 0.196877f, 0.196783f, 0.196689f,
+ 0.196595f, 0.196501f, 0.196407f, 0.196313f, 0.196219f, 0.196125f, 0.196031f, 0.195937f,
+ 0.195843f, 0.195748f, 0.195654f, 0.195560f, 0.195466f, 0.195372f, 0.195278f, 0.195184f,
+ 0.195090f, 0.194996f, 0.194902f, 0.194808f, 0.194714f, 0.194620f, 0.194526f, 0.194432f,
+ 0.194338f, 0.194244f, 0.194150f, 0.194056f, 0.193962f, 0.193868f, 0.193774f, 0.193680f,
+ 0.193586f, 0.193492f, 0.193397f, 0.193303f, 0.193209f, 0.193115f, 0.193021f, 0.192927f,
+ 0.192833f, 0.192739f, 0.192645f, 0.192551f, 0.192457f, 0.192363f, 0.192269f, 0.192174f,
+ 0.192080f, 0.191986f, 0.191892f, 0.191798f, 0.191704f, 0.191610f, 0.191516f, 0.191422f,
+ 0.191328f, 0.191234f, 0.191139f, 0.191045f, 0.190951f, 0.190857f, 0.190763f, 0.190669f,
+ 0.190575f, 0.190481f, 0.190387f, 0.190292f, 0.190198f, 0.190104f, 0.190010f, 0.189916f,
+ 0.189822f, 0.189728f, 0.189634f, 0.189539f, 0.189445f, 0.189351f, 0.189257f, 0.189163f,
+ 0.189069f, 0.188975f, 0.188880f, 0.188786f, 0.188692f, 0.188598f, 0.188504f, 0.188410f,
+ 0.188315f, 0.188221f, 0.188127f, 0.188033f, 0.187939f, 0.187845f, 0.187750f, 0.187656f,
+ 0.187562f, 0.187468f, 0.187374f, 0.187280f, 0.187185f, 0.187091f, 0.186997f, 0.186903f,
+ 0.186809f, 0.186715f, 0.186620f, 0.186526f, 0.186432f, 0.186338f, 0.186244f, 0.186149f,
+ 0.186055f, 0.185961f, 0.185867f, 0.185773f, 0.185678f, 0.185584f, 0.185490f, 0.185396f,
+ 0.185301f, 0.185207f, 0.185113f, 0.185019f, 0.184925f, 0.184830f, 0.184736f, 0.184642f,
+ 0.184548f, 0.184454f, 0.184359f, 0.184265f, 0.184171f, 0.184077f, 0.183982f, 0.183888f,
+ 0.183794f, 0.183700f, 0.183605f, 0.183511f, 0.183417f, 0.183323f, 0.183228f, 0.183134f,
+ 0.183040f, 0.182946f, 0.182851f, 0.182757f, 0.182663f, 0.182569f, 0.182474f, 0.182380f,
+ 0.182286f, 0.182192f, 0.182097f, 0.182003f, 0.181909f, 0.181814f, 0.181720f, 0.181626f,
+ 0.181532f, 0.181437f, 0.181343f, 0.181249f, 0.181154f, 0.181060f, 0.180966f, 0.180872f,
+ 0.180777f, 0.180683f, 0.180589f, 0.180494f, 0.180400f, 0.180306f, 0.180212f, 0.180117f,
+ 0.180023f, 0.179929f, 0.179834f, 0.179740f, 0.179646f, 0.179551f, 0.179457f, 0.179363f,
+ 0.179268f, 0.179174f, 0.179080f, 0.178985f, 0.178891f, 0.178797f, 0.178702f, 0.178608f,
+ 0.178514f, 0.178419f, 0.178325f, 0.178231f, 0.178136f, 0.178042f, 0.177948f, 0.177853f,
+ 0.177759f, 0.177665f, 0.177570f, 0.177476f, 0.177382f, 0.177287f, 0.177193f, 0.177099f,
+ 0.177004f, 0.176910f, 0.176815f, 0.176721f, 0.176627f, 0.176532f, 0.176438f, 0.176344f,
+ 0.176249f, 0.176155f, 0.176061f, 0.175966f, 0.175872f, 0.175777f, 0.175683f, 0.175589f,
+ 0.175494f, 0.175400f, 0.175305f, 0.175211f, 0.175117f, 0.175022f, 0.174928f, 0.174834f,
+ 0.174739f, 0.174645f, 0.174550f, 0.174456f, 0.174362f, 0.174267f, 0.174173f, 0.174078f,
+ 0.173984f, 0.173889f, 0.173795f, 0.173701f, 0.173606f, 0.173512f, 0.173417f, 0.173323f,
+ 0.173229f, 0.173134f, 0.173040f, 0.172945f, 0.172851f, 0.172756f, 0.172662f, 0.172568f,
+ 0.172473f, 0.172379f, 0.172284f, 0.172190f, 0.172095f, 0.172001f, 0.171906f, 0.171812f,
+ 0.171718f, 0.171623f, 0.171529f, 0.171434f, 0.171340f, 0.171245f, 0.171151f, 0.171056f,
+ 0.170962f, 0.170867f, 0.170773f, 0.170678f, 0.170584f, 0.170490f, 0.170395f, 0.170301f,
+ 0.170206f, 0.170112f, 0.170017f, 0.169923f, 0.169828f, 0.169734f, 0.169639f, 0.169545f,
+ 0.169450f, 0.169356f, 0.169261f, 0.169167f, 0.169072f, 0.168978f, 0.168883f, 0.168789f,
+ 0.168694f, 0.168600f, 0.168505f, 0.168411f, 0.168316f, 0.168222f, 0.168127f, 0.168033f,
+ 0.167938f, 0.167844f, 0.167749f, 0.167655f, 0.167560f, 0.167466f, 0.167371f, 0.167277f,
+ 0.167182f, 0.167088f, 0.166993f, 0.166899f, 0.166804f, 0.166710f, 0.166615f, 0.166520f,
+ 0.166426f, 0.166331f, 0.166237f, 0.166142f, 0.166048f, 0.165953f, 0.165859f, 0.165764f,
+ 0.165670f, 0.165575f, 0.165480f, 0.165386f, 0.165291f, 0.165197f, 0.165102f, 0.165008f,
+ 0.164913f, 0.164819f, 0.164724f, 0.164629f, 0.164535f, 0.164440f, 0.164346f, 0.164251f,
+ 0.164157f, 0.164062f, 0.163967f, 0.163873f, 0.163778f, 0.163684f, 0.163589f, 0.163495f,
+ 0.163400f, 0.163305f, 0.163211f, 0.163116f, 0.163022f, 0.162927f, 0.162832f, 0.162738f,
+ 0.162643f, 0.162549f, 0.162454f, 0.162359f, 0.162265f, 0.162170f, 0.162076f, 0.161981f,
+ 0.161886f, 0.161792f, 0.161697f, 0.161603f, 0.161508f, 0.161413f, 0.161319f, 0.161224f,
+ 0.161129f, 0.161035f, 0.160940f, 0.160846f, 0.160751f, 0.160656f, 0.160562f, 0.160467f,
+ 0.160372f, 0.160278f, 0.160183f, 0.160089f, 0.159994f, 0.159899f, 0.159805f, 0.159710f,
+ 0.159615f, 0.159521f, 0.159426f, 0.159331f, 0.159237f, 0.159142f, 0.159047f, 0.158953f,
+ 0.158858f, 0.158763f, 0.158669f, 0.158574f, 0.158480f, 0.158385f, 0.158290f, 0.158196f,
+ 0.158101f, 0.158006f, 0.157912f, 0.157817f, 0.157722f, 0.157627f, 0.157533f, 0.157438f,
+ 0.157343f, 0.157249f, 0.157154f, 0.157059f, 0.156965f, 0.156870f, 0.156775f, 0.156681f,
+ 0.156586f, 0.156491f, 0.156397f, 0.156302f, 0.156207f, 0.156112f, 0.156018f, 0.155923f,
+ 0.155828f, 0.155734f, 0.155639f, 0.155544f, 0.155450f, 0.155355f, 0.155260f, 0.155165f,
+ 0.155071f, 0.154976f, 0.154881f, 0.154787f, 0.154692f, 0.154597f, 0.154502f, 0.154408f,
+ 0.154313f, 0.154218f, 0.154124f, 0.154029f, 0.153934f, 0.153839f, 0.153745f, 0.153650f,
+ 0.153555f, 0.153460f, 0.153366f, 0.153271f, 0.153176f, 0.153081f, 0.152987f, 0.152892f,
+ 0.152797f, 0.152702f, 0.152608f, 0.152513f, 0.152418f, 0.152323f, 0.152229f, 0.152134f,
+ 0.152039f, 0.151944f, 0.151850f, 0.151755f, 0.151660f, 0.151565f, 0.151471f, 0.151376f,
+ 0.151281f, 0.151186f, 0.151092f, 0.150997f, 0.150902f, 0.150807f, 0.150712f, 0.150618f,
+ 0.150523f, 0.150428f, 0.150333f, 0.150238f, 0.150144f, 0.150049f, 0.149954f, 0.149859f,
+ 0.149765f, 0.149670f, 0.149575f, 0.149480f, 0.149385f, 0.149291f, 0.149196f, 0.149101f,
+ 0.149006f, 0.148911f, 0.148817f, 0.148722f, 0.148627f, 0.148532f, 0.148437f, 0.148342f,
+ 0.148248f, 0.148153f, 0.148058f, 0.147963f, 0.147868f, 0.147774f, 0.147679f, 0.147584f,
+ 0.147489f, 0.147394f, 0.147299f, 0.147205f, 0.147110f, 0.147015f, 0.146920f, 0.146825f,
+ 0.146730f, 0.146636f, 0.146541f, 0.146446f, 0.146351f, 0.146256f, 0.146161f, 0.146067f,
+ 0.145972f, 0.145877f, 0.145782f, 0.145687f, 0.145592f, 0.145497f, 0.145403f, 0.145308f,
+ 0.145213f, 0.145118f, 0.145023f, 0.144928f, 0.144833f, 0.144739f, 0.144644f, 0.144549f,
+ 0.144454f, 0.144359f, 0.144264f, 0.144169f, 0.144075f, 0.143980f, 0.143885f, 0.143790f,
+ 0.143695f, 0.143600f, 0.143505f, 0.143410f, 0.143316f, 0.143221f, 0.143126f, 0.143031f,
+ 0.142936f, 0.142841f, 0.142746f, 0.142651f, 0.142556f, 0.142461f, 0.142367f, 0.142272f,
+ 0.142177f, 0.142082f, 0.141987f, 0.141892f, 0.141797f, 0.141702f, 0.141607f, 0.141512f,
+ 0.141418f, 0.141323f, 0.141228f, 0.141133f, 0.141038f, 0.140943f, 0.140848f, 0.140753f,
+ 0.140658f, 0.140563f, 0.140468f, 0.140373f, 0.140279f, 0.140184f, 0.140089f, 0.139994f,
+ 0.139899f, 0.139804f, 0.139709f, 0.139614f, 0.139519f, 0.139424f, 0.139329f, 0.139234f,
+ 0.139139f, 0.139044f, 0.138949f, 0.138855f, 0.138760f, 0.138665f, 0.138570f, 0.138475f,
+ 0.138380f, 0.138285f, 0.138190f, 0.138095f, 0.138000f, 0.137905f, 0.137810f, 0.137715f,
+ 0.137620f, 0.137525f, 0.137430f, 0.137335f, 0.137240f, 0.137145f, 0.137050f, 0.136955f,
+ 0.136860f, 0.136765f, 0.136670f, 0.136575f, 0.136480f, 0.136386f, 0.136291f, 0.136196f,
+ 0.136101f, 0.136006f, 0.135911f, 0.135816f, 0.135721f, 0.135626f, 0.135531f, 0.135436f,
+ 0.135341f, 0.135246f, 0.135151f, 0.135056f, 0.134961f, 0.134866f, 0.134771f, 0.134676f,
+ 0.134581f, 0.134486f, 0.134391f, 0.134296f, 0.134201f, 0.134106f, 0.134011f, 0.133916f,
+ 0.133821f, 0.133726f, 0.133631f, 0.133536f, 0.133441f, 0.133346f, 0.133251f, 0.133156f,
+ 0.133061f, 0.132966f, 0.132870f, 0.132775f, 0.132680f, 0.132585f, 0.132490f, 0.132395f,
+ 0.132300f, 0.132205f, 0.132110f, 0.132015f, 0.131920f, 0.131825f, 0.131730f, 0.131635f,
+ 0.131540f, 0.131445f, 0.131350f, 0.131255f, 0.131160f, 0.131065f, 0.130970f, 0.130875f,
+ 0.130780f, 0.130685f, 0.130590f, 0.130495f, 0.130399f, 0.130304f, 0.130209f, 0.130114f,
+ 0.130019f, 0.129924f, 0.129829f, 0.129734f, 0.129639f, 0.129544f, 0.129449f, 0.129354f,
+ 0.129259f, 0.129164f, 0.129069f, 0.128973f, 0.128878f, 0.128783f, 0.128688f, 0.128593f,
+ 0.128498f, 0.128403f, 0.128308f, 0.128213f, 0.128118f, 0.128023f, 0.127928f, 0.127833f,
+ 0.127737f, 0.127642f, 0.127547f, 0.127452f, 0.127357f, 0.127262f, 0.127167f, 0.127072f,
+ 0.126977f, 0.126882f, 0.126787f, 0.126691f, 0.126596f, 0.126501f, 0.126406f, 0.126311f,
+ 0.126216f, 0.126121f, 0.126026f, 0.125931f, 0.125835f, 0.125740f, 0.125645f, 0.125550f,
+ 0.125455f, 0.125360f, 0.125265f, 0.125170f, 0.125075f, 0.124979f, 0.124884f, 0.124789f,
+ 0.124694f, 0.124599f, 0.124504f, 0.124409f, 0.124314f, 0.124218f, 0.124123f, 0.124028f,
+ 0.123933f, 0.123838f, 0.123743f, 0.123648f, 0.123552f, 0.123457f, 0.123362f, 0.123267f,
+ 0.123172f, 0.123077f, 0.122982f, 0.122886f, 0.122791f, 0.122696f, 0.122601f, 0.122506f,
+ 0.122411f, 0.122316f, 0.122220f, 0.122125f, 0.122030f, 0.121935f, 0.121840f, 0.121745f,
+ 0.121649f, 0.121554f, 0.121459f, 0.121364f, 0.121269f, 0.121174f, 0.121078f, 0.120983f,
+ 0.120888f, 0.120793f, 0.120698f, 0.120603f, 0.120507f, 0.120412f, 0.120317f, 0.120222f,
+ 0.120127f, 0.120032f, 0.119936f, 0.119841f, 0.119746f, 0.119651f, 0.119556f, 0.119460f,
+ 0.119365f, 0.119270f, 0.119175f, 0.119080f, 0.118984f, 0.118889f, 0.118794f, 0.118699f,
+ 0.118604f, 0.118508f, 0.118413f, 0.118318f, 0.118223f, 0.118128f, 0.118032f, 0.117937f,
+ 0.117842f, 0.117747f, 0.117652f, 0.117556f, 0.117461f, 0.117366f, 0.117271f, 0.117176f,
+ 0.117080f, 0.116985f, 0.116890f, 0.116795f, 0.116700f, 0.116604f, 0.116509f, 0.116414f,
+ 0.116319f, 0.116223f, 0.116128f, 0.116033f, 0.115938f, 0.115842f, 0.115747f, 0.115652f,
+ 0.115557f, 0.115462f, 0.115366f, 0.115271f, 0.115176f, 0.115081f, 0.114985f, 0.114890f,
+ 0.114795f, 0.114700f, 0.114604f, 0.114509f, 0.114414f, 0.114319f, 0.114223f, 0.114128f,
+ 0.114033f, 0.113938f, 0.113842f, 0.113747f, 0.113652f, 0.113557f, 0.113461f, 0.113366f,
+ 0.113271f, 0.113176f, 0.113080f, 0.112985f, 0.112890f, 0.112795f, 0.112699f, 0.112604f,
+ 0.112509f, 0.112414f, 0.112318f, 0.112223f, 0.112128f, 0.112033f, 0.111937f, 0.111842f,
+ 0.111747f, 0.111651f, 0.111556f, 0.111461f, 0.111366f, 0.111270f, 0.111175f, 0.111080f,
+ 0.110984f, 0.110889f, 0.110794f, 0.110699f, 0.110603f, 0.110508f, 0.110413f, 0.110317f,
+ 0.110222f, 0.110127f, 0.110032f, 0.109936f, 0.109841f, 0.109746f, 0.109650f, 0.109555f,
+ 0.109460f, 0.109365f, 0.109269f, 0.109174f, 0.109079f, 0.108983f, 0.108888f, 0.108793f,
+ 0.108697f, 0.108602f, 0.108507f, 0.108412f, 0.108316f, 0.108221f, 0.108126f, 0.108030f,
+ 0.107935f, 0.107840f, 0.107744f, 0.107649f, 0.107554f, 0.107458f, 0.107363f, 0.107268f,
+ 0.107172f, 0.107077f, 0.106982f, 0.106886f, 0.106791f, 0.106696f, 0.106600f, 0.106505f,
+ 0.106410f, 0.106314f, 0.106219f, 0.106124f, 0.106028f, 0.105933f, 0.105838f, 0.105742f,
+ 0.105647f, 0.105552f, 0.105456f, 0.105361f, 0.105266f, 0.105170f, 0.105075f, 0.104980f,
+ 0.104884f, 0.104789f, 0.104694f, 0.104598f, 0.104503f, 0.104408f, 0.104312f, 0.104217f,
+ 0.104122f, 0.104026f, 0.103931f, 0.103836f, 0.103740f, 0.103645f, 0.103550f, 0.103454f,
+ 0.103359f, 0.103263f, 0.103168f, 0.103073f, 0.102977f, 0.102882f, 0.102787f, 0.102691f,
+ 0.102596f, 0.102500f, 0.102405f, 0.102310f, 0.102214f, 0.102119f, 0.102024f, 0.101928f,
+ 0.101833f, 0.101738f, 0.101642f, 0.101547f, 0.101451f, 0.101356f, 0.101261f, 0.101165f,
+ 0.101070f, 0.100974f, 0.100879f, 0.100784f, 0.100688f, 0.100593f, 0.100498f, 0.100402f,
+ 0.100307f, 0.100211f, 0.100116f, 0.100021f, 0.099925f, 0.099830f, 0.099734f, 0.099639f,
+ 0.099544f, 0.099448f, 0.099353f, 0.099257f, 0.099162f, 0.099067f, 0.098971f, 0.098876f,
+ 0.098780f, 0.098685f, 0.098590f, 0.098494f, 0.098399f, 0.098303f, 0.098208f, 0.098113f,
+ 0.098017f, 0.097922f, 0.097826f, 0.097731f, 0.097635f, 0.097540f, 0.097445f, 0.097349f,
+ 0.097254f, 0.097158f, 0.097063f, 0.096968f, 0.096872f, 0.096777f, 0.096681f, 0.096586f,
+ 0.096490f, 0.096395f, 0.096300f, 0.096204f, 0.096109f, 0.096013f, 0.095918f, 0.095822f,
+ 0.095727f, 0.095632f, 0.095536f, 0.095441f, 0.095345f, 0.095250f, 0.095154f, 0.095059f,
+ 0.094963f, 0.094868f, 0.094773f, 0.094677f, 0.094582f, 0.094486f, 0.094391f, 0.094295f,
+ 0.094200f, 0.094104f, 0.094009f, 0.093914f, 0.093818f, 0.093723f, 0.093627f, 0.093532f,
+ 0.093436f, 0.093341f, 0.093245f, 0.093150f, 0.093055f, 0.092959f, 0.092864f, 0.092768f,
+ 0.092673f, 0.092577f, 0.092482f, 0.092386f, 0.092291f, 0.092195f, 0.092100f, 0.092004f,
+ 0.091909f, 0.091813f, 0.091718f, 0.091623f, 0.091527f, 0.091432f, 0.091336f, 0.091241f,
+ 0.091145f, 0.091050f, 0.090954f, 0.090859f, 0.090763f, 0.090668f, 0.090572f, 0.090477f,
+ 0.090381f, 0.090286f, 0.090190f, 0.090095f, 0.089999f, 0.089904f, 0.089808f, 0.089713f,
+ 0.089617f, 0.089522f, 0.089427f, 0.089331f, 0.089236f, 0.089140f, 0.089045f, 0.088949f,
+ 0.088854f, 0.088758f, 0.088663f, 0.088567f, 0.088472f, 0.088376f, 0.088281f, 0.088185f,
+ 0.088090f, 0.087994f, 0.087899f, 0.087803f, 0.087708f, 0.087612f, 0.087517f, 0.087421f,
+ 0.087326f, 0.087230f, 0.087135f, 0.087039f, 0.086943f, 0.086848f, 0.086752f, 0.086657f,
+ 0.086561f, 0.086466f, 0.086370f, 0.086275f, 0.086179f, 0.086084f, 0.085988f, 0.085893f,
+ 0.085797f, 0.085702f, 0.085606f, 0.085511f, 0.085415f, 0.085320f, 0.085224f, 0.085129f,
+ 0.085033f, 0.084938f, 0.084842f, 0.084747f, 0.084651f, 0.084555f, 0.084460f, 0.084364f,
+ 0.084269f, 0.084173f, 0.084078f, 0.083982f, 0.083887f, 0.083791f, 0.083696f, 0.083600f,
+ 0.083505f, 0.083409f, 0.083314f, 0.083218f, 0.083122f, 0.083027f, 0.082931f, 0.082836f,
+ 0.082740f, 0.082645f, 0.082549f, 0.082454f, 0.082358f, 0.082263f, 0.082167f, 0.082071f,
+ 0.081976f, 0.081880f, 0.081785f, 0.081689f, 0.081594f, 0.081498f, 0.081403f, 0.081307f,
+ 0.081211f, 0.081116f, 0.081020f, 0.080925f, 0.080829f, 0.080734f, 0.080638f, 0.080543f,
+ 0.080447f, 0.080351f, 0.080256f, 0.080160f, 0.080065f, 0.079969f, 0.079874f, 0.079778f,
+ 0.079682f, 0.079587f, 0.079491f, 0.079396f, 0.079300f, 0.079205f, 0.079109f, 0.079013f,
+ 0.078918f, 0.078822f, 0.078727f, 0.078631f, 0.078536f, 0.078440f, 0.078344f, 0.078249f,
+ 0.078153f, 0.078058f, 0.077962f, 0.077866f, 0.077771f, 0.077675f, 0.077580f, 0.077484f,
+ 0.077389f, 0.077293f, 0.077197f, 0.077102f, 0.077006f, 0.076911f, 0.076815f, 0.076719f,
+ 0.076624f, 0.076528f, 0.076433f, 0.076337f, 0.076241f, 0.076146f, 0.076050f, 0.075955f,
+ 0.075859f, 0.075764f, 0.075668f, 0.075572f, 0.075477f, 0.075381f, 0.075286f, 0.075190f,
+ 0.075094f, 0.074999f, 0.074903f, 0.074807f, 0.074712f, 0.074616f, 0.074521f, 0.074425f,
+ 0.074329f, 0.074234f, 0.074138f, 0.074043f, 0.073947f, 0.073851f, 0.073756f, 0.073660f,
+ 0.073565f, 0.073469f, 0.073373f, 0.073278f, 0.073182f, 0.073086f, 0.072991f, 0.072895f,
+ 0.072800f, 0.072704f, 0.072608f, 0.072513f, 0.072417f, 0.072322f, 0.072226f, 0.072130f,
+ 0.072035f, 0.071939f, 0.071843f, 0.071748f, 0.071652f, 0.071557f, 0.071461f, 0.071365f,
+ 0.071270f, 0.071174f, 0.071078f, 0.070983f, 0.070887f, 0.070791f, 0.070696f, 0.070600f,
+ 0.070505f, 0.070409f, 0.070313f, 0.070218f, 0.070122f, 0.070026f, 0.069931f, 0.069835f,
+ 0.069739f, 0.069644f, 0.069548f, 0.069453f, 0.069357f, 0.069261f, 0.069166f, 0.069070f,
+ 0.068974f, 0.068879f, 0.068783f, 0.068687f, 0.068592f, 0.068496f, 0.068400f, 0.068305f,
+ 0.068209f, 0.068113f, 0.068018f, 0.067922f, 0.067827f, 0.067731f, 0.067635f, 0.067540f,
+ 0.067444f, 0.067348f, 0.067253f, 0.067157f, 0.067061f, 0.066966f, 0.066870f, 0.066774f,
+ 0.066679f, 0.066583f, 0.066487f, 0.066392f, 0.066296f, 0.066200f, 0.066105f, 0.066009f,
+ 0.065913f, 0.065818f, 0.065722f, 0.065626f, 0.065531f, 0.065435f, 0.065339f, 0.065244f,
+ 0.065148f, 0.065052f, 0.064957f, 0.064861f, 0.064765f, 0.064670f, 0.064574f, 0.064478f,
+ 0.064383f, 0.064287f, 0.064191f, 0.064096f, 0.064000f, 0.063904f, 0.063809f, 0.063713f,
+ 0.063617f, 0.063522f, 0.063426f, 0.063330f, 0.063234f, 0.063139f, 0.063043f, 0.062947f,
+ 0.062852f, 0.062756f, 0.062660f, 0.062565f, 0.062469f, 0.062373f, 0.062278f, 0.062182f,
+ 0.062086f, 0.061991f, 0.061895f, 0.061799f, 0.061704f, 0.061608f, 0.061512f, 0.061416f,
+ 0.061321f, 0.061225f, 0.061129f, 0.061034f, 0.060938f, 0.060842f, 0.060747f, 0.060651f,
+ 0.060555f, 0.060459f, 0.060364f, 0.060268f, 0.060172f, 0.060077f, 0.059981f, 0.059885f,
+ 0.059790f, 0.059694f, 0.059598f, 0.059502f, 0.059407f, 0.059311f, 0.059215f, 0.059120f,
+ 0.059024f, 0.058928f, 0.058833f, 0.058737f, 0.058641f, 0.058545f, 0.058450f, 0.058354f,
+ 0.058258f, 0.058163f, 0.058067f, 0.057971f, 0.057875f, 0.057780f, 0.057684f, 0.057588f,
+ 0.057493f, 0.057397f, 0.057301f, 0.057205f, 0.057110f, 0.057014f, 0.056918f, 0.056823f,
+ 0.056727f, 0.056631f, 0.056535f, 0.056440f, 0.056344f, 0.056248f, 0.056152f, 0.056057f,
+ 0.055961f, 0.055865f, 0.055770f, 0.055674f, 0.055578f, 0.055482f, 0.055387f, 0.055291f,
+ 0.055195f, 0.055100f, 0.055004f, 0.054908f, 0.054812f, 0.054717f, 0.054621f, 0.054525f,
+ 0.054429f, 0.054334f, 0.054238f, 0.054142f, 0.054046f, 0.053951f, 0.053855f, 0.053759f,
+ 0.053664f, 0.053568f, 0.053472f, 0.053376f, 0.053281f, 0.053185f, 0.053089f, 0.052993f,
+ 0.052898f, 0.052802f, 0.052706f, 0.052610f, 0.052515f, 0.052419f, 0.052323f, 0.052227f,
+ 0.052132f, 0.052036f, 0.051940f, 0.051844f, 0.051749f, 0.051653f, 0.051557f, 0.051461f,
+ 0.051366f, 0.051270f, 0.051174f, 0.051078f, 0.050983f, 0.050887f, 0.050791f, 0.050696f,
+ 0.050600f, 0.050504f, 0.050408f, 0.050312f, 0.050217f, 0.050121f, 0.050025f, 0.049929f,
+ 0.049834f, 0.049738f, 0.049642f, 0.049546f, 0.049451f, 0.049355f, 0.049259f, 0.049163f,
+ 0.049068f, 0.048972f, 0.048876f, 0.048780f, 0.048685f, 0.048589f, 0.048493f, 0.048397f,
+ 0.048302f, 0.048206f, 0.048110f, 0.048014f, 0.047919f, 0.047823f, 0.047727f, 0.047631f,
+ 0.047535f, 0.047440f, 0.047344f, 0.047248f, 0.047152f, 0.047057f, 0.046961f, 0.046865f,
+ 0.046769f, 0.046674f, 0.046578f, 0.046482f, 0.046386f, 0.046290f, 0.046195f, 0.046099f,
+ 0.046003f, 0.045907f, 0.045812f, 0.045716f, 0.045620f, 0.045524f, 0.045429f, 0.045333f,
+ 0.045237f, 0.045141f, 0.045045f, 0.044950f, 0.044854f, 0.044758f, 0.044662f, 0.044567f,
+ 0.044471f, 0.044375f, 0.044279f, 0.044183f, 0.044088f, 0.043992f, 0.043896f, 0.043800f,
+ 0.043705f, 0.043609f, 0.043513f, 0.043417f, 0.043321f, 0.043226f, 0.043130f, 0.043034f,
+ 0.042938f, 0.042842f, 0.042747f, 0.042651f, 0.042555f, 0.042459f, 0.042364f, 0.042268f,
+ 0.042172f, 0.042076f, 0.041980f, 0.041885f, 0.041789f, 0.041693f, 0.041597f, 0.041501f,
+ 0.041406f, 0.041310f, 0.041214f, 0.041118f, 0.041022f, 0.040927f, 0.040831f, 0.040735f,
+ 0.040639f, 0.040544f, 0.040448f, 0.040352f, 0.040256f, 0.040160f, 0.040065f, 0.039969f,
+ 0.039873f, 0.039777f, 0.039681f, 0.039586f, 0.039490f, 0.039394f, 0.039298f, 0.039202f,
+ 0.039107f, 0.039011f, 0.038915f, 0.038819f, 0.038723f, 0.038628f, 0.038532f, 0.038436f,
+ 0.038340f, 0.038244f, 0.038149f, 0.038053f, 0.037957f, 0.037861f, 0.037765f, 0.037669f,
+ 0.037574f, 0.037478f, 0.037382f, 0.037286f, 0.037190f, 0.037095f, 0.036999f, 0.036903f,
+ 0.036807f, 0.036711f, 0.036616f, 0.036520f, 0.036424f, 0.036328f, 0.036232f, 0.036137f,
+ 0.036041f, 0.035945f, 0.035849f, 0.035753f, 0.035657f, 0.035562f, 0.035466f, 0.035370f,
+ 0.035274f, 0.035178f, 0.035083f, 0.034987f, 0.034891f, 0.034795f, 0.034699f, 0.034604f,
+ 0.034508f, 0.034412f, 0.034316f, 0.034220f, 0.034124f, 0.034029f, 0.033933f, 0.033837f,
+ 0.033741f, 0.033645f, 0.033550f, 0.033454f, 0.033358f, 0.033262f, 0.033166f, 0.033070f,
+ 0.032975f, 0.032879f, 0.032783f, 0.032687f, 0.032591f, 0.032495f, 0.032400f, 0.032304f,
+ 0.032208f, 0.032112f, 0.032016f, 0.031921f, 0.031825f, 0.031729f, 0.031633f, 0.031537f,
+ 0.031441f, 0.031346f, 0.031250f, 0.031154f, 0.031058f, 0.030962f, 0.030866f, 0.030771f,
+ 0.030675f, 0.030579f, 0.030483f, 0.030387f, 0.030291f, 0.030196f, 0.030100f, 0.030004f,
+ 0.029908f, 0.029812f, 0.029717f, 0.029621f, 0.029525f, 0.029429f, 0.029333f, 0.029237f,
+ 0.029142f, 0.029046f, 0.028950f, 0.028854f, 0.028758f, 0.028662f, 0.028567f, 0.028471f,
+ 0.028375f, 0.028279f, 0.028183f, 0.028087f, 0.027991f, 0.027896f, 0.027800f, 0.027704f,
+ 0.027608f, 0.027512f, 0.027416f, 0.027321f, 0.027225f, 0.027129f, 0.027033f, 0.026937f,
+ 0.026841f, 0.026746f, 0.026650f, 0.026554f, 0.026458f, 0.026362f, 0.026266f, 0.026171f,
+ 0.026075f, 0.025979f, 0.025883f, 0.025787f, 0.025691f, 0.025596f, 0.025500f, 0.025404f,
+ 0.025308f, 0.025212f, 0.025116f, 0.025020f, 0.024925f, 0.024829f, 0.024733f, 0.024637f,
+ 0.024541f, 0.024445f, 0.024350f, 0.024254f, 0.024158f, 0.024062f, 0.023966f, 0.023870f,
+ 0.023774f, 0.023679f, 0.023583f, 0.023487f, 0.023391f, 0.023295f, 0.023199f, 0.023104f,
+ 0.023008f, 0.022912f, 0.022816f, 0.022720f, 0.022624f, 0.022528f, 0.022433f, 0.022337f,
+ 0.022241f, 0.022145f, 0.022049f, 0.021953f, 0.021857f, 0.021762f, 0.021666f, 0.021570f,
+ 0.021474f, 0.021378f, 0.021282f, 0.021187f, 0.021091f, 0.020995f, 0.020899f, 0.020803f,
+ 0.020707f, 0.020611f, 0.020516f, 0.020420f, 0.020324f, 0.020228f, 0.020132f, 0.020036f,
+ 0.019940f, 0.019845f, 0.019749f, 0.019653f, 0.019557f, 0.019461f, 0.019365f, 0.019269f,
+ 0.019174f, 0.019078f, 0.018982f, 0.018886f, 0.018790f, 0.018694f, 0.018598f, 0.018503f,
+ 0.018407f, 0.018311f, 0.018215f, 0.018119f, 0.018023f, 0.017927f, 0.017832f, 0.017736f,
+ 0.017640f, 0.017544f, 0.017448f, 0.017352f, 0.017256f, 0.017161f, 0.017065f, 0.016969f,
+ 0.016873f, 0.016777f, 0.016681f, 0.016585f, 0.016490f, 0.016394f, 0.016298f, 0.016202f,
+ 0.016106f, 0.016010f, 0.015914f, 0.015819f, 0.015723f, 0.015627f, 0.015531f, 0.015435f,
+ 0.015339f, 0.015243f, 0.015147f, 0.015052f, 0.014956f, 0.014860f, 0.014764f, 0.014668f,
+ 0.014572f, 0.014476f, 0.014381f, 0.014285f, 0.014189f, 0.014093f, 0.013997f, 0.013901f,
+ 0.013805f, 0.013710f, 0.013614f, 0.013518f, 0.013422f, 0.013326f, 0.013230f, 0.013134f,
+ 0.013038f, 0.012943f, 0.012847f, 0.012751f, 0.012655f, 0.012559f, 0.012463f, 0.012367f,
+ 0.012272f, 0.012176f, 0.012080f, 0.011984f, 0.011888f, 0.011792f, 0.011696f, 0.011600f,
+ 0.011505f, 0.011409f, 0.011313f, 0.011217f, 0.011121f, 0.011025f, 0.010929f, 0.010834f,
+ 0.010738f, 0.010642f, 0.010546f, 0.010450f, 0.010354f, 0.010258f, 0.010162f, 0.010067f,
+ 0.009971f, 0.009875f, 0.009779f, 0.009683f, 0.009587f, 0.009491f, 0.009395f, 0.009300f,
+ 0.009204f, 0.009108f, 0.009012f, 0.008916f, 0.008820f, 0.008724f, 0.008629f, 0.008533f,
+ 0.008437f, 0.008341f, 0.008245f, 0.008149f, 0.008053f, 0.007957f, 0.007862f, 0.007766f,
+ 0.007670f, 0.007574f, 0.007478f, 0.007382f, 0.007286f, 0.007190f, 0.007095f, 0.006999f,
+ 0.006903f, 0.006807f, 0.006711f, 0.006615f, 0.006519f, 0.006424f, 0.006328f, 0.006232f,
+ 0.006136f, 0.006040f, 0.005944f, 0.005848f, 0.005752f, 0.005657f, 0.005561f, 0.005465f,
+ 0.005369f, 0.005273f, 0.005177f, 0.005081f, 0.004985f, 0.004890f, 0.004794f, 0.004698f,
+ 0.004602f, 0.004506f, 0.004410f, 0.004314f, 0.004218f, 0.004123f, 0.004027f, 0.003931f,
+ 0.003835f, 0.003739f, 0.003643f, 0.003547f, 0.003451f, 0.003356f, 0.003260f, 0.003164f,
+ 0.003068f, 0.002972f, 0.002876f, 0.002780f, 0.002684f, 0.002589f, 0.002493f, 0.002397f,
+ 0.002301f, 0.002205f, 0.002109f, 0.002013f, 0.001917f, 0.001822f, 0.001726f, 0.001630f,
+ 0.001534f, 0.001438f, 0.001342f, 0.001246f, 0.001150f, 0.001055f, 0.000959f, 0.000863f,
+ 0.000767f, 0.000671f, 0.000575f, 0.000479f, 0.000383f, 0.000288f, 0.000192f, 0.000096f,
+ 0.000000f, 0.000096f, 0.000192f, 0.000288f, 0.000383f, 0.000479f, 0.000575f, 0.000671f,
+ 0.000767f, 0.000863f, 0.000959f, 0.001055f, 0.001150f, 0.001246f, 0.001342f, 0.001438f,
+ 0.001534f, 0.001630f, 0.001726f, 0.001822f, 0.001917f, 0.002013f, 0.002109f, 0.002205f,
+ 0.002301f, 0.002397f, 0.002493f, 0.002589f, 0.002684f, 0.002780f, 0.002876f, 0.002972f,
+ 0.003068f, 0.003164f, 0.003260f, 0.003356f, 0.003451f, 0.003547f, 0.003643f, 0.003739f,
+ 0.003835f, 0.003931f, 0.004027f, 0.004123f, 0.004218f, 0.004314f, 0.004410f, 0.004506f,
+ 0.004602f, 0.004698f, 0.004794f, 0.004890f, 0.004985f, 0.005081f, 0.005177f, 0.005273f,
+ 0.005369f, 0.005465f, 0.005561f, 0.005657f, 0.005752f, 0.005848f, 0.005944f, 0.006040f,
+ 0.006136f, 0.006232f, 0.006328f, 0.006424f, 0.006519f, 0.006615f, 0.006711f, 0.006807f,
+ 0.006903f, 0.006999f, 0.007095f, 0.007190f, 0.007286f, 0.007382f, 0.007478f, 0.007574f,
+ 0.007670f, 0.007766f, 0.007862f, 0.007957f, 0.008053f, 0.008149f, 0.008245f, 0.008341f,
+ 0.008437f, 0.008533f, 0.008629f, 0.008724f, 0.008820f, 0.008916f, 0.009012f, 0.009108f,
+ 0.009204f, 0.009300f, 0.009395f, 0.009491f, 0.009587f, 0.009683f, 0.009779f, 0.009875f,
+ 0.009971f, 0.010067f, 0.010162f, 0.010258f, 0.010354f, 0.010450f, 0.010546f, 0.010642f,
+ 0.010738f, 0.010834f, 0.010929f, 0.011025f, 0.011121f, 0.011217f, 0.011313f, 0.011409f,
+ 0.011505f, 0.011600f, 0.011696f, 0.011792f, 0.011888f, 0.011984f, 0.012080f, 0.012176f,
+ 0.012272f, 0.012367f, 0.012463f, 0.012559f, 0.012655f, 0.012751f, 0.012847f, 0.012943f,
+ 0.013038f, 0.013134f, 0.013230f, 0.013326f, 0.013422f, 0.013518f, 0.013614f, 0.013710f,
+ 0.013805f, 0.013901f, 0.013997f, 0.014093f, 0.014189f, 0.014285f, 0.014381f, 0.014476f,
+ 0.014572f, 0.014668f, 0.014764f, 0.014860f, 0.014956f, 0.015052f, 0.015147f, 0.015243f,
+ 0.015339f, 0.015435f, 0.015531f, 0.015627f, 0.015723f, 0.015819f, 0.015914f, 0.016010f,
+ 0.016106f, 0.016202f, 0.016298f, 0.016394f, 0.016490f, 0.016585f, 0.016681f, 0.016777f,
+ 0.016873f, 0.016969f, 0.017065f, 0.017161f, 0.017256f, 0.017352f, 0.017448f, 0.017544f,
+ 0.017640f, 0.017736f, 0.017832f, 0.017927f, 0.018023f, 0.018119f, 0.018215f, 0.018311f,
+ 0.018407f, 0.018503f, 0.018598f, 0.018694f, 0.018790f, 0.018886f, 0.018982f, 0.019078f,
+ 0.019174f, 0.019269f, 0.019365f, 0.019461f, 0.019557f, 0.019653f, 0.019749f, 0.019845f,
+ 0.019940f, 0.020036f, 0.020132f, 0.020228f, 0.020324f, 0.020420f, 0.020516f, 0.020611f,
+ 0.020707f, 0.020803f, 0.020899f, 0.020995f, 0.021091f, 0.021187f, 0.021282f, 0.021378f,
+ 0.021474f, 0.021570f, 0.021666f, 0.021762f, 0.021857f, 0.021953f, 0.022049f, 0.022145f,
+ 0.022241f, 0.022337f, 0.022433f, 0.022528f, 0.022624f, 0.022720f, 0.022816f, 0.022912f,
+ 0.023008f, 0.023104f, 0.023199f, 0.023295f, 0.023391f, 0.023487f, 0.023583f, 0.023679f,
+ 0.023774f, 0.023870f, 0.023966f, 0.024062f, 0.024158f, 0.024254f, 0.024350f, 0.024445f,
+ 0.024541f, 0.024637f, 0.024733f, 0.024829f, 0.024925f, 0.025020f, 0.025116f, 0.025212f,
+ 0.025308f, 0.025404f, 0.025500f, 0.025596f, 0.025691f, 0.025787f, 0.025883f, 0.025979f,
+ 0.026075f, 0.026171f, 0.026266f, 0.026362f, 0.026458f, 0.026554f, 0.026650f, 0.026746f,
+ 0.026841f, 0.026937f, 0.027033f, 0.027129f, 0.027225f, 0.027321f, 0.027416f, 0.027512f,
+ 0.027608f, 0.027704f, 0.027800f, 0.027896f, 0.027991f, 0.028087f, 0.028183f, 0.028279f,
+ 0.028375f, 0.028471f, 0.028567f, 0.028662f, 0.028758f, 0.028854f, 0.028950f, 0.029046f,
+ 0.029142f, 0.029237f, 0.029333f, 0.029429f, 0.029525f, 0.029621f, 0.029717f, 0.029812f,
+ 0.029908f, 0.030004f, 0.030100f, 0.030196f, 0.030291f, 0.030387f, 0.030483f, 0.030579f,
+ 0.030675f, 0.030771f, 0.030866f, 0.030962f, 0.031058f, 0.031154f, 0.031250f, 0.031346f,
+ 0.031441f, 0.031537f, 0.031633f, 0.031729f, 0.031825f, 0.031921f, 0.032016f, 0.032112f,
+ 0.032208f, 0.032304f, 0.032400f, 0.032495f, 0.032591f, 0.032687f, 0.032783f, 0.032879f,
+ 0.032975f, 0.033070f, 0.033166f, 0.033262f, 0.033358f, 0.033454f, 0.033550f, 0.033645f,
+ 0.033741f, 0.033837f, 0.033933f, 0.034029f, 0.034124f, 0.034220f, 0.034316f, 0.034412f,
+ 0.034508f, 0.034604f, 0.034699f, 0.034795f, 0.034891f, 0.034987f, 0.035083f, 0.035178f,
+ 0.035274f, 0.035370f, 0.035466f, 0.035562f, 0.035657f, 0.035753f, 0.035849f, 0.035945f,
+ 0.036041f, 0.036137f, 0.036232f, 0.036328f, 0.036424f, 0.036520f, 0.036616f, 0.036711f,
+ 0.036807f, 0.036903f, 0.036999f, 0.037095f, 0.037190f, 0.037286f, 0.037382f, 0.037478f,
+ 0.037574f, 0.037669f, 0.037765f, 0.037861f, 0.037957f, 0.038053f, 0.038149f, 0.038244f,
+ 0.038340f, 0.038436f, 0.038532f, 0.038628f, 0.038723f, 0.038819f, 0.038915f, 0.039011f,
+ 0.039107f, 0.039202f, 0.039298f, 0.039394f, 0.039490f, 0.039586f, 0.039681f, 0.039777f,
+ 0.039873f, 0.039969f, 0.040065f, 0.040160f, 0.040256f, 0.040352f, 0.040448f, 0.040544f,
+ 0.040639f, 0.040735f, 0.040831f, 0.040927f, 0.041022f, 0.041118f, 0.041214f, 0.041310f,
+ 0.041406f, 0.041501f, 0.041597f, 0.041693f, 0.041789f, 0.041885f, 0.041980f, 0.042076f,
+ 0.042172f, 0.042268f, 0.042364f, 0.042459f, 0.042555f, 0.042651f, 0.042747f, 0.042842f,
+ 0.042938f, 0.043034f, 0.043130f, 0.043226f, 0.043321f, 0.043417f, 0.043513f, 0.043609f,
+ 0.043705f, 0.043800f, 0.043896f, 0.043992f, 0.044088f, 0.044183f, 0.044279f, 0.044375f,
+ 0.044471f, 0.044567f, 0.044662f, 0.044758f, 0.044854f, 0.044950f, 0.045045f, 0.045141f,
+ 0.045237f, 0.045333f, 0.045429f, 0.045524f, 0.045620f, 0.045716f, 0.045812f, 0.045907f,
+ 0.046003f, 0.046099f, 0.046195f, 0.046290f, 0.046386f, 0.046482f, 0.046578f, 0.046674f,
+ 0.046769f, 0.046865f, 0.046961f, 0.047057f, 0.047152f, 0.047248f, 0.047344f, 0.047440f,
+ 0.047535f, 0.047631f, 0.047727f, 0.047823f, 0.047919f, 0.048014f, 0.048110f, 0.048206f,
+ 0.048302f, 0.048397f, 0.048493f, 0.048589f, 0.048685f, 0.048780f, 0.048876f, 0.048972f,
+ 0.049068f, 0.049163f, 0.049259f, 0.049355f, 0.049451f, 0.049546f, 0.049642f, 0.049738f,
+ 0.049834f, 0.049929f, 0.050025f, 0.050121f, 0.050217f, 0.050312f, 0.050408f, 0.050504f,
+ 0.050600f, 0.050696f, 0.050791f, 0.050887f, 0.050983f, 0.051078f, 0.051174f, 0.051270f,
+ 0.051366f, 0.051461f, 0.051557f, 0.051653f, 0.051749f, 0.051844f, 0.051940f, 0.052036f,
+ 0.052132f, 0.052227f, 0.052323f, 0.052419f, 0.052515f, 0.052610f, 0.052706f, 0.052802f,
+ 0.052898f, 0.052993f, 0.053089f, 0.053185f, 0.053281f, 0.053376f, 0.053472f, 0.053568f,
+ 0.053664f, 0.053759f, 0.053855f, 0.053951f, 0.054046f, 0.054142f, 0.054238f, 0.054334f,
+ 0.054429f, 0.054525f, 0.054621f, 0.054717f, 0.054812f, 0.054908f, 0.055004f, 0.055100f,
+ 0.055195f, 0.055291f, 0.055387f, 0.055482f, 0.055578f, 0.055674f, 0.055770f, 0.055865f,
+ 0.055961f, 0.056057f, 0.056152f, 0.056248f, 0.056344f, 0.056440f, 0.056535f, 0.056631f,
+ 0.056727f, 0.056823f, 0.056918f, 0.057014f, 0.057110f, 0.057205f, 0.057301f, 0.057397f,
+ 0.057493f, 0.057588f, 0.057684f, 0.057780f, 0.057875f, 0.057971f, 0.058067f, 0.058163f,
+ 0.058258f, 0.058354f, 0.058450f, 0.058545f, 0.058641f, 0.058737f, 0.058833f, 0.058928f,
+ 0.059024f, 0.059120f, 0.059215f, 0.059311f, 0.059407f, 0.059502f, 0.059598f, 0.059694f,
+ 0.059790f, 0.059885f, 0.059981f, 0.060077f, 0.060172f, 0.060268f, 0.060364f, 0.060459f,
+ 0.060555f, 0.060651f, 0.060747f, 0.060842f, 0.060938f, 0.061034f, 0.061129f, 0.061225f,
+ 0.061321f, 0.061416f, 0.061512f, 0.061608f, 0.061704f, 0.061799f, 0.061895f, 0.061991f,
+ 0.062086f, 0.062182f, 0.062278f, 0.062373f, 0.062469f, 0.062565f, 0.062660f, 0.062756f,
+ 0.062852f, 0.062947f, 0.063043f, 0.063139f, 0.063234f, 0.063330f, 0.063426f, 0.063522f,
+ 0.063617f, 0.063713f, 0.063809f, 0.063904f, 0.064000f, 0.064096f, 0.064191f, 0.064287f,
+ 0.064383f, 0.064478f, 0.064574f, 0.064670f, 0.064765f, 0.064861f, 0.064957f, 0.065052f,
+ 0.065148f, 0.065244f, 0.065339f, 0.065435f, 0.065531f, 0.065626f, 0.065722f, 0.065818f,
+ 0.065913f, 0.066009f, 0.066105f, 0.066200f, 0.066296f, 0.066392f, 0.066487f, 0.066583f,
+ 0.066679f, 0.066774f, 0.066870f, 0.066966f, 0.067061f, 0.067157f, 0.067253f, 0.067348f,
+ 0.067444f, 0.067540f, 0.067635f, 0.067731f, 0.067827f, 0.067922f, 0.068018f, 0.068113f,
+ 0.068209f, 0.068305f, 0.068400f, 0.068496f, 0.068592f, 0.068687f, 0.068783f, 0.068879f,
+ 0.068974f, 0.069070f, 0.069166f, 0.069261f, 0.069357f, 0.069453f, 0.069548f, 0.069644f,
+ 0.069739f, 0.069835f, 0.069931f, 0.070026f, 0.070122f, 0.070218f, 0.070313f, 0.070409f,
+ 0.070505f, 0.070600f, 0.070696f, 0.070791f, 0.070887f, 0.070983f, 0.071078f, 0.071174f,
+ 0.071270f, 0.071365f, 0.071461f, 0.071557f, 0.071652f, 0.071748f, 0.071843f, 0.071939f,
+ 0.072035f, 0.072130f, 0.072226f, 0.072322f, 0.072417f, 0.072513f, 0.072608f, 0.072704f,
+ 0.072800f, 0.072895f, 0.072991f, 0.073086f, 0.073182f, 0.073278f, 0.073373f, 0.073469f,
+ 0.073565f, 0.073660f, 0.073756f, 0.073851f, 0.073947f, 0.074043f, 0.074138f, 0.074234f,
+ 0.074329f, 0.074425f, 0.074521f, 0.074616f, 0.074712f, 0.074807f, 0.074903f, 0.074999f,
+ 0.075094f, 0.075190f, 0.075286f, 0.075381f, 0.075477f, 0.075572f, 0.075668f, 0.075764f,
+ 0.075859f, 0.075955f, 0.076050f, 0.076146f, 0.076241f, 0.076337f, 0.076433f, 0.076528f,
+ 0.076624f, 0.076719f, 0.076815f, 0.076911f, 0.077006f, 0.077102f, 0.077197f, 0.077293f,
+ 0.077389f, 0.077484f, 0.077580f, 0.077675f, 0.077771f, 0.077866f, 0.077962f, 0.078058f,
+ 0.078153f, 0.078249f, 0.078344f, 0.078440f, 0.078536f, 0.078631f, 0.078727f, 0.078822f,
+ 0.078918f, 0.079013f, 0.079109f, 0.079205f, 0.079300f, 0.079396f, 0.079491f, 0.079587f,
+ 0.079682f, 0.079778f, 0.079874f, 0.079969f, 0.080065f, 0.080160f, 0.080256f, 0.080351f,
+ 0.080447f, 0.080543f, 0.080638f, 0.080734f, 0.080829f, 0.080925f, 0.081020f, 0.081116f,
+ 0.081211f, 0.081307f, 0.081403f, 0.081498f, 0.081594f, 0.081689f, 0.081785f, 0.081880f,
+ 0.081976f, 0.082071f, 0.082167f, 0.082263f, 0.082358f, 0.082454f, 0.082549f, 0.082645f,
+ 0.082740f, 0.082836f, 0.082931f, 0.083027f, 0.083122f, 0.083218f, 0.083314f, 0.083409f,
+ 0.083505f, 0.083600f, 0.083696f, 0.083791f, 0.083887f, 0.083982f, 0.084078f, 0.084173f,
+ 0.084269f, 0.084364f, 0.084460f, 0.084555f, 0.084651f, 0.084747f, 0.084842f, 0.084938f,
+ 0.085033f, 0.085129f, 0.085224f, 0.085320f, 0.085415f, 0.085511f, 0.085606f, 0.085702f,
+ 0.085797f, 0.085893f, 0.085988f, 0.086084f, 0.086179f, 0.086275f, 0.086370f, 0.086466f,
+ 0.086561f, 0.086657f, 0.086752f, 0.086848f, 0.086943f, 0.087039f, 0.087135f, 0.087230f,
+ 0.087326f, 0.087421f, 0.087517f, 0.087612f, 0.087708f, 0.087803f, 0.087899f, 0.087994f,
+ 0.088090f, 0.088185f, 0.088281f, 0.088376f, 0.088472f, 0.088567f, 0.088663f, 0.088758f,
+ 0.088854f, 0.088949f, 0.089045f, 0.089140f, 0.089236f, 0.089331f, 0.089427f, 0.089522f,
+ 0.089617f, 0.089713f, 0.089808f, 0.089904f, 0.089999f, 0.090095f, 0.090190f, 0.090286f,
+ 0.090381f, 0.090477f, 0.090572f, 0.090668f, 0.090763f, 0.090859f, 0.090954f, 0.091050f,
+ 0.091145f, 0.091241f, 0.091336f, 0.091432f, 0.091527f, 0.091623f, 0.091718f, 0.091813f,
+ 0.091909f, 0.092004f, 0.092100f, 0.092195f, 0.092291f, 0.092386f, 0.092482f, 0.092577f,
+ 0.092673f, 0.092768f, 0.092864f, 0.092959f, 0.093055f, 0.093150f, 0.093245f, 0.093341f,
+ 0.093436f, 0.093532f, 0.093627f, 0.093723f, 0.093818f, 0.093914f, 0.094009f, 0.094104f,
+ 0.094200f, 0.094295f, 0.094391f, 0.094486f, 0.094582f, 0.094677f, 0.094773f, 0.094868f,
+ 0.094963f, 0.095059f, 0.095154f, 0.095250f, 0.095345f, 0.095441f, 0.095536f, 0.095632f,
+ 0.095727f, 0.095822f, 0.095918f, 0.096013f, 0.096109f, 0.096204f, 0.096300f, 0.096395f,
+ 0.096490f, 0.096586f, 0.096681f, 0.096777f, 0.096872f, 0.096968f, 0.097063f, 0.097158f,
+ 0.097254f, 0.097349f, 0.097445f, 0.097540f, 0.097635f, 0.097731f, 0.097826f, 0.097922f,
+ 0.098017f, 0.098113f, 0.098208f, 0.098303f, 0.098399f, 0.098494f, 0.098590f, 0.098685f,
+ 0.098780f, 0.098876f, 0.098971f, 0.099067f, 0.099162f, 0.099257f, 0.099353f, 0.099448f,
+ 0.099544f, 0.099639f, 0.099734f, 0.099830f, 0.099925f, 0.100021f, 0.100116f, 0.100211f,
+ 0.100307f, 0.100402f, 0.100498f, 0.100593f, 0.100688f, 0.100784f, 0.100879f, 0.100974f,
+ 0.101070f, 0.101165f, 0.101261f, 0.101356f, 0.101451f, 0.101547f, 0.101642f, 0.101738f,
+ 0.101833f, 0.101928f, 0.102024f, 0.102119f, 0.102214f, 0.102310f, 0.102405f, 0.102500f,
+ 0.102596f, 0.102691f, 0.102787f, 0.102882f, 0.102977f, 0.103073f, 0.103168f, 0.103263f,
+ 0.103359f, 0.103454f, 0.103550f, 0.103645f, 0.103740f, 0.103836f, 0.103931f, 0.104026f,
+ 0.104122f, 0.104217f, 0.104312f, 0.104408f, 0.104503f, 0.104598f, 0.104694f, 0.104789f,
+ 0.104884f, 0.104980f, 0.105075f, 0.105170f, 0.105266f, 0.105361f, 0.105456f, 0.105552f,
+ 0.105647f, 0.105742f, 0.105838f, 0.105933f, 0.106028f, 0.106124f, 0.106219f, 0.106314f,
+ 0.106410f, 0.106505f, 0.106600f, 0.106696f, 0.106791f, 0.106886f, 0.106982f, 0.107077f,
+ 0.107172f, 0.107268f, 0.107363f, 0.107458f, 0.107554f, 0.107649f, 0.107744f, 0.107840f,
+ 0.107935f, 0.108030f, 0.108126f, 0.108221f, 0.108316f, 0.108412f, 0.108507f, 0.108602f,
+ 0.108697f, 0.108793f, 0.108888f, 0.108983f, 0.109079f, 0.109174f, 0.109269f, 0.109365f,
+ 0.109460f, 0.109555f, 0.109650f, 0.109746f, 0.109841f, 0.109936f, 0.110032f, 0.110127f,
+ 0.110222f, 0.110317f, 0.110413f, 0.110508f, 0.110603f, 0.110699f, 0.110794f, 0.110889f,
+ 0.110984f, 0.111080f, 0.111175f, 0.111270f, 0.111366f, 0.111461f, 0.111556f, 0.111651f,
+ 0.111747f, 0.111842f, 0.111937f, 0.112033f, 0.112128f, 0.112223f, 0.112318f, 0.112414f,
+ 0.112509f, 0.112604f, 0.112699f, 0.112795f, 0.112890f, 0.112985f, 0.113080f, 0.113176f,
+ 0.113271f, 0.113366f, 0.113461f, 0.113557f, 0.113652f, 0.113747f, 0.113842f, 0.113938f,
+ 0.114033f, 0.114128f, 0.114223f, 0.114319f, 0.114414f, 0.114509f, 0.114604f, 0.114700f,
+ 0.114795f, 0.114890f, 0.114985f, 0.115081f, 0.115176f, 0.115271f, 0.115366f, 0.115462f,
+ 0.115557f, 0.115652f, 0.115747f, 0.115842f, 0.115938f, 0.116033f, 0.116128f, 0.116223f,
+ 0.116319f, 0.116414f, 0.116509f, 0.116604f, 0.116700f, 0.116795f, 0.116890f, 0.116985f,
+ 0.117080f, 0.117176f, 0.117271f, 0.117366f, 0.117461f, 0.117556f, 0.117652f, 0.117747f,
+ 0.117842f, 0.117937f, 0.118032f, 0.118128f, 0.118223f, 0.118318f, 0.118413f, 0.118508f,
+ 0.118604f, 0.118699f, 0.118794f, 0.118889f, 0.118984f, 0.119080f, 0.119175f, 0.119270f,
+ 0.119365f, 0.119460f, 0.119556f, 0.119651f, 0.119746f, 0.119841f, 0.119936f, 0.120032f,
+ 0.120127f, 0.120222f, 0.120317f, 0.120412f, 0.120507f, 0.120603f, 0.120698f, 0.120793f,
+ 0.120888f, 0.120983f, 0.121078f, 0.121174f, 0.121269f, 0.121364f, 0.121459f, 0.121554f,
+ 0.121649f, 0.121745f, 0.121840f, 0.121935f, 0.122030f, 0.122125f, 0.122220f, 0.122316f,
+ 0.122411f, 0.122506f, 0.122601f, 0.122696f, 0.122791f, 0.122886f, 0.122982f, 0.123077f,
+ 0.123172f, 0.123267f, 0.123362f, 0.123457f, 0.123552f, 0.123648f, 0.123743f, 0.123838f,
+ 0.123933f, 0.124028f, 0.124123f, 0.124218f, 0.124314f, 0.124409f, 0.124504f, 0.124599f,
+ 0.124694f, 0.124789f, 0.124884f, 0.124979f, 0.125075f, 0.125170f, 0.125265f, 0.125360f,
+ 0.125455f, 0.125550f, 0.125645f, 0.125740f, 0.125835f, 0.125931f, 0.126026f, 0.126121f,
+ 0.126216f, 0.126311f, 0.126406f, 0.126501f, 0.126596f, 0.126691f, 0.126787f, 0.126882f,
+ 0.126977f, 0.127072f, 0.127167f, 0.127262f, 0.127357f, 0.127452f, 0.127547f, 0.127642f,
+ 0.127737f, 0.127833f, 0.127928f, 0.128023f, 0.128118f, 0.128213f, 0.128308f, 0.128403f,
+ 0.128498f, 0.128593f, 0.128688f, 0.128783f, 0.128878f, 0.128973f, 0.129069f, 0.129164f,
+ 0.129259f, 0.129354f, 0.129449f, 0.129544f, 0.129639f, 0.129734f, 0.129829f, 0.129924f,
+ 0.130019f, 0.130114f, 0.130209f, 0.130304f, 0.130399f, 0.130495f, 0.130590f, 0.130685f,
+ 0.130780f, 0.130875f, 0.130970f, 0.131065f, 0.131160f, 0.131255f, 0.131350f, 0.131445f,
+ 0.131540f, 0.131635f, 0.131730f, 0.131825f, 0.131920f, 0.132015f, 0.132110f, 0.132205f,
+ 0.132300f, 0.132395f, 0.132490f, 0.132585f, 0.132680f, 0.132775f, 0.132870f, 0.132966f,
+ 0.133061f, 0.133156f, 0.133251f, 0.133346f, 0.133441f, 0.133536f, 0.133631f, 0.133726f,
+ 0.133821f, 0.133916f, 0.134011f, 0.134106f, 0.134201f, 0.134296f, 0.134391f, 0.134486f,
+ 0.134581f, 0.134676f, 0.134771f, 0.134866f, 0.134961f, 0.135056f, 0.135151f, 0.135246f,
+ 0.135341f, 0.135436f, 0.135531f, 0.135626f, 0.135721f, 0.135816f, 0.135911f, 0.136006f,
+ 0.136101f, 0.136196f, 0.136291f, 0.136386f, 0.136480f, 0.136575f, 0.136670f, 0.136765f,
+ 0.136860f, 0.136955f, 0.137050f, 0.137145f, 0.137240f, 0.137335f, 0.137430f, 0.137525f,
+ 0.137620f, 0.137715f, 0.137810f, 0.137905f, 0.138000f, 0.138095f, 0.138190f, 0.138285f,
+ 0.138380f, 0.138475f, 0.138570f, 0.138665f, 0.138760f, 0.138855f, 0.138949f, 0.139044f,
+ 0.139139f, 0.139234f, 0.139329f, 0.139424f, 0.139519f, 0.139614f, 0.139709f, 0.139804f,
+ 0.139899f, 0.139994f, 0.140089f, 0.140184f, 0.140279f, 0.140373f, 0.140468f, 0.140563f,
+ 0.140658f, 0.140753f, 0.140848f, 0.140943f, 0.141038f, 0.141133f, 0.141228f, 0.141323f,
+ 0.141418f, 0.141512f, 0.141607f, 0.141702f, 0.141797f, 0.141892f, 0.141987f, 0.142082f,
+ 0.142177f, 0.142272f, 0.142367f, 0.142461f, 0.142556f, 0.142651f, 0.142746f, 0.142841f,
+ 0.142936f, 0.143031f, 0.143126f, 0.143221f, 0.143316f, 0.143410f, 0.143505f, 0.143600f,
+ 0.143695f, 0.143790f, 0.143885f, 0.143980f, 0.144075f, 0.144169f, 0.144264f, 0.144359f,
+ 0.144454f, 0.144549f, 0.144644f, 0.144739f, 0.144833f, 0.144928f, 0.145023f, 0.145118f,
+ 0.145213f, 0.145308f, 0.145403f, 0.145497f, 0.145592f, 0.145687f, 0.145782f, 0.145877f,
+ 0.145972f, 0.146067f, 0.146161f, 0.146256f, 0.146351f, 0.146446f, 0.146541f, 0.146636f,
+ 0.146730f, 0.146825f, 0.146920f, 0.147015f, 0.147110f, 0.147205f, 0.147299f, 0.147394f,
+ 0.147489f, 0.147584f, 0.147679f, 0.147774f, 0.147868f, 0.147963f, 0.148058f, 0.148153f,
+ 0.148248f, 0.148342f, 0.148437f, 0.148532f, 0.148627f, 0.148722f, 0.148817f, 0.148911f,
+ 0.149006f, 0.149101f, 0.149196f, 0.149291f, 0.149385f, 0.149480f, 0.149575f, 0.149670f,
+ 0.149765f, 0.149859f, 0.149954f, 0.150049f, 0.150144f, 0.150238f, 0.150333f, 0.150428f,
+ 0.150523f, 0.150618f, 0.150712f, 0.150807f, 0.150902f, 0.150997f, 0.151092f, 0.151186f,
+ 0.151281f, 0.151376f, 0.151471f, 0.151565f, 0.151660f, 0.151755f, 0.151850f, 0.151944f,
+ 0.152039f, 0.152134f, 0.152229f, 0.152323f, 0.152418f, 0.152513f, 0.152608f, 0.152702f,
+ 0.152797f, 0.152892f, 0.152987f, 0.153081f, 0.153176f, 0.153271f, 0.153366f, 0.153460f,
+ 0.153555f, 0.153650f, 0.153745f, 0.153839f, 0.153934f, 0.154029f, 0.154124f, 0.154218f,
+ 0.154313f, 0.154408f, 0.154502f, 0.154597f, 0.154692f, 0.154787f, 0.154881f, 0.154976f,
+ 0.155071f, 0.155165f, 0.155260f, 0.155355f, 0.155450f, 0.155544f, 0.155639f, 0.155734f,
+ 0.155828f, 0.155923f, 0.156018f, 0.156112f, 0.156207f, 0.156302f, 0.156397f, 0.156491f,
+ 0.156586f, 0.156681f, 0.156775f, 0.156870f, 0.156965f, 0.157059f, 0.157154f, 0.157249f,
+ 0.157343f, 0.157438f, 0.157533f, 0.157627f, 0.157722f, 0.157817f, 0.157912f, 0.158006f,
+ 0.158101f, 0.158196f, 0.158290f, 0.158385f, 0.158480f, 0.158574f, 0.158669f, 0.158763f,
+ 0.158858f, 0.158953f, 0.159047f, 0.159142f, 0.159237f, 0.159331f, 0.159426f, 0.159521f,
+ 0.159615f, 0.159710f, 0.159805f, 0.159899f, 0.159994f, 0.160089f, 0.160183f, 0.160278f,
+ 0.160372f, 0.160467f, 0.160562f, 0.160656f, 0.160751f, 0.160846f, 0.160940f, 0.161035f,
+ 0.161129f, 0.161224f, 0.161319f, 0.161413f, 0.161508f, 0.161603f, 0.161697f, 0.161792f,
+ 0.161886f, 0.161981f, 0.162076f, 0.162170f, 0.162265f, 0.162359f, 0.162454f, 0.162549f,
+ 0.162643f, 0.162738f, 0.162832f, 0.162927f, 0.163022f, 0.163116f, 0.163211f, 0.163305f,
+ 0.163400f, 0.163495f, 0.163589f, 0.163684f, 0.163778f, 0.163873f, 0.163967f, 0.164062f,
+ 0.164157f, 0.164251f, 0.164346f, 0.164440f, 0.164535f, 0.164629f, 0.164724f, 0.164819f,
+ 0.164913f, 0.165008f, 0.165102f, 0.165197f, 0.165291f, 0.165386f, 0.165480f, 0.165575f,
+ 0.165670f, 0.165764f, 0.165859f, 0.165953f, 0.166048f, 0.166142f, 0.166237f, 0.166331f,
+ 0.166426f, 0.166520f, 0.166615f, 0.166710f, 0.166804f, 0.166899f, 0.166993f, 0.167088f,
+ 0.167182f, 0.167277f, 0.167371f, 0.167466f, 0.167560f, 0.167655f, 0.167749f, 0.167844f,
+ 0.167938f, 0.168033f, 0.168127f, 0.168222f, 0.168316f, 0.168411f, 0.168505f, 0.168600f,
+ 0.168694f, 0.168789f, 0.168883f, 0.168978f, 0.169072f, 0.169167f, 0.169261f, 0.169356f,
+ 0.169450f, 0.169545f, 0.169639f, 0.169734f, 0.169828f, 0.169923f, 0.170017f, 0.170112f,
+ 0.170206f, 0.170301f, 0.170395f, 0.170490f, 0.170584f, 0.170678f, 0.170773f, 0.170867f,
+ 0.170962f, 0.171056f, 0.171151f, 0.171245f, 0.171340f, 0.171434f, 0.171529f, 0.171623f,
+ 0.171718f, 0.171812f, 0.171906f, 0.172001f, 0.172095f, 0.172190f, 0.172284f, 0.172379f,
+ 0.172473f, 0.172568f, 0.172662f, 0.172756f, 0.172851f, 0.172945f, 0.173040f, 0.173134f,
+ 0.173229f, 0.173323f, 0.173417f, 0.173512f, 0.173606f, 0.173701f, 0.173795f, 0.173889f,
+ 0.173984f, 0.174078f, 0.174173f, 0.174267f, 0.174362f, 0.174456f, 0.174550f, 0.174645f,
+ 0.174739f, 0.174834f, 0.174928f, 0.175022f, 0.175117f, 0.175211f, 0.175305f, 0.175400f,
+ 0.175494f, 0.175589f, 0.175683f, 0.175777f, 0.175872f, 0.175966f, 0.176061f, 0.176155f,
+ 0.176249f, 0.176344f, 0.176438f, 0.176532f, 0.176627f, 0.176721f, 0.176815f, 0.176910f,
+ 0.177004f, 0.177099f, 0.177193f, 0.177287f, 0.177382f, 0.177476f, 0.177570f, 0.177665f,
+ 0.177759f, 0.177853f, 0.177948f, 0.178042f, 0.178136f, 0.178231f, 0.178325f, 0.178419f,
+ 0.178514f, 0.178608f, 0.178702f, 0.178797f, 0.178891f, 0.178985f, 0.179080f, 0.179174f,
+ 0.179268f, 0.179363f, 0.179457f, 0.179551f, 0.179646f, 0.179740f, 0.179834f, 0.179929f,
+ 0.180023f, 0.180117f, 0.180212f, 0.180306f, 0.180400f, 0.180494f, 0.180589f, 0.180683f,
+ 0.180777f, 0.180872f, 0.180966f, 0.181060f, 0.181154f, 0.181249f, 0.181343f, 0.181437f,
+ 0.181532f, 0.181626f, 0.181720f, 0.181814f, 0.181909f, 0.182003f, 0.182097f, 0.182192f,
+ 0.182286f, 0.182380f, 0.182474f, 0.182569f, 0.182663f, 0.182757f, 0.182851f, 0.182946f,
+ 0.183040f, 0.183134f, 0.183228f, 0.183323f, 0.183417f, 0.183511f, 0.183605f, 0.183700f,
+ 0.183794f, 0.183888f, 0.183982f, 0.184077f, 0.184171f, 0.184265f, 0.184359f, 0.184454f,
+ 0.184548f, 0.184642f, 0.184736f, 0.184830f, 0.184925f, 0.185019f, 0.185113f, 0.185207f,
+ 0.185301f, 0.185396f, 0.185490f, 0.185584f, 0.185678f, 0.185773f, 0.185867f, 0.185961f,
+ 0.186055f, 0.186149f, 0.186244f, 0.186338f, 0.186432f, 0.186526f, 0.186620f, 0.186715f,
+ 0.186809f, 0.186903f, 0.186997f, 0.187091f, 0.187185f, 0.187280f, 0.187374f, 0.187468f,
+ 0.187562f, 0.187656f, 0.187750f, 0.187845f, 0.187939f, 0.188033f, 0.188127f, 0.188221f,
+ 0.188315f, 0.188410f, 0.188504f, 0.188598f, 0.188692f, 0.188786f, 0.188880f, 0.188975f,
+ 0.189069f, 0.189163f, 0.189257f, 0.189351f, 0.189445f, 0.189539f, 0.189634f, 0.189728f,
+ 0.189822f, 0.189916f, 0.190010f, 0.190104f, 0.190198f, 0.190292f, 0.190387f, 0.190481f,
+ 0.190575f, 0.190669f, 0.190763f, 0.190857f, 0.190951f, 0.191045f, 0.191139f, 0.191234f,
+ 0.191328f, 0.191422f, 0.191516f, 0.191610f, 0.191704f, 0.191798f, 0.191892f, 0.191986f,
+ 0.192080f, 0.192174f, 0.192269f, 0.192363f, 0.192457f, 0.192551f, 0.192645f, 0.192739f,
+ 0.192833f, 0.192927f, 0.193021f, 0.193115f, 0.193209f, 0.193303f, 0.193397f, 0.193492f,
+ 0.193586f, 0.193680f, 0.193774f, 0.193868f, 0.193962f, 0.194056f, 0.194150f, 0.194244f,
+ 0.194338f, 0.194432f, 0.194526f, 0.194620f, 0.194714f, 0.194808f, 0.194902f, 0.194996f,
+ 0.195090f, 0.195184f, 0.195278f, 0.195372f, 0.195466f, 0.195560f, 0.195654f, 0.195748f,
+ 0.195843f, 0.195937f, 0.196031f, 0.196125f, 0.196219f, 0.196313f, 0.196407f, 0.196501f,
+ 0.196595f, 0.196689f, 0.196783f, 0.196877f, 0.196971f, 0.197065f, 0.197159f, 0.197253f,
+ 0.197347f, 0.197441f, 0.197535f, 0.197629f, 0.197722f, 0.197816f, 0.197910f, 0.198004f,
+ 0.198098f, 0.198192f, 0.198286f, 0.198380f, 0.198474f, 0.198568f, 0.198662f, 0.198756f,
+ 0.198850f, 0.198944f, 0.199038f, 0.199132f, 0.199226f, 0.199320f, 0.199414f, 0.199508f,
+ 0.199602f, 0.199696f, 0.199790f, 0.199884f, 0.199978f, 0.200071f, 0.200165f, 0.200259f,
+ 0.200353f, 0.200447f, 0.200541f, 0.200635f, 0.200729f, 0.200823f, 0.200917f, 0.201011f,
+ 0.201105f, 0.201199f, 0.201292f, 0.201386f, 0.201480f, 0.201574f, 0.201668f, 0.201762f,
+ 0.201856f, 0.201950f, 0.202044f, 0.202138f, 0.202231f, 0.202325f, 0.202419f, 0.202513f,
+ 0.202607f, 0.202701f, 0.202795f, 0.202889f, 0.202983f, 0.203076f, 0.203170f, 0.203264f,
+ 0.203358f, 0.203452f, 0.203546f, 0.203640f, 0.203734f, 0.203827f, 0.203921f, 0.204015f,
+ 0.204109f, 0.204203f, 0.204297f, 0.204391f, 0.204484f, 0.204578f, 0.204672f, 0.204766f,
+ 0.204860f, 0.204954f, 0.205047f, 0.205141f, 0.205235f, 0.205329f, 0.205423f, 0.205517f,
+ 0.205610f, 0.205704f, 0.205798f, 0.205892f, 0.205986f, 0.206080f, 0.206173f, 0.206267f,
+ 0.206361f, 0.206455f, 0.206549f, 0.206642f, 0.206736f, 0.206830f, 0.206924f, 0.207018f,
+ 0.207111f, 0.207205f, 0.207299f, 0.207393f, 0.207487f, 0.207580f, 0.207674f, 0.207768f,
+ 0.207862f, 0.207955f, 0.208049f, 0.208143f, 0.208237f, 0.208331f, 0.208424f, 0.208518f,
+ 0.208612f, 0.208706f, 0.208799f, 0.208893f, 0.208987f, 0.209081f, 0.209174f, 0.209268f,
+ 0.209362f, 0.209456f, 0.209549f, 0.209643f, 0.209737f, 0.209831f, 0.209924f, 0.210018f,
+ 0.210112f, 0.210206f, 0.210299f, 0.210393f, 0.210487f, 0.210580f, 0.210674f, 0.210768f,
+ 0.210862f, 0.210955f, 0.211049f, 0.211143f, 0.211237f, 0.211330f, 0.211424f, 0.211518f,
+ 0.211611f, 0.211705f, 0.211799f, 0.211892f, 0.211986f, 0.212080f, 0.212174f, 0.212267f,
+ 0.212361f, 0.212455f, 0.212548f, 0.212642f, 0.212736f, 0.212829f, 0.212923f, 0.213017f,
+ 0.213110f, 0.213204f, 0.213298f, 0.213391f, 0.213485f, 0.213579f, 0.213672f, 0.213766f,
+ 0.213860f, 0.213953f, 0.214047f, 0.214141f, 0.214234f, 0.214328f, 0.214422f, 0.214515f,
+ 0.214609f, 0.214702f, 0.214796f, 0.214890f, 0.214983f, 0.215077f, 0.215171f, 0.215264f,
+ 0.215358f, 0.215451f, 0.215545f, 0.215639f, 0.215732f, 0.215826f, 0.215920f, 0.216013f,
+ 0.216107f, 0.216200f, 0.216294f, 0.216388f, 0.216481f, 0.216575f, 0.216668f, 0.216762f,
+ 0.216856f, 0.216949f, 0.217043f, 0.217136f, 0.217230f, 0.217324f, 0.217417f, 0.217511f,
+ 0.217604f, 0.217698f, 0.217791f, 0.217885f, 0.217979f, 0.218072f, 0.218166f, 0.218259f,
+ 0.218353f, 0.218446f, 0.218540f, 0.218633f, 0.218727f, 0.218821f, 0.218914f, 0.219008f,
+ 0.219101f, 0.219195f, 0.219288f, 0.219382f, 0.219475f, 0.219569f, 0.219662f, 0.219756f,
+ 0.219850f, 0.219943f, 0.220037f, 0.220130f, 0.220224f, 0.220317f, 0.220411f, 0.220504f,
+ 0.220598f, 0.220691f, 0.220785f, 0.220878f, 0.220972f, 0.221065f, 0.221159f, 0.221252f,
+ 0.221346f, 0.221439f, 0.221533f, 0.221626f, 0.221720f, 0.221813f, 0.221907f, 0.222000f,
+ 0.222094f, 0.222187f, 0.222281f, 0.222374f, 0.222468f, 0.222561f, 0.222654f, 0.222748f,
+ 0.222841f, 0.222935f, 0.223028f, 0.223122f, 0.223215f, 0.223309f, 0.223402f, 0.223496f,
+ 0.223589f, 0.223682f, 0.223776f, 0.223869f, 0.223963f, 0.224056f, 0.224150f, 0.224243f,
+ 0.224337f, 0.224430f, 0.224523f, 0.224617f, 0.224710f, 0.224804f, 0.224897f, 0.224991f,
+ 0.225084f, 0.225177f, 0.225271f, 0.225364f, 0.225458f, 0.225551f, 0.225644f, 0.225738f,
+ 0.225831f, 0.225925f, 0.226018f, 0.226111f, 0.226205f, 0.226298f, 0.226391f, 0.226485f,
+ 0.226578f, 0.226672f, 0.226765f, 0.226858f, 0.226952f, 0.227045f, 0.227139f, 0.227232f,
+ 0.227325f, 0.227419f, 0.227512f, 0.227605f, 0.227699f, 0.227792f, 0.227885f, 0.227979f,
+ 0.228072f, 0.228165f, 0.228259f, 0.228352f, 0.228445f, 0.228539f, 0.228632f, 0.228725f,
+ 0.228819f, 0.228912f, 0.229005f, 0.229099f, 0.229192f, 0.229285f, 0.229379f, 0.229472f,
+ 0.229565f, 0.229659f, 0.229752f, 0.229845f, 0.229939f, 0.230032f, 0.230125f, 0.230218f,
+ 0.230312f, 0.230405f, 0.230498f, 0.230592f, 0.230685f, 0.230778f, 0.230872f, 0.230965f,
+ 0.231058f, 0.231151f, 0.231245f, 0.231338f, 0.231431f, 0.231524f, 0.231618f, 0.231711f,
+ 0.231804f, 0.231898f, 0.231991f, 0.232084f, 0.232177f, 0.232271f, 0.232364f, 0.232457f,
+ 0.232550f, 0.232644f, 0.232737f, 0.232830f, 0.232923f, 0.233017f, 0.233110f, 0.233203f,
+ 0.233296f, 0.233389f, 0.233483f, 0.233576f, 0.233669f, 0.233762f, 0.233856f, 0.233949f,
+ 0.234042f, 0.234135f, 0.234228f, 0.234322f, 0.234415f, 0.234508f, 0.234601f, 0.234694f,
+ 0.234788f, 0.234881f, 0.234974f, 0.235067f, 0.235160f, 0.235254f, 0.235347f, 0.235440f,
+ 0.235533f, 0.235626f, 0.235719f, 0.235813f, 0.235906f, 0.235999f, 0.236092f, 0.236185f,
+ 0.236278f, 0.236372f, 0.236465f, 0.236558f, 0.236651f, 0.236744f, 0.236837f, 0.236930f,
+ 0.237024f, 0.237117f, 0.237210f, 0.237303f, 0.237396f, 0.237489f, 0.237582f, 0.237676f,
+ 0.237769f, 0.237862f, 0.237955f, 0.238048f, 0.238141f, 0.238234f, 0.238327f, 0.238420f,
+ 0.238514f, 0.238607f, 0.238700f, 0.238793f, 0.238886f, 0.238979f, 0.239072f, 0.239165f,
+ 0.239258f, 0.239351f, 0.239445f, 0.239538f, 0.239631f, 0.239724f, 0.239817f, 0.239910f,
+ 0.240003f, 0.240096f, 0.240189f, 0.240282f, 0.240375f, 0.240468f, 0.240561f, 0.240654f,
+ 0.240748f, 0.240841f, 0.240934f, 0.241027f, 0.241120f, 0.241213f, 0.241306f, 0.241399f,
+ 0.241492f, 0.241585f, 0.241678f, 0.241771f, 0.241864f, 0.241957f, 0.242050f, 0.242143f,
+ 0.242236f, 0.242329f, 0.242422f, 0.242515f, 0.242608f, 0.242701f, 0.242794f, 0.242887f,
+ 0.242980f, 0.243073f, 0.243166f, 0.243259f, 0.243352f, 0.243445f, 0.243538f, 0.243631f,
+ 0.243724f, 0.243817f, 0.243910f, 0.244003f, 0.244096f, 0.244189f, 0.244282f, 0.244375f,
+ 0.244468f, 0.244561f, 0.244654f, 0.244747f, 0.244840f, 0.244933f, 0.245026f, 0.245119f,
+ 0.245212f, 0.245304f, 0.245397f, 0.245490f, 0.245583f, 0.245676f, 0.245769f, 0.245862f,
+ 0.245955f, 0.246048f, 0.246141f, 0.246234f, 0.246327f, 0.246420f, 0.246513f, 0.246606f,
+ 0.246698f, 0.246791f, 0.246884f, 0.246977f, 0.247070f, 0.247163f, 0.247256f, 0.247349f,
+ 0.247442f, 0.247535f, 0.247627f, 0.247720f, 0.247813f, 0.247906f, 0.247999f, 0.248092f,
+ 0.248185f, 0.248278f, 0.248370f, 0.248463f, 0.248556f, 0.248649f, 0.248742f, 0.248835f,
+ 0.248928f, 0.249020f, 0.249113f, 0.249206f, 0.249299f, 0.249392f, 0.249485f, 0.249578f,
+ 0.249670f, 0.249763f, 0.249856f, 0.249949f, 0.250042f, 0.250135f, 0.250227f, 0.250320f,
+ 0.250413f, 0.250506f, 0.250599f, 0.250691f, 0.250784f, 0.250877f, 0.250970f, 0.251063f,
+ 0.251155f, 0.251248f, 0.251341f, 0.251434f, 0.251527f, 0.251619f, 0.251712f, 0.251805f,
+ 0.251898f, 0.251991f, 0.252083f, 0.252176f, 0.252269f, 0.252362f, 0.252454f, 0.252547f,
+ 0.252640f, 0.252733f, 0.252826f, 0.252918f, 0.253011f, 0.253104f, 0.253197f, 0.253289f,
+ 0.253382f, 0.253475f, 0.253568f, 0.253660f, 0.253753f, 0.253846f, 0.253938f, 0.254031f,
+ 0.254124f, 0.254217f, 0.254309f, 0.254402f, 0.254495f, 0.254588f, 0.254680f, 0.254773f,
+ 0.254866f, 0.254958f, 0.255051f, 0.255144f, 0.255236f, 0.255329f, 0.255422f, 0.255515f,
+ 0.255607f, 0.255700f, 0.255793f, 0.255885f, 0.255978f, 0.256071f, 0.256163f, 0.256256f,
+ 0.256349f, 0.256441f, 0.256534f, 0.256627f, 0.256719f, 0.256812f, 0.256905f, 0.256997f,
+ 0.257090f, 0.257183f, 0.257275f, 0.257368f, 0.257461f, 0.257553f, 0.257646f, 0.257738f,
+ 0.257831f, 0.257924f, 0.258016f, 0.258109f, 0.258202f, 0.258294f, 0.258387f, 0.258479f,
+ 0.258572f, 0.258665f, 0.258757f, 0.258850f, 0.258943f, 0.259035f, 0.259128f, 0.259220f,
+ 0.259313f, 0.259405f, 0.259498f, 0.259591f, 0.259683f, 0.259776f, 0.259868f, 0.259961f,
+ 0.260054f, 0.260146f, 0.260239f, 0.260331f, 0.260424f, 0.260516f, 0.260609f, 0.260702f,
+ 0.260794f, 0.260887f, 0.260979f, 0.261072f, 0.261164f, 0.261257f, 0.261349f, 0.261442f,
+ 0.261534f, 0.261627f, 0.261720f, 0.261812f, 0.261905f, 0.261997f, 0.262090f, 0.262182f,
+ 0.262275f, 0.262367f, 0.262460f, 0.262552f, 0.262645f, 0.262737f, 0.262830f, 0.262922f,
+ 0.263015f, 0.263107f, 0.263200f, 0.263292f, 0.263385f, 0.263477f, 0.263570f, 0.263662f,
+ 0.263755f, 0.263847f, 0.263940f, 0.264032f, 0.264125f, 0.264217f, 0.264309f, 0.264402f,
+ 0.264494f, 0.264587f, 0.264679f, 0.264772f, 0.264864f, 0.264957f, 0.265049f, 0.265142f,
+ 0.265234f, 0.265326f, 0.265419f, 0.265511f, 0.265604f, 0.265696f, 0.265789f, 0.265881f,
+ 0.265973f, 0.266066f, 0.266158f, 0.266251f, 0.266343f, 0.266436f, 0.266528f, 0.266620f,
+ 0.266713f, 0.266805f, 0.266898f, 0.266990f, 0.267082f, 0.267175f, 0.267267f, 0.267359f,
+ 0.267452f, 0.267544f, 0.267637f, 0.267729f, 0.267821f, 0.267914f, 0.268006f, 0.268099f,
+ 0.268191f, 0.268283f, 0.268376f, 0.268468f, 0.268560f, 0.268653f, 0.268745f, 0.268837f,
+ 0.268930f, 0.269022f, 0.269114f, 0.269207f, 0.269299f, 0.269391f, 0.269484f, 0.269576f,
+ 0.269668f, 0.269761f, 0.269853f, 0.269945f, 0.270038f, 0.270130f, 0.270222f, 0.270315f,
+ 0.270407f, 0.270499f, 0.270591f, 0.270684f, 0.270776f, 0.270868f, 0.270961f, 0.271053f,
+ 0.271145f, 0.271237f, 0.271330f, 0.271422f, 0.271514f, 0.271607f, 0.271699f, 0.271791f,
+ 0.271883f, 0.271976f, 0.272068f, 0.272160f, 0.272252f, 0.272345f, 0.272437f, 0.272529f,
+ 0.272621f, 0.272714f, 0.272806f, 0.272898f, 0.272990f, 0.273083f, 0.273175f, 0.273267f,
+ 0.273359f, 0.273451f, 0.273544f, 0.273636f, 0.273728f, 0.273820f, 0.273912f, 0.274005f,
+ 0.274097f, 0.274189f, 0.274281f, 0.274374f, 0.274466f, 0.274558f, 0.274650f, 0.274742f,
+ 0.274834f, 0.274927f, 0.275019f, 0.275111f, 0.275203f, 0.275295f, 0.275387f, 0.275480f,
+ 0.275572f, 0.275664f, 0.275756f, 0.275848f, 0.275940f, 0.276033f, 0.276125f, 0.276217f,
+ 0.276309f, 0.276401f, 0.276493f, 0.276585f, 0.276678f, 0.276770f, 0.276862f, 0.276954f,
+ 0.277046f, 0.277138f, 0.277230f, 0.277322f, 0.277415f, 0.277507f, 0.277599f, 0.277691f,
+ 0.277783f, 0.277875f, 0.277967f, 0.278059f, 0.278151f, 0.278243f, 0.278336f, 0.278428f,
+ 0.278520f, 0.278612f, 0.278704f, 0.278796f, 0.278888f, 0.278980f, 0.279072f, 0.279164f,
+ 0.279256f, 0.279348f, 0.279440f, 0.279532f, 0.279624f, 0.279717f, 0.279809f, 0.279901f,
+ 0.279993f, 0.280085f, 0.280177f, 0.280269f, 0.280361f, 0.280453f, 0.280545f, 0.280637f,
+ 0.280729f, 0.280821f, 0.280913f, 0.281005f, 0.281097f, 0.281189f, 0.281281f, 0.281373f,
+ 0.281465f, 0.281557f, 0.281649f, 0.281741f, 0.281833f, 0.281925f, 0.282017f, 0.282109f,
+ 0.282201f, 0.282293f, 0.282385f, 0.282477f, 0.282569f, 0.282661f, 0.282753f, 0.282845f,
+ 0.282937f, 0.283029f, 0.283120f, 0.283212f, 0.283304f, 0.283396f, 0.283488f, 0.283580f,
+ 0.283672f, 0.283764f, 0.283856f, 0.283948f, 0.284040f, 0.284132f, 0.284224f, 0.284316f,
+ 0.284408f, 0.284499f, 0.284591f, 0.284683f, 0.284775f, 0.284867f, 0.284959f, 0.285051f,
+ 0.285143f, 0.285235f, 0.285327f, 0.285418f, 0.285510f, 0.285602f, 0.285694f, 0.285786f,
+ 0.285878f, 0.285970f, 0.286062f, 0.286153f, 0.286245f, 0.286337f, 0.286429f, 0.286521f,
+ 0.286613f, 0.286705f, 0.286796f, 0.286888f, 0.286980f, 0.287072f, 0.287164f, 0.287256f,
+ 0.287347f, 0.287439f, 0.287531f, 0.287623f, 0.287715f, 0.287807f, 0.287898f, 0.287990f,
+ 0.288082f, 0.288174f, 0.288266f, 0.288357f, 0.288449f, 0.288541f, 0.288633f, 0.288725f,
+ 0.288816f, 0.288908f, 0.289000f, 0.289092f, 0.289184f, 0.289275f, 0.289367f, 0.289459f,
+ 0.289551f, 0.289642f, 0.289734f, 0.289826f, 0.289918f, 0.290009f, 0.290101f, 0.290193f,
+ 0.290285f, 0.290376f, 0.290468f, 0.290560f, 0.290652f, 0.290743f, 0.290835f, 0.290927f,
+ 0.291019f, 0.291110f, 0.291202f, 0.291294f, 0.291385f, 0.291477f, 0.291569f, 0.291661f,
+ 0.291752f, 0.291844f, 0.291936f, 0.292027f, 0.292119f, 0.292211f, 0.292302f, 0.292394f,
+ 0.292486f, 0.292577f, 0.292669f, 0.292761f, 0.292852f, 0.292944f, 0.293036f, 0.293128f,
+ 0.293219f, 0.293311f, 0.293402f, 0.293494f, 0.293586f, 0.293677f, 0.293769f, 0.293861f,
+ 0.293952f, 0.294044f, 0.294136f, 0.294227f, 0.294319f, 0.294410f, 0.294502f, 0.294594f,
+ 0.294685f, 0.294777f, 0.294869f, 0.294960f, 0.295052f, 0.295143f, 0.295235f, 0.295327f,
+ 0.295418f, 0.295510f, 0.295601f, 0.295693f, 0.295785f, 0.295876f, 0.295968f, 0.296059f,
+ 0.296151f, 0.296242f, 0.296334f, 0.296426f, 0.296517f, 0.296609f, 0.296700f, 0.296792f,
+ 0.296883f, 0.296975f, 0.297066f, 0.297158f, 0.297250f, 0.297341f, 0.297433f, 0.297524f,
+ 0.297616f, 0.297707f, 0.297799f, 0.297890f, 0.297982f, 0.298073f, 0.298165f, 0.298256f,
+ 0.298348f, 0.298439f, 0.298531f, 0.298622f, 0.298714f, 0.298805f, 0.298897f, 0.298988f,
+ 0.299080f, 0.299171f, 0.299263f, 0.299354f, 0.299446f, 0.299537f, 0.299629f, 0.299720f,
+ 0.299812f, 0.299903f, 0.299995f, 0.300086f, 0.300177f, 0.300269f, 0.300360f, 0.300452f,
+ 0.300543f, 0.300635f, 0.300726f, 0.300818f, 0.300909f, 0.301000f, 0.301092f, 0.301183f,
+ 0.301275f, 0.301366f, 0.301458f, 0.301549f, 0.301640f, 0.301732f, 0.301823f, 0.301915f,
+ 0.302006f, 0.302097f, 0.302189f, 0.302280f, 0.302372f, 0.302463f, 0.302554f, 0.302646f,
+ 0.302737f, 0.302828f, 0.302920f, 0.303011f, 0.303103f, 0.303194f, 0.303285f, 0.303377f,
+ 0.303468f, 0.303559f, 0.303651f, 0.303742f, 0.303833f, 0.303925f, 0.304016f, 0.304107f,
+ 0.304199f, 0.304290f, 0.304381f, 0.304473f, 0.304564f, 0.304655f, 0.304747f, 0.304838f,
+ 0.304929f, 0.305021f, 0.305112f, 0.305203f, 0.305294f, 0.305386f, 0.305477f, 0.305568f,
+ 0.305660f, 0.305751f, 0.305842f, 0.305933f, 0.306025f, 0.306116f, 0.306207f, 0.306299f,
+ 0.306390f, 0.306481f, 0.306572f, 0.306664f, 0.306755f, 0.306846f, 0.306937f, 0.307029f,
+ 0.307120f, 0.307211f, 0.307302f, 0.307394f, 0.307485f, 0.307576f, 0.307667f, 0.307758f,
+ 0.307850f, 0.307941f, 0.308032f, 0.308123f, 0.308214f, 0.308306f, 0.308397f, 0.308488f,
+ 0.308579f, 0.308670f, 0.308762f, 0.308853f, 0.308944f, 0.309035f, 0.309126f, 0.309218f,
+ 0.309309f, 0.309400f, 0.309491f, 0.309582f, 0.309673f, 0.309765f, 0.309856f, 0.309947f,
+ 0.310038f, 0.310129f, 0.310220f, 0.310311f, 0.310403f, 0.310494f, 0.310585f, 0.310676f,
+ 0.310767f, 0.310858f, 0.310949f, 0.311041f, 0.311132f, 0.311223f, 0.311314f, 0.311405f,
+ 0.311496f, 0.311587f, 0.311678f, 0.311769f, 0.311860f, 0.311952f, 0.312043f, 0.312134f,
+ 0.312225f, 0.312316f, 0.312407f, 0.312498f, 0.312589f, 0.312680f, 0.312771f, 0.312862f,
+ 0.312953f, 0.313044f, 0.313135f, 0.313227f, 0.313318f, 0.313409f, 0.313500f, 0.313591f,
+ 0.313682f, 0.313773f, 0.313864f, 0.313955f, 0.314046f, 0.314137f, 0.314228f, 0.314319f,
+ 0.314410f, 0.314501f, 0.314592f, 0.314683f, 0.314774f, 0.314865f, 0.314956f, 0.315047f,
+ 0.315138f, 0.315229f, 0.315320f, 0.315411f, 0.315502f, 0.315593f, 0.315684f, 0.315775f,
+ 0.315866f, 0.315957f, 0.316048f, 0.316139f, 0.316230f, 0.316321f, 0.316411f, 0.316502f,
+ 0.316593f, 0.316684f, 0.316775f, 0.316866f, 0.316957f, 0.317048f, 0.317139f, 0.317230f,
+ 0.317321f, 0.317412f, 0.317503f, 0.317594f, 0.317684f, 0.317775f, 0.317866f, 0.317957f,
+ 0.318048f, 0.318139f, 0.318230f, 0.318321f, 0.318412f, 0.318503f, 0.318593f, 0.318684f,
+ 0.318775f, 0.318866f, 0.318957f, 0.319048f, 0.319139f, 0.319229f, 0.319320f, 0.319411f,
+ 0.319502f, 0.319593f, 0.319684f, 0.319775f, 0.319865f, 0.319956f, 0.320047f, 0.320138f,
+ 0.320229f, 0.320320f, 0.320410f, 0.320501f, 0.320592f, 0.320683f, 0.320774f, 0.320864f,
+ 0.320955f, 0.321046f, 0.321137f, 0.321228f, 0.321318f, 0.321409f, 0.321500f, 0.321591f,
+ 0.321682f, 0.321772f, 0.321863f, 0.321954f, 0.322045f, 0.322135f, 0.322226f, 0.322317f,
+ 0.322408f, 0.322498f, 0.322589f, 0.322680f, 0.322771f, 0.322861f, 0.322952f, 0.323043f,
+ 0.323134f, 0.323224f, 0.323315f, 0.323406f, 0.323497f, 0.323587f, 0.323678f, 0.323769f,
+ 0.323859f, 0.323950f, 0.324041f, 0.324131f, 0.324222f, 0.324313f, 0.324404f, 0.324494f,
+ 0.324585f, 0.324676f, 0.324766f, 0.324857f, 0.324948f, 0.325038f, 0.325129f, 0.325220f,
+ 0.325310f, 0.325401f, 0.325492f, 0.325582f, 0.325673f, 0.325764f, 0.325854f, 0.325945f,
+ 0.326035f, 0.326126f, 0.326217f, 0.326307f, 0.326398f, 0.326489f, 0.326579f, 0.326670f,
+ 0.326760f, 0.326851f, 0.326942f, 0.327032f, 0.327123f, 0.327213f, 0.327304f, 0.327395f,
+ 0.327485f, 0.327576f, 0.327666f, 0.327757f, 0.327848f, 0.327938f, 0.328029f, 0.328119f,
+ 0.328210f, 0.328300f, 0.328391f, 0.328482f, 0.328572f, 0.328663f, 0.328753f, 0.328844f,
+ 0.328934f, 0.329025f, 0.329115f, 0.329206f, 0.329296f, 0.329387f, 0.329477f, 0.329568f,
+ 0.329658f, 0.329749f, 0.329839f, 0.329930f, 0.330020f, 0.330111f, 0.330202f, 0.330292f,
+ 0.330382f, 0.330473f, 0.330563f, 0.330654f, 0.330744f, 0.330835f, 0.330925f, 0.331016f,
+ 0.331106f, 0.331197f, 0.331287f, 0.331378f, 0.331468f, 0.331559f, 0.331649f, 0.331739f,
+ 0.331830f, 0.331920f, 0.332011f, 0.332101f, 0.332192f, 0.332282f, 0.332373f, 0.332463f,
+ 0.332553f, 0.332644f, 0.332734f, 0.332825f, 0.332915f, 0.333005f, 0.333096f, 0.333186f,
+ 0.333277f, 0.333367f, 0.333457f, 0.333548f, 0.333638f, 0.333729f, 0.333819f, 0.333909f,
+ 0.334000f, 0.334090f, 0.334180f, 0.334271f, 0.334361f, 0.334451f, 0.334542f, 0.334632f,
+ 0.334722f, 0.334813f, 0.334903f, 0.334994f, 0.335084f, 0.335174f, 0.335265f, 0.335355f,
+ 0.335445f, 0.335535f, 0.335626f, 0.335716f, 0.335806f, 0.335897f, 0.335987f, 0.336077f,
+ 0.336168f, 0.336258f, 0.336348f, 0.336438f, 0.336529f, 0.336619f, 0.336709f, 0.336800f,
+ 0.336890f, 0.336980f, 0.337070f, 0.337161f, 0.337251f, 0.337341f, 0.337431f, 0.337522f,
+ 0.337612f, 0.337702f, 0.337792f, 0.337883f, 0.337973f, 0.338063f, 0.338153f, 0.338244f,
+ 0.338334f, 0.338424f, 0.338514f, 0.338604f, 0.338695f, 0.338785f, 0.338875f, 0.338965f,
+ 0.339055f, 0.339146f, 0.339236f, 0.339326f, 0.339416f, 0.339506f, 0.339597f, 0.339687f,
+ 0.339777f, 0.339867f, 0.339957f, 0.340047f, 0.340138f, 0.340228f, 0.340318f, 0.340408f,
+ 0.340498f, 0.340588f, 0.340678f, 0.340769f, 0.340859f, 0.340949f, 0.341039f, 0.341129f,
+ 0.341219f, 0.341309f, 0.341399f, 0.341490f, 0.341580f, 0.341670f, 0.341760f, 0.341850f,
+ 0.341940f, 0.342030f, 0.342120f, 0.342210f, 0.342300f, 0.342391f, 0.342481f, 0.342571f,
+ 0.342661f, 0.342751f, 0.342841f, 0.342931f, 0.343021f, 0.343111f, 0.343201f, 0.343291f,
+ 0.343381f, 0.343471f, 0.343561f, 0.343651f, 0.343741f, 0.343831f, 0.343921f, 0.344011f,
+ 0.344101f, 0.344191f, 0.344281f, 0.344371f, 0.344461f, 0.344551f, 0.344641f, 0.344731f,
+ 0.344821f, 0.344911f, 0.345001f, 0.345091f, 0.345181f, 0.345271f, 0.345361f, 0.345451f,
+ 0.345541f, 0.345631f, 0.345721f, 0.345811f, 0.345901f, 0.345991f, 0.346081f, 0.346171f,
+ 0.346261f, 0.346351f, 0.346441f, 0.346531f, 0.346621f, 0.346711f, 0.346801f, 0.346890f,
+ 0.346980f, 0.347070f, 0.347160f, 0.347250f, 0.347340f, 0.347430f, 0.347520f, 0.347610f,
+ 0.347700f, 0.347790f, 0.347879f, 0.347969f, 0.348059f, 0.348149f, 0.348239f, 0.348329f,
+ 0.348419f, 0.348509f, 0.348598f, 0.348688f, 0.348778f, 0.348868f, 0.348958f, 0.349048f,
+ 0.349138f, 0.349227f, 0.349317f, 0.349407f, 0.349497f, 0.349587f, 0.349676f, 0.349766f,
+ 0.349856f, 0.349946f, 0.350036f, 0.350126f, 0.350215f, 0.350305f, 0.350395f, 0.350485f,
+ 0.350575f, 0.350664f, 0.350754f, 0.350844f, 0.350934f, 0.351023f, 0.351113f, 0.351203f,
+ 0.351293f, 0.351383f, 0.351472f, 0.351562f, 0.351652f, 0.351742f, 0.351831f, 0.351921f,
+ 0.352011f, 0.352100f, 0.352190f, 0.352280f, 0.352370f, 0.352459f, 0.352549f, 0.352639f,
+ 0.352729f, 0.352818f, 0.352908f, 0.352998f, 0.353087f, 0.353177f, 0.353267f, 0.353356f,
+ 0.353446f, 0.353536f, 0.353626f, 0.353715f, 0.353805f, 0.353895f, 0.353984f, 0.354074f,
+ 0.354164f, 0.354253f, 0.354343f, 0.354432f, 0.354522f, 0.354612f, 0.354701f, 0.354791f,
+ 0.354881f, 0.354970f, 0.355060f, 0.355150f, 0.355239f, 0.355329f, 0.355418f, 0.355508f,
+ 0.355598f, 0.355687f, 0.355777f, 0.355866f, 0.355956f, 0.356046f, 0.356135f, 0.356225f,
+ 0.356314f, 0.356404f, 0.356494f, 0.356583f, 0.356673f, 0.356762f, 0.356852f, 0.356941f,
+ 0.357031f, 0.357121f, 0.357210f, 0.357300f, 0.357389f, 0.357479f, 0.357568f, 0.357658f,
+ 0.357747f, 0.357837f, 0.357926f, 0.358016f, 0.358105f, 0.358195f, 0.358284f, 0.358374f,
+ 0.358463f, 0.358553f, 0.358642f, 0.358732f, 0.358821f, 0.358911f, 0.359000f, 0.359090f,
+ 0.359179f, 0.359269f, 0.359358f, 0.359448f, 0.359537f, 0.359627f, 0.359716f, 0.359806f,
+ 0.359895f, 0.359984f, 0.360074f, 0.360163f, 0.360253f, 0.360342f, 0.360432f, 0.360521f,
+ 0.360611f, 0.360700f, 0.360789f, 0.360879f, 0.360968f, 0.361058f, 0.361147f, 0.361236f,
+ 0.361326f, 0.361415f, 0.361505f, 0.361594f, 0.361683f, 0.361773f, 0.361862f, 0.361952f,
+ 0.362041f, 0.362130f, 0.362220f, 0.362309f, 0.362398f, 0.362488f, 0.362577f, 0.362666f,
+ 0.362756f, 0.362845f, 0.362934f, 0.363024f, 0.363113f, 0.363202f, 0.363292f, 0.363381f,
+ 0.363470f, 0.363560f, 0.363649f, 0.363738f, 0.363828f, 0.363917f, 0.364006f, 0.364096f,
+ 0.364185f, 0.364274f, 0.364363f, 0.364453f, 0.364542f, 0.364631f, 0.364720f, 0.364810f,
+ 0.364899f, 0.364988f, 0.365078f, 0.365167f, 0.365256f, 0.365345f, 0.365435f, 0.365524f,
+ 0.365613f, 0.365702f, 0.365791f, 0.365881f, 0.365970f, 0.366059f, 0.366148f, 0.366238f,
+ 0.366327f, 0.366416f, 0.366505f, 0.366594f, 0.366684f, 0.366773f, 0.366862f, 0.366951f,
+ 0.367040f, 0.367130f, 0.367219f, 0.367308f, 0.367397f, 0.367486f, 0.367575f, 0.367665f,
+ 0.367754f, 0.367843f, 0.367932f, 0.368021f, 0.368110f, 0.368199f, 0.368289f, 0.368378f,
+ 0.368467f, 0.368556f, 0.368645f, 0.368734f, 0.368823f, 0.368912f, 0.369002f, 0.369091f,
+ 0.369180f, 0.369269f, 0.369358f, 0.369447f, 0.369536f, 0.369625f, 0.369714f, 0.369803f,
+ 0.369892f, 0.369982f, 0.370071f, 0.370160f, 0.370249f, 0.370338f, 0.370427f, 0.370516f,
+ 0.370605f, 0.370694f, 0.370783f, 0.370872f, 0.370961f, 0.371050f, 0.371139f, 0.371228f,
+ 0.371317f, 0.371406f, 0.371495f, 0.371584f, 0.371673f, 0.371762f, 0.371851f, 0.371940f,
+ 0.372029f, 0.372118f, 0.372207f, 0.372296f, 0.372385f, 0.372474f, 0.372563f, 0.372652f,
+ 0.372741f, 0.372830f, 0.372919f, 0.373008f, 0.373097f, 0.373186f, 0.373275f, 0.373364f,
+ 0.373453f, 0.373542f, 0.373631f, 0.373719f, 0.373808f, 0.373897f, 0.373986f, 0.374075f,
+ 0.374164f, 0.374253f, 0.374342f, 0.374431f, 0.374520f, 0.374609f, 0.374697f, 0.374786f,
+ 0.374875f, 0.374964f, 0.375053f, 0.375142f, 0.375231f, 0.375320f, 0.375408f, 0.375497f,
+ 0.375586f, 0.375675f, 0.375764f, 0.375853f, 0.375942f, 0.376030f, 0.376119f, 0.376208f,
+ 0.376297f, 0.376386f, 0.376475f, 0.376563f, 0.376652f, 0.376741f, 0.376830f, 0.376919f,
+ 0.377007f, 0.377096f, 0.377185f, 0.377274f, 0.377363f, 0.377451f, 0.377540f, 0.377629f,
+ 0.377718f, 0.377806f, 0.377895f, 0.377984f, 0.378073f, 0.378162f, 0.378250f, 0.378339f,
+ 0.378428f, 0.378516f, 0.378605f, 0.378694f, 0.378783f, 0.378871f, 0.378960f, 0.379049f,
+ 0.379138f, 0.379226f, 0.379315f, 0.379404f, 0.379492f, 0.379581f, 0.379670f, 0.379759f,
+ 0.379847f, 0.379936f, 0.380025f, 0.380113f, 0.380202f, 0.380291f, 0.380379f, 0.380468f,
+ 0.380557f, 0.380645f, 0.380734f, 0.380823f, 0.380911f, 0.381000f, 0.381088f, 0.381177f,
+ 0.381266f, 0.381354f, 0.381443f, 0.381532f, 0.381620f, 0.381709f, 0.381797f, 0.381886f,
+ 0.381975f, 0.382063f, 0.382152f, 0.382241f, 0.382329f, 0.382418f, 0.382506f, 0.382595f,
+ 0.382683f, 0.382772f, 0.382861f, 0.382949f, 0.383038f, 0.383126f, 0.383215f, 0.383303f,
+ 0.383392f, 0.383480f, 0.383569f, 0.383658f, 0.383746f, 0.383835f, 0.383923f, 0.384012f,
+ 0.384100f, 0.384189f, 0.384277f, 0.384366f, 0.384454f, 0.384543f, 0.384631f, 0.384720f,
+ 0.384808f, 0.384897f, 0.384985f, 0.385074f, 0.385162f, 0.385251f, 0.385339f, 0.385428f,
+ 0.385516f, 0.385605f, 0.385693f, 0.385781f, 0.385870f, 0.385958f, 0.386047f, 0.386135f,
+ 0.386224f, 0.386312f, 0.386400f, 0.386489f, 0.386577f, 0.386666f, 0.386754f, 0.386843f,
+ 0.386931f, 0.387019f, 0.387108f, 0.387196f, 0.387285f, 0.387373f, 0.387461f, 0.387550f,
+ 0.387638f, 0.387727f, 0.387815f, 0.387903f, 0.387992f, 0.388080f, 0.388168f, 0.388257f,
+ 0.388345f, 0.388433f, 0.388522f, 0.388610f, 0.388698f, 0.388787f, 0.388875f, 0.388963f,
+ 0.389052f, 0.389140f, 0.389228f, 0.389317f, 0.389405f, 0.389493f, 0.389582f, 0.389670f,
+ 0.389758f, 0.389846f, 0.389935f, 0.390023f, 0.390111f, 0.390200f, 0.390288f, 0.390376f,
+ 0.390464f, 0.390553f, 0.390641f, 0.390729f, 0.390817f, 0.390906f, 0.390994f, 0.391082f,
+ 0.391170f, 0.391259f, 0.391347f, 0.391435f, 0.391523f, 0.391612f, 0.391700f, 0.391788f,
+ 0.391876f, 0.391964f, 0.392053f, 0.392141f, 0.392229f, 0.392317f, 0.392405f, 0.392493f,
+ 0.392582f, 0.392670f, 0.392758f, 0.392846f, 0.392934f, 0.393023f, 0.393111f, 0.393199f,
+ 0.393287f, 0.393375f, 0.393463f, 0.393551f, 0.393640f, 0.393728f, 0.393816f, 0.393904f,
+ 0.393992f, 0.394080f, 0.394168f, 0.394256f, 0.394344f, 0.394433f, 0.394521f, 0.394609f,
+ 0.394697f, 0.394785f, 0.394873f, 0.394961f, 0.395049f, 0.395137f, 0.395225f, 0.395313f,
+ 0.395401f, 0.395490f, 0.395578f, 0.395666f, 0.395754f, 0.395842f, 0.395930f, 0.396018f,
+ 0.396106f, 0.396194f, 0.396282f, 0.396370f, 0.396458f, 0.396546f, 0.396634f, 0.396722f,
+ 0.396810f, 0.396898f, 0.396986f, 0.397074f, 0.397162f, 0.397250f, 0.397338f, 0.397426f,
+ 0.397514f, 0.397602f, 0.397690f, 0.397778f, 0.397866f, 0.397954f, 0.398042f, 0.398130f,
+ 0.398218f, 0.398306f, 0.398393f, 0.398481f, 0.398569f, 0.398657f, 0.398745f, 0.398833f,
+ 0.398921f, 0.399009f, 0.399097f, 0.399185f, 0.399273f, 0.399361f, 0.399448f, 0.399536f,
+ 0.399624f, 0.399712f, 0.399800f, 0.399888f, 0.399976f, 0.400064f, 0.400151f, 0.400239f,
+ 0.400327f, 0.400415f, 0.400503f, 0.400591f, 0.400679f, 0.400766f, 0.400854f, 0.400942f,
+ 0.401030f, 0.401118f, 0.401206f, 0.401293f, 0.401381f, 0.401469f, 0.401557f, 0.401645f,
+ 0.401732f, 0.401820f, 0.401908f, 0.401996f, 0.402084f, 0.402171f, 0.402259f, 0.402347f,
+ 0.402435f, 0.402522f, 0.402610f, 0.402698f, 0.402786f, 0.402873f, 0.402961f, 0.403049f,
+ 0.403137f, 0.403224f, 0.403312f, 0.403400f, 0.403488f, 0.403575f, 0.403663f, 0.403751f,
+ 0.403838f, 0.403926f, 0.404014f, 0.404102f, 0.404189f, 0.404277f, 0.404365f, 0.404452f,
+ 0.404540f, 0.404628f, 0.404715f, 0.404803f, 0.404891f, 0.404978f, 0.405066f, 0.405154f,
+ 0.405241f, 0.405329f, 0.405417f, 0.405504f, 0.405592f, 0.405680f, 0.405767f, 0.405855f,
+ 0.405942f, 0.406030f, 0.406118f, 0.406205f, 0.406293f, 0.406380f, 0.406468f, 0.406556f,
+ 0.406643f, 0.406731f, 0.406818f, 0.406906f, 0.406994f, 0.407081f, 0.407169f, 0.407256f,
+ 0.407344f, 0.407431f, 0.407519f, 0.407606f, 0.407694f, 0.407782f, 0.407869f, 0.407957f,
+ 0.408044f, 0.408132f, 0.408219f, 0.408307f, 0.408394f, 0.408482f, 0.408569f, 0.408657f,
+ 0.408744f, 0.408832f, 0.408919f, 0.409007f, 0.409094f, 0.409182f, 0.409269f, 0.409357f,
+ 0.409444f, 0.409532f, 0.409619f, 0.409707f, 0.409794f, 0.409881f, 0.409969f, 0.410056f,
+ 0.410144f, 0.410231f, 0.410319f, 0.410406f, 0.410493f, 0.410581f, 0.410668f, 0.410756f,
+ 0.410843f, 0.410931f, 0.411018f, 0.411105f, 0.411193f, 0.411280f, 0.411368f, 0.411455f,
+ 0.411542f, 0.411630f, 0.411717f, 0.411804f, 0.411892f, 0.411979f, 0.412067f, 0.412154f,
+ 0.412241f, 0.412329f, 0.412416f, 0.412503f, 0.412591f, 0.412678f, 0.412765f, 0.412853f,
+ 0.412940f, 0.413027f, 0.413115f, 0.413202f, 0.413289f, 0.413376f, 0.413464f, 0.413551f,
+ 0.413638f, 0.413726f, 0.413813f, 0.413900f, 0.413987f, 0.414075f, 0.414162f, 0.414249f,
+ 0.414337f, 0.414424f, 0.414511f, 0.414598f, 0.414685f, 0.414773f, 0.414860f, 0.414947f,
+ 0.415034f, 0.415122f, 0.415209f, 0.415296f, 0.415383f, 0.415471f, 0.415558f, 0.415645f,
+ 0.415732f, 0.415819f, 0.415906f, 0.415994f, 0.416081f, 0.416168f, 0.416255f, 0.416342f,
+ 0.416430f, 0.416517f, 0.416604f, 0.416691f, 0.416778f, 0.416865f, 0.416952f, 0.417040f,
+ 0.417127f, 0.417214f, 0.417301f, 0.417388f, 0.417475f, 0.417562f, 0.417650f, 0.417737f,
+ 0.417824f, 0.417911f, 0.417998f, 0.418085f, 0.418172f, 0.418259f, 0.418346f, 0.418433f,
+ 0.418520f, 0.418608f, 0.418695f, 0.418782f, 0.418869f, 0.418956f, 0.419043f, 0.419130f,
+ 0.419217f, 0.419304f, 0.419391f, 0.419478f, 0.419565f, 0.419652f, 0.419739f, 0.419826f,
+ 0.419913f, 0.420000f, 0.420087f, 0.420174f, 0.420261f, 0.420348f, 0.420435f, 0.420522f,
+ 0.420609f, 0.420696f, 0.420783f, 0.420870f, 0.420957f, 0.421044f, 0.421131f, 0.421218f,
+ 0.421305f, 0.421392f, 0.421479f, 0.421566f, 0.421653f, 0.421739f, 0.421826f, 0.421913f,
+ 0.422000f, 0.422087f, 0.422174f, 0.422261f, 0.422348f, 0.422435f, 0.422522f, 0.422609f,
+ 0.422695f, 0.422782f, 0.422869f, 0.422956f, 0.423043f, 0.423130f, 0.423217f, 0.423304f,
+ 0.423390f, 0.423477f, 0.423564f, 0.423651f, 0.423738f, 0.423825f, 0.423912f, 0.423998f,
+ 0.424085f, 0.424172f, 0.424259f, 0.424346f, 0.424432f, 0.424519f, 0.424606f, 0.424693f,
+ 0.424780f, 0.424866f, 0.424953f, 0.425040f, 0.425127f, 0.425214f, 0.425300f, 0.425387f,
+ 0.425474f, 0.425561f, 0.425647f, 0.425734f, 0.425821f, 0.425908f, 0.425994f, 0.426081f,
+ 0.426168f, 0.426255f, 0.426341f, 0.426428f, 0.426515f, 0.426601f, 0.426688f, 0.426775f,
+ 0.426862f, 0.426948f, 0.427035f, 0.427122f, 0.427208f, 0.427295f, 0.427382f, 0.427468f,
+ 0.427555f, 0.427642f, 0.427728f, 0.427815f, 0.427902f, 0.427988f, 0.428075f, 0.428162f,
+ 0.428248f, 0.428335f, 0.428422f, 0.428508f, 0.428595f, 0.428681f, 0.428768f, 0.428855f,
+ 0.428941f, 0.429028f, 0.429114f, 0.429201f, 0.429288f, 0.429374f, 0.429461f, 0.429547f,
+ 0.429634f, 0.429721f, 0.429807f, 0.429894f, 0.429980f, 0.430067f, 0.430153f, 0.430240f,
+ 0.430326f, 0.430413f, 0.430500f, 0.430586f, 0.430673f, 0.430759f, 0.430846f, 0.430932f,
+ 0.431019f, 0.431105f, 0.431192f, 0.431278f, 0.431365f, 0.431451f, 0.431538f, 0.431624f,
+ 0.431711f, 0.431797f, 0.431884f, 0.431970f, 0.432057f, 0.432143f, 0.432229f, 0.432316f,
+ 0.432402f, 0.432489f, 0.432575f, 0.432662f, 0.432748f, 0.432835f, 0.432921f, 0.433007f,
+ 0.433094f, 0.433180f, 0.433267f, 0.433353f, 0.433439f, 0.433526f, 0.433612f, 0.433699f,
+ 0.433785f, 0.433871f, 0.433958f, 0.434044f, 0.434131f, 0.434217f, 0.434303f, 0.434390f,
+ 0.434476f, 0.434562f, 0.434649f, 0.434735f, 0.434821f, 0.434908f, 0.434994f, 0.435080f,
+ 0.435167f, 0.435253f, 0.435339f, 0.435426f, 0.435512f, 0.435598f, 0.435685f, 0.435771f,
+ 0.435857f, 0.435943f, 0.436030f, 0.436116f, 0.436202f, 0.436288f, 0.436375f, 0.436461f,
+ 0.436547f, 0.436633f, 0.436720f, 0.436806f, 0.436892f, 0.436978f, 0.437065f, 0.437151f,
+ 0.437237f, 0.437323f, 0.437410f, 0.437496f, 0.437582f, 0.437668f, 0.437754f, 0.437841f,
+ 0.437927f, 0.438013f, 0.438099f, 0.438185f, 0.438272f, 0.438358f, 0.438444f, 0.438530f,
+ 0.438616f, 0.438702f, 0.438789f, 0.438875f, 0.438961f, 0.439047f, 0.439133f, 0.439219f,
+ 0.439305f, 0.439392f, 0.439478f, 0.439564f, 0.439650f, 0.439736f, 0.439822f, 0.439908f,
+ 0.439994f, 0.440080f, 0.440166f, 0.440253f, 0.440339f, 0.440425f, 0.440511f, 0.440597f,
+ 0.440683f, 0.440769f, 0.440855f, 0.440941f, 0.441027f, 0.441113f, 0.441199f, 0.441285f,
+ 0.441371f, 0.441457f, 0.441543f, 0.441629f, 0.441715f, 0.441801f, 0.441887f, 0.441973f,
+ 0.442059f, 0.442145f, 0.442231f, 0.442317f, 0.442403f, 0.442489f, 0.442575f, 0.442661f,
+ 0.442747f, 0.442833f, 0.442919f, 0.443005f, 0.443091f, 0.443177f, 0.443263f, 0.443349f,
+ 0.443435f, 0.443521f, 0.443607f, 0.443693f, 0.443779f, 0.443864f, 0.443950f, 0.444036f,
+ 0.444122f, 0.444208f, 0.444294f, 0.444380f, 0.444466f, 0.444552f, 0.444637f, 0.444723f,
+ 0.444809f, 0.444895f, 0.444981f, 0.445067f, 0.445153f, 0.445239f, 0.445324f, 0.445410f,
+ 0.445496f, 0.445582f, 0.445668f, 0.445754f, 0.445839f, 0.445925f, 0.446011f, 0.446097f,
+ 0.446183f, 0.446268f, 0.446354f, 0.446440f, 0.446526f, 0.446612f, 0.446697f, 0.446783f,
+ 0.446869f, 0.446955f, 0.447040f, 0.447126f, 0.447212f, 0.447298f, 0.447383f, 0.447469f,
+ 0.447555f, 0.447641f, 0.447726f, 0.447812f, 0.447898f, 0.447983f, 0.448069f, 0.448155f,
+ 0.448241f, 0.448326f, 0.448412f, 0.448498f, 0.448583f, 0.448669f, 0.448755f, 0.448840f,
+ 0.448926f, 0.449012f, 0.449097f, 0.449183f, 0.449269f, 0.449354f, 0.449440f, 0.449526f,
+ 0.449611f, 0.449697f, 0.449783f, 0.449868f, 0.449954f, 0.450039f, 0.450125f, 0.450211f,
+ 0.450296f, 0.450382f, 0.450467f, 0.450553f, 0.450639f, 0.450724f, 0.450810f, 0.450895f,
+ 0.450981f, 0.451067f, 0.451152f, 0.451238f, 0.451323f, 0.451409f, 0.451494f, 0.451580f,
+ 0.451665f, 0.451751f, 0.451836f, 0.451922f, 0.452008f, 0.452093f, 0.452179f, 0.452264f,
+ 0.452350f, 0.452435f, 0.452521f, 0.452606f, 0.452692f, 0.452777f, 0.452863f, 0.452948f,
+ 0.453033f, 0.453119f, 0.453204f, 0.453290f, 0.453375f, 0.453461f, 0.453546f, 0.453632f,
+ 0.453717f, 0.453803f, 0.453888f, 0.453973f, 0.454059f, 0.454144f, 0.454230f, 0.454315f,
+ 0.454400f, 0.454486f, 0.454571f, 0.454657f, 0.454742f, 0.454827f, 0.454913f, 0.454998f,
+ 0.455084f, 0.455169f, 0.455254f, 0.455340f, 0.455425f, 0.455510f, 0.455596f, 0.455681f,
+ 0.455766f, 0.455852f, 0.455937f, 0.456022f, 0.456108f, 0.456193f, 0.456278f, 0.456364f,
+ 0.456449f, 0.456534f, 0.456620f, 0.456705f, 0.456790f, 0.456875f, 0.456961f, 0.457046f,
+ 0.457131f, 0.457217f, 0.457302f, 0.457387f, 0.457472f, 0.457558f, 0.457643f, 0.457728f,
+ 0.457813f, 0.457899f, 0.457984f, 0.458069f, 0.458154f, 0.458239f, 0.458325f, 0.458410f,
+ 0.458495f, 0.458580f, 0.458665f, 0.458751f, 0.458836f, 0.458921f, 0.459006f, 0.459091f,
+ 0.459177f, 0.459262f, 0.459347f, 0.459432f, 0.459517f, 0.459602f, 0.459687f, 0.459773f,
+ 0.459858f, 0.459943f, 0.460028f, 0.460113f, 0.460198f, 0.460283f, 0.460369f, 0.460454f,
+ 0.460539f, 0.460624f, 0.460709f, 0.460794f, 0.460879f, 0.460964f, 0.461049f, 0.461134f,
+ 0.461219f, 0.461304f, 0.461390f, 0.461475f, 0.461560f, 0.461645f, 0.461730f, 0.461815f,
+ 0.461900f, 0.461985f, 0.462070f, 0.462155f, 0.462240f, 0.462325f, 0.462410f, 0.462495f,
+ 0.462580f, 0.462665f, 0.462750f, 0.462835f, 0.462920f, 0.463005f, 0.463090f, 0.463175f,
+ 0.463260f, 0.463345f, 0.463430f, 0.463515f, 0.463600f, 0.463685f, 0.463769f, 0.463854f,
+ 0.463939f, 0.464024f, 0.464109f, 0.464194f, 0.464279f, 0.464364f, 0.464449f, 0.464534f,
+ 0.464619f, 0.464704f, 0.464788f, 0.464873f, 0.464958f, 0.465043f, 0.465128f, 0.465213f,
+ 0.465298f, 0.465383f, 0.465467f, 0.465552f, 0.465637f, 0.465722f, 0.465807f, 0.465892f,
+ 0.465977f, 0.466061f, 0.466146f, 0.466231f, 0.466316f, 0.466401f, 0.466485f, 0.466570f,
+ 0.466655f, 0.466740f, 0.466825f, 0.466909f, 0.466994f, 0.467079f, 0.467164f, 0.467248f,
+ 0.467333f, 0.467418f, 0.467503f, 0.467587f, 0.467672f, 0.467757f, 0.467842f, 0.467926f,
+ 0.468011f, 0.468096f, 0.468181f, 0.468265f, 0.468350f, 0.468435f, 0.468519f, 0.468604f,
+ 0.468689f, 0.468774f, 0.468858f, 0.468943f, 0.469028f, 0.469112f, 0.469197f, 0.469282f,
+ 0.469366f, 0.469451f, 0.469536f, 0.469620f, 0.469705f, 0.469789f, 0.469874f, 0.469959f,
+ 0.470043f, 0.470128f, 0.470213f, 0.470297f, 0.470382f, 0.470466f, 0.470551f, 0.470636f,
+ 0.470720f, 0.470805f, 0.470889f, 0.470974f, 0.471058f, 0.471143f, 0.471228f, 0.471312f,
+ 0.471397f, 0.471481f, 0.471566f, 0.471650f, 0.471735f, 0.471819f, 0.471904f, 0.471988f,
+ 0.472073f, 0.472158f, 0.472242f, 0.472327f, 0.472411f, 0.472496f, 0.472580f, 0.472665f,
+ 0.472749f, 0.472834f, 0.472918f, 0.473002f, 0.473087f, 0.473171f, 0.473256f, 0.473340f,
+ 0.473425f, 0.473509f, 0.473594f, 0.473678f, 0.473763f, 0.473847f, 0.473931f, 0.474016f,
+ 0.474100f, 0.474185f, 0.474269f, 0.474353f, 0.474438f, 0.474522f, 0.474607f, 0.474691f,
+ 0.474775f, 0.474860f, 0.474944f, 0.475029f, 0.475113f, 0.475197f, 0.475282f, 0.475366f,
+ 0.475450f, 0.475535f, 0.475619f, 0.475703f, 0.475788f, 0.475872f, 0.475956f, 0.476041f,
+ 0.476125f, 0.476209f, 0.476294f, 0.476378f, 0.476462f, 0.476546f, 0.476631f, 0.476715f,
+ 0.476799f, 0.476884f, 0.476968f, 0.477052f, 0.477136f, 0.477221f, 0.477305f, 0.477389f,
+ 0.477473f, 0.477558f, 0.477642f, 0.477726f, 0.477810f, 0.477894f, 0.477979f, 0.478063f,
+ 0.478147f, 0.478231f, 0.478315f, 0.478400f, 0.478484f, 0.478568f, 0.478652f, 0.478736f,
+ 0.478821f, 0.478905f, 0.478989f, 0.479073f, 0.479157f, 0.479241f, 0.479325f, 0.479410f,
+ 0.479494f, 0.479578f, 0.479662f, 0.479746f, 0.479830f, 0.479914f, 0.479998f, 0.480083f,
+ 0.480167f, 0.480251f, 0.480335f, 0.480419f, 0.480503f, 0.480587f, 0.480671f, 0.480755f,
+ 0.480839f, 0.480923f, 0.481007f, 0.481091f, 0.481176f, 0.481260f, 0.481344f, 0.481428f,
+ 0.481512f, 0.481596f, 0.481680f, 0.481764f, 0.481848f, 0.481932f, 0.482016f, 0.482100f,
+ 0.482184f, 0.482268f, 0.482352f, 0.482436f, 0.482520f, 0.482604f, 0.482688f, 0.482772f,
+ 0.482856f, 0.482940f, 0.483023f, 0.483107f, 0.483191f, 0.483275f, 0.483359f, 0.483443f,
+ 0.483527f, 0.483611f, 0.483695f, 0.483779f, 0.483863f, 0.483947f, 0.484031f, 0.484114f,
+ 0.484198f, 0.484282f, 0.484366f, 0.484450f, 0.484534f, 0.484618f, 0.484702f, 0.484785f,
+ 0.484869f, 0.484953f, 0.485037f, 0.485121f, 0.485205f, 0.485288f, 0.485372f, 0.485456f,
+ 0.485540f, 0.485624f, 0.485708f, 0.485791f, 0.485875f, 0.485959f, 0.486043f, 0.486126f,
+ 0.486210f, 0.486294f, 0.486378f, 0.486462f, 0.486545f, 0.486629f, 0.486713f, 0.486797f,
+ 0.486880f, 0.486964f, 0.487048f, 0.487132f, 0.487215f, 0.487299f, 0.487383f, 0.487466f,
+ 0.487550f, 0.487634f, 0.487718f, 0.487801f, 0.487885f, 0.487969f, 0.488052f, 0.488136f,
+ 0.488220f, 0.488303f, 0.488387f, 0.488471f, 0.488554f, 0.488638f, 0.488722f, 0.488805f,
+ 0.488889f, 0.488973f, 0.489056f, 0.489140f, 0.489223f, 0.489307f, 0.489391f, 0.489474f,
+ 0.489558f, 0.489641f, 0.489725f, 0.489809f, 0.489892f, 0.489976f, 0.490059f, 0.490143f,
+ 0.490226f, 0.490310f, 0.490394f, 0.490477f, 0.490561f, 0.490644f, 0.490728f, 0.490811f,
+ 0.490895f, 0.490978f, 0.491062f, 0.491145f, 0.491229f, 0.491312f, 0.491396f, 0.491479f,
+ 0.491563f, 0.491646f, 0.491730f, 0.491813f, 0.491897f, 0.491980f, 0.492064f, 0.492147f,
+ 0.492231f, 0.492314f, 0.492398f, 0.492481f, 0.492564f, 0.492648f, 0.492731f, 0.492815f,
+ 0.492898f, 0.492982f, 0.493065f, 0.493148f, 0.493232f, 0.493315f, 0.493399f, 0.493482f,
+ 0.493565f, 0.493649f, 0.493732f, 0.493816f, 0.493899f, 0.493982f, 0.494066f, 0.494149f,
+ 0.494232f, 0.494316f, 0.494399f, 0.494482f, 0.494566f, 0.494649f, 0.494732f, 0.494816f,
+ 0.494899f, 0.494982f, 0.495066f, 0.495149f, 0.495232f, 0.495315f, 0.495399f, 0.495482f,
+ 0.495565f, 0.495649f, 0.495732f, 0.495815f, 0.495898f, 0.495982f, 0.496065f, 0.496148f,
+ 0.496231f, 0.496315f, 0.496398f, 0.496481f, 0.496564f, 0.496647f, 0.496731f, 0.496814f,
+ 0.496897f, 0.496980f, 0.497063f, 0.497147f, 0.497230f, 0.497313f, 0.497396f, 0.497479f,
+ 0.497562f, 0.497646f, 0.497729f, 0.497812f, 0.497895f, 0.497978f, 0.498061f, 0.498145f,
+ 0.498228f, 0.498311f, 0.498394f, 0.498477f, 0.498560f, 0.498643f, 0.498726f, 0.498809f,
+ 0.498893f, 0.498976f, 0.499059f, 0.499142f, 0.499225f, 0.499308f, 0.499391f, 0.499474f,
+ 0.499557f, 0.499640f, 0.499723f, 0.499806f, 0.499889f, 0.499972f, 0.500055f, 0.500138f,
+ 0.500221f, 0.500304f, 0.500387f, 0.500470f, 0.500553f, 0.500636f, 0.500719f, 0.500802f,
+ 0.500885f, 0.500968f, 0.501051f, 0.501134f, 0.501217f, 0.501300f, 0.501383f, 0.501466f,
+ 0.501549f, 0.501632f, 0.501715f, 0.501798f, 0.501881f, 0.501964f, 0.502047f, 0.502130f,
+ 0.502212f, 0.502295f, 0.502378f, 0.502461f, 0.502544f, 0.502627f, 0.502710f, 0.502793f,
+ 0.502876f, 0.502958f, 0.503041f, 0.503124f, 0.503207f, 0.503290f, 0.503373f, 0.503456f,
+ 0.503538f, 0.503621f, 0.503704f, 0.503787f, 0.503870f, 0.503953f, 0.504035f, 0.504118f,
+ 0.504201f, 0.504284f, 0.504366f, 0.504449f, 0.504532f, 0.504615f, 0.504698f, 0.504780f,
+ 0.504863f, 0.504946f, 0.505029f, 0.505111f, 0.505194f, 0.505277f, 0.505360f, 0.505442f,
+ 0.505525f, 0.505608f, 0.505690f, 0.505773f, 0.505856f, 0.505939f, 0.506021f, 0.506104f,
+ 0.506187f, 0.506269f, 0.506352f, 0.506435f, 0.506517f, 0.506600f, 0.506683f, 0.506765f,
+ 0.506848f, 0.506931f, 0.507013f, 0.507096f, 0.507179f, 0.507261f, 0.507344f, 0.507426f,
+ 0.507509f, 0.507592f, 0.507674f, 0.507757f, 0.507839f, 0.507922f, 0.508005f, 0.508087f,
+ 0.508170f, 0.508252f, 0.508335f, 0.508417f, 0.508500f, 0.508583f, 0.508665f, 0.508748f,
+ 0.508830f, 0.508913f, 0.508995f, 0.509078f, 0.509160f, 0.509243f, 0.509325f, 0.509408f,
+ 0.509490f, 0.509573f, 0.509655f, 0.509738f, 0.509820f, 0.509903f, 0.509985f, 0.510068f,
+ 0.510150f, 0.510233f, 0.510315f, 0.510397f, 0.510480f, 0.510562f, 0.510645f, 0.510727f,
+ 0.510810f, 0.510892f, 0.510974f, 0.511057f, 0.511139f, 0.511222f, 0.511304f, 0.511386f,
+ 0.511469f, 0.511551f, 0.511634f, 0.511716f, 0.511798f, 0.511881f, 0.511963f, 0.512045f,
+ 0.512128f, 0.512210f, 0.512292f, 0.512375f, 0.512457f, 0.512539f, 0.512622f, 0.512704f,
+ 0.512786f, 0.512869f, 0.512951f, 0.513033f, 0.513116f, 0.513198f, 0.513280f, 0.513362f,
+ 0.513445f, 0.513527f, 0.513609f, 0.513692f, 0.513774f, 0.513856f, 0.513938f, 0.514021f,
+ 0.514103f, 0.514185f, 0.514267f, 0.514349f, 0.514432f, 0.514514f, 0.514596f, 0.514678f,
+ 0.514760f, 0.514843f, 0.514925f, 0.515007f, 0.515089f, 0.515171f, 0.515254f, 0.515336f,
+ 0.515418f, 0.515500f, 0.515582f, 0.515664f, 0.515746f, 0.515829f, 0.515911f, 0.515993f,
+ 0.516075f, 0.516157f, 0.516239f, 0.516321f, 0.516403f, 0.516486f, 0.516568f, 0.516650f,
+ 0.516732f, 0.516814f, 0.516896f, 0.516978f, 0.517060f, 0.517142f, 0.517224f, 0.517306f,
+ 0.517388f, 0.517470f, 0.517552f, 0.517634f, 0.517716f, 0.517798f, 0.517880f, 0.517963f,
+ 0.518045f, 0.518126f, 0.518209f, 0.518291f, 0.518372f, 0.518454f, 0.518536f, 0.518618f,
+ 0.518700f, 0.518782f, 0.518864f, 0.518946f, 0.519028f, 0.519110f, 0.519192f, 0.519274f,
+ 0.519356f, 0.519438f, 0.519520f, 0.519602f, 0.519684f, 0.519766f, 0.519848f, 0.519929f,
+ 0.520011f, 0.520093f, 0.520175f, 0.520257f, 0.520339f, 0.520421f, 0.520503f, 0.520584f,
+ 0.520666f, 0.520748f, 0.520830f, 0.520912f, 0.520994f, 0.521075f, 0.521157f, 0.521239f,
+ 0.521321f, 0.521403f, 0.521485f, 0.521566f, 0.521648f, 0.521730f, 0.521812f, 0.521894f,
+ 0.521975f, 0.522057f, 0.522139f, 0.522221f, 0.522302f, 0.522384f, 0.522466f, 0.522548f,
+ 0.522629f, 0.522711f, 0.522793f, 0.522875f, 0.522956f, 0.523038f, 0.523120f, 0.523201f,
+ 0.523283f, 0.523365f, 0.523447f, 0.523528f, 0.523610f, 0.523692f, 0.523773f, 0.523855f,
+ 0.523937f, 0.524018f, 0.524100f, 0.524181f, 0.524263f, 0.524345f, 0.524426f, 0.524508f,
+ 0.524590f, 0.524671f, 0.524753f, 0.524835f, 0.524916f, 0.524998f, 0.525079f, 0.525161f,
+ 0.525243f, 0.525324f, 0.525406f, 0.525487f, 0.525569f, 0.525650f, 0.525732f, 0.525813f,
+ 0.525895f, 0.525977f, 0.526058f, 0.526140f, 0.526221f, 0.526303f, 0.526384f, 0.526466f,
+ 0.526547f, 0.526629f, 0.526710f, 0.526792f, 0.526873f, 0.526955f, 0.527036f, 0.527118f,
+ 0.527199f, 0.527281f, 0.527362f, 0.527444f, 0.527525f, 0.527606f, 0.527688f, 0.527769f,
+ 0.527851f, 0.527932f, 0.528014f, 0.528095f, 0.528176f, 0.528258f, 0.528339f, 0.528421f,
+ 0.528502f, 0.528583f, 0.528665f, 0.528746f, 0.528828f, 0.528909f, 0.528990f, 0.529072f,
+ 0.529153f, 0.529234f, 0.529316f, 0.529397f, 0.529478f, 0.529560f, 0.529641f, 0.529722f,
+ 0.529804f, 0.529885f, 0.529966f, 0.530048f, 0.530129f, 0.530210f, 0.530291f, 0.530373f,
+ 0.530454f, 0.530535f, 0.530617f, 0.530698f, 0.530779f, 0.530860f, 0.530942f, 0.531023f,
+ 0.531104f, 0.531185f, 0.531266f, 0.531348f, 0.531429f, 0.531510f, 0.531591f, 0.531673f,
+ 0.531754f, 0.531835f, 0.531916f, 0.531997f, 0.532078f, 0.532160f, 0.532241f, 0.532322f,
+ 0.532403f, 0.532484f, 0.532565f, 0.532647f, 0.532728f, 0.532809f, 0.532890f, 0.532971f,
+ 0.533052f, 0.533133f, 0.533214f, 0.533296f, 0.533377f, 0.533458f, 0.533539f, 0.533620f,
+ 0.533701f, 0.533782f, 0.533863f, 0.533944f, 0.534025f, 0.534106f, 0.534187f, 0.534268f,
+ 0.534349f, 0.534431f, 0.534512f, 0.534593f, 0.534674f, 0.534755f, 0.534836f, 0.534917f,
+ 0.534998f, 0.535079f, 0.535160f, 0.535241f, 0.535322f, 0.535403f, 0.535484f, 0.535564f,
+ 0.535645f, 0.535726f, 0.535807f, 0.535888f, 0.535969f, 0.536050f, 0.536131f, 0.536212f,
+ 0.536293f, 0.536374f, 0.536455f, 0.536536f, 0.536617f, 0.536698f, 0.536778f, 0.536859f,
+ 0.536940f, 0.537021f, 0.537102f, 0.537183f, 0.537264f, 0.537345f, 0.537425f, 0.537506f,
+ 0.537587f, 0.537668f, 0.537749f, 0.537830f, 0.537910f, 0.537991f, 0.538072f, 0.538153f,
+ 0.538234f, 0.538314f, 0.538395f, 0.538476f, 0.538557f, 0.538638f, 0.538718f, 0.538799f,
+ 0.538880f, 0.538961f, 0.539041f, 0.539122f, 0.539203f, 0.539284f, 0.539364f, 0.539445f,
+ 0.539526f, 0.539607f, 0.539687f, 0.539768f, 0.539849f, 0.539929f, 0.540010f, 0.540091f,
+ 0.540171f, 0.540252f, 0.540333f, 0.540413f, 0.540494f, 0.540575f, 0.540655f, 0.540736f,
+ 0.540817f, 0.540897f, 0.540978f, 0.541059f, 0.541139f, 0.541220f, 0.541301f, 0.541381f,
+ 0.541462f, 0.541542f, 0.541623f, 0.541704f, 0.541784f, 0.541865f, 0.541945f, 0.542026f,
+ 0.542106f, 0.542187f, 0.542268f, 0.542348f, 0.542429f, 0.542509f, 0.542590f, 0.542670f,
+ 0.542751f, 0.542831f, 0.542912f, 0.542992f, 0.543073f, 0.543153f, 0.543234f, 0.543314f,
+ 0.543395f, 0.543475f, 0.543556f, 0.543636f, 0.543717f, 0.543797f, 0.543878f, 0.543958f,
+ 0.544039f, 0.544119f, 0.544199f, 0.544280f, 0.544360f, 0.544441f, 0.544521f, 0.544602f,
+ 0.544682f, 0.544762f, 0.544843f, 0.544923f, 0.545003f, 0.545084f, 0.545164f, 0.545245f,
+ 0.545325f, 0.545405f, 0.545486f, 0.545566f, 0.545646f, 0.545727f, 0.545807f, 0.545887f,
+ 0.545968f, 0.546048f, 0.546128f, 0.546209f, 0.546289f, 0.546369f, 0.546450f, 0.546530f,
+ 0.546610f, 0.546690f, 0.546771f, 0.546851f, 0.546931f, 0.547011f, 0.547092f, 0.547172f,
+ 0.547252f, 0.547333f, 0.547413f, 0.547493f, 0.547573f, 0.547653f, 0.547734f, 0.547814f,
+ 0.547894f, 0.547974f, 0.548054f, 0.548135f, 0.548215f, 0.548295f, 0.548375f, 0.548455f,
+ 0.548536f, 0.548616f, 0.548696f, 0.548776f, 0.548856f, 0.548936f, 0.549016f, 0.549097f,
+ 0.549177f, 0.549257f, 0.549337f, 0.549417f, 0.549497f, 0.549577f, 0.549657f, 0.549737f,
+ 0.549818f, 0.549898f, 0.549978f, 0.550058f, 0.550138f, 0.550218f, 0.550298f, 0.550378f,
+ 0.550458f, 0.550538f, 0.550618f, 0.550698f, 0.550778f, 0.550858f, 0.550938f, 0.551018f,
+ 0.551098f, 0.551178f, 0.551258f, 0.551338f, 0.551418f, 0.551498f, 0.551578f, 0.551658f,
+ 0.551738f, 0.551818f, 0.551898f, 0.551978f, 0.552058f, 0.552138f, 0.552218f, 0.552298f,
+ 0.552378f, 0.552457f, 0.552537f, 0.552617f, 0.552697f, 0.552777f, 0.552857f, 0.552937f,
+ 0.553017f, 0.553097f, 0.553176f, 0.553256f, 0.553336f, 0.553416f, 0.553496f, 0.553576f,
+ 0.553656f, 0.553735f, 0.553815f, 0.553895f, 0.553975f, 0.554055f, 0.554134f, 0.554214f,
+ 0.554294f, 0.554374f, 0.554454f, 0.554533f, 0.554613f, 0.554693f, 0.554773f, 0.554853f,
+ 0.554932f, 0.555012f, 0.555092f, 0.555172f, 0.555251f, 0.555331f, 0.555411f, 0.555490f,
+ 0.555570f, 0.555650f, 0.555730f, 0.555809f, 0.555889f, 0.555969f, 0.556048f, 0.556128f,
+ 0.556208f, 0.556287f, 0.556367f, 0.556447f, 0.556526f, 0.556606f, 0.556686f, 0.556765f,
+ 0.556845f, 0.556925f, 0.557004f, 0.557084f, 0.557164f, 0.557243f, 0.557323f, 0.557402f,
+ 0.557482f, 0.557562f, 0.557641f, 0.557721f, 0.557800f, 0.557880f, 0.557959f, 0.558039f,
+ 0.558119f, 0.558198f, 0.558278f, 0.558357f, 0.558437f, 0.558516f, 0.558596f, 0.558675f,
+ 0.558755f, 0.558834f, 0.558914f, 0.558993f, 0.559073f, 0.559152f, 0.559232f, 0.559311f,
+ 0.559391f, 0.559470f, 0.559550f, 0.559629f, 0.559709f, 0.559788f, 0.559867f, 0.559947f,
+ 0.560026f, 0.560106f, 0.560185f, 0.560265f, 0.560344f, 0.560423f, 0.560503f, 0.560582f,
+ 0.560662f, 0.560741f, 0.560820f, 0.560900f, 0.560979f, 0.561058f, 0.561138f, 0.561217f,
+ 0.561297f, 0.561376f, 0.561455f, 0.561535f, 0.561614f, 0.561693f, 0.561773f, 0.561852f,
+ 0.561931f, 0.562010f, 0.562090f, 0.562169f, 0.562248f, 0.562328f, 0.562407f, 0.562486f,
+ 0.562565f, 0.562645f, 0.562724f, 0.562803f, 0.562882f, 0.562962f, 0.563041f, 0.563120f,
+ 0.563199f, 0.563279f, 0.563358f, 0.563437f, 0.563516f, 0.563595f, 0.563675f, 0.563754f,
+ 0.563833f, 0.563912f, 0.563991f, 0.564070f, 0.564150f, 0.564229f, 0.564308f, 0.564387f,
+ 0.564466f, 0.564545f, 0.564624f, 0.564704f, 0.564783f, 0.564862f, 0.564941f, 0.565020f,
+ 0.565099f, 0.565178f, 0.565257f, 0.565336f, 0.565416f, 0.565495f, 0.565574f, 0.565653f,
+ 0.565732f, 0.565811f, 0.565890f, 0.565969f, 0.566048f, 0.566127f, 0.566206f, 0.566285f,
+ 0.566364f, 0.566443f, 0.566522f, 0.566601f, 0.566680f, 0.566759f, 0.566838f, 0.566917f,
+ 0.566996f, 0.567075f, 0.567154f, 0.567233f, 0.567312f, 0.567391f, 0.567470f, 0.567549f,
+ 0.567628f, 0.567707f, 0.567786f, 0.567864f, 0.567943f, 0.568022f, 0.568101f, 0.568180f,
+ 0.568259f, 0.568338f, 0.568417f, 0.568496f, 0.568574f, 0.568653f, 0.568732f, 0.568811f,
+ 0.568890f, 0.568969f, 0.569048f, 0.569126f, 0.569205f, 0.569284f, 0.569363f, 0.569442f,
+ 0.569521f, 0.569599f, 0.569678f, 0.569757f, 0.569836f, 0.569914f, 0.569993f, 0.570072f,
+ 0.570151f, 0.570230f, 0.570308f, 0.570387f, 0.570466f, 0.570545f, 0.570623f, 0.570702f,
+ 0.570781f, 0.570859f, 0.570938f, 0.571017f, 0.571096f, 0.571174f, 0.571253f, 0.571332f,
+ 0.571410f, 0.571489f, 0.571568f, 0.571646f, 0.571725f, 0.571804f, 0.571882f, 0.571961f,
+ 0.572040f, 0.572118f, 0.572197f, 0.572276f, 0.572354f, 0.572433f, 0.572511f, 0.572590f,
+ 0.572669f, 0.572747f, 0.572826f, 0.572904f, 0.572983f, 0.573061f, 0.573140f, 0.573219f,
+ 0.573297f, 0.573376f, 0.573454f, 0.573533f, 0.573611f, 0.573690f, 0.573768f, 0.573847f,
+ 0.573925f, 0.574004f, 0.574082f, 0.574161f, 0.574239f, 0.574318f, 0.574396f, 0.574475f,
+ 0.574553f, 0.574632f, 0.574710f, 0.574789f, 0.574867f, 0.574946f, 0.575024f, 0.575103f,
+ 0.575181f, 0.575259f, 0.575338f, 0.575416f, 0.575495f, 0.575573f, 0.575651f, 0.575730f,
+ 0.575808f, 0.575887f, 0.575965f, 0.576043f, 0.576122f, 0.576200f, 0.576278f, 0.576357f,
+ 0.576435f, 0.576513f, 0.576592f, 0.576670f, 0.576748f, 0.576827f, 0.576905f, 0.576983f,
+ 0.577062f, 0.577140f, 0.577218f, 0.577297f, 0.577375f, 0.577453f, 0.577531f, 0.577610f,
+ 0.577688f, 0.577766f, 0.577844f, 0.577923f, 0.578001f, 0.578079f, 0.578157f, 0.578236f,
+ 0.578314f, 0.578392f, 0.578470f, 0.578548f, 0.578627f, 0.578705f, 0.578783f, 0.578861f,
+ 0.578939f, 0.579018f, 0.579096f, 0.579174f, 0.579252f, 0.579330f, 0.579408f, 0.579486f,
+ 0.579565f, 0.579643f, 0.579721f, 0.579799f, 0.579877f, 0.579955f, 0.580033f, 0.580111f,
+ 0.580189f, 0.580267f, 0.580346f, 0.580424f, 0.580502f, 0.580580f, 0.580658f, 0.580736f,
+ 0.580814f, 0.580892f, 0.580970f, 0.581048f, 0.581126f, 0.581204f, 0.581282f, 0.581360f,
+ 0.581438f, 0.581516f, 0.581594f, 0.581672f, 0.581750f, 0.581828f, 0.581906f, 0.581984f,
+ 0.582062f, 0.582140f, 0.582218f, 0.582296f, 0.582374f, 0.582452f, 0.582530f, 0.582608f,
+ 0.582685f, 0.582763f, 0.582841f, 0.582919f, 0.582997f, 0.583075f, 0.583153f, 0.583231f,
+ 0.583309f, 0.583387f, 0.583464f, 0.583542f, 0.583620f, 0.583698f, 0.583776f, 0.583854f,
+ 0.583931f, 0.584009f, 0.584087f, 0.584165f, 0.584243f, 0.584321f, 0.584398f, 0.584476f,
+ 0.584554f, 0.584632f, 0.584710f, 0.584787f, 0.584865f, 0.584943f, 0.585021f, 0.585098f,
+ 0.585176f, 0.585254f, 0.585332f, 0.585409f, 0.585487f, 0.585565f, 0.585642f, 0.585720f,
+ 0.585798f, 0.585876f, 0.585953f, 0.586031f, 0.586109f, 0.586186f, 0.586264f, 0.586342f,
+ 0.586419f, 0.586497f, 0.586575f, 0.586652f, 0.586730f, 0.586808f, 0.586885f, 0.586963f,
+ 0.587040f, 0.587118f, 0.587196f, 0.587273f, 0.587351f, 0.587428f, 0.587506f, 0.587584f,
+ 0.587661f, 0.587739f, 0.587816f, 0.587894f, 0.587971f, 0.588049f, 0.588126f, 0.588204f,
+ 0.588282f, 0.588359f, 0.588437f, 0.588514f, 0.588592f, 0.588669f, 0.588747f, 0.588824f,
+ 0.588902f, 0.588979f, 0.589057f, 0.589134f, 0.589212f, 0.589289f, 0.589366f, 0.589444f,
+ 0.589521f, 0.589599f, 0.589676f, 0.589754f, 0.589831f, 0.589908f, 0.589986f, 0.590063f,
+ 0.590141f, 0.590218f, 0.590295f, 0.590373f, 0.590450f, 0.590528f, 0.590605f, 0.590682f,
+ 0.590760f, 0.590837f, 0.590914f, 0.590992f, 0.591069f, 0.591146f, 0.591224f, 0.591301f,
+ 0.591378f, 0.591456f, 0.591533f, 0.591610f, 0.591688f, 0.591765f, 0.591842f, 0.591919f,
+ 0.591997f, 0.592074f, 0.592151f, 0.592228f, 0.592306f, 0.592383f, 0.592460f, 0.592537f,
+ 0.592615f, 0.592692f, 0.592769f, 0.592846f, 0.592924f, 0.593001f, 0.593078f, 0.593155f,
+ 0.593232f, 0.593309f, 0.593387f, 0.593464f, 0.593541f, 0.593618f, 0.593695f, 0.593772f,
+ 0.593850f, 0.593927f, 0.594004f, 0.594081f, 0.594158f, 0.594235f, 0.594312f, 0.594389f,
+ 0.594467f, 0.594544f, 0.594621f, 0.594698f, 0.594775f, 0.594852f, 0.594929f, 0.595006f,
+ 0.595083f, 0.595160f, 0.595237f, 0.595314f, 0.595391f, 0.595468f, 0.595545f, 0.595622f,
+ 0.595699f, 0.595776f, 0.595853f, 0.595930f, 0.596007f, 0.596084f, 0.596161f, 0.596238f,
+ 0.596315f, 0.596392f, 0.596469f, 0.596546f, 0.596623f, 0.596700f, 0.596777f, 0.596854f,
+ 0.596931f, 0.597008f, 0.597085f, 0.597161f, 0.597238f, 0.597315f, 0.597392f, 0.597469f,
+ 0.597546f, 0.597623f, 0.597700f, 0.597776f, 0.597853f, 0.597930f, 0.598007f, 0.598084f,
+ 0.598161f, 0.598238f, 0.598314f, 0.598391f, 0.598468f, 0.598545f, 0.598622f, 0.598698f,
+ 0.598775f, 0.598852f, 0.598929f, 0.599006f, 0.599082f, 0.599159f, 0.599236f, 0.599313f,
+ 0.599389f, 0.599466f, 0.599543f, 0.599620f, 0.599696f, 0.599773f, 0.599850f, 0.599926f,
+ 0.600003f, 0.600080f, 0.600156f, 0.600233f, 0.600310f, 0.600387f, 0.600463f, 0.600540f,
+ 0.600616f, 0.600693f, 0.600770f, 0.600846f, 0.600923f, 0.601000f, 0.601076f, 0.601153f,
+ 0.601230f, 0.601306f, 0.601383f, 0.601459f, 0.601536f, 0.601613f, 0.601689f, 0.601766f,
+ 0.601842f, 0.601919f, 0.601995f, 0.602072f, 0.602148f, 0.602225f, 0.602302f, 0.602378f,
+ 0.602455f, 0.602531f, 0.602608f, 0.602684f, 0.602761f, 0.602837f, 0.602914f, 0.602990f,
+ 0.603067f, 0.603143f, 0.603220f, 0.603296f, 0.603372f, 0.603449f, 0.603525f, 0.603602f,
+ 0.603678f, 0.603755f, 0.603831f, 0.603908f, 0.603984f, 0.604060f, 0.604137f, 0.604213f,
+ 0.604290f, 0.604366f, 0.604442f, 0.604519f, 0.604595f, 0.604671f, 0.604748f, 0.604824f,
+ 0.604900f, 0.604977f, 0.605053f, 0.605129f, 0.605206f, 0.605282f, 0.605358f, 0.605435f,
+ 0.605511f, 0.605587f, 0.605664f, 0.605740f, 0.605816f, 0.605892f, 0.605969f, 0.606045f,
+ 0.606121f, 0.606198f, 0.606274f, 0.606350f, 0.606426f, 0.606502f, 0.606579f, 0.606655f,
+ 0.606731f, 0.606807f, 0.606884f, 0.606960f, 0.607036f, 0.607112f, 0.607188f, 0.607264f,
+ 0.607341f, 0.607417f, 0.607493f, 0.607569f, 0.607645f, 0.607721f, 0.607798f, 0.607874f,
+ 0.607950f, 0.608026f, 0.608102f, 0.608178f, 0.608254f, 0.608330f, 0.608406f, 0.608482f,
+ 0.608559f, 0.608635f, 0.608711f, 0.608787f, 0.608863f, 0.608939f, 0.609015f, 0.609091f,
+ 0.609167f, 0.609243f, 0.609319f, 0.609395f, 0.609471f, 0.609547f, 0.609623f, 0.609699f,
+ 0.609775f, 0.609851f, 0.609927f, 0.610003f, 0.610079f, 0.610155f, 0.610231f, 0.610307f,
+ 0.610383f, 0.610459f, 0.610535f, 0.610611f, 0.610687f, 0.610762f, 0.610838f, 0.610914f,
+ 0.610990f, 0.611066f, 0.611142f, 0.611218f, 0.611294f, 0.611370f, 0.611445f, 0.611521f,
+ 0.611597f, 0.611673f, 0.611749f, 0.611825f, 0.611901f, 0.611976f, 0.612052f, 0.612128f,
+ 0.612204f, 0.612280f, 0.612355f, 0.612431f, 0.612507f, 0.612583f, 0.612659f, 0.612734f,
+ 0.612810f, 0.612886f, 0.612962f, 0.613037f, 0.613113f, 0.613189f, 0.613265f, 0.613340f,
+ 0.613416f, 0.613492f, 0.613567f, 0.613643f, 0.613719f, 0.613795f, 0.613870f, 0.613946f,
+ 0.614022f, 0.614097f, 0.614173f, 0.614249f, 0.614324f, 0.614400f, 0.614475f, 0.614551f,
+ 0.614627f, 0.614702f, 0.614778f, 0.614854f, 0.614929f, 0.615005f, 0.615080f, 0.615156f,
+ 0.615232f, 0.615307f, 0.615383f, 0.615458f, 0.615534f, 0.615609f, 0.615685f, 0.615761f,
+ 0.615836f, 0.615912f, 0.615987f, 0.616063f, 0.616138f, 0.616214f, 0.616289f, 0.616365f,
+ 0.616440f, 0.616516f, 0.616591f, 0.616667f, 0.616742f, 0.616818f, 0.616893f, 0.616968f,
+ 0.617044f, 0.617119f, 0.617195f, 0.617270f, 0.617346f, 0.617421f, 0.617496f, 0.617572f,
+ 0.617647f, 0.617723f, 0.617798f, 0.617873f, 0.617949f, 0.618024f, 0.618100f, 0.618175f,
+ 0.618250f, 0.618326f, 0.618401f, 0.618476f, 0.618552f, 0.618627f, 0.618702f, 0.618778f,
+ 0.618853f, 0.618928f, 0.619004f, 0.619079f, 0.619154f, 0.619229f, 0.619305f, 0.619380f,
+ 0.619455f, 0.619531f, 0.619606f, 0.619681f, 0.619756f, 0.619832f, 0.619907f, 0.619982f,
+ 0.620057f, 0.620132f, 0.620208f, 0.620283f, 0.620358f, 0.620433f, 0.620508f, 0.620584f,
+ 0.620659f, 0.620734f, 0.620809f, 0.620884f, 0.620959f, 0.621035f, 0.621110f, 0.621185f,
+ 0.621260f, 0.621335f, 0.621410f, 0.621485f, 0.621560f, 0.621636f, 0.621711f, 0.621786f,
+ 0.621861f, 0.621936f, 0.622011f, 0.622086f, 0.622161f, 0.622236f, 0.622311f, 0.622386f,
+ 0.622461f, 0.622536f, 0.622611f, 0.622686f, 0.622761f, 0.622836f, 0.622911f, 0.622986f,
+ 0.623061f, 0.623136f, 0.623211f, 0.623286f, 0.623361f, 0.623436f, 0.623511f, 0.623586f,
+ 0.623661f, 0.623736f, 0.623811f, 0.623886f, 0.623961f, 0.624036f, 0.624111f, 0.624186f,
+ 0.624260f, 0.624335f, 0.624410f, 0.624485f, 0.624560f, 0.624635f, 0.624710f, 0.624785f,
+ 0.624860f, 0.624934f, 0.625009f, 0.625084f, 0.625159f, 0.625234f, 0.625309f, 0.625383f,
+ 0.625458f, 0.625533f, 0.625608f, 0.625683f, 0.625757f, 0.625832f, 0.625907f, 0.625982f,
+ 0.626056f, 0.626131f, 0.626206f, 0.626281f, 0.626355f, 0.626430f, 0.626505f, 0.626580f,
+ 0.626654f, 0.626729f, 0.626804f, 0.626878f, 0.626953f, 0.627028f, 0.627102f, 0.627177f,
+ 0.627252f, 0.627326f, 0.627401f, 0.627476f, 0.627550f, 0.627625f, 0.627700f, 0.627774f,
+ 0.627849f, 0.627924f, 0.627998f, 0.628073f, 0.628147f, 0.628222f, 0.628297f, 0.628371f,
+ 0.628446f, 0.628520f, 0.628595f, 0.628669f, 0.628744f, 0.628819f, 0.628893f, 0.628968f,
+ 0.629042f, 0.629117f, 0.629191f, 0.629266f, 0.629340f, 0.629415f, 0.629489f, 0.629564f,
+ 0.629638f, 0.629713f, 0.629787f, 0.629862f, 0.629936f, 0.630011f, 0.630085f, 0.630159f,
+ 0.630234f, 0.630308f, 0.630383f, 0.630457f, 0.630532f, 0.630606f, 0.630680f, 0.630755f,
+ 0.630829f, 0.630904f, 0.630978f, 0.631052f, 0.631127f, 0.631201f, 0.631275f, 0.631350f,
+ 0.631424f, 0.631499f, 0.631573f, 0.631647f, 0.631721f, 0.631796f, 0.631870f, 0.631944f,
+ 0.632019f, 0.632093f, 0.632167f, 0.632242f, 0.632316f, 0.632390f, 0.632464f, 0.632539f,
+ 0.632613f, 0.632687f, 0.632761f, 0.632836f, 0.632910f, 0.632984f, 0.633058f, 0.633133f,
+ 0.633207f, 0.633281f, 0.633355f, 0.633429f, 0.633504f, 0.633578f, 0.633652f, 0.633726f,
+ 0.633800f, 0.633874f, 0.633949f, 0.634023f, 0.634097f, 0.634171f, 0.634245f, 0.634319f,
+ 0.634393f, 0.634467f, 0.634542f, 0.634616f, 0.634690f, 0.634764f, 0.634838f, 0.634912f,
+ 0.634986f, 0.635060f, 0.635134f, 0.635208f, 0.635282f, 0.635356f, 0.635430f, 0.635504f,
+ 0.635578f, 0.635652f, 0.635726f, 0.635800f, 0.635874f, 0.635948f, 0.636022f, 0.636096f,
+ 0.636170f, 0.636244f, 0.636318f, 0.636392f, 0.636466f, 0.636540f, 0.636614f, 0.636688f,
+ 0.636762f, 0.636836f, 0.636910f, 0.636984f, 0.637057f, 0.637131f, 0.637205f, 0.637279f,
+ 0.637353f, 0.637427f, 0.637501f, 0.637575f, 0.637649f, 0.637722f, 0.637796f, 0.637870f,
+ 0.637944f, 0.638018f, 0.638092f, 0.638165f, 0.638239f, 0.638313f, 0.638387f, 0.638461f,
+ 0.638534f, 0.638608f, 0.638682f, 0.638756f, 0.638829f, 0.638903f, 0.638977f, 0.639051f,
+ 0.639124f, 0.639198f, 0.639272f, 0.639346f, 0.639419f, 0.639493f, 0.639567f, 0.639640f,
+ 0.639714f, 0.639788f, 0.639862f, 0.639935f, 0.640009f, 0.640083f, 0.640156f, 0.640230f,
+ 0.640303f, 0.640377f, 0.640451f, 0.640524f, 0.640598f, 0.640672f, 0.640745f, 0.640819f,
+ 0.640892f, 0.640966f, 0.641040f, 0.641113f, 0.641187f, 0.641260f, 0.641334f, 0.641407f,
+ 0.641481f, 0.641555f, 0.641628f, 0.641702f, 0.641775f, 0.641849f, 0.641922f, 0.641996f,
+ 0.642069f, 0.642143f, 0.642216f, 0.642290f, 0.642363f, 0.642437f, 0.642510f, 0.642584f,
+ 0.642657f, 0.642730f, 0.642804f, 0.642877f, 0.642951f, 0.643024f, 0.643098f, 0.643171f,
+ 0.643245f, 0.643318f, 0.643391f, 0.643465f, 0.643538f, 0.643611f, 0.643685f, 0.643758f,
+ 0.643832f, 0.643905f, 0.643978f, 0.644052f, 0.644125f, 0.644198f, 0.644272f, 0.644345f,
+ 0.644418f, 0.644492f, 0.644565f, 0.644638f, 0.644711f, 0.644785f, 0.644858f, 0.644931f,
+ 0.645005f, 0.645078f, 0.645151f, 0.645224f, 0.645298f, 0.645371f, 0.645444f, 0.645517f,
+ 0.645590f, 0.645664f, 0.645737f, 0.645810f, 0.645883f, 0.645956f, 0.646030f, 0.646103f,
+ 0.646176f, 0.646249f, 0.646322f, 0.646396f, 0.646469f, 0.646542f, 0.646615f, 0.646688f,
+ 0.646761f, 0.646834f, 0.646907f, 0.646981f, 0.647054f, 0.647127f, 0.647200f, 0.647273f,
+ 0.647346f, 0.647419f, 0.647492f, 0.647565f, 0.647638f, 0.647711f, 0.647784f, 0.647857f,
+ 0.647930f, 0.648003f, 0.648076f, 0.648149f, 0.648222f, 0.648295f, 0.648368f, 0.648441f,
+ 0.648514f, 0.648587f, 0.648660f, 0.648733f, 0.648806f, 0.648879f, 0.648952f, 0.649025f,
+ 0.649098f, 0.649171f, 0.649244f, 0.649317f, 0.649390f, 0.649463f, 0.649536f, 0.649608f,
+ 0.649681f, 0.649754f, 0.649827f, 0.649900f, 0.649973f, 0.650046f, 0.650119f, 0.650191f,
+ 0.650264f, 0.650337f, 0.650410f, 0.650483f, 0.650555f, 0.650628f, 0.650701f, 0.650774f,
+ 0.650847f, 0.650919f, 0.650992f, 0.651065f, 0.651138f, 0.651211f, 0.651283f, 0.651356f,
+ 0.651429f, 0.651502f, 0.651574f, 0.651647f, 0.651720f, 0.651792f, 0.651865f, 0.651938f,
+ 0.652011f, 0.652083f, 0.652156f, 0.652229f, 0.652301f, 0.652374f, 0.652447f, 0.652519f,
+ 0.652592f, 0.652665f, 0.652737f, 0.652810f, 0.652882f, 0.652955f, 0.653028f, 0.653100f,
+ 0.653173f, 0.653245f, 0.653318f, 0.653391f, 0.653463f, 0.653536f, 0.653608f, 0.653681f,
+ 0.653753f, 0.653826f, 0.653899f, 0.653971f, 0.654044f, 0.654116f, 0.654189f, 0.654261f,
+ 0.654334f, 0.654406f, 0.654479f, 0.654551f, 0.654624f, 0.654696f, 0.654769f, 0.654841f,
+ 0.654913f, 0.654986f, 0.655058f, 0.655131f, 0.655203f, 0.655276f, 0.655348f, 0.655420f,
+ 0.655493f, 0.655565f, 0.655638f, 0.655710f, 0.655782f, 0.655855f, 0.655927f, 0.656000f,
+ 0.656072f, 0.656144f, 0.656217f, 0.656289f, 0.656361f, 0.656434f, 0.656506f, 0.656578f,
+ 0.656651f, 0.656723f, 0.656795f, 0.656867f, 0.656940f, 0.657012f, 0.657084f, 0.657157f,
+ 0.657229f, 0.657301f, 0.657373f, 0.657446f, 0.657518f, 0.657590f, 0.657662f, 0.657734f,
+ 0.657807f, 0.657879f, 0.657951f, 0.658023f, 0.658095f, 0.658168f, 0.658240f, 0.658312f,
+ 0.658384f, 0.658456f, 0.658529f, 0.658601f, 0.658673f, 0.658745f, 0.658817f, 0.658889f,
+ 0.658961f, 0.659033f, 0.659105f, 0.659178f, 0.659250f, 0.659322f, 0.659394f, 0.659466f,
+ 0.659538f, 0.659610f, 0.659682f, 0.659754f, 0.659826f, 0.659898f, 0.659970f, 0.660042f,
+ 0.660114f, 0.660186f, 0.660258f, 0.660330f, 0.660402f, 0.660474f, 0.660546f, 0.660618f,
+ 0.660690f, 0.660762f, 0.660834f, 0.660906f, 0.660978f, 0.661050f, 0.661122f, 0.661194f,
+ 0.661266f, 0.661338f, 0.661410f, 0.661482f, 0.661553f, 0.661625f, 0.661697f, 0.661769f,
+ 0.661841f, 0.661913f, 0.661985f, 0.662057f, 0.662128f, 0.662200f, 0.662272f, 0.662344f,
+ 0.662416f, 0.662488f, 0.662559f, 0.662631f, 0.662703f, 0.662775f, 0.662847f, 0.662918f,
+ 0.662990f, 0.663062f, 0.663134f, 0.663205f, 0.663277f, 0.663349f, 0.663421f, 0.663492f,
+ 0.663564f, 0.663636f, 0.663708f, 0.663779f, 0.663851f, 0.663923f, 0.663994f, 0.664066f,
+ 0.664138f, 0.664209f, 0.664281f, 0.664353f, 0.664424f, 0.664496f, 0.664568f, 0.664639f,
+ 0.664711f, 0.664783f, 0.664854f, 0.664926f, 0.664997f, 0.665069f, 0.665141f, 0.665212f,
+ 0.665284f, 0.665355f, 0.665427f, 0.665498f, 0.665570f, 0.665642f, 0.665713f, 0.665785f,
+ 0.665856f, 0.665928f, 0.665999f, 0.666071f, 0.666142f, 0.666214f, 0.666285f, 0.666357f,
+ 0.666428f, 0.666500f, 0.666571f, 0.666643f, 0.666714f, 0.666786f, 0.666857f, 0.666928f,
+ 0.667000f, 0.667071f, 0.667143f, 0.667214f, 0.667286f, 0.667357f, 0.667428f, 0.667500f,
+ 0.667571f, 0.667643f, 0.667714f, 0.667785f, 0.667857f, 0.667928f, 0.667999f, 0.668071f,
+ 0.668142f, 0.668213f, 0.668285f, 0.668356f, 0.668427f, 0.668499f, 0.668570f, 0.668641f,
+ 0.668712f, 0.668784f, 0.668855f, 0.668926f, 0.668998f, 0.669069f, 0.669140f, 0.669211f,
+ 0.669283f, 0.669354f, 0.669425f, 0.669496f, 0.669567f, 0.669639f, 0.669710f, 0.669781f,
+ 0.669852f, 0.669923f, 0.669995f, 0.670066f, 0.670137f, 0.670208f, 0.670279f, 0.670350f,
+ 0.670422f, 0.670493f, 0.670564f, 0.670635f, 0.670706f, 0.670777f, 0.670848f, 0.670919f,
+ 0.670990f, 0.671062f, 0.671133f, 0.671204f, 0.671275f, 0.671346f, 0.671417f, 0.671488f,
+ 0.671559f, 0.671630f, 0.671701f, 0.671772f, 0.671843f, 0.671914f, 0.671985f, 0.672056f,
+ 0.672127f, 0.672198f, 0.672269f, 0.672340f, 0.672411f, 0.672482f, 0.672553f, 0.672624f,
+ 0.672695f, 0.672766f, 0.672837f, 0.672908f, 0.672978f, 0.673049f, 0.673120f, 0.673191f,
+ 0.673262f, 0.673333f, 0.673404f, 0.673475f, 0.673546f, 0.673616f, 0.673687f, 0.673758f,
+ 0.673829f, 0.673900f, 0.673971f, 0.674042f, 0.674112f, 0.674183f, 0.674254f, 0.674325f,
+ 0.674396f, 0.674466f, 0.674537f, 0.674608f, 0.674679f, 0.674749f, 0.674820f, 0.674891f,
+ 0.674962f, 0.675032f, 0.675103f, 0.675174f, 0.675245f, 0.675315f, 0.675386f, 0.675457f,
+ 0.675527f, 0.675598f, 0.675669f, 0.675739f, 0.675810f, 0.675881f, 0.675951f, 0.676022f,
+ 0.676093f, 0.676163f, 0.676234f, 0.676305f, 0.676375f, 0.676446f, 0.676516f, 0.676587f,
+ 0.676658f, 0.676728f, 0.676799f, 0.676869f, 0.676940f, 0.677011f, 0.677081f, 0.677152f,
+ 0.677222f, 0.677293f, 0.677363f, 0.677434f, 0.677504f, 0.677575f, 0.677645f, 0.677716f,
+ 0.677786f, 0.677857f, 0.677927f, 0.677998f, 0.678068f, 0.678139f, 0.678209f, 0.678280f,
+ 0.678350f, 0.678420f, 0.678491f, 0.678561f, 0.678632f, 0.678702f, 0.678773f, 0.678843f,
+ 0.678913f, 0.678984f, 0.679054f, 0.679125f, 0.679195f, 0.679265f, 0.679336f, 0.679406f,
+ 0.679476f, 0.679547f, 0.679617f, 0.679687f, 0.679758f, 0.679828f, 0.679898f, 0.679969f,
+ 0.680039f, 0.680109f, 0.680179f, 0.680250f, 0.680320f, 0.680390f, 0.680461f, 0.680531f,
+ 0.680601f, 0.680671f, 0.680741f, 0.680812f, 0.680882f, 0.680952f, 0.681022f, 0.681093f,
+ 0.681163f, 0.681233f, 0.681303f, 0.681373f, 0.681443f, 0.681514f, 0.681584f, 0.681654f,
+ 0.681724f, 0.681794f, 0.681864f, 0.681934f, 0.682005f, 0.682075f, 0.682145f, 0.682215f,
+ 0.682285f, 0.682355f, 0.682425f, 0.682495f, 0.682565f, 0.682635f, 0.682705f, 0.682775f,
+ 0.682846f, 0.682916f, 0.682986f, 0.683056f, 0.683126f, 0.683196f, 0.683266f, 0.683336f,
+ 0.683406f, 0.683476f, 0.683546f, 0.683616f, 0.683686f, 0.683756f, 0.683825f, 0.683895f,
+ 0.683965f, 0.684035f, 0.684105f, 0.684175f, 0.684245f, 0.684315f, 0.684385f, 0.684455f,
+ 0.684525f, 0.684595f, 0.684664f, 0.684734f, 0.684804f, 0.684874f, 0.684944f, 0.685014f,
+ 0.685084f, 0.685153f, 0.685223f, 0.685293f, 0.685363f, 0.685433f, 0.685503f, 0.685572f,
+ 0.685642f, 0.685712f, 0.685782f, 0.685852f, 0.685921f, 0.685991f, 0.686061f, 0.686131f,
+ 0.686200f, 0.686270f, 0.686340f, 0.686409f, 0.686479f, 0.686549f, 0.686619f, 0.686688f,
+ 0.686758f, 0.686828f, 0.686897f, 0.686967f, 0.687037f, 0.687106f, 0.687176f, 0.687246f,
+ 0.687315f, 0.687385f, 0.687455f, 0.687524f, 0.687594f, 0.687663f, 0.687733f, 0.687803f,
+ 0.687872f, 0.687942f, 0.688011f, 0.688081f, 0.688151f, 0.688220f, 0.688290f, 0.688359f,
+ 0.688429f, 0.688498f, 0.688568f, 0.688637f, 0.688707f, 0.688776f, 0.688846f, 0.688915f,
+ 0.688985f, 0.689054f, 0.689124f, 0.689193f, 0.689263f, 0.689332f, 0.689402f, 0.689471f,
+ 0.689541f, 0.689610f, 0.689679f, 0.689749f, 0.689818f, 0.689888f, 0.689957f, 0.690026f,
+ 0.690096f, 0.690165f, 0.690235f, 0.690304f, 0.690373f, 0.690443f, 0.690512f, 0.690581f,
+ 0.690651f, 0.690720f, 0.690789f, 0.690859f, 0.690928f, 0.690997f, 0.691067f, 0.691136f,
+ 0.691205f, 0.691274f, 0.691344f, 0.691413f, 0.691482f, 0.691552f, 0.691621f, 0.691690f,
+ 0.691759f, 0.691828f, 0.691898f, 0.691967f, 0.692036f, 0.692105f, 0.692175f, 0.692244f,
+ 0.692313f, 0.692382f, 0.692451f, 0.692520f, 0.692590f, 0.692659f, 0.692728f, 0.692797f,
+ 0.692866f, 0.692935f, 0.693004f, 0.693074f, 0.693143f, 0.693212f, 0.693281f, 0.693350f,
+ 0.693419f, 0.693488f, 0.693557f, 0.693626f, 0.693695f, 0.693764f, 0.693833f, 0.693902f,
+ 0.693971f, 0.694040f, 0.694109f, 0.694179f, 0.694248f, 0.694317f, 0.694386f, 0.694454f,
+ 0.694524f, 0.694592f, 0.694661f, 0.694730f, 0.694799f, 0.694868f, 0.694937f, 0.695006f,
+ 0.695075f, 0.695144f, 0.695213f, 0.695282f, 0.695351f, 0.695420f, 0.695489f, 0.695557f,
+ 0.695626f, 0.695695f, 0.695764f, 0.695833f, 0.695902f, 0.695971f, 0.696039f, 0.696108f,
+ 0.696177f, 0.696246f, 0.696315f, 0.696384f, 0.696452f, 0.696521f, 0.696590f, 0.696659f,
+ 0.696728f, 0.696796f, 0.696865f, 0.696934f, 0.697003f, 0.697071f, 0.697140f, 0.697209f,
+ 0.697277f, 0.697346f, 0.697415f, 0.697484f, 0.697552f, 0.697621f, 0.697690f, 0.697758f,
+ 0.697827f, 0.697896f, 0.697964f, 0.698033f, 0.698102f, 0.698170f, 0.698239f, 0.698308f,
+ 0.698376f, 0.698445f, 0.698513f, 0.698582f, 0.698651f, 0.698719f, 0.698788f, 0.698856f,
+ 0.698925f, 0.698994f, 0.699062f, 0.699131f, 0.699199f, 0.699268f, 0.699336f, 0.699405f,
+ 0.699473f, 0.699542f, 0.699610f, 0.699679f, 0.699747f, 0.699816f, 0.699884f, 0.699953f,
+ 0.700021f, 0.700090f, 0.700158f, 0.700227f, 0.700295f, 0.700364f, 0.700432f, 0.700500f,
+ 0.700569f, 0.700637f, 0.700706f, 0.700774f, 0.700842f, 0.700911f, 0.700979f, 0.701048f,
+ 0.701116f, 0.701184f, 0.701253f, 0.701321f, 0.701389f, 0.701458f, 0.701526f, 0.701594f,
+ 0.701663f, 0.701731f, 0.701799f, 0.701868f, 0.701936f, 0.702004f, 0.702072f, 0.702141f,
+ 0.702209f, 0.702277f, 0.702345f, 0.702414f, 0.702482f, 0.702550f, 0.702618f, 0.702687f,
+ 0.702755f, 0.702823f, 0.702891f, 0.702959f, 0.703028f, 0.703096f, 0.703164f, 0.703232f,
+ 0.703300f, 0.703368f, 0.703436f, 0.703505f, 0.703573f, 0.703641f, 0.703709f, 0.703777f,
+ 0.703845f, 0.703913f, 0.703981f, 0.704050f, 0.704118f, 0.704186f, 0.704254f, 0.704322f,
+ 0.704390f, 0.704458f, 0.704526f, 0.704594f, 0.704662f, 0.704730f, 0.704798f, 0.704866f,
+ 0.704934f, 0.705002f, 0.705070f, 0.705138f, 0.705206f, 0.705274f, 0.705342f, 0.705410f,
+ 0.705478f, 0.705546f, 0.705614f, 0.705682f, 0.705750f, 0.705818f, 0.705885f, 0.705953f,
+ 0.706021f, 0.706089f, 0.706157f, 0.706225f, 0.706293f, 0.706361f, 0.706429f, 0.706496f,
+ 0.706564f, 0.706632f, 0.706700f, 0.706768f, 0.706836f, 0.706903f, 0.706971f, 0.707039f,
+ 0.707107f, 0.707175f, 0.707242f, 0.707310f, 0.707378f, 0.707446f, 0.707513f, 0.707581f,
+ 0.707649f, 0.707717f, 0.707784f, 0.707852f, 0.707920f, 0.707988f, 0.708055f, 0.708123f,
+ 0.708191f, 0.708258f, 0.708326f, 0.708394f, 0.708461f, 0.708529f, 0.708597f, 0.708664f,
+ 0.708732f, 0.708800f, 0.708867f, 0.708935f, 0.709002f, 0.709070f, 0.709138f, 0.709205f,
+ 0.709273f, 0.709340f, 0.709408f, 0.709476f, 0.709543f, 0.709611f, 0.709678f, 0.709746f,
+ 0.709813f, 0.709881f, 0.709948f, 0.710016f, 0.710083f, 0.710151f, 0.710218f, 0.710286f,
+ 0.710353f, 0.710421f, 0.710488f, 0.710556f, 0.710623f, 0.710691f, 0.710758f, 0.710826f,
+ 0.710893f, 0.710960f, 0.711028f, 0.711095f, 0.711163f, 0.711230f, 0.711297f, 0.711365f,
+ 0.711432f, 0.711500f, 0.711567f, 0.711634f, 0.711702f, 0.711769f, 0.711836f, 0.711904f,
+ 0.711971f, 0.712038f, 0.712106f, 0.712173f, 0.712240f, 0.712308f, 0.712375f, 0.712442f,
+ 0.712509f, 0.712577f, 0.712644f, 0.712711f, 0.712778f, 0.712846f, 0.712913f, 0.712980f,
+ 0.713047f, 0.713115f, 0.713182f, 0.713249f, 0.713316f, 0.713383f, 0.713451f, 0.713518f,
+ 0.713585f, 0.713652f, 0.713719f, 0.713786f, 0.713853f, 0.713921f, 0.713988f, 0.714055f,
+ 0.714122f, 0.714189f, 0.714256f, 0.714323f, 0.714390f, 0.714457f, 0.714525f, 0.714592f,
+ 0.714659f, 0.714726f, 0.714793f, 0.714860f, 0.714927f, 0.714994f, 0.715061f, 0.715128f,
+ 0.715195f, 0.715262f, 0.715329f, 0.715396f, 0.715463f, 0.715530f, 0.715597f, 0.715664f,
+ 0.715731f, 0.715798f, 0.715865f, 0.715932f, 0.715999f, 0.716066f, 0.716132f, 0.716199f,
+ 0.716266f, 0.716333f, 0.716400f, 0.716467f, 0.716534f, 0.716601f, 0.716668f, 0.716734f,
+ 0.716801f, 0.716868f, 0.716935f, 0.717002f, 0.717069f, 0.717135f, 0.717202f, 0.717269f,
+ 0.717336f, 0.717403f, 0.717469f, 0.717536f, 0.717603f, 0.717670f, 0.717737f, 0.717803f,
+ 0.717870f, 0.717937f, 0.718004f, 0.718070f, 0.718137f, 0.718204f, 0.718270f, 0.718337f,
+ 0.718404f, 0.718471f, 0.718537f, 0.718604f, 0.718670f, 0.718737f, 0.718804f, 0.718870f,
+ 0.718937f, 0.719004f, 0.719070f, 0.719137f, 0.719204f, 0.719270f, 0.719337f, 0.719403f,
+ 0.719470f, 0.719537f, 0.719603f, 0.719670f, 0.719736f, 0.719803f, 0.719869f, 0.719936f,
+ 0.720003f, 0.720069f, 0.720136f, 0.720202f, 0.720269f, 0.720335f, 0.720402f, 0.720468f,
+ 0.720535f, 0.720601f, 0.720668f, 0.720734f, 0.720800f, 0.720867f, 0.720933f, 0.721000f,
+ 0.721066f, 0.721133f, 0.721199f, 0.721265f, 0.721332f, 0.721398f, 0.721465f, 0.721531f,
+ 0.721597f, 0.721664f, 0.721730f, 0.721797f, 0.721863f, 0.721929f, 0.721996f, 0.722062f,
+ 0.722128f, 0.722194f, 0.722261f, 0.722327f, 0.722393f, 0.722460f, 0.722526f, 0.722592f,
+ 0.722659f, 0.722725f, 0.722791f, 0.722857f, 0.722924f, 0.722990f, 0.723056f, 0.723122f,
+ 0.723188f, 0.723255f, 0.723321f, 0.723387f, 0.723453f, 0.723520f, 0.723586f, 0.723652f,
+ 0.723718f, 0.723784f, 0.723850f, 0.723916f, 0.723983f, 0.724049f, 0.724115f, 0.724181f,
+ 0.724247f, 0.724313f, 0.724379f, 0.724445f, 0.724511f, 0.724578f, 0.724644f, 0.724710f,
+ 0.724776f, 0.724842f, 0.724908f, 0.724974f, 0.725040f, 0.725106f, 0.725172f, 0.725238f,
+ 0.725304f, 0.725370f, 0.725436f, 0.725502f, 0.725568f, 0.725634f, 0.725700f, 0.725766f,
+ 0.725832f, 0.725898f, 0.725964f, 0.726030f, 0.726095f, 0.726161f, 0.726227f, 0.726293f,
+ 0.726359f, 0.726425f, 0.726491f, 0.726557f, 0.726623f, 0.726689f, 0.726754f, 0.726820f,
+ 0.726886f, 0.726952f, 0.727018f, 0.727084f, 0.727149f, 0.727215f, 0.727281f, 0.727347f,
+ 0.727413f, 0.727478f, 0.727544f, 0.727610f, 0.727676f, 0.727741f, 0.727807f, 0.727873f,
+ 0.727939f, 0.728004f, 0.728070f, 0.728136f, 0.728202f, 0.728267f, 0.728333f, 0.728399f,
+ 0.728464f, 0.728530f, 0.728596f, 0.728661f, 0.728727f, 0.728793f, 0.728858f, 0.728924f,
+ 0.728990f, 0.729055f, 0.729121f, 0.729186f, 0.729252f, 0.729318f, 0.729383f, 0.729449f,
+ 0.729514f, 0.729580f, 0.729646f, 0.729711f, 0.729777f, 0.729842f, 0.729908f, 0.729973f,
+ 0.730039f, 0.730104f, 0.730170f, 0.730235f, 0.730301f, 0.730366f, 0.730432f, 0.730497f,
+ 0.730563f, 0.730628f, 0.730694f, 0.730759f, 0.730825f, 0.730890f, 0.730955f, 0.731021f,
+ 0.731086f, 0.731152f, 0.731217f, 0.731282f, 0.731348f, 0.731413f, 0.731479f, 0.731544f,
+ 0.731609f, 0.731675f, 0.731740f, 0.731805f, 0.731871f, 0.731936f, 0.732001f, 0.732067f,
+ 0.732132f, 0.732197f, 0.732263f, 0.732328f, 0.732393f, 0.732458f, 0.732524f, 0.732589f,
+ 0.732654f, 0.732720f, 0.732785f, 0.732850f, 0.732915f, 0.732980f, 0.733046f, 0.733111f,
+ 0.733176f, 0.733241f, 0.733306f, 0.733372f, 0.733437f, 0.733502f, 0.733567f, 0.733632f,
+ 0.733697f, 0.733763f, 0.733828f, 0.733893f, 0.733958f, 0.734023f, 0.734088f, 0.734153f,
+ 0.734218f, 0.734283f, 0.734349f, 0.734414f, 0.734479f, 0.734544f, 0.734609f, 0.734674f,
+ 0.734739f, 0.734804f, 0.734869f, 0.734934f, 0.734999f, 0.735064f, 0.735129f, 0.735194f,
+ 0.735259f, 0.735324f, 0.735389f, 0.735454f, 0.735519f, 0.735584f, 0.735649f, 0.735714f,
+ 0.735779f, 0.735844f, 0.735908f, 0.735973f, 0.736038f, 0.736103f, 0.736168f, 0.736233f,
+ 0.736298f, 0.736363f, 0.736428f, 0.736492f, 0.736557f, 0.736622f, 0.736687f, 0.736752f,
+ 0.736817f, 0.736881f, 0.736946f, 0.737011f, 0.737076f, 0.737141f, 0.737205f, 0.737270f,
+ 0.737335f, 0.737400f, 0.737464f, 0.737529f, 0.737594f, 0.737659f, 0.737723f, 0.737788f,
+ 0.737853f, 0.737918f, 0.737982f, 0.738047f, 0.738112f, 0.738176f, 0.738241f, 0.738306f,
+ 0.738370f, 0.738435f, 0.738500f, 0.738564f, 0.738629f, 0.738693f, 0.738758f, 0.738823f,
+ 0.738887f, 0.738952f, 0.739017f, 0.739081f, 0.739146f, 0.739210f, 0.739275f, 0.739339f,
+ 0.739404f, 0.739468f, 0.739533f, 0.739598f, 0.739662f, 0.739727f, 0.739791f, 0.739856f,
+ 0.739920f, 0.739985f, 0.740049f, 0.740114f, 0.740178f, 0.740242f, 0.740307f, 0.740371f,
+ 0.740436f, 0.740500f, 0.740565f, 0.740629f, 0.740694f, 0.740758f, 0.740822f, 0.740887f,
+ 0.740951f, 0.741015f, 0.741080f, 0.741144f, 0.741209f, 0.741273f, 0.741337f, 0.741402f,
+ 0.741466f, 0.741530f, 0.741595f, 0.741659f, 0.741723f, 0.741788f, 0.741852f, 0.741916f,
+ 0.741980f, 0.742045f, 0.742109f, 0.742173f, 0.742237f, 0.742302f, 0.742366f, 0.742430f,
+ 0.742494f, 0.742559f, 0.742623f, 0.742687f, 0.742751f, 0.742815f, 0.742880f, 0.742944f,
+ 0.743008f, 0.743072f, 0.743136f, 0.743200f, 0.743265f, 0.743329f, 0.743393f, 0.743457f,
+ 0.743521f, 0.743585f, 0.743649f, 0.743713f, 0.743777f, 0.743842f, 0.743906f, 0.743970f,
+ 0.744034f, 0.744098f, 0.744162f, 0.744226f, 0.744290f, 0.744354f, 0.744418f, 0.744482f,
+ 0.744546f, 0.744610f, 0.744674f, 0.744738f, 0.744802f, 0.744866f, 0.744930f, 0.744994f,
+ 0.745058f, 0.745122f, 0.745186f, 0.745250f, 0.745314f, 0.745377f, 0.745441f, 0.745505f,
+ 0.745569f, 0.745633f, 0.745697f, 0.745761f, 0.745825f, 0.745889f, 0.745952f, 0.746016f,
+ 0.746080f, 0.746144f, 0.746208f, 0.746272f, 0.746335f, 0.746399f, 0.746463f, 0.746527f,
+ 0.746591f, 0.746654f, 0.746718f, 0.746782f, 0.746846f, 0.746909f, 0.746973f, 0.747037f,
+ 0.747101f, 0.747164f, 0.747228f, 0.747292f, 0.747355f, 0.747419f, 0.747483f, 0.747547f,
+ 0.747610f, 0.747674f, 0.747738f, 0.747801f, 0.747865f, 0.747929f, 0.747992f, 0.748056f,
+ 0.748119f, 0.748183f, 0.748247f, 0.748310f, 0.748374f, 0.748437f, 0.748501f, 0.748565f,
+ 0.748628f, 0.748692f, 0.748755f, 0.748819f, 0.748882f, 0.748946f, 0.749009f, 0.749073f,
+ 0.749136f, 0.749200f, 0.749263f, 0.749327f, 0.749390f, 0.749454f, 0.749517f, 0.749581f,
+ 0.749644f, 0.749708f, 0.749771f, 0.749835f, 0.749898f, 0.749961f, 0.750025f, 0.750088f,
+ 0.750152f, 0.750215f, 0.750278f, 0.750342f, 0.750405f, 0.750469f, 0.750532f, 0.750595f,
+ 0.750659f, 0.750722f, 0.750785f, 0.750849f, 0.750912f, 0.750975f, 0.751039f, 0.751102f,
+ 0.751165f, 0.751228f, 0.751292f, 0.751355f, 0.751418f, 0.751481f, 0.751545f, 0.751608f,
+ 0.751671f, 0.751734f, 0.751798f, 0.751861f, 0.751924f, 0.751987f, 0.752050f, 0.752114f,
+ 0.752177f, 0.752240f, 0.752303f, 0.752366f, 0.752429f, 0.752493f, 0.752556f, 0.752619f,
+ 0.752682f, 0.752745f, 0.752808f, 0.752871f, 0.752934f, 0.752998f, 0.753061f, 0.753124f,
+ 0.753187f, 0.753250f, 0.753313f, 0.753376f, 0.753439f, 0.753502f, 0.753565f, 0.753628f,
+ 0.753691f, 0.753754f, 0.753817f, 0.753880f, 0.753943f, 0.754006f, 0.754069f, 0.754132f,
+ 0.754195f, 0.754258f, 0.754321f, 0.754384f, 0.754447f, 0.754510f, 0.754573f, 0.754636f,
+ 0.754698f, 0.754761f, 0.754824f, 0.754887f, 0.754950f, 0.755013f, 0.755076f, 0.755139f,
+ 0.755201f, 0.755264f, 0.755327f, 0.755390f, 0.755453f, 0.755516f, 0.755578f, 0.755641f,
+ 0.755704f, 0.755767f, 0.755829f, 0.755892f, 0.755955f, 0.756018f, 0.756081f, 0.756143f,
+ 0.756206f, 0.756269f, 0.756331f, 0.756394f, 0.756457f, 0.756520f, 0.756582f, 0.756645f,
+ 0.756708f, 0.756770f, 0.756833f, 0.756896f, 0.756958f, 0.757021f, 0.757084f, 0.757146f,
+ 0.757209f, 0.757271f, 0.757334f, 0.757397f, 0.757459f, 0.757522f, 0.757584f, 0.757647f,
+ 0.757710f, 0.757772f, 0.757835f, 0.757897f, 0.757960f, 0.758022f, 0.758085f, 0.758147f,
+ 0.758210f, 0.758272f, 0.758335f, 0.758397f, 0.758460f, 0.758522f, 0.758585f, 0.758647f,
+ 0.758710f, 0.758772f, 0.758835f, 0.758897f, 0.758960f, 0.759022f, 0.759084f, 0.759147f,
+ 0.759209f, 0.759272f, 0.759334f, 0.759396f, 0.759459f, 0.759521f, 0.759583f, 0.759646f,
+ 0.759708f, 0.759771f, 0.759833f, 0.759895f, 0.759957f, 0.760020f, 0.760082f, 0.760144f,
+ 0.760207f, 0.760269f, 0.760331f, 0.760394f, 0.760456f, 0.760518f, 0.760580f, 0.760643f,
+ 0.760705f, 0.760767f, 0.760829f, 0.760891f, 0.760954f, 0.761016f, 0.761078f, 0.761140f,
+ 0.761202f, 0.761265f, 0.761327f, 0.761389f, 0.761451f, 0.761513f, 0.761575f, 0.761637f,
+ 0.761700f, 0.761762f, 0.761824f, 0.761886f, 0.761948f, 0.762010f, 0.762072f, 0.762134f,
+ 0.762196f, 0.762258f, 0.762320f, 0.762382f, 0.762444f, 0.762507f, 0.762569f, 0.762631f,
+ 0.762693f, 0.762755f, 0.762817f, 0.762879f, 0.762941f, 0.763003f, 0.763065f, 0.763126f,
+ 0.763188f, 0.763250f, 0.763312f, 0.763374f, 0.763436f, 0.763498f, 0.763560f, 0.763622f,
+ 0.763684f, 0.763746f, 0.763808f, 0.763869f, 0.763931f, 0.763993f, 0.764055f, 0.764117f,
+ 0.764179f, 0.764241f, 0.764302f, 0.764364f, 0.764426f, 0.764488f, 0.764550f, 0.764611f,
+ 0.764673f, 0.764735f, 0.764797f, 0.764859f, 0.764920f, 0.764982f, 0.765044f, 0.765106f,
+ 0.765167f, 0.765229f, 0.765291f, 0.765352f, 0.765414f, 0.765476f, 0.765538f, 0.765599f,
+ 0.765661f, 0.765723f, 0.765784f, 0.765846f, 0.765907f, 0.765969f, 0.766031f, 0.766092f,
+ 0.766154f, 0.766216f, 0.766277f, 0.766339f, 0.766400f, 0.766462f, 0.766524f, 0.766585f,
+ 0.766647f, 0.766708f, 0.766770f, 0.766831f, 0.766893f, 0.766954f, 0.767016f, 0.767077f,
+ 0.767139f, 0.767200f, 0.767262f, 0.767323f, 0.767385f, 0.767446f, 0.767508f, 0.767569f,
+ 0.767631f, 0.767692f, 0.767754f, 0.767815f, 0.767876f, 0.767938f, 0.767999f, 0.768061f,
+ 0.768122f, 0.768183f, 0.768245f, 0.768306f, 0.768368f, 0.768429f, 0.768490f, 0.768552f,
+ 0.768613f, 0.768674f, 0.768736f, 0.768797f, 0.768858f, 0.768919f, 0.768981f, 0.769042f,
+ 0.769103f, 0.769165f, 0.769226f, 0.769287f, 0.769348f, 0.769410f, 0.769471f, 0.769532f,
+ 0.769593f, 0.769655f, 0.769716f, 0.769777f, 0.769838f, 0.769899f, 0.769961f, 0.770022f,
+ 0.770083f, 0.770144f, 0.770205f, 0.770266f, 0.770327f, 0.770389f, 0.770450f, 0.770511f,
+ 0.770572f, 0.770633f, 0.770694f, 0.770755f, 0.770816f, 0.770877f, 0.770938f, 0.770999f,
+ 0.771061f, 0.771122f, 0.771183f, 0.771244f, 0.771305f, 0.771366f, 0.771427f, 0.771488f,
+ 0.771549f, 0.771610f, 0.771671f, 0.771732f, 0.771793f, 0.771854f, 0.771915f, 0.771975f,
+ 0.772036f, 0.772097f, 0.772158f, 0.772219f, 0.772280f, 0.772341f, 0.772402f, 0.772463f,
+ 0.772524f, 0.772584f, 0.772645f, 0.772706f, 0.772767f, 0.772828f, 0.772889f, 0.772950f,
+ 0.773010f, 0.773071f, 0.773132f, 0.773193f, 0.773254f, 0.773314f, 0.773375f, 0.773436f,
+ 0.773497f, 0.773558f, 0.773618f, 0.773679f, 0.773740f, 0.773801f, 0.773861f, 0.773922f,
+ 0.773983f, 0.774043f, 0.774104f, 0.774165f, 0.774225f, 0.774286f, 0.774347f, 0.774407f,
+ 0.774468f, 0.774529f, 0.774589f, 0.774650f, 0.774711f, 0.774771f, 0.774832f, 0.774893f,
+ 0.774953f, 0.775014f, 0.775074f, 0.775135f, 0.775195f, 0.775256f, 0.775317f, 0.775377f,
+ 0.775438f, 0.775498f, 0.775559f, 0.775619f, 0.775680f, 0.775740f, 0.775801f, 0.775861f,
+ 0.775922f, 0.775982f, 0.776043f, 0.776103f, 0.776164f, 0.776224f, 0.776284f, 0.776345f,
+ 0.776405f, 0.776466f, 0.776526f, 0.776587f, 0.776647f, 0.776707f, 0.776768f, 0.776828f,
+ 0.776888f, 0.776949f, 0.777009f, 0.777070f, 0.777130f, 0.777190f, 0.777251f, 0.777311f,
+ 0.777371f, 0.777431f, 0.777492f, 0.777552f, 0.777612f, 0.777673f, 0.777733f, 0.777793f,
+ 0.777853f, 0.777914f, 0.777974f, 0.778034f, 0.778094f, 0.778155f, 0.778215f, 0.778275f,
+ 0.778335f, 0.778395f, 0.778456f, 0.778516f, 0.778576f, 0.778636f, 0.778696f, 0.778756f,
+ 0.778817f, 0.778877f, 0.778937f, 0.778997f, 0.779057f, 0.779117f, 0.779177f, 0.779237f,
+ 0.779297f, 0.779357f, 0.779418f, 0.779478f, 0.779538f, 0.779598f, 0.779658f, 0.779718f,
+ 0.779778f, 0.779838f, 0.779898f, 0.779958f, 0.780018f, 0.780078f, 0.780138f, 0.780198f,
+ 0.780258f, 0.780318f, 0.780378f, 0.780438f, 0.780498f, 0.780557f, 0.780617f, 0.780677f,
+ 0.780737f, 0.780797f, 0.780857f, 0.780917f, 0.780977f, 0.781037f, 0.781097f, 0.781156f,
+ 0.781216f, 0.781276f, 0.781336f, 0.781396f, 0.781456f, 0.781515f, 0.781575f, 0.781635f,
+ 0.781695f, 0.781755f, 0.781814f, 0.781874f, 0.781934f, 0.781994f, 0.782053f, 0.782113f,
+ 0.782173f, 0.782233f, 0.782292f, 0.782352f, 0.782412f, 0.782472f, 0.782531f, 0.782591f,
+ 0.782651f, 0.782710f, 0.782770f, 0.782830f, 0.782889f, 0.782949f, 0.783009f, 0.783068f,
+ 0.783128f, 0.783187f, 0.783247f, 0.783307f, 0.783366f, 0.783426f, 0.783485f, 0.783545f,
+ 0.783605f, 0.783664f, 0.783724f, 0.783783f, 0.783843f, 0.783902f, 0.783962f, 0.784021f,
+ 0.784081f, 0.784140f, 0.784200f, 0.784259f, 0.784319f, 0.784378f, 0.784438f, 0.784497f,
+ 0.784557f, 0.784616f, 0.784675f, 0.784735f, 0.784794f, 0.784854f, 0.784913f, 0.784973f,
+ 0.785032f, 0.785091f, 0.785151f, 0.785210f, 0.785269f, 0.785329f, 0.785388f, 0.785447f,
+ 0.785507f, 0.785566f, 0.785625f, 0.785685f, 0.785744f, 0.785803f, 0.785863f, 0.785922f,
+ 0.785981f, 0.786041f, 0.786100f, 0.786159f, 0.786218f, 0.786278f, 0.786337f, 0.786396f,
+ 0.786455f, 0.786514f, 0.786574f, 0.786633f, 0.786692f, 0.786751f, 0.786810f, 0.786870f,
+ 0.786929f, 0.786988f, 0.787047f, 0.787106f, 0.787165f, 0.787224f, 0.787284f, 0.787343f,
+ 0.787402f, 0.787461f, 0.787520f, 0.787579f, 0.787638f, 0.787697f, 0.787756f, 0.787815f,
+ 0.787874f, 0.787933f, 0.787992f, 0.788051f, 0.788110f, 0.788169f, 0.788228f, 0.788287f,
+ 0.788346f, 0.788405f, 0.788464f, 0.788523f, 0.788582f, 0.788641f, 0.788700f, 0.788759f,
+ 0.788818f, 0.788877f, 0.788936f, 0.788995f, 0.789054f, 0.789113f, 0.789172f, 0.789230f,
+ 0.789289f, 0.789348f, 0.789407f, 0.789466f, 0.789525f, 0.789584f, 0.789642f, 0.789701f,
+ 0.789760f, 0.789819f, 0.789878f, 0.789936f, 0.789995f, 0.790054f, 0.790113f, 0.790171f,
+ 0.790230f, 0.790289f, 0.790348f, 0.790406f, 0.790465f, 0.790524f, 0.790583f, 0.790641f,
+ 0.790700f, 0.790759f, 0.790817f, 0.790876f, 0.790935f, 0.790993f, 0.791052f, 0.791111f,
+ 0.791169f, 0.791228f, 0.791287f, 0.791345f, 0.791404f, 0.791462f, 0.791521f, 0.791580f,
+ 0.791638f, 0.791697f, 0.791755f, 0.791814f, 0.791872f, 0.791931f, 0.791990f, 0.792048f,
+ 0.792107f, 0.792165f, 0.792224f, 0.792282f, 0.792341f, 0.792399f, 0.792458f, 0.792516f,
+ 0.792575f, 0.792633f, 0.792691f, 0.792750f, 0.792808f, 0.792867f, 0.792925f, 0.792984f,
+ 0.793042f, 0.793100f, 0.793159f, 0.793217f, 0.793276f, 0.793334f, 0.793392f, 0.793451f,
+ 0.793509f, 0.793567f, 0.793626f, 0.793684f, 0.793742f, 0.793801f, 0.793859f, 0.793917f,
+ 0.793975f, 0.794034f, 0.794092f, 0.794150f, 0.794209f, 0.794267f, 0.794325f, 0.794383f,
+ 0.794442f, 0.794500f, 0.794558f, 0.794616f, 0.794674f, 0.794733f, 0.794791f, 0.794849f,
+ 0.794907f, 0.794965f, 0.795023f, 0.795082f, 0.795140f, 0.795198f, 0.795256f, 0.795314f,
+ 0.795372f, 0.795430f, 0.795488f, 0.795547f, 0.795605f, 0.795663f, 0.795721f, 0.795779f,
+ 0.795837f, 0.795895f, 0.795953f, 0.796011f, 0.796069f, 0.796127f, 0.796185f, 0.796243f,
+ 0.796301f, 0.796359f, 0.796417f, 0.796475f, 0.796533f, 0.796591f, 0.796649f, 0.796707f,
+ 0.796765f, 0.796823f, 0.796881f, 0.796939f, 0.796996f, 0.797054f, 0.797112f, 0.797170f,
+ 0.797228f, 0.797286f, 0.797344f, 0.797402f, 0.797459f, 0.797517f, 0.797575f, 0.797633f,
+ 0.797691f, 0.797749f, 0.797806f, 0.797864f, 0.797922f, 0.797980f, 0.798038f, 0.798095f,
+ 0.798153f, 0.798211f, 0.798269f, 0.798326f, 0.798384f, 0.798442f, 0.798500f, 0.798557f,
+ 0.798615f, 0.798673f, 0.798730f, 0.798788f, 0.798846f, 0.798903f, 0.798961f, 0.799019f,
+ 0.799076f, 0.799134f, 0.799192f, 0.799249f, 0.799307f, 0.799365f, 0.799422f, 0.799480f,
+ 0.799537f, 0.799595f, 0.799652f, 0.799710f, 0.799768f, 0.799825f, 0.799883f, 0.799940f,
+ 0.799998f, 0.800055f, 0.800113f, 0.800170f, 0.800228f, 0.800285f, 0.800343f, 0.800400f,
+ 0.800458f, 0.800515f, 0.800573f, 0.800630f, 0.800687f, 0.800745f, 0.800802f, 0.800860f,
+ 0.800917f, 0.800975f, 0.801032f, 0.801089f, 0.801147f, 0.801204f, 0.801261f, 0.801319f,
+ 0.801376f, 0.801434f, 0.801491f, 0.801548f, 0.801606f, 0.801663f, 0.801720f, 0.801777f,
+ 0.801835f, 0.801892f, 0.801949f, 0.802007f, 0.802064f, 0.802121f, 0.802178f, 0.802236f,
+ 0.802293f, 0.802350f, 0.802407f, 0.802464f, 0.802522f, 0.802579f, 0.802636f, 0.802693f,
+ 0.802750f, 0.802808f, 0.802865f, 0.802922f, 0.802979f, 0.803036f, 0.803093f, 0.803150f,
+ 0.803208f, 0.803265f, 0.803322f, 0.803379f, 0.803436f, 0.803493f, 0.803550f, 0.803607f,
+ 0.803664f, 0.803721f, 0.803778f, 0.803835f, 0.803892f, 0.803949f, 0.804006f, 0.804063f,
+ 0.804120f, 0.804177f, 0.804234f, 0.804291f, 0.804348f, 0.804405f, 0.804462f, 0.804519f,
+ 0.804576f, 0.804633f, 0.804690f, 0.804747f, 0.804804f, 0.804861f, 0.804918f, 0.804974f,
+ 0.805031f, 0.805088f, 0.805145f, 0.805202f, 0.805259f, 0.805316f, 0.805372f, 0.805429f,
+ 0.805486f, 0.805543f, 0.805600f, 0.805656f, 0.805713f, 0.805770f, 0.805827f, 0.805884f,
+ 0.805940f, 0.805997f, 0.806054f, 0.806111f, 0.806167f, 0.806224f, 0.806281f, 0.806338f,
+ 0.806394f, 0.806451f, 0.806508f, 0.806564f, 0.806621f, 0.806678f, 0.806734f, 0.806791f,
+ 0.806848f, 0.806904f, 0.806961f, 0.807017f, 0.807074f, 0.807131f, 0.807187f, 0.807244f,
+ 0.807300f, 0.807357f, 0.807414f, 0.807470f, 0.807527f, 0.807583f, 0.807640f, 0.807696f,
+ 0.807753f, 0.807809f, 0.807866f, 0.807922f, 0.807979f, 0.808035f, 0.808092f, 0.808148f,
+ 0.808205f, 0.808261f, 0.808318f, 0.808374f, 0.808430f, 0.808487f, 0.808543f, 0.808600f,
+ 0.808656f, 0.808713f, 0.808769f, 0.808825f, 0.808882f, 0.808938f, 0.808994f, 0.809051f,
+ 0.809107f, 0.809164f, 0.809220f, 0.809276f, 0.809332f, 0.809389f, 0.809445f, 0.809501f,
+ 0.809558f, 0.809614f, 0.809670f, 0.809726f, 0.809783f, 0.809839f, 0.809895f, 0.809951f,
+ 0.810008f, 0.810064f, 0.810120f, 0.810176f, 0.810232f, 0.810289f, 0.810345f, 0.810401f,
+ 0.810457f, 0.810513f, 0.810570f, 0.810626f, 0.810682f, 0.810738f, 0.810794f, 0.810850f,
+ 0.810906f, 0.810962f, 0.811018f, 0.811075f, 0.811131f, 0.811187f, 0.811243f, 0.811299f,
+ 0.811355f, 0.811411f, 0.811467f, 0.811523f, 0.811579f, 0.811635f, 0.811691f, 0.811747f,
+ 0.811803f, 0.811859f, 0.811915f, 0.811971f, 0.812027f, 0.812083f, 0.812139f, 0.812195f,
+ 0.812251f, 0.812307f, 0.812362f, 0.812418f, 0.812474f, 0.812530f, 0.812586f, 0.812642f,
+ 0.812698f, 0.812754f, 0.812809f, 0.812865f, 0.812921f, 0.812977f, 0.813033f, 0.813089f,
+ 0.813144f, 0.813200f, 0.813256f, 0.813312f, 0.813368f, 0.813423f, 0.813479f, 0.813535f,
+ 0.813591f, 0.813646f, 0.813702f, 0.813758f, 0.813814f, 0.813869f, 0.813925f, 0.813981f,
+ 0.814036f, 0.814092f, 0.814148f, 0.814203f, 0.814259f, 0.814315f, 0.814370f, 0.814426f,
+ 0.814482f, 0.814537f, 0.814593f, 0.814648f, 0.814704f, 0.814760f, 0.814815f, 0.814871f,
+ 0.814926f, 0.814982f, 0.815037f, 0.815093f, 0.815149f, 0.815204f, 0.815260f, 0.815315f,
+ 0.815371f, 0.815426f, 0.815482f, 0.815537f, 0.815593f, 0.815648f, 0.815704f, 0.815759f,
+ 0.815814f, 0.815870f, 0.815925f, 0.815981f, 0.816036f, 0.816092f, 0.816147f, 0.816202f,
+ 0.816258f, 0.816313f, 0.816368f, 0.816424f, 0.816479f, 0.816535f, 0.816590f, 0.816645f,
+ 0.816701f, 0.816756f, 0.816811f, 0.816867f, 0.816922f, 0.816977f, 0.817032f, 0.817088f,
+ 0.817143f, 0.817198f, 0.817253f, 0.817309f, 0.817364f, 0.817419f, 0.817474f, 0.817530f,
+ 0.817585f, 0.817640f, 0.817695f, 0.817750f, 0.817806f, 0.817861f, 0.817916f, 0.817971f,
+ 0.818026f, 0.818081f, 0.818137f, 0.818192f, 0.818247f, 0.818302f, 0.818357f, 0.818412f,
+ 0.818467f, 0.818522f, 0.818577f, 0.818632f, 0.818687f, 0.818742f, 0.818798f, 0.818853f,
+ 0.818908f, 0.818963f, 0.819018f, 0.819073f, 0.819128f, 0.819183f, 0.819238f, 0.819293f,
+ 0.819348f, 0.819402f, 0.819457f, 0.819512f, 0.819567f, 0.819622f, 0.819677f, 0.819732f,
+ 0.819787f, 0.819842f, 0.819897f, 0.819952f, 0.820007f, 0.820061f, 0.820116f, 0.820171f,
+ 0.820226f, 0.820281f, 0.820336f, 0.820390f, 0.820445f, 0.820500f, 0.820555f, 0.820610f,
+ 0.820664f, 0.820719f, 0.820774f, 0.820829f, 0.820884f, 0.820938f, 0.820993f, 0.821048f,
+ 0.821102f, 0.821157f, 0.821212f, 0.821267f, 0.821321f, 0.821376f, 0.821431f, 0.821485f,
+ 0.821540f, 0.821595f, 0.821649f, 0.821704f, 0.821759f, 0.821813f, 0.821868f, 0.821922f,
+ 0.821977f, 0.822032f, 0.822086f, 0.822141f, 0.822195f, 0.822250f, 0.822305f, 0.822359f,
+ 0.822414f, 0.822468f, 0.822523f, 0.822577f, 0.822632f, 0.822686f, 0.822741f, 0.822795f,
+ 0.822850f, 0.822904f, 0.822959f, 0.823013f, 0.823068f, 0.823122f, 0.823177f, 0.823231f,
+ 0.823285f, 0.823340f, 0.823394f, 0.823449f, 0.823503f, 0.823557f, 0.823612f, 0.823666f,
+ 0.823721f, 0.823775f, 0.823829f, 0.823884f, 0.823938f, 0.823992f, 0.824047f, 0.824101f,
+ 0.824155f, 0.824209f, 0.824264f, 0.824318f, 0.824372f, 0.824427f, 0.824481f, 0.824535f,
+ 0.824589f, 0.824644f, 0.824698f, 0.824752f, 0.824806f, 0.824860f, 0.824915f, 0.824969f,
+ 0.825023f, 0.825077f, 0.825131f, 0.825185f, 0.825240f, 0.825294f, 0.825348f, 0.825402f,
+ 0.825456f, 0.825510f, 0.825564f, 0.825618f, 0.825673f, 0.825727f, 0.825781f, 0.825835f,
+ 0.825889f, 0.825943f, 0.825997f, 0.826051f, 0.826105f, 0.826159f, 0.826213f, 0.826267f,
+ 0.826321f, 0.826375f, 0.826429f, 0.826483f, 0.826537f, 0.826591f, 0.826645f, 0.826699f,
+ 0.826753f, 0.826807f, 0.826861f, 0.826915f, 0.826968f, 0.827022f, 0.827076f, 0.827130f,
+ 0.827184f, 0.827238f, 0.827292f, 0.827346f, 0.827399f, 0.827453f, 0.827507f, 0.827561f,
+ 0.827615f, 0.827669f, 0.827722f, 0.827776f, 0.827830f, 0.827884f, 0.827938f, 0.827991f,
+ 0.828045f, 0.828099f, 0.828153f, 0.828206f, 0.828260f, 0.828314f, 0.828367f, 0.828421f,
+ 0.828475f, 0.828529f, 0.828582f, 0.828636f, 0.828690f, 0.828743f, 0.828797f, 0.828851f,
+ 0.828904f, 0.828958f, 0.829011f, 0.829065f, 0.829119f, 0.829172f, 0.829226f, 0.829279f,
+ 0.829333f, 0.829386f, 0.829440f, 0.829494f, 0.829547f, 0.829601f, 0.829654f, 0.829708f,
+ 0.829761f, 0.829815f, 0.829868f, 0.829922f, 0.829975f, 0.830029f, 0.830082f, 0.830136f,
+ 0.830189f, 0.830243f, 0.830296f, 0.830349f, 0.830403f, 0.830456f, 0.830510f, 0.830563f,
+ 0.830616f, 0.830670f, 0.830723f, 0.830777f, 0.830830f, 0.830883f, 0.830937f, 0.830990f,
+ 0.831043f, 0.831097f, 0.831150f, 0.831203f, 0.831257f, 0.831310f, 0.831363f, 0.831416f,
+ 0.831470f, 0.831523f, 0.831576f, 0.831629f, 0.831683f, 0.831736f, 0.831789f, 0.831842f,
+ 0.831895f, 0.831949f, 0.832002f, 0.832055f, 0.832108f, 0.832161f, 0.832215f, 0.832268f,
+ 0.832321f, 0.832374f, 0.832427f, 0.832480f, 0.832533f, 0.832586f, 0.832640f, 0.832693f,
+ 0.832746f, 0.832799f, 0.832852f, 0.832905f, 0.832958f, 0.833011f, 0.833064f, 0.833117f,
+ 0.833170f, 0.833223f, 0.833276f, 0.833329f, 0.833382f, 0.833435f, 0.833488f, 0.833541f,
+ 0.833594f, 0.833647f, 0.833700f, 0.833753f, 0.833806f, 0.833859f, 0.833912f, 0.833965f,
+ 0.834018f, 0.834070f, 0.834123f, 0.834176f, 0.834229f, 0.834282f, 0.834335f, 0.834388f,
+ 0.834440f, 0.834493f, 0.834546f, 0.834599f, 0.834652f, 0.834705f, 0.834757f, 0.834810f,
+ 0.834863f, 0.834916f, 0.834968f, 0.835021f, 0.835074f, 0.835127f, 0.835179f, 0.835232f,
+ 0.835285f, 0.835338f, 0.835390f, 0.835443f, 0.835496f, 0.835548f, 0.835601f, 0.835654f,
+ 0.835706f, 0.835759f, 0.835812f, 0.835864f, 0.835917f, 0.835969f, 0.836022f, 0.836075f,
+ 0.836127f, 0.836180f, 0.836232f, 0.836285f, 0.836338f, 0.836390f, 0.836443f, 0.836495f,
+ 0.836548f, 0.836600f, 0.836653f, 0.836705f, 0.836758f, 0.836810f, 0.836863f, 0.836915f,
+ 0.836968f, 0.837020f, 0.837073f, 0.837125f, 0.837178f, 0.837230f, 0.837282f, 0.837335f,
+ 0.837387f, 0.837440f, 0.837492f, 0.837544f, 0.837597f, 0.837649f, 0.837701f, 0.837754f,
+ 0.837806f, 0.837859f, 0.837911f, 0.837963f, 0.838015f, 0.838068f, 0.838120f, 0.838172f,
+ 0.838225f, 0.838277f, 0.838329f, 0.838382f, 0.838434f, 0.838486f, 0.838538f, 0.838591f,
+ 0.838643f, 0.838695f, 0.838747f, 0.838799f, 0.838852f, 0.838904f, 0.838956f, 0.839008f,
+ 0.839060f, 0.839112f, 0.839165f, 0.839217f, 0.839269f, 0.839321f, 0.839373f, 0.839425f,
+ 0.839477f, 0.839529f, 0.839581f, 0.839634f, 0.839686f, 0.839738f, 0.839790f, 0.839842f,
+ 0.839894f, 0.839946f, 0.839998f, 0.840050f, 0.840102f, 0.840154f, 0.840206f, 0.840258f,
+ 0.840310f, 0.840362f, 0.840414f, 0.840466f, 0.840518f, 0.840570f, 0.840622f, 0.840673f,
+ 0.840725f, 0.840777f, 0.840829f, 0.840881f, 0.840933f, 0.840985f, 0.841037f, 0.841089f,
+ 0.841140f, 0.841192f, 0.841244f, 0.841296f, 0.841348f, 0.841400f, 0.841451f, 0.841503f,
+ 0.841555f, 0.841607f, 0.841659f, 0.841710f, 0.841762f, 0.841814f, 0.841866f, 0.841917f,
+ 0.841969f, 0.842021f, 0.842072f, 0.842124f, 0.842176f, 0.842228f, 0.842279f, 0.842331f,
+ 0.842383f, 0.842434f, 0.842486f, 0.842538f, 0.842589f, 0.842641f, 0.842692f, 0.842744f,
+ 0.842796f, 0.842847f, 0.842899f, 0.842950f, 0.843002f, 0.843054f, 0.843105f, 0.843157f,
+ 0.843208f, 0.843260f, 0.843311f, 0.843363f, 0.843414f, 0.843466f, 0.843517f, 0.843569f,
+ 0.843620f, 0.843672f, 0.843723f, 0.843775f, 0.843826f, 0.843878f, 0.843929f, 0.843980f,
+ 0.844032f, 0.844083f, 0.844135f, 0.844186f, 0.844238f, 0.844289f, 0.844340f, 0.844392f,
+ 0.844443f, 0.844494f, 0.844546f, 0.844597f, 0.844648f, 0.844700f, 0.844751f, 0.844802f,
+ 0.844854f, 0.844905f, 0.844956f, 0.845007f, 0.845059f, 0.845110f, 0.845161f, 0.845212f,
+ 0.845264f, 0.845315f, 0.845366f, 0.845417f, 0.845469f, 0.845520f, 0.845571f, 0.845622f,
+ 0.845673f, 0.845724f, 0.845776f, 0.845827f, 0.845878f, 0.845929f, 0.845980f, 0.846031f,
+ 0.846082f, 0.846133f, 0.846185f, 0.846236f, 0.846287f, 0.846338f, 0.846389f, 0.846440f,
+ 0.846491f, 0.846542f, 0.846593f, 0.846644f, 0.846695f, 0.846746f, 0.846797f, 0.846848f,
+ 0.846899f, 0.846950f, 0.847001f, 0.847052f, 0.847103f, 0.847154f, 0.847205f, 0.847256f,
+ 0.847307f, 0.847358f, 0.847408f, 0.847459f, 0.847510f, 0.847561f, 0.847612f, 0.847663f,
+ 0.847714f, 0.847765f, 0.847815f, 0.847866f, 0.847917f, 0.847968f, 0.848019f, 0.848070f,
+ 0.848120f, 0.848171f, 0.848222f, 0.848273f, 0.848323f, 0.848374f, 0.848425f, 0.848476f,
+ 0.848526f, 0.848577f, 0.848628f, 0.848679f, 0.848729f, 0.848780f, 0.848831f, 0.848881f,
+ 0.848932f, 0.848983f, 0.849033f, 0.849084f, 0.849135f, 0.849185f, 0.849236f, 0.849287f,
+ 0.849337f, 0.849388f, 0.849438f, 0.849489f, 0.849540f, 0.849590f, 0.849641f, 0.849691f,
+ 0.849742f, 0.849792f, 0.849843f, 0.849893f, 0.849944f, 0.849994f, 0.850045f, 0.850095f,
+ 0.850146f, 0.850196f, 0.850247f, 0.850297f, 0.850348f, 0.850398f, 0.850449f, 0.850499f,
+ 0.850549f, 0.850600f, 0.850650f, 0.850701f, 0.850751f, 0.850801f, 0.850852f, 0.850902f,
+ 0.850953f, 0.851003f, 0.851053f, 0.851104f, 0.851154f, 0.851204f, 0.851255f, 0.851305f,
+ 0.851355f, 0.851406f, 0.851456f, 0.851506f, 0.851556f, 0.851607f, 0.851657f, 0.851707f,
+ 0.851757f, 0.851808f, 0.851858f, 0.851908f, 0.851958f, 0.852008f, 0.852059f, 0.852109f,
+ 0.852159f, 0.852209f, 0.852259f, 0.852309f, 0.852360f, 0.852410f, 0.852460f, 0.852510f,
+ 0.852560f, 0.852610f, 0.852660f, 0.852710f, 0.852760f, 0.852810f, 0.852861f, 0.852911f,
+ 0.852961f, 0.853011f, 0.853061f, 0.853111f, 0.853161f, 0.853211f, 0.853261f, 0.853311f,
+ 0.853361f, 0.853411f, 0.853461f, 0.853511f, 0.853561f, 0.853611f, 0.853660f, 0.853710f,
+ 0.853760f, 0.853810f, 0.853860f, 0.853910f, 0.853960f, 0.854010f, 0.854060f, 0.854110f,
+ 0.854159f, 0.854209f, 0.854259f, 0.854309f, 0.854359f, 0.854409f, 0.854458f, 0.854508f,
+ 0.854558f, 0.854608f, 0.854658f, 0.854707f, 0.854757f, 0.854807f, 0.854857f, 0.854906f,
+ 0.854956f, 0.855006f, 0.855056f, 0.855105f, 0.855155f, 0.855205f, 0.855254f, 0.855304f,
+ 0.855354f, 0.855403f, 0.855453f, 0.855503f, 0.855552f, 0.855602f, 0.855651f, 0.855701f,
+ 0.855751f, 0.855800f, 0.855850f, 0.855900f, 0.855949f, 0.855999f, 0.856048f, 0.856098f,
+ 0.856147f, 0.856197f, 0.856246f, 0.856296f, 0.856345f, 0.856395f, 0.856444f, 0.856494f,
+ 0.856543f, 0.856593f, 0.856642f, 0.856692f, 0.856741f, 0.856791f, 0.856840f, 0.856890f,
+ 0.856939f, 0.856988f, 0.857038f, 0.857087f, 0.857137f, 0.857186f, 0.857235f, 0.857285f,
+ 0.857334f, 0.857383f, 0.857433f, 0.857482f, 0.857531f, 0.857581f, 0.857630f, 0.857679f,
+ 0.857729f, 0.857778f, 0.857827f, 0.857876f, 0.857926f, 0.857975f, 0.858024f, 0.858073f,
+ 0.858123f, 0.858172f, 0.858221f, 0.858270f, 0.858320f, 0.858369f, 0.858418f, 0.858467f,
+ 0.858516f, 0.858565f, 0.858615f, 0.858664f, 0.858713f, 0.858762f, 0.858811f, 0.858860f,
+ 0.858909f, 0.858958f, 0.859007f, 0.859057f, 0.859106f, 0.859155f, 0.859204f, 0.859253f,
+ 0.859302f, 0.859351f, 0.859400f, 0.859449f, 0.859498f, 0.859547f, 0.859596f, 0.859645f,
+ 0.859694f, 0.859743f, 0.859792f, 0.859841f, 0.859890f, 0.859939f, 0.859988f, 0.860036f,
+ 0.860085f, 0.860134f, 0.860183f, 0.860232f, 0.860281f, 0.860330f, 0.860379f, 0.860428f,
+ 0.860476f, 0.860525f, 0.860574f, 0.860623f, 0.860672f, 0.860721f, 0.860769f, 0.860818f,
+ 0.860867f, 0.860916f, 0.860964f, 0.861013f, 0.861062f, 0.861111f, 0.861160f, 0.861208f,
+ 0.861257f, 0.861306f, 0.861354f, 0.861403f, 0.861452f, 0.861500f, 0.861549f, 0.861598f,
+ 0.861646f, 0.861695f, 0.861744f, 0.861792f, 0.861841f, 0.861890f, 0.861938f, 0.861987f,
+ 0.862035f, 0.862084f, 0.862133f, 0.862181f, 0.862230f, 0.862278f, 0.862327f, 0.862375f,
+ 0.862424f, 0.862472f, 0.862521f, 0.862570f, 0.862618f, 0.862666f, 0.862715f, 0.862763f,
+ 0.862812f, 0.862860f, 0.862909f, 0.862957f, 0.863006f, 0.863054f, 0.863103f, 0.863151f,
+ 0.863199f, 0.863248f, 0.863296f, 0.863345f, 0.863393f, 0.863441f, 0.863490f, 0.863538f,
+ 0.863586f, 0.863635f, 0.863683f, 0.863731f, 0.863780f, 0.863828f, 0.863876f, 0.863925f,
+ 0.863973f, 0.864021f, 0.864069f, 0.864118f, 0.864166f, 0.864214f, 0.864262f, 0.864311f,
+ 0.864359f, 0.864407f, 0.864455f, 0.864503f, 0.864552f, 0.864600f, 0.864648f, 0.864696f,
+ 0.864744f, 0.864792f, 0.864841f, 0.864889f, 0.864937f, 0.864985f, 0.865033f, 0.865081f,
+ 0.865129f, 0.865177f, 0.865225f, 0.865273f, 0.865321f, 0.865369f, 0.865418f, 0.865466f,
+ 0.865514f, 0.865562f, 0.865610f, 0.865658f, 0.865706f, 0.865754f, 0.865802f, 0.865850f,
+ 0.865898f, 0.865946f, 0.865993f, 0.866041f, 0.866089f, 0.866137f, 0.866185f, 0.866233f,
+ 0.866281f, 0.866329f, 0.866377f, 0.866425f, 0.866472f, 0.866520f, 0.866568f, 0.866616f,
+ 0.866664f, 0.866712f, 0.866759f, 0.866807f, 0.866855f, 0.866903f, 0.866951f, 0.866998f,
+ 0.867046f, 0.867094f, 0.867142f, 0.867190f, 0.867237f, 0.867285f, 0.867333f, 0.867380f,
+ 0.867428f, 0.867476f, 0.867523f, 0.867571f, 0.867619f, 0.867667f, 0.867714f, 0.867762f,
+ 0.867809f, 0.867857f, 0.867905f, 0.867952f, 0.868000f, 0.868048f, 0.868095f, 0.868143f,
+ 0.868190f, 0.868238f, 0.868285f, 0.868333f, 0.868381f, 0.868428f, 0.868476f, 0.868523f,
+ 0.868571f, 0.868618f, 0.868666f, 0.868713f, 0.868761f, 0.868808f, 0.868856f, 0.868903f,
+ 0.868951f, 0.868998f, 0.869045f, 0.869093f, 0.869140f, 0.869188f, 0.869235f, 0.869282f,
+ 0.869330f, 0.869377f, 0.869425f, 0.869472f, 0.869519f, 0.869567f, 0.869614f, 0.869661f,
+ 0.869709f, 0.869756f, 0.869803f, 0.869851f, 0.869898f, 0.869945f, 0.869992f, 0.870040f,
+ 0.870087f, 0.870134f, 0.870182f, 0.870229f, 0.870276f, 0.870323f, 0.870370f, 0.870418f,
+ 0.870465f, 0.870512f, 0.870559f, 0.870606f, 0.870654f, 0.870701f, 0.870748f, 0.870795f,
+ 0.870842f, 0.870889f, 0.870936f, 0.870983f, 0.871031f, 0.871078f, 0.871125f, 0.871172f,
+ 0.871219f, 0.871266f, 0.871313f, 0.871360f, 0.871407f, 0.871454f, 0.871501f, 0.871548f,
+ 0.871595f, 0.871642f, 0.871689f, 0.871736f, 0.871783f, 0.871830f, 0.871877f, 0.871924f,
+ 0.871971f, 0.872018f, 0.872065f, 0.872112f, 0.872159f, 0.872205f, 0.872252f, 0.872299f,
+ 0.872346f, 0.872393f, 0.872440f, 0.872487f, 0.872534f, 0.872580f, 0.872627f, 0.872674f,
+ 0.872721f, 0.872768f, 0.872814f, 0.872861f, 0.872908f, 0.872955f, 0.873001f, 0.873048f,
+ 0.873095f, 0.873142f, 0.873188f, 0.873235f, 0.873282f, 0.873329f, 0.873375f, 0.873422f,
+ 0.873469f, 0.873515f, 0.873562f, 0.873609f, 0.873655f, 0.873702f, 0.873749f, 0.873795f,
+ 0.873842f, 0.873888f, 0.873935f, 0.873982f, 0.874028f, 0.874075f, 0.874121f, 0.874168f,
+ 0.874215f, 0.874261f, 0.874308f, 0.874354f, 0.874401f, 0.874447f, 0.874494f, 0.874540f,
+ 0.874587f, 0.874633f, 0.874680f, 0.874726f, 0.874773f, 0.874819f, 0.874865f, 0.874912f,
+ 0.874958f, 0.875005f, 0.875051f, 0.875098f, 0.875144f, 0.875190f, 0.875237f, 0.875283f,
+ 0.875329f, 0.875376f, 0.875422f, 0.875468f, 0.875515f, 0.875561f, 0.875607f, 0.875654f,
+ 0.875700f, 0.875746f, 0.875793f, 0.875839f, 0.875885f, 0.875931f, 0.875978f, 0.876024f,
+ 0.876070f, 0.876116f, 0.876163f, 0.876209f, 0.876255f, 0.876301f, 0.876347f, 0.876393f,
+ 0.876440f, 0.876486f, 0.876532f, 0.876578f, 0.876624f, 0.876670f, 0.876716f, 0.876763f,
+ 0.876809f, 0.876855f, 0.876901f, 0.876947f, 0.876993f, 0.877039f, 0.877085f, 0.877131f,
+ 0.877177f, 0.877223f, 0.877269f, 0.877315f, 0.877361f, 0.877407f, 0.877453f, 0.877499f,
+ 0.877545f, 0.877591f, 0.877637f, 0.877683f, 0.877729f, 0.877775f, 0.877821f, 0.877867f,
+ 0.877913f, 0.877959f, 0.878005f, 0.878051f, 0.878096f, 0.878142f, 0.878188f, 0.878234f,
+ 0.878280f, 0.878326f, 0.878371f, 0.878417f, 0.878463f, 0.878509f, 0.878555f, 0.878600f,
+ 0.878646f, 0.878692f, 0.878738f, 0.878784f, 0.878829f, 0.878875f, 0.878921f, 0.878967f,
+ 0.879012f, 0.879058f, 0.879104f, 0.879149f, 0.879195f, 0.879241f, 0.879286f, 0.879332f,
+ 0.879378f, 0.879423f, 0.879469f, 0.879515f, 0.879560f, 0.879606f, 0.879651f, 0.879697f,
+ 0.879743f, 0.879788f, 0.879834f, 0.879879f, 0.879925f, 0.879970f, 0.880016f, 0.880061f,
+ 0.880107f, 0.880153f, 0.880198f, 0.880244f, 0.880289f, 0.880334f, 0.880380f, 0.880425f,
+ 0.880471f, 0.880516f, 0.880562f, 0.880607f, 0.880653f, 0.880698f, 0.880743f, 0.880789f,
+ 0.880834f, 0.880880f, 0.880925f, 0.880970f, 0.881016f, 0.881061f, 0.881106f, 0.881152f,
+ 0.881197f, 0.881242f, 0.881288f, 0.881333f, 0.881378f, 0.881424f, 0.881469f, 0.881514f,
+ 0.881559f, 0.881605f, 0.881650f, 0.881695f, 0.881740f, 0.881786f, 0.881831f, 0.881876f,
+ 0.881921f, 0.881966f, 0.882012f, 0.882057f, 0.882102f, 0.882147f, 0.882192f, 0.882237f,
+ 0.882283f, 0.882328f, 0.882373f, 0.882418f, 0.882463f, 0.882508f, 0.882553f, 0.882598f,
+ 0.882643f, 0.882688f, 0.882733f, 0.882779f, 0.882824f, 0.882869f, 0.882914f, 0.882959f,
+ 0.883004f, 0.883049f, 0.883094f, 0.883139f, 0.883184f, 0.883228f, 0.883273f, 0.883318f,
+ 0.883363f, 0.883408f, 0.883453f, 0.883498f, 0.883543f, 0.883588f, 0.883633f, 0.883678f,
+ 0.883723f, 0.883767f, 0.883812f, 0.883857f, 0.883902f, 0.883947f, 0.883992f, 0.884036f,
+ 0.884081f, 0.884126f, 0.884171f, 0.884216f, 0.884260f, 0.884305f, 0.884350f, 0.884395f,
+ 0.884439f, 0.884484f, 0.884529f, 0.884574f, 0.884618f, 0.884663f, 0.884708f, 0.884752f,
+ 0.884797f, 0.884842f, 0.884886f, 0.884931f, 0.884976f, 0.885020f, 0.885065f, 0.885110f,
+ 0.885154f, 0.885199f, 0.885243f, 0.885288f, 0.885333f, 0.885377f, 0.885422f, 0.885466f,
+ 0.885511f, 0.885555f, 0.885600f, 0.885644f, 0.885689f, 0.885733f, 0.885778f, 0.885822f,
+ 0.885867f, 0.885911f, 0.885956f, 0.886000f, 0.886045f, 0.886089f, 0.886134f, 0.886178f,
+ 0.886223f, 0.886267f, 0.886311f, 0.886356f, 0.886400f, 0.886445f, 0.886489f, 0.886533f,
+ 0.886578f, 0.886622f, 0.886666f, 0.886711f, 0.886755f, 0.886799f, 0.886844f, 0.886888f,
+ 0.886932f, 0.886976f, 0.887021f, 0.887065f, 0.887109f, 0.887153f, 0.887198f, 0.887242f,
+ 0.887286f, 0.887330f, 0.887375f, 0.887419f, 0.887463f, 0.887507f, 0.887551f, 0.887595f,
+ 0.887640f, 0.887684f, 0.887728f, 0.887772f, 0.887816f, 0.887860f, 0.887904f, 0.887949f,
+ 0.887993f, 0.888037f, 0.888081f, 0.888125f, 0.888169f, 0.888213f, 0.888257f, 0.888301f,
+ 0.888345f, 0.888389f, 0.888433f, 0.888477f, 0.888521f, 0.888565f, 0.888609f, 0.888653f,
+ 0.888697f, 0.888741f, 0.888785f, 0.888829f, 0.888873f, 0.888917f, 0.888961f, 0.889004f,
+ 0.889048f, 0.889092f, 0.889136f, 0.889180f, 0.889224f, 0.889268f, 0.889312f, 0.889355f,
+ 0.889399f, 0.889443f, 0.889487f, 0.889531f, 0.889574f, 0.889618f, 0.889662f, 0.889706f,
+ 0.889750f, 0.889793f, 0.889837f, 0.889881f, 0.889925f, 0.889968f, 0.890012f, 0.890056f,
+ 0.890099f, 0.890143f, 0.890187f, 0.890230f, 0.890274f, 0.890318f, 0.890361f, 0.890405f,
+ 0.890449f, 0.890492f, 0.890536f, 0.890580f, 0.890623f, 0.890667f, 0.890710f, 0.890754f,
+ 0.890797f, 0.890841f, 0.890885f, 0.890928f, 0.890972f, 0.891015f, 0.891059f, 0.891102f,
+ 0.891146f, 0.891189f, 0.891233f, 0.891276f, 0.891320f, 0.891363f, 0.891407f, 0.891450f,
+ 0.891493f, 0.891537f, 0.891580f, 0.891624f, 0.891667f, 0.891711f, 0.891754f, 0.891797f,
+ 0.891841f, 0.891884f, 0.891927f, 0.891971f, 0.892014f, 0.892057f, 0.892101f, 0.892144f,
+ 0.892187f, 0.892231f, 0.892274f, 0.892317f, 0.892361f, 0.892404f, 0.892447f, 0.892490f,
+ 0.892534f, 0.892577f, 0.892620f, 0.892663f, 0.892706f, 0.892750f, 0.892793f, 0.892836f,
+ 0.892879f, 0.892922f, 0.892965f, 0.893009f, 0.893052f, 0.893095f, 0.893138f, 0.893181f,
+ 0.893224f, 0.893267f, 0.893310f, 0.893354f, 0.893397f, 0.893440f, 0.893483f, 0.893526f,
+ 0.893569f, 0.893612f, 0.893655f, 0.893698f, 0.893741f, 0.893784f, 0.893827f, 0.893870f,
+ 0.893913f, 0.893956f, 0.893999f, 0.894042f, 0.894085f, 0.894128f, 0.894171f, 0.894214f,
+ 0.894256f, 0.894299f, 0.894342f, 0.894385f, 0.894428f, 0.894471f, 0.894514f, 0.894557f,
+ 0.894599f, 0.894642f, 0.894685f, 0.894728f, 0.894771f, 0.894814f, 0.894856f, 0.894899f,
+ 0.894942f, 0.894985f, 0.895028f, 0.895070f, 0.895113f, 0.895156f, 0.895198f, 0.895241f,
+ 0.895284f, 0.895327f, 0.895369f, 0.895412f, 0.895455f, 0.895497f, 0.895540f, 0.895583f,
+ 0.895625f, 0.895668f, 0.895711f, 0.895753f, 0.895796f, 0.895838f, 0.895881f, 0.895924f,
+ 0.895966f, 0.896009f, 0.896051f, 0.896094f, 0.896137f, 0.896179f, 0.896222f, 0.896264f,
+ 0.896307f, 0.896349f, 0.896392f, 0.896434f, 0.896477f, 0.896519f, 0.896562f, 0.896604f,
+ 0.896646f, 0.896689f, 0.896731f, 0.896774f, 0.896816f, 0.896859f, 0.896901f, 0.896943f,
+ 0.896986f, 0.897028f, 0.897071f, 0.897113f, 0.897155f, 0.897198f, 0.897240f, 0.897282f,
+ 0.897325f, 0.897367f, 0.897409f, 0.897452f, 0.897494f, 0.897536f, 0.897578f, 0.897621f,
+ 0.897663f, 0.897705f, 0.897747f, 0.897790f, 0.897832f, 0.897874f, 0.897916f, 0.897958f,
+ 0.898001f, 0.898043f, 0.898085f, 0.898127f, 0.898169f, 0.898211f, 0.898254f, 0.898296f,
+ 0.898338f, 0.898380f, 0.898422f, 0.898464f, 0.898506f, 0.898548f, 0.898590f, 0.898632f,
+ 0.898674f, 0.898717f, 0.898759f, 0.898801f, 0.898843f, 0.898885f, 0.898927f, 0.898969f,
+ 0.899011f, 0.899053f, 0.899095f, 0.899137f, 0.899179f, 0.899220f, 0.899262f, 0.899304f,
+ 0.899346f, 0.899388f, 0.899430f, 0.899472f, 0.899514f, 0.899556f, 0.899598f, 0.899639f,
+ 0.899681f, 0.899723f, 0.899765f, 0.899807f, 0.899849f, 0.899890f, 0.899932f, 0.899974f,
+ 0.900016f, 0.900058f, 0.900099f, 0.900141f, 0.900183f, 0.900225f, 0.900266f, 0.900308f,
+ 0.900350f, 0.900392f, 0.900433f, 0.900475f, 0.900517f, 0.900558f, 0.900600f, 0.900642f,
+ 0.900683f, 0.900725f, 0.900767f, 0.900808f, 0.900850f, 0.900892f, 0.900933f, 0.900975f,
+ 0.901016f, 0.901058f, 0.901100f, 0.901141f, 0.901183f, 0.901224f, 0.901266f, 0.901307f,
+ 0.901349f, 0.901390f, 0.901432f, 0.901473f, 0.901515f, 0.901556f, 0.901598f, 0.901639f,
+ 0.901681f, 0.901722f, 0.901764f, 0.901805f, 0.901847f, 0.901888f, 0.901929f, 0.901971f,
+ 0.902012f, 0.902054f, 0.902095f, 0.902136f, 0.902178f, 0.902219f, 0.902260f, 0.902302f,
+ 0.902343f, 0.902384f, 0.902426f, 0.902467f, 0.902508f, 0.902550f, 0.902591f, 0.902632f,
+ 0.902673f, 0.902715f, 0.902756f, 0.902797f, 0.902838f, 0.902879f, 0.902921f, 0.902962f,
+ 0.903003f, 0.903044f, 0.903085f, 0.903127f, 0.903168f, 0.903209f, 0.903250f, 0.903291f,
+ 0.903332f, 0.903373f, 0.903415f, 0.903456f, 0.903497f, 0.903538f, 0.903579f, 0.903620f,
+ 0.903661f, 0.903702f, 0.903743f, 0.903784f, 0.903825f, 0.903866f, 0.903907f, 0.903948f,
+ 0.903989f, 0.904030f, 0.904071f, 0.904112f, 0.904153f, 0.904194f, 0.904235f, 0.904276f,
+ 0.904317f, 0.904358f, 0.904399f, 0.904440f, 0.904481f, 0.904521f, 0.904562f, 0.904603f,
+ 0.904644f, 0.904685f, 0.904726f, 0.904767f, 0.904807f, 0.904848f, 0.904889f, 0.904930f,
+ 0.904971f, 0.905011f, 0.905052f, 0.905093f, 0.905134f, 0.905175f, 0.905215f, 0.905256f,
+ 0.905297f, 0.905337f, 0.905378f, 0.905419f, 0.905460f, 0.905500f, 0.905541f, 0.905582f,
+ 0.905622f, 0.905663f, 0.905704f, 0.905744f, 0.905785f, 0.905825f, 0.905866f, 0.905907f,
+ 0.905947f, 0.905988f, 0.906028f, 0.906069f, 0.906110f, 0.906150f, 0.906191f, 0.906231f,
+ 0.906272f, 0.906312f, 0.906353f, 0.906393f, 0.906434f, 0.906474f, 0.906515f, 0.906555f,
+ 0.906596f, 0.906636f, 0.906677f, 0.906717f, 0.906757f, 0.906798f, 0.906838f, 0.906879f,
+ 0.906919f, 0.906959f, 0.907000f, 0.907040f, 0.907081f, 0.907121f, 0.907161f, 0.907202f,
+ 0.907242f, 0.907282f, 0.907323f, 0.907363f, 0.907403f, 0.907444f, 0.907484f, 0.907524f,
+ 0.907564f, 0.907605f, 0.907645f, 0.907685f, 0.907725f, 0.907766f, 0.907806f, 0.907846f,
+ 0.907886f, 0.907926f, 0.907966f, 0.908007f, 0.908047f, 0.908087f, 0.908127f, 0.908167f,
+ 0.908207f, 0.908248f, 0.908288f, 0.908328f, 0.908368f, 0.908408f, 0.908448f, 0.908488f,
+ 0.908528f, 0.908568f, 0.908608f, 0.908648f, 0.908688f, 0.908728f, 0.908768f, 0.908808f,
+ 0.908848f, 0.908888f, 0.908928f, 0.908968f, 0.909008f, 0.909048f, 0.909088f, 0.909128f,
+ 0.909168f, 0.909208f, 0.909248f, 0.909288f, 0.909328f, 0.909368f, 0.909407f, 0.909447f,
+ 0.909487f, 0.909527f, 0.909567f, 0.909607f, 0.909646f, 0.909686f, 0.909726f, 0.909766f,
+ 0.909806f, 0.909845f, 0.909885f, 0.909925f, 0.909965f, 0.910005f, 0.910044f, 0.910084f,
+ 0.910124f, 0.910163f, 0.910203f, 0.910243f, 0.910283f, 0.910322f, 0.910362f, 0.910402f,
+ 0.910441f, 0.910481f, 0.910521f, 0.910560f, 0.910600f, 0.910639f, 0.910679f, 0.910719f,
+ 0.910758f, 0.910798f, 0.910837f, 0.910877f, 0.910917f, 0.910956f, 0.910996f, 0.911035f,
+ 0.911075f, 0.911114f, 0.911154f, 0.911193f, 0.911233f, 0.911272f, 0.911312f, 0.911351f,
+ 0.911391f, 0.911430f, 0.911470f, 0.911509f, 0.911548f, 0.911588f, 0.911627f, 0.911667f,
+ 0.911706f, 0.911745f, 0.911785f, 0.911824f, 0.911864f, 0.911903f, 0.911942f, 0.911982f,
+ 0.912021f, 0.912060f, 0.912099f, 0.912139f, 0.912178f, 0.912217f, 0.912257f, 0.912296f,
+ 0.912335f, 0.912374f, 0.912414f, 0.912453f, 0.912492f, 0.912531f, 0.912571f, 0.912610f,
+ 0.912649f, 0.912688f, 0.912727f, 0.912766f, 0.912806f, 0.912845f, 0.912884f, 0.912923f,
+ 0.912962f, 0.913001f, 0.913040f, 0.913080f, 0.913119f, 0.913158f, 0.913197f, 0.913236f,
+ 0.913275f, 0.913314f, 0.913353f, 0.913392f, 0.913431f, 0.913470f, 0.913509f, 0.913548f,
+ 0.913587f, 0.913626f, 0.913665f, 0.913704f, 0.913743f, 0.913782f, 0.913821f, 0.913860f,
+ 0.913899f, 0.913938f, 0.913976f, 0.914015f, 0.914054f, 0.914093f, 0.914132f, 0.914171f,
+ 0.914210f, 0.914249f, 0.914287f, 0.914326f, 0.914365f, 0.914404f, 0.914443f, 0.914482f,
+ 0.914520f, 0.914559f, 0.914598f, 0.914637f, 0.914675f, 0.914714f, 0.914753f, 0.914792f,
+ 0.914830f, 0.914869f, 0.914908f, 0.914946f, 0.914985f, 0.915024f, 0.915062f, 0.915101f,
+ 0.915140f, 0.915178f, 0.915217f, 0.915256f, 0.915294f, 0.915333f, 0.915372f, 0.915410f,
+ 0.915449f, 0.915487f, 0.915526f, 0.915564f, 0.915603f, 0.915642f, 0.915680f, 0.915719f,
+ 0.915757f, 0.915796f, 0.915834f, 0.915873f, 0.915911f, 0.915950f, 0.915988f, 0.916027f,
+ 0.916065f, 0.916103f, 0.916142f, 0.916180f, 0.916219f, 0.916257f, 0.916296f, 0.916334f,
+ 0.916372f, 0.916411f, 0.916449f, 0.916487f, 0.916526f, 0.916564f, 0.916602f, 0.916641f,
+ 0.916679f, 0.916717f, 0.916756f, 0.916794f, 0.916832f, 0.916871f, 0.916909f, 0.916947f,
+ 0.916985f, 0.917024f, 0.917062f, 0.917100f, 0.917138f, 0.917176f, 0.917215f, 0.917253f,
+ 0.917291f, 0.917329f, 0.917367f, 0.917405f, 0.917444f, 0.917482f, 0.917520f, 0.917558f,
+ 0.917596f, 0.917634f, 0.917672f, 0.917710f, 0.917749f, 0.917787f, 0.917825f, 0.917863f,
+ 0.917901f, 0.917939f, 0.917977f, 0.918015f, 0.918053f, 0.918091f, 0.918129f, 0.918167f,
+ 0.918205f, 0.918243f, 0.918281f, 0.918319f, 0.918357f, 0.918395f, 0.918433f, 0.918471f,
+ 0.918508f, 0.918546f, 0.918584f, 0.918622f, 0.918660f, 0.918698f, 0.918736f, 0.918774f,
+ 0.918811f, 0.918849f, 0.918887f, 0.918925f, 0.918963f, 0.919001f, 0.919038f, 0.919076f,
+ 0.919114f, 0.919152f, 0.919189f, 0.919227f, 0.919265f, 0.919303f, 0.919340f, 0.919378f,
+ 0.919416f, 0.919453f, 0.919491f, 0.919529f, 0.919567f, 0.919604f, 0.919642f, 0.919680f,
+ 0.919717f, 0.919755f, 0.919792f, 0.919830f, 0.919868f, 0.919905f, 0.919943f, 0.919980f,
+ 0.920018f, 0.920056f, 0.920093f, 0.920131f, 0.920168f, 0.920206f, 0.920243f, 0.920281f,
+ 0.920318f, 0.920356f, 0.920393f, 0.920431f, 0.920468f, 0.920506f, 0.920543f, 0.920581f,
+ 0.920618f, 0.920655f, 0.920693f, 0.920730f, 0.920768f, 0.920805f, 0.920842f, 0.920880f,
+ 0.920917f, 0.920955f, 0.920992f, 0.921029f, 0.921067f, 0.921104f, 0.921141f, 0.921179f,
+ 0.921216f, 0.921253f, 0.921291f, 0.921328f, 0.921365f, 0.921402f, 0.921440f, 0.921477f,
+ 0.921514f, 0.921551f, 0.921588f, 0.921626f, 0.921663f, 0.921700f, 0.921737f, 0.921774f,
+ 0.921812f, 0.921849f, 0.921886f, 0.921923f, 0.921960f, 0.921997f, 0.922034f, 0.922072f,
+ 0.922109f, 0.922146f, 0.922183f, 0.922220f, 0.922257f, 0.922294f, 0.922331f, 0.922368f,
+ 0.922405f, 0.922442f, 0.922479f, 0.922516f, 0.922553f, 0.922590f, 0.922627f, 0.922664f,
+ 0.922701f, 0.922738f, 0.922775f, 0.922812f, 0.922849f, 0.922886f, 0.922923f, 0.922960f,
+ 0.922997f, 0.923033f, 0.923070f, 0.923107f, 0.923144f, 0.923181f, 0.923218f, 0.923255f,
+ 0.923291f, 0.923328f, 0.923365f, 0.923402f, 0.923439f, 0.923475f, 0.923512f, 0.923549f,
+ 0.923586f, 0.923622f, 0.923659f, 0.923696f, 0.923733f, 0.923769f, 0.923806f, 0.923843f,
+ 0.923880f, 0.923916f, 0.923953f, 0.923990f, 0.924026f, 0.924063f, 0.924100f, 0.924136f,
+ 0.924173f, 0.924209f, 0.924246f, 0.924283f, 0.924319f, 0.924356f, 0.924392f, 0.924429f,
+ 0.924465f, 0.924502f, 0.924539f, 0.924575f, 0.924612f, 0.924648f, 0.924685f, 0.924721f,
+ 0.924758f, 0.924794f, 0.924831f, 0.924867f, 0.924904f, 0.924940f, 0.924976f, 0.925013f,
+ 0.925049f, 0.925086f, 0.925122f, 0.925158f, 0.925195f, 0.925231f, 0.925268f, 0.925304f,
+ 0.925340f, 0.925377f, 0.925413f, 0.925449f, 0.925486f, 0.925522f, 0.925558f, 0.925595f,
+ 0.925631f, 0.925667f, 0.925703f, 0.925740f, 0.925776f, 0.925812f, 0.925848f, 0.925885f,
+ 0.925921f, 0.925957f, 0.925993f, 0.926029f, 0.926066f, 0.926102f, 0.926138f, 0.926174f,
+ 0.926210f, 0.926246f, 0.926283f, 0.926319f, 0.926355f, 0.926391f, 0.926427f, 0.926463f,
+ 0.926499f, 0.926535f, 0.926571f, 0.926607f, 0.926643f, 0.926679f, 0.926715f, 0.926751f,
+ 0.926787f, 0.926823f, 0.926859f, 0.926895f, 0.926931f, 0.926967f, 0.927003f, 0.927039f,
+ 0.927075f, 0.927111f, 0.927147f, 0.927183f, 0.927219f, 0.927255f, 0.927291f, 0.927327f,
+ 0.927363f, 0.927398f, 0.927434f, 0.927470f, 0.927506f, 0.927542f, 0.927578f, 0.927613f,
+ 0.927649f, 0.927685f, 0.927721f, 0.927757f, 0.927792f, 0.927828f, 0.927864f, 0.927900f,
+ 0.927935f, 0.927971f, 0.928007f, 0.928043f, 0.928078f, 0.928114f, 0.928150f, 0.928185f,
+ 0.928221f, 0.928257f, 0.928292f, 0.928328f, 0.928364f, 0.928399f, 0.928435f, 0.928470f,
+ 0.928506f, 0.928542f, 0.928577f, 0.928613f, 0.928648f, 0.928684f, 0.928720f, 0.928755f,
+ 0.928791f, 0.928826f, 0.928862f, 0.928897f, 0.928933f, 0.928968f, 0.929004f, 0.929039f,
+ 0.929075f, 0.929110f, 0.929146f, 0.929181f, 0.929216f, 0.929252f, 0.929287f, 0.929323f,
+ 0.929358f, 0.929393f, 0.929429f, 0.929464f, 0.929500f, 0.929535f, 0.929570f, 0.929606f,
+ 0.929641f, 0.929676f, 0.929712f, 0.929747f, 0.929782f, 0.929817f, 0.929853f, 0.929888f,
+ 0.929923f, 0.929958f, 0.929994f, 0.930029f, 0.930064f, 0.930099f, 0.930135f, 0.930170f,
+ 0.930205f, 0.930240f, 0.930275f, 0.930311f, 0.930346f, 0.930381f, 0.930416f, 0.930451f,
+ 0.930486f, 0.930521f, 0.930556f, 0.930592f, 0.930627f, 0.930662f, 0.930697f, 0.930732f,
+ 0.930767f, 0.930802f, 0.930837f, 0.930872f, 0.930907f, 0.930942f, 0.930977f, 0.931012f,
+ 0.931047f, 0.931082f, 0.931117f, 0.931152f, 0.931187f, 0.931222f, 0.931257f, 0.931292f,
+ 0.931327f, 0.931362f, 0.931397f, 0.931431f, 0.931466f, 0.931501f, 0.931536f, 0.931571f,
+ 0.931606f, 0.931641f, 0.931675f, 0.931710f, 0.931745f, 0.931780f, 0.931815f, 0.931849f,
+ 0.931884f, 0.931919f, 0.931954f, 0.931989f, 0.932023f, 0.932058f, 0.932093f, 0.932128f,
+ 0.932162f, 0.932197f, 0.932232f, 0.932266f, 0.932301f, 0.932336f, 0.932370f, 0.932405f,
+ 0.932440f, 0.932474f, 0.932509f, 0.932544f, 0.932578f, 0.932613f, 0.932647f, 0.932682f,
+ 0.932716f, 0.932751f, 0.932786f, 0.932820f, 0.932855f, 0.932889f, 0.932924f, 0.932958f,
+ 0.932993f, 0.933027f, 0.933062f, 0.933096f, 0.933131f, 0.933165f, 0.933200f, 0.933234f,
+ 0.933269f, 0.933303f, 0.933337f, 0.933372f, 0.933406f, 0.933441f, 0.933475f, 0.933509f,
+ 0.933544f, 0.933578f, 0.933612f, 0.933647f, 0.933681f, 0.933716f, 0.933750f, 0.933784f,
+ 0.933818f, 0.933853f, 0.933887f, 0.933921f, 0.933956f, 0.933990f, 0.934024f, 0.934058f,
+ 0.934093f, 0.934127f, 0.934161f, 0.934195f, 0.934229f, 0.934264f, 0.934298f, 0.934332f,
+ 0.934366f, 0.934400f, 0.934434f, 0.934469f, 0.934503f, 0.934537f, 0.934571f, 0.934605f,
+ 0.934639f, 0.934673f, 0.934707f, 0.934741f, 0.934775f, 0.934810f, 0.934844f, 0.934878f,
+ 0.934912f, 0.934946f, 0.934980f, 0.935014f, 0.935048f, 0.935082f, 0.935116f, 0.935150f,
+ 0.935184f, 0.935217f, 0.935251f, 0.935285f, 0.935319f, 0.935353f, 0.935387f, 0.935421f,
+ 0.935455f, 0.935489f, 0.935523f, 0.935556f, 0.935590f, 0.935624f, 0.935658f, 0.935692f,
+ 0.935726f, 0.935759f, 0.935793f, 0.935827f, 0.935861f, 0.935895f, 0.935928f, 0.935962f,
+ 0.935996f, 0.936030f, 0.936063f, 0.936097f, 0.936131f, 0.936165f, 0.936198f, 0.936232f,
+ 0.936266f, 0.936299f, 0.936333f, 0.936367f, 0.936400f, 0.936434f, 0.936468f, 0.936501f,
+ 0.936535f, 0.936568f, 0.936602f, 0.936636f, 0.936669f, 0.936703f, 0.936736f, 0.936770f,
+ 0.936803f, 0.936837f, 0.936871f, 0.936904f, 0.936938f, 0.936971f, 0.937005f, 0.937038f,
+ 0.937072f, 0.937105f, 0.937138f, 0.937172f, 0.937205f, 0.937239f, 0.937272f, 0.937306f,
+ 0.937339f, 0.937372f, 0.937406f, 0.937439f, 0.937473f, 0.937506f, 0.937539f, 0.937573f,
+ 0.937606f, 0.937639f, 0.937673f, 0.937706f, 0.937739f, 0.937773f, 0.937806f, 0.937839f,
+ 0.937872f, 0.937906f, 0.937939f, 0.937972f, 0.938005f, 0.938039f, 0.938072f, 0.938105f,
+ 0.938138f, 0.938171f, 0.938205f, 0.938238f, 0.938271f, 0.938304f, 0.938337f, 0.938370f,
+ 0.938404f, 0.938437f, 0.938470f, 0.938503f, 0.938536f, 0.938569f, 0.938602f, 0.938635f,
+ 0.938668f, 0.938701f, 0.938734f, 0.938767f, 0.938800f, 0.938833f, 0.938866f, 0.938900f,
+ 0.938932f, 0.938965f, 0.938998f, 0.939031f, 0.939064f, 0.939097f, 0.939130f, 0.939163f,
+ 0.939196f, 0.939229f, 0.939262f, 0.939295f, 0.939328f, 0.939361f, 0.939394f, 0.939426f,
+ 0.939459f, 0.939492f, 0.939525f, 0.939558f, 0.939591f, 0.939623f, 0.939656f, 0.939689f,
+ 0.939722f, 0.939755f, 0.939787f, 0.939820f, 0.939853f, 0.939886f, 0.939918f, 0.939951f,
+ 0.939984f, 0.940016f, 0.940049f, 0.940082f, 0.940115f, 0.940147f, 0.940180f, 0.940213f,
+ 0.940245f, 0.940278f, 0.940310f, 0.940343f, 0.940376f, 0.940408f, 0.940441f, 0.940473f,
+ 0.940506f, 0.940539f, 0.940571f, 0.940604f, 0.940636f, 0.940669f, 0.940701f, 0.940734f,
+ 0.940766f, 0.940799f, 0.940831f, 0.940864f, 0.940896f, 0.940929f, 0.940961f, 0.940994f,
+ 0.941026f, 0.941059f, 0.941091f, 0.941123f, 0.941156f, 0.941188f, 0.941221f, 0.941253f,
+ 0.941285f, 0.941318f, 0.941350f, 0.941382f, 0.941415f, 0.941447f, 0.941479f, 0.941512f,
+ 0.941544f, 0.941576f, 0.941609f, 0.941641f, 0.941673f, 0.941705f, 0.941738f, 0.941770f,
+ 0.941802f, 0.941834f, 0.941867f, 0.941899f, 0.941931f, 0.941963f, 0.941995f, 0.942028f,
+ 0.942060f, 0.942092f, 0.942124f, 0.942156f, 0.942188f, 0.942220f, 0.942253f, 0.942285f,
+ 0.942317f, 0.942349f, 0.942381f, 0.942413f, 0.942445f, 0.942477f, 0.942509f, 0.942541f,
+ 0.942573f, 0.942605f, 0.942637f, 0.942669f, 0.942701f, 0.942733f, 0.942765f, 0.942797f,
+ 0.942829f, 0.942861f, 0.942893f, 0.942925f, 0.942957f, 0.942989f, 0.943021f, 0.943053f,
+ 0.943084f, 0.943116f, 0.943148f, 0.943180f, 0.943212f, 0.943244f, 0.943276f, 0.943307f,
+ 0.943339f, 0.943371f, 0.943403f, 0.943435f, 0.943466f, 0.943498f, 0.943530f, 0.943562f,
+ 0.943593f, 0.943625f, 0.943657f, 0.943689f, 0.943720f, 0.943752f, 0.943784f, 0.943815f,
+ 0.943847f, 0.943879f, 0.943910f, 0.943942f, 0.943974f, 0.944005f, 0.944037f, 0.944069f,
+ 0.944100f, 0.944132f, 0.944163f, 0.944195f, 0.944227f, 0.944258f, 0.944290f, 0.944321f,
+ 0.944353f, 0.944384f, 0.944416f, 0.944447f, 0.944479f, 0.944510f, 0.944542f, 0.944573f,
+ 0.944605f, 0.944636f, 0.944668f, 0.944699f, 0.944731f, 0.944762f, 0.944793f, 0.944825f,
+ 0.944856f, 0.944888f, 0.944919f, 0.944950f, 0.944982f, 0.945013f, 0.945045f, 0.945076f,
+ 0.945107f, 0.945139f, 0.945170f, 0.945201f, 0.945232f, 0.945264f, 0.945295f, 0.945326f,
+ 0.945358f, 0.945389f, 0.945420f, 0.945451f, 0.945482f, 0.945514f, 0.945545f, 0.945576f,
+ 0.945607f, 0.945639f, 0.945670f, 0.945701f, 0.945732f, 0.945763f, 0.945794f, 0.945825f,
+ 0.945857f, 0.945888f, 0.945919f, 0.945950f, 0.945981f, 0.946012f, 0.946043f, 0.946074f,
+ 0.946105f, 0.946136f, 0.946167f, 0.946198f, 0.946229f, 0.946260f, 0.946291f, 0.946322f,
+ 0.946353f, 0.946384f, 0.946415f, 0.946446f, 0.946477f, 0.946508f, 0.946539f, 0.946570f,
+ 0.946601f, 0.946632f, 0.946663f, 0.946694f, 0.946724f, 0.946755f, 0.946786f, 0.946817f,
+ 0.946848f, 0.946879f, 0.946910f, 0.946940f, 0.946971f, 0.947002f, 0.947033f, 0.947064f,
+ 0.947094f, 0.947125f, 0.947156f, 0.947187f, 0.947217f, 0.947248f, 0.947279f, 0.947310f,
+ 0.947340f, 0.947371f, 0.947402f, 0.947432f, 0.947463f, 0.947494f, 0.947524f, 0.947555f,
+ 0.947586f, 0.947616f, 0.947647f, 0.947677f, 0.947708f, 0.947739f, 0.947769f, 0.947800f,
+ 0.947830f, 0.947861f, 0.947891f, 0.947922f, 0.947953f, 0.947983f, 0.948014f, 0.948044f,
+ 0.948075f, 0.948105f, 0.948136f, 0.948166f, 0.948196f, 0.948227f, 0.948257f, 0.948288f,
+ 0.948318f, 0.948349f, 0.948379f, 0.948409f, 0.948440f, 0.948470f, 0.948501f, 0.948531f,
+ 0.948561f, 0.948592f, 0.948622f, 0.948652f, 0.948683f, 0.948713f, 0.948743f, 0.948774f,
+ 0.948804f, 0.948834f, 0.948864f, 0.948895f, 0.948925f, 0.948955f, 0.948985f, 0.949016f,
+ 0.949046f, 0.949076f, 0.949106f, 0.949136f, 0.949167f, 0.949197f, 0.949227f, 0.949257f,
+ 0.949287f, 0.949317f, 0.949348f, 0.949378f, 0.949408f, 0.949438f, 0.949468f, 0.949498f,
+ 0.949528f, 0.949558f, 0.949588f, 0.949618f, 0.949648f, 0.949678f, 0.949708f, 0.949739f,
+ 0.949768f, 0.949798f, 0.949829f, 0.949858f, 0.949888f, 0.949918f, 0.949948f, 0.949978f,
+ 0.950008f, 0.950038f, 0.950068f, 0.950098f, 0.950128f, 0.950158f, 0.950188f, 0.950218f,
+ 0.950247f, 0.950277f, 0.950307f, 0.950337f, 0.950367f, 0.950397f, 0.950426f, 0.950456f,
+ 0.950486f, 0.950516f, 0.950546f, 0.950575f, 0.950605f, 0.950635f, 0.950665f, 0.950694f,
+ 0.950724f, 0.950754f, 0.950784f, 0.950813f, 0.950843f, 0.950873f, 0.950902f, 0.950932f,
+ 0.950962f, 0.950991f, 0.951021f, 0.951051f, 0.951080f, 0.951110f, 0.951139f, 0.951169f,
+ 0.951199f, 0.951228f, 0.951258f, 0.951287f, 0.951317f, 0.951346f, 0.951376f, 0.951406f,
+ 0.951435f, 0.951465f, 0.951494f, 0.951524f, 0.951553f, 0.951582f, 0.951612f, 0.951641f,
+ 0.951671f, 0.951700f, 0.951730f, 0.951759f, 0.951789f, 0.951818f, 0.951847f, 0.951877f,
+ 0.951906f, 0.951936f, 0.951965f, 0.951994f, 0.952024f, 0.952053f, 0.952082f, 0.952112f,
+ 0.952141f, 0.952170f, 0.952199f, 0.952229f, 0.952258f, 0.952287f, 0.952317f, 0.952346f,
+ 0.952375f, 0.952404f, 0.952433f, 0.952463f, 0.952492f, 0.952521f, 0.952550f, 0.952579f,
+ 0.952609f, 0.952638f, 0.952667f, 0.952696f, 0.952725f, 0.952754f, 0.952783f, 0.952813f,
+ 0.952842f, 0.952871f, 0.952900f, 0.952929f, 0.952958f, 0.952987f, 0.953016f, 0.953045f,
+ 0.953074f, 0.953103f, 0.953132f, 0.953161f, 0.953190f, 0.953219f, 0.953248f, 0.953277f,
+ 0.953306f, 0.953335f, 0.953364f, 0.953393f, 0.953422f, 0.953451f, 0.953480f, 0.953508f,
+ 0.953537f, 0.953566f, 0.953595f, 0.953624f, 0.953653f, 0.953682f, 0.953711f, 0.953739f,
+ 0.953768f, 0.953797f, 0.953826f, 0.953855f, 0.953883f, 0.953912f, 0.953941f, 0.953970f,
+ 0.953998f, 0.954027f, 0.954056f, 0.954085f, 0.954113f, 0.954142f, 0.954171f, 0.954199f,
+ 0.954228f, 0.954257f, 0.954285f, 0.954314f, 0.954343f, 0.954371f, 0.954400f, 0.954429f,
+ 0.954457f, 0.954486f, 0.954514f, 0.954543f, 0.954572f, 0.954600f, 0.954629f, 0.954657f,
+ 0.954686f, 0.954714f, 0.954743f, 0.954771f, 0.954800f, 0.954828f, 0.954857f, 0.954885f,
+ 0.954914f, 0.954942f, 0.954971f, 0.954999f, 0.955028f, 0.955056f, 0.955084f, 0.955113f,
+ 0.955141f, 0.955170f, 0.955198f, 0.955226f, 0.955255f, 0.955283f, 0.955311f, 0.955340f,
+ 0.955368f, 0.955396f, 0.955425f, 0.955453f, 0.955481f, 0.955510f, 0.955538f, 0.955566f,
+ 0.955594f, 0.955623f, 0.955651f, 0.955679f, 0.955707f, 0.955736f, 0.955764f, 0.955792f,
+ 0.955820f, 0.955848f, 0.955876f, 0.955905f, 0.955933f, 0.955961f, 0.955989f, 0.956017f,
+ 0.956045f, 0.956073f, 0.956101f, 0.956130f, 0.956158f, 0.956186f, 0.956214f, 0.956242f,
+ 0.956270f, 0.956298f, 0.956326f, 0.956354f, 0.956382f, 0.956410f, 0.956438f, 0.956466f,
+ 0.956494f, 0.956522f, 0.956550f, 0.956578f, 0.956606f, 0.956634f, 0.956662f, 0.956689f,
+ 0.956717f, 0.956745f, 0.956773f, 0.956801f, 0.956829f, 0.956857f, 0.956885f, 0.956913f,
+ 0.956940f, 0.956968f, 0.956996f, 0.957024f, 0.957052f, 0.957079f, 0.957107f, 0.957135f,
+ 0.957163f, 0.957190f, 0.957218f, 0.957246f, 0.957274f, 0.957301f, 0.957329f, 0.957357f,
+ 0.957385f, 0.957412f, 0.957440f, 0.957468f, 0.957495f, 0.957523f, 0.957550f, 0.957578f,
+ 0.957606f, 0.957633f, 0.957661f, 0.957689f, 0.957716f, 0.957744f, 0.957771f, 0.957799f,
+ 0.957826f, 0.957854f, 0.957882f, 0.957909f, 0.957937f, 0.957964f, 0.957992f, 0.958019f,
+ 0.958046f, 0.958074f, 0.958101f, 0.958129f, 0.958156f, 0.958184f, 0.958211f, 0.958239f,
+ 0.958266f, 0.958293f, 0.958321f, 0.958348f, 0.958376f, 0.958403f, 0.958430f, 0.958458f,
+ 0.958485f, 0.958512f, 0.958540f, 0.958567f, 0.958594f, 0.958622f, 0.958649f, 0.958676f,
+ 0.958703f, 0.958731f, 0.958758f, 0.958785f, 0.958812f, 0.958840f, 0.958867f, 0.958894f,
+ 0.958921f, 0.958949f, 0.958976f, 0.959003f, 0.959030f, 0.959057f, 0.959084f, 0.959112f,
+ 0.959139f, 0.959166f, 0.959193f, 0.959220f, 0.959247f, 0.959274f, 0.959301f, 0.959328f,
+ 0.959355f, 0.959382f, 0.959409f, 0.959436f, 0.959463f, 0.959491f, 0.959518f, 0.959545f,
+ 0.959572f, 0.959598f, 0.959625f, 0.959652f, 0.959679f, 0.959706f, 0.959733f, 0.959760f,
+ 0.959787f, 0.959814f, 0.959841f, 0.959868f, 0.959895f, 0.959922f, 0.959948f, 0.959975f,
+ 0.960002f, 0.960029f, 0.960056f, 0.960083f, 0.960109f, 0.960136f, 0.960163f, 0.960190f,
+ 0.960217f, 0.960243f, 0.960270f, 0.960297f, 0.960324f, 0.960350f, 0.960377f, 0.960404f,
+ 0.960431f, 0.960457f, 0.960484f, 0.960511f, 0.960537f, 0.960564f, 0.960591f, 0.960617f,
+ 0.960644f, 0.960670f, 0.960697f, 0.960724f, 0.960750f, 0.960777f, 0.960804f, 0.960830f,
+ 0.960857f, 0.960883f, 0.960910f, 0.960936f, 0.960963f, 0.960989f, 0.961016f, 0.961042f,
+ 0.961069f, 0.961095f, 0.961122f, 0.961148f, 0.961175f, 0.961201f, 0.961228f, 0.961254f,
+ 0.961280f, 0.961307f, 0.961333f, 0.961360f, 0.961386f, 0.961412f, 0.961439f, 0.961465f,
+ 0.961492f, 0.961518f, 0.961544f, 0.961571f, 0.961597f, 0.961623f, 0.961649f, 0.961676f,
+ 0.961702f, 0.961728f, 0.961755f, 0.961781f, 0.961807f, 0.961833f, 0.961860f, 0.961886f,
+ 0.961912f, 0.961938f, 0.961964f, 0.961991f, 0.962017f, 0.962043f, 0.962069f, 0.962095f,
+ 0.962121f, 0.962148f, 0.962174f, 0.962200f, 0.962226f, 0.962252f, 0.962278f, 0.962304f,
+ 0.962330f, 0.962356f, 0.962382f, 0.962408f, 0.962434f, 0.962460f, 0.962486f, 0.962512f,
+ 0.962538f, 0.962564f, 0.962590f, 0.962616f, 0.962642f, 0.962668f, 0.962694f, 0.962720f,
+ 0.962746f, 0.962772f, 0.962798f, 0.962824f, 0.962850f, 0.962876f, 0.962902f, 0.962927f,
+ 0.962953f, 0.962979f, 0.963005f, 0.963031f, 0.963057f, 0.963082f, 0.963108f, 0.963134f,
+ 0.963160f, 0.963186f, 0.963211f, 0.963237f, 0.963263f, 0.963289f, 0.963314f, 0.963340f,
+ 0.963366f, 0.963391f, 0.963417f, 0.963443f, 0.963469f, 0.963494f, 0.963520f, 0.963546f,
+ 0.963571f, 0.963597f, 0.963623f, 0.963648f, 0.963674f, 0.963699f, 0.963725f, 0.963750f,
+ 0.963776f, 0.963802f, 0.963827f, 0.963853f, 0.963878f, 0.963904f, 0.963929f, 0.963955f,
+ 0.963980f, 0.964006f, 0.964031f, 0.964057f, 0.964082f, 0.964108f, 0.964133f, 0.964159f,
+ 0.964184f, 0.964209f, 0.964235f, 0.964260f, 0.964286f, 0.964311f, 0.964336f, 0.964362f,
+ 0.964387f, 0.964413f, 0.964438f, 0.964463f, 0.964489f, 0.964514f, 0.964539f, 0.964565f,
+ 0.964590f, 0.964615f, 0.964640f, 0.964666f, 0.964691f, 0.964716f, 0.964741f, 0.964767f,
+ 0.964792f, 0.964817f, 0.964842f, 0.964867f, 0.964893f, 0.964918f, 0.964943f, 0.964968f,
+ 0.964993f, 0.965018f, 0.965044f, 0.965069f, 0.965094f, 0.965119f, 0.965144f, 0.965169f,
+ 0.965194f, 0.965219f, 0.965244f, 0.965269f, 0.965294f, 0.965319f, 0.965344f, 0.965369f,
+ 0.965394f, 0.965419f, 0.965444f, 0.965469f, 0.965494f, 0.965519f, 0.965544f, 0.965569f,
+ 0.965594f, 0.965619f, 0.965644f, 0.965669f, 0.965694f, 0.965719f, 0.965744f, 0.965769f,
+ 0.965793f, 0.965818f, 0.965843f, 0.965868f, 0.965893f, 0.965918f, 0.965942f, 0.965967f,
+ 0.965992f, 0.966017f, 0.966042f, 0.966066f, 0.966091f, 0.966116f, 0.966141f, 0.966165f,
+ 0.966190f, 0.966215f, 0.966239f, 0.966264f, 0.966289f, 0.966313f, 0.966338f, 0.966363f,
+ 0.966387f, 0.966412f, 0.966437f, 0.966461f, 0.966486f, 0.966511f, 0.966535f, 0.966560f,
+ 0.966584f, 0.966609f, 0.966633f, 0.966658f, 0.966683f, 0.966707f, 0.966732f, 0.966756f,
+ 0.966781f, 0.966805f, 0.966830f, 0.966854f, 0.966879f, 0.966903f, 0.966928f, 0.966952f,
+ 0.966976f, 0.967001f, 0.967025f, 0.967050f, 0.967074f, 0.967099f, 0.967123f, 0.967147f,
+ 0.967172f, 0.967196f, 0.967220f, 0.967245f, 0.967269f, 0.967293f, 0.967318f, 0.967342f,
+ 0.967366f, 0.967391f, 0.967415f, 0.967439f, 0.967463f, 0.967488f, 0.967512f, 0.967536f,
+ 0.967560f, 0.967585f, 0.967609f, 0.967633f, 0.967657f, 0.967681f, 0.967706f, 0.967730f,
+ 0.967754f, 0.967778f, 0.967802f, 0.967826f, 0.967850f, 0.967874f, 0.967899f, 0.967923f,
+ 0.967947f, 0.967971f, 0.967995f, 0.968019f, 0.968043f, 0.968067f, 0.968091f, 0.968115f,
+ 0.968139f, 0.968163f, 0.968187f, 0.968211f, 0.968235f, 0.968259f, 0.968283f, 0.968307f,
+ 0.968331f, 0.968355f, 0.968379f, 0.968403f, 0.968427f, 0.968450f, 0.968474f, 0.968498f,
+ 0.968522f, 0.968546f, 0.968570f, 0.968594f, 0.968617f, 0.968641f, 0.968665f, 0.968689f,
+ 0.968713f, 0.968737f, 0.968760f, 0.968784f, 0.968808f, 0.968832f, 0.968855f, 0.968879f,
+ 0.968903f, 0.968927f, 0.968950f, 0.968974f, 0.968998f, 0.969021f, 0.969045f, 0.969069f,
+ 0.969092f, 0.969116f, 0.969140f, 0.969163f, 0.969187f, 0.969210f, 0.969234f, 0.969258f,
+ 0.969281f, 0.969305f, 0.969328f, 0.969352f, 0.969375f, 0.969399f, 0.969423f, 0.969446f,
+ 0.969470f, 0.969493f, 0.969517f, 0.969540f, 0.969564f, 0.969587f, 0.969611f, 0.969634f,
+ 0.969657f, 0.969681f, 0.969704f, 0.969728f, 0.969751f, 0.969774f, 0.969798f, 0.969821f,
+ 0.969845f, 0.969868f, 0.969891f, 0.969915f, 0.969938f, 0.969961f, 0.969985f, 0.970008f,
+ 0.970031f, 0.970055f, 0.970078f, 0.970101f, 0.970124f, 0.970148f, 0.970171f, 0.970194f,
+ 0.970217f, 0.970241f, 0.970264f, 0.970287f, 0.970310f, 0.970333f, 0.970357f, 0.970380f,
+ 0.970403f, 0.970426f, 0.970449f, 0.970472f, 0.970495f, 0.970518f, 0.970542f, 0.970565f,
+ 0.970588f, 0.970611f, 0.970634f, 0.970657f, 0.970680f, 0.970703f, 0.970726f, 0.970749f,
+ 0.970772f, 0.970795f, 0.970818f, 0.970841f, 0.970864f, 0.970887f, 0.970910f, 0.970933f,
+ 0.970956f, 0.970979f, 0.971002f, 0.971025f, 0.971048f, 0.971071f, 0.971093f, 0.971116f,
+ 0.971139f, 0.971162f, 0.971185f, 0.971208f, 0.971231f, 0.971253f, 0.971276f, 0.971299f,
+ 0.971322f, 0.971345f, 0.971367f, 0.971390f, 0.971413f, 0.971436f, 0.971458f, 0.971481f,
+ 0.971504f, 0.971527f, 0.971549f, 0.971572f, 0.971595f, 0.971617f, 0.971640f, 0.971663f,
+ 0.971685f, 0.971708f, 0.971731f, 0.971753f, 0.971776f, 0.971799f, 0.971821f, 0.971844f,
+ 0.971866f, 0.971889f, 0.971911f, 0.971934f, 0.971957f, 0.971979f, 0.972002f, 0.972024f,
+ 0.972047f, 0.972069f, 0.972092f, 0.972114f, 0.972137f, 0.972159f, 0.972182f, 0.972204f,
+ 0.972227f, 0.972249f, 0.972271f, 0.972294f, 0.972316f, 0.972339f, 0.972361f, 0.972383f,
+ 0.972406f, 0.972428f, 0.972450f, 0.972473f, 0.972495f, 0.972517f, 0.972540f, 0.972562f,
+ 0.972584f, 0.972607f, 0.972629f, 0.972651f, 0.972673f, 0.972696f, 0.972718f, 0.972740f,
+ 0.972762f, 0.972785f, 0.972807f, 0.972829f, 0.972851f, 0.972873f, 0.972896f, 0.972918f,
+ 0.972940f, 0.972962f, 0.972984f, 0.973006f, 0.973028f, 0.973051f, 0.973073f, 0.973095f,
+ 0.973117f, 0.973139f, 0.973161f, 0.973183f, 0.973205f, 0.973227f, 0.973249f, 0.973271f,
+ 0.973293f, 0.973315f, 0.973337f, 0.973359f, 0.973381f, 0.973403f, 0.973425f, 0.973447f,
+ 0.973469f, 0.973491f, 0.973513f, 0.973535f, 0.973557f, 0.973579f, 0.973601f, 0.973622f,
+ 0.973644f, 0.973666f, 0.973688f, 0.973710f, 0.973732f, 0.973753f, 0.973775f, 0.973797f,
+ 0.973819f, 0.973841f, 0.973862f, 0.973884f, 0.973906f, 0.973928f, 0.973949f, 0.973971f,
+ 0.973993f, 0.974015f, 0.974036f, 0.974058f, 0.974080f, 0.974101f, 0.974123f, 0.974145f,
+ 0.974166f, 0.974188f, 0.974210f, 0.974231f, 0.974253f, 0.974275f, 0.974296f, 0.974318f,
+ 0.974339f, 0.974361f, 0.974383f, 0.974404f, 0.974426f, 0.974447f, 0.974469f, 0.974490f,
+ 0.974512f, 0.974533f, 0.974555f, 0.974576f, 0.974598f, 0.974619f, 0.974641f, 0.974662f,
+ 0.974684f, 0.974705f, 0.974726f, 0.974748f, 0.974769f, 0.974791f, 0.974812f, 0.974833f,
+ 0.974855f, 0.974876f, 0.974897f, 0.974919f, 0.974940f, 0.974961f, 0.974983f, 0.975004f,
+ 0.975025f, 0.975047f, 0.975068f, 0.975089f, 0.975110f, 0.975132f, 0.975153f, 0.975174f,
+ 0.975195f, 0.975217f, 0.975238f, 0.975259f, 0.975280f, 0.975301f, 0.975323f, 0.975344f,
+ 0.975365f, 0.975386f, 0.975407f, 0.975428f, 0.975449f, 0.975471f, 0.975492f, 0.975513f,
+ 0.975534f, 0.975555f, 0.975576f, 0.975597f, 0.975618f, 0.975639f, 0.975660f, 0.975681f,
+ 0.975702f, 0.975723f, 0.975744f, 0.975765f, 0.975786f, 0.975807f, 0.975828f, 0.975849f,
+ 0.975870f, 0.975891f, 0.975912f, 0.975933f, 0.975954f, 0.975974f, 0.975995f, 0.976016f,
+ 0.976037f, 0.976058f, 0.976079f, 0.976100f, 0.976120f, 0.976141f, 0.976162f, 0.976183f,
+ 0.976204f, 0.976224f, 0.976245f, 0.976266f, 0.976287f, 0.976308f, 0.976328f, 0.976349f,
+ 0.976370f, 0.976390f, 0.976411f, 0.976432f, 0.976453f, 0.976473f, 0.976494f, 0.976515f,
+ 0.976535f, 0.976556f, 0.976576f, 0.976597f, 0.976618f, 0.976638f, 0.976659f, 0.976680f,
+ 0.976700f, 0.976721f, 0.976741f, 0.976762f, 0.976782f, 0.976803f, 0.976823f, 0.976844f,
+ 0.976864f, 0.976885f, 0.976905f, 0.976926f, 0.976946f, 0.976967f, 0.976987f, 0.977008f,
+ 0.977028f, 0.977049f, 0.977069f, 0.977089f, 0.977110f, 0.977130f, 0.977151f, 0.977171f,
+ 0.977191f, 0.977212f, 0.977232f, 0.977252f, 0.977273f, 0.977293f, 0.977313f, 0.977334f,
+ 0.977354f, 0.977374f, 0.977394f, 0.977415f, 0.977435f, 0.977455f, 0.977475f, 0.977496f,
+ 0.977516f, 0.977536f, 0.977556f, 0.977577f, 0.977597f, 0.977617f, 0.977637f, 0.977657f,
+ 0.977677f, 0.977697f, 0.977718f, 0.977738f, 0.977758f, 0.977778f, 0.977798f, 0.977818f,
+ 0.977838f, 0.977858f, 0.977878f, 0.977898f, 0.977918f, 0.977938f, 0.977959f, 0.977979f,
+ 0.977998f, 0.978019f, 0.978038f, 0.978058f, 0.978078f, 0.978098f, 0.978118f, 0.978138f,
+ 0.978158f, 0.978178f, 0.978198f, 0.978218f, 0.978238f, 0.978258f, 0.978278f, 0.978298f,
+ 0.978317f, 0.978337f, 0.978357f, 0.978377f, 0.978397f, 0.978417f, 0.978436f, 0.978456f,
+ 0.978476f, 0.978496f, 0.978516f, 0.978535f, 0.978555f, 0.978575f, 0.978594f, 0.978614f,
+ 0.978634f, 0.978654f, 0.978673f, 0.978693f, 0.978713f, 0.978732f, 0.978752f, 0.978772f,
+ 0.978791f, 0.978811f, 0.978831f, 0.978850f, 0.978870f, 0.978889f, 0.978909f, 0.978929f,
+ 0.978948f, 0.978968f, 0.978987f, 0.979007f, 0.979026f, 0.979046f, 0.979065f, 0.979085f,
+ 0.979104f, 0.979124f, 0.979143f, 0.979163f, 0.979182f, 0.979202f, 0.979221f, 0.979241f,
+ 0.979260f, 0.979280f, 0.979299f, 0.979318f, 0.979338f, 0.979357f, 0.979376f, 0.979396f,
+ 0.979415f, 0.979435f, 0.979454f, 0.979473f, 0.979493f, 0.979512f, 0.979531f, 0.979550f,
+ 0.979570f, 0.979589f, 0.979608f, 0.979628f, 0.979647f, 0.979666f, 0.979685f, 0.979704f,
+ 0.979724f, 0.979743f, 0.979762f, 0.979781f, 0.979800f, 0.979820f, 0.979839f, 0.979858f,
+ 0.979877f, 0.979896f, 0.979915f, 0.979934f, 0.979954f, 0.979973f, 0.979992f, 0.980011f,
+ 0.980030f, 0.980049f, 0.980068f, 0.980087f, 0.980106f, 0.980125f, 0.980144f, 0.980163f,
+ 0.980182f, 0.980201f, 0.980220f, 0.980239f, 0.980258f, 0.980277f, 0.980296f, 0.980315f,
+ 0.980334f, 0.980353f, 0.980372f, 0.980390f, 0.980409f, 0.980428f, 0.980447f, 0.980466f,
+ 0.980485f, 0.980504f, 0.980523f, 0.980541f, 0.980560f, 0.980579f, 0.980598f, 0.980617f,
+ 0.980635f, 0.980654f, 0.980673f, 0.980692f, 0.980710f, 0.980729f, 0.980748f, 0.980767f,
+ 0.980785f, 0.980804f, 0.980823f, 0.980841f, 0.980860f, 0.980879f, 0.980897f, 0.980916f,
+ 0.980935f, 0.980953f, 0.980972f, 0.980990f, 0.981009f, 0.981028f, 0.981046f, 0.981065f,
+ 0.981083f, 0.981102f, 0.981120f, 0.981139f, 0.981158f, 0.981176f, 0.981195f, 0.981213f,
+ 0.981232f, 0.981250f, 0.981269f, 0.981287f, 0.981305f, 0.981324f, 0.981342f, 0.981361f,
+ 0.981379f, 0.981398f, 0.981416f, 0.981434f, 0.981453f, 0.981471f, 0.981490f, 0.981508f,
+ 0.981526f, 0.981545f, 0.981563f, 0.981581f, 0.981600f, 0.981618f, 0.981636f, 0.981654f,
+ 0.981673f, 0.981691f, 0.981709f, 0.981727f, 0.981746f, 0.981764f, 0.981782f, 0.981800f,
+ 0.981819f, 0.981837f, 0.981855f, 0.981873f, 0.981891f, 0.981909f, 0.981928f, 0.981946f,
+ 0.981964f, 0.981982f, 0.982000f, 0.982018f, 0.982036f, 0.982054f, 0.982072f, 0.982091f,
+ 0.982109f, 0.982127f, 0.982145f, 0.982163f, 0.982181f, 0.982199f, 0.982217f, 0.982235f,
+ 0.982253f, 0.982271f, 0.982289f, 0.982307f, 0.982325f, 0.982343f, 0.982360f, 0.982378f,
+ 0.982396f, 0.982414f, 0.982432f, 0.982450f, 0.982468f, 0.982486f, 0.982504f, 0.982521f,
+ 0.982539f, 0.982557f, 0.982575f, 0.982593f, 0.982611f, 0.982628f, 0.982646f, 0.982664f,
+ 0.982682f, 0.982699f, 0.982717f, 0.982735f, 0.982753f, 0.982770f, 0.982788f, 0.982806f,
+ 0.982824f, 0.982841f, 0.982859f, 0.982877f, 0.982894f, 0.982912f, 0.982930f, 0.982947f,
+ 0.982965f, 0.982982f, 0.983000f, 0.983018f, 0.983035f, 0.983053f, 0.983070f, 0.983088f,
+ 0.983105f, 0.983123f, 0.983141f, 0.983158f, 0.983176f, 0.983193f, 0.983211f, 0.983228f,
+ 0.983246f, 0.983263f, 0.983281f, 0.983298f, 0.983315f, 0.983333f, 0.983350f, 0.983368f,
+ 0.983385f, 0.983402f, 0.983420f, 0.983437f, 0.983455f, 0.983472f, 0.983489f, 0.983507f,
+ 0.983524f, 0.983541f, 0.983559f, 0.983576f, 0.983593f, 0.983611f, 0.983628f, 0.983645f,
+ 0.983662f, 0.983680f, 0.983697f, 0.983714f, 0.983731f, 0.983749f, 0.983766f, 0.983783f,
+ 0.983800f, 0.983817f, 0.983835f, 0.983852f, 0.983869f, 0.983886f, 0.983903f, 0.983920f,
+ 0.983937f, 0.983955f, 0.983972f, 0.983989f, 0.984006f, 0.984023f, 0.984040f, 0.984057f,
+ 0.984074f, 0.984091f, 0.984108f, 0.984125f, 0.984142f, 0.984159f, 0.984176f, 0.984193f,
+ 0.984210f, 0.984227f, 0.984244f, 0.984261f, 0.984278f, 0.984295f, 0.984312f, 0.984329f,
+ 0.984346f, 0.984362f, 0.984379f, 0.984396f, 0.984413f, 0.984430f, 0.984447f, 0.984464f,
+ 0.984480f, 0.984497f, 0.984514f, 0.984531f, 0.984548f, 0.984564f, 0.984581f, 0.984598f,
+ 0.984615f, 0.984632f, 0.984648f, 0.984665f, 0.984682f, 0.984698f, 0.984715f, 0.984732f,
+ 0.984748f, 0.984765f, 0.984782f, 0.984798f, 0.984815f, 0.984832f, 0.984848f, 0.984865f,
+ 0.984882f, 0.984898f, 0.984915f, 0.984931f, 0.984948f, 0.984965f, 0.984981f, 0.984998f,
+ 0.985014f, 0.985031f, 0.985047f, 0.985064f, 0.985080f, 0.985097f, 0.985113f, 0.985130f,
+ 0.985146f, 0.985163f, 0.985179f, 0.985196f, 0.985212f, 0.985228f, 0.985245f, 0.985261f,
+ 0.985278f, 0.985294f, 0.985310f, 0.985327f, 0.985343f, 0.985359f, 0.985376f, 0.985392f,
+ 0.985408f, 0.985425f, 0.985441f, 0.985457f, 0.985474f, 0.985490f, 0.985506f, 0.985523f,
+ 0.985539f, 0.985555f, 0.985571f, 0.985587f, 0.985604f, 0.985620f, 0.985636f, 0.985652f,
+ 0.985668f, 0.985685f, 0.985701f, 0.985717f, 0.985733f, 0.985749f, 0.985765f, 0.985781f,
+ 0.985798f, 0.985814f, 0.985830f, 0.985846f, 0.985862f, 0.985878f, 0.985894f, 0.985910f,
+ 0.985926f, 0.985942f, 0.985958f, 0.985974f, 0.985990f, 0.986006f, 0.986022f, 0.986038f,
+ 0.986054f, 0.986070f, 0.986086f, 0.986102f, 0.986118f, 0.986134f, 0.986150f, 0.986165f,
+ 0.986181f, 0.986197f, 0.986213f, 0.986229f, 0.986245f, 0.986261f, 0.986276f, 0.986292f,
+ 0.986308f, 0.986324f, 0.986340f, 0.986355f, 0.986371f, 0.986387f, 0.986403f, 0.986419f,
+ 0.986434f, 0.986450f, 0.986466f, 0.986481f, 0.986497f, 0.986513f, 0.986529f, 0.986544f,
+ 0.986560f, 0.986576f, 0.986591f, 0.986607f, 0.986623f, 0.986638f, 0.986654f, 0.986669f,
+ 0.986685f, 0.986701f, 0.986716f, 0.986732f, 0.986747f, 0.986763f, 0.986778f, 0.986794f,
+ 0.986809f, 0.986825f, 0.986840f, 0.986856f, 0.986871f, 0.986887f, 0.986902f, 0.986918f,
+ 0.986933f, 0.986949f, 0.986964f, 0.986980f, 0.986995f, 0.987010f, 0.987026f, 0.987041f,
+ 0.987057f, 0.987072f, 0.987087f, 0.987103f, 0.987118f, 0.987133f, 0.987149f, 0.987164f,
+ 0.987179f, 0.987195f, 0.987210f, 0.987225f, 0.987240f, 0.987256f, 0.987271f, 0.987286f,
+ 0.987301f, 0.987317f, 0.987332f, 0.987347f, 0.987362f, 0.987377f, 0.987393f, 0.987408f,
+ 0.987423f, 0.987438f, 0.987453f, 0.987468f, 0.987484f, 0.987499f, 0.987514f, 0.987529f,
+ 0.987544f, 0.987559f, 0.987574f, 0.987589f, 0.987604f, 0.987619f, 0.987634f, 0.987649f,
+ 0.987664f, 0.987679f, 0.987694f, 0.987709f, 0.987724f, 0.987739f, 0.987754f, 0.987769f,
+ 0.987784f, 0.987799f, 0.987814f, 0.987829f, 0.987844f, 0.987859f, 0.987874f, 0.987889f,
+ 0.987903f, 0.987918f, 0.987933f, 0.987948f, 0.987963f, 0.987978f, 0.987992f, 0.988007f,
+ 0.988022f, 0.988037f, 0.988052f, 0.988066f, 0.988081f, 0.988096f, 0.988111f, 0.988125f,
+ 0.988140f, 0.988155f, 0.988169f, 0.988184f, 0.988199f, 0.988214f, 0.988228f, 0.988243f,
+ 0.988258f, 0.988272f, 0.988287f, 0.988301f, 0.988316f, 0.988331f, 0.988345f, 0.988360f,
+ 0.988374f, 0.988389f, 0.988404f, 0.988418f, 0.988433f, 0.988447f, 0.988462f, 0.988476f,
+ 0.988491f, 0.988505f, 0.988520f, 0.988534f, 0.988549f, 0.988563f, 0.988578f, 0.988592f,
+ 0.988607f, 0.988621f, 0.988635f, 0.988650f, 0.988664f, 0.988679f, 0.988693f, 0.988707f,
+ 0.988722f, 0.988736f, 0.988750f, 0.988765f, 0.988779f, 0.988793f, 0.988808f, 0.988822f,
+ 0.988836f, 0.988851f, 0.988865f, 0.988879f, 0.988893f, 0.988908f, 0.988922f, 0.988936f,
+ 0.988950f, 0.988964f, 0.988979f, 0.988993f, 0.989007f, 0.989021f, 0.989035f, 0.989050f,
+ 0.989064f, 0.989078f, 0.989092f, 0.989106f, 0.989120f, 0.989134f, 0.989148f, 0.989162f,
+ 0.989177f, 0.989191f, 0.989205f, 0.989219f, 0.989233f, 0.989247f, 0.989261f, 0.989275f,
+ 0.989289f, 0.989303f, 0.989317f, 0.989331f, 0.989345f, 0.989359f, 0.989373f, 0.989386f,
+ 0.989400f, 0.989414f, 0.989428f, 0.989442f, 0.989456f, 0.989470f, 0.989484f, 0.989498f,
+ 0.989511f, 0.989525f, 0.989539f, 0.989553f, 0.989567f, 0.989581f, 0.989594f, 0.989608f,
+ 0.989622f, 0.989636f, 0.989650f, 0.989663f, 0.989677f, 0.989691f, 0.989704f, 0.989718f,
+ 0.989732f, 0.989746f, 0.989759f, 0.989773f, 0.989787f, 0.989800f, 0.989814f, 0.989828f,
+ 0.989841f, 0.989855f, 0.989869f, 0.989882f, 0.989896f, 0.989909f, 0.989923f, 0.989936f,
+ 0.989950f, 0.989964f, 0.989977f, 0.989991f, 0.990004f, 0.990018f, 0.990031f, 0.990045f,
+ 0.990058f, 0.990072f, 0.990085f, 0.990099f, 0.990112f, 0.990126f, 0.990139f, 0.990152f,
+ 0.990166f, 0.990179f, 0.990193f, 0.990206f, 0.990219f, 0.990233f, 0.990246f, 0.990259f,
+ 0.990273f, 0.990286f, 0.990299f, 0.990313f, 0.990326f, 0.990339f, 0.990353f, 0.990366f,
+ 0.990379f, 0.990393f, 0.990406f, 0.990419f, 0.990432f, 0.990445f, 0.990459f, 0.990472f,
+ 0.990485f, 0.990498f, 0.990511f, 0.990525f, 0.990538f, 0.990551f, 0.990564f, 0.990577f,
+ 0.990590f, 0.990603f, 0.990617f, 0.990630f, 0.990643f, 0.990656f, 0.990669f, 0.990682f,
+ 0.990695f, 0.990708f, 0.990721f, 0.990734f, 0.990747f, 0.990760f, 0.990773f, 0.990786f,
+ 0.990799f, 0.990812f, 0.990825f, 0.990838f, 0.990851f, 0.990864f, 0.990877f, 0.990890f,
+ 0.990903f, 0.990916f, 0.990928f, 0.990941f, 0.990954f, 0.990967f, 0.990980f, 0.990993f,
+ 0.991006f, 0.991018f, 0.991031f, 0.991044f, 0.991057f, 0.991070f, 0.991082f, 0.991095f,
+ 0.991108f, 0.991121f, 0.991133f, 0.991146f, 0.991159f, 0.991172f, 0.991184f, 0.991197f,
+ 0.991210f, 0.991222f, 0.991235f, 0.991248f, 0.991260f, 0.991273f, 0.991286f, 0.991298f,
+ 0.991311f, 0.991323f, 0.991336f, 0.991349f, 0.991361f, 0.991374f, 0.991386f, 0.991399f,
+ 0.991411f, 0.991424f, 0.991437f, 0.991449f, 0.991462f, 0.991474f, 0.991487f, 0.991499f,
+ 0.991511f, 0.991524f, 0.991536f, 0.991549f, 0.991561f, 0.991574f, 0.991586f, 0.991598f,
+ 0.991611f, 0.991623f, 0.991636f, 0.991648f, 0.991660f, 0.991673f, 0.991685f, 0.991697f,
+ 0.991710f, 0.991722f, 0.991734f, 0.991747f, 0.991759f, 0.991771f, 0.991783f, 0.991796f,
+ 0.991808f, 0.991820f, 0.991832f, 0.991845f, 0.991857f, 0.991869f, 0.991881f, 0.991894f,
+ 0.991906f, 0.991918f, 0.991930f, 0.991942f, 0.991954f, 0.991966f, 0.991979f, 0.991991f,
+ 0.992003f, 0.992015f, 0.992027f, 0.992039f, 0.992051f, 0.992063f, 0.992075f, 0.992087f,
+ 0.992099f, 0.992111f, 0.992123f, 0.992135f, 0.992147f, 0.992159f, 0.992171f, 0.992183f,
+ 0.992195f, 0.992207f, 0.992219f, 0.992231f, 0.992243f, 0.992255f, 0.992267f, 0.992279f,
+ 0.992291f, 0.992302f, 0.992314f, 0.992326f, 0.992338f, 0.992350f, 0.992362f, 0.992374f,
+ 0.992385f, 0.992397f, 0.992409f, 0.992421f, 0.992433f, 0.992444f, 0.992456f, 0.992468f,
+ 0.992480f, 0.992491f, 0.992503f, 0.992515f, 0.992526f, 0.992538f, 0.992550f, 0.992561f,
+ 0.992573f, 0.992585f, 0.992596f, 0.992608f, 0.992620f, 0.992631f, 0.992643f, 0.992655f,
+ 0.992666f, 0.992678f, 0.992689f, 0.992701f, 0.992712f, 0.992724f, 0.992736f, 0.992747f,
+ 0.992759f, 0.992770f, 0.992782f, 0.992793f, 0.992805f, 0.992816f, 0.992828f, 0.992839f,
+ 0.992850f, 0.992862f, 0.992873f, 0.992885f, 0.992896f, 0.992908f, 0.992919f, 0.992930f,
+ 0.992942f, 0.992953f, 0.992964f, 0.992976f, 0.992987f, 0.992998f, 0.993010f, 0.993021f,
+ 0.993032f, 0.993044f, 0.993055f, 0.993066f, 0.993077f, 0.993089f, 0.993100f, 0.993111f,
+ 0.993122f, 0.993134f, 0.993145f, 0.993156f, 0.993167f, 0.993178f, 0.993190f, 0.993201f,
+ 0.993212f, 0.993223f, 0.993234f, 0.993245f, 0.993257f, 0.993268f, 0.993279f, 0.993290f,
+ 0.993301f, 0.993312f, 0.993323f, 0.993334f, 0.993345f, 0.993356f, 0.993367f, 0.993378f,
+ 0.993389f, 0.993400f, 0.993411f, 0.993422f, 0.993433f, 0.993444f, 0.993455f, 0.993466f,
+ 0.993477f, 0.993488f, 0.993499f, 0.993510f, 0.993521f, 0.993532f, 0.993542f, 0.993553f,
+ 0.993564f, 0.993575f, 0.993586f, 0.993597f, 0.993608f, 0.993618f, 0.993629f, 0.993640f,
+ 0.993651f, 0.993662f, 0.993672f, 0.993683f, 0.993694f, 0.993705f, 0.993715f, 0.993726f,
+ 0.993737f, 0.993747f, 0.993758f, 0.993769f, 0.993779f, 0.993790f, 0.993801f, 0.993811f,
+ 0.993822f, 0.993833f, 0.993843f, 0.993854f, 0.993865f, 0.993875f, 0.993886f, 0.993896f,
+ 0.993907f, 0.993918f, 0.993928f, 0.993939f, 0.993949f, 0.993960f, 0.993970f, 0.993981f,
+ 0.993991f, 0.994002f, 0.994012f, 0.994023f, 0.994033f, 0.994044f, 0.994054f, 0.994064f,
+ 0.994075f, 0.994085f, 0.994096f, 0.994106f, 0.994116f, 0.994127f, 0.994137f, 0.994148f,
+ 0.994158f, 0.994168f, 0.994179f, 0.994189f, 0.994199f, 0.994210f, 0.994220f, 0.994230f,
+ 0.994240f, 0.994251f, 0.994261f, 0.994271f, 0.994281f, 0.994292f, 0.994302f, 0.994312f,
+ 0.994322f, 0.994333f, 0.994343f, 0.994353f, 0.994363f, 0.994373f, 0.994383f, 0.994394f,
+ 0.994404f, 0.994414f, 0.994424f, 0.994434f, 0.994444f, 0.994454f, 0.994464f, 0.994474f,
+ 0.994484f, 0.994494f, 0.994505f, 0.994515f, 0.994525f, 0.994535f, 0.994545f, 0.994555f,
+ 0.994565f, 0.994575f, 0.994585f, 0.994594f, 0.994604f, 0.994614f, 0.994624f, 0.994634f,
+ 0.994644f, 0.994654f, 0.994664f, 0.994674f, 0.994684f, 0.994694f, 0.994703f, 0.994713f,
+ 0.994723f, 0.994733f, 0.994743f, 0.994753f, 0.994762f, 0.994772f, 0.994782f, 0.994792f,
+ 0.994802f, 0.994811f, 0.994821f, 0.994831f, 0.994841f, 0.994850f, 0.994860f, 0.994870f,
+ 0.994879f, 0.994889f, 0.994899f, 0.994908f, 0.994918f, 0.994928f, 0.994937f, 0.994947f,
+ 0.994957f, 0.994966f, 0.994976f, 0.994985f, 0.994995f, 0.995005f, 0.995014f, 0.995024f,
+ 0.995033f, 0.995043f, 0.995052f, 0.995062f, 0.995071f, 0.995081f, 0.995090f, 0.995100f,
+ 0.995109f, 0.995119f, 0.995128f, 0.995138f, 0.995147f, 0.995156f, 0.995166f, 0.995175f,
+ 0.995185f, 0.995194f, 0.995203f, 0.995213f, 0.995222f, 0.995232f, 0.995241f, 0.995250f,
+ 0.995260f, 0.995269f, 0.995278f, 0.995288f, 0.995297f, 0.995306f, 0.995315f, 0.995325f,
+ 0.995334f, 0.995343f, 0.995352f, 0.995362f, 0.995371f, 0.995380f, 0.995389f, 0.995398f,
+ 0.995408f, 0.995417f, 0.995426f, 0.995435f, 0.995444f, 0.995453f, 0.995463f, 0.995472f,
+ 0.995481f, 0.995490f, 0.995499f, 0.995508f, 0.995517f, 0.995526f, 0.995535f, 0.995544f,
+ 0.995553f, 0.995562f, 0.995571f, 0.995580f, 0.995589f, 0.995598f, 0.995607f, 0.995616f,
+ 0.995625f, 0.995634f, 0.995643f, 0.995652f, 0.995661f, 0.995670f, 0.995679f, 0.995688f,
+ 0.995697f, 0.995705f, 0.995714f, 0.995723f, 0.995732f, 0.995741f, 0.995750f, 0.995759f,
+ 0.995767f, 0.995776f, 0.995785f, 0.995794f, 0.995803f, 0.995811f, 0.995820f, 0.995829f,
+ 0.995838f, 0.995846f, 0.995855f, 0.995864f, 0.995872f, 0.995881f, 0.995890f, 0.995899f,
+ 0.995907f, 0.995916f, 0.995925f, 0.995933f, 0.995942f, 0.995950f, 0.995959f, 0.995968f,
+ 0.995976f, 0.995985f, 0.995993f, 0.996002f, 0.996011f, 0.996019f, 0.996028f, 0.996036f,
+ 0.996045f, 0.996053f, 0.996062f, 0.996070f, 0.996079f, 0.996087f, 0.996096f, 0.996104f,
+ 0.996113f, 0.996121f, 0.996129f, 0.996138f, 0.996146f, 0.996155f, 0.996163f, 0.996171f,
+ 0.996180f, 0.996188f, 0.996197f, 0.996205f, 0.996213f, 0.996222f, 0.996230f, 0.996238f,
+ 0.996247f, 0.996255f, 0.996263f, 0.996271f, 0.996280f, 0.996288f, 0.996296f, 0.996304f,
+ 0.996313f, 0.996321f, 0.996329f, 0.996337f, 0.996345f, 0.996354f, 0.996362f, 0.996370f,
+ 0.996378f, 0.996386f, 0.996394f, 0.996403f, 0.996411f, 0.996419f, 0.996427f, 0.996435f,
+ 0.996443f, 0.996451f, 0.996459f, 0.996467f, 0.996475f, 0.996483f, 0.996491f, 0.996499f,
+ 0.996507f, 0.996515f, 0.996523f, 0.996531f, 0.996539f, 0.996547f, 0.996555f, 0.996563f,
+ 0.996571f, 0.996579f, 0.996587f, 0.996595f, 0.996603f, 0.996611f, 0.996619f, 0.996626f,
+ 0.996634f, 0.996642f, 0.996650f, 0.996658f, 0.996666f, 0.996674f, 0.996681f, 0.996689f,
+ 0.996697f, 0.996705f, 0.996712f, 0.996720f, 0.996728f, 0.996736f, 0.996743f, 0.996751f,
+ 0.996759f, 0.996767f, 0.996774f, 0.996782f, 0.996790f, 0.996797f, 0.996805f, 0.996813f,
+ 0.996820f, 0.996828f, 0.996836f, 0.996843f, 0.996851f, 0.996858f, 0.996866f, 0.996874f,
+ 0.996881f, 0.996889f, 0.996896f, 0.996904f, 0.996911f, 0.996919f, 0.996926f, 0.996934f,
+ 0.996941f, 0.996949f, 0.996956f, 0.996964f, 0.996971f, 0.996979f, 0.996986f, 0.996994f,
+ 0.997001f, 0.997008f, 0.997016f, 0.997023f, 0.997031f, 0.997038f, 0.997045f, 0.997053f,
+ 0.997060f, 0.997067f, 0.997075f, 0.997082f, 0.997089f, 0.997097f, 0.997104f, 0.997111f,
+ 0.997119f, 0.997126f, 0.997133f, 0.997140f, 0.997148f, 0.997155f, 0.997162f, 0.997169f,
+ 0.997176f, 0.997184f, 0.997191f, 0.997198f, 0.997205f, 0.997212f, 0.997219f, 0.997227f,
+ 0.997234f, 0.997241f, 0.997248f, 0.997255f, 0.997262f, 0.997269f, 0.997276f, 0.997283f,
+ 0.997290f, 0.997298f, 0.997305f, 0.997312f, 0.997319f, 0.997326f, 0.997333f, 0.997340f,
+ 0.997347f, 0.997354f, 0.997361f, 0.997368f, 0.997374f, 0.997381f, 0.997388f, 0.997395f,
+ 0.997402f, 0.997409f, 0.997416f, 0.997423f, 0.997430f, 0.997437f, 0.997443f, 0.997450f,
+ 0.997457f, 0.997464f, 0.997471f, 0.997478f, 0.997484f, 0.997491f, 0.997498f, 0.997505f,
+ 0.997511f, 0.997518f, 0.997525f, 0.997532f, 0.997538f, 0.997545f, 0.997552f, 0.997559f,
+ 0.997565f, 0.997572f, 0.997579f, 0.997585f, 0.997592f, 0.997599f, 0.997605f, 0.997612f,
+ 0.997618f, 0.997625f, 0.997632f, 0.997638f, 0.997645f, 0.997651f, 0.997658f, 0.997665f,
+ 0.997671f, 0.997678f, 0.997684f, 0.997691f, 0.997697f, 0.997704f, 0.997710f, 0.997717f,
+ 0.997723f, 0.997730f, 0.997736f, 0.997742f, 0.997749f, 0.997755f, 0.997762f, 0.997768f,
+ 0.997774f, 0.997781f, 0.997787f, 0.997794f, 0.997800f, 0.997806f, 0.997813f, 0.997819f,
+ 0.997825f, 0.997832f, 0.997838f, 0.997844f, 0.997851f, 0.997857f, 0.997863f, 0.997869f,
+ 0.997876f, 0.997882f, 0.997888f, 0.997894f, 0.997901f, 0.997907f, 0.997913f, 0.997919f,
+ 0.997925f, 0.997931f, 0.997938f, 0.997944f, 0.997950f, 0.997956f, 0.997962f, 0.997968f,
+ 0.997974f, 0.997980f, 0.997987f, 0.997993f, 0.997999f, 0.998005f, 0.998011f, 0.998017f,
+ 0.998023f, 0.998029f, 0.998035f, 0.998041f, 0.998047f, 0.998053f, 0.998059f, 0.998065f,
+ 0.998071f, 0.998077f, 0.998083f, 0.998089f, 0.998094f, 0.998100f, 0.998106f, 0.998112f,
+ 0.998118f, 0.998124f, 0.998130f, 0.998136f, 0.998142f, 0.998147f, 0.998153f, 0.998159f,
+ 0.998165f, 0.998171f, 0.998176f, 0.998182f, 0.998188f, 0.998194f, 0.998200f, 0.998205f,
+ 0.998211f, 0.998217f, 0.998222f, 0.998228f, 0.998234f, 0.998240f, 0.998245f, 0.998251f,
+ 0.998257f, 0.998262f, 0.998268f, 0.998273f, 0.998279f, 0.998285f, 0.998290f, 0.998296f,
+ 0.998302f, 0.998307f, 0.998313f, 0.998318f, 0.998324f, 0.998329f, 0.998335f, 0.998340f,
+ 0.998346f, 0.998351f, 0.998357f, 0.998362f, 0.998368f, 0.998373f, 0.998379f, 0.998384f,
+ 0.998390f, 0.998395f, 0.998401f, 0.998406f, 0.998411f, 0.998417f, 0.998422f, 0.998428f,
+ 0.998433f, 0.998438f, 0.998444f, 0.998449f, 0.998454f, 0.998460f, 0.998465f, 0.998470f,
+ 0.998476f, 0.998481f, 0.998486f, 0.998491f, 0.998497f, 0.998502f, 0.998507f, 0.998512f,
+ 0.998518f, 0.998523f, 0.998528f, 0.998533f, 0.998538f, 0.998544f, 0.998549f, 0.998554f,
+ 0.998559f, 0.998564f, 0.998569f, 0.998574f, 0.998580f, 0.998585f, 0.998590f, 0.998595f,
+ 0.998600f, 0.998605f, 0.998610f, 0.998615f, 0.998620f, 0.998625f, 0.998630f, 0.998635f,
+ 0.998640f, 0.998645f, 0.998650f, 0.998655f, 0.998660f, 0.998665f, 0.998670f, 0.998675f,
+ 0.998680f, 0.998685f, 0.998690f, 0.998695f, 0.998700f, 0.998704f, 0.998709f, 0.998714f,
+ 0.998719f, 0.998724f, 0.998729f, 0.998734f, 0.998738f, 0.998743f, 0.998748f, 0.998753f,
+ 0.998758f, 0.998762f, 0.998767f, 0.998772f, 0.998777f, 0.998781f, 0.998786f, 0.998791f,
+ 0.998795f, 0.998800f, 0.998805f, 0.998810f, 0.998814f, 0.998819f, 0.998824f, 0.998828f,
+ 0.998833f, 0.998837f, 0.998842f, 0.998847f, 0.998851f, 0.998856f, 0.998860f, 0.998865f,
+ 0.998870f, 0.998874f, 0.998879f, 0.998883f, 0.998888f, 0.998892f, 0.998897f, 0.998901f,
+ 0.998906f, 0.998910f, 0.998915f, 0.998919f, 0.998924f, 0.998928f, 0.998932f, 0.998937f,
+ 0.998941f, 0.998946f, 0.998950f, 0.998954f, 0.998959f, 0.998963f, 0.998968f, 0.998972f,
+ 0.998976f, 0.998981f, 0.998985f, 0.998989f, 0.998994f, 0.998998f, 0.999002f, 0.999006f,
+ 0.999011f, 0.999015f, 0.999019f, 0.999023f, 0.999028f, 0.999032f, 0.999036f, 0.999040f,
+ 0.999044f, 0.999049f, 0.999053f, 0.999057f, 0.999061f, 0.999065f, 0.999069f, 0.999074f,
+ 0.999078f, 0.999082f, 0.999086f, 0.999090f, 0.999094f, 0.999098f, 0.999102f, 0.999106f,
+ 0.999110f, 0.999114f, 0.999118f, 0.999122f, 0.999126f, 0.999130f, 0.999134f, 0.999138f,
+ 0.999142f, 0.999146f, 0.999150f, 0.999154f, 0.999158f, 0.999162f, 0.999166f, 0.999170f,
+ 0.999174f, 0.999178f, 0.999182f, 0.999186f, 0.999189f, 0.999193f, 0.999197f, 0.999201f,
+ 0.999205f, 0.999209f, 0.999212f, 0.999216f, 0.999220f, 0.999224f, 0.999228f, 0.999231f,
+ 0.999235f, 0.999239f, 0.999243f, 0.999246f, 0.999250f, 0.999254f, 0.999257f, 0.999261f,
+ 0.999265f, 0.999268f, 0.999272f, 0.999276f, 0.999279f, 0.999283f, 0.999287f, 0.999290f,
+ 0.999294f, 0.999297f, 0.999301f, 0.999305f, 0.999308f, 0.999312f, 0.999315f, 0.999319f,
+ 0.999322f, 0.999326f, 0.999329f, 0.999333f, 0.999336f, 0.999340f, 0.999343f, 0.999347f,
+ 0.999350f, 0.999354f, 0.999357f, 0.999361f, 0.999364f, 0.999367f, 0.999371f, 0.999374f,
+ 0.999378f, 0.999381f, 0.999384f, 0.999388f, 0.999391f, 0.999394f, 0.999398f, 0.999401f,
+ 0.999404f, 0.999408f, 0.999411f, 0.999414f, 0.999418f, 0.999421f, 0.999424f, 0.999427f,
+ 0.999431f, 0.999434f, 0.999437f, 0.999440f, 0.999443f, 0.999447f, 0.999450f, 0.999453f,
+ 0.999456f, 0.999459f, 0.999462f, 0.999466f, 0.999469f, 0.999472f, 0.999475f, 0.999478f,
+ 0.999481f, 0.999484f, 0.999487f, 0.999490f, 0.999493f, 0.999497f, 0.999500f, 0.999503f,
+ 0.999506f, 0.999509f, 0.999512f, 0.999515f, 0.999518f, 0.999521f, 0.999524f, 0.999527f,
+ 0.999529f, 0.999532f, 0.999535f, 0.999538f, 0.999541f, 0.999544f, 0.999547f, 0.999550f,
+ 0.999553f, 0.999556f, 0.999558f, 0.999561f, 0.999564f, 0.999567f, 0.999570f, 0.999573f,
+ 0.999575f, 0.999578f, 0.999581f, 0.999584f, 0.999586f, 0.999589f, 0.999592f, 0.999595f,
+ 0.999597f, 0.999600f, 0.999603f, 0.999605f, 0.999608f, 0.999611f, 0.999614f, 0.999616f,
+ 0.999619f, 0.999621f, 0.999624f, 0.999627f, 0.999629f, 0.999632f, 0.999635f, 0.999637f,
+ 0.999640f, 0.999642f, 0.999645f, 0.999647f, 0.999650f, 0.999652f, 0.999655f, 0.999658f,
+ 0.999660f, 0.999663f, 0.999665f, 0.999667f, 0.999670f, 0.999672f, 0.999675f, 0.999677f,
+ 0.999680f, 0.999682f, 0.999685f, 0.999687f, 0.999689f, 0.999692f, 0.999694f, 0.999696f,
+ 0.999699f, 0.999701f, 0.999704f, 0.999706f, 0.999708f, 0.999710f, 0.999713f, 0.999715f,
+ 0.999717f, 0.999720f, 0.999722f, 0.999724f, 0.999726f, 0.999729f, 0.999731f, 0.999733f,
+ 0.999735f, 0.999738f, 0.999740f, 0.999742f, 0.999744f, 0.999746f, 0.999748f, 0.999750f,
+ 0.999753f, 0.999755f, 0.999757f, 0.999759f, 0.999761f, 0.999763f, 0.999765f, 0.999767f,
+ 0.999769f, 0.999771f, 0.999774f, 0.999776f, 0.999778f, 0.999780f, 0.999782f, 0.999784f,
+ 0.999786f, 0.999788f, 0.999790f, 0.999792f, 0.999793f, 0.999795f, 0.999797f, 0.999799f,
+ 0.999801f, 0.999803f, 0.999805f, 0.999807f, 0.999809f, 0.999811f, 0.999812f, 0.999814f,
+ 0.999816f, 0.999818f, 0.999820f, 0.999822f, 0.999823f, 0.999825f, 0.999827f, 0.999829f,
+ 0.999831f, 0.999832f, 0.999834f, 0.999836f, 0.999838f, 0.999839f, 0.999841f, 0.999843f,
+ 0.999844f, 0.999846f, 0.999848f, 0.999849f, 0.999851f, 0.999853f, 0.999854f, 0.999856f,
+ 0.999858f, 0.999859f, 0.999861f, 0.999862f, 0.999864f, 0.999866f, 0.999867f, 0.999869f,
+ 0.999870f, 0.999872f, 0.999873f, 0.999875f, 0.999876f, 0.999878f, 0.999879f, 0.999881f,
+ 0.999882f, 0.999884f, 0.999885f, 0.999887f, 0.999888f, 0.999890f, 0.999891f, 0.999892f,
+ 0.999894f, 0.999895f, 0.999897f, 0.999898f, 0.999899f, 0.999901f, 0.999902f, 0.999903f,
+ 0.999905f, 0.999906f, 0.999907f, 0.999909f, 0.999910f, 0.999911f, 0.999913f, 0.999914f,
+ 0.999915f, 0.999916f, 0.999917f, 0.999919f, 0.999920f, 0.999921f, 0.999922f, 0.999924f,
+ 0.999925f, 0.999926f, 0.999927f, 0.999928f, 0.999929f, 0.999930f, 0.999932f, 0.999933f,
+ 0.999934f, 0.999935f, 0.999936f, 0.999937f, 0.999938f, 0.999939f, 0.999940f, 0.999941f,
+ 0.999942f, 0.999943f, 0.999944f, 0.999945f, 0.999946f, 0.999947f, 0.999948f, 0.999949f,
+ 0.999950f, 0.999951f, 0.999952f, 0.999953f, 0.999954f, 0.999955f, 0.999956f, 0.999957f,
+ 0.999958f, 0.999959f, 0.999959f, 0.999960f, 0.999961f, 0.999962f, 0.999963f, 0.999964f,
+ 0.999964f, 0.999965f, 0.999966f, 0.999967f, 0.999968f, 0.999968f, 0.999969f, 0.999970f,
+ 0.999971f, 0.999971f, 0.999972f, 0.999973f, 0.999973f, 0.999974f, 0.999975f, 0.999976f,
+ 0.999976f, 0.999977f, 0.999977f, 0.999978f, 0.999979f, 0.999979f, 0.999980f, 0.999981f,
+ 0.999981f, 0.999982f, 0.999982f, 0.999983f, 0.999983f, 0.999984f, 0.999985f, 0.999985f,
+ 0.999986f, 0.999986f, 0.999987f, 0.999987f, 0.999988f, 0.999988f, 0.999988f, 0.999989f,
+ 0.999989f, 0.999990f, 0.999990f, 0.999991f, 0.999991f, 0.999991f, 0.999992f, 0.999992f,
+ 0.999993f, 0.999993f, 0.999993f, 0.999994f, 0.999994f, 0.999994f, 0.999995f, 0.999995f,
+ 0.999995f, 0.999996f, 0.999996f, 0.999996f, 0.999996f, 0.999997f, 0.999997f, 0.999997f,
+ 0.999997f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999999f, 0.999999f,
+ 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 1.000000f, 1.000000f,
+ 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f
+};
+
+static const float *cosTables[17] = {
+ 0 , 0 , 0 , 0 ,
+ cosTable16 , cosTable32 , cosTable64 , cosTable128 ,
+ cosTable256 , cosTable512 , cosTable1024 , cosTable2048 ,
+ cosTable4096, cosTable8192, cosTable16384, cosTable32768,
+ cosTable65536
+};
+
+const float *getCosineTable(int bits) {
+ assert((bits >= 4) && (bits <= 16));
+
+ return cosTables[bits];
+}
+
+} // End of namespace Common
diff --git a/common/cosinetables.h b/common/cosinetables.h
new file mode 100644
index 0000000000..5744d21569
--- /dev/null
+++ b/common/cosinetables.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 COMMON_COSINETABLES_H
+#define COMMON_COSINETABLES_H
+
+namespace Common {
+
+/**
+ * Get a cosine table with the specified bit precision
+ *
+ * @param bits Precision of the table, which must be in range [4, 16]
+ */
+const float *getCosineTable(int bits);
+
+} // End of namespace Common
+
+#endif // COMMON_COSINETABLES_H
diff --git a/common/dct.cpp b/common/dct.cpp
new file mode 100644
index 0000000000..6525c727ae
--- /dev/null
+++ b/common/dct.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.
+ *
+ */
+
+// Based on eos' (I)RDFT code which is in turn
+// Based upon the (I)DCT code in FFmpeg
+// Copyright (c) 2009 Peter Ross <pross@xvid.org>
+// Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
+// Copyright (c) 2010 Vitor Sessak
+
+#include "common/cosinetables.h"
+#include "common/dct.h"
+
+namespace Common {
+
+DCT::DCT(int bits, TransformType trans) : _bits(bits), _trans(trans), _rdft(0) {
+ int n = 1 << _bits;
+
+ _tCos = getCosineTable(_bits + 2);
+
+ _csc2 = new float[n / 2];
+
+ _rdft = new RDFT(_bits, (_trans == DCT_III) ? RDFT::IDFT_C2R : RDFT::DFT_R2C);
+
+ for (int i = 0; i < (n / 2); i++)
+ _csc2[i] = 0.5 / sin((M_PI / (2 * n) * (2 * i + 1)));
+}
+
+DCT::~DCT() {
+ delete _rdft;
+ delete[] _csc2;
+}
+
+void DCT::calc(float *data) {
+ switch (_trans) {
+ case DCT_I:
+ calcDCTI(data);
+ break;
+ case DCT_II:
+ calcDCTII(data);
+ break;
+ case DCT_III:
+ calcDCTIII(data);
+ break;
+ case DST_I:
+ calcDSTI(data);
+ break;
+ }
+}
+
+/* sin((M_PI * x / (2*n)) */
+#define SIN(n,x) (_tCos[(n) - (x)])
+/* cos((M_PI * x / (2*n)) */
+#define COS(n,x) (_tCos[x])
+
+void DCT::calcDCTI(float *data) {
+ int n = 1 << _bits;
+
+ float next = -0.5 * (data[0] - data[n]);
+
+ for (int i = 0; i < (n / 2); i++) {
+ float tmp1 = data[i ];
+ float tmp2 = data[n - i];
+
+ float s = SIN(n, 2 * i);
+ float c = COS(n, 2 * i);
+
+ c *= tmp1 - tmp2;
+ s *= tmp1 - tmp2;
+
+ next += c;
+
+ tmp1 = (tmp1 + tmp2) * 0.5;
+
+ data[i ] = tmp1 - s;
+ data[n - i] = tmp1 + s;
+ }
+
+ _rdft->calc(data);
+
+ data[n] = data[1];
+ data[1] = next;
+
+ for (int i = 3; i <= n; i += 2)
+ data[i] = data[i - 2] - data[i];
+}
+
+void DCT::calcDCTII(float *data) {
+ int n = 1 << _bits;
+
+ for (int i = 0; i < (n / 2); i++) {
+ float tmp1 = data[i ];
+ float tmp2 = data[n - i - 1];
+
+ float s = SIN(n, 2 * i + 1);
+
+ s *= tmp1 - tmp2;
+
+ tmp1 = (tmp1 + tmp2) * 0.5;
+
+ data[i ] = tmp1 + s;
+ data[n - i - 1] = tmp1 - s;
+ }
+
+ _rdft->calc(data);
+
+ float next = data[1] * 0.5;
+
+ data[1] *= -1;
+
+ for (int i = n - 2; i >= 0; i -= 2) {
+ float inr = data[i ];
+ float ini = data[i + 1];
+
+ float c = COS(n, i);
+ float s = SIN(n, i);
+
+ data[i ] = c * inr + s * ini;
+ data[i + 1] = next;
+
+ next += s * inr - c * ini;
+ }
+}
+
+void DCT::calcDCTIII(float *data) {
+ int n = 1 << _bits;
+
+ float next = data[n - 1];
+ float inv_n = 1.0 / n;
+
+ for (int i = n - 2; i >= 2; i -= 2) {
+ float val1 = data[i ];
+ float val2 = data[i - 1] - data[i + 1];
+
+ float c = COS(n, i);
+ float s = SIN(n, i);
+
+ data[i ] = c * val1 + s * val2;
+ data[i + 1] = s * val1 - c * val2;
+ }
+
+ data[1] = 2 * next;
+
+ _rdft->calc(data);
+
+ for (int i = 0; i < (n / 2); i++) {
+ float tmp1 = data[i ] * inv_n;
+ float tmp2 = data[n - i - 1] * inv_n;
+
+ float csc = _csc2[i] * (tmp1 - tmp2);
+
+ tmp1 += tmp2;
+
+ data[i ] = tmp1 + csc;
+ data[n - i - 1] = tmp1 - csc;
+ }
+}
+
+void DCT::calcDSTI(float *data) {
+ int n = 1 << _bits;
+
+ data[0] = 0;
+
+ for (int i = 1; i < (n / 2); i++) {
+ float tmp1 = data[i ];
+ float tmp2 = data[n - i];
+ float s = SIN(n, 2 * i);
+
+ s *= tmp1 + tmp2;
+ tmp1 = (tmp1 - tmp2) * 0.5;
+
+ data[i ] = s + tmp1;
+ data[n - i] = s - tmp1;
+ }
+
+ data[n / 2] *= 2;
+
+ _rdft->calc(data);
+
+ data[0] *= 0.5;
+
+ for (int i = 1; i < (n - 2); i += 2) {
+ data[i + 1] += data[i - 1];
+ data[i ] = -data[i + 2];
+ }
+
+ data[n - 1] = 0;
+}
+
+} // End of namespace Common
diff --git a/common/dct.h b/common/dct.h
new file mode 100644
index 0000000000..2c8c5129b8
--- /dev/null
+++ b/common/dct.h
@@ -0,0 +1,76 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' (I)RDFT code which is in turn
+// Based upon the (I)DCT code in FFmpeg
+// Copyright (c) 2009 Peter Ross <pross@xvid.org>
+// Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
+// Copyright (c) 2010 Vitor Sessak
+
+#ifndef COMMON_DCT_H
+#define COMMON_DCT_H
+
+#include "common/scummsys.h"
+#include "common/math.h"
+#include "common/rdft.h"
+
+namespace Common {
+
+/**
+ * (Inverse) Discrete Cosine Transforms.
+ *
+ * Used in engines:
+ * - scumm
+ */
+class DCT {
+public:
+ enum TransformType {
+ DCT_II,
+ DCT_III,
+ DCT_I,
+ DST_I
+ };
+
+ DCT(int bits, TransformType trans);
+ ~DCT();
+
+ void calc(float *data);
+
+private:
+ int _bits;
+ TransformType _trans;
+
+ const float *_tCos;
+
+ float *_csc2;
+
+ RDFT *_rdft;
+
+ void calcDCTI (float *data);
+ void calcDCTII (float *data);
+ void calcDCTIII(float *data);
+ void calcDSTI (float *data);
+};
+
+} // End of namespace Common
+
+#endif // COMMON_DCT_H
diff --git a/common/debug.cpp b/common/debug.cpp
index dbbb204deb..9c3a93e5a6 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -23,16 +23,17 @@
#include "common/debug-channels.h"
#include "common/system.h"
#include "common/textconsole.h"
+#include "common/algorithm.h"
#include <stdarg.h> // For va_list etc.
// TODO: Move gDebugLevel into namespace Common.
int gDebugLevel = -1;
-DECLARE_SINGLETON(Common::DebugManager);
-
namespace Common {
+DECLARE_SINGLETON(DebugManager);
+
namespace {
struct DebugLevelComperator {
@@ -107,18 +108,13 @@ bool DebugManager::isDebugChannelEnabled(uint32 channel) {
#ifndef DISABLE_TEXT_CONSOLE
static void debugHelper(const char *s, va_list va, bool caret = true) {
- char buf[STRINGBUFLEN];
+ Common::String buf = Common::String::vformat(s, va);
- vsnprintf(buf, STRINGBUFLEN, s, va);
- buf[STRINGBUFLEN-1] = '\0';
-
- if (caret) {
- buf[STRINGBUFLEN-2] = '\0';
- strcat(buf, "\n");
- }
+ if (caret)
+ buf += '\n';
if (g_system)
- g_system->logMessage(LogMessageType::kDebug, buf);
+ g_system->logMessage(LogMessageType::kDebug, buf.c_str());
// TODO: Think of a good fallback in case we do not have
// any OSystem yet.
}
diff --git a/common/error.cpp b/common/error.cpp
index a6c52a0ce9..78178f8e27 100644
--- a/common/error.cpp
+++ b/common/error.cpp
@@ -67,6 +67,9 @@ static String errorToString(ErrorCode errorCode) {
case kEnginePluginNotSupportSaves:
return _s("Engine plugin does not support save states");
+ case kUserCanceled:
+ return _s("User canceled");
+
case kUnknownError:
default:
return _s("Unknown error");
diff --git a/common/error.h b/common/error.h
index 23c12b67e4..7043862eea 100644
--- a/common/error.h
+++ b/common/error.h
@@ -62,6 +62,8 @@ enum ErrorCode {
kEnginePluginNotFound, ///< Failed to find plugin to handle target
kEnginePluginNotSupportSaves, ///< Failed if plugin does not support listing save states
+ kUserCanceled, ///< User has canceled the launching of the game
+
kUnknownError ///< Catch-all error, used if no other error code matches
};
diff --git a/common/fft.cpp b/common/fft.cpp
new file mode 100644
index 0000000000..5852698b61
--- /dev/null
+++ b/common/fft.cpp
@@ -0,0 +1,243 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' (I)FFT code which is in turn
+// Based upon the (I)FFT code in FFmpeg
+// Copyright (c) 2008 Loren Merritt
+// Copyright (c) 2002 Fabrice Bellard
+// Partly based on libdjbfft by D. J. Bernstein
+
+#include "common/cosinetables.h"
+#include "common/fft.h"
+#include "common/util.h"
+
+namespace Common {
+
+FFT::FFT(int bits, int inverse) : _bits(bits), _inverse(inverse) {
+ assert((_bits >= 2) && (_bits <= 16));
+
+ int n = 1 << bits;
+
+ _tmpBuf = new Complex[n];
+ _expTab = new Complex[n / 2];
+ _revTab = new uint16[n];
+
+ _splitRadix = 1;
+
+ for (int i = 0; i < n; i++)
+ _revTab[-splitRadixPermutation(i, n, _inverse) & (n - 1)] = i;
+}
+
+FFT::~FFT() {
+ delete[] _revTab;
+ delete[] _expTab;
+ delete[] _tmpBuf;
+}
+
+void FFT::permute(Complex *z) {
+ int np = 1 << _bits;
+
+ if (_tmpBuf) {
+ for (int j = 0; j < np; j++)
+ _tmpBuf[_revTab[j]] = z[j];
+
+ memcpy(z, _tmpBuf, np * sizeof(Complex));
+
+ return;
+ }
+
+ // Reverse
+ for (int j = 0; j < np; j++) {
+ int k = _revTab[j];
+
+ if (k < j)
+ SWAP(z[k], z[j]);
+ }
+}
+
+int FFT::splitRadixPermutation(int i, int n, int inverse) {
+ if (n <= 2)
+ return i & 1;
+
+ int m = n >> 1;
+
+ if (!(i & m))
+ return splitRadixPermutation(i, m, inverse) * 2;
+
+ m >>= 1;
+
+ if (inverse == !(i & m))
+ return splitRadixPermutation(i, m, inverse) * 4 + 1;
+
+ return splitRadixPermutation(i, m, inverse) * 4 - 1;
+}
+
+#define sqrthalf (float)M_SQRT1_2
+
+#define BF(x, y, a, b) { \
+ x = a - b; \
+ y = a + b; \
+}
+
+#define BUTTERFLIES(a0, a1, a2, a3) { \
+ BF(t3, t5, t5, t1); \
+ BF(a2.re, a0.re, a0.re, t5); \
+ BF(a3.im, a1.im, a1.im, t3); \
+ BF(t4, t6, t2, t6); \
+ BF(a3.re, a1.re, a1.re, t4); \
+ BF(a2.im, a0.im, a0.im, t6); \
+}
+
+// force loading all the inputs before storing any.
+// this is slightly slower for small data, but avoids store->load aliasing
+// for addresses separated by large powers of 2.
+#define BUTTERFLIES_BIG(a0, a1, a2, a3) { \
+ float r0 = a0.re, i0 = a0.im, r1 = a1.re, i1 = a1.im; \
+ BF(t3, t5, t5, t1); \
+ BF(a2.re, a0.re, r0, t5); \
+ BF(a3.im, a1.im, i1, t3); \
+ BF(t4, t6, t2, t6); \
+ BF(a3.re, a1.re, r1, t4); \
+ BF(a2.im, a0.im, i0, t6); \
+}
+
+#define TRANSFORM(a0, a1, a2, a3, wre, wim) { \
+ t1 = a2.re * wre + a2.im * wim; \
+ t2 = a2.im * wre - a2.re * wim; \
+ t5 = a3.re * wre - a3.im * wim; \
+ t6 = a3.im * wre + a3.re * wim; \
+ BUTTERFLIES(a0, a1, a2, a3) \
+}
+
+#define TRANSFORM_ZERO(a0, a1, a2, a3) { \
+ t1 = a2.re; \
+ t2 = a2.im; \
+ t5 = a3.re; \
+ t6 = a3.im; \
+ BUTTERFLIES(a0, a1, a2, a3) \
+}
+
+/* z[0...8n-1], w[1...2n-1] */
+#define PASS(name) \
+static void name(Complex *z, const float *wre, unsigned int n) { \
+ float t1, t2, t3, t4, t5, t6; \
+ int o1 = 2 * n; \
+ int o2 = 4 * n; \
+ int o3 = 6 * n; \
+ const float *wim = wre + o1; \
+ n--; \
+ \
+ TRANSFORM_ZERO(z[0], z[o1], z[o2], z[o3]); \
+ TRANSFORM(z[1], z[o1 + 1], z[o2 + 1], z[o3 + 1], wre[1], wim[-1]); \
+ do { \
+ z += 2; \
+ wre += 2; \
+ wim -= 2; \
+ TRANSFORM(z[0], z[o1], z[o2], z[o3], wre[0], wim[0]);\
+ TRANSFORM(z[1], z[o1 + 1], z[o2 + 1], z[o3 + 1], wre[1], wim[-1]);\
+ } while(--n);\
+}
+
+PASS(pass)
+#undef BUTTERFLIES
+#define BUTTERFLIES BUTTERFLIES_BIG
+PASS(pass_big)
+
+#define DECL_FFT(t, n, n2, n4) \
+static void fft##n(Complex *z) { \
+ fft##n2(z); \
+ fft##n4(z + n4 * 2); \
+ fft##n4(z + n4 * 3); \
+ pass(z, getCosineTable(t), n4 / 2);\
+}
+
+static void fft4(Complex *z) {
+ float t1, t2, t3, t4, t5, t6, t7, t8;
+
+ BF(t3, t1, z[0].re, z[1].re);
+ BF(t8, t6, z[3].re, z[2].re);
+ BF(z[2].re, z[0].re, t1, t6);
+ BF(t4, t2, z[0].im, z[1].im);
+ BF(t7, t5, z[2].im, z[3].im);
+ BF(z[3].im, z[1].im, t4, t8);
+ BF(z[3].re, z[1].re, t3, t7);
+ BF(z[2].im, z[0].im, t2, t5);
+}
+
+static void fft8(Complex *z) {
+ float t1, t2, t3, t4, t5, t6, t7, t8;
+
+ fft4(z);
+
+ BF(t1, z[5].re, z[4].re, -z[5].re);
+ BF(t2, z[5].im, z[4].im, -z[5].im);
+ BF(t3, z[7].re, z[6].re, -z[7].re);
+ BF(t4, z[7].im, z[6].im, -z[7].im);
+ BF(t8, t1, t3, t1);
+ BF(t7, t2, t2, t4);
+ BF(z[4].re, z[0].re, z[0].re, t1);
+ BF(z[4].im, z[0].im, z[0].im, t2);
+ BF(z[6].re, z[2].re, z[2].re, t7);
+ BF(z[6].im, z[2].im, z[2].im, t8);
+
+ TRANSFORM(z[1], z[3], z[5], z[7], sqrthalf, sqrthalf);
+}
+
+static void fft16(Complex *z) {
+ float t1, t2, t3, t4, t5, t6;
+
+ fft8(z);
+ fft4(z + 8);
+ fft4(z + 12);
+
+ const float * const cosTable = getCosineTable(4);
+
+ TRANSFORM_ZERO(z[0], z[4], z[8], z[12]);
+ TRANSFORM(z[2], z[6], z[10], z[14], sqrthalf, sqrthalf);
+ TRANSFORM(z[1], z[5], z[9], z[13], cosTable[1],cosTable[3]);
+ TRANSFORM(z[3], z[7], z[11], z[15], cosTable[3], cosTable[1]);
+}
+
+DECL_FFT(5, 32, 16, 8)
+DECL_FFT(6, 64, 32, 16)
+DECL_FFT(7, 128, 64, 32)
+DECL_FFT(8, 256, 128, 64)
+DECL_FFT(9, 512, 256, 128)
+#define pass pass_big
+DECL_FFT(10, 1024, 512, 256)
+DECL_FFT(11, 2048, 1024, 512)
+DECL_FFT(12, 4096, 2048, 1024)
+DECL_FFT(13, 8192, 4096, 2048)
+DECL_FFT(14, 16384, 8192, 4096)
+DECL_FFT(15, 32768, 16384, 8192)
+DECL_FFT(16, 65536, 32768, 16384)
+
+static void (* const fft_dispatch[])(Complex*) = {
+ fft4, fft8, fft16, fft32, fft64, fft128, fft256, fft512, fft1024,
+ fft2048, fft4096, fft8192, fft16384, fft32768, fft65536,
+};
+
+void FFT::calc(Complex *z) {
+ fft_dispatch[_bits - 2](z);
+}
+
+} // End of namespace Common
diff --git a/common/fft.h b/common/fft.h
new file mode 100644
index 0000000000..e77c53c2a7
--- /dev/null
+++ b/common/fft.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.
+ *
+ */
+
+// Based on eos' (I)FFT code which is in turn
+// based upon the (I)FFT code in FFmpeg
+// Copyright (c) 2008 Loren Merritt
+// Copyright (c) 2002 Fabrice Bellard
+// Partly based on libdjbfft by D. J. Bernstein
+
+#ifndef COMMON_FFT_H
+#define COMMON_FFT_H
+
+#include "common/scummsys.h"
+#include "common/math.h"
+
+namespace Common {
+
+/**
+ * (Inverse) Fast Fourier Transform.
+ *
+ * Used in engines:
+ * - scumm
+ */
+class FFT {
+public:
+ FFT(int bits, int inverse);
+ ~FFT();
+
+ /** Do the permutation needed BEFORE calling calc(). */
+ void permute(Complex *z);
+
+ /** Do a complex FFT.
+ *
+ * The input data must be permuted before.
+ * No 1.0/sqrt(n) normalization is done.
+ */
+ void calc(Complex *z);
+
+private:
+ int _bits;
+ int _inverse;
+
+ uint16 *_revTab;
+
+ Complex *_expTab;
+ Complex *_tmpBuf;
+
+ const float *_tSin;
+ const float *_tCos;
+
+ int _splitRadix;
+ int _permutation;
+
+ static int splitRadixPermutation(int i, int n, int inverse);
+};
+
+} // End of namespace Common
+
+#endif // COMMON_FFT_H
diff --git a/common/forbidden.h b/common/forbidden.h
index 9cba19cf5e..95c1a47d65 100644
--- a/common/forbidden.h
+++ b/common/forbidden.h
@@ -29,7 +29,7 @@
* infrastructure code do not make use of certain "forbidden" APIs, such
* as fopen(), setjmp(), etc.
* This is achieved by re-#defining various symbols to a "garbage"
- * string which then trigers a compiler error.
+ * string which then triggers a compiler error.
*
* Backend files may #define FORBIDDEN_SYMBOL_ALLOW_ALL if they
* have to access functions like fopen, fread etc.
@@ -203,6 +203,11 @@
#define exit(a) FORBIDDEN_SYMBOL_REPLACEMENT
#endif
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_abort
+#undef abort
+#define abort() FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
+
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getenv
#undef getenv
#define getenv(a) FORBIDDEN_SYMBOL_REPLACEMENT
diff --git a/common/hashmap.h b/common/hashmap.h
index f2a4d843b8..347ac1fd25 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -106,8 +106,9 @@ private:
HASHMAP_MEMORYPOOL_SIZE = HASHMAP_MIN_CAPACITY * HASHMAP_LOADFACTOR_NUMERATOR / HASHMAP_LOADFACTOR_DENOMINATOR
};
-
+#ifdef USE_HASHMAP_MEMORY_POOL
ObjectPool<Node, HASHMAP_MEMORYPOOL_SIZE> _nodePool;
+#endif
Node **_storage; ///< hashtable of size arrsize.
uint _mask; ///< Capacity of the HashMap minus one; must be a power of two of minus one
@@ -128,12 +129,20 @@ private:
#endif
Node *allocNode(const Key &key) {
+#ifdef USE_HASHMAP_MEMORY_POOL
return new (_nodePool) Node(key);
+#else
+ return new Node(key);
+#endif
}
void freeNode(Node *node) {
if (node && node != HASHMAP_DUMMY_NODE)
+#ifdef USE_HASHMAP_MEMORY_POOL
_nodePool.deleteChunk(node);
+#else
+ delete node;
+#endif
}
void assign(const HM_t &map);
diff --git a/common/huffman.cpp b/common/huffman.cpp
new file mode 100644
index 0000000000..a8ebe4142a
--- /dev/null
+++ b/common/huffman.cpp
@@ -0,0 +1,86 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' Huffman code
+
+#include "common/huffman.h"
+#include "common/util.h"
+#include "common/textconsole.h"
+#include "common/bitstream.h"
+
+namespace Common {
+
+Huffman::Symbol::Symbol(uint32 c, uint32 s) : code(c), symbol(s) {
+}
+
+
+Huffman::Huffman(uint8 maxLength, uint32 codeCount, const uint32 *codes, const uint8 *lengths, const uint32 *symbols) {
+ assert(codeCount > 0);
+
+ assert(codes);
+ assert(lengths);
+
+ if (maxLength == 0)
+ for (uint32 i = 0; i < codeCount; i++)
+ maxLength = MAX(maxLength, lengths[i]);
+
+ assert(maxLength <= 32);
+
+ _codes.resize(maxLength);
+ _symbols.resize(codeCount);
+
+ for (uint32 i = 0; i < codeCount; i++) {
+ // The symbol. If none were specified, just assume it's identical to the code index
+ uint32 symbol = symbols ? symbols[i] : i;
+
+ // Put the code and symbol into the correct list
+ _codes[lengths[i] - 1].push_back(Symbol(codes[i], symbol));
+
+ // And put the pointer to the symbol/code struct into the symbol list.
+ _symbols[i] = &_codes[lengths[i] - 1].back();
+ }
+}
+
+Huffman::~Huffman() {
+}
+
+void Huffman::setSymbols(const uint32 *symbols) {
+ for (uint32 i = 0; i < _symbols.size(); i++)
+ _symbols[i]->symbol = symbols ? *symbols++ : i;
+}
+
+uint32 Huffman::getSymbol(BitStream &bits) const {
+ uint32 code = 0;
+
+ for (uint32 i = 0; i < _codes.size(); i++) {
+ bits.addBit(code, i);
+
+ for (CodeList::const_iterator cCode = _codes[i].begin(); cCode != _codes[i].end(); ++cCode)
+ if (code == cCode->code)
+ return cCode->symbol;
+ }
+
+ error("Unknown Huffman code");
+ return 0;
+}
+
+} // End of namespace Common
diff --git a/common/huffman.h b/common/huffman.h
new file mode 100644
index 0000000000..9a8b712c23
--- /dev/null
+++ b/common/huffman.h
@@ -0,0 +1,82 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' Huffman code
+
+#ifndef COMMON_HUFFMAN_H
+#define COMMON_HUFFMAN_H
+
+#include "common/array.h"
+#include "common/list.h"
+#include "common/types.h"
+
+namespace Common {
+
+class BitStream;
+
+/**
+ * Huffman bitstream decoding
+ *
+ * Used in engines:
+ * - scumm
+ */
+class Huffman {
+public:
+ /** Construct a Huffman decoder.
+ *
+ * @param maxLength Maximal code length. If 0, it's searched for.
+ * @param codeCount Number of codes.
+ * @param codes The actual codes.
+ * @param lengths Lengths of the individual codes.
+ * @param symbols The symbols. If 0, assume they are identical to the code indices.
+ */
+ Huffman(uint8 maxLength, uint32 codeCount, const uint32 *codes, const uint8 *lengths, const uint32 *symbols = 0);
+ ~Huffman();
+
+ /** Modify the codes' symbols. */
+ void setSymbols(const uint32 *symbols = 0);
+
+ /** Return the next symbol in the bitstream. */
+ uint32 getSymbol(BitStream &bits) const;
+
+private:
+ struct Symbol {
+ uint32 code;
+ uint32 symbol;
+
+ Symbol(uint32 c, uint32 s);
+ };
+
+ typedef Common::List<Symbol> CodeList;
+ typedef Common::Array<CodeList> CodeLists;
+ typedef Common::Array<Symbol *> SymbolList;
+
+ /** Lists of codes and their symbols, sorted by code length. */
+ CodeLists _codes;
+
+ /** Sorted list of pointers to the symbols. */
+ SymbolList _symbols;
+};
+
+} // End of namespace Common
+
+#endif // COMMON_HUFFMAN_H
diff --git a/common/math.h b/common/math.h
new file mode 100644
index 0000000000..ebe01fbaf5
--- /dev/null
+++ b/common/math.h
@@ -0,0 +1,80 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' math code
+
+#ifndef COMMON_MATH_H
+#define COMMON_MATH_H
+
+#include "common/scummsys.h"
+
+#ifndef M_SQRT1_2
+ #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+#endif
+
+#ifndef M_PI
+ #define M_PI 3.14159265358979323846
+#endif
+
+#ifndef FLT_MIN
+ #define FLT_MIN 1E-37
+#endif
+
+#ifndef FLT_MAX
+ #define FLT_MAX 1E+37
+#endif
+
+namespace Common {
+
+/** A complex number. */
+struct Complex {
+ float re, im;
+};
+
+// See http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup
+static const char LogTable256[256] = {
+#define LT(n) n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n
+ -1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ LT(4), LT(5), LT(5), LT(6), LT(6), LT(6), LT(6),
+ LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7), LT(7)
+};
+
+inline uint32 intLog2(uint32 v) {
+ register uint32 t, tt;
+
+ if ((tt = v >> 16))
+ return (t = tt >> 8) ? 24 + LogTable256[t] : 16 + LogTable256[tt];
+ else
+ return (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v];
+}
+
+inline float rad2deg(float rad) {
+ return rad * 180.0 / M_PI;
+}
+
+inline float deg2rad(float deg) {
+ return deg * M_PI / 180.0;
+}
+
+} // End of namespace Common
+
+#endif // COMMON_MATH_H
diff --git a/common/module.mk b/common/module.mk
index 5f6a529595..00caee86d1 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -35,5 +35,16 @@ MODULE_OBJS := \
xmlparser.o \
zlib.o
+ifdef USE_BINK
+MODULE_OBJS += \
+ bitstream.o \
+ cosinetables.o \
+ dct.o \
+ fft.o \
+ huffman.o \
+ rdft.o \
+ sinetables.o
+endif
+
# Include common rules
include $(srcdir)/rules.mk
diff --git a/common/ptr.h b/common/ptr.h
index e0d026f964..fc272d3d41 100644
--- a/common/ptr.h
+++ b/common/ptr.h
@@ -240,7 +240,7 @@ public:
operator bool() const { return _pointer != 0; }
~ScopedPtr() {
- delete _pointer;
+ delete _pointer;
}
/**
diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index 57534b301a..ee49b092a4 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -728,7 +728,7 @@ int QuickTimeParser::readESDS(Atom atom) {
byte tag;
int length;
-
+
readMP4Desc(_fd, tag, length);
_fd->readUint16BE(); // id
if (tag == kMP4ESDescTag)
@@ -736,7 +736,7 @@ int QuickTimeParser::readESDS(Atom atom) {
// Check if we've got the Config MPEG-4 header
readMP4Desc(_fd, tag, length);
- if (tag != kMP4DecConfigDescTag)
+ if (tag != kMP4DecConfigDescTag)
return 0;
track->objectTypeMP4 = _fd->readByte();
diff --git a/common/rdft.cpp b/common/rdft.cpp
new file mode 100644
index 0000000000..3f52a89cba
--- /dev/null
+++ b/common/rdft.cpp
@@ -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.
+ *
+ */
+
+// Based on eos' (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>
+
+#include "common/rdft.h"
+#include "common/cosinetables.h"
+#include "common/sinetables.h"
+
+namespace Common {
+
+RDFT::RDFT(int bits, TransformType trans) : _bits(bits), _fft(0) {
+ assert ((_bits >= 4) && (_bits <= 16));
+
+ _inverse = trans == IDFT_C2R || trans == DFT_C2R;
+ _signConvention = trans == IDFT_R2C || trans == DFT_C2R ? 1 : -1;
+
+ _fft = new FFT(bits - 1, trans == IDFT_C2R || trans == IDFT_R2C);
+
+ int n = 1 << bits;
+
+ _tSin = getSineTable(bits) + (trans == DFT_R2C || trans == DFT_C2R) * (n >> 2);
+ _tCos = getCosineTable(bits);
+}
+
+RDFT::~RDFT() {
+ delete _fft;
+}
+
+void RDFT::calc(float *data) {
+ const int n = 1 << _bits;
+
+ const float k1 = 0.5;
+ const float k2 = 0.5 - _inverse;
+
+ if (!_inverse) {
+ _fft->permute((Complex *) data);
+ _fft->calc ((Complex *) data);
+ }
+
+ Complex ev, od;
+
+ /* i=0 is a special case because of packing, the DC term is real, so we
+ are going to throw the N/2 term (also real) in with it. */
+
+ ev.re = data[0];
+
+ data[0] = ev.re + data[1];
+ data[1] = ev.re - data[1];
+
+ int i;
+ for (i = 1; i < (n >> 2); i++) {
+ int i1 = 2 * i;
+ int i2 = n - i1;
+
+ /* Separate even and odd FFTs */
+ ev.re = k1 * (data[i1 ] + data[i2 ]);
+ od.im = -k2 * (data[i1 ] - data[i2 ]);
+ ev.im = k1 * (data[i1 + 1] - data[i2 + 1]);
+ od.re = k2 * (data[i1 + 1] + data[i2 + 1]);
+
+ /* Apply twiddle factors to the odd FFT and add to the even FFT */
+ data[i1 ] = ev.re + od.re * _tCos[i] - od.im * _tSin[i];
+ data[i1 + 1] = ev.im + od.im * _tCos[i] + od.re * _tSin[i];
+ data[i2 ] = ev.re - od.re * _tCos[i] + od.im * _tSin[i];
+ data[i2 + 1] = -ev.im + od.im * _tCos[i] + od.re * _tSin[i];
+ }
+
+ data[2 * i + 1] = _signConvention * data[2 * i + 1];
+
+ if (_inverse) {
+ data[0] *= k1;
+ data[1] *= k1;
+
+ _fft->permute((Complex *) data);
+ _fft->calc ((Complex *) data);
+ }
+
+}
+
+} // End of namespace Common
diff --git a/common/rdft.h b/common/rdft.h
new file mode 100644
index 0000000000..68be0f4dac
--- /dev/null
+++ b/common/rdft.h
@@ -0,0 +1,70 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' (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>
+
+#ifndef COMMON_RDFT_H
+#define COMMON_RDFT_H
+
+#include "common/scummsys.h"
+#include "common/math.h"
+#include "common/fft.h"
+
+namespace Common {
+
+/**
+ * (Inverse) Real Discrete Fourier Transform.
+ *
+ * Used in engines:
+ * - scumm
+ */
+
+class RDFT {
+public:
+ enum TransformType {
+ DFT_R2C,
+ IDFT_C2R,
+ IDFT_R2C,
+ DFT_C2R
+ };
+
+ RDFT(int bits, TransformType trans);
+ ~RDFT();
+
+ void calc(float *data);
+
+private:
+ int _bits;
+ int _inverse;
+ int _signConvention;
+
+ const float *_tSin;
+ const float *_tCos;
+
+ FFT *_fft;
+};
+
+} // End of namespace Common
+
+#endif // COMMON_RDFT_H
diff --git a/common/scummsys.h b/common/scummsys.h
index a425befecf..9d4b6a9677 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -302,6 +302,19 @@
#define MAXPATHLEN 256
#endif
+#ifndef scumm_va_copy
+ #if defined(va_copy)
+ #define scumm_va_copy va_copy
+ #elif defined(__va_copy)
+ #define scumm_va_copy __va_copy
+ #elif defined(_MSC_VER)
+ #define scumm_va_copy(dst, src) ((dst) = (src))
+ #else
+ #error scumm_va_copy undefined for this port
+ #endif
+#endif
+
+
//
// Typedef our system types unless they have already been defined by config.h,
diff --git a/common/sinetables.cpp b/common/sinetables.cpp
new file mode 100644
index 0000000000..79721ec401
--- /dev/null
+++ b/common/sinetables.cpp
@@ -0,0 +1,8274 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' sine tables
+
+#include "common/scummsys.h"
+#include "common/sinetables.h"
+
+namespace Common {
+
+static const float sinTable16[8] = {
+ 0.000000f, 0.382683f, 0.707107f, 0.923880f, 0.000000f, -0.382683f, -0.707107f, -0.923880f
+};
+
+static const float sinTable32[16] = {
+ 0.000000f, 0.195090f, 0.382683f, 0.555570f, 0.707107f, 0.831470f, 0.923880f, 0.980785f,
+ 0.000000f, -0.195090f, -0.382683f, -0.555570f, -0.707107f, -0.831470f, -0.923880f, -0.980785f
+};
+
+static const float sinTable64[32] = {
+ 0.000000f, 0.098017f, 0.195090f, 0.290285f, 0.382683f, 0.471397f, 0.555570f, 0.634393f,
+ 0.707107f, 0.773010f, 0.831470f, 0.881921f, 0.923880f, 0.956940f, 0.980785f, 0.995185f,
+ 0.000000f, -0.098017f, -0.195090f, -0.290285f, -0.382683f, -0.471397f, -0.555570f, -0.634393f,
+ -0.707107f, -0.773010f, -0.831470f, -0.881921f, -0.923880f, -0.956940f, -0.980785f, -0.995185f
+};
+
+static const float sinTable128[64] = {
+ 0.000000f, 0.049068f, 0.098017f, 0.146730f, 0.195090f, 0.242980f, 0.290285f, 0.336890f,
+ 0.382683f, 0.427555f, 0.471397f, 0.514103f, 0.555570f, 0.595699f, 0.634393f, 0.671559f,
+ 0.707107f, 0.740951f, 0.773010f, 0.803208f, 0.831470f, 0.857729f, 0.881921f, 0.903989f,
+ 0.923880f, 0.941544f, 0.956940f, 0.970031f, 0.980785f, 0.989177f, 0.995185f, 0.998795f,
+ 0.000000f, -0.049068f, -0.098017f, -0.146730f, -0.195090f, -0.242980f, -0.290285f, -0.336890f,
+ -0.382683f, -0.427555f, -0.471397f, -0.514103f, -0.555570f, -0.595699f, -0.634393f, -0.671559f,
+ -0.707107f, -0.740951f, -0.773010f, -0.803208f, -0.831470f, -0.857729f, -0.881921f, -0.903989f,
+ -0.923880f, -0.941544f, -0.956940f, -0.970031f, -0.980785f, -0.989177f, -0.995185f, -0.998795f
+};
+
+static const float sinTable256[128] = {
+ 0.000000f, 0.024541f, 0.049068f, 0.073565f, 0.098017f, 0.122411f, 0.146730f, 0.170962f,
+ 0.195090f, 0.219101f, 0.242980f, 0.266713f, 0.290285f, 0.313682f, 0.336890f, 0.359895f,
+ 0.382683f, 0.405241f, 0.427555f, 0.449611f, 0.471397f, 0.492898f, 0.514103f, 0.534998f,
+ 0.555570f, 0.575808f, 0.595699f, 0.615232f, 0.634393f, 0.653173f, 0.671559f, 0.689541f,
+ 0.707107f, 0.724247f, 0.740951f, 0.757209f, 0.773010f, 0.788346f, 0.803208f, 0.817585f,
+ 0.831470f, 0.844854f, 0.857729f, 0.870087f, 0.881921f, 0.893224f, 0.903989f, 0.914210f,
+ 0.923880f, 0.932993f, 0.941544f, 0.949528f, 0.956940f, 0.963776f, 0.970031f, 0.975702f,
+ 0.980785f, 0.985278f, 0.989177f, 0.992480f, 0.995185f, 0.997290f, 0.998795f, 0.999699f,
+ 0.000000f, -0.024541f, -0.049068f, -0.073565f, -0.098017f, -0.122411f, -0.146730f, -0.170962f,
+ -0.195090f, -0.219101f, -0.242980f, -0.266713f, -0.290285f, -0.313682f, -0.336890f, -0.359895f,
+ -0.382683f, -0.405241f, -0.427555f, -0.449611f, -0.471397f, -0.492898f, -0.514103f, -0.534998f,
+ -0.555570f, -0.575808f, -0.595699f, -0.615232f, -0.634393f, -0.653173f, -0.671559f, -0.689541f,
+ -0.707107f, -0.724247f, -0.740951f, -0.757209f, -0.773010f, -0.788346f, -0.803208f, -0.817585f,
+ -0.831470f, -0.844854f, -0.857729f, -0.870087f, -0.881921f, -0.893224f, -0.903989f, -0.914210f,
+ -0.923880f, -0.932993f, -0.941544f, -0.949528f, -0.956940f, -0.963776f, -0.970031f, -0.975702f,
+ -0.980785f, -0.985278f, -0.989177f, -0.992480f, -0.995185f, -0.997290f, -0.998795f, -0.999699f
+};
+
+static const float sinTable512[256] = {
+ 0.000000f, 0.012272f, 0.024541f, 0.036807f, 0.049068f, 0.061321f, 0.073565f, 0.085797f,
+ 0.098017f, 0.110222f, 0.122411f, 0.134581f, 0.146730f, 0.158858f, 0.170962f, 0.183040f,
+ 0.195090f, 0.207111f, 0.219101f, 0.231058f, 0.242980f, 0.254866f, 0.266713f, 0.278520f,
+ 0.290285f, 0.302006f, 0.313682f, 0.325310f, 0.336890f, 0.348419f, 0.359895f, 0.371317f,
+ 0.382683f, 0.393992f, 0.405241f, 0.416430f, 0.427555f, 0.438616f, 0.449611f, 0.460539f,
+ 0.471397f, 0.482184f, 0.492898f, 0.503538f, 0.514103f, 0.524590f, 0.534998f, 0.545325f,
+ 0.555570f, 0.565732f, 0.575808f, 0.585798f, 0.595699f, 0.605511f, 0.615232f, 0.624860f,
+ 0.634393f, 0.643832f, 0.653173f, 0.662416f, 0.671559f, 0.680601f, 0.689541f, 0.698376f,
+ 0.707107f, 0.715731f, 0.724247f, 0.732654f, 0.740951f, 0.749136f, 0.757209f, 0.765167f,
+ 0.773010f, 0.780737f, 0.788346f, 0.795837f, 0.803208f, 0.810457f, 0.817585f, 0.824589f,
+ 0.831470f, 0.838225f, 0.844854f, 0.851355f, 0.857729f, 0.863973f, 0.870087f, 0.876070f,
+ 0.881921f, 0.887640f, 0.893224f, 0.898674f, 0.903989f, 0.909168f, 0.914210f, 0.919114f,
+ 0.923880f, 0.928506f, 0.932993f, 0.937339f, 0.941544f, 0.945607f, 0.949528f, 0.953306f,
+ 0.956940f, 0.960431f, 0.963776f, 0.966976f, 0.970031f, 0.972940f, 0.975702f, 0.978317f,
+ 0.980785f, 0.983105f, 0.985278f, 0.987301f, 0.989177f, 0.990903f, 0.992480f, 0.993907f,
+ 0.995185f, 0.996313f, 0.997290f, 0.998118f, 0.998795f, 0.999322f, 0.999699f, 0.999925f,
+ 0.000000f, -0.012272f, -0.024541f, -0.036807f, -0.049068f, -0.061321f, -0.073565f, -0.085797f,
+ -0.098017f, -0.110222f, -0.122411f, -0.134581f, -0.146730f, -0.158858f, -0.170962f, -0.183040f,
+ -0.195090f, -0.207111f, -0.219101f, -0.231058f, -0.242980f, -0.254866f, -0.266713f, -0.278520f,
+ -0.290285f, -0.302006f, -0.313682f, -0.325310f, -0.336890f, -0.348419f, -0.359895f, -0.371317f,
+ -0.382683f, -0.393992f, -0.405241f, -0.416430f, -0.427555f, -0.438616f, -0.449611f, -0.460539f,
+ -0.471397f, -0.482184f, -0.492898f, -0.503538f, -0.514103f, -0.524590f, -0.534998f, -0.545325f,
+ -0.555570f, -0.565732f, -0.575808f, -0.585798f, -0.595699f, -0.605511f, -0.615232f, -0.624860f,
+ -0.634393f, -0.643832f, -0.653173f, -0.662416f, -0.671559f, -0.680601f, -0.689541f, -0.698376f,
+ -0.707107f, -0.715731f, -0.724247f, -0.732654f, -0.740951f, -0.749136f, -0.757209f, -0.765167f,
+ -0.773010f, -0.780737f, -0.788346f, -0.795837f, -0.803208f, -0.810457f, -0.817585f, -0.824589f,
+ -0.831470f, -0.838225f, -0.844854f, -0.851355f, -0.857729f, -0.863973f, -0.870087f, -0.876070f,
+ -0.881921f, -0.887640f, -0.893224f, -0.898674f, -0.903989f, -0.909168f, -0.914210f, -0.919114f,
+ -0.923880f, -0.928506f, -0.932993f, -0.937339f, -0.941544f, -0.945607f, -0.949528f, -0.953306f,
+ -0.956940f, -0.960431f, -0.963776f, -0.966976f, -0.970031f, -0.972940f, -0.975702f, -0.978317f,
+ -0.980785f, -0.983105f, -0.985278f, -0.987301f, -0.989177f, -0.990903f, -0.992480f, -0.993907f,
+ -0.995185f, -0.996313f, -0.997290f, -0.998118f, -0.998795f, -0.999322f, -0.999699f, -0.999925f
+};
+
+static const float sinTable1024[512] = {
+ 0.000000f, 0.006136f, 0.012272f, 0.018407f, 0.024541f, 0.030675f, 0.036807f, 0.042938f,
+ 0.049068f, 0.055195f, 0.061321f, 0.067444f, 0.073565f, 0.079682f, 0.085797f, 0.091909f,
+ 0.098017f, 0.104122f, 0.110222f, 0.116319f, 0.122411f, 0.128498f, 0.134581f, 0.140658f,
+ 0.146730f, 0.152797f, 0.158858f, 0.164913f, 0.170962f, 0.177004f, 0.183040f, 0.189069f,
+ 0.195090f, 0.201105f, 0.207111f, 0.213110f, 0.219101f, 0.225084f, 0.231058f, 0.237024f,
+ 0.242980f, 0.248928f, 0.254866f, 0.260794f, 0.266713f, 0.272621f, 0.278520f, 0.284408f,
+ 0.290285f, 0.296151f, 0.302006f, 0.307850f, 0.313682f, 0.319502f, 0.325310f, 0.331106f,
+ 0.336890f, 0.342661f, 0.348419f, 0.354164f, 0.359895f, 0.365613f, 0.371317f, 0.377007f,
+ 0.382683f, 0.388345f, 0.393992f, 0.399624f, 0.405241f, 0.410843f, 0.416430f, 0.422000f,
+ 0.427555f, 0.433094f, 0.438616f, 0.444122f, 0.449611f, 0.455084f, 0.460539f, 0.465977f,
+ 0.471397f, 0.476799f, 0.482184f, 0.487550f, 0.492898f, 0.498228f, 0.503538f, 0.508830f,
+ 0.514103f, 0.519356f, 0.524590f, 0.529804f, 0.534998f, 0.540171f, 0.545325f, 0.550458f,
+ 0.555570f, 0.560662f, 0.565732f, 0.570781f, 0.575808f, 0.580814f, 0.585798f, 0.590760f,
+ 0.595699f, 0.600616f, 0.605511f, 0.610383f, 0.615232f, 0.620057f, 0.624860f, 0.629638f,
+ 0.634393f, 0.639124f, 0.643832f, 0.648514f, 0.653173f, 0.657807f, 0.662416f, 0.667000f,
+ 0.671559f, 0.676093f, 0.680601f, 0.685084f, 0.689541f, 0.693971f, 0.698376f, 0.702755f,
+ 0.707107f, 0.711432f, 0.715731f, 0.720003f, 0.724247f, 0.728464f, 0.732654f, 0.736817f,
+ 0.740951f, 0.745058f, 0.749136f, 0.753187f, 0.757209f, 0.761202f, 0.765167f, 0.769103f,
+ 0.773010f, 0.776888f, 0.780737f, 0.784557f, 0.788346f, 0.792107f, 0.795837f, 0.799537f,
+ 0.803208f, 0.806848f, 0.810457f, 0.814036f, 0.817585f, 0.821102f, 0.824589f, 0.828045f,
+ 0.831470f, 0.834863f, 0.838225f, 0.841555f, 0.844854f, 0.848120f, 0.851355f, 0.854558f,
+ 0.857729f, 0.860867f, 0.863973f, 0.867046f, 0.870087f, 0.873095f, 0.876070f, 0.879012f,
+ 0.881921f, 0.884797f, 0.887640f, 0.890449f, 0.893224f, 0.895966f, 0.898674f, 0.901349f,
+ 0.903989f, 0.906596f, 0.909168f, 0.911706f, 0.914210f, 0.916679f, 0.919114f, 0.921514f,
+ 0.923880f, 0.926210f, 0.928506f, 0.930767f, 0.932993f, 0.935184f, 0.937339f, 0.939459f,
+ 0.941544f, 0.943593f, 0.945607f, 0.947586f, 0.949528f, 0.951435f, 0.953306f, 0.955141f,
+ 0.956940f, 0.958703f, 0.960431f, 0.962121f, 0.963776f, 0.965394f, 0.966976f, 0.968522f,
+ 0.970031f, 0.971504f, 0.972940f, 0.974339f, 0.975702f, 0.977028f, 0.978317f, 0.979570f,
+ 0.980785f, 0.981964f, 0.983105f, 0.984210f, 0.985278f, 0.986308f, 0.987301f, 0.988258f,
+ 0.989177f, 0.990058f, 0.990903f, 0.991710f, 0.992480f, 0.993212f, 0.993907f, 0.994565f,
+ 0.995185f, 0.995767f, 0.996313f, 0.996820f, 0.997290f, 0.997723f, 0.998118f, 0.998476f,
+ 0.998795f, 0.999078f, 0.999322f, 0.999529f, 0.999699f, 0.999831f, 0.999925f, 0.999981f,
+ 0.000000f, -0.006136f, -0.012272f, -0.018407f, -0.024541f, -0.030675f, -0.036807f, -0.042938f,
+ -0.049068f, -0.055195f, -0.061321f, -0.067444f, -0.073565f, -0.079682f, -0.085797f, -0.091909f,
+ -0.098017f, -0.104122f, -0.110222f, -0.116319f, -0.122411f, -0.128498f, -0.134581f, -0.140658f,
+ -0.146730f, -0.152797f, -0.158858f, -0.164913f, -0.170962f, -0.177004f, -0.183040f, -0.189069f,
+ -0.195090f, -0.201105f, -0.207111f, -0.213110f, -0.219101f, -0.225084f, -0.231058f, -0.237024f,
+ -0.242980f, -0.248928f, -0.254866f, -0.260794f, -0.266713f, -0.272621f, -0.278520f, -0.284408f,
+ -0.290285f, -0.296151f, -0.302006f, -0.307850f, -0.313682f, -0.319502f, -0.325310f, -0.331106f,
+ -0.336890f, -0.342661f, -0.348419f, -0.354164f, -0.359895f, -0.365613f, -0.371317f, -0.377007f,
+ -0.382683f, -0.388345f, -0.393992f, -0.399624f, -0.405241f, -0.410843f, -0.416430f, -0.422000f,
+ -0.427555f, -0.433094f, -0.438616f, -0.444122f, -0.449611f, -0.455084f, -0.460539f, -0.465977f,
+ -0.471397f, -0.476799f, -0.482184f, -0.487550f, -0.492898f, -0.498228f, -0.503538f, -0.508830f,
+ -0.514103f, -0.519356f, -0.524590f, -0.529804f, -0.534998f, -0.540171f, -0.545325f, -0.550458f,
+ -0.555570f, -0.560662f, -0.565732f, -0.570781f, -0.575808f, -0.580814f, -0.585798f, -0.590760f,
+ -0.595699f, -0.600616f, -0.605511f, -0.610383f, -0.615232f, -0.620057f, -0.624860f, -0.629638f,
+ -0.634393f, -0.639124f, -0.643832f, -0.648514f, -0.653173f, -0.657807f, -0.662416f, -0.667000f,
+ -0.671559f, -0.676093f, -0.680601f, -0.685084f, -0.689541f, -0.693971f, -0.698376f, -0.702755f,
+ -0.707107f, -0.711432f, -0.715731f, -0.720003f, -0.724247f, -0.728464f, -0.732654f, -0.736817f,
+ -0.740951f, -0.745058f, -0.749136f, -0.753187f, -0.757209f, -0.761202f, -0.765167f, -0.769103f,
+ -0.773010f, -0.776888f, -0.780737f, -0.784557f, -0.788346f, -0.792107f, -0.795837f, -0.799537f,
+ -0.803208f, -0.806848f, -0.810457f, -0.814036f, -0.817585f, -0.821102f, -0.824589f, -0.828045f,
+ -0.831470f, -0.834863f, -0.838225f, -0.841555f, -0.844854f, -0.848120f, -0.851355f, -0.854558f,
+ -0.857729f, -0.860867f, -0.863973f, -0.867046f, -0.870087f, -0.873095f, -0.876070f, -0.879012f,
+ -0.881921f, -0.884797f, -0.887640f, -0.890449f, -0.893224f, -0.895966f, -0.898674f, -0.901349f,
+ -0.903989f, -0.906596f, -0.909168f, -0.911706f, -0.914210f, -0.916679f, -0.919114f, -0.921514f,
+ -0.923880f, -0.926210f, -0.928506f, -0.930767f, -0.932993f, -0.935184f, -0.937339f, -0.939459f,
+ -0.941544f, -0.943593f, -0.945607f, -0.947586f, -0.949528f, -0.951435f, -0.953306f, -0.955141f,
+ -0.956940f, -0.958703f, -0.960431f, -0.962121f, -0.963776f, -0.965394f, -0.966976f, -0.968522f,
+ -0.970031f, -0.971504f, -0.972940f, -0.974339f, -0.975702f, -0.977028f, -0.978317f, -0.979570f,
+ -0.980785f, -0.981964f, -0.983105f, -0.984210f, -0.985278f, -0.986308f, -0.987301f, -0.988258f,
+ -0.989177f, -0.990058f, -0.990903f, -0.991710f, -0.992480f, -0.993212f, -0.993907f, -0.994565f,
+ -0.995185f, -0.995767f, -0.996313f, -0.996820f, -0.997290f, -0.997723f, -0.998118f, -0.998476f,
+ -0.998795f, -0.999078f, -0.999322f, -0.999529f, -0.999699f, -0.999831f, -0.999925f, -0.999981f
+};
+
+static const float sinTable2048[1024] = {
+ 0.000000f, 0.003068f, 0.006136f, 0.009204f, 0.012272f, 0.015339f, 0.018407f, 0.021474f,
+ 0.024541f, 0.027608f, 0.030675f, 0.033741f, 0.036807f, 0.039873f, 0.042938f, 0.046003f,
+ 0.049068f, 0.052132f, 0.055195f, 0.058258f, 0.061321f, 0.064383f, 0.067444f, 0.070505f,
+ 0.073565f, 0.076624f, 0.079682f, 0.082740f, 0.085797f, 0.088854f, 0.091909f, 0.094963f,
+ 0.098017f, 0.101070f, 0.104122f, 0.107172f, 0.110222f, 0.113271f, 0.116319f, 0.119365f,
+ 0.122411f, 0.125455f, 0.128498f, 0.131540f, 0.134581f, 0.137620f, 0.140658f, 0.143695f,
+ 0.146730f, 0.149765f, 0.152797f, 0.155828f, 0.158858f, 0.161886f, 0.164913f, 0.167938f,
+ 0.170962f, 0.173984f, 0.177004f, 0.180023f, 0.183040f, 0.186055f, 0.189069f, 0.192080f,
+ 0.195090f, 0.198098f, 0.201105f, 0.204109f, 0.207111f, 0.210112f, 0.213110f, 0.216107f,
+ 0.219101f, 0.222094f, 0.225084f, 0.228072f, 0.231058f, 0.234042f, 0.237024f, 0.240003f,
+ 0.242980f, 0.245955f, 0.248928f, 0.251898f, 0.254866f, 0.257831f, 0.260794f, 0.263755f,
+ 0.266713f, 0.269668f, 0.272621f, 0.275572f, 0.278520f, 0.281465f, 0.284408f, 0.287347f,
+ 0.290285f, 0.293219f, 0.296151f, 0.299080f, 0.302006f, 0.304929f, 0.307850f, 0.310767f,
+ 0.313682f, 0.316593f, 0.319502f, 0.322408f, 0.325310f, 0.328210f, 0.331106f, 0.334000f,
+ 0.336890f, 0.339777f, 0.342661f, 0.345541f, 0.348419f, 0.351293f, 0.354164f, 0.357031f,
+ 0.359895f, 0.362756f, 0.365613f, 0.368467f, 0.371317f, 0.374164f, 0.377007f, 0.379847f,
+ 0.382683f, 0.385516f, 0.388345f, 0.391170f, 0.393992f, 0.396810f, 0.399624f, 0.402435f,
+ 0.405241f, 0.408044f, 0.410843f, 0.413638f, 0.416430f, 0.419217f, 0.422000f, 0.424780f,
+ 0.427555f, 0.430326f, 0.433094f, 0.435857f, 0.438616f, 0.441371f, 0.444122f, 0.446869f,
+ 0.449611f, 0.452350f, 0.455084f, 0.457813f, 0.460539f, 0.463260f, 0.465977f, 0.468689f,
+ 0.471397f, 0.474100f, 0.476799f, 0.479494f, 0.482184f, 0.484869f, 0.487550f, 0.490226f,
+ 0.492898f, 0.495565f, 0.498228f, 0.500885f, 0.503538f, 0.506187f, 0.508830f, 0.511469f,
+ 0.514103f, 0.516732f, 0.519356f, 0.521975f, 0.524590f, 0.527199f, 0.529804f, 0.532403f,
+ 0.534998f, 0.537587f, 0.540171f, 0.542751f, 0.545325f, 0.547894f, 0.550458f, 0.553017f,
+ 0.555570f, 0.558119f, 0.560662f, 0.563199f, 0.565732f, 0.568259f, 0.570781f, 0.573297f,
+ 0.575808f, 0.578314f, 0.580814f, 0.583309f, 0.585798f, 0.588282f, 0.590760f, 0.593232f,
+ 0.595699f, 0.598161f, 0.600616f, 0.603067f, 0.605511f, 0.607950f, 0.610383f, 0.612810f,
+ 0.615232f, 0.617647f, 0.620057f, 0.622461f, 0.624860f, 0.627252f, 0.629638f, 0.632019f,
+ 0.634393f, 0.636762f, 0.639124f, 0.641481f, 0.643832f, 0.646176f, 0.648514f, 0.650847f,
+ 0.653173f, 0.655493f, 0.657807f, 0.660114f, 0.662416f, 0.664711f, 0.667000f, 0.669283f,
+ 0.671559f, 0.673829f, 0.676093f, 0.678350f, 0.680601f, 0.682846f, 0.685084f, 0.687315f,
+ 0.689541f, 0.691759f, 0.693971f, 0.696177f, 0.698376f, 0.700569f, 0.702755f, 0.704934f,
+ 0.707107f, 0.709273f, 0.711432f, 0.713585f, 0.715731f, 0.717870f, 0.720003f, 0.722128f,
+ 0.724247f, 0.726359f, 0.728464f, 0.730563f, 0.732654f, 0.734739f, 0.736817f, 0.738887f,
+ 0.740951f, 0.743008f, 0.745058f, 0.747101f, 0.749136f, 0.751165f, 0.753187f, 0.755201f,
+ 0.757209f, 0.759209f, 0.761202f, 0.763188f, 0.765167f, 0.767139f, 0.769103f, 0.771061f,
+ 0.773010f, 0.774953f, 0.776888f, 0.778817f, 0.780737f, 0.782651f, 0.784557f, 0.786455f,
+ 0.788346f, 0.790230f, 0.792107f, 0.793975f, 0.795837f, 0.797691f, 0.799537f, 0.801376f,
+ 0.803208f, 0.805031f, 0.806848f, 0.808656f, 0.810457f, 0.812251f, 0.814036f, 0.815814f,
+ 0.817585f, 0.819348f, 0.821102f, 0.822850f, 0.824589f, 0.826321f, 0.828045f, 0.829761f,
+ 0.831470f, 0.833170f, 0.834863f, 0.836548f, 0.838225f, 0.839894f, 0.841555f, 0.843208f,
+ 0.844854f, 0.846491f, 0.848120f, 0.849742f, 0.851355f, 0.852961f, 0.854558f, 0.856147f,
+ 0.857729f, 0.859302f, 0.860867f, 0.862424f, 0.863973f, 0.865514f, 0.867046f, 0.868571f,
+ 0.870087f, 0.871595f, 0.873095f, 0.874587f, 0.876070f, 0.877545f, 0.879012f, 0.880471f,
+ 0.881921f, 0.883363f, 0.884797f, 0.886223f, 0.887640f, 0.889048f, 0.890449f, 0.891841f,
+ 0.893224f, 0.894599f, 0.895966f, 0.897325f, 0.898674f, 0.900016f, 0.901349f, 0.902673f,
+ 0.903989f, 0.905297f, 0.906596f, 0.907886f, 0.909168f, 0.910441f, 0.911706f, 0.912962f,
+ 0.914210f, 0.915449f, 0.916679f, 0.917901f, 0.919114f, 0.920318f, 0.921514f, 0.922701f,
+ 0.923880f, 0.925049f, 0.926210f, 0.927363f, 0.928506f, 0.929641f, 0.930767f, 0.931884f,
+ 0.932993f, 0.934093f, 0.935184f, 0.936266f, 0.937339f, 0.938404f, 0.939459f, 0.940506f,
+ 0.941544f, 0.942573f, 0.943593f, 0.944605f, 0.945607f, 0.946601f, 0.947586f, 0.948561f,
+ 0.949528f, 0.950486f, 0.951435f, 0.952375f, 0.953306f, 0.954228f, 0.955141f, 0.956045f,
+ 0.956940f, 0.957826f, 0.958703f, 0.959572f, 0.960431f, 0.961280f, 0.962121f, 0.962953f,
+ 0.963776f, 0.964590f, 0.965394f, 0.966190f, 0.966976f, 0.967754f, 0.968522f, 0.969281f,
+ 0.970031f, 0.970772f, 0.971504f, 0.972227f, 0.972940f, 0.973644f, 0.974339f, 0.975025f,
+ 0.975702f, 0.976370f, 0.977028f, 0.977677f, 0.978317f, 0.978948f, 0.979570f, 0.980182f,
+ 0.980785f, 0.981379f, 0.981964f, 0.982539f, 0.983105f, 0.983662f, 0.984210f, 0.984748f,
+ 0.985278f, 0.985798f, 0.986308f, 0.986809f, 0.987301f, 0.987784f, 0.988258f, 0.988722f,
+ 0.989177f, 0.989622f, 0.990058f, 0.990485f, 0.990903f, 0.991311f, 0.991710f, 0.992099f,
+ 0.992480f, 0.992850f, 0.993212f, 0.993564f, 0.993907f, 0.994240f, 0.994565f, 0.994879f,
+ 0.995185f, 0.995481f, 0.995767f, 0.996045f, 0.996313f, 0.996571f, 0.996820f, 0.997060f,
+ 0.997290f, 0.997511f, 0.997723f, 0.997925f, 0.998118f, 0.998302f, 0.998476f, 0.998640f,
+ 0.998795f, 0.998941f, 0.999078f, 0.999205f, 0.999322f, 0.999431f, 0.999529f, 0.999619f,
+ 0.999699f, 0.999769f, 0.999831f, 0.999882f, 0.999925f, 0.999958f, 0.999981f, 0.999995f,
+ 0.000000f, -0.003068f, -0.006136f, -0.009204f, -0.012272f, -0.015339f, -0.018407f, -0.021474f,
+ -0.024541f, -0.027608f, -0.030675f, -0.033741f, -0.036807f, -0.039873f, -0.042938f, -0.046003f,
+ -0.049068f, -0.052132f, -0.055195f, -0.058258f, -0.061321f, -0.064383f, -0.067444f, -0.070505f,
+ -0.073565f, -0.076624f, -0.079682f, -0.082740f, -0.085797f, -0.088854f, -0.091909f, -0.094963f,
+ -0.098017f, -0.101070f, -0.104122f, -0.107172f, -0.110222f, -0.113271f, -0.116319f, -0.119365f,
+ -0.122411f, -0.125455f, -0.128498f, -0.131540f, -0.134581f, -0.137620f, -0.140658f, -0.143695f,
+ -0.146730f, -0.149765f, -0.152797f, -0.155828f, -0.158858f, -0.161886f, -0.164913f, -0.167938f,
+ -0.170962f, -0.173984f, -0.177004f, -0.180023f, -0.183040f, -0.186055f, -0.189069f, -0.192080f,
+ -0.195090f, -0.198098f, -0.201105f, -0.204109f, -0.207111f, -0.210112f, -0.213110f, -0.216107f,
+ -0.219101f, -0.222094f, -0.225084f, -0.228072f, -0.231058f, -0.234042f, -0.237024f, -0.240003f,
+ -0.242980f, -0.245955f, -0.248928f, -0.251898f, -0.254866f, -0.257831f, -0.260794f, -0.263755f,
+ -0.266713f, -0.269668f, -0.272621f, -0.275572f, -0.278520f, -0.281465f, -0.284408f, -0.287347f,
+ -0.290285f, -0.293219f, -0.296151f, -0.299080f, -0.302006f, -0.304929f, -0.307850f, -0.310767f,
+ -0.313682f, -0.316593f, -0.319502f, -0.322408f, -0.325310f, -0.328210f, -0.331106f, -0.334000f,
+ -0.336890f, -0.339777f, -0.342661f, -0.345541f, -0.348419f, -0.351293f, -0.354164f, -0.357031f,
+ -0.359895f, -0.362756f, -0.365613f, -0.368467f, -0.371317f, -0.374164f, -0.377007f, -0.379847f,
+ -0.382683f, -0.385516f, -0.388345f, -0.391170f, -0.393992f, -0.396810f, -0.399624f, -0.402435f,
+ -0.405241f, -0.408044f, -0.410843f, -0.413638f, -0.416430f, -0.419217f, -0.422000f, -0.424780f,
+ -0.427555f, -0.430326f, -0.433094f, -0.435857f, -0.438616f, -0.441371f, -0.444122f, -0.446869f,
+ -0.449611f, -0.452350f, -0.455084f, -0.457813f, -0.460539f, -0.463260f, -0.465977f, -0.468689f,
+ -0.471397f, -0.474100f, -0.476799f, -0.479494f, -0.482184f, -0.484869f, -0.487550f, -0.490226f,
+ -0.492898f, -0.495565f, -0.498228f, -0.500885f, -0.503538f, -0.506187f, -0.508830f, -0.511469f,
+ -0.514103f, -0.516732f, -0.519356f, -0.521975f, -0.524590f, -0.527199f, -0.529804f, -0.532403f,
+ -0.534998f, -0.537587f, -0.540171f, -0.542751f, -0.545325f, -0.547894f, -0.550458f, -0.553017f,
+ -0.555570f, -0.558119f, -0.560662f, -0.563199f, -0.565732f, -0.568259f, -0.570781f, -0.573297f,
+ -0.575808f, -0.578314f, -0.580814f, -0.583309f, -0.585798f, -0.588282f, -0.590760f, -0.593232f,
+ -0.595699f, -0.598161f, -0.600616f, -0.603067f, -0.605511f, -0.607950f, -0.610383f, -0.612810f,
+ -0.615232f, -0.617647f, -0.620057f, -0.622461f, -0.624860f, -0.627252f, -0.629638f, -0.632019f,
+ -0.634393f, -0.636762f, -0.639124f, -0.641481f, -0.643832f, -0.646176f, -0.648514f, -0.650847f,
+ -0.653173f, -0.655493f, -0.657807f, -0.660114f, -0.662416f, -0.664711f, -0.667000f, -0.669283f,
+ -0.671559f, -0.673829f, -0.676093f, -0.678350f, -0.680601f, -0.682846f, -0.685084f, -0.687315f,
+ -0.689541f, -0.691759f, -0.693971f, -0.696177f, -0.698376f, -0.700569f, -0.702755f, -0.704934f,
+ -0.707107f, -0.709273f, -0.711432f, -0.713585f, -0.715731f, -0.717870f, -0.720003f, -0.722128f,
+ -0.724247f, -0.726359f, -0.728464f, -0.730563f, -0.732654f, -0.734739f, -0.736817f, -0.738887f,
+ -0.740951f, -0.743008f, -0.745058f, -0.747101f, -0.749136f, -0.751165f, -0.753187f, -0.755201f,
+ -0.757209f, -0.759209f, -0.761202f, -0.763188f, -0.765167f, -0.767139f, -0.769103f, -0.771061f,
+ -0.773010f, -0.774953f, -0.776888f, -0.778817f, -0.780737f, -0.782651f, -0.784557f, -0.786455f,
+ -0.788346f, -0.790230f, -0.792107f, -0.793975f, -0.795837f, -0.797691f, -0.799537f, -0.801376f,
+ -0.803208f, -0.805031f, -0.806848f, -0.808656f, -0.810457f, -0.812251f, -0.814036f, -0.815814f,
+ -0.817585f, -0.819348f, -0.821102f, -0.822850f, -0.824589f, -0.826321f, -0.828045f, -0.829761f,
+ -0.831470f, -0.833170f, -0.834863f, -0.836548f, -0.838225f, -0.839894f, -0.841555f, -0.843208f,
+ -0.844854f, -0.846491f, -0.848120f, -0.849742f, -0.851355f, -0.852961f, -0.854558f, -0.856147f,
+ -0.857729f, -0.859302f, -0.860867f, -0.862424f, -0.863973f, -0.865514f, -0.867046f, -0.868571f,
+ -0.870087f, -0.871595f, -0.873095f, -0.874587f, -0.876070f, -0.877545f, -0.879012f, -0.880471f,
+ -0.881921f, -0.883363f, -0.884797f, -0.886223f, -0.887640f, -0.889048f, -0.890449f, -0.891841f,
+ -0.893224f, -0.894599f, -0.895966f, -0.897325f, -0.898674f, -0.900016f, -0.901349f, -0.902673f,
+ -0.903989f, -0.905297f, -0.906596f, -0.907886f, -0.909168f, -0.910441f, -0.911706f, -0.912962f,
+ -0.914210f, -0.915449f, -0.916679f, -0.917901f, -0.919114f, -0.920318f, -0.921514f, -0.922701f,
+ -0.923880f, -0.925049f, -0.926210f, -0.927363f, -0.928506f, -0.929641f, -0.930767f, -0.931884f,
+ -0.932993f, -0.934093f, -0.935184f, -0.936266f, -0.937339f, -0.938404f, -0.939459f, -0.940506f,
+ -0.941544f, -0.942573f, -0.943593f, -0.944605f, -0.945607f, -0.946601f, -0.947586f, -0.948561f,
+ -0.949528f, -0.950486f, -0.951435f, -0.952375f, -0.953306f, -0.954228f, -0.955141f, -0.956045f,
+ -0.956940f, -0.957826f, -0.958703f, -0.959572f, -0.960431f, -0.961280f, -0.962121f, -0.962953f,
+ -0.963776f, -0.964590f, -0.965394f, -0.966190f, -0.966976f, -0.967754f, -0.968522f, -0.969281f,
+ -0.970031f, -0.970772f, -0.971504f, -0.972227f, -0.972940f, -0.973644f, -0.974339f, -0.975025f,
+ -0.975702f, -0.976370f, -0.977028f, -0.977677f, -0.978317f, -0.978948f, -0.979570f, -0.980182f,
+ -0.980785f, -0.981379f, -0.981964f, -0.982539f, -0.983105f, -0.983662f, -0.984210f, -0.984748f,
+ -0.985278f, -0.985798f, -0.986308f, -0.986809f, -0.987301f, -0.987784f, -0.988258f, -0.988722f,
+ -0.989177f, -0.989622f, -0.990058f, -0.990485f, -0.990903f, -0.991311f, -0.991710f, -0.992099f,
+ -0.992480f, -0.992850f, -0.993212f, -0.993564f, -0.993907f, -0.994240f, -0.994565f, -0.994879f,
+ -0.995185f, -0.995481f, -0.995767f, -0.996045f, -0.996313f, -0.996571f, -0.996820f, -0.997060f,
+ -0.997290f, -0.997511f, -0.997723f, -0.997925f, -0.998118f, -0.998302f, -0.998476f, -0.998640f,
+ -0.998795f, -0.998941f, -0.999078f, -0.999205f, -0.999322f, -0.999431f, -0.999529f, -0.999619f,
+ -0.999699f, -0.999769f, -0.999831f, -0.999882f, -0.999925f, -0.999958f, -0.999981f, -0.999995f
+};
+
+static const float sinTable4096[2048] = {
+ 0.000000f, 0.001534f, 0.003068f, 0.004602f, 0.006136f, 0.007670f, 0.009204f, 0.010738f,
+ 0.012272f, 0.013805f, 0.015339f, 0.016873f, 0.018407f, 0.019940f, 0.021474f, 0.023008f,
+ 0.024541f, 0.026075f, 0.027608f, 0.029142f, 0.030675f, 0.032208f, 0.033741f, 0.035274f,
+ 0.036807f, 0.038340f, 0.039873f, 0.041406f, 0.042938f, 0.044471f, 0.046003f, 0.047535f,
+ 0.049068f, 0.050600f, 0.052132f, 0.053664f, 0.055195f, 0.056727f, 0.058258f, 0.059790f,
+ 0.061321f, 0.062852f, 0.064383f, 0.065913f, 0.067444f, 0.068974f, 0.070505f, 0.072035f,
+ 0.073565f, 0.075094f, 0.076624f, 0.078153f, 0.079682f, 0.081211f, 0.082740f, 0.084269f,
+ 0.085797f, 0.087326f, 0.088854f, 0.090381f, 0.091909f, 0.093436f, 0.094963f, 0.096490f,
+ 0.098017f, 0.099544f, 0.101070f, 0.102596f, 0.104122f, 0.105647f, 0.107172f, 0.108697f,
+ 0.110222f, 0.111747f, 0.113271f, 0.114795f, 0.116319f, 0.117842f, 0.119365f, 0.120888f,
+ 0.122411f, 0.123933f, 0.125455f, 0.126977f, 0.128498f, 0.130019f, 0.131540f, 0.133061f,
+ 0.134581f, 0.136101f, 0.137620f, 0.139139f, 0.140658f, 0.142177f, 0.143695f, 0.145213f,
+ 0.146730f, 0.148248f, 0.149765f, 0.151281f, 0.152797f, 0.154313f, 0.155828f, 0.157343f,
+ 0.158858f, 0.160372f, 0.161886f, 0.163400f, 0.164913f, 0.166426f, 0.167938f, 0.169450f,
+ 0.170962f, 0.172473f, 0.173984f, 0.175494f, 0.177004f, 0.178514f, 0.180023f, 0.181532f,
+ 0.183040f, 0.184548f, 0.186055f, 0.187562f, 0.189069f, 0.190575f, 0.192080f, 0.193586f,
+ 0.195090f, 0.196595f, 0.198098f, 0.199602f, 0.201105f, 0.202607f, 0.204109f, 0.205610f,
+ 0.207111f, 0.208612f, 0.210112f, 0.211611f, 0.213110f, 0.214609f, 0.216107f, 0.217604f,
+ 0.219101f, 0.220598f, 0.222094f, 0.223589f, 0.225084f, 0.226578f, 0.228072f, 0.229565f,
+ 0.231058f, 0.232550f, 0.234042f, 0.235533f, 0.237024f, 0.238514f, 0.240003f, 0.241492f,
+ 0.242980f, 0.244468f, 0.245955f, 0.247442f, 0.248928f, 0.250413f, 0.251898f, 0.253382f,
+ 0.254866f, 0.256349f, 0.257831f, 0.259313f, 0.260794f, 0.262275f, 0.263755f, 0.265234f,
+ 0.266713f, 0.268191f, 0.269668f, 0.271145f, 0.272621f, 0.274097f, 0.275572f, 0.277046f,
+ 0.278520f, 0.279993f, 0.281465f, 0.282937f, 0.284408f, 0.285878f, 0.287347f, 0.288816f,
+ 0.290285f, 0.291752f, 0.293219f, 0.294685f, 0.296151f, 0.297616f, 0.299080f, 0.300543f,
+ 0.302006f, 0.303468f, 0.304929f, 0.306390f, 0.307850f, 0.309309f, 0.310767f, 0.312225f,
+ 0.313682f, 0.315138f, 0.316593f, 0.318048f, 0.319502f, 0.320955f, 0.322408f, 0.323859f,
+ 0.325310f, 0.326760f, 0.328210f, 0.329658f, 0.331106f, 0.332553f, 0.334000f, 0.335445f,
+ 0.336890f, 0.338334f, 0.339777f, 0.341219f, 0.342661f, 0.344101f, 0.345541f, 0.346980f,
+ 0.348419f, 0.349856f, 0.351293f, 0.352729f, 0.354164f, 0.355598f, 0.357031f, 0.358463f,
+ 0.359895f, 0.361326f, 0.362756f, 0.364185f, 0.365613f, 0.367040f, 0.368467f, 0.369892f,
+ 0.371317f, 0.372741f, 0.374164f, 0.375586f, 0.377007f, 0.378428f, 0.379847f, 0.381266f,
+ 0.382683f, 0.384100f, 0.385516f, 0.386931f, 0.388345f, 0.389758f, 0.391170f, 0.392582f,
+ 0.393992f, 0.395401f, 0.396810f, 0.398218f, 0.399624f, 0.401030f, 0.402435f, 0.403838f,
+ 0.405241f, 0.406643f, 0.408044f, 0.409444f, 0.410843f, 0.412241f, 0.413638f, 0.415034f,
+ 0.416430f, 0.417824f, 0.419217f, 0.420609f, 0.422000f, 0.423390f, 0.424780f, 0.426168f,
+ 0.427555f, 0.428941f, 0.430326f, 0.431711f, 0.433094f, 0.434476f, 0.435857f, 0.437237f,
+ 0.438616f, 0.439994f, 0.441371f, 0.442747f, 0.444122f, 0.445496f, 0.446869f, 0.448241f,
+ 0.449611f, 0.450981f, 0.452350f, 0.453717f, 0.455084f, 0.456449f, 0.457813f, 0.459177f,
+ 0.460539f, 0.461900f, 0.463260f, 0.464619f, 0.465977f, 0.467333f, 0.468689f, 0.470043f,
+ 0.471397f, 0.472749f, 0.474100f, 0.475450f, 0.476799f, 0.478147f, 0.479494f, 0.480839f,
+ 0.482184f, 0.483527f, 0.484869f, 0.486210f, 0.487550f, 0.488889f, 0.490226f, 0.491563f,
+ 0.492898f, 0.494232f, 0.495565f, 0.496897f, 0.498228f, 0.499557f, 0.500885f, 0.502212f,
+ 0.503538f, 0.504863f, 0.506187f, 0.507509f, 0.508830f, 0.510150f, 0.511469f, 0.512786f,
+ 0.514103f, 0.515418f, 0.516732f, 0.518045f, 0.519356f, 0.520666f, 0.521975f, 0.523283f,
+ 0.524590f, 0.525895f, 0.527199f, 0.528502f, 0.529804f, 0.531104f, 0.532403f, 0.533701f,
+ 0.534998f, 0.536293f, 0.537587f, 0.538880f, 0.540171f, 0.541462f, 0.542751f, 0.544039f,
+ 0.545325f, 0.546610f, 0.547894f, 0.549177f, 0.550458f, 0.551738f, 0.553017f, 0.554294f,
+ 0.555570f, 0.556845f, 0.558119f, 0.559391f, 0.560662f, 0.561931f, 0.563199f, 0.564466f,
+ 0.565732f, 0.566996f, 0.568259f, 0.569521f, 0.570781f, 0.572040f, 0.573297f, 0.574553f,
+ 0.575808f, 0.577062f, 0.578314f, 0.579565f, 0.580814f, 0.582062f, 0.583309f, 0.584554f,
+ 0.585798f, 0.587040f, 0.588282f, 0.589521f, 0.590760f, 0.591997f, 0.593232f, 0.594467f,
+ 0.595699f, 0.596931f, 0.598161f, 0.599389f, 0.600616f, 0.601842f, 0.603067f, 0.604290f,
+ 0.605511f, 0.606731f, 0.607950f, 0.609167f, 0.610383f, 0.611597f, 0.612810f, 0.614022f,
+ 0.615232f, 0.616440f, 0.617647f, 0.618853f, 0.620057f, 0.621260f, 0.622461f, 0.623661f,
+ 0.624860f, 0.626056f, 0.627252f, 0.628446f, 0.629638f, 0.630829f, 0.632019f, 0.633207f,
+ 0.634393f, 0.635578f, 0.636762f, 0.637944f, 0.639124f, 0.640303f, 0.641481f, 0.642657f,
+ 0.643832f, 0.645005f, 0.646176f, 0.647346f, 0.648514f, 0.649681f, 0.650847f, 0.652011f,
+ 0.653173f, 0.654334f, 0.655493f, 0.656651f, 0.657807f, 0.658961f, 0.660114f, 0.661266f,
+ 0.662416f, 0.663564f, 0.664711f, 0.665856f, 0.667000f, 0.668142f, 0.669283f, 0.670422f,
+ 0.671559f, 0.672695f, 0.673829f, 0.674962f, 0.676093f, 0.677222f, 0.678350f, 0.679476f,
+ 0.680601f, 0.681724f, 0.682846f, 0.683965f, 0.685084f, 0.686200f, 0.687315f, 0.688429f,
+ 0.689541f, 0.690651f, 0.691759f, 0.692866f, 0.693971f, 0.695075f, 0.696177f, 0.697277f,
+ 0.698376f, 0.699473f, 0.700569f, 0.701663f, 0.702755f, 0.703845f, 0.704934f, 0.706021f,
+ 0.707107f, 0.708191f, 0.709273f, 0.710353f, 0.711432f, 0.712509f, 0.713585f, 0.714659f,
+ 0.715731f, 0.716801f, 0.717870f, 0.718937f, 0.720003f, 0.721066f, 0.722128f, 0.723188f,
+ 0.724247f, 0.725304f, 0.726359f, 0.727413f, 0.728464f, 0.729514f, 0.730563f, 0.731609f,
+ 0.732654f, 0.733697f, 0.734739f, 0.735779f, 0.736817f, 0.737853f, 0.738887f, 0.739920f,
+ 0.740951f, 0.741980f, 0.743008f, 0.744034f, 0.745058f, 0.746080f, 0.747101f, 0.748119f,
+ 0.749136f, 0.750152f, 0.751165f, 0.752177f, 0.753187f, 0.754195f, 0.755201f, 0.756206f,
+ 0.757209f, 0.758210f, 0.759209f, 0.760207f, 0.761202f, 0.762196f, 0.763188f, 0.764179f,
+ 0.765167f, 0.766154f, 0.767139f, 0.768122f, 0.769103f, 0.770083f, 0.771061f, 0.772036f,
+ 0.773010f, 0.773983f, 0.774953f, 0.775922f, 0.776888f, 0.777853f, 0.778817f, 0.779778f,
+ 0.780737f, 0.781695f, 0.782651f, 0.783605f, 0.784557f, 0.785507f, 0.786455f, 0.787402f,
+ 0.788346f, 0.789289f, 0.790230f, 0.791169f, 0.792107f, 0.793042f, 0.793975f, 0.794907f,
+ 0.795837f, 0.796765f, 0.797691f, 0.798615f, 0.799537f, 0.800458f, 0.801376f, 0.802293f,
+ 0.803208f, 0.804120f, 0.805031f, 0.805940f, 0.806848f, 0.807753f, 0.808656f, 0.809558f,
+ 0.810457f, 0.811355f, 0.812251f, 0.813144f, 0.814036f, 0.814926f, 0.815814f, 0.816701f,
+ 0.817585f, 0.818467f, 0.819348f, 0.820226f, 0.821102f, 0.821977f, 0.822850f, 0.823721f,
+ 0.824589f, 0.825456f, 0.826321f, 0.827184f, 0.828045f, 0.828904f, 0.829761f, 0.830616f,
+ 0.831470f, 0.832321f, 0.833170f, 0.834018f, 0.834863f, 0.835706f, 0.836548f, 0.837387f,
+ 0.838225f, 0.839060f, 0.839894f, 0.840725f, 0.841555f, 0.842383f, 0.843208f, 0.844032f,
+ 0.844854f, 0.845673f, 0.846491f, 0.847307f, 0.848120f, 0.848932f, 0.849742f, 0.850549f,
+ 0.851355f, 0.852159f, 0.852961f, 0.853760f, 0.854558f, 0.855354f, 0.856147f, 0.856939f,
+ 0.857729f, 0.858516f, 0.859302f, 0.860085f, 0.860867f, 0.861646f, 0.862424f, 0.863199f,
+ 0.863973f, 0.864744f, 0.865514f, 0.866281f, 0.867046f, 0.867809f, 0.868571f, 0.869330f,
+ 0.870087f, 0.870842f, 0.871595f, 0.872346f, 0.873095f, 0.873842f, 0.874587f, 0.875329f,
+ 0.876070f, 0.876809f, 0.877545f, 0.878280f, 0.879012f, 0.879743f, 0.880471f, 0.881197f,
+ 0.881921f, 0.882643f, 0.883363f, 0.884081f, 0.884797f, 0.885511f, 0.886223f, 0.886932f,
+ 0.887640f, 0.888345f, 0.889048f, 0.889750f, 0.890449f, 0.891146f, 0.891841f, 0.892534f,
+ 0.893224f, 0.893913f, 0.894599f, 0.895284f, 0.895966f, 0.896646f, 0.897325f, 0.898001f,
+ 0.898674f, 0.899346f, 0.900016f, 0.900683f, 0.901349f, 0.902012f, 0.902673f, 0.903332f,
+ 0.903989f, 0.904644f, 0.905297f, 0.905947f, 0.906596f, 0.907242f, 0.907886f, 0.908528f,
+ 0.909168f, 0.909806f, 0.910441f, 0.911075f, 0.911706f, 0.912335f, 0.912962f, 0.913587f,
+ 0.914210f, 0.914830f, 0.915449f, 0.916065f, 0.916679f, 0.917291f, 0.917901f, 0.918508f,
+ 0.919114f, 0.919717f, 0.920318f, 0.920917f, 0.921514f, 0.922109f, 0.922701f, 0.923291f,
+ 0.923880f, 0.924465f, 0.925049f, 0.925631f, 0.926210f, 0.926787f, 0.927363f, 0.927935f,
+ 0.928506f, 0.929075f, 0.929641f, 0.930205f, 0.930767f, 0.931327f, 0.931884f, 0.932440f,
+ 0.932993f, 0.933544f, 0.934093f, 0.934639f, 0.935184f, 0.935726f, 0.936266f, 0.936803f,
+ 0.937339f, 0.937872f, 0.938404f, 0.938932f, 0.939459f, 0.939984f, 0.940506f, 0.941026f,
+ 0.941544f, 0.942060f, 0.942573f, 0.943084f, 0.943593f, 0.944100f, 0.944605f, 0.945107f,
+ 0.945607f, 0.946105f, 0.946601f, 0.947094f, 0.947586f, 0.948075f, 0.948561f, 0.949046f,
+ 0.949528f, 0.950008f, 0.950486f, 0.950962f, 0.951435f, 0.951906f, 0.952375f, 0.952842f,
+ 0.953306f, 0.953768f, 0.954228f, 0.954686f, 0.955141f, 0.955594f, 0.956045f, 0.956494f,
+ 0.956940f, 0.957385f, 0.957826f, 0.958266f, 0.958703f, 0.959139f, 0.959572f, 0.960002f,
+ 0.960431f, 0.960857f, 0.961280f, 0.961702f, 0.962121f, 0.962538f, 0.962953f, 0.963366f,
+ 0.963776f, 0.964184f, 0.964590f, 0.964993f, 0.965394f, 0.965793f, 0.966190f, 0.966584f,
+ 0.966976f, 0.967366f, 0.967754f, 0.968139f, 0.968522f, 0.968903f, 0.969281f, 0.969657f,
+ 0.970031f, 0.970403f, 0.970772f, 0.971139f, 0.971504f, 0.971866f, 0.972227f, 0.972584f,
+ 0.972940f, 0.973293f, 0.973644f, 0.973993f, 0.974339f, 0.974684f, 0.975025f, 0.975365f,
+ 0.975702f, 0.976037f, 0.976370f, 0.976700f, 0.977028f, 0.977354f, 0.977677f, 0.977998f,
+ 0.978317f, 0.978634f, 0.978948f, 0.979260f, 0.979570f, 0.979877f, 0.980182f, 0.980485f,
+ 0.980785f, 0.981083f, 0.981379f, 0.981673f, 0.981964f, 0.982253f, 0.982539f, 0.982824f,
+ 0.983105f, 0.983385f, 0.983662f, 0.983937f, 0.984210f, 0.984480f, 0.984748f, 0.985014f,
+ 0.985278f, 0.985539f, 0.985798f, 0.986054f, 0.986308f, 0.986560f, 0.986809f, 0.987057f,
+ 0.987301f, 0.987544f, 0.987784f, 0.988022f, 0.988258f, 0.988491f, 0.988722f, 0.988950f,
+ 0.989177f, 0.989400f, 0.989622f, 0.989841f, 0.990058f, 0.990273f, 0.990485f, 0.990695f,
+ 0.990903f, 0.991108f, 0.991311f, 0.991511f, 0.991710f, 0.991906f, 0.992099f, 0.992291f,
+ 0.992480f, 0.992666f, 0.992850f, 0.993032f, 0.993212f, 0.993389f, 0.993564f, 0.993737f,
+ 0.993907f, 0.994075f, 0.994240f, 0.994404f, 0.994565f, 0.994723f, 0.994879f, 0.995033f,
+ 0.995185f, 0.995334f, 0.995481f, 0.995625f, 0.995767f, 0.995907f, 0.996045f, 0.996180f,
+ 0.996313f, 0.996443f, 0.996571f, 0.996697f, 0.996820f, 0.996941f, 0.997060f, 0.997176f,
+ 0.997290f, 0.997402f, 0.997511f, 0.997618f, 0.997723f, 0.997825f, 0.997925f, 0.998023f,
+ 0.998118f, 0.998211f, 0.998302f, 0.998390f, 0.998476f, 0.998559f, 0.998640f, 0.998719f,
+ 0.998795f, 0.998870f, 0.998941f, 0.999011f, 0.999078f, 0.999142f, 0.999205f, 0.999265f,
+ 0.999322f, 0.999378f, 0.999431f, 0.999481f, 0.999529f, 0.999575f, 0.999619f, 0.999660f,
+ 0.999699f, 0.999735f, 0.999769f, 0.999801f, 0.999831f, 0.999858f, 0.999882f, 0.999905f,
+ 0.999925f, 0.999942f, 0.999958f, 0.999971f, 0.999981f, 0.999989f, 0.999995f, 0.999999f,
+ 0.000000f, -0.001534f, -0.003068f, -0.004602f, -0.006136f, -0.007670f, -0.009204f, -0.010738f,
+ -0.012272f, -0.013805f, -0.015339f, -0.016873f, -0.018407f, -0.019940f, -0.021474f, -0.023008f,
+ -0.024541f, -0.026075f, -0.027608f, -0.029142f, -0.030675f, -0.032208f, -0.033741f, -0.035274f,
+ -0.036807f, -0.038340f, -0.039873f, -0.041406f, -0.042938f, -0.044471f, -0.046003f, -0.047535f,
+ -0.049068f, -0.050600f, -0.052132f, -0.053664f, -0.055195f, -0.056727f, -0.058258f, -0.059790f,
+ -0.061321f, -0.062852f, -0.064383f, -0.065913f, -0.067444f, -0.068974f, -0.070505f, -0.072035f,
+ -0.073565f, -0.075094f, -0.076624f, -0.078153f, -0.079682f, -0.081211f, -0.082740f, -0.084269f,
+ -0.085797f, -0.087326f, -0.088854f, -0.090381f, -0.091909f, -0.093436f, -0.094963f, -0.096490f,
+ -0.098017f, -0.099544f, -0.101070f, -0.102596f, -0.104122f, -0.105647f, -0.107172f, -0.108697f,
+ -0.110222f, -0.111747f, -0.113271f, -0.114795f, -0.116319f, -0.117842f, -0.119365f, -0.120888f,
+ -0.122411f, -0.123933f, -0.125455f, -0.126977f, -0.128498f, -0.130019f, -0.131540f, -0.133061f,
+ -0.134581f, -0.136101f, -0.137620f, -0.139139f, -0.140658f, -0.142177f, -0.143695f, -0.145213f,
+ -0.146730f, -0.148248f, -0.149765f, -0.151281f, -0.152797f, -0.154313f, -0.155828f, -0.157343f,
+ -0.158858f, -0.160372f, -0.161886f, -0.163400f, -0.164913f, -0.166426f, -0.167938f, -0.169450f,
+ -0.170962f, -0.172473f, -0.173984f, -0.175494f, -0.177004f, -0.178514f, -0.180023f, -0.181532f,
+ -0.183040f, -0.184548f, -0.186055f, -0.187562f, -0.189069f, -0.190575f, -0.192080f, -0.193586f,
+ -0.195090f, -0.196595f, -0.198098f, -0.199602f, -0.201105f, -0.202607f, -0.204109f, -0.205610f,
+ -0.207111f, -0.208612f, -0.210112f, -0.211611f, -0.213110f, -0.214609f, -0.216107f, -0.217604f,
+ -0.219101f, -0.220598f, -0.222094f, -0.223589f, -0.225084f, -0.226578f, -0.228072f, -0.229565f,
+ -0.231058f, -0.232550f, -0.234042f, -0.235533f, -0.237024f, -0.238514f, -0.240003f, -0.241492f,
+ -0.242980f, -0.244468f, -0.245955f, -0.247442f, -0.248928f, -0.250413f, -0.251898f, -0.253382f,
+ -0.254866f, -0.256349f, -0.257831f, -0.259313f, -0.260794f, -0.262275f, -0.263755f, -0.265234f,
+ -0.266713f, -0.268191f, -0.269668f, -0.271145f, -0.272621f, -0.274097f, -0.275572f, -0.277046f,
+ -0.278520f, -0.279993f, -0.281465f, -0.282937f, -0.284408f, -0.285878f, -0.287347f, -0.288816f,
+ -0.290285f, -0.291752f, -0.293219f, -0.294685f, -0.296151f, -0.297616f, -0.299080f, -0.300543f,
+ -0.302006f, -0.303468f, -0.304929f, -0.306390f, -0.307850f, -0.309309f, -0.310767f, -0.312225f,
+ -0.313682f, -0.315138f, -0.316593f, -0.318048f, -0.319502f, -0.320955f, -0.322408f, -0.323859f,
+ -0.325310f, -0.326760f, -0.328210f, -0.329658f, -0.331106f, -0.332553f, -0.334000f, -0.335445f,
+ -0.336890f, -0.338334f, -0.339777f, -0.341219f, -0.342661f, -0.344101f, -0.345541f, -0.346980f,
+ -0.348419f, -0.349856f, -0.351293f, -0.352729f, -0.354164f, -0.355598f, -0.357031f, -0.358463f,
+ -0.359895f, -0.361326f, -0.362756f, -0.364185f, -0.365613f, -0.367040f, -0.368467f, -0.369892f,
+ -0.371317f, -0.372741f, -0.374164f, -0.375586f, -0.377007f, -0.378428f, -0.379847f, -0.381266f,
+ -0.382683f, -0.384100f, -0.385516f, -0.386931f, -0.388345f, -0.389758f, -0.391170f, -0.392582f,
+ -0.393992f, -0.395401f, -0.396810f, -0.398218f, -0.399624f, -0.401030f, -0.402435f, -0.403838f,
+ -0.405241f, -0.406643f, -0.408044f, -0.409444f, -0.410843f, -0.412241f, -0.413638f, -0.415034f,
+ -0.416430f, -0.417824f, -0.419217f, -0.420609f, -0.422000f, -0.423390f, -0.424780f, -0.426168f,
+ -0.427555f, -0.428941f, -0.430326f, -0.431711f, -0.433094f, -0.434476f, -0.435857f, -0.437237f,
+ -0.438616f, -0.439994f, -0.441371f, -0.442747f, -0.444122f, -0.445496f, -0.446869f, -0.448241f,
+ -0.449611f, -0.450981f, -0.452350f, -0.453717f, -0.455084f, -0.456449f, -0.457813f, -0.459177f,
+ -0.460539f, -0.461900f, -0.463260f, -0.464619f, -0.465977f, -0.467333f, -0.468689f, -0.470043f,
+ -0.471397f, -0.472749f, -0.474100f, -0.475450f, -0.476799f, -0.478147f, -0.479494f, -0.480839f,
+ -0.482184f, -0.483527f, -0.484869f, -0.486210f, -0.487550f, -0.488889f, -0.490226f, -0.491563f,
+ -0.492898f, -0.494232f, -0.495565f, -0.496897f, -0.498228f, -0.499557f, -0.500885f, -0.502212f,
+ -0.503538f, -0.504863f, -0.506187f, -0.507509f, -0.508830f, -0.510150f, -0.511469f, -0.512786f,
+ -0.514103f, -0.515418f, -0.516732f, -0.518045f, -0.519356f, -0.520666f, -0.521975f, -0.523283f,
+ -0.524590f, -0.525895f, -0.527199f, -0.528502f, -0.529804f, -0.531104f, -0.532403f, -0.533701f,
+ -0.534998f, -0.536293f, -0.537587f, -0.538880f, -0.540171f, -0.541462f, -0.542751f, -0.544039f,
+ -0.545325f, -0.546610f, -0.547894f, -0.549177f, -0.550458f, -0.551738f, -0.553017f, -0.554294f,
+ -0.555570f, -0.556845f, -0.558119f, -0.559391f, -0.560662f, -0.561931f, -0.563199f, -0.564466f,
+ -0.565732f, -0.566996f, -0.568259f, -0.569521f, -0.570781f, -0.572040f, -0.573297f, -0.574553f,
+ -0.575808f, -0.577062f, -0.578314f, -0.579565f, -0.580814f, -0.582062f, -0.583309f, -0.584554f,
+ -0.585798f, -0.587040f, -0.588282f, -0.589521f, -0.590760f, -0.591997f, -0.593232f, -0.594467f,
+ -0.595699f, -0.596931f, -0.598161f, -0.599389f, -0.600616f, -0.601842f, -0.603067f, -0.604290f,
+ -0.605511f, -0.606731f, -0.607950f, -0.609167f, -0.610383f, -0.611597f, -0.612810f, -0.614022f,
+ -0.615232f, -0.616440f, -0.617647f, -0.618853f, -0.620057f, -0.621260f, -0.622461f, -0.623661f,
+ -0.624860f, -0.626056f, -0.627252f, -0.628446f, -0.629638f, -0.630829f, -0.632019f, -0.633207f,
+ -0.634393f, -0.635578f, -0.636762f, -0.637944f, -0.639124f, -0.640303f, -0.641481f, -0.642657f,
+ -0.643832f, -0.645005f, -0.646176f, -0.647346f, -0.648514f, -0.649681f, -0.650847f, -0.652011f,
+ -0.653173f, -0.654334f, -0.655493f, -0.656651f, -0.657807f, -0.658961f, -0.660114f, -0.661266f,
+ -0.662416f, -0.663564f, -0.664711f, -0.665856f, -0.667000f, -0.668142f, -0.669283f, -0.670422f,
+ -0.671559f, -0.672695f, -0.673829f, -0.674962f, -0.676093f, -0.677222f, -0.678350f, -0.679476f,
+ -0.680601f, -0.681724f, -0.682846f, -0.683965f, -0.685084f, -0.686200f, -0.687315f, -0.688429f,
+ -0.689541f, -0.690651f, -0.691759f, -0.692866f, -0.693971f, -0.695075f, -0.696177f, -0.697277f,
+ -0.698376f, -0.699473f, -0.700569f, -0.701663f, -0.702755f, -0.703845f, -0.704934f, -0.706021f,
+ -0.707107f, -0.708191f, -0.709273f, -0.710353f, -0.711432f, -0.712509f, -0.713585f, -0.714659f,
+ -0.715731f, -0.716801f, -0.717870f, -0.718937f, -0.720003f, -0.721066f, -0.722128f, -0.723188f,
+ -0.724247f, -0.725304f, -0.726359f, -0.727413f, -0.728464f, -0.729514f, -0.730563f, -0.731609f,
+ -0.732654f, -0.733697f, -0.734739f, -0.735779f, -0.736817f, -0.737853f, -0.738887f, -0.739920f,
+ -0.740951f, -0.741980f, -0.743008f, -0.744034f, -0.745058f, -0.746080f, -0.747101f, -0.748119f,
+ -0.749136f, -0.750152f, -0.751165f, -0.752177f, -0.753187f, -0.754195f, -0.755201f, -0.756206f,
+ -0.757209f, -0.758210f, -0.759209f, -0.760207f, -0.761202f, -0.762196f, -0.763188f, -0.764179f,
+ -0.765167f, -0.766154f, -0.767139f, -0.768122f, -0.769103f, -0.770083f, -0.771061f, -0.772036f,
+ -0.773010f, -0.773983f, -0.774953f, -0.775922f, -0.776888f, -0.777853f, -0.778817f, -0.779778f,
+ -0.780737f, -0.781695f, -0.782651f, -0.783605f, -0.784557f, -0.785507f, -0.786455f, -0.787402f,
+ -0.788346f, -0.789289f, -0.790230f, -0.791169f, -0.792107f, -0.793042f, -0.793975f, -0.794907f,
+ -0.795837f, -0.796765f, -0.797691f, -0.798615f, -0.799537f, -0.800458f, -0.801376f, -0.802293f,
+ -0.803208f, -0.804120f, -0.805031f, -0.805940f, -0.806848f, -0.807753f, -0.808656f, -0.809558f,
+ -0.810457f, -0.811355f, -0.812251f, -0.813144f, -0.814036f, -0.814926f, -0.815814f, -0.816701f,
+ -0.817585f, -0.818467f, -0.819348f, -0.820226f, -0.821102f, -0.821977f, -0.822850f, -0.823721f,
+ -0.824589f, -0.825456f, -0.826321f, -0.827184f, -0.828045f, -0.828904f, -0.829761f, -0.830616f,
+ -0.831470f, -0.832321f, -0.833170f, -0.834018f, -0.834863f, -0.835706f, -0.836548f, -0.837387f,
+ -0.838225f, -0.839060f, -0.839894f, -0.840725f, -0.841555f, -0.842383f, -0.843208f, -0.844032f,
+ -0.844854f, -0.845673f, -0.846491f, -0.847307f, -0.848120f, -0.848932f, -0.849742f, -0.850549f,
+ -0.851355f, -0.852159f, -0.852961f, -0.853760f, -0.854558f, -0.855354f, -0.856147f, -0.856939f,
+ -0.857729f, -0.858516f, -0.859302f, -0.860085f, -0.860867f, -0.861646f, -0.862424f, -0.863199f,
+ -0.863973f, -0.864744f, -0.865514f, -0.866281f, -0.867046f, -0.867809f, -0.868571f, -0.869330f,
+ -0.870087f, -0.870842f, -0.871595f, -0.872346f, -0.873095f, -0.873842f, -0.874587f, -0.875329f,
+ -0.876070f, -0.876809f, -0.877545f, -0.878280f, -0.879012f, -0.879743f, -0.880471f, -0.881197f,
+ -0.881921f, -0.882643f, -0.883363f, -0.884081f, -0.884797f, -0.885511f, -0.886223f, -0.886932f,
+ -0.887640f, -0.888345f, -0.889048f, -0.889750f, -0.890449f, -0.891146f, -0.891841f, -0.892534f,
+ -0.893224f, -0.893913f, -0.894599f, -0.895284f, -0.895966f, -0.896646f, -0.897325f, -0.898001f,
+ -0.898674f, -0.899346f, -0.900016f, -0.900683f, -0.901349f, -0.902012f, -0.902673f, -0.903332f,
+ -0.903989f, -0.904644f, -0.905297f, -0.905947f, -0.906596f, -0.907242f, -0.907886f, -0.908528f,
+ -0.909168f, -0.909806f, -0.910441f, -0.911075f, -0.911706f, -0.912335f, -0.912962f, -0.913587f,
+ -0.914210f, -0.914830f, -0.915449f, -0.916065f, -0.916679f, -0.917291f, -0.917901f, -0.918508f,
+ -0.919114f, -0.919717f, -0.920318f, -0.920917f, -0.921514f, -0.922109f, -0.922701f, -0.923291f,
+ -0.923880f, -0.924465f, -0.925049f, -0.925631f, -0.926210f, -0.926787f, -0.927363f, -0.927935f,
+ -0.928506f, -0.929075f, -0.929641f, -0.930205f, -0.930767f, -0.931327f, -0.931884f, -0.932440f,
+ -0.932993f, -0.933544f, -0.934093f, -0.934639f, -0.935184f, -0.935726f, -0.936266f, -0.936803f,
+ -0.937339f, -0.937872f, -0.938404f, -0.938932f, -0.939459f, -0.939984f, -0.940506f, -0.941026f,
+ -0.941544f, -0.942060f, -0.942573f, -0.943084f, -0.943593f, -0.944100f, -0.944605f, -0.945107f,
+ -0.945607f, -0.946105f, -0.946601f, -0.947094f, -0.947586f, -0.948075f, -0.948561f, -0.949046f,
+ -0.949528f, -0.950008f, -0.950486f, -0.950962f, -0.951435f, -0.951906f, -0.952375f, -0.952842f,
+ -0.953306f, -0.953768f, -0.954228f, -0.954686f, -0.955141f, -0.955594f, -0.956045f, -0.956494f,
+ -0.956940f, -0.957385f, -0.957826f, -0.958266f, -0.958703f, -0.959139f, -0.959572f, -0.960002f,
+ -0.960431f, -0.960857f, -0.961280f, -0.961702f, -0.962121f, -0.962538f, -0.962953f, -0.963366f,
+ -0.963776f, -0.964184f, -0.964590f, -0.964993f, -0.965394f, -0.965793f, -0.966190f, -0.966584f,
+ -0.966976f, -0.967366f, -0.967754f, -0.968139f, -0.968522f, -0.968903f, -0.969281f, -0.969657f,
+ -0.970031f, -0.970403f, -0.970772f, -0.971139f, -0.971504f, -0.971866f, -0.972227f, -0.972584f,
+ -0.972940f, -0.973293f, -0.973644f, -0.973993f, -0.974339f, -0.974684f, -0.975025f, -0.975365f,
+ -0.975702f, -0.976037f, -0.976370f, -0.976700f, -0.977028f, -0.977354f, -0.977677f, -0.977998f,
+ -0.978317f, -0.978634f, -0.978948f, -0.979260f, -0.979570f, -0.979877f, -0.980182f, -0.980485f,
+ -0.980785f, -0.981083f, -0.981379f, -0.981673f, -0.981964f, -0.982253f, -0.982539f, -0.982824f,
+ -0.983105f, -0.983385f, -0.983662f, -0.983937f, -0.984210f, -0.984480f, -0.984748f, -0.985014f,
+ -0.985278f, -0.985539f, -0.985798f, -0.986054f, -0.986308f, -0.986560f, -0.986809f, -0.987057f,
+ -0.987301f, -0.987544f, -0.987784f, -0.988022f, -0.988258f, -0.988491f, -0.988722f, -0.988950f,
+ -0.989177f, -0.989400f, -0.989622f, -0.989841f, -0.990058f, -0.990273f, -0.990485f, -0.990695f,
+ -0.990903f, -0.991108f, -0.991311f, -0.991511f, -0.991710f, -0.991906f, -0.992099f, -0.992291f,
+ -0.992480f, -0.992666f, -0.992850f, -0.993032f, -0.993212f, -0.993389f, -0.993564f, -0.993737f,
+ -0.993907f, -0.994075f, -0.994240f, -0.994404f, -0.994565f, -0.994723f, -0.994879f, -0.995033f,
+ -0.995185f, -0.995334f, -0.995481f, -0.995625f, -0.995767f, -0.995907f, -0.996045f, -0.996180f,
+ -0.996313f, -0.996443f, -0.996571f, -0.996697f, -0.996820f, -0.996941f, -0.997060f, -0.997176f,
+ -0.997290f, -0.997402f, -0.997511f, -0.997618f, -0.997723f, -0.997825f, -0.997925f, -0.998023f,
+ -0.998118f, -0.998211f, -0.998302f, -0.998390f, -0.998476f, -0.998559f, -0.998640f, -0.998719f,
+ -0.998795f, -0.998870f, -0.998941f, -0.999011f, -0.999078f, -0.999142f, -0.999205f, -0.999265f,
+ -0.999322f, -0.999378f, -0.999431f, -0.999481f, -0.999529f, -0.999575f, -0.999619f, -0.999660f,
+ -0.999699f, -0.999735f, -0.999769f, -0.999801f, -0.999831f, -0.999858f, -0.999882f, -0.999905f,
+ -0.999925f, -0.999942f, -0.999958f, -0.999971f, -0.999981f, -0.999989f, -0.999995f, -0.999999f
+};
+
+static const float sinTable8192[4096] = {
+ 0.000000f, 0.000767f, 0.001534f, 0.002301f, 0.003068f, 0.003835f, 0.004602f, 0.005369f,
+ 0.006136f, 0.006903f, 0.007670f, 0.008437f, 0.009204f, 0.009971f, 0.010738f, 0.011505f,
+ 0.012272f, 0.013038f, 0.013805f, 0.014572f, 0.015339f, 0.016106f, 0.016873f, 0.017640f,
+ 0.018407f, 0.019174f, 0.019940f, 0.020707f, 0.021474f, 0.022241f, 0.023008f, 0.023774f,
+ 0.024541f, 0.025308f, 0.026075f, 0.026841f, 0.027608f, 0.028375f, 0.029142f, 0.029908f,
+ 0.030675f, 0.031441f, 0.032208f, 0.032975f, 0.033741f, 0.034508f, 0.035274f, 0.036041f,
+ 0.036807f, 0.037574f, 0.038340f, 0.039107f, 0.039873f, 0.040639f, 0.041406f, 0.042172f,
+ 0.042938f, 0.043705f, 0.044471f, 0.045237f, 0.046003f, 0.046769f, 0.047535f, 0.048302f,
+ 0.049068f, 0.049834f, 0.050600f, 0.051366f, 0.052132f, 0.052898f, 0.053664f, 0.054429f,
+ 0.055195f, 0.055961f, 0.056727f, 0.057493f, 0.058258f, 0.059024f, 0.059790f, 0.060555f,
+ 0.061321f, 0.062086f, 0.062852f, 0.063617f, 0.064383f, 0.065148f, 0.065913f, 0.066679f,
+ 0.067444f, 0.068209f, 0.068974f, 0.069739f, 0.070505f, 0.071270f, 0.072035f, 0.072800f,
+ 0.073565f, 0.074329f, 0.075094f, 0.075859f, 0.076624f, 0.077389f, 0.078153f, 0.078918f,
+ 0.079682f, 0.080447f, 0.081211f, 0.081976f, 0.082740f, 0.083505f, 0.084269f, 0.085033f,
+ 0.085797f, 0.086561f, 0.087326f, 0.088090f, 0.088854f, 0.089617f, 0.090381f, 0.091145f,
+ 0.091909f, 0.092673f, 0.093436f, 0.094200f, 0.094963f, 0.095727f, 0.096490f, 0.097254f,
+ 0.098017f, 0.098780f, 0.099544f, 0.100307f, 0.101070f, 0.101833f, 0.102596f, 0.103359f,
+ 0.104122f, 0.104884f, 0.105647f, 0.106410f, 0.107172f, 0.107935f, 0.108697f, 0.109460f,
+ 0.110222f, 0.110984f, 0.111747f, 0.112509f, 0.113271f, 0.114033f, 0.114795f, 0.115557f,
+ 0.116319f, 0.117080f, 0.117842f, 0.118604f, 0.119365f, 0.120127f, 0.120888f, 0.121649f,
+ 0.122411f, 0.123172f, 0.123933f, 0.124694f, 0.125455f, 0.126216f, 0.126977f, 0.127737f,
+ 0.128498f, 0.129259f, 0.130019f, 0.130780f, 0.131540f, 0.132300f, 0.133061f, 0.133821f,
+ 0.134581f, 0.135341f, 0.136101f, 0.136860f, 0.137620f, 0.138380f, 0.139139f, 0.139899f,
+ 0.140658f, 0.141418f, 0.142177f, 0.142936f, 0.143695f, 0.144454f, 0.145213f, 0.145972f,
+ 0.146730f, 0.147489f, 0.148248f, 0.149006f, 0.149765f, 0.150523f, 0.151281f, 0.152039f,
+ 0.152797f, 0.153555f, 0.154313f, 0.155071f, 0.155828f, 0.156586f, 0.157343f, 0.158101f,
+ 0.158858f, 0.159615f, 0.160372f, 0.161129f, 0.161886f, 0.162643f, 0.163400f, 0.164157f,
+ 0.164913f, 0.165670f, 0.166426f, 0.167182f, 0.167938f, 0.168694f, 0.169450f, 0.170206f,
+ 0.170962f, 0.171718f, 0.172473f, 0.173229f, 0.173984f, 0.174739f, 0.175494f, 0.176249f,
+ 0.177004f, 0.177759f, 0.178514f, 0.179268f, 0.180023f, 0.180777f, 0.181532f, 0.182286f,
+ 0.183040f, 0.183794f, 0.184548f, 0.185301f, 0.186055f, 0.186809f, 0.187562f, 0.188315f,
+ 0.189069f, 0.189822f, 0.190575f, 0.191328f, 0.192080f, 0.192833f, 0.193586f, 0.194338f,
+ 0.195090f, 0.195843f, 0.196595f, 0.197347f, 0.198098f, 0.198850f, 0.199602f, 0.200353f,
+ 0.201105f, 0.201856f, 0.202607f, 0.203358f, 0.204109f, 0.204860f, 0.205610f, 0.206361f,
+ 0.207111f, 0.207862f, 0.208612f, 0.209362f, 0.210112f, 0.210862f, 0.211611f, 0.212361f,
+ 0.213110f, 0.213860f, 0.214609f, 0.215358f, 0.216107f, 0.216856f, 0.217604f, 0.218353f,
+ 0.219101f, 0.219850f, 0.220598f, 0.221346f, 0.222094f, 0.222841f, 0.223589f, 0.224337f,
+ 0.225084f, 0.225831f, 0.226578f, 0.227325f, 0.228072f, 0.228819f, 0.229565f, 0.230312f,
+ 0.231058f, 0.231804f, 0.232550f, 0.233296f, 0.234042f, 0.234788f, 0.235533f, 0.236278f,
+ 0.237024f, 0.237769f, 0.238514f, 0.239258f, 0.240003f, 0.240748f, 0.241492f, 0.242236f,
+ 0.242980f, 0.243724f, 0.244468f, 0.245212f, 0.245955f, 0.246698f, 0.247442f, 0.248185f,
+ 0.248928f, 0.249670f, 0.250413f, 0.251155f, 0.251898f, 0.252640f, 0.253382f, 0.254124f,
+ 0.254866f, 0.255607f, 0.256349f, 0.257090f, 0.257831f, 0.258572f, 0.259313f, 0.260054f,
+ 0.260794f, 0.261534f, 0.262275f, 0.263015f, 0.263755f, 0.264494f, 0.265234f, 0.265973f,
+ 0.266713f, 0.267452f, 0.268191f, 0.268930f, 0.269668f, 0.270407f, 0.271145f, 0.271883f,
+ 0.272621f, 0.273359f, 0.274097f, 0.274834f, 0.275572f, 0.276309f, 0.277046f, 0.277783f,
+ 0.278520f, 0.279256f, 0.279993f, 0.280729f, 0.281465f, 0.282201f, 0.282937f, 0.283672f,
+ 0.284408f, 0.285143f, 0.285878f, 0.286613f, 0.287347f, 0.288082f, 0.288816f, 0.289551f,
+ 0.290285f, 0.291019f, 0.291752f, 0.292486f, 0.293219f, 0.293952f, 0.294685f, 0.295418f,
+ 0.296151f, 0.296883f, 0.297616f, 0.298348f, 0.299080f, 0.299812f, 0.300543f, 0.301275f,
+ 0.302006f, 0.302737f, 0.303468f, 0.304199f, 0.304929f, 0.305660f, 0.306390f, 0.307120f,
+ 0.307850f, 0.308579f, 0.309309f, 0.310038f, 0.310767f, 0.311496f, 0.312225f, 0.312953f,
+ 0.313682f, 0.314410f, 0.315138f, 0.315866f, 0.316593f, 0.317321f, 0.318048f, 0.318775f,
+ 0.319502f, 0.320229f, 0.320955f, 0.321682f, 0.322408f, 0.323134f, 0.323859f, 0.324585f,
+ 0.325310f, 0.326035f, 0.326760f, 0.327485f, 0.328210f, 0.328934f, 0.329658f, 0.330382f,
+ 0.331106f, 0.331830f, 0.332553f, 0.333277f, 0.334000f, 0.334722f, 0.335445f, 0.336168f,
+ 0.336890f, 0.337612f, 0.338334f, 0.339055f, 0.339777f, 0.340498f, 0.341219f, 0.341940f,
+ 0.342661f, 0.343381f, 0.344101f, 0.344821f, 0.345541f, 0.346261f, 0.346980f, 0.347700f,
+ 0.348419f, 0.349138f, 0.349856f, 0.350575f, 0.351293f, 0.352011f, 0.352729f, 0.353446f,
+ 0.354164f, 0.354881f, 0.355598f, 0.356314f, 0.357031f, 0.357747f, 0.358463f, 0.359179f,
+ 0.359895f, 0.360611f, 0.361326f, 0.362041f, 0.362756f, 0.363470f, 0.364185f, 0.364899f,
+ 0.365613f, 0.366327f, 0.367040f, 0.367754f, 0.368467f, 0.369180f, 0.369892f, 0.370605f,
+ 0.371317f, 0.372029f, 0.372741f, 0.373453f, 0.374164f, 0.374875f, 0.375586f, 0.376297f,
+ 0.377007f, 0.377718f, 0.378428f, 0.379138f, 0.379847f, 0.380557f, 0.381266f, 0.381975f,
+ 0.382683f, 0.383392f, 0.384100f, 0.384808f, 0.385516f, 0.386224f, 0.386931f, 0.387638f,
+ 0.388345f, 0.389052f, 0.389758f, 0.390464f, 0.391170f, 0.391876f, 0.392582f, 0.393287f,
+ 0.393992f, 0.394697f, 0.395401f, 0.396106f, 0.396810f, 0.397514f, 0.398218f, 0.398921f,
+ 0.399624f, 0.400327f, 0.401030f, 0.401732f, 0.402435f, 0.403137f, 0.403838f, 0.404540f,
+ 0.405241f, 0.405942f, 0.406643f, 0.407344f, 0.408044f, 0.408744f, 0.409444f, 0.410144f,
+ 0.410843f, 0.411542f, 0.412241f, 0.412940f, 0.413638f, 0.414337f, 0.415034f, 0.415732f,
+ 0.416430f, 0.417127f, 0.417824f, 0.418520f, 0.419217f, 0.419913f, 0.420609f, 0.421305f,
+ 0.422000f, 0.422695f, 0.423390f, 0.424085f, 0.424780f, 0.425474f, 0.426168f, 0.426862f,
+ 0.427555f, 0.428248f, 0.428941f, 0.429634f, 0.430326f, 0.431019f, 0.431711f, 0.432402f,
+ 0.433094f, 0.433785f, 0.434476f, 0.435167f, 0.435857f, 0.436547f, 0.437237f, 0.437927f,
+ 0.438616f, 0.439305f, 0.439994f, 0.440683f, 0.441371f, 0.442059f, 0.442747f, 0.443435f,
+ 0.444122f, 0.444809f, 0.445496f, 0.446183f, 0.446869f, 0.447555f, 0.448241f, 0.448926f,
+ 0.449611f, 0.450296f, 0.450981f, 0.451665f, 0.452350f, 0.453033f, 0.453717f, 0.454400f,
+ 0.455084f, 0.455766f, 0.456449f, 0.457131f, 0.457813f, 0.458495f, 0.459177f, 0.459858f,
+ 0.460539f, 0.461219f, 0.461900f, 0.462580f, 0.463260f, 0.463939f, 0.464619f, 0.465298f,
+ 0.465977f, 0.466655f, 0.467333f, 0.468011f, 0.468689f, 0.469366f, 0.470043f, 0.470720f,
+ 0.471397f, 0.472073f, 0.472749f, 0.473425f, 0.474100f, 0.474775f, 0.475450f, 0.476125f,
+ 0.476799f, 0.477473f, 0.478147f, 0.478821f, 0.479494f, 0.480167f, 0.480839f, 0.481512f,
+ 0.482184f, 0.482856f, 0.483527f, 0.484198f, 0.484869f, 0.485540f, 0.486210f, 0.486880f,
+ 0.487550f, 0.488220f, 0.488889f, 0.489558f, 0.490226f, 0.490895f, 0.491563f, 0.492231f,
+ 0.492898f, 0.493565f, 0.494232f, 0.494899f, 0.495565f, 0.496231f, 0.496897f, 0.497562f,
+ 0.498228f, 0.498893f, 0.499557f, 0.500221f, 0.500885f, 0.501549f, 0.502212f, 0.502876f,
+ 0.503538f, 0.504201f, 0.504863f, 0.505525f, 0.506187f, 0.506848f, 0.507509f, 0.508170f,
+ 0.508830f, 0.509490f, 0.510150f, 0.510810f, 0.511469f, 0.512128f, 0.512786f, 0.513445f,
+ 0.514103f, 0.514760f, 0.515418f, 0.516075f, 0.516732f, 0.517388f, 0.518045f, 0.518700f,
+ 0.519356f, 0.520011f, 0.520666f, 0.521321f, 0.521975f, 0.522629f, 0.523283f, 0.523937f,
+ 0.524590f, 0.525243f, 0.525895f, 0.526547f, 0.527199f, 0.527851f, 0.528502f, 0.529153f,
+ 0.529804f, 0.530454f, 0.531104f, 0.531754f, 0.532403f, 0.533052f, 0.533701f, 0.534349f,
+ 0.534998f, 0.535645f, 0.536293f, 0.536940f, 0.537587f, 0.538234f, 0.538880f, 0.539526f,
+ 0.540171f, 0.540817f, 0.541462f, 0.542106f, 0.542751f, 0.543395f, 0.544039f, 0.544682f,
+ 0.545325f, 0.545968f, 0.546610f, 0.547252f, 0.547894f, 0.548536f, 0.549177f, 0.549818f,
+ 0.550458f, 0.551098f, 0.551738f, 0.552378f, 0.553017f, 0.553656f, 0.554294f, 0.554932f,
+ 0.555570f, 0.556208f, 0.556845f, 0.557482f, 0.558119f, 0.558755f, 0.559391f, 0.560026f,
+ 0.560662f, 0.561297f, 0.561931f, 0.562565f, 0.563199f, 0.563833f, 0.564466f, 0.565099f,
+ 0.565732f, 0.566364f, 0.566996f, 0.567628f, 0.568259f, 0.568890f, 0.569521f, 0.570151f,
+ 0.570781f, 0.571410f, 0.572040f, 0.572669f, 0.573297f, 0.573925f, 0.574553f, 0.575181f,
+ 0.575808f, 0.576435f, 0.577062f, 0.577688f, 0.578314f, 0.578939f, 0.579565f, 0.580189f,
+ 0.580814f, 0.581438f, 0.582062f, 0.582685f, 0.583309f, 0.583931f, 0.584554f, 0.585176f,
+ 0.585798f, 0.586419f, 0.587040f, 0.587661f, 0.588282f, 0.588902f, 0.589521f, 0.590141f,
+ 0.590760f, 0.591378f, 0.591997f, 0.592615f, 0.593232f, 0.593850f, 0.594467f, 0.595083f,
+ 0.595699f, 0.596315f, 0.596931f, 0.597546f, 0.598161f, 0.598775f, 0.599389f, 0.600003f,
+ 0.600616f, 0.601230f, 0.601842f, 0.602455f, 0.603067f, 0.603678f, 0.604290f, 0.604900f,
+ 0.605511f, 0.606121f, 0.606731f, 0.607341f, 0.607950f, 0.608559f, 0.609167f, 0.609775f,
+ 0.610383f, 0.610990f, 0.611597f, 0.612204f, 0.612810f, 0.613416f, 0.614022f, 0.614627f,
+ 0.615232f, 0.615836f, 0.616440f, 0.617044f, 0.617647f, 0.618250f, 0.618853f, 0.619455f,
+ 0.620057f, 0.620659f, 0.621260f, 0.621861f, 0.622461f, 0.623061f, 0.623661f, 0.624260f,
+ 0.624860f, 0.625458f, 0.626056f, 0.626654f, 0.627252f, 0.627849f, 0.628446f, 0.629042f,
+ 0.629638f, 0.630234f, 0.630829f, 0.631424f, 0.632019f, 0.632613f, 0.633207f, 0.633800f,
+ 0.634393f, 0.634986f, 0.635578f, 0.636170f, 0.636762f, 0.637353f, 0.637944f, 0.638534f,
+ 0.639124f, 0.639714f, 0.640303f, 0.640892f, 0.641481f, 0.642069f, 0.642657f, 0.643245f,
+ 0.643832f, 0.644418f, 0.645005f, 0.645590f, 0.646176f, 0.646761f, 0.647346f, 0.647930f,
+ 0.648514f, 0.649098f, 0.649681f, 0.650264f, 0.650847f, 0.651429f, 0.652011f, 0.652592f,
+ 0.653173f, 0.653753f, 0.654334f, 0.654913f, 0.655493f, 0.656072f, 0.656651f, 0.657229f,
+ 0.657807f, 0.658384f, 0.658961f, 0.659538f, 0.660114f, 0.660690f, 0.661266f, 0.661841f,
+ 0.662416f, 0.662990f, 0.663564f, 0.664138f, 0.664711f, 0.665284f, 0.665856f, 0.666428f,
+ 0.667000f, 0.667571f, 0.668142f, 0.668712f, 0.669283f, 0.669852f, 0.670422f, 0.670990f,
+ 0.671559f, 0.672127f, 0.672695f, 0.673262f, 0.673829f, 0.674396f, 0.674962f, 0.675527f,
+ 0.676093f, 0.676658f, 0.677222f, 0.677786f, 0.678350f, 0.678913f, 0.679476f, 0.680039f,
+ 0.680601f, 0.681163f, 0.681724f, 0.682285f, 0.682846f, 0.683406f, 0.683965f, 0.684525f,
+ 0.685084f, 0.685642f, 0.686200f, 0.686758f, 0.687315f, 0.687872f, 0.688429f, 0.688985f,
+ 0.689541f, 0.690096f, 0.690651f, 0.691205f, 0.691759f, 0.692313f, 0.692866f, 0.693419f,
+ 0.693971f, 0.694524f, 0.695075f, 0.695626f, 0.696177f, 0.696728f, 0.697277f, 0.697827f,
+ 0.698376f, 0.698925f, 0.699473f, 0.700021f, 0.700569f, 0.701116f, 0.701663f, 0.702209f,
+ 0.702755f, 0.703300f, 0.703845f, 0.704390f, 0.704934f, 0.705478f, 0.706021f, 0.706564f,
+ 0.707107f, 0.707649f, 0.708191f, 0.708732f, 0.709273f, 0.709813f, 0.710353f, 0.710893f,
+ 0.711432f, 0.711971f, 0.712509f, 0.713047f, 0.713585f, 0.714122f, 0.714659f, 0.715195f,
+ 0.715731f, 0.716266f, 0.716801f, 0.717336f, 0.717870f, 0.718404f, 0.718937f, 0.719470f,
+ 0.720003f, 0.720535f, 0.721066f, 0.721597f, 0.722128f, 0.722659f, 0.723188f, 0.723718f,
+ 0.724247f, 0.724776f, 0.725304f, 0.725832f, 0.726359f, 0.726886f, 0.727413f, 0.727939f,
+ 0.728464f, 0.728990f, 0.729514f, 0.730039f, 0.730563f, 0.731086f, 0.731609f, 0.732132f,
+ 0.732654f, 0.733176f, 0.733697f, 0.734218f, 0.734739f, 0.735259f, 0.735779f, 0.736298f,
+ 0.736817f, 0.737335f, 0.737853f, 0.738370f, 0.738887f, 0.739404f, 0.739920f, 0.740436f,
+ 0.740951f, 0.741466f, 0.741980f, 0.742494f, 0.743008f, 0.743521f, 0.744034f, 0.744546f,
+ 0.745058f, 0.745569f, 0.746080f, 0.746591f, 0.747101f, 0.747610f, 0.748119f, 0.748628f,
+ 0.749136f, 0.749644f, 0.750152f, 0.750659f, 0.751165f, 0.751671f, 0.752177f, 0.752682f,
+ 0.753187f, 0.753691f, 0.754195f, 0.754698f, 0.755201f, 0.755704f, 0.756206f, 0.756708f,
+ 0.757209f, 0.757710f, 0.758210f, 0.758710f, 0.759209f, 0.759708f, 0.760207f, 0.760705f,
+ 0.761202f, 0.761700f, 0.762196f, 0.762693f, 0.763188f, 0.763684f, 0.764179f, 0.764673f,
+ 0.765167f, 0.765661f, 0.766154f, 0.766647f, 0.767139f, 0.767631f, 0.768122f, 0.768613f,
+ 0.769103f, 0.769593f, 0.770083f, 0.770572f, 0.771061f, 0.771549f, 0.772036f, 0.772524f,
+ 0.773010f, 0.773497f, 0.773983f, 0.774468f, 0.774953f, 0.775438f, 0.775922f, 0.776405f,
+ 0.776888f, 0.777371f, 0.777853f, 0.778335f, 0.778817f, 0.779297f, 0.779778f, 0.780258f,
+ 0.780737f, 0.781216f, 0.781695f, 0.782173f, 0.782651f, 0.783128f, 0.783605f, 0.784081f,
+ 0.784557f, 0.785032f, 0.785507f, 0.785981f, 0.786455f, 0.786929f, 0.787402f, 0.787874f,
+ 0.788346f, 0.788818f, 0.789289f, 0.789760f, 0.790230f, 0.790700f, 0.791169f, 0.791638f,
+ 0.792107f, 0.792575f, 0.793042f, 0.793509f, 0.793975f, 0.794442f, 0.794907f, 0.795372f,
+ 0.795837f, 0.796301f, 0.796765f, 0.797228f, 0.797691f, 0.798153f, 0.798615f, 0.799076f,
+ 0.799537f, 0.799998f, 0.800458f, 0.800917f, 0.801376f, 0.801835f, 0.802293f, 0.802750f,
+ 0.803208f, 0.803664f, 0.804120f, 0.804576f, 0.805031f, 0.805486f, 0.805940f, 0.806394f,
+ 0.806848f, 0.807300f, 0.807753f, 0.808205f, 0.808656f, 0.809107f, 0.809558f, 0.810008f,
+ 0.810457f, 0.810906f, 0.811355f, 0.811803f, 0.812251f, 0.812698f, 0.813144f, 0.813591f,
+ 0.814036f, 0.814482f, 0.814926f, 0.815371f, 0.815814f, 0.816258f, 0.816701f, 0.817143f,
+ 0.817585f, 0.818026f, 0.818467f, 0.818908f, 0.819348f, 0.819787f, 0.820226f, 0.820664f,
+ 0.821102f, 0.821540f, 0.821977f, 0.822414f, 0.822850f, 0.823285f, 0.823721f, 0.824155f,
+ 0.824589f, 0.825023f, 0.825456f, 0.825889f, 0.826321f, 0.826753f, 0.827184f, 0.827615f,
+ 0.828045f, 0.828475f, 0.828904f, 0.829333f, 0.829761f, 0.830189f, 0.830616f, 0.831043f,
+ 0.831470f, 0.831895f, 0.832321f, 0.832746f, 0.833170f, 0.833594f, 0.834018f, 0.834440f,
+ 0.834863f, 0.835285f, 0.835706f, 0.836127f, 0.836548f, 0.836968f, 0.837387f, 0.837806f,
+ 0.838225f, 0.838643f, 0.839060f, 0.839477f, 0.839894f, 0.840310f, 0.840725f, 0.841140f,
+ 0.841555f, 0.841969f, 0.842383f, 0.842796f, 0.843208f, 0.843620f, 0.844032f, 0.844443f,
+ 0.844854f, 0.845264f, 0.845673f, 0.846082f, 0.846491f, 0.846899f, 0.847307f, 0.847714f,
+ 0.848120f, 0.848526f, 0.848932f, 0.849337f, 0.849742f, 0.850146f, 0.850549f, 0.850953f,
+ 0.851355f, 0.851757f, 0.852159f, 0.852560f, 0.852961f, 0.853361f, 0.853760f, 0.854159f,
+ 0.854558f, 0.854956f, 0.855354f, 0.855751f, 0.856147f, 0.856543f, 0.856939f, 0.857334f,
+ 0.857729f, 0.858123f, 0.858516f, 0.858909f, 0.859302f, 0.859694f, 0.860085f, 0.860476f,
+ 0.860867f, 0.861257f, 0.861646f, 0.862035f, 0.862424f, 0.862812f, 0.863199f, 0.863586f,
+ 0.863973f, 0.864359f, 0.864744f, 0.865129f, 0.865514f, 0.865898f, 0.866281f, 0.866664f,
+ 0.867046f, 0.867428f, 0.867809f, 0.868190f, 0.868571f, 0.868951f, 0.869330f, 0.869709f,
+ 0.870087f, 0.870465f, 0.870842f, 0.871219f, 0.871595f, 0.871971f, 0.872346f, 0.872721f,
+ 0.873095f, 0.873469f, 0.873842f, 0.874215f, 0.874587f, 0.874958f, 0.875329f, 0.875700f,
+ 0.876070f, 0.876440f, 0.876809f, 0.877177f, 0.877545f, 0.877913f, 0.878280f, 0.878646f,
+ 0.879012f, 0.879378f, 0.879743f, 0.880107f, 0.880471f, 0.880834f, 0.881197f, 0.881559f,
+ 0.881921f, 0.882283f, 0.882643f, 0.883004f, 0.883363f, 0.883723f, 0.884081f, 0.884439f,
+ 0.884797f, 0.885154f, 0.885511f, 0.885867f, 0.886223f, 0.886578f, 0.886932f, 0.887286f,
+ 0.887640f, 0.887993f, 0.888345f, 0.888697f, 0.889048f, 0.889399f, 0.889750f, 0.890099f,
+ 0.890449f, 0.890797f, 0.891146f, 0.891493f, 0.891841f, 0.892187f, 0.892534f, 0.892879f,
+ 0.893224f, 0.893569f, 0.893913f, 0.894256f, 0.894599f, 0.894942f, 0.895284f, 0.895625f,
+ 0.895966f, 0.896307f, 0.896646f, 0.896986f, 0.897325f, 0.897663f, 0.898001f, 0.898338f,
+ 0.898674f, 0.899011f, 0.899346f, 0.899681f, 0.900016f, 0.900350f, 0.900683f, 0.901016f,
+ 0.901349f, 0.901681f, 0.902012f, 0.902343f, 0.902673f, 0.903003f, 0.903332f, 0.903661f,
+ 0.903989f, 0.904317f, 0.904644f, 0.904971f, 0.905297f, 0.905622f, 0.905947f, 0.906272f,
+ 0.906596f, 0.906919f, 0.907242f, 0.907564f, 0.907886f, 0.908207f, 0.908528f, 0.908848f,
+ 0.909168f, 0.909487f, 0.909806f, 0.910124f, 0.910441f, 0.910758f, 0.911075f, 0.911391f,
+ 0.911706f, 0.912021f, 0.912335f, 0.912649f, 0.912962f, 0.913275f, 0.913587f, 0.913899f,
+ 0.914210f, 0.914520f, 0.914830f, 0.915140f, 0.915449f, 0.915757f, 0.916065f, 0.916372f,
+ 0.916679f, 0.916985f, 0.917291f, 0.917596f, 0.917901f, 0.918205f, 0.918508f, 0.918811f,
+ 0.919114f, 0.919416f, 0.919717f, 0.920018f, 0.920318f, 0.920618f, 0.920917f, 0.921216f,
+ 0.921514f, 0.921812f, 0.922109f, 0.922405f, 0.922701f, 0.922997f, 0.923291f, 0.923586f,
+ 0.923880f, 0.924173f, 0.924465f, 0.924758f, 0.925049f, 0.925340f, 0.925631f, 0.925921f,
+ 0.926210f, 0.926499f, 0.926787f, 0.927075f, 0.927363f, 0.927649f, 0.927935f, 0.928221f,
+ 0.928506f, 0.928791f, 0.929075f, 0.929358f, 0.929641f, 0.929923f, 0.930205f, 0.930486f,
+ 0.930767f, 0.931047f, 0.931327f, 0.931606f, 0.931884f, 0.932162f, 0.932440f, 0.932716f,
+ 0.932993f, 0.933269f, 0.933544f, 0.933818f, 0.934093f, 0.934366f, 0.934639f, 0.934912f,
+ 0.935184f, 0.935455f, 0.935726f, 0.935996f, 0.936266f, 0.936535f, 0.936803f, 0.937072f,
+ 0.937339f, 0.937606f, 0.937872f, 0.938138f, 0.938404f, 0.938668f, 0.938932f, 0.939196f,
+ 0.939459f, 0.939722f, 0.939984f, 0.940245f, 0.940506f, 0.940766f, 0.941026f, 0.941285f,
+ 0.941544f, 0.941802f, 0.942060f, 0.942317f, 0.942573f, 0.942829f, 0.943084f, 0.943339f,
+ 0.943593f, 0.943847f, 0.944100f, 0.944353f, 0.944605f, 0.944856f, 0.945107f, 0.945358f,
+ 0.945607f, 0.945857f, 0.946105f, 0.946353f, 0.946601f, 0.946848f, 0.947094f, 0.947340f,
+ 0.947586f, 0.947830f, 0.948075f, 0.948318f, 0.948561f, 0.948804f, 0.949046f, 0.949287f,
+ 0.949528f, 0.949768f, 0.950008f, 0.950247f, 0.950486f, 0.950724f, 0.950962f, 0.951199f,
+ 0.951435f, 0.951671f, 0.951906f, 0.952141f, 0.952375f, 0.952609f, 0.952842f, 0.953074f,
+ 0.953306f, 0.953537f, 0.953768f, 0.953998f, 0.954228f, 0.954457f, 0.954686f, 0.954914f,
+ 0.955141f, 0.955368f, 0.955594f, 0.955820f, 0.956045f, 0.956270f, 0.956494f, 0.956717f,
+ 0.956940f, 0.957163f, 0.957385f, 0.957606f, 0.957826f, 0.958046f, 0.958266f, 0.958485f,
+ 0.958703f, 0.958921f, 0.959139f, 0.959355f, 0.959572f, 0.959787f, 0.960002f, 0.960217f,
+ 0.960431f, 0.960644f, 0.960857f, 0.961069f, 0.961280f, 0.961492f, 0.961702f, 0.961912f,
+ 0.962121f, 0.962330f, 0.962538f, 0.962746f, 0.962953f, 0.963160f, 0.963366f, 0.963571f,
+ 0.963776f, 0.963980f, 0.964184f, 0.964387f, 0.964590f, 0.964792f, 0.964993f, 0.965194f,
+ 0.965394f, 0.965594f, 0.965793f, 0.965992f, 0.966190f, 0.966387f, 0.966584f, 0.966781f,
+ 0.966976f, 0.967172f, 0.967366f, 0.967560f, 0.967754f, 0.967947f, 0.968139f, 0.968331f,
+ 0.968522f, 0.968713f, 0.968903f, 0.969092f, 0.969281f, 0.969470f, 0.969657f, 0.969845f,
+ 0.970031f, 0.970217f, 0.970403f, 0.970588f, 0.970772f, 0.970956f, 0.971139f, 0.971322f,
+ 0.971504f, 0.971685f, 0.971866f, 0.972047f, 0.972227f, 0.972406f, 0.972584f, 0.972762f,
+ 0.972940f, 0.973117f, 0.973293f, 0.973469f, 0.973644f, 0.973819f, 0.973993f, 0.974166f,
+ 0.974339f, 0.974512f, 0.974684f, 0.974855f, 0.975025f, 0.975195f, 0.975365f, 0.975534f,
+ 0.975702f, 0.975870f, 0.976037f, 0.976204f, 0.976370f, 0.976535f, 0.976700f, 0.976864f,
+ 0.977028f, 0.977191f, 0.977354f, 0.977516f, 0.977677f, 0.977838f, 0.977998f, 0.978158f,
+ 0.978317f, 0.978476f, 0.978634f, 0.978791f, 0.978948f, 0.979104f, 0.979260f, 0.979415f,
+ 0.979570f, 0.979724f, 0.979877f, 0.980030f, 0.980182f, 0.980334f, 0.980485f, 0.980635f,
+ 0.980785f, 0.980935f, 0.981083f, 0.981232f, 0.981379f, 0.981526f, 0.981673f, 0.981819f,
+ 0.981964f, 0.982109f, 0.982253f, 0.982396f, 0.982539f, 0.982682f, 0.982824f, 0.982965f,
+ 0.983105f, 0.983246f, 0.983385f, 0.983524f, 0.983662f, 0.983800f, 0.983937f, 0.984074f,
+ 0.984210f, 0.984346f, 0.984480f, 0.984615f, 0.984748f, 0.984882f, 0.985014f, 0.985146f,
+ 0.985278f, 0.985408f, 0.985539f, 0.985668f, 0.985798f, 0.985926f, 0.986054f, 0.986181f,
+ 0.986308f, 0.986434f, 0.986560f, 0.986685f, 0.986809f, 0.986933f, 0.987057f, 0.987179f,
+ 0.987301f, 0.987423f, 0.987544f, 0.987664f, 0.987784f, 0.987903f, 0.988022f, 0.988140f,
+ 0.988258f, 0.988374f, 0.988491f, 0.988607f, 0.988722f, 0.988836f, 0.988950f, 0.989064f,
+ 0.989177f, 0.989289f, 0.989400f, 0.989511f, 0.989622f, 0.989732f, 0.989841f, 0.989950f,
+ 0.990058f, 0.990166f, 0.990273f, 0.990379f, 0.990485f, 0.990590f, 0.990695f, 0.990799f,
+ 0.990903f, 0.991006f, 0.991108f, 0.991210f, 0.991311f, 0.991411f, 0.991511f, 0.991611f,
+ 0.991710f, 0.991808f, 0.991906f, 0.992003f, 0.992099f, 0.992195f, 0.992291f, 0.992385f,
+ 0.992480f, 0.992573f, 0.992666f, 0.992759f, 0.992850f, 0.992942f, 0.993032f, 0.993122f,
+ 0.993212f, 0.993301f, 0.993389f, 0.993477f, 0.993564f, 0.993651f, 0.993737f, 0.993822f,
+ 0.993907f, 0.993991f, 0.994075f, 0.994158f, 0.994240f, 0.994322f, 0.994404f, 0.994484f,
+ 0.994565f, 0.994644f, 0.994723f, 0.994802f, 0.994879f, 0.994957f, 0.995033f, 0.995109f,
+ 0.995185f, 0.995260f, 0.995334f, 0.995408f, 0.995481f, 0.995553f, 0.995625f, 0.995697f,
+ 0.995767f, 0.995838f, 0.995907f, 0.995976f, 0.996045f, 0.996113f, 0.996180f, 0.996247f,
+ 0.996313f, 0.996378f, 0.996443f, 0.996507f, 0.996571f, 0.996634f, 0.996697f, 0.996759f,
+ 0.996820f, 0.996881f, 0.996941f, 0.997001f, 0.997060f, 0.997119f, 0.997176f, 0.997234f,
+ 0.997290f, 0.997347f, 0.997402f, 0.997457f, 0.997511f, 0.997565f, 0.997618f, 0.997671f,
+ 0.997723f, 0.997774f, 0.997825f, 0.997876f, 0.997925f, 0.997974f, 0.998023f, 0.998071f,
+ 0.998118f, 0.998165f, 0.998211f, 0.998257f, 0.998302f, 0.998346f, 0.998390f, 0.998433f,
+ 0.998476f, 0.998518f, 0.998559f, 0.998600f, 0.998640f, 0.998680f, 0.998719f, 0.998758f,
+ 0.998795f, 0.998833f, 0.998870f, 0.998906f, 0.998941f, 0.998976f, 0.999011f, 0.999044f,
+ 0.999078f, 0.999110f, 0.999142f, 0.999174f, 0.999205f, 0.999235f, 0.999265f, 0.999294f,
+ 0.999322f, 0.999350f, 0.999378f, 0.999404f, 0.999431f, 0.999456f, 0.999481f, 0.999506f,
+ 0.999529f, 0.999553f, 0.999575f, 0.999597f, 0.999619f, 0.999640f, 0.999660f, 0.999680f,
+ 0.999699f, 0.999717f, 0.999735f, 0.999753f, 0.999769f, 0.999786f, 0.999801f, 0.999816f,
+ 0.999831f, 0.999844f, 0.999858f, 0.999870f, 0.999882f, 0.999894f, 0.999905f, 0.999915f,
+ 0.999925f, 0.999934f, 0.999942f, 0.999950f, 0.999958f, 0.999964f, 0.999971f, 0.999976f,
+ 0.999981f, 0.999986f, 0.999989f, 0.999993f, 0.999995f, 0.999997f, 0.999999f, 1.000000f,
+ 0.000000f, -0.000767f, -0.001534f, -0.002301f, -0.003068f, -0.003835f, -0.004602f, -0.005369f,
+ -0.006136f, -0.006903f, -0.007670f, -0.008437f, -0.009204f, -0.009971f, -0.010738f, -0.011505f,
+ -0.012272f, -0.013038f, -0.013805f, -0.014572f, -0.015339f, -0.016106f, -0.016873f, -0.017640f,
+ -0.018407f, -0.019174f, -0.019940f, -0.020707f, -0.021474f, -0.022241f, -0.023008f, -0.023774f,
+ -0.024541f, -0.025308f, -0.026075f, -0.026841f, -0.027608f, -0.028375f, -0.029142f, -0.029908f,
+ -0.030675f, -0.031441f, -0.032208f, -0.032975f, -0.033741f, -0.034508f, -0.035274f, -0.036041f,
+ -0.036807f, -0.037574f, -0.038340f, -0.039107f, -0.039873f, -0.040639f, -0.041406f, -0.042172f,
+ -0.042938f, -0.043705f, -0.044471f, -0.045237f, -0.046003f, -0.046769f, -0.047535f, -0.048302f,
+ -0.049068f, -0.049834f, -0.050600f, -0.051366f, -0.052132f, -0.052898f, -0.053664f, -0.054429f,
+ -0.055195f, -0.055961f, -0.056727f, -0.057493f, -0.058258f, -0.059024f, -0.059790f, -0.060555f,
+ -0.061321f, -0.062086f, -0.062852f, -0.063617f, -0.064383f, -0.065148f, -0.065913f, -0.066679f,
+ -0.067444f, -0.068209f, -0.068974f, -0.069739f, -0.070505f, -0.071270f, -0.072035f, -0.072800f,
+ -0.073565f, -0.074329f, -0.075094f, -0.075859f, -0.076624f, -0.077389f, -0.078153f, -0.078918f,
+ -0.079682f, -0.080447f, -0.081211f, -0.081976f, -0.082740f, -0.083505f, -0.084269f, -0.085033f,
+ -0.085797f, -0.086561f, -0.087326f, -0.088090f, -0.088854f, -0.089617f, -0.090381f, -0.091145f,
+ -0.091909f, -0.092673f, -0.093436f, -0.094200f, -0.094963f, -0.095727f, -0.096490f, -0.097254f,
+ -0.098017f, -0.098780f, -0.099544f, -0.100307f, -0.101070f, -0.101833f, -0.102596f, -0.103359f,
+ -0.104122f, -0.104884f, -0.105647f, -0.106410f, -0.107172f, -0.107935f, -0.108697f, -0.109460f,
+ -0.110222f, -0.110984f, -0.111747f, -0.112509f, -0.113271f, -0.114033f, -0.114795f, -0.115557f,
+ -0.116319f, -0.117080f, -0.117842f, -0.118604f, -0.119365f, -0.120127f, -0.120888f, -0.121649f,
+ -0.122411f, -0.123172f, -0.123933f, -0.124694f, -0.125455f, -0.126216f, -0.126977f, -0.127737f,
+ -0.128498f, -0.129259f, -0.130019f, -0.130780f, -0.131540f, -0.132300f, -0.133061f, -0.133821f,
+ -0.134581f, -0.135341f, -0.136101f, -0.136860f, -0.137620f, -0.138380f, -0.139139f, -0.139899f,
+ -0.140658f, -0.141418f, -0.142177f, -0.142936f, -0.143695f, -0.144454f, -0.145213f, -0.145972f,
+ -0.146730f, -0.147489f, -0.148248f, -0.149006f, -0.149765f, -0.150523f, -0.151281f, -0.152039f,
+ -0.152797f, -0.153555f, -0.154313f, -0.155071f, -0.155828f, -0.156586f, -0.157343f, -0.158101f,
+ -0.158858f, -0.159615f, -0.160372f, -0.161129f, -0.161886f, -0.162643f, -0.163400f, -0.164157f,
+ -0.164913f, -0.165670f, -0.166426f, -0.167182f, -0.167938f, -0.168694f, -0.169450f, -0.170206f,
+ -0.170962f, -0.171718f, -0.172473f, -0.173229f, -0.173984f, -0.174739f, -0.175494f, -0.176249f,
+ -0.177004f, -0.177759f, -0.178514f, -0.179268f, -0.180023f, -0.180777f, -0.181532f, -0.182286f,
+ -0.183040f, -0.183794f, -0.184548f, -0.185301f, -0.186055f, -0.186809f, -0.187562f, -0.188315f,
+ -0.189069f, -0.189822f, -0.190575f, -0.191328f, -0.192080f, -0.192833f, -0.193586f, -0.194338f,
+ -0.195090f, -0.195843f, -0.196595f, -0.197347f, -0.198098f, -0.198850f, -0.199602f, -0.200353f,
+ -0.201105f, -0.201856f, -0.202607f, -0.203358f, -0.204109f, -0.204860f, -0.205610f, -0.206361f,
+ -0.207111f, -0.207862f, -0.208612f, -0.209362f, -0.210112f, -0.210862f, -0.211611f, -0.212361f,
+ -0.213110f, -0.213860f, -0.214609f, -0.215358f, -0.216107f, -0.216856f, -0.217604f, -0.218353f,
+ -0.219101f, -0.219850f, -0.220598f, -0.221346f, -0.222094f, -0.222841f, -0.223589f, -0.224337f,
+ -0.225084f, -0.225831f, -0.226578f, -0.227325f, -0.228072f, -0.228819f, -0.229565f, -0.230312f,
+ -0.231058f, -0.231804f, -0.232550f, -0.233296f, -0.234042f, -0.234788f, -0.235533f, -0.236278f,
+ -0.237024f, -0.237769f, -0.238514f, -0.239258f, -0.240003f, -0.240748f, -0.241492f, -0.242236f,
+ -0.242980f, -0.243724f, -0.244468f, -0.245212f, -0.245955f, -0.246698f, -0.247442f, -0.248185f,
+ -0.248928f, -0.249670f, -0.250413f, -0.251155f, -0.251898f, -0.252640f, -0.253382f, -0.254124f,
+ -0.254866f, -0.255607f, -0.256349f, -0.257090f, -0.257831f, -0.258572f, -0.259313f, -0.260054f,
+ -0.260794f, -0.261534f, -0.262275f, -0.263015f, -0.263755f, -0.264494f, -0.265234f, -0.265973f,
+ -0.266713f, -0.267452f, -0.268191f, -0.268930f, -0.269668f, -0.270407f, -0.271145f, -0.271883f,
+ -0.272621f, -0.273359f, -0.274097f, -0.274834f, -0.275572f, -0.276309f, -0.277046f, -0.277783f,
+ -0.278520f, -0.279256f, -0.279993f, -0.280729f, -0.281465f, -0.282201f, -0.282937f, -0.283672f,
+ -0.284408f, -0.285143f, -0.285878f, -0.286613f, -0.287347f, -0.288082f, -0.288816f, -0.289551f,
+ -0.290285f, -0.291019f, -0.291752f, -0.292486f, -0.293219f, -0.293952f, -0.294685f, -0.295418f,
+ -0.296151f, -0.296883f, -0.297616f, -0.298348f, -0.299080f, -0.299812f, -0.300543f, -0.301275f,
+ -0.302006f, -0.302737f, -0.303468f, -0.304199f, -0.304929f, -0.305660f, -0.306390f, -0.307120f,
+ -0.307850f, -0.308579f, -0.309309f, -0.310038f, -0.310767f, -0.311496f, -0.312225f, -0.312953f,
+ -0.313682f, -0.314410f, -0.315138f, -0.315866f, -0.316593f, -0.317321f, -0.318048f, -0.318775f,
+ -0.319502f, -0.320229f, -0.320955f, -0.321682f, -0.322408f, -0.323134f, -0.323859f, -0.324585f,
+ -0.325310f, -0.326035f, -0.326760f, -0.327485f, -0.328210f, -0.328934f, -0.329658f, -0.330382f,
+ -0.331106f, -0.331830f, -0.332553f, -0.333277f, -0.334000f, -0.334722f, -0.335445f, -0.336168f,
+ -0.336890f, -0.337612f, -0.338334f, -0.339055f, -0.339777f, -0.340498f, -0.341219f, -0.341940f,
+ -0.342661f, -0.343381f, -0.344101f, -0.344821f, -0.345541f, -0.346261f, -0.346980f, -0.347700f,
+ -0.348419f, -0.349138f, -0.349856f, -0.350575f, -0.351293f, -0.352011f, -0.352729f, -0.353446f,
+ -0.354164f, -0.354881f, -0.355598f, -0.356314f, -0.357031f, -0.357747f, -0.358463f, -0.359179f,
+ -0.359895f, -0.360611f, -0.361326f, -0.362041f, -0.362756f, -0.363470f, -0.364185f, -0.364899f,
+ -0.365613f, -0.366327f, -0.367040f, -0.367754f, -0.368467f, -0.369180f, -0.369892f, -0.370605f,
+ -0.371317f, -0.372029f, -0.372741f, -0.373453f, -0.374164f, -0.374875f, -0.375586f, -0.376297f,
+ -0.377007f, -0.377718f, -0.378428f, -0.379138f, -0.379847f, -0.380557f, -0.381266f, -0.381975f,
+ -0.382683f, -0.383392f, -0.384100f, -0.384808f, -0.385516f, -0.386224f, -0.386931f, -0.387638f,
+ -0.388345f, -0.389052f, -0.389758f, -0.390464f, -0.391170f, -0.391876f, -0.392582f, -0.393287f,
+ -0.393992f, -0.394697f, -0.395401f, -0.396106f, -0.396810f, -0.397514f, -0.398218f, -0.398921f,
+ -0.399624f, -0.400327f, -0.401030f, -0.401732f, -0.402435f, -0.403137f, -0.403838f, -0.404540f,
+ -0.405241f, -0.405942f, -0.406643f, -0.407344f, -0.408044f, -0.408744f, -0.409444f, -0.410144f,
+ -0.410843f, -0.411542f, -0.412241f, -0.412940f, -0.413638f, -0.414337f, -0.415034f, -0.415732f,
+ -0.416430f, -0.417127f, -0.417824f, -0.418520f, -0.419217f, -0.419913f, -0.420609f, -0.421305f,
+ -0.422000f, -0.422695f, -0.423390f, -0.424085f, -0.424780f, -0.425474f, -0.426168f, -0.426862f,
+ -0.427555f, -0.428248f, -0.428941f, -0.429634f, -0.430326f, -0.431019f, -0.431711f, -0.432402f,
+ -0.433094f, -0.433785f, -0.434476f, -0.435167f, -0.435857f, -0.436547f, -0.437237f, -0.437927f,
+ -0.438616f, -0.439305f, -0.439994f, -0.440683f, -0.441371f, -0.442059f, -0.442747f, -0.443435f,
+ -0.444122f, -0.444809f, -0.445496f, -0.446183f, -0.446869f, -0.447555f, -0.448241f, -0.448926f,
+ -0.449611f, -0.450296f, -0.450981f, -0.451665f, -0.452350f, -0.453033f, -0.453717f, -0.454400f,
+ -0.455084f, -0.455766f, -0.456449f, -0.457131f, -0.457813f, -0.458495f, -0.459177f, -0.459858f,
+ -0.460539f, -0.461219f, -0.461900f, -0.462580f, -0.463260f, -0.463939f, -0.464619f, -0.465298f,
+ -0.465977f, -0.466655f, -0.467333f, -0.468011f, -0.468689f, -0.469366f, -0.470043f, -0.470720f,
+ -0.471397f, -0.472073f, -0.472749f, -0.473425f, -0.474100f, -0.474775f, -0.475450f, -0.476125f,
+ -0.476799f, -0.477473f, -0.478147f, -0.478821f, -0.479494f, -0.480167f, -0.480839f, -0.481512f,
+ -0.482184f, -0.482856f, -0.483527f, -0.484198f, -0.484869f, -0.485540f, -0.486210f, -0.486880f,
+ -0.487550f, -0.488220f, -0.488889f, -0.489558f, -0.490226f, -0.490895f, -0.491563f, -0.492231f,
+ -0.492898f, -0.493565f, -0.494232f, -0.494899f, -0.495565f, -0.496231f, -0.496897f, -0.497562f,
+ -0.498228f, -0.498893f, -0.499557f, -0.500221f, -0.500885f, -0.501549f, -0.502212f, -0.502876f,
+ -0.503538f, -0.504201f, -0.504863f, -0.505525f, -0.506187f, -0.506848f, -0.507509f, -0.508170f,
+ -0.508830f, -0.509490f, -0.510150f, -0.510810f, -0.511469f, -0.512128f, -0.512786f, -0.513445f,
+ -0.514103f, -0.514760f, -0.515418f, -0.516075f, -0.516732f, -0.517388f, -0.518045f, -0.518700f,
+ -0.519356f, -0.520011f, -0.520666f, -0.521321f, -0.521975f, -0.522629f, -0.523283f, -0.523937f,
+ -0.524590f, -0.525243f, -0.525895f, -0.526547f, -0.527199f, -0.527851f, -0.528502f, -0.529153f,
+ -0.529804f, -0.530454f, -0.531104f, -0.531754f, -0.532403f, -0.533052f, -0.533701f, -0.534349f,
+ -0.534998f, -0.535645f, -0.536293f, -0.536940f, -0.537587f, -0.538234f, -0.538880f, -0.539526f,
+ -0.540171f, -0.540817f, -0.541462f, -0.542106f, -0.542751f, -0.543395f, -0.544039f, -0.544682f,
+ -0.545325f, -0.545968f, -0.546610f, -0.547252f, -0.547894f, -0.548536f, -0.549177f, -0.549818f,
+ -0.550458f, -0.551098f, -0.551738f, -0.552378f, -0.553017f, -0.553656f, -0.554294f, -0.554932f,
+ -0.555570f, -0.556208f, -0.556845f, -0.557482f, -0.558119f, -0.558755f, -0.559391f, -0.560026f,
+ -0.560662f, -0.561297f, -0.561931f, -0.562565f, -0.563199f, -0.563833f, -0.564466f, -0.565099f,
+ -0.565732f, -0.566364f, -0.566996f, -0.567628f, -0.568259f, -0.568890f, -0.569521f, -0.570151f,
+ -0.570781f, -0.571410f, -0.572040f, -0.572669f, -0.573297f, -0.573925f, -0.574553f, -0.575181f,
+ -0.575808f, -0.576435f, -0.577062f, -0.577688f, -0.578314f, -0.578939f, -0.579565f, -0.580189f,
+ -0.580814f, -0.581438f, -0.582062f, -0.582685f, -0.583309f, -0.583931f, -0.584554f, -0.585176f,
+ -0.585798f, -0.586419f, -0.587040f, -0.587661f, -0.588282f, -0.588902f, -0.589521f, -0.590141f,
+ -0.590760f, -0.591378f, -0.591997f, -0.592615f, -0.593232f, -0.593850f, -0.594467f, -0.595083f,
+ -0.595699f, -0.596315f, -0.596931f, -0.597546f, -0.598161f, -0.598775f, -0.599389f, -0.600003f,
+ -0.600616f, -0.601230f, -0.601842f, -0.602455f, -0.603067f, -0.603678f, -0.604290f, -0.604900f,
+ -0.605511f, -0.606121f, -0.606731f, -0.607341f, -0.607950f, -0.608559f, -0.609167f, -0.609775f,
+ -0.610383f, -0.610990f, -0.611597f, -0.612204f, -0.612810f, -0.613416f, -0.614022f, -0.614627f,
+ -0.615232f, -0.615836f, -0.616440f, -0.617044f, -0.617647f, -0.618250f, -0.618853f, -0.619455f,
+ -0.620057f, -0.620659f, -0.621260f, -0.621861f, -0.622461f, -0.623061f, -0.623661f, -0.624260f,
+ -0.624860f, -0.625458f, -0.626056f, -0.626654f, -0.627252f, -0.627849f, -0.628446f, -0.629042f,
+ -0.629638f, -0.630234f, -0.630829f, -0.631424f, -0.632019f, -0.632613f, -0.633207f, -0.633800f,
+ -0.634393f, -0.634986f, -0.635578f, -0.636170f, -0.636762f, -0.637353f, -0.637944f, -0.638534f,
+ -0.639124f, -0.639714f, -0.640303f, -0.640892f, -0.641481f, -0.642069f, -0.642657f, -0.643245f,
+ -0.643832f, -0.644418f, -0.645005f, -0.645590f, -0.646176f, -0.646761f, -0.647346f, -0.647930f,
+ -0.648514f, -0.649098f, -0.649681f, -0.650264f, -0.650847f, -0.651429f, -0.652011f, -0.652592f,
+ -0.653173f, -0.653753f, -0.654334f, -0.654913f, -0.655493f, -0.656072f, -0.656651f, -0.657229f,
+ -0.657807f, -0.658384f, -0.658961f, -0.659538f, -0.660114f, -0.660690f, -0.661266f, -0.661841f,
+ -0.662416f, -0.662990f, -0.663564f, -0.664138f, -0.664711f, -0.665284f, -0.665856f, -0.666428f,
+ -0.667000f, -0.667571f, -0.668142f, -0.668712f, -0.669283f, -0.669852f, -0.670422f, -0.670990f,
+ -0.671559f, -0.672127f, -0.672695f, -0.673262f, -0.673829f, -0.674396f, -0.674962f, -0.675527f,
+ -0.676093f, -0.676658f, -0.677222f, -0.677786f, -0.678350f, -0.678913f, -0.679476f, -0.680039f,
+ -0.680601f, -0.681163f, -0.681724f, -0.682285f, -0.682846f, -0.683406f, -0.683965f, -0.684525f,
+ -0.685084f, -0.685642f, -0.686200f, -0.686758f, -0.687315f, -0.687872f, -0.688429f, -0.688985f,
+ -0.689541f, -0.690096f, -0.690651f, -0.691205f, -0.691759f, -0.692313f, -0.692866f, -0.693419f,
+ -0.693971f, -0.694524f, -0.695075f, -0.695626f, -0.696177f, -0.696728f, -0.697277f, -0.697827f,
+ -0.698376f, -0.698925f, -0.699473f, -0.700021f, -0.700569f, -0.701116f, -0.701663f, -0.702209f,
+ -0.702755f, -0.703300f, -0.703845f, -0.704390f, -0.704934f, -0.705478f, -0.706021f, -0.706564f,
+ -0.707107f, -0.707649f, -0.708191f, -0.708732f, -0.709273f, -0.709813f, -0.710353f, -0.710893f,
+ -0.711432f, -0.711971f, -0.712509f, -0.713047f, -0.713585f, -0.714122f, -0.714659f, -0.715195f,
+ -0.715731f, -0.716266f, -0.716801f, -0.717336f, -0.717870f, -0.718404f, -0.718937f, -0.719470f,
+ -0.720003f, -0.720535f, -0.721066f, -0.721597f, -0.722128f, -0.722659f, -0.723188f, -0.723718f,
+ -0.724247f, -0.724776f, -0.725304f, -0.725832f, -0.726359f, -0.726886f, -0.727413f, -0.727939f,
+ -0.728464f, -0.728990f, -0.729514f, -0.730039f, -0.730563f, -0.731086f, -0.731609f, -0.732132f,
+ -0.732654f, -0.733176f, -0.733697f, -0.734218f, -0.734739f, -0.735259f, -0.735779f, -0.736298f,
+ -0.736817f, -0.737335f, -0.737853f, -0.738370f, -0.738887f, -0.739404f, -0.739920f, -0.740436f,
+ -0.740951f, -0.741466f, -0.741980f, -0.742494f, -0.743008f, -0.743521f, -0.744034f, -0.744546f,
+ -0.745058f, -0.745569f, -0.746080f, -0.746591f, -0.747101f, -0.747610f, -0.748119f, -0.748628f,
+ -0.749136f, -0.749644f, -0.750152f, -0.750659f, -0.751165f, -0.751671f, -0.752177f, -0.752682f,
+ -0.753187f, -0.753691f, -0.754195f, -0.754698f, -0.755201f, -0.755704f, -0.756206f, -0.756708f,
+ -0.757209f, -0.757710f, -0.758210f, -0.758710f, -0.759209f, -0.759708f, -0.760207f, -0.760705f,
+ -0.761202f, -0.761700f, -0.762196f, -0.762693f, -0.763188f, -0.763684f, -0.764179f, -0.764673f,
+ -0.765167f, -0.765661f, -0.766154f, -0.766647f, -0.767139f, -0.767631f, -0.768122f, -0.768613f,
+ -0.769103f, -0.769593f, -0.770083f, -0.770572f, -0.771061f, -0.771549f, -0.772036f, -0.772524f,
+ -0.773010f, -0.773497f, -0.773983f, -0.774468f, -0.774953f, -0.775438f, -0.775922f, -0.776405f,
+ -0.776888f, -0.777371f, -0.777853f, -0.778335f, -0.778817f, -0.779297f, -0.779778f, -0.780258f,
+ -0.780737f, -0.781216f, -0.781695f, -0.782173f, -0.782651f, -0.783128f, -0.783605f, -0.784081f,
+ -0.784557f, -0.785032f, -0.785507f, -0.785981f, -0.786455f, -0.786929f, -0.787402f, -0.787874f,
+ -0.788346f, -0.788818f, -0.789289f, -0.789760f, -0.790230f, -0.790700f, -0.791169f, -0.791638f,
+ -0.792107f, -0.792575f, -0.793042f, -0.793509f, -0.793975f, -0.794442f, -0.794907f, -0.795372f,
+ -0.795837f, -0.796301f, -0.796765f, -0.797228f, -0.797691f, -0.798153f, -0.798615f, -0.799076f,
+ -0.799537f, -0.799998f, -0.800458f, -0.800917f, -0.801376f, -0.801835f, -0.802293f, -0.802750f,
+ -0.803208f, -0.803664f, -0.804120f, -0.804576f, -0.805031f, -0.805486f, -0.805940f, -0.806394f,
+ -0.806848f, -0.807300f, -0.807753f, -0.808205f, -0.808656f, -0.809107f, -0.809558f, -0.810008f,
+ -0.810457f, -0.810906f, -0.811355f, -0.811803f, -0.812251f, -0.812698f, -0.813144f, -0.813591f,
+ -0.814036f, -0.814482f, -0.814926f, -0.815371f, -0.815814f, -0.816258f, -0.816701f, -0.817143f,
+ -0.817585f, -0.818026f, -0.818467f, -0.818908f, -0.819348f, -0.819787f, -0.820226f, -0.820664f,
+ -0.821102f, -0.821540f, -0.821977f, -0.822414f, -0.822850f, -0.823285f, -0.823721f, -0.824155f,
+ -0.824589f, -0.825023f, -0.825456f, -0.825889f, -0.826321f, -0.826753f, -0.827184f, -0.827615f,
+ -0.828045f, -0.828475f, -0.828904f, -0.829333f, -0.829761f, -0.830189f, -0.830616f, -0.831043f,
+ -0.831470f, -0.831895f, -0.832321f, -0.832746f, -0.833170f, -0.833594f, -0.834018f, -0.834440f,
+ -0.834863f, -0.835285f, -0.835706f, -0.836127f, -0.836548f, -0.836968f, -0.837387f, -0.837806f,
+ -0.838225f, -0.838643f, -0.839060f, -0.839477f, -0.839894f, -0.840310f, -0.840725f, -0.841140f,
+ -0.841555f, -0.841969f, -0.842383f, -0.842796f, -0.843208f, -0.843620f, -0.844032f, -0.844443f,
+ -0.844854f, -0.845264f, -0.845673f, -0.846082f, -0.846491f, -0.846899f, -0.847307f, -0.847714f,
+ -0.848120f, -0.848526f, -0.848932f, -0.849337f, -0.849742f, -0.850146f, -0.850549f, -0.850953f,
+ -0.851355f, -0.851757f, -0.852159f, -0.852560f, -0.852961f, -0.853361f, -0.853760f, -0.854159f,
+ -0.854558f, -0.854956f, -0.855354f, -0.855751f, -0.856147f, -0.856543f, -0.856939f, -0.857334f,
+ -0.857729f, -0.858123f, -0.858516f, -0.858909f, -0.859302f, -0.859694f, -0.860085f, -0.860476f,
+ -0.860867f, -0.861257f, -0.861646f, -0.862035f, -0.862424f, -0.862812f, -0.863199f, -0.863586f,
+ -0.863973f, -0.864359f, -0.864744f, -0.865129f, -0.865514f, -0.865898f, -0.866281f, -0.866664f,
+ -0.867046f, -0.867428f, -0.867809f, -0.868190f, -0.868571f, -0.868951f, -0.869330f, -0.869709f,
+ -0.870087f, -0.870465f, -0.870842f, -0.871219f, -0.871595f, -0.871971f, -0.872346f, -0.872721f,
+ -0.873095f, -0.873469f, -0.873842f, -0.874215f, -0.874587f, -0.874958f, -0.875329f, -0.875700f,
+ -0.876070f, -0.876440f, -0.876809f, -0.877177f, -0.877545f, -0.877913f, -0.878280f, -0.878646f,
+ -0.879012f, -0.879378f, -0.879743f, -0.880107f, -0.880471f, -0.880834f, -0.881197f, -0.881559f,
+ -0.881921f, -0.882283f, -0.882643f, -0.883004f, -0.883363f, -0.883723f, -0.884081f, -0.884439f,
+ -0.884797f, -0.885154f, -0.885511f, -0.885867f, -0.886223f, -0.886578f, -0.886932f, -0.887286f,
+ -0.887640f, -0.887993f, -0.888345f, -0.888697f, -0.889048f, -0.889399f, -0.889750f, -0.890099f,
+ -0.890449f, -0.890797f, -0.891146f, -0.891493f, -0.891841f, -0.892187f, -0.892534f, -0.892879f,
+ -0.893224f, -0.893569f, -0.893913f, -0.894256f, -0.894599f, -0.894942f, -0.895284f, -0.895625f,
+ -0.895966f, -0.896307f, -0.896646f, -0.896986f, -0.897325f, -0.897663f, -0.898001f, -0.898338f,
+ -0.898674f, -0.899011f, -0.899346f, -0.899681f, -0.900016f, -0.900350f, -0.900683f, -0.901016f,
+ -0.901349f, -0.901681f, -0.902012f, -0.902343f, -0.902673f, -0.903003f, -0.903332f, -0.903661f,
+ -0.903989f, -0.904317f, -0.904644f, -0.904971f, -0.905297f, -0.905622f, -0.905947f, -0.906272f,
+ -0.906596f, -0.906919f, -0.907242f, -0.907564f, -0.907886f, -0.908207f, -0.908528f, -0.908848f,
+ -0.909168f, -0.909487f, -0.909806f, -0.910124f, -0.910441f, -0.910758f, -0.911075f, -0.911391f,
+ -0.911706f, -0.912021f, -0.912335f, -0.912649f, -0.912962f, -0.913275f, -0.913587f, -0.913899f,
+ -0.914210f, -0.914520f, -0.914830f, -0.915140f, -0.915449f, -0.915757f, -0.916065f, -0.916372f,
+ -0.916679f, -0.916985f, -0.917291f, -0.917596f, -0.917901f, -0.918205f, -0.918508f, -0.918811f,
+ -0.919114f, -0.919416f, -0.919717f, -0.920018f, -0.920318f, -0.920618f, -0.920917f, -0.921216f,
+ -0.921514f, -0.921812f, -0.922109f, -0.922405f, -0.922701f, -0.922997f, -0.923291f, -0.923586f,
+ -0.923880f, -0.924173f, -0.924465f, -0.924758f, -0.925049f, -0.925340f, -0.925631f, -0.925921f,
+ -0.926210f, -0.926499f, -0.926787f, -0.927075f, -0.927363f, -0.927649f, -0.927935f, -0.928221f,
+ -0.928506f, -0.928791f, -0.929075f, -0.929358f, -0.929641f, -0.929923f, -0.930205f, -0.930486f,
+ -0.930767f, -0.931047f, -0.931327f, -0.931606f, -0.931884f, -0.932162f, -0.932440f, -0.932716f,
+ -0.932993f, -0.933269f, -0.933544f, -0.933818f, -0.934093f, -0.934366f, -0.934639f, -0.934912f,
+ -0.935184f, -0.935455f, -0.935726f, -0.935996f, -0.936266f, -0.936535f, -0.936803f, -0.937072f,
+ -0.937339f, -0.937606f, -0.937872f, -0.938138f, -0.938404f, -0.938668f, -0.938932f, -0.939196f,
+ -0.939459f, -0.939722f, -0.939984f, -0.940245f, -0.940506f, -0.940766f, -0.941026f, -0.941285f,
+ -0.941544f, -0.941802f, -0.942060f, -0.942317f, -0.942573f, -0.942829f, -0.943084f, -0.943339f,
+ -0.943593f, -0.943847f, -0.944100f, -0.944353f, -0.944605f, -0.944856f, -0.945107f, -0.945358f,
+ -0.945607f, -0.945857f, -0.946105f, -0.946353f, -0.946601f, -0.946848f, -0.947094f, -0.947340f,
+ -0.947586f, -0.947830f, -0.948075f, -0.948318f, -0.948561f, -0.948804f, -0.949046f, -0.949287f,
+ -0.949528f, -0.949768f, -0.950008f, -0.950247f, -0.950486f, -0.950724f, -0.950962f, -0.951199f,
+ -0.951435f, -0.951671f, -0.951906f, -0.952141f, -0.952375f, -0.952609f, -0.952842f, -0.953074f,
+ -0.953306f, -0.953537f, -0.953768f, -0.953998f, -0.954228f, -0.954457f, -0.954686f, -0.954914f,
+ -0.955141f, -0.955368f, -0.955594f, -0.955820f, -0.956045f, -0.956270f, -0.956494f, -0.956717f,
+ -0.956940f, -0.957163f, -0.957385f, -0.957606f, -0.957826f, -0.958046f, -0.958266f, -0.958485f,
+ -0.958703f, -0.958921f, -0.959139f, -0.959355f, -0.959572f, -0.959787f, -0.960002f, -0.960217f,
+ -0.960431f, -0.960644f, -0.960857f, -0.961069f, -0.961280f, -0.961492f, -0.961702f, -0.961912f,
+ -0.962121f, -0.962330f, -0.962538f, -0.962746f, -0.962953f, -0.963160f, -0.963366f, -0.963571f,
+ -0.963776f, -0.963980f, -0.964184f, -0.964387f, -0.964590f, -0.964792f, -0.964993f, -0.965194f,
+ -0.965394f, -0.965594f, -0.965793f, -0.965992f, -0.966190f, -0.966387f, -0.966584f, -0.966781f,
+ -0.966976f, -0.967172f, -0.967366f, -0.967560f, -0.967754f, -0.967947f, -0.968139f, -0.968331f,
+ -0.968522f, -0.968713f, -0.968903f, -0.969092f, -0.969281f, -0.969470f, -0.969657f, -0.969845f,
+ -0.970031f, -0.970217f, -0.970403f, -0.970588f, -0.970772f, -0.970956f, -0.971139f, -0.971322f,
+ -0.971504f, -0.971685f, -0.971866f, -0.972047f, -0.972227f, -0.972406f, -0.972584f, -0.972762f,
+ -0.972940f, -0.973117f, -0.973293f, -0.973469f, -0.973644f, -0.973819f, -0.973993f, -0.974166f,
+ -0.974339f, -0.974512f, -0.974684f, -0.974855f, -0.975025f, -0.975195f, -0.975365f, -0.975534f,
+ -0.975702f, -0.975870f, -0.976037f, -0.976204f, -0.976370f, -0.976535f, -0.976700f, -0.976864f,
+ -0.977028f, -0.977191f, -0.977354f, -0.977516f, -0.977677f, -0.977838f, -0.977998f, -0.978158f,
+ -0.978317f, -0.978476f, -0.978634f, -0.978791f, -0.978948f, -0.979104f, -0.979260f, -0.979415f,
+ -0.979570f, -0.979724f, -0.979877f, -0.980030f, -0.980182f, -0.980334f, -0.980485f, -0.980635f,
+ -0.980785f, -0.980935f, -0.981083f, -0.981232f, -0.981379f, -0.981526f, -0.981673f, -0.981819f,
+ -0.981964f, -0.982109f, -0.982253f, -0.982396f, -0.982539f, -0.982682f, -0.982824f, -0.982965f,
+ -0.983105f, -0.983246f, -0.983385f, -0.983524f, -0.983662f, -0.983800f, -0.983937f, -0.984074f,
+ -0.984210f, -0.984346f, -0.984480f, -0.984615f, -0.984748f, -0.984882f, -0.985014f, -0.985146f,
+ -0.985278f, -0.985408f, -0.985539f, -0.985668f, -0.985798f, -0.985926f, -0.986054f, -0.986181f,
+ -0.986308f, -0.986434f, -0.986560f, -0.986685f, -0.986809f, -0.986933f, -0.987057f, -0.987179f,
+ -0.987301f, -0.987423f, -0.987544f, -0.987664f, -0.987784f, -0.987903f, -0.988022f, -0.988140f,
+ -0.988258f, -0.988374f, -0.988491f, -0.988607f, -0.988722f, -0.988836f, -0.988950f, -0.989064f,
+ -0.989177f, -0.989289f, -0.989400f, -0.989511f, -0.989622f, -0.989732f, -0.989841f, -0.989950f,
+ -0.990058f, -0.990166f, -0.990273f, -0.990379f, -0.990485f, -0.990590f, -0.990695f, -0.990799f,
+ -0.990903f, -0.991006f, -0.991108f, -0.991210f, -0.991311f, -0.991411f, -0.991511f, -0.991611f,
+ -0.991710f, -0.991808f, -0.991906f, -0.992003f, -0.992099f, -0.992195f, -0.992291f, -0.992385f,
+ -0.992480f, -0.992573f, -0.992666f, -0.992759f, -0.992850f, -0.992942f, -0.993032f, -0.993122f,
+ -0.993212f, -0.993301f, -0.993389f, -0.993477f, -0.993564f, -0.993651f, -0.993737f, -0.993822f,
+ -0.993907f, -0.993991f, -0.994075f, -0.994158f, -0.994240f, -0.994322f, -0.994404f, -0.994484f,
+ -0.994565f, -0.994644f, -0.994723f, -0.994802f, -0.994879f, -0.994957f, -0.995033f, -0.995109f,
+ -0.995185f, -0.995260f, -0.995334f, -0.995408f, -0.995481f, -0.995553f, -0.995625f, -0.995697f,
+ -0.995767f, -0.995838f, -0.995907f, -0.995976f, -0.996045f, -0.996113f, -0.996180f, -0.996247f,
+ -0.996313f, -0.996378f, -0.996443f, -0.996507f, -0.996571f, -0.996634f, -0.996697f, -0.996759f,
+ -0.996820f, -0.996881f, -0.996941f, -0.997001f, -0.997060f, -0.997119f, -0.997176f, -0.997234f,
+ -0.997290f, -0.997347f, -0.997402f, -0.997457f, -0.997511f, -0.997565f, -0.997618f, -0.997671f,
+ -0.997723f, -0.997774f, -0.997825f, -0.997876f, -0.997925f, -0.997974f, -0.998023f, -0.998071f,
+ -0.998118f, -0.998165f, -0.998211f, -0.998257f, -0.998302f, -0.998346f, -0.998390f, -0.998433f,
+ -0.998476f, -0.998518f, -0.998559f, -0.998600f, -0.998640f, -0.998680f, -0.998719f, -0.998758f,
+ -0.998795f, -0.998833f, -0.998870f, -0.998906f, -0.998941f, -0.998976f, -0.999011f, -0.999044f,
+ -0.999078f, -0.999110f, -0.999142f, -0.999174f, -0.999205f, -0.999235f, -0.999265f, -0.999294f,
+ -0.999322f, -0.999350f, -0.999378f, -0.999404f, -0.999431f, -0.999456f, -0.999481f, -0.999506f,
+ -0.999529f, -0.999553f, -0.999575f, -0.999597f, -0.999619f, -0.999640f, -0.999660f, -0.999680f,
+ -0.999699f, -0.999717f, -0.999735f, -0.999753f, -0.999769f, -0.999786f, -0.999801f, -0.999816f,
+ -0.999831f, -0.999844f, -0.999858f, -0.999870f, -0.999882f, -0.999894f, -0.999905f, -0.999915f,
+ -0.999925f, -0.999934f, -0.999942f, -0.999950f, -0.999958f, -0.999964f, -0.999971f, -0.999976f,
+ -0.999981f, -0.999986f, -0.999989f, -0.999993f, -0.999995f, -0.999997f, -0.999999f, -1.000000
+};
+
+static const float sinTable16384[8192] = {
+ 0.000000f, 0.000383f, 0.000767f, 0.001150f, 0.001534f, 0.001917f, 0.002301f, 0.002684f,
+ 0.003068f, 0.003451f, 0.003835f, 0.004218f, 0.004602f, 0.004985f, 0.005369f, 0.005752f,
+ 0.006136f, 0.006519f, 0.006903f, 0.007286f, 0.007670f, 0.008053f, 0.008437f, 0.008820f,
+ 0.009204f, 0.009587f, 0.009971f, 0.010354f, 0.010738f, 0.011121f, 0.011505f, 0.011888f,
+ 0.012272f, 0.012655f, 0.013038f, 0.013422f, 0.013805f, 0.014189f, 0.014572f, 0.014956f,
+ 0.015339f, 0.015723f, 0.016106f, 0.016490f, 0.016873f, 0.017256f, 0.017640f, 0.018023f,
+ 0.018407f, 0.018790f, 0.019174f, 0.019557f, 0.019940f, 0.020324f, 0.020707f, 0.021091f,
+ 0.021474f, 0.021857f, 0.022241f, 0.022624f, 0.023008f, 0.023391f, 0.023774f, 0.024158f,
+ 0.024541f, 0.024925f, 0.025308f, 0.025691f, 0.026075f, 0.026458f, 0.026841f, 0.027225f,
+ 0.027608f, 0.027991f, 0.028375f, 0.028758f, 0.029142f, 0.029525f, 0.029908f, 0.030291f,
+ 0.030675f, 0.031058f, 0.031441f, 0.031825f, 0.032208f, 0.032591f, 0.032975f, 0.033358f,
+ 0.033741f, 0.034124f, 0.034508f, 0.034891f, 0.035274f, 0.035657f, 0.036041f, 0.036424f,
+ 0.036807f, 0.037190f, 0.037574f, 0.037957f, 0.038340f, 0.038723f, 0.039107f, 0.039490f,
+ 0.039873f, 0.040256f, 0.040639f, 0.041022f, 0.041406f, 0.041789f, 0.042172f, 0.042555f,
+ 0.042938f, 0.043321f, 0.043705f, 0.044088f, 0.044471f, 0.044854f, 0.045237f, 0.045620f,
+ 0.046003f, 0.046386f, 0.046769f, 0.047152f, 0.047535f, 0.047919f, 0.048302f, 0.048685f,
+ 0.049068f, 0.049451f, 0.049834f, 0.050217f, 0.050600f, 0.050983f, 0.051366f, 0.051749f,
+ 0.052132f, 0.052515f, 0.052898f, 0.053281f, 0.053664f, 0.054046f, 0.054429f, 0.054812f,
+ 0.055195f, 0.055578f, 0.055961f, 0.056344f, 0.056727f, 0.057110f, 0.057493f, 0.057875f,
+ 0.058258f, 0.058641f, 0.059024f, 0.059407f, 0.059790f, 0.060172f, 0.060555f, 0.060938f,
+ 0.061321f, 0.061704f, 0.062086f, 0.062469f, 0.062852f, 0.063234f, 0.063617f, 0.064000f,
+ 0.064383f, 0.064765f, 0.065148f, 0.065531f, 0.065913f, 0.066296f, 0.066679f, 0.067061f,
+ 0.067444f, 0.067827f, 0.068209f, 0.068592f, 0.068974f, 0.069357f, 0.069739f, 0.070122f,
+ 0.070505f, 0.070887f, 0.071270f, 0.071652f, 0.072035f, 0.072417f, 0.072800f, 0.073182f,
+ 0.073565f, 0.073947f, 0.074329f, 0.074712f, 0.075094f, 0.075477f, 0.075859f, 0.076241f,
+ 0.076624f, 0.077006f, 0.077389f, 0.077771f, 0.078153f, 0.078536f, 0.078918f, 0.079300f,
+ 0.079682f, 0.080065f, 0.080447f, 0.080829f, 0.081211f, 0.081594f, 0.081976f, 0.082358f,
+ 0.082740f, 0.083122f, 0.083505f, 0.083887f, 0.084269f, 0.084651f, 0.085033f, 0.085415f,
+ 0.085797f, 0.086179f, 0.086561f, 0.086943f, 0.087326f, 0.087708f, 0.088090f, 0.088472f,
+ 0.088854f, 0.089236f, 0.089617f, 0.089999f, 0.090381f, 0.090763f, 0.091145f, 0.091527f,
+ 0.091909f, 0.092291f, 0.092673f, 0.093055f, 0.093436f, 0.093818f, 0.094200f, 0.094582f,
+ 0.094963f, 0.095345f, 0.095727f, 0.096109f, 0.096490f, 0.096872f, 0.097254f, 0.097635f,
+ 0.098017f, 0.098399f, 0.098780f, 0.099162f, 0.099544f, 0.099925f, 0.100307f, 0.100688f,
+ 0.101070f, 0.101451f, 0.101833f, 0.102214f, 0.102596f, 0.102977f, 0.103359f, 0.103740f,
+ 0.104122f, 0.104503f, 0.104884f, 0.105266f, 0.105647f, 0.106028f, 0.106410f, 0.106791f,
+ 0.107172f, 0.107554f, 0.107935f, 0.108316f, 0.108697f, 0.109079f, 0.109460f, 0.109841f,
+ 0.110222f, 0.110603f, 0.110984f, 0.111366f, 0.111747f, 0.112128f, 0.112509f, 0.112890f,
+ 0.113271f, 0.113652f, 0.114033f, 0.114414f, 0.114795f, 0.115176f, 0.115557f, 0.115938f,
+ 0.116319f, 0.116700f, 0.117080f, 0.117461f, 0.117842f, 0.118223f, 0.118604f, 0.118984f,
+ 0.119365f, 0.119746f, 0.120127f, 0.120507f, 0.120888f, 0.121269f, 0.121649f, 0.122030f,
+ 0.122411f, 0.122791f, 0.123172f, 0.123552f, 0.123933f, 0.124314f, 0.124694f, 0.125075f,
+ 0.125455f, 0.125835f, 0.126216f, 0.126596f, 0.126977f, 0.127357f, 0.127737f, 0.128118f,
+ 0.128498f, 0.128878f, 0.129259f, 0.129639f, 0.130019f, 0.130399f, 0.130780f, 0.131160f,
+ 0.131540f, 0.131920f, 0.132300f, 0.132680f, 0.133061f, 0.133441f, 0.133821f, 0.134201f,
+ 0.134581f, 0.134961f, 0.135341f, 0.135721f, 0.136101f, 0.136480f, 0.136860f, 0.137240f,
+ 0.137620f, 0.138000f, 0.138380f, 0.138760f, 0.139139f, 0.139519f, 0.139899f, 0.140279f,
+ 0.140658f, 0.141038f, 0.141418f, 0.141797f, 0.142177f, 0.142556f, 0.142936f, 0.143316f,
+ 0.143695f, 0.144075f, 0.144454f, 0.144833f, 0.145213f, 0.145592f, 0.145972f, 0.146351f,
+ 0.146730f, 0.147110f, 0.147489f, 0.147868f, 0.148248f, 0.148627f, 0.149006f, 0.149385f,
+ 0.149765f, 0.150144f, 0.150523f, 0.150902f, 0.151281f, 0.151660f, 0.152039f, 0.152418f,
+ 0.152797f, 0.153176f, 0.153555f, 0.153934f, 0.154313f, 0.154692f, 0.155071f, 0.155450f,
+ 0.155828f, 0.156207f, 0.156586f, 0.156965f, 0.157343f, 0.157722f, 0.158101f, 0.158480f,
+ 0.158858f, 0.159237f, 0.159615f, 0.159994f, 0.160372f, 0.160751f, 0.161129f, 0.161508f,
+ 0.161886f, 0.162265f, 0.162643f, 0.163022f, 0.163400f, 0.163778f, 0.164157f, 0.164535f,
+ 0.164913f, 0.165291f, 0.165670f, 0.166048f, 0.166426f, 0.166804f, 0.167182f, 0.167560f,
+ 0.167938f, 0.168316f, 0.168694f, 0.169072f, 0.169450f, 0.169828f, 0.170206f, 0.170584f,
+ 0.170962f, 0.171340f, 0.171718f, 0.172095f, 0.172473f, 0.172851f, 0.173229f, 0.173606f,
+ 0.173984f, 0.174362f, 0.174739f, 0.175117f, 0.175494f, 0.175872f, 0.176249f, 0.176627f,
+ 0.177004f, 0.177382f, 0.177759f, 0.178136f, 0.178514f, 0.178891f, 0.179268f, 0.179646f,
+ 0.180023f, 0.180400f, 0.180777f, 0.181154f, 0.181532f, 0.181909f, 0.182286f, 0.182663f,
+ 0.183040f, 0.183417f, 0.183794f, 0.184171f, 0.184548f, 0.184925f, 0.185301f, 0.185678f,
+ 0.186055f, 0.186432f, 0.186809f, 0.187185f, 0.187562f, 0.187939f, 0.188315f, 0.188692f,
+ 0.189069f, 0.189445f, 0.189822f, 0.190198f, 0.190575f, 0.190951f, 0.191328f, 0.191704f,
+ 0.192080f, 0.192457f, 0.192833f, 0.193209f, 0.193586f, 0.193962f, 0.194338f, 0.194714f,
+ 0.195090f, 0.195466f, 0.195843f, 0.196219f, 0.196595f, 0.196971f, 0.197347f, 0.197722f,
+ 0.198098f, 0.198474f, 0.198850f, 0.199226f, 0.199602f, 0.199978f, 0.200353f, 0.200729f,
+ 0.201105f, 0.201480f, 0.201856f, 0.202231f, 0.202607f, 0.202983f, 0.203358f, 0.203734f,
+ 0.204109f, 0.204484f, 0.204860f, 0.205235f, 0.205610f, 0.205986f, 0.206361f, 0.206736f,
+ 0.207111f, 0.207487f, 0.207862f, 0.208237f, 0.208612f, 0.208987f, 0.209362f, 0.209737f,
+ 0.210112f, 0.210487f, 0.210862f, 0.211237f, 0.211611f, 0.211986f, 0.212361f, 0.212736f,
+ 0.213110f, 0.213485f, 0.213860f, 0.214234f, 0.214609f, 0.214983f, 0.215358f, 0.215732f,
+ 0.216107f, 0.216481f, 0.216856f, 0.217230f, 0.217604f, 0.217979f, 0.218353f, 0.218727f,
+ 0.219101f, 0.219475f, 0.219850f, 0.220224f, 0.220598f, 0.220972f, 0.221346f, 0.221720f,
+ 0.222094f, 0.222468f, 0.222841f, 0.223215f, 0.223589f, 0.223963f, 0.224337f, 0.224710f,
+ 0.225084f, 0.225458f, 0.225831f, 0.226205f, 0.226578f, 0.226952f, 0.227325f, 0.227699f,
+ 0.228072f, 0.228445f, 0.228819f, 0.229192f, 0.229565f, 0.229939f, 0.230312f, 0.230685f,
+ 0.231058f, 0.231431f, 0.231804f, 0.232177f, 0.232550f, 0.232923f, 0.233296f, 0.233669f,
+ 0.234042f, 0.234415f, 0.234788f, 0.235160f, 0.235533f, 0.235906f, 0.236278f, 0.236651f,
+ 0.237024f, 0.237396f, 0.237769f, 0.238141f, 0.238514f, 0.238886f, 0.239258f, 0.239631f,
+ 0.240003f, 0.240375f, 0.240748f, 0.241120f, 0.241492f, 0.241864f, 0.242236f, 0.242608f,
+ 0.242980f, 0.243352f, 0.243724f, 0.244096f, 0.244468f, 0.244840f, 0.245212f, 0.245583f,
+ 0.245955f, 0.246327f, 0.246698f, 0.247070f, 0.247442f, 0.247813f, 0.248185f, 0.248556f,
+ 0.248928f, 0.249299f, 0.249670f, 0.250042f, 0.250413f, 0.250784f, 0.251155f, 0.251527f,
+ 0.251898f, 0.252269f, 0.252640f, 0.253011f, 0.253382f, 0.253753f, 0.254124f, 0.254495f,
+ 0.254866f, 0.255236f, 0.255607f, 0.255978f, 0.256349f, 0.256719f, 0.257090f, 0.257461f,
+ 0.257831f, 0.258202f, 0.258572f, 0.258943f, 0.259313f, 0.259683f, 0.260054f, 0.260424f,
+ 0.260794f, 0.261164f, 0.261534f, 0.261905f, 0.262275f, 0.262645f, 0.263015f, 0.263385f,
+ 0.263755f, 0.264125f, 0.264494f, 0.264864f, 0.265234f, 0.265604f, 0.265973f, 0.266343f,
+ 0.266713f, 0.267082f, 0.267452f, 0.267821f, 0.268191f, 0.268560f, 0.268930f, 0.269299f,
+ 0.269668f, 0.270038f, 0.270407f, 0.270776f, 0.271145f, 0.271514f, 0.271883f, 0.272252f,
+ 0.272621f, 0.272990f, 0.273359f, 0.273728f, 0.274097f, 0.274466f, 0.274834f, 0.275203f,
+ 0.275572f, 0.275940f, 0.276309f, 0.276678f, 0.277046f, 0.277415f, 0.277783f, 0.278151f,
+ 0.278520f, 0.278888f, 0.279256f, 0.279624f, 0.279993f, 0.280361f, 0.280729f, 0.281097f,
+ 0.281465f, 0.281833f, 0.282201f, 0.282569f, 0.282937f, 0.283304f, 0.283672f, 0.284040f,
+ 0.284408f, 0.284775f, 0.285143f, 0.285510f, 0.285878f, 0.286245f, 0.286613f, 0.286980f,
+ 0.287347f, 0.287715f, 0.288082f, 0.288449f, 0.288816f, 0.289184f, 0.289551f, 0.289918f,
+ 0.290285f, 0.290652f, 0.291019f, 0.291385f, 0.291752f, 0.292119f, 0.292486f, 0.292852f,
+ 0.293219f, 0.293586f, 0.293952f, 0.294319f, 0.294685f, 0.295052f, 0.295418f, 0.295785f,
+ 0.296151f, 0.296517f, 0.296883f, 0.297250f, 0.297616f, 0.297982f, 0.298348f, 0.298714f,
+ 0.299080f, 0.299446f, 0.299812f, 0.300177f, 0.300543f, 0.300909f, 0.301275f, 0.301640f,
+ 0.302006f, 0.302372f, 0.302737f, 0.303103f, 0.303468f, 0.303833f, 0.304199f, 0.304564f,
+ 0.304929f, 0.305294f, 0.305660f, 0.306025f, 0.306390f, 0.306755f, 0.307120f, 0.307485f,
+ 0.307850f, 0.308214f, 0.308579f, 0.308944f, 0.309309f, 0.309673f, 0.310038f, 0.310403f,
+ 0.310767f, 0.311132f, 0.311496f, 0.311860f, 0.312225f, 0.312589f, 0.312953f, 0.313318f,
+ 0.313682f, 0.314046f, 0.314410f, 0.314774f, 0.315138f, 0.315502f, 0.315866f, 0.316230f,
+ 0.316593f, 0.316957f, 0.317321f, 0.317684f, 0.318048f, 0.318412f, 0.318775f, 0.319139f,
+ 0.319502f, 0.319865f, 0.320229f, 0.320592f, 0.320955f, 0.321318f, 0.321682f, 0.322045f,
+ 0.322408f, 0.322771f, 0.323134f, 0.323497f, 0.323859f, 0.324222f, 0.324585f, 0.324948f,
+ 0.325310f, 0.325673f, 0.326035f, 0.326398f, 0.326760f, 0.327123f, 0.327485f, 0.327848f,
+ 0.328210f, 0.328572f, 0.328934f, 0.329296f, 0.329658f, 0.330020f, 0.330382f, 0.330744f,
+ 0.331106f, 0.331468f, 0.331830f, 0.332192f, 0.332553f, 0.332915f, 0.333277f, 0.333638f,
+ 0.334000f, 0.334361f, 0.334722f, 0.335084f, 0.335445f, 0.335806f, 0.336168f, 0.336529f,
+ 0.336890f, 0.337251f, 0.337612f, 0.337973f, 0.338334f, 0.338695f, 0.339055f, 0.339416f,
+ 0.339777f, 0.340138f, 0.340498f, 0.340859f, 0.341219f, 0.341580f, 0.341940f, 0.342300f,
+ 0.342661f, 0.343021f, 0.343381f, 0.343741f, 0.344101f, 0.344461f, 0.344821f, 0.345181f,
+ 0.345541f, 0.345901f, 0.346261f, 0.346621f, 0.346980f, 0.347340f, 0.347700f, 0.348059f,
+ 0.348419f, 0.348778f, 0.349138f, 0.349497f, 0.349856f, 0.350215f, 0.350575f, 0.350934f,
+ 0.351293f, 0.351652f, 0.352011f, 0.352370f, 0.352729f, 0.353087f, 0.353446f, 0.353805f,
+ 0.354164f, 0.354522f, 0.354881f, 0.355239f, 0.355598f, 0.355956f, 0.356314f, 0.356673f,
+ 0.357031f, 0.357389f, 0.357747f, 0.358105f, 0.358463f, 0.358821f, 0.359179f, 0.359537f,
+ 0.359895f, 0.360253f, 0.360611f, 0.360968f, 0.361326f, 0.361683f, 0.362041f, 0.362398f,
+ 0.362756f, 0.363113f, 0.363470f, 0.363828f, 0.364185f, 0.364542f, 0.364899f, 0.365256f,
+ 0.365613f, 0.365970f, 0.366327f, 0.366684f, 0.367040f, 0.367397f, 0.367754f, 0.368110f,
+ 0.368467f, 0.368823f, 0.369180f, 0.369536f, 0.369892f, 0.370249f, 0.370605f, 0.370961f,
+ 0.371317f, 0.371673f, 0.372029f, 0.372385f, 0.372741f, 0.373097f, 0.373453f, 0.373808f,
+ 0.374164f, 0.374520f, 0.374875f, 0.375231f, 0.375586f, 0.375942f, 0.376297f, 0.376652f,
+ 0.377007f, 0.377363f, 0.377718f, 0.378073f, 0.378428f, 0.378783f, 0.379138f, 0.379492f,
+ 0.379847f, 0.380202f, 0.380557f, 0.380911f, 0.381266f, 0.381620f, 0.381975f, 0.382329f,
+ 0.382683f, 0.383038f, 0.383392f, 0.383746f, 0.384100f, 0.384454f, 0.384808f, 0.385162f,
+ 0.385516f, 0.385870f, 0.386224f, 0.386577f, 0.386931f, 0.387285f, 0.387638f, 0.387992f,
+ 0.388345f, 0.388698f, 0.389052f, 0.389405f, 0.389758f, 0.390111f, 0.390464f, 0.390817f,
+ 0.391170f, 0.391523f, 0.391876f, 0.392229f, 0.392582f, 0.392934f, 0.393287f, 0.393640f,
+ 0.393992f, 0.394344f, 0.394697f, 0.395049f, 0.395401f, 0.395754f, 0.396106f, 0.396458f,
+ 0.396810f, 0.397162f, 0.397514f, 0.397866f, 0.398218f, 0.398569f, 0.398921f, 0.399273f,
+ 0.399624f, 0.399976f, 0.400327f, 0.400679f, 0.401030f, 0.401381f, 0.401732f, 0.402084f,
+ 0.402435f, 0.402786f, 0.403137f, 0.403488f, 0.403838f, 0.404189f, 0.404540f, 0.404891f,
+ 0.405241f, 0.405592f, 0.405942f, 0.406293f, 0.406643f, 0.406994f, 0.407344f, 0.407694f,
+ 0.408044f, 0.408394f, 0.408744f, 0.409094f, 0.409444f, 0.409794f, 0.410144f, 0.410493f,
+ 0.410843f, 0.411193f, 0.411542f, 0.411892f, 0.412241f, 0.412591f, 0.412940f, 0.413289f,
+ 0.413638f, 0.413987f, 0.414337f, 0.414685f, 0.415034f, 0.415383f, 0.415732f, 0.416081f,
+ 0.416430f, 0.416778f, 0.417127f, 0.417475f, 0.417824f, 0.418172f, 0.418520f, 0.418869f,
+ 0.419217f, 0.419565f, 0.419913f, 0.420261f, 0.420609f, 0.420957f, 0.421305f, 0.421653f,
+ 0.422000f, 0.422348f, 0.422695f, 0.423043f, 0.423390f, 0.423738f, 0.424085f, 0.424432f,
+ 0.424780f, 0.425127f, 0.425474f, 0.425821f, 0.426168f, 0.426515f, 0.426862f, 0.427208f,
+ 0.427555f, 0.427902f, 0.428248f, 0.428595f, 0.428941f, 0.429288f, 0.429634f, 0.429980f,
+ 0.430326f, 0.430673f, 0.431019f, 0.431365f, 0.431711f, 0.432057f, 0.432402f, 0.432748f,
+ 0.433094f, 0.433439f, 0.433785f, 0.434131f, 0.434476f, 0.434821f, 0.435167f, 0.435512f,
+ 0.435857f, 0.436202f, 0.436547f, 0.436892f, 0.437237f, 0.437582f, 0.437927f, 0.438272f,
+ 0.438616f, 0.438961f, 0.439305f, 0.439650f, 0.439994f, 0.440339f, 0.440683f, 0.441027f,
+ 0.441371f, 0.441715f, 0.442059f, 0.442403f, 0.442747f, 0.443091f, 0.443435f, 0.443779f,
+ 0.444122f, 0.444466f, 0.444809f, 0.445153f, 0.445496f, 0.445839f, 0.446183f, 0.446526f,
+ 0.446869f, 0.447212f, 0.447555f, 0.447898f, 0.448241f, 0.448583f, 0.448926f, 0.449269f,
+ 0.449611f, 0.449954f, 0.450296f, 0.450639f, 0.450981f, 0.451323f, 0.451665f, 0.452008f,
+ 0.452350f, 0.452692f, 0.453033f, 0.453375f, 0.453717f, 0.454059f, 0.454400f, 0.454742f,
+ 0.455084f, 0.455425f, 0.455766f, 0.456108f, 0.456449f, 0.456790f, 0.457131f, 0.457472f,
+ 0.457813f, 0.458154f, 0.458495f, 0.458836f, 0.459177f, 0.459517f, 0.459858f, 0.460198f,
+ 0.460539f, 0.460879f, 0.461219f, 0.461560f, 0.461900f, 0.462240f, 0.462580f, 0.462920f,
+ 0.463260f, 0.463600f, 0.463939f, 0.464279f, 0.464619f, 0.464958f, 0.465298f, 0.465637f,
+ 0.465977f, 0.466316f, 0.466655f, 0.466994f, 0.467333f, 0.467672f, 0.468011f, 0.468350f,
+ 0.468689f, 0.469028f, 0.469366f, 0.469705f, 0.470043f, 0.470382f, 0.470720f, 0.471058f,
+ 0.471397f, 0.471735f, 0.472073f, 0.472411f, 0.472749f, 0.473087f, 0.473425f, 0.473763f,
+ 0.474100f, 0.474438f, 0.474775f, 0.475113f, 0.475450f, 0.475788f, 0.476125f, 0.476462f,
+ 0.476799f, 0.477136f, 0.477473f, 0.477810f, 0.478147f, 0.478484f, 0.478821f, 0.479157f,
+ 0.479494f, 0.479830f, 0.480167f, 0.480503f, 0.480839f, 0.481176f, 0.481512f, 0.481848f,
+ 0.482184f, 0.482520f, 0.482856f, 0.483191f, 0.483527f, 0.483863f, 0.484198f, 0.484534f,
+ 0.484869f, 0.485205f, 0.485540f, 0.485875f, 0.486210f, 0.486545f, 0.486880f, 0.487215f,
+ 0.487550f, 0.487885f, 0.488220f, 0.488554f, 0.488889f, 0.489223f, 0.489558f, 0.489892f,
+ 0.490226f, 0.490561f, 0.490895f, 0.491229f, 0.491563f, 0.491897f, 0.492231f, 0.492564f,
+ 0.492898f, 0.493232f, 0.493565f, 0.493899f, 0.494232f, 0.494566f, 0.494899f, 0.495232f,
+ 0.495565f, 0.495898f, 0.496231f, 0.496564f, 0.496897f, 0.497230f, 0.497562f, 0.497895f,
+ 0.498228f, 0.498560f, 0.498893f, 0.499225f, 0.499557f, 0.499889f, 0.500221f, 0.500553f,
+ 0.500885f, 0.501217f, 0.501549f, 0.501881f, 0.502212f, 0.502544f, 0.502876f, 0.503207f,
+ 0.503538f, 0.503870f, 0.504201f, 0.504532f, 0.504863f, 0.505194f, 0.505525f, 0.505856f,
+ 0.506187f, 0.506517f, 0.506848f, 0.507179f, 0.507509f, 0.507839f, 0.508170f, 0.508500f,
+ 0.508830f, 0.509160f, 0.509490f, 0.509820f, 0.510150f, 0.510480f, 0.510810f, 0.511139f,
+ 0.511469f, 0.511798f, 0.512128f, 0.512457f, 0.512786f, 0.513116f, 0.513445f, 0.513774f,
+ 0.514103f, 0.514432f, 0.514760f, 0.515089f, 0.515418f, 0.515746f, 0.516075f, 0.516403f,
+ 0.516732f, 0.517060f, 0.517388f, 0.517716f, 0.518045f, 0.518372f, 0.518700f, 0.519028f,
+ 0.519356f, 0.519684f, 0.520011f, 0.520339f, 0.520666f, 0.520994f, 0.521321f, 0.521648f,
+ 0.521975f, 0.522302f, 0.522629f, 0.522956f, 0.523283f, 0.523610f, 0.523937f, 0.524263f,
+ 0.524590f, 0.524916f, 0.525243f, 0.525569f, 0.525895f, 0.526221f, 0.526547f, 0.526873f,
+ 0.527199f, 0.527525f, 0.527851f, 0.528176f, 0.528502f, 0.528828f, 0.529153f, 0.529478f,
+ 0.529804f, 0.530129f, 0.530454f, 0.530779f, 0.531104f, 0.531429f, 0.531754f, 0.532078f,
+ 0.532403f, 0.532728f, 0.533052f, 0.533377f, 0.533701f, 0.534025f, 0.534349f, 0.534674f,
+ 0.534998f, 0.535322f, 0.535645f, 0.535969f, 0.536293f, 0.536617f, 0.536940f, 0.537264f,
+ 0.537587f, 0.537910f, 0.538234f, 0.538557f, 0.538880f, 0.539203f, 0.539526f, 0.539849f,
+ 0.540171f, 0.540494f, 0.540817f, 0.541139f, 0.541462f, 0.541784f, 0.542106f, 0.542429f,
+ 0.542751f, 0.543073f, 0.543395f, 0.543717f, 0.544039f, 0.544360f, 0.544682f, 0.545003f,
+ 0.545325f, 0.545646f, 0.545968f, 0.546289f, 0.546610f, 0.546931f, 0.547252f, 0.547573f,
+ 0.547894f, 0.548215f, 0.548536f, 0.548856f, 0.549177f, 0.549497f, 0.549818f, 0.550138f,
+ 0.550458f, 0.550778f, 0.551098f, 0.551418f, 0.551738f, 0.552058f, 0.552378f, 0.552697f,
+ 0.553017f, 0.553336f, 0.553656f, 0.553975f, 0.554294f, 0.554613f, 0.554932f, 0.555251f,
+ 0.555570f, 0.555889f, 0.556208f, 0.556526f, 0.556845f, 0.557164f, 0.557482f, 0.557800f,
+ 0.558119f, 0.558437f, 0.558755f, 0.559073f, 0.559391f, 0.559709f, 0.560026f, 0.560344f,
+ 0.560662f, 0.560979f, 0.561297f, 0.561614f, 0.561931f, 0.562248f, 0.562565f, 0.562882f,
+ 0.563199f, 0.563516f, 0.563833f, 0.564150f, 0.564466f, 0.564783f, 0.565099f, 0.565416f,
+ 0.565732f, 0.566048f, 0.566364f, 0.566680f, 0.566996f, 0.567312f, 0.567628f, 0.567943f,
+ 0.568259f, 0.568574f, 0.568890f, 0.569205f, 0.569521f, 0.569836f, 0.570151f, 0.570466f,
+ 0.570781f, 0.571096f, 0.571410f, 0.571725f, 0.572040f, 0.572354f, 0.572669f, 0.572983f,
+ 0.573297f, 0.573611f, 0.573925f, 0.574239f, 0.574553f, 0.574867f, 0.575181f, 0.575495f,
+ 0.575808f, 0.576122f, 0.576435f, 0.576748f, 0.577062f, 0.577375f, 0.577688f, 0.578001f,
+ 0.578314f, 0.578627f, 0.578939f, 0.579252f, 0.579565f, 0.579877f, 0.580189f, 0.580502f,
+ 0.580814f, 0.581126f, 0.581438f, 0.581750f, 0.582062f, 0.582374f, 0.582685f, 0.582997f,
+ 0.583309f, 0.583620f, 0.583931f, 0.584243f, 0.584554f, 0.584865f, 0.585176f, 0.585487f,
+ 0.585798f, 0.586109f, 0.586419f, 0.586730f, 0.587040f, 0.587351f, 0.587661f, 0.587971f,
+ 0.588282f, 0.588592f, 0.588902f, 0.589212f, 0.589521f, 0.589831f, 0.590141f, 0.590450f,
+ 0.590760f, 0.591069f, 0.591378f, 0.591688f, 0.591997f, 0.592306f, 0.592615f, 0.592924f,
+ 0.593232f, 0.593541f, 0.593850f, 0.594158f, 0.594467f, 0.594775f, 0.595083f, 0.595391f,
+ 0.595699f, 0.596007f, 0.596315f, 0.596623f, 0.596931f, 0.597238f, 0.597546f, 0.597853f,
+ 0.598161f, 0.598468f, 0.598775f, 0.599082f, 0.599389f, 0.599696f, 0.600003f, 0.600310f,
+ 0.600616f, 0.600923f, 0.601230f, 0.601536f, 0.601842f, 0.602148f, 0.602455f, 0.602761f,
+ 0.603067f, 0.603372f, 0.603678f, 0.603984f, 0.604290f, 0.604595f, 0.604900f, 0.605206f,
+ 0.605511f, 0.605816f, 0.606121f, 0.606426f, 0.606731f, 0.607036f, 0.607341f, 0.607645f,
+ 0.607950f, 0.608254f, 0.608559f, 0.608863f, 0.609167f, 0.609471f, 0.609775f, 0.610079f,
+ 0.610383f, 0.610687f, 0.610990f, 0.611294f, 0.611597f, 0.611901f, 0.612204f, 0.612507f,
+ 0.612810f, 0.613113f, 0.613416f, 0.613719f, 0.614022f, 0.614324f, 0.614627f, 0.614929f,
+ 0.615232f, 0.615534f, 0.615836f, 0.616138f, 0.616440f, 0.616742f, 0.617044f, 0.617346f,
+ 0.617647f, 0.617949f, 0.618250f, 0.618552f, 0.618853f, 0.619154f, 0.619455f, 0.619756f,
+ 0.620057f, 0.620358f, 0.620659f, 0.620959f, 0.621260f, 0.621560f, 0.621861f, 0.622161f,
+ 0.622461f, 0.622761f, 0.623061f, 0.623361f, 0.623661f, 0.623961f, 0.624260f, 0.624560f,
+ 0.624860f, 0.625159f, 0.625458f, 0.625757f, 0.626056f, 0.626355f, 0.626654f, 0.626953f,
+ 0.627252f, 0.627550f, 0.627849f, 0.628147f, 0.628446f, 0.628744f, 0.629042f, 0.629340f,
+ 0.629638f, 0.629936f, 0.630234f, 0.630532f, 0.630829f, 0.631127f, 0.631424f, 0.631721f,
+ 0.632019f, 0.632316f, 0.632613f, 0.632910f, 0.633207f, 0.633504f, 0.633800f, 0.634097f,
+ 0.634393f, 0.634690f, 0.634986f, 0.635282f, 0.635578f, 0.635874f, 0.636170f, 0.636466f,
+ 0.636762f, 0.637057f, 0.637353f, 0.637649f, 0.637944f, 0.638239f, 0.638534f, 0.638829f,
+ 0.639124f, 0.639419f, 0.639714f, 0.640009f, 0.640303f, 0.640598f, 0.640892f, 0.641187f,
+ 0.641481f, 0.641775f, 0.642069f, 0.642363f, 0.642657f, 0.642951f, 0.643245f, 0.643538f,
+ 0.643832f, 0.644125f, 0.644418f, 0.644711f, 0.645005f, 0.645298f, 0.645590f, 0.645883f,
+ 0.646176f, 0.646469f, 0.646761f, 0.647054f, 0.647346f, 0.647638f, 0.647930f, 0.648222f,
+ 0.648514f, 0.648806f, 0.649098f, 0.649390f, 0.649681f, 0.649973f, 0.650264f, 0.650555f,
+ 0.650847f, 0.651138f, 0.651429f, 0.651720f, 0.652011f, 0.652301f, 0.652592f, 0.652882f,
+ 0.653173f, 0.653463f, 0.653753f, 0.654044f, 0.654334f, 0.654624f, 0.654913f, 0.655203f,
+ 0.655493f, 0.655782f, 0.656072f, 0.656361f, 0.656651f, 0.656940f, 0.657229f, 0.657518f,
+ 0.657807f, 0.658095f, 0.658384f, 0.658673f, 0.658961f, 0.659250f, 0.659538f, 0.659826f,
+ 0.660114f, 0.660402f, 0.660690f, 0.660978f, 0.661266f, 0.661553f, 0.661841f, 0.662128f,
+ 0.662416f, 0.662703f, 0.662990f, 0.663277f, 0.663564f, 0.663851f, 0.664138f, 0.664424f,
+ 0.664711f, 0.664997f, 0.665284f, 0.665570f, 0.665856f, 0.666142f, 0.666428f, 0.666714f,
+ 0.667000f, 0.667286f, 0.667571f, 0.667857f, 0.668142f, 0.668427f, 0.668712f, 0.668998f,
+ 0.669283f, 0.669567f, 0.669852f, 0.670137f, 0.670422f, 0.670706f, 0.670990f, 0.671275f,
+ 0.671559f, 0.671843f, 0.672127f, 0.672411f, 0.672695f, 0.672978f, 0.673262f, 0.673546f,
+ 0.673829f, 0.674112f, 0.674396f, 0.674679f, 0.674962f, 0.675245f, 0.675527f, 0.675810f,
+ 0.676093f, 0.676375f, 0.676658f, 0.676940f, 0.677222f, 0.677504f, 0.677786f, 0.678068f,
+ 0.678350f, 0.678632f, 0.678913f, 0.679195f, 0.679476f, 0.679758f, 0.680039f, 0.680320f,
+ 0.680601f, 0.680882f, 0.681163f, 0.681443f, 0.681724f, 0.682005f, 0.682285f, 0.682565f,
+ 0.682846f, 0.683126f, 0.683406f, 0.683686f, 0.683965f, 0.684245f, 0.684525f, 0.684804f,
+ 0.685084f, 0.685363f, 0.685642f, 0.685921f, 0.686200f, 0.686479f, 0.686758f, 0.687037f,
+ 0.687315f, 0.687594f, 0.687872f, 0.688151f, 0.688429f, 0.688707f, 0.688985f, 0.689263f,
+ 0.689541f, 0.689818f, 0.690096f, 0.690373f, 0.690651f, 0.690928f, 0.691205f, 0.691482f,
+ 0.691759f, 0.692036f, 0.692313f, 0.692590f, 0.692866f, 0.693143f, 0.693419f, 0.693695f,
+ 0.693971f, 0.694248f, 0.694524f, 0.694799f, 0.695075f, 0.695351f, 0.695626f, 0.695902f,
+ 0.696177f, 0.696452f, 0.696728f, 0.697003f, 0.697277f, 0.697552f, 0.697827f, 0.698102f,
+ 0.698376f, 0.698651f, 0.698925f, 0.699199f, 0.699473f, 0.699747f, 0.700021f, 0.700295f,
+ 0.700569f, 0.700842f, 0.701116f, 0.701389f, 0.701663f, 0.701936f, 0.702209f, 0.702482f,
+ 0.702755f, 0.703028f, 0.703300f, 0.703573f, 0.703845f, 0.704118f, 0.704390f, 0.704662f,
+ 0.704934f, 0.705206f, 0.705478f, 0.705750f, 0.706021f, 0.706293f, 0.706564f, 0.706836f,
+ 0.707107f, 0.707378f, 0.707649f, 0.707920f, 0.708191f, 0.708461f, 0.708732f, 0.709002f,
+ 0.709273f, 0.709543f, 0.709813f, 0.710083f, 0.710353f, 0.710623f, 0.710893f, 0.711163f,
+ 0.711432f, 0.711702f, 0.711971f, 0.712240f, 0.712509f, 0.712778f, 0.713047f, 0.713316f,
+ 0.713585f, 0.713853f, 0.714122f, 0.714390f, 0.714659f, 0.714927f, 0.715195f, 0.715463f,
+ 0.715731f, 0.715999f, 0.716266f, 0.716534f, 0.716801f, 0.717069f, 0.717336f, 0.717603f,
+ 0.717870f, 0.718137f, 0.718404f, 0.718670f, 0.718937f, 0.719204f, 0.719470f, 0.719736f,
+ 0.720003f, 0.720269f, 0.720535f, 0.720800f, 0.721066f, 0.721332f, 0.721597f, 0.721863f,
+ 0.722128f, 0.722393f, 0.722659f, 0.722924f, 0.723188f, 0.723453f, 0.723718f, 0.723983f,
+ 0.724247f, 0.724511f, 0.724776f, 0.725040f, 0.725304f, 0.725568f, 0.725832f, 0.726095f,
+ 0.726359f, 0.726623f, 0.726886f, 0.727149f, 0.727413f, 0.727676f, 0.727939f, 0.728202f,
+ 0.728464f, 0.728727f, 0.728990f, 0.729252f, 0.729514f, 0.729777f, 0.730039f, 0.730301f,
+ 0.730563f, 0.730825f, 0.731086f, 0.731348f, 0.731609f, 0.731871f, 0.732132f, 0.732393f,
+ 0.732654f, 0.732915f, 0.733176f, 0.733437f, 0.733697f, 0.733958f, 0.734218f, 0.734479f,
+ 0.734739f, 0.734999f, 0.735259f, 0.735519f, 0.735779f, 0.736038f, 0.736298f, 0.736557f,
+ 0.736817f, 0.737076f, 0.737335f, 0.737594f, 0.737853f, 0.738112f, 0.738370f, 0.738629f,
+ 0.738887f, 0.739146f, 0.739404f, 0.739662f, 0.739920f, 0.740178f, 0.740436f, 0.740694f,
+ 0.740951f, 0.741209f, 0.741466f, 0.741723f, 0.741980f, 0.742237f, 0.742494f, 0.742751f,
+ 0.743008f, 0.743265f, 0.743521f, 0.743777f, 0.744034f, 0.744290f, 0.744546f, 0.744802f,
+ 0.745058f, 0.745314f, 0.745569f, 0.745825f, 0.746080f, 0.746335f, 0.746591f, 0.746846f,
+ 0.747101f, 0.747355f, 0.747610f, 0.747865f, 0.748119f, 0.748374f, 0.748628f, 0.748882f,
+ 0.749136f, 0.749390f, 0.749644f, 0.749898f, 0.750152f, 0.750405f, 0.750659f, 0.750912f,
+ 0.751165f, 0.751418f, 0.751671f, 0.751924f, 0.752177f, 0.752429f, 0.752682f, 0.752934f,
+ 0.753187f, 0.753439f, 0.753691f, 0.753943f, 0.754195f, 0.754447f, 0.754698f, 0.754950f,
+ 0.755201f, 0.755453f, 0.755704f, 0.755955f, 0.756206f, 0.756457f, 0.756708f, 0.756958f,
+ 0.757209f, 0.757459f, 0.757710f, 0.757960f, 0.758210f, 0.758460f, 0.758710f, 0.758960f,
+ 0.759209f, 0.759459f, 0.759708f, 0.759957f, 0.760207f, 0.760456f, 0.760705f, 0.760954f,
+ 0.761202f, 0.761451f, 0.761700f, 0.761948f, 0.762196f, 0.762444f, 0.762693f, 0.762941f,
+ 0.763188f, 0.763436f, 0.763684f, 0.763931f, 0.764179f, 0.764426f, 0.764673f, 0.764920f,
+ 0.765167f, 0.765414f, 0.765661f, 0.765907f, 0.766154f, 0.766400f, 0.766647f, 0.766893f,
+ 0.767139f, 0.767385f, 0.767631f, 0.767876f, 0.768122f, 0.768368f, 0.768613f, 0.768858f,
+ 0.769103f, 0.769348f, 0.769593f, 0.769838f, 0.770083f, 0.770327f, 0.770572f, 0.770816f,
+ 0.771061f, 0.771305f, 0.771549f, 0.771793f, 0.772036f, 0.772280f, 0.772524f, 0.772767f,
+ 0.773010f, 0.773254f, 0.773497f, 0.773740f, 0.773983f, 0.774225f, 0.774468f, 0.774711f,
+ 0.774953f, 0.775195f, 0.775438f, 0.775680f, 0.775922f, 0.776164f, 0.776405f, 0.776647f,
+ 0.776888f, 0.777130f, 0.777371f, 0.777612f, 0.777853f, 0.778094f, 0.778335f, 0.778576f,
+ 0.778817f, 0.779057f, 0.779297f, 0.779538f, 0.779778f, 0.780018f, 0.780258f, 0.780498f,
+ 0.780737f, 0.780977f, 0.781216f, 0.781456f, 0.781695f, 0.781934f, 0.782173f, 0.782412f,
+ 0.782651f, 0.782889f, 0.783128f, 0.783366f, 0.783605f, 0.783843f, 0.784081f, 0.784319f,
+ 0.784557f, 0.784794f, 0.785032f, 0.785269f, 0.785507f, 0.785744f, 0.785981f, 0.786218f,
+ 0.786455f, 0.786692f, 0.786929f, 0.787165f, 0.787402f, 0.787638f, 0.787874f, 0.788110f,
+ 0.788346f, 0.788582f, 0.788818f, 0.789054f, 0.789289f, 0.789525f, 0.789760f, 0.789995f,
+ 0.790230f, 0.790465f, 0.790700f, 0.790935f, 0.791169f, 0.791404f, 0.791638f, 0.791872f,
+ 0.792107f, 0.792341f, 0.792575f, 0.792808f, 0.793042f, 0.793276f, 0.793509f, 0.793742f,
+ 0.793975f, 0.794209f, 0.794442f, 0.794674f, 0.794907f, 0.795140f, 0.795372f, 0.795605f,
+ 0.795837f, 0.796069f, 0.796301f, 0.796533f, 0.796765f, 0.796996f, 0.797228f, 0.797459f,
+ 0.797691f, 0.797922f, 0.798153f, 0.798384f, 0.798615f, 0.798846f, 0.799076f, 0.799307f,
+ 0.799537f, 0.799768f, 0.799998f, 0.800228f, 0.800458f, 0.800687f, 0.800917f, 0.801147f,
+ 0.801376f, 0.801606f, 0.801835f, 0.802064f, 0.802293f, 0.802522f, 0.802750f, 0.802979f,
+ 0.803208f, 0.803436f, 0.803664f, 0.803892f, 0.804120f, 0.804348f, 0.804576f, 0.804804f,
+ 0.805031f, 0.805259f, 0.805486f, 0.805713f, 0.805940f, 0.806167f, 0.806394f, 0.806621f,
+ 0.806848f, 0.807074f, 0.807300f, 0.807527f, 0.807753f, 0.807979f, 0.808205f, 0.808430f,
+ 0.808656f, 0.808882f, 0.809107f, 0.809332f, 0.809558f, 0.809783f, 0.810008f, 0.810232f,
+ 0.810457f, 0.810682f, 0.810906f, 0.811131f, 0.811355f, 0.811579f, 0.811803f, 0.812027f,
+ 0.812251f, 0.812474f, 0.812698f, 0.812921f, 0.813144f, 0.813368f, 0.813591f, 0.813814f,
+ 0.814036f, 0.814259f, 0.814482f, 0.814704f, 0.814926f, 0.815149f, 0.815371f, 0.815593f,
+ 0.815814f, 0.816036f, 0.816258f, 0.816479f, 0.816701f, 0.816922f, 0.817143f, 0.817364f,
+ 0.817585f, 0.817806f, 0.818026f, 0.818247f, 0.818467f, 0.818687f, 0.818908f, 0.819128f,
+ 0.819348f, 0.819567f, 0.819787f, 0.820007f, 0.820226f, 0.820445f, 0.820664f, 0.820884f,
+ 0.821102f, 0.821321f, 0.821540f, 0.821759f, 0.821977f, 0.822195f, 0.822414f, 0.822632f,
+ 0.822850f, 0.823068f, 0.823285f, 0.823503f, 0.823721f, 0.823938f, 0.824155f, 0.824372f,
+ 0.824589f, 0.824806f, 0.825023f, 0.825240f, 0.825456f, 0.825673f, 0.825889f, 0.826105f,
+ 0.826321f, 0.826537f, 0.826753f, 0.826968f, 0.827184f, 0.827399f, 0.827615f, 0.827830f,
+ 0.828045f, 0.828260f, 0.828475f, 0.828690f, 0.828904f, 0.829119f, 0.829333f, 0.829547f,
+ 0.829761f, 0.829975f, 0.830189f, 0.830403f, 0.830616f, 0.830830f, 0.831043f, 0.831257f,
+ 0.831470f, 0.831683f, 0.831895f, 0.832108f, 0.832321f, 0.832533f, 0.832746f, 0.832958f,
+ 0.833170f, 0.833382f, 0.833594f, 0.833806f, 0.834018f, 0.834229f, 0.834440f, 0.834652f,
+ 0.834863f, 0.835074f, 0.835285f, 0.835496f, 0.835706f, 0.835917f, 0.836127f, 0.836338f,
+ 0.836548f, 0.836758f, 0.836968f, 0.837178f, 0.837387f, 0.837597f, 0.837806f, 0.838015f,
+ 0.838225f, 0.838434f, 0.838643f, 0.838852f, 0.839060f, 0.839269f, 0.839477f, 0.839686f,
+ 0.839894f, 0.840102f, 0.840310f, 0.840518f, 0.840725f, 0.840933f, 0.841140f, 0.841348f,
+ 0.841555f, 0.841762f, 0.841969f, 0.842176f, 0.842383f, 0.842589f, 0.842796f, 0.843002f,
+ 0.843208f, 0.843414f, 0.843620f, 0.843826f, 0.844032f, 0.844238f, 0.844443f, 0.844648f,
+ 0.844854f, 0.845059f, 0.845264f, 0.845469f, 0.845673f, 0.845878f, 0.846082f, 0.846287f,
+ 0.846491f, 0.846695f, 0.846899f, 0.847103f, 0.847307f, 0.847510f, 0.847714f, 0.847917f,
+ 0.848120f, 0.848323f, 0.848526f, 0.848729f, 0.848932f, 0.849135f, 0.849337f, 0.849540f,
+ 0.849742f, 0.849944f, 0.850146f, 0.850348f, 0.850549f, 0.850751f, 0.850953f, 0.851154f,
+ 0.851355f, 0.851556f, 0.851757f, 0.851958f, 0.852159f, 0.852360f, 0.852560f, 0.852760f,
+ 0.852961f, 0.853161f, 0.853361f, 0.853561f, 0.853760f, 0.853960f, 0.854159f, 0.854359f,
+ 0.854558f, 0.854757f, 0.854956f, 0.855155f, 0.855354f, 0.855552f, 0.855751f, 0.855949f,
+ 0.856147f, 0.856345f, 0.856543f, 0.856741f, 0.856939f, 0.857137f, 0.857334f, 0.857531f,
+ 0.857729f, 0.857926f, 0.858123f, 0.858320f, 0.858516f, 0.858713f, 0.858909f, 0.859106f,
+ 0.859302f, 0.859498f, 0.859694f, 0.859890f, 0.860085f, 0.860281f, 0.860476f, 0.860672f,
+ 0.860867f, 0.861062f, 0.861257f, 0.861452f, 0.861646f, 0.861841f, 0.862035f, 0.862230f,
+ 0.862424f, 0.862618f, 0.862812f, 0.863006f, 0.863199f, 0.863393f, 0.863586f, 0.863780f,
+ 0.863973f, 0.864166f, 0.864359f, 0.864552f, 0.864744f, 0.864937f, 0.865129f, 0.865321f,
+ 0.865514f, 0.865706f, 0.865898f, 0.866089f, 0.866281f, 0.866472f, 0.866664f, 0.866855f,
+ 0.867046f, 0.867237f, 0.867428f, 0.867619f, 0.867809f, 0.868000f, 0.868190f, 0.868381f,
+ 0.868571f, 0.868761f, 0.868951f, 0.869140f, 0.869330f, 0.869519f, 0.869709f, 0.869898f,
+ 0.870087f, 0.870276f, 0.870465f, 0.870654f, 0.870842f, 0.871031f, 0.871219f, 0.871407f,
+ 0.871595f, 0.871783f, 0.871971f, 0.872159f, 0.872346f, 0.872534f, 0.872721f, 0.872908f,
+ 0.873095f, 0.873282f, 0.873469f, 0.873655f, 0.873842f, 0.874028f, 0.874215f, 0.874401f,
+ 0.874587f, 0.874773f, 0.874958f, 0.875144f, 0.875329f, 0.875515f, 0.875700f, 0.875885f,
+ 0.876070f, 0.876255f, 0.876440f, 0.876624f, 0.876809f, 0.876993f, 0.877177f, 0.877361f,
+ 0.877545f, 0.877729f, 0.877913f, 0.878096f, 0.878280f, 0.878463f, 0.878646f, 0.878829f,
+ 0.879012f, 0.879195f, 0.879378f, 0.879560f, 0.879743f, 0.879925f, 0.880107f, 0.880289f,
+ 0.880471f, 0.880653f, 0.880834f, 0.881016f, 0.881197f, 0.881378f, 0.881559f, 0.881740f,
+ 0.881921f, 0.882102f, 0.882283f, 0.882463f, 0.882643f, 0.882824f, 0.883004f, 0.883184f,
+ 0.883363f, 0.883543f, 0.883723f, 0.883902f, 0.884081f, 0.884260f, 0.884439f, 0.884618f,
+ 0.884797f, 0.884976f, 0.885154f, 0.885333f, 0.885511f, 0.885689f, 0.885867f, 0.886045f,
+ 0.886223f, 0.886400f, 0.886578f, 0.886755f, 0.886932f, 0.887109f, 0.887286f, 0.887463f,
+ 0.887640f, 0.887816f, 0.887993f, 0.888169f, 0.888345f, 0.888521f, 0.888697f, 0.888873f,
+ 0.889048f, 0.889224f, 0.889399f, 0.889574f, 0.889750f, 0.889925f, 0.890099f, 0.890274f,
+ 0.890449f, 0.890623f, 0.890797f, 0.890972f, 0.891146f, 0.891320f, 0.891493f, 0.891667f,
+ 0.891841f, 0.892014f, 0.892187f, 0.892361f, 0.892534f, 0.892706f, 0.892879f, 0.893052f,
+ 0.893224f, 0.893397f, 0.893569f, 0.893741f, 0.893913f, 0.894085f, 0.894256f, 0.894428f,
+ 0.894599f, 0.894771f, 0.894942f, 0.895113f, 0.895284f, 0.895455f, 0.895625f, 0.895796f,
+ 0.895966f, 0.896137f, 0.896307f, 0.896477f, 0.896646f, 0.896816f, 0.896986f, 0.897155f,
+ 0.897325f, 0.897494f, 0.897663f, 0.897832f, 0.898001f, 0.898169f, 0.898338f, 0.898506f,
+ 0.898674f, 0.898843f, 0.899011f, 0.899179f, 0.899346f, 0.899514f, 0.899681f, 0.899849f,
+ 0.900016f, 0.900183f, 0.900350f, 0.900517f, 0.900683f, 0.900850f, 0.901016f, 0.901183f,
+ 0.901349f, 0.901515f, 0.901681f, 0.901847f, 0.902012f, 0.902178f, 0.902343f, 0.902508f,
+ 0.902673f, 0.902838f, 0.903003f, 0.903168f, 0.903332f, 0.903497f, 0.903661f, 0.903825f,
+ 0.903989f, 0.904153f, 0.904317f, 0.904481f, 0.904644f, 0.904807f, 0.904971f, 0.905134f,
+ 0.905297f, 0.905460f, 0.905622f, 0.905785f, 0.905947f, 0.906110f, 0.906272f, 0.906434f,
+ 0.906596f, 0.906757f, 0.906919f, 0.907081f, 0.907242f, 0.907403f, 0.907564f, 0.907725f,
+ 0.907886f, 0.908047f, 0.908207f, 0.908368f, 0.908528f, 0.908688f, 0.908848f, 0.909008f,
+ 0.909168f, 0.909328f, 0.909487f, 0.909646f, 0.909806f, 0.909965f, 0.910124f, 0.910283f,
+ 0.910441f, 0.910600f, 0.910758f, 0.910917f, 0.911075f, 0.911233f, 0.911391f, 0.911548f,
+ 0.911706f, 0.911864f, 0.912021f, 0.912178f, 0.912335f, 0.912492f, 0.912649f, 0.912806f,
+ 0.912962f, 0.913119f, 0.913275f, 0.913431f, 0.913587f, 0.913743f, 0.913899f, 0.914054f,
+ 0.914210f, 0.914365f, 0.914520f, 0.914675f, 0.914830f, 0.914985f, 0.915140f, 0.915294f,
+ 0.915449f, 0.915603f, 0.915757f, 0.915911f, 0.916065f, 0.916219f, 0.916372f, 0.916526f,
+ 0.916679f, 0.916832f, 0.916985f, 0.917138f, 0.917291f, 0.917444f, 0.917596f, 0.917749f,
+ 0.917901f, 0.918053f, 0.918205f, 0.918357f, 0.918508f, 0.918660f, 0.918811f, 0.918963f,
+ 0.919114f, 0.919265f, 0.919416f, 0.919567f, 0.919717f, 0.919868f, 0.920018f, 0.920168f,
+ 0.920318f, 0.920468f, 0.920618f, 0.920768f, 0.920917f, 0.921067f, 0.921216f, 0.921365f,
+ 0.921514f, 0.921663f, 0.921812f, 0.921960f, 0.922109f, 0.922257f, 0.922405f, 0.922553f,
+ 0.922701f, 0.922849f, 0.922997f, 0.923144f, 0.923291f, 0.923439f, 0.923586f, 0.923733f,
+ 0.923880f, 0.924026f, 0.924173f, 0.924319f, 0.924465f, 0.924612f, 0.924758f, 0.924904f,
+ 0.925049f, 0.925195f, 0.925340f, 0.925486f, 0.925631f, 0.925776f, 0.925921f, 0.926066f,
+ 0.926210f, 0.926355f, 0.926499f, 0.926643f, 0.926787f, 0.926931f, 0.927075f, 0.927219f,
+ 0.927363f, 0.927506f, 0.927649f, 0.927792f, 0.927935f, 0.928078f, 0.928221f, 0.928364f,
+ 0.928506f, 0.928648f, 0.928791f, 0.928933f, 0.929075f, 0.929216f, 0.929358f, 0.929500f,
+ 0.929641f, 0.929782f, 0.929923f, 0.930064f, 0.930205f, 0.930346f, 0.930486f, 0.930627f,
+ 0.930767f, 0.930907f, 0.931047f, 0.931187f, 0.931327f, 0.931466f, 0.931606f, 0.931745f,
+ 0.931884f, 0.932023f, 0.932162f, 0.932301f, 0.932440f, 0.932578f, 0.932716f, 0.932855f,
+ 0.932993f, 0.933131f, 0.933269f, 0.933406f, 0.933544f, 0.933681f, 0.933818f, 0.933956f,
+ 0.934093f, 0.934229f, 0.934366f, 0.934503f, 0.934639f, 0.934775f, 0.934912f, 0.935048f,
+ 0.935184f, 0.935319f, 0.935455f, 0.935590f, 0.935726f, 0.935861f, 0.935996f, 0.936131f,
+ 0.936266f, 0.936400f, 0.936535f, 0.936669f, 0.936803f, 0.936938f, 0.937072f, 0.937205f,
+ 0.937339f, 0.937473f, 0.937606f, 0.937739f, 0.937872f, 0.938005f, 0.938138f, 0.938271f,
+ 0.938404f, 0.938536f, 0.938668f, 0.938800f, 0.938932f, 0.939064f, 0.939196f, 0.939328f,
+ 0.939459f, 0.939591f, 0.939722f, 0.939853f, 0.939984f, 0.940115f, 0.940245f, 0.940376f,
+ 0.940506f, 0.940636f, 0.940766f, 0.940896f, 0.941026f, 0.941156f, 0.941285f, 0.941415f,
+ 0.941544f, 0.941673f, 0.941802f, 0.941931f, 0.942060f, 0.942188f, 0.942317f, 0.942445f,
+ 0.942573f, 0.942701f, 0.942829f, 0.942957f, 0.943084f, 0.943212f, 0.943339f, 0.943466f,
+ 0.943593f, 0.943720f, 0.943847f, 0.943974f, 0.944100f, 0.944227f, 0.944353f, 0.944479f,
+ 0.944605f, 0.944731f, 0.944856f, 0.944982f, 0.945107f, 0.945232f, 0.945358f, 0.945482f,
+ 0.945607f, 0.945732f, 0.945857f, 0.945981f, 0.946105f, 0.946229f, 0.946353f, 0.946477f,
+ 0.946601f, 0.946724f, 0.946848f, 0.946971f, 0.947094f, 0.947217f, 0.947340f, 0.947463f,
+ 0.947586f, 0.947708f, 0.947830f, 0.947953f, 0.948075f, 0.948196f, 0.948318f, 0.948440f,
+ 0.948561f, 0.948683f, 0.948804f, 0.948925f, 0.949046f, 0.949167f, 0.949287f, 0.949408f,
+ 0.949528f, 0.949648f, 0.949768f, 0.949888f, 0.950008f, 0.950128f, 0.950247f, 0.950367f,
+ 0.950486f, 0.950605f, 0.950724f, 0.950843f, 0.950962f, 0.951080f, 0.951199f, 0.951317f,
+ 0.951435f, 0.951553f, 0.951671f, 0.951789f, 0.951906f, 0.952024f, 0.952141f, 0.952258f,
+ 0.952375f, 0.952492f, 0.952609f, 0.952725f, 0.952842f, 0.952958f, 0.953074f, 0.953190f,
+ 0.953306f, 0.953422f, 0.953537f, 0.953653f, 0.953768f, 0.953883f, 0.953998f, 0.954113f,
+ 0.954228f, 0.954343f, 0.954457f, 0.954572f, 0.954686f, 0.954800f, 0.954914f, 0.955028f,
+ 0.955141f, 0.955255f, 0.955368f, 0.955481f, 0.955594f, 0.955707f, 0.955820f, 0.955933f,
+ 0.956045f, 0.956158f, 0.956270f, 0.956382f, 0.956494f, 0.956606f, 0.956717f, 0.956829f,
+ 0.956940f, 0.957052f, 0.957163f, 0.957274f, 0.957385f, 0.957495f, 0.957606f, 0.957716f,
+ 0.957826f, 0.957937f, 0.958046f, 0.958156f, 0.958266f, 0.958376f, 0.958485f, 0.958594f,
+ 0.958703f, 0.958812f, 0.958921f, 0.959030f, 0.959139f, 0.959247f, 0.959355f, 0.959463f,
+ 0.959572f, 0.959679f, 0.959787f, 0.959895f, 0.960002f, 0.960109f, 0.960217f, 0.960324f,
+ 0.960431f, 0.960537f, 0.960644f, 0.960750f, 0.960857f, 0.960963f, 0.961069f, 0.961175f,
+ 0.961280f, 0.961386f, 0.961492f, 0.961597f, 0.961702f, 0.961807f, 0.961912f, 0.962017f,
+ 0.962121f, 0.962226f, 0.962330f, 0.962434f, 0.962538f, 0.962642f, 0.962746f, 0.962850f,
+ 0.962953f, 0.963057f, 0.963160f, 0.963263f, 0.963366f, 0.963469f, 0.963571f, 0.963674f,
+ 0.963776f, 0.963878f, 0.963980f, 0.964082f, 0.964184f, 0.964286f, 0.964387f, 0.964489f,
+ 0.964590f, 0.964691f, 0.964792f, 0.964893f, 0.964993f, 0.965094f, 0.965194f, 0.965294f,
+ 0.965394f, 0.965494f, 0.965594f, 0.965694f, 0.965793f, 0.965893f, 0.965992f, 0.966091f,
+ 0.966190f, 0.966289f, 0.966387f, 0.966486f, 0.966584f, 0.966683f, 0.966781f, 0.966879f,
+ 0.966976f, 0.967074f, 0.967172f, 0.967269f, 0.967366f, 0.967463f, 0.967560f, 0.967657f,
+ 0.967754f, 0.967850f, 0.967947f, 0.968043f, 0.968139f, 0.968235f, 0.968331f, 0.968427f,
+ 0.968522f, 0.968617f, 0.968713f, 0.968808f, 0.968903f, 0.968998f, 0.969092f, 0.969187f,
+ 0.969281f, 0.969375f, 0.969470f, 0.969564f, 0.969657f, 0.969751f, 0.969845f, 0.969938f,
+ 0.970031f, 0.970124f, 0.970217f, 0.970310f, 0.970403f, 0.970495f, 0.970588f, 0.970680f,
+ 0.970772f, 0.970864f, 0.970956f, 0.971048f, 0.971139f, 0.971231f, 0.971322f, 0.971413f,
+ 0.971504f, 0.971595f, 0.971685f, 0.971776f, 0.971866f, 0.971957f, 0.972047f, 0.972137f,
+ 0.972227f, 0.972316f, 0.972406f, 0.972495f, 0.972584f, 0.972673f, 0.972762f, 0.972851f,
+ 0.972940f, 0.973028f, 0.973117f, 0.973205f, 0.973293f, 0.973381f, 0.973469f, 0.973557f,
+ 0.973644f, 0.973732f, 0.973819f, 0.973906f, 0.973993f, 0.974080f, 0.974166f, 0.974253f,
+ 0.974339f, 0.974426f, 0.974512f, 0.974598f, 0.974684f, 0.974769f, 0.974855f, 0.974940f,
+ 0.975025f, 0.975110f, 0.975195f, 0.975280f, 0.975365f, 0.975449f, 0.975534f, 0.975618f,
+ 0.975702f, 0.975786f, 0.975870f, 0.975954f, 0.976037f, 0.976120f, 0.976204f, 0.976287f,
+ 0.976370f, 0.976453f, 0.976535f, 0.976618f, 0.976700f, 0.976782f, 0.976864f, 0.976946f,
+ 0.977028f, 0.977110f, 0.977191f, 0.977273f, 0.977354f, 0.977435f, 0.977516f, 0.977597f,
+ 0.977677f, 0.977758f, 0.977838f, 0.977918f, 0.977998f, 0.978078f, 0.978158f, 0.978238f,
+ 0.978317f, 0.978397f, 0.978476f, 0.978555f, 0.978634f, 0.978713f, 0.978791f, 0.978870f,
+ 0.978948f, 0.979026f, 0.979104f, 0.979182f, 0.979260f, 0.979338f, 0.979415f, 0.979493f,
+ 0.979570f, 0.979647f, 0.979724f, 0.979800f, 0.979877f, 0.979954f, 0.980030f, 0.980106f,
+ 0.980182f, 0.980258f, 0.980334f, 0.980409f, 0.980485f, 0.980560f, 0.980635f, 0.980710f,
+ 0.980785f, 0.980860f, 0.980935f, 0.981009f, 0.981083f, 0.981158f, 0.981232f, 0.981305f,
+ 0.981379f, 0.981453f, 0.981526f, 0.981600f, 0.981673f, 0.981746f, 0.981819f, 0.981891f,
+ 0.981964f, 0.982036f, 0.982109f, 0.982181f, 0.982253f, 0.982325f, 0.982396f, 0.982468f,
+ 0.982539f, 0.982611f, 0.982682f, 0.982753f, 0.982824f, 0.982894f, 0.982965f, 0.983035f,
+ 0.983105f, 0.983176f, 0.983246f, 0.983315f, 0.983385f, 0.983455f, 0.983524f, 0.983593f,
+ 0.983662f, 0.983731f, 0.983800f, 0.983869f, 0.983937f, 0.984006f, 0.984074f, 0.984142f,
+ 0.984210f, 0.984278f, 0.984346f, 0.984413f, 0.984480f, 0.984548f, 0.984615f, 0.984682f,
+ 0.984748f, 0.984815f, 0.984882f, 0.984948f, 0.985014f, 0.985080f, 0.985146f, 0.985212f,
+ 0.985278f, 0.985343f, 0.985408f, 0.985474f, 0.985539f, 0.985604f, 0.985668f, 0.985733f,
+ 0.985798f, 0.985862f, 0.985926f, 0.985990f, 0.986054f, 0.986118f, 0.986181f, 0.986245f,
+ 0.986308f, 0.986371f, 0.986434f, 0.986497f, 0.986560f, 0.986623f, 0.986685f, 0.986747f,
+ 0.986809f, 0.986871f, 0.986933f, 0.986995f, 0.987057f, 0.987118f, 0.987179f, 0.987240f,
+ 0.987301f, 0.987362f, 0.987423f, 0.987484f, 0.987544f, 0.987604f, 0.987664f, 0.987724f,
+ 0.987784f, 0.987844f, 0.987903f, 0.987963f, 0.988022f, 0.988081f, 0.988140f, 0.988199f,
+ 0.988258f, 0.988316f, 0.988374f, 0.988433f, 0.988491f, 0.988549f, 0.988607f, 0.988664f,
+ 0.988722f, 0.988779f, 0.988836f, 0.988893f, 0.988950f, 0.989007f, 0.989064f, 0.989120f,
+ 0.989177f, 0.989233f, 0.989289f, 0.989345f, 0.989400f, 0.989456f, 0.989511f, 0.989567f,
+ 0.989622f, 0.989677f, 0.989732f, 0.989787f, 0.989841f, 0.989896f, 0.989950f, 0.990004f,
+ 0.990058f, 0.990112f, 0.990166f, 0.990219f, 0.990273f, 0.990326f, 0.990379f, 0.990432f,
+ 0.990485f, 0.990538f, 0.990590f, 0.990643f, 0.990695f, 0.990747f, 0.990799f, 0.990851f,
+ 0.990903f, 0.990954f, 0.991006f, 0.991057f, 0.991108f, 0.991159f, 0.991210f, 0.991260f,
+ 0.991311f, 0.991361f, 0.991411f, 0.991462f, 0.991511f, 0.991561f, 0.991611f, 0.991660f,
+ 0.991710f, 0.991759f, 0.991808f, 0.991857f, 0.991906f, 0.991954f, 0.992003f, 0.992051f,
+ 0.992099f, 0.992147f, 0.992195f, 0.992243f, 0.992291f, 0.992338f, 0.992385f, 0.992433f,
+ 0.992480f, 0.992526f, 0.992573f, 0.992620f, 0.992666f, 0.992712f, 0.992759f, 0.992805f,
+ 0.992850f, 0.992896f, 0.992942f, 0.992987f, 0.993032f, 0.993077f, 0.993122f, 0.993167f,
+ 0.993212f, 0.993257f, 0.993301f, 0.993345f, 0.993389f, 0.993433f, 0.993477f, 0.993521f,
+ 0.993564f, 0.993608f, 0.993651f, 0.993694f, 0.993737f, 0.993779f, 0.993822f, 0.993865f,
+ 0.993907f, 0.993949f, 0.993991f, 0.994033f, 0.994075f, 0.994116f, 0.994158f, 0.994199f,
+ 0.994240f, 0.994281f, 0.994322f, 0.994363f, 0.994404f, 0.994444f, 0.994484f, 0.994525f,
+ 0.994565f, 0.994604f, 0.994644f, 0.994684f, 0.994723f, 0.994762f, 0.994802f, 0.994841f,
+ 0.994879f, 0.994918f, 0.994957f, 0.994995f, 0.995033f, 0.995071f, 0.995109f, 0.995147f,
+ 0.995185f, 0.995222f, 0.995260f, 0.995297f, 0.995334f, 0.995371f, 0.995408f, 0.995444f,
+ 0.995481f, 0.995517f, 0.995553f, 0.995589f, 0.995625f, 0.995661f, 0.995697f, 0.995732f,
+ 0.995767f, 0.995803f, 0.995838f, 0.995872f, 0.995907f, 0.995942f, 0.995976f, 0.996011f,
+ 0.996045f, 0.996079f, 0.996113f, 0.996146f, 0.996180f, 0.996213f, 0.996247f, 0.996280f,
+ 0.996313f, 0.996345f, 0.996378f, 0.996411f, 0.996443f, 0.996475f, 0.996507f, 0.996539f,
+ 0.996571f, 0.996603f, 0.996634f, 0.996666f, 0.996697f, 0.996728f, 0.996759f, 0.996790f,
+ 0.996820f, 0.996851f, 0.996881f, 0.996911f, 0.996941f, 0.996971f, 0.997001f, 0.997031f,
+ 0.997060f, 0.997089f, 0.997119f, 0.997148f, 0.997176f, 0.997205f, 0.997234f, 0.997262f,
+ 0.997290f, 0.997319f, 0.997347f, 0.997374f, 0.997402f, 0.997430f, 0.997457f, 0.997484f,
+ 0.997511f, 0.997538f, 0.997565f, 0.997592f, 0.997618f, 0.997645f, 0.997671f, 0.997697f,
+ 0.997723f, 0.997749f, 0.997774f, 0.997800f, 0.997825f, 0.997851f, 0.997876f, 0.997901f,
+ 0.997925f, 0.997950f, 0.997974f, 0.997999f, 0.998023f, 0.998047f, 0.998071f, 0.998094f,
+ 0.998118f, 0.998142f, 0.998165f, 0.998188f, 0.998211f, 0.998234f, 0.998257f, 0.998279f,
+ 0.998302f, 0.998324f, 0.998346f, 0.998368f, 0.998390f, 0.998411f, 0.998433f, 0.998454f,
+ 0.998476f, 0.998497f, 0.998518f, 0.998538f, 0.998559f, 0.998580f, 0.998600f, 0.998620f,
+ 0.998640f, 0.998660f, 0.998680f, 0.998700f, 0.998719f, 0.998738f, 0.998758f, 0.998777f,
+ 0.998795f, 0.998814f, 0.998833f, 0.998851f, 0.998870f, 0.998888f, 0.998906f, 0.998924f,
+ 0.998941f, 0.998959f, 0.998976f, 0.998994f, 0.999011f, 0.999028f, 0.999044f, 0.999061f,
+ 0.999078f, 0.999094f, 0.999110f, 0.999126f, 0.999142f, 0.999158f, 0.999174f, 0.999189f,
+ 0.999205f, 0.999220f, 0.999235f, 0.999250f, 0.999265f, 0.999279f, 0.999294f, 0.999308f,
+ 0.999322f, 0.999336f, 0.999350f, 0.999364f, 0.999378f, 0.999391f, 0.999404f, 0.999418f,
+ 0.999431f, 0.999443f, 0.999456f, 0.999469f, 0.999481f, 0.999493f, 0.999506f, 0.999518f,
+ 0.999529f, 0.999541f, 0.999553f, 0.999564f, 0.999575f, 0.999586f, 0.999597f, 0.999608f,
+ 0.999619f, 0.999629f, 0.999640f, 0.999650f, 0.999660f, 0.999670f, 0.999680f, 0.999689f,
+ 0.999699f, 0.999708f, 0.999717f, 0.999726f, 0.999735f, 0.999744f, 0.999753f, 0.999761f,
+ 0.999769f, 0.999778f, 0.999786f, 0.999793f, 0.999801f, 0.999809f, 0.999816f, 0.999823f,
+ 0.999831f, 0.999838f, 0.999844f, 0.999851f, 0.999858f, 0.999864f, 0.999870f, 0.999876f,
+ 0.999882f, 0.999888f, 0.999894f, 0.999899f, 0.999905f, 0.999910f, 0.999915f, 0.999920f,
+ 0.999925f, 0.999929f, 0.999934f, 0.999938f, 0.999942f, 0.999946f, 0.999950f, 0.999954f,
+ 0.999958f, 0.999961f, 0.999964f, 0.999968f, 0.999971f, 0.999973f, 0.999976f, 0.999979f,
+ 0.999981f, 0.999983f, 0.999986f, 0.999988f, 0.999989f, 0.999991f, 0.999993f, 0.999994f,
+ 0.999995f, 0.999996f, 0.999997f, 0.999998f, 0.999999f, 0.999999f, 1.000000f, 1.000000f,
+ 0.000000f, -0.000383f, -0.000767f, -0.001150f, -0.001534f, -0.001917f, -0.002301f, -0.002684f,
+ -0.003068f, -0.003451f, -0.003835f, -0.004218f, -0.004602f, -0.004985f, -0.005369f, -0.005752f,
+ -0.006136f, -0.006519f, -0.006903f, -0.007286f, -0.007670f, -0.008053f, -0.008437f, -0.008820f,
+ -0.009204f, -0.009587f, -0.009971f, -0.010354f, -0.010738f, -0.011121f, -0.011505f, -0.011888f,
+ -0.012272f, -0.012655f, -0.013038f, -0.013422f, -0.013805f, -0.014189f, -0.014572f, -0.014956f,
+ -0.015339f, -0.015723f, -0.016106f, -0.016490f, -0.016873f, -0.017256f, -0.017640f, -0.018023f,
+ -0.018407f, -0.018790f, -0.019174f, -0.019557f, -0.019940f, -0.020324f, -0.020707f, -0.021091f,
+ -0.021474f, -0.021857f, -0.022241f, -0.022624f, -0.023008f, -0.023391f, -0.023774f, -0.024158f,
+ -0.024541f, -0.024925f, -0.025308f, -0.025691f, -0.026075f, -0.026458f, -0.026841f, -0.027225f,
+ -0.027608f, -0.027991f, -0.028375f, -0.028758f, -0.029142f, -0.029525f, -0.029908f, -0.030291f,
+ -0.030675f, -0.031058f, -0.031441f, -0.031825f, -0.032208f, -0.032591f, -0.032975f, -0.033358f,
+ -0.033741f, -0.034124f, -0.034508f, -0.034891f, -0.035274f, -0.035657f, -0.036041f, -0.036424f,
+ -0.036807f, -0.037190f, -0.037574f, -0.037957f, -0.038340f, -0.038723f, -0.039107f, -0.039490f,
+ -0.039873f, -0.040256f, -0.040639f, -0.041022f, -0.041406f, -0.041789f, -0.042172f, -0.042555f,
+ -0.042938f, -0.043321f, -0.043705f, -0.044088f, -0.044471f, -0.044854f, -0.045237f, -0.045620f,
+ -0.046003f, -0.046386f, -0.046769f, -0.047152f, -0.047535f, -0.047919f, -0.048302f, -0.048685f,
+ -0.049068f, -0.049451f, -0.049834f, -0.050217f, -0.050600f, -0.050983f, -0.051366f, -0.051749f,
+ -0.052132f, -0.052515f, -0.052898f, -0.053281f, -0.053664f, -0.054046f, -0.054429f, -0.054812f,
+ -0.055195f, -0.055578f, -0.055961f, -0.056344f, -0.056727f, -0.057110f, -0.057493f, -0.057875f,
+ -0.058258f, -0.058641f, -0.059024f, -0.059407f, -0.059790f, -0.060172f, -0.060555f, -0.060938f,
+ -0.061321f, -0.061704f, -0.062086f, -0.062469f, -0.062852f, -0.063234f, -0.063617f, -0.064000f,
+ -0.064383f, -0.064765f, -0.065148f, -0.065531f, -0.065913f, -0.066296f, -0.066679f, -0.067061f,
+ -0.067444f, -0.067827f, -0.068209f, -0.068592f, -0.068974f, -0.069357f, -0.069739f, -0.070122f,
+ -0.070505f, -0.070887f, -0.071270f, -0.071652f, -0.072035f, -0.072417f, -0.072800f, -0.073182f,
+ -0.073565f, -0.073947f, -0.074329f, -0.074712f, -0.075094f, -0.075477f, -0.075859f, -0.076241f,
+ -0.076624f, -0.077006f, -0.077389f, -0.077771f, -0.078153f, -0.078536f, -0.078918f, -0.079300f,
+ -0.079682f, -0.080065f, -0.080447f, -0.080829f, -0.081211f, -0.081594f, -0.081976f, -0.082358f,
+ -0.082740f, -0.083122f, -0.083505f, -0.083887f, -0.084269f, -0.084651f, -0.085033f, -0.085415f,
+ -0.085797f, -0.086179f, -0.086561f, -0.086943f, -0.087326f, -0.087708f, -0.088090f, -0.088472f,
+ -0.088854f, -0.089236f, -0.089617f, -0.089999f, -0.090381f, -0.090763f, -0.091145f, -0.091527f,
+ -0.091909f, -0.092291f, -0.092673f, -0.093055f, -0.093436f, -0.093818f, -0.094200f, -0.094582f,
+ -0.094963f, -0.095345f, -0.095727f, -0.096109f, -0.096490f, -0.096872f, -0.097254f, -0.097635f,
+ -0.098017f, -0.098399f, -0.098780f, -0.099162f, -0.099544f, -0.099925f, -0.100307f, -0.100688f,
+ -0.101070f, -0.101451f, -0.101833f, -0.102214f, -0.102596f, -0.102977f, -0.103359f, -0.103740f,
+ -0.104122f, -0.104503f, -0.104884f, -0.105266f, -0.105647f, -0.106028f, -0.106410f, -0.106791f,
+ -0.107172f, -0.107554f, -0.107935f, -0.108316f, -0.108697f, -0.109079f, -0.109460f, -0.109841f,
+ -0.110222f, -0.110603f, -0.110984f, -0.111366f, -0.111747f, -0.112128f, -0.112509f, -0.112890f,
+ -0.113271f, -0.113652f, -0.114033f, -0.114414f, -0.114795f, -0.115176f, -0.115557f, -0.115938f,
+ -0.116319f, -0.116700f, -0.117080f, -0.117461f, -0.117842f, -0.118223f, -0.118604f, -0.118984f,
+ -0.119365f, -0.119746f, -0.120127f, -0.120507f, -0.120888f, -0.121269f, -0.121649f, -0.122030f,
+ -0.122411f, -0.122791f, -0.123172f, -0.123552f, -0.123933f, -0.124314f, -0.124694f, -0.125075f,
+ -0.125455f, -0.125835f, -0.126216f, -0.126596f, -0.126977f, -0.127357f, -0.127737f, -0.128118f,
+ -0.128498f, -0.128878f, -0.129259f, -0.129639f, -0.130019f, -0.130399f, -0.130780f, -0.131160f,
+ -0.131540f, -0.131920f, -0.132300f, -0.132680f, -0.133061f, -0.133441f, -0.133821f, -0.134201f,
+ -0.134581f, -0.134961f, -0.135341f, -0.135721f, -0.136101f, -0.136480f, -0.136860f, -0.137240f,
+ -0.137620f, -0.138000f, -0.138380f, -0.138760f, -0.139139f, -0.139519f, -0.139899f, -0.140279f,
+ -0.140658f, -0.141038f, -0.141418f, -0.141797f, -0.142177f, -0.142556f, -0.142936f, -0.143316f,
+ -0.143695f, -0.144075f, -0.144454f, -0.144833f, -0.145213f, -0.145592f, -0.145972f, -0.146351f,
+ -0.146730f, -0.147110f, -0.147489f, -0.147868f, -0.148248f, -0.148627f, -0.149006f, -0.149385f,
+ -0.149765f, -0.150144f, -0.150523f, -0.150902f, -0.151281f, -0.151660f, -0.152039f, -0.152418f,
+ -0.152797f, -0.153176f, -0.153555f, -0.153934f, -0.154313f, -0.154692f, -0.155071f, -0.155450f,
+ -0.155828f, -0.156207f, -0.156586f, -0.156965f, -0.157343f, -0.157722f, -0.158101f, -0.158480f,
+ -0.158858f, -0.159237f, -0.159615f, -0.159994f, -0.160372f, -0.160751f, -0.161129f, -0.161508f,
+ -0.161886f, -0.162265f, -0.162643f, -0.163022f, -0.163400f, -0.163778f, -0.164157f, -0.164535f,
+ -0.164913f, -0.165291f, -0.165670f, -0.166048f, -0.166426f, -0.166804f, -0.167182f, -0.167560f,
+ -0.167938f, -0.168316f, -0.168694f, -0.169072f, -0.169450f, -0.169828f, -0.170206f, -0.170584f,
+ -0.170962f, -0.171340f, -0.171718f, -0.172095f, -0.172473f, -0.172851f, -0.173229f, -0.173606f,
+ -0.173984f, -0.174362f, -0.174739f, -0.175117f, -0.175494f, -0.175872f, -0.176249f, -0.176627f,
+ -0.177004f, -0.177382f, -0.177759f, -0.178136f, -0.178514f, -0.178891f, -0.179268f, -0.179646f,
+ -0.180023f, -0.180400f, -0.180777f, -0.181154f, -0.181532f, -0.181909f, -0.182286f, -0.182663f,
+ -0.183040f, -0.183417f, -0.183794f, -0.184171f, -0.184548f, -0.184925f, -0.185301f, -0.185678f,
+ -0.186055f, -0.186432f, -0.186809f, -0.187185f, -0.187562f, -0.187939f, -0.188315f, -0.188692f,
+ -0.189069f, -0.189445f, -0.189822f, -0.190198f, -0.190575f, -0.190951f, -0.191328f, -0.191704f,
+ -0.192080f, -0.192457f, -0.192833f, -0.193209f, -0.193586f, -0.193962f, -0.194338f, -0.194714f,
+ -0.195090f, -0.195466f, -0.195843f, -0.196219f, -0.196595f, -0.196971f, -0.197347f, -0.197722f,
+ -0.198098f, -0.198474f, -0.198850f, -0.199226f, -0.199602f, -0.199978f, -0.200353f, -0.200729f,
+ -0.201105f, -0.201480f, -0.201856f, -0.202231f, -0.202607f, -0.202983f, -0.203358f, -0.203734f,
+ -0.204109f, -0.204484f, -0.204860f, -0.205235f, -0.205610f, -0.205986f, -0.206361f, -0.206736f,
+ -0.207111f, -0.207487f, -0.207862f, -0.208237f, -0.208612f, -0.208987f, -0.209362f, -0.209737f,
+ -0.210112f, -0.210487f, -0.210862f, -0.211237f, -0.211611f, -0.211986f, -0.212361f, -0.212736f,
+ -0.213110f, -0.213485f, -0.213860f, -0.214234f, -0.214609f, -0.214983f, -0.215358f, -0.215732f,
+ -0.216107f, -0.216481f, -0.216856f, -0.217230f, -0.217604f, -0.217979f, -0.218353f, -0.218727f,
+ -0.219101f, -0.219475f, -0.219850f, -0.220224f, -0.220598f, -0.220972f, -0.221346f, -0.221720f,
+ -0.222094f, -0.222468f, -0.222841f, -0.223215f, -0.223589f, -0.223963f, -0.224337f, -0.224710f,
+ -0.225084f, -0.225458f, -0.225831f, -0.226205f, -0.226578f, -0.226952f, -0.227325f, -0.227699f,
+ -0.228072f, -0.228445f, -0.228819f, -0.229192f, -0.229565f, -0.229939f, -0.230312f, -0.230685f,
+ -0.231058f, -0.231431f, -0.231804f, -0.232177f, -0.232550f, -0.232923f, -0.233296f, -0.233669f,
+ -0.234042f, -0.234415f, -0.234788f, -0.235160f, -0.235533f, -0.235906f, -0.236278f, -0.236651f,
+ -0.237024f, -0.237396f, -0.237769f, -0.238141f, -0.238514f, -0.238886f, -0.239258f, -0.239631f,
+ -0.240003f, -0.240375f, -0.240748f, -0.241120f, -0.241492f, -0.241864f, -0.242236f, -0.242608f,
+ -0.242980f, -0.243352f, -0.243724f, -0.244096f, -0.244468f, -0.244840f, -0.245212f, -0.245583f,
+ -0.245955f, -0.246327f, -0.246698f, -0.247070f, -0.247442f, -0.247813f, -0.248185f, -0.248556f,
+ -0.248928f, -0.249299f, -0.249670f, -0.250042f, -0.250413f, -0.250784f, -0.251155f, -0.251527f,
+ -0.251898f, -0.252269f, -0.252640f, -0.253011f, -0.253382f, -0.253753f, -0.254124f, -0.254495f,
+ -0.254866f, -0.255236f, -0.255607f, -0.255978f, -0.256349f, -0.256719f, -0.257090f, -0.257461f,
+ -0.257831f, -0.258202f, -0.258572f, -0.258943f, -0.259313f, -0.259683f, -0.260054f, -0.260424f,
+ -0.260794f, -0.261164f, -0.261534f, -0.261905f, -0.262275f, -0.262645f, -0.263015f, -0.263385f,
+ -0.263755f, -0.264125f, -0.264494f, -0.264864f, -0.265234f, -0.265604f, -0.265973f, -0.266343f,
+ -0.266713f, -0.267082f, -0.267452f, -0.267821f, -0.268191f, -0.268560f, -0.268930f, -0.269299f,
+ -0.269668f, -0.270038f, -0.270407f, -0.270776f, -0.271145f, -0.271514f, -0.271883f, -0.272252f,
+ -0.272621f, -0.272990f, -0.273359f, -0.273728f, -0.274097f, -0.274466f, -0.274834f, -0.275203f,
+ -0.275572f, -0.275940f, -0.276309f, -0.276678f, -0.277046f, -0.277415f, -0.277783f, -0.278151f,
+ -0.278520f, -0.278888f, -0.279256f, -0.279624f, -0.279993f, -0.280361f, -0.280729f, -0.281097f,
+ -0.281465f, -0.281833f, -0.282201f, -0.282569f, -0.282937f, -0.283304f, -0.283672f, -0.284040f,
+ -0.284408f, -0.284775f, -0.285143f, -0.285510f, -0.285878f, -0.286245f, -0.286613f, -0.286980f,
+ -0.287347f, -0.287715f, -0.288082f, -0.288449f, -0.288816f, -0.289184f, -0.289551f, -0.289918f,
+ -0.290285f, -0.290652f, -0.291019f, -0.291385f, -0.291752f, -0.292119f, -0.292486f, -0.292852f,
+ -0.293219f, -0.293586f, -0.293952f, -0.294319f, -0.294685f, -0.295052f, -0.295418f, -0.295785f,
+ -0.296151f, -0.296517f, -0.296883f, -0.297250f, -0.297616f, -0.297982f, -0.298348f, -0.298714f,
+ -0.299080f, -0.299446f, -0.299812f, -0.300177f, -0.300543f, -0.300909f, -0.301275f, -0.301640f,
+ -0.302006f, -0.302372f, -0.302737f, -0.303103f, -0.303468f, -0.303833f, -0.304199f, -0.304564f,
+ -0.304929f, -0.305294f, -0.305660f, -0.306025f, -0.306390f, -0.306755f, -0.307120f, -0.307485f,
+ -0.307850f, -0.308214f, -0.308579f, -0.308944f, -0.309309f, -0.309673f, -0.310038f, -0.310403f,
+ -0.310767f, -0.311132f, -0.311496f, -0.311860f, -0.312225f, -0.312589f, -0.312953f, -0.313318f,
+ -0.313682f, -0.314046f, -0.314410f, -0.314774f, -0.315138f, -0.315502f, -0.315866f, -0.316230f,
+ -0.316593f, -0.316957f, -0.317321f, -0.317684f, -0.318048f, -0.318412f, -0.318775f, -0.319139f,
+ -0.319502f, -0.319865f, -0.320229f, -0.320592f, -0.320955f, -0.321318f, -0.321682f, -0.322045f,
+ -0.322408f, -0.322771f, -0.323134f, -0.323497f, -0.323859f, -0.324222f, -0.324585f, -0.324948f,
+ -0.325310f, -0.325673f, -0.326035f, -0.326398f, -0.326760f, -0.327123f, -0.327485f, -0.327848f,
+ -0.328210f, -0.328572f, -0.328934f, -0.329296f, -0.329658f, -0.330020f, -0.330382f, -0.330744f,
+ -0.331106f, -0.331468f, -0.331830f, -0.332192f, -0.332553f, -0.332915f, -0.333277f, -0.333638f,
+ -0.334000f, -0.334361f, -0.334722f, -0.335084f, -0.335445f, -0.335806f, -0.336168f, -0.336529f,
+ -0.336890f, -0.337251f, -0.337612f, -0.337973f, -0.338334f, -0.338695f, -0.339055f, -0.339416f,
+ -0.339777f, -0.340138f, -0.340498f, -0.340859f, -0.341219f, -0.341580f, -0.341940f, -0.342300f,
+ -0.342661f, -0.343021f, -0.343381f, -0.343741f, -0.344101f, -0.344461f, -0.344821f, -0.345181f,
+ -0.345541f, -0.345901f, -0.346261f, -0.346621f, -0.346980f, -0.347340f, -0.347700f, -0.348059f,
+ -0.348419f, -0.348778f, -0.349138f, -0.349497f, -0.349856f, -0.350215f, -0.350575f, -0.350934f,
+ -0.351293f, -0.351652f, -0.352011f, -0.352370f, -0.352729f, -0.353087f, -0.353446f, -0.353805f,
+ -0.354164f, -0.354522f, -0.354881f, -0.355239f, -0.355598f, -0.355956f, -0.356314f, -0.356673f,
+ -0.357031f, -0.357389f, -0.357747f, -0.358105f, -0.358463f, -0.358821f, -0.359179f, -0.359537f,
+ -0.359895f, -0.360253f, -0.360611f, -0.360968f, -0.361326f, -0.361683f, -0.362041f, -0.362398f,
+ -0.362756f, -0.363113f, -0.363470f, -0.363828f, -0.364185f, -0.364542f, -0.364899f, -0.365256f,
+ -0.365613f, -0.365970f, -0.366327f, -0.366684f, -0.367040f, -0.367397f, -0.367754f, -0.368110f,
+ -0.368467f, -0.368823f, -0.369180f, -0.369536f, -0.369892f, -0.370249f, -0.370605f, -0.370961f,
+ -0.371317f, -0.371673f, -0.372029f, -0.372385f, -0.372741f, -0.373097f, -0.373453f, -0.373808f,
+ -0.374164f, -0.374520f, -0.374875f, -0.375231f, -0.375586f, -0.375942f, -0.376297f, -0.376652f,
+ -0.377007f, -0.377363f, -0.377718f, -0.378073f, -0.378428f, -0.378783f, -0.379138f, -0.379492f,
+ -0.379847f, -0.380202f, -0.380557f, -0.380911f, -0.381266f, -0.381620f, -0.381975f, -0.382329f,
+ -0.382683f, -0.383038f, -0.383392f, -0.383746f, -0.384100f, -0.384454f, -0.384808f, -0.385162f,
+ -0.385516f, -0.385870f, -0.386224f, -0.386577f, -0.386931f, -0.387285f, -0.387638f, -0.387992f,
+ -0.388345f, -0.388698f, -0.389052f, -0.389405f, -0.389758f, -0.390111f, -0.390464f, -0.390817f,
+ -0.391170f, -0.391523f, -0.391876f, -0.392229f, -0.392582f, -0.392934f, -0.393287f, -0.393640f,
+ -0.393992f, -0.394344f, -0.394697f, -0.395049f, -0.395401f, -0.395754f, -0.396106f, -0.396458f,
+ -0.396810f, -0.397162f, -0.397514f, -0.397866f, -0.398218f, -0.398569f, -0.398921f, -0.399273f,
+ -0.399624f, -0.399976f, -0.400327f, -0.400679f, -0.401030f, -0.401381f, -0.401732f, -0.402084f,
+ -0.402435f, -0.402786f, -0.403137f, -0.403488f, -0.403838f, -0.404189f, -0.404540f, -0.404891f,
+ -0.405241f, -0.405592f, -0.405942f, -0.406293f, -0.406643f, -0.406994f, -0.407344f, -0.407694f,
+ -0.408044f, -0.408394f, -0.408744f, -0.409094f, -0.409444f, -0.409794f, -0.410144f, -0.410493f,
+ -0.410843f, -0.411193f, -0.411542f, -0.411892f, -0.412241f, -0.412591f, -0.412940f, -0.413289f,
+ -0.413638f, -0.413987f, -0.414337f, -0.414685f, -0.415034f, -0.415383f, -0.415732f, -0.416081f,
+ -0.416430f, -0.416778f, -0.417127f, -0.417475f, -0.417824f, -0.418172f, -0.418520f, -0.418869f,
+ -0.419217f, -0.419565f, -0.419913f, -0.420261f, -0.420609f, -0.420957f, -0.421305f, -0.421653f,
+ -0.422000f, -0.422348f, -0.422695f, -0.423043f, -0.423390f, -0.423738f, -0.424085f, -0.424432f,
+ -0.424780f, -0.425127f, -0.425474f, -0.425821f, -0.426168f, -0.426515f, -0.426862f, -0.427208f,
+ -0.427555f, -0.427902f, -0.428248f, -0.428595f, -0.428941f, -0.429288f, -0.429634f, -0.429980f,
+ -0.430326f, -0.430673f, -0.431019f, -0.431365f, -0.431711f, -0.432057f, -0.432402f, -0.432748f,
+ -0.433094f, -0.433439f, -0.433785f, -0.434131f, -0.434476f, -0.434821f, -0.435167f, -0.435512f,
+ -0.435857f, -0.436202f, -0.436547f, -0.436892f, -0.437237f, -0.437582f, -0.437927f, -0.438272f,
+ -0.438616f, -0.438961f, -0.439305f, -0.439650f, -0.439994f, -0.440339f, -0.440683f, -0.441027f,
+ -0.441371f, -0.441715f, -0.442059f, -0.442403f, -0.442747f, -0.443091f, -0.443435f, -0.443779f,
+ -0.444122f, -0.444466f, -0.444809f, -0.445153f, -0.445496f, -0.445839f, -0.446183f, -0.446526f,
+ -0.446869f, -0.447212f, -0.447555f, -0.447898f, -0.448241f, -0.448583f, -0.448926f, -0.449269f,
+ -0.449611f, -0.449954f, -0.450296f, -0.450639f, -0.450981f, -0.451323f, -0.451665f, -0.452008f,
+ -0.452350f, -0.452692f, -0.453033f, -0.453375f, -0.453717f, -0.454059f, -0.454400f, -0.454742f,
+ -0.455084f, -0.455425f, -0.455766f, -0.456108f, -0.456449f, -0.456790f, -0.457131f, -0.457472f,
+ -0.457813f, -0.458154f, -0.458495f, -0.458836f, -0.459177f, -0.459517f, -0.459858f, -0.460198f,
+ -0.460539f, -0.460879f, -0.461219f, -0.461560f, -0.461900f, -0.462240f, -0.462580f, -0.462920f,
+ -0.463260f, -0.463600f, -0.463939f, -0.464279f, -0.464619f, -0.464958f, -0.465298f, -0.465637f,
+ -0.465977f, -0.466316f, -0.466655f, -0.466994f, -0.467333f, -0.467672f, -0.468011f, -0.468350f,
+ -0.468689f, -0.469028f, -0.469366f, -0.469705f, -0.470043f, -0.470382f, -0.470720f, -0.471058f,
+ -0.471397f, -0.471735f, -0.472073f, -0.472411f, -0.472749f, -0.473087f, -0.473425f, -0.473763f,
+ -0.474100f, -0.474438f, -0.474775f, -0.475113f, -0.475450f, -0.475788f, -0.476125f, -0.476462f,
+ -0.476799f, -0.477136f, -0.477473f, -0.477810f, -0.478147f, -0.478484f, -0.478821f, -0.479157f,
+ -0.479494f, -0.479830f, -0.480167f, -0.480503f, -0.480839f, -0.481176f, -0.481512f, -0.481848f,
+ -0.482184f, -0.482520f, -0.482856f, -0.483191f, -0.483527f, -0.483863f, -0.484198f, -0.484534f,
+ -0.484869f, -0.485205f, -0.485540f, -0.485875f, -0.486210f, -0.486545f, -0.486880f, -0.487215f,
+ -0.487550f, -0.487885f, -0.488220f, -0.488554f, -0.488889f, -0.489223f, -0.489558f, -0.489892f,
+ -0.490226f, -0.490561f, -0.490895f, -0.491229f, -0.491563f, -0.491897f, -0.492231f, -0.492564f,
+ -0.492898f, -0.493232f, -0.493565f, -0.493899f, -0.494232f, -0.494566f, -0.494899f, -0.495232f,
+ -0.495565f, -0.495898f, -0.496231f, -0.496564f, -0.496897f, -0.497230f, -0.497562f, -0.497895f,
+ -0.498228f, -0.498560f, -0.498893f, -0.499225f, -0.499557f, -0.499889f, -0.500221f, -0.500553f,
+ -0.500885f, -0.501217f, -0.501549f, -0.501881f, -0.502212f, -0.502544f, -0.502876f, -0.503207f,
+ -0.503538f, -0.503870f, -0.504201f, -0.504532f, -0.504863f, -0.505194f, -0.505525f, -0.505856f,
+ -0.506187f, -0.506517f, -0.506848f, -0.507179f, -0.507509f, -0.507839f, -0.508170f, -0.508500f,
+ -0.508830f, -0.509160f, -0.509490f, -0.509820f, -0.510150f, -0.510480f, -0.510810f, -0.511139f,
+ -0.511469f, -0.511798f, -0.512128f, -0.512457f, -0.512786f, -0.513116f, -0.513445f, -0.513774f,
+ -0.514103f, -0.514432f, -0.514760f, -0.515089f, -0.515418f, -0.515746f, -0.516075f, -0.516403f,
+ -0.516732f, -0.517060f, -0.517388f, -0.517716f, -0.518045f, -0.518372f, -0.518700f, -0.519028f,
+ -0.519356f, -0.519684f, -0.520011f, -0.520339f, -0.520666f, -0.520994f, -0.521321f, -0.521648f,
+ -0.521975f, -0.522302f, -0.522629f, -0.522956f, -0.523283f, -0.523610f, -0.523937f, -0.524263f,
+ -0.524590f, -0.524916f, -0.525243f, -0.525569f, -0.525895f, -0.526221f, -0.526547f, -0.526873f,
+ -0.527199f, -0.527525f, -0.527851f, -0.528176f, -0.528502f, -0.528828f, -0.529153f, -0.529478f,
+ -0.529804f, -0.530129f, -0.530454f, -0.530779f, -0.531104f, -0.531429f, -0.531754f, -0.532078f,
+ -0.532403f, -0.532728f, -0.533052f, -0.533377f, -0.533701f, -0.534025f, -0.534349f, -0.534674f,
+ -0.534998f, -0.535322f, -0.535645f, -0.535969f, -0.536293f, -0.536617f, -0.536940f, -0.537264f,
+ -0.537587f, -0.537910f, -0.538234f, -0.538557f, -0.538880f, -0.539203f, -0.539526f, -0.539849f,
+ -0.540171f, -0.540494f, -0.540817f, -0.541139f, -0.541462f, -0.541784f, -0.542106f, -0.542429f,
+ -0.542751f, -0.543073f, -0.543395f, -0.543717f, -0.544039f, -0.544360f, -0.544682f, -0.545003f,
+ -0.545325f, -0.545646f, -0.545968f, -0.546289f, -0.546610f, -0.546931f, -0.547252f, -0.547573f,
+ -0.547894f, -0.548215f, -0.548536f, -0.548856f, -0.549177f, -0.549497f, -0.549818f, -0.550138f,
+ -0.550458f, -0.550778f, -0.551098f, -0.551418f, -0.551738f, -0.552058f, -0.552378f, -0.552697f,
+ -0.553017f, -0.553336f, -0.553656f, -0.553975f, -0.554294f, -0.554613f, -0.554932f, -0.555251f,
+ -0.555570f, -0.555889f, -0.556208f, -0.556526f, -0.556845f, -0.557164f, -0.557482f, -0.557800f,
+ -0.558119f, -0.558437f, -0.558755f, -0.559073f, -0.559391f, -0.559709f, -0.560026f, -0.560344f,
+ -0.560662f, -0.560979f, -0.561297f, -0.561614f, -0.561931f, -0.562248f, -0.562565f, -0.562882f,
+ -0.563199f, -0.563516f, -0.563833f, -0.564150f, -0.564466f, -0.564783f, -0.565099f, -0.565416f,
+ -0.565732f, -0.566048f, -0.566364f, -0.566680f, -0.566996f, -0.567312f, -0.567628f, -0.567943f,
+ -0.568259f, -0.568574f, -0.568890f, -0.569205f, -0.569521f, -0.569836f, -0.570151f, -0.570466f,
+ -0.570781f, -0.571096f, -0.571410f, -0.571725f, -0.572040f, -0.572354f, -0.572669f, -0.572983f,
+ -0.573297f, -0.573611f, -0.573925f, -0.574239f, -0.574553f, -0.574867f, -0.575181f, -0.575495f,
+ -0.575808f, -0.576122f, -0.576435f, -0.576748f, -0.577062f, -0.577375f, -0.577688f, -0.578001f,
+ -0.578314f, -0.578627f, -0.578939f, -0.579252f, -0.579565f, -0.579877f, -0.580189f, -0.580502f,
+ -0.580814f, -0.581126f, -0.581438f, -0.581750f, -0.582062f, -0.582374f, -0.582685f, -0.582997f,
+ -0.583309f, -0.583620f, -0.583931f, -0.584243f, -0.584554f, -0.584865f, -0.585176f, -0.585487f,
+ -0.585798f, -0.586109f, -0.586419f, -0.586730f, -0.587040f, -0.587351f, -0.587661f, -0.587971f,
+ -0.588282f, -0.588592f, -0.588902f, -0.589212f, -0.589521f, -0.589831f, -0.590141f, -0.590450f,
+ -0.590760f, -0.591069f, -0.591378f, -0.591688f, -0.591997f, -0.592306f, -0.592615f, -0.592924f,
+ -0.593232f, -0.593541f, -0.593850f, -0.594158f, -0.594467f, -0.594775f, -0.595083f, -0.595391f,
+ -0.595699f, -0.596007f, -0.596315f, -0.596623f, -0.596931f, -0.597238f, -0.597546f, -0.597853f,
+ -0.598161f, -0.598468f, -0.598775f, -0.599082f, -0.599389f, -0.599696f, -0.600003f, -0.600310f,
+ -0.600616f, -0.600923f, -0.601230f, -0.601536f, -0.601842f, -0.602148f, -0.602455f, -0.602761f,
+ -0.603067f, -0.603372f, -0.603678f, -0.603984f, -0.604290f, -0.604595f, -0.604900f, -0.605206f,
+ -0.605511f, -0.605816f, -0.606121f, -0.606426f, -0.606731f, -0.607036f, -0.607341f, -0.607645f,
+ -0.607950f, -0.608254f, -0.608559f, -0.608863f, -0.609167f, -0.609471f, -0.609775f, -0.610079f,
+ -0.610383f, -0.610687f, -0.610990f, -0.611294f, -0.611597f, -0.611901f, -0.612204f, -0.612507f,
+ -0.612810f, -0.613113f, -0.613416f, -0.613719f, -0.614022f, -0.614324f, -0.614627f, -0.614929f,
+ -0.615232f, -0.615534f, -0.615836f, -0.616138f, -0.616440f, -0.616742f, -0.617044f, -0.617346f,
+ -0.617647f, -0.617949f, -0.618250f, -0.618552f, -0.618853f, -0.619154f, -0.619455f, -0.619756f,
+ -0.620057f, -0.620358f, -0.620659f, -0.620959f, -0.621260f, -0.621560f, -0.621861f, -0.622161f,
+ -0.622461f, -0.622761f, -0.623061f, -0.623361f, -0.623661f, -0.623961f, -0.624260f, -0.624560f,
+ -0.624860f, -0.625159f, -0.625458f, -0.625757f, -0.626056f, -0.626355f, -0.626654f, -0.626953f,
+ -0.627252f, -0.627550f, -0.627849f, -0.628147f, -0.628446f, -0.628744f, -0.629042f, -0.629340f,
+ -0.629638f, -0.629936f, -0.630234f, -0.630532f, -0.630829f, -0.631127f, -0.631424f, -0.631721f,
+ -0.632019f, -0.632316f, -0.632613f, -0.632910f, -0.633207f, -0.633504f, -0.633800f, -0.634097f,
+ -0.634393f, -0.634690f, -0.634986f, -0.635282f, -0.635578f, -0.635874f, -0.636170f, -0.636466f,
+ -0.636762f, -0.637057f, -0.637353f, -0.637649f, -0.637944f, -0.638239f, -0.638534f, -0.638829f,
+ -0.639124f, -0.639419f, -0.639714f, -0.640009f, -0.640303f, -0.640598f, -0.640892f, -0.641187f,
+ -0.641481f, -0.641775f, -0.642069f, -0.642363f, -0.642657f, -0.642951f, -0.643245f, -0.643538f,
+ -0.643832f, -0.644125f, -0.644418f, -0.644711f, -0.645005f, -0.645298f, -0.645590f, -0.645883f,
+ -0.646176f, -0.646469f, -0.646761f, -0.647054f, -0.647346f, -0.647638f, -0.647930f, -0.648222f,
+ -0.648514f, -0.648806f, -0.649098f, -0.649390f, -0.649681f, -0.649973f, -0.650264f, -0.650555f,
+ -0.650847f, -0.651138f, -0.651429f, -0.651720f, -0.652011f, -0.652301f, -0.652592f, -0.652882f,
+ -0.653173f, -0.653463f, -0.653753f, -0.654044f, -0.654334f, -0.654624f, -0.654913f, -0.655203f,
+ -0.655493f, -0.655782f, -0.656072f, -0.656361f, -0.656651f, -0.656940f, -0.657229f, -0.657518f,
+ -0.657807f, -0.658095f, -0.658384f, -0.658673f, -0.658961f, -0.659250f, -0.659538f, -0.659826f,
+ -0.660114f, -0.660402f, -0.660690f, -0.660978f, -0.661266f, -0.661553f, -0.661841f, -0.662128f,
+ -0.662416f, -0.662703f, -0.662990f, -0.663277f, -0.663564f, -0.663851f, -0.664138f, -0.664424f,
+ -0.664711f, -0.664997f, -0.665284f, -0.665570f, -0.665856f, -0.666142f, -0.666428f, -0.666714f,
+ -0.667000f, -0.667286f, -0.667571f, -0.667857f, -0.668142f, -0.668427f, -0.668712f, -0.668998f,
+ -0.669283f, -0.669567f, -0.669852f, -0.670137f, -0.670422f, -0.670706f, -0.670990f, -0.671275f,
+ -0.671559f, -0.671843f, -0.672127f, -0.672411f, -0.672695f, -0.672978f, -0.673262f, -0.673546f,
+ -0.673829f, -0.674112f, -0.674396f, -0.674679f, -0.674962f, -0.675245f, -0.675527f, -0.675810f,
+ -0.676093f, -0.676375f, -0.676658f, -0.676940f, -0.677222f, -0.677504f, -0.677786f, -0.678068f,
+ -0.678350f, -0.678632f, -0.678913f, -0.679195f, -0.679476f, -0.679758f, -0.680039f, -0.680320f,
+ -0.680601f, -0.680882f, -0.681163f, -0.681443f, -0.681724f, -0.682005f, -0.682285f, -0.682565f,
+ -0.682846f, -0.683126f, -0.683406f, -0.683686f, -0.683965f, -0.684245f, -0.684525f, -0.684804f,
+ -0.685084f, -0.685363f, -0.685642f, -0.685921f, -0.686200f, -0.686479f, -0.686758f, -0.687037f,
+ -0.687315f, -0.687594f, -0.687872f, -0.688151f, -0.688429f, -0.688707f, -0.688985f, -0.689263f,
+ -0.689541f, -0.689818f, -0.690096f, -0.690373f, -0.690651f, -0.690928f, -0.691205f, -0.691482f,
+ -0.691759f, -0.692036f, -0.692313f, -0.692590f, -0.692866f, -0.693143f, -0.693419f, -0.693695f,
+ -0.693971f, -0.694248f, -0.694524f, -0.694799f, -0.695075f, -0.695351f, -0.695626f, -0.695902f,
+ -0.696177f, -0.696452f, -0.696728f, -0.697003f, -0.697277f, -0.697552f, -0.697827f, -0.698102f,
+ -0.698376f, -0.698651f, -0.698925f, -0.699199f, -0.699473f, -0.699747f, -0.700021f, -0.700295f,
+ -0.700569f, -0.700842f, -0.701116f, -0.701389f, -0.701663f, -0.701936f, -0.702209f, -0.702482f,
+ -0.702755f, -0.703028f, -0.703300f, -0.703573f, -0.703845f, -0.704118f, -0.704390f, -0.704662f,
+ -0.704934f, -0.705206f, -0.705478f, -0.705750f, -0.706021f, -0.706293f, -0.706564f, -0.706836f,
+ -0.707107f, -0.707378f, -0.707649f, -0.707920f, -0.708191f, -0.708461f, -0.708732f, -0.709002f,
+ -0.709273f, -0.709543f, -0.709813f, -0.710083f, -0.710353f, -0.710623f, -0.710893f, -0.711163f,
+ -0.711432f, -0.711702f, -0.711971f, -0.712240f, -0.712509f, -0.712778f, -0.713047f, -0.713316f,
+ -0.713585f, -0.713853f, -0.714122f, -0.714390f, -0.714659f, -0.714927f, -0.715195f, -0.715463f,
+ -0.715731f, -0.715999f, -0.716266f, -0.716534f, -0.716801f, -0.717069f, -0.717336f, -0.717603f,
+ -0.717870f, -0.718137f, -0.718404f, -0.718670f, -0.718937f, -0.719204f, -0.719470f, -0.719736f,
+ -0.720003f, -0.720269f, -0.720535f, -0.720800f, -0.721066f, -0.721332f, -0.721597f, -0.721863f,
+ -0.722128f, -0.722393f, -0.722659f, -0.722924f, -0.723188f, -0.723453f, -0.723718f, -0.723983f,
+ -0.724247f, -0.724511f, -0.724776f, -0.725040f, -0.725304f, -0.725568f, -0.725832f, -0.726095f,
+ -0.726359f, -0.726623f, -0.726886f, -0.727149f, -0.727413f, -0.727676f, -0.727939f, -0.728202f,
+ -0.728464f, -0.728727f, -0.728990f, -0.729252f, -0.729514f, -0.729777f, -0.730039f, -0.730301f,
+ -0.730563f, -0.730825f, -0.731086f, -0.731348f, -0.731609f, -0.731871f, -0.732132f, -0.732393f,
+ -0.732654f, -0.732915f, -0.733176f, -0.733437f, -0.733697f, -0.733958f, -0.734218f, -0.734479f,
+ -0.734739f, -0.734999f, -0.735259f, -0.735519f, -0.735779f, -0.736038f, -0.736298f, -0.736557f,
+ -0.736817f, -0.737076f, -0.737335f, -0.737594f, -0.737853f, -0.738112f, -0.738370f, -0.738629f,
+ -0.738887f, -0.739146f, -0.739404f, -0.739662f, -0.739920f, -0.740178f, -0.740436f, -0.740694f,
+ -0.740951f, -0.741209f, -0.741466f, -0.741723f, -0.741980f, -0.742237f, -0.742494f, -0.742751f,
+ -0.743008f, -0.743265f, -0.743521f, -0.743777f, -0.744034f, -0.744290f, -0.744546f, -0.744802f,
+ -0.745058f, -0.745314f, -0.745569f, -0.745825f, -0.746080f, -0.746335f, -0.746591f, -0.746846f,
+ -0.747101f, -0.747355f, -0.747610f, -0.747865f, -0.748119f, -0.748374f, -0.748628f, -0.748882f,
+ -0.749136f, -0.749390f, -0.749644f, -0.749898f, -0.750152f, -0.750405f, -0.750659f, -0.750912f,
+ -0.751165f, -0.751418f, -0.751671f, -0.751924f, -0.752177f, -0.752429f, -0.752682f, -0.752934f,
+ -0.753187f, -0.753439f, -0.753691f, -0.753943f, -0.754195f, -0.754447f, -0.754698f, -0.754950f,
+ -0.755201f, -0.755453f, -0.755704f, -0.755955f, -0.756206f, -0.756457f, -0.756708f, -0.756958f,
+ -0.757209f, -0.757459f, -0.757710f, -0.757960f, -0.758210f, -0.758460f, -0.758710f, -0.758960f,
+ -0.759209f, -0.759459f, -0.759708f, -0.759957f, -0.760207f, -0.760456f, -0.760705f, -0.760954f,
+ -0.761202f, -0.761451f, -0.761700f, -0.761948f, -0.762196f, -0.762444f, -0.762693f, -0.762941f,
+ -0.763188f, -0.763436f, -0.763684f, -0.763931f, -0.764179f, -0.764426f, -0.764673f, -0.764920f,
+ -0.765167f, -0.765414f, -0.765661f, -0.765907f, -0.766154f, -0.766400f, -0.766647f, -0.766893f,
+ -0.767139f, -0.767385f, -0.767631f, -0.767876f, -0.768122f, -0.768368f, -0.768613f, -0.768858f,
+ -0.769103f, -0.769348f, -0.769593f, -0.769838f, -0.770083f, -0.770327f, -0.770572f, -0.770816f,
+ -0.771061f, -0.771305f, -0.771549f, -0.771793f, -0.772036f, -0.772280f, -0.772524f, -0.772767f,
+ -0.773010f, -0.773254f, -0.773497f, -0.773740f, -0.773983f, -0.774225f, -0.774468f, -0.774711f,
+ -0.774953f, -0.775195f, -0.775438f, -0.775680f, -0.775922f, -0.776164f, -0.776405f, -0.776647f,
+ -0.776888f, -0.777130f, -0.777371f, -0.777612f, -0.777853f, -0.778094f, -0.778335f, -0.778576f,
+ -0.778817f, -0.779057f, -0.779297f, -0.779538f, -0.779778f, -0.780018f, -0.780258f, -0.780498f,
+ -0.780737f, -0.780977f, -0.781216f, -0.781456f, -0.781695f, -0.781934f, -0.782173f, -0.782412f,
+ -0.782651f, -0.782889f, -0.783128f, -0.783366f, -0.783605f, -0.783843f, -0.784081f, -0.784319f,
+ -0.784557f, -0.784794f, -0.785032f, -0.785269f, -0.785507f, -0.785744f, -0.785981f, -0.786218f,
+ -0.786455f, -0.786692f, -0.786929f, -0.787165f, -0.787402f, -0.787638f, -0.787874f, -0.788110f,
+ -0.788346f, -0.788582f, -0.788818f, -0.789054f, -0.789289f, -0.789525f, -0.789760f, -0.789995f,
+ -0.790230f, -0.790465f, -0.790700f, -0.790935f, -0.791169f, -0.791404f, -0.791638f, -0.791872f,
+ -0.792107f, -0.792341f, -0.792575f, -0.792808f, -0.793042f, -0.793276f, -0.793509f, -0.793742f,
+ -0.793975f, -0.794209f, -0.794442f, -0.794674f, -0.794907f, -0.795140f, -0.795372f, -0.795605f,
+ -0.795837f, -0.796069f, -0.796301f, -0.796533f, -0.796765f, -0.796996f, -0.797228f, -0.797459f,
+ -0.797691f, -0.797922f, -0.798153f, -0.798384f, -0.798615f, -0.798846f, -0.799076f, -0.799307f,
+ -0.799537f, -0.799768f, -0.799998f, -0.800228f, -0.800458f, -0.800687f, -0.800917f, -0.801147f,
+ -0.801376f, -0.801606f, -0.801835f, -0.802064f, -0.802293f, -0.802522f, -0.802750f, -0.802979f,
+ -0.803208f, -0.803436f, -0.803664f, -0.803892f, -0.804120f, -0.804348f, -0.804576f, -0.804804f,
+ -0.805031f, -0.805259f, -0.805486f, -0.805713f, -0.805940f, -0.806167f, -0.806394f, -0.806621f,
+ -0.806848f, -0.807074f, -0.807300f, -0.807527f, -0.807753f, -0.807979f, -0.808205f, -0.808430f,
+ -0.808656f, -0.808882f, -0.809107f, -0.809332f, -0.809558f, -0.809783f, -0.810008f, -0.810232f,
+ -0.810457f, -0.810682f, -0.810906f, -0.811131f, -0.811355f, -0.811579f, -0.811803f, -0.812027f,
+ -0.812251f, -0.812474f, -0.812698f, -0.812921f, -0.813144f, -0.813368f, -0.813591f, -0.813814f,
+ -0.814036f, -0.814259f, -0.814482f, -0.814704f, -0.814926f, -0.815149f, -0.815371f, -0.815593f,
+ -0.815814f, -0.816036f, -0.816258f, -0.816479f, -0.816701f, -0.816922f, -0.817143f, -0.817364f,
+ -0.817585f, -0.817806f, -0.818026f, -0.818247f, -0.818467f, -0.818687f, -0.818908f, -0.819128f,
+ -0.819348f, -0.819567f, -0.819787f, -0.820007f, -0.820226f, -0.820445f, -0.820664f, -0.820884f,
+ -0.821102f, -0.821321f, -0.821540f, -0.821759f, -0.821977f, -0.822195f, -0.822414f, -0.822632f,
+ -0.822850f, -0.823068f, -0.823285f, -0.823503f, -0.823721f, -0.823938f, -0.824155f, -0.824372f,
+ -0.824589f, -0.824806f, -0.825023f, -0.825240f, -0.825456f, -0.825673f, -0.825889f, -0.826105f,
+ -0.826321f, -0.826537f, -0.826753f, -0.826968f, -0.827184f, -0.827399f, -0.827615f, -0.827830f,
+ -0.828045f, -0.828260f, -0.828475f, -0.828690f, -0.828904f, -0.829119f, -0.829333f, -0.829547f,
+ -0.829761f, -0.829975f, -0.830189f, -0.830403f, -0.830616f, -0.830830f, -0.831043f, -0.831257f,
+ -0.831470f, -0.831683f, -0.831895f, -0.832108f, -0.832321f, -0.832533f, -0.832746f, -0.832958f,
+ -0.833170f, -0.833382f, -0.833594f, -0.833806f, -0.834018f, -0.834229f, -0.834440f, -0.834652f,
+ -0.834863f, -0.835074f, -0.835285f, -0.835496f, -0.835706f, -0.835917f, -0.836127f, -0.836338f,
+ -0.836548f, -0.836758f, -0.836968f, -0.837178f, -0.837387f, -0.837597f, -0.837806f, -0.838015f,
+ -0.838225f, -0.838434f, -0.838643f, -0.838852f, -0.839060f, -0.839269f, -0.839477f, -0.839686f,
+ -0.839894f, -0.840102f, -0.840310f, -0.840518f, -0.840725f, -0.840933f, -0.841140f, -0.841348f,
+ -0.841555f, -0.841762f, -0.841969f, -0.842176f, -0.842383f, -0.842589f, -0.842796f, -0.843002f,
+ -0.843208f, -0.843414f, -0.843620f, -0.843826f, -0.844032f, -0.844238f, -0.844443f, -0.844648f,
+ -0.844854f, -0.845059f, -0.845264f, -0.845469f, -0.845673f, -0.845878f, -0.846082f, -0.846287f,
+ -0.846491f, -0.846695f, -0.846899f, -0.847103f, -0.847307f, -0.847510f, -0.847714f, -0.847917f,
+ -0.848120f, -0.848323f, -0.848526f, -0.848729f, -0.848932f, -0.849135f, -0.849337f, -0.849540f,
+ -0.849742f, -0.849944f, -0.850146f, -0.850348f, -0.850549f, -0.850751f, -0.850953f, -0.851154f,
+ -0.851355f, -0.851556f, -0.851757f, -0.851958f, -0.852159f, -0.852360f, -0.852560f, -0.852760f,
+ -0.852961f, -0.853161f, -0.853361f, -0.853561f, -0.853760f, -0.853960f, -0.854159f, -0.854359f,
+ -0.854558f, -0.854757f, -0.854956f, -0.855155f, -0.855354f, -0.855552f, -0.855751f, -0.855949f,
+ -0.856147f, -0.856345f, -0.856543f, -0.856741f, -0.856939f, -0.857137f, -0.857334f, -0.857531f,
+ -0.857729f, -0.857926f, -0.858123f, -0.858320f, -0.858516f, -0.858713f, -0.858909f, -0.859106f,
+ -0.859302f, -0.859498f, -0.859694f, -0.859890f, -0.860085f, -0.860281f, -0.860476f, -0.860672f,
+ -0.860867f, -0.861062f, -0.861257f, -0.861452f, -0.861646f, -0.861841f, -0.862035f, -0.862230f,
+ -0.862424f, -0.862618f, -0.862812f, -0.863006f, -0.863199f, -0.863393f, -0.863586f, -0.863780f,
+ -0.863973f, -0.864166f, -0.864359f, -0.864552f, -0.864744f, -0.864937f, -0.865129f, -0.865321f,
+ -0.865514f, -0.865706f, -0.865898f, -0.866089f, -0.866281f, -0.866472f, -0.866664f, -0.866855f,
+ -0.867046f, -0.867237f, -0.867428f, -0.867619f, -0.867809f, -0.868000f, -0.868190f, -0.868381f,
+ -0.868571f, -0.868761f, -0.868951f, -0.869140f, -0.869330f, -0.869519f, -0.869709f, -0.869898f,
+ -0.870087f, -0.870276f, -0.870465f, -0.870654f, -0.870842f, -0.871031f, -0.871219f, -0.871407f,
+ -0.871595f, -0.871783f, -0.871971f, -0.872159f, -0.872346f, -0.872534f, -0.872721f, -0.872908f,
+ -0.873095f, -0.873282f, -0.873469f, -0.873655f, -0.873842f, -0.874028f, -0.874215f, -0.874401f,
+ -0.874587f, -0.874773f, -0.874958f, -0.875144f, -0.875329f, -0.875515f, -0.875700f, -0.875885f,
+ -0.876070f, -0.876255f, -0.876440f, -0.876624f, -0.876809f, -0.876993f, -0.877177f, -0.877361f,
+ -0.877545f, -0.877729f, -0.877913f, -0.878096f, -0.878280f, -0.878463f, -0.878646f, -0.878829f,
+ -0.879012f, -0.879195f, -0.879378f, -0.879560f, -0.879743f, -0.879925f, -0.880107f, -0.880289f,
+ -0.880471f, -0.880653f, -0.880834f, -0.881016f, -0.881197f, -0.881378f, -0.881559f, -0.881740f,
+ -0.881921f, -0.882102f, -0.882283f, -0.882463f, -0.882643f, -0.882824f, -0.883004f, -0.883184f,
+ -0.883363f, -0.883543f, -0.883723f, -0.883902f, -0.884081f, -0.884260f, -0.884439f, -0.884618f,
+ -0.884797f, -0.884976f, -0.885154f, -0.885333f, -0.885511f, -0.885689f, -0.885867f, -0.886045f,
+ -0.886223f, -0.886400f, -0.886578f, -0.886755f, -0.886932f, -0.887109f, -0.887286f, -0.887463f,
+ -0.887640f, -0.887816f, -0.887993f, -0.888169f, -0.888345f, -0.888521f, -0.888697f, -0.888873f,
+ -0.889048f, -0.889224f, -0.889399f, -0.889574f, -0.889750f, -0.889925f, -0.890099f, -0.890274f,
+ -0.890449f, -0.890623f, -0.890797f, -0.890972f, -0.891146f, -0.891320f, -0.891493f, -0.891667f,
+ -0.891841f, -0.892014f, -0.892187f, -0.892361f, -0.892534f, -0.892706f, -0.892879f, -0.893052f,
+ -0.893224f, -0.893397f, -0.893569f, -0.893741f, -0.893913f, -0.894085f, -0.894256f, -0.894428f,
+ -0.894599f, -0.894771f, -0.894942f, -0.895113f, -0.895284f, -0.895455f, -0.895625f, -0.895796f,
+ -0.895966f, -0.896137f, -0.896307f, -0.896477f, -0.896646f, -0.896816f, -0.896986f, -0.897155f,
+ -0.897325f, -0.897494f, -0.897663f, -0.897832f, -0.898001f, -0.898169f, -0.898338f, -0.898506f,
+ -0.898674f, -0.898843f, -0.899011f, -0.899179f, -0.899346f, -0.899514f, -0.899681f, -0.899849f,
+ -0.900016f, -0.900183f, -0.900350f, -0.900517f, -0.900683f, -0.900850f, -0.901016f, -0.901183f,
+ -0.901349f, -0.901515f, -0.901681f, -0.901847f, -0.902012f, -0.902178f, -0.902343f, -0.902508f,
+ -0.902673f, -0.902838f, -0.903003f, -0.903168f, -0.903332f, -0.903497f, -0.903661f, -0.903825f,
+ -0.903989f, -0.904153f, -0.904317f, -0.904481f, -0.904644f, -0.904807f, -0.904971f, -0.905134f,
+ -0.905297f, -0.905460f, -0.905622f, -0.905785f, -0.905947f, -0.906110f, -0.906272f, -0.906434f,
+ -0.906596f, -0.906757f, -0.906919f, -0.907081f, -0.907242f, -0.907403f, -0.907564f, -0.907725f,
+ -0.907886f, -0.908047f, -0.908207f, -0.908368f, -0.908528f, -0.908688f, -0.908848f, -0.909008f,
+ -0.909168f, -0.909328f, -0.909487f, -0.909646f, -0.909806f, -0.909965f, -0.910124f, -0.910283f,
+ -0.910441f, -0.910600f, -0.910758f, -0.910917f, -0.911075f, -0.911233f, -0.911391f, -0.911548f,
+ -0.911706f, -0.911864f, -0.912021f, -0.912178f, -0.912335f, -0.912492f, -0.912649f, -0.912806f,
+ -0.912962f, -0.913119f, -0.913275f, -0.913431f, -0.913587f, -0.913743f, -0.913899f, -0.914054f,
+ -0.914210f, -0.914365f, -0.914520f, -0.914675f, -0.914830f, -0.914985f, -0.915140f, -0.915294f,
+ -0.915449f, -0.915603f, -0.915757f, -0.915911f, -0.916065f, -0.916219f, -0.916372f, -0.916526f,
+ -0.916679f, -0.916832f, -0.916985f, -0.917138f, -0.917291f, -0.917444f, -0.917596f, -0.917749f,
+ -0.917901f, -0.918053f, -0.918205f, -0.918357f, -0.918508f, -0.918660f, -0.918811f, -0.918963f,
+ -0.919114f, -0.919265f, -0.919416f, -0.919567f, -0.919717f, -0.919868f, -0.920018f, -0.920168f,
+ -0.920318f, -0.920468f, -0.920618f, -0.920768f, -0.920917f, -0.921067f, -0.921216f, -0.921365f,
+ -0.921514f, -0.921663f, -0.921812f, -0.921960f, -0.922109f, -0.922257f, -0.922405f, -0.922553f,
+ -0.922701f, -0.922849f, -0.922997f, -0.923144f, -0.923291f, -0.923439f, -0.923586f, -0.923733f,
+ -0.923880f, -0.924026f, -0.924173f, -0.924319f, -0.924465f, -0.924612f, -0.924758f, -0.924904f,
+ -0.925049f, -0.925195f, -0.925340f, -0.925486f, -0.925631f, -0.925776f, -0.925921f, -0.926066f,
+ -0.926210f, -0.926355f, -0.926499f, -0.926643f, -0.926787f, -0.926931f, -0.927075f, -0.927219f,
+ -0.927363f, -0.927506f, -0.927649f, -0.927792f, -0.927935f, -0.928078f, -0.928221f, -0.928364f,
+ -0.928506f, -0.928648f, -0.928791f, -0.928933f, -0.929075f, -0.929216f, -0.929358f, -0.929500f,
+ -0.929641f, -0.929782f, -0.929923f, -0.930064f, -0.930205f, -0.930346f, -0.930486f, -0.930627f,
+ -0.930767f, -0.930907f, -0.931047f, -0.931187f, -0.931327f, -0.931466f, -0.931606f, -0.931745f,
+ -0.931884f, -0.932023f, -0.932162f, -0.932301f, -0.932440f, -0.932578f, -0.932716f, -0.932855f,
+ -0.932993f, -0.933131f, -0.933269f, -0.933406f, -0.933544f, -0.933681f, -0.933818f, -0.933956f,
+ -0.934093f, -0.934229f, -0.934366f, -0.934503f, -0.934639f, -0.934775f, -0.934912f, -0.935048f,
+ -0.935184f, -0.935319f, -0.935455f, -0.935590f, -0.935726f, -0.935861f, -0.935996f, -0.936131f,
+ -0.936266f, -0.936400f, -0.936535f, -0.936669f, -0.936803f, -0.936938f, -0.937072f, -0.937205f,
+ -0.937339f, -0.937473f, -0.937606f, -0.937739f, -0.937872f, -0.938005f, -0.938138f, -0.938271f,
+ -0.938404f, -0.938536f, -0.938668f, -0.938800f, -0.938932f, -0.939064f, -0.939196f, -0.939328f,
+ -0.939459f, -0.939591f, -0.939722f, -0.939853f, -0.939984f, -0.940115f, -0.940245f, -0.940376f,
+ -0.940506f, -0.940636f, -0.940766f, -0.940896f, -0.941026f, -0.941156f, -0.941285f, -0.941415f,
+ -0.941544f, -0.941673f, -0.941802f, -0.941931f, -0.942060f, -0.942188f, -0.942317f, -0.942445f,
+ -0.942573f, -0.942701f, -0.942829f, -0.942957f, -0.943084f, -0.943212f, -0.943339f, -0.943466f,
+ -0.943593f, -0.943720f, -0.943847f, -0.943974f, -0.944100f, -0.944227f, -0.944353f, -0.944479f,
+ -0.944605f, -0.944731f, -0.944856f, -0.944982f, -0.945107f, -0.945232f, -0.945358f, -0.945482f,
+ -0.945607f, -0.945732f, -0.945857f, -0.945981f, -0.946105f, -0.946229f, -0.946353f, -0.946477f,
+ -0.946601f, -0.946724f, -0.946848f, -0.946971f, -0.947094f, -0.947217f, -0.947340f, -0.947463f,
+ -0.947586f, -0.947708f, -0.947830f, -0.947953f, -0.948075f, -0.948196f, -0.948318f, -0.948440f,
+ -0.948561f, -0.948683f, -0.948804f, -0.948925f, -0.949046f, -0.949167f, -0.949287f, -0.949408f,
+ -0.949528f, -0.949648f, -0.949768f, -0.949888f, -0.950008f, -0.950128f, -0.950247f, -0.950367f,
+ -0.950486f, -0.950605f, -0.950724f, -0.950843f, -0.950962f, -0.951080f, -0.951199f, -0.951317f,
+ -0.951435f, -0.951553f, -0.951671f, -0.951789f, -0.951906f, -0.952024f, -0.952141f, -0.952258f,
+ -0.952375f, -0.952492f, -0.952609f, -0.952725f, -0.952842f, -0.952958f, -0.953074f, -0.953190f,
+ -0.953306f, -0.953422f, -0.953537f, -0.953653f, -0.953768f, -0.953883f, -0.953998f, -0.954113f,
+ -0.954228f, -0.954343f, -0.954457f, -0.954572f, -0.954686f, -0.954800f, -0.954914f, -0.955028f,
+ -0.955141f, -0.955255f, -0.955368f, -0.955481f, -0.955594f, -0.955707f, -0.955820f, -0.955933f,
+ -0.956045f, -0.956158f, -0.956270f, -0.956382f, -0.956494f, -0.956606f, -0.956717f, -0.956829f,
+ -0.956940f, -0.957052f, -0.957163f, -0.957274f, -0.957385f, -0.957495f, -0.957606f, -0.957716f,
+ -0.957826f, -0.957937f, -0.958046f, -0.958156f, -0.958266f, -0.958376f, -0.958485f, -0.958594f,
+ -0.958703f, -0.958812f, -0.958921f, -0.959030f, -0.959139f, -0.959247f, -0.959355f, -0.959463f,
+ -0.959572f, -0.959679f, -0.959787f, -0.959895f, -0.960002f, -0.960109f, -0.960217f, -0.960324f,
+ -0.960431f, -0.960537f, -0.960644f, -0.960750f, -0.960857f, -0.960963f, -0.961069f, -0.961175f,
+ -0.961280f, -0.961386f, -0.961492f, -0.961597f, -0.961702f, -0.961807f, -0.961912f, -0.962017f,
+ -0.962121f, -0.962226f, -0.962330f, -0.962434f, -0.962538f, -0.962642f, -0.962746f, -0.962850f,
+ -0.962953f, -0.963057f, -0.963160f, -0.963263f, -0.963366f, -0.963469f, -0.963571f, -0.963674f,
+ -0.963776f, -0.963878f, -0.963980f, -0.964082f, -0.964184f, -0.964286f, -0.964387f, -0.964489f,
+ -0.964590f, -0.964691f, -0.964792f, -0.964893f, -0.964993f, -0.965094f, -0.965194f, -0.965294f,
+ -0.965394f, -0.965494f, -0.965594f, -0.965694f, -0.965793f, -0.965893f, -0.965992f, -0.966091f,
+ -0.966190f, -0.966289f, -0.966387f, -0.966486f, -0.966584f, -0.966683f, -0.966781f, -0.966879f,
+ -0.966976f, -0.967074f, -0.967172f, -0.967269f, -0.967366f, -0.967463f, -0.967560f, -0.967657f,
+ -0.967754f, -0.967850f, -0.967947f, -0.968043f, -0.968139f, -0.968235f, -0.968331f, -0.968427f,
+ -0.968522f, -0.968617f, -0.968713f, -0.968808f, -0.968903f, -0.968998f, -0.969092f, -0.969187f,
+ -0.969281f, -0.969375f, -0.969470f, -0.969564f, -0.969657f, -0.969751f, -0.969845f, -0.969938f,
+ -0.970031f, -0.970124f, -0.970217f, -0.970310f, -0.970403f, -0.970495f, -0.970588f, -0.970680f,
+ -0.970772f, -0.970864f, -0.970956f, -0.971048f, -0.971139f, -0.971231f, -0.971322f, -0.971413f,
+ -0.971504f, -0.971595f, -0.971685f, -0.971776f, -0.971866f, -0.971957f, -0.972047f, -0.972137f,
+ -0.972227f, -0.972316f, -0.972406f, -0.972495f, -0.972584f, -0.972673f, -0.972762f, -0.972851f,
+ -0.972940f, -0.973028f, -0.973117f, -0.973205f, -0.973293f, -0.973381f, -0.973469f, -0.973557f,
+ -0.973644f, -0.973732f, -0.973819f, -0.973906f, -0.973993f, -0.974080f, -0.974166f, -0.974253f,
+ -0.974339f, -0.974426f, -0.974512f, -0.974598f, -0.974684f, -0.974769f, -0.974855f, -0.974940f,
+ -0.975025f, -0.975110f, -0.975195f, -0.975280f, -0.975365f, -0.975449f, -0.975534f, -0.975618f,
+ -0.975702f, -0.975786f, -0.975870f, -0.975954f, -0.976037f, -0.976120f, -0.976204f, -0.976287f,
+ -0.976370f, -0.976453f, -0.976535f, -0.976618f, -0.976700f, -0.976782f, -0.976864f, -0.976946f,
+ -0.977028f, -0.977110f, -0.977191f, -0.977273f, -0.977354f, -0.977435f, -0.977516f, -0.977597f,
+ -0.977677f, -0.977758f, -0.977838f, -0.977918f, -0.977998f, -0.978078f, -0.978158f, -0.978238f,
+ -0.978317f, -0.978397f, -0.978476f, -0.978555f, -0.978634f, -0.978713f, -0.978791f, -0.978870f,
+ -0.978948f, -0.979026f, -0.979104f, -0.979182f, -0.979260f, -0.979338f, -0.979415f, -0.979493f,
+ -0.979570f, -0.979647f, -0.979724f, -0.979800f, -0.979877f, -0.979954f, -0.980030f, -0.980106f,
+ -0.980182f, -0.980258f, -0.980334f, -0.980409f, -0.980485f, -0.980560f, -0.980635f, -0.980710f,
+ -0.980785f, -0.980860f, -0.980935f, -0.981009f, -0.981083f, -0.981158f, -0.981232f, -0.981305f,
+ -0.981379f, -0.981453f, -0.981526f, -0.981600f, -0.981673f, -0.981746f, -0.981819f, -0.981891f,
+ -0.981964f, -0.982036f, -0.982109f, -0.982181f, -0.982253f, -0.982325f, -0.982396f, -0.982468f,
+ -0.982539f, -0.982611f, -0.982682f, -0.982753f, -0.982824f, -0.982894f, -0.982965f, -0.983035f,
+ -0.983105f, -0.983176f, -0.983246f, -0.983315f, -0.983385f, -0.983455f, -0.983524f, -0.983593f,
+ -0.983662f, -0.983731f, -0.983800f, -0.983869f, -0.983937f, -0.984006f, -0.984074f, -0.984142f,
+ -0.984210f, -0.984278f, -0.984346f, -0.984413f, -0.984480f, -0.984548f, -0.984615f, -0.984682f,
+ -0.984748f, -0.984815f, -0.984882f, -0.984948f, -0.985014f, -0.985080f, -0.985146f, -0.985212f,
+ -0.985278f, -0.985343f, -0.985408f, -0.985474f, -0.985539f, -0.985604f, -0.985668f, -0.985733f,
+ -0.985798f, -0.985862f, -0.985926f, -0.985990f, -0.986054f, -0.986118f, -0.986181f, -0.986245f,
+ -0.986308f, -0.986371f, -0.986434f, -0.986497f, -0.986560f, -0.986623f, -0.986685f, -0.986747f,
+ -0.986809f, -0.986871f, -0.986933f, -0.986995f, -0.987057f, -0.987118f, -0.987179f, -0.987240f,
+ -0.987301f, -0.987362f, -0.987423f, -0.987484f, -0.987544f, -0.987604f, -0.987664f, -0.987724f,
+ -0.987784f, -0.987844f, -0.987903f, -0.987963f, -0.988022f, -0.988081f, -0.988140f, -0.988199f,
+ -0.988258f, -0.988316f, -0.988374f, -0.988433f, -0.988491f, -0.988549f, -0.988607f, -0.988664f,
+ -0.988722f, -0.988779f, -0.988836f, -0.988893f, -0.988950f, -0.989007f, -0.989064f, -0.989120f,
+ -0.989177f, -0.989233f, -0.989289f, -0.989345f, -0.989400f, -0.989456f, -0.989511f, -0.989567f,
+ -0.989622f, -0.989677f, -0.989732f, -0.989787f, -0.989841f, -0.989896f, -0.989950f, -0.990004f,
+ -0.990058f, -0.990112f, -0.990166f, -0.990219f, -0.990273f, -0.990326f, -0.990379f, -0.990432f,
+ -0.990485f, -0.990538f, -0.990590f, -0.990643f, -0.990695f, -0.990747f, -0.990799f, -0.990851f,
+ -0.990903f, -0.990954f, -0.991006f, -0.991057f, -0.991108f, -0.991159f, -0.991210f, -0.991260f,
+ -0.991311f, -0.991361f, -0.991411f, -0.991462f, -0.991511f, -0.991561f, -0.991611f, -0.991660f,
+ -0.991710f, -0.991759f, -0.991808f, -0.991857f, -0.991906f, -0.991954f, -0.992003f, -0.992051f,
+ -0.992099f, -0.992147f, -0.992195f, -0.992243f, -0.992291f, -0.992338f, -0.992385f, -0.992433f,
+ -0.992480f, -0.992526f, -0.992573f, -0.992620f, -0.992666f, -0.992712f, -0.992759f, -0.992805f,
+ -0.992850f, -0.992896f, -0.992942f, -0.992987f, -0.993032f, -0.993077f, -0.993122f, -0.993167f,
+ -0.993212f, -0.993257f, -0.993301f, -0.993345f, -0.993389f, -0.993433f, -0.993477f, -0.993521f,
+ -0.993564f, -0.993608f, -0.993651f, -0.993694f, -0.993737f, -0.993779f, -0.993822f, -0.993865f,
+ -0.993907f, -0.993949f, -0.993991f, -0.994033f, -0.994075f, -0.994116f, -0.994158f, -0.994199f,
+ -0.994240f, -0.994281f, -0.994322f, -0.994363f, -0.994404f, -0.994444f, -0.994484f, -0.994525f,
+ -0.994565f, -0.994604f, -0.994644f, -0.994684f, -0.994723f, -0.994762f, -0.994802f, -0.994841f,
+ -0.994879f, -0.994918f, -0.994957f, -0.994995f, -0.995033f, -0.995071f, -0.995109f, -0.995147f,
+ -0.995185f, -0.995222f, -0.995260f, -0.995297f, -0.995334f, -0.995371f, -0.995408f, -0.995444f,
+ -0.995481f, -0.995517f, -0.995553f, -0.995589f, -0.995625f, -0.995661f, -0.995697f, -0.995732f,
+ -0.995767f, -0.995803f, -0.995838f, -0.995872f, -0.995907f, -0.995942f, -0.995976f, -0.996011f,
+ -0.996045f, -0.996079f, -0.996113f, -0.996146f, -0.996180f, -0.996213f, -0.996247f, -0.996280f,
+ -0.996313f, -0.996345f, -0.996378f, -0.996411f, -0.996443f, -0.996475f, -0.996507f, -0.996539f,
+ -0.996571f, -0.996603f, -0.996634f, -0.996666f, -0.996697f, -0.996728f, -0.996759f, -0.996790f,
+ -0.996820f, -0.996851f, -0.996881f, -0.996911f, -0.996941f, -0.996971f, -0.997001f, -0.997031f,
+ -0.997060f, -0.997089f, -0.997119f, -0.997148f, -0.997176f, -0.997205f, -0.997234f, -0.997262f,
+ -0.997290f, -0.997319f, -0.997347f, -0.997374f, -0.997402f, -0.997430f, -0.997457f, -0.997484f,
+ -0.997511f, -0.997538f, -0.997565f, -0.997592f, -0.997618f, -0.997645f, -0.997671f, -0.997697f,
+ -0.997723f, -0.997749f, -0.997774f, -0.997800f, -0.997825f, -0.997851f, -0.997876f, -0.997901f,
+ -0.997925f, -0.997950f, -0.997974f, -0.997999f, -0.998023f, -0.998047f, -0.998071f, -0.998094f,
+ -0.998118f, -0.998142f, -0.998165f, -0.998188f, -0.998211f, -0.998234f, -0.998257f, -0.998279f,
+ -0.998302f, -0.998324f, -0.998346f, -0.998368f, -0.998390f, -0.998411f, -0.998433f, -0.998454f,
+ -0.998476f, -0.998497f, -0.998518f, -0.998538f, -0.998559f, -0.998580f, -0.998600f, -0.998620f,
+ -0.998640f, -0.998660f, -0.998680f, -0.998700f, -0.998719f, -0.998738f, -0.998758f, -0.998777f,
+ -0.998795f, -0.998814f, -0.998833f, -0.998851f, -0.998870f, -0.998888f, -0.998906f, -0.998924f,
+ -0.998941f, -0.998959f, -0.998976f, -0.998994f, -0.999011f, -0.999028f, -0.999044f, -0.999061f,
+ -0.999078f, -0.999094f, -0.999110f, -0.999126f, -0.999142f, -0.999158f, -0.999174f, -0.999189f,
+ -0.999205f, -0.999220f, -0.999235f, -0.999250f, -0.999265f, -0.999279f, -0.999294f, -0.999308f,
+ -0.999322f, -0.999336f, -0.999350f, -0.999364f, -0.999378f, -0.999391f, -0.999404f, -0.999418f,
+ -0.999431f, -0.999443f, -0.999456f, -0.999469f, -0.999481f, -0.999493f, -0.999506f, -0.999518f,
+ -0.999529f, -0.999541f, -0.999553f, -0.999564f, -0.999575f, -0.999586f, -0.999597f, -0.999608f,
+ -0.999619f, -0.999629f, -0.999640f, -0.999650f, -0.999660f, -0.999670f, -0.999680f, -0.999689f,
+ -0.999699f, -0.999708f, -0.999717f, -0.999726f, -0.999735f, -0.999744f, -0.999753f, -0.999761f,
+ -0.999769f, -0.999778f, -0.999786f, -0.999793f, -0.999801f, -0.999809f, -0.999816f, -0.999823f,
+ -0.999831f, -0.999838f, -0.999844f, -0.999851f, -0.999858f, -0.999864f, -0.999870f, -0.999876f,
+ -0.999882f, -0.999888f, -0.999894f, -0.999899f, -0.999905f, -0.999910f, -0.999915f, -0.999920f,
+ -0.999925f, -0.999929f, -0.999934f, -0.999938f, -0.999942f, -0.999946f, -0.999950f, -0.999954f,
+ -0.999958f, -0.999961f, -0.999964f, -0.999968f, -0.999971f, -0.999973f, -0.999976f, -0.999979f,
+ -0.999981f, -0.999983f, -0.999986f, -0.999988f, -0.999989f, -0.999991f, -0.999993f, -0.999994f,
+ -0.999995f, -0.999996f, -0.999997f, -0.999998f, -0.999999f, -0.999999f, -1.000000f, -1.000000
+};
+
+static const float sinTable32768[16384] = {
+ 0.000000f, 0.000192f, 0.000383f, 0.000575f, 0.000767f, 0.000959f, 0.001150f, 0.001342f,
+ 0.001534f, 0.001726f, 0.001917f, 0.002109f, 0.002301f, 0.002493f, 0.002684f, 0.002876f,
+ 0.003068f, 0.003260f, 0.003451f, 0.003643f, 0.003835f, 0.004027f, 0.004218f, 0.004410f,
+ 0.004602f, 0.004794f, 0.004985f, 0.005177f, 0.005369f, 0.005561f, 0.005752f, 0.005944f,
+ 0.006136f, 0.006328f, 0.006519f, 0.006711f, 0.006903f, 0.007095f, 0.007286f, 0.007478f,
+ 0.007670f, 0.007862f, 0.008053f, 0.008245f, 0.008437f, 0.008629f, 0.008820f, 0.009012f,
+ 0.009204f, 0.009395f, 0.009587f, 0.009779f, 0.009971f, 0.010162f, 0.010354f, 0.010546f,
+ 0.010738f, 0.010929f, 0.011121f, 0.011313f, 0.011505f, 0.011696f, 0.011888f, 0.012080f,
+ 0.012272f, 0.012463f, 0.012655f, 0.012847f, 0.013038f, 0.013230f, 0.013422f, 0.013614f,
+ 0.013805f, 0.013997f, 0.014189f, 0.014381f, 0.014572f, 0.014764f, 0.014956f, 0.015147f,
+ 0.015339f, 0.015531f, 0.015723f, 0.015914f, 0.016106f, 0.016298f, 0.016490f, 0.016681f,
+ 0.016873f, 0.017065f, 0.017256f, 0.017448f, 0.017640f, 0.017832f, 0.018023f, 0.018215f,
+ 0.018407f, 0.018598f, 0.018790f, 0.018982f, 0.019174f, 0.019365f, 0.019557f, 0.019749f,
+ 0.019940f, 0.020132f, 0.020324f, 0.020516f, 0.020707f, 0.020899f, 0.021091f, 0.021282f,
+ 0.021474f, 0.021666f, 0.021857f, 0.022049f, 0.022241f, 0.022433f, 0.022624f, 0.022816f,
+ 0.023008f, 0.023199f, 0.023391f, 0.023583f, 0.023774f, 0.023966f, 0.024158f, 0.024350f,
+ 0.024541f, 0.024733f, 0.024925f, 0.025116f, 0.025308f, 0.025500f, 0.025691f, 0.025883f,
+ 0.026075f, 0.026266f, 0.026458f, 0.026650f, 0.026841f, 0.027033f, 0.027225f, 0.027416f,
+ 0.027608f, 0.027800f, 0.027991f, 0.028183f, 0.028375f, 0.028567f, 0.028758f, 0.028950f,
+ 0.029142f, 0.029333f, 0.029525f, 0.029717f, 0.029908f, 0.030100f, 0.030291f, 0.030483f,
+ 0.030675f, 0.030866f, 0.031058f, 0.031250f, 0.031441f, 0.031633f, 0.031825f, 0.032016f,
+ 0.032208f, 0.032400f, 0.032591f, 0.032783f, 0.032975f, 0.033166f, 0.033358f, 0.033550f,
+ 0.033741f, 0.033933f, 0.034124f, 0.034316f, 0.034508f, 0.034699f, 0.034891f, 0.035083f,
+ 0.035274f, 0.035466f, 0.035657f, 0.035849f, 0.036041f, 0.036232f, 0.036424f, 0.036616f,
+ 0.036807f, 0.036999f, 0.037190f, 0.037382f, 0.037574f, 0.037765f, 0.037957f, 0.038149f,
+ 0.038340f, 0.038532f, 0.038723f, 0.038915f, 0.039107f, 0.039298f, 0.039490f, 0.039681f,
+ 0.039873f, 0.040065f, 0.040256f, 0.040448f, 0.040639f, 0.040831f, 0.041022f, 0.041214f,
+ 0.041406f, 0.041597f, 0.041789f, 0.041980f, 0.042172f, 0.042364f, 0.042555f, 0.042747f,
+ 0.042938f, 0.043130f, 0.043321f, 0.043513f, 0.043705f, 0.043896f, 0.044088f, 0.044279f,
+ 0.044471f, 0.044662f, 0.044854f, 0.045045f, 0.045237f, 0.045429f, 0.045620f, 0.045812f,
+ 0.046003f, 0.046195f, 0.046386f, 0.046578f, 0.046769f, 0.046961f, 0.047152f, 0.047344f,
+ 0.047535f, 0.047727f, 0.047919f, 0.048110f, 0.048302f, 0.048493f, 0.048685f, 0.048876f,
+ 0.049068f, 0.049259f, 0.049451f, 0.049642f, 0.049834f, 0.050025f, 0.050217f, 0.050408f,
+ 0.050600f, 0.050791f, 0.050983f, 0.051174f, 0.051366f, 0.051557f, 0.051749f, 0.051940f,
+ 0.052132f, 0.052323f, 0.052515f, 0.052706f, 0.052898f, 0.053089f, 0.053281f, 0.053472f,
+ 0.053664f, 0.053855f, 0.054046f, 0.054238f, 0.054429f, 0.054621f, 0.054812f, 0.055004f,
+ 0.055195f, 0.055387f, 0.055578f, 0.055770f, 0.055961f, 0.056152f, 0.056344f, 0.056535f,
+ 0.056727f, 0.056918f, 0.057110f, 0.057301f, 0.057493f, 0.057684f, 0.057875f, 0.058067f,
+ 0.058258f, 0.058450f, 0.058641f, 0.058833f, 0.059024f, 0.059215f, 0.059407f, 0.059598f,
+ 0.059790f, 0.059981f, 0.060172f, 0.060364f, 0.060555f, 0.060747f, 0.060938f, 0.061129f,
+ 0.061321f, 0.061512f, 0.061704f, 0.061895f, 0.062086f, 0.062278f, 0.062469f, 0.062660f,
+ 0.062852f, 0.063043f, 0.063234f, 0.063426f, 0.063617f, 0.063809f, 0.064000f, 0.064191f,
+ 0.064383f, 0.064574f, 0.064765f, 0.064957f, 0.065148f, 0.065339f, 0.065531f, 0.065722f,
+ 0.065913f, 0.066105f, 0.066296f, 0.066487f, 0.066679f, 0.066870f, 0.067061f, 0.067253f,
+ 0.067444f, 0.067635f, 0.067827f, 0.068018f, 0.068209f, 0.068400f, 0.068592f, 0.068783f,
+ 0.068974f, 0.069166f, 0.069357f, 0.069548f, 0.069739f, 0.069931f, 0.070122f, 0.070313f,
+ 0.070505f, 0.070696f, 0.070887f, 0.071078f, 0.071270f, 0.071461f, 0.071652f, 0.071843f,
+ 0.072035f, 0.072226f, 0.072417f, 0.072608f, 0.072800f, 0.072991f, 0.073182f, 0.073373f,
+ 0.073565f, 0.073756f, 0.073947f, 0.074138f, 0.074329f, 0.074521f, 0.074712f, 0.074903f,
+ 0.075094f, 0.075286f, 0.075477f, 0.075668f, 0.075859f, 0.076050f, 0.076241f, 0.076433f,
+ 0.076624f, 0.076815f, 0.077006f, 0.077197f, 0.077389f, 0.077580f, 0.077771f, 0.077962f,
+ 0.078153f, 0.078344f, 0.078536f, 0.078727f, 0.078918f, 0.079109f, 0.079300f, 0.079491f,
+ 0.079682f, 0.079874f, 0.080065f, 0.080256f, 0.080447f, 0.080638f, 0.080829f, 0.081020f,
+ 0.081211f, 0.081403f, 0.081594f, 0.081785f, 0.081976f, 0.082167f, 0.082358f, 0.082549f,
+ 0.082740f, 0.082931f, 0.083122f, 0.083314f, 0.083505f, 0.083696f, 0.083887f, 0.084078f,
+ 0.084269f, 0.084460f, 0.084651f, 0.084842f, 0.085033f, 0.085224f, 0.085415f, 0.085606f,
+ 0.085797f, 0.085988f, 0.086179f, 0.086370f, 0.086561f, 0.086752f, 0.086943f, 0.087135f,
+ 0.087326f, 0.087517f, 0.087708f, 0.087899f, 0.088090f, 0.088281f, 0.088472f, 0.088663f,
+ 0.088854f, 0.089045f, 0.089236f, 0.089427f, 0.089617f, 0.089808f, 0.089999f, 0.090190f,
+ 0.090381f, 0.090572f, 0.090763f, 0.090954f, 0.091145f, 0.091336f, 0.091527f, 0.091718f,
+ 0.091909f, 0.092100f, 0.092291f, 0.092482f, 0.092673f, 0.092864f, 0.093055f, 0.093245f,
+ 0.093436f, 0.093627f, 0.093818f, 0.094009f, 0.094200f, 0.094391f, 0.094582f, 0.094773f,
+ 0.094963f, 0.095154f, 0.095345f, 0.095536f, 0.095727f, 0.095918f, 0.096109f, 0.096300f,
+ 0.096490f, 0.096681f, 0.096872f, 0.097063f, 0.097254f, 0.097445f, 0.097635f, 0.097826f,
+ 0.098017f, 0.098208f, 0.098399f, 0.098590f, 0.098780f, 0.098971f, 0.099162f, 0.099353f,
+ 0.099544f, 0.099734f, 0.099925f, 0.100116f, 0.100307f, 0.100498f, 0.100688f, 0.100879f,
+ 0.101070f, 0.101261f, 0.101451f, 0.101642f, 0.101833f, 0.102024f, 0.102214f, 0.102405f,
+ 0.102596f, 0.102787f, 0.102977f, 0.103168f, 0.103359f, 0.103550f, 0.103740f, 0.103931f,
+ 0.104122f, 0.104312f, 0.104503f, 0.104694f, 0.104884f, 0.105075f, 0.105266f, 0.105456f,
+ 0.105647f, 0.105838f, 0.106028f, 0.106219f, 0.106410f, 0.106600f, 0.106791f, 0.106982f,
+ 0.107172f, 0.107363f, 0.107554f, 0.107744f, 0.107935f, 0.108126f, 0.108316f, 0.108507f,
+ 0.108697f, 0.108888f, 0.109079f, 0.109269f, 0.109460f, 0.109650f, 0.109841f, 0.110032f,
+ 0.110222f, 0.110413f, 0.110603f, 0.110794f, 0.110984f, 0.111175f, 0.111366f, 0.111556f,
+ 0.111747f, 0.111937f, 0.112128f, 0.112318f, 0.112509f, 0.112699f, 0.112890f, 0.113080f,
+ 0.113271f, 0.113461f, 0.113652f, 0.113842f, 0.114033f, 0.114223f, 0.114414f, 0.114604f,
+ 0.114795f, 0.114985f, 0.115176f, 0.115366f, 0.115557f, 0.115747f, 0.115938f, 0.116128f,
+ 0.116319f, 0.116509f, 0.116700f, 0.116890f, 0.117080f, 0.117271f, 0.117461f, 0.117652f,
+ 0.117842f, 0.118032f, 0.118223f, 0.118413f, 0.118604f, 0.118794f, 0.118984f, 0.119175f,
+ 0.119365f, 0.119556f, 0.119746f, 0.119936f, 0.120127f, 0.120317f, 0.120507f, 0.120698f,
+ 0.120888f, 0.121078f, 0.121269f, 0.121459f, 0.121649f, 0.121840f, 0.122030f, 0.122220f,
+ 0.122411f, 0.122601f, 0.122791f, 0.122982f, 0.123172f, 0.123362f, 0.123552f, 0.123743f,
+ 0.123933f, 0.124123f, 0.124314f, 0.124504f, 0.124694f, 0.124884f, 0.125075f, 0.125265f,
+ 0.125455f, 0.125645f, 0.125835f, 0.126026f, 0.126216f, 0.126406f, 0.126596f, 0.126787f,
+ 0.126977f, 0.127167f, 0.127357f, 0.127547f, 0.127737f, 0.127928f, 0.128118f, 0.128308f,
+ 0.128498f, 0.128688f, 0.128878f, 0.129069f, 0.129259f, 0.129449f, 0.129639f, 0.129829f,
+ 0.130019f, 0.130209f, 0.130399f, 0.130590f, 0.130780f, 0.130970f, 0.131160f, 0.131350f,
+ 0.131540f, 0.131730f, 0.131920f, 0.132110f, 0.132300f, 0.132490f, 0.132680f, 0.132870f,
+ 0.133061f, 0.133251f, 0.133441f, 0.133631f, 0.133821f, 0.134011f, 0.134201f, 0.134391f,
+ 0.134581f, 0.134771f, 0.134961f, 0.135151f, 0.135341f, 0.135531f, 0.135721f, 0.135911f,
+ 0.136101f, 0.136291f, 0.136480f, 0.136670f, 0.136860f, 0.137050f, 0.137240f, 0.137430f,
+ 0.137620f, 0.137810f, 0.138000f, 0.138190f, 0.138380f, 0.138570f, 0.138760f, 0.138949f,
+ 0.139139f, 0.139329f, 0.139519f, 0.139709f, 0.139899f, 0.140089f, 0.140279f, 0.140468f,
+ 0.140658f, 0.140848f, 0.141038f, 0.141228f, 0.141418f, 0.141607f, 0.141797f, 0.141987f,
+ 0.142177f, 0.142367f, 0.142556f, 0.142746f, 0.142936f, 0.143126f, 0.143316f, 0.143505f,
+ 0.143695f, 0.143885f, 0.144075f, 0.144264f, 0.144454f, 0.144644f, 0.144833f, 0.145023f,
+ 0.145213f, 0.145403f, 0.145592f, 0.145782f, 0.145972f, 0.146161f, 0.146351f, 0.146541f,
+ 0.146730f, 0.146920f, 0.147110f, 0.147299f, 0.147489f, 0.147679f, 0.147868f, 0.148058f,
+ 0.148248f, 0.148437f, 0.148627f, 0.148817f, 0.149006f, 0.149196f, 0.149385f, 0.149575f,
+ 0.149765f, 0.149954f, 0.150144f, 0.150333f, 0.150523f, 0.150712f, 0.150902f, 0.151092f,
+ 0.151281f, 0.151471f, 0.151660f, 0.151850f, 0.152039f, 0.152229f, 0.152418f, 0.152608f,
+ 0.152797f, 0.152987f, 0.153176f, 0.153366f, 0.153555f, 0.153745f, 0.153934f, 0.154124f,
+ 0.154313f, 0.154502f, 0.154692f, 0.154881f, 0.155071f, 0.155260f, 0.155450f, 0.155639f,
+ 0.155828f, 0.156018f, 0.156207f, 0.156397f, 0.156586f, 0.156775f, 0.156965f, 0.157154f,
+ 0.157343f, 0.157533f, 0.157722f, 0.157912f, 0.158101f, 0.158290f, 0.158480f, 0.158669f,
+ 0.158858f, 0.159047f, 0.159237f, 0.159426f, 0.159615f, 0.159805f, 0.159994f, 0.160183f,
+ 0.160372f, 0.160562f, 0.160751f, 0.160940f, 0.161129f, 0.161319f, 0.161508f, 0.161697f,
+ 0.161886f, 0.162076f, 0.162265f, 0.162454f, 0.162643f, 0.162832f, 0.163022f, 0.163211f,
+ 0.163400f, 0.163589f, 0.163778f, 0.163967f, 0.164157f, 0.164346f, 0.164535f, 0.164724f,
+ 0.164913f, 0.165102f, 0.165291f, 0.165480f, 0.165670f, 0.165859f, 0.166048f, 0.166237f,
+ 0.166426f, 0.166615f, 0.166804f, 0.166993f, 0.167182f, 0.167371f, 0.167560f, 0.167749f,
+ 0.167938f, 0.168127f, 0.168316f, 0.168505f, 0.168694f, 0.168883f, 0.169072f, 0.169261f,
+ 0.169450f, 0.169639f, 0.169828f, 0.170017f, 0.170206f, 0.170395f, 0.170584f, 0.170773f,
+ 0.170962f, 0.171151f, 0.171340f, 0.171529f, 0.171718f, 0.171906f, 0.172095f, 0.172284f,
+ 0.172473f, 0.172662f, 0.172851f, 0.173040f, 0.173229f, 0.173417f, 0.173606f, 0.173795f,
+ 0.173984f, 0.174173f, 0.174362f, 0.174550f, 0.174739f, 0.174928f, 0.175117f, 0.175305f,
+ 0.175494f, 0.175683f, 0.175872f, 0.176061f, 0.176249f, 0.176438f, 0.176627f, 0.176815f,
+ 0.177004f, 0.177193f, 0.177382f, 0.177570f, 0.177759f, 0.177948f, 0.178136f, 0.178325f,
+ 0.178514f, 0.178702f, 0.178891f, 0.179080f, 0.179268f, 0.179457f, 0.179646f, 0.179834f,
+ 0.180023f, 0.180212f, 0.180400f, 0.180589f, 0.180777f, 0.180966f, 0.181154f, 0.181343f,
+ 0.181532f, 0.181720f, 0.181909f, 0.182097f, 0.182286f, 0.182474f, 0.182663f, 0.182851f,
+ 0.183040f, 0.183228f, 0.183417f, 0.183605f, 0.183794f, 0.183982f, 0.184171f, 0.184359f,
+ 0.184548f, 0.184736f, 0.184925f, 0.185113f, 0.185301f, 0.185490f, 0.185678f, 0.185867f,
+ 0.186055f, 0.186244f, 0.186432f, 0.186620f, 0.186809f, 0.186997f, 0.187185f, 0.187374f,
+ 0.187562f, 0.187750f, 0.187939f, 0.188127f, 0.188315f, 0.188504f, 0.188692f, 0.188880f,
+ 0.189069f, 0.189257f, 0.189445f, 0.189634f, 0.189822f, 0.190010f, 0.190198f, 0.190387f,
+ 0.190575f, 0.190763f, 0.190951f, 0.191139f, 0.191328f, 0.191516f, 0.191704f, 0.191892f,
+ 0.192080f, 0.192269f, 0.192457f, 0.192645f, 0.192833f, 0.193021f, 0.193209f, 0.193397f,
+ 0.193586f, 0.193774f, 0.193962f, 0.194150f, 0.194338f, 0.194526f, 0.194714f, 0.194902f,
+ 0.195090f, 0.195278f, 0.195466f, 0.195654f, 0.195843f, 0.196031f, 0.196219f, 0.196407f,
+ 0.196595f, 0.196783f, 0.196971f, 0.197159f, 0.197347f, 0.197535f, 0.197722f, 0.197910f,
+ 0.198098f, 0.198286f, 0.198474f, 0.198662f, 0.198850f, 0.199038f, 0.199226f, 0.199414f,
+ 0.199602f, 0.199790f, 0.199978f, 0.200165f, 0.200353f, 0.200541f, 0.200729f, 0.200917f,
+ 0.201105f, 0.201292f, 0.201480f, 0.201668f, 0.201856f, 0.202044f, 0.202231f, 0.202419f,
+ 0.202607f, 0.202795f, 0.202983f, 0.203170f, 0.203358f, 0.203546f, 0.203734f, 0.203921f,
+ 0.204109f, 0.204297f, 0.204484f, 0.204672f, 0.204860f, 0.205047f, 0.205235f, 0.205423f,
+ 0.205610f, 0.205798f, 0.205986f, 0.206173f, 0.206361f, 0.206549f, 0.206736f, 0.206924f,
+ 0.207111f, 0.207299f, 0.207487f, 0.207674f, 0.207862f, 0.208049f, 0.208237f, 0.208424f,
+ 0.208612f, 0.208799f, 0.208987f, 0.209174f, 0.209362f, 0.209549f, 0.209737f, 0.209924f,
+ 0.210112f, 0.210299f, 0.210487f, 0.210674f, 0.210862f, 0.211049f, 0.211237f, 0.211424f,
+ 0.211611f, 0.211799f, 0.211986f, 0.212174f, 0.212361f, 0.212548f, 0.212736f, 0.212923f,
+ 0.213110f, 0.213298f, 0.213485f, 0.213672f, 0.213860f, 0.214047f, 0.214234f, 0.214422f,
+ 0.214609f, 0.214796f, 0.214983f, 0.215171f, 0.215358f, 0.215545f, 0.215732f, 0.215920f,
+ 0.216107f, 0.216294f, 0.216481f, 0.216668f, 0.216856f, 0.217043f, 0.217230f, 0.217417f,
+ 0.217604f, 0.217791f, 0.217979f, 0.218166f, 0.218353f, 0.218540f, 0.218727f, 0.218914f,
+ 0.219101f, 0.219288f, 0.219475f, 0.219662f, 0.219850f, 0.220037f, 0.220224f, 0.220411f,
+ 0.220598f, 0.220785f, 0.220972f, 0.221159f, 0.221346f, 0.221533f, 0.221720f, 0.221907f,
+ 0.222094f, 0.222281f, 0.222468f, 0.222654f, 0.222841f, 0.223028f, 0.223215f, 0.223402f,
+ 0.223589f, 0.223776f, 0.223963f, 0.224150f, 0.224337f, 0.224523f, 0.224710f, 0.224897f,
+ 0.225084f, 0.225271f, 0.225458f, 0.225644f, 0.225831f, 0.226018f, 0.226205f, 0.226391f,
+ 0.226578f, 0.226765f, 0.226952f, 0.227139f, 0.227325f, 0.227512f, 0.227699f, 0.227885f,
+ 0.228072f, 0.228259f, 0.228445f, 0.228632f, 0.228819f, 0.229005f, 0.229192f, 0.229379f,
+ 0.229565f, 0.229752f, 0.229939f, 0.230125f, 0.230312f, 0.230498f, 0.230685f, 0.230872f,
+ 0.231058f, 0.231245f, 0.231431f, 0.231618f, 0.231804f, 0.231991f, 0.232177f, 0.232364f,
+ 0.232550f, 0.232737f, 0.232923f, 0.233110f, 0.233296f, 0.233483f, 0.233669f, 0.233856f,
+ 0.234042f, 0.234228f, 0.234415f, 0.234601f, 0.234788f, 0.234974f, 0.235160f, 0.235347f,
+ 0.235533f, 0.235719f, 0.235906f, 0.236092f, 0.236278f, 0.236465f, 0.236651f, 0.236837f,
+ 0.237024f, 0.237210f, 0.237396f, 0.237582f, 0.237769f, 0.237955f, 0.238141f, 0.238327f,
+ 0.238514f, 0.238700f, 0.238886f, 0.239072f, 0.239258f, 0.239445f, 0.239631f, 0.239817f,
+ 0.240003f, 0.240189f, 0.240375f, 0.240561f, 0.240748f, 0.240934f, 0.241120f, 0.241306f,
+ 0.241492f, 0.241678f, 0.241864f, 0.242050f, 0.242236f, 0.242422f, 0.242608f, 0.242794f,
+ 0.242980f, 0.243166f, 0.243352f, 0.243538f, 0.243724f, 0.243910f, 0.244096f, 0.244282f,
+ 0.244468f, 0.244654f, 0.244840f, 0.245026f, 0.245212f, 0.245397f, 0.245583f, 0.245769f,
+ 0.245955f, 0.246141f, 0.246327f, 0.246513f, 0.246698f, 0.246884f, 0.247070f, 0.247256f,
+ 0.247442f, 0.247627f, 0.247813f, 0.247999f, 0.248185f, 0.248370f, 0.248556f, 0.248742f,
+ 0.248928f, 0.249113f, 0.249299f, 0.249485f, 0.249670f, 0.249856f, 0.250042f, 0.250227f,
+ 0.250413f, 0.250599f, 0.250784f, 0.250970f, 0.251155f, 0.251341f, 0.251527f, 0.251712f,
+ 0.251898f, 0.252083f, 0.252269f, 0.252454f, 0.252640f, 0.252826f, 0.253011f, 0.253197f,
+ 0.253382f, 0.253568f, 0.253753f, 0.253938f, 0.254124f, 0.254309f, 0.254495f, 0.254680f,
+ 0.254866f, 0.255051f, 0.255236f, 0.255422f, 0.255607f, 0.255793f, 0.255978f, 0.256163f,
+ 0.256349f, 0.256534f, 0.256719f, 0.256905f, 0.257090f, 0.257275f, 0.257461f, 0.257646f,
+ 0.257831f, 0.258016f, 0.258202f, 0.258387f, 0.258572f, 0.258757f, 0.258943f, 0.259128f,
+ 0.259313f, 0.259498f, 0.259683f, 0.259868f, 0.260054f, 0.260239f, 0.260424f, 0.260609f,
+ 0.260794f, 0.260979f, 0.261164f, 0.261349f, 0.261534f, 0.261720f, 0.261905f, 0.262090f,
+ 0.262275f, 0.262460f, 0.262645f, 0.262830f, 0.263015f, 0.263200f, 0.263385f, 0.263570f,
+ 0.263755f, 0.263940f, 0.264125f, 0.264309f, 0.264494f, 0.264679f, 0.264864f, 0.265049f,
+ 0.265234f, 0.265419f, 0.265604f, 0.265789f, 0.265973f, 0.266158f, 0.266343f, 0.266528f,
+ 0.266713f, 0.266898f, 0.267082f, 0.267267f, 0.267452f, 0.267637f, 0.267821f, 0.268006f,
+ 0.268191f, 0.268376f, 0.268560f, 0.268745f, 0.268930f, 0.269114f, 0.269299f, 0.269484f,
+ 0.269668f, 0.269853f, 0.270038f, 0.270222f, 0.270407f, 0.270591f, 0.270776f, 0.270961f,
+ 0.271145f, 0.271330f, 0.271514f, 0.271699f, 0.271883f, 0.272068f, 0.272252f, 0.272437f,
+ 0.272621f, 0.272806f, 0.272990f, 0.273175f, 0.273359f, 0.273544f, 0.273728f, 0.273912f,
+ 0.274097f, 0.274281f, 0.274466f, 0.274650f, 0.274834f, 0.275019f, 0.275203f, 0.275387f,
+ 0.275572f, 0.275756f, 0.275940f, 0.276125f, 0.276309f, 0.276493f, 0.276678f, 0.276862f,
+ 0.277046f, 0.277230f, 0.277415f, 0.277599f, 0.277783f, 0.277967f, 0.278151f, 0.278336f,
+ 0.278520f, 0.278704f, 0.278888f, 0.279072f, 0.279256f, 0.279440f, 0.279624f, 0.279809f,
+ 0.279993f, 0.280177f, 0.280361f, 0.280545f, 0.280729f, 0.280913f, 0.281097f, 0.281281f,
+ 0.281465f, 0.281649f, 0.281833f, 0.282017f, 0.282201f, 0.282385f, 0.282569f, 0.282753f,
+ 0.282937f, 0.283120f, 0.283304f, 0.283488f, 0.283672f, 0.283856f, 0.284040f, 0.284224f,
+ 0.284408f, 0.284591f, 0.284775f, 0.284959f, 0.285143f, 0.285327f, 0.285510f, 0.285694f,
+ 0.285878f, 0.286062f, 0.286245f, 0.286429f, 0.286613f, 0.286796f, 0.286980f, 0.287164f,
+ 0.287347f, 0.287531f, 0.287715f, 0.287898f, 0.288082f, 0.288266f, 0.288449f, 0.288633f,
+ 0.288816f, 0.289000f, 0.289184f, 0.289367f, 0.289551f, 0.289734f, 0.289918f, 0.290101f,
+ 0.290285f, 0.290468f, 0.290652f, 0.290835f, 0.291019f, 0.291202f, 0.291385f, 0.291569f,
+ 0.291752f, 0.291936f, 0.292119f, 0.292302f, 0.292486f, 0.292669f, 0.292852f, 0.293036f,
+ 0.293219f, 0.293402f, 0.293586f, 0.293769f, 0.293952f, 0.294136f, 0.294319f, 0.294502f,
+ 0.294685f, 0.294869f, 0.295052f, 0.295235f, 0.295418f, 0.295601f, 0.295785f, 0.295968f,
+ 0.296151f, 0.296334f, 0.296517f, 0.296700f, 0.296883f, 0.297066f, 0.297250f, 0.297433f,
+ 0.297616f, 0.297799f, 0.297982f, 0.298165f, 0.298348f, 0.298531f, 0.298714f, 0.298897f,
+ 0.299080f, 0.299263f, 0.299446f, 0.299629f, 0.299812f, 0.299995f, 0.300177f, 0.300360f,
+ 0.300543f, 0.300726f, 0.300909f, 0.301092f, 0.301275f, 0.301458f, 0.301640f, 0.301823f,
+ 0.302006f, 0.302189f, 0.302372f, 0.302554f, 0.302737f, 0.302920f, 0.303103f, 0.303285f,
+ 0.303468f, 0.303651f, 0.303833f, 0.304016f, 0.304199f, 0.304381f, 0.304564f, 0.304747f,
+ 0.304929f, 0.305112f, 0.305294f, 0.305477f, 0.305660f, 0.305842f, 0.306025f, 0.306207f,
+ 0.306390f, 0.306572f, 0.306755f, 0.306937f, 0.307120f, 0.307302f, 0.307485f, 0.307667f,
+ 0.307850f, 0.308032f, 0.308214f, 0.308397f, 0.308579f, 0.308762f, 0.308944f, 0.309126f,
+ 0.309309f, 0.309491f, 0.309673f, 0.309856f, 0.310038f, 0.310220f, 0.310403f, 0.310585f,
+ 0.310767f, 0.310949f, 0.311132f, 0.311314f, 0.311496f, 0.311678f, 0.311860f, 0.312043f,
+ 0.312225f, 0.312407f, 0.312589f, 0.312771f, 0.312953f, 0.313135f, 0.313318f, 0.313500f,
+ 0.313682f, 0.313864f, 0.314046f, 0.314228f, 0.314410f, 0.314592f, 0.314774f, 0.314956f,
+ 0.315138f, 0.315320f, 0.315502f, 0.315684f, 0.315866f, 0.316048f, 0.316230f, 0.316411f,
+ 0.316593f, 0.316775f, 0.316957f, 0.317139f, 0.317321f, 0.317503f, 0.317684f, 0.317866f,
+ 0.318048f, 0.318230f, 0.318412f, 0.318593f, 0.318775f, 0.318957f, 0.319139f, 0.319320f,
+ 0.319502f, 0.319684f, 0.319865f, 0.320047f, 0.320229f, 0.320410f, 0.320592f, 0.320774f,
+ 0.320955f, 0.321137f, 0.321318f, 0.321500f, 0.321682f, 0.321863f, 0.322045f, 0.322226f,
+ 0.322408f, 0.322589f, 0.322771f, 0.322952f, 0.323134f, 0.323315f, 0.323497f, 0.323678f,
+ 0.323859f, 0.324041f, 0.324222f, 0.324404f, 0.324585f, 0.324766f, 0.324948f, 0.325129f,
+ 0.325310f, 0.325492f, 0.325673f, 0.325854f, 0.326035f, 0.326217f, 0.326398f, 0.326579f,
+ 0.326760f, 0.326942f, 0.327123f, 0.327304f, 0.327485f, 0.327666f, 0.327848f, 0.328029f,
+ 0.328210f, 0.328391f, 0.328572f, 0.328753f, 0.328934f, 0.329115f, 0.329296f, 0.329477f,
+ 0.329658f, 0.329839f, 0.330020f, 0.330202f, 0.330382f, 0.330563f, 0.330744f, 0.330925f,
+ 0.331106f, 0.331287f, 0.331468f, 0.331649f, 0.331830f, 0.332011f, 0.332192f, 0.332373f,
+ 0.332553f, 0.332734f, 0.332915f, 0.333096f, 0.333277f, 0.333457f, 0.333638f, 0.333819f,
+ 0.334000f, 0.334180f, 0.334361f, 0.334542f, 0.334722f, 0.334903f, 0.335084f, 0.335265f,
+ 0.335445f, 0.335626f, 0.335806f, 0.335987f, 0.336168f, 0.336348f, 0.336529f, 0.336709f,
+ 0.336890f, 0.337070f, 0.337251f, 0.337431f, 0.337612f, 0.337792f, 0.337973f, 0.338153f,
+ 0.338334f, 0.338514f, 0.338695f, 0.338875f, 0.339055f, 0.339236f, 0.339416f, 0.339597f,
+ 0.339777f, 0.339957f, 0.340138f, 0.340318f, 0.340498f, 0.340678f, 0.340859f, 0.341039f,
+ 0.341219f, 0.341399f, 0.341580f, 0.341760f, 0.341940f, 0.342120f, 0.342300f, 0.342481f,
+ 0.342661f, 0.342841f, 0.343021f, 0.343201f, 0.343381f, 0.343561f, 0.343741f, 0.343921f,
+ 0.344101f, 0.344281f, 0.344461f, 0.344641f, 0.344821f, 0.345001f, 0.345181f, 0.345361f,
+ 0.345541f, 0.345721f, 0.345901f, 0.346081f, 0.346261f, 0.346441f, 0.346621f, 0.346801f,
+ 0.346980f, 0.347160f, 0.347340f, 0.347520f, 0.347700f, 0.347879f, 0.348059f, 0.348239f,
+ 0.348419f, 0.348598f, 0.348778f, 0.348958f, 0.349138f, 0.349317f, 0.349497f, 0.349676f,
+ 0.349856f, 0.350036f, 0.350215f, 0.350395f, 0.350575f, 0.350754f, 0.350934f, 0.351113f,
+ 0.351293f, 0.351472f, 0.351652f, 0.351831f, 0.352011f, 0.352190f, 0.352370f, 0.352549f,
+ 0.352729f, 0.352908f, 0.353087f, 0.353267f, 0.353446f, 0.353626f, 0.353805f, 0.353984f,
+ 0.354164f, 0.354343f, 0.354522f, 0.354701f, 0.354881f, 0.355060f, 0.355239f, 0.355418f,
+ 0.355598f, 0.355777f, 0.355956f, 0.356135f, 0.356314f, 0.356494f, 0.356673f, 0.356852f,
+ 0.357031f, 0.357210f, 0.357389f, 0.357568f, 0.357747f, 0.357926f, 0.358105f, 0.358284f,
+ 0.358463f, 0.358642f, 0.358821f, 0.359000f, 0.359179f, 0.359358f, 0.359537f, 0.359716f,
+ 0.359895f, 0.360074f, 0.360253f, 0.360432f, 0.360611f, 0.360789f, 0.360968f, 0.361147f,
+ 0.361326f, 0.361505f, 0.361683f, 0.361862f, 0.362041f, 0.362220f, 0.362398f, 0.362577f,
+ 0.362756f, 0.362934f, 0.363113f, 0.363292f, 0.363470f, 0.363649f, 0.363828f, 0.364006f,
+ 0.364185f, 0.364363f, 0.364542f, 0.364720f, 0.364899f, 0.365078f, 0.365256f, 0.365435f,
+ 0.365613f, 0.365791f, 0.365970f, 0.366148f, 0.366327f, 0.366505f, 0.366684f, 0.366862f,
+ 0.367040f, 0.367219f, 0.367397f, 0.367575f, 0.367754f, 0.367932f, 0.368110f, 0.368289f,
+ 0.368467f, 0.368645f, 0.368823f, 0.369002f, 0.369180f, 0.369358f, 0.369536f, 0.369714f,
+ 0.369892f, 0.370071f, 0.370249f, 0.370427f, 0.370605f, 0.370783f, 0.370961f, 0.371139f,
+ 0.371317f, 0.371495f, 0.371673f, 0.371851f, 0.372029f, 0.372207f, 0.372385f, 0.372563f,
+ 0.372741f, 0.372919f, 0.373097f, 0.373275f, 0.373453f, 0.373631f, 0.373808f, 0.373986f,
+ 0.374164f, 0.374342f, 0.374520f, 0.374697f, 0.374875f, 0.375053f, 0.375231f, 0.375408f,
+ 0.375586f, 0.375764f, 0.375942f, 0.376119f, 0.376297f, 0.376475f, 0.376652f, 0.376830f,
+ 0.377007f, 0.377185f, 0.377363f, 0.377540f, 0.377718f, 0.377895f, 0.378073f, 0.378250f,
+ 0.378428f, 0.378605f, 0.378783f, 0.378960f, 0.379138f, 0.379315f, 0.379492f, 0.379670f,
+ 0.379847f, 0.380025f, 0.380202f, 0.380379f, 0.380557f, 0.380734f, 0.380911f, 0.381088f,
+ 0.381266f, 0.381443f, 0.381620f, 0.381797f, 0.381975f, 0.382152f, 0.382329f, 0.382506f,
+ 0.382683f, 0.382861f, 0.383038f, 0.383215f, 0.383392f, 0.383569f, 0.383746f, 0.383923f,
+ 0.384100f, 0.384277f, 0.384454f, 0.384631f, 0.384808f, 0.384985f, 0.385162f, 0.385339f,
+ 0.385516f, 0.385693f, 0.385870f, 0.386047f, 0.386224f, 0.386400f, 0.386577f, 0.386754f,
+ 0.386931f, 0.387108f, 0.387285f, 0.387461f, 0.387638f, 0.387815f, 0.387992f, 0.388168f,
+ 0.388345f, 0.388522f, 0.388698f, 0.388875f, 0.389052f, 0.389228f, 0.389405f, 0.389582f,
+ 0.389758f, 0.389935f, 0.390111f, 0.390288f, 0.390464f, 0.390641f, 0.390817f, 0.390994f,
+ 0.391170f, 0.391347f, 0.391523f, 0.391700f, 0.391876f, 0.392053f, 0.392229f, 0.392405f,
+ 0.392582f, 0.392758f, 0.392934f, 0.393111f, 0.393287f, 0.393463f, 0.393640f, 0.393816f,
+ 0.393992f, 0.394168f, 0.394344f, 0.394521f, 0.394697f, 0.394873f, 0.395049f, 0.395225f,
+ 0.395401f, 0.395578f, 0.395754f, 0.395930f, 0.396106f, 0.396282f, 0.396458f, 0.396634f,
+ 0.396810f, 0.396986f, 0.397162f, 0.397338f, 0.397514f, 0.397690f, 0.397866f, 0.398042f,
+ 0.398218f, 0.398393f, 0.398569f, 0.398745f, 0.398921f, 0.399097f, 0.399273f, 0.399448f,
+ 0.399624f, 0.399800f, 0.399976f, 0.400151f, 0.400327f, 0.400503f, 0.400679f, 0.400854f,
+ 0.401030f, 0.401206f, 0.401381f, 0.401557f, 0.401732f, 0.401908f, 0.402084f, 0.402259f,
+ 0.402435f, 0.402610f, 0.402786f, 0.402961f, 0.403137f, 0.403312f, 0.403488f, 0.403663f,
+ 0.403838f, 0.404014f, 0.404189f, 0.404365f, 0.404540f, 0.404715f, 0.404891f, 0.405066f,
+ 0.405241f, 0.405417f, 0.405592f, 0.405767f, 0.405942f, 0.406118f, 0.406293f, 0.406468f,
+ 0.406643f, 0.406818f, 0.406994f, 0.407169f, 0.407344f, 0.407519f, 0.407694f, 0.407869f,
+ 0.408044f, 0.408219f, 0.408394f, 0.408569f, 0.408744f, 0.408919f, 0.409094f, 0.409269f,
+ 0.409444f, 0.409619f, 0.409794f, 0.409969f, 0.410144f, 0.410319f, 0.410493f, 0.410668f,
+ 0.410843f, 0.411018f, 0.411193f, 0.411368f, 0.411542f, 0.411717f, 0.411892f, 0.412067f,
+ 0.412241f, 0.412416f, 0.412591f, 0.412765f, 0.412940f, 0.413115f, 0.413289f, 0.413464f,
+ 0.413638f, 0.413813f, 0.413987f, 0.414162f, 0.414337f, 0.414511f, 0.414685f, 0.414860f,
+ 0.415034f, 0.415209f, 0.415383f, 0.415558f, 0.415732f, 0.415906f, 0.416081f, 0.416255f,
+ 0.416430f, 0.416604f, 0.416778f, 0.416952f, 0.417127f, 0.417301f, 0.417475f, 0.417650f,
+ 0.417824f, 0.417998f, 0.418172f, 0.418346f, 0.418520f, 0.418695f, 0.418869f, 0.419043f,
+ 0.419217f, 0.419391f, 0.419565f, 0.419739f, 0.419913f, 0.420087f, 0.420261f, 0.420435f,
+ 0.420609f, 0.420783f, 0.420957f, 0.421131f, 0.421305f, 0.421479f, 0.421653f, 0.421826f,
+ 0.422000f, 0.422174f, 0.422348f, 0.422522f, 0.422695f, 0.422869f, 0.423043f, 0.423217f,
+ 0.423390f, 0.423564f, 0.423738f, 0.423912f, 0.424085f, 0.424259f, 0.424432f, 0.424606f,
+ 0.424780f, 0.424953f, 0.425127f, 0.425300f, 0.425474f, 0.425647f, 0.425821f, 0.425994f,
+ 0.426168f, 0.426341f, 0.426515f, 0.426688f, 0.426862f, 0.427035f, 0.427208f, 0.427382f,
+ 0.427555f, 0.427728f, 0.427902f, 0.428075f, 0.428248f, 0.428422f, 0.428595f, 0.428768f,
+ 0.428941f, 0.429114f, 0.429288f, 0.429461f, 0.429634f, 0.429807f, 0.429980f, 0.430153f,
+ 0.430326f, 0.430500f, 0.430673f, 0.430846f, 0.431019f, 0.431192f, 0.431365f, 0.431538f,
+ 0.431711f, 0.431884f, 0.432057f, 0.432229f, 0.432402f, 0.432575f, 0.432748f, 0.432921f,
+ 0.433094f, 0.433267f, 0.433439f, 0.433612f, 0.433785f, 0.433958f, 0.434131f, 0.434303f,
+ 0.434476f, 0.434649f, 0.434821f, 0.434994f, 0.435167f, 0.435339f, 0.435512f, 0.435685f,
+ 0.435857f, 0.436030f, 0.436202f, 0.436375f, 0.436547f, 0.436720f, 0.436892f, 0.437065f,
+ 0.437237f, 0.437410f, 0.437582f, 0.437754f, 0.437927f, 0.438099f, 0.438272f, 0.438444f,
+ 0.438616f, 0.438789f, 0.438961f, 0.439133f, 0.439305f, 0.439478f, 0.439650f, 0.439822f,
+ 0.439994f, 0.440166f, 0.440339f, 0.440511f, 0.440683f, 0.440855f, 0.441027f, 0.441199f,
+ 0.441371f, 0.441543f, 0.441715f, 0.441887f, 0.442059f, 0.442231f, 0.442403f, 0.442575f,
+ 0.442747f, 0.442919f, 0.443091f, 0.443263f, 0.443435f, 0.443607f, 0.443779f, 0.443950f,
+ 0.444122f, 0.444294f, 0.444466f, 0.444637f, 0.444809f, 0.444981f, 0.445153f, 0.445324f,
+ 0.445496f, 0.445668f, 0.445839f, 0.446011f, 0.446183f, 0.446354f, 0.446526f, 0.446697f,
+ 0.446869f, 0.447040f, 0.447212f, 0.447383f, 0.447555f, 0.447726f, 0.447898f, 0.448069f,
+ 0.448241f, 0.448412f, 0.448583f, 0.448755f, 0.448926f, 0.449097f, 0.449269f, 0.449440f,
+ 0.449611f, 0.449783f, 0.449954f, 0.450125f, 0.450296f, 0.450467f, 0.450639f, 0.450810f,
+ 0.450981f, 0.451152f, 0.451323f, 0.451494f, 0.451665f, 0.451836f, 0.452008f, 0.452179f,
+ 0.452350f, 0.452521f, 0.452692f, 0.452863f, 0.453033f, 0.453204f, 0.453375f, 0.453546f,
+ 0.453717f, 0.453888f, 0.454059f, 0.454230f, 0.454400f, 0.454571f, 0.454742f, 0.454913f,
+ 0.455084f, 0.455254f, 0.455425f, 0.455596f, 0.455766f, 0.455937f, 0.456108f, 0.456278f,
+ 0.456449f, 0.456620f, 0.456790f, 0.456961f, 0.457131f, 0.457302f, 0.457472f, 0.457643f,
+ 0.457813f, 0.457984f, 0.458154f, 0.458325f, 0.458495f, 0.458665f, 0.458836f, 0.459006f,
+ 0.459177f, 0.459347f, 0.459517f, 0.459687f, 0.459858f, 0.460028f, 0.460198f, 0.460369f,
+ 0.460539f, 0.460709f, 0.460879f, 0.461049f, 0.461219f, 0.461390f, 0.461560f, 0.461730f,
+ 0.461900f, 0.462070f, 0.462240f, 0.462410f, 0.462580f, 0.462750f, 0.462920f, 0.463090f,
+ 0.463260f, 0.463430f, 0.463600f, 0.463769f, 0.463939f, 0.464109f, 0.464279f, 0.464449f,
+ 0.464619f, 0.464788f, 0.464958f, 0.465128f, 0.465298f, 0.465467f, 0.465637f, 0.465807f,
+ 0.465977f, 0.466146f, 0.466316f, 0.466485f, 0.466655f, 0.466825f, 0.466994f, 0.467164f,
+ 0.467333f, 0.467503f, 0.467672f, 0.467842f, 0.468011f, 0.468181f, 0.468350f, 0.468519f,
+ 0.468689f, 0.468858f, 0.469028f, 0.469197f, 0.469366f, 0.469536f, 0.469705f, 0.469874f,
+ 0.470043f, 0.470213f, 0.470382f, 0.470551f, 0.470720f, 0.470889f, 0.471058f, 0.471228f,
+ 0.471397f, 0.471566f, 0.471735f, 0.471904f, 0.472073f, 0.472242f, 0.472411f, 0.472580f,
+ 0.472749f, 0.472918f, 0.473087f, 0.473256f, 0.473425f, 0.473594f, 0.473763f, 0.473931f,
+ 0.474100f, 0.474269f, 0.474438f, 0.474607f, 0.474775f, 0.474944f, 0.475113f, 0.475282f,
+ 0.475450f, 0.475619f, 0.475788f, 0.475956f, 0.476125f, 0.476294f, 0.476462f, 0.476631f,
+ 0.476799f, 0.476968f, 0.477136f, 0.477305f, 0.477473f, 0.477642f, 0.477810f, 0.477979f,
+ 0.478147f, 0.478315f, 0.478484f, 0.478652f, 0.478821f, 0.478989f, 0.479157f, 0.479325f,
+ 0.479494f, 0.479662f, 0.479830f, 0.479998f, 0.480167f, 0.480335f, 0.480503f, 0.480671f,
+ 0.480839f, 0.481007f, 0.481176f, 0.481344f, 0.481512f, 0.481680f, 0.481848f, 0.482016f,
+ 0.482184f, 0.482352f, 0.482520f, 0.482688f, 0.482856f, 0.483023f, 0.483191f, 0.483359f,
+ 0.483527f, 0.483695f, 0.483863f, 0.484031f, 0.484198f, 0.484366f, 0.484534f, 0.484702f,
+ 0.484869f, 0.485037f, 0.485205f, 0.485372f, 0.485540f, 0.485708f, 0.485875f, 0.486043f,
+ 0.486210f, 0.486378f, 0.486545f, 0.486713f, 0.486880f, 0.487048f, 0.487215f, 0.487383f,
+ 0.487550f, 0.487718f, 0.487885f, 0.488052f, 0.488220f, 0.488387f, 0.488554f, 0.488722f,
+ 0.488889f, 0.489056f, 0.489223f, 0.489391f, 0.489558f, 0.489725f, 0.489892f, 0.490059f,
+ 0.490226f, 0.490394f, 0.490561f, 0.490728f, 0.490895f, 0.491062f, 0.491229f, 0.491396f,
+ 0.491563f, 0.491730f, 0.491897f, 0.492064f, 0.492231f, 0.492398f, 0.492564f, 0.492731f,
+ 0.492898f, 0.493065f, 0.493232f, 0.493399f, 0.493565f, 0.493732f, 0.493899f, 0.494066f,
+ 0.494232f, 0.494399f, 0.494566f, 0.494732f, 0.494899f, 0.495066f, 0.495232f, 0.495399f,
+ 0.495565f, 0.495732f, 0.495898f, 0.496065f, 0.496231f, 0.496398f, 0.496564f, 0.496731f,
+ 0.496897f, 0.497063f, 0.497230f, 0.497396f, 0.497562f, 0.497729f, 0.497895f, 0.498061f,
+ 0.498228f, 0.498394f, 0.498560f, 0.498726f, 0.498893f, 0.499059f, 0.499225f, 0.499391f,
+ 0.499557f, 0.499723f, 0.499889f, 0.500055f, 0.500221f, 0.500387f, 0.500553f, 0.500719f,
+ 0.500885f, 0.501051f, 0.501217f, 0.501383f, 0.501549f, 0.501715f, 0.501881f, 0.502047f,
+ 0.502212f, 0.502378f, 0.502544f, 0.502710f, 0.502876f, 0.503041f, 0.503207f, 0.503373f,
+ 0.503538f, 0.503704f, 0.503870f, 0.504035f, 0.504201f, 0.504366f, 0.504532f, 0.504698f,
+ 0.504863f, 0.505029f, 0.505194f, 0.505360f, 0.505525f, 0.505690f, 0.505856f, 0.506021f,
+ 0.506187f, 0.506352f, 0.506517f, 0.506683f, 0.506848f, 0.507013f, 0.507179f, 0.507344f,
+ 0.507509f, 0.507674f, 0.507839f, 0.508005f, 0.508170f, 0.508335f, 0.508500f, 0.508665f,
+ 0.508830f, 0.508995f, 0.509160f, 0.509325f, 0.509490f, 0.509655f, 0.509820f, 0.509985f,
+ 0.510150f, 0.510315f, 0.510480f, 0.510645f, 0.510810f, 0.510974f, 0.511139f, 0.511304f,
+ 0.511469f, 0.511634f, 0.511798f, 0.511963f, 0.512128f, 0.512292f, 0.512457f, 0.512622f,
+ 0.512786f, 0.512951f, 0.513116f, 0.513280f, 0.513445f, 0.513609f, 0.513774f, 0.513938f,
+ 0.514103f, 0.514267f, 0.514432f, 0.514596f, 0.514760f, 0.514925f, 0.515089f, 0.515254f,
+ 0.515418f, 0.515582f, 0.515746f, 0.515911f, 0.516075f, 0.516239f, 0.516403f, 0.516568f,
+ 0.516732f, 0.516896f, 0.517060f, 0.517224f, 0.517388f, 0.517552f, 0.517716f, 0.517880f,
+ 0.518045f, 0.518209f, 0.518372f, 0.518536f, 0.518700f, 0.518864f, 0.519028f, 0.519192f,
+ 0.519356f, 0.519520f, 0.519684f, 0.519848f, 0.520011f, 0.520175f, 0.520339f, 0.520503f,
+ 0.520666f, 0.520830f, 0.520994f, 0.521157f, 0.521321f, 0.521485f, 0.521648f, 0.521812f,
+ 0.521975f, 0.522139f, 0.522302f, 0.522466f, 0.522629f, 0.522793f, 0.522956f, 0.523120f,
+ 0.523283f, 0.523447f, 0.523610f, 0.523773f, 0.523937f, 0.524100f, 0.524263f, 0.524426f,
+ 0.524590f, 0.524753f, 0.524916f, 0.525079f, 0.525243f, 0.525406f, 0.525569f, 0.525732f,
+ 0.525895f, 0.526058f, 0.526221f, 0.526384f, 0.526547f, 0.526710f, 0.526873f, 0.527036f,
+ 0.527199f, 0.527362f, 0.527525f, 0.527688f, 0.527851f, 0.528014f, 0.528176f, 0.528339f,
+ 0.528502f, 0.528665f, 0.528828f, 0.528990f, 0.529153f, 0.529316f, 0.529478f, 0.529641f,
+ 0.529804f, 0.529966f, 0.530129f, 0.530291f, 0.530454f, 0.530617f, 0.530779f, 0.530942f,
+ 0.531104f, 0.531266f, 0.531429f, 0.531591f, 0.531754f, 0.531916f, 0.532078f, 0.532241f,
+ 0.532403f, 0.532565f, 0.532728f, 0.532890f, 0.533052f, 0.533214f, 0.533377f, 0.533539f,
+ 0.533701f, 0.533863f, 0.534025f, 0.534187f, 0.534349f, 0.534512f, 0.534674f, 0.534836f,
+ 0.534998f, 0.535160f, 0.535322f, 0.535484f, 0.535645f, 0.535807f, 0.535969f, 0.536131f,
+ 0.536293f, 0.536455f, 0.536617f, 0.536778f, 0.536940f, 0.537102f, 0.537264f, 0.537425f,
+ 0.537587f, 0.537749f, 0.537910f, 0.538072f, 0.538234f, 0.538395f, 0.538557f, 0.538718f,
+ 0.538880f, 0.539041f, 0.539203f, 0.539364f, 0.539526f, 0.539687f, 0.539849f, 0.540010f,
+ 0.540171f, 0.540333f, 0.540494f, 0.540655f, 0.540817f, 0.540978f, 0.541139f, 0.541301f,
+ 0.541462f, 0.541623f, 0.541784f, 0.541945f, 0.542106f, 0.542268f, 0.542429f, 0.542590f,
+ 0.542751f, 0.542912f, 0.543073f, 0.543234f, 0.543395f, 0.543556f, 0.543717f, 0.543878f,
+ 0.544039f, 0.544199f, 0.544360f, 0.544521f, 0.544682f, 0.544843f, 0.545003f, 0.545164f,
+ 0.545325f, 0.545486f, 0.545646f, 0.545807f, 0.545968f, 0.546128f, 0.546289f, 0.546450f,
+ 0.546610f, 0.546771f, 0.546931f, 0.547092f, 0.547252f, 0.547413f, 0.547573f, 0.547734f,
+ 0.547894f, 0.548054f, 0.548215f, 0.548375f, 0.548536f, 0.548696f, 0.548856f, 0.549016f,
+ 0.549177f, 0.549337f, 0.549497f, 0.549657f, 0.549818f, 0.549978f, 0.550138f, 0.550298f,
+ 0.550458f, 0.550618f, 0.550778f, 0.550938f, 0.551098f, 0.551258f, 0.551418f, 0.551578f,
+ 0.551738f, 0.551898f, 0.552058f, 0.552218f, 0.552378f, 0.552537f, 0.552697f, 0.552857f,
+ 0.553017f, 0.553176f, 0.553336f, 0.553496f, 0.553656f, 0.553815f, 0.553975f, 0.554134f,
+ 0.554294f, 0.554454f, 0.554613f, 0.554773f, 0.554932f, 0.555092f, 0.555251f, 0.555411f,
+ 0.555570f, 0.555730f, 0.555889f, 0.556048f, 0.556208f, 0.556367f, 0.556526f, 0.556686f,
+ 0.556845f, 0.557004f, 0.557164f, 0.557323f, 0.557482f, 0.557641f, 0.557800f, 0.557959f,
+ 0.558119f, 0.558278f, 0.558437f, 0.558596f, 0.558755f, 0.558914f, 0.559073f, 0.559232f,
+ 0.559391f, 0.559550f, 0.559709f, 0.559867f, 0.560026f, 0.560185f, 0.560344f, 0.560503f,
+ 0.560662f, 0.560820f, 0.560979f, 0.561138f, 0.561297f, 0.561455f, 0.561614f, 0.561773f,
+ 0.561931f, 0.562090f, 0.562248f, 0.562407f, 0.562565f, 0.562724f, 0.562882f, 0.563041f,
+ 0.563199f, 0.563358f, 0.563516f, 0.563675f, 0.563833f, 0.563991f, 0.564150f, 0.564308f,
+ 0.564466f, 0.564624f, 0.564783f, 0.564941f, 0.565099f, 0.565257f, 0.565416f, 0.565574f,
+ 0.565732f, 0.565890f, 0.566048f, 0.566206f, 0.566364f, 0.566522f, 0.566680f, 0.566838f,
+ 0.566996f, 0.567154f, 0.567312f, 0.567470f, 0.567628f, 0.567786f, 0.567943f, 0.568101f,
+ 0.568259f, 0.568417f, 0.568574f, 0.568732f, 0.568890f, 0.569048f, 0.569205f, 0.569363f,
+ 0.569521f, 0.569678f, 0.569836f, 0.569993f, 0.570151f, 0.570308f, 0.570466f, 0.570623f,
+ 0.570781f, 0.570938f, 0.571096f, 0.571253f, 0.571410f, 0.571568f, 0.571725f, 0.571882f,
+ 0.572040f, 0.572197f, 0.572354f, 0.572511f, 0.572669f, 0.572826f, 0.572983f, 0.573140f,
+ 0.573297f, 0.573454f, 0.573611f, 0.573768f, 0.573925f, 0.574082f, 0.574239f, 0.574396f,
+ 0.574553f, 0.574710f, 0.574867f, 0.575024f, 0.575181f, 0.575338f, 0.575495f, 0.575651f,
+ 0.575808f, 0.575965f, 0.576122f, 0.576278f, 0.576435f, 0.576592f, 0.576748f, 0.576905f,
+ 0.577062f, 0.577218f, 0.577375f, 0.577531f, 0.577688f, 0.577844f, 0.578001f, 0.578157f,
+ 0.578314f, 0.578470f, 0.578627f, 0.578783f, 0.578939f, 0.579096f, 0.579252f, 0.579408f,
+ 0.579565f, 0.579721f, 0.579877f, 0.580033f, 0.580189f, 0.580346f, 0.580502f, 0.580658f,
+ 0.580814f, 0.580970f, 0.581126f, 0.581282f, 0.581438f, 0.581594f, 0.581750f, 0.581906f,
+ 0.582062f, 0.582218f, 0.582374f, 0.582530f, 0.582685f, 0.582841f, 0.582997f, 0.583153f,
+ 0.583309f, 0.583464f, 0.583620f, 0.583776f, 0.583931f, 0.584087f, 0.584243f, 0.584398f,
+ 0.584554f, 0.584710f, 0.584865f, 0.585021f, 0.585176f, 0.585332f, 0.585487f, 0.585642f,
+ 0.585798f, 0.585953f, 0.586109f, 0.586264f, 0.586419f, 0.586575f, 0.586730f, 0.586885f,
+ 0.587040f, 0.587196f, 0.587351f, 0.587506f, 0.587661f, 0.587816f, 0.587971f, 0.588126f,
+ 0.588282f, 0.588437f, 0.588592f, 0.588747f, 0.588902f, 0.589057f, 0.589212f, 0.589366f,
+ 0.589521f, 0.589676f, 0.589831f, 0.589986f, 0.590141f, 0.590295f, 0.590450f, 0.590605f,
+ 0.590760f, 0.590914f, 0.591069f, 0.591224f, 0.591378f, 0.591533f, 0.591688f, 0.591842f,
+ 0.591997f, 0.592151f, 0.592306f, 0.592460f, 0.592615f, 0.592769f, 0.592924f, 0.593078f,
+ 0.593232f, 0.593387f, 0.593541f, 0.593695f, 0.593850f, 0.594004f, 0.594158f, 0.594312f,
+ 0.594467f, 0.594621f, 0.594775f, 0.594929f, 0.595083f, 0.595237f, 0.595391f, 0.595545f,
+ 0.595699f, 0.595853f, 0.596007f, 0.596161f, 0.596315f, 0.596469f, 0.596623f, 0.596777f,
+ 0.596931f, 0.597085f, 0.597238f, 0.597392f, 0.597546f, 0.597700f, 0.597853f, 0.598007f,
+ 0.598161f, 0.598314f, 0.598468f, 0.598622f, 0.598775f, 0.598929f, 0.599082f, 0.599236f,
+ 0.599389f, 0.599543f, 0.599696f, 0.599850f, 0.600003f, 0.600156f, 0.600310f, 0.600463f,
+ 0.600616f, 0.600770f, 0.600923f, 0.601076f, 0.601230f, 0.601383f, 0.601536f, 0.601689f,
+ 0.601842f, 0.601995f, 0.602148f, 0.602302f, 0.602455f, 0.602608f, 0.602761f, 0.602914f,
+ 0.603067f, 0.603220f, 0.603372f, 0.603525f, 0.603678f, 0.603831f, 0.603984f, 0.604137f,
+ 0.604290f, 0.604442f, 0.604595f, 0.604748f, 0.604900f, 0.605053f, 0.605206f, 0.605358f,
+ 0.605511f, 0.605664f, 0.605816f, 0.605969f, 0.606121f, 0.606274f, 0.606426f, 0.606579f,
+ 0.606731f, 0.606884f, 0.607036f, 0.607188f, 0.607341f, 0.607493f, 0.607645f, 0.607798f,
+ 0.607950f, 0.608102f, 0.608254f, 0.608406f, 0.608559f, 0.608711f, 0.608863f, 0.609015f,
+ 0.609167f, 0.609319f, 0.609471f, 0.609623f, 0.609775f, 0.609927f, 0.610079f, 0.610231f,
+ 0.610383f, 0.610535f, 0.610687f, 0.610838f, 0.610990f, 0.611142f, 0.611294f, 0.611445f,
+ 0.611597f, 0.611749f, 0.611901f, 0.612052f, 0.612204f, 0.612355f, 0.612507f, 0.612659f,
+ 0.612810f, 0.612962f, 0.613113f, 0.613265f, 0.613416f, 0.613567f, 0.613719f, 0.613870f,
+ 0.614022f, 0.614173f, 0.614324f, 0.614475f, 0.614627f, 0.614778f, 0.614929f, 0.615080f,
+ 0.615232f, 0.615383f, 0.615534f, 0.615685f, 0.615836f, 0.615987f, 0.616138f, 0.616289f,
+ 0.616440f, 0.616591f, 0.616742f, 0.616893f, 0.617044f, 0.617195f, 0.617346f, 0.617496f,
+ 0.617647f, 0.617798f, 0.617949f, 0.618100f, 0.618250f, 0.618401f, 0.618552f, 0.618702f,
+ 0.618853f, 0.619004f, 0.619154f, 0.619305f, 0.619455f, 0.619606f, 0.619756f, 0.619907f,
+ 0.620057f, 0.620208f, 0.620358f, 0.620508f, 0.620659f, 0.620809f, 0.620959f, 0.621110f,
+ 0.621260f, 0.621410f, 0.621560f, 0.621711f, 0.621861f, 0.622011f, 0.622161f, 0.622311f,
+ 0.622461f, 0.622611f, 0.622761f, 0.622911f, 0.623061f, 0.623211f, 0.623361f, 0.623511f,
+ 0.623661f, 0.623811f, 0.623961f, 0.624111f, 0.624260f, 0.624410f, 0.624560f, 0.624710f,
+ 0.624860f, 0.625009f, 0.625159f, 0.625309f, 0.625458f, 0.625608f, 0.625757f, 0.625907f,
+ 0.626056f, 0.626206f, 0.626355f, 0.626505f, 0.626654f, 0.626804f, 0.626953f, 0.627102f,
+ 0.627252f, 0.627401f, 0.627550f, 0.627700f, 0.627849f, 0.627998f, 0.628147f, 0.628297f,
+ 0.628446f, 0.628595f, 0.628744f, 0.628893f, 0.629042f, 0.629191f, 0.629340f, 0.629489f,
+ 0.629638f, 0.629787f, 0.629936f, 0.630085f, 0.630234f, 0.630383f, 0.630532f, 0.630680f,
+ 0.630829f, 0.630978f, 0.631127f, 0.631275f, 0.631424f, 0.631573f, 0.631721f, 0.631870f,
+ 0.632019f, 0.632167f, 0.632316f, 0.632464f, 0.632613f, 0.632761f, 0.632910f, 0.633058f,
+ 0.633207f, 0.633355f, 0.633504f, 0.633652f, 0.633800f, 0.633949f, 0.634097f, 0.634245f,
+ 0.634393f, 0.634542f, 0.634690f, 0.634838f, 0.634986f, 0.635134f, 0.635282f, 0.635430f,
+ 0.635578f, 0.635726f, 0.635874f, 0.636022f, 0.636170f, 0.636318f, 0.636466f, 0.636614f,
+ 0.636762f, 0.636910f, 0.637057f, 0.637205f, 0.637353f, 0.637501f, 0.637649f, 0.637796f,
+ 0.637944f, 0.638092f, 0.638239f, 0.638387f, 0.638534f, 0.638682f, 0.638829f, 0.638977f,
+ 0.639124f, 0.639272f, 0.639419f, 0.639567f, 0.639714f, 0.639862f, 0.640009f, 0.640156f,
+ 0.640303f, 0.640451f, 0.640598f, 0.640745f, 0.640892f, 0.641040f, 0.641187f, 0.641334f,
+ 0.641481f, 0.641628f, 0.641775f, 0.641922f, 0.642069f, 0.642216f, 0.642363f, 0.642510f,
+ 0.642657f, 0.642804f, 0.642951f, 0.643098f, 0.643245f, 0.643391f, 0.643538f, 0.643685f,
+ 0.643832f, 0.643978f, 0.644125f, 0.644272f, 0.644418f, 0.644565f, 0.644711f, 0.644858f,
+ 0.645005f, 0.645151f, 0.645298f, 0.645444f, 0.645590f, 0.645737f, 0.645883f, 0.646030f,
+ 0.646176f, 0.646322f, 0.646469f, 0.646615f, 0.646761f, 0.646907f, 0.647054f, 0.647200f,
+ 0.647346f, 0.647492f, 0.647638f, 0.647784f, 0.647930f, 0.648076f, 0.648222f, 0.648368f,
+ 0.648514f, 0.648660f, 0.648806f, 0.648952f, 0.649098f, 0.649244f, 0.649390f, 0.649536f,
+ 0.649681f, 0.649827f, 0.649973f, 0.650119f, 0.650264f, 0.650410f, 0.650555f, 0.650701f,
+ 0.650847f, 0.650992f, 0.651138f, 0.651283f, 0.651429f, 0.651574f, 0.651720f, 0.651865f,
+ 0.652011f, 0.652156f, 0.652301f, 0.652447f, 0.652592f, 0.652737f, 0.652882f, 0.653028f,
+ 0.653173f, 0.653318f, 0.653463f, 0.653608f, 0.653753f, 0.653899f, 0.654044f, 0.654189f,
+ 0.654334f, 0.654479f, 0.654624f, 0.654769f, 0.654913f, 0.655058f, 0.655203f, 0.655348f,
+ 0.655493f, 0.655638f, 0.655782f, 0.655927f, 0.656072f, 0.656217f, 0.656361f, 0.656506f,
+ 0.656651f, 0.656795f, 0.656940f, 0.657084f, 0.657229f, 0.657373f, 0.657518f, 0.657662f,
+ 0.657807f, 0.657951f, 0.658095f, 0.658240f, 0.658384f, 0.658529f, 0.658673f, 0.658817f,
+ 0.658961f, 0.659105f, 0.659250f, 0.659394f, 0.659538f, 0.659682f, 0.659826f, 0.659970f,
+ 0.660114f, 0.660258f, 0.660402f, 0.660546f, 0.660690f, 0.660834f, 0.660978f, 0.661122f,
+ 0.661266f, 0.661410f, 0.661553f, 0.661697f, 0.661841f, 0.661985f, 0.662128f, 0.662272f,
+ 0.662416f, 0.662559f, 0.662703f, 0.662847f, 0.662990f, 0.663134f, 0.663277f, 0.663421f,
+ 0.663564f, 0.663708f, 0.663851f, 0.663994f, 0.664138f, 0.664281f, 0.664424f, 0.664568f,
+ 0.664711f, 0.664854f, 0.664997f, 0.665141f, 0.665284f, 0.665427f, 0.665570f, 0.665713f,
+ 0.665856f, 0.665999f, 0.666142f, 0.666285f, 0.666428f, 0.666571f, 0.666714f, 0.666857f,
+ 0.667000f, 0.667143f, 0.667286f, 0.667428f, 0.667571f, 0.667714f, 0.667857f, 0.667999f,
+ 0.668142f, 0.668285f, 0.668427f, 0.668570f, 0.668712f, 0.668855f, 0.668998f, 0.669140f,
+ 0.669283f, 0.669425f, 0.669567f, 0.669710f, 0.669852f, 0.669995f, 0.670137f, 0.670279f,
+ 0.670422f, 0.670564f, 0.670706f, 0.670848f, 0.670990f, 0.671133f, 0.671275f, 0.671417f,
+ 0.671559f, 0.671701f, 0.671843f, 0.671985f, 0.672127f, 0.672269f, 0.672411f, 0.672553f,
+ 0.672695f, 0.672837f, 0.672978f, 0.673120f, 0.673262f, 0.673404f, 0.673546f, 0.673687f,
+ 0.673829f, 0.673971f, 0.674112f, 0.674254f, 0.674396f, 0.674537f, 0.674679f, 0.674820f,
+ 0.674962f, 0.675103f, 0.675245f, 0.675386f, 0.675527f, 0.675669f, 0.675810f, 0.675951f,
+ 0.676093f, 0.676234f, 0.676375f, 0.676516f, 0.676658f, 0.676799f, 0.676940f, 0.677081f,
+ 0.677222f, 0.677363f, 0.677504f, 0.677645f, 0.677786f, 0.677927f, 0.678068f, 0.678209f,
+ 0.678350f, 0.678491f, 0.678632f, 0.678773f, 0.678913f, 0.679054f, 0.679195f, 0.679336f,
+ 0.679476f, 0.679617f, 0.679758f, 0.679898f, 0.680039f, 0.680179f, 0.680320f, 0.680461f,
+ 0.680601f, 0.680741f, 0.680882f, 0.681022f, 0.681163f, 0.681303f, 0.681443f, 0.681584f,
+ 0.681724f, 0.681864f, 0.682005f, 0.682145f, 0.682285f, 0.682425f, 0.682565f, 0.682705f,
+ 0.682846f, 0.682986f, 0.683126f, 0.683266f, 0.683406f, 0.683546f, 0.683686f, 0.683825f,
+ 0.683965f, 0.684105f, 0.684245f, 0.684385f, 0.684525f, 0.684664f, 0.684804f, 0.684944f,
+ 0.685084f, 0.685223f, 0.685363f, 0.685503f, 0.685642f, 0.685782f, 0.685921f, 0.686061f,
+ 0.686200f, 0.686340f, 0.686479f, 0.686619f, 0.686758f, 0.686897f, 0.687037f, 0.687176f,
+ 0.687315f, 0.687455f, 0.687594f, 0.687733f, 0.687872f, 0.688011f, 0.688151f, 0.688290f,
+ 0.688429f, 0.688568f, 0.688707f, 0.688846f, 0.688985f, 0.689124f, 0.689263f, 0.689402f,
+ 0.689541f, 0.689679f, 0.689818f, 0.689957f, 0.690096f, 0.690235f, 0.690373f, 0.690512f,
+ 0.690651f, 0.690789f, 0.690928f, 0.691067f, 0.691205f, 0.691344f, 0.691482f, 0.691621f,
+ 0.691759f, 0.691898f, 0.692036f, 0.692175f, 0.692313f, 0.692451f, 0.692590f, 0.692728f,
+ 0.692866f, 0.693004f, 0.693143f, 0.693281f, 0.693419f, 0.693557f, 0.693695f, 0.693833f,
+ 0.693971f, 0.694109f, 0.694248f, 0.694386f, 0.694524f, 0.694661f, 0.694799f, 0.694937f,
+ 0.695075f, 0.695213f, 0.695351f, 0.695489f, 0.695626f, 0.695764f, 0.695902f, 0.696039f,
+ 0.696177f, 0.696315f, 0.696452f, 0.696590f, 0.696728f, 0.696865f, 0.697003f, 0.697140f,
+ 0.697277f, 0.697415f, 0.697552f, 0.697690f, 0.697827f, 0.697964f, 0.698102f, 0.698239f,
+ 0.698376f, 0.698513f, 0.698651f, 0.698788f, 0.698925f, 0.699062f, 0.699199f, 0.699336f,
+ 0.699473f, 0.699610f, 0.699747f, 0.699884f, 0.700021f, 0.700158f, 0.700295f, 0.700432f,
+ 0.700569f, 0.700706f, 0.700842f, 0.700979f, 0.701116f, 0.701253f, 0.701389f, 0.701526f,
+ 0.701663f, 0.701799f, 0.701936f, 0.702072f, 0.702209f, 0.702345f, 0.702482f, 0.702618f,
+ 0.702755f, 0.702891f, 0.703028f, 0.703164f, 0.703300f, 0.703436f, 0.703573f, 0.703709f,
+ 0.703845f, 0.703981f, 0.704118f, 0.704254f, 0.704390f, 0.704526f, 0.704662f, 0.704798f,
+ 0.704934f, 0.705070f, 0.705206f, 0.705342f, 0.705478f, 0.705614f, 0.705750f, 0.705885f,
+ 0.706021f, 0.706157f, 0.706293f, 0.706429f, 0.706564f, 0.706700f, 0.706836f, 0.706971f,
+ 0.707107f, 0.707242f, 0.707378f, 0.707513f, 0.707649f, 0.707784f, 0.707920f, 0.708055f,
+ 0.708191f, 0.708326f, 0.708461f, 0.708597f, 0.708732f, 0.708867f, 0.709002f, 0.709138f,
+ 0.709273f, 0.709408f, 0.709543f, 0.709678f, 0.709813f, 0.709948f, 0.710083f, 0.710218f,
+ 0.710353f, 0.710488f, 0.710623f, 0.710758f, 0.710893f, 0.711028f, 0.711163f, 0.711297f,
+ 0.711432f, 0.711567f, 0.711702f, 0.711836f, 0.711971f, 0.712106f, 0.712240f, 0.712375f,
+ 0.712509f, 0.712644f, 0.712778f, 0.712913f, 0.713047f, 0.713182f, 0.713316f, 0.713451f,
+ 0.713585f, 0.713719f, 0.713853f, 0.713988f, 0.714122f, 0.714256f, 0.714390f, 0.714525f,
+ 0.714659f, 0.714793f, 0.714927f, 0.715061f, 0.715195f, 0.715329f, 0.715463f, 0.715597f,
+ 0.715731f, 0.715865f, 0.715999f, 0.716132f, 0.716266f, 0.716400f, 0.716534f, 0.716668f,
+ 0.716801f, 0.716935f, 0.717069f, 0.717202f, 0.717336f, 0.717469f, 0.717603f, 0.717737f,
+ 0.717870f, 0.718004f, 0.718137f, 0.718270f, 0.718404f, 0.718537f, 0.718670f, 0.718804f,
+ 0.718937f, 0.719070f, 0.719204f, 0.719337f, 0.719470f, 0.719603f, 0.719736f, 0.719869f,
+ 0.720003f, 0.720136f, 0.720269f, 0.720402f, 0.720535f, 0.720668f, 0.720800f, 0.720933f,
+ 0.721066f, 0.721199f, 0.721332f, 0.721465f, 0.721597f, 0.721730f, 0.721863f, 0.721996f,
+ 0.722128f, 0.722261f, 0.722393f, 0.722526f, 0.722659f, 0.722791f, 0.722924f, 0.723056f,
+ 0.723188f, 0.723321f, 0.723453f, 0.723586f, 0.723718f, 0.723850f, 0.723983f, 0.724115f,
+ 0.724247f, 0.724379f, 0.724511f, 0.724644f, 0.724776f, 0.724908f, 0.725040f, 0.725172f,
+ 0.725304f, 0.725436f, 0.725568f, 0.725700f, 0.725832f, 0.725964f, 0.726095f, 0.726227f,
+ 0.726359f, 0.726491f, 0.726623f, 0.726754f, 0.726886f, 0.727018f, 0.727149f, 0.727281f,
+ 0.727413f, 0.727544f, 0.727676f, 0.727807f, 0.727939f, 0.728070f, 0.728202f, 0.728333f,
+ 0.728464f, 0.728596f, 0.728727f, 0.728858f, 0.728990f, 0.729121f, 0.729252f, 0.729383f,
+ 0.729514f, 0.729646f, 0.729777f, 0.729908f, 0.730039f, 0.730170f, 0.730301f, 0.730432f,
+ 0.730563f, 0.730694f, 0.730825f, 0.730955f, 0.731086f, 0.731217f, 0.731348f, 0.731479f,
+ 0.731609f, 0.731740f, 0.731871f, 0.732001f, 0.732132f, 0.732263f, 0.732393f, 0.732524f,
+ 0.732654f, 0.732785f, 0.732915f, 0.733046f, 0.733176f, 0.733306f, 0.733437f, 0.733567f,
+ 0.733697f, 0.733828f, 0.733958f, 0.734088f, 0.734218f, 0.734349f, 0.734479f, 0.734609f,
+ 0.734739f, 0.734869f, 0.734999f, 0.735129f, 0.735259f, 0.735389f, 0.735519f, 0.735649f,
+ 0.735779f, 0.735908f, 0.736038f, 0.736168f, 0.736298f, 0.736428f, 0.736557f, 0.736687f,
+ 0.736817f, 0.736946f, 0.737076f, 0.737205f, 0.737335f, 0.737464f, 0.737594f, 0.737723f,
+ 0.737853f, 0.737982f, 0.738112f, 0.738241f, 0.738370f, 0.738500f, 0.738629f, 0.738758f,
+ 0.738887f, 0.739017f, 0.739146f, 0.739275f, 0.739404f, 0.739533f, 0.739662f, 0.739791f,
+ 0.739920f, 0.740049f, 0.740178f, 0.740307f, 0.740436f, 0.740565f, 0.740694f, 0.740822f,
+ 0.740951f, 0.741080f, 0.741209f, 0.741337f, 0.741466f, 0.741595f, 0.741723f, 0.741852f,
+ 0.741980f, 0.742109f, 0.742237f, 0.742366f, 0.742494f, 0.742623f, 0.742751f, 0.742880f,
+ 0.743008f, 0.743136f, 0.743265f, 0.743393f, 0.743521f, 0.743649f, 0.743777f, 0.743906f,
+ 0.744034f, 0.744162f, 0.744290f, 0.744418f, 0.744546f, 0.744674f, 0.744802f, 0.744930f,
+ 0.745058f, 0.745186f, 0.745314f, 0.745441f, 0.745569f, 0.745697f, 0.745825f, 0.745952f,
+ 0.746080f, 0.746208f, 0.746335f, 0.746463f, 0.746591f, 0.746718f, 0.746846f, 0.746973f,
+ 0.747101f, 0.747228f, 0.747355f, 0.747483f, 0.747610f, 0.747738f, 0.747865f, 0.747992f,
+ 0.748119f, 0.748247f, 0.748374f, 0.748501f, 0.748628f, 0.748755f, 0.748882f, 0.749009f,
+ 0.749136f, 0.749263f, 0.749390f, 0.749517f, 0.749644f, 0.749771f, 0.749898f, 0.750025f,
+ 0.750152f, 0.750278f, 0.750405f, 0.750532f, 0.750659f, 0.750785f, 0.750912f, 0.751039f,
+ 0.751165f, 0.751292f, 0.751418f, 0.751545f, 0.751671f, 0.751798f, 0.751924f, 0.752050f,
+ 0.752177f, 0.752303f, 0.752429f, 0.752556f, 0.752682f, 0.752808f, 0.752934f, 0.753061f,
+ 0.753187f, 0.753313f, 0.753439f, 0.753565f, 0.753691f, 0.753817f, 0.753943f, 0.754069f,
+ 0.754195f, 0.754321f, 0.754447f, 0.754573f, 0.754698f, 0.754824f, 0.754950f, 0.755076f,
+ 0.755201f, 0.755327f, 0.755453f, 0.755578f, 0.755704f, 0.755829f, 0.755955f, 0.756081f,
+ 0.756206f, 0.756331f, 0.756457f, 0.756582f, 0.756708f, 0.756833f, 0.756958f, 0.757084f,
+ 0.757209f, 0.757334f, 0.757459f, 0.757584f, 0.757710f, 0.757835f, 0.757960f, 0.758085f,
+ 0.758210f, 0.758335f, 0.758460f, 0.758585f, 0.758710f, 0.758835f, 0.758960f, 0.759084f,
+ 0.759209f, 0.759334f, 0.759459f, 0.759583f, 0.759708f, 0.759833f, 0.759957f, 0.760082f,
+ 0.760207f, 0.760331f, 0.760456f, 0.760580f, 0.760705f, 0.760829f, 0.760954f, 0.761078f,
+ 0.761202f, 0.761327f, 0.761451f, 0.761575f, 0.761700f, 0.761824f, 0.761948f, 0.762072f,
+ 0.762196f, 0.762320f, 0.762444f, 0.762569f, 0.762693f, 0.762817f, 0.762941f, 0.763065f,
+ 0.763188f, 0.763312f, 0.763436f, 0.763560f, 0.763684f, 0.763808f, 0.763931f, 0.764055f,
+ 0.764179f, 0.764302f, 0.764426f, 0.764550f, 0.764673f, 0.764797f, 0.764920f, 0.765044f,
+ 0.765167f, 0.765291f, 0.765414f, 0.765538f, 0.765661f, 0.765784f, 0.765907f, 0.766031f,
+ 0.766154f, 0.766277f, 0.766400f, 0.766524f, 0.766647f, 0.766770f, 0.766893f, 0.767016f,
+ 0.767139f, 0.767262f, 0.767385f, 0.767508f, 0.767631f, 0.767754f, 0.767876f, 0.767999f,
+ 0.768122f, 0.768245f, 0.768368f, 0.768490f, 0.768613f, 0.768736f, 0.768858f, 0.768981f,
+ 0.769103f, 0.769226f, 0.769348f, 0.769471f, 0.769593f, 0.769716f, 0.769838f, 0.769961f,
+ 0.770083f, 0.770205f, 0.770327f, 0.770450f, 0.770572f, 0.770694f, 0.770816f, 0.770938f,
+ 0.771061f, 0.771183f, 0.771305f, 0.771427f, 0.771549f, 0.771671f, 0.771793f, 0.771915f,
+ 0.772036f, 0.772158f, 0.772280f, 0.772402f, 0.772524f, 0.772645f, 0.772767f, 0.772889f,
+ 0.773010f, 0.773132f, 0.773254f, 0.773375f, 0.773497f, 0.773618f, 0.773740f, 0.773861f,
+ 0.773983f, 0.774104f, 0.774225f, 0.774347f, 0.774468f, 0.774589f, 0.774711f, 0.774832f,
+ 0.774953f, 0.775074f, 0.775195f, 0.775317f, 0.775438f, 0.775559f, 0.775680f, 0.775801f,
+ 0.775922f, 0.776043f, 0.776164f, 0.776284f, 0.776405f, 0.776526f, 0.776647f, 0.776768f,
+ 0.776888f, 0.777009f, 0.777130f, 0.777251f, 0.777371f, 0.777492f, 0.777612f, 0.777733f,
+ 0.777853f, 0.777974f, 0.778094f, 0.778215f, 0.778335f, 0.778456f, 0.778576f, 0.778696f,
+ 0.778817f, 0.778937f, 0.779057f, 0.779177f, 0.779297f, 0.779418f, 0.779538f, 0.779658f,
+ 0.779778f, 0.779898f, 0.780018f, 0.780138f, 0.780258f, 0.780378f, 0.780498f, 0.780617f,
+ 0.780737f, 0.780857f, 0.780977f, 0.781097f, 0.781216f, 0.781336f, 0.781456f, 0.781575f,
+ 0.781695f, 0.781814f, 0.781934f, 0.782053f, 0.782173f, 0.782292f, 0.782412f, 0.782531f,
+ 0.782651f, 0.782770f, 0.782889f, 0.783009f, 0.783128f, 0.783247f, 0.783366f, 0.783485f,
+ 0.783605f, 0.783724f, 0.783843f, 0.783962f, 0.784081f, 0.784200f, 0.784319f, 0.784438f,
+ 0.784557f, 0.784675f, 0.784794f, 0.784913f, 0.785032f, 0.785151f, 0.785269f, 0.785388f,
+ 0.785507f, 0.785625f, 0.785744f, 0.785863f, 0.785981f, 0.786100f, 0.786218f, 0.786337f,
+ 0.786455f, 0.786574f, 0.786692f, 0.786810f, 0.786929f, 0.787047f, 0.787165f, 0.787284f,
+ 0.787402f, 0.787520f, 0.787638f, 0.787756f, 0.787874f, 0.787992f, 0.788110f, 0.788228f,
+ 0.788346f, 0.788464f, 0.788582f, 0.788700f, 0.788818f, 0.788936f, 0.789054f, 0.789172f,
+ 0.789289f, 0.789407f, 0.789525f, 0.789642f, 0.789760f, 0.789878f, 0.789995f, 0.790113f,
+ 0.790230f, 0.790348f, 0.790465f, 0.790583f, 0.790700f, 0.790817f, 0.790935f, 0.791052f,
+ 0.791169f, 0.791287f, 0.791404f, 0.791521f, 0.791638f, 0.791755f, 0.791872f, 0.791990f,
+ 0.792107f, 0.792224f, 0.792341f, 0.792458f, 0.792575f, 0.792691f, 0.792808f, 0.792925f,
+ 0.793042f, 0.793159f, 0.793276f, 0.793392f, 0.793509f, 0.793626f, 0.793742f, 0.793859f,
+ 0.793975f, 0.794092f, 0.794209f, 0.794325f, 0.794442f, 0.794558f, 0.794674f, 0.794791f,
+ 0.794907f, 0.795023f, 0.795140f, 0.795256f, 0.795372f, 0.795488f, 0.795605f, 0.795721f,
+ 0.795837f, 0.795953f, 0.796069f, 0.796185f, 0.796301f, 0.796417f, 0.796533f, 0.796649f,
+ 0.796765f, 0.796881f, 0.796996f, 0.797112f, 0.797228f, 0.797344f, 0.797459f, 0.797575f,
+ 0.797691f, 0.797806f, 0.797922f, 0.798038f, 0.798153f, 0.798269f, 0.798384f, 0.798500f,
+ 0.798615f, 0.798730f, 0.798846f, 0.798961f, 0.799076f, 0.799192f, 0.799307f, 0.799422f,
+ 0.799537f, 0.799652f, 0.799768f, 0.799883f, 0.799998f, 0.800113f, 0.800228f, 0.800343f,
+ 0.800458f, 0.800573f, 0.800687f, 0.800802f, 0.800917f, 0.801032f, 0.801147f, 0.801261f,
+ 0.801376f, 0.801491f, 0.801606f, 0.801720f, 0.801835f, 0.801949f, 0.802064f, 0.802178f,
+ 0.802293f, 0.802407f, 0.802522f, 0.802636f, 0.802750f, 0.802865f, 0.802979f, 0.803093f,
+ 0.803208f, 0.803322f, 0.803436f, 0.803550f, 0.803664f, 0.803778f, 0.803892f, 0.804006f,
+ 0.804120f, 0.804234f, 0.804348f, 0.804462f, 0.804576f, 0.804690f, 0.804804f, 0.804918f,
+ 0.805031f, 0.805145f, 0.805259f, 0.805372f, 0.805486f, 0.805600f, 0.805713f, 0.805827f,
+ 0.805940f, 0.806054f, 0.806167f, 0.806281f, 0.806394f, 0.806508f, 0.806621f, 0.806734f,
+ 0.806848f, 0.806961f, 0.807074f, 0.807187f, 0.807300f, 0.807414f, 0.807527f, 0.807640f,
+ 0.807753f, 0.807866f, 0.807979f, 0.808092f, 0.808205f, 0.808318f, 0.808430f, 0.808543f,
+ 0.808656f, 0.808769f, 0.808882f, 0.808994f, 0.809107f, 0.809220f, 0.809332f, 0.809445f,
+ 0.809558f, 0.809670f, 0.809783f, 0.809895f, 0.810008f, 0.810120f, 0.810232f, 0.810345f,
+ 0.810457f, 0.810570f, 0.810682f, 0.810794f, 0.810906f, 0.811018f, 0.811131f, 0.811243f,
+ 0.811355f, 0.811467f, 0.811579f, 0.811691f, 0.811803f, 0.811915f, 0.812027f, 0.812139f,
+ 0.812251f, 0.812362f, 0.812474f, 0.812586f, 0.812698f, 0.812809f, 0.812921f, 0.813033f,
+ 0.813144f, 0.813256f, 0.813368f, 0.813479f, 0.813591f, 0.813702f, 0.813814f, 0.813925f,
+ 0.814036f, 0.814148f, 0.814259f, 0.814370f, 0.814482f, 0.814593f, 0.814704f, 0.814815f,
+ 0.814926f, 0.815037f, 0.815149f, 0.815260f, 0.815371f, 0.815482f, 0.815593f, 0.815704f,
+ 0.815814f, 0.815925f, 0.816036f, 0.816147f, 0.816258f, 0.816368f, 0.816479f, 0.816590f,
+ 0.816701f, 0.816811f, 0.816922f, 0.817032f, 0.817143f, 0.817253f, 0.817364f, 0.817474f,
+ 0.817585f, 0.817695f, 0.817806f, 0.817916f, 0.818026f, 0.818137f, 0.818247f, 0.818357f,
+ 0.818467f, 0.818577f, 0.818687f, 0.818798f, 0.818908f, 0.819018f, 0.819128f, 0.819238f,
+ 0.819348f, 0.819457f, 0.819567f, 0.819677f, 0.819787f, 0.819897f, 0.820007f, 0.820116f,
+ 0.820226f, 0.820336f, 0.820445f, 0.820555f, 0.820664f, 0.820774f, 0.820884f, 0.820993f,
+ 0.821102f, 0.821212f, 0.821321f, 0.821431f, 0.821540f, 0.821649f, 0.821759f, 0.821868f,
+ 0.821977f, 0.822086f, 0.822195f, 0.822305f, 0.822414f, 0.822523f, 0.822632f, 0.822741f,
+ 0.822850f, 0.822959f, 0.823068f, 0.823177f, 0.823285f, 0.823394f, 0.823503f, 0.823612f,
+ 0.823721f, 0.823829f, 0.823938f, 0.824047f, 0.824155f, 0.824264f, 0.824372f, 0.824481f,
+ 0.824589f, 0.824698f, 0.824806f, 0.824915f, 0.825023f, 0.825131f, 0.825240f, 0.825348f,
+ 0.825456f, 0.825564f, 0.825673f, 0.825781f, 0.825889f, 0.825997f, 0.826105f, 0.826213f,
+ 0.826321f, 0.826429f, 0.826537f, 0.826645f, 0.826753f, 0.826861f, 0.826968f, 0.827076f,
+ 0.827184f, 0.827292f, 0.827399f, 0.827507f, 0.827615f, 0.827722f, 0.827830f, 0.827938f,
+ 0.828045f, 0.828153f, 0.828260f, 0.828367f, 0.828475f, 0.828582f, 0.828690f, 0.828797f,
+ 0.828904f, 0.829011f, 0.829119f, 0.829226f, 0.829333f, 0.829440f, 0.829547f, 0.829654f,
+ 0.829761f, 0.829868f, 0.829975f, 0.830082f, 0.830189f, 0.830296f, 0.830403f, 0.830510f,
+ 0.830616f, 0.830723f, 0.830830f, 0.830937f, 0.831043f, 0.831150f, 0.831257f, 0.831363f,
+ 0.831470f, 0.831576f, 0.831683f, 0.831789f, 0.831895f, 0.832002f, 0.832108f, 0.832215f,
+ 0.832321f, 0.832427f, 0.832533f, 0.832640f, 0.832746f, 0.832852f, 0.832958f, 0.833064f,
+ 0.833170f, 0.833276f, 0.833382f, 0.833488f, 0.833594f, 0.833700f, 0.833806f, 0.833912f,
+ 0.834018f, 0.834123f, 0.834229f, 0.834335f, 0.834440f, 0.834546f, 0.834652f, 0.834757f,
+ 0.834863f, 0.834968f, 0.835074f, 0.835179f, 0.835285f, 0.835390f, 0.835496f, 0.835601f,
+ 0.835706f, 0.835812f, 0.835917f, 0.836022f, 0.836127f, 0.836232f, 0.836338f, 0.836443f,
+ 0.836548f, 0.836653f, 0.836758f, 0.836863f, 0.836968f, 0.837073f, 0.837178f, 0.837282f,
+ 0.837387f, 0.837492f, 0.837597f, 0.837701f, 0.837806f, 0.837911f, 0.838015f, 0.838120f,
+ 0.838225f, 0.838329f, 0.838434f, 0.838538f, 0.838643f, 0.838747f, 0.838852f, 0.838956f,
+ 0.839060f, 0.839165f, 0.839269f, 0.839373f, 0.839477f, 0.839581f, 0.839686f, 0.839790f,
+ 0.839894f, 0.839998f, 0.840102f, 0.840206f, 0.840310f, 0.840414f, 0.840518f, 0.840622f,
+ 0.840725f, 0.840829f, 0.840933f, 0.841037f, 0.841140f, 0.841244f, 0.841348f, 0.841451f,
+ 0.841555f, 0.841659f, 0.841762f, 0.841866f, 0.841969f, 0.842072f, 0.842176f, 0.842279f,
+ 0.842383f, 0.842486f, 0.842589f, 0.842692f, 0.842796f, 0.842899f, 0.843002f, 0.843105f,
+ 0.843208f, 0.843311f, 0.843414f, 0.843517f, 0.843620f, 0.843723f, 0.843826f, 0.843929f,
+ 0.844032f, 0.844135f, 0.844238f, 0.844340f, 0.844443f, 0.844546f, 0.844648f, 0.844751f,
+ 0.844854f, 0.844956f, 0.845059f, 0.845161f, 0.845264f, 0.845366f, 0.845469f, 0.845571f,
+ 0.845673f, 0.845776f, 0.845878f, 0.845980f, 0.846082f, 0.846185f, 0.846287f, 0.846389f,
+ 0.846491f, 0.846593f, 0.846695f, 0.846797f, 0.846899f, 0.847001f, 0.847103f, 0.847205f,
+ 0.847307f, 0.847408f, 0.847510f, 0.847612f, 0.847714f, 0.847815f, 0.847917f, 0.848019f,
+ 0.848120f, 0.848222f, 0.848323f, 0.848425f, 0.848526f, 0.848628f, 0.848729f, 0.848831f,
+ 0.848932f, 0.849033f, 0.849135f, 0.849236f, 0.849337f, 0.849438f, 0.849540f, 0.849641f,
+ 0.849742f, 0.849843f, 0.849944f, 0.850045f, 0.850146f, 0.850247f, 0.850348f, 0.850449f,
+ 0.850549f, 0.850650f, 0.850751f, 0.850852f, 0.850953f, 0.851053f, 0.851154f, 0.851255f,
+ 0.851355f, 0.851456f, 0.851556f, 0.851657f, 0.851757f, 0.851858f, 0.851958f, 0.852059f,
+ 0.852159f, 0.852259f, 0.852360f, 0.852460f, 0.852560f, 0.852660f, 0.852760f, 0.852861f,
+ 0.852961f, 0.853061f, 0.853161f, 0.853261f, 0.853361f, 0.853461f, 0.853561f, 0.853660f,
+ 0.853760f, 0.853860f, 0.853960f, 0.854060f, 0.854159f, 0.854259f, 0.854359f, 0.854458f,
+ 0.854558f, 0.854658f, 0.854757f, 0.854857f, 0.854956f, 0.855056f, 0.855155f, 0.855254f,
+ 0.855354f, 0.855453f, 0.855552f, 0.855651f, 0.855751f, 0.855850f, 0.855949f, 0.856048f,
+ 0.856147f, 0.856246f, 0.856345f, 0.856444f, 0.856543f, 0.856642f, 0.856741f, 0.856840f,
+ 0.856939f, 0.857038f, 0.857137f, 0.857235f, 0.857334f, 0.857433f, 0.857531f, 0.857630f,
+ 0.857729f, 0.857827f, 0.857926f, 0.858024f, 0.858123f, 0.858221f, 0.858320f, 0.858418f,
+ 0.858516f, 0.858615f, 0.858713f, 0.858811f, 0.858909f, 0.859007f, 0.859106f, 0.859204f,
+ 0.859302f, 0.859400f, 0.859498f, 0.859596f, 0.859694f, 0.859792f, 0.859890f, 0.859988f,
+ 0.860085f, 0.860183f, 0.860281f, 0.860379f, 0.860476f, 0.860574f, 0.860672f, 0.860769f,
+ 0.860867f, 0.860964f, 0.861062f, 0.861160f, 0.861257f, 0.861354f, 0.861452f, 0.861549f,
+ 0.861646f, 0.861744f, 0.861841f, 0.861938f, 0.862035f, 0.862133f, 0.862230f, 0.862327f,
+ 0.862424f, 0.862521f, 0.862618f, 0.862715f, 0.862812f, 0.862909f, 0.863006f, 0.863103f,
+ 0.863199f, 0.863296f, 0.863393f, 0.863490f, 0.863586f, 0.863683f, 0.863780f, 0.863876f,
+ 0.863973f, 0.864069f, 0.864166f, 0.864262f, 0.864359f, 0.864455f, 0.864552f, 0.864648f,
+ 0.864744f, 0.864841f, 0.864937f, 0.865033f, 0.865129f, 0.865225f, 0.865321f, 0.865418f,
+ 0.865514f, 0.865610f, 0.865706f, 0.865802f, 0.865898f, 0.865993f, 0.866089f, 0.866185f,
+ 0.866281f, 0.866377f, 0.866472f, 0.866568f, 0.866664f, 0.866759f, 0.866855f, 0.866951f,
+ 0.867046f, 0.867142f, 0.867237f, 0.867333f, 0.867428f, 0.867523f, 0.867619f, 0.867714f,
+ 0.867809f, 0.867905f, 0.868000f, 0.868095f, 0.868190f, 0.868285f, 0.868381f, 0.868476f,
+ 0.868571f, 0.868666f, 0.868761f, 0.868856f, 0.868951f, 0.869045f, 0.869140f, 0.869235f,
+ 0.869330f, 0.869425f, 0.869519f, 0.869614f, 0.869709f, 0.869803f, 0.869898f, 0.869992f,
+ 0.870087f, 0.870182f, 0.870276f, 0.870370f, 0.870465f, 0.870559f, 0.870654f, 0.870748f,
+ 0.870842f, 0.870936f, 0.871031f, 0.871125f, 0.871219f, 0.871313f, 0.871407f, 0.871501f,
+ 0.871595f, 0.871689f, 0.871783f, 0.871877f, 0.871971f, 0.872065f, 0.872159f, 0.872252f,
+ 0.872346f, 0.872440f, 0.872534f, 0.872627f, 0.872721f, 0.872814f, 0.872908f, 0.873001f,
+ 0.873095f, 0.873188f, 0.873282f, 0.873375f, 0.873469f, 0.873562f, 0.873655f, 0.873749f,
+ 0.873842f, 0.873935f, 0.874028f, 0.874121f, 0.874215f, 0.874308f, 0.874401f, 0.874494f,
+ 0.874587f, 0.874680f, 0.874773f, 0.874865f, 0.874958f, 0.875051f, 0.875144f, 0.875237f,
+ 0.875329f, 0.875422f, 0.875515f, 0.875607f, 0.875700f, 0.875793f, 0.875885f, 0.875978f,
+ 0.876070f, 0.876163f, 0.876255f, 0.876347f, 0.876440f, 0.876532f, 0.876624f, 0.876716f,
+ 0.876809f, 0.876901f, 0.876993f, 0.877085f, 0.877177f, 0.877269f, 0.877361f, 0.877453f,
+ 0.877545f, 0.877637f, 0.877729f, 0.877821f, 0.877913f, 0.878005f, 0.878096f, 0.878188f,
+ 0.878280f, 0.878371f, 0.878463f, 0.878555f, 0.878646f, 0.878738f, 0.878829f, 0.878921f,
+ 0.879012f, 0.879104f, 0.879195f, 0.879286f, 0.879378f, 0.879469f, 0.879560f, 0.879651f,
+ 0.879743f, 0.879834f, 0.879925f, 0.880016f, 0.880107f, 0.880198f, 0.880289f, 0.880380f,
+ 0.880471f, 0.880562f, 0.880653f, 0.880743f, 0.880834f, 0.880925f, 0.881016f, 0.881106f,
+ 0.881197f, 0.881288f, 0.881378f, 0.881469f, 0.881559f, 0.881650f, 0.881740f, 0.881831f,
+ 0.881921f, 0.882012f, 0.882102f, 0.882192f, 0.882283f, 0.882373f, 0.882463f, 0.882553f,
+ 0.882643f, 0.882733f, 0.882824f, 0.882914f, 0.883004f, 0.883094f, 0.883184f, 0.883273f,
+ 0.883363f, 0.883453f, 0.883543f, 0.883633f, 0.883723f, 0.883812f, 0.883902f, 0.883992f,
+ 0.884081f, 0.884171f, 0.884260f, 0.884350f, 0.884439f, 0.884529f, 0.884618f, 0.884708f,
+ 0.884797f, 0.884886f, 0.884976f, 0.885065f, 0.885154f, 0.885243f, 0.885333f, 0.885422f,
+ 0.885511f, 0.885600f, 0.885689f, 0.885778f, 0.885867f, 0.885956f, 0.886045f, 0.886134f,
+ 0.886223f, 0.886311f, 0.886400f, 0.886489f, 0.886578f, 0.886666f, 0.886755f, 0.886844f,
+ 0.886932f, 0.887021f, 0.887109f, 0.887198f, 0.887286f, 0.887375f, 0.887463f, 0.887551f,
+ 0.887640f, 0.887728f, 0.887816f, 0.887904f, 0.887993f, 0.888081f, 0.888169f, 0.888257f,
+ 0.888345f, 0.888433f, 0.888521f, 0.888609f, 0.888697f, 0.888785f, 0.888873f, 0.888961f,
+ 0.889048f, 0.889136f, 0.889224f, 0.889312f, 0.889399f, 0.889487f, 0.889574f, 0.889662f,
+ 0.889750f, 0.889837f, 0.889925f, 0.890012f, 0.890099f, 0.890187f, 0.890274f, 0.890361f,
+ 0.890449f, 0.890536f, 0.890623f, 0.890710f, 0.890797f, 0.890885f, 0.890972f, 0.891059f,
+ 0.891146f, 0.891233f, 0.891320f, 0.891407f, 0.891493f, 0.891580f, 0.891667f, 0.891754f,
+ 0.891841f, 0.891927f, 0.892014f, 0.892101f, 0.892187f, 0.892274f, 0.892361f, 0.892447f,
+ 0.892534f, 0.892620f, 0.892706f, 0.892793f, 0.892879f, 0.892965f, 0.893052f, 0.893138f,
+ 0.893224f, 0.893310f, 0.893397f, 0.893483f, 0.893569f, 0.893655f, 0.893741f, 0.893827f,
+ 0.893913f, 0.893999f, 0.894085f, 0.894171f, 0.894256f, 0.894342f, 0.894428f, 0.894514f,
+ 0.894599f, 0.894685f, 0.894771f, 0.894856f, 0.894942f, 0.895028f, 0.895113f, 0.895198f,
+ 0.895284f, 0.895369f, 0.895455f, 0.895540f, 0.895625f, 0.895711f, 0.895796f, 0.895881f,
+ 0.895966f, 0.896051f, 0.896137f, 0.896222f, 0.896307f, 0.896392f, 0.896477f, 0.896562f,
+ 0.896646f, 0.896731f, 0.896816f, 0.896901f, 0.896986f, 0.897071f, 0.897155f, 0.897240f,
+ 0.897325f, 0.897409f, 0.897494f, 0.897578f, 0.897663f, 0.897747f, 0.897832f, 0.897916f,
+ 0.898001f, 0.898085f, 0.898169f, 0.898254f, 0.898338f, 0.898422f, 0.898506f, 0.898590f,
+ 0.898674f, 0.898759f, 0.898843f, 0.898927f, 0.899011f, 0.899095f, 0.899179f, 0.899262f,
+ 0.899346f, 0.899430f, 0.899514f, 0.899598f, 0.899681f, 0.899765f, 0.899849f, 0.899932f,
+ 0.900016f, 0.900099f, 0.900183f, 0.900266f, 0.900350f, 0.900433f, 0.900517f, 0.900600f,
+ 0.900683f, 0.900767f, 0.900850f, 0.900933f, 0.901016f, 0.901100f, 0.901183f, 0.901266f,
+ 0.901349f, 0.901432f, 0.901515f, 0.901598f, 0.901681f, 0.901764f, 0.901847f, 0.901929f,
+ 0.902012f, 0.902095f, 0.902178f, 0.902260f, 0.902343f, 0.902426f, 0.902508f, 0.902591f,
+ 0.902673f, 0.902756f, 0.902838f, 0.902921f, 0.903003f, 0.903085f, 0.903168f, 0.903250f,
+ 0.903332f, 0.903415f, 0.903497f, 0.903579f, 0.903661f, 0.903743f, 0.903825f, 0.903907f,
+ 0.903989f, 0.904071f, 0.904153f, 0.904235f, 0.904317f, 0.904399f, 0.904481f, 0.904562f,
+ 0.904644f, 0.904726f, 0.904807f, 0.904889f, 0.904971f, 0.905052f, 0.905134f, 0.905215f,
+ 0.905297f, 0.905378f, 0.905460f, 0.905541f, 0.905622f, 0.905704f, 0.905785f, 0.905866f,
+ 0.905947f, 0.906028f, 0.906110f, 0.906191f, 0.906272f, 0.906353f, 0.906434f, 0.906515f,
+ 0.906596f, 0.906677f, 0.906757f, 0.906838f, 0.906919f, 0.907000f, 0.907081f, 0.907161f,
+ 0.907242f, 0.907323f, 0.907403f, 0.907484f, 0.907564f, 0.907645f, 0.907725f, 0.907806f,
+ 0.907886f, 0.907966f, 0.908047f, 0.908127f, 0.908207f, 0.908288f, 0.908368f, 0.908448f,
+ 0.908528f, 0.908608f, 0.908688f, 0.908768f, 0.908848f, 0.908928f, 0.909008f, 0.909088f,
+ 0.909168f, 0.909248f, 0.909328f, 0.909407f, 0.909487f, 0.909567f, 0.909646f, 0.909726f,
+ 0.909806f, 0.909885f, 0.909965f, 0.910044f, 0.910124f, 0.910203f, 0.910283f, 0.910362f,
+ 0.910441f, 0.910521f, 0.910600f, 0.910679f, 0.910758f, 0.910837f, 0.910917f, 0.910996f,
+ 0.911075f, 0.911154f, 0.911233f, 0.911312f, 0.911391f, 0.911470f, 0.911548f, 0.911627f,
+ 0.911706f, 0.911785f, 0.911864f, 0.911942f, 0.912021f, 0.912099f, 0.912178f, 0.912257f,
+ 0.912335f, 0.912414f, 0.912492f, 0.912571f, 0.912649f, 0.912727f, 0.912806f, 0.912884f,
+ 0.912962f, 0.913040f, 0.913119f, 0.913197f, 0.913275f, 0.913353f, 0.913431f, 0.913509f,
+ 0.913587f, 0.913665f, 0.913743f, 0.913821f, 0.913899f, 0.913976f, 0.914054f, 0.914132f,
+ 0.914210f, 0.914287f, 0.914365f, 0.914443f, 0.914520f, 0.914598f, 0.914675f, 0.914753f,
+ 0.914830f, 0.914908f, 0.914985f, 0.915062f, 0.915140f, 0.915217f, 0.915294f, 0.915372f,
+ 0.915449f, 0.915526f, 0.915603f, 0.915680f, 0.915757f, 0.915834f, 0.915911f, 0.915988f,
+ 0.916065f, 0.916142f, 0.916219f, 0.916296f, 0.916372f, 0.916449f, 0.916526f, 0.916602f,
+ 0.916679f, 0.916756f, 0.916832f, 0.916909f, 0.916985f, 0.917062f, 0.917138f, 0.917215f,
+ 0.917291f, 0.917367f, 0.917444f, 0.917520f, 0.917596f, 0.917672f, 0.917749f, 0.917825f,
+ 0.917901f, 0.917977f, 0.918053f, 0.918129f, 0.918205f, 0.918281f, 0.918357f, 0.918433f,
+ 0.918508f, 0.918584f, 0.918660f, 0.918736f, 0.918811f, 0.918887f, 0.918963f, 0.919038f,
+ 0.919114f, 0.919189f, 0.919265f, 0.919340f, 0.919416f, 0.919491f, 0.919567f, 0.919642f,
+ 0.919717f, 0.919792f, 0.919868f, 0.919943f, 0.920018f, 0.920093f, 0.920168f, 0.920243f,
+ 0.920318f, 0.920393f, 0.920468f, 0.920543f, 0.920618f, 0.920693f, 0.920768f, 0.920842f,
+ 0.920917f, 0.920992f, 0.921067f, 0.921141f, 0.921216f, 0.921291f, 0.921365f, 0.921440f,
+ 0.921514f, 0.921588f, 0.921663f, 0.921737f, 0.921812f, 0.921886f, 0.921960f, 0.922034f,
+ 0.922109f, 0.922183f, 0.922257f, 0.922331f, 0.922405f, 0.922479f, 0.922553f, 0.922627f,
+ 0.922701f, 0.922775f, 0.922849f, 0.922923f, 0.922997f, 0.923070f, 0.923144f, 0.923218f,
+ 0.923291f, 0.923365f, 0.923439f, 0.923512f, 0.923586f, 0.923659f, 0.923733f, 0.923806f,
+ 0.923880f, 0.923953f, 0.924026f, 0.924100f, 0.924173f, 0.924246f, 0.924319f, 0.924392f,
+ 0.924465f, 0.924539f, 0.924612f, 0.924685f, 0.924758f, 0.924831f, 0.924904f, 0.924976f,
+ 0.925049f, 0.925122f, 0.925195f, 0.925268f, 0.925340f, 0.925413f, 0.925486f, 0.925558f,
+ 0.925631f, 0.925703f, 0.925776f, 0.925848f, 0.925921f, 0.925993f, 0.926066f, 0.926138f,
+ 0.926210f, 0.926283f, 0.926355f, 0.926427f, 0.926499f, 0.926571f, 0.926643f, 0.926715f,
+ 0.926787f, 0.926859f, 0.926931f, 0.927003f, 0.927075f, 0.927147f, 0.927219f, 0.927291f,
+ 0.927363f, 0.927434f, 0.927506f, 0.927578f, 0.927649f, 0.927721f, 0.927792f, 0.927864f,
+ 0.927935f, 0.928007f, 0.928078f, 0.928150f, 0.928221f, 0.928292f, 0.928364f, 0.928435f,
+ 0.928506f, 0.928577f, 0.928648f, 0.928720f, 0.928791f, 0.928862f, 0.928933f, 0.929004f,
+ 0.929075f, 0.929146f, 0.929216f, 0.929287f, 0.929358f, 0.929429f, 0.929500f, 0.929570f,
+ 0.929641f, 0.929712f, 0.929782f, 0.929853f, 0.929923f, 0.929994f, 0.930064f, 0.930135f,
+ 0.930205f, 0.930275f, 0.930346f, 0.930416f, 0.930486f, 0.930556f, 0.930627f, 0.930697f,
+ 0.930767f, 0.930837f, 0.930907f, 0.930977f, 0.931047f, 0.931117f, 0.931187f, 0.931257f,
+ 0.931327f, 0.931397f, 0.931466f, 0.931536f, 0.931606f, 0.931675f, 0.931745f, 0.931815f,
+ 0.931884f, 0.931954f, 0.932023f, 0.932093f, 0.932162f, 0.932232f, 0.932301f, 0.932370f,
+ 0.932440f, 0.932509f, 0.932578f, 0.932647f, 0.932716f, 0.932786f, 0.932855f, 0.932924f,
+ 0.932993f, 0.933062f, 0.933131f, 0.933200f, 0.933269f, 0.933337f, 0.933406f, 0.933475f,
+ 0.933544f, 0.933612f, 0.933681f, 0.933750f, 0.933818f, 0.933887f, 0.933956f, 0.934024f,
+ 0.934093f, 0.934161f, 0.934229f, 0.934298f, 0.934366f, 0.934434f, 0.934503f, 0.934571f,
+ 0.934639f, 0.934707f, 0.934775f, 0.934844f, 0.934912f, 0.934980f, 0.935048f, 0.935116f,
+ 0.935184f, 0.935251f, 0.935319f, 0.935387f, 0.935455f, 0.935523f, 0.935590f, 0.935658f,
+ 0.935726f, 0.935793f, 0.935861f, 0.935928f, 0.935996f, 0.936063f, 0.936131f, 0.936198f,
+ 0.936266f, 0.936333f, 0.936400f, 0.936468f, 0.936535f, 0.936602f, 0.936669f, 0.936736f,
+ 0.936803f, 0.936871f, 0.936938f, 0.937005f, 0.937072f, 0.937138f, 0.937205f, 0.937272f,
+ 0.937339f, 0.937406f, 0.937473f, 0.937539f, 0.937606f, 0.937673f, 0.937739f, 0.937806f,
+ 0.937872f, 0.937939f, 0.938005f, 0.938072f, 0.938138f, 0.938205f, 0.938271f, 0.938337f,
+ 0.938404f, 0.938470f, 0.938536f, 0.938602f, 0.938668f, 0.938734f, 0.938800f, 0.938866f,
+ 0.938932f, 0.938998f, 0.939064f, 0.939130f, 0.939196f, 0.939262f, 0.939328f, 0.939394f,
+ 0.939459f, 0.939525f, 0.939591f, 0.939656f, 0.939722f, 0.939787f, 0.939853f, 0.939918f,
+ 0.939984f, 0.940049f, 0.940115f, 0.940180f, 0.940245f, 0.940310f, 0.940376f, 0.940441f,
+ 0.940506f, 0.940571f, 0.940636f, 0.940701f, 0.940766f, 0.940831f, 0.940896f, 0.940961f,
+ 0.941026f, 0.941091f, 0.941156f, 0.941221f, 0.941285f, 0.941350f, 0.941415f, 0.941479f,
+ 0.941544f, 0.941609f, 0.941673f, 0.941738f, 0.941802f, 0.941867f, 0.941931f, 0.941995f,
+ 0.942060f, 0.942124f, 0.942188f, 0.942253f, 0.942317f, 0.942381f, 0.942445f, 0.942509f,
+ 0.942573f, 0.942637f, 0.942701f, 0.942765f, 0.942829f, 0.942893f, 0.942957f, 0.943021f,
+ 0.943084f, 0.943148f, 0.943212f, 0.943276f, 0.943339f, 0.943403f, 0.943466f, 0.943530f,
+ 0.943593f, 0.943657f, 0.943720f, 0.943784f, 0.943847f, 0.943910f, 0.943974f, 0.944037f,
+ 0.944100f, 0.944163f, 0.944227f, 0.944290f, 0.944353f, 0.944416f, 0.944479f, 0.944542f,
+ 0.944605f, 0.944668f, 0.944731f, 0.944793f, 0.944856f, 0.944919f, 0.944982f, 0.945045f,
+ 0.945107f, 0.945170f, 0.945232f, 0.945295f, 0.945358f, 0.945420f, 0.945482f, 0.945545f,
+ 0.945607f, 0.945670f, 0.945732f, 0.945794f, 0.945857f, 0.945919f, 0.945981f, 0.946043f,
+ 0.946105f, 0.946167f, 0.946229f, 0.946291f, 0.946353f, 0.946415f, 0.946477f, 0.946539f,
+ 0.946601f, 0.946663f, 0.946724f, 0.946786f, 0.946848f, 0.946910f, 0.946971f, 0.947033f,
+ 0.947094f, 0.947156f, 0.947217f, 0.947279f, 0.947340f, 0.947402f, 0.947463f, 0.947524f,
+ 0.947586f, 0.947647f, 0.947708f, 0.947769f, 0.947830f, 0.947891f, 0.947953f, 0.948014f,
+ 0.948075f, 0.948136f, 0.948196f, 0.948257f, 0.948318f, 0.948379f, 0.948440f, 0.948501f,
+ 0.948561f, 0.948622f, 0.948683f, 0.948743f, 0.948804f, 0.948864f, 0.948925f, 0.948985f,
+ 0.949046f, 0.949106f, 0.949167f, 0.949227f, 0.949287f, 0.949348f, 0.949408f, 0.949468f,
+ 0.949528f, 0.949588f, 0.949648f, 0.949708f, 0.949768f, 0.949829f, 0.949888f, 0.949948f,
+ 0.950008f, 0.950068f, 0.950128f, 0.950188f, 0.950247f, 0.950307f, 0.950367f, 0.950426f,
+ 0.950486f, 0.950546f, 0.950605f, 0.950665f, 0.950724f, 0.950784f, 0.950843f, 0.950902f,
+ 0.950962f, 0.951021f, 0.951080f, 0.951139f, 0.951199f, 0.951258f, 0.951317f, 0.951376f,
+ 0.951435f, 0.951494f, 0.951553f, 0.951612f, 0.951671f, 0.951730f, 0.951789f, 0.951847f,
+ 0.951906f, 0.951965f, 0.952024f, 0.952082f, 0.952141f, 0.952199f, 0.952258f, 0.952317f,
+ 0.952375f, 0.952433f, 0.952492f, 0.952550f, 0.952609f, 0.952667f, 0.952725f, 0.952783f,
+ 0.952842f, 0.952900f, 0.952958f, 0.953016f, 0.953074f, 0.953132f, 0.953190f, 0.953248f,
+ 0.953306f, 0.953364f, 0.953422f, 0.953480f, 0.953537f, 0.953595f, 0.953653f, 0.953711f,
+ 0.953768f, 0.953826f, 0.953883f, 0.953941f, 0.953998f, 0.954056f, 0.954113f, 0.954171f,
+ 0.954228f, 0.954285f, 0.954343f, 0.954400f, 0.954457f, 0.954514f, 0.954572f, 0.954629f,
+ 0.954686f, 0.954743f, 0.954800f, 0.954857f, 0.954914f, 0.954971f, 0.955028f, 0.955084f,
+ 0.955141f, 0.955198f, 0.955255f, 0.955311f, 0.955368f, 0.955425f, 0.955481f, 0.955538f,
+ 0.955594f, 0.955651f, 0.955707f, 0.955764f, 0.955820f, 0.955876f, 0.955933f, 0.955989f,
+ 0.956045f, 0.956101f, 0.956158f, 0.956214f, 0.956270f, 0.956326f, 0.956382f, 0.956438f,
+ 0.956494f, 0.956550f, 0.956606f, 0.956662f, 0.956717f, 0.956773f, 0.956829f, 0.956885f,
+ 0.956940f, 0.956996f, 0.957052f, 0.957107f, 0.957163f, 0.957218f, 0.957274f, 0.957329f,
+ 0.957385f, 0.957440f, 0.957495f, 0.957550f, 0.957606f, 0.957661f, 0.957716f, 0.957771f,
+ 0.957826f, 0.957882f, 0.957937f, 0.957992f, 0.958046f, 0.958101f, 0.958156f, 0.958211f,
+ 0.958266f, 0.958321f, 0.958376f, 0.958430f, 0.958485f, 0.958540f, 0.958594f, 0.958649f,
+ 0.958703f, 0.958758f, 0.958812f, 0.958867f, 0.958921f, 0.958976f, 0.959030f, 0.959084f,
+ 0.959139f, 0.959193f, 0.959247f, 0.959301f, 0.959355f, 0.959409f, 0.959463f, 0.959518f,
+ 0.959572f, 0.959625f, 0.959679f, 0.959733f, 0.959787f, 0.959841f, 0.959895f, 0.959948f,
+ 0.960002f, 0.960056f, 0.960109f, 0.960163f, 0.960217f, 0.960270f, 0.960324f, 0.960377f,
+ 0.960431f, 0.960484f, 0.960537f, 0.960591f, 0.960644f, 0.960697f, 0.960750f, 0.960804f,
+ 0.960857f, 0.960910f, 0.960963f, 0.961016f, 0.961069f, 0.961122f, 0.961175f, 0.961228f,
+ 0.961280f, 0.961333f, 0.961386f, 0.961439f, 0.961492f, 0.961544f, 0.961597f, 0.961649f,
+ 0.961702f, 0.961755f, 0.961807f, 0.961860f, 0.961912f, 0.961964f, 0.962017f, 0.962069f,
+ 0.962121f, 0.962174f, 0.962226f, 0.962278f, 0.962330f, 0.962382f, 0.962434f, 0.962486f,
+ 0.962538f, 0.962590f, 0.962642f, 0.962694f, 0.962746f, 0.962798f, 0.962850f, 0.962902f,
+ 0.962953f, 0.963005f, 0.963057f, 0.963108f, 0.963160f, 0.963211f, 0.963263f, 0.963314f,
+ 0.963366f, 0.963417f, 0.963469f, 0.963520f, 0.963571f, 0.963623f, 0.963674f, 0.963725f,
+ 0.963776f, 0.963827f, 0.963878f, 0.963929f, 0.963980f, 0.964031f, 0.964082f, 0.964133f,
+ 0.964184f, 0.964235f, 0.964286f, 0.964336f, 0.964387f, 0.964438f, 0.964489f, 0.964539f,
+ 0.964590f, 0.964640f, 0.964691f, 0.964741f, 0.964792f, 0.964842f, 0.964893f, 0.964943f,
+ 0.964993f, 0.965044f, 0.965094f, 0.965144f, 0.965194f, 0.965244f, 0.965294f, 0.965344f,
+ 0.965394f, 0.965444f, 0.965494f, 0.965544f, 0.965594f, 0.965644f, 0.965694f, 0.965744f,
+ 0.965793f, 0.965843f, 0.965893f, 0.965942f, 0.965992f, 0.966042f, 0.966091f, 0.966141f,
+ 0.966190f, 0.966239f, 0.966289f, 0.966338f, 0.966387f, 0.966437f, 0.966486f, 0.966535f,
+ 0.966584f, 0.966633f, 0.966683f, 0.966732f, 0.966781f, 0.966830f, 0.966879f, 0.966928f,
+ 0.966976f, 0.967025f, 0.967074f, 0.967123f, 0.967172f, 0.967220f, 0.967269f, 0.967318f,
+ 0.967366f, 0.967415f, 0.967463f, 0.967512f, 0.967560f, 0.967609f, 0.967657f, 0.967706f,
+ 0.967754f, 0.967802f, 0.967850f, 0.967899f, 0.967947f, 0.967995f, 0.968043f, 0.968091f,
+ 0.968139f, 0.968187f, 0.968235f, 0.968283f, 0.968331f, 0.968379f, 0.968427f, 0.968474f,
+ 0.968522f, 0.968570f, 0.968617f, 0.968665f, 0.968713f, 0.968760f, 0.968808f, 0.968855f,
+ 0.968903f, 0.968950f, 0.968998f, 0.969045f, 0.969092f, 0.969140f, 0.969187f, 0.969234f,
+ 0.969281f, 0.969328f, 0.969375f, 0.969423f, 0.969470f, 0.969517f, 0.969564f, 0.969611f,
+ 0.969657f, 0.969704f, 0.969751f, 0.969798f, 0.969845f, 0.969891f, 0.969938f, 0.969985f,
+ 0.970031f, 0.970078f, 0.970124f, 0.970171f, 0.970217f, 0.970264f, 0.970310f, 0.970357f,
+ 0.970403f, 0.970449f, 0.970495f, 0.970542f, 0.970588f, 0.970634f, 0.970680f, 0.970726f,
+ 0.970772f, 0.970818f, 0.970864f, 0.970910f, 0.970956f, 0.971002f, 0.971048f, 0.971093f,
+ 0.971139f, 0.971185f, 0.971231f, 0.971276f, 0.971322f, 0.971367f, 0.971413f, 0.971458f,
+ 0.971504f, 0.971549f, 0.971595f, 0.971640f, 0.971685f, 0.971731f, 0.971776f, 0.971821f,
+ 0.971866f, 0.971911f, 0.971957f, 0.972002f, 0.972047f, 0.972092f, 0.972137f, 0.972182f,
+ 0.972227f, 0.972271f, 0.972316f, 0.972361f, 0.972406f, 0.972450f, 0.972495f, 0.972540f,
+ 0.972584f, 0.972629f, 0.972673f, 0.972718f, 0.972762f, 0.972807f, 0.972851f, 0.972896f,
+ 0.972940f, 0.972984f, 0.973028f, 0.973073f, 0.973117f, 0.973161f, 0.973205f, 0.973249f,
+ 0.973293f, 0.973337f, 0.973381f, 0.973425f, 0.973469f, 0.973513f, 0.973557f, 0.973601f,
+ 0.973644f, 0.973688f, 0.973732f, 0.973775f, 0.973819f, 0.973862f, 0.973906f, 0.973949f,
+ 0.973993f, 0.974036f, 0.974080f, 0.974123f, 0.974166f, 0.974210f, 0.974253f, 0.974296f,
+ 0.974339f, 0.974383f, 0.974426f, 0.974469f, 0.974512f, 0.974555f, 0.974598f, 0.974641f,
+ 0.974684f, 0.974726f, 0.974769f, 0.974812f, 0.974855f, 0.974897f, 0.974940f, 0.974983f,
+ 0.975025f, 0.975068f, 0.975110f, 0.975153f, 0.975195f, 0.975238f, 0.975280f, 0.975323f,
+ 0.975365f, 0.975407f, 0.975449f, 0.975492f, 0.975534f, 0.975576f, 0.975618f, 0.975660f,
+ 0.975702f, 0.975744f, 0.975786f, 0.975828f, 0.975870f, 0.975912f, 0.975954f, 0.975995f,
+ 0.976037f, 0.976079f, 0.976120f, 0.976162f, 0.976204f, 0.976245f, 0.976287f, 0.976328f,
+ 0.976370f, 0.976411f, 0.976453f, 0.976494f, 0.976535f, 0.976576f, 0.976618f, 0.976659f,
+ 0.976700f, 0.976741f, 0.976782f, 0.976823f, 0.976864f, 0.976905f, 0.976946f, 0.976987f,
+ 0.977028f, 0.977069f, 0.977110f, 0.977151f, 0.977191f, 0.977232f, 0.977273f, 0.977313f,
+ 0.977354f, 0.977394f, 0.977435f, 0.977475f, 0.977516f, 0.977556f, 0.977597f, 0.977637f,
+ 0.977677f, 0.977718f, 0.977758f, 0.977798f, 0.977838f, 0.977878f, 0.977918f, 0.977959f,
+ 0.977998f, 0.978038f, 0.978078f, 0.978118f, 0.978158f, 0.978198f, 0.978238f, 0.978278f,
+ 0.978317f, 0.978357f, 0.978397f, 0.978436f, 0.978476f, 0.978516f, 0.978555f, 0.978594f,
+ 0.978634f, 0.978673f, 0.978713f, 0.978752f, 0.978791f, 0.978831f, 0.978870f, 0.978909f,
+ 0.978948f, 0.978987f, 0.979026f, 0.979065f, 0.979104f, 0.979143f, 0.979182f, 0.979221f,
+ 0.979260f, 0.979299f, 0.979338f, 0.979376f, 0.979415f, 0.979454f, 0.979493f, 0.979531f,
+ 0.979570f, 0.979608f, 0.979647f, 0.979685f, 0.979724f, 0.979762f, 0.979800f, 0.979839f,
+ 0.979877f, 0.979915f, 0.979954f, 0.979992f, 0.980030f, 0.980068f, 0.980106f, 0.980144f,
+ 0.980182f, 0.980220f, 0.980258f, 0.980296f, 0.980334f, 0.980372f, 0.980409f, 0.980447f,
+ 0.980485f, 0.980523f, 0.980560f, 0.980598f, 0.980635f, 0.980673f, 0.980710f, 0.980748f,
+ 0.980785f, 0.980823f, 0.980860f, 0.980897f, 0.980935f, 0.980972f, 0.981009f, 0.981046f,
+ 0.981083f, 0.981120f, 0.981158f, 0.981195f, 0.981232f, 0.981269f, 0.981305f, 0.981342f,
+ 0.981379f, 0.981416f, 0.981453f, 0.981490f, 0.981526f, 0.981563f, 0.981600f, 0.981636f,
+ 0.981673f, 0.981709f, 0.981746f, 0.981782f, 0.981819f, 0.981855f, 0.981891f, 0.981928f,
+ 0.981964f, 0.982000f, 0.982036f, 0.982072f, 0.982109f, 0.982145f, 0.982181f, 0.982217f,
+ 0.982253f, 0.982289f, 0.982325f, 0.982360f, 0.982396f, 0.982432f, 0.982468f, 0.982504f,
+ 0.982539f, 0.982575f, 0.982611f, 0.982646f, 0.982682f, 0.982717f, 0.982753f, 0.982788f,
+ 0.982824f, 0.982859f, 0.982894f, 0.982930f, 0.982965f, 0.983000f, 0.983035f, 0.983070f,
+ 0.983105f, 0.983141f, 0.983176f, 0.983211f, 0.983246f, 0.983281f, 0.983315f, 0.983350f,
+ 0.983385f, 0.983420f, 0.983455f, 0.983489f, 0.983524f, 0.983559f, 0.983593f, 0.983628f,
+ 0.983662f, 0.983697f, 0.983731f, 0.983766f, 0.983800f, 0.983835f, 0.983869f, 0.983903f,
+ 0.983937f, 0.983972f, 0.984006f, 0.984040f, 0.984074f, 0.984108f, 0.984142f, 0.984176f,
+ 0.984210f, 0.984244f, 0.984278f, 0.984312f, 0.984346f, 0.984379f, 0.984413f, 0.984447f,
+ 0.984480f, 0.984514f, 0.984548f, 0.984581f, 0.984615f, 0.984648f, 0.984682f, 0.984715f,
+ 0.984748f, 0.984782f, 0.984815f, 0.984848f, 0.984882f, 0.984915f, 0.984948f, 0.984981f,
+ 0.985014f, 0.985047f, 0.985080f, 0.985113f, 0.985146f, 0.985179f, 0.985212f, 0.985245f,
+ 0.985278f, 0.985310f, 0.985343f, 0.985376f, 0.985408f, 0.985441f, 0.985474f, 0.985506f,
+ 0.985539f, 0.985571f, 0.985604f, 0.985636f, 0.985668f, 0.985701f, 0.985733f, 0.985765f,
+ 0.985798f, 0.985830f, 0.985862f, 0.985894f, 0.985926f, 0.985958f, 0.985990f, 0.986022f,
+ 0.986054f, 0.986086f, 0.986118f, 0.986150f, 0.986181f, 0.986213f, 0.986245f, 0.986276f,
+ 0.986308f, 0.986340f, 0.986371f, 0.986403f, 0.986434f, 0.986466f, 0.986497f, 0.986529f,
+ 0.986560f, 0.986591f, 0.986623f, 0.986654f, 0.986685f, 0.986716f, 0.986747f, 0.986778f,
+ 0.986809f, 0.986840f, 0.986871f, 0.986902f, 0.986933f, 0.986964f, 0.986995f, 0.987026f,
+ 0.987057f, 0.987087f, 0.987118f, 0.987149f, 0.987179f, 0.987210f, 0.987240f, 0.987271f,
+ 0.987301f, 0.987332f, 0.987362f, 0.987393f, 0.987423f, 0.987453f, 0.987484f, 0.987514f,
+ 0.987544f, 0.987574f, 0.987604f, 0.987634f, 0.987664f, 0.987694f, 0.987724f, 0.987754f,
+ 0.987784f, 0.987814f, 0.987844f, 0.987874f, 0.987903f, 0.987933f, 0.987963f, 0.987992f,
+ 0.988022f, 0.988052f, 0.988081f, 0.988111f, 0.988140f, 0.988169f, 0.988199f, 0.988228f,
+ 0.988258f, 0.988287f, 0.988316f, 0.988345f, 0.988374f, 0.988404f, 0.988433f, 0.988462f,
+ 0.988491f, 0.988520f, 0.988549f, 0.988578f, 0.988607f, 0.988635f, 0.988664f, 0.988693f,
+ 0.988722f, 0.988750f, 0.988779f, 0.988808f, 0.988836f, 0.988865f, 0.988893f, 0.988922f,
+ 0.988950f, 0.988979f, 0.989007f, 0.989035f, 0.989064f, 0.989092f, 0.989120f, 0.989148f,
+ 0.989177f, 0.989205f, 0.989233f, 0.989261f, 0.989289f, 0.989317f, 0.989345f, 0.989373f,
+ 0.989400f, 0.989428f, 0.989456f, 0.989484f, 0.989511f, 0.989539f, 0.989567f, 0.989594f,
+ 0.989622f, 0.989650f, 0.989677f, 0.989704f, 0.989732f, 0.989759f, 0.989787f, 0.989814f,
+ 0.989841f, 0.989869f, 0.989896f, 0.989923f, 0.989950f, 0.989977f, 0.990004f, 0.990031f,
+ 0.990058f, 0.990085f, 0.990112f, 0.990139f, 0.990166f, 0.990193f, 0.990219f, 0.990246f,
+ 0.990273f, 0.990299f, 0.990326f, 0.990353f, 0.990379f, 0.990406f, 0.990432f, 0.990459f,
+ 0.990485f, 0.990511f, 0.990538f, 0.990564f, 0.990590f, 0.990617f, 0.990643f, 0.990669f,
+ 0.990695f, 0.990721f, 0.990747f, 0.990773f, 0.990799f, 0.990825f, 0.990851f, 0.990877f,
+ 0.990903f, 0.990928f, 0.990954f, 0.990980f, 0.991006f, 0.991031f, 0.991057f, 0.991082f,
+ 0.991108f, 0.991133f, 0.991159f, 0.991184f, 0.991210f, 0.991235f, 0.991260f, 0.991286f,
+ 0.991311f, 0.991336f, 0.991361f, 0.991386f, 0.991411f, 0.991437f, 0.991462f, 0.991487f,
+ 0.991511f, 0.991536f, 0.991561f, 0.991586f, 0.991611f, 0.991636f, 0.991660f, 0.991685f,
+ 0.991710f, 0.991734f, 0.991759f, 0.991783f, 0.991808f, 0.991832f, 0.991857f, 0.991881f,
+ 0.991906f, 0.991930f, 0.991954f, 0.991979f, 0.992003f, 0.992027f, 0.992051f, 0.992075f,
+ 0.992099f, 0.992123f, 0.992147f, 0.992171f, 0.992195f, 0.992219f, 0.992243f, 0.992267f,
+ 0.992291f, 0.992314f, 0.992338f, 0.992362f, 0.992385f, 0.992409f, 0.992433f, 0.992456f,
+ 0.992480f, 0.992503f, 0.992526f, 0.992550f, 0.992573f, 0.992596f, 0.992620f, 0.992643f,
+ 0.992666f, 0.992689f, 0.992712f, 0.992736f, 0.992759f, 0.992782f, 0.992805f, 0.992828f,
+ 0.992850f, 0.992873f, 0.992896f, 0.992919f, 0.992942f, 0.992964f, 0.992987f, 0.993010f,
+ 0.993032f, 0.993055f, 0.993077f, 0.993100f, 0.993122f, 0.993145f, 0.993167f, 0.993190f,
+ 0.993212f, 0.993234f, 0.993257f, 0.993279f, 0.993301f, 0.993323f, 0.993345f, 0.993367f,
+ 0.993389f, 0.993411f, 0.993433f, 0.993455f, 0.993477f, 0.993499f, 0.993521f, 0.993542f,
+ 0.993564f, 0.993586f, 0.993608f, 0.993629f, 0.993651f, 0.993672f, 0.993694f, 0.993715f,
+ 0.993737f, 0.993758f, 0.993779f, 0.993801f, 0.993822f, 0.993843f, 0.993865f, 0.993886f,
+ 0.993907f, 0.993928f, 0.993949f, 0.993970f, 0.993991f, 0.994012f, 0.994033f, 0.994054f,
+ 0.994075f, 0.994096f, 0.994116f, 0.994137f, 0.994158f, 0.994179f, 0.994199f, 0.994220f,
+ 0.994240f, 0.994261f, 0.994281f, 0.994302f, 0.994322f, 0.994343f, 0.994363f, 0.994383f,
+ 0.994404f, 0.994424f, 0.994444f, 0.994464f, 0.994484f, 0.994505f, 0.994525f, 0.994545f,
+ 0.994565f, 0.994585f, 0.994604f, 0.994624f, 0.994644f, 0.994664f, 0.994684f, 0.994703f,
+ 0.994723f, 0.994743f, 0.994762f, 0.994782f, 0.994802f, 0.994821f, 0.994841f, 0.994860f,
+ 0.994879f, 0.994899f, 0.994918f, 0.994937f, 0.994957f, 0.994976f, 0.994995f, 0.995014f,
+ 0.995033f, 0.995052f, 0.995071f, 0.995090f, 0.995109f, 0.995128f, 0.995147f, 0.995166f,
+ 0.995185f, 0.995203f, 0.995222f, 0.995241f, 0.995260f, 0.995278f, 0.995297f, 0.995315f,
+ 0.995334f, 0.995352f, 0.995371f, 0.995389f, 0.995408f, 0.995426f, 0.995444f, 0.995463f,
+ 0.995481f, 0.995499f, 0.995517f, 0.995535f, 0.995553f, 0.995571f, 0.995589f, 0.995607f,
+ 0.995625f, 0.995643f, 0.995661f, 0.995679f, 0.995697f, 0.995714f, 0.995732f, 0.995750f,
+ 0.995767f, 0.995785f, 0.995803f, 0.995820f, 0.995838f, 0.995855f, 0.995872f, 0.995890f,
+ 0.995907f, 0.995925f, 0.995942f, 0.995959f, 0.995976f, 0.995993f, 0.996011f, 0.996028f,
+ 0.996045f, 0.996062f, 0.996079f, 0.996096f, 0.996113f, 0.996129f, 0.996146f, 0.996163f,
+ 0.996180f, 0.996197f, 0.996213f, 0.996230f, 0.996247f, 0.996263f, 0.996280f, 0.996296f,
+ 0.996313f, 0.996329f, 0.996345f, 0.996362f, 0.996378f, 0.996394f, 0.996411f, 0.996427f,
+ 0.996443f, 0.996459f, 0.996475f, 0.996491f, 0.996507f, 0.996523f, 0.996539f, 0.996555f,
+ 0.996571f, 0.996587f, 0.996603f, 0.996619f, 0.996634f, 0.996650f, 0.996666f, 0.996681f,
+ 0.996697f, 0.996712f, 0.996728f, 0.996743f, 0.996759f, 0.996774f, 0.996790f, 0.996805f,
+ 0.996820f, 0.996836f, 0.996851f, 0.996866f, 0.996881f, 0.996896f, 0.996911f, 0.996926f,
+ 0.996941f, 0.996956f, 0.996971f, 0.996986f, 0.997001f, 0.997016f, 0.997031f, 0.997045f,
+ 0.997060f, 0.997075f, 0.997089f, 0.997104f, 0.997119f, 0.997133f, 0.997148f, 0.997162f,
+ 0.997176f, 0.997191f, 0.997205f, 0.997219f, 0.997234f, 0.997248f, 0.997262f, 0.997276f,
+ 0.997290f, 0.997305f, 0.997319f, 0.997333f, 0.997347f, 0.997361f, 0.997374f, 0.997388f,
+ 0.997402f, 0.997416f, 0.997430f, 0.997443f, 0.997457f, 0.997471f, 0.997484f, 0.997498f,
+ 0.997511f, 0.997525f, 0.997538f, 0.997552f, 0.997565f, 0.997579f, 0.997592f, 0.997605f,
+ 0.997618f, 0.997632f, 0.997645f, 0.997658f, 0.997671f, 0.997684f, 0.997697f, 0.997710f,
+ 0.997723f, 0.997736f, 0.997749f, 0.997762f, 0.997774f, 0.997787f, 0.997800f, 0.997813f,
+ 0.997825f, 0.997838f, 0.997851f, 0.997863f, 0.997876f, 0.997888f, 0.997901f, 0.997913f,
+ 0.997925f, 0.997938f, 0.997950f, 0.997962f, 0.997974f, 0.997987f, 0.997999f, 0.998011f,
+ 0.998023f, 0.998035f, 0.998047f, 0.998059f, 0.998071f, 0.998083f, 0.998094f, 0.998106f,
+ 0.998118f, 0.998130f, 0.998142f, 0.998153f, 0.998165f, 0.998176f, 0.998188f, 0.998200f,
+ 0.998211f, 0.998222f, 0.998234f, 0.998245f, 0.998257f, 0.998268f, 0.998279f, 0.998290f,
+ 0.998302f, 0.998313f, 0.998324f, 0.998335f, 0.998346f, 0.998357f, 0.998368f, 0.998379f,
+ 0.998390f, 0.998401f, 0.998411f, 0.998422f, 0.998433f, 0.998444f, 0.998454f, 0.998465f,
+ 0.998476f, 0.998486f, 0.998497f, 0.998507f, 0.998518f, 0.998528f, 0.998538f, 0.998549f,
+ 0.998559f, 0.998569f, 0.998580f, 0.998590f, 0.998600f, 0.998610f, 0.998620f, 0.998630f,
+ 0.998640f, 0.998650f, 0.998660f, 0.998670f, 0.998680f, 0.998690f, 0.998700f, 0.998709f,
+ 0.998719f, 0.998729f, 0.998738f, 0.998748f, 0.998758f, 0.998767f, 0.998777f, 0.998786f,
+ 0.998795f, 0.998805f, 0.998814f, 0.998824f, 0.998833f, 0.998842f, 0.998851f, 0.998860f,
+ 0.998870f, 0.998879f, 0.998888f, 0.998897f, 0.998906f, 0.998915f, 0.998924f, 0.998932f,
+ 0.998941f, 0.998950f, 0.998959f, 0.998968f, 0.998976f, 0.998985f, 0.998994f, 0.999002f,
+ 0.999011f, 0.999019f, 0.999028f, 0.999036f, 0.999044f, 0.999053f, 0.999061f, 0.999069f,
+ 0.999078f, 0.999086f, 0.999094f, 0.999102f, 0.999110f, 0.999118f, 0.999126f, 0.999134f,
+ 0.999142f, 0.999150f, 0.999158f, 0.999166f, 0.999174f, 0.999182f, 0.999189f, 0.999197f,
+ 0.999205f, 0.999212f, 0.999220f, 0.999228f, 0.999235f, 0.999243f, 0.999250f, 0.999257f,
+ 0.999265f, 0.999272f, 0.999279f, 0.999287f, 0.999294f, 0.999301f, 0.999308f, 0.999315f,
+ 0.999322f, 0.999329f, 0.999336f, 0.999343f, 0.999350f, 0.999357f, 0.999364f, 0.999371f,
+ 0.999378f, 0.999384f, 0.999391f, 0.999398f, 0.999404f, 0.999411f, 0.999418f, 0.999424f,
+ 0.999431f, 0.999437f, 0.999443f, 0.999450f, 0.999456f, 0.999462f, 0.999469f, 0.999475f,
+ 0.999481f, 0.999487f, 0.999493f, 0.999500f, 0.999506f, 0.999512f, 0.999518f, 0.999524f,
+ 0.999529f, 0.999535f, 0.999541f, 0.999547f, 0.999553f, 0.999558f, 0.999564f, 0.999570f,
+ 0.999575f, 0.999581f, 0.999586f, 0.999592f, 0.999597f, 0.999603f, 0.999608f, 0.999614f,
+ 0.999619f, 0.999624f, 0.999629f, 0.999635f, 0.999640f, 0.999645f, 0.999650f, 0.999655f,
+ 0.999660f, 0.999665f, 0.999670f, 0.999675f, 0.999680f, 0.999685f, 0.999689f, 0.999694f,
+ 0.999699f, 0.999704f, 0.999708f, 0.999713f, 0.999717f, 0.999722f, 0.999726f, 0.999731f,
+ 0.999735f, 0.999740f, 0.999744f, 0.999748f, 0.999753f, 0.999757f, 0.999761f, 0.999765f,
+ 0.999769f, 0.999774f, 0.999778f, 0.999782f, 0.999786f, 0.999790f, 0.999793f, 0.999797f,
+ 0.999801f, 0.999805f, 0.999809f, 0.999812f, 0.999816f, 0.999820f, 0.999823f, 0.999827f,
+ 0.999831f, 0.999834f, 0.999838f, 0.999841f, 0.999844f, 0.999848f, 0.999851f, 0.999854f,
+ 0.999858f, 0.999861f, 0.999864f, 0.999867f, 0.999870f, 0.999873f, 0.999876f, 0.999879f,
+ 0.999882f, 0.999885f, 0.999888f, 0.999891f, 0.999894f, 0.999897f, 0.999899f, 0.999902f,
+ 0.999905f, 0.999907f, 0.999910f, 0.999913f, 0.999915f, 0.999917f, 0.999920f, 0.999922f,
+ 0.999925f, 0.999927f, 0.999929f, 0.999932f, 0.999934f, 0.999936f, 0.999938f, 0.999940f,
+ 0.999942f, 0.999944f, 0.999946f, 0.999948f, 0.999950f, 0.999952f, 0.999954f, 0.999956f,
+ 0.999958f, 0.999959f, 0.999961f, 0.999963f, 0.999964f, 0.999966f, 0.999968f, 0.999969f,
+ 0.999971f, 0.999972f, 0.999973f, 0.999975f, 0.999976f, 0.999977f, 0.999979f, 0.999980f,
+ 0.999981f, 0.999982f, 0.999983f, 0.999985f, 0.999986f, 0.999987f, 0.999988f, 0.999988f,
+ 0.999989f, 0.999990f, 0.999991f, 0.999992f, 0.999993f, 0.999993f, 0.999994f, 0.999995f,
+ 0.999995f, 0.999996f, 0.999996f, 0.999997f, 0.999997f, 0.999998f, 0.999998f, 0.999999f,
+ 0.999999f, 0.999999f, 0.999999f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+ 0.000000f, -0.000192f, -0.000383f, -0.000575f, -0.000767f, -0.000959f, -0.001150f, -0.001342f,
+ -0.001534f, -0.001726f, -0.001917f, -0.002109f, -0.002301f, -0.002493f, -0.002684f, -0.002876f,
+ -0.003068f, -0.003260f, -0.003451f, -0.003643f, -0.003835f, -0.004027f, -0.004218f, -0.004410f,
+ -0.004602f, -0.004794f, -0.004985f, -0.005177f, -0.005369f, -0.005561f, -0.005752f, -0.005944f,
+ -0.006136f, -0.006328f, -0.006519f, -0.006711f, -0.006903f, -0.007095f, -0.007286f, -0.007478f,
+ -0.007670f, -0.007862f, -0.008053f, -0.008245f, -0.008437f, -0.008629f, -0.008820f, -0.009012f,
+ -0.009204f, -0.009395f, -0.009587f, -0.009779f, -0.009971f, -0.010162f, -0.010354f, -0.010546f,
+ -0.010738f, -0.010929f, -0.011121f, -0.011313f, -0.011505f, -0.011696f, -0.011888f, -0.012080f,
+ -0.012272f, -0.012463f, -0.012655f, -0.012847f, -0.013038f, -0.013230f, -0.013422f, -0.013614f,
+ -0.013805f, -0.013997f, -0.014189f, -0.014381f, -0.014572f, -0.014764f, -0.014956f, -0.015147f,
+ -0.015339f, -0.015531f, -0.015723f, -0.015914f, -0.016106f, -0.016298f, -0.016490f, -0.016681f,
+ -0.016873f, -0.017065f, -0.017256f, -0.017448f, -0.017640f, -0.017832f, -0.018023f, -0.018215f,
+ -0.018407f, -0.018598f, -0.018790f, -0.018982f, -0.019174f, -0.019365f, -0.019557f, -0.019749f,
+ -0.019940f, -0.020132f, -0.020324f, -0.020516f, -0.020707f, -0.020899f, -0.021091f, -0.021282f,
+ -0.021474f, -0.021666f, -0.021857f, -0.022049f, -0.022241f, -0.022433f, -0.022624f, -0.022816f,
+ -0.023008f, -0.023199f, -0.023391f, -0.023583f, -0.023774f, -0.023966f, -0.024158f, -0.024350f,
+ -0.024541f, -0.024733f, -0.024925f, -0.025116f, -0.025308f, -0.025500f, -0.025691f, -0.025883f,
+ -0.026075f, -0.026266f, -0.026458f, -0.026650f, -0.026841f, -0.027033f, -0.027225f, -0.027416f,
+ -0.027608f, -0.027800f, -0.027991f, -0.028183f, -0.028375f, -0.028567f, -0.028758f, -0.028950f,
+ -0.029142f, -0.029333f, -0.029525f, -0.029717f, -0.029908f, -0.030100f, -0.030291f, -0.030483f,
+ -0.030675f, -0.030866f, -0.031058f, -0.031250f, -0.031441f, -0.031633f, -0.031825f, -0.032016f,
+ -0.032208f, -0.032400f, -0.032591f, -0.032783f, -0.032975f, -0.033166f, -0.033358f, -0.033550f,
+ -0.033741f, -0.033933f, -0.034124f, -0.034316f, -0.034508f, -0.034699f, -0.034891f, -0.035083f,
+ -0.035274f, -0.035466f, -0.035657f, -0.035849f, -0.036041f, -0.036232f, -0.036424f, -0.036616f,
+ -0.036807f, -0.036999f, -0.037190f, -0.037382f, -0.037574f, -0.037765f, -0.037957f, -0.038149f,
+ -0.038340f, -0.038532f, -0.038723f, -0.038915f, -0.039107f, -0.039298f, -0.039490f, -0.039681f,
+ -0.039873f, -0.040065f, -0.040256f, -0.040448f, -0.040639f, -0.040831f, -0.041022f, -0.041214f,
+ -0.041406f, -0.041597f, -0.041789f, -0.041980f, -0.042172f, -0.042364f, -0.042555f, -0.042747f,
+ -0.042938f, -0.043130f, -0.043321f, -0.043513f, -0.043705f, -0.043896f, -0.044088f, -0.044279f,
+ -0.044471f, -0.044662f, -0.044854f, -0.045045f, -0.045237f, -0.045429f, -0.045620f, -0.045812f,
+ -0.046003f, -0.046195f, -0.046386f, -0.046578f, -0.046769f, -0.046961f, -0.047152f, -0.047344f,
+ -0.047535f, -0.047727f, -0.047919f, -0.048110f, -0.048302f, -0.048493f, -0.048685f, -0.048876f,
+ -0.049068f, -0.049259f, -0.049451f, -0.049642f, -0.049834f, -0.050025f, -0.050217f, -0.050408f,
+ -0.050600f, -0.050791f, -0.050983f, -0.051174f, -0.051366f, -0.051557f, -0.051749f, -0.051940f,
+ -0.052132f, -0.052323f, -0.052515f, -0.052706f, -0.052898f, -0.053089f, -0.053281f, -0.053472f,
+ -0.053664f, -0.053855f, -0.054046f, -0.054238f, -0.054429f, -0.054621f, -0.054812f, -0.055004f,
+ -0.055195f, -0.055387f, -0.055578f, -0.055770f, -0.055961f, -0.056152f, -0.056344f, -0.056535f,
+ -0.056727f, -0.056918f, -0.057110f, -0.057301f, -0.057493f, -0.057684f, -0.057875f, -0.058067f,
+ -0.058258f, -0.058450f, -0.058641f, -0.058833f, -0.059024f, -0.059215f, -0.059407f, -0.059598f,
+ -0.059790f, -0.059981f, -0.060172f, -0.060364f, -0.060555f, -0.060747f, -0.060938f, -0.061129f,
+ -0.061321f, -0.061512f, -0.061704f, -0.061895f, -0.062086f, -0.062278f, -0.062469f, -0.062660f,
+ -0.062852f, -0.063043f, -0.063234f, -0.063426f, -0.063617f, -0.063809f, -0.064000f, -0.064191f,
+ -0.064383f, -0.064574f, -0.064765f, -0.064957f, -0.065148f, -0.065339f, -0.065531f, -0.065722f,
+ -0.065913f, -0.066105f, -0.066296f, -0.066487f, -0.066679f, -0.066870f, -0.067061f, -0.067253f,
+ -0.067444f, -0.067635f, -0.067827f, -0.068018f, -0.068209f, -0.068400f, -0.068592f, -0.068783f,
+ -0.068974f, -0.069166f, -0.069357f, -0.069548f, -0.069739f, -0.069931f, -0.070122f, -0.070313f,
+ -0.070505f, -0.070696f, -0.070887f, -0.071078f, -0.071270f, -0.071461f, -0.071652f, -0.071843f,
+ -0.072035f, -0.072226f, -0.072417f, -0.072608f, -0.072800f, -0.072991f, -0.073182f, -0.073373f,
+ -0.073565f, -0.073756f, -0.073947f, -0.074138f, -0.074329f, -0.074521f, -0.074712f, -0.074903f,
+ -0.075094f, -0.075286f, -0.075477f, -0.075668f, -0.075859f, -0.076050f, -0.076241f, -0.076433f,
+ -0.076624f, -0.076815f, -0.077006f, -0.077197f, -0.077389f, -0.077580f, -0.077771f, -0.077962f,
+ -0.078153f, -0.078344f, -0.078536f, -0.078727f, -0.078918f, -0.079109f, -0.079300f, -0.079491f,
+ -0.079682f, -0.079874f, -0.080065f, -0.080256f, -0.080447f, -0.080638f, -0.080829f, -0.081020f,
+ -0.081211f, -0.081403f, -0.081594f, -0.081785f, -0.081976f, -0.082167f, -0.082358f, -0.082549f,
+ -0.082740f, -0.082931f, -0.083122f, -0.083314f, -0.083505f, -0.083696f, -0.083887f, -0.084078f,
+ -0.084269f, -0.084460f, -0.084651f, -0.084842f, -0.085033f, -0.085224f, -0.085415f, -0.085606f,
+ -0.085797f, -0.085988f, -0.086179f, -0.086370f, -0.086561f, -0.086752f, -0.086943f, -0.087135f,
+ -0.087326f, -0.087517f, -0.087708f, -0.087899f, -0.088090f, -0.088281f, -0.088472f, -0.088663f,
+ -0.088854f, -0.089045f, -0.089236f, -0.089427f, -0.089617f, -0.089808f, -0.089999f, -0.090190f,
+ -0.090381f, -0.090572f, -0.090763f, -0.090954f, -0.091145f, -0.091336f, -0.091527f, -0.091718f,
+ -0.091909f, -0.092100f, -0.092291f, -0.092482f, -0.092673f, -0.092864f, -0.093055f, -0.093245f,
+ -0.093436f, -0.093627f, -0.093818f, -0.094009f, -0.094200f, -0.094391f, -0.094582f, -0.094773f,
+ -0.094963f, -0.095154f, -0.095345f, -0.095536f, -0.095727f, -0.095918f, -0.096109f, -0.096300f,
+ -0.096490f, -0.096681f, -0.096872f, -0.097063f, -0.097254f, -0.097445f, -0.097635f, -0.097826f,
+ -0.098017f, -0.098208f, -0.098399f, -0.098590f, -0.098780f, -0.098971f, -0.099162f, -0.099353f,
+ -0.099544f, -0.099734f, -0.099925f, -0.100116f, -0.100307f, -0.100498f, -0.100688f, -0.100879f,
+ -0.101070f, -0.101261f, -0.101451f, -0.101642f, -0.101833f, -0.102024f, -0.102214f, -0.102405f,
+ -0.102596f, -0.102787f, -0.102977f, -0.103168f, -0.103359f, -0.103550f, -0.103740f, -0.103931f,
+ -0.104122f, -0.104312f, -0.104503f, -0.104694f, -0.104884f, -0.105075f, -0.105266f, -0.105456f,
+ -0.105647f, -0.105838f, -0.106028f, -0.106219f, -0.106410f, -0.106600f, -0.106791f, -0.106982f,
+ -0.107172f, -0.107363f, -0.107554f, -0.107744f, -0.107935f, -0.108126f, -0.108316f, -0.108507f,
+ -0.108697f, -0.108888f, -0.109079f, -0.109269f, -0.109460f, -0.109650f, -0.109841f, -0.110032f,
+ -0.110222f, -0.110413f, -0.110603f, -0.110794f, -0.110984f, -0.111175f, -0.111366f, -0.111556f,
+ -0.111747f, -0.111937f, -0.112128f, -0.112318f, -0.112509f, -0.112699f, -0.112890f, -0.113080f,
+ -0.113271f, -0.113461f, -0.113652f, -0.113842f, -0.114033f, -0.114223f, -0.114414f, -0.114604f,
+ -0.114795f, -0.114985f, -0.115176f, -0.115366f, -0.115557f, -0.115747f, -0.115938f, -0.116128f,
+ -0.116319f, -0.116509f, -0.116700f, -0.116890f, -0.117080f, -0.117271f, -0.117461f, -0.117652f,
+ -0.117842f, -0.118032f, -0.118223f, -0.118413f, -0.118604f, -0.118794f, -0.118984f, -0.119175f,
+ -0.119365f, -0.119556f, -0.119746f, -0.119936f, -0.120127f, -0.120317f, -0.120507f, -0.120698f,
+ -0.120888f, -0.121078f, -0.121269f, -0.121459f, -0.121649f, -0.121840f, -0.122030f, -0.122220f,
+ -0.122411f, -0.122601f, -0.122791f, -0.122982f, -0.123172f, -0.123362f, -0.123552f, -0.123743f,
+ -0.123933f, -0.124123f, -0.124314f, -0.124504f, -0.124694f, -0.124884f, -0.125075f, -0.125265f,
+ -0.125455f, -0.125645f, -0.125835f, -0.126026f, -0.126216f, -0.126406f, -0.126596f, -0.126787f,
+ -0.126977f, -0.127167f, -0.127357f, -0.127547f, -0.127737f, -0.127928f, -0.128118f, -0.128308f,
+ -0.128498f, -0.128688f, -0.128878f, -0.129069f, -0.129259f, -0.129449f, -0.129639f, -0.129829f,
+ -0.130019f, -0.130209f, -0.130399f, -0.130590f, -0.130780f, -0.130970f, -0.131160f, -0.131350f,
+ -0.131540f, -0.131730f, -0.131920f, -0.132110f, -0.132300f, -0.132490f, -0.132680f, -0.132870f,
+ -0.133061f, -0.133251f, -0.133441f, -0.133631f, -0.133821f, -0.134011f, -0.134201f, -0.134391f,
+ -0.134581f, -0.134771f, -0.134961f, -0.135151f, -0.135341f, -0.135531f, -0.135721f, -0.135911f,
+ -0.136101f, -0.136291f, -0.136480f, -0.136670f, -0.136860f, -0.137050f, -0.137240f, -0.137430f,
+ -0.137620f, -0.137810f, -0.138000f, -0.138190f, -0.138380f, -0.138570f, -0.138760f, -0.138949f,
+ -0.139139f, -0.139329f, -0.139519f, -0.139709f, -0.139899f, -0.140089f, -0.140279f, -0.140468f,
+ -0.140658f, -0.140848f, -0.141038f, -0.141228f, -0.141418f, -0.141607f, -0.141797f, -0.141987f,
+ -0.142177f, -0.142367f, -0.142556f, -0.142746f, -0.142936f, -0.143126f, -0.143316f, -0.143505f,
+ -0.143695f, -0.143885f, -0.144075f, -0.144264f, -0.144454f, -0.144644f, -0.144833f, -0.145023f,
+ -0.145213f, -0.145403f, -0.145592f, -0.145782f, -0.145972f, -0.146161f, -0.146351f, -0.146541f,
+ -0.146730f, -0.146920f, -0.147110f, -0.147299f, -0.147489f, -0.147679f, -0.147868f, -0.148058f,
+ -0.148248f, -0.148437f, -0.148627f, -0.148817f, -0.149006f, -0.149196f, -0.149385f, -0.149575f,
+ -0.149765f, -0.149954f, -0.150144f, -0.150333f, -0.150523f, -0.150712f, -0.150902f, -0.151092f,
+ -0.151281f, -0.151471f, -0.151660f, -0.151850f, -0.152039f, -0.152229f, -0.152418f, -0.152608f,
+ -0.152797f, -0.152987f, -0.153176f, -0.153366f, -0.153555f, -0.153745f, -0.153934f, -0.154124f,
+ -0.154313f, -0.154502f, -0.154692f, -0.154881f, -0.155071f, -0.155260f, -0.155450f, -0.155639f,
+ -0.155828f, -0.156018f, -0.156207f, -0.156397f, -0.156586f, -0.156775f, -0.156965f, -0.157154f,
+ -0.157343f, -0.157533f, -0.157722f, -0.157912f, -0.158101f, -0.158290f, -0.158480f, -0.158669f,
+ -0.158858f, -0.159047f, -0.159237f, -0.159426f, -0.159615f, -0.159805f, -0.159994f, -0.160183f,
+ -0.160372f, -0.160562f, -0.160751f, -0.160940f, -0.161129f, -0.161319f, -0.161508f, -0.161697f,
+ -0.161886f, -0.162076f, -0.162265f, -0.162454f, -0.162643f, -0.162832f, -0.163022f, -0.163211f,
+ -0.163400f, -0.163589f, -0.163778f, -0.163967f, -0.164157f, -0.164346f, -0.164535f, -0.164724f,
+ -0.164913f, -0.165102f, -0.165291f, -0.165480f, -0.165670f, -0.165859f, -0.166048f, -0.166237f,
+ -0.166426f, -0.166615f, -0.166804f, -0.166993f, -0.167182f, -0.167371f, -0.167560f, -0.167749f,
+ -0.167938f, -0.168127f, -0.168316f, -0.168505f, -0.168694f, -0.168883f, -0.169072f, -0.169261f,
+ -0.169450f, -0.169639f, -0.169828f, -0.170017f, -0.170206f, -0.170395f, -0.170584f, -0.170773f,
+ -0.170962f, -0.171151f, -0.171340f, -0.171529f, -0.171718f, -0.171906f, -0.172095f, -0.172284f,
+ -0.172473f, -0.172662f, -0.172851f, -0.173040f, -0.173229f, -0.173417f, -0.173606f, -0.173795f,
+ -0.173984f, -0.174173f, -0.174362f, -0.174550f, -0.174739f, -0.174928f, -0.175117f, -0.175305f,
+ -0.175494f, -0.175683f, -0.175872f, -0.176061f, -0.176249f, -0.176438f, -0.176627f, -0.176815f,
+ -0.177004f, -0.177193f, -0.177382f, -0.177570f, -0.177759f, -0.177948f, -0.178136f, -0.178325f,
+ -0.178514f, -0.178702f, -0.178891f, -0.179080f, -0.179268f, -0.179457f, -0.179646f, -0.179834f,
+ -0.180023f, -0.180212f, -0.180400f, -0.180589f, -0.180777f, -0.180966f, -0.181154f, -0.181343f,
+ -0.181532f, -0.181720f, -0.181909f, -0.182097f, -0.182286f, -0.182474f, -0.182663f, -0.182851f,
+ -0.183040f, -0.183228f, -0.183417f, -0.183605f, -0.183794f, -0.183982f, -0.184171f, -0.184359f,
+ -0.184548f, -0.184736f, -0.184925f, -0.185113f, -0.185301f, -0.185490f, -0.185678f, -0.185867f,
+ -0.186055f, -0.186244f, -0.186432f, -0.186620f, -0.186809f, -0.186997f, -0.187185f, -0.187374f,
+ -0.187562f, -0.187750f, -0.187939f, -0.188127f, -0.188315f, -0.188504f, -0.188692f, -0.188880f,
+ -0.189069f, -0.189257f, -0.189445f, -0.189634f, -0.189822f, -0.190010f, -0.190198f, -0.190387f,
+ -0.190575f, -0.190763f, -0.190951f, -0.191139f, -0.191328f, -0.191516f, -0.191704f, -0.191892f,
+ -0.192080f, -0.192269f, -0.192457f, -0.192645f, -0.192833f, -0.193021f, -0.193209f, -0.193397f,
+ -0.193586f, -0.193774f, -0.193962f, -0.194150f, -0.194338f, -0.194526f, -0.194714f, -0.194902f,
+ -0.195090f, -0.195278f, -0.195466f, -0.195654f, -0.195843f, -0.196031f, -0.196219f, -0.196407f,
+ -0.196595f, -0.196783f, -0.196971f, -0.197159f, -0.197347f, -0.197535f, -0.197722f, -0.197910f,
+ -0.198098f, -0.198286f, -0.198474f, -0.198662f, -0.198850f, -0.199038f, -0.199226f, -0.199414f,
+ -0.199602f, -0.199790f, -0.199978f, -0.200165f, -0.200353f, -0.200541f, -0.200729f, -0.200917f,
+ -0.201105f, -0.201292f, -0.201480f, -0.201668f, -0.201856f, -0.202044f, -0.202231f, -0.202419f,
+ -0.202607f, -0.202795f, -0.202983f, -0.203170f, -0.203358f, -0.203546f, -0.203734f, -0.203921f,
+ -0.204109f, -0.204297f, -0.204484f, -0.204672f, -0.204860f, -0.205047f, -0.205235f, -0.205423f,
+ -0.205610f, -0.205798f, -0.205986f, -0.206173f, -0.206361f, -0.206549f, -0.206736f, -0.206924f,
+ -0.207111f, -0.207299f, -0.207487f, -0.207674f, -0.207862f, -0.208049f, -0.208237f, -0.208424f,
+ -0.208612f, -0.208799f, -0.208987f, -0.209174f, -0.209362f, -0.209549f, -0.209737f, -0.209924f,
+ -0.210112f, -0.210299f, -0.210487f, -0.210674f, -0.210862f, -0.211049f, -0.211237f, -0.211424f,
+ -0.211611f, -0.211799f, -0.211986f, -0.212174f, -0.212361f, -0.212548f, -0.212736f, -0.212923f,
+ -0.213110f, -0.213298f, -0.213485f, -0.213672f, -0.213860f, -0.214047f, -0.214234f, -0.214422f,
+ -0.214609f, -0.214796f, -0.214983f, -0.215171f, -0.215358f, -0.215545f, -0.215732f, -0.215920f,
+ -0.216107f, -0.216294f, -0.216481f, -0.216668f, -0.216856f, -0.217043f, -0.217230f, -0.217417f,
+ -0.217604f, -0.217791f, -0.217979f, -0.218166f, -0.218353f, -0.218540f, -0.218727f, -0.218914f,
+ -0.219101f, -0.219288f, -0.219475f, -0.219662f, -0.219850f, -0.220037f, -0.220224f, -0.220411f,
+ -0.220598f, -0.220785f, -0.220972f, -0.221159f, -0.221346f, -0.221533f, -0.221720f, -0.221907f,
+ -0.222094f, -0.222281f, -0.222468f, -0.222654f, -0.222841f, -0.223028f, -0.223215f, -0.223402f,
+ -0.223589f, -0.223776f, -0.223963f, -0.224150f, -0.224337f, -0.224523f, -0.224710f, -0.224897f,
+ -0.225084f, -0.225271f, -0.225458f, -0.225644f, -0.225831f, -0.226018f, -0.226205f, -0.226391f,
+ -0.226578f, -0.226765f, -0.226952f, -0.227139f, -0.227325f, -0.227512f, -0.227699f, -0.227885f,
+ -0.228072f, -0.228259f, -0.228445f, -0.228632f, -0.228819f, -0.229005f, -0.229192f, -0.229379f,
+ -0.229565f, -0.229752f, -0.229939f, -0.230125f, -0.230312f, -0.230498f, -0.230685f, -0.230872f,
+ -0.231058f, -0.231245f, -0.231431f, -0.231618f, -0.231804f, -0.231991f, -0.232177f, -0.232364f,
+ -0.232550f, -0.232737f, -0.232923f, -0.233110f, -0.233296f, -0.233483f, -0.233669f, -0.233856f,
+ -0.234042f, -0.234228f, -0.234415f, -0.234601f, -0.234788f, -0.234974f, -0.235160f, -0.235347f,
+ -0.235533f, -0.235719f, -0.235906f, -0.236092f, -0.236278f, -0.236465f, -0.236651f, -0.236837f,
+ -0.237024f, -0.237210f, -0.237396f, -0.237582f, -0.237769f, -0.237955f, -0.238141f, -0.238327f,
+ -0.238514f, -0.238700f, -0.238886f, -0.239072f, -0.239258f, -0.239445f, -0.239631f, -0.239817f,
+ -0.240003f, -0.240189f, -0.240375f, -0.240561f, -0.240748f, -0.240934f, -0.241120f, -0.241306f,
+ -0.241492f, -0.241678f, -0.241864f, -0.242050f, -0.242236f, -0.242422f, -0.242608f, -0.242794f,
+ -0.242980f, -0.243166f, -0.243352f, -0.243538f, -0.243724f, -0.243910f, -0.244096f, -0.244282f,
+ -0.244468f, -0.244654f, -0.244840f, -0.245026f, -0.245212f, -0.245397f, -0.245583f, -0.245769f,
+ -0.245955f, -0.246141f, -0.246327f, -0.246513f, -0.246698f, -0.246884f, -0.247070f, -0.247256f,
+ -0.247442f, -0.247627f, -0.247813f, -0.247999f, -0.248185f, -0.248370f, -0.248556f, -0.248742f,
+ -0.248928f, -0.249113f, -0.249299f, -0.249485f, -0.249670f, -0.249856f, -0.250042f, -0.250227f,
+ -0.250413f, -0.250599f, -0.250784f, -0.250970f, -0.251155f, -0.251341f, -0.251527f, -0.251712f,
+ -0.251898f, -0.252083f, -0.252269f, -0.252454f, -0.252640f, -0.252826f, -0.253011f, -0.253197f,
+ -0.253382f, -0.253568f, -0.253753f, -0.253938f, -0.254124f, -0.254309f, -0.254495f, -0.254680f,
+ -0.254866f, -0.255051f, -0.255236f, -0.255422f, -0.255607f, -0.255793f, -0.255978f, -0.256163f,
+ -0.256349f, -0.256534f, -0.256719f, -0.256905f, -0.257090f, -0.257275f, -0.257461f, -0.257646f,
+ -0.257831f, -0.258016f, -0.258202f, -0.258387f, -0.258572f, -0.258757f, -0.258943f, -0.259128f,
+ -0.259313f, -0.259498f, -0.259683f, -0.259868f, -0.260054f, -0.260239f, -0.260424f, -0.260609f,
+ -0.260794f, -0.260979f, -0.261164f, -0.261349f, -0.261534f, -0.261720f, -0.261905f, -0.262090f,
+ -0.262275f, -0.262460f, -0.262645f, -0.262830f, -0.263015f, -0.263200f, -0.263385f, -0.263570f,
+ -0.263755f, -0.263940f, -0.264125f, -0.264309f, -0.264494f, -0.264679f, -0.264864f, -0.265049f,
+ -0.265234f, -0.265419f, -0.265604f, -0.265789f, -0.265973f, -0.266158f, -0.266343f, -0.266528f,
+ -0.266713f, -0.266898f, -0.267082f, -0.267267f, -0.267452f, -0.267637f, -0.267821f, -0.268006f,
+ -0.268191f, -0.268376f, -0.268560f, -0.268745f, -0.268930f, -0.269114f, -0.269299f, -0.269484f,
+ -0.269668f, -0.269853f, -0.270038f, -0.270222f, -0.270407f, -0.270591f, -0.270776f, -0.270961f,
+ -0.271145f, -0.271330f, -0.271514f, -0.271699f, -0.271883f, -0.272068f, -0.272252f, -0.272437f,
+ -0.272621f, -0.272806f, -0.272990f, -0.273175f, -0.273359f, -0.273544f, -0.273728f, -0.273912f,
+ -0.274097f, -0.274281f, -0.274466f, -0.274650f, -0.274834f, -0.275019f, -0.275203f, -0.275387f,
+ -0.275572f, -0.275756f, -0.275940f, -0.276125f, -0.276309f, -0.276493f, -0.276678f, -0.276862f,
+ -0.277046f, -0.277230f, -0.277415f, -0.277599f, -0.277783f, -0.277967f, -0.278151f, -0.278336f,
+ -0.278520f, -0.278704f, -0.278888f, -0.279072f, -0.279256f, -0.279440f, -0.279624f, -0.279809f,
+ -0.279993f, -0.280177f, -0.280361f, -0.280545f, -0.280729f, -0.280913f, -0.281097f, -0.281281f,
+ -0.281465f, -0.281649f, -0.281833f, -0.282017f, -0.282201f, -0.282385f, -0.282569f, -0.282753f,
+ -0.282937f, -0.283120f, -0.283304f, -0.283488f, -0.283672f, -0.283856f, -0.284040f, -0.284224f,
+ -0.284408f, -0.284591f, -0.284775f, -0.284959f, -0.285143f, -0.285327f, -0.285510f, -0.285694f,
+ -0.285878f, -0.286062f, -0.286245f, -0.286429f, -0.286613f, -0.286796f, -0.286980f, -0.287164f,
+ -0.287347f, -0.287531f, -0.287715f, -0.287898f, -0.288082f, -0.288266f, -0.288449f, -0.288633f,
+ -0.288816f, -0.289000f, -0.289184f, -0.289367f, -0.289551f, -0.289734f, -0.289918f, -0.290101f,
+ -0.290285f, -0.290468f, -0.290652f, -0.290835f, -0.291019f, -0.291202f, -0.291385f, -0.291569f,
+ -0.291752f, -0.291936f, -0.292119f, -0.292302f, -0.292486f, -0.292669f, -0.292852f, -0.293036f,
+ -0.293219f, -0.293402f, -0.293586f, -0.293769f, -0.293952f, -0.294136f, -0.294319f, -0.294502f,
+ -0.294685f, -0.294869f, -0.295052f, -0.295235f, -0.295418f, -0.295601f, -0.295785f, -0.295968f,
+ -0.296151f, -0.296334f, -0.296517f, -0.296700f, -0.296883f, -0.297066f, -0.297250f, -0.297433f,
+ -0.297616f, -0.297799f, -0.297982f, -0.298165f, -0.298348f, -0.298531f, -0.298714f, -0.298897f,
+ -0.299080f, -0.299263f, -0.299446f, -0.299629f, -0.299812f, -0.299995f, -0.300177f, -0.300360f,
+ -0.300543f, -0.300726f, -0.300909f, -0.301092f, -0.301275f, -0.301458f, -0.301640f, -0.301823f,
+ -0.302006f, -0.302189f, -0.302372f, -0.302554f, -0.302737f, -0.302920f, -0.303103f, -0.303285f,
+ -0.303468f, -0.303651f, -0.303833f, -0.304016f, -0.304199f, -0.304381f, -0.304564f, -0.304747f,
+ -0.304929f, -0.305112f, -0.305294f, -0.305477f, -0.305660f, -0.305842f, -0.306025f, -0.306207f,
+ -0.306390f, -0.306572f, -0.306755f, -0.306937f, -0.307120f, -0.307302f, -0.307485f, -0.307667f,
+ -0.307850f, -0.308032f, -0.308214f, -0.308397f, -0.308579f, -0.308762f, -0.308944f, -0.309126f,
+ -0.309309f, -0.309491f, -0.309673f, -0.309856f, -0.310038f, -0.310220f, -0.310403f, -0.310585f,
+ -0.310767f, -0.310949f, -0.311132f, -0.311314f, -0.311496f, -0.311678f, -0.311860f, -0.312043f,
+ -0.312225f, -0.312407f, -0.312589f, -0.312771f, -0.312953f, -0.313135f, -0.313318f, -0.313500f,
+ -0.313682f, -0.313864f, -0.314046f, -0.314228f, -0.314410f, -0.314592f, -0.314774f, -0.314956f,
+ -0.315138f, -0.315320f, -0.315502f, -0.315684f, -0.315866f, -0.316048f, -0.316230f, -0.316411f,
+ -0.316593f, -0.316775f, -0.316957f, -0.317139f, -0.317321f, -0.317503f, -0.317684f, -0.317866f,
+ -0.318048f, -0.318230f, -0.318412f, -0.318593f, -0.318775f, -0.318957f, -0.319139f, -0.319320f,
+ -0.319502f, -0.319684f, -0.319865f, -0.320047f, -0.320229f, -0.320410f, -0.320592f, -0.320774f,
+ -0.320955f, -0.321137f, -0.321318f, -0.321500f, -0.321682f, -0.321863f, -0.322045f, -0.322226f,
+ -0.322408f, -0.322589f, -0.322771f, -0.322952f, -0.323134f, -0.323315f, -0.323497f, -0.323678f,
+ -0.323859f, -0.324041f, -0.324222f, -0.324404f, -0.324585f, -0.324766f, -0.324948f, -0.325129f,
+ -0.325310f, -0.325492f, -0.325673f, -0.325854f, -0.326035f, -0.326217f, -0.326398f, -0.326579f,
+ -0.326760f, -0.326942f, -0.327123f, -0.327304f, -0.327485f, -0.327666f, -0.327848f, -0.328029f,
+ -0.328210f, -0.328391f, -0.328572f, -0.328753f, -0.328934f, -0.329115f, -0.329296f, -0.329477f,
+ -0.329658f, -0.329839f, -0.330020f, -0.330202f, -0.330382f, -0.330563f, -0.330744f, -0.330925f,
+ -0.331106f, -0.331287f, -0.331468f, -0.331649f, -0.331830f, -0.332011f, -0.332192f, -0.332373f,
+ -0.332553f, -0.332734f, -0.332915f, -0.333096f, -0.333277f, -0.333457f, -0.333638f, -0.333819f,
+ -0.334000f, -0.334180f, -0.334361f, -0.334542f, -0.334722f, -0.334903f, -0.335084f, -0.335265f,
+ -0.335445f, -0.335626f, -0.335806f, -0.335987f, -0.336168f, -0.336348f, -0.336529f, -0.336709f,
+ -0.336890f, -0.337070f, -0.337251f, -0.337431f, -0.337612f, -0.337792f, -0.337973f, -0.338153f,
+ -0.338334f, -0.338514f, -0.338695f, -0.338875f, -0.339055f, -0.339236f, -0.339416f, -0.339597f,
+ -0.339777f, -0.339957f, -0.340138f, -0.340318f, -0.340498f, -0.340678f, -0.340859f, -0.341039f,
+ -0.341219f, -0.341399f, -0.341580f, -0.341760f, -0.341940f, -0.342120f, -0.342300f, -0.342481f,
+ -0.342661f, -0.342841f, -0.343021f, -0.343201f, -0.343381f, -0.343561f, -0.343741f, -0.343921f,
+ -0.344101f, -0.344281f, -0.344461f, -0.344641f, -0.344821f, -0.345001f, -0.345181f, -0.345361f,
+ -0.345541f, -0.345721f, -0.345901f, -0.346081f, -0.346261f, -0.346441f, -0.346621f, -0.346801f,
+ -0.346980f, -0.347160f, -0.347340f, -0.347520f, -0.347700f, -0.347879f, -0.348059f, -0.348239f,
+ -0.348419f, -0.348598f, -0.348778f, -0.348958f, -0.349138f, -0.349317f, -0.349497f, -0.349676f,
+ -0.349856f, -0.350036f, -0.350215f, -0.350395f, -0.350575f, -0.350754f, -0.350934f, -0.351113f,
+ -0.351293f, -0.351472f, -0.351652f, -0.351831f, -0.352011f, -0.352190f, -0.352370f, -0.352549f,
+ -0.352729f, -0.352908f, -0.353087f, -0.353267f, -0.353446f, -0.353626f, -0.353805f, -0.353984f,
+ -0.354164f, -0.354343f, -0.354522f, -0.354701f, -0.354881f, -0.355060f, -0.355239f, -0.355418f,
+ -0.355598f, -0.355777f, -0.355956f, -0.356135f, -0.356314f, -0.356494f, -0.356673f, -0.356852f,
+ -0.357031f, -0.357210f, -0.357389f, -0.357568f, -0.357747f, -0.357926f, -0.358105f, -0.358284f,
+ -0.358463f, -0.358642f, -0.358821f, -0.359000f, -0.359179f, -0.359358f, -0.359537f, -0.359716f,
+ -0.359895f, -0.360074f, -0.360253f, -0.360432f, -0.360611f, -0.360789f, -0.360968f, -0.361147f,
+ -0.361326f, -0.361505f, -0.361683f, -0.361862f, -0.362041f, -0.362220f, -0.362398f, -0.362577f,
+ -0.362756f, -0.362934f, -0.363113f, -0.363292f, -0.363470f, -0.363649f, -0.363828f, -0.364006f,
+ -0.364185f, -0.364363f, -0.364542f, -0.364720f, -0.364899f, -0.365078f, -0.365256f, -0.365435f,
+ -0.365613f, -0.365791f, -0.365970f, -0.366148f, -0.366327f, -0.366505f, -0.366684f, -0.366862f,
+ -0.367040f, -0.367219f, -0.367397f, -0.367575f, -0.367754f, -0.367932f, -0.368110f, -0.368289f,
+ -0.368467f, -0.368645f, -0.368823f, -0.369002f, -0.369180f, -0.369358f, -0.369536f, -0.369714f,
+ -0.369892f, -0.370071f, -0.370249f, -0.370427f, -0.370605f, -0.370783f, -0.370961f, -0.371139f,
+ -0.371317f, -0.371495f, -0.371673f, -0.371851f, -0.372029f, -0.372207f, -0.372385f, -0.372563f,
+ -0.372741f, -0.372919f, -0.373097f, -0.373275f, -0.373453f, -0.373631f, -0.373808f, -0.373986f,
+ -0.374164f, -0.374342f, -0.374520f, -0.374697f, -0.374875f, -0.375053f, -0.375231f, -0.375408f,
+ -0.375586f, -0.375764f, -0.375942f, -0.376119f, -0.376297f, -0.376475f, -0.376652f, -0.376830f,
+ -0.377007f, -0.377185f, -0.377363f, -0.377540f, -0.377718f, -0.377895f, -0.378073f, -0.378250f,
+ -0.378428f, -0.378605f, -0.378783f, -0.378960f, -0.379138f, -0.379315f, -0.379492f, -0.379670f,
+ -0.379847f, -0.380025f, -0.380202f, -0.380379f, -0.380557f, -0.380734f, -0.380911f, -0.381088f,
+ -0.381266f, -0.381443f, -0.381620f, -0.381797f, -0.381975f, -0.382152f, -0.382329f, -0.382506f,
+ -0.382683f, -0.382861f, -0.383038f, -0.383215f, -0.383392f, -0.383569f, -0.383746f, -0.383923f,
+ -0.384100f, -0.384277f, -0.384454f, -0.384631f, -0.384808f, -0.384985f, -0.385162f, -0.385339f,
+ -0.385516f, -0.385693f, -0.385870f, -0.386047f, -0.386224f, -0.386400f, -0.386577f, -0.386754f,
+ -0.386931f, -0.387108f, -0.387285f, -0.387461f, -0.387638f, -0.387815f, -0.387992f, -0.388168f,
+ -0.388345f, -0.388522f, -0.388698f, -0.388875f, -0.389052f, -0.389228f, -0.389405f, -0.389582f,
+ -0.389758f, -0.389935f, -0.390111f, -0.390288f, -0.390464f, -0.390641f, -0.390817f, -0.390994f,
+ -0.391170f, -0.391347f, -0.391523f, -0.391700f, -0.391876f, -0.392053f, -0.392229f, -0.392405f,
+ -0.392582f, -0.392758f, -0.392934f, -0.393111f, -0.393287f, -0.393463f, -0.393640f, -0.393816f,
+ -0.393992f, -0.394168f, -0.394344f, -0.394521f, -0.394697f, -0.394873f, -0.395049f, -0.395225f,
+ -0.395401f, -0.395578f, -0.395754f, -0.395930f, -0.396106f, -0.396282f, -0.396458f, -0.396634f,
+ -0.396810f, -0.396986f, -0.397162f, -0.397338f, -0.397514f, -0.397690f, -0.397866f, -0.398042f,
+ -0.398218f, -0.398393f, -0.398569f, -0.398745f, -0.398921f, -0.399097f, -0.399273f, -0.399448f,
+ -0.399624f, -0.399800f, -0.399976f, -0.400151f, -0.400327f, -0.400503f, -0.400679f, -0.400854f,
+ -0.401030f, -0.401206f, -0.401381f, -0.401557f, -0.401732f, -0.401908f, -0.402084f, -0.402259f,
+ -0.402435f, -0.402610f, -0.402786f, -0.402961f, -0.403137f, -0.403312f, -0.403488f, -0.403663f,
+ -0.403838f, -0.404014f, -0.404189f, -0.404365f, -0.404540f, -0.404715f, -0.404891f, -0.405066f,
+ -0.405241f, -0.405417f, -0.405592f, -0.405767f, -0.405942f, -0.406118f, -0.406293f, -0.406468f,
+ -0.406643f, -0.406818f, -0.406994f, -0.407169f, -0.407344f, -0.407519f, -0.407694f, -0.407869f,
+ -0.408044f, -0.408219f, -0.408394f, -0.408569f, -0.408744f, -0.408919f, -0.409094f, -0.409269f,
+ -0.409444f, -0.409619f, -0.409794f, -0.409969f, -0.410144f, -0.410319f, -0.410493f, -0.410668f,
+ -0.410843f, -0.411018f, -0.411193f, -0.411368f, -0.411542f, -0.411717f, -0.411892f, -0.412067f,
+ -0.412241f, -0.412416f, -0.412591f, -0.412765f, -0.412940f, -0.413115f, -0.413289f, -0.413464f,
+ -0.413638f, -0.413813f, -0.413987f, -0.414162f, -0.414337f, -0.414511f, -0.414685f, -0.414860f,
+ -0.415034f, -0.415209f, -0.415383f, -0.415558f, -0.415732f, -0.415906f, -0.416081f, -0.416255f,
+ -0.416430f, -0.416604f, -0.416778f, -0.416952f, -0.417127f, -0.417301f, -0.417475f, -0.417650f,
+ -0.417824f, -0.417998f, -0.418172f, -0.418346f, -0.418520f, -0.418695f, -0.418869f, -0.419043f,
+ -0.419217f, -0.419391f, -0.419565f, -0.419739f, -0.419913f, -0.420087f, -0.420261f, -0.420435f,
+ -0.420609f, -0.420783f, -0.420957f, -0.421131f, -0.421305f, -0.421479f, -0.421653f, -0.421826f,
+ -0.422000f, -0.422174f, -0.422348f, -0.422522f, -0.422695f, -0.422869f, -0.423043f, -0.423217f,
+ -0.423390f, -0.423564f, -0.423738f, -0.423912f, -0.424085f, -0.424259f, -0.424432f, -0.424606f,
+ -0.424780f, -0.424953f, -0.425127f, -0.425300f, -0.425474f, -0.425647f, -0.425821f, -0.425994f,
+ -0.426168f, -0.426341f, -0.426515f, -0.426688f, -0.426862f, -0.427035f, -0.427208f, -0.427382f,
+ -0.427555f, -0.427728f, -0.427902f, -0.428075f, -0.428248f, -0.428422f, -0.428595f, -0.428768f,
+ -0.428941f, -0.429114f, -0.429288f, -0.429461f, -0.429634f, -0.429807f, -0.429980f, -0.430153f,
+ -0.430326f, -0.430500f, -0.430673f, -0.430846f, -0.431019f, -0.431192f, -0.431365f, -0.431538f,
+ -0.431711f, -0.431884f, -0.432057f, -0.432229f, -0.432402f, -0.432575f, -0.432748f, -0.432921f,
+ -0.433094f, -0.433267f, -0.433439f, -0.433612f, -0.433785f, -0.433958f, -0.434131f, -0.434303f,
+ -0.434476f, -0.434649f, -0.434821f, -0.434994f, -0.435167f, -0.435339f, -0.435512f, -0.435685f,
+ -0.435857f, -0.436030f, -0.436202f, -0.436375f, -0.436547f, -0.436720f, -0.436892f, -0.437065f,
+ -0.437237f, -0.437410f, -0.437582f, -0.437754f, -0.437927f, -0.438099f, -0.438272f, -0.438444f,
+ -0.438616f, -0.438789f, -0.438961f, -0.439133f, -0.439305f, -0.439478f, -0.439650f, -0.439822f,
+ -0.439994f, -0.440166f, -0.440339f, -0.440511f, -0.440683f, -0.440855f, -0.441027f, -0.441199f,
+ -0.441371f, -0.441543f, -0.441715f, -0.441887f, -0.442059f, -0.442231f, -0.442403f, -0.442575f,
+ -0.442747f, -0.442919f, -0.443091f, -0.443263f, -0.443435f, -0.443607f, -0.443779f, -0.443950f,
+ -0.444122f, -0.444294f, -0.444466f, -0.444637f, -0.444809f, -0.444981f, -0.445153f, -0.445324f,
+ -0.445496f, -0.445668f, -0.445839f, -0.446011f, -0.446183f, -0.446354f, -0.446526f, -0.446697f,
+ -0.446869f, -0.447040f, -0.447212f, -0.447383f, -0.447555f, -0.447726f, -0.447898f, -0.448069f,
+ -0.448241f, -0.448412f, -0.448583f, -0.448755f, -0.448926f, -0.449097f, -0.449269f, -0.449440f,
+ -0.449611f, -0.449783f, -0.449954f, -0.450125f, -0.450296f, -0.450467f, -0.450639f, -0.450810f,
+ -0.450981f, -0.451152f, -0.451323f, -0.451494f, -0.451665f, -0.451836f, -0.452008f, -0.452179f,
+ -0.452350f, -0.452521f, -0.452692f, -0.452863f, -0.453033f, -0.453204f, -0.453375f, -0.453546f,
+ -0.453717f, -0.453888f, -0.454059f, -0.454230f, -0.454400f, -0.454571f, -0.454742f, -0.454913f,
+ -0.455084f, -0.455254f, -0.455425f, -0.455596f, -0.455766f, -0.455937f, -0.456108f, -0.456278f,
+ -0.456449f, -0.456620f, -0.456790f, -0.456961f, -0.457131f, -0.457302f, -0.457472f, -0.457643f,
+ -0.457813f, -0.457984f, -0.458154f, -0.458325f, -0.458495f, -0.458665f, -0.458836f, -0.459006f,
+ -0.459177f, -0.459347f, -0.459517f, -0.459687f, -0.459858f, -0.460028f, -0.460198f, -0.460369f,
+ -0.460539f, -0.460709f, -0.460879f, -0.461049f, -0.461219f, -0.461390f, -0.461560f, -0.461730f,
+ -0.461900f, -0.462070f, -0.462240f, -0.462410f, -0.462580f, -0.462750f, -0.462920f, -0.463090f,
+ -0.463260f, -0.463430f, -0.463600f, -0.463769f, -0.463939f, -0.464109f, -0.464279f, -0.464449f,
+ -0.464619f, -0.464788f, -0.464958f, -0.465128f, -0.465298f, -0.465467f, -0.465637f, -0.465807f,
+ -0.465977f, -0.466146f, -0.466316f, -0.466485f, -0.466655f, -0.466825f, -0.466994f, -0.467164f,
+ -0.467333f, -0.467503f, -0.467672f, -0.467842f, -0.468011f, -0.468181f, -0.468350f, -0.468519f,
+ -0.468689f, -0.468858f, -0.469028f, -0.469197f, -0.469366f, -0.469536f, -0.469705f, -0.469874f,
+ -0.470043f, -0.470213f, -0.470382f, -0.470551f, -0.470720f, -0.470889f, -0.471058f, -0.471228f,
+ -0.471397f, -0.471566f, -0.471735f, -0.471904f, -0.472073f, -0.472242f, -0.472411f, -0.472580f,
+ -0.472749f, -0.472918f, -0.473087f, -0.473256f, -0.473425f, -0.473594f, -0.473763f, -0.473931f,
+ -0.474100f, -0.474269f, -0.474438f, -0.474607f, -0.474775f, -0.474944f, -0.475113f, -0.475282f,
+ -0.475450f, -0.475619f, -0.475788f, -0.475956f, -0.476125f, -0.476294f, -0.476462f, -0.476631f,
+ -0.476799f, -0.476968f, -0.477136f, -0.477305f, -0.477473f, -0.477642f, -0.477810f, -0.477979f,
+ -0.478147f, -0.478315f, -0.478484f, -0.478652f, -0.478821f, -0.478989f, -0.479157f, -0.479325f,
+ -0.479494f, -0.479662f, -0.479830f, -0.479998f, -0.480167f, -0.480335f, -0.480503f, -0.480671f,
+ -0.480839f, -0.481007f, -0.481176f, -0.481344f, -0.481512f, -0.481680f, -0.481848f, -0.482016f,
+ -0.482184f, -0.482352f, -0.482520f, -0.482688f, -0.482856f, -0.483023f, -0.483191f, -0.483359f,
+ -0.483527f, -0.483695f, -0.483863f, -0.484031f, -0.484198f, -0.484366f, -0.484534f, -0.484702f,
+ -0.484869f, -0.485037f, -0.485205f, -0.485372f, -0.485540f, -0.485708f, -0.485875f, -0.486043f,
+ -0.486210f, -0.486378f, -0.486545f, -0.486713f, -0.486880f, -0.487048f, -0.487215f, -0.487383f,
+ -0.487550f, -0.487718f, -0.487885f, -0.488052f, -0.488220f, -0.488387f, -0.488554f, -0.488722f,
+ -0.488889f, -0.489056f, -0.489223f, -0.489391f, -0.489558f, -0.489725f, -0.489892f, -0.490059f,
+ -0.490226f, -0.490394f, -0.490561f, -0.490728f, -0.490895f, -0.491062f, -0.491229f, -0.491396f,
+ -0.491563f, -0.491730f, -0.491897f, -0.492064f, -0.492231f, -0.492398f, -0.492564f, -0.492731f,
+ -0.492898f, -0.493065f, -0.493232f, -0.493399f, -0.493565f, -0.493732f, -0.493899f, -0.494066f,
+ -0.494232f, -0.494399f, -0.494566f, -0.494732f, -0.494899f, -0.495066f, -0.495232f, -0.495399f,
+ -0.495565f, -0.495732f, -0.495898f, -0.496065f, -0.496231f, -0.496398f, -0.496564f, -0.496731f,
+ -0.496897f, -0.497063f, -0.497230f, -0.497396f, -0.497562f, -0.497729f, -0.497895f, -0.498061f,
+ -0.498228f, -0.498394f, -0.498560f, -0.498726f, -0.498893f, -0.499059f, -0.499225f, -0.499391f,
+ -0.499557f, -0.499723f, -0.499889f, -0.500055f, -0.500221f, -0.500387f, -0.500553f, -0.500719f,
+ -0.500885f, -0.501051f, -0.501217f, -0.501383f, -0.501549f, -0.501715f, -0.501881f, -0.502047f,
+ -0.502212f, -0.502378f, -0.502544f, -0.502710f, -0.502876f, -0.503041f, -0.503207f, -0.503373f,
+ -0.503538f, -0.503704f, -0.503870f, -0.504035f, -0.504201f, -0.504366f, -0.504532f, -0.504698f,
+ -0.504863f, -0.505029f, -0.505194f, -0.505360f, -0.505525f, -0.505690f, -0.505856f, -0.506021f,
+ -0.506187f, -0.506352f, -0.506517f, -0.506683f, -0.506848f, -0.507013f, -0.507179f, -0.507344f,
+ -0.507509f, -0.507674f, -0.507839f, -0.508005f, -0.508170f, -0.508335f, -0.508500f, -0.508665f,
+ -0.508830f, -0.508995f, -0.509160f, -0.509325f, -0.509490f, -0.509655f, -0.509820f, -0.509985f,
+ -0.510150f, -0.510315f, -0.510480f, -0.510645f, -0.510810f, -0.510974f, -0.511139f, -0.511304f,
+ -0.511469f, -0.511634f, -0.511798f, -0.511963f, -0.512128f, -0.512292f, -0.512457f, -0.512622f,
+ -0.512786f, -0.512951f, -0.513116f, -0.513280f, -0.513445f, -0.513609f, -0.513774f, -0.513938f,
+ -0.514103f, -0.514267f, -0.514432f, -0.514596f, -0.514760f, -0.514925f, -0.515089f, -0.515254f,
+ -0.515418f, -0.515582f, -0.515746f, -0.515911f, -0.516075f, -0.516239f, -0.516403f, -0.516568f,
+ -0.516732f, -0.516896f, -0.517060f, -0.517224f, -0.517388f, -0.517552f, -0.517716f, -0.517880f,
+ -0.518045f, -0.518209f, -0.518372f, -0.518536f, -0.518700f, -0.518864f, -0.519028f, -0.519192f,
+ -0.519356f, -0.519520f, -0.519684f, -0.519848f, -0.520011f, -0.520175f, -0.520339f, -0.520503f,
+ -0.520666f, -0.520830f, -0.520994f, -0.521157f, -0.521321f, -0.521485f, -0.521648f, -0.521812f,
+ -0.521975f, -0.522139f, -0.522302f, -0.522466f, -0.522629f, -0.522793f, -0.522956f, -0.523120f,
+ -0.523283f, -0.523447f, -0.523610f, -0.523773f, -0.523937f, -0.524100f, -0.524263f, -0.524426f,
+ -0.524590f, -0.524753f, -0.524916f, -0.525079f, -0.525243f, -0.525406f, -0.525569f, -0.525732f,
+ -0.525895f, -0.526058f, -0.526221f, -0.526384f, -0.526547f, -0.526710f, -0.526873f, -0.527036f,
+ -0.527199f, -0.527362f, -0.527525f, -0.527688f, -0.527851f, -0.528014f, -0.528176f, -0.528339f,
+ -0.528502f, -0.528665f, -0.528828f, -0.528990f, -0.529153f, -0.529316f, -0.529478f, -0.529641f,
+ -0.529804f, -0.529966f, -0.530129f, -0.530291f, -0.530454f, -0.530617f, -0.530779f, -0.530942f,
+ -0.531104f, -0.531266f, -0.531429f, -0.531591f, -0.531754f, -0.531916f, -0.532078f, -0.532241f,
+ -0.532403f, -0.532565f, -0.532728f, -0.532890f, -0.533052f, -0.533214f, -0.533377f, -0.533539f,
+ -0.533701f, -0.533863f, -0.534025f, -0.534187f, -0.534349f, -0.534512f, -0.534674f, -0.534836f,
+ -0.534998f, -0.535160f, -0.535322f, -0.535484f, -0.535645f, -0.535807f, -0.535969f, -0.536131f,
+ -0.536293f, -0.536455f, -0.536617f, -0.536778f, -0.536940f, -0.537102f, -0.537264f, -0.537425f,
+ -0.537587f, -0.537749f, -0.537910f, -0.538072f, -0.538234f, -0.538395f, -0.538557f, -0.538718f,
+ -0.538880f, -0.539041f, -0.539203f, -0.539364f, -0.539526f, -0.539687f, -0.539849f, -0.540010f,
+ -0.540171f, -0.540333f, -0.540494f, -0.540655f, -0.540817f, -0.540978f, -0.541139f, -0.541301f,
+ -0.541462f, -0.541623f, -0.541784f, -0.541945f, -0.542106f, -0.542268f, -0.542429f, -0.542590f,
+ -0.542751f, -0.542912f, -0.543073f, -0.543234f, -0.543395f, -0.543556f, -0.543717f, -0.543878f,
+ -0.544039f, -0.544199f, -0.544360f, -0.544521f, -0.544682f, -0.544843f, -0.545003f, -0.545164f,
+ -0.545325f, -0.545486f, -0.545646f, -0.545807f, -0.545968f, -0.546128f, -0.546289f, -0.546450f,
+ -0.546610f, -0.546771f, -0.546931f, -0.547092f, -0.547252f, -0.547413f, -0.547573f, -0.547734f,
+ -0.547894f, -0.548054f, -0.548215f, -0.548375f, -0.548536f, -0.548696f, -0.548856f, -0.549016f,
+ -0.549177f, -0.549337f, -0.549497f, -0.549657f, -0.549818f, -0.549978f, -0.550138f, -0.550298f,
+ -0.550458f, -0.550618f, -0.550778f, -0.550938f, -0.551098f, -0.551258f, -0.551418f, -0.551578f,
+ -0.551738f, -0.551898f, -0.552058f, -0.552218f, -0.552378f, -0.552537f, -0.552697f, -0.552857f,
+ -0.553017f, -0.553176f, -0.553336f, -0.553496f, -0.553656f, -0.553815f, -0.553975f, -0.554134f,
+ -0.554294f, -0.554454f, -0.554613f, -0.554773f, -0.554932f, -0.555092f, -0.555251f, -0.555411f,
+ -0.555570f, -0.555730f, -0.555889f, -0.556048f, -0.556208f, -0.556367f, -0.556526f, -0.556686f,
+ -0.556845f, -0.557004f, -0.557164f, -0.557323f, -0.557482f, -0.557641f, -0.557800f, -0.557959f,
+ -0.558119f, -0.558278f, -0.558437f, -0.558596f, -0.558755f, -0.558914f, -0.559073f, -0.559232f,
+ -0.559391f, -0.559550f, -0.559709f, -0.559867f, -0.560026f, -0.560185f, -0.560344f, -0.560503f,
+ -0.560662f, -0.560820f, -0.560979f, -0.561138f, -0.561297f, -0.561455f, -0.561614f, -0.561773f,
+ -0.561931f, -0.562090f, -0.562248f, -0.562407f, -0.562565f, -0.562724f, -0.562882f, -0.563041f,
+ -0.563199f, -0.563358f, -0.563516f, -0.563675f, -0.563833f, -0.563991f, -0.564150f, -0.564308f,
+ -0.564466f, -0.564624f, -0.564783f, -0.564941f, -0.565099f, -0.565257f, -0.565416f, -0.565574f,
+ -0.565732f, -0.565890f, -0.566048f, -0.566206f, -0.566364f, -0.566522f, -0.566680f, -0.566838f,
+ -0.566996f, -0.567154f, -0.567312f, -0.567470f, -0.567628f, -0.567786f, -0.567943f, -0.568101f,
+ -0.568259f, -0.568417f, -0.568574f, -0.568732f, -0.568890f, -0.569048f, -0.569205f, -0.569363f,
+ -0.569521f, -0.569678f, -0.569836f, -0.569993f, -0.570151f, -0.570308f, -0.570466f, -0.570623f,
+ -0.570781f, -0.570938f, -0.571096f, -0.571253f, -0.571410f, -0.571568f, -0.571725f, -0.571882f,
+ -0.572040f, -0.572197f, -0.572354f, -0.572511f, -0.572669f, -0.572826f, -0.572983f, -0.573140f,
+ -0.573297f, -0.573454f, -0.573611f, -0.573768f, -0.573925f, -0.574082f, -0.574239f, -0.574396f,
+ -0.574553f, -0.574710f, -0.574867f, -0.575024f, -0.575181f, -0.575338f, -0.575495f, -0.575651f,
+ -0.575808f, -0.575965f, -0.576122f, -0.576278f, -0.576435f, -0.576592f, -0.576748f, -0.576905f,
+ -0.577062f, -0.577218f, -0.577375f, -0.577531f, -0.577688f, -0.577844f, -0.578001f, -0.578157f,
+ -0.578314f, -0.578470f, -0.578627f, -0.578783f, -0.578939f, -0.579096f, -0.579252f, -0.579408f,
+ -0.579565f, -0.579721f, -0.579877f, -0.580033f, -0.580189f, -0.580346f, -0.580502f, -0.580658f,
+ -0.580814f, -0.580970f, -0.581126f, -0.581282f, -0.581438f, -0.581594f, -0.581750f, -0.581906f,
+ -0.582062f, -0.582218f, -0.582374f, -0.582530f, -0.582685f, -0.582841f, -0.582997f, -0.583153f,
+ -0.583309f, -0.583464f, -0.583620f, -0.583776f, -0.583931f, -0.584087f, -0.584243f, -0.584398f,
+ -0.584554f, -0.584710f, -0.584865f, -0.585021f, -0.585176f, -0.585332f, -0.585487f, -0.585642f,
+ -0.585798f, -0.585953f, -0.586109f, -0.586264f, -0.586419f, -0.586575f, -0.586730f, -0.586885f,
+ -0.587040f, -0.587196f, -0.587351f, -0.587506f, -0.587661f, -0.587816f, -0.587971f, -0.588126f,
+ -0.588282f, -0.588437f, -0.588592f, -0.588747f, -0.588902f, -0.589057f, -0.589212f, -0.589366f,
+ -0.589521f, -0.589676f, -0.589831f, -0.589986f, -0.590141f, -0.590295f, -0.590450f, -0.590605f,
+ -0.590760f, -0.590914f, -0.591069f, -0.591224f, -0.591378f, -0.591533f, -0.591688f, -0.591842f,
+ -0.591997f, -0.592151f, -0.592306f, -0.592460f, -0.592615f, -0.592769f, -0.592924f, -0.593078f,
+ -0.593232f, -0.593387f, -0.593541f, -0.593695f, -0.593850f, -0.594004f, -0.594158f, -0.594312f,
+ -0.594467f, -0.594621f, -0.594775f, -0.594929f, -0.595083f, -0.595237f, -0.595391f, -0.595545f,
+ -0.595699f, -0.595853f, -0.596007f, -0.596161f, -0.596315f, -0.596469f, -0.596623f, -0.596777f,
+ -0.596931f, -0.597085f, -0.597238f, -0.597392f, -0.597546f, -0.597700f, -0.597853f, -0.598007f,
+ -0.598161f, -0.598314f, -0.598468f, -0.598622f, -0.598775f, -0.598929f, -0.599082f, -0.599236f,
+ -0.599389f, -0.599543f, -0.599696f, -0.599850f, -0.600003f, -0.600156f, -0.600310f, -0.600463f,
+ -0.600616f, -0.600770f, -0.600923f, -0.601076f, -0.601230f, -0.601383f, -0.601536f, -0.601689f,
+ -0.601842f, -0.601995f, -0.602148f, -0.602302f, -0.602455f, -0.602608f, -0.602761f, -0.602914f,
+ -0.603067f, -0.603220f, -0.603372f, -0.603525f, -0.603678f, -0.603831f, -0.603984f, -0.604137f,
+ -0.604290f, -0.604442f, -0.604595f, -0.604748f, -0.604900f, -0.605053f, -0.605206f, -0.605358f,
+ -0.605511f, -0.605664f, -0.605816f, -0.605969f, -0.606121f, -0.606274f, -0.606426f, -0.606579f,
+ -0.606731f, -0.606884f, -0.607036f, -0.607188f, -0.607341f, -0.607493f, -0.607645f, -0.607798f,
+ -0.607950f, -0.608102f, -0.608254f, -0.608406f, -0.608559f, -0.608711f, -0.608863f, -0.609015f,
+ -0.609167f, -0.609319f, -0.609471f, -0.609623f, -0.609775f, -0.609927f, -0.610079f, -0.610231f,
+ -0.610383f, -0.610535f, -0.610687f, -0.610838f, -0.610990f, -0.611142f, -0.611294f, -0.611445f,
+ -0.611597f, -0.611749f, -0.611901f, -0.612052f, -0.612204f, -0.612355f, -0.612507f, -0.612659f,
+ -0.612810f, -0.612962f, -0.613113f, -0.613265f, -0.613416f, -0.613567f, -0.613719f, -0.613870f,
+ -0.614022f, -0.614173f, -0.614324f, -0.614475f, -0.614627f, -0.614778f, -0.614929f, -0.615080f,
+ -0.615232f, -0.615383f, -0.615534f, -0.615685f, -0.615836f, -0.615987f, -0.616138f, -0.616289f,
+ -0.616440f, -0.616591f, -0.616742f, -0.616893f, -0.617044f, -0.617195f, -0.617346f, -0.617496f,
+ -0.617647f, -0.617798f, -0.617949f, -0.618100f, -0.618250f, -0.618401f, -0.618552f, -0.618702f,
+ -0.618853f, -0.619004f, -0.619154f, -0.619305f, -0.619455f, -0.619606f, -0.619756f, -0.619907f,
+ -0.620057f, -0.620208f, -0.620358f, -0.620508f, -0.620659f, -0.620809f, -0.620959f, -0.621110f,
+ -0.621260f, -0.621410f, -0.621560f, -0.621711f, -0.621861f, -0.622011f, -0.622161f, -0.622311f,
+ -0.622461f, -0.622611f, -0.622761f, -0.622911f, -0.623061f, -0.623211f, -0.623361f, -0.623511f,
+ -0.623661f, -0.623811f, -0.623961f, -0.624111f, -0.624260f, -0.624410f, -0.624560f, -0.624710f,
+ -0.624860f, -0.625009f, -0.625159f, -0.625309f, -0.625458f, -0.625608f, -0.625757f, -0.625907f,
+ -0.626056f, -0.626206f, -0.626355f, -0.626505f, -0.626654f, -0.626804f, -0.626953f, -0.627102f,
+ -0.627252f, -0.627401f, -0.627550f, -0.627700f, -0.627849f, -0.627998f, -0.628147f, -0.628297f,
+ -0.628446f, -0.628595f, -0.628744f, -0.628893f, -0.629042f, -0.629191f, -0.629340f, -0.629489f,
+ -0.629638f, -0.629787f, -0.629936f, -0.630085f, -0.630234f, -0.630383f, -0.630532f, -0.630680f,
+ -0.630829f, -0.630978f, -0.631127f, -0.631275f, -0.631424f, -0.631573f, -0.631721f, -0.631870f,
+ -0.632019f, -0.632167f, -0.632316f, -0.632464f, -0.632613f, -0.632761f, -0.632910f, -0.633058f,
+ -0.633207f, -0.633355f, -0.633504f, -0.633652f, -0.633800f, -0.633949f, -0.634097f, -0.634245f,
+ -0.634393f, -0.634542f, -0.634690f, -0.634838f, -0.634986f, -0.635134f, -0.635282f, -0.635430f,
+ -0.635578f, -0.635726f, -0.635874f, -0.636022f, -0.636170f, -0.636318f, -0.636466f, -0.636614f,
+ -0.636762f, -0.636910f, -0.637057f, -0.637205f, -0.637353f, -0.637501f, -0.637649f, -0.637796f,
+ -0.637944f, -0.638092f, -0.638239f, -0.638387f, -0.638534f, -0.638682f, -0.638829f, -0.638977f,
+ -0.639124f, -0.639272f, -0.639419f, -0.639567f, -0.639714f, -0.639862f, -0.640009f, -0.640156f,
+ -0.640303f, -0.640451f, -0.640598f, -0.640745f, -0.640892f, -0.641040f, -0.641187f, -0.641334f,
+ -0.641481f, -0.641628f, -0.641775f, -0.641922f, -0.642069f, -0.642216f, -0.642363f, -0.642510f,
+ -0.642657f, -0.642804f, -0.642951f, -0.643098f, -0.643245f, -0.643391f, -0.643538f, -0.643685f,
+ -0.643832f, -0.643978f, -0.644125f, -0.644272f, -0.644418f, -0.644565f, -0.644711f, -0.644858f,
+ -0.645005f, -0.645151f, -0.645298f, -0.645444f, -0.645590f, -0.645737f, -0.645883f, -0.646030f,
+ -0.646176f, -0.646322f, -0.646469f, -0.646615f, -0.646761f, -0.646907f, -0.647054f, -0.647200f,
+ -0.647346f, -0.647492f, -0.647638f, -0.647784f, -0.647930f, -0.648076f, -0.648222f, -0.648368f,
+ -0.648514f, -0.648660f, -0.648806f, -0.648952f, -0.649098f, -0.649244f, -0.649390f, -0.649536f,
+ -0.649681f, -0.649827f, -0.649973f, -0.650119f, -0.650264f, -0.650410f, -0.650555f, -0.650701f,
+ -0.650847f, -0.650992f, -0.651138f, -0.651283f, -0.651429f, -0.651574f, -0.651720f, -0.651865f,
+ -0.652011f, -0.652156f, -0.652301f, -0.652447f, -0.652592f, -0.652737f, -0.652882f, -0.653028f,
+ -0.653173f, -0.653318f, -0.653463f, -0.653608f, -0.653753f, -0.653899f, -0.654044f, -0.654189f,
+ -0.654334f, -0.654479f, -0.654624f, -0.654769f, -0.654913f, -0.655058f, -0.655203f, -0.655348f,
+ -0.655493f, -0.655638f, -0.655782f, -0.655927f, -0.656072f, -0.656217f, -0.656361f, -0.656506f,
+ -0.656651f, -0.656795f, -0.656940f, -0.657084f, -0.657229f, -0.657373f, -0.657518f, -0.657662f,
+ -0.657807f, -0.657951f, -0.658095f, -0.658240f, -0.658384f, -0.658529f, -0.658673f, -0.658817f,
+ -0.658961f, -0.659105f, -0.659250f, -0.659394f, -0.659538f, -0.659682f, -0.659826f, -0.659970f,
+ -0.660114f, -0.660258f, -0.660402f, -0.660546f, -0.660690f, -0.660834f, -0.660978f, -0.661122f,
+ -0.661266f, -0.661410f, -0.661553f, -0.661697f, -0.661841f, -0.661985f, -0.662128f, -0.662272f,
+ -0.662416f, -0.662559f, -0.662703f, -0.662847f, -0.662990f, -0.663134f, -0.663277f, -0.663421f,
+ -0.663564f, -0.663708f, -0.663851f, -0.663994f, -0.664138f, -0.664281f, -0.664424f, -0.664568f,
+ -0.664711f, -0.664854f, -0.664997f, -0.665141f, -0.665284f, -0.665427f, -0.665570f, -0.665713f,
+ -0.665856f, -0.665999f, -0.666142f, -0.666285f, -0.666428f, -0.666571f, -0.666714f, -0.666857f,
+ -0.667000f, -0.667143f, -0.667286f, -0.667428f, -0.667571f, -0.667714f, -0.667857f, -0.667999f,
+ -0.668142f, -0.668285f, -0.668427f, -0.668570f, -0.668712f, -0.668855f, -0.668998f, -0.669140f,
+ -0.669283f, -0.669425f, -0.669567f, -0.669710f, -0.669852f, -0.669995f, -0.670137f, -0.670279f,
+ -0.670422f, -0.670564f, -0.670706f, -0.670848f, -0.670990f, -0.671133f, -0.671275f, -0.671417f,
+ -0.671559f, -0.671701f, -0.671843f, -0.671985f, -0.672127f, -0.672269f, -0.672411f, -0.672553f,
+ -0.672695f, -0.672837f, -0.672978f, -0.673120f, -0.673262f, -0.673404f, -0.673546f, -0.673687f,
+ -0.673829f, -0.673971f, -0.674112f, -0.674254f, -0.674396f, -0.674537f, -0.674679f, -0.674820f,
+ -0.674962f, -0.675103f, -0.675245f, -0.675386f, -0.675527f, -0.675669f, -0.675810f, -0.675951f,
+ -0.676093f, -0.676234f, -0.676375f, -0.676516f, -0.676658f, -0.676799f, -0.676940f, -0.677081f,
+ -0.677222f, -0.677363f, -0.677504f, -0.677645f, -0.677786f, -0.677927f, -0.678068f, -0.678209f,
+ -0.678350f, -0.678491f, -0.678632f, -0.678773f, -0.678913f, -0.679054f, -0.679195f, -0.679336f,
+ -0.679476f, -0.679617f, -0.679758f, -0.679898f, -0.680039f, -0.680179f, -0.680320f, -0.680461f,
+ -0.680601f, -0.680741f, -0.680882f, -0.681022f, -0.681163f, -0.681303f, -0.681443f, -0.681584f,
+ -0.681724f, -0.681864f, -0.682005f, -0.682145f, -0.682285f, -0.682425f, -0.682565f, -0.682705f,
+ -0.682846f, -0.682986f, -0.683126f, -0.683266f, -0.683406f, -0.683546f, -0.683686f, -0.683825f,
+ -0.683965f, -0.684105f, -0.684245f, -0.684385f, -0.684525f, -0.684664f, -0.684804f, -0.684944f,
+ -0.685084f, -0.685223f, -0.685363f, -0.685503f, -0.685642f, -0.685782f, -0.685921f, -0.686061f,
+ -0.686200f, -0.686340f, -0.686479f, -0.686619f, -0.686758f, -0.686897f, -0.687037f, -0.687176f,
+ -0.687315f, -0.687455f, -0.687594f, -0.687733f, -0.687872f, -0.688011f, -0.688151f, -0.688290f,
+ -0.688429f, -0.688568f, -0.688707f, -0.688846f, -0.688985f, -0.689124f, -0.689263f, -0.689402f,
+ -0.689541f, -0.689679f, -0.689818f, -0.689957f, -0.690096f, -0.690235f, -0.690373f, -0.690512f,
+ -0.690651f, -0.690789f, -0.690928f, -0.691067f, -0.691205f, -0.691344f, -0.691482f, -0.691621f,
+ -0.691759f, -0.691898f, -0.692036f, -0.692175f, -0.692313f, -0.692451f, -0.692590f, -0.692728f,
+ -0.692866f, -0.693004f, -0.693143f, -0.693281f, -0.693419f, -0.693557f, -0.693695f, -0.693833f,
+ -0.693971f, -0.694109f, -0.694248f, -0.694386f, -0.694524f, -0.694661f, -0.694799f, -0.694937f,
+ -0.695075f, -0.695213f, -0.695351f, -0.695489f, -0.695626f, -0.695764f, -0.695902f, -0.696039f,
+ -0.696177f, -0.696315f, -0.696452f, -0.696590f, -0.696728f, -0.696865f, -0.697003f, -0.697140f,
+ -0.697277f, -0.697415f, -0.697552f, -0.697690f, -0.697827f, -0.697964f, -0.698102f, -0.698239f,
+ -0.698376f, -0.698513f, -0.698651f, -0.698788f, -0.698925f, -0.699062f, -0.699199f, -0.699336f,
+ -0.699473f, -0.699610f, -0.699747f, -0.699884f, -0.700021f, -0.700158f, -0.700295f, -0.700432f,
+ -0.700569f, -0.700706f, -0.700842f, -0.700979f, -0.701116f, -0.701253f, -0.701389f, -0.701526f,
+ -0.701663f, -0.701799f, -0.701936f, -0.702072f, -0.702209f, -0.702345f, -0.702482f, -0.702618f,
+ -0.702755f, -0.702891f, -0.703028f, -0.703164f, -0.703300f, -0.703436f, -0.703573f, -0.703709f,
+ -0.703845f, -0.703981f, -0.704118f, -0.704254f, -0.704390f, -0.704526f, -0.704662f, -0.704798f,
+ -0.704934f, -0.705070f, -0.705206f, -0.705342f, -0.705478f, -0.705614f, -0.705750f, -0.705885f,
+ -0.706021f, -0.706157f, -0.706293f, -0.706429f, -0.706564f, -0.706700f, -0.706836f, -0.706971f,
+ -0.707107f, -0.707242f, -0.707378f, -0.707513f, -0.707649f, -0.707784f, -0.707920f, -0.708055f,
+ -0.708191f, -0.708326f, -0.708461f, -0.708597f, -0.708732f, -0.708867f, -0.709002f, -0.709138f,
+ -0.709273f, -0.709408f, -0.709543f, -0.709678f, -0.709813f, -0.709948f, -0.710083f, -0.710218f,
+ -0.710353f, -0.710488f, -0.710623f, -0.710758f, -0.710893f, -0.711028f, -0.711163f, -0.711297f,
+ -0.711432f, -0.711567f, -0.711702f, -0.711836f, -0.711971f, -0.712106f, -0.712240f, -0.712375f,
+ -0.712509f, -0.712644f, -0.712778f, -0.712913f, -0.713047f, -0.713182f, -0.713316f, -0.713451f,
+ -0.713585f, -0.713719f, -0.713853f, -0.713988f, -0.714122f, -0.714256f, -0.714390f, -0.714525f,
+ -0.714659f, -0.714793f, -0.714927f, -0.715061f, -0.715195f, -0.715329f, -0.715463f, -0.715597f,
+ -0.715731f, -0.715865f, -0.715999f, -0.716132f, -0.716266f, -0.716400f, -0.716534f, -0.716668f,
+ -0.716801f, -0.716935f, -0.717069f, -0.717202f, -0.717336f, -0.717469f, -0.717603f, -0.717737f,
+ -0.717870f, -0.718004f, -0.718137f, -0.718270f, -0.718404f, -0.718537f, -0.718670f, -0.718804f,
+ -0.718937f, -0.719070f, -0.719204f, -0.719337f, -0.719470f, -0.719603f, -0.719736f, -0.719869f,
+ -0.720003f, -0.720136f, -0.720269f, -0.720402f, -0.720535f, -0.720668f, -0.720800f, -0.720933f,
+ -0.721066f, -0.721199f, -0.721332f, -0.721465f, -0.721597f, -0.721730f, -0.721863f, -0.721996f,
+ -0.722128f, -0.722261f, -0.722393f, -0.722526f, -0.722659f, -0.722791f, -0.722924f, -0.723056f,
+ -0.723188f, -0.723321f, -0.723453f, -0.723586f, -0.723718f, -0.723850f, -0.723983f, -0.724115f,
+ -0.724247f, -0.724379f, -0.724511f, -0.724644f, -0.724776f, -0.724908f, -0.725040f, -0.725172f,
+ -0.725304f, -0.725436f, -0.725568f, -0.725700f, -0.725832f, -0.725964f, -0.726095f, -0.726227f,
+ -0.726359f, -0.726491f, -0.726623f, -0.726754f, -0.726886f, -0.727018f, -0.727149f, -0.727281f,
+ -0.727413f, -0.727544f, -0.727676f, -0.727807f, -0.727939f, -0.728070f, -0.728202f, -0.728333f,
+ -0.728464f, -0.728596f, -0.728727f, -0.728858f, -0.728990f, -0.729121f, -0.729252f, -0.729383f,
+ -0.729514f, -0.729646f, -0.729777f, -0.729908f, -0.730039f, -0.730170f, -0.730301f, -0.730432f,
+ -0.730563f, -0.730694f, -0.730825f, -0.730955f, -0.731086f, -0.731217f, -0.731348f, -0.731479f,
+ -0.731609f, -0.731740f, -0.731871f, -0.732001f, -0.732132f, -0.732263f, -0.732393f, -0.732524f,
+ -0.732654f, -0.732785f, -0.732915f, -0.733046f, -0.733176f, -0.733306f, -0.733437f, -0.733567f,
+ -0.733697f, -0.733828f, -0.733958f, -0.734088f, -0.734218f, -0.734349f, -0.734479f, -0.734609f,
+ -0.734739f, -0.734869f, -0.734999f, -0.735129f, -0.735259f, -0.735389f, -0.735519f, -0.735649f,
+ -0.735779f, -0.735908f, -0.736038f, -0.736168f, -0.736298f, -0.736428f, -0.736557f, -0.736687f,
+ -0.736817f, -0.736946f, -0.737076f, -0.737205f, -0.737335f, -0.737464f, -0.737594f, -0.737723f,
+ -0.737853f, -0.737982f, -0.738112f, -0.738241f, -0.738370f, -0.738500f, -0.738629f, -0.738758f,
+ -0.738887f, -0.739017f, -0.739146f, -0.739275f, -0.739404f, -0.739533f, -0.739662f, -0.739791f,
+ -0.739920f, -0.740049f, -0.740178f, -0.740307f, -0.740436f, -0.740565f, -0.740694f, -0.740822f,
+ -0.740951f, -0.741080f, -0.741209f, -0.741337f, -0.741466f, -0.741595f, -0.741723f, -0.741852f,
+ -0.741980f, -0.742109f, -0.742237f, -0.742366f, -0.742494f, -0.742623f, -0.742751f, -0.742880f,
+ -0.743008f, -0.743136f, -0.743265f, -0.743393f, -0.743521f, -0.743649f, -0.743777f, -0.743906f,
+ -0.744034f, -0.744162f, -0.744290f, -0.744418f, -0.744546f, -0.744674f, -0.744802f, -0.744930f,
+ -0.745058f, -0.745186f, -0.745314f, -0.745441f, -0.745569f, -0.745697f, -0.745825f, -0.745952f,
+ -0.746080f, -0.746208f, -0.746335f, -0.746463f, -0.746591f, -0.746718f, -0.746846f, -0.746973f,
+ -0.747101f, -0.747228f, -0.747355f, -0.747483f, -0.747610f, -0.747738f, -0.747865f, -0.747992f,
+ -0.748119f, -0.748247f, -0.748374f, -0.748501f, -0.748628f, -0.748755f, -0.748882f, -0.749009f,
+ -0.749136f, -0.749263f, -0.749390f, -0.749517f, -0.749644f, -0.749771f, -0.749898f, -0.750025f,
+ -0.750152f, -0.750278f, -0.750405f, -0.750532f, -0.750659f, -0.750785f, -0.750912f, -0.751039f,
+ -0.751165f, -0.751292f, -0.751418f, -0.751545f, -0.751671f, -0.751798f, -0.751924f, -0.752050f,
+ -0.752177f, -0.752303f, -0.752429f, -0.752556f, -0.752682f, -0.752808f, -0.752934f, -0.753061f,
+ -0.753187f, -0.753313f, -0.753439f, -0.753565f, -0.753691f, -0.753817f, -0.753943f, -0.754069f,
+ -0.754195f, -0.754321f, -0.754447f, -0.754573f, -0.754698f, -0.754824f, -0.754950f, -0.755076f,
+ -0.755201f, -0.755327f, -0.755453f, -0.755578f, -0.755704f, -0.755829f, -0.755955f, -0.756081f,
+ -0.756206f, -0.756331f, -0.756457f, -0.756582f, -0.756708f, -0.756833f, -0.756958f, -0.757084f,
+ -0.757209f, -0.757334f, -0.757459f, -0.757584f, -0.757710f, -0.757835f, -0.757960f, -0.758085f,
+ -0.758210f, -0.758335f, -0.758460f, -0.758585f, -0.758710f, -0.758835f, -0.758960f, -0.759084f,
+ -0.759209f, -0.759334f, -0.759459f, -0.759583f, -0.759708f, -0.759833f, -0.759957f, -0.760082f,
+ -0.760207f, -0.760331f, -0.760456f, -0.760580f, -0.760705f, -0.760829f, -0.760954f, -0.761078f,
+ -0.761202f, -0.761327f, -0.761451f, -0.761575f, -0.761700f, -0.761824f, -0.761948f, -0.762072f,
+ -0.762196f, -0.762320f, -0.762444f, -0.762569f, -0.762693f, -0.762817f, -0.762941f, -0.763065f,
+ -0.763188f, -0.763312f, -0.763436f, -0.763560f, -0.763684f, -0.763808f, -0.763931f, -0.764055f,
+ -0.764179f, -0.764302f, -0.764426f, -0.764550f, -0.764673f, -0.764797f, -0.764920f, -0.765044f,
+ -0.765167f, -0.765291f, -0.765414f, -0.765538f, -0.765661f, -0.765784f, -0.765907f, -0.766031f,
+ -0.766154f, -0.766277f, -0.766400f, -0.766524f, -0.766647f, -0.766770f, -0.766893f, -0.767016f,
+ -0.767139f, -0.767262f, -0.767385f, -0.767508f, -0.767631f, -0.767754f, -0.767876f, -0.767999f,
+ -0.768122f, -0.768245f, -0.768368f, -0.768490f, -0.768613f, -0.768736f, -0.768858f, -0.768981f,
+ -0.769103f, -0.769226f, -0.769348f, -0.769471f, -0.769593f, -0.769716f, -0.769838f, -0.769961f,
+ -0.770083f, -0.770205f, -0.770327f, -0.770450f, -0.770572f, -0.770694f, -0.770816f, -0.770938f,
+ -0.771061f, -0.771183f, -0.771305f, -0.771427f, -0.771549f, -0.771671f, -0.771793f, -0.771915f,
+ -0.772036f, -0.772158f, -0.772280f, -0.772402f, -0.772524f, -0.772645f, -0.772767f, -0.772889f,
+ -0.773010f, -0.773132f, -0.773254f, -0.773375f, -0.773497f, -0.773618f, -0.773740f, -0.773861f,
+ -0.773983f, -0.774104f, -0.774225f, -0.774347f, -0.774468f, -0.774589f, -0.774711f, -0.774832f,
+ -0.774953f, -0.775074f, -0.775195f, -0.775317f, -0.775438f, -0.775559f, -0.775680f, -0.775801f,
+ -0.775922f, -0.776043f, -0.776164f, -0.776284f, -0.776405f, -0.776526f, -0.776647f, -0.776768f,
+ -0.776888f, -0.777009f, -0.777130f, -0.777251f, -0.777371f, -0.777492f, -0.777612f, -0.777733f,
+ -0.777853f, -0.777974f, -0.778094f, -0.778215f, -0.778335f, -0.778456f, -0.778576f, -0.778696f,
+ -0.778817f, -0.778937f, -0.779057f, -0.779177f, -0.779297f, -0.779418f, -0.779538f, -0.779658f,
+ -0.779778f, -0.779898f, -0.780018f, -0.780138f, -0.780258f, -0.780378f, -0.780498f, -0.780617f,
+ -0.780737f, -0.780857f, -0.780977f, -0.781097f, -0.781216f, -0.781336f, -0.781456f, -0.781575f,
+ -0.781695f, -0.781814f, -0.781934f, -0.782053f, -0.782173f, -0.782292f, -0.782412f, -0.782531f,
+ -0.782651f, -0.782770f, -0.782889f, -0.783009f, -0.783128f, -0.783247f, -0.783366f, -0.783485f,
+ -0.783605f, -0.783724f, -0.783843f, -0.783962f, -0.784081f, -0.784200f, -0.784319f, -0.784438f,
+ -0.784557f, -0.784675f, -0.784794f, -0.784913f, -0.785032f, -0.785151f, -0.785269f, -0.785388f,
+ -0.785507f, -0.785625f, -0.785744f, -0.785863f, -0.785981f, -0.786100f, -0.786218f, -0.786337f,
+ -0.786455f, -0.786574f, -0.786692f, -0.786810f, -0.786929f, -0.787047f, -0.787165f, -0.787284f,
+ -0.787402f, -0.787520f, -0.787638f, -0.787756f, -0.787874f, -0.787992f, -0.788110f, -0.788228f,
+ -0.788346f, -0.788464f, -0.788582f, -0.788700f, -0.788818f, -0.788936f, -0.789054f, -0.789172f,
+ -0.789289f, -0.789407f, -0.789525f, -0.789642f, -0.789760f, -0.789878f, -0.789995f, -0.790113f,
+ -0.790230f, -0.790348f, -0.790465f, -0.790583f, -0.790700f, -0.790817f, -0.790935f, -0.791052f,
+ -0.791169f, -0.791287f, -0.791404f, -0.791521f, -0.791638f, -0.791755f, -0.791872f, -0.791990f,
+ -0.792107f, -0.792224f, -0.792341f, -0.792458f, -0.792575f, -0.792691f, -0.792808f, -0.792925f,
+ -0.793042f, -0.793159f, -0.793276f, -0.793392f, -0.793509f, -0.793626f, -0.793742f, -0.793859f,
+ -0.793975f, -0.794092f, -0.794209f, -0.794325f, -0.794442f, -0.794558f, -0.794674f, -0.794791f,
+ -0.794907f, -0.795023f, -0.795140f, -0.795256f, -0.795372f, -0.795488f, -0.795605f, -0.795721f,
+ -0.795837f, -0.795953f, -0.796069f, -0.796185f, -0.796301f, -0.796417f, -0.796533f, -0.796649f,
+ -0.796765f, -0.796881f, -0.796996f, -0.797112f, -0.797228f, -0.797344f, -0.797459f, -0.797575f,
+ -0.797691f, -0.797806f, -0.797922f, -0.798038f, -0.798153f, -0.798269f, -0.798384f, -0.798500f,
+ -0.798615f, -0.798730f, -0.798846f, -0.798961f, -0.799076f, -0.799192f, -0.799307f, -0.799422f,
+ -0.799537f, -0.799652f, -0.799768f, -0.799883f, -0.799998f, -0.800113f, -0.800228f, -0.800343f,
+ -0.800458f, -0.800573f, -0.800687f, -0.800802f, -0.800917f, -0.801032f, -0.801147f, -0.801261f,
+ -0.801376f, -0.801491f, -0.801606f, -0.801720f, -0.801835f, -0.801949f, -0.802064f, -0.802178f,
+ -0.802293f, -0.802407f, -0.802522f, -0.802636f, -0.802750f, -0.802865f, -0.802979f, -0.803093f,
+ -0.803208f, -0.803322f, -0.803436f, -0.803550f, -0.803664f, -0.803778f, -0.803892f, -0.804006f,
+ -0.804120f, -0.804234f, -0.804348f, -0.804462f, -0.804576f, -0.804690f, -0.804804f, -0.804918f,
+ -0.805031f, -0.805145f, -0.805259f, -0.805372f, -0.805486f, -0.805600f, -0.805713f, -0.805827f,
+ -0.805940f, -0.806054f, -0.806167f, -0.806281f, -0.806394f, -0.806508f, -0.806621f, -0.806734f,
+ -0.806848f, -0.806961f, -0.807074f, -0.807187f, -0.807300f, -0.807414f, -0.807527f, -0.807640f,
+ -0.807753f, -0.807866f, -0.807979f, -0.808092f, -0.808205f, -0.808318f, -0.808430f, -0.808543f,
+ -0.808656f, -0.808769f, -0.808882f, -0.808994f, -0.809107f, -0.809220f, -0.809332f, -0.809445f,
+ -0.809558f, -0.809670f, -0.809783f, -0.809895f, -0.810008f, -0.810120f, -0.810232f, -0.810345f,
+ -0.810457f, -0.810570f, -0.810682f, -0.810794f, -0.810906f, -0.811018f, -0.811131f, -0.811243f,
+ -0.811355f, -0.811467f, -0.811579f, -0.811691f, -0.811803f, -0.811915f, -0.812027f, -0.812139f,
+ -0.812251f, -0.812362f, -0.812474f, -0.812586f, -0.812698f, -0.812809f, -0.812921f, -0.813033f,
+ -0.813144f, -0.813256f, -0.813368f, -0.813479f, -0.813591f, -0.813702f, -0.813814f, -0.813925f,
+ -0.814036f, -0.814148f, -0.814259f, -0.814370f, -0.814482f, -0.814593f, -0.814704f, -0.814815f,
+ -0.814926f, -0.815037f, -0.815149f, -0.815260f, -0.815371f, -0.815482f, -0.815593f, -0.815704f,
+ -0.815814f, -0.815925f, -0.816036f, -0.816147f, -0.816258f, -0.816368f, -0.816479f, -0.816590f,
+ -0.816701f, -0.816811f, -0.816922f, -0.817032f, -0.817143f, -0.817253f, -0.817364f, -0.817474f,
+ -0.817585f, -0.817695f, -0.817806f, -0.817916f, -0.818026f, -0.818137f, -0.818247f, -0.818357f,
+ -0.818467f, -0.818577f, -0.818687f, -0.818798f, -0.818908f, -0.819018f, -0.819128f, -0.819238f,
+ -0.819348f, -0.819457f, -0.819567f, -0.819677f, -0.819787f, -0.819897f, -0.820007f, -0.820116f,
+ -0.820226f, -0.820336f, -0.820445f, -0.820555f, -0.820664f, -0.820774f, -0.820884f, -0.820993f,
+ -0.821102f, -0.821212f, -0.821321f, -0.821431f, -0.821540f, -0.821649f, -0.821759f, -0.821868f,
+ -0.821977f, -0.822086f, -0.822195f, -0.822305f, -0.822414f, -0.822523f, -0.822632f, -0.822741f,
+ -0.822850f, -0.822959f, -0.823068f, -0.823177f, -0.823285f, -0.823394f, -0.823503f, -0.823612f,
+ -0.823721f, -0.823829f, -0.823938f, -0.824047f, -0.824155f, -0.824264f, -0.824372f, -0.824481f,
+ -0.824589f, -0.824698f, -0.824806f, -0.824915f, -0.825023f, -0.825131f, -0.825240f, -0.825348f,
+ -0.825456f, -0.825564f, -0.825673f, -0.825781f, -0.825889f, -0.825997f, -0.826105f, -0.826213f,
+ -0.826321f, -0.826429f, -0.826537f, -0.826645f, -0.826753f, -0.826861f, -0.826968f, -0.827076f,
+ -0.827184f, -0.827292f, -0.827399f, -0.827507f, -0.827615f, -0.827722f, -0.827830f, -0.827938f,
+ -0.828045f, -0.828153f, -0.828260f, -0.828367f, -0.828475f, -0.828582f, -0.828690f, -0.828797f,
+ -0.828904f, -0.829011f, -0.829119f, -0.829226f, -0.829333f, -0.829440f, -0.829547f, -0.829654f,
+ -0.829761f, -0.829868f, -0.829975f, -0.830082f, -0.830189f, -0.830296f, -0.830403f, -0.830510f,
+ -0.830616f, -0.830723f, -0.830830f, -0.830937f, -0.831043f, -0.831150f, -0.831257f, -0.831363f,
+ -0.831470f, -0.831576f, -0.831683f, -0.831789f, -0.831895f, -0.832002f, -0.832108f, -0.832215f,
+ -0.832321f, -0.832427f, -0.832533f, -0.832640f, -0.832746f, -0.832852f, -0.832958f, -0.833064f,
+ -0.833170f, -0.833276f, -0.833382f, -0.833488f, -0.833594f, -0.833700f, -0.833806f, -0.833912f,
+ -0.834018f, -0.834123f, -0.834229f, -0.834335f, -0.834440f, -0.834546f, -0.834652f, -0.834757f,
+ -0.834863f, -0.834968f, -0.835074f, -0.835179f, -0.835285f, -0.835390f, -0.835496f, -0.835601f,
+ -0.835706f, -0.835812f, -0.835917f, -0.836022f, -0.836127f, -0.836232f, -0.836338f, -0.836443f,
+ -0.836548f, -0.836653f, -0.836758f, -0.836863f, -0.836968f, -0.837073f, -0.837178f, -0.837282f,
+ -0.837387f, -0.837492f, -0.837597f, -0.837701f, -0.837806f, -0.837911f, -0.838015f, -0.838120f,
+ -0.838225f, -0.838329f, -0.838434f, -0.838538f, -0.838643f, -0.838747f, -0.838852f, -0.838956f,
+ -0.839060f, -0.839165f, -0.839269f, -0.839373f, -0.839477f, -0.839581f, -0.839686f, -0.839790f,
+ -0.839894f, -0.839998f, -0.840102f, -0.840206f, -0.840310f, -0.840414f, -0.840518f, -0.840622f,
+ -0.840725f, -0.840829f, -0.840933f, -0.841037f, -0.841140f, -0.841244f, -0.841348f, -0.841451f,
+ -0.841555f, -0.841659f, -0.841762f, -0.841866f, -0.841969f, -0.842072f, -0.842176f, -0.842279f,
+ -0.842383f, -0.842486f, -0.842589f, -0.842692f, -0.842796f, -0.842899f, -0.843002f, -0.843105f,
+ -0.843208f, -0.843311f, -0.843414f, -0.843517f, -0.843620f, -0.843723f, -0.843826f, -0.843929f,
+ -0.844032f, -0.844135f, -0.844238f, -0.844340f, -0.844443f, -0.844546f, -0.844648f, -0.844751f,
+ -0.844854f, -0.844956f, -0.845059f, -0.845161f, -0.845264f, -0.845366f, -0.845469f, -0.845571f,
+ -0.845673f, -0.845776f, -0.845878f, -0.845980f, -0.846082f, -0.846185f, -0.846287f, -0.846389f,
+ -0.846491f, -0.846593f, -0.846695f, -0.846797f, -0.846899f, -0.847001f, -0.847103f, -0.847205f,
+ -0.847307f, -0.847408f, -0.847510f, -0.847612f, -0.847714f, -0.847815f, -0.847917f, -0.848019f,
+ -0.848120f, -0.848222f, -0.848323f, -0.848425f, -0.848526f, -0.848628f, -0.848729f, -0.848831f,
+ -0.848932f, -0.849033f, -0.849135f, -0.849236f, -0.849337f, -0.849438f, -0.849540f, -0.849641f,
+ -0.849742f, -0.849843f, -0.849944f, -0.850045f, -0.850146f, -0.850247f, -0.850348f, -0.850449f,
+ -0.850549f, -0.850650f, -0.850751f, -0.850852f, -0.850953f, -0.851053f, -0.851154f, -0.851255f,
+ -0.851355f, -0.851456f, -0.851556f, -0.851657f, -0.851757f, -0.851858f, -0.851958f, -0.852059f,
+ -0.852159f, -0.852259f, -0.852360f, -0.852460f, -0.852560f, -0.852660f, -0.852760f, -0.852861f,
+ -0.852961f, -0.853061f, -0.853161f, -0.853261f, -0.853361f, -0.853461f, -0.853561f, -0.853660f,
+ -0.853760f, -0.853860f, -0.853960f, -0.854060f, -0.854159f, -0.854259f, -0.854359f, -0.854458f,
+ -0.854558f, -0.854658f, -0.854757f, -0.854857f, -0.854956f, -0.855056f, -0.855155f, -0.855254f,
+ -0.855354f, -0.855453f, -0.855552f, -0.855651f, -0.855751f, -0.855850f, -0.855949f, -0.856048f,
+ -0.856147f, -0.856246f, -0.856345f, -0.856444f, -0.856543f, -0.856642f, -0.856741f, -0.856840f,
+ -0.856939f, -0.857038f, -0.857137f, -0.857235f, -0.857334f, -0.857433f, -0.857531f, -0.857630f,
+ -0.857729f, -0.857827f, -0.857926f, -0.858024f, -0.858123f, -0.858221f, -0.858320f, -0.858418f,
+ -0.858516f, -0.858615f, -0.858713f, -0.858811f, -0.858909f, -0.859007f, -0.859106f, -0.859204f,
+ -0.859302f, -0.859400f, -0.859498f, -0.859596f, -0.859694f, -0.859792f, -0.859890f, -0.859988f,
+ -0.860085f, -0.860183f, -0.860281f, -0.860379f, -0.860476f, -0.860574f, -0.860672f, -0.860769f,
+ -0.860867f, -0.860964f, -0.861062f, -0.861160f, -0.861257f, -0.861354f, -0.861452f, -0.861549f,
+ -0.861646f, -0.861744f, -0.861841f, -0.861938f, -0.862035f, -0.862133f, -0.862230f, -0.862327f,
+ -0.862424f, -0.862521f, -0.862618f, -0.862715f, -0.862812f, -0.862909f, -0.863006f, -0.863103f,
+ -0.863199f, -0.863296f, -0.863393f, -0.863490f, -0.863586f, -0.863683f, -0.863780f, -0.863876f,
+ -0.863973f, -0.864069f, -0.864166f, -0.864262f, -0.864359f, -0.864455f, -0.864552f, -0.864648f,
+ -0.864744f, -0.864841f, -0.864937f, -0.865033f, -0.865129f, -0.865225f, -0.865321f, -0.865418f,
+ -0.865514f, -0.865610f, -0.865706f, -0.865802f, -0.865898f, -0.865993f, -0.866089f, -0.866185f,
+ -0.866281f, -0.866377f, -0.866472f, -0.866568f, -0.866664f, -0.866759f, -0.866855f, -0.866951f,
+ -0.867046f, -0.867142f, -0.867237f, -0.867333f, -0.867428f, -0.867523f, -0.867619f, -0.867714f,
+ -0.867809f, -0.867905f, -0.868000f, -0.868095f, -0.868190f, -0.868285f, -0.868381f, -0.868476f,
+ -0.868571f, -0.868666f, -0.868761f, -0.868856f, -0.868951f, -0.869045f, -0.869140f, -0.869235f,
+ -0.869330f, -0.869425f, -0.869519f, -0.869614f, -0.869709f, -0.869803f, -0.869898f, -0.869992f,
+ -0.870087f, -0.870182f, -0.870276f, -0.870370f, -0.870465f, -0.870559f, -0.870654f, -0.870748f,
+ -0.870842f, -0.870936f, -0.871031f, -0.871125f, -0.871219f, -0.871313f, -0.871407f, -0.871501f,
+ -0.871595f, -0.871689f, -0.871783f, -0.871877f, -0.871971f, -0.872065f, -0.872159f, -0.872252f,
+ -0.872346f, -0.872440f, -0.872534f, -0.872627f, -0.872721f, -0.872814f, -0.872908f, -0.873001f,
+ -0.873095f, -0.873188f, -0.873282f, -0.873375f, -0.873469f, -0.873562f, -0.873655f, -0.873749f,
+ -0.873842f, -0.873935f, -0.874028f, -0.874121f, -0.874215f, -0.874308f, -0.874401f, -0.874494f,
+ -0.874587f, -0.874680f, -0.874773f, -0.874865f, -0.874958f, -0.875051f, -0.875144f, -0.875237f,
+ -0.875329f, -0.875422f, -0.875515f, -0.875607f, -0.875700f, -0.875793f, -0.875885f, -0.875978f,
+ -0.876070f, -0.876163f, -0.876255f, -0.876347f, -0.876440f, -0.876532f, -0.876624f, -0.876716f,
+ -0.876809f, -0.876901f, -0.876993f, -0.877085f, -0.877177f, -0.877269f, -0.877361f, -0.877453f,
+ -0.877545f, -0.877637f, -0.877729f, -0.877821f, -0.877913f, -0.878005f, -0.878096f, -0.878188f,
+ -0.878280f, -0.878371f, -0.878463f, -0.878555f, -0.878646f, -0.878738f, -0.878829f, -0.878921f,
+ -0.879012f, -0.879104f, -0.879195f, -0.879286f, -0.879378f, -0.879469f, -0.879560f, -0.879651f,
+ -0.879743f, -0.879834f, -0.879925f, -0.880016f, -0.880107f, -0.880198f, -0.880289f, -0.880380f,
+ -0.880471f, -0.880562f, -0.880653f, -0.880743f, -0.880834f, -0.880925f, -0.881016f, -0.881106f,
+ -0.881197f, -0.881288f, -0.881378f, -0.881469f, -0.881559f, -0.881650f, -0.881740f, -0.881831f,
+ -0.881921f, -0.882012f, -0.882102f, -0.882192f, -0.882283f, -0.882373f, -0.882463f, -0.882553f,
+ -0.882643f, -0.882733f, -0.882824f, -0.882914f, -0.883004f, -0.883094f, -0.883184f, -0.883273f,
+ -0.883363f, -0.883453f, -0.883543f, -0.883633f, -0.883723f, -0.883812f, -0.883902f, -0.883992f,
+ -0.884081f, -0.884171f, -0.884260f, -0.884350f, -0.884439f, -0.884529f, -0.884618f, -0.884708f,
+ -0.884797f, -0.884886f, -0.884976f, -0.885065f, -0.885154f, -0.885243f, -0.885333f, -0.885422f,
+ -0.885511f, -0.885600f, -0.885689f, -0.885778f, -0.885867f, -0.885956f, -0.886045f, -0.886134f,
+ -0.886223f, -0.886311f, -0.886400f, -0.886489f, -0.886578f, -0.886666f, -0.886755f, -0.886844f,
+ -0.886932f, -0.887021f, -0.887109f, -0.887198f, -0.887286f, -0.887375f, -0.887463f, -0.887551f,
+ -0.887640f, -0.887728f, -0.887816f, -0.887904f, -0.887993f, -0.888081f, -0.888169f, -0.888257f,
+ -0.888345f, -0.888433f, -0.888521f, -0.888609f, -0.888697f, -0.888785f, -0.888873f, -0.888961f,
+ -0.889048f, -0.889136f, -0.889224f, -0.889312f, -0.889399f, -0.889487f, -0.889574f, -0.889662f,
+ -0.889750f, -0.889837f, -0.889925f, -0.890012f, -0.890099f, -0.890187f, -0.890274f, -0.890361f,
+ -0.890449f, -0.890536f, -0.890623f, -0.890710f, -0.890797f, -0.890885f, -0.890972f, -0.891059f,
+ -0.891146f, -0.891233f, -0.891320f, -0.891407f, -0.891493f, -0.891580f, -0.891667f, -0.891754f,
+ -0.891841f, -0.891927f, -0.892014f, -0.892101f, -0.892187f, -0.892274f, -0.892361f, -0.892447f,
+ -0.892534f, -0.892620f, -0.892706f, -0.892793f, -0.892879f, -0.892965f, -0.893052f, -0.893138f,
+ -0.893224f, -0.893310f, -0.893397f, -0.893483f, -0.893569f, -0.893655f, -0.893741f, -0.893827f,
+ -0.893913f, -0.893999f, -0.894085f, -0.894171f, -0.894256f, -0.894342f, -0.894428f, -0.894514f,
+ -0.894599f, -0.894685f, -0.894771f, -0.894856f, -0.894942f, -0.895028f, -0.895113f, -0.895198f,
+ -0.895284f, -0.895369f, -0.895455f, -0.895540f, -0.895625f, -0.895711f, -0.895796f, -0.895881f,
+ -0.895966f, -0.896051f, -0.896137f, -0.896222f, -0.896307f, -0.896392f, -0.896477f, -0.896562f,
+ -0.896646f, -0.896731f, -0.896816f, -0.896901f, -0.896986f, -0.897071f, -0.897155f, -0.897240f,
+ -0.897325f, -0.897409f, -0.897494f, -0.897578f, -0.897663f, -0.897747f, -0.897832f, -0.897916f,
+ -0.898001f, -0.898085f, -0.898169f, -0.898254f, -0.898338f, -0.898422f, -0.898506f, -0.898590f,
+ -0.898674f, -0.898759f, -0.898843f, -0.898927f, -0.899011f, -0.899095f, -0.899179f, -0.899262f,
+ -0.899346f, -0.899430f, -0.899514f, -0.899598f, -0.899681f, -0.899765f, -0.899849f, -0.899932f,
+ -0.900016f, -0.900099f, -0.900183f, -0.900266f, -0.900350f, -0.900433f, -0.900517f, -0.900600f,
+ -0.900683f, -0.900767f, -0.900850f, -0.900933f, -0.901016f, -0.901100f, -0.901183f, -0.901266f,
+ -0.901349f, -0.901432f, -0.901515f, -0.901598f, -0.901681f, -0.901764f, -0.901847f, -0.901929f,
+ -0.902012f, -0.902095f, -0.902178f, -0.902260f, -0.902343f, -0.902426f, -0.902508f, -0.902591f,
+ -0.902673f, -0.902756f, -0.902838f, -0.902921f, -0.903003f, -0.903085f, -0.903168f, -0.903250f,
+ -0.903332f, -0.903415f, -0.903497f, -0.903579f, -0.903661f, -0.903743f, -0.903825f, -0.903907f,
+ -0.903989f, -0.904071f, -0.904153f, -0.904235f, -0.904317f, -0.904399f, -0.904481f, -0.904562f,
+ -0.904644f, -0.904726f, -0.904807f, -0.904889f, -0.904971f, -0.905052f, -0.905134f, -0.905215f,
+ -0.905297f, -0.905378f, -0.905460f, -0.905541f, -0.905622f, -0.905704f, -0.905785f, -0.905866f,
+ -0.905947f, -0.906028f, -0.906110f, -0.906191f, -0.906272f, -0.906353f, -0.906434f, -0.906515f,
+ -0.906596f, -0.906677f, -0.906757f, -0.906838f, -0.906919f, -0.907000f, -0.907081f, -0.907161f,
+ -0.907242f, -0.907323f, -0.907403f, -0.907484f, -0.907564f, -0.907645f, -0.907725f, -0.907806f,
+ -0.907886f, -0.907966f, -0.908047f, -0.908127f, -0.908207f, -0.908288f, -0.908368f, -0.908448f,
+ -0.908528f, -0.908608f, -0.908688f, -0.908768f, -0.908848f, -0.908928f, -0.909008f, -0.909088f,
+ -0.909168f, -0.909248f, -0.909328f, -0.909407f, -0.909487f, -0.909567f, -0.909646f, -0.909726f,
+ -0.909806f, -0.909885f, -0.909965f, -0.910044f, -0.910124f, -0.910203f, -0.910283f, -0.910362f,
+ -0.910441f, -0.910521f, -0.910600f, -0.910679f, -0.910758f, -0.910837f, -0.910917f, -0.910996f,
+ -0.911075f, -0.911154f, -0.911233f, -0.911312f, -0.911391f, -0.911470f, -0.911548f, -0.911627f,
+ -0.911706f, -0.911785f, -0.911864f, -0.911942f, -0.912021f, -0.912099f, -0.912178f, -0.912257f,
+ -0.912335f, -0.912414f, -0.912492f, -0.912571f, -0.912649f, -0.912727f, -0.912806f, -0.912884f,
+ -0.912962f, -0.913040f, -0.913119f, -0.913197f, -0.913275f, -0.913353f, -0.913431f, -0.913509f,
+ -0.913587f, -0.913665f, -0.913743f, -0.913821f, -0.913899f, -0.913976f, -0.914054f, -0.914132f,
+ -0.914210f, -0.914287f, -0.914365f, -0.914443f, -0.914520f, -0.914598f, -0.914675f, -0.914753f,
+ -0.914830f, -0.914908f, -0.914985f, -0.915062f, -0.915140f, -0.915217f, -0.915294f, -0.915372f,
+ -0.915449f, -0.915526f, -0.915603f, -0.915680f, -0.915757f, -0.915834f, -0.915911f, -0.915988f,
+ -0.916065f, -0.916142f, -0.916219f, -0.916296f, -0.916372f, -0.916449f, -0.916526f, -0.916602f,
+ -0.916679f, -0.916756f, -0.916832f, -0.916909f, -0.916985f, -0.917062f, -0.917138f, -0.917215f,
+ -0.917291f, -0.917367f, -0.917444f, -0.917520f, -0.917596f, -0.917672f, -0.917749f, -0.917825f,
+ -0.917901f, -0.917977f, -0.918053f, -0.918129f, -0.918205f, -0.918281f, -0.918357f, -0.918433f,
+ -0.918508f, -0.918584f, -0.918660f, -0.918736f, -0.918811f, -0.918887f, -0.918963f, -0.919038f,
+ -0.919114f, -0.919189f, -0.919265f, -0.919340f, -0.919416f, -0.919491f, -0.919567f, -0.919642f,
+ -0.919717f, -0.919792f, -0.919868f, -0.919943f, -0.920018f, -0.920093f, -0.920168f, -0.920243f,
+ -0.920318f, -0.920393f, -0.920468f, -0.920543f, -0.920618f, -0.920693f, -0.920768f, -0.920842f,
+ -0.920917f, -0.920992f, -0.921067f, -0.921141f, -0.921216f, -0.921291f, -0.921365f, -0.921440f,
+ -0.921514f, -0.921588f, -0.921663f, -0.921737f, -0.921812f, -0.921886f, -0.921960f, -0.922034f,
+ -0.922109f, -0.922183f, -0.922257f, -0.922331f, -0.922405f, -0.922479f, -0.922553f, -0.922627f,
+ -0.922701f, -0.922775f, -0.922849f, -0.922923f, -0.922997f, -0.923070f, -0.923144f, -0.923218f,
+ -0.923291f, -0.923365f, -0.923439f, -0.923512f, -0.923586f, -0.923659f, -0.923733f, -0.923806f,
+ -0.923880f, -0.923953f, -0.924026f, -0.924100f, -0.924173f, -0.924246f, -0.924319f, -0.924392f,
+ -0.924465f, -0.924539f, -0.924612f, -0.924685f, -0.924758f, -0.924831f, -0.924904f, -0.924976f,
+ -0.925049f, -0.925122f, -0.925195f, -0.925268f, -0.925340f, -0.925413f, -0.925486f, -0.925558f,
+ -0.925631f, -0.925703f, -0.925776f, -0.925848f, -0.925921f, -0.925993f, -0.926066f, -0.926138f,
+ -0.926210f, -0.926283f, -0.926355f, -0.926427f, -0.926499f, -0.926571f, -0.926643f, -0.926715f,
+ -0.926787f, -0.926859f, -0.926931f, -0.927003f, -0.927075f, -0.927147f, -0.927219f, -0.927291f,
+ -0.927363f, -0.927434f, -0.927506f, -0.927578f, -0.927649f, -0.927721f, -0.927792f, -0.927864f,
+ -0.927935f, -0.928007f, -0.928078f, -0.928150f, -0.928221f, -0.928292f, -0.928364f, -0.928435f,
+ -0.928506f, -0.928577f, -0.928648f, -0.928720f, -0.928791f, -0.928862f, -0.928933f, -0.929004f,
+ -0.929075f, -0.929146f, -0.929216f, -0.929287f, -0.929358f, -0.929429f, -0.929500f, -0.929570f,
+ -0.929641f, -0.929712f, -0.929782f, -0.929853f, -0.929923f, -0.929994f, -0.930064f, -0.930135f,
+ -0.930205f, -0.930275f, -0.930346f, -0.930416f, -0.930486f, -0.930556f, -0.930627f, -0.930697f,
+ -0.930767f, -0.930837f, -0.930907f, -0.930977f, -0.931047f, -0.931117f, -0.931187f, -0.931257f,
+ -0.931327f, -0.931397f, -0.931466f, -0.931536f, -0.931606f, -0.931675f, -0.931745f, -0.931815f,
+ -0.931884f, -0.931954f, -0.932023f, -0.932093f, -0.932162f, -0.932232f, -0.932301f, -0.932370f,
+ -0.932440f, -0.932509f, -0.932578f, -0.932647f, -0.932716f, -0.932786f, -0.932855f, -0.932924f,
+ -0.932993f, -0.933062f, -0.933131f, -0.933200f, -0.933269f, -0.933337f, -0.933406f, -0.933475f,
+ -0.933544f, -0.933612f, -0.933681f, -0.933750f, -0.933818f, -0.933887f, -0.933956f, -0.934024f,
+ -0.934093f, -0.934161f, -0.934229f, -0.934298f, -0.934366f, -0.934434f, -0.934503f, -0.934571f,
+ -0.934639f, -0.934707f, -0.934775f, -0.934844f, -0.934912f, -0.934980f, -0.935048f, -0.935116f,
+ -0.935184f, -0.935251f, -0.935319f, -0.935387f, -0.935455f, -0.935523f, -0.935590f, -0.935658f,
+ -0.935726f, -0.935793f, -0.935861f, -0.935928f, -0.935996f, -0.936063f, -0.936131f, -0.936198f,
+ -0.936266f, -0.936333f, -0.936400f, -0.936468f, -0.936535f, -0.936602f, -0.936669f, -0.936736f,
+ -0.936803f, -0.936871f, -0.936938f, -0.937005f, -0.937072f, -0.937138f, -0.937205f, -0.937272f,
+ -0.937339f, -0.937406f, -0.937473f, -0.937539f, -0.937606f, -0.937673f, -0.937739f, -0.937806f,
+ -0.937872f, -0.937939f, -0.938005f, -0.938072f, -0.938138f, -0.938205f, -0.938271f, -0.938337f,
+ -0.938404f, -0.938470f, -0.938536f, -0.938602f, -0.938668f, -0.938734f, -0.938800f, -0.938866f,
+ -0.938932f, -0.938998f, -0.939064f, -0.939130f, -0.939196f, -0.939262f, -0.939328f, -0.939394f,
+ -0.939459f, -0.939525f, -0.939591f, -0.939656f, -0.939722f, -0.939787f, -0.939853f, -0.939918f,
+ -0.939984f, -0.940049f, -0.940115f, -0.940180f, -0.940245f, -0.940310f, -0.940376f, -0.940441f,
+ -0.940506f, -0.940571f, -0.940636f, -0.940701f, -0.940766f, -0.940831f, -0.940896f, -0.940961f,
+ -0.941026f, -0.941091f, -0.941156f, -0.941221f, -0.941285f, -0.941350f, -0.941415f, -0.941479f,
+ -0.941544f, -0.941609f, -0.941673f, -0.941738f, -0.941802f, -0.941867f, -0.941931f, -0.941995f,
+ -0.942060f, -0.942124f, -0.942188f, -0.942253f, -0.942317f, -0.942381f, -0.942445f, -0.942509f,
+ -0.942573f, -0.942637f, -0.942701f, -0.942765f, -0.942829f, -0.942893f, -0.942957f, -0.943021f,
+ -0.943084f, -0.943148f, -0.943212f, -0.943276f, -0.943339f, -0.943403f, -0.943466f, -0.943530f,
+ -0.943593f, -0.943657f, -0.943720f, -0.943784f, -0.943847f, -0.943910f, -0.943974f, -0.944037f,
+ -0.944100f, -0.944163f, -0.944227f, -0.944290f, -0.944353f, -0.944416f, -0.944479f, -0.944542f,
+ -0.944605f, -0.944668f, -0.944731f, -0.944793f, -0.944856f, -0.944919f, -0.944982f, -0.945045f,
+ -0.945107f, -0.945170f, -0.945232f, -0.945295f, -0.945358f, -0.945420f, -0.945482f, -0.945545f,
+ -0.945607f, -0.945670f, -0.945732f, -0.945794f, -0.945857f, -0.945919f, -0.945981f, -0.946043f,
+ -0.946105f, -0.946167f, -0.946229f, -0.946291f, -0.946353f, -0.946415f, -0.946477f, -0.946539f,
+ -0.946601f, -0.946663f, -0.946724f, -0.946786f, -0.946848f, -0.946910f, -0.946971f, -0.947033f,
+ -0.947094f, -0.947156f, -0.947217f, -0.947279f, -0.947340f, -0.947402f, -0.947463f, -0.947524f,
+ -0.947586f, -0.947647f, -0.947708f, -0.947769f, -0.947830f, -0.947891f, -0.947953f, -0.948014f,
+ -0.948075f, -0.948136f, -0.948196f, -0.948257f, -0.948318f, -0.948379f, -0.948440f, -0.948501f,
+ -0.948561f, -0.948622f, -0.948683f, -0.948743f, -0.948804f, -0.948864f, -0.948925f, -0.948985f,
+ -0.949046f, -0.949106f, -0.949167f, -0.949227f, -0.949287f, -0.949348f, -0.949408f, -0.949468f,
+ -0.949528f, -0.949588f, -0.949648f, -0.949708f, -0.949768f, -0.949829f, -0.949888f, -0.949948f,
+ -0.950008f, -0.950068f, -0.950128f, -0.950188f, -0.950247f, -0.950307f, -0.950367f, -0.950426f,
+ -0.950486f, -0.950546f, -0.950605f, -0.950665f, -0.950724f, -0.950784f, -0.950843f, -0.950902f,
+ -0.950962f, -0.951021f, -0.951080f, -0.951139f, -0.951199f, -0.951258f, -0.951317f, -0.951376f,
+ -0.951435f, -0.951494f, -0.951553f, -0.951612f, -0.951671f, -0.951730f, -0.951789f, -0.951847f,
+ -0.951906f, -0.951965f, -0.952024f, -0.952082f, -0.952141f, -0.952199f, -0.952258f, -0.952317f,
+ -0.952375f, -0.952433f, -0.952492f, -0.952550f, -0.952609f, -0.952667f, -0.952725f, -0.952783f,
+ -0.952842f, -0.952900f, -0.952958f, -0.953016f, -0.953074f, -0.953132f, -0.953190f, -0.953248f,
+ -0.953306f, -0.953364f, -0.953422f, -0.953480f, -0.953537f, -0.953595f, -0.953653f, -0.953711f,
+ -0.953768f, -0.953826f, -0.953883f, -0.953941f, -0.953998f, -0.954056f, -0.954113f, -0.954171f,
+ -0.954228f, -0.954285f, -0.954343f, -0.954400f, -0.954457f, -0.954514f, -0.954572f, -0.954629f,
+ -0.954686f, -0.954743f, -0.954800f, -0.954857f, -0.954914f, -0.954971f, -0.955028f, -0.955084f,
+ -0.955141f, -0.955198f, -0.955255f, -0.955311f, -0.955368f, -0.955425f, -0.955481f, -0.955538f,
+ -0.955594f, -0.955651f, -0.955707f, -0.955764f, -0.955820f, -0.955876f, -0.955933f, -0.955989f,
+ -0.956045f, -0.956101f, -0.956158f, -0.956214f, -0.956270f, -0.956326f, -0.956382f, -0.956438f,
+ -0.956494f, -0.956550f, -0.956606f, -0.956662f, -0.956717f, -0.956773f, -0.956829f, -0.956885f,
+ -0.956940f, -0.956996f, -0.957052f, -0.957107f, -0.957163f, -0.957218f, -0.957274f, -0.957329f,
+ -0.957385f, -0.957440f, -0.957495f, -0.957550f, -0.957606f, -0.957661f, -0.957716f, -0.957771f,
+ -0.957826f, -0.957882f, -0.957937f, -0.957992f, -0.958046f, -0.958101f, -0.958156f, -0.958211f,
+ -0.958266f, -0.958321f, -0.958376f, -0.958430f, -0.958485f, -0.958540f, -0.958594f, -0.958649f,
+ -0.958703f, -0.958758f, -0.958812f, -0.958867f, -0.958921f, -0.958976f, -0.959030f, -0.959084f,
+ -0.959139f, -0.959193f, -0.959247f, -0.959301f, -0.959355f, -0.959409f, -0.959463f, -0.959518f,
+ -0.959572f, -0.959625f, -0.959679f, -0.959733f, -0.959787f, -0.959841f, -0.959895f, -0.959948f,
+ -0.960002f, -0.960056f, -0.960109f, -0.960163f, -0.960217f, -0.960270f, -0.960324f, -0.960377f,
+ -0.960431f, -0.960484f, -0.960537f, -0.960591f, -0.960644f, -0.960697f, -0.960750f, -0.960804f,
+ -0.960857f, -0.960910f, -0.960963f, -0.961016f, -0.961069f, -0.961122f, -0.961175f, -0.961228f,
+ -0.961280f, -0.961333f, -0.961386f, -0.961439f, -0.961492f, -0.961544f, -0.961597f, -0.961649f,
+ -0.961702f, -0.961755f, -0.961807f, -0.961860f, -0.961912f, -0.961964f, -0.962017f, -0.962069f,
+ -0.962121f, -0.962174f, -0.962226f, -0.962278f, -0.962330f, -0.962382f, -0.962434f, -0.962486f,
+ -0.962538f, -0.962590f, -0.962642f, -0.962694f, -0.962746f, -0.962798f, -0.962850f, -0.962902f,
+ -0.962953f, -0.963005f, -0.963057f, -0.963108f, -0.963160f, -0.963211f, -0.963263f, -0.963314f,
+ -0.963366f, -0.963417f, -0.963469f, -0.963520f, -0.963571f, -0.963623f, -0.963674f, -0.963725f,
+ -0.963776f, -0.963827f, -0.963878f, -0.963929f, -0.963980f, -0.964031f, -0.964082f, -0.964133f,
+ -0.964184f, -0.964235f, -0.964286f, -0.964336f, -0.964387f, -0.964438f, -0.964489f, -0.964539f,
+ -0.964590f, -0.964640f, -0.964691f, -0.964741f, -0.964792f, -0.964842f, -0.964893f, -0.964943f,
+ -0.964993f, -0.965044f, -0.965094f, -0.965144f, -0.965194f, -0.965244f, -0.965294f, -0.965344f,
+ -0.965394f, -0.965444f, -0.965494f, -0.965544f, -0.965594f, -0.965644f, -0.965694f, -0.965744f,
+ -0.965793f, -0.965843f, -0.965893f, -0.965942f, -0.965992f, -0.966042f, -0.966091f, -0.966141f,
+ -0.966190f, -0.966239f, -0.966289f, -0.966338f, -0.966387f, -0.966437f, -0.966486f, -0.966535f,
+ -0.966584f, -0.966633f, -0.966683f, -0.966732f, -0.966781f, -0.966830f, -0.966879f, -0.966928f,
+ -0.966976f, -0.967025f, -0.967074f, -0.967123f, -0.967172f, -0.967220f, -0.967269f, -0.967318f,
+ -0.967366f, -0.967415f, -0.967463f, -0.967512f, -0.967560f, -0.967609f, -0.967657f, -0.967706f,
+ -0.967754f, -0.967802f, -0.967850f, -0.967899f, -0.967947f, -0.967995f, -0.968043f, -0.968091f,
+ -0.968139f, -0.968187f, -0.968235f, -0.968283f, -0.968331f, -0.968379f, -0.968427f, -0.968474f,
+ -0.968522f, -0.968570f, -0.968617f, -0.968665f, -0.968713f, -0.968760f, -0.968808f, -0.968855f,
+ -0.968903f, -0.968950f, -0.968998f, -0.969045f, -0.969092f, -0.969140f, -0.969187f, -0.969234f,
+ -0.969281f, -0.969328f, -0.969375f, -0.969423f, -0.969470f, -0.969517f, -0.969564f, -0.969611f,
+ -0.969657f, -0.969704f, -0.969751f, -0.969798f, -0.969845f, -0.969891f, -0.969938f, -0.969985f,
+ -0.970031f, -0.970078f, -0.970124f, -0.970171f, -0.970217f, -0.970264f, -0.970310f, -0.970357f,
+ -0.970403f, -0.970449f, -0.970495f, -0.970542f, -0.970588f, -0.970634f, -0.970680f, -0.970726f,
+ -0.970772f, -0.970818f, -0.970864f, -0.970910f, -0.970956f, -0.971002f, -0.971048f, -0.971093f,
+ -0.971139f, -0.971185f, -0.971231f, -0.971276f, -0.971322f, -0.971367f, -0.971413f, -0.971458f,
+ -0.971504f, -0.971549f, -0.971595f, -0.971640f, -0.971685f, -0.971731f, -0.971776f, -0.971821f,
+ -0.971866f, -0.971911f, -0.971957f, -0.972002f, -0.972047f, -0.972092f, -0.972137f, -0.972182f,
+ -0.972227f, -0.972271f, -0.972316f, -0.972361f, -0.972406f, -0.972450f, -0.972495f, -0.972540f,
+ -0.972584f, -0.972629f, -0.972673f, -0.972718f, -0.972762f, -0.972807f, -0.972851f, -0.972896f,
+ -0.972940f, -0.972984f, -0.973028f, -0.973073f, -0.973117f, -0.973161f, -0.973205f, -0.973249f,
+ -0.973293f, -0.973337f, -0.973381f, -0.973425f, -0.973469f, -0.973513f, -0.973557f, -0.973601f,
+ -0.973644f, -0.973688f, -0.973732f, -0.973775f, -0.973819f, -0.973862f, -0.973906f, -0.973949f,
+ -0.973993f, -0.974036f, -0.974080f, -0.974123f, -0.974166f, -0.974210f, -0.974253f, -0.974296f,
+ -0.974339f, -0.974383f, -0.974426f, -0.974469f, -0.974512f, -0.974555f, -0.974598f, -0.974641f,
+ -0.974684f, -0.974726f, -0.974769f, -0.974812f, -0.974855f, -0.974897f, -0.974940f, -0.974983f,
+ -0.975025f, -0.975068f, -0.975110f, -0.975153f, -0.975195f, -0.975238f, -0.975280f, -0.975323f,
+ -0.975365f, -0.975407f, -0.975449f, -0.975492f, -0.975534f, -0.975576f, -0.975618f, -0.975660f,
+ -0.975702f, -0.975744f, -0.975786f, -0.975828f, -0.975870f, -0.975912f, -0.975954f, -0.975995f,
+ -0.976037f, -0.976079f, -0.976120f, -0.976162f, -0.976204f, -0.976245f, -0.976287f, -0.976328f,
+ -0.976370f, -0.976411f, -0.976453f, -0.976494f, -0.976535f, -0.976576f, -0.976618f, -0.976659f,
+ -0.976700f, -0.976741f, -0.976782f, -0.976823f, -0.976864f, -0.976905f, -0.976946f, -0.976987f,
+ -0.977028f, -0.977069f, -0.977110f, -0.977151f, -0.977191f, -0.977232f, -0.977273f, -0.977313f,
+ -0.977354f, -0.977394f, -0.977435f, -0.977475f, -0.977516f, -0.977556f, -0.977597f, -0.977637f,
+ -0.977677f, -0.977718f, -0.977758f, -0.977798f, -0.977838f, -0.977878f, -0.977918f, -0.977959f,
+ -0.977998f, -0.978038f, -0.978078f, -0.978118f, -0.978158f, -0.978198f, -0.978238f, -0.978278f,
+ -0.978317f, -0.978357f, -0.978397f, -0.978436f, -0.978476f, -0.978516f, -0.978555f, -0.978594f,
+ -0.978634f, -0.978673f, -0.978713f, -0.978752f, -0.978791f, -0.978831f, -0.978870f, -0.978909f,
+ -0.978948f, -0.978987f, -0.979026f, -0.979065f, -0.979104f, -0.979143f, -0.979182f, -0.979221f,
+ -0.979260f, -0.979299f, -0.979338f, -0.979376f, -0.979415f, -0.979454f, -0.979493f, -0.979531f,
+ -0.979570f, -0.979608f, -0.979647f, -0.979685f, -0.979724f, -0.979762f, -0.979800f, -0.979839f,
+ -0.979877f, -0.979915f, -0.979954f, -0.979992f, -0.980030f, -0.980068f, -0.980106f, -0.980144f,
+ -0.980182f, -0.980220f, -0.980258f, -0.980296f, -0.980334f, -0.980372f, -0.980409f, -0.980447f,
+ -0.980485f, -0.980523f, -0.980560f, -0.980598f, -0.980635f, -0.980673f, -0.980710f, -0.980748f,
+ -0.980785f, -0.980823f, -0.980860f, -0.980897f, -0.980935f, -0.980972f, -0.981009f, -0.981046f,
+ -0.981083f, -0.981120f, -0.981158f, -0.981195f, -0.981232f, -0.981269f, -0.981305f, -0.981342f,
+ -0.981379f, -0.981416f, -0.981453f, -0.981490f, -0.981526f, -0.981563f, -0.981600f, -0.981636f,
+ -0.981673f, -0.981709f, -0.981746f, -0.981782f, -0.981819f, -0.981855f, -0.981891f, -0.981928f,
+ -0.981964f, -0.982000f, -0.982036f, -0.982072f, -0.982109f, -0.982145f, -0.982181f, -0.982217f,
+ -0.982253f, -0.982289f, -0.982325f, -0.982360f, -0.982396f, -0.982432f, -0.982468f, -0.982504f,
+ -0.982539f, -0.982575f, -0.982611f, -0.982646f, -0.982682f, -0.982717f, -0.982753f, -0.982788f,
+ -0.982824f, -0.982859f, -0.982894f, -0.982930f, -0.982965f, -0.983000f, -0.983035f, -0.983070f,
+ -0.983105f, -0.983141f, -0.983176f, -0.983211f, -0.983246f, -0.983281f, -0.983315f, -0.983350f,
+ -0.983385f, -0.983420f, -0.983455f, -0.983489f, -0.983524f, -0.983559f, -0.983593f, -0.983628f,
+ -0.983662f, -0.983697f, -0.983731f, -0.983766f, -0.983800f, -0.983835f, -0.983869f, -0.983903f,
+ -0.983937f, -0.983972f, -0.984006f, -0.984040f, -0.984074f, -0.984108f, -0.984142f, -0.984176f,
+ -0.984210f, -0.984244f, -0.984278f, -0.984312f, -0.984346f, -0.984379f, -0.984413f, -0.984447f,
+ -0.984480f, -0.984514f, -0.984548f, -0.984581f, -0.984615f, -0.984648f, -0.984682f, -0.984715f,
+ -0.984748f, -0.984782f, -0.984815f, -0.984848f, -0.984882f, -0.984915f, -0.984948f, -0.984981f,
+ -0.985014f, -0.985047f, -0.985080f, -0.985113f, -0.985146f, -0.985179f, -0.985212f, -0.985245f,
+ -0.985278f, -0.985310f, -0.985343f, -0.985376f, -0.985408f, -0.985441f, -0.985474f, -0.985506f,
+ -0.985539f, -0.985571f, -0.985604f, -0.985636f, -0.985668f, -0.985701f, -0.985733f, -0.985765f,
+ -0.985798f, -0.985830f, -0.985862f, -0.985894f, -0.985926f, -0.985958f, -0.985990f, -0.986022f,
+ -0.986054f, -0.986086f, -0.986118f, -0.986150f, -0.986181f, -0.986213f, -0.986245f, -0.986276f,
+ -0.986308f, -0.986340f, -0.986371f, -0.986403f, -0.986434f, -0.986466f, -0.986497f, -0.986529f,
+ -0.986560f, -0.986591f, -0.986623f, -0.986654f, -0.986685f, -0.986716f, -0.986747f, -0.986778f,
+ -0.986809f, -0.986840f, -0.986871f, -0.986902f, -0.986933f, -0.986964f, -0.986995f, -0.987026f,
+ -0.987057f, -0.987087f, -0.987118f, -0.987149f, -0.987179f, -0.987210f, -0.987240f, -0.987271f,
+ -0.987301f, -0.987332f, -0.987362f, -0.987393f, -0.987423f, -0.987453f, -0.987484f, -0.987514f,
+ -0.987544f, -0.987574f, -0.987604f, -0.987634f, -0.987664f, -0.987694f, -0.987724f, -0.987754f,
+ -0.987784f, -0.987814f, -0.987844f, -0.987874f, -0.987903f, -0.987933f, -0.987963f, -0.987992f,
+ -0.988022f, -0.988052f, -0.988081f, -0.988111f, -0.988140f, -0.988169f, -0.988199f, -0.988228f,
+ -0.988258f, -0.988287f, -0.988316f, -0.988345f, -0.988374f, -0.988404f, -0.988433f, -0.988462f,
+ -0.988491f, -0.988520f, -0.988549f, -0.988578f, -0.988607f, -0.988635f, -0.988664f, -0.988693f,
+ -0.988722f, -0.988750f, -0.988779f, -0.988808f, -0.988836f, -0.988865f, -0.988893f, -0.988922f,
+ -0.988950f, -0.988979f, -0.989007f, -0.989035f, -0.989064f, -0.989092f, -0.989120f, -0.989148f,
+ -0.989177f, -0.989205f, -0.989233f, -0.989261f, -0.989289f, -0.989317f, -0.989345f, -0.989373f,
+ -0.989400f, -0.989428f, -0.989456f, -0.989484f, -0.989511f, -0.989539f, -0.989567f, -0.989594f,
+ -0.989622f, -0.989650f, -0.989677f, -0.989704f, -0.989732f, -0.989759f, -0.989787f, -0.989814f,
+ -0.989841f, -0.989869f, -0.989896f, -0.989923f, -0.989950f, -0.989977f, -0.990004f, -0.990031f,
+ -0.990058f, -0.990085f, -0.990112f, -0.990139f, -0.990166f, -0.990193f, -0.990219f, -0.990246f,
+ -0.990273f, -0.990299f, -0.990326f, -0.990353f, -0.990379f, -0.990406f, -0.990432f, -0.990459f,
+ -0.990485f, -0.990511f, -0.990538f, -0.990564f, -0.990590f, -0.990617f, -0.990643f, -0.990669f,
+ -0.990695f, -0.990721f, -0.990747f, -0.990773f, -0.990799f, -0.990825f, -0.990851f, -0.990877f,
+ -0.990903f, -0.990928f, -0.990954f, -0.990980f, -0.991006f, -0.991031f, -0.991057f, -0.991082f,
+ -0.991108f, -0.991133f, -0.991159f, -0.991184f, -0.991210f, -0.991235f, -0.991260f, -0.991286f,
+ -0.991311f, -0.991336f, -0.991361f, -0.991386f, -0.991411f, -0.991437f, -0.991462f, -0.991487f,
+ -0.991511f, -0.991536f, -0.991561f, -0.991586f, -0.991611f, -0.991636f, -0.991660f, -0.991685f,
+ -0.991710f, -0.991734f, -0.991759f, -0.991783f, -0.991808f, -0.991832f, -0.991857f, -0.991881f,
+ -0.991906f, -0.991930f, -0.991954f, -0.991979f, -0.992003f, -0.992027f, -0.992051f, -0.992075f,
+ -0.992099f, -0.992123f, -0.992147f, -0.992171f, -0.992195f, -0.992219f, -0.992243f, -0.992267f,
+ -0.992291f, -0.992314f, -0.992338f, -0.992362f, -0.992385f, -0.992409f, -0.992433f, -0.992456f,
+ -0.992480f, -0.992503f, -0.992526f, -0.992550f, -0.992573f, -0.992596f, -0.992620f, -0.992643f,
+ -0.992666f, -0.992689f, -0.992712f, -0.992736f, -0.992759f, -0.992782f, -0.992805f, -0.992828f,
+ -0.992850f, -0.992873f, -0.992896f, -0.992919f, -0.992942f, -0.992964f, -0.992987f, -0.993010f,
+ -0.993032f, -0.993055f, -0.993077f, -0.993100f, -0.993122f, -0.993145f, -0.993167f, -0.993190f,
+ -0.993212f, -0.993234f, -0.993257f, -0.993279f, -0.993301f, -0.993323f, -0.993345f, -0.993367f,
+ -0.993389f, -0.993411f, -0.993433f, -0.993455f, -0.993477f, -0.993499f, -0.993521f, -0.993542f,
+ -0.993564f, -0.993586f, -0.993608f, -0.993629f, -0.993651f, -0.993672f, -0.993694f, -0.993715f,
+ -0.993737f, -0.993758f, -0.993779f, -0.993801f, -0.993822f, -0.993843f, -0.993865f, -0.993886f,
+ -0.993907f, -0.993928f, -0.993949f, -0.993970f, -0.993991f, -0.994012f, -0.994033f, -0.994054f,
+ -0.994075f, -0.994096f, -0.994116f, -0.994137f, -0.994158f, -0.994179f, -0.994199f, -0.994220f,
+ -0.994240f, -0.994261f, -0.994281f, -0.994302f, -0.994322f, -0.994343f, -0.994363f, -0.994383f,
+ -0.994404f, -0.994424f, -0.994444f, -0.994464f, -0.994484f, -0.994505f, -0.994525f, -0.994545f,
+ -0.994565f, -0.994585f, -0.994604f, -0.994624f, -0.994644f, -0.994664f, -0.994684f, -0.994703f,
+ -0.994723f, -0.994743f, -0.994762f, -0.994782f, -0.994802f, -0.994821f, -0.994841f, -0.994860f,
+ -0.994879f, -0.994899f, -0.994918f, -0.994937f, -0.994957f, -0.994976f, -0.994995f, -0.995014f,
+ -0.995033f, -0.995052f, -0.995071f, -0.995090f, -0.995109f, -0.995128f, -0.995147f, -0.995166f,
+ -0.995185f, -0.995203f, -0.995222f, -0.995241f, -0.995260f, -0.995278f, -0.995297f, -0.995315f,
+ -0.995334f, -0.995352f, -0.995371f, -0.995389f, -0.995408f, -0.995426f, -0.995444f, -0.995463f,
+ -0.995481f, -0.995499f, -0.995517f, -0.995535f, -0.995553f, -0.995571f, -0.995589f, -0.995607f,
+ -0.995625f, -0.995643f, -0.995661f, -0.995679f, -0.995697f, -0.995714f, -0.995732f, -0.995750f,
+ -0.995767f, -0.995785f, -0.995803f, -0.995820f, -0.995838f, -0.995855f, -0.995872f, -0.995890f,
+ -0.995907f, -0.995925f, -0.995942f, -0.995959f, -0.995976f, -0.995993f, -0.996011f, -0.996028f,
+ -0.996045f, -0.996062f, -0.996079f, -0.996096f, -0.996113f, -0.996129f, -0.996146f, -0.996163f,
+ -0.996180f, -0.996197f, -0.996213f, -0.996230f, -0.996247f, -0.996263f, -0.996280f, -0.996296f,
+ -0.996313f, -0.996329f, -0.996345f, -0.996362f, -0.996378f, -0.996394f, -0.996411f, -0.996427f,
+ -0.996443f, -0.996459f, -0.996475f, -0.996491f, -0.996507f, -0.996523f, -0.996539f, -0.996555f,
+ -0.996571f, -0.996587f, -0.996603f, -0.996619f, -0.996634f, -0.996650f, -0.996666f, -0.996681f,
+ -0.996697f, -0.996712f, -0.996728f, -0.996743f, -0.996759f, -0.996774f, -0.996790f, -0.996805f,
+ -0.996820f, -0.996836f, -0.996851f, -0.996866f, -0.996881f, -0.996896f, -0.996911f, -0.996926f,
+ -0.996941f, -0.996956f, -0.996971f, -0.996986f, -0.997001f, -0.997016f, -0.997031f, -0.997045f,
+ -0.997060f, -0.997075f, -0.997089f, -0.997104f, -0.997119f, -0.997133f, -0.997148f, -0.997162f,
+ -0.997176f, -0.997191f, -0.997205f, -0.997219f, -0.997234f, -0.997248f, -0.997262f, -0.997276f,
+ -0.997290f, -0.997305f, -0.997319f, -0.997333f, -0.997347f, -0.997361f, -0.997374f, -0.997388f,
+ -0.997402f, -0.997416f, -0.997430f, -0.997443f, -0.997457f, -0.997471f, -0.997484f, -0.997498f,
+ -0.997511f, -0.997525f, -0.997538f, -0.997552f, -0.997565f, -0.997579f, -0.997592f, -0.997605f,
+ -0.997618f, -0.997632f, -0.997645f, -0.997658f, -0.997671f, -0.997684f, -0.997697f, -0.997710f,
+ -0.997723f, -0.997736f, -0.997749f, -0.997762f, -0.997774f, -0.997787f, -0.997800f, -0.997813f,
+ -0.997825f, -0.997838f, -0.997851f, -0.997863f, -0.997876f, -0.997888f, -0.997901f, -0.997913f,
+ -0.997925f, -0.997938f, -0.997950f, -0.997962f, -0.997974f, -0.997987f, -0.997999f, -0.998011f,
+ -0.998023f, -0.998035f, -0.998047f, -0.998059f, -0.998071f, -0.998083f, -0.998094f, -0.998106f,
+ -0.998118f, -0.998130f, -0.998142f, -0.998153f, -0.998165f, -0.998176f, -0.998188f, -0.998200f,
+ -0.998211f, -0.998222f, -0.998234f, -0.998245f, -0.998257f, -0.998268f, -0.998279f, -0.998290f,
+ -0.998302f, -0.998313f, -0.998324f, -0.998335f, -0.998346f, -0.998357f, -0.998368f, -0.998379f,
+ -0.998390f, -0.998401f, -0.998411f, -0.998422f, -0.998433f, -0.998444f, -0.998454f, -0.998465f,
+ -0.998476f, -0.998486f, -0.998497f, -0.998507f, -0.998518f, -0.998528f, -0.998538f, -0.998549f,
+ -0.998559f, -0.998569f, -0.998580f, -0.998590f, -0.998600f, -0.998610f, -0.998620f, -0.998630f,
+ -0.998640f, -0.998650f, -0.998660f, -0.998670f, -0.998680f, -0.998690f, -0.998700f, -0.998709f,
+ -0.998719f, -0.998729f, -0.998738f, -0.998748f, -0.998758f, -0.998767f, -0.998777f, -0.998786f,
+ -0.998795f, -0.998805f, -0.998814f, -0.998824f, -0.998833f, -0.998842f, -0.998851f, -0.998860f,
+ -0.998870f, -0.998879f, -0.998888f, -0.998897f, -0.998906f, -0.998915f, -0.998924f, -0.998932f,
+ -0.998941f, -0.998950f, -0.998959f, -0.998968f, -0.998976f, -0.998985f, -0.998994f, -0.999002f,
+ -0.999011f, -0.999019f, -0.999028f, -0.999036f, -0.999044f, -0.999053f, -0.999061f, -0.999069f,
+ -0.999078f, -0.999086f, -0.999094f, -0.999102f, -0.999110f, -0.999118f, -0.999126f, -0.999134f,
+ -0.999142f, -0.999150f, -0.999158f, -0.999166f, -0.999174f, -0.999182f, -0.999189f, -0.999197f,
+ -0.999205f, -0.999212f, -0.999220f, -0.999228f, -0.999235f, -0.999243f, -0.999250f, -0.999257f,
+ -0.999265f, -0.999272f, -0.999279f, -0.999287f, -0.999294f, -0.999301f, -0.999308f, -0.999315f,
+ -0.999322f, -0.999329f, -0.999336f, -0.999343f, -0.999350f, -0.999357f, -0.999364f, -0.999371f,
+ -0.999378f, -0.999384f, -0.999391f, -0.999398f, -0.999404f, -0.999411f, -0.999418f, -0.999424f,
+ -0.999431f, -0.999437f, -0.999443f, -0.999450f, -0.999456f, -0.999462f, -0.999469f, -0.999475f,
+ -0.999481f, -0.999487f, -0.999493f, -0.999500f, -0.999506f, -0.999512f, -0.999518f, -0.999524f,
+ -0.999529f, -0.999535f, -0.999541f, -0.999547f, -0.999553f, -0.999558f, -0.999564f, -0.999570f,
+ -0.999575f, -0.999581f, -0.999586f, -0.999592f, -0.999597f, -0.999603f, -0.999608f, -0.999614f,
+ -0.999619f, -0.999624f, -0.999629f, -0.999635f, -0.999640f, -0.999645f, -0.999650f, -0.999655f,
+ -0.999660f, -0.999665f, -0.999670f, -0.999675f, -0.999680f, -0.999685f, -0.999689f, -0.999694f,
+ -0.999699f, -0.999704f, -0.999708f, -0.999713f, -0.999717f, -0.999722f, -0.999726f, -0.999731f,
+ -0.999735f, -0.999740f, -0.999744f, -0.999748f, -0.999753f, -0.999757f, -0.999761f, -0.999765f,
+ -0.999769f, -0.999774f, -0.999778f, -0.999782f, -0.999786f, -0.999790f, -0.999793f, -0.999797f,
+ -0.999801f, -0.999805f, -0.999809f, -0.999812f, -0.999816f, -0.999820f, -0.999823f, -0.999827f,
+ -0.999831f, -0.999834f, -0.999838f, -0.999841f, -0.999844f, -0.999848f, -0.999851f, -0.999854f,
+ -0.999858f, -0.999861f, -0.999864f, -0.999867f, -0.999870f, -0.999873f, -0.999876f, -0.999879f,
+ -0.999882f, -0.999885f, -0.999888f, -0.999891f, -0.999894f, -0.999897f, -0.999899f, -0.999902f,
+ -0.999905f, -0.999907f, -0.999910f, -0.999913f, -0.999915f, -0.999917f, -0.999920f, -0.999922f,
+ -0.999925f, -0.999927f, -0.999929f, -0.999932f, -0.999934f, -0.999936f, -0.999938f, -0.999940f,
+ -0.999942f, -0.999944f, -0.999946f, -0.999948f, -0.999950f, -0.999952f, -0.999954f, -0.999956f,
+ -0.999958f, -0.999959f, -0.999961f, -0.999963f, -0.999964f, -0.999966f, -0.999968f, -0.999969f,
+ -0.999971f, -0.999972f, -0.999973f, -0.999975f, -0.999976f, -0.999977f, -0.999979f, -0.999980f,
+ -0.999981f, -0.999982f, -0.999983f, -0.999985f, -0.999986f, -0.999987f, -0.999988f, -0.999988f,
+ -0.999989f, -0.999990f, -0.999991f, -0.999992f, -0.999993f, -0.999993f, -0.999994f, -0.999995f,
+ -0.999995f, -0.999996f, -0.999996f, -0.999997f, -0.999997f, -0.999998f, -0.999998f, -0.999999f,
+ -0.999999f, -0.999999f, -0.999999f, -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000
+};
+
+static const float sinTable65536[32768] = {
+ 0.000000f, 0.000096f, 0.000192f, 0.000288f, 0.000383f, 0.000479f, 0.000575f, 0.000671f,
+ 0.000767f, 0.000863f, 0.000959f, 0.001055f, 0.001150f, 0.001246f, 0.001342f, 0.001438f,
+ 0.001534f, 0.001630f, 0.001726f, 0.001822f, 0.001917f, 0.002013f, 0.002109f, 0.002205f,
+ 0.002301f, 0.002397f, 0.002493f, 0.002589f, 0.002684f, 0.002780f, 0.002876f, 0.002972f,
+ 0.003068f, 0.003164f, 0.003260f, 0.003356f, 0.003451f, 0.003547f, 0.003643f, 0.003739f,
+ 0.003835f, 0.003931f, 0.004027f, 0.004123f, 0.004218f, 0.004314f, 0.004410f, 0.004506f,
+ 0.004602f, 0.004698f, 0.004794f, 0.004890f, 0.004985f, 0.005081f, 0.005177f, 0.005273f,
+ 0.005369f, 0.005465f, 0.005561f, 0.005657f, 0.005752f, 0.005848f, 0.005944f, 0.006040f,
+ 0.006136f, 0.006232f, 0.006328f, 0.006424f, 0.006519f, 0.006615f, 0.006711f, 0.006807f,
+ 0.006903f, 0.006999f, 0.007095f, 0.007190f, 0.007286f, 0.007382f, 0.007478f, 0.007574f,
+ 0.007670f, 0.007766f, 0.007862f, 0.007957f, 0.008053f, 0.008149f, 0.008245f, 0.008341f,
+ 0.008437f, 0.008533f, 0.008629f, 0.008724f, 0.008820f, 0.008916f, 0.009012f, 0.009108f,
+ 0.009204f, 0.009300f, 0.009395f, 0.009491f, 0.009587f, 0.009683f, 0.009779f, 0.009875f,
+ 0.009971f, 0.010067f, 0.010162f, 0.010258f, 0.010354f, 0.010450f, 0.010546f, 0.010642f,
+ 0.010738f, 0.010834f, 0.010929f, 0.011025f, 0.011121f, 0.011217f, 0.011313f, 0.011409f,
+ 0.011505f, 0.011600f, 0.011696f, 0.011792f, 0.011888f, 0.011984f, 0.012080f, 0.012176f,
+ 0.012272f, 0.012367f, 0.012463f, 0.012559f, 0.012655f, 0.012751f, 0.012847f, 0.012943f,
+ 0.013038f, 0.013134f, 0.013230f, 0.013326f, 0.013422f, 0.013518f, 0.013614f, 0.013710f,
+ 0.013805f, 0.013901f, 0.013997f, 0.014093f, 0.014189f, 0.014285f, 0.014381f, 0.014476f,
+ 0.014572f, 0.014668f, 0.014764f, 0.014860f, 0.014956f, 0.015052f, 0.015147f, 0.015243f,
+ 0.015339f, 0.015435f, 0.015531f, 0.015627f, 0.015723f, 0.015819f, 0.015914f, 0.016010f,
+ 0.016106f, 0.016202f, 0.016298f, 0.016394f, 0.016490f, 0.016585f, 0.016681f, 0.016777f,
+ 0.016873f, 0.016969f, 0.017065f, 0.017161f, 0.017256f, 0.017352f, 0.017448f, 0.017544f,
+ 0.017640f, 0.017736f, 0.017832f, 0.017927f, 0.018023f, 0.018119f, 0.018215f, 0.018311f,
+ 0.018407f, 0.018503f, 0.018598f, 0.018694f, 0.018790f, 0.018886f, 0.018982f, 0.019078f,
+ 0.019174f, 0.019269f, 0.019365f, 0.019461f, 0.019557f, 0.019653f, 0.019749f, 0.019845f,
+ 0.019940f, 0.020036f, 0.020132f, 0.020228f, 0.020324f, 0.020420f, 0.020516f, 0.020611f,
+ 0.020707f, 0.020803f, 0.020899f, 0.020995f, 0.021091f, 0.021187f, 0.021282f, 0.021378f,
+ 0.021474f, 0.021570f, 0.021666f, 0.021762f, 0.021857f, 0.021953f, 0.022049f, 0.022145f,
+ 0.022241f, 0.022337f, 0.022433f, 0.022528f, 0.022624f, 0.022720f, 0.022816f, 0.022912f,
+ 0.023008f, 0.023104f, 0.023199f, 0.023295f, 0.023391f, 0.023487f, 0.023583f, 0.023679f,
+ 0.023774f, 0.023870f, 0.023966f, 0.024062f, 0.024158f, 0.024254f, 0.024350f, 0.024445f,
+ 0.024541f, 0.024637f, 0.024733f, 0.024829f, 0.024925f, 0.025020f, 0.025116f, 0.025212f,
+ 0.025308f, 0.025404f, 0.025500f, 0.025596f, 0.025691f, 0.025787f, 0.025883f, 0.025979f,
+ 0.026075f, 0.026171f, 0.026266f, 0.026362f, 0.026458f, 0.026554f, 0.026650f, 0.026746f,
+ 0.026841f, 0.026937f, 0.027033f, 0.027129f, 0.027225f, 0.027321f, 0.027416f, 0.027512f,
+ 0.027608f, 0.027704f, 0.027800f, 0.027896f, 0.027991f, 0.028087f, 0.028183f, 0.028279f,
+ 0.028375f, 0.028471f, 0.028567f, 0.028662f, 0.028758f, 0.028854f, 0.028950f, 0.029046f,
+ 0.029142f, 0.029237f, 0.029333f, 0.029429f, 0.029525f, 0.029621f, 0.029717f, 0.029812f,
+ 0.029908f, 0.030004f, 0.030100f, 0.030196f, 0.030291f, 0.030387f, 0.030483f, 0.030579f,
+ 0.030675f, 0.030771f, 0.030866f, 0.030962f, 0.031058f, 0.031154f, 0.031250f, 0.031346f,
+ 0.031441f, 0.031537f, 0.031633f, 0.031729f, 0.031825f, 0.031921f, 0.032016f, 0.032112f,
+ 0.032208f, 0.032304f, 0.032400f, 0.032495f, 0.032591f, 0.032687f, 0.032783f, 0.032879f,
+ 0.032975f, 0.033070f, 0.033166f, 0.033262f, 0.033358f, 0.033454f, 0.033550f, 0.033645f,
+ 0.033741f, 0.033837f, 0.033933f, 0.034029f, 0.034124f, 0.034220f, 0.034316f, 0.034412f,
+ 0.034508f, 0.034604f, 0.034699f, 0.034795f, 0.034891f, 0.034987f, 0.035083f, 0.035178f,
+ 0.035274f, 0.035370f, 0.035466f, 0.035562f, 0.035657f, 0.035753f, 0.035849f, 0.035945f,
+ 0.036041f, 0.036137f, 0.036232f, 0.036328f, 0.036424f, 0.036520f, 0.036616f, 0.036711f,
+ 0.036807f, 0.036903f, 0.036999f, 0.037095f, 0.037190f, 0.037286f, 0.037382f, 0.037478f,
+ 0.037574f, 0.037669f, 0.037765f, 0.037861f, 0.037957f, 0.038053f, 0.038149f, 0.038244f,
+ 0.038340f, 0.038436f, 0.038532f, 0.038628f, 0.038723f, 0.038819f, 0.038915f, 0.039011f,
+ 0.039107f, 0.039202f, 0.039298f, 0.039394f, 0.039490f, 0.039586f, 0.039681f, 0.039777f,
+ 0.039873f, 0.039969f, 0.040065f, 0.040160f, 0.040256f, 0.040352f, 0.040448f, 0.040544f,
+ 0.040639f, 0.040735f, 0.040831f, 0.040927f, 0.041022f, 0.041118f, 0.041214f, 0.041310f,
+ 0.041406f, 0.041501f, 0.041597f, 0.041693f, 0.041789f, 0.041885f, 0.041980f, 0.042076f,
+ 0.042172f, 0.042268f, 0.042364f, 0.042459f, 0.042555f, 0.042651f, 0.042747f, 0.042842f,
+ 0.042938f, 0.043034f, 0.043130f, 0.043226f, 0.043321f, 0.043417f, 0.043513f, 0.043609f,
+ 0.043705f, 0.043800f, 0.043896f, 0.043992f, 0.044088f, 0.044183f, 0.044279f, 0.044375f,
+ 0.044471f, 0.044567f, 0.044662f, 0.044758f, 0.044854f, 0.044950f, 0.045045f, 0.045141f,
+ 0.045237f, 0.045333f, 0.045429f, 0.045524f, 0.045620f, 0.045716f, 0.045812f, 0.045907f,
+ 0.046003f, 0.046099f, 0.046195f, 0.046290f, 0.046386f, 0.046482f, 0.046578f, 0.046674f,
+ 0.046769f, 0.046865f, 0.046961f, 0.047057f, 0.047152f, 0.047248f, 0.047344f, 0.047440f,
+ 0.047535f, 0.047631f, 0.047727f, 0.047823f, 0.047919f, 0.048014f, 0.048110f, 0.048206f,
+ 0.048302f, 0.048397f, 0.048493f, 0.048589f, 0.048685f, 0.048780f, 0.048876f, 0.048972f,
+ 0.049068f, 0.049163f, 0.049259f, 0.049355f, 0.049451f, 0.049546f, 0.049642f, 0.049738f,
+ 0.049834f, 0.049929f, 0.050025f, 0.050121f, 0.050217f, 0.050312f, 0.050408f, 0.050504f,
+ 0.050600f, 0.050696f, 0.050791f, 0.050887f, 0.050983f, 0.051078f, 0.051174f, 0.051270f,
+ 0.051366f, 0.051461f, 0.051557f, 0.051653f, 0.051749f, 0.051844f, 0.051940f, 0.052036f,
+ 0.052132f, 0.052227f, 0.052323f, 0.052419f, 0.052515f, 0.052610f, 0.052706f, 0.052802f,
+ 0.052898f, 0.052993f, 0.053089f, 0.053185f, 0.053281f, 0.053376f, 0.053472f, 0.053568f,
+ 0.053664f, 0.053759f, 0.053855f, 0.053951f, 0.054046f, 0.054142f, 0.054238f, 0.054334f,
+ 0.054429f, 0.054525f, 0.054621f, 0.054717f, 0.054812f, 0.054908f, 0.055004f, 0.055100f,
+ 0.055195f, 0.055291f, 0.055387f, 0.055482f, 0.055578f, 0.055674f, 0.055770f, 0.055865f,
+ 0.055961f, 0.056057f, 0.056152f, 0.056248f, 0.056344f, 0.056440f, 0.056535f, 0.056631f,
+ 0.056727f, 0.056823f, 0.056918f, 0.057014f, 0.057110f, 0.057205f, 0.057301f, 0.057397f,
+ 0.057493f, 0.057588f, 0.057684f, 0.057780f, 0.057875f, 0.057971f, 0.058067f, 0.058163f,
+ 0.058258f, 0.058354f, 0.058450f, 0.058545f, 0.058641f, 0.058737f, 0.058833f, 0.058928f,
+ 0.059024f, 0.059120f, 0.059215f, 0.059311f, 0.059407f, 0.059502f, 0.059598f, 0.059694f,
+ 0.059790f, 0.059885f, 0.059981f, 0.060077f, 0.060172f, 0.060268f, 0.060364f, 0.060459f,
+ 0.060555f, 0.060651f, 0.060747f, 0.060842f, 0.060938f, 0.061034f, 0.061129f, 0.061225f,
+ 0.061321f, 0.061416f, 0.061512f, 0.061608f, 0.061704f, 0.061799f, 0.061895f, 0.061991f,
+ 0.062086f, 0.062182f, 0.062278f, 0.062373f, 0.062469f, 0.062565f, 0.062660f, 0.062756f,
+ 0.062852f, 0.062947f, 0.063043f, 0.063139f, 0.063234f, 0.063330f, 0.063426f, 0.063522f,
+ 0.063617f, 0.063713f, 0.063809f, 0.063904f, 0.064000f, 0.064096f, 0.064191f, 0.064287f,
+ 0.064383f, 0.064478f, 0.064574f, 0.064670f, 0.064765f, 0.064861f, 0.064957f, 0.065052f,
+ 0.065148f, 0.065244f, 0.065339f, 0.065435f, 0.065531f, 0.065626f, 0.065722f, 0.065818f,
+ 0.065913f, 0.066009f, 0.066105f, 0.066200f, 0.066296f, 0.066392f, 0.066487f, 0.066583f,
+ 0.066679f, 0.066774f, 0.066870f, 0.066966f, 0.067061f, 0.067157f, 0.067253f, 0.067348f,
+ 0.067444f, 0.067540f, 0.067635f, 0.067731f, 0.067827f, 0.067922f, 0.068018f, 0.068113f,
+ 0.068209f, 0.068305f, 0.068400f, 0.068496f, 0.068592f, 0.068687f, 0.068783f, 0.068879f,
+ 0.068974f, 0.069070f, 0.069166f, 0.069261f, 0.069357f, 0.069453f, 0.069548f, 0.069644f,
+ 0.069739f, 0.069835f, 0.069931f, 0.070026f, 0.070122f, 0.070218f, 0.070313f, 0.070409f,
+ 0.070505f, 0.070600f, 0.070696f, 0.070791f, 0.070887f, 0.070983f, 0.071078f, 0.071174f,
+ 0.071270f, 0.071365f, 0.071461f, 0.071557f, 0.071652f, 0.071748f, 0.071843f, 0.071939f,
+ 0.072035f, 0.072130f, 0.072226f, 0.072322f, 0.072417f, 0.072513f, 0.072608f, 0.072704f,
+ 0.072800f, 0.072895f, 0.072991f, 0.073086f, 0.073182f, 0.073278f, 0.073373f, 0.073469f,
+ 0.073565f, 0.073660f, 0.073756f, 0.073851f, 0.073947f, 0.074043f, 0.074138f, 0.074234f,
+ 0.074329f, 0.074425f, 0.074521f, 0.074616f, 0.074712f, 0.074807f, 0.074903f, 0.074999f,
+ 0.075094f, 0.075190f, 0.075286f, 0.075381f, 0.075477f, 0.075572f, 0.075668f, 0.075764f,
+ 0.075859f, 0.075955f, 0.076050f, 0.076146f, 0.076241f, 0.076337f, 0.076433f, 0.076528f,
+ 0.076624f, 0.076719f, 0.076815f, 0.076911f, 0.077006f, 0.077102f, 0.077197f, 0.077293f,
+ 0.077389f, 0.077484f, 0.077580f, 0.077675f, 0.077771f, 0.077866f, 0.077962f, 0.078058f,
+ 0.078153f, 0.078249f, 0.078344f, 0.078440f, 0.078536f, 0.078631f, 0.078727f, 0.078822f,
+ 0.078918f, 0.079013f, 0.079109f, 0.079205f, 0.079300f, 0.079396f, 0.079491f, 0.079587f,
+ 0.079682f, 0.079778f, 0.079874f, 0.079969f, 0.080065f, 0.080160f, 0.080256f, 0.080351f,
+ 0.080447f, 0.080543f, 0.080638f, 0.080734f, 0.080829f, 0.080925f, 0.081020f, 0.081116f,
+ 0.081211f, 0.081307f, 0.081403f, 0.081498f, 0.081594f, 0.081689f, 0.081785f, 0.081880f,
+ 0.081976f, 0.082071f, 0.082167f, 0.082263f, 0.082358f, 0.082454f, 0.082549f, 0.082645f,
+ 0.082740f, 0.082836f, 0.082931f, 0.083027f, 0.083122f, 0.083218f, 0.083314f, 0.083409f,
+ 0.083505f, 0.083600f, 0.083696f, 0.083791f, 0.083887f, 0.083982f, 0.084078f, 0.084173f,
+ 0.084269f, 0.084364f, 0.084460f, 0.084555f, 0.084651f, 0.084747f, 0.084842f, 0.084938f,
+ 0.085033f, 0.085129f, 0.085224f, 0.085320f, 0.085415f, 0.085511f, 0.085606f, 0.085702f,
+ 0.085797f, 0.085893f, 0.085988f, 0.086084f, 0.086179f, 0.086275f, 0.086370f, 0.086466f,
+ 0.086561f, 0.086657f, 0.086752f, 0.086848f, 0.086943f, 0.087039f, 0.087135f, 0.087230f,
+ 0.087326f, 0.087421f, 0.087517f, 0.087612f, 0.087708f, 0.087803f, 0.087899f, 0.087994f,
+ 0.088090f, 0.088185f, 0.088281f, 0.088376f, 0.088472f, 0.088567f, 0.088663f, 0.088758f,
+ 0.088854f, 0.088949f, 0.089045f, 0.089140f, 0.089236f, 0.089331f, 0.089427f, 0.089522f,
+ 0.089617f, 0.089713f, 0.089808f, 0.089904f, 0.089999f, 0.090095f, 0.090190f, 0.090286f,
+ 0.090381f, 0.090477f, 0.090572f, 0.090668f, 0.090763f, 0.090859f, 0.090954f, 0.091050f,
+ 0.091145f, 0.091241f, 0.091336f, 0.091432f, 0.091527f, 0.091623f, 0.091718f, 0.091813f,
+ 0.091909f, 0.092004f, 0.092100f, 0.092195f, 0.092291f, 0.092386f, 0.092482f, 0.092577f,
+ 0.092673f, 0.092768f, 0.092864f, 0.092959f, 0.093055f, 0.093150f, 0.093245f, 0.093341f,
+ 0.093436f, 0.093532f, 0.093627f, 0.093723f, 0.093818f, 0.093914f, 0.094009f, 0.094104f,
+ 0.094200f, 0.094295f, 0.094391f, 0.094486f, 0.094582f, 0.094677f, 0.094773f, 0.094868f,
+ 0.094963f, 0.095059f, 0.095154f, 0.095250f, 0.095345f, 0.095441f, 0.095536f, 0.095632f,
+ 0.095727f, 0.095822f, 0.095918f, 0.096013f, 0.096109f, 0.096204f, 0.096300f, 0.096395f,
+ 0.096490f, 0.096586f, 0.096681f, 0.096777f, 0.096872f, 0.096968f, 0.097063f, 0.097158f,
+ 0.097254f, 0.097349f, 0.097445f, 0.097540f, 0.097635f, 0.097731f, 0.097826f, 0.097922f,
+ 0.098017f, 0.098113f, 0.098208f, 0.098303f, 0.098399f, 0.098494f, 0.098590f, 0.098685f,
+ 0.098780f, 0.098876f, 0.098971f, 0.099067f, 0.099162f, 0.099257f, 0.099353f, 0.099448f,
+ 0.099544f, 0.099639f, 0.099734f, 0.099830f, 0.099925f, 0.100021f, 0.100116f, 0.100211f,
+ 0.100307f, 0.100402f, 0.100498f, 0.100593f, 0.100688f, 0.100784f, 0.100879f, 0.100974f,
+ 0.101070f, 0.101165f, 0.101261f, 0.101356f, 0.101451f, 0.101547f, 0.101642f, 0.101738f,
+ 0.101833f, 0.101928f, 0.102024f, 0.102119f, 0.102214f, 0.102310f, 0.102405f, 0.102500f,
+ 0.102596f, 0.102691f, 0.102787f, 0.102882f, 0.102977f, 0.103073f, 0.103168f, 0.103263f,
+ 0.103359f, 0.103454f, 0.103550f, 0.103645f, 0.103740f, 0.103836f, 0.103931f, 0.104026f,
+ 0.104122f, 0.104217f, 0.104312f, 0.104408f, 0.104503f, 0.104598f, 0.104694f, 0.104789f,
+ 0.104884f, 0.104980f, 0.105075f, 0.105170f, 0.105266f, 0.105361f, 0.105456f, 0.105552f,
+ 0.105647f, 0.105742f, 0.105838f, 0.105933f, 0.106028f, 0.106124f, 0.106219f, 0.106314f,
+ 0.106410f, 0.106505f, 0.106600f, 0.106696f, 0.106791f, 0.106886f, 0.106982f, 0.107077f,
+ 0.107172f, 0.107268f, 0.107363f, 0.107458f, 0.107554f, 0.107649f, 0.107744f, 0.107840f,
+ 0.107935f, 0.108030f, 0.108126f, 0.108221f, 0.108316f, 0.108412f, 0.108507f, 0.108602f,
+ 0.108697f, 0.108793f, 0.108888f, 0.108983f, 0.109079f, 0.109174f, 0.109269f, 0.109365f,
+ 0.109460f, 0.109555f, 0.109650f, 0.109746f, 0.109841f, 0.109936f, 0.110032f, 0.110127f,
+ 0.110222f, 0.110317f, 0.110413f, 0.110508f, 0.110603f, 0.110699f, 0.110794f, 0.110889f,
+ 0.110984f, 0.111080f, 0.111175f, 0.111270f, 0.111366f, 0.111461f, 0.111556f, 0.111651f,
+ 0.111747f, 0.111842f, 0.111937f, 0.112033f, 0.112128f, 0.112223f, 0.112318f, 0.112414f,
+ 0.112509f, 0.112604f, 0.112699f, 0.112795f, 0.112890f, 0.112985f, 0.113080f, 0.113176f,
+ 0.113271f, 0.113366f, 0.113461f, 0.113557f, 0.113652f, 0.113747f, 0.113842f, 0.113938f,
+ 0.114033f, 0.114128f, 0.114223f, 0.114319f, 0.114414f, 0.114509f, 0.114604f, 0.114700f,
+ 0.114795f, 0.114890f, 0.114985f, 0.115081f, 0.115176f, 0.115271f, 0.115366f, 0.115462f,
+ 0.115557f, 0.115652f, 0.115747f, 0.115842f, 0.115938f, 0.116033f, 0.116128f, 0.116223f,
+ 0.116319f, 0.116414f, 0.116509f, 0.116604f, 0.116700f, 0.116795f, 0.116890f, 0.116985f,
+ 0.117080f, 0.117176f, 0.117271f, 0.117366f, 0.117461f, 0.117556f, 0.117652f, 0.117747f,
+ 0.117842f, 0.117937f, 0.118032f, 0.118128f, 0.118223f, 0.118318f, 0.118413f, 0.118508f,
+ 0.118604f, 0.118699f, 0.118794f, 0.118889f, 0.118984f, 0.119080f, 0.119175f, 0.119270f,
+ 0.119365f, 0.119460f, 0.119556f, 0.119651f, 0.119746f, 0.119841f, 0.119936f, 0.120032f,
+ 0.120127f, 0.120222f, 0.120317f, 0.120412f, 0.120507f, 0.120603f, 0.120698f, 0.120793f,
+ 0.120888f, 0.120983f, 0.121078f, 0.121174f, 0.121269f, 0.121364f, 0.121459f, 0.121554f,
+ 0.121649f, 0.121745f, 0.121840f, 0.121935f, 0.122030f, 0.122125f, 0.122220f, 0.122316f,
+ 0.122411f, 0.122506f, 0.122601f, 0.122696f, 0.122791f, 0.122886f, 0.122982f, 0.123077f,
+ 0.123172f, 0.123267f, 0.123362f, 0.123457f, 0.123552f, 0.123648f, 0.123743f, 0.123838f,
+ 0.123933f, 0.124028f, 0.124123f, 0.124218f, 0.124314f, 0.124409f, 0.124504f, 0.124599f,
+ 0.124694f, 0.124789f, 0.124884f, 0.124979f, 0.125075f, 0.125170f, 0.125265f, 0.125360f,
+ 0.125455f, 0.125550f, 0.125645f, 0.125740f, 0.125835f, 0.125931f, 0.126026f, 0.126121f,
+ 0.126216f, 0.126311f, 0.126406f, 0.126501f, 0.126596f, 0.126691f, 0.126787f, 0.126882f,
+ 0.126977f, 0.127072f, 0.127167f, 0.127262f, 0.127357f, 0.127452f, 0.127547f, 0.127642f,
+ 0.127737f, 0.127833f, 0.127928f, 0.128023f, 0.128118f, 0.128213f, 0.128308f, 0.128403f,
+ 0.128498f, 0.128593f, 0.128688f, 0.128783f, 0.128878f, 0.128973f, 0.129069f, 0.129164f,
+ 0.129259f, 0.129354f, 0.129449f, 0.129544f, 0.129639f, 0.129734f, 0.129829f, 0.129924f,
+ 0.130019f, 0.130114f, 0.130209f, 0.130304f, 0.130399f, 0.130495f, 0.130590f, 0.130685f,
+ 0.130780f, 0.130875f, 0.130970f, 0.131065f, 0.131160f, 0.131255f, 0.131350f, 0.131445f,
+ 0.131540f, 0.131635f, 0.131730f, 0.131825f, 0.131920f, 0.132015f, 0.132110f, 0.132205f,
+ 0.132300f, 0.132395f, 0.132490f, 0.132585f, 0.132680f, 0.132775f, 0.132870f, 0.132966f,
+ 0.133061f, 0.133156f, 0.133251f, 0.133346f, 0.133441f, 0.133536f, 0.133631f, 0.133726f,
+ 0.133821f, 0.133916f, 0.134011f, 0.134106f, 0.134201f, 0.134296f, 0.134391f, 0.134486f,
+ 0.134581f, 0.134676f, 0.134771f, 0.134866f, 0.134961f, 0.135056f, 0.135151f, 0.135246f,
+ 0.135341f, 0.135436f, 0.135531f, 0.135626f, 0.135721f, 0.135816f, 0.135911f, 0.136006f,
+ 0.136101f, 0.136196f, 0.136291f, 0.136386f, 0.136480f, 0.136575f, 0.136670f, 0.136765f,
+ 0.136860f, 0.136955f, 0.137050f, 0.137145f, 0.137240f, 0.137335f, 0.137430f, 0.137525f,
+ 0.137620f, 0.137715f, 0.137810f, 0.137905f, 0.138000f, 0.138095f, 0.138190f, 0.138285f,
+ 0.138380f, 0.138475f, 0.138570f, 0.138665f, 0.138760f, 0.138855f, 0.138949f, 0.139044f,
+ 0.139139f, 0.139234f, 0.139329f, 0.139424f, 0.139519f, 0.139614f, 0.139709f, 0.139804f,
+ 0.139899f, 0.139994f, 0.140089f, 0.140184f, 0.140279f, 0.140373f, 0.140468f, 0.140563f,
+ 0.140658f, 0.140753f, 0.140848f, 0.140943f, 0.141038f, 0.141133f, 0.141228f, 0.141323f,
+ 0.141418f, 0.141512f, 0.141607f, 0.141702f, 0.141797f, 0.141892f, 0.141987f, 0.142082f,
+ 0.142177f, 0.142272f, 0.142367f, 0.142461f, 0.142556f, 0.142651f, 0.142746f, 0.142841f,
+ 0.142936f, 0.143031f, 0.143126f, 0.143221f, 0.143316f, 0.143410f, 0.143505f, 0.143600f,
+ 0.143695f, 0.143790f, 0.143885f, 0.143980f, 0.144075f, 0.144169f, 0.144264f, 0.144359f,
+ 0.144454f, 0.144549f, 0.144644f, 0.144739f, 0.144833f, 0.144928f, 0.145023f, 0.145118f,
+ 0.145213f, 0.145308f, 0.145403f, 0.145497f, 0.145592f, 0.145687f, 0.145782f, 0.145877f,
+ 0.145972f, 0.146067f, 0.146161f, 0.146256f, 0.146351f, 0.146446f, 0.146541f, 0.146636f,
+ 0.146730f, 0.146825f, 0.146920f, 0.147015f, 0.147110f, 0.147205f, 0.147299f, 0.147394f,
+ 0.147489f, 0.147584f, 0.147679f, 0.147774f, 0.147868f, 0.147963f, 0.148058f, 0.148153f,
+ 0.148248f, 0.148342f, 0.148437f, 0.148532f, 0.148627f, 0.148722f, 0.148817f, 0.148911f,
+ 0.149006f, 0.149101f, 0.149196f, 0.149291f, 0.149385f, 0.149480f, 0.149575f, 0.149670f,
+ 0.149765f, 0.149859f, 0.149954f, 0.150049f, 0.150144f, 0.150238f, 0.150333f, 0.150428f,
+ 0.150523f, 0.150618f, 0.150712f, 0.150807f, 0.150902f, 0.150997f, 0.151092f, 0.151186f,
+ 0.151281f, 0.151376f, 0.151471f, 0.151565f, 0.151660f, 0.151755f, 0.151850f, 0.151944f,
+ 0.152039f, 0.152134f, 0.152229f, 0.152323f, 0.152418f, 0.152513f, 0.152608f, 0.152702f,
+ 0.152797f, 0.152892f, 0.152987f, 0.153081f, 0.153176f, 0.153271f, 0.153366f, 0.153460f,
+ 0.153555f, 0.153650f, 0.153745f, 0.153839f, 0.153934f, 0.154029f, 0.154124f, 0.154218f,
+ 0.154313f, 0.154408f, 0.154502f, 0.154597f, 0.154692f, 0.154787f, 0.154881f, 0.154976f,
+ 0.155071f, 0.155165f, 0.155260f, 0.155355f, 0.155450f, 0.155544f, 0.155639f, 0.155734f,
+ 0.155828f, 0.155923f, 0.156018f, 0.156112f, 0.156207f, 0.156302f, 0.156397f, 0.156491f,
+ 0.156586f, 0.156681f, 0.156775f, 0.156870f, 0.156965f, 0.157059f, 0.157154f, 0.157249f,
+ 0.157343f, 0.157438f, 0.157533f, 0.157627f, 0.157722f, 0.157817f, 0.157912f, 0.158006f,
+ 0.158101f, 0.158196f, 0.158290f, 0.158385f, 0.158480f, 0.158574f, 0.158669f, 0.158763f,
+ 0.158858f, 0.158953f, 0.159047f, 0.159142f, 0.159237f, 0.159331f, 0.159426f, 0.159521f,
+ 0.159615f, 0.159710f, 0.159805f, 0.159899f, 0.159994f, 0.160089f, 0.160183f, 0.160278f,
+ 0.160372f, 0.160467f, 0.160562f, 0.160656f, 0.160751f, 0.160846f, 0.160940f, 0.161035f,
+ 0.161129f, 0.161224f, 0.161319f, 0.161413f, 0.161508f, 0.161603f, 0.161697f, 0.161792f,
+ 0.161886f, 0.161981f, 0.162076f, 0.162170f, 0.162265f, 0.162359f, 0.162454f, 0.162549f,
+ 0.162643f, 0.162738f, 0.162832f, 0.162927f, 0.163022f, 0.163116f, 0.163211f, 0.163305f,
+ 0.163400f, 0.163495f, 0.163589f, 0.163684f, 0.163778f, 0.163873f, 0.163967f, 0.164062f,
+ 0.164157f, 0.164251f, 0.164346f, 0.164440f, 0.164535f, 0.164629f, 0.164724f, 0.164819f,
+ 0.164913f, 0.165008f, 0.165102f, 0.165197f, 0.165291f, 0.165386f, 0.165480f, 0.165575f,
+ 0.165670f, 0.165764f, 0.165859f, 0.165953f, 0.166048f, 0.166142f, 0.166237f, 0.166331f,
+ 0.166426f, 0.166520f, 0.166615f, 0.166710f, 0.166804f, 0.166899f, 0.166993f, 0.167088f,
+ 0.167182f, 0.167277f, 0.167371f, 0.167466f, 0.167560f, 0.167655f, 0.167749f, 0.167844f,
+ 0.167938f, 0.168033f, 0.168127f, 0.168222f, 0.168316f, 0.168411f, 0.168505f, 0.168600f,
+ 0.168694f, 0.168789f, 0.168883f, 0.168978f, 0.169072f, 0.169167f, 0.169261f, 0.169356f,
+ 0.169450f, 0.169545f, 0.169639f, 0.169734f, 0.169828f, 0.169923f, 0.170017f, 0.170112f,
+ 0.170206f, 0.170301f, 0.170395f, 0.170490f, 0.170584f, 0.170678f, 0.170773f, 0.170867f,
+ 0.170962f, 0.171056f, 0.171151f, 0.171245f, 0.171340f, 0.171434f, 0.171529f, 0.171623f,
+ 0.171718f, 0.171812f, 0.171906f, 0.172001f, 0.172095f, 0.172190f, 0.172284f, 0.172379f,
+ 0.172473f, 0.172568f, 0.172662f, 0.172756f, 0.172851f, 0.172945f, 0.173040f, 0.173134f,
+ 0.173229f, 0.173323f, 0.173417f, 0.173512f, 0.173606f, 0.173701f, 0.173795f, 0.173889f,
+ 0.173984f, 0.174078f, 0.174173f, 0.174267f, 0.174362f, 0.174456f, 0.174550f, 0.174645f,
+ 0.174739f, 0.174834f, 0.174928f, 0.175022f, 0.175117f, 0.175211f, 0.175305f, 0.175400f,
+ 0.175494f, 0.175589f, 0.175683f, 0.175777f, 0.175872f, 0.175966f, 0.176061f, 0.176155f,
+ 0.176249f, 0.176344f, 0.176438f, 0.176532f, 0.176627f, 0.176721f, 0.176815f, 0.176910f,
+ 0.177004f, 0.177099f, 0.177193f, 0.177287f, 0.177382f, 0.177476f, 0.177570f, 0.177665f,
+ 0.177759f, 0.177853f, 0.177948f, 0.178042f, 0.178136f, 0.178231f, 0.178325f, 0.178419f,
+ 0.178514f, 0.178608f, 0.178702f, 0.178797f, 0.178891f, 0.178985f, 0.179080f, 0.179174f,
+ 0.179268f, 0.179363f, 0.179457f, 0.179551f, 0.179646f, 0.179740f, 0.179834f, 0.179929f,
+ 0.180023f, 0.180117f, 0.180212f, 0.180306f, 0.180400f, 0.180494f, 0.180589f, 0.180683f,
+ 0.180777f, 0.180872f, 0.180966f, 0.181060f, 0.181154f, 0.181249f, 0.181343f, 0.181437f,
+ 0.181532f, 0.181626f, 0.181720f, 0.181814f, 0.181909f, 0.182003f, 0.182097f, 0.182192f,
+ 0.182286f, 0.182380f, 0.182474f, 0.182569f, 0.182663f, 0.182757f, 0.182851f, 0.182946f,
+ 0.183040f, 0.183134f, 0.183228f, 0.183323f, 0.183417f, 0.183511f, 0.183605f, 0.183700f,
+ 0.183794f, 0.183888f, 0.183982f, 0.184077f, 0.184171f, 0.184265f, 0.184359f, 0.184454f,
+ 0.184548f, 0.184642f, 0.184736f, 0.184830f, 0.184925f, 0.185019f, 0.185113f, 0.185207f,
+ 0.185301f, 0.185396f, 0.185490f, 0.185584f, 0.185678f, 0.185773f, 0.185867f, 0.185961f,
+ 0.186055f, 0.186149f, 0.186244f, 0.186338f, 0.186432f, 0.186526f, 0.186620f, 0.186715f,
+ 0.186809f, 0.186903f, 0.186997f, 0.187091f, 0.187185f, 0.187280f, 0.187374f, 0.187468f,
+ 0.187562f, 0.187656f, 0.187750f, 0.187845f, 0.187939f, 0.188033f, 0.188127f, 0.188221f,
+ 0.188315f, 0.188410f, 0.188504f, 0.188598f, 0.188692f, 0.188786f, 0.188880f, 0.188975f,
+ 0.189069f, 0.189163f, 0.189257f, 0.189351f, 0.189445f, 0.189539f, 0.189634f, 0.189728f,
+ 0.189822f, 0.189916f, 0.190010f, 0.190104f, 0.190198f, 0.190292f, 0.190387f, 0.190481f,
+ 0.190575f, 0.190669f, 0.190763f, 0.190857f, 0.190951f, 0.191045f, 0.191139f, 0.191234f,
+ 0.191328f, 0.191422f, 0.191516f, 0.191610f, 0.191704f, 0.191798f, 0.191892f, 0.191986f,
+ 0.192080f, 0.192174f, 0.192269f, 0.192363f, 0.192457f, 0.192551f, 0.192645f, 0.192739f,
+ 0.192833f, 0.192927f, 0.193021f, 0.193115f, 0.193209f, 0.193303f, 0.193397f, 0.193492f,
+ 0.193586f, 0.193680f, 0.193774f, 0.193868f, 0.193962f, 0.194056f, 0.194150f, 0.194244f,
+ 0.194338f, 0.194432f, 0.194526f, 0.194620f, 0.194714f, 0.194808f, 0.194902f, 0.194996f,
+ 0.195090f, 0.195184f, 0.195278f, 0.195372f, 0.195466f, 0.195560f, 0.195654f, 0.195748f,
+ 0.195843f, 0.195937f, 0.196031f, 0.196125f, 0.196219f, 0.196313f, 0.196407f, 0.196501f,
+ 0.196595f, 0.196689f, 0.196783f, 0.196877f, 0.196971f, 0.197065f, 0.197159f, 0.197253f,
+ 0.197347f, 0.197441f, 0.197535f, 0.197629f, 0.197722f, 0.197816f, 0.197910f, 0.198004f,
+ 0.198098f, 0.198192f, 0.198286f, 0.198380f, 0.198474f, 0.198568f, 0.198662f, 0.198756f,
+ 0.198850f, 0.198944f, 0.199038f, 0.199132f, 0.199226f, 0.199320f, 0.199414f, 0.199508f,
+ 0.199602f, 0.199696f, 0.199790f, 0.199884f, 0.199978f, 0.200071f, 0.200165f, 0.200259f,
+ 0.200353f, 0.200447f, 0.200541f, 0.200635f, 0.200729f, 0.200823f, 0.200917f, 0.201011f,
+ 0.201105f, 0.201199f, 0.201292f, 0.201386f, 0.201480f, 0.201574f, 0.201668f, 0.201762f,
+ 0.201856f, 0.201950f, 0.202044f, 0.202138f, 0.202231f, 0.202325f, 0.202419f, 0.202513f,
+ 0.202607f, 0.202701f, 0.202795f, 0.202889f, 0.202983f, 0.203076f, 0.203170f, 0.203264f,
+ 0.203358f, 0.203452f, 0.203546f, 0.203640f, 0.203734f, 0.203827f, 0.203921f, 0.204015f,
+ 0.204109f, 0.204203f, 0.204297f, 0.204391f, 0.204484f, 0.204578f, 0.204672f, 0.204766f,
+ 0.204860f, 0.204954f, 0.205047f, 0.205141f, 0.205235f, 0.205329f, 0.205423f, 0.205517f,
+ 0.205610f, 0.205704f, 0.205798f, 0.205892f, 0.205986f, 0.206080f, 0.206173f, 0.206267f,
+ 0.206361f, 0.206455f, 0.206549f, 0.206642f, 0.206736f, 0.206830f, 0.206924f, 0.207018f,
+ 0.207111f, 0.207205f, 0.207299f, 0.207393f, 0.207487f, 0.207580f, 0.207674f, 0.207768f,
+ 0.207862f, 0.207955f, 0.208049f, 0.208143f, 0.208237f, 0.208331f, 0.208424f, 0.208518f,
+ 0.208612f, 0.208706f, 0.208799f, 0.208893f, 0.208987f, 0.209081f, 0.209174f, 0.209268f,
+ 0.209362f, 0.209456f, 0.209549f, 0.209643f, 0.209737f, 0.209831f, 0.209924f, 0.210018f,
+ 0.210112f, 0.210206f, 0.210299f, 0.210393f, 0.210487f, 0.210580f, 0.210674f, 0.210768f,
+ 0.210862f, 0.210955f, 0.211049f, 0.211143f, 0.211237f, 0.211330f, 0.211424f, 0.211518f,
+ 0.211611f, 0.211705f, 0.211799f, 0.211892f, 0.211986f, 0.212080f, 0.212174f, 0.212267f,
+ 0.212361f, 0.212455f, 0.212548f, 0.212642f, 0.212736f, 0.212829f, 0.212923f, 0.213017f,
+ 0.213110f, 0.213204f, 0.213298f, 0.213391f, 0.213485f, 0.213579f, 0.213672f, 0.213766f,
+ 0.213860f, 0.213953f, 0.214047f, 0.214141f, 0.214234f, 0.214328f, 0.214422f, 0.214515f,
+ 0.214609f, 0.214702f, 0.214796f, 0.214890f, 0.214983f, 0.215077f, 0.215171f, 0.215264f,
+ 0.215358f, 0.215451f, 0.215545f, 0.215639f, 0.215732f, 0.215826f, 0.215920f, 0.216013f,
+ 0.216107f, 0.216200f, 0.216294f, 0.216388f, 0.216481f, 0.216575f, 0.216668f, 0.216762f,
+ 0.216856f, 0.216949f, 0.217043f, 0.217136f, 0.217230f, 0.217324f, 0.217417f, 0.217511f,
+ 0.217604f, 0.217698f, 0.217791f, 0.217885f, 0.217979f, 0.218072f, 0.218166f, 0.218259f,
+ 0.218353f, 0.218446f, 0.218540f, 0.218633f, 0.218727f, 0.218821f, 0.218914f, 0.219008f,
+ 0.219101f, 0.219195f, 0.219288f, 0.219382f, 0.219475f, 0.219569f, 0.219662f, 0.219756f,
+ 0.219850f, 0.219943f, 0.220037f, 0.220130f, 0.220224f, 0.220317f, 0.220411f, 0.220504f,
+ 0.220598f, 0.220691f, 0.220785f, 0.220878f, 0.220972f, 0.221065f, 0.221159f, 0.221252f,
+ 0.221346f, 0.221439f, 0.221533f, 0.221626f, 0.221720f, 0.221813f, 0.221907f, 0.222000f,
+ 0.222094f, 0.222187f, 0.222281f, 0.222374f, 0.222468f, 0.222561f, 0.222654f, 0.222748f,
+ 0.222841f, 0.222935f, 0.223028f, 0.223122f, 0.223215f, 0.223309f, 0.223402f, 0.223496f,
+ 0.223589f, 0.223682f, 0.223776f, 0.223869f, 0.223963f, 0.224056f, 0.224150f, 0.224243f,
+ 0.224337f, 0.224430f, 0.224523f, 0.224617f, 0.224710f, 0.224804f, 0.224897f, 0.224991f,
+ 0.225084f, 0.225177f, 0.225271f, 0.225364f, 0.225458f, 0.225551f, 0.225644f, 0.225738f,
+ 0.225831f, 0.225925f, 0.226018f, 0.226111f, 0.226205f, 0.226298f, 0.226391f, 0.226485f,
+ 0.226578f, 0.226672f, 0.226765f, 0.226858f, 0.226952f, 0.227045f, 0.227139f, 0.227232f,
+ 0.227325f, 0.227419f, 0.227512f, 0.227605f, 0.227699f, 0.227792f, 0.227885f, 0.227979f,
+ 0.228072f, 0.228165f, 0.228259f, 0.228352f, 0.228445f, 0.228539f, 0.228632f, 0.228725f,
+ 0.228819f, 0.228912f, 0.229005f, 0.229099f, 0.229192f, 0.229285f, 0.229379f, 0.229472f,
+ 0.229565f, 0.229659f, 0.229752f, 0.229845f, 0.229939f, 0.230032f, 0.230125f, 0.230218f,
+ 0.230312f, 0.230405f, 0.230498f, 0.230592f, 0.230685f, 0.230778f, 0.230872f, 0.230965f,
+ 0.231058f, 0.231151f, 0.231245f, 0.231338f, 0.231431f, 0.231524f, 0.231618f, 0.231711f,
+ 0.231804f, 0.231898f, 0.231991f, 0.232084f, 0.232177f, 0.232271f, 0.232364f, 0.232457f,
+ 0.232550f, 0.232644f, 0.232737f, 0.232830f, 0.232923f, 0.233017f, 0.233110f, 0.233203f,
+ 0.233296f, 0.233389f, 0.233483f, 0.233576f, 0.233669f, 0.233762f, 0.233856f, 0.233949f,
+ 0.234042f, 0.234135f, 0.234228f, 0.234322f, 0.234415f, 0.234508f, 0.234601f, 0.234694f,
+ 0.234788f, 0.234881f, 0.234974f, 0.235067f, 0.235160f, 0.235254f, 0.235347f, 0.235440f,
+ 0.235533f, 0.235626f, 0.235719f, 0.235813f, 0.235906f, 0.235999f, 0.236092f, 0.236185f,
+ 0.236278f, 0.236372f, 0.236465f, 0.236558f, 0.236651f, 0.236744f, 0.236837f, 0.236930f,
+ 0.237024f, 0.237117f, 0.237210f, 0.237303f, 0.237396f, 0.237489f, 0.237582f, 0.237676f,
+ 0.237769f, 0.237862f, 0.237955f, 0.238048f, 0.238141f, 0.238234f, 0.238327f, 0.238420f,
+ 0.238514f, 0.238607f, 0.238700f, 0.238793f, 0.238886f, 0.238979f, 0.239072f, 0.239165f,
+ 0.239258f, 0.239351f, 0.239445f, 0.239538f, 0.239631f, 0.239724f, 0.239817f, 0.239910f,
+ 0.240003f, 0.240096f, 0.240189f, 0.240282f, 0.240375f, 0.240468f, 0.240561f, 0.240654f,
+ 0.240748f, 0.240841f, 0.240934f, 0.241027f, 0.241120f, 0.241213f, 0.241306f, 0.241399f,
+ 0.241492f, 0.241585f, 0.241678f, 0.241771f, 0.241864f, 0.241957f, 0.242050f, 0.242143f,
+ 0.242236f, 0.242329f, 0.242422f, 0.242515f, 0.242608f, 0.242701f, 0.242794f, 0.242887f,
+ 0.242980f, 0.243073f, 0.243166f, 0.243259f, 0.243352f, 0.243445f, 0.243538f, 0.243631f,
+ 0.243724f, 0.243817f, 0.243910f, 0.244003f, 0.244096f, 0.244189f, 0.244282f, 0.244375f,
+ 0.244468f, 0.244561f, 0.244654f, 0.244747f, 0.244840f, 0.244933f, 0.245026f, 0.245119f,
+ 0.245212f, 0.245304f, 0.245397f, 0.245490f, 0.245583f, 0.245676f, 0.245769f, 0.245862f,
+ 0.245955f, 0.246048f, 0.246141f, 0.246234f, 0.246327f, 0.246420f, 0.246513f, 0.246606f,
+ 0.246698f, 0.246791f, 0.246884f, 0.246977f, 0.247070f, 0.247163f, 0.247256f, 0.247349f,
+ 0.247442f, 0.247535f, 0.247627f, 0.247720f, 0.247813f, 0.247906f, 0.247999f, 0.248092f,
+ 0.248185f, 0.248278f, 0.248370f, 0.248463f, 0.248556f, 0.248649f, 0.248742f, 0.248835f,
+ 0.248928f, 0.249020f, 0.249113f, 0.249206f, 0.249299f, 0.249392f, 0.249485f, 0.249578f,
+ 0.249670f, 0.249763f, 0.249856f, 0.249949f, 0.250042f, 0.250135f, 0.250227f, 0.250320f,
+ 0.250413f, 0.250506f, 0.250599f, 0.250691f, 0.250784f, 0.250877f, 0.250970f, 0.251063f,
+ 0.251155f, 0.251248f, 0.251341f, 0.251434f, 0.251527f, 0.251619f, 0.251712f, 0.251805f,
+ 0.251898f, 0.251991f, 0.252083f, 0.252176f, 0.252269f, 0.252362f, 0.252454f, 0.252547f,
+ 0.252640f, 0.252733f, 0.252826f, 0.252918f, 0.253011f, 0.253104f, 0.253197f, 0.253289f,
+ 0.253382f, 0.253475f, 0.253568f, 0.253660f, 0.253753f, 0.253846f, 0.253938f, 0.254031f,
+ 0.254124f, 0.254217f, 0.254309f, 0.254402f, 0.254495f, 0.254588f, 0.254680f, 0.254773f,
+ 0.254866f, 0.254958f, 0.255051f, 0.255144f, 0.255236f, 0.255329f, 0.255422f, 0.255515f,
+ 0.255607f, 0.255700f, 0.255793f, 0.255885f, 0.255978f, 0.256071f, 0.256163f, 0.256256f,
+ 0.256349f, 0.256441f, 0.256534f, 0.256627f, 0.256719f, 0.256812f, 0.256905f, 0.256997f,
+ 0.257090f, 0.257183f, 0.257275f, 0.257368f, 0.257461f, 0.257553f, 0.257646f, 0.257738f,
+ 0.257831f, 0.257924f, 0.258016f, 0.258109f, 0.258202f, 0.258294f, 0.258387f, 0.258479f,
+ 0.258572f, 0.258665f, 0.258757f, 0.258850f, 0.258943f, 0.259035f, 0.259128f, 0.259220f,
+ 0.259313f, 0.259405f, 0.259498f, 0.259591f, 0.259683f, 0.259776f, 0.259868f, 0.259961f,
+ 0.260054f, 0.260146f, 0.260239f, 0.260331f, 0.260424f, 0.260516f, 0.260609f, 0.260702f,
+ 0.260794f, 0.260887f, 0.260979f, 0.261072f, 0.261164f, 0.261257f, 0.261349f, 0.261442f,
+ 0.261534f, 0.261627f, 0.261720f, 0.261812f, 0.261905f, 0.261997f, 0.262090f, 0.262182f,
+ 0.262275f, 0.262367f, 0.262460f, 0.262552f, 0.262645f, 0.262737f, 0.262830f, 0.262922f,
+ 0.263015f, 0.263107f, 0.263200f, 0.263292f, 0.263385f, 0.263477f, 0.263570f, 0.263662f,
+ 0.263755f, 0.263847f, 0.263940f, 0.264032f, 0.264125f, 0.264217f, 0.264309f, 0.264402f,
+ 0.264494f, 0.264587f, 0.264679f, 0.264772f, 0.264864f, 0.264957f, 0.265049f, 0.265142f,
+ 0.265234f, 0.265326f, 0.265419f, 0.265511f, 0.265604f, 0.265696f, 0.265789f, 0.265881f,
+ 0.265973f, 0.266066f, 0.266158f, 0.266251f, 0.266343f, 0.266436f, 0.266528f, 0.266620f,
+ 0.266713f, 0.266805f, 0.266898f, 0.266990f, 0.267082f, 0.267175f, 0.267267f, 0.267359f,
+ 0.267452f, 0.267544f, 0.267637f, 0.267729f, 0.267821f, 0.267914f, 0.268006f, 0.268099f,
+ 0.268191f, 0.268283f, 0.268376f, 0.268468f, 0.268560f, 0.268653f, 0.268745f, 0.268837f,
+ 0.268930f, 0.269022f, 0.269114f, 0.269207f, 0.269299f, 0.269391f, 0.269484f, 0.269576f,
+ 0.269668f, 0.269761f, 0.269853f, 0.269945f, 0.270038f, 0.270130f, 0.270222f, 0.270315f,
+ 0.270407f, 0.270499f, 0.270591f, 0.270684f, 0.270776f, 0.270868f, 0.270961f, 0.271053f,
+ 0.271145f, 0.271237f, 0.271330f, 0.271422f, 0.271514f, 0.271607f, 0.271699f, 0.271791f,
+ 0.271883f, 0.271976f, 0.272068f, 0.272160f, 0.272252f, 0.272345f, 0.272437f, 0.272529f,
+ 0.272621f, 0.272714f, 0.272806f, 0.272898f, 0.272990f, 0.273083f, 0.273175f, 0.273267f,
+ 0.273359f, 0.273451f, 0.273544f, 0.273636f, 0.273728f, 0.273820f, 0.273912f, 0.274005f,
+ 0.274097f, 0.274189f, 0.274281f, 0.274374f, 0.274466f, 0.274558f, 0.274650f, 0.274742f,
+ 0.274834f, 0.274927f, 0.275019f, 0.275111f, 0.275203f, 0.275295f, 0.275387f, 0.275480f,
+ 0.275572f, 0.275664f, 0.275756f, 0.275848f, 0.275940f, 0.276033f, 0.276125f, 0.276217f,
+ 0.276309f, 0.276401f, 0.276493f, 0.276585f, 0.276678f, 0.276770f, 0.276862f, 0.276954f,
+ 0.277046f, 0.277138f, 0.277230f, 0.277322f, 0.277415f, 0.277507f, 0.277599f, 0.277691f,
+ 0.277783f, 0.277875f, 0.277967f, 0.278059f, 0.278151f, 0.278243f, 0.278336f, 0.278428f,
+ 0.278520f, 0.278612f, 0.278704f, 0.278796f, 0.278888f, 0.278980f, 0.279072f, 0.279164f,
+ 0.279256f, 0.279348f, 0.279440f, 0.279532f, 0.279624f, 0.279717f, 0.279809f, 0.279901f,
+ 0.279993f, 0.280085f, 0.280177f, 0.280269f, 0.280361f, 0.280453f, 0.280545f, 0.280637f,
+ 0.280729f, 0.280821f, 0.280913f, 0.281005f, 0.281097f, 0.281189f, 0.281281f, 0.281373f,
+ 0.281465f, 0.281557f, 0.281649f, 0.281741f, 0.281833f, 0.281925f, 0.282017f, 0.282109f,
+ 0.282201f, 0.282293f, 0.282385f, 0.282477f, 0.282569f, 0.282661f, 0.282753f, 0.282845f,
+ 0.282937f, 0.283029f, 0.283120f, 0.283212f, 0.283304f, 0.283396f, 0.283488f, 0.283580f,
+ 0.283672f, 0.283764f, 0.283856f, 0.283948f, 0.284040f, 0.284132f, 0.284224f, 0.284316f,
+ 0.284408f, 0.284499f, 0.284591f, 0.284683f, 0.284775f, 0.284867f, 0.284959f, 0.285051f,
+ 0.285143f, 0.285235f, 0.285327f, 0.285418f, 0.285510f, 0.285602f, 0.285694f, 0.285786f,
+ 0.285878f, 0.285970f, 0.286062f, 0.286153f, 0.286245f, 0.286337f, 0.286429f, 0.286521f,
+ 0.286613f, 0.286705f, 0.286796f, 0.286888f, 0.286980f, 0.287072f, 0.287164f, 0.287256f,
+ 0.287347f, 0.287439f, 0.287531f, 0.287623f, 0.287715f, 0.287807f, 0.287898f, 0.287990f,
+ 0.288082f, 0.288174f, 0.288266f, 0.288357f, 0.288449f, 0.288541f, 0.288633f, 0.288725f,
+ 0.288816f, 0.288908f, 0.289000f, 0.289092f, 0.289184f, 0.289275f, 0.289367f, 0.289459f,
+ 0.289551f, 0.289642f, 0.289734f, 0.289826f, 0.289918f, 0.290009f, 0.290101f, 0.290193f,
+ 0.290285f, 0.290376f, 0.290468f, 0.290560f, 0.290652f, 0.290743f, 0.290835f, 0.290927f,
+ 0.291019f, 0.291110f, 0.291202f, 0.291294f, 0.291385f, 0.291477f, 0.291569f, 0.291661f,
+ 0.291752f, 0.291844f, 0.291936f, 0.292027f, 0.292119f, 0.292211f, 0.292302f, 0.292394f,
+ 0.292486f, 0.292577f, 0.292669f, 0.292761f, 0.292852f, 0.292944f, 0.293036f, 0.293128f,
+ 0.293219f, 0.293311f, 0.293402f, 0.293494f, 0.293586f, 0.293677f, 0.293769f, 0.293861f,
+ 0.293952f, 0.294044f, 0.294136f, 0.294227f, 0.294319f, 0.294410f, 0.294502f, 0.294594f,
+ 0.294685f, 0.294777f, 0.294869f, 0.294960f, 0.295052f, 0.295143f, 0.295235f, 0.295327f,
+ 0.295418f, 0.295510f, 0.295601f, 0.295693f, 0.295785f, 0.295876f, 0.295968f, 0.296059f,
+ 0.296151f, 0.296242f, 0.296334f, 0.296426f, 0.296517f, 0.296609f, 0.296700f, 0.296792f,
+ 0.296883f, 0.296975f, 0.297066f, 0.297158f, 0.297250f, 0.297341f, 0.297433f, 0.297524f,
+ 0.297616f, 0.297707f, 0.297799f, 0.297890f, 0.297982f, 0.298073f, 0.298165f, 0.298256f,
+ 0.298348f, 0.298439f, 0.298531f, 0.298622f, 0.298714f, 0.298805f, 0.298897f, 0.298988f,
+ 0.299080f, 0.299171f, 0.299263f, 0.299354f, 0.299446f, 0.299537f, 0.299629f, 0.299720f,
+ 0.299812f, 0.299903f, 0.299995f, 0.300086f, 0.300177f, 0.300269f, 0.300360f, 0.300452f,
+ 0.300543f, 0.300635f, 0.300726f, 0.300818f, 0.300909f, 0.301000f, 0.301092f, 0.301183f,
+ 0.301275f, 0.301366f, 0.301458f, 0.301549f, 0.301640f, 0.301732f, 0.301823f, 0.301915f,
+ 0.302006f, 0.302097f, 0.302189f, 0.302280f, 0.302372f, 0.302463f, 0.302554f, 0.302646f,
+ 0.302737f, 0.302828f, 0.302920f, 0.303011f, 0.303103f, 0.303194f, 0.303285f, 0.303377f,
+ 0.303468f, 0.303559f, 0.303651f, 0.303742f, 0.303833f, 0.303925f, 0.304016f, 0.304107f,
+ 0.304199f, 0.304290f, 0.304381f, 0.304473f, 0.304564f, 0.304655f, 0.304747f, 0.304838f,
+ 0.304929f, 0.305021f, 0.305112f, 0.305203f, 0.305294f, 0.305386f, 0.305477f, 0.305568f,
+ 0.305660f, 0.305751f, 0.305842f, 0.305933f, 0.306025f, 0.306116f, 0.306207f, 0.306299f,
+ 0.306390f, 0.306481f, 0.306572f, 0.306664f, 0.306755f, 0.306846f, 0.306937f, 0.307029f,
+ 0.307120f, 0.307211f, 0.307302f, 0.307394f, 0.307485f, 0.307576f, 0.307667f, 0.307758f,
+ 0.307850f, 0.307941f, 0.308032f, 0.308123f, 0.308214f, 0.308306f, 0.308397f, 0.308488f,
+ 0.308579f, 0.308670f, 0.308762f, 0.308853f, 0.308944f, 0.309035f, 0.309126f, 0.309218f,
+ 0.309309f, 0.309400f, 0.309491f, 0.309582f, 0.309673f, 0.309765f, 0.309856f, 0.309947f,
+ 0.310038f, 0.310129f, 0.310220f, 0.310311f, 0.310403f, 0.310494f, 0.310585f, 0.310676f,
+ 0.310767f, 0.310858f, 0.310949f, 0.311041f, 0.311132f, 0.311223f, 0.311314f, 0.311405f,
+ 0.311496f, 0.311587f, 0.311678f, 0.311769f, 0.311860f, 0.311952f, 0.312043f, 0.312134f,
+ 0.312225f, 0.312316f, 0.312407f, 0.312498f, 0.312589f, 0.312680f, 0.312771f, 0.312862f,
+ 0.312953f, 0.313044f, 0.313135f, 0.313227f, 0.313318f, 0.313409f, 0.313500f, 0.313591f,
+ 0.313682f, 0.313773f, 0.313864f, 0.313955f, 0.314046f, 0.314137f, 0.314228f, 0.314319f,
+ 0.314410f, 0.314501f, 0.314592f, 0.314683f, 0.314774f, 0.314865f, 0.314956f, 0.315047f,
+ 0.315138f, 0.315229f, 0.315320f, 0.315411f, 0.315502f, 0.315593f, 0.315684f, 0.315775f,
+ 0.315866f, 0.315957f, 0.316048f, 0.316139f, 0.316230f, 0.316321f, 0.316411f, 0.316502f,
+ 0.316593f, 0.316684f, 0.316775f, 0.316866f, 0.316957f, 0.317048f, 0.317139f, 0.317230f,
+ 0.317321f, 0.317412f, 0.317503f, 0.317594f, 0.317684f, 0.317775f, 0.317866f, 0.317957f,
+ 0.318048f, 0.318139f, 0.318230f, 0.318321f, 0.318412f, 0.318503f, 0.318593f, 0.318684f,
+ 0.318775f, 0.318866f, 0.318957f, 0.319048f, 0.319139f, 0.319229f, 0.319320f, 0.319411f,
+ 0.319502f, 0.319593f, 0.319684f, 0.319775f, 0.319865f, 0.319956f, 0.320047f, 0.320138f,
+ 0.320229f, 0.320320f, 0.320410f, 0.320501f, 0.320592f, 0.320683f, 0.320774f, 0.320864f,
+ 0.320955f, 0.321046f, 0.321137f, 0.321228f, 0.321318f, 0.321409f, 0.321500f, 0.321591f,
+ 0.321682f, 0.321772f, 0.321863f, 0.321954f, 0.322045f, 0.322135f, 0.322226f, 0.322317f,
+ 0.322408f, 0.322498f, 0.322589f, 0.322680f, 0.322771f, 0.322861f, 0.322952f, 0.323043f,
+ 0.323134f, 0.323224f, 0.323315f, 0.323406f, 0.323497f, 0.323587f, 0.323678f, 0.323769f,
+ 0.323859f, 0.323950f, 0.324041f, 0.324131f, 0.324222f, 0.324313f, 0.324404f, 0.324494f,
+ 0.324585f, 0.324676f, 0.324766f, 0.324857f, 0.324948f, 0.325038f, 0.325129f, 0.325220f,
+ 0.325310f, 0.325401f, 0.325492f, 0.325582f, 0.325673f, 0.325764f, 0.325854f, 0.325945f,
+ 0.326035f, 0.326126f, 0.326217f, 0.326307f, 0.326398f, 0.326489f, 0.326579f, 0.326670f,
+ 0.326760f, 0.326851f, 0.326942f, 0.327032f, 0.327123f, 0.327213f, 0.327304f, 0.327395f,
+ 0.327485f, 0.327576f, 0.327666f, 0.327757f, 0.327848f, 0.327938f, 0.328029f, 0.328119f,
+ 0.328210f, 0.328300f, 0.328391f, 0.328482f, 0.328572f, 0.328663f, 0.328753f, 0.328844f,
+ 0.328934f, 0.329025f, 0.329115f, 0.329206f, 0.329296f, 0.329387f, 0.329477f, 0.329568f,
+ 0.329658f, 0.329749f, 0.329839f, 0.329930f, 0.330020f, 0.330111f, 0.330202f, 0.330292f,
+ 0.330382f, 0.330473f, 0.330563f, 0.330654f, 0.330744f, 0.330835f, 0.330925f, 0.331016f,
+ 0.331106f, 0.331197f, 0.331287f, 0.331378f, 0.331468f, 0.331559f, 0.331649f, 0.331739f,
+ 0.331830f, 0.331920f, 0.332011f, 0.332101f, 0.332192f, 0.332282f, 0.332373f, 0.332463f,
+ 0.332553f, 0.332644f, 0.332734f, 0.332825f, 0.332915f, 0.333005f, 0.333096f, 0.333186f,
+ 0.333277f, 0.333367f, 0.333457f, 0.333548f, 0.333638f, 0.333729f, 0.333819f, 0.333909f,
+ 0.334000f, 0.334090f, 0.334180f, 0.334271f, 0.334361f, 0.334451f, 0.334542f, 0.334632f,
+ 0.334722f, 0.334813f, 0.334903f, 0.334994f, 0.335084f, 0.335174f, 0.335265f, 0.335355f,
+ 0.335445f, 0.335535f, 0.335626f, 0.335716f, 0.335806f, 0.335897f, 0.335987f, 0.336077f,
+ 0.336168f, 0.336258f, 0.336348f, 0.336438f, 0.336529f, 0.336619f, 0.336709f, 0.336800f,
+ 0.336890f, 0.336980f, 0.337070f, 0.337161f, 0.337251f, 0.337341f, 0.337431f, 0.337522f,
+ 0.337612f, 0.337702f, 0.337792f, 0.337883f, 0.337973f, 0.338063f, 0.338153f, 0.338244f,
+ 0.338334f, 0.338424f, 0.338514f, 0.338604f, 0.338695f, 0.338785f, 0.338875f, 0.338965f,
+ 0.339055f, 0.339146f, 0.339236f, 0.339326f, 0.339416f, 0.339506f, 0.339597f, 0.339687f,
+ 0.339777f, 0.339867f, 0.339957f, 0.340047f, 0.340138f, 0.340228f, 0.340318f, 0.340408f,
+ 0.340498f, 0.340588f, 0.340678f, 0.340769f, 0.340859f, 0.340949f, 0.341039f, 0.341129f,
+ 0.341219f, 0.341309f, 0.341399f, 0.341490f, 0.341580f, 0.341670f, 0.341760f, 0.341850f,
+ 0.341940f, 0.342030f, 0.342120f, 0.342210f, 0.342300f, 0.342391f, 0.342481f, 0.342571f,
+ 0.342661f, 0.342751f, 0.342841f, 0.342931f, 0.343021f, 0.343111f, 0.343201f, 0.343291f,
+ 0.343381f, 0.343471f, 0.343561f, 0.343651f, 0.343741f, 0.343831f, 0.343921f, 0.344011f,
+ 0.344101f, 0.344191f, 0.344281f, 0.344371f, 0.344461f, 0.344551f, 0.344641f, 0.344731f,
+ 0.344821f, 0.344911f, 0.345001f, 0.345091f, 0.345181f, 0.345271f, 0.345361f, 0.345451f,
+ 0.345541f, 0.345631f, 0.345721f, 0.345811f, 0.345901f, 0.345991f, 0.346081f, 0.346171f,
+ 0.346261f, 0.346351f, 0.346441f, 0.346531f, 0.346621f, 0.346711f, 0.346801f, 0.346890f,
+ 0.346980f, 0.347070f, 0.347160f, 0.347250f, 0.347340f, 0.347430f, 0.347520f, 0.347610f,
+ 0.347700f, 0.347790f, 0.347879f, 0.347969f, 0.348059f, 0.348149f, 0.348239f, 0.348329f,
+ 0.348419f, 0.348509f, 0.348598f, 0.348688f, 0.348778f, 0.348868f, 0.348958f, 0.349048f,
+ 0.349138f, 0.349227f, 0.349317f, 0.349407f, 0.349497f, 0.349587f, 0.349676f, 0.349766f,
+ 0.349856f, 0.349946f, 0.350036f, 0.350126f, 0.350215f, 0.350305f, 0.350395f, 0.350485f,
+ 0.350575f, 0.350664f, 0.350754f, 0.350844f, 0.350934f, 0.351023f, 0.351113f, 0.351203f,
+ 0.351293f, 0.351383f, 0.351472f, 0.351562f, 0.351652f, 0.351742f, 0.351831f, 0.351921f,
+ 0.352011f, 0.352100f, 0.352190f, 0.352280f, 0.352370f, 0.352459f, 0.352549f, 0.352639f,
+ 0.352729f, 0.352818f, 0.352908f, 0.352998f, 0.353087f, 0.353177f, 0.353267f, 0.353356f,
+ 0.353446f, 0.353536f, 0.353626f, 0.353715f, 0.353805f, 0.353895f, 0.353984f, 0.354074f,
+ 0.354164f, 0.354253f, 0.354343f, 0.354432f, 0.354522f, 0.354612f, 0.354701f, 0.354791f,
+ 0.354881f, 0.354970f, 0.355060f, 0.355150f, 0.355239f, 0.355329f, 0.355418f, 0.355508f,
+ 0.355598f, 0.355687f, 0.355777f, 0.355866f, 0.355956f, 0.356046f, 0.356135f, 0.356225f,
+ 0.356314f, 0.356404f, 0.356494f, 0.356583f, 0.356673f, 0.356762f, 0.356852f, 0.356941f,
+ 0.357031f, 0.357121f, 0.357210f, 0.357300f, 0.357389f, 0.357479f, 0.357568f, 0.357658f,
+ 0.357747f, 0.357837f, 0.357926f, 0.358016f, 0.358105f, 0.358195f, 0.358284f, 0.358374f,
+ 0.358463f, 0.358553f, 0.358642f, 0.358732f, 0.358821f, 0.358911f, 0.359000f, 0.359090f,
+ 0.359179f, 0.359269f, 0.359358f, 0.359448f, 0.359537f, 0.359627f, 0.359716f, 0.359806f,
+ 0.359895f, 0.359984f, 0.360074f, 0.360163f, 0.360253f, 0.360342f, 0.360432f, 0.360521f,
+ 0.360611f, 0.360700f, 0.360789f, 0.360879f, 0.360968f, 0.361058f, 0.361147f, 0.361236f,
+ 0.361326f, 0.361415f, 0.361505f, 0.361594f, 0.361683f, 0.361773f, 0.361862f, 0.361952f,
+ 0.362041f, 0.362130f, 0.362220f, 0.362309f, 0.362398f, 0.362488f, 0.362577f, 0.362666f,
+ 0.362756f, 0.362845f, 0.362934f, 0.363024f, 0.363113f, 0.363202f, 0.363292f, 0.363381f,
+ 0.363470f, 0.363560f, 0.363649f, 0.363738f, 0.363828f, 0.363917f, 0.364006f, 0.364096f,
+ 0.364185f, 0.364274f, 0.364363f, 0.364453f, 0.364542f, 0.364631f, 0.364720f, 0.364810f,
+ 0.364899f, 0.364988f, 0.365078f, 0.365167f, 0.365256f, 0.365345f, 0.365435f, 0.365524f,
+ 0.365613f, 0.365702f, 0.365791f, 0.365881f, 0.365970f, 0.366059f, 0.366148f, 0.366238f,
+ 0.366327f, 0.366416f, 0.366505f, 0.366594f, 0.366684f, 0.366773f, 0.366862f, 0.366951f,
+ 0.367040f, 0.367130f, 0.367219f, 0.367308f, 0.367397f, 0.367486f, 0.367575f, 0.367665f,
+ 0.367754f, 0.367843f, 0.367932f, 0.368021f, 0.368110f, 0.368199f, 0.368289f, 0.368378f,
+ 0.368467f, 0.368556f, 0.368645f, 0.368734f, 0.368823f, 0.368912f, 0.369002f, 0.369091f,
+ 0.369180f, 0.369269f, 0.369358f, 0.369447f, 0.369536f, 0.369625f, 0.369714f, 0.369803f,
+ 0.369892f, 0.369982f, 0.370071f, 0.370160f, 0.370249f, 0.370338f, 0.370427f, 0.370516f,
+ 0.370605f, 0.370694f, 0.370783f, 0.370872f, 0.370961f, 0.371050f, 0.371139f, 0.371228f,
+ 0.371317f, 0.371406f, 0.371495f, 0.371584f, 0.371673f, 0.371762f, 0.371851f, 0.371940f,
+ 0.372029f, 0.372118f, 0.372207f, 0.372296f, 0.372385f, 0.372474f, 0.372563f, 0.372652f,
+ 0.372741f, 0.372830f, 0.372919f, 0.373008f, 0.373097f, 0.373186f, 0.373275f, 0.373364f,
+ 0.373453f, 0.373542f, 0.373631f, 0.373719f, 0.373808f, 0.373897f, 0.373986f, 0.374075f,
+ 0.374164f, 0.374253f, 0.374342f, 0.374431f, 0.374520f, 0.374609f, 0.374697f, 0.374786f,
+ 0.374875f, 0.374964f, 0.375053f, 0.375142f, 0.375231f, 0.375320f, 0.375408f, 0.375497f,
+ 0.375586f, 0.375675f, 0.375764f, 0.375853f, 0.375942f, 0.376030f, 0.376119f, 0.376208f,
+ 0.376297f, 0.376386f, 0.376475f, 0.376563f, 0.376652f, 0.376741f, 0.376830f, 0.376919f,
+ 0.377007f, 0.377096f, 0.377185f, 0.377274f, 0.377363f, 0.377451f, 0.377540f, 0.377629f,
+ 0.377718f, 0.377806f, 0.377895f, 0.377984f, 0.378073f, 0.378162f, 0.378250f, 0.378339f,
+ 0.378428f, 0.378516f, 0.378605f, 0.378694f, 0.378783f, 0.378871f, 0.378960f, 0.379049f,
+ 0.379138f, 0.379226f, 0.379315f, 0.379404f, 0.379492f, 0.379581f, 0.379670f, 0.379759f,
+ 0.379847f, 0.379936f, 0.380025f, 0.380113f, 0.380202f, 0.380291f, 0.380379f, 0.380468f,
+ 0.380557f, 0.380645f, 0.380734f, 0.380823f, 0.380911f, 0.381000f, 0.381088f, 0.381177f,
+ 0.381266f, 0.381354f, 0.381443f, 0.381532f, 0.381620f, 0.381709f, 0.381797f, 0.381886f,
+ 0.381975f, 0.382063f, 0.382152f, 0.382241f, 0.382329f, 0.382418f, 0.382506f, 0.382595f,
+ 0.382683f, 0.382772f, 0.382861f, 0.382949f, 0.383038f, 0.383126f, 0.383215f, 0.383303f,
+ 0.383392f, 0.383480f, 0.383569f, 0.383658f, 0.383746f, 0.383835f, 0.383923f, 0.384012f,
+ 0.384100f, 0.384189f, 0.384277f, 0.384366f, 0.384454f, 0.384543f, 0.384631f, 0.384720f,
+ 0.384808f, 0.384897f, 0.384985f, 0.385074f, 0.385162f, 0.385251f, 0.385339f, 0.385428f,
+ 0.385516f, 0.385605f, 0.385693f, 0.385781f, 0.385870f, 0.385958f, 0.386047f, 0.386135f,
+ 0.386224f, 0.386312f, 0.386400f, 0.386489f, 0.386577f, 0.386666f, 0.386754f, 0.386843f,
+ 0.386931f, 0.387019f, 0.387108f, 0.387196f, 0.387285f, 0.387373f, 0.387461f, 0.387550f,
+ 0.387638f, 0.387727f, 0.387815f, 0.387903f, 0.387992f, 0.388080f, 0.388168f, 0.388257f,
+ 0.388345f, 0.388433f, 0.388522f, 0.388610f, 0.388698f, 0.388787f, 0.388875f, 0.388963f,
+ 0.389052f, 0.389140f, 0.389228f, 0.389317f, 0.389405f, 0.389493f, 0.389582f, 0.389670f,
+ 0.389758f, 0.389846f, 0.389935f, 0.390023f, 0.390111f, 0.390200f, 0.390288f, 0.390376f,
+ 0.390464f, 0.390553f, 0.390641f, 0.390729f, 0.390817f, 0.390906f, 0.390994f, 0.391082f,
+ 0.391170f, 0.391259f, 0.391347f, 0.391435f, 0.391523f, 0.391612f, 0.391700f, 0.391788f,
+ 0.391876f, 0.391964f, 0.392053f, 0.392141f, 0.392229f, 0.392317f, 0.392405f, 0.392493f,
+ 0.392582f, 0.392670f, 0.392758f, 0.392846f, 0.392934f, 0.393023f, 0.393111f, 0.393199f,
+ 0.393287f, 0.393375f, 0.393463f, 0.393551f, 0.393640f, 0.393728f, 0.393816f, 0.393904f,
+ 0.393992f, 0.394080f, 0.394168f, 0.394256f, 0.394344f, 0.394433f, 0.394521f, 0.394609f,
+ 0.394697f, 0.394785f, 0.394873f, 0.394961f, 0.395049f, 0.395137f, 0.395225f, 0.395313f,
+ 0.395401f, 0.395490f, 0.395578f, 0.395666f, 0.395754f, 0.395842f, 0.395930f, 0.396018f,
+ 0.396106f, 0.396194f, 0.396282f, 0.396370f, 0.396458f, 0.396546f, 0.396634f, 0.396722f,
+ 0.396810f, 0.396898f, 0.396986f, 0.397074f, 0.397162f, 0.397250f, 0.397338f, 0.397426f,
+ 0.397514f, 0.397602f, 0.397690f, 0.397778f, 0.397866f, 0.397954f, 0.398042f, 0.398130f,
+ 0.398218f, 0.398306f, 0.398393f, 0.398481f, 0.398569f, 0.398657f, 0.398745f, 0.398833f,
+ 0.398921f, 0.399009f, 0.399097f, 0.399185f, 0.399273f, 0.399361f, 0.399448f, 0.399536f,
+ 0.399624f, 0.399712f, 0.399800f, 0.399888f, 0.399976f, 0.400064f, 0.400151f, 0.400239f,
+ 0.400327f, 0.400415f, 0.400503f, 0.400591f, 0.400679f, 0.400766f, 0.400854f, 0.400942f,
+ 0.401030f, 0.401118f, 0.401206f, 0.401293f, 0.401381f, 0.401469f, 0.401557f, 0.401645f,
+ 0.401732f, 0.401820f, 0.401908f, 0.401996f, 0.402084f, 0.402171f, 0.402259f, 0.402347f,
+ 0.402435f, 0.402522f, 0.402610f, 0.402698f, 0.402786f, 0.402873f, 0.402961f, 0.403049f,
+ 0.403137f, 0.403224f, 0.403312f, 0.403400f, 0.403488f, 0.403575f, 0.403663f, 0.403751f,
+ 0.403838f, 0.403926f, 0.404014f, 0.404102f, 0.404189f, 0.404277f, 0.404365f, 0.404452f,
+ 0.404540f, 0.404628f, 0.404715f, 0.404803f, 0.404891f, 0.404978f, 0.405066f, 0.405154f,
+ 0.405241f, 0.405329f, 0.405417f, 0.405504f, 0.405592f, 0.405680f, 0.405767f, 0.405855f,
+ 0.405942f, 0.406030f, 0.406118f, 0.406205f, 0.406293f, 0.406380f, 0.406468f, 0.406556f,
+ 0.406643f, 0.406731f, 0.406818f, 0.406906f, 0.406994f, 0.407081f, 0.407169f, 0.407256f,
+ 0.407344f, 0.407431f, 0.407519f, 0.407606f, 0.407694f, 0.407782f, 0.407869f, 0.407957f,
+ 0.408044f, 0.408132f, 0.408219f, 0.408307f, 0.408394f, 0.408482f, 0.408569f, 0.408657f,
+ 0.408744f, 0.408832f, 0.408919f, 0.409007f, 0.409094f, 0.409182f, 0.409269f, 0.409357f,
+ 0.409444f, 0.409532f, 0.409619f, 0.409707f, 0.409794f, 0.409881f, 0.409969f, 0.410056f,
+ 0.410144f, 0.410231f, 0.410319f, 0.410406f, 0.410493f, 0.410581f, 0.410668f, 0.410756f,
+ 0.410843f, 0.410931f, 0.411018f, 0.411105f, 0.411193f, 0.411280f, 0.411368f, 0.411455f,
+ 0.411542f, 0.411630f, 0.411717f, 0.411804f, 0.411892f, 0.411979f, 0.412067f, 0.412154f,
+ 0.412241f, 0.412329f, 0.412416f, 0.412503f, 0.412591f, 0.412678f, 0.412765f, 0.412853f,
+ 0.412940f, 0.413027f, 0.413115f, 0.413202f, 0.413289f, 0.413376f, 0.413464f, 0.413551f,
+ 0.413638f, 0.413726f, 0.413813f, 0.413900f, 0.413987f, 0.414075f, 0.414162f, 0.414249f,
+ 0.414337f, 0.414424f, 0.414511f, 0.414598f, 0.414685f, 0.414773f, 0.414860f, 0.414947f,
+ 0.415034f, 0.415122f, 0.415209f, 0.415296f, 0.415383f, 0.415471f, 0.415558f, 0.415645f,
+ 0.415732f, 0.415819f, 0.415906f, 0.415994f, 0.416081f, 0.416168f, 0.416255f, 0.416342f,
+ 0.416430f, 0.416517f, 0.416604f, 0.416691f, 0.416778f, 0.416865f, 0.416952f, 0.417040f,
+ 0.417127f, 0.417214f, 0.417301f, 0.417388f, 0.417475f, 0.417562f, 0.417650f, 0.417737f,
+ 0.417824f, 0.417911f, 0.417998f, 0.418085f, 0.418172f, 0.418259f, 0.418346f, 0.418433f,
+ 0.418520f, 0.418608f, 0.418695f, 0.418782f, 0.418869f, 0.418956f, 0.419043f, 0.419130f,
+ 0.419217f, 0.419304f, 0.419391f, 0.419478f, 0.419565f, 0.419652f, 0.419739f, 0.419826f,
+ 0.419913f, 0.420000f, 0.420087f, 0.420174f, 0.420261f, 0.420348f, 0.420435f, 0.420522f,
+ 0.420609f, 0.420696f, 0.420783f, 0.420870f, 0.420957f, 0.421044f, 0.421131f, 0.421218f,
+ 0.421305f, 0.421392f, 0.421479f, 0.421566f, 0.421653f, 0.421739f, 0.421826f, 0.421913f,
+ 0.422000f, 0.422087f, 0.422174f, 0.422261f, 0.422348f, 0.422435f, 0.422522f, 0.422609f,
+ 0.422695f, 0.422782f, 0.422869f, 0.422956f, 0.423043f, 0.423130f, 0.423217f, 0.423304f,
+ 0.423390f, 0.423477f, 0.423564f, 0.423651f, 0.423738f, 0.423825f, 0.423912f, 0.423998f,
+ 0.424085f, 0.424172f, 0.424259f, 0.424346f, 0.424432f, 0.424519f, 0.424606f, 0.424693f,
+ 0.424780f, 0.424866f, 0.424953f, 0.425040f, 0.425127f, 0.425214f, 0.425300f, 0.425387f,
+ 0.425474f, 0.425561f, 0.425647f, 0.425734f, 0.425821f, 0.425908f, 0.425994f, 0.426081f,
+ 0.426168f, 0.426255f, 0.426341f, 0.426428f, 0.426515f, 0.426601f, 0.426688f, 0.426775f,
+ 0.426862f, 0.426948f, 0.427035f, 0.427122f, 0.427208f, 0.427295f, 0.427382f, 0.427468f,
+ 0.427555f, 0.427642f, 0.427728f, 0.427815f, 0.427902f, 0.427988f, 0.428075f, 0.428162f,
+ 0.428248f, 0.428335f, 0.428422f, 0.428508f, 0.428595f, 0.428681f, 0.428768f, 0.428855f,
+ 0.428941f, 0.429028f, 0.429114f, 0.429201f, 0.429288f, 0.429374f, 0.429461f, 0.429547f,
+ 0.429634f, 0.429721f, 0.429807f, 0.429894f, 0.429980f, 0.430067f, 0.430153f, 0.430240f,
+ 0.430326f, 0.430413f, 0.430500f, 0.430586f, 0.430673f, 0.430759f, 0.430846f, 0.430932f,
+ 0.431019f, 0.431105f, 0.431192f, 0.431278f, 0.431365f, 0.431451f, 0.431538f, 0.431624f,
+ 0.431711f, 0.431797f, 0.431884f, 0.431970f, 0.432057f, 0.432143f, 0.432229f, 0.432316f,
+ 0.432402f, 0.432489f, 0.432575f, 0.432662f, 0.432748f, 0.432835f, 0.432921f, 0.433007f,
+ 0.433094f, 0.433180f, 0.433267f, 0.433353f, 0.433439f, 0.433526f, 0.433612f, 0.433699f,
+ 0.433785f, 0.433871f, 0.433958f, 0.434044f, 0.434131f, 0.434217f, 0.434303f, 0.434390f,
+ 0.434476f, 0.434562f, 0.434649f, 0.434735f, 0.434821f, 0.434908f, 0.434994f, 0.435080f,
+ 0.435167f, 0.435253f, 0.435339f, 0.435426f, 0.435512f, 0.435598f, 0.435685f, 0.435771f,
+ 0.435857f, 0.435943f, 0.436030f, 0.436116f, 0.436202f, 0.436288f, 0.436375f, 0.436461f,
+ 0.436547f, 0.436633f, 0.436720f, 0.436806f, 0.436892f, 0.436978f, 0.437065f, 0.437151f,
+ 0.437237f, 0.437323f, 0.437410f, 0.437496f, 0.437582f, 0.437668f, 0.437754f, 0.437841f,
+ 0.437927f, 0.438013f, 0.438099f, 0.438185f, 0.438272f, 0.438358f, 0.438444f, 0.438530f,
+ 0.438616f, 0.438702f, 0.438789f, 0.438875f, 0.438961f, 0.439047f, 0.439133f, 0.439219f,
+ 0.439305f, 0.439392f, 0.439478f, 0.439564f, 0.439650f, 0.439736f, 0.439822f, 0.439908f,
+ 0.439994f, 0.440080f, 0.440166f, 0.440253f, 0.440339f, 0.440425f, 0.440511f, 0.440597f,
+ 0.440683f, 0.440769f, 0.440855f, 0.440941f, 0.441027f, 0.441113f, 0.441199f, 0.441285f,
+ 0.441371f, 0.441457f, 0.441543f, 0.441629f, 0.441715f, 0.441801f, 0.441887f, 0.441973f,
+ 0.442059f, 0.442145f, 0.442231f, 0.442317f, 0.442403f, 0.442489f, 0.442575f, 0.442661f,
+ 0.442747f, 0.442833f, 0.442919f, 0.443005f, 0.443091f, 0.443177f, 0.443263f, 0.443349f,
+ 0.443435f, 0.443521f, 0.443607f, 0.443693f, 0.443779f, 0.443864f, 0.443950f, 0.444036f,
+ 0.444122f, 0.444208f, 0.444294f, 0.444380f, 0.444466f, 0.444552f, 0.444637f, 0.444723f,
+ 0.444809f, 0.444895f, 0.444981f, 0.445067f, 0.445153f, 0.445239f, 0.445324f, 0.445410f,
+ 0.445496f, 0.445582f, 0.445668f, 0.445754f, 0.445839f, 0.445925f, 0.446011f, 0.446097f,
+ 0.446183f, 0.446268f, 0.446354f, 0.446440f, 0.446526f, 0.446612f, 0.446697f, 0.446783f,
+ 0.446869f, 0.446955f, 0.447040f, 0.447126f, 0.447212f, 0.447298f, 0.447383f, 0.447469f,
+ 0.447555f, 0.447641f, 0.447726f, 0.447812f, 0.447898f, 0.447983f, 0.448069f, 0.448155f,
+ 0.448241f, 0.448326f, 0.448412f, 0.448498f, 0.448583f, 0.448669f, 0.448755f, 0.448840f,
+ 0.448926f, 0.449012f, 0.449097f, 0.449183f, 0.449269f, 0.449354f, 0.449440f, 0.449526f,
+ 0.449611f, 0.449697f, 0.449783f, 0.449868f, 0.449954f, 0.450039f, 0.450125f, 0.450211f,
+ 0.450296f, 0.450382f, 0.450467f, 0.450553f, 0.450639f, 0.450724f, 0.450810f, 0.450895f,
+ 0.450981f, 0.451067f, 0.451152f, 0.451238f, 0.451323f, 0.451409f, 0.451494f, 0.451580f,
+ 0.451665f, 0.451751f, 0.451836f, 0.451922f, 0.452008f, 0.452093f, 0.452179f, 0.452264f,
+ 0.452350f, 0.452435f, 0.452521f, 0.452606f, 0.452692f, 0.452777f, 0.452863f, 0.452948f,
+ 0.453033f, 0.453119f, 0.453204f, 0.453290f, 0.453375f, 0.453461f, 0.453546f, 0.453632f,
+ 0.453717f, 0.453803f, 0.453888f, 0.453973f, 0.454059f, 0.454144f, 0.454230f, 0.454315f,
+ 0.454400f, 0.454486f, 0.454571f, 0.454657f, 0.454742f, 0.454827f, 0.454913f, 0.454998f,
+ 0.455084f, 0.455169f, 0.455254f, 0.455340f, 0.455425f, 0.455510f, 0.455596f, 0.455681f,
+ 0.455766f, 0.455852f, 0.455937f, 0.456022f, 0.456108f, 0.456193f, 0.456278f, 0.456364f,
+ 0.456449f, 0.456534f, 0.456620f, 0.456705f, 0.456790f, 0.456875f, 0.456961f, 0.457046f,
+ 0.457131f, 0.457217f, 0.457302f, 0.457387f, 0.457472f, 0.457558f, 0.457643f, 0.457728f,
+ 0.457813f, 0.457899f, 0.457984f, 0.458069f, 0.458154f, 0.458239f, 0.458325f, 0.458410f,
+ 0.458495f, 0.458580f, 0.458665f, 0.458751f, 0.458836f, 0.458921f, 0.459006f, 0.459091f,
+ 0.459177f, 0.459262f, 0.459347f, 0.459432f, 0.459517f, 0.459602f, 0.459687f, 0.459773f,
+ 0.459858f, 0.459943f, 0.460028f, 0.460113f, 0.460198f, 0.460283f, 0.460369f, 0.460454f,
+ 0.460539f, 0.460624f, 0.460709f, 0.460794f, 0.460879f, 0.460964f, 0.461049f, 0.461134f,
+ 0.461219f, 0.461304f, 0.461390f, 0.461475f, 0.461560f, 0.461645f, 0.461730f, 0.461815f,
+ 0.461900f, 0.461985f, 0.462070f, 0.462155f, 0.462240f, 0.462325f, 0.462410f, 0.462495f,
+ 0.462580f, 0.462665f, 0.462750f, 0.462835f, 0.462920f, 0.463005f, 0.463090f, 0.463175f,
+ 0.463260f, 0.463345f, 0.463430f, 0.463515f, 0.463600f, 0.463685f, 0.463769f, 0.463854f,
+ 0.463939f, 0.464024f, 0.464109f, 0.464194f, 0.464279f, 0.464364f, 0.464449f, 0.464534f,
+ 0.464619f, 0.464704f, 0.464788f, 0.464873f, 0.464958f, 0.465043f, 0.465128f, 0.465213f,
+ 0.465298f, 0.465383f, 0.465467f, 0.465552f, 0.465637f, 0.465722f, 0.465807f, 0.465892f,
+ 0.465977f, 0.466061f, 0.466146f, 0.466231f, 0.466316f, 0.466401f, 0.466485f, 0.466570f,
+ 0.466655f, 0.466740f, 0.466825f, 0.466909f, 0.466994f, 0.467079f, 0.467164f, 0.467248f,
+ 0.467333f, 0.467418f, 0.467503f, 0.467587f, 0.467672f, 0.467757f, 0.467842f, 0.467926f,
+ 0.468011f, 0.468096f, 0.468181f, 0.468265f, 0.468350f, 0.468435f, 0.468519f, 0.468604f,
+ 0.468689f, 0.468774f, 0.468858f, 0.468943f, 0.469028f, 0.469112f, 0.469197f, 0.469282f,
+ 0.469366f, 0.469451f, 0.469536f, 0.469620f, 0.469705f, 0.469789f, 0.469874f, 0.469959f,
+ 0.470043f, 0.470128f, 0.470213f, 0.470297f, 0.470382f, 0.470466f, 0.470551f, 0.470636f,
+ 0.470720f, 0.470805f, 0.470889f, 0.470974f, 0.471058f, 0.471143f, 0.471228f, 0.471312f,
+ 0.471397f, 0.471481f, 0.471566f, 0.471650f, 0.471735f, 0.471819f, 0.471904f, 0.471988f,
+ 0.472073f, 0.472158f, 0.472242f, 0.472327f, 0.472411f, 0.472496f, 0.472580f, 0.472665f,
+ 0.472749f, 0.472834f, 0.472918f, 0.473002f, 0.473087f, 0.473171f, 0.473256f, 0.473340f,
+ 0.473425f, 0.473509f, 0.473594f, 0.473678f, 0.473763f, 0.473847f, 0.473931f, 0.474016f,
+ 0.474100f, 0.474185f, 0.474269f, 0.474353f, 0.474438f, 0.474522f, 0.474607f, 0.474691f,
+ 0.474775f, 0.474860f, 0.474944f, 0.475029f, 0.475113f, 0.475197f, 0.475282f, 0.475366f,
+ 0.475450f, 0.475535f, 0.475619f, 0.475703f, 0.475788f, 0.475872f, 0.475956f, 0.476041f,
+ 0.476125f, 0.476209f, 0.476294f, 0.476378f, 0.476462f, 0.476546f, 0.476631f, 0.476715f,
+ 0.476799f, 0.476884f, 0.476968f, 0.477052f, 0.477136f, 0.477221f, 0.477305f, 0.477389f,
+ 0.477473f, 0.477558f, 0.477642f, 0.477726f, 0.477810f, 0.477894f, 0.477979f, 0.478063f,
+ 0.478147f, 0.478231f, 0.478315f, 0.478400f, 0.478484f, 0.478568f, 0.478652f, 0.478736f,
+ 0.478821f, 0.478905f, 0.478989f, 0.479073f, 0.479157f, 0.479241f, 0.479325f, 0.479410f,
+ 0.479494f, 0.479578f, 0.479662f, 0.479746f, 0.479830f, 0.479914f, 0.479998f, 0.480083f,
+ 0.480167f, 0.480251f, 0.480335f, 0.480419f, 0.480503f, 0.480587f, 0.480671f, 0.480755f,
+ 0.480839f, 0.480923f, 0.481007f, 0.481091f, 0.481176f, 0.481260f, 0.481344f, 0.481428f,
+ 0.481512f, 0.481596f, 0.481680f, 0.481764f, 0.481848f, 0.481932f, 0.482016f, 0.482100f,
+ 0.482184f, 0.482268f, 0.482352f, 0.482436f, 0.482520f, 0.482604f, 0.482688f, 0.482772f,
+ 0.482856f, 0.482940f, 0.483023f, 0.483107f, 0.483191f, 0.483275f, 0.483359f, 0.483443f,
+ 0.483527f, 0.483611f, 0.483695f, 0.483779f, 0.483863f, 0.483947f, 0.484031f, 0.484114f,
+ 0.484198f, 0.484282f, 0.484366f, 0.484450f, 0.484534f, 0.484618f, 0.484702f, 0.484785f,
+ 0.484869f, 0.484953f, 0.485037f, 0.485121f, 0.485205f, 0.485288f, 0.485372f, 0.485456f,
+ 0.485540f, 0.485624f, 0.485708f, 0.485791f, 0.485875f, 0.485959f, 0.486043f, 0.486126f,
+ 0.486210f, 0.486294f, 0.486378f, 0.486462f, 0.486545f, 0.486629f, 0.486713f, 0.486797f,
+ 0.486880f, 0.486964f, 0.487048f, 0.487132f, 0.487215f, 0.487299f, 0.487383f, 0.487466f,
+ 0.487550f, 0.487634f, 0.487718f, 0.487801f, 0.487885f, 0.487969f, 0.488052f, 0.488136f,
+ 0.488220f, 0.488303f, 0.488387f, 0.488471f, 0.488554f, 0.488638f, 0.488722f, 0.488805f,
+ 0.488889f, 0.488973f, 0.489056f, 0.489140f, 0.489223f, 0.489307f, 0.489391f, 0.489474f,
+ 0.489558f, 0.489641f, 0.489725f, 0.489809f, 0.489892f, 0.489976f, 0.490059f, 0.490143f,
+ 0.490226f, 0.490310f, 0.490394f, 0.490477f, 0.490561f, 0.490644f, 0.490728f, 0.490811f,
+ 0.490895f, 0.490978f, 0.491062f, 0.491145f, 0.491229f, 0.491312f, 0.491396f, 0.491479f,
+ 0.491563f, 0.491646f, 0.491730f, 0.491813f, 0.491897f, 0.491980f, 0.492064f, 0.492147f,
+ 0.492231f, 0.492314f, 0.492398f, 0.492481f, 0.492564f, 0.492648f, 0.492731f, 0.492815f,
+ 0.492898f, 0.492982f, 0.493065f, 0.493148f, 0.493232f, 0.493315f, 0.493399f, 0.493482f,
+ 0.493565f, 0.493649f, 0.493732f, 0.493816f, 0.493899f, 0.493982f, 0.494066f, 0.494149f,
+ 0.494232f, 0.494316f, 0.494399f, 0.494482f, 0.494566f, 0.494649f, 0.494732f, 0.494816f,
+ 0.494899f, 0.494982f, 0.495066f, 0.495149f, 0.495232f, 0.495315f, 0.495399f, 0.495482f,
+ 0.495565f, 0.495649f, 0.495732f, 0.495815f, 0.495898f, 0.495982f, 0.496065f, 0.496148f,
+ 0.496231f, 0.496315f, 0.496398f, 0.496481f, 0.496564f, 0.496647f, 0.496731f, 0.496814f,
+ 0.496897f, 0.496980f, 0.497063f, 0.497147f, 0.497230f, 0.497313f, 0.497396f, 0.497479f,
+ 0.497562f, 0.497646f, 0.497729f, 0.497812f, 0.497895f, 0.497978f, 0.498061f, 0.498145f,
+ 0.498228f, 0.498311f, 0.498394f, 0.498477f, 0.498560f, 0.498643f, 0.498726f, 0.498809f,
+ 0.498893f, 0.498976f, 0.499059f, 0.499142f, 0.499225f, 0.499308f, 0.499391f, 0.499474f,
+ 0.499557f, 0.499640f, 0.499723f, 0.499806f, 0.499889f, 0.499972f, 0.500055f, 0.500138f,
+ 0.500221f, 0.500304f, 0.500387f, 0.500470f, 0.500553f, 0.500636f, 0.500719f, 0.500802f,
+ 0.500885f, 0.500968f, 0.501051f, 0.501134f, 0.501217f, 0.501300f, 0.501383f, 0.501466f,
+ 0.501549f, 0.501632f, 0.501715f, 0.501798f, 0.501881f, 0.501964f, 0.502047f, 0.502130f,
+ 0.502212f, 0.502295f, 0.502378f, 0.502461f, 0.502544f, 0.502627f, 0.502710f, 0.502793f,
+ 0.502876f, 0.502958f, 0.503041f, 0.503124f, 0.503207f, 0.503290f, 0.503373f, 0.503456f,
+ 0.503538f, 0.503621f, 0.503704f, 0.503787f, 0.503870f, 0.503953f, 0.504035f, 0.504118f,
+ 0.504201f, 0.504284f, 0.504366f, 0.504449f, 0.504532f, 0.504615f, 0.504698f, 0.504780f,
+ 0.504863f, 0.504946f, 0.505029f, 0.505111f, 0.505194f, 0.505277f, 0.505360f, 0.505442f,
+ 0.505525f, 0.505608f, 0.505690f, 0.505773f, 0.505856f, 0.505939f, 0.506021f, 0.506104f,
+ 0.506187f, 0.506269f, 0.506352f, 0.506435f, 0.506517f, 0.506600f, 0.506683f, 0.506765f,
+ 0.506848f, 0.506931f, 0.507013f, 0.507096f, 0.507179f, 0.507261f, 0.507344f, 0.507426f,
+ 0.507509f, 0.507592f, 0.507674f, 0.507757f, 0.507839f, 0.507922f, 0.508005f, 0.508087f,
+ 0.508170f, 0.508252f, 0.508335f, 0.508417f, 0.508500f, 0.508583f, 0.508665f, 0.508748f,
+ 0.508830f, 0.508913f, 0.508995f, 0.509078f, 0.509160f, 0.509243f, 0.509325f, 0.509408f,
+ 0.509490f, 0.509573f, 0.509655f, 0.509738f, 0.509820f, 0.509903f, 0.509985f, 0.510068f,
+ 0.510150f, 0.510233f, 0.510315f, 0.510397f, 0.510480f, 0.510562f, 0.510645f, 0.510727f,
+ 0.510810f, 0.510892f, 0.510974f, 0.511057f, 0.511139f, 0.511222f, 0.511304f, 0.511386f,
+ 0.511469f, 0.511551f, 0.511634f, 0.511716f, 0.511798f, 0.511881f, 0.511963f, 0.512045f,
+ 0.512128f, 0.512210f, 0.512292f, 0.512375f, 0.512457f, 0.512539f, 0.512622f, 0.512704f,
+ 0.512786f, 0.512869f, 0.512951f, 0.513033f, 0.513116f, 0.513198f, 0.513280f, 0.513362f,
+ 0.513445f, 0.513527f, 0.513609f, 0.513692f, 0.513774f, 0.513856f, 0.513938f, 0.514021f,
+ 0.514103f, 0.514185f, 0.514267f, 0.514349f, 0.514432f, 0.514514f, 0.514596f, 0.514678f,
+ 0.514760f, 0.514843f, 0.514925f, 0.515007f, 0.515089f, 0.515171f, 0.515254f, 0.515336f,
+ 0.515418f, 0.515500f, 0.515582f, 0.515664f, 0.515746f, 0.515829f, 0.515911f, 0.515993f,
+ 0.516075f, 0.516157f, 0.516239f, 0.516321f, 0.516403f, 0.516486f, 0.516568f, 0.516650f,
+ 0.516732f, 0.516814f, 0.516896f, 0.516978f, 0.517060f, 0.517142f, 0.517224f, 0.517306f,
+ 0.517388f, 0.517470f, 0.517552f, 0.517634f, 0.517716f, 0.517798f, 0.517880f, 0.517963f,
+ 0.518045f, 0.518126f, 0.518209f, 0.518291f, 0.518372f, 0.518454f, 0.518536f, 0.518618f,
+ 0.518700f, 0.518782f, 0.518864f, 0.518946f, 0.519028f, 0.519110f, 0.519192f, 0.519274f,
+ 0.519356f, 0.519438f, 0.519520f, 0.519602f, 0.519684f, 0.519766f, 0.519848f, 0.519929f,
+ 0.520011f, 0.520093f, 0.520175f, 0.520257f, 0.520339f, 0.520421f, 0.520503f, 0.520584f,
+ 0.520666f, 0.520748f, 0.520830f, 0.520912f, 0.520994f, 0.521075f, 0.521157f, 0.521239f,
+ 0.521321f, 0.521403f, 0.521485f, 0.521566f, 0.521648f, 0.521730f, 0.521812f, 0.521894f,
+ 0.521975f, 0.522057f, 0.522139f, 0.522221f, 0.522302f, 0.522384f, 0.522466f, 0.522548f,
+ 0.522629f, 0.522711f, 0.522793f, 0.522875f, 0.522956f, 0.523038f, 0.523120f, 0.523201f,
+ 0.523283f, 0.523365f, 0.523447f, 0.523528f, 0.523610f, 0.523692f, 0.523773f, 0.523855f,
+ 0.523937f, 0.524018f, 0.524100f, 0.524181f, 0.524263f, 0.524345f, 0.524426f, 0.524508f,
+ 0.524590f, 0.524671f, 0.524753f, 0.524835f, 0.524916f, 0.524998f, 0.525079f, 0.525161f,
+ 0.525243f, 0.525324f, 0.525406f, 0.525487f, 0.525569f, 0.525650f, 0.525732f, 0.525813f,
+ 0.525895f, 0.525977f, 0.526058f, 0.526140f, 0.526221f, 0.526303f, 0.526384f, 0.526466f,
+ 0.526547f, 0.526629f, 0.526710f, 0.526792f, 0.526873f, 0.526955f, 0.527036f, 0.527118f,
+ 0.527199f, 0.527281f, 0.527362f, 0.527444f, 0.527525f, 0.527606f, 0.527688f, 0.527769f,
+ 0.527851f, 0.527932f, 0.528014f, 0.528095f, 0.528176f, 0.528258f, 0.528339f, 0.528421f,
+ 0.528502f, 0.528583f, 0.528665f, 0.528746f, 0.528828f, 0.528909f, 0.528990f, 0.529072f,
+ 0.529153f, 0.529234f, 0.529316f, 0.529397f, 0.529478f, 0.529560f, 0.529641f, 0.529722f,
+ 0.529804f, 0.529885f, 0.529966f, 0.530048f, 0.530129f, 0.530210f, 0.530291f, 0.530373f,
+ 0.530454f, 0.530535f, 0.530617f, 0.530698f, 0.530779f, 0.530860f, 0.530942f, 0.531023f,
+ 0.531104f, 0.531185f, 0.531266f, 0.531348f, 0.531429f, 0.531510f, 0.531591f, 0.531673f,
+ 0.531754f, 0.531835f, 0.531916f, 0.531997f, 0.532078f, 0.532160f, 0.532241f, 0.532322f,
+ 0.532403f, 0.532484f, 0.532565f, 0.532647f, 0.532728f, 0.532809f, 0.532890f, 0.532971f,
+ 0.533052f, 0.533133f, 0.533214f, 0.533296f, 0.533377f, 0.533458f, 0.533539f, 0.533620f,
+ 0.533701f, 0.533782f, 0.533863f, 0.533944f, 0.534025f, 0.534106f, 0.534187f, 0.534268f,
+ 0.534349f, 0.534431f, 0.534512f, 0.534593f, 0.534674f, 0.534755f, 0.534836f, 0.534917f,
+ 0.534998f, 0.535079f, 0.535160f, 0.535241f, 0.535322f, 0.535403f, 0.535484f, 0.535564f,
+ 0.535645f, 0.535726f, 0.535807f, 0.535888f, 0.535969f, 0.536050f, 0.536131f, 0.536212f,
+ 0.536293f, 0.536374f, 0.536455f, 0.536536f, 0.536617f, 0.536698f, 0.536778f, 0.536859f,
+ 0.536940f, 0.537021f, 0.537102f, 0.537183f, 0.537264f, 0.537345f, 0.537425f, 0.537506f,
+ 0.537587f, 0.537668f, 0.537749f, 0.537830f, 0.537910f, 0.537991f, 0.538072f, 0.538153f,
+ 0.538234f, 0.538314f, 0.538395f, 0.538476f, 0.538557f, 0.538638f, 0.538718f, 0.538799f,
+ 0.538880f, 0.538961f, 0.539041f, 0.539122f, 0.539203f, 0.539284f, 0.539364f, 0.539445f,
+ 0.539526f, 0.539607f, 0.539687f, 0.539768f, 0.539849f, 0.539929f, 0.540010f, 0.540091f,
+ 0.540171f, 0.540252f, 0.540333f, 0.540413f, 0.540494f, 0.540575f, 0.540655f, 0.540736f,
+ 0.540817f, 0.540897f, 0.540978f, 0.541059f, 0.541139f, 0.541220f, 0.541301f, 0.541381f,
+ 0.541462f, 0.541542f, 0.541623f, 0.541704f, 0.541784f, 0.541865f, 0.541945f, 0.542026f,
+ 0.542106f, 0.542187f, 0.542268f, 0.542348f, 0.542429f, 0.542509f, 0.542590f, 0.542670f,
+ 0.542751f, 0.542831f, 0.542912f, 0.542992f, 0.543073f, 0.543153f, 0.543234f, 0.543314f,
+ 0.543395f, 0.543475f, 0.543556f, 0.543636f, 0.543717f, 0.543797f, 0.543878f, 0.543958f,
+ 0.544039f, 0.544119f, 0.544199f, 0.544280f, 0.544360f, 0.544441f, 0.544521f, 0.544602f,
+ 0.544682f, 0.544762f, 0.544843f, 0.544923f, 0.545003f, 0.545084f, 0.545164f, 0.545245f,
+ 0.545325f, 0.545405f, 0.545486f, 0.545566f, 0.545646f, 0.545727f, 0.545807f, 0.545887f,
+ 0.545968f, 0.546048f, 0.546128f, 0.546209f, 0.546289f, 0.546369f, 0.546450f, 0.546530f,
+ 0.546610f, 0.546690f, 0.546771f, 0.546851f, 0.546931f, 0.547011f, 0.547092f, 0.547172f,
+ 0.547252f, 0.547333f, 0.547413f, 0.547493f, 0.547573f, 0.547653f, 0.547734f, 0.547814f,
+ 0.547894f, 0.547974f, 0.548054f, 0.548135f, 0.548215f, 0.548295f, 0.548375f, 0.548455f,
+ 0.548536f, 0.548616f, 0.548696f, 0.548776f, 0.548856f, 0.548936f, 0.549016f, 0.549097f,
+ 0.549177f, 0.549257f, 0.549337f, 0.549417f, 0.549497f, 0.549577f, 0.549657f, 0.549737f,
+ 0.549818f, 0.549898f, 0.549978f, 0.550058f, 0.550138f, 0.550218f, 0.550298f, 0.550378f,
+ 0.550458f, 0.550538f, 0.550618f, 0.550698f, 0.550778f, 0.550858f, 0.550938f, 0.551018f,
+ 0.551098f, 0.551178f, 0.551258f, 0.551338f, 0.551418f, 0.551498f, 0.551578f, 0.551658f,
+ 0.551738f, 0.551818f, 0.551898f, 0.551978f, 0.552058f, 0.552138f, 0.552218f, 0.552298f,
+ 0.552378f, 0.552457f, 0.552537f, 0.552617f, 0.552697f, 0.552777f, 0.552857f, 0.552937f,
+ 0.553017f, 0.553097f, 0.553176f, 0.553256f, 0.553336f, 0.553416f, 0.553496f, 0.553576f,
+ 0.553656f, 0.553735f, 0.553815f, 0.553895f, 0.553975f, 0.554055f, 0.554134f, 0.554214f,
+ 0.554294f, 0.554374f, 0.554454f, 0.554533f, 0.554613f, 0.554693f, 0.554773f, 0.554853f,
+ 0.554932f, 0.555012f, 0.555092f, 0.555172f, 0.555251f, 0.555331f, 0.555411f, 0.555490f,
+ 0.555570f, 0.555650f, 0.555730f, 0.555809f, 0.555889f, 0.555969f, 0.556048f, 0.556128f,
+ 0.556208f, 0.556287f, 0.556367f, 0.556447f, 0.556526f, 0.556606f, 0.556686f, 0.556765f,
+ 0.556845f, 0.556925f, 0.557004f, 0.557084f, 0.557164f, 0.557243f, 0.557323f, 0.557402f,
+ 0.557482f, 0.557562f, 0.557641f, 0.557721f, 0.557800f, 0.557880f, 0.557959f, 0.558039f,
+ 0.558119f, 0.558198f, 0.558278f, 0.558357f, 0.558437f, 0.558516f, 0.558596f, 0.558675f,
+ 0.558755f, 0.558834f, 0.558914f, 0.558993f, 0.559073f, 0.559152f, 0.559232f, 0.559311f,
+ 0.559391f, 0.559470f, 0.559550f, 0.559629f, 0.559709f, 0.559788f, 0.559867f, 0.559947f,
+ 0.560026f, 0.560106f, 0.560185f, 0.560265f, 0.560344f, 0.560423f, 0.560503f, 0.560582f,
+ 0.560662f, 0.560741f, 0.560820f, 0.560900f, 0.560979f, 0.561058f, 0.561138f, 0.561217f,
+ 0.561297f, 0.561376f, 0.561455f, 0.561535f, 0.561614f, 0.561693f, 0.561773f, 0.561852f,
+ 0.561931f, 0.562010f, 0.562090f, 0.562169f, 0.562248f, 0.562328f, 0.562407f, 0.562486f,
+ 0.562565f, 0.562645f, 0.562724f, 0.562803f, 0.562882f, 0.562962f, 0.563041f, 0.563120f,
+ 0.563199f, 0.563279f, 0.563358f, 0.563437f, 0.563516f, 0.563595f, 0.563675f, 0.563754f,
+ 0.563833f, 0.563912f, 0.563991f, 0.564070f, 0.564150f, 0.564229f, 0.564308f, 0.564387f,
+ 0.564466f, 0.564545f, 0.564624f, 0.564704f, 0.564783f, 0.564862f, 0.564941f, 0.565020f,
+ 0.565099f, 0.565178f, 0.565257f, 0.565336f, 0.565416f, 0.565495f, 0.565574f, 0.565653f,
+ 0.565732f, 0.565811f, 0.565890f, 0.565969f, 0.566048f, 0.566127f, 0.566206f, 0.566285f,
+ 0.566364f, 0.566443f, 0.566522f, 0.566601f, 0.566680f, 0.566759f, 0.566838f, 0.566917f,
+ 0.566996f, 0.567075f, 0.567154f, 0.567233f, 0.567312f, 0.567391f, 0.567470f, 0.567549f,
+ 0.567628f, 0.567707f, 0.567786f, 0.567864f, 0.567943f, 0.568022f, 0.568101f, 0.568180f,
+ 0.568259f, 0.568338f, 0.568417f, 0.568496f, 0.568574f, 0.568653f, 0.568732f, 0.568811f,
+ 0.568890f, 0.568969f, 0.569048f, 0.569126f, 0.569205f, 0.569284f, 0.569363f, 0.569442f,
+ 0.569521f, 0.569599f, 0.569678f, 0.569757f, 0.569836f, 0.569914f, 0.569993f, 0.570072f,
+ 0.570151f, 0.570230f, 0.570308f, 0.570387f, 0.570466f, 0.570545f, 0.570623f, 0.570702f,
+ 0.570781f, 0.570859f, 0.570938f, 0.571017f, 0.571096f, 0.571174f, 0.571253f, 0.571332f,
+ 0.571410f, 0.571489f, 0.571568f, 0.571646f, 0.571725f, 0.571804f, 0.571882f, 0.571961f,
+ 0.572040f, 0.572118f, 0.572197f, 0.572276f, 0.572354f, 0.572433f, 0.572511f, 0.572590f,
+ 0.572669f, 0.572747f, 0.572826f, 0.572904f, 0.572983f, 0.573061f, 0.573140f, 0.573219f,
+ 0.573297f, 0.573376f, 0.573454f, 0.573533f, 0.573611f, 0.573690f, 0.573768f, 0.573847f,
+ 0.573925f, 0.574004f, 0.574082f, 0.574161f, 0.574239f, 0.574318f, 0.574396f, 0.574475f,
+ 0.574553f, 0.574632f, 0.574710f, 0.574789f, 0.574867f, 0.574946f, 0.575024f, 0.575103f,
+ 0.575181f, 0.575259f, 0.575338f, 0.575416f, 0.575495f, 0.575573f, 0.575651f, 0.575730f,
+ 0.575808f, 0.575887f, 0.575965f, 0.576043f, 0.576122f, 0.576200f, 0.576278f, 0.576357f,
+ 0.576435f, 0.576513f, 0.576592f, 0.576670f, 0.576748f, 0.576827f, 0.576905f, 0.576983f,
+ 0.577062f, 0.577140f, 0.577218f, 0.577297f, 0.577375f, 0.577453f, 0.577531f, 0.577610f,
+ 0.577688f, 0.577766f, 0.577844f, 0.577923f, 0.578001f, 0.578079f, 0.578157f, 0.578236f,
+ 0.578314f, 0.578392f, 0.578470f, 0.578548f, 0.578627f, 0.578705f, 0.578783f, 0.578861f,
+ 0.578939f, 0.579018f, 0.579096f, 0.579174f, 0.579252f, 0.579330f, 0.579408f, 0.579486f,
+ 0.579565f, 0.579643f, 0.579721f, 0.579799f, 0.579877f, 0.579955f, 0.580033f, 0.580111f,
+ 0.580189f, 0.580267f, 0.580346f, 0.580424f, 0.580502f, 0.580580f, 0.580658f, 0.580736f,
+ 0.580814f, 0.580892f, 0.580970f, 0.581048f, 0.581126f, 0.581204f, 0.581282f, 0.581360f,
+ 0.581438f, 0.581516f, 0.581594f, 0.581672f, 0.581750f, 0.581828f, 0.581906f, 0.581984f,
+ 0.582062f, 0.582140f, 0.582218f, 0.582296f, 0.582374f, 0.582452f, 0.582530f, 0.582608f,
+ 0.582685f, 0.582763f, 0.582841f, 0.582919f, 0.582997f, 0.583075f, 0.583153f, 0.583231f,
+ 0.583309f, 0.583387f, 0.583464f, 0.583542f, 0.583620f, 0.583698f, 0.583776f, 0.583854f,
+ 0.583931f, 0.584009f, 0.584087f, 0.584165f, 0.584243f, 0.584321f, 0.584398f, 0.584476f,
+ 0.584554f, 0.584632f, 0.584710f, 0.584787f, 0.584865f, 0.584943f, 0.585021f, 0.585098f,
+ 0.585176f, 0.585254f, 0.585332f, 0.585409f, 0.585487f, 0.585565f, 0.585642f, 0.585720f,
+ 0.585798f, 0.585876f, 0.585953f, 0.586031f, 0.586109f, 0.586186f, 0.586264f, 0.586342f,
+ 0.586419f, 0.586497f, 0.586575f, 0.586652f, 0.586730f, 0.586808f, 0.586885f, 0.586963f,
+ 0.587040f, 0.587118f, 0.587196f, 0.587273f, 0.587351f, 0.587428f, 0.587506f, 0.587584f,
+ 0.587661f, 0.587739f, 0.587816f, 0.587894f, 0.587971f, 0.588049f, 0.588126f, 0.588204f,
+ 0.588282f, 0.588359f, 0.588437f, 0.588514f, 0.588592f, 0.588669f, 0.588747f, 0.588824f,
+ 0.588902f, 0.588979f, 0.589057f, 0.589134f, 0.589212f, 0.589289f, 0.589366f, 0.589444f,
+ 0.589521f, 0.589599f, 0.589676f, 0.589754f, 0.589831f, 0.589908f, 0.589986f, 0.590063f,
+ 0.590141f, 0.590218f, 0.590295f, 0.590373f, 0.590450f, 0.590528f, 0.590605f, 0.590682f,
+ 0.590760f, 0.590837f, 0.590914f, 0.590992f, 0.591069f, 0.591146f, 0.591224f, 0.591301f,
+ 0.591378f, 0.591456f, 0.591533f, 0.591610f, 0.591688f, 0.591765f, 0.591842f, 0.591919f,
+ 0.591997f, 0.592074f, 0.592151f, 0.592228f, 0.592306f, 0.592383f, 0.592460f, 0.592537f,
+ 0.592615f, 0.592692f, 0.592769f, 0.592846f, 0.592924f, 0.593001f, 0.593078f, 0.593155f,
+ 0.593232f, 0.593309f, 0.593387f, 0.593464f, 0.593541f, 0.593618f, 0.593695f, 0.593772f,
+ 0.593850f, 0.593927f, 0.594004f, 0.594081f, 0.594158f, 0.594235f, 0.594312f, 0.594389f,
+ 0.594467f, 0.594544f, 0.594621f, 0.594698f, 0.594775f, 0.594852f, 0.594929f, 0.595006f,
+ 0.595083f, 0.595160f, 0.595237f, 0.595314f, 0.595391f, 0.595468f, 0.595545f, 0.595622f,
+ 0.595699f, 0.595776f, 0.595853f, 0.595930f, 0.596007f, 0.596084f, 0.596161f, 0.596238f,
+ 0.596315f, 0.596392f, 0.596469f, 0.596546f, 0.596623f, 0.596700f, 0.596777f, 0.596854f,
+ 0.596931f, 0.597008f, 0.597085f, 0.597161f, 0.597238f, 0.597315f, 0.597392f, 0.597469f,
+ 0.597546f, 0.597623f, 0.597700f, 0.597776f, 0.597853f, 0.597930f, 0.598007f, 0.598084f,
+ 0.598161f, 0.598238f, 0.598314f, 0.598391f, 0.598468f, 0.598545f, 0.598622f, 0.598698f,
+ 0.598775f, 0.598852f, 0.598929f, 0.599006f, 0.599082f, 0.599159f, 0.599236f, 0.599313f,
+ 0.599389f, 0.599466f, 0.599543f, 0.599620f, 0.599696f, 0.599773f, 0.599850f, 0.599926f,
+ 0.600003f, 0.600080f, 0.600156f, 0.600233f, 0.600310f, 0.600387f, 0.600463f, 0.600540f,
+ 0.600616f, 0.600693f, 0.600770f, 0.600846f, 0.600923f, 0.601000f, 0.601076f, 0.601153f,
+ 0.601230f, 0.601306f, 0.601383f, 0.601459f, 0.601536f, 0.601613f, 0.601689f, 0.601766f,
+ 0.601842f, 0.601919f, 0.601995f, 0.602072f, 0.602148f, 0.602225f, 0.602302f, 0.602378f,
+ 0.602455f, 0.602531f, 0.602608f, 0.602684f, 0.602761f, 0.602837f, 0.602914f, 0.602990f,
+ 0.603067f, 0.603143f, 0.603220f, 0.603296f, 0.603372f, 0.603449f, 0.603525f, 0.603602f,
+ 0.603678f, 0.603755f, 0.603831f, 0.603908f, 0.603984f, 0.604060f, 0.604137f, 0.604213f,
+ 0.604290f, 0.604366f, 0.604442f, 0.604519f, 0.604595f, 0.604671f, 0.604748f, 0.604824f,
+ 0.604900f, 0.604977f, 0.605053f, 0.605129f, 0.605206f, 0.605282f, 0.605358f, 0.605435f,
+ 0.605511f, 0.605587f, 0.605664f, 0.605740f, 0.605816f, 0.605892f, 0.605969f, 0.606045f,
+ 0.606121f, 0.606198f, 0.606274f, 0.606350f, 0.606426f, 0.606502f, 0.606579f, 0.606655f,
+ 0.606731f, 0.606807f, 0.606884f, 0.606960f, 0.607036f, 0.607112f, 0.607188f, 0.607264f,
+ 0.607341f, 0.607417f, 0.607493f, 0.607569f, 0.607645f, 0.607721f, 0.607798f, 0.607874f,
+ 0.607950f, 0.608026f, 0.608102f, 0.608178f, 0.608254f, 0.608330f, 0.608406f, 0.608482f,
+ 0.608559f, 0.608635f, 0.608711f, 0.608787f, 0.608863f, 0.608939f, 0.609015f, 0.609091f,
+ 0.609167f, 0.609243f, 0.609319f, 0.609395f, 0.609471f, 0.609547f, 0.609623f, 0.609699f,
+ 0.609775f, 0.609851f, 0.609927f, 0.610003f, 0.610079f, 0.610155f, 0.610231f, 0.610307f,
+ 0.610383f, 0.610459f, 0.610535f, 0.610611f, 0.610687f, 0.610762f, 0.610838f, 0.610914f,
+ 0.610990f, 0.611066f, 0.611142f, 0.611218f, 0.611294f, 0.611370f, 0.611445f, 0.611521f,
+ 0.611597f, 0.611673f, 0.611749f, 0.611825f, 0.611901f, 0.611976f, 0.612052f, 0.612128f,
+ 0.612204f, 0.612280f, 0.612355f, 0.612431f, 0.612507f, 0.612583f, 0.612659f, 0.612734f,
+ 0.612810f, 0.612886f, 0.612962f, 0.613037f, 0.613113f, 0.613189f, 0.613265f, 0.613340f,
+ 0.613416f, 0.613492f, 0.613567f, 0.613643f, 0.613719f, 0.613795f, 0.613870f, 0.613946f,
+ 0.614022f, 0.614097f, 0.614173f, 0.614249f, 0.614324f, 0.614400f, 0.614475f, 0.614551f,
+ 0.614627f, 0.614702f, 0.614778f, 0.614854f, 0.614929f, 0.615005f, 0.615080f, 0.615156f,
+ 0.615232f, 0.615307f, 0.615383f, 0.615458f, 0.615534f, 0.615609f, 0.615685f, 0.615761f,
+ 0.615836f, 0.615912f, 0.615987f, 0.616063f, 0.616138f, 0.616214f, 0.616289f, 0.616365f,
+ 0.616440f, 0.616516f, 0.616591f, 0.616667f, 0.616742f, 0.616818f, 0.616893f, 0.616968f,
+ 0.617044f, 0.617119f, 0.617195f, 0.617270f, 0.617346f, 0.617421f, 0.617496f, 0.617572f,
+ 0.617647f, 0.617723f, 0.617798f, 0.617873f, 0.617949f, 0.618024f, 0.618100f, 0.618175f,
+ 0.618250f, 0.618326f, 0.618401f, 0.618476f, 0.618552f, 0.618627f, 0.618702f, 0.618778f,
+ 0.618853f, 0.618928f, 0.619004f, 0.619079f, 0.619154f, 0.619229f, 0.619305f, 0.619380f,
+ 0.619455f, 0.619531f, 0.619606f, 0.619681f, 0.619756f, 0.619832f, 0.619907f, 0.619982f,
+ 0.620057f, 0.620132f, 0.620208f, 0.620283f, 0.620358f, 0.620433f, 0.620508f, 0.620584f,
+ 0.620659f, 0.620734f, 0.620809f, 0.620884f, 0.620959f, 0.621035f, 0.621110f, 0.621185f,
+ 0.621260f, 0.621335f, 0.621410f, 0.621485f, 0.621560f, 0.621636f, 0.621711f, 0.621786f,
+ 0.621861f, 0.621936f, 0.622011f, 0.622086f, 0.622161f, 0.622236f, 0.622311f, 0.622386f,
+ 0.622461f, 0.622536f, 0.622611f, 0.622686f, 0.622761f, 0.622836f, 0.622911f, 0.622986f,
+ 0.623061f, 0.623136f, 0.623211f, 0.623286f, 0.623361f, 0.623436f, 0.623511f, 0.623586f,
+ 0.623661f, 0.623736f, 0.623811f, 0.623886f, 0.623961f, 0.624036f, 0.624111f, 0.624186f,
+ 0.624260f, 0.624335f, 0.624410f, 0.624485f, 0.624560f, 0.624635f, 0.624710f, 0.624785f,
+ 0.624860f, 0.624934f, 0.625009f, 0.625084f, 0.625159f, 0.625234f, 0.625309f, 0.625383f,
+ 0.625458f, 0.625533f, 0.625608f, 0.625683f, 0.625757f, 0.625832f, 0.625907f, 0.625982f,
+ 0.626056f, 0.626131f, 0.626206f, 0.626281f, 0.626355f, 0.626430f, 0.626505f, 0.626580f,
+ 0.626654f, 0.626729f, 0.626804f, 0.626878f, 0.626953f, 0.627028f, 0.627102f, 0.627177f,
+ 0.627252f, 0.627326f, 0.627401f, 0.627476f, 0.627550f, 0.627625f, 0.627700f, 0.627774f,
+ 0.627849f, 0.627924f, 0.627998f, 0.628073f, 0.628147f, 0.628222f, 0.628297f, 0.628371f,
+ 0.628446f, 0.628520f, 0.628595f, 0.628669f, 0.628744f, 0.628819f, 0.628893f, 0.628968f,
+ 0.629042f, 0.629117f, 0.629191f, 0.629266f, 0.629340f, 0.629415f, 0.629489f, 0.629564f,
+ 0.629638f, 0.629713f, 0.629787f, 0.629862f, 0.629936f, 0.630011f, 0.630085f, 0.630159f,
+ 0.630234f, 0.630308f, 0.630383f, 0.630457f, 0.630532f, 0.630606f, 0.630680f, 0.630755f,
+ 0.630829f, 0.630904f, 0.630978f, 0.631052f, 0.631127f, 0.631201f, 0.631275f, 0.631350f,
+ 0.631424f, 0.631499f, 0.631573f, 0.631647f, 0.631721f, 0.631796f, 0.631870f, 0.631944f,
+ 0.632019f, 0.632093f, 0.632167f, 0.632242f, 0.632316f, 0.632390f, 0.632464f, 0.632539f,
+ 0.632613f, 0.632687f, 0.632761f, 0.632836f, 0.632910f, 0.632984f, 0.633058f, 0.633133f,
+ 0.633207f, 0.633281f, 0.633355f, 0.633429f, 0.633504f, 0.633578f, 0.633652f, 0.633726f,
+ 0.633800f, 0.633874f, 0.633949f, 0.634023f, 0.634097f, 0.634171f, 0.634245f, 0.634319f,
+ 0.634393f, 0.634467f, 0.634542f, 0.634616f, 0.634690f, 0.634764f, 0.634838f, 0.634912f,
+ 0.634986f, 0.635060f, 0.635134f, 0.635208f, 0.635282f, 0.635356f, 0.635430f, 0.635504f,
+ 0.635578f, 0.635652f, 0.635726f, 0.635800f, 0.635874f, 0.635948f, 0.636022f, 0.636096f,
+ 0.636170f, 0.636244f, 0.636318f, 0.636392f, 0.636466f, 0.636540f, 0.636614f, 0.636688f,
+ 0.636762f, 0.636836f, 0.636910f, 0.636984f, 0.637057f, 0.637131f, 0.637205f, 0.637279f,
+ 0.637353f, 0.637427f, 0.637501f, 0.637575f, 0.637649f, 0.637722f, 0.637796f, 0.637870f,
+ 0.637944f, 0.638018f, 0.638092f, 0.638165f, 0.638239f, 0.638313f, 0.638387f, 0.638461f,
+ 0.638534f, 0.638608f, 0.638682f, 0.638756f, 0.638829f, 0.638903f, 0.638977f, 0.639051f,
+ 0.639124f, 0.639198f, 0.639272f, 0.639346f, 0.639419f, 0.639493f, 0.639567f, 0.639640f,
+ 0.639714f, 0.639788f, 0.639862f, 0.639935f, 0.640009f, 0.640083f, 0.640156f, 0.640230f,
+ 0.640303f, 0.640377f, 0.640451f, 0.640524f, 0.640598f, 0.640672f, 0.640745f, 0.640819f,
+ 0.640892f, 0.640966f, 0.641040f, 0.641113f, 0.641187f, 0.641260f, 0.641334f, 0.641407f,
+ 0.641481f, 0.641555f, 0.641628f, 0.641702f, 0.641775f, 0.641849f, 0.641922f, 0.641996f,
+ 0.642069f, 0.642143f, 0.642216f, 0.642290f, 0.642363f, 0.642437f, 0.642510f, 0.642584f,
+ 0.642657f, 0.642730f, 0.642804f, 0.642877f, 0.642951f, 0.643024f, 0.643098f, 0.643171f,
+ 0.643245f, 0.643318f, 0.643391f, 0.643465f, 0.643538f, 0.643611f, 0.643685f, 0.643758f,
+ 0.643832f, 0.643905f, 0.643978f, 0.644052f, 0.644125f, 0.644198f, 0.644272f, 0.644345f,
+ 0.644418f, 0.644492f, 0.644565f, 0.644638f, 0.644711f, 0.644785f, 0.644858f, 0.644931f,
+ 0.645005f, 0.645078f, 0.645151f, 0.645224f, 0.645298f, 0.645371f, 0.645444f, 0.645517f,
+ 0.645590f, 0.645664f, 0.645737f, 0.645810f, 0.645883f, 0.645956f, 0.646030f, 0.646103f,
+ 0.646176f, 0.646249f, 0.646322f, 0.646396f, 0.646469f, 0.646542f, 0.646615f, 0.646688f,
+ 0.646761f, 0.646834f, 0.646907f, 0.646981f, 0.647054f, 0.647127f, 0.647200f, 0.647273f,
+ 0.647346f, 0.647419f, 0.647492f, 0.647565f, 0.647638f, 0.647711f, 0.647784f, 0.647857f,
+ 0.647930f, 0.648003f, 0.648076f, 0.648149f, 0.648222f, 0.648295f, 0.648368f, 0.648441f,
+ 0.648514f, 0.648587f, 0.648660f, 0.648733f, 0.648806f, 0.648879f, 0.648952f, 0.649025f,
+ 0.649098f, 0.649171f, 0.649244f, 0.649317f, 0.649390f, 0.649463f, 0.649536f, 0.649608f,
+ 0.649681f, 0.649754f, 0.649827f, 0.649900f, 0.649973f, 0.650046f, 0.650119f, 0.650191f,
+ 0.650264f, 0.650337f, 0.650410f, 0.650483f, 0.650555f, 0.650628f, 0.650701f, 0.650774f,
+ 0.650847f, 0.650919f, 0.650992f, 0.651065f, 0.651138f, 0.651211f, 0.651283f, 0.651356f,
+ 0.651429f, 0.651502f, 0.651574f, 0.651647f, 0.651720f, 0.651792f, 0.651865f, 0.651938f,
+ 0.652011f, 0.652083f, 0.652156f, 0.652229f, 0.652301f, 0.652374f, 0.652447f, 0.652519f,
+ 0.652592f, 0.652665f, 0.652737f, 0.652810f, 0.652882f, 0.652955f, 0.653028f, 0.653100f,
+ 0.653173f, 0.653245f, 0.653318f, 0.653391f, 0.653463f, 0.653536f, 0.653608f, 0.653681f,
+ 0.653753f, 0.653826f, 0.653899f, 0.653971f, 0.654044f, 0.654116f, 0.654189f, 0.654261f,
+ 0.654334f, 0.654406f, 0.654479f, 0.654551f, 0.654624f, 0.654696f, 0.654769f, 0.654841f,
+ 0.654913f, 0.654986f, 0.655058f, 0.655131f, 0.655203f, 0.655276f, 0.655348f, 0.655420f,
+ 0.655493f, 0.655565f, 0.655638f, 0.655710f, 0.655782f, 0.655855f, 0.655927f, 0.656000f,
+ 0.656072f, 0.656144f, 0.656217f, 0.656289f, 0.656361f, 0.656434f, 0.656506f, 0.656578f,
+ 0.656651f, 0.656723f, 0.656795f, 0.656867f, 0.656940f, 0.657012f, 0.657084f, 0.657157f,
+ 0.657229f, 0.657301f, 0.657373f, 0.657446f, 0.657518f, 0.657590f, 0.657662f, 0.657734f,
+ 0.657807f, 0.657879f, 0.657951f, 0.658023f, 0.658095f, 0.658168f, 0.658240f, 0.658312f,
+ 0.658384f, 0.658456f, 0.658529f, 0.658601f, 0.658673f, 0.658745f, 0.658817f, 0.658889f,
+ 0.658961f, 0.659033f, 0.659105f, 0.659178f, 0.659250f, 0.659322f, 0.659394f, 0.659466f,
+ 0.659538f, 0.659610f, 0.659682f, 0.659754f, 0.659826f, 0.659898f, 0.659970f, 0.660042f,
+ 0.660114f, 0.660186f, 0.660258f, 0.660330f, 0.660402f, 0.660474f, 0.660546f, 0.660618f,
+ 0.660690f, 0.660762f, 0.660834f, 0.660906f, 0.660978f, 0.661050f, 0.661122f, 0.661194f,
+ 0.661266f, 0.661338f, 0.661410f, 0.661482f, 0.661553f, 0.661625f, 0.661697f, 0.661769f,
+ 0.661841f, 0.661913f, 0.661985f, 0.662057f, 0.662128f, 0.662200f, 0.662272f, 0.662344f,
+ 0.662416f, 0.662488f, 0.662559f, 0.662631f, 0.662703f, 0.662775f, 0.662847f, 0.662918f,
+ 0.662990f, 0.663062f, 0.663134f, 0.663205f, 0.663277f, 0.663349f, 0.663421f, 0.663492f,
+ 0.663564f, 0.663636f, 0.663708f, 0.663779f, 0.663851f, 0.663923f, 0.663994f, 0.664066f,
+ 0.664138f, 0.664209f, 0.664281f, 0.664353f, 0.664424f, 0.664496f, 0.664568f, 0.664639f,
+ 0.664711f, 0.664783f, 0.664854f, 0.664926f, 0.664997f, 0.665069f, 0.665141f, 0.665212f,
+ 0.665284f, 0.665355f, 0.665427f, 0.665498f, 0.665570f, 0.665642f, 0.665713f, 0.665785f,
+ 0.665856f, 0.665928f, 0.665999f, 0.666071f, 0.666142f, 0.666214f, 0.666285f, 0.666357f,
+ 0.666428f, 0.666500f, 0.666571f, 0.666643f, 0.666714f, 0.666786f, 0.666857f, 0.666928f,
+ 0.667000f, 0.667071f, 0.667143f, 0.667214f, 0.667286f, 0.667357f, 0.667428f, 0.667500f,
+ 0.667571f, 0.667643f, 0.667714f, 0.667785f, 0.667857f, 0.667928f, 0.667999f, 0.668071f,
+ 0.668142f, 0.668213f, 0.668285f, 0.668356f, 0.668427f, 0.668499f, 0.668570f, 0.668641f,
+ 0.668712f, 0.668784f, 0.668855f, 0.668926f, 0.668998f, 0.669069f, 0.669140f, 0.669211f,
+ 0.669283f, 0.669354f, 0.669425f, 0.669496f, 0.669567f, 0.669639f, 0.669710f, 0.669781f,
+ 0.669852f, 0.669923f, 0.669995f, 0.670066f, 0.670137f, 0.670208f, 0.670279f, 0.670350f,
+ 0.670422f, 0.670493f, 0.670564f, 0.670635f, 0.670706f, 0.670777f, 0.670848f, 0.670919f,
+ 0.670990f, 0.671062f, 0.671133f, 0.671204f, 0.671275f, 0.671346f, 0.671417f, 0.671488f,
+ 0.671559f, 0.671630f, 0.671701f, 0.671772f, 0.671843f, 0.671914f, 0.671985f, 0.672056f,
+ 0.672127f, 0.672198f, 0.672269f, 0.672340f, 0.672411f, 0.672482f, 0.672553f, 0.672624f,
+ 0.672695f, 0.672766f, 0.672837f, 0.672908f, 0.672978f, 0.673049f, 0.673120f, 0.673191f,
+ 0.673262f, 0.673333f, 0.673404f, 0.673475f, 0.673546f, 0.673616f, 0.673687f, 0.673758f,
+ 0.673829f, 0.673900f, 0.673971f, 0.674042f, 0.674112f, 0.674183f, 0.674254f, 0.674325f,
+ 0.674396f, 0.674466f, 0.674537f, 0.674608f, 0.674679f, 0.674749f, 0.674820f, 0.674891f,
+ 0.674962f, 0.675032f, 0.675103f, 0.675174f, 0.675245f, 0.675315f, 0.675386f, 0.675457f,
+ 0.675527f, 0.675598f, 0.675669f, 0.675739f, 0.675810f, 0.675881f, 0.675951f, 0.676022f,
+ 0.676093f, 0.676163f, 0.676234f, 0.676305f, 0.676375f, 0.676446f, 0.676516f, 0.676587f,
+ 0.676658f, 0.676728f, 0.676799f, 0.676869f, 0.676940f, 0.677011f, 0.677081f, 0.677152f,
+ 0.677222f, 0.677293f, 0.677363f, 0.677434f, 0.677504f, 0.677575f, 0.677645f, 0.677716f,
+ 0.677786f, 0.677857f, 0.677927f, 0.677998f, 0.678068f, 0.678139f, 0.678209f, 0.678280f,
+ 0.678350f, 0.678420f, 0.678491f, 0.678561f, 0.678632f, 0.678702f, 0.678773f, 0.678843f,
+ 0.678913f, 0.678984f, 0.679054f, 0.679125f, 0.679195f, 0.679265f, 0.679336f, 0.679406f,
+ 0.679476f, 0.679547f, 0.679617f, 0.679687f, 0.679758f, 0.679828f, 0.679898f, 0.679969f,
+ 0.680039f, 0.680109f, 0.680179f, 0.680250f, 0.680320f, 0.680390f, 0.680461f, 0.680531f,
+ 0.680601f, 0.680671f, 0.680741f, 0.680812f, 0.680882f, 0.680952f, 0.681022f, 0.681093f,
+ 0.681163f, 0.681233f, 0.681303f, 0.681373f, 0.681443f, 0.681514f, 0.681584f, 0.681654f,
+ 0.681724f, 0.681794f, 0.681864f, 0.681934f, 0.682005f, 0.682075f, 0.682145f, 0.682215f,
+ 0.682285f, 0.682355f, 0.682425f, 0.682495f, 0.682565f, 0.682635f, 0.682705f, 0.682775f,
+ 0.682846f, 0.682916f, 0.682986f, 0.683056f, 0.683126f, 0.683196f, 0.683266f, 0.683336f,
+ 0.683406f, 0.683476f, 0.683546f, 0.683616f, 0.683686f, 0.683756f, 0.683825f, 0.683895f,
+ 0.683965f, 0.684035f, 0.684105f, 0.684175f, 0.684245f, 0.684315f, 0.684385f, 0.684455f,
+ 0.684525f, 0.684595f, 0.684664f, 0.684734f, 0.684804f, 0.684874f, 0.684944f, 0.685014f,
+ 0.685084f, 0.685153f, 0.685223f, 0.685293f, 0.685363f, 0.685433f, 0.685503f, 0.685572f,
+ 0.685642f, 0.685712f, 0.685782f, 0.685852f, 0.685921f, 0.685991f, 0.686061f, 0.686131f,
+ 0.686200f, 0.686270f, 0.686340f, 0.686409f, 0.686479f, 0.686549f, 0.686619f, 0.686688f,
+ 0.686758f, 0.686828f, 0.686897f, 0.686967f, 0.687037f, 0.687106f, 0.687176f, 0.687246f,
+ 0.687315f, 0.687385f, 0.687455f, 0.687524f, 0.687594f, 0.687663f, 0.687733f, 0.687803f,
+ 0.687872f, 0.687942f, 0.688011f, 0.688081f, 0.688151f, 0.688220f, 0.688290f, 0.688359f,
+ 0.688429f, 0.688498f, 0.688568f, 0.688637f, 0.688707f, 0.688776f, 0.688846f, 0.688915f,
+ 0.688985f, 0.689054f, 0.689124f, 0.689193f, 0.689263f, 0.689332f, 0.689402f, 0.689471f,
+ 0.689541f, 0.689610f, 0.689679f, 0.689749f, 0.689818f, 0.689888f, 0.689957f, 0.690026f,
+ 0.690096f, 0.690165f, 0.690235f, 0.690304f, 0.690373f, 0.690443f, 0.690512f, 0.690581f,
+ 0.690651f, 0.690720f, 0.690789f, 0.690859f, 0.690928f, 0.690997f, 0.691067f, 0.691136f,
+ 0.691205f, 0.691274f, 0.691344f, 0.691413f, 0.691482f, 0.691552f, 0.691621f, 0.691690f,
+ 0.691759f, 0.691828f, 0.691898f, 0.691967f, 0.692036f, 0.692105f, 0.692175f, 0.692244f,
+ 0.692313f, 0.692382f, 0.692451f, 0.692520f, 0.692590f, 0.692659f, 0.692728f, 0.692797f,
+ 0.692866f, 0.692935f, 0.693004f, 0.693074f, 0.693143f, 0.693212f, 0.693281f, 0.693350f,
+ 0.693419f, 0.693488f, 0.693557f, 0.693626f, 0.693695f, 0.693764f, 0.693833f, 0.693902f,
+ 0.693971f, 0.694040f, 0.694109f, 0.694179f, 0.694248f, 0.694317f, 0.694386f, 0.694454f,
+ 0.694524f, 0.694592f, 0.694661f, 0.694730f, 0.694799f, 0.694868f, 0.694937f, 0.695006f,
+ 0.695075f, 0.695144f, 0.695213f, 0.695282f, 0.695351f, 0.695420f, 0.695489f, 0.695557f,
+ 0.695626f, 0.695695f, 0.695764f, 0.695833f, 0.695902f, 0.695971f, 0.696039f, 0.696108f,
+ 0.696177f, 0.696246f, 0.696315f, 0.696384f, 0.696452f, 0.696521f, 0.696590f, 0.696659f,
+ 0.696728f, 0.696796f, 0.696865f, 0.696934f, 0.697003f, 0.697071f, 0.697140f, 0.697209f,
+ 0.697277f, 0.697346f, 0.697415f, 0.697484f, 0.697552f, 0.697621f, 0.697690f, 0.697758f,
+ 0.697827f, 0.697896f, 0.697964f, 0.698033f, 0.698102f, 0.698170f, 0.698239f, 0.698308f,
+ 0.698376f, 0.698445f, 0.698513f, 0.698582f, 0.698651f, 0.698719f, 0.698788f, 0.698856f,
+ 0.698925f, 0.698994f, 0.699062f, 0.699131f, 0.699199f, 0.699268f, 0.699336f, 0.699405f,
+ 0.699473f, 0.699542f, 0.699610f, 0.699679f, 0.699747f, 0.699816f, 0.699884f, 0.699953f,
+ 0.700021f, 0.700090f, 0.700158f, 0.700227f, 0.700295f, 0.700364f, 0.700432f, 0.700500f,
+ 0.700569f, 0.700637f, 0.700706f, 0.700774f, 0.700842f, 0.700911f, 0.700979f, 0.701048f,
+ 0.701116f, 0.701184f, 0.701253f, 0.701321f, 0.701389f, 0.701458f, 0.701526f, 0.701594f,
+ 0.701663f, 0.701731f, 0.701799f, 0.701868f, 0.701936f, 0.702004f, 0.702072f, 0.702141f,
+ 0.702209f, 0.702277f, 0.702345f, 0.702414f, 0.702482f, 0.702550f, 0.702618f, 0.702687f,
+ 0.702755f, 0.702823f, 0.702891f, 0.702959f, 0.703028f, 0.703096f, 0.703164f, 0.703232f,
+ 0.703300f, 0.703368f, 0.703436f, 0.703505f, 0.703573f, 0.703641f, 0.703709f, 0.703777f,
+ 0.703845f, 0.703913f, 0.703981f, 0.704050f, 0.704118f, 0.704186f, 0.704254f, 0.704322f,
+ 0.704390f, 0.704458f, 0.704526f, 0.704594f, 0.704662f, 0.704730f, 0.704798f, 0.704866f,
+ 0.704934f, 0.705002f, 0.705070f, 0.705138f, 0.705206f, 0.705274f, 0.705342f, 0.705410f,
+ 0.705478f, 0.705546f, 0.705614f, 0.705682f, 0.705750f, 0.705818f, 0.705885f, 0.705953f,
+ 0.706021f, 0.706089f, 0.706157f, 0.706225f, 0.706293f, 0.706361f, 0.706429f, 0.706496f,
+ 0.706564f, 0.706632f, 0.706700f, 0.706768f, 0.706836f, 0.706903f, 0.706971f, 0.707039f,
+ 0.707107f, 0.707175f, 0.707242f, 0.707310f, 0.707378f, 0.707446f, 0.707513f, 0.707581f,
+ 0.707649f, 0.707717f, 0.707784f, 0.707852f, 0.707920f, 0.707988f, 0.708055f, 0.708123f,
+ 0.708191f, 0.708258f, 0.708326f, 0.708394f, 0.708461f, 0.708529f, 0.708597f, 0.708664f,
+ 0.708732f, 0.708800f, 0.708867f, 0.708935f, 0.709002f, 0.709070f, 0.709138f, 0.709205f,
+ 0.709273f, 0.709340f, 0.709408f, 0.709476f, 0.709543f, 0.709611f, 0.709678f, 0.709746f,
+ 0.709813f, 0.709881f, 0.709948f, 0.710016f, 0.710083f, 0.710151f, 0.710218f, 0.710286f,
+ 0.710353f, 0.710421f, 0.710488f, 0.710556f, 0.710623f, 0.710691f, 0.710758f, 0.710826f,
+ 0.710893f, 0.710960f, 0.711028f, 0.711095f, 0.711163f, 0.711230f, 0.711297f, 0.711365f,
+ 0.711432f, 0.711500f, 0.711567f, 0.711634f, 0.711702f, 0.711769f, 0.711836f, 0.711904f,
+ 0.711971f, 0.712038f, 0.712106f, 0.712173f, 0.712240f, 0.712308f, 0.712375f, 0.712442f,
+ 0.712509f, 0.712577f, 0.712644f, 0.712711f, 0.712778f, 0.712846f, 0.712913f, 0.712980f,
+ 0.713047f, 0.713115f, 0.713182f, 0.713249f, 0.713316f, 0.713383f, 0.713451f, 0.713518f,
+ 0.713585f, 0.713652f, 0.713719f, 0.713786f, 0.713853f, 0.713921f, 0.713988f, 0.714055f,
+ 0.714122f, 0.714189f, 0.714256f, 0.714323f, 0.714390f, 0.714457f, 0.714525f, 0.714592f,
+ 0.714659f, 0.714726f, 0.714793f, 0.714860f, 0.714927f, 0.714994f, 0.715061f, 0.715128f,
+ 0.715195f, 0.715262f, 0.715329f, 0.715396f, 0.715463f, 0.715530f, 0.715597f, 0.715664f,
+ 0.715731f, 0.715798f, 0.715865f, 0.715932f, 0.715999f, 0.716066f, 0.716132f, 0.716199f,
+ 0.716266f, 0.716333f, 0.716400f, 0.716467f, 0.716534f, 0.716601f, 0.716668f, 0.716734f,
+ 0.716801f, 0.716868f, 0.716935f, 0.717002f, 0.717069f, 0.717135f, 0.717202f, 0.717269f,
+ 0.717336f, 0.717403f, 0.717469f, 0.717536f, 0.717603f, 0.717670f, 0.717737f, 0.717803f,
+ 0.717870f, 0.717937f, 0.718004f, 0.718070f, 0.718137f, 0.718204f, 0.718270f, 0.718337f,
+ 0.718404f, 0.718471f, 0.718537f, 0.718604f, 0.718670f, 0.718737f, 0.718804f, 0.718870f,
+ 0.718937f, 0.719004f, 0.719070f, 0.719137f, 0.719204f, 0.719270f, 0.719337f, 0.719403f,
+ 0.719470f, 0.719537f, 0.719603f, 0.719670f, 0.719736f, 0.719803f, 0.719869f, 0.719936f,
+ 0.720003f, 0.720069f, 0.720136f, 0.720202f, 0.720269f, 0.720335f, 0.720402f, 0.720468f,
+ 0.720535f, 0.720601f, 0.720668f, 0.720734f, 0.720800f, 0.720867f, 0.720933f, 0.721000f,
+ 0.721066f, 0.721133f, 0.721199f, 0.721265f, 0.721332f, 0.721398f, 0.721465f, 0.721531f,
+ 0.721597f, 0.721664f, 0.721730f, 0.721797f, 0.721863f, 0.721929f, 0.721996f, 0.722062f,
+ 0.722128f, 0.722194f, 0.722261f, 0.722327f, 0.722393f, 0.722460f, 0.722526f, 0.722592f,
+ 0.722659f, 0.722725f, 0.722791f, 0.722857f, 0.722924f, 0.722990f, 0.723056f, 0.723122f,
+ 0.723188f, 0.723255f, 0.723321f, 0.723387f, 0.723453f, 0.723520f, 0.723586f, 0.723652f,
+ 0.723718f, 0.723784f, 0.723850f, 0.723916f, 0.723983f, 0.724049f, 0.724115f, 0.724181f,
+ 0.724247f, 0.724313f, 0.724379f, 0.724445f, 0.724511f, 0.724578f, 0.724644f, 0.724710f,
+ 0.724776f, 0.724842f, 0.724908f, 0.724974f, 0.725040f, 0.725106f, 0.725172f, 0.725238f,
+ 0.725304f, 0.725370f, 0.725436f, 0.725502f, 0.725568f, 0.725634f, 0.725700f, 0.725766f,
+ 0.725832f, 0.725898f, 0.725964f, 0.726030f, 0.726095f, 0.726161f, 0.726227f, 0.726293f,
+ 0.726359f, 0.726425f, 0.726491f, 0.726557f, 0.726623f, 0.726689f, 0.726754f, 0.726820f,
+ 0.726886f, 0.726952f, 0.727018f, 0.727084f, 0.727149f, 0.727215f, 0.727281f, 0.727347f,
+ 0.727413f, 0.727478f, 0.727544f, 0.727610f, 0.727676f, 0.727741f, 0.727807f, 0.727873f,
+ 0.727939f, 0.728004f, 0.728070f, 0.728136f, 0.728202f, 0.728267f, 0.728333f, 0.728399f,
+ 0.728464f, 0.728530f, 0.728596f, 0.728661f, 0.728727f, 0.728793f, 0.728858f, 0.728924f,
+ 0.728990f, 0.729055f, 0.729121f, 0.729186f, 0.729252f, 0.729318f, 0.729383f, 0.729449f,
+ 0.729514f, 0.729580f, 0.729646f, 0.729711f, 0.729777f, 0.729842f, 0.729908f, 0.729973f,
+ 0.730039f, 0.730104f, 0.730170f, 0.730235f, 0.730301f, 0.730366f, 0.730432f, 0.730497f,
+ 0.730563f, 0.730628f, 0.730694f, 0.730759f, 0.730825f, 0.730890f, 0.730955f, 0.731021f,
+ 0.731086f, 0.731152f, 0.731217f, 0.731282f, 0.731348f, 0.731413f, 0.731479f, 0.731544f,
+ 0.731609f, 0.731675f, 0.731740f, 0.731805f, 0.731871f, 0.731936f, 0.732001f, 0.732067f,
+ 0.732132f, 0.732197f, 0.732263f, 0.732328f, 0.732393f, 0.732458f, 0.732524f, 0.732589f,
+ 0.732654f, 0.732720f, 0.732785f, 0.732850f, 0.732915f, 0.732980f, 0.733046f, 0.733111f,
+ 0.733176f, 0.733241f, 0.733306f, 0.733372f, 0.733437f, 0.733502f, 0.733567f, 0.733632f,
+ 0.733697f, 0.733763f, 0.733828f, 0.733893f, 0.733958f, 0.734023f, 0.734088f, 0.734153f,
+ 0.734218f, 0.734283f, 0.734349f, 0.734414f, 0.734479f, 0.734544f, 0.734609f, 0.734674f,
+ 0.734739f, 0.734804f, 0.734869f, 0.734934f, 0.734999f, 0.735064f, 0.735129f, 0.735194f,
+ 0.735259f, 0.735324f, 0.735389f, 0.735454f, 0.735519f, 0.735584f, 0.735649f, 0.735714f,
+ 0.735779f, 0.735844f, 0.735908f, 0.735973f, 0.736038f, 0.736103f, 0.736168f, 0.736233f,
+ 0.736298f, 0.736363f, 0.736428f, 0.736492f, 0.736557f, 0.736622f, 0.736687f, 0.736752f,
+ 0.736817f, 0.736881f, 0.736946f, 0.737011f, 0.737076f, 0.737141f, 0.737205f, 0.737270f,
+ 0.737335f, 0.737400f, 0.737464f, 0.737529f, 0.737594f, 0.737659f, 0.737723f, 0.737788f,
+ 0.737853f, 0.737918f, 0.737982f, 0.738047f, 0.738112f, 0.738176f, 0.738241f, 0.738306f,
+ 0.738370f, 0.738435f, 0.738500f, 0.738564f, 0.738629f, 0.738693f, 0.738758f, 0.738823f,
+ 0.738887f, 0.738952f, 0.739017f, 0.739081f, 0.739146f, 0.739210f, 0.739275f, 0.739339f,
+ 0.739404f, 0.739468f, 0.739533f, 0.739598f, 0.739662f, 0.739727f, 0.739791f, 0.739856f,
+ 0.739920f, 0.739985f, 0.740049f, 0.740114f, 0.740178f, 0.740242f, 0.740307f, 0.740371f,
+ 0.740436f, 0.740500f, 0.740565f, 0.740629f, 0.740694f, 0.740758f, 0.740822f, 0.740887f,
+ 0.740951f, 0.741015f, 0.741080f, 0.741144f, 0.741209f, 0.741273f, 0.741337f, 0.741402f,
+ 0.741466f, 0.741530f, 0.741595f, 0.741659f, 0.741723f, 0.741788f, 0.741852f, 0.741916f,
+ 0.741980f, 0.742045f, 0.742109f, 0.742173f, 0.742237f, 0.742302f, 0.742366f, 0.742430f,
+ 0.742494f, 0.742559f, 0.742623f, 0.742687f, 0.742751f, 0.742815f, 0.742880f, 0.742944f,
+ 0.743008f, 0.743072f, 0.743136f, 0.743200f, 0.743265f, 0.743329f, 0.743393f, 0.743457f,
+ 0.743521f, 0.743585f, 0.743649f, 0.743713f, 0.743777f, 0.743842f, 0.743906f, 0.743970f,
+ 0.744034f, 0.744098f, 0.744162f, 0.744226f, 0.744290f, 0.744354f, 0.744418f, 0.744482f,
+ 0.744546f, 0.744610f, 0.744674f, 0.744738f, 0.744802f, 0.744866f, 0.744930f, 0.744994f,
+ 0.745058f, 0.745122f, 0.745186f, 0.745250f, 0.745314f, 0.745377f, 0.745441f, 0.745505f,
+ 0.745569f, 0.745633f, 0.745697f, 0.745761f, 0.745825f, 0.745889f, 0.745952f, 0.746016f,
+ 0.746080f, 0.746144f, 0.746208f, 0.746272f, 0.746335f, 0.746399f, 0.746463f, 0.746527f,
+ 0.746591f, 0.746654f, 0.746718f, 0.746782f, 0.746846f, 0.746909f, 0.746973f, 0.747037f,
+ 0.747101f, 0.747164f, 0.747228f, 0.747292f, 0.747355f, 0.747419f, 0.747483f, 0.747547f,
+ 0.747610f, 0.747674f, 0.747738f, 0.747801f, 0.747865f, 0.747929f, 0.747992f, 0.748056f,
+ 0.748119f, 0.748183f, 0.748247f, 0.748310f, 0.748374f, 0.748437f, 0.748501f, 0.748565f,
+ 0.748628f, 0.748692f, 0.748755f, 0.748819f, 0.748882f, 0.748946f, 0.749009f, 0.749073f,
+ 0.749136f, 0.749200f, 0.749263f, 0.749327f, 0.749390f, 0.749454f, 0.749517f, 0.749581f,
+ 0.749644f, 0.749708f, 0.749771f, 0.749835f, 0.749898f, 0.749961f, 0.750025f, 0.750088f,
+ 0.750152f, 0.750215f, 0.750278f, 0.750342f, 0.750405f, 0.750469f, 0.750532f, 0.750595f,
+ 0.750659f, 0.750722f, 0.750785f, 0.750849f, 0.750912f, 0.750975f, 0.751039f, 0.751102f,
+ 0.751165f, 0.751228f, 0.751292f, 0.751355f, 0.751418f, 0.751481f, 0.751545f, 0.751608f,
+ 0.751671f, 0.751734f, 0.751798f, 0.751861f, 0.751924f, 0.751987f, 0.752050f, 0.752114f,
+ 0.752177f, 0.752240f, 0.752303f, 0.752366f, 0.752429f, 0.752493f, 0.752556f, 0.752619f,
+ 0.752682f, 0.752745f, 0.752808f, 0.752871f, 0.752934f, 0.752998f, 0.753061f, 0.753124f,
+ 0.753187f, 0.753250f, 0.753313f, 0.753376f, 0.753439f, 0.753502f, 0.753565f, 0.753628f,
+ 0.753691f, 0.753754f, 0.753817f, 0.753880f, 0.753943f, 0.754006f, 0.754069f, 0.754132f,
+ 0.754195f, 0.754258f, 0.754321f, 0.754384f, 0.754447f, 0.754510f, 0.754573f, 0.754636f,
+ 0.754698f, 0.754761f, 0.754824f, 0.754887f, 0.754950f, 0.755013f, 0.755076f, 0.755139f,
+ 0.755201f, 0.755264f, 0.755327f, 0.755390f, 0.755453f, 0.755516f, 0.755578f, 0.755641f,
+ 0.755704f, 0.755767f, 0.755829f, 0.755892f, 0.755955f, 0.756018f, 0.756081f, 0.756143f,
+ 0.756206f, 0.756269f, 0.756331f, 0.756394f, 0.756457f, 0.756520f, 0.756582f, 0.756645f,
+ 0.756708f, 0.756770f, 0.756833f, 0.756896f, 0.756958f, 0.757021f, 0.757084f, 0.757146f,
+ 0.757209f, 0.757271f, 0.757334f, 0.757397f, 0.757459f, 0.757522f, 0.757584f, 0.757647f,
+ 0.757710f, 0.757772f, 0.757835f, 0.757897f, 0.757960f, 0.758022f, 0.758085f, 0.758147f,
+ 0.758210f, 0.758272f, 0.758335f, 0.758397f, 0.758460f, 0.758522f, 0.758585f, 0.758647f,
+ 0.758710f, 0.758772f, 0.758835f, 0.758897f, 0.758960f, 0.759022f, 0.759084f, 0.759147f,
+ 0.759209f, 0.759272f, 0.759334f, 0.759396f, 0.759459f, 0.759521f, 0.759583f, 0.759646f,
+ 0.759708f, 0.759771f, 0.759833f, 0.759895f, 0.759957f, 0.760020f, 0.760082f, 0.760144f,
+ 0.760207f, 0.760269f, 0.760331f, 0.760394f, 0.760456f, 0.760518f, 0.760580f, 0.760643f,
+ 0.760705f, 0.760767f, 0.760829f, 0.760891f, 0.760954f, 0.761016f, 0.761078f, 0.761140f,
+ 0.761202f, 0.761265f, 0.761327f, 0.761389f, 0.761451f, 0.761513f, 0.761575f, 0.761637f,
+ 0.761700f, 0.761762f, 0.761824f, 0.761886f, 0.761948f, 0.762010f, 0.762072f, 0.762134f,
+ 0.762196f, 0.762258f, 0.762320f, 0.762382f, 0.762444f, 0.762507f, 0.762569f, 0.762631f,
+ 0.762693f, 0.762755f, 0.762817f, 0.762879f, 0.762941f, 0.763003f, 0.763065f, 0.763126f,
+ 0.763188f, 0.763250f, 0.763312f, 0.763374f, 0.763436f, 0.763498f, 0.763560f, 0.763622f,
+ 0.763684f, 0.763746f, 0.763808f, 0.763869f, 0.763931f, 0.763993f, 0.764055f, 0.764117f,
+ 0.764179f, 0.764241f, 0.764302f, 0.764364f, 0.764426f, 0.764488f, 0.764550f, 0.764611f,
+ 0.764673f, 0.764735f, 0.764797f, 0.764859f, 0.764920f, 0.764982f, 0.765044f, 0.765106f,
+ 0.765167f, 0.765229f, 0.765291f, 0.765352f, 0.765414f, 0.765476f, 0.765538f, 0.765599f,
+ 0.765661f, 0.765723f, 0.765784f, 0.765846f, 0.765907f, 0.765969f, 0.766031f, 0.766092f,
+ 0.766154f, 0.766216f, 0.766277f, 0.766339f, 0.766400f, 0.766462f, 0.766524f, 0.766585f,
+ 0.766647f, 0.766708f, 0.766770f, 0.766831f, 0.766893f, 0.766954f, 0.767016f, 0.767077f,
+ 0.767139f, 0.767200f, 0.767262f, 0.767323f, 0.767385f, 0.767446f, 0.767508f, 0.767569f,
+ 0.767631f, 0.767692f, 0.767754f, 0.767815f, 0.767876f, 0.767938f, 0.767999f, 0.768061f,
+ 0.768122f, 0.768183f, 0.768245f, 0.768306f, 0.768368f, 0.768429f, 0.768490f, 0.768552f,
+ 0.768613f, 0.768674f, 0.768736f, 0.768797f, 0.768858f, 0.768919f, 0.768981f, 0.769042f,
+ 0.769103f, 0.769165f, 0.769226f, 0.769287f, 0.769348f, 0.769410f, 0.769471f, 0.769532f,
+ 0.769593f, 0.769655f, 0.769716f, 0.769777f, 0.769838f, 0.769899f, 0.769961f, 0.770022f,
+ 0.770083f, 0.770144f, 0.770205f, 0.770266f, 0.770327f, 0.770389f, 0.770450f, 0.770511f,
+ 0.770572f, 0.770633f, 0.770694f, 0.770755f, 0.770816f, 0.770877f, 0.770938f, 0.770999f,
+ 0.771061f, 0.771122f, 0.771183f, 0.771244f, 0.771305f, 0.771366f, 0.771427f, 0.771488f,
+ 0.771549f, 0.771610f, 0.771671f, 0.771732f, 0.771793f, 0.771854f, 0.771915f, 0.771975f,
+ 0.772036f, 0.772097f, 0.772158f, 0.772219f, 0.772280f, 0.772341f, 0.772402f, 0.772463f,
+ 0.772524f, 0.772584f, 0.772645f, 0.772706f, 0.772767f, 0.772828f, 0.772889f, 0.772950f,
+ 0.773010f, 0.773071f, 0.773132f, 0.773193f, 0.773254f, 0.773314f, 0.773375f, 0.773436f,
+ 0.773497f, 0.773558f, 0.773618f, 0.773679f, 0.773740f, 0.773801f, 0.773861f, 0.773922f,
+ 0.773983f, 0.774043f, 0.774104f, 0.774165f, 0.774225f, 0.774286f, 0.774347f, 0.774407f,
+ 0.774468f, 0.774529f, 0.774589f, 0.774650f, 0.774711f, 0.774771f, 0.774832f, 0.774893f,
+ 0.774953f, 0.775014f, 0.775074f, 0.775135f, 0.775195f, 0.775256f, 0.775317f, 0.775377f,
+ 0.775438f, 0.775498f, 0.775559f, 0.775619f, 0.775680f, 0.775740f, 0.775801f, 0.775861f,
+ 0.775922f, 0.775982f, 0.776043f, 0.776103f, 0.776164f, 0.776224f, 0.776284f, 0.776345f,
+ 0.776405f, 0.776466f, 0.776526f, 0.776587f, 0.776647f, 0.776707f, 0.776768f, 0.776828f,
+ 0.776888f, 0.776949f, 0.777009f, 0.777070f, 0.777130f, 0.777190f, 0.777251f, 0.777311f,
+ 0.777371f, 0.777431f, 0.777492f, 0.777552f, 0.777612f, 0.777673f, 0.777733f, 0.777793f,
+ 0.777853f, 0.777914f, 0.777974f, 0.778034f, 0.778094f, 0.778155f, 0.778215f, 0.778275f,
+ 0.778335f, 0.778395f, 0.778456f, 0.778516f, 0.778576f, 0.778636f, 0.778696f, 0.778756f,
+ 0.778817f, 0.778877f, 0.778937f, 0.778997f, 0.779057f, 0.779117f, 0.779177f, 0.779237f,
+ 0.779297f, 0.779357f, 0.779418f, 0.779478f, 0.779538f, 0.779598f, 0.779658f, 0.779718f,
+ 0.779778f, 0.779838f, 0.779898f, 0.779958f, 0.780018f, 0.780078f, 0.780138f, 0.780198f,
+ 0.780258f, 0.780318f, 0.780378f, 0.780438f, 0.780498f, 0.780557f, 0.780617f, 0.780677f,
+ 0.780737f, 0.780797f, 0.780857f, 0.780917f, 0.780977f, 0.781037f, 0.781097f, 0.781156f,
+ 0.781216f, 0.781276f, 0.781336f, 0.781396f, 0.781456f, 0.781515f, 0.781575f, 0.781635f,
+ 0.781695f, 0.781755f, 0.781814f, 0.781874f, 0.781934f, 0.781994f, 0.782053f, 0.782113f,
+ 0.782173f, 0.782233f, 0.782292f, 0.782352f, 0.782412f, 0.782472f, 0.782531f, 0.782591f,
+ 0.782651f, 0.782710f, 0.782770f, 0.782830f, 0.782889f, 0.782949f, 0.783009f, 0.783068f,
+ 0.783128f, 0.783187f, 0.783247f, 0.783307f, 0.783366f, 0.783426f, 0.783485f, 0.783545f,
+ 0.783605f, 0.783664f, 0.783724f, 0.783783f, 0.783843f, 0.783902f, 0.783962f, 0.784021f,
+ 0.784081f, 0.784140f, 0.784200f, 0.784259f, 0.784319f, 0.784378f, 0.784438f, 0.784497f,
+ 0.784557f, 0.784616f, 0.784675f, 0.784735f, 0.784794f, 0.784854f, 0.784913f, 0.784973f,
+ 0.785032f, 0.785091f, 0.785151f, 0.785210f, 0.785269f, 0.785329f, 0.785388f, 0.785447f,
+ 0.785507f, 0.785566f, 0.785625f, 0.785685f, 0.785744f, 0.785803f, 0.785863f, 0.785922f,
+ 0.785981f, 0.786041f, 0.786100f, 0.786159f, 0.786218f, 0.786278f, 0.786337f, 0.786396f,
+ 0.786455f, 0.786514f, 0.786574f, 0.786633f, 0.786692f, 0.786751f, 0.786810f, 0.786870f,
+ 0.786929f, 0.786988f, 0.787047f, 0.787106f, 0.787165f, 0.787224f, 0.787284f, 0.787343f,
+ 0.787402f, 0.787461f, 0.787520f, 0.787579f, 0.787638f, 0.787697f, 0.787756f, 0.787815f,
+ 0.787874f, 0.787933f, 0.787992f, 0.788051f, 0.788110f, 0.788169f, 0.788228f, 0.788287f,
+ 0.788346f, 0.788405f, 0.788464f, 0.788523f, 0.788582f, 0.788641f, 0.788700f, 0.788759f,
+ 0.788818f, 0.788877f, 0.788936f, 0.788995f, 0.789054f, 0.789113f, 0.789172f, 0.789230f,
+ 0.789289f, 0.789348f, 0.789407f, 0.789466f, 0.789525f, 0.789584f, 0.789642f, 0.789701f,
+ 0.789760f, 0.789819f, 0.789878f, 0.789936f, 0.789995f, 0.790054f, 0.790113f, 0.790171f,
+ 0.790230f, 0.790289f, 0.790348f, 0.790406f, 0.790465f, 0.790524f, 0.790583f, 0.790641f,
+ 0.790700f, 0.790759f, 0.790817f, 0.790876f, 0.790935f, 0.790993f, 0.791052f, 0.791111f,
+ 0.791169f, 0.791228f, 0.791287f, 0.791345f, 0.791404f, 0.791462f, 0.791521f, 0.791580f,
+ 0.791638f, 0.791697f, 0.791755f, 0.791814f, 0.791872f, 0.791931f, 0.791990f, 0.792048f,
+ 0.792107f, 0.792165f, 0.792224f, 0.792282f, 0.792341f, 0.792399f, 0.792458f, 0.792516f,
+ 0.792575f, 0.792633f, 0.792691f, 0.792750f, 0.792808f, 0.792867f, 0.792925f, 0.792984f,
+ 0.793042f, 0.793100f, 0.793159f, 0.793217f, 0.793276f, 0.793334f, 0.793392f, 0.793451f,
+ 0.793509f, 0.793567f, 0.793626f, 0.793684f, 0.793742f, 0.793801f, 0.793859f, 0.793917f,
+ 0.793975f, 0.794034f, 0.794092f, 0.794150f, 0.794209f, 0.794267f, 0.794325f, 0.794383f,
+ 0.794442f, 0.794500f, 0.794558f, 0.794616f, 0.794674f, 0.794733f, 0.794791f, 0.794849f,
+ 0.794907f, 0.794965f, 0.795023f, 0.795082f, 0.795140f, 0.795198f, 0.795256f, 0.795314f,
+ 0.795372f, 0.795430f, 0.795488f, 0.795547f, 0.795605f, 0.795663f, 0.795721f, 0.795779f,
+ 0.795837f, 0.795895f, 0.795953f, 0.796011f, 0.796069f, 0.796127f, 0.796185f, 0.796243f,
+ 0.796301f, 0.796359f, 0.796417f, 0.796475f, 0.796533f, 0.796591f, 0.796649f, 0.796707f,
+ 0.796765f, 0.796823f, 0.796881f, 0.796939f, 0.796996f, 0.797054f, 0.797112f, 0.797170f,
+ 0.797228f, 0.797286f, 0.797344f, 0.797402f, 0.797459f, 0.797517f, 0.797575f, 0.797633f,
+ 0.797691f, 0.797749f, 0.797806f, 0.797864f, 0.797922f, 0.797980f, 0.798038f, 0.798095f,
+ 0.798153f, 0.798211f, 0.798269f, 0.798326f, 0.798384f, 0.798442f, 0.798500f, 0.798557f,
+ 0.798615f, 0.798673f, 0.798730f, 0.798788f, 0.798846f, 0.798903f, 0.798961f, 0.799019f,
+ 0.799076f, 0.799134f, 0.799192f, 0.799249f, 0.799307f, 0.799365f, 0.799422f, 0.799480f,
+ 0.799537f, 0.799595f, 0.799652f, 0.799710f, 0.799768f, 0.799825f, 0.799883f, 0.799940f,
+ 0.799998f, 0.800055f, 0.800113f, 0.800170f, 0.800228f, 0.800285f, 0.800343f, 0.800400f,
+ 0.800458f, 0.800515f, 0.800573f, 0.800630f, 0.800687f, 0.800745f, 0.800802f, 0.800860f,
+ 0.800917f, 0.800975f, 0.801032f, 0.801089f, 0.801147f, 0.801204f, 0.801261f, 0.801319f,
+ 0.801376f, 0.801434f, 0.801491f, 0.801548f, 0.801606f, 0.801663f, 0.801720f, 0.801777f,
+ 0.801835f, 0.801892f, 0.801949f, 0.802007f, 0.802064f, 0.802121f, 0.802178f, 0.802236f,
+ 0.802293f, 0.802350f, 0.802407f, 0.802464f, 0.802522f, 0.802579f, 0.802636f, 0.802693f,
+ 0.802750f, 0.802808f, 0.802865f, 0.802922f, 0.802979f, 0.803036f, 0.803093f, 0.803150f,
+ 0.803208f, 0.803265f, 0.803322f, 0.803379f, 0.803436f, 0.803493f, 0.803550f, 0.803607f,
+ 0.803664f, 0.803721f, 0.803778f, 0.803835f, 0.803892f, 0.803949f, 0.804006f, 0.804063f,
+ 0.804120f, 0.804177f, 0.804234f, 0.804291f, 0.804348f, 0.804405f, 0.804462f, 0.804519f,
+ 0.804576f, 0.804633f, 0.804690f, 0.804747f, 0.804804f, 0.804861f, 0.804918f, 0.804974f,
+ 0.805031f, 0.805088f, 0.805145f, 0.805202f, 0.805259f, 0.805316f, 0.805372f, 0.805429f,
+ 0.805486f, 0.805543f, 0.805600f, 0.805656f, 0.805713f, 0.805770f, 0.805827f, 0.805884f,
+ 0.805940f, 0.805997f, 0.806054f, 0.806111f, 0.806167f, 0.806224f, 0.806281f, 0.806338f,
+ 0.806394f, 0.806451f, 0.806508f, 0.806564f, 0.806621f, 0.806678f, 0.806734f, 0.806791f,
+ 0.806848f, 0.806904f, 0.806961f, 0.807017f, 0.807074f, 0.807131f, 0.807187f, 0.807244f,
+ 0.807300f, 0.807357f, 0.807414f, 0.807470f, 0.807527f, 0.807583f, 0.807640f, 0.807696f,
+ 0.807753f, 0.807809f, 0.807866f, 0.807922f, 0.807979f, 0.808035f, 0.808092f, 0.808148f,
+ 0.808205f, 0.808261f, 0.808318f, 0.808374f, 0.808430f, 0.808487f, 0.808543f, 0.808600f,
+ 0.808656f, 0.808713f, 0.808769f, 0.808825f, 0.808882f, 0.808938f, 0.808994f, 0.809051f,
+ 0.809107f, 0.809164f, 0.809220f, 0.809276f, 0.809332f, 0.809389f, 0.809445f, 0.809501f,
+ 0.809558f, 0.809614f, 0.809670f, 0.809726f, 0.809783f, 0.809839f, 0.809895f, 0.809951f,
+ 0.810008f, 0.810064f, 0.810120f, 0.810176f, 0.810232f, 0.810289f, 0.810345f, 0.810401f,
+ 0.810457f, 0.810513f, 0.810570f, 0.810626f, 0.810682f, 0.810738f, 0.810794f, 0.810850f,
+ 0.810906f, 0.810962f, 0.811018f, 0.811075f, 0.811131f, 0.811187f, 0.811243f, 0.811299f,
+ 0.811355f, 0.811411f, 0.811467f, 0.811523f, 0.811579f, 0.811635f, 0.811691f, 0.811747f,
+ 0.811803f, 0.811859f, 0.811915f, 0.811971f, 0.812027f, 0.812083f, 0.812139f, 0.812195f,
+ 0.812251f, 0.812307f, 0.812362f, 0.812418f, 0.812474f, 0.812530f, 0.812586f, 0.812642f,
+ 0.812698f, 0.812754f, 0.812809f, 0.812865f, 0.812921f, 0.812977f, 0.813033f, 0.813089f,
+ 0.813144f, 0.813200f, 0.813256f, 0.813312f, 0.813368f, 0.813423f, 0.813479f, 0.813535f,
+ 0.813591f, 0.813646f, 0.813702f, 0.813758f, 0.813814f, 0.813869f, 0.813925f, 0.813981f,
+ 0.814036f, 0.814092f, 0.814148f, 0.814203f, 0.814259f, 0.814315f, 0.814370f, 0.814426f,
+ 0.814482f, 0.814537f, 0.814593f, 0.814648f, 0.814704f, 0.814760f, 0.814815f, 0.814871f,
+ 0.814926f, 0.814982f, 0.815037f, 0.815093f, 0.815149f, 0.815204f, 0.815260f, 0.815315f,
+ 0.815371f, 0.815426f, 0.815482f, 0.815537f, 0.815593f, 0.815648f, 0.815704f, 0.815759f,
+ 0.815814f, 0.815870f, 0.815925f, 0.815981f, 0.816036f, 0.816092f, 0.816147f, 0.816202f,
+ 0.816258f, 0.816313f, 0.816368f, 0.816424f, 0.816479f, 0.816535f, 0.816590f, 0.816645f,
+ 0.816701f, 0.816756f, 0.816811f, 0.816867f, 0.816922f, 0.816977f, 0.817032f, 0.817088f,
+ 0.817143f, 0.817198f, 0.817253f, 0.817309f, 0.817364f, 0.817419f, 0.817474f, 0.817530f,
+ 0.817585f, 0.817640f, 0.817695f, 0.817750f, 0.817806f, 0.817861f, 0.817916f, 0.817971f,
+ 0.818026f, 0.818081f, 0.818137f, 0.818192f, 0.818247f, 0.818302f, 0.818357f, 0.818412f,
+ 0.818467f, 0.818522f, 0.818577f, 0.818632f, 0.818687f, 0.818742f, 0.818798f, 0.818853f,
+ 0.818908f, 0.818963f, 0.819018f, 0.819073f, 0.819128f, 0.819183f, 0.819238f, 0.819293f,
+ 0.819348f, 0.819402f, 0.819457f, 0.819512f, 0.819567f, 0.819622f, 0.819677f, 0.819732f,
+ 0.819787f, 0.819842f, 0.819897f, 0.819952f, 0.820007f, 0.820061f, 0.820116f, 0.820171f,
+ 0.820226f, 0.820281f, 0.820336f, 0.820390f, 0.820445f, 0.820500f, 0.820555f, 0.820610f,
+ 0.820664f, 0.820719f, 0.820774f, 0.820829f, 0.820884f, 0.820938f, 0.820993f, 0.821048f,
+ 0.821102f, 0.821157f, 0.821212f, 0.821267f, 0.821321f, 0.821376f, 0.821431f, 0.821485f,
+ 0.821540f, 0.821595f, 0.821649f, 0.821704f, 0.821759f, 0.821813f, 0.821868f, 0.821922f,
+ 0.821977f, 0.822032f, 0.822086f, 0.822141f, 0.822195f, 0.822250f, 0.822305f, 0.822359f,
+ 0.822414f, 0.822468f, 0.822523f, 0.822577f, 0.822632f, 0.822686f, 0.822741f, 0.822795f,
+ 0.822850f, 0.822904f, 0.822959f, 0.823013f, 0.823068f, 0.823122f, 0.823177f, 0.823231f,
+ 0.823285f, 0.823340f, 0.823394f, 0.823449f, 0.823503f, 0.823557f, 0.823612f, 0.823666f,
+ 0.823721f, 0.823775f, 0.823829f, 0.823884f, 0.823938f, 0.823992f, 0.824047f, 0.824101f,
+ 0.824155f, 0.824209f, 0.824264f, 0.824318f, 0.824372f, 0.824427f, 0.824481f, 0.824535f,
+ 0.824589f, 0.824644f, 0.824698f, 0.824752f, 0.824806f, 0.824860f, 0.824915f, 0.824969f,
+ 0.825023f, 0.825077f, 0.825131f, 0.825185f, 0.825240f, 0.825294f, 0.825348f, 0.825402f,
+ 0.825456f, 0.825510f, 0.825564f, 0.825618f, 0.825673f, 0.825727f, 0.825781f, 0.825835f,
+ 0.825889f, 0.825943f, 0.825997f, 0.826051f, 0.826105f, 0.826159f, 0.826213f, 0.826267f,
+ 0.826321f, 0.826375f, 0.826429f, 0.826483f, 0.826537f, 0.826591f, 0.826645f, 0.826699f,
+ 0.826753f, 0.826807f, 0.826861f, 0.826915f, 0.826968f, 0.827022f, 0.827076f, 0.827130f,
+ 0.827184f, 0.827238f, 0.827292f, 0.827346f, 0.827399f, 0.827453f, 0.827507f, 0.827561f,
+ 0.827615f, 0.827669f, 0.827722f, 0.827776f, 0.827830f, 0.827884f, 0.827938f, 0.827991f,
+ 0.828045f, 0.828099f, 0.828153f, 0.828206f, 0.828260f, 0.828314f, 0.828367f, 0.828421f,
+ 0.828475f, 0.828529f, 0.828582f, 0.828636f, 0.828690f, 0.828743f, 0.828797f, 0.828851f,
+ 0.828904f, 0.828958f, 0.829011f, 0.829065f, 0.829119f, 0.829172f, 0.829226f, 0.829279f,
+ 0.829333f, 0.829386f, 0.829440f, 0.829494f, 0.829547f, 0.829601f, 0.829654f, 0.829708f,
+ 0.829761f, 0.829815f, 0.829868f, 0.829922f, 0.829975f, 0.830029f, 0.830082f, 0.830136f,
+ 0.830189f, 0.830243f, 0.830296f, 0.830349f, 0.830403f, 0.830456f, 0.830510f, 0.830563f,
+ 0.830616f, 0.830670f, 0.830723f, 0.830777f, 0.830830f, 0.830883f, 0.830937f, 0.830990f,
+ 0.831043f, 0.831097f, 0.831150f, 0.831203f, 0.831257f, 0.831310f, 0.831363f, 0.831416f,
+ 0.831470f, 0.831523f, 0.831576f, 0.831629f, 0.831683f, 0.831736f, 0.831789f, 0.831842f,
+ 0.831895f, 0.831949f, 0.832002f, 0.832055f, 0.832108f, 0.832161f, 0.832215f, 0.832268f,
+ 0.832321f, 0.832374f, 0.832427f, 0.832480f, 0.832533f, 0.832586f, 0.832640f, 0.832693f,
+ 0.832746f, 0.832799f, 0.832852f, 0.832905f, 0.832958f, 0.833011f, 0.833064f, 0.833117f,
+ 0.833170f, 0.833223f, 0.833276f, 0.833329f, 0.833382f, 0.833435f, 0.833488f, 0.833541f,
+ 0.833594f, 0.833647f, 0.833700f, 0.833753f, 0.833806f, 0.833859f, 0.833912f, 0.833965f,
+ 0.834018f, 0.834070f, 0.834123f, 0.834176f, 0.834229f, 0.834282f, 0.834335f, 0.834388f,
+ 0.834440f, 0.834493f, 0.834546f, 0.834599f, 0.834652f, 0.834705f, 0.834757f, 0.834810f,
+ 0.834863f, 0.834916f, 0.834968f, 0.835021f, 0.835074f, 0.835127f, 0.835179f, 0.835232f,
+ 0.835285f, 0.835338f, 0.835390f, 0.835443f, 0.835496f, 0.835548f, 0.835601f, 0.835654f,
+ 0.835706f, 0.835759f, 0.835812f, 0.835864f, 0.835917f, 0.835969f, 0.836022f, 0.836075f,
+ 0.836127f, 0.836180f, 0.836232f, 0.836285f, 0.836338f, 0.836390f, 0.836443f, 0.836495f,
+ 0.836548f, 0.836600f, 0.836653f, 0.836705f, 0.836758f, 0.836810f, 0.836863f, 0.836915f,
+ 0.836968f, 0.837020f, 0.837073f, 0.837125f, 0.837178f, 0.837230f, 0.837282f, 0.837335f,
+ 0.837387f, 0.837440f, 0.837492f, 0.837544f, 0.837597f, 0.837649f, 0.837701f, 0.837754f,
+ 0.837806f, 0.837859f, 0.837911f, 0.837963f, 0.838015f, 0.838068f, 0.838120f, 0.838172f,
+ 0.838225f, 0.838277f, 0.838329f, 0.838382f, 0.838434f, 0.838486f, 0.838538f, 0.838591f,
+ 0.838643f, 0.838695f, 0.838747f, 0.838799f, 0.838852f, 0.838904f, 0.838956f, 0.839008f,
+ 0.839060f, 0.839112f, 0.839165f, 0.839217f, 0.839269f, 0.839321f, 0.839373f, 0.839425f,
+ 0.839477f, 0.839529f, 0.839581f, 0.839634f, 0.839686f, 0.839738f, 0.839790f, 0.839842f,
+ 0.839894f, 0.839946f, 0.839998f, 0.840050f, 0.840102f, 0.840154f, 0.840206f, 0.840258f,
+ 0.840310f, 0.840362f, 0.840414f, 0.840466f, 0.840518f, 0.840570f, 0.840622f, 0.840673f,
+ 0.840725f, 0.840777f, 0.840829f, 0.840881f, 0.840933f, 0.840985f, 0.841037f, 0.841089f,
+ 0.841140f, 0.841192f, 0.841244f, 0.841296f, 0.841348f, 0.841400f, 0.841451f, 0.841503f,
+ 0.841555f, 0.841607f, 0.841659f, 0.841710f, 0.841762f, 0.841814f, 0.841866f, 0.841917f,
+ 0.841969f, 0.842021f, 0.842072f, 0.842124f, 0.842176f, 0.842228f, 0.842279f, 0.842331f,
+ 0.842383f, 0.842434f, 0.842486f, 0.842538f, 0.842589f, 0.842641f, 0.842692f, 0.842744f,
+ 0.842796f, 0.842847f, 0.842899f, 0.842950f, 0.843002f, 0.843054f, 0.843105f, 0.843157f,
+ 0.843208f, 0.843260f, 0.843311f, 0.843363f, 0.843414f, 0.843466f, 0.843517f, 0.843569f,
+ 0.843620f, 0.843672f, 0.843723f, 0.843775f, 0.843826f, 0.843878f, 0.843929f, 0.843980f,
+ 0.844032f, 0.844083f, 0.844135f, 0.844186f, 0.844238f, 0.844289f, 0.844340f, 0.844392f,
+ 0.844443f, 0.844494f, 0.844546f, 0.844597f, 0.844648f, 0.844700f, 0.844751f, 0.844802f,
+ 0.844854f, 0.844905f, 0.844956f, 0.845007f, 0.845059f, 0.845110f, 0.845161f, 0.845212f,
+ 0.845264f, 0.845315f, 0.845366f, 0.845417f, 0.845469f, 0.845520f, 0.845571f, 0.845622f,
+ 0.845673f, 0.845724f, 0.845776f, 0.845827f, 0.845878f, 0.845929f, 0.845980f, 0.846031f,
+ 0.846082f, 0.846133f, 0.846185f, 0.846236f, 0.846287f, 0.846338f, 0.846389f, 0.846440f,
+ 0.846491f, 0.846542f, 0.846593f, 0.846644f, 0.846695f, 0.846746f, 0.846797f, 0.846848f,
+ 0.846899f, 0.846950f, 0.847001f, 0.847052f, 0.847103f, 0.847154f, 0.847205f, 0.847256f,
+ 0.847307f, 0.847358f, 0.847408f, 0.847459f, 0.847510f, 0.847561f, 0.847612f, 0.847663f,
+ 0.847714f, 0.847765f, 0.847815f, 0.847866f, 0.847917f, 0.847968f, 0.848019f, 0.848070f,
+ 0.848120f, 0.848171f, 0.848222f, 0.848273f, 0.848323f, 0.848374f, 0.848425f, 0.848476f,
+ 0.848526f, 0.848577f, 0.848628f, 0.848679f, 0.848729f, 0.848780f, 0.848831f, 0.848881f,
+ 0.848932f, 0.848983f, 0.849033f, 0.849084f, 0.849135f, 0.849185f, 0.849236f, 0.849287f,
+ 0.849337f, 0.849388f, 0.849438f, 0.849489f, 0.849540f, 0.849590f, 0.849641f, 0.849691f,
+ 0.849742f, 0.849792f, 0.849843f, 0.849893f, 0.849944f, 0.849994f, 0.850045f, 0.850095f,
+ 0.850146f, 0.850196f, 0.850247f, 0.850297f, 0.850348f, 0.850398f, 0.850449f, 0.850499f,
+ 0.850549f, 0.850600f, 0.850650f, 0.850701f, 0.850751f, 0.850801f, 0.850852f, 0.850902f,
+ 0.850953f, 0.851003f, 0.851053f, 0.851104f, 0.851154f, 0.851204f, 0.851255f, 0.851305f,
+ 0.851355f, 0.851406f, 0.851456f, 0.851506f, 0.851556f, 0.851607f, 0.851657f, 0.851707f,
+ 0.851757f, 0.851808f, 0.851858f, 0.851908f, 0.851958f, 0.852008f, 0.852059f, 0.852109f,
+ 0.852159f, 0.852209f, 0.852259f, 0.852309f, 0.852360f, 0.852410f, 0.852460f, 0.852510f,
+ 0.852560f, 0.852610f, 0.852660f, 0.852710f, 0.852760f, 0.852810f, 0.852861f, 0.852911f,
+ 0.852961f, 0.853011f, 0.853061f, 0.853111f, 0.853161f, 0.853211f, 0.853261f, 0.853311f,
+ 0.853361f, 0.853411f, 0.853461f, 0.853511f, 0.853561f, 0.853611f, 0.853660f, 0.853710f,
+ 0.853760f, 0.853810f, 0.853860f, 0.853910f, 0.853960f, 0.854010f, 0.854060f, 0.854110f,
+ 0.854159f, 0.854209f, 0.854259f, 0.854309f, 0.854359f, 0.854409f, 0.854458f, 0.854508f,
+ 0.854558f, 0.854608f, 0.854658f, 0.854707f, 0.854757f, 0.854807f, 0.854857f, 0.854906f,
+ 0.854956f, 0.855006f, 0.855056f, 0.855105f, 0.855155f, 0.855205f, 0.855254f, 0.855304f,
+ 0.855354f, 0.855403f, 0.855453f, 0.855503f, 0.855552f, 0.855602f, 0.855651f, 0.855701f,
+ 0.855751f, 0.855800f, 0.855850f, 0.855900f, 0.855949f, 0.855999f, 0.856048f, 0.856098f,
+ 0.856147f, 0.856197f, 0.856246f, 0.856296f, 0.856345f, 0.856395f, 0.856444f, 0.856494f,
+ 0.856543f, 0.856593f, 0.856642f, 0.856692f, 0.856741f, 0.856791f, 0.856840f, 0.856890f,
+ 0.856939f, 0.856988f, 0.857038f, 0.857087f, 0.857137f, 0.857186f, 0.857235f, 0.857285f,
+ 0.857334f, 0.857383f, 0.857433f, 0.857482f, 0.857531f, 0.857581f, 0.857630f, 0.857679f,
+ 0.857729f, 0.857778f, 0.857827f, 0.857876f, 0.857926f, 0.857975f, 0.858024f, 0.858073f,
+ 0.858123f, 0.858172f, 0.858221f, 0.858270f, 0.858320f, 0.858369f, 0.858418f, 0.858467f,
+ 0.858516f, 0.858565f, 0.858615f, 0.858664f, 0.858713f, 0.858762f, 0.858811f, 0.858860f,
+ 0.858909f, 0.858958f, 0.859007f, 0.859057f, 0.859106f, 0.859155f, 0.859204f, 0.859253f,
+ 0.859302f, 0.859351f, 0.859400f, 0.859449f, 0.859498f, 0.859547f, 0.859596f, 0.859645f,
+ 0.859694f, 0.859743f, 0.859792f, 0.859841f, 0.859890f, 0.859939f, 0.859988f, 0.860036f,
+ 0.860085f, 0.860134f, 0.860183f, 0.860232f, 0.860281f, 0.860330f, 0.860379f, 0.860428f,
+ 0.860476f, 0.860525f, 0.860574f, 0.860623f, 0.860672f, 0.860721f, 0.860769f, 0.860818f,
+ 0.860867f, 0.860916f, 0.860964f, 0.861013f, 0.861062f, 0.861111f, 0.861160f, 0.861208f,
+ 0.861257f, 0.861306f, 0.861354f, 0.861403f, 0.861452f, 0.861500f, 0.861549f, 0.861598f,
+ 0.861646f, 0.861695f, 0.861744f, 0.861792f, 0.861841f, 0.861890f, 0.861938f, 0.861987f,
+ 0.862035f, 0.862084f, 0.862133f, 0.862181f, 0.862230f, 0.862278f, 0.862327f, 0.862375f,
+ 0.862424f, 0.862472f, 0.862521f, 0.862570f, 0.862618f, 0.862666f, 0.862715f, 0.862763f,
+ 0.862812f, 0.862860f, 0.862909f, 0.862957f, 0.863006f, 0.863054f, 0.863103f, 0.863151f,
+ 0.863199f, 0.863248f, 0.863296f, 0.863345f, 0.863393f, 0.863441f, 0.863490f, 0.863538f,
+ 0.863586f, 0.863635f, 0.863683f, 0.863731f, 0.863780f, 0.863828f, 0.863876f, 0.863925f,
+ 0.863973f, 0.864021f, 0.864069f, 0.864118f, 0.864166f, 0.864214f, 0.864262f, 0.864311f,
+ 0.864359f, 0.864407f, 0.864455f, 0.864503f, 0.864552f, 0.864600f, 0.864648f, 0.864696f,
+ 0.864744f, 0.864792f, 0.864841f, 0.864889f, 0.864937f, 0.864985f, 0.865033f, 0.865081f,
+ 0.865129f, 0.865177f, 0.865225f, 0.865273f, 0.865321f, 0.865369f, 0.865418f, 0.865466f,
+ 0.865514f, 0.865562f, 0.865610f, 0.865658f, 0.865706f, 0.865754f, 0.865802f, 0.865850f,
+ 0.865898f, 0.865946f, 0.865993f, 0.866041f, 0.866089f, 0.866137f, 0.866185f, 0.866233f,
+ 0.866281f, 0.866329f, 0.866377f, 0.866425f, 0.866472f, 0.866520f, 0.866568f, 0.866616f,
+ 0.866664f, 0.866712f, 0.866759f, 0.866807f, 0.866855f, 0.866903f, 0.866951f, 0.866998f,
+ 0.867046f, 0.867094f, 0.867142f, 0.867190f, 0.867237f, 0.867285f, 0.867333f, 0.867380f,
+ 0.867428f, 0.867476f, 0.867523f, 0.867571f, 0.867619f, 0.867667f, 0.867714f, 0.867762f,
+ 0.867809f, 0.867857f, 0.867905f, 0.867952f, 0.868000f, 0.868048f, 0.868095f, 0.868143f,
+ 0.868190f, 0.868238f, 0.868285f, 0.868333f, 0.868381f, 0.868428f, 0.868476f, 0.868523f,
+ 0.868571f, 0.868618f, 0.868666f, 0.868713f, 0.868761f, 0.868808f, 0.868856f, 0.868903f,
+ 0.868951f, 0.868998f, 0.869045f, 0.869093f, 0.869140f, 0.869188f, 0.869235f, 0.869282f,
+ 0.869330f, 0.869377f, 0.869425f, 0.869472f, 0.869519f, 0.869567f, 0.869614f, 0.869661f,
+ 0.869709f, 0.869756f, 0.869803f, 0.869851f, 0.869898f, 0.869945f, 0.869992f, 0.870040f,
+ 0.870087f, 0.870134f, 0.870182f, 0.870229f, 0.870276f, 0.870323f, 0.870370f, 0.870418f,
+ 0.870465f, 0.870512f, 0.870559f, 0.870606f, 0.870654f, 0.870701f, 0.870748f, 0.870795f,
+ 0.870842f, 0.870889f, 0.870936f, 0.870983f, 0.871031f, 0.871078f, 0.871125f, 0.871172f,
+ 0.871219f, 0.871266f, 0.871313f, 0.871360f, 0.871407f, 0.871454f, 0.871501f, 0.871548f,
+ 0.871595f, 0.871642f, 0.871689f, 0.871736f, 0.871783f, 0.871830f, 0.871877f, 0.871924f,
+ 0.871971f, 0.872018f, 0.872065f, 0.872112f, 0.872159f, 0.872205f, 0.872252f, 0.872299f,
+ 0.872346f, 0.872393f, 0.872440f, 0.872487f, 0.872534f, 0.872580f, 0.872627f, 0.872674f,
+ 0.872721f, 0.872768f, 0.872814f, 0.872861f, 0.872908f, 0.872955f, 0.873001f, 0.873048f,
+ 0.873095f, 0.873142f, 0.873188f, 0.873235f, 0.873282f, 0.873329f, 0.873375f, 0.873422f,
+ 0.873469f, 0.873515f, 0.873562f, 0.873609f, 0.873655f, 0.873702f, 0.873749f, 0.873795f,
+ 0.873842f, 0.873888f, 0.873935f, 0.873982f, 0.874028f, 0.874075f, 0.874121f, 0.874168f,
+ 0.874215f, 0.874261f, 0.874308f, 0.874354f, 0.874401f, 0.874447f, 0.874494f, 0.874540f,
+ 0.874587f, 0.874633f, 0.874680f, 0.874726f, 0.874773f, 0.874819f, 0.874865f, 0.874912f,
+ 0.874958f, 0.875005f, 0.875051f, 0.875098f, 0.875144f, 0.875190f, 0.875237f, 0.875283f,
+ 0.875329f, 0.875376f, 0.875422f, 0.875468f, 0.875515f, 0.875561f, 0.875607f, 0.875654f,
+ 0.875700f, 0.875746f, 0.875793f, 0.875839f, 0.875885f, 0.875931f, 0.875978f, 0.876024f,
+ 0.876070f, 0.876116f, 0.876163f, 0.876209f, 0.876255f, 0.876301f, 0.876347f, 0.876393f,
+ 0.876440f, 0.876486f, 0.876532f, 0.876578f, 0.876624f, 0.876670f, 0.876716f, 0.876763f,
+ 0.876809f, 0.876855f, 0.876901f, 0.876947f, 0.876993f, 0.877039f, 0.877085f, 0.877131f,
+ 0.877177f, 0.877223f, 0.877269f, 0.877315f, 0.877361f, 0.877407f, 0.877453f, 0.877499f,
+ 0.877545f, 0.877591f, 0.877637f, 0.877683f, 0.877729f, 0.877775f, 0.877821f, 0.877867f,
+ 0.877913f, 0.877959f, 0.878005f, 0.878051f, 0.878096f, 0.878142f, 0.878188f, 0.878234f,
+ 0.878280f, 0.878326f, 0.878371f, 0.878417f, 0.878463f, 0.878509f, 0.878555f, 0.878600f,
+ 0.878646f, 0.878692f, 0.878738f, 0.878784f, 0.878829f, 0.878875f, 0.878921f, 0.878967f,
+ 0.879012f, 0.879058f, 0.879104f, 0.879149f, 0.879195f, 0.879241f, 0.879286f, 0.879332f,
+ 0.879378f, 0.879423f, 0.879469f, 0.879515f, 0.879560f, 0.879606f, 0.879651f, 0.879697f,
+ 0.879743f, 0.879788f, 0.879834f, 0.879879f, 0.879925f, 0.879970f, 0.880016f, 0.880061f,
+ 0.880107f, 0.880153f, 0.880198f, 0.880244f, 0.880289f, 0.880334f, 0.880380f, 0.880425f,
+ 0.880471f, 0.880516f, 0.880562f, 0.880607f, 0.880653f, 0.880698f, 0.880743f, 0.880789f,
+ 0.880834f, 0.880880f, 0.880925f, 0.880970f, 0.881016f, 0.881061f, 0.881106f, 0.881152f,
+ 0.881197f, 0.881242f, 0.881288f, 0.881333f, 0.881378f, 0.881424f, 0.881469f, 0.881514f,
+ 0.881559f, 0.881605f, 0.881650f, 0.881695f, 0.881740f, 0.881786f, 0.881831f, 0.881876f,
+ 0.881921f, 0.881966f, 0.882012f, 0.882057f, 0.882102f, 0.882147f, 0.882192f, 0.882237f,
+ 0.882283f, 0.882328f, 0.882373f, 0.882418f, 0.882463f, 0.882508f, 0.882553f, 0.882598f,
+ 0.882643f, 0.882688f, 0.882733f, 0.882779f, 0.882824f, 0.882869f, 0.882914f, 0.882959f,
+ 0.883004f, 0.883049f, 0.883094f, 0.883139f, 0.883184f, 0.883228f, 0.883273f, 0.883318f,
+ 0.883363f, 0.883408f, 0.883453f, 0.883498f, 0.883543f, 0.883588f, 0.883633f, 0.883678f,
+ 0.883723f, 0.883767f, 0.883812f, 0.883857f, 0.883902f, 0.883947f, 0.883992f, 0.884036f,
+ 0.884081f, 0.884126f, 0.884171f, 0.884216f, 0.884260f, 0.884305f, 0.884350f, 0.884395f,
+ 0.884439f, 0.884484f, 0.884529f, 0.884574f, 0.884618f, 0.884663f, 0.884708f, 0.884752f,
+ 0.884797f, 0.884842f, 0.884886f, 0.884931f, 0.884976f, 0.885020f, 0.885065f, 0.885110f,
+ 0.885154f, 0.885199f, 0.885243f, 0.885288f, 0.885333f, 0.885377f, 0.885422f, 0.885466f,
+ 0.885511f, 0.885555f, 0.885600f, 0.885644f, 0.885689f, 0.885733f, 0.885778f, 0.885822f,
+ 0.885867f, 0.885911f, 0.885956f, 0.886000f, 0.886045f, 0.886089f, 0.886134f, 0.886178f,
+ 0.886223f, 0.886267f, 0.886311f, 0.886356f, 0.886400f, 0.886445f, 0.886489f, 0.886533f,
+ 0.886578f, 0.886622f, 0.886666f, 0.886711f, 0.886755f, 0.886799f, 0.886844f, 0.886888f,
+ 0.886932f, 0.886976f, 0.887021f, 0.887065f, 0.887109f, 0.887153f, 0.887198f, 0.887242f,
+ 0.887286f, 0.887330f, 0.887375f, 0.887419f, 0.887463f, 0.887507f, 0.887551f, 0.887595f,
+ 0.887640f, 0.887684f, 0.887728f, 0.887772f, 0.887816f, 0.887860f, 0.887904f, 0.887949f,
+ 0.887993f, 0.888037f, 0.888081f, 0.888125f, 0.888169f, 0.888213f, 0.888257f, 0.888301f,
+ 0.888345f, 0.888389f, 0.888433f, 0.888477f, 0.888521f, 0.888565f, 0.888609f, 0.888653f,
+ 0.888697f, 0.888741f, 0.888785f, 0.888829f, 0.888873f, 0.888917f, 0.888961f, 0.889004f,
+ 0.889048f, 0.889092f, 0.889136f, 0.889180f, 0.889224f, 0.889268f, 0.889312f, 0.889355f,
+ 0.889399f, 0.889443f, 0.889487f, 0.889531f, 0.889574f, 0.889618f, 0.889662f, 0.889706f,
+ 0.889750f, 0.889793f, 0.889837f, 0.889881f, 0.889925f, 0.889968f, 0.890012f, 0.890056f,
+ 0.890099f, 0.890143f, 0.890187f, 0.890230f, 0.890274f, 0.890318f, 0.890361f, 0.890405f,
+ 0.890449f, 0.890492f, 0.890536f, 0.890580f, 0.890623f, 0.890667f, 0.890710f, 0.890754f,
+ 0.890797f, 0.890841f, 0.890885f, 0.890928f, 0.890972f, 0.891015f, 0.891059f, 0.891102f,
+ 0.891146f, 0.891189f, 0.891233f, 0.891276f, 0.891320f, 0.891363f, 0.891407f, 0.891450f,
+ 0.891493f, 0.891537f, 0.891580f, 0.891624f, 0.891667f, 0.891711f, 0.891754f, 0.891797f,
+ 0.891841f, 0.891884f, 0.891927f, 0.891971f, 0.892014f, 0.892057f, 0.892101f, 0.892144f,
+ 0.892187f, 0.892231f, 0.892274f, 0.892317f, 0.892361f, 0.892404f, 0.892447f, 0.892490f,
+ 0.892534f, 0.892577f, 0.892620f, 0.892663f, 0.892706f, 0.892750f, 0.892793f, 0.892836f,
+ 0.892879f, 0.892922f, 0.892965f, 0.893009f, 0.893052f, 0.893095f, 0.893138f, 0.893181f,
+ 0.893224f, 0.893267f, 0.893310f, 0.893354f, 0.893397f, 0.893440f, 0.893483f, 0.893526f,
+ 0.893569f, 0.893612f, 0.893655f, 0.893698f, 0.893741f, 0.893784f, 0.893827f, 0.893870f,
+ 0.893913f, 0.893956f, 0.893999f, 0.894042f, 0.894085f, 0.894128f, 0.894171f, 0.894214f,
+ 0.894256f, 0.894299f, 0.894342f, 0.894385f, 0.894428f, 0.894471f, 0.894514f, 0.894557f,
+ 0.894599f, 0.894642f, 0.894685f, 0.894728f, 0.894771f, 0.894814f, 0.894856f, 0.894899f,
+ 0.894942f, 0.894985f, 0.895028f, 0.895070f, 0.895113f, 0.895156f, 0.895198f, 0.895241f,
+ 0.895284f, 0.895327f, 0.895369f, 0.895412f, 0.895455f, 0.895497f, 0.895540f, 0.895583f,
+ 0.895625f, 0.895668f, 0.895711f, 0.895753f, 0.895796f, 0.895838f, 0.895881f, 0.895924f,
+ 0.895966f, 0.896009f, 0.896051f, 0.896094f, 0.896137f, 0.896179f, 0.896222f, 0.896264f,
+ 0.896307f, 0.896349f, 0.896392f, 0.896434f, 0.896477f, 0.896519f, 0.896562f, 0.896604f,
+ 0.896646f, 0.896689f, 0.896731f, 0.896774f, 0.896816f, 0.896859f, 0.896901f, 0.896943f,
+ 0.896986f, 0.897028f, 0.897071f, 0.897113f, 0.897155f, 0.897198f, 0.897240f, 0.897282f,
+ 0.897325f, 0.897367f, 0.897409f, 0.897452f, 0.897494f, 0.897536f, 0.897578f, 0.897621f,
+ 0.897663f, 0.897705f, 0.897747f, 0.897790f, 0.897832f, 0.897874f, 0.897916f, 0.897958f,
+ 0.898001f, 0.898043f, 0.898085f, 0.898127f, 0.898169f, 0.898211f, 0.898254f, 0.898296f,
+ 0.898338f, 0.898380f, 0.898422f, 0.898464f, 0.898506f, 0.898548f, 0.898590f, 0.898632f,
+ 0.898674f, 0.898717f, 0.898759f, 0.898801f, 0.898843f, 0.898885f, 0.898927f, 0.898969f,
+ 0.899011f, 0.899053f, 0.899095f, 0.899137f, 0.899179f, 0.899220f, 0.899262f, 0.899304f,
+ 0.899346f, 0.899388f, 0.899430f, 0.899472f, 0.899514f, 0.899556f, 0.899598f, 0.899639f,
+ 0.899681f, 0.899723f, 0.899765f, 0.899807f, 0.899849f, 0.899890f, 0.899932f, 0.899974f,
+ 0.900016f, 0.900058f, 0.900099f, 0.900141f, 0.900183f, 0.900225f, 0.900266f, 0.900308f,
+ 0.900350f, 0.900392f, 0.900433f, 0.900475f, 0.900517f, 0.900558f, 0.900600f, 0.900642f,
+ 0.900683f, 0.900725f, 0.900767f, 0.900808f, 0.900850f, 0.900892f, 0.900933f, 0.900975f,
+ 0.901016f, 0.901058f, 0.901100f, 0.901141f, 0.901183f, 0.901224f, 0.901266f, 0.901307f,
+ 0.901349f, 0.901390f, 0.901432f, 0.901473f, 0.901515f, 0.901556f, 0.901598f, 0.901639f,
+ 0.901681f, 0.901722f, 0.901764f, 0.901805f, 0.901847f, 0.901888f, 0.901929f, 0.901971f,
+ 0.902012f, 0.902054f, 0.902095f, 0.902136f, 0.902178f, 0.902219f, 0.902260f, 0.902302f,
+ 0.902343f, 0.902384f, 0.902426f, 0.902467f, 0.902508f, 0.902550f, 0.902591f, 0.902632f,
+ 0.902673f, 0.902715f, 0.902756f, 0.902797f, 0.902838f, 0.902879f, 0.902921f, 0.902962f,
+ 0.903003f, 0.903044f, 0.903085f, 0.903127f, 0.903168f, 0.903209f, 0.903250f, 0.903291f,
+ 0.903332f, 0.903373f, 0.903415f, 0.903456f, 0.903497f, 0.903538f, 0.903579f, 0.903620f,
+ 0.903661f, 0.903702f, 0.903743f, 0.903784f, 0.903825f, 0.903866f, 0.903907f, 0.903948f,
+ 0.903989f, 0.904030f, 0.904071f, 0.904112f, 0.904153f, 0.904194f, 0.904235f, 0.904276f,
+ 0.904317f, 0.904358f, 0.904399f, 0.904440f, 0.904481f, 0.904521f, 0.904562f, 0.904603f,
+ 0.904644f, 0.904685f, 0.904726f, 0.904767f, 0.904807f, 0.904848f, 0.904889f, 0.904930f,
+ 0.904971f, 0.905011f, 0.905052f, 0.905093f, 0.905134f, 0.905175f, 0.905215f, 0.905256f,
+ 0.905297f, 0.905337f, 0.905378f, 0.905419f, 0.905460f, 0.905500f, 0.905541f, 0.905582f,
+ 0.905622f, 0.905663f, 0.905704f, 0.905744f, 0.905785f, 0.905825f, 0.905866f, 0.905907f,
+ 0.905947f, 0.905988f, 0.906028f, 0.906069f, 0.906110f, 0.906150f, 0.906191f, 0.906231f,
+ 0.906272f, 0.906312f, 0.906353f, 0.906393f, 0.906434f, 0.906474f, 0.906515f, 0.906555f,
+ 0.906596f, 0.906636f, 0.906677f, 0.906717f, 0.906757f, 0.906798f, 0.906838f, 0.906879f,
+ 0.906919f, 0.906959f, 0.907000f, 0.907040f, 0.907081f, 0.907121f, 0.907161f, 0.907202f,
+ 0.907242f, 0.907282f, 0.907323f, 0.907363f, 0.907403f, 0.907444f, 0.907484f, 0.907524f,
+ 0.907564f, 0.907605f, 0.907645f, 0.907685f, 0.907725f, 0.907766f, 0.907806f, 0.907846f,
+ 0.907886f, 0.907926f, 0.907966f, 0.908007f, 0.908047f, 0.908087f, 0.908127f, 0.908167f,
+ 0.908207f, 0.908248f, 0.908288f, 0.908328f, 0.908368f, 0.908408f, 0.908448f, 0.908488f,
+ 0.908528f, 0.908568f, 0.908608f, 0.908648f, 0.908688f, 0.908728f, 0.908768f, 0.908808f,
+ 0.908848f, 0.908888f, 0.908928f, 0.908968f, 0.909008f, 0.909048f, 0.909088f, 0.909128f,
+ 0.909168f, 0.909208f, 0.909248f, 0.909288f, 0.909328f, 0.909368f, 0.909407f, 0.909447f,
+ 0.909487f, 0.909527f, 0.909567f, 0.909607f, 0.909646f, 0.909686f, 0.909726f, 0.909766f,
+ 0.909806f, 0.909845f, 0.909885f, 0.909925f, 0.909965f, 0.910005f, 0.910044f, 0.910084f,
+ 0.910124f, 0.910163f, 0.910203f, 0.910243f, 0.910283f, 0.910322f, 0.910362f, 0.910402f,
+ 0.910441f, 0.910481f, 0.910521f, 0.910560f, 0.910600f, 0.910639f, 0.910679f, 0.910719f,
+ 0.910758f, 0.910798f, 0.910837f, 0.910877f, 0.910917f, 0.910956f, 0.910996f, 0.911035f,
+ 0.911075f, 0.911114f, 0.911154f, 0.911193f, 0.911233f, 0.911272f, 0.911312f, 0.911351f,
+ 0.911391f, 0.911430f, 0.911470f, 0.911509f, 0.911548f, 0.911588f, 0.911627f, 0.911667f,
+ 0.911706f, 0.911745f, 0.911785f, 0.911824f, 0.911864f, 0.911903f, 0.911942f, 0.911982f,
+ 0.912021f, 0.912060f, 0.912099f, 0.912139f, 0.912178f, 0.912217f, 0.912257f, 0.912296f,
+ 0.912335f, 0.912374f, 0.912414f, 0.912453f, 0.912492f, 0.912531f, 0.912571f, 0.912610f,
+ 0.912649f, 0.912688f, 0.912727f, 0.912766f, 0.912806f, 0.912845f, 0.912884f, 0.912923f,
+ 0.912962f, 0.913001f, 0.913040f, 0.913080f, 0.913119f, 0.913158f, 0.913197f, 0.913236f,
+ 0.913275f, 0.913314f, 0.913353f, 0.913392f, 0.913431f, 0.913470f, 0.913509f, 0.913548f,
+ 0.913587f, 0.913626f, 0.913665f, 0.913704f, 0.913743f, 0.913782f, 0.913821f, 0.913860f,
+ 0.913899f, 0.913938f, 0.913976f, 0.914015f, 0.914054f, 0.914093f, 0.914132f, 0.914171f,
+ 0.914210f, 0.914249f, 0.914287f, 0.914326f, 0.914365f, 0.914404f, 0.914443f, 0.914482f,
+ 0.914520f, 0.914559f, 0.914598f, 0.914637f, 0.914675f, 0.914714f, 0.914753f, 0.914792f,
+ 0.914830f, 0.914869f, 0.914908f, 0.914946f, 0.914985f, 0.915024f, 0.915062f, 0.915101f,
+ 0.915140f, 0.915178f, 0.915217f, 0.915256f, 0.915294f, 0.915333f, 0.915372f, 0.915410f,
+ 0.915449f, 0.915487f, 0.915526f, 0.915564f, 0.915603f, 0.915642f, 0.915680f, 0.915719f,
+ 0.915757f, 0.915796f, 0.915834f, 0.915873f, 0.915911f, 0.915950f, 0.915988f, 0.916027f,
+ 0.916065f, 0.916103f, 0.916142f, 0.916180f, 0.916219f, 0.916257f, 0.916296f, 0.916334f,
+ 0.916372f, 0.916411f, 0.916449f, 0.916487f, 0.916526f, 0.916564f, 0.916602f, 0.916641f,
+ 0.916679f, 0.916717f, 0.916756f, 0.916794f, 0.916832f, 0.916871f, 0.916909f, 0.916947f,
+ 0.916985f, 0.917024f, 0.917062f, 0.917100f, 0.917138f, 0.917176f, 0.917215f, 0.917253f,
+ 0.917291f, 0.917329f, 0.917367f, 0.917405f, 0.917444f, 0.917482f, 0.917520f, 0.917558f,
+ 0.917596f, 0.917634f, 0.917672f, 0.917710f, 0.917749f, 0.917787f, 0.917825f, 0.917863f,
+ 0.917901f, 0.917939f, 0.917977f, 0.918015f, 0.918053f, 0.918091f, 0.918129f, 0.918167f,
+ 0.918205f, 0.918243f, 0.918281f, 0.918319f, 0.918357f, 0.918395f, 0.918433f, 0.918471f,
+ 0.918508f, 0.918546f, 0.918584f, 0.918622f, 0.918660f, 0.918698f, 0.918736f, 0.918774f,
+ 0.918811f, 0.918849f, 0.918887f, 0.918925f, 0.918963f, 0.919001f, 0.919038f, 0.919076f,
+ 0.919114f, 0.919152f, 0.919189f, 0.919227f, 0.919265f, 0.919303f, 0.919340f, 0.919378f,
+ 0.919416f, 0.919453f, 0.919491f, 0.919529f, 0.919567f, 0.919604f, 0.919642f, 0.919680f,
+ 0.919717f, 0.919755f, 0.919792f, 0.919830f, 0.919868f, 0.919905f, 0.919943f, 0.919980f,
+ 0.920018f, 0.920056f, 0.920093f, 0.920131f, 0.920168f, 0.920206f, 0.920243f, 0.920281f,
+ 0.920318f, 0.920356f, 0.920393f, 0.920431f, 0.920468f, 0.920506f, 0.920543f, 0.920581f,
+ 0.920618f, 0.920655f, 0.920693f, 0.920730f, 0.920768f, 0.920805f, 0.920842f, 0.920880f,
+ 0.920917f, 0.920955f, 0.920992f, 0.921029f, 0.921067f, 0.921104f, 0.921141f, 0.921179f,
+ 0.921216f, 0.921253f, 0.921291f, 0.921328f, 0.921365f, 0.921402f, 0.921440f, 0.921477f,
+ 0.921514f, 0.921551f, 0.921588f, 0.921626f, 0.921663f, 0.921700f, 0.921737f, 0.921774f,
+ 0.921812f, 0.921849f, 0.921886f, 0.921923f, 0.921960f, 0.921997f, 0.922034f, 0.922072f,
+ 0.922109f, 0.922146f, 0.922183f, 0.922220f, 0.922257f, 0.922294f, 0.922331f, 0.922368f,
+ 0.922405f, 0.922442f, 0.922479f, 0.922516f, 0.922553f, 0.922590f, 0.922627f, 0.922664f,
+ 0.922701f, 0.922738f, 0.922775f, 0.922812f, 0.922849f, 0.922886f, 0.922923f, 0.922960f,
+ 0.922997f, 0.923033f, 0.923070f, 0.923107f, 0.923144f, 0.923181f, 0.923218f, 0.923255f,
+ 0.923291f, 0.923328f, 0.923365f, 0.923402f, 0.923439f, 0.923475f, 0.923512f, 0.923549f,
+ 0.923586f, 0.923622f, 0.923659f, 0.923696f, 0.923733f, 0.923769f, 0.923806f, 0.923843f,
+ 0.923880f, 0.923916f, 0.923953f, 0.923990f, 0.924026f, 0.924063f, 0.924100f, 0.924136f,
+ 0.924173f, 0.924209f, 0.924246f, 0.924283f, 0.924319f, 0.924356f, 0.924392f, 0.924429f,
+ 0.924465f, 0.924502f, 0.924539f, 0.924575f, 0.924612f, 0.924648f, 0.924685f, 0.924721f,
+ 0.924758f, 0.924794f, 0.924831f, 0.924867f, 0.924904f, 0.924940f, 0.924976f, 0.925013f,
+ 0.925049f, 0.925086f, 0.925122f, 0.925158f, 0.925195f, 0.925231f, 0.925268f, 0.925304f,
+ 0.925340f, 0.925377f, 0.925413f, 0.925449f, 0.925486f, 0.925522f, 0.925558f, 0.925595f,
+ 0.925631f, 0.925667f, 0.925703f, 0.925740f, 0.925776f, 0.925812f, 0.925848f, 0.925885f,
+ 0.925921f, 0.925957f, 0.925993f, 0.926029f, 0.926066f, 0.926102f, 0.926138f, 0.926174f,
+ 0.926210f, 0.926246f, 0.926283f, 0.926319f, 0.926355f, 0.926391f, 0.926427f, 0.926463f,
+ 0.926499f, 0.926535f, 0.926571f, 0.926607f, 0.926643f, 0.926679f, 0.926715f, 0.926751f,
+ 0.926787f, 0.926823f, 0.926859f, 0.926895f, 0.926931f, 0.926967f, 0.927003f, 0.927039f,
+ 0.927075f, 0.927111f, 0.927147f, 0.927183f, 0.927219f, 0.927255f, 0.927291f, 0.927327f,
+ 0.927363f, 0.927398f, 0.927434f, 0.927470f, 0.927506f, 0.927542f, 0.927578f, 0.927613f,
+ 0.927649f, 0.927685f, 0.927721f, 0.927757f, 0.927792f, 0.927828f, 0.927864f, 0.927900f,
+ 0.927935f, 0.927971f, 0.928007f, 0.928043f, 0.928078f, 0.928114f, 0.928150f, 0.928185f,
+ 0.928221f, 0.928257f, 0.928292f, 0.928328f, 0.928364f, 0.928399f, 0.928435f, 0.928470f,
+ 0.928506f, 0.928542f, 0.928577f, 0.928613f, 0.928648f, 0.928684f, 0.928720f, 0.928755f,
+ 0.928791f, 0.928826f, 0.928862f, 0.928897f, 0.928933f, 0.928968f, 0.929004f, 0.929039f,
+ 0.929075f, 0.929110f, 0.929146f, 0.929181f, 0.929216f, 0.929252f, 0.929287f, 0.929323f,
+ 0.929358f, 0.929393f, 0.929429f, 0.929464f, 0.929500f, 0.929535f, 0.929570f, 0.929606f,
+ 0.929641f, 0.929676f, 0.929712f, 0.929747f, 0.929782f, 0.929817f, 0.929853f, 0.929888f,
+ 0.929923f, 0.929958f, 0.929994f, 0.930029f, 0.930064f, 0.930099f, 0.930135f, 0.930170f,
+ 0.930205f, 0.930240f, 0.930275f, 0.930311f, 0.930346f, 0.930381f, 0.930416f, 0.930451f,
+ 0.930486f, 0.930521f, 0.930556f, 0.930592f, 0.930627f, 0.930662f, 0.930697f, 0.930732f,
+ 0.930767f, 0.930802f, 0.930837f, 0.930872f, 0.930907f, 0.930942f, 0.930977f, 0.931012f,
+ 0.931047f, 0.931082f, 0.931117f, 0.931152f, 0.931187f, 0.931222f, 0.931257f, 0.931292f,
+ 0.931327f, 0.931362f, 0.931397f, 0.931431f, 0.931466f, 0.931501f, 0.931536f, 0.931571f,
+ 0.931606f, 0.931641f, 0.931675f, 0.931710f, 0.931745f, 0.931780f, 0.931815f, 0.931849f,
+ 0.931884f, 0.931919f, 0.931954f, 0.931989f, 0.932023f, 0.932058f, 0.932093f, 0.932128f,
+ 0.932162f, 0.932197f, 0.932232f, 0.932266f, 0.932301f, 0.932336f, 0.932370f, 0.932405f,
+ 0.932440f, 0.932474f, 0.932509f, 0.932544f, 0.932578f, 0.932613f, 0.932647f, 0.932682f,
+ 0.932716f, 0.932751f, 0.932786f, 0.932820f, 0.932855f, 0.932889f, 0.932924f, 0.932958f,
+ 0.932993f, 0.933027f, 0.933062f, 0.933096f, 0.933131f, 0.933165f, 0.933200f, 0.933234f,
+ 0.933269f, 0.933303f, 0.933337f, 0.933372f, 0.933406f, 0.933441f, 0.933475f, 0.933509f,
+ 0.933544f, 0.933578f, 0.933612f, 0.933647f, 0.933681f, 0.933716f, 0.933750f, 0.933784f,
+ 0.933818f, 0.933853f, 0.933887f, 0.933921f, 0.933956f, 0.933990f, 0.934024f, 0.934058f,
+ 0.934093f, 0.934127f, 0.934161f, 0.934195f, 0.934229f, 0.934264f, 0.934298f, 0.934332f,
+ 0.934366f, 0.934400f, 0.934434f, 0.934469f, 0.934503f, 0.934537f, 0.934571f, 0.934605f,
+ 0.934639f, 0.934673f, 0.934707f, 0.934741f, 0.934775f, 0.934810f, 0.934844f, 0.934878f,
+ 0.934912f, 0.934946f, 0.934980f, 0.935014f, 0.935048f, 0.935082f, 0.935116f, 0.935150f,
+ 0.935184f, 0.935217f, 0.935251f, 0.935285f, 0.935319f, 0.935353f, 0.935387f, 0.935421f,
+ 0.935455f, 0.935489f, 0.935523f, 0.935556f, 0.935590f, 0.935624f, 0.935658f, 0.935692f,
+ 0.935726f, 0.935759f, 0.935793f, 0.935827f, 0.935861f, 0.935895f, 0.935928f, 0.935962f,
+ 0.935996f, 0.936030f, 0.936063f, 0.936097f, 0.936131f, 0.936165f, 0.936198f, 0.936232f,
+ 0.936266f, 0.936299f, 0.936333f, 0.936367f, 0.936400f, 0.936434f, 0.936468f, 0.936501f,
+ 0.936535f, 0.936568f, 0.936602f, 0.936636f, 0.936669f, 0.936703f, 0.936736f, 0.936770f,
+ 0.936803f, 0.936837f, 0.936871f, 0.936904f, 0.936938f, 0.936971f, 0.937005f, 0.937038f,
+ 0.937072f, 0.937105f, 0.937138f, 0.937172f, 0.937205f, 0.937239f, 0.937272f, 0.937306f,
+ 0.937339f, 0.937372f, 0.937406f, 0.937439f, 0.937473f, 0.937506f, 0.937539f, 0.937573f,
+ 0.937606f, 0.937639f, 0.937673f, 0.937706f, 0.937739f, 0.937773f, 0.937806f, 0.937839f,
+ 0.937872f, 0.937906f, 0.937939f, 0.937972f, 0.938005f, 0.938039f, 0.938072f, 0.938105f,
+ 0.938138f, 0.938171f, 0.938205f, 0.938238f, 0.938271f, 0.938304f, 0.938337f, 0.938370f,
+ 0.938404f, 0.938437f, 0.938470f, 0.938503f, 0.938536f, 0.938569f, 0.938602f, 0.938635f,
+ 0.938668f, 0.938701f, 0.938734f, 0.938767f, 0.938800f, 0.938833f, 0.938866f, 0.938900f,
+ 0.938932f, 0.938965f, 0.938998f, 0.939031f, 0.939064f, 0.939097f, 0.939130f, 0.939163f,
+ 0.939196f, 0.939229f, 0.939262f, 0.939295f, 0.939328f, 0.939361f, 0.939394f, 0.939426f,
+ 0.939459f, 0.939492f, 0.939525f, 0.939558f, 0.939591f, 0.939623f, 0.939656f, 0.939689f,
+ 0.939722f, 0.939755f, 0.939787f, 0.939820f, 0.939853f, 0.939886f, 0.939918f, 0.939951f,
+ 0.939984f, 0.940016f, 0.940049f, 0.940082f, 0.940115f, 0.940147f, 0.940180f, 0.940213f,
+ 0.940245f, 0.940278f, 0.940310f, 0.940343f, 0.940376f, 0.940408f, 0.940441f, 0.940473f,
+ 0.940506f, 0.940539f, 0.940571f, 0.940604f, 0.940636f, 0.940669f, 0.940701f, 0.940734f,
+ 0.940766f, 0.940799f, 0.940831f, 0.940864f, 0.940896f, 0.940929f, 0.940961f, 0.940994f,
+ 0.941026f, 0.941059f, 0.941091f, 0.941123f, 0.941156f, 0.941188f, 0.941221f, 0.941253f,
+ 0.941285f, 0.941318f, 0.941350f, 0.941382f, 0.941415f, 0.941447f, 0.941479f, 0.941512f,
+ 0.941544f, 0.941576f, 0.941609f, 0.941641f, 0.941673f, 0.941705f, 0.941738f, 0.941770f,
+ 0.941802f, 0.941834f, 0.941867f, 0.941899f, 0.941931f, 0.941963f, 0.941995f, 0.942028f,
+ 0.942060f, 0.942092f, 0.942124f, 0.942156f, 0.942188f, 0.942220f, 0.942253f, 0.942285f,
+ 0.942317f, 0.942349f, 0.942381f, 0.942413f, 0.942445f, 0.942477f, 0.942509f, 0.942541f,
+ 0.942573f, 0.942605f, 0.942637f, 0.942669f, 0.942701f, 0.942733f, 0.942765f, 0.942797f,
+ 0.942829f, 0.942861f, 0.942893f, 0.942925f, 0.942957f, 0.942989f, 0.943021f, 0.943053f,
+ 0.943084f, 0.943116f, 0.943148f, 0.943180f, 0.943212f, 0.943244f, 0.943276f, 0.943307f,
+ 0.943339f, 0.943371f, 0.943403f, 0.943435f, 0.943466f, 0.943498f, 0.943530f, 0.943562f,
+ 0.943593f, 0.943625f, 0.943657f, 0.943689f, 0.943720f, 0.943752f, 0.943784f, 0.943815f,
+ 0.943847f, 0.943879f, 0.943910f, 0.943942f, 0.943974f, 0.944005f, 0.944037f, 0.944069f,
+ 0.944100f, 0.944132f, 0.944163f, 0.944195f, 0.944227f, 0.944258f, 0.944290f, 0.944321f,
+ 0.944353f, 0.944384f, 0.944416f, 0.944447f, 0.944479f, 0.944510f, 0.944542f, 0.944573f,
+ 0.944605f, 0.944636f, 0.944668f, 0.944699f, 0.944731f, 0.944762f, 0.944793f, 0.944825f,
+ 0.944856f, 0.944888f, 0.944919f, 0.944950f, 0.944982f, 0.945013f, 0.945045f, 0.945076f,
+ 0.945107f, 0.945139f, 0.945170f, 0.945201f, 0.945232f, 0.945264f, 0.945295f, 0.945326f,
+ 0.945358f, 0.945389f, 0.945420f, 0.945451f, 0.945482f, 0.945514f, 0.945545f, 0.945576f,
+ 0.945607f, 0.945639f, 0.945670f, 0.945701f, 0.945732f, 0.945763f, 0.945794f, 0.945825f,
+ 0.945857f, 0.945888f, 0.945919f, 0.945950f, 0.945981f, 0.946012f, 0.946043f, 0.946074f,
+ 0.946105f, 0.946136f, 0.946167f, 0.946198f, 0.946229f, 0.946260f, 0.946291f, 0.946322f,
+ 0.946353f, 0.946384f, 0.946415f, 0.946446f, 0.946477f, 0.946508f, 0.946539f, 0.946570f,
+ 0.946601f, 0.946632f, 0.946663f, 0.946694f, 0.946724f, 0.946755f, 0.946786f, 0.946817f,
+ 0.946848f, 0.946879f, 0.946910f, 0.946940f, 0.946971f, 0.947002f, 0.947033f, 0.947064f,
+ 0.947094f, 0.947125f, 0.947156f, 0.947187f, 0.947217f, 0.947248f, 0.947279f, 0.947310f,
+ 0.947340f, 0.947371f, 0.947402f, 0.947432f, 0.947463f, 0.947494f, 0.947524f, 0.947555f,
+ 0.947586f, 0.947616f, 0.947647f, 0.947677f, 0.947708f, 0.947739f, 0.947769f, 0.947800f,
+ 0.947830f, 0.947861f, 0.947891f, 0.947922f, 0.947953f, 0.947983f, 0.948014f, 0.948044f,
+ 0.948075f, 0.948105f, 0.948136f, 0.948166f, 0.948196f, 0.948227f, 0.948257f, 0.948288f,
+ 0.948318f, 0.948349f, 0.948379f, 0.948409f, 0.948440f, 0.948470f, 0.948501f, 0.948531f,
+ 0.948561f, 0.948592f, 0.948622f, 0.948652f, 0.948683f, 0.948713f, 0.948743f, 0.948774f,
+ 0.948804f, 0.948834f, 0.948864f, 0.948895f, 0.948925f, 0.948955f, 0.948985f, 0.949016f,
+ 0.949046f, 0.949076f, 0.949106f, 0.949136f, 0.949167f, 0.949197f, 0.949227f, 0.949257f,
+ 0.949287f, 0.949317f, 0.949348f, 0.949378f, 0.949408f, 0.949438f, 0.949468f, 0.949498f,
+ 0.949528f, 0.949558f, 0.949588f, 0.949618f, 0.949648f, 0.949678f, 0.949708f, 0.949739f,
+ 0.949768f, 0.949798f, 0.949829f, 0.949858f, 0.949888f, 0.949918f, 0.949948f, 0.949978f,
+ 0.950008f, 0.950038f, 0.950068f, 0.950098f, 0.950128f, 0.950158f, 0.950188f, 0.950218f,
+ 0.950247f, 0.950277f, 0.950307f, 0.950337f, 0.950367f, 0.950397f, 0.950426f, 0.950456f,
+ 0.950486f, 0.950516f, 0.950546f, 0.950575f, 0.950605f, 0.950635f, 0.950665f, 0.950694f,
+ 0.950724f, 0.950754f, 0.950784f, 0.950813f, 0.950843f, 0.950873f, 0.950902f, 0.950932f,
+ 0.950962f, 0.950991f, 0.951021f, 0.951051f, 0.951080f, 0.951110f, 0.951139f, 0.951169f,
+ 0.951199f, 0.951228f, 0.951258f, 0.951287f, 0.951317f, 0.951346f, 0.951376f, 0.951406f,
+ 0.951435f, 0.951465f, 0.951494f, 0.951524f, 0.951553f, 0.951582f, 0.951612f, 0.951641f,
+ 0.951671f, 0.951700f, 0.951730f, 0.951759f, 0.951789f, 0.951818f, 0.951847f, 0.951877f,
+ 0.951906f, 0.951936f, 0.951965f, 0.951994f, 0.952024f, 0.952053f, 0.952082f, 0.952112f,
+ 0.952141f, 0.952170f, 0.952199f, 0.952229f, 0.952258f, 0.952287f, 0.952317f, 0.952346f,
+ 0.952375f, 0.952404f, 0.952433f, 0.952463f, 0.952492f, 0.952521f, 0.952550f, 0.952579f,
+ 0.952609f, 0.952638f, 0.952667f, 0.952696f, 0.952725f, 0.952754f, 0.952783f, 0.952813f,
+ 0.952842f, 0.952871f, 0.952900f, 0.952929f, 0.952958f, 0.952987f, 0.953016f, 0.953045f,
+ 0.953074f, 0.953103f, 0.953132f, 0.953161f, 0.953190f, 0.953219f, 0.953248f, 0.953277f,
+ 0.953306f, 0.953335f, 0.953364f, 0.953393f, 0.953422f, 0.953451f, 0.953480f, 0.953508f,
+ 0.953537f, 0.953566f, 0.953595f, 0.953624f, 0.953653f, 0.953682f, 0.953711f, 0.953739f,
+ 0.953768f, 0.953797f, 0.953826f, 0.953855f, 0.953883f, 0.953912f, 0.953941f, 0.953970f,
+ 0.953998f, 0.954027f, 0.954056f, 0.954085f, 0.954113f, 0.954142f, 0.954171f, 0.954199f,
+ 0.954228f, 0.954257f, 0.954285f, 0.954314f, 0.954343f, 0.954371f, 0.954400f, 0.954429f,
+ 0.954457f, 0.954486f, 0.954514f, 0.954543f, 0.954572f, 0.954600f, 0.954629f, 0.954657f,
+ 0.954686f, 0.954714f, 0.954743f, 0.954771f, 0.954800f, 0.954828f, 0.954857f, 0.954885f,
+ 0.954914f, 0.954942f, 0.954971f, 0.954999f, 0.955028f, 0.955056f, 0.955084f, 0.955113f,
+ 0.955141f, 0.955170f, 0.955198f, 0.955226f, 0.955255f, 0.955283f, 0.955311f, 0.955340f,
+ 0.955368f, 0.955396f, 0.955425f, 0.955453f, 0.955481f, 0.955510f, 0.955538f, 0.955566f,
+ 0.955594f, 0.955623f, 0.955651f, 0.955679f, 0.955707f, 0.955736f, 0.955764f, 0.955792f,
+ 0.955820f, 0.955848f, 0.955876f, 0.955905f, 0.955933f, 0.955961f, 0.955989f, 0.956017f,
+ 0.956045f, 0.956073f, 0.956101f, 0.956130f, 0.956158f, 0.956186f, 0.956214f, 0.956242f,
+ 0.956270f, 0.956298f, 0.956326f, 0.956354f, 0.956382f, 0.956410f, 0.956438f, 0.956466f,
+ 0.956494f, 0.956522f, 0.956550f, 0.956578f, 0.956606f, 0.956634f, 0.956662f, 0.956689f,
+ 0.956717f, 0.956745f, 0.956773f, 0.956801f, 0.956829f, 0.956857f, 0.956885f, 0.956913f,
+ 0.956940f, 0.956968f, 0.956996f, 0.957024f, 0.957052f, 0.957079f, 0.957107f, 0.957135f,
+ 0.957163f, 0.957190f, 0.957218f, 0.957246f, 0.957274f, 0.957301f, 0.957329f, 0.957357f,
+ 0.957385f, 0.957412f, 0.957440f, 0.957468f, 0.957495f, 0.957523f, 0.957550f, 0.957578f,
+ 0.957606f, 0.957633f, 0.957661f, 0.957689f, 0.957716f, 0.957744f, 0.957771f, 0.957799f,
+ 0.957826f, 0.957854f, 0.957882f, 0.957909f, 0.957937f, 0.957964f, 0.957992f, 0.958019f,
+ 0.958046f, 0.958074f, 0.958101f, 0.958129f, 0.958156f, 0.958184f, 0.958211f, 0.958239f,
+ 0.958266f, 0.958293f, 0.958321f, 0.958348f, 0.958376f, 0.958403f, 0.958430f, 0.958458f,
+ 0.958485f, 0.958512f, 0.958540f, 0.958567f, 0.958594f, 0.958622f, 0.958649f, 0.958676f,
+ 0.958703f, 0.958731f, 0.958758f, 0.958785f, 0.958812f, 0.958840f, 0.958867f, 0.958894f,
+ 0.958921f, 0.958949f, 0.958976f, 0.959003f, 0.959030f, 0.959057f, 0.959084f, 0.959112f,
+ 0.959139f, 0.959166f, 0.959193f, 0.959220f, 0.959247f, 0.959274f, 0.959301f, 0.959328f,
+ 0.959355f, 0.959382f, 0.959409f, 0.959436f, 0.959463f, 0.959491f, 0.959518f, 0.959545f,
+ 0.959572f, 0.959598f, 0.959625f, 0.959652f, 0.959679f, 0.959706f, 0.959733f, 0.959760f,
+ 0.959787f, 0.959814f, 0.959841f, 0.959868f, 0.959895f, 0.959922f, 0.959948f, 0.959975f,
+ 0.960002f, 0.960029f, 0.960056f, 0.960083f, 0.960109f, 0.960136f, 0.960163f, 0.960190f,
+ 0.960217f, 0.960243f, 0.960270f, 0.960297f, 0.960324f, 0.960350f, 0.960377f, 0.960404f,
+ 0.960431f, 0.960457f, 0.960484f, 0.960511f, 0.960537f, 0.960564f, 0.960591f, 0.960617f,
+ 0.960644f, 0.960670f, 0.960697f, 0.960724f, 0.960750f, 0.960777f, 0.960804f, 0.960830f,
+ 0.960857f, 0.960883f, 0.960910f, 0.960936f, 0.960963f, 0.960989f, 0.961016f, 0.961042f,
+ 0.961069f, 0.961095f, 0.961122f, 0.961148f, 0.961175f, 0.961201f, 0.961228f, 0.961254f,
+ 0.961280f, 0.961307f, 0.961333f, 0.961360f, 0.961386f, 0.961412f, 0.961439f, 0.961465f,
+ 0.961492f, 0.961518f, 0.961544f, 0.961571f, 0.961597f, 0.961623f, 0.961649f, 0.961676f,
+ 0.961702f, 0.961728f, 0.961755f, 0.961781f, 0.961807f, 0.961833f, 0.961860f, 0.961886f,
+ 0.961912f, 0.961938f, 0.961964f, 0.961991f, 0.962017f, 0.962043f, 0.962069f, 0.962095f,
+ 0.962121f, 0.962148f, 0.962174f, 0.962200f, 0.962226f, 0.962252f, 0.962278f, 0.962304f,
+ 0.962330f, 0.962356f, 0.962382f, 0.962408f, 0.962434f, 0.962460f, 0.962486f, 0.962512f,
+ 0.962538f, 0.962564f, 0.962590f, 0.962616f, 0.962642f, 0.962668f, 0.962694f, 0.962720f,
+ 0.962746f, 0.962772f, 0.962798f, 0.962824f, 0.962850f, 0.962876f, 0.962902f, 0.962927f,
+ 0.962953f, 0.962979f, 0.963005f, 0.963031f, 0.963057f, 0.963082f, 0.963108f, 0.963134f,
+ 0.963160f, 0.963186f, 0.963211f, 0.963237f, 0.963263f, 0.963289f, 0.963314f, 0.963340f,
+ 0.963366f, 0.963391f, 0.963417f, 0.963443f, 0.963469f, 0.963494f, 0.963520f, 0.963546f,
+ 0.963571f, 0.963597f, 0.963623f, 0.963648f, 0.963674f, 0.963699f, 0.963725f, 0.963750f,
+ 0.963776f, 0.963802f, 0.963827f, 0.963853f, 0.963878f, 0.963904f, 0.963929f, 0.963955f,
+ 0.963980f, 0.964006f, 0.964031f, 0.964057f, 0.964082f, 0.964108f, 0.964133f, 0.964159f,
+ 0.964184f, 0.964209f, 0.964235f, 0.964260f, 0.964286f, 0.964311f, 0.964336f, 0.964362f,
+ 0.964387f, 0.964413f, 0.964438f, 0.964463f, 0.964489f, 0.964514f, 0.964539f, 0.964565f,
+ 0.964590f, 0.964615f, 0.964640f, 0.964666f, 0.964691f, 0.964716f, 0.964741f, 0.964767f,
+ 0.964792f, 0.964817f, 0.964842f, 0.964867f, 0.964893f, 0.964918f, 0.964943f, 0.964968f,
+ 0.964993f, 0.965018f, 0.965044f, 0.965069f, 0.965094f, 0.965119f, 0.965144f, 0.965169f,
+ 0.965194f, 0.965219f, 0.965244f, 0.965269f, 0.965294f, 0.965319f, 0.965344f, 0.965369f,
+ 0.965394f, 0.965419f, 0.965444f, 0.965469f, 0.965494f, 0.965519f, 0.965544f, 0.965569f,
+ 0.965594f, 0.965619f, 0.965644f, 0.965669f, 0.965694f, 0.965719f, 0.965744f, 0.965769f,
+ 0.965793f, 0.965818f, 0.965843f, 0.965868f, 0.965893f, 0.965918f, 0.965942f, 0.965967f,
+ 0.965992f, 0.966017f, 0.966042f, 0.966066f, 0.966091f, 0.966116f, 0.966141f, 0.966165f,
+ 0.966190f, 0.966215f, 0.966239f, 0.966264f, 0.966289f, 0.966313f, 0.966338f, 0.966363f,
+ 0.966387f, 0.966412f, 0.966437f, 0.966461f, 0.966486f, 0.966511f, 0.966535f, 0.966560f,
+ 0.966584f, 0.966609f, 0.966633f, 0.966658f, 0.966683f, 0.966707f, 0.966732f, 0.966756f,
+ 0.966781f, 0.966805f, 0.966830f, 0.966854f, 0.966879f, 0.966903f, 0.966928f, 0.966952f,
+ 0.966976f, 0.967001f, 0.967025f, 0.967050f, 0.967074f, 0.967099f, 0.967123f, 0.967147f,
+ 0.967172f, 0.967196f, 0.967220f, 0.967245f, 0.967269f, 0.967293f, 0.967318f, 0.967342f,
+ 0.967366f, 0.967391f, 0.967415f, 0.967439f, 0.967463f, 0.967488f, 0.967512f, 0.967536f,
+ 0.967560f, 0.967585f, 0.967609f, 0.967633f, 0.967657f, 0.967681f, 0.967706f, 0.967730f,
+ 0.967754f, 0.967778f, 0.967802f, 0.967826f, 0.967850f, 0.967874f, 0.967899f, 0.967923f,
+ 0.967947f, 0.967971f, 0.967995f, 0.968019f, 0.968043f, 0.968067f, 0.968091f, 0.968115f,
+ 0.968139f, 0.968163f, 0.968187f, 0.968211f, 0.968235f, 0.968259f, 0.968283f, 0.968307f,
+ 0.968331f, 0.968355f, 0.968379f, 0.968403f, 0.968427f, 0.968450f, 0.968474f, 0.968498f,
+ 0.968522f, 0.968546f, 0.968570f, 0.968594f, 0.968617f, 0.968641f, 0.968665f, 0.968689f,
+ 0.968713f, 0.968737f, 0.968760f, 0.968784f, 0.968808f, 0.968832f, 0.968855f, 0.968879f,
+ 0.968903f, 0.968927f, 0.968950f, 0.968974f, 0.968998f, 0.969021f, 0.969045f, 0.969069f,
+ 0.969092f, 0.969116f, 0.969140f, 0.969163f, 0.969187f, 0.969210f, 0.969234f, 0.969258f,
+ 0.969281f, 0.969305f, 0.969328f, 0.969352f, 0.969375f, 0.969399f, 0.969423f, 0.969446f,
+ 0.969470f, 0.969493f, 0.969517f, 0.969540f, 0.969564f, 0.969587f, 0.969611f, 0.969634f,
+ 0.969657f, 0.969681f, 0.969704f, 0.969728f, 0.969751f, 0.969774f, 0.969798f, 0.969821f,
+ 0.969845f, 0.969868f, 0.969891f, 0.969915f, 0.969938f, 0.969961f, 0.969985f, 0.970008f,
+ 0.970031f, 0.970055f, 0.970078f, 0.970101f, 0.970124f, 0.970148f, 0.970171f, 0.970194f,
+ 0.970217f, 0.970241f, 0.970264f, 0.970287f, 0.970310f, 0.970333f, 0.970357f, 0.970380f,
+ 0.970403f, 0.970426f, 0.970449f, 0.970472f, 0.970495f, 0.970518f, 0.970542f, 0.970565f,
+ 0.970588f, 0.970611f, 0.970634f, 0.970657f, 0.970680f, 0.970703f, 0.970726f, 0.970749f,
+ 0.970772f, 0.970795f, 0.970818f, 0.970841f, 0.970864f, 0.970887f, 0.970910f, 0.970933f,
+ 0.970956f, 0.970979f, 0.971002f, 0.971025f, 0.971048f, 0.971071f, 0.971093f, 0.971116f,
+ 0.971139f, 0.971162f, 0.971185f, 0.971208f, 0.971231f, 0.971253f, 0.971276f, 0.971299f,
+ 0.971322f, 0.971345f, 0.971367f, 0.971390f, 0.971413f, 0.971436f, 0.971458f, 0.971481f,
+ 0.971504f, 0.971527f, 0.971549f, 0.971572f, 0.971595f, 0.971617f, 0.971640f, 0.971663f,
+ 0.971685f, 0.971708f, 0.971731f, 0.971753f, 0.971776f, 0.971799f, 0.971821f, 0.971844f,
+ 0.971866f, 0.971889f, 0.971911f, 0.971934f, 0.971957f, 0.971979f, 0.972002f, 0.972024f,
+ 0.972047f, 0.972069f, 0.972092f, 0.972114f, 0.972137f, 0.972159f, 0.972182f, 0.972204f,
+ 0.972227f, 0.972249f, 0.972271f, 0.972294f, 0.972316f, 0.972339f, 0.972361f, 0.972383f,
+ 0.972406f, 0.972428f, 0.972450f, 0.972473f, 0.972495f, 0.972517f, 0.972540f, 0.972562f,
+ 0.972584f, 0.972607f, 0.972629f, 0.972651f, 0.972673f, 0.972696f, 0.972718f, 0.972740f,
+ 0.972762f, 0.972785f, 0.972807f, 0.972829f, 0.972851f, 0.972873f, 0.972896f, 0.972918f,
+ 0.972940f, 0.972962f, 0.972984f, 0.973006f, 0.973028f, 0.973051f, 0.973073f, 0.973095f,
+ 0.973117f, 0.973139f, 0.973161f, 0.973183f, 0.973205f, 0.973227f, 0.973249f, 0.973271f,
+ 0.973293f, 0.973315f, 0.973337f, 0.973359f, 0.973381f, 0.973403f, 0.973425f, 0.973447f,
+ 0.973469f, 0.973491f, 0.973513f, 0.973535f, 0.973557f, 0.973579f, 0.973601f, 0.973622f,
+ 0.973644f, 0.973666f, 0.973688f, 0.973710f, 0.973732f, 0.973753f, 0.973775f, 0.973797f,
+ 0.973819f, 0.973841f, 0.973862f, 0.973884f, 0.973906f, 0.973928f, 0.973949f, 0.973971f,
+ 0.973993f, 0.974015f, 0.974036f, 0.974058f, 0.974080f, 0.974101f, 0.974123f, 0.974145f,
+ 0.974166f, 0.974188f, 0.974210f, 0.974231f, 0.974253f, 0.974275f, 0.974296f, 0.974318f,
+ 0.974339f, 0.974361f, 0.974383f, 0.974404f, 0.974426f, 0.974447f, 0.974469f, 0.974490f,
+ 0.974512f, 0.974533f, 0.974555f, 0.974576f, 0.974598f, 0.974619f, 0.974641f, 0.974662f,
+ 0.974684f, 0.974705f, 0.974726f, 0.974748f, 0.974769f, 0.974791f, 0.974812f, 0.974833f,
+ 0.974855f, 0.974876f, 0.974897f, 0.974919f, 0.974940f, 0.974961f, 0.974983f, 0.975004f,
+ 0.975025f, 0.975047f, 0.975068f, 0.975089f, 0.975110f, 0.975132f, 0.975153f, 0.975174f,
+ 0.975195f, 0.975217f, 0.975238f, 0.975259f, 0.975280f, 0.975301f, 0.975323f, 0.975344f,
+ 0.975365f, 0.975386f, 0.975407f, 0.975428f, 0.975449f, 0.975471f, 0.975492f, 0.975513f,
+ 0.975534f, 0.975555f, 0.975576f, 0.975597f, 0.975618f, 0.975639f, 0.975660f, 0.975681f,
+ 0.975702f, 0.975723f, 0.975744f, 0.975765f, 0.975786f, 0.975807f, 0.975828f, 0.975849f,
+ 0.975870f, 0.975891f, 0.975912f, 0.975933f, 0.975954f, 0.975974f, 0.975995f, 0.976016f,
+ 0.976037f, 0.976058f, 0.976079f, 0.976100f, 0.976120f, 0.976141f, 0.976162f, 0.976183f,
+ 0.976204f, 0.976224f, 0.976245f, 0.976266f, 0.976287f, 0.976308f, 0.976328f, 0.976349f,
+ 0.976370f, 0.976390f, 0.976411f, 0.976432f, 0.976453f, 0.976473f, 0.976494f, 0.976515f,
+ 0.976535f, 0.976556f, 0.976576f, 0.976597f, 0.976618f, 0.976638f, 0.976659f, 0.976680f,
+ 0.976700f, 0.976721f, 0.976741f, 0.976762f, 0.976782f, 0.976803f, 0.976823f, 0.976844f,
+ 0.976864f, 0.976885f, 0.976905f, 0.976926f, 0.976946f, 0.976967f, 0.976987f, 0.977008f,
+ 0.977028f, 0.977049f, 0.977069f, 0.977089f, 0.977110f, 0.977130f, 0.977151f, 0.977171f,
+ 0.977191f, 0.977212f, 0.977232f, 0.977252f, 0.977273f, 0.977293f, 0.977313f, 0.977334f,
+ 0.977354f, 0.977374f, 0.977394f, 0.977415f, 0.977435f, 0.977455f, 0.977475f, 0.977496f,
+ 0.977516f, 0.977536f, 0.977556f, 0.977577f, 0.977597f, 0.977617f, 0.977637f, 0.977657f,
+ 0.977677f, 0.977697f, 0.977718f, 0.977738f, 0.977758f, 0.977778f, 0.977798f, 0.977818f,
+ 0.977838f, 0.977858f, 0.977878f, 0.977898f, 0.977918f, 0.977938f, 0.977959f, 0.977979f,
+ 0.977998f, 0.978019f, 0.978038f, 0.978058f, 0.978078f, 0.978098f, 0.978118f, 0.978138f,
+ 0.978158f, 0.978178f, 0.978198f, 0.978218f, 0.978238f, 0.978258f, 0.978278f, 0.978298f,
+ 0.978317f, 0.978337f, 0.978357f, 0.978377f, 0.978397f, 0.978417f, 0.978436f, 0.978456f,
+ 0.978476f, 0.978496f, 0.978516f, 0.978535f, 0.978555f, 0.978575f, 0.978594f, 0.978614f,
+ 0.978634f, 0.978654f, 0.978673f, 0.978693f, 0.978713f, 0.978732f, 0.978752f, 0.978772f,
+ 0.978791f, 0.978811f, 0.978831f, 0.978850f, 0.978870f, 0.978889f, 0.978909f, 0.978929f,
+ 0.978948f, 0.978968f, 0.978987f, 0.979007f, 0.979026f, 0.979046f, 0.979065f, 0.979085f,
+ 0.979104f, 0.979124f, 0.979143f, 0.979163f, 0.979182f, 0.979202f, 0.979221f, 0.979241f,
+ 0.979260f, 0.979280f, 0.979299f, 0.979318f, 0.979338f, 0.979357f, 0.979376f, 0.979396f,
+ 0.979415f, 0.979435f, 0.979454f, 0.979473f, 0.979493f, 0.979512f, 0.979531f, 0.979550f,
+ 0.979570f, 0.979589f, 0.979608f, 0.979628f, 0.979647f, 0.979666f, 0.979685f, 0.979704f,
+ 0.979724f, 0.979743f, 0.979762f, 0.979781f, 0.979800f, 0.979820f, 0.979839f, 0.979858f,
+ 0.979877f, 0.979896f, 0.979915f, 0.979934f, 0.979954f, 0.979973f, 0.979992f, 0.980011f,
+ 0.980030f, 0.980049f, 0.980068f, 0.980087f, 0.980106f, 0.980125f, 0.980144f, 0.980163f,
+ 0.980182f, 0.980201f, 0.980220f, 0.980239f, 0.980258f, 0.980277f, 0.980296f, 0.980315f,
+ 0.980334f, 0.980353f, 0.980372f, 0.980390f, 0.980409f, 0.980428f, 0.980447f, 0.980466f,
+ 0.980485f, 0.980504f, 0.980523f, 0.980541f, 0.980560f, 0.980579f, 0.980598f, 0.980617f,
+ 0.980635f, 0.980654f, 0.980673f, 0.980692f, 0.980710f, 0.980729f, 0.980748f, 0.980767f,
+ 0.980785f, 0.980804f, 0.980823f, 0.980841f, 0.980860f, 0.980879f, 0.980897f, 0.980916f,
+ 0.980935f, 0.980953f, 0.980972f, 0.980990f, 0.981009f, 0.981028f, 0.981046f, 0.981065f,
+ 0.981083f, 0.981102f, 0.981120f, 0.981139f, 0.981158f, 0.981176f, 0.981195f, 0.981213f,
+ 0.981232f, 0.981250f, 0.981269f, 0.981287f, 0.981305f, 0.981324f, 0.981342f, 0.981361f,
+ 0.981379f, 0.981398f, 0.981416f, 0.981434f, 0.981453f, 0.981471f, 0.981490f, 0.981508f,
+ 0.981526f, 0.981545f, 0.981563f, 0.981581f, 0.981600f, 0.981618f, 0.981636f, 0.981654f,
+ 0.981673f, 0.981691f, 0.981709f, 0.981727f, 0.981746f, 0.981764f, 0.981782f, 0.981800f,
+ 0.981819f, 0.981837f, 0.981855f, 0.981873f, 0.981891f, 0.981909f, 0.981928f, 0.981946f,
+ 0.981964f, 0.981982f, 0.982000f, 0.982018f, 0.982036f, 0.982054f, 0.982072f, 0.982091f,
+ 0.982109f, 0.982127f, 0.982145f, 0.982163f, 0.982181f, 0.982199f, 0.982217f, 0.982235f,
+ 0.982253f, 0.982271f, 0.982289f, 0.982307f, 0.982325f, 0.982343f, 0.982360f, 0.982378f,
+ 0.982396f, 0.982414f, 0.982432f, 0.982450f, 0.982468f, 0.982486f, 0.982504f, 0.982521f,
+ 0.982539f, 0.982557f, 0.982575f, 0.982593f, 0.982611f, 0.982628f, 0.982646f, 0.982664f,
+ 0.982682f, 0.982699f, 0.982717f, 0.982735f, 0.982753f, 0.982770f, 0.982788f, 0.982806f,
+ 0.982824f, 0.982841f, 0.982859f, 0.982877f, 0.982894f, 0.982912f, 0.982930f, 0.982947f,
+ 0.982965f, 0.982982f, 0.983000f, 0.983018f, 0.983035f, 0.983053f, 0.983070f, 0.983088f,
+ 0.983105f, 0.983123f, 0.983141f, 0.983158f, 0.983176f, 0.983193f, 0.983211f, 0.983228f,
+ 0.983246f, 0.983263f, 0.983281f, 0.983298f, 0.983315f, 0.983333f, 0.983350f, 0.983368f,
+ 0.983385f, 0.983402f, 0.983420f, 0.983437f, 0.983455f, 0.983472f, 0.983489f, 0.983507f,
+ 0.983524f, 0.983541f, 0.983559f, 0.983576f, 0.983593f, 0.983611f, 0.983628f, 0.983645f,
+ 0.983662f, 0.983680f, 0.983697f, 0.983714f, 0.983731f, 0.983749f, 0.983766f, 0.983783f,
+ 0.983800f, 0.983817f, 0.983835f, 0.983852f, 0.983869f, 0.983886f, 0.983903f, 0.983920f,
+ 0.983937f, 0.983955f, 0.983972f, 0.983989f, 0.984006f, 0.984023f, 0.984040f, 0.984057f,
+ 0.984074f, 0.984091f, 0.984108f, 0.984125f, 0.984142f, 0.984159f, 0.984176f, 0.984193f,
+ 0.984210f, 0.984227f, 0.984244f, 0.984261f, 0.984278f, 0.984295f, 0.984312f, 0.984329f,
+ 0.984346f, 0.984362f, 0.984379f, 0.984396f, 0.984413f, 0.984430f, 0.984447f, 0.984464f,
+ 0.984480f, 0.984497f, 0.984514f, 0.984531f, 0.984548f, 0.984564f, 0.984581f, 0.984598f,
+ 0.984615f, 0.984632f, 0.984648f, 0.984665f, 0.984682f, 0.984698f, 0.984715f, 0.984732f,
+ 0.984748f, 0.984765f, 0.984782f, 0.984798f, 0.984815f, 0.984832f, 0.984848f, 0.984865f,
+ 0.984882f, 0.984898f, 0.984915f, 0.984931f, 0.984948f, 0.984965f, 0.984981f, 0.984998f,
+ 0.985014f, 0.985031f, 0.985047f, 0.985064f, 0.985080f, 0.985097f, 0.985113f, 0.985130f,
+ 0.985146f, 0.985163f, 0.985179f, 0.985196f, 0.985212f, 0.985228f, 0.985245f, 0.985261f,
+ 0.985278f, 0.985294f, 0.985310f, 0.985327f, 0.985343f, 0.985359f, 0.985376f, 0.985392f,
+ 0.985408f, 0.985425f, 0.985441f, 0.985457f, 0.985474f, 0.985490f, 0.985506f, 0.985523f,
+ 0.985539f, 0.985555f, 0.985571f, 0.985587f, 0.985604f, 0.985620f, 0.985636f, 0.985652f,
+ 0.985668f, 0.985685f, 0.985701f, 0.985717f, 0.985733f, 0.985749f, 0.985765f, 0.985781f,
+ 0.985798f, 0.985814f, 0.985830f, 0.985846f, 0.985862f, 0.985878f, 0.985894f, 0.985910f,
+ 0.985926f, 0.985942f, 0.985958f, 0.985974f, 0.985990f, 0.986006f, 0.986022f, 0.986038f,
+ 0.986054f, 0.986070f, 0.986086f, 0.986102f, 0.986118f, 0.986134f, 0.986150f, 0.986165f,
+ 0.986181f, 0.986197f, 0.986213f, 0.986229f, 0.986245f, 0.986261f, 0.986276f, 0.986292f,
+ 0.986308f, 0.986324f, 0.986340f, 0.986355f, 0.986371f, 0.986387f, 0.986403f, 0.986419f,
+ 0.986434f, 0.986450f, 0.986466f, 0.986481f, 0.986497f, 0.986513f, 0.986529f, 0.986544f,
+ 0.986560f, 0.986576f, 0.986591f, 0.986607f, 0.986623f, 0.986638f, 0.986654f, 0.986669f,
+ 0.986685f, 0.986701f, 0.986716f, 0.986732f, 0.986747f, 0.986763f, 0.986778f, 0.986794f,
+ 0.986809f, 0.986825f, 0.986840f, 0.986856f, 0.986871f, 0.986887f, 0.986902f, 0.986918f,
+ 0.986933f, 0.986949f, 0.986964f, 0.986980f, 0.986995f, 0.987010f, 0.987026f, 0.987041f,
+ 0.987057f, 0.987072f, 0.987087f, 0.987103f, 0.987118f, 0.987133f, 0.987149f, 0.987164f,
+ 0.987179f, 0.987195f, 0.987210f, 0.987225f, 0.987240f, 0.987256f, 0.987271f, 0.987286f,
+ 0.987301f, 0.987317f, 0.987332f, 0.987347f, 0.987362f, 0.987377f, 0.987393f, 0.987408f,
+ 0.987423f, 0.987438f, 0.987453f, 0.987468f, 0.987484f, 0.987499f, 0.987514f, 0.987529f,
+ 0.987544f, 0.987559f, 0.987574f, 0.987589f, 0.987604f, 0.987619f, 0.987634f, 0.987649f,
+ 0.987664f, 0.987679f, 0.987694f, 0.987709f, 0.987724f, 0.987739f, 0.987754f, 0.987769f,
+ 0.987784f, 0.987799f, 0.987814f, 0.987829f, 0.987844f, 0.987859f, 0.987874f, 0.987889f,
+ 0.987903f, 0.987918f, 0.987933f, 0.987948f, 0.987963f, 0.987978f, 0.987992f, 0.988007f,
+ 0.988022f, 0.988037f, 0.988052f, 0.988066f, 0.988081f, 0.988096f, 0.988111f, 0.988125f,
+ 0.988140f, 0.988155f, 0.988169f, 0.988184f, 0.988199f, 0.988214f, 0.988228f, 0.988243f,
+ 0.988258f, 0.988272f, 0.988287f, 0.988301f, 0.988316f, 0.988331f, 0.988345f, 0.988360f,
+ 0.988374f, 0.988389f, 0.988404f, 0.988418f, 0.988433f, 0.988447f, 0.988462f, 0.988476f,
+ 0.988491f, 0.988505f, 0.988520f, 0.988534f, 0.988549f, 0.988563f, 0.988578f, 0.988592f,
+ 0.988607f, 0.988621f, 0.988635f, 0.988650f, 0.988664f, 0.988679f, 0.988693f, 0.988707f,
+ 0.988722f, 0.988736f, 0.988750f, 0.988765f, 0.988779f, 0.988793f, 0.988808f, 0.988822f,
+ 0.988836f, 0.988851f, 0.988865f, 0.988879f, 0.988893f, 0.988908f, 0.988922f, 0.988936f,
+ 0.988950f, 0.988964f, 0.988979f, 0.988993f, 0.989007f, 0.989021f, 0.989035f, 0.989050f,
+ 0.989064f, 0.989078f, 0.989092f, 0.989106f, 0.989120f, 0.989134f, 0.989148f, 0.989162f,
+ 0.989177f, 0.989191f, 0.989205f, 0.989219f, 0.989233f, 0.989247f, 0.989261f, 0.989275f,
+ 0.989289f, 0.989303f, 0.989317f, 0.989331f, 0.989345f, 0.989359f, 0.989373f, 0.989386f,
+ 0.989400f, 0.989414f, 0.989428f, 0.989442f, 0.989456f, 0.989470f, 0.989484f, 0.989498f,
+ 0.989511f, 0.989525f, 0.989539f, 0.989553f, 0.989567f, 0.989581f, 0.989594f, 0.989608f,
+ 0.989622f, 0.989636f, 0.989650f, 0.989663f, 0.989677f, 0.989691f, 0.989704f, 0.989718f,
+ 0.989732f, 0.989746f, 0.989759f, 0.989773f, 0.989787f, 0.989800f, 0.989814f, 0.989828f,
+ 0.989841f, 0.989855f, 0.989869f, 0.989882f, 0.989896f, 0.989909f, 0.989923f, 0.989936f,
+ 0.989950f, 0.989964f, 0.989977f, 0.989991f, 0.990004f, 0.990018f, 0.990031f, 0.990045f,
+ 0.990058f, 0.990072f, 0.990085f, 0.990099f, 0.990112f, 0.990126f, 0.990139f, 0.990152f,
+ 0.990166f, 0.990179f, 0.990193f, 0.990206f, 0.990219f, 0.990233f, 0.990246f, 0.990259f,
+ 0.990273f, 0.990286f, 0.990299f, 0.990313f, 0.990326f, 0.990339f, 0.990353f, 0.990366f,
+ 0.990379f, 0.990393f, 0.990406f, 0.990419f, 0.990432f, 0.990445f, 0.990459f, 0.990472f,
+ 0.990485f, 0.990498f, 0.990511f, 0.990525f, 0.990538f, 0.990551f, 0.990564f, 0.990577f,
+ 0.990590f, 0.990603f, 0.990617f, 0.990630f, 0.990643f, 0.990656f, 0.990669f, 0.990682f,
+ 0.990695f, 0.990708f, 0.990721f, 0.990734f, 0.990747f, 0.990760f, 0.990773f, 0.990786f,
+ 0.990799f, 0.990812f, 0.990825f, 0.990838f, 0.990851f, 0.990864f, 0.990877f, 0.990890f,
+ 0.990903f, 0.990916f, 0.990928f, 0.990941f, 0.990954f, 0.990967f, 0.990980f, 0.990993f,
+ 0.991006f, 0.991018f, 0.991031f, 0.991044f, 0.991057f, 0.991070f, 0.991082f, 0.991095f,
+ 0.991108f, 0.991121f, 0.991133f, 0.991146f, 0.991159f, 0.991172f, 0.991184f, 0.991197f,
+ 0.991210f, 0.991222f, 0.991235f, 0.991248f, 0.991260f, 0.991273f, 0.991286f, 0.991298f,
+ 0.991311f, 0.991323f, 0.991336f, 0.991349f, 0.991361f, 0.991374f, 0.991386f, 0.991399f,
+ 0.991411f, 0.991424f, 0.991437f, 0.991449f, 0.991462f, 0.991474f, 0.991487f, 0.991499f,
+ 0.991511f, 0.991524f, 0.991536f, 0.991549f, 0.991561f, 0.991574f, 0.991586f, 0.991598f,
+ 0.991611f, 0.991623f, 0.991636f, 0.991648f, 0.991660f, 0.991673f, 0.991685f, 0.991697f,
+ 0.991710f, 0.991722f, 0.991734f, 0.991747f, 0.991759f, 0.991771f, 0.991783f, 0.991796f,
+ 0.991808f, 0.991820f, 0.991832f, 0.991845f, 0.991857f, 0.991869f, 0.991881f, 0.991894f,
+ 0.991906f, 0.991918f, 0.991930f, 0.991942f, 0.991954f, 0.991966f, 0.991979f, 0.991991f,
+ 0.992003f, 0.992015f, 0.992027f, 0.992039f, 0.992051f, 0.992063f, 0.992075f, 0.992087f,
+ 0.992099f, 0.992111f, 0.992123f, 0.992135f, 0.992147f, 0.992159f, 0.992171f, 0.992183f,
+ 0.992195f, 0.992207f, 0.992219f, 0.992231f, 0.992243f, 0.992255f, 0.992267f, 0.992279f,
+ 0.992291f, 0.992302f, 0.992314f, 0.992326f, 0.992338f, 0.992350f, 0.992362f, 0.992374f,
+ 0.992385f, 0.992397f, 0.992409f, 0.992421f, 0.992433f, 0.992444f, 0.992456f, 0.992468f,
+ 0.992480f, 0.992491f, 0.992503f, 0.992515f, 0.992526f, 0.992538f, 0.992550f, 0.992561f,
+ 0.992573f, 0.992585f, 0.992596f, 0.992608f, 0.992620f, 0.992631f, 0.992643f, 0.992655f,
+ 0.992666f, 0.992678f, 0.992689f, 0.992701f, 0.992712f, 0.992724f, 0.992736f, 0.992747f,
+ 0.992759f, 0.992770f, 0.992782f, 0.992793f, 0.992805f, 0.992816f, 0.992828f, 0.992839f,
+ 0.992850f, 0.992862f, 0.992873f, 0.992885f, 0.992896f, 0.992908f, 0.992919f, 0.992930f,
+ 0.992942f, 0.992953f, 0.992964f, 0.992976f, 0.992987f, 0.992998f, 0.993010f, 0.993021f,
+ 0.993032f, 0.993044f, 0.993055f, 0.993066f, 0.993077f, 0.993089f, 0.993100f, 0.993111f,
+ 0.993122f, 0.993134f, 0.993145f, 0.993156f, 0.993167f, 0.993178f, 0.993190f, 0.993201f,
+ 0.993212f, 0.993223f, 0.993234f, 0.993245f, 0.993257f, 0.993268f, 0.993279f, 0.993290f,
+ 0.993301f, 0.993312f, 0.993323f, 0.993334f, 0.993345f, 0.993356f, 0.993367f, 0.993378f,
+ 0.993389f, 0.993400f, 0.993411f, 0.993422f, 0.993433f, 0.993444f, 0.993455f, 0.993466f,
+ 0.993477f, 0.993488f, 0.993499f, 0.993510f, 0.993521f, 0.993532f, 0.993542f, 0.993553f,
+ 0.993564f, 0.993575f, 0.993586f, 0.993597f, 0.993608f, 0.993618f, 0.993629f, 0.993640f,
+ 0.993651f, 0.993662f, 0.993672f, 0.993683f, 0.993694f, 0.993705f, 0.993715f, 0.993726f,
+ 0.993737f, 0.993747f, 0.993758f, 0.993769f, 0.993779f, 0.993790f, 0.993801f, 0.993811f,
+ 0.993822f, 0.993833f, 0.993843f, 0.993854f, 0.993865f, 0.993875f, 0.993886f, 0.993896f,
+ 0.993907f, 0.993918f, 0.993928f, 0.993939f, 0.993949f, 0.993960f, 0.993970f, 0.993981f,
+ 0.993991f, 0.994002f, 0.994012f, 0.994023f, 0.994033f, 0.994044f, 0.994054f, 0.994064f,
+ 0.994075f, 0.994085f, 0.994096f, 0.994106f, 0.994116f, 0.994127f, 0.994137f, 0.994148f,
+ 0.994158f, 0.994168f, 0.994179f, 0.994189f, 0.994199f, 0.994210f, 0.994220f, 0.994230f,
+ 0.994240f, 0.994251f, 0.994261f, 0.994271f, 0.994281f, 0.994292f, 0.994302f, 0.994312f,
+ 0.994322f, 0.994333f, 0.994343f, 0.994353f, 0.994363f, 0.994373f, 0.994383f, 0.994394f,
+ 0.994404f, 0.994414f, 0.994424f, 0.994434f, 0.994444f, 0.994454f, 0.994464f, 0.994474f,
+ 0.994484f, 0.994494f, 0.994505f, 0.994515f, 0.994525f, 0.994535f, 0.994545f, 0.994555f,
+ 0.994565f, 0.994575f, 0.994585f, 0.994594f, 0.994604f, 0.994614f, 0.994624f, 0.994634f,
+ 0.994644f, 0.994654f, 0.994664f, 0.994674f, 0.994684f, 0.994694f, 0.994703f, 0.994713f,
+ 0.994723f, 0.994733f, 0.994743f, 0.994753f, 0.994762f, 0.994772f, 0.994782f, 0.994792f,
+ 0.994802f, 0.994811f, 0.994821f, 0.994831f, 0.994841f, 0.994850f, 0.994860f, 0.994870f,
+ 0.994879f, 0.994889f, 0.994899f, 0.994908f, 0.994918f, 0.994928f, 0.994937f, 0.994947f,
+ 0.994957f, 0.994966f, 0.994976f, 0.994985f, 0.994995f, 0.995005f, 0.995014f, 0.995024f,
+ 0.995033f, 0.995043f, 0.995052f, 0.995062f, 0.995071f, 0.995081f, 0.995090f, 0.995100f,
+ 0.995109f, 0.995119f, 0.995128f, 0.995138f, 0.995147f, 0.995156f, 0.995166f, 0.995175f,
+ 0.995185f, 0.995194f, 0.995203f, 0.995213f, 0.995222f, 0.995232f, 0.995241f, 0.995250f,
+ 0.995260f, 0.995269f, 0.995278f, 0.995288f, 0.995297f, 0.995306f, 0.995315f, 0.995325f,
+ 0.995334f, 0.995343f, 0.995352f, 0.995362f, 0.995371f, 0.995380f, 0.995389f, 0.995398f,
+ 0.995408f, 0.995417f, 0.995426f, 0.995435f, 0.995444f, 0.995453f, 0.995463f, 0.995472f,
+ 0.995481f, 0.995490f, 0.995499f, 0.995508f, 0.995517f, 0.995526f, 0.995535f, 0.995544f,
+ 0.995553f, 0.995562f, 0.995571f, 0.995580f, 0.995589f, 0.995598f, 0.995607f, 0.995616f,
+ 0.995625f, 0.995634f, 0.995643f, 0.995652f, 0.995661f, 0.995670f, 0.995679f, 0.995688f,
+ 0.995697f, 0.995705f, 0.995714f, 0.995723f, 0.995732f, 0.995741f, 0.995750f, 0.995759f,
+ 0.995767f, 0.995776f, 0.995785f, 0.995794f, 0.995803f, 0.995811f, 0.995820f, 0.995829f,
+ 0.995838f, 0.995846f, 0.995855f, 0.995864f, 0.995872f, 0.995881f, 0.995890f, 0.995899f,
+ 0.995907f, 0.995916f, 0.995925f, 0.995933f, 0.995942f, 0.995950f, 0.995959f, 0.995968f,
+ 0.995976f, 0.995985f, 0.995993f, 0.996002f, 0.996011f, 0.996019f, 0.996028f, 0.996036f,
+ 0.996045f, 0.996053f, 0.996062f, 0.996070f, 0.996079f, 0.996087f, 0.996096f, 0.996104f,
+ 0.996113f, 0.996121f, 0.996129f, 0.996138f, 0.996146f, 0.996155f, 0.996163f, 0.996171f,
+ 0.996180f, 0.996188f, 0.996197f, 0.996205f, 0.996213f, 0.996222f, 0.996230f, 0.996238f,
+ 0.996247f, 0.996255f, 0.996263f, 0.996271f, 0.996280f, 0.996288f, 0.996296f, 0.996304f,
+ 0.996313f, 0.996321f, 0.996329f, 0.996337f, 0.996345f, 0.996354f, 0.996362f, 0.996370f,
+ 0.996378f, 0.996386f, 0.996394f, 0.996403f, 0.996411f, 0.996419f, 0.996427f, 0.996435f,
+ 0.996443f, 0.996451f, 0.996459f, 0.996467f, 0.996475f, 0.996483f, 0.996491f, 0.996499f,
+ 0.996507f, 0.996515f, 0.996523f, 0.996531f, 0.996539f, 0.996547f, 0.996555f, 0.996563f,
+ 0.996571f, 0.996579f, 0.996587f, 0.996595f, 0.996603f, 0.996611f, 0.996619f, 0.996626f,
+ 0.996634f, 0.996642f, 0.996650f, 0.996658f, 0.996666f, 0.996674f, 0.996681f, 0.996689f,
+ 0.996697f, 0.996705f, 0.996712f, 0.996720f, 0.996728f, 0.996736f, 0.996743f, 0.996751f,
+ 0.996759f, 0.996767f, 0.996774f, 0.996782f, 0.996790f, 0.996797f, 0.996805f, 0.996813f,
+ 0.996820f, 0.996828f, 0.996836f, 0.996843f, 0.996851f, 0.996858f, 0.996866f, 0.996874f,
+ 0.996881f, 0.996889f, 0.996896f, 0.996904f, 0.996911f, 0.996919f, 0.996926f, 0.996934f,
+ 0.996941f, 0.996949f, 0.996956f, 0.996964f, 0.996971f, 0.996979f, 0.996986f, 0.996994f,
+ 0.997001f, 0.997008f, 0.997016f, 0.997023f, 0.997031f, 0.997038f, 0.997045f, 0.997053f,
+ 0.997060f, 0.997067f, 0.997075f, 0.997082f, 0.997089f, 0.997097f, 0.997104f, 0.997111f,
+ 0.997119f, 0.997126f, 0.997133f, 0.997140f, 0.997148f, 0.997155f, 0.997162f, 0.997169f,
+ 0.997176f, 0.997184f, 0.997191f, 0.997198f, 0.997205f, 0.997212f, 0.997219f, 0.997227f,
+ 0.997234f, 0.997241f, 0.997248f, 0.997255f, 0.997262f, 0.997269f, 0.997276f, 0.997283f,
+ 0.997290f, 0.997298f, 0.997305f, 0.997312f, 0.997319f, 0.997326f, 0.997333f, 0.997340f,
+ 0.997347f, 0.997354f, 0.997361f, 0.997368f, 0.997374f, 0.997381f, 0.997388f, 0.997395f,
+ 0.997402f, 0.997409f, 0.997416f, 0.997423f, 0.997430f, 0.997437f, 0.997443f, 0.997450f,
+ 0.997457f, 0.997464f, 0.997471f, 0.997478f, 0.997484f, 0.997491f, 0.997498f, 0.997505f,
+ 0.997511f, 0.997518f, 0.997525f, 0.997532f, 0.997538f, 0.997545f, 0.997552f, 0.997559f,
+ 0.997565f, 0.997572f, 0.997579f, 0.997585f, 0.997592f, 0.997599f, 0.997605f, 0.997612f,
+ 0.997618f, 0.997625f, 0.997632f, 0.997638f, 0.997645f, 0.997651f, 0.997658f, 0.997665f,
+ 0.997671f, 0.997678f, 0.997684f, 0.997691f, 0.997697f, 0.997704f, 0.997710f, 0.997717f,
+ 0.997723f, 0.997730f, 0.997736f, 0.997742f, 0.997749f, 0.997755f, 0.997762f, 0.997768f,
+ 0.997774f, 0.997781f, 0.997787f, 0.997794f, 0.997800f, 0.997806f, 0.997813f, 0.997819f,
+ 0.997825f, 0.997832f, 0.997838f, 0.997844f, 0.997851f, 0.997857f, 0.997863f, 0.997869f,
+ 0.997876f, 0.997882f, 0.997888f, 0.997894f, 0.997901f, 0.997907f, 0.997913f, 0.997919f,
+ 0.997925f, 0.997931f, 0.997938f, 0.997944f, 0.997950f, 0.997956f, 0.997962f, 0.997968f,
+ 0.997974f, 0.997980f, 0.997987f, 0.997993f, 0.997999f, 0.998005f, 0.998011f, 0.998017f,
+ 0.998023f, 0.998029f, 0.998035f, 0.998041f, 0.998047f, 0.998053f, 0.998059f, 0.998065f,
+ 0.998071f, 0.998077f, 0.998083f, 0.998089f, 0.998094f, 0.998100f, 0.998106f, 0.998112f,
+ 0.998118f, 0.998124f, 0.998130f, 0.998136f, 0.998142f, 0.998147f, 0.998153f, 0.998159f,
+ 0.998165f, 0.998171f, 0.998176f, 0.998182f, 0.998188f, 0.998194f, 0.998200f, 0.998205f,
+ 0.998211f, 0.998217f, 0.998222f, 0.998228f, 0.998234f, 0.998240f, 0.998245f, 0.998251f,
+ 0.998257f, 0.998262f, 0.998268f, 0.998273f, 0.998279f, 0.998285f, 0.998290f, 0.998296f,
+ 0.998302f, 0.998307f, 0.998313f, 0.998318f, 0.998324f, 0.998329f, 0.998335f, 0.998340f,
+ 0.998346f, 0.998351f, 0.998357f, 0.998362f, 0.998368f, 0.998373f, 0.998379f, 0.998384f,
+ 0.998390f, 0.998395f, 0.998401f, 0.998406f, 0.998411f, 0.998417f, 0.998422f, 0.998428f,
+ 0.998433f, 0.998438f, 0.998444f, 0.998449f, 0.998454f, 0.998460f, 0.998465f, 0.998470f,
+ 0.998476f, 0.998481f, 0.998486f, 0.998491f, 0.998497f, 0.998502f, 0.998507f, 0.998512f,
+ 0.998518f, 0.998523f, 0.998528f, 0.998533f, 0.998538f, 0.998544f, 0.998549f, 0.998554f,
+ 0.998559f, 0.998564f, 0.998569f, 0.998574f, 0.998580f, 0.998585f, 0.998590f, 0.998595f,
+ 0.998600f, 0.998605f, 0.998610f, 0.998615f, 0.998620f, 0.998625f, 0.998630f, 0.998635f,
+ 0.998640f, 0.998645f, 0.998650f, 0.998655f, 0.998660f, 0.998665f, 0.998670f, 0.998675f,
+ 0.998680f, 0.998685f, 0.998690f, 0.998695f, 0.998700f, 0.998704f, 0.998709f, 0.998714f,
+ 0.998719f, 0.998724f, 0.998729f, 0.998734f, 0.998738f, 0.998743f, 0.998748f, 0.998753f,
+ 0.998758f, 0.998762f, 0.998767f, 0.998772f, 0.998777f, 0.998781f, 0.998786f, 0.998791f,
+ 0.998795f, 0.998800f, 0.998805f, 0.998810f, 0.998814f, 0.998819f, 0.998824f, 0.998828f,
+ 0.998833f, 0.998837f, 0.998842f, 0.998847f, 0.998851f, 0.998856f, 0.998860f, 0.998865f,
+ 0.998870f, 0.998874f, 0.998879f, 0.998883f, 0.998888f, 0.998892f, 0.998897f, 0.998901f,
+ 0.998906f, 0.998910f, 0.998915f, 0.998919f, 0.998924f, 0.998928f, 0.998932f, 0.998937f,
+ 0.998941f, 0.998946f, 0.998950f, 0.998954f, 0.998959f, 0.998963f, 0.998968f, 0.998972f,
+ 0.998976f, 0.998981f, 0.998985f, 0.998989f, 0.998994f, 0.998998f, 0.999002f, 0.999006f,
+ 0.999011f, 0.999015f, 0.999019f, 0.999023f, 0.999028f, 0.999032f, 0.999036f, 0.999040f,
+ 0.999044f, 0.999049f, 0.999053f, 0.999057f, 0.999061f, 0.999065f, 0.999069f, 0.999074f,
+ 0.999078f, 0.999082f, 0.999086f, 0.999090f, 0.999094f, 0.999098f, 0.999102f, 0.999106f,
+ 0.999110f, 0.999114f, 0.999118f, 0.999122f, 0.999126f, 0.999130f, 0.999134f, 0.999138f,
+ 0.999142f, 0.999146f, 0.999150f, 0.999154f, 0.999158f, 0.999162f, 0.999166f, 0.999170f,
+ 0.999174f, 0.999178f, 0.999182f, 0.999186f, 0.999189f, 0.999193f, 0.999197f, 0.999201f,
+ 0.999205f, 0.999209f, 0.999212f, 0.999216f, 0.999220f, 0.999224f, 0.999228f, 0.999231f,
+ 0.999235f, 0.999239f, 0.999243f, 0.999246f, 0.999250f, 0.999254f, 0.999257f, 0.999261f,
+ 0.999265f, 0.999268f, 0.999272f, 0.999276f, 0.999279f, 0.999283f, 0.999287f, 0.999290f,
+ 0.999294f, 0.999297f, 0.999301f, 0.999305f, 0.999308f, 0.999312f, 0.999315f, 0.999319f,
+ 0.999322f, 0.999326f, 0.999329f, 0.999333f, 0.999336f, 0.999340f, 0.999343f, 0.999347f,
+ 0.999350f, 0.999354f, 0.999357f, 0.999361f, 0.999364f, 0.999367f, 0.999371f, 0.999374f,
+ 0.999378f, 0.999381f, 0.999384f, 0.999388f, 0.999391f, 0.999394f, 0.999398f, 0.999401f,
+ 0.999404f, 0.999408f, 0.999411f, 0.999414f, 0.999418f, 0.999421f, 0.999424f, 0.999427f,
+ 0.999431f, 0.999434f, 0.999437f, 0.999440f, 0.999443f, 0.999447f, 0.999450f, 0.999453f,
+ 0.999456f, 0.999459f, 0.999462f, 0.999466f, 0.999469f, 0.999472f, 0.999475f, 0.999478f,
+ 0.999481f, 0.999484f, 0.999487f, 0.999490f, 0.999493f, 0.999497f, 0.999500f, 0.999503f,
+ 0.999506f, 0.999509f, 0.999512f, 0.999515f, 0.999518f, 0.999521f, 0.999524f, 0.999527f,
+ 0.999529f, 0.999532f, 0.999535f, 0.999538f, 0.999541f, 0.999544f, 0.999547f, 0.999550f,
+ 0.999553f, 0.999556f, 0.999558f, 0.999561f, 0.999564f, 0.999567f, 0.999570f, 0.999573f,
+ 0.999575f, 0.999578f, 0.999581f, 0.999584f, 0.999586f, 0.999589f, 0.999592f, 0.999595f,
+ 0.999597f, 0.999600f, 0.999603f, 0.999605f, 0.999608f, 0.999611f, 0.999614f, 0.999616f,
+ 0.999619f, 0.999621f, 0.999624f, 0.999627f, 0.999629f, 0.999632f, 0.999635f, 0.999637f,
+ 0.999640f, 0.999642f, 0.999645f, 0.999647f, 0.999650f, 0.999652f, 0.999655f, 0.999658f,
+ 0.999660f, 0.999663f, 0.999665f, 0.999667f, 0.999670f, 0.999672f, 0.999675f, 0.999677f,
+ 0.999680f, 0.999682f, 0.999685f, 0.999687f, 0.999689f, 0.999692f, 0.999694f, 0.999696f,
+ 0.999699f, 0.999701f, 0.999704f, 0.999706f, 0.999708f, 0.999710f, 0.999713f, 0.999715f,
+ 0.999717f, 0.999720f, 0.999722f, 0.999724f, 0.999726f, 0.999729f, 0.999731f, 0.999733f,
+ 0.999735f, 0.999738f, 0.999740f, 0.999742f, 0.999744f, 0.999746f, 0.999748f, 0.999750f,
+ 0.999753f, 0.999755f, 0.999757f, 0.999759f, 0.999761f, 0.999763f, 0.999765f, 0.999767f,
+ 0.999769f, 0.999771f, 0.999774f, 0.999776f, 0.999778f, 0.999780f, 0.999782f, 0.999784f,
+ 0.999786f, 0.999788f, 0.999790f, 0.999792f, 0.999793f, 0.999795f, 0.999797f, 0.999799f,
+ 0.999801f, 0.999803f, 0.999805f, 0.999807f, 0.999809f, 0.999811f, 0.999812f, 0.999814f,
+ 0.999816f, 0.999818f, 0.999820f, 0.999822f, 0.999823f, 0.999825f, 0.999827f, 0.999829f,
+ 0.999831f, 0.999832f, 0.999834f, 0.999836f, 0.999838f, 0.999839f, 0.999841f, 0.999843f,
+ 0.999844f, 0.999846f, 0.999848f, 0.999849f, 0.999851f, 0.999853f, 0.999854f, 0.999856f,
+ 0.999858f, 0.999859f, 0.999861f, 0.999862f, 0.999864f, 0.999866f, 0.999867f, 0.999869f,
+ 0.999870f, 0.999872f, 0.999873f, 0.999875f, 0.999876f, 0.999878f, 0.999879f, 0.999881f,
+ 0.999882f, 0.999884f, 0.999885f, 0.999887f, 0.999888f, 0.999890f, 0.999891f, 0.999892f,
+ 0.999894f, 0.999895f, 0.999897f, 0.999898f, 0.999899f, 0.999901f, 0.999902f, 0.999903f,
+ 0.999905f, 0.999906f, 0.999907f, 0.999909f, 0.999910f, 0.999911f, 0.999913f, 0.999914f,
+ 0.999915f, 0.999916f, 0.999917f, 0.999919f, 0.999920f, 0.999921f, 0.999922f, 0.999924f,
+ 0.999925f, 0.999926f, 0.999927f, 0.999928f, 0.999929f, 0.999930f, 0.999932f, 0.999933f,
+ 0.999934f, 0.999935f, 0.999936f, 0.999937f, 0.999938f, 0.999939f, 0.999940f, 0.999941f,
+ 0.999942f, 0.999943f, 0.999944f, 0.999945f, 0.999946f, 0.999947f, 0.999948f, 0.999949f,
+ 0.999950f, 0.999951f, 0.999952f, 0.999953f, 0.999954f, 0.999955f, 0.999956f, 0.999957f,
+ 0.999958f, 0.999959f, 0.999959f, 0.999960f, 0.999961f, 0.999962f, 0.999963f, 0.999964f,
+ 0.999964f, 0.999965f, 0.999966f, 0.999967f, 0.999968f, 0.999968f, 0.999969f, 0.999970f,
+ 0.999971f, 0.999971f, 0.999972f, 0.999973f, 0.999973f, 0.999974f, 0.999975f, 0.999976f,
+ 0.999976f, 0.999977f, 0.999977f, 0.999978f, 0.999979f, 0.999979f, 0.999980f, 0.999981f,
+ 0.999981f, 0.999982f, 0.999982f, 0.999983f, 0.999983f, 0.999984f, 0.999985f, 0.999985f,
+ 0.999986f, 0.999986f, 0.999987f, 0.999987f, 0.999988f, 0.999988f, 0.999988f, 0.999989f,
+ 0.999989f, 0.999990f, 0.999990f, 0.999991f, 0.999991f, 0.999991f, 0.999992f, 0.999992f,
+ 0.999993f, 0.999993f, 0.999993f, 0.999994f, 0.999994f, 0.999994f, 0.999995f, 0.999995f,
+ 0.999995f, 0.999996f, 0.999996f, 0.999996f, 0.999996f, 0.999997f, 0.999997f, 0.999997f,
+ 0.999997f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999998f, 0.999999f, 0.999999f,
+ 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 0.999999f, 1.000000f, 1.000000f,
+ 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+ 0.000000f, -0.000096f, -0.000192f, -0.000288f, -0.000383f, -0.000479f, -0.000575f, -0.000671f,
+ -0.000767f, -0.000863f, -0.000959f, -0.001055f, -0.001150f, -0.001246f, -0.001342f, -0.001438f,
+ -0.001534f, -0.001630f, -0.001726f, -0.001822f, -0.001917f, -0.002013f, -0.002109f, -0.002205f,
+ -0.002301f, -0.002397f, -0.002493f, -0.002589f, -0.002684f, -0.002780f, -0.002876f, -0.002972f,
+ -0.003068f, -0.003164f, -0.003260f, -0.003356f, -0.003451f, -0.003547f, -0.003643f, -0.003739f,
+ -0.003835f, -0.003931f, -0.004027f, -0.004123f, -0.004218f, -0.004314f, -0.004410f, -0.004506f,
+ -0.004602f, -0.004698f, -0.004794f, -0.004890f, -0.004985f, -0.005081f, -0.005177f, -0.005273f,
+ -0.005369f, -0.005465f, -0.005561f, -0.005657f, -0.005752f, -0.005848f, -0.005944f, -0.006040f,
+ -0.006136f, -0.006232f, -0.006328f, -0.006424f, -0.006519f, -0.006615f, -0.006711f, -0.006807f,
+ -0.006903f, -0.006999f, -0.007095f, -0.007190f, -0.007286f, -0.007382f, -0.007478f, -0.007574f,
+ -0.007670f, -0.007766f, -0.007862f, -0.007957f, -0.008053f, -0.008149f, -0.008245f, -0.008341f,
+ -0.008437f, -0.008533f, -0.008629f, -0.008724f, -0.008820f, -0.008916f, -0.009012f, -0.009108f,
+ -0.009204f, -0.009300f, -0.009395f, -0.009491f, -0.009587f, -0.009683f, -0.009779f, -0.009875f,
+ -0.009971f, -0.010067f, -0.010162f, -0.010258f, -0.010354f, -0.010450f, -0.010546f, -0.010642f,
+ -0.010738f, -0.010834f, -0.010929f, -0.011025f, -0.011121f, -0.011217f, -0.011313f, -0.011409f,
+ -0.011505f, -0.011600f, -0.011696f, -0.011792f, -0.011888f, -0.011984f, -0.012080f, -0.012176f,
+ -0.012272f, -0.012367f, -0.012463f, -0.012559f, -0.012655f, -0.012751f, -0.012847f, -0.012943f,
+ -0.013038f, -0.013134f, -0.013230f, -0.013326f, -0.013422f, -0.013518f, -0.013614f, -0.013710f,
+ -0.013805f, -0.013901f, -0.013997f, -0.014093f, -0.014189f, -0.014285f, -0.014381f, -0.014476f,
+ -0.014572f, -0.014668f, -0.014764f, -0.014860f, -0.014956f, -0.015052f, -0.015147f, -0.015243f,
+ -0.015339f, -0.015435f, -0.015531f, -0.015627f, -0.015723f, -0.015819f, -0.015914f, -0.016010f,
+ -0.016106f, -0.016202f, -0.016298f, -0.016394f, -0.016490f, -0.016585f, -0.016681f, -0.016777f,
+ -0.016873f, -0.016969f, -0.017065f, -0.017161f, -0.017256f, -0.017352f, -0.017448f, -0.017544f,
+ -0.017640f, -0.017736f, -0.017832f, -0.017927f, -0.018023f, -0.018119f, -0.018215f, -0.018311f,
+ -0.018407f, -0.018503f, -0.018598f, -0.018694f, -0.018790f, -0.018886f, -0.018982f, -0.019078f,
+ -0.019174f, -0.019269f, -0.019365f, -0.019461f, -0.019557f, -0.019653f, -0.019749f, -0.019845f,
+ -0.019940f, -0.020036f, -0.020132f, -0.020228f, -0.020324f, -0.020420f, -0.020516f, -0.020611f,
+ -0.020707f, -0.020803f, -0.020899f, -0.020995f, -0.021091f, -0.021187f, -0.021282f, -0.021378f,
+ -0.021474f, -0.021570f, -0.021666f, -0.021762f, -0.021857f, -0.021953f, -0.022049f, -0.022145f,
+ -0.022241f, -0.022337f, -0.022433f, -0.022528f, -0.022624f, -0.022720f, -0.022816f, -0.022912f,
+ -0.023008f, -0.023104f, -0.023199f, -0.023295f, -0.023391f, -0.023487f, -0.023583f, -0.023679f,
+ -0.023774f, -0.023870f, -0.023966f, -0.024062f, -0.024158f, -0.024254f, -0.024350f, -0.024445f,
+ -0.024541f, -0.024637f, -0.024733f, -0.024829f, -0.024925f, -0.025020f, -0.025116f, -0.025212f,
+ -0.025308f, -0.025404f, -0.025500f, -0.025596f, -0.025691f, -0.025787f, -0.025883f, -0.025979f,
+ -0.026075f, -0.026171f, -0.026266f, -0.026362f, -0.026458f, -0.026554f, -0.026650f, -0.026746f,
+ -0.026841f, -0.026937f, -0.027033f, -0.027129f, -0.027225f, -0.027321f, -0.027416f, -0.027512f,
+ -0.027608f, -0.027704f, -0.027800f, -0.027896f, -0.027991f, -0.028087f, -0.028183f, -0.028279f,
+ -0.028375f, -0.028471f, -0.028567f, -0.028662f, -0.028758f, -0.028854f, -0.028950f, -0.029046f,
+ -0.029142f, -0.029237f, -0.029333f, -0.029429f, -0.029525f, -0.029621f, -0.029717f, -0.029812f,
+ -0.029908f, -0.030004f, -0.030100f, -0.030196f, -0.030291f, -0.030387f, -0.030483f, -0.030579f,
+ -0.030675f, -0.030771f, -0.030866f, -0.030962f, -0.031058f, -0.031154f, -0.031250f, -0.031346f,
+ -0.031441f, -0.031537f, -0.031633f, -0.031729f, -0.031825f, -0.031921f, -0.032016f, -0.032112f,
+ -0.032208f, -0.032304f, -0.032400f, -0.032495f, -0.032591f, -0.032687f, -0.032783f, -0.032879f,
+ -0.032975f, -0.033070f, -0.033166f, -0.033262f, -0.033358f, -0.033454f, -0.033550f, -0.033645f,
+ -0.033741f, -0.033837f, -0.033933f, -0.034029f, -0.034124f, -0.034220f, -0.034316f, -0.034412f,
+ -0.034508f, -0.034604f, -0.034699f, -0.034795f, -0.034891f, -0.034987f, -0.035083f, -0.035178f,
+ -0.035274f, -0.035370f, -0.035466f, -0.035562f, -0.035657f, -0.035753f, -0.035849f, -0.035945f,
+ -0.036041f, -0.036137f, -0.036232f, -0.036328f, -0.036424f, -0.036520f, -0.036616f, -0.036711f,
+ -0.036807f, -0.036903f, -0.036999f, -0.037095f, -0.037190f, -0.037286f, -0.037382f, -0.037478f,
+ -0.037574f, -0.037669f, -0.037765f, -0.037861f, -0.037957f, -0.038053f, -0.038149f, -0.038244f,
+ -0.038340f, -0.038436f, -0.038532f, -0.038628f, -0.038723f, -0.038819f, -0.038915f, -0.039011f,
+ -0.039107f, -0.039202f, -0.039298f, -0.039394f, -0.039490f, -0.039586f, -0.039681f, -0.039777f,
+ -0.039873f, -0.039969f, -0.040065f, -0.040160f, -0.040256f, -0.040352f, -0.040448f, -0.040544f,
+ -0.040639f, -0.040735f, -0.040831f, -0.040927f, -0.041022f, -0.041118f, -0.041214f, -0.041310f,
+ -0.041406f, -0.041501f, -0.041597f, -0.041693f, -0.041789f, -0.041885f, -0.041980f, -0.042076f,
+ -0.042172f, -0.042268f, -0.042364f, -0.042459f, -0.042555f, -0.042651f, -0.042747f, -0.042842f,
+ -0.042938f, -0.043034f, -0.043130f, -0.043226f, -0.043321f, -0.043417f, -0.043513f, -0.043609f,
+ -0.043705f, -0.043800f, -0.043896f, -0.043992f, -0.044088f, -0.044183f, -0.044279f, -0.044375f,
+ -0.044471f, -0.044567f, -0.044662f, -0.044758f, -0.044854f, -0.044950f, -0.045045f, -0.045141f,
+ -0.045237f, -0.045333f, -0.045429f, -0.045524f, -0.045620f, -0.045716f, -0.045812f, -0.045907f,
+ -0.046003f, -0.046099f, -0.046195f, -0.046290f, -0.046386f, -0.046482f, -0.046578f, -0.046674f,
+ -0.046769f, -0.046865f, -0.046961f, -0.047057f, -0.047152f, -0.047248f, -0.047344f, -0.047440f,
+ -0.047535f, -0.047631f, -0.047727f, -0.047823f, -0.047919f, -0.048014f, -0.048110f, -0.048206f,
+ -0.048302f, -0.048397f, -0.048493f, -0.048589f, -0.048685f, -0.048780f, -0.048876f, -0.048972f,
+ -0.049068f, -0.049163f, -0.049259f, -0.049355f, -0.049451f, -0.049546f, -0.049642f, -0.049738f,
+ -0.049834f, -0.049929f, -0.050025f, -0.050121f, -0.050217f, -0.050312f, -0.050408f, -0.050504f,
+ -0.050600f, -0.050696f, -0.050791f, -0.050887f, -0.050983f, -0.051078f, -0.051174f, -0.051270f,
+ -0.051366f, -0.051461f, -0.051557f, -0.051653f, -0.051749f, -0.051844f, -0.051940f, -0.052036f,
+ -0.052132f, -0.052227f, -0.052323f, -0.052419f, -0.052515f, -0.052610f, -0.052706f, -0.052802f,
+ -0.052898f, -0.052993f, -0.053089f, -0.053185f, -0.053281f, -0.053376f, -0.053472f, -0.053568f,
+ -0.053664f, -0.053759f, -0.053855f, -0.053951f, -0.054046f, -0.054142f, -0.054238f, -0.054334f,
+ -0.054429f, -0.054525f, -0.054621f, -0.054717f, -0.054812f, -0.054908f, -0.055004f, -0.055100f,
+ -0.055195f, -0.055291f, -0.055387f, -0.055482f, -0.055578f, -0.055674f, -0.055770f, -0.055865f,
+ -0.055961f, -0.056057f, -0.056152f, -0.056248f, -0.056344f, -0.056440f, -0.056535f, -0.056631f,
+ -0.056727f, -0.056823f, -0.056918f, -0.057014f, -0.057110f, -0.057205f, -0.057301f, -0.057397f,
+ -0.057493f, -0.057588f, -0.057684f, -0.057780f, -0.057875f, -0.057971f, -0.058067f, -0.058163f,
+ -0.058258f, -0.058354f, -0.058450f, -0.058545f, -0.058641f, -0.058737f, -0.058833f, -0.058928f,
+ -0.059024f, -0.059120f, -0.059215f, -0.059311f, -0.059407f, -0.059502f, -0.059598f, -0.059694f,
+ -0.059790f, -0.059885f, -0.059981f, -0.060077f, -0.060172f, -0.060268f, -0.060364f, -0.060459f,
+ -0.060555f, -0.060651f, -0.060747f, -0.060842f, -0.060938f, -0.061034f, -0.061129f, -0.061225f,
+ -0.061321f, -0.061416f, -0.061512f, -0.061608f, -0.061704f, -0.061799f, -0.061895f, -0.061991f,
+ -0.062086f, -0.062182f, -0.062278f, -0.062373f, -0.062469f, -0.062565f, -0.062660f, -0.062756f,
+ -0.062852f, -0.062947f, -0.063043f, -0.063139f, -0.063234f, -0.063330f, -0.063426f, -0.063522f,
+ -0.063617f, -0.063713f, -0.063809f, -0.063904f, -0.064000f, -0.064096f, -0.064191f, -0.064287f,
+ -0.064383f, -0.064478f, -0.064574f, -0.064670f, -0.064765f, -0.064861f, -0.064957f, -0.065052f,
+ -0.065148f, -0.065244f, -0.065339f, -0.065435f, -0.065531f, -0.065626f, -0.065722f, -0.065818f,
+ -0.065913f, -0.066009f, -0.066105f, -0.066200f, -0.066296f, -0.066392f, -0.066487f, -0.066583f,
+ -0.066679f, -0.066774f, -0.066870f, -0.066966f, -0.067061f, -0.067157f, -0.067253f, -0.067348f,
+ -0.067444f, -0.067540f, -0.067635f, -0.067731f, -0.067827f, -0.067922f, -0.068018f, -0.068113f,
+ -0.068209f, -0.068305f, -0.068400f, -0.068496f, -0.068592f, -0.068687f, -0.068783f, -0.068879f,
+ -0.068974f, -0.069070f, -0.069166f, -0.069261f, -0.069357f, -0.069453f, -0.069548f, -0.069644f,
+ -0.069739f, -0.069835f, -0.069931f, -0.070026f, -0.070122f, -0.070218f, -0.070313f, -0.070409f,
+ -0.070505f, -0.070600f, -0.070696f, -0.070791f, -0.070887f, -0.070983f, -0.071078f, -0.071174f,
+ -0.071270f, -0.071365f, -0.071461f, -0.071557f, -0.071652f, -0.071748f, -0.071843f, -0.071939f,
+ -0.072035f, -0.072130f, -0.072226f, -0.072322f, -0.072417f, -0.072513f, -0.072608f, -0.072704f,
+ -0.072800f, -0.072895f, -0.072991f, -0.073086f, -0.073182f, -0.073278f, -0.073373f, -0.073469f,
+ -0.073565f, -0.073660f, -0.073756f, -0.073851f, -0.073947f, -0.074043f, -0.074138f, -0.074234f,
+ -0.074329f, -0.074425f, -0.074521f, -0.074616f, -0.074712f, -0.074807f, -0.074903f, -0.074999f,
+ -0.075094f, -0.075190f, -0.075286f, -0.075381f, -0.075477f, -0.075572f, -0.075668f, -0.075764f,
+ -0.075859f, -0.075955f, -0.076050f, -0.076146f, -0.076241f, -0.076337f, -0.076433f, -0.076528f,
+ -0.076624f, -0.076719f, -0.076815f, -0.076911f, -0.077006f, -0.077102f, -0.077197f, -0.077293f,
+ -0.077389f, -0.077484f, -0.077580f, -0.077675f, -0.077771f, -0.077866f, -0.077962f, -0.078058f,
+ -0.078153f, -0.078249f, -0.078344f, -0.078440f, -0.078536f, -0.078631f, -0.078727f, -0.078822f,
+ -0.078918f, -0.079013f, -0.079109f, -0.079205f, -0.079300f, -0.079396f, -0.079491f, -0.079587f,
+ -0.079682f, -0.079778f, -0.079874f, -0.079969f, -0.080065f, -0.080160f, -0.080256f, -0.080351f,
+ -0.080447f, -0.080543f, -0.080638f, -0.080734f, -0.080829f, -0.080925f, -0.081020f, -0.081116f,
+ -0.081211f, -0.081307f, -0.081403f, -0.081498f, -0.081594f, -0.081689f, -0.081785f, -0.081880f,
+ -0.081976f, -0.082071f, -0.082167f, -0.082263f, -0.082358f, -0.082454f, -0.082549f, -0.082645f,
+ -0.082740f, -0.082836f, -0.082931f, -0.083027f, -0.083122f, -0.083218f, -0.083314f, -0.083409f,
+ -0.083505f, -0.083600f, -0.083696f, -0.083791f, -0.083887f, -0.083982f, -0.084078f, -0.084173f,
+ -0.084269f, -0.084364f, -0.084460f, -0.084555f, -0.084651f, -0.084747f, -0.084842f, -0.084938f,
+ -0.085033f, -0.085129f, -0.085224f, -0.085320f, -0.085415f, -0.085511f, -0.085606f, -0.085702f,
+ -0.085797f, -0.085893f, -0.085988f, -0.086084f, -0.086179f, -0.086275f, -0.086370f, -0.086466f,
+ -0.086561f, -0.086657f, -0.086752f, -0.086848f, -0.086943f, -0.087039f, -0.087135f, -0.087230f,
+ -0.087326f, -0.087421f, -0.087517f, -0.087612f, -0.087708f, -0.087803f, -0.087899f, -0.087994f,
+ -0.088090f, -0.088185f, -0.088281f, -0.088376f, -0.088472f, -0.088567f, -0.088663f, -0.088758f,
+ -0.088854f, -0.088949f, -0.089045f, -0.089140f, -0.089236f, -0.089331f, -0.089427f, -0.089522f,
+ -0.089617f, -0.089713f, -0.089808f, -0.089904f, -0.089999f, -0.090095f, -0.090190f, -0.090286f,
+ -0.090381f, -0.090477f, -0.090572f, -0.090668f, -0.090763f, -0.090859f, -0.090954f, -0.091050f,
+ -0.091145f, -0.091241f, -0.091336f, -0.091432f, -0.091527f, -0.091623f, -0.091718f, -0.091813f,
+ -0.091909f, -0.092004f, -0.092100f, -0.092195f, -0.092291f, -0.092386f, -0.092482f, -0.092577f,
+ -0.092673f, -0.092768f, -0.092864f, -0.092959f, -0.093055f, -0.093150f, -0.093245f, -0.093341f,
+ -0.093436f, -0.093532f, -0.093627f, -0.093723f, -0.093818f, -0.093914f, -0.094009f, -0.094104f,
+ -0.094200f, -0.094295f, -0.094391f, -0.094486f, -0.094582f, -0.094677f, -0.094773f, -0.094868f,
+ -0.094963f, -0.095059f, -0.095154f, -0.095250f, -0.095345f, -0.095441f, -0.095536f, -0.095632f,
+ -0.095727f, -0.095822f, -0.095918f, -0.096013f, -0.096109f, -0.096204f, -0.096300f, -0.096395f,
+ -0.096490f, -0.096586f, -0.096681f, -0.096777f, -0.096872f, -0.096968f, -0.097063f, -0.097158f,
+ -0.097254f, -0.097349f, -0.097445f, -0.097540f, -0.097635f, -0.097731f, -0.097826f, -0.097922f,
+ -0.098017f, -0.098113f, -0.098208f, -0.098303f, -0.098399f, -0.098494f, -0.098590f, -0.098685f,
+ -0.098780f, -0.098876f, -0.098971f, -0.099067f, -0.099162f, -0.099257f, -0.099353f, -0.099448f,
+ -0.099544f, -0.099639f, -0.099734f, -0.099830f, -0.099925f, -0.100021f, -0.100116f, -0.100211f,
+ -0.100307f, -0.100402f, -0.100498f, -0.100593f, -0.100688f, -0.100784f, -0.100879f, -0.100974f,
+ -0.101070f, -0.101165f, -0.101261f, -0.101356f, -0.101451f, -0.101547f, -0.101642f, -0.101738f,
+ -0.101833f, -0.101928f, -0.102024f, -0.102119f, -0.102214f, -0.102310f, -0.102405f, -0.102500f,
+ -0.102596f, -0.102691f, -0.102787f, -0.102882f, -0.102977f, -0.103073f, -0.103168f, -0.103263f,
+ -0.103359f, -0.103454f, -0.103550f, -0.103645f, -0.103740f, -0.103836f, -0.103931f, -0.104026f,
+ -0.104122f, -0.104217f, -0.104312f, -0.104408f, -0.104503f, -0.104598f, -0.104694f, -0.104789f,
+ -0.104884f, -0.104980f, -0.105075f, -0.105170f, -0.105266f, -0.105361f, -0.105456f, -0.105552f,
+ -0.105647f, -0.105742f, -0.105838f, -0.105933f, -0.106028f, -0.106124f, -0.106219f, -0.106314f,
+ -0.106410f, -0.106505f, -0.106600f, -0.106696f, -0.106791f, -0.106886f, -0.106982f, -0.107077f,
+ -0.107172f, -0.107268f, -0.107363f, -0.107458f, -0.107554f, -0.107649f, -0.107744f, -0.107840f,
+ -0.107935f, -0.108030f, -0.108126f, -0.108221f, -0.108316f, -0.108412f, -0.108507f, -0.108602f,
+ -0.108697f, -0.108793f, -0.108888f, -0.108983f, -0.109079f, -0.109174f, -0.109269f, -0.109365f,
+ -0.109460f, -0.109555f, -0.109650f, -0.109746f, -0.109841f, -0.109936f, -0.110032f, -0.110127f,
+ -0.110222f, -0.110317f, -0.110413f, -0.110508f, -0.110603f, -0.110699f, -0.110794f, -0.110889f,
+ -0.110984f, -0.111080f, -0.111175f, -0.111270f, -0.111366f, -0.111461f, -0.111556f, -0.111651f,
+ -0.111747f, -0.111842f, -0.111937f, -0.112033f, -0.112128f, -0.112223f, -0.112318f, -0.112414f,
+ -0.112509f, -0.112604f, -0.112699f, -0.112795f, -0.112890f, -0.112985f, -0.113080f, -0.113176f,
+ -0.113271f, -0.113366f, -0.113461f, -0.113557f, -0.113652f, -0.113747f, -0.113842f, -0.113938f,
+ -0.114033f, -0.114128f, -0.114223f, -0.114319f, -0.114414f, -0.114509f, -0.114604f, -0.114700f,
+ -0.114795f, -0.114890f, -0.114985f, -0.115081f, -0.115176f, -0.115271f, -0.115366f, -0.115462f,
+ -0.115557f, -0.115652f, -0.115747f, -0.115842f, -0.115938f, -0.116033f, -0.116128f, -0.116223f,
+ -0.116319f, -0.116414f, -0.116509f, -0.116604f, -0.116700f, -0.116795f, -0.116890f, -0.116985f,
+ -0.117080f, -0.117176f, -0.117271f, -0.117366f, -0.117461f, -0.117556f, -0.117652f, -0.117747f,
+ -0.117842f, -0.117937f, -0.118032f, -0.118128f, -0.118223f, -0.118318f, -0.118413f, -0.118508f,
+ -0.118604f, -0.118699f, -0.118794f, -0.118889f, -0.118984f, -0.119080f, -0.119175f, -0.119270f,
+ -0.119365f, -0.119460f, -0.119556f, -0.119651f, -0.119746f, -0.119841f, -0.119936f, -0.120032f,
+ -0.120127f, -0.120222f, -0.120317f, -0.120412f, -0.120507f, -0.120603f, -0.120698f, -0.120793f,
+ -0.120888f, -0.120983f, -0.121078f, -0.121174f, -0.121269f, -0.121364f, -0.121459f, -0.121554f,
+ -0.121649f, -0.121745f, -0.121840f, -0.121935f, -0.122030f, -0.122125f, -0.122220f, -0.122316f,
+ -0.122411f, -0.122506f, -0.122601f, -0.122696f, -0.122791f, -0.122886f, -0.122982f, -0.123077f,
+ -0.123172f, -0.123267f, -0.123362f, -0.123457f, -0.123552f, -0.123648f, -0.123743f, -0.123838f,
+ -0.123933f, -0.124028f, -0.124123f, -0.124218f, -0.124314f, -0.124409f, -0.124504f, -0.124599f,
+ -0.124694f, -0.124789f, -0.124884f, -0.124979f, -0.125075f, -0.125170f, -0.125265f, -0.125360f,
+ -0.125455f, -0.125550f, -0.125645f, -0.125740f, -0.125835f, -0.125931f, -0.126026f, -0.126121f,
+ -0.126216f, -0.126311f, -0.126406f, -0.126501f, -0.126596f, -0.126691f, -0.126787f, -0.126882f,
+ -0.126977f, -0.127072f, -0.127167f, -0.127262f, -0.127357f, -0.127452f, -0.127547f, -0.127642f,
+ -0.127737f, -0.127833f, -0.127928f, -0.128023f, -0.128118f, -0.128213f, -0.128308f, -0.128403f,
+ -0.128498f, -0.128593f, -0.128688f, -0.128783f, -0.128878f, -0.128973f, -0.129069f, -0.129164f,
+ -0.129259f, -0.129354f, -0.129449f, -0.129544f, -0.129639f, -0.129734f, -0.129829f, -0.129924f,
+ -0.130019f, -0.130114f, -0.130209f, -0.130304f, -0.130399f, -0.130495f, -0.130590f, -0.130685f,
+ -0.130780f, -0.130875f, -0.130970f, -0.131065f, -0.131160f, -0.131255f, -0.131350f, -0.131445f,
+ -0.131540f, -0.131635f, -0.131730f, -0.131825f, -0.131920f, -0.132015f, -0.132110f, -0.132205f,
+ -0.132300f, -0.132395f, -0.132490f, -0.132585f, -0.132680f, -0.132775f, -0.132870f, -0.132966f,
+ -0.133061f, -0.133156f, -0.133251f, -0.133346f, -0.133441f, -0.133536f, -0.133631f, -0.133726f,
+ -0.133821f, -0.133916f, -0.134011f, -0.134106f, -0.134201f, -0.134296f, -0.134391f, -0.134486f,
+ -0.134581f, -0.134676f, -0.134771f, -0.134866f, -0.134961f, -0.135056f, -0.135151f, -0.135246f,
+ -0.135341f, -0.135436f, -0.135531f, -0.135626f, -0.135721f, -0.135816f, -0.135911f, -0.136006f,
+ -0.136101f, -0.136196f, -0.136291f, -0.136386f, -0.136480f, -0.136575f, -0.136670f, -0.136765f,
+ -0.136860f, -0.136955f, -0.137050f, -0.137145f, -0.137240f, -0.137335f, -0.137430f, -0.137525f,
+ -0.137620f, -0.137715f, -0.137810f, -0.137905f, -0.138000f, -0.138095f, -0.138190f, -0.138285f,
+ -0.138380f, -0.138475f, -0.138570f, -0.138665f, -0.138760f, -0.138855f, -0.138949f, -0.139044f,
+ -0.139139f, -0.139234f, -0.139329f, -0.139424f, -0.139519f, -0.139614f, -0.139709f, -0.139804f,
+ -0.139899f, -0.139994f, -0.140089f, -0.140184f, -0.140279f, -0.140373f, -0.140468f, -0.140563f,
+ -0.140658f, -0.140753f, -0.140848f, -0.140943f, -0.141038f, -0.141133f, -0.141228f, -0.141323f,
+ -0.141418f, -0.141512f, -0.141607f, -0.141702f, -0.141797f, -0.141892f, -0.141987f, -0.142082f,
+ -0.142177f, -0.142272f, -0.142367f, -0.142461f, -0.142556f, -0.142651f, -0.142746f, -0.142841f,
+ -0.142936f, -0.143031f, -0.143126f, -0.143221f, -0.143316f, -0.143410f, -0.143505f, -0.143600f,
+ -0.143695f, -0.143790f, -0.143885f, -0.143980f, -0.144075f, -0.144169f, -0.144264f, -0.144359f,
+ -0.144454f, -0.144549f, -0.144644f, -0.144739f, -0.144833f, -0.144928f, -0.145023f, -0.145118f,
+ -0.145213f, -0.145308f, -0.145403f, -0.145497f, -0.145592f, -0.145687f, -0.145782f, -0.145877f,
+ -0.145972f, -0.146067f, -0.146161f, -0.146256f, -0.146351f, -0.146446f, -0.146541f, -0.146636f,
+ -0.146730f, -0.146825f, -0.146920f, -0.147015f, -0.147110f, -0.147205f, -0.147299f, -0.147394f,
+ -0.147489f, -0.147584f, -0.147679f, -0.147774f, -0.147868f, -0.147963f, -0.148058f, -0.148153f,
+ -0.148248f, -0.148342f, -0.148437f, -0.148532f, -0.148627f, -0.148722f, -0.148817f, -0.148911f,
+ -0.149006f, -0.149101f, -0.149196f, -0.149291f, -0.149385f, -0.149480f, -0.149575f, -0.149670f,
+ -0.149765f, -0.149859f, -0.149954f, -0.150049f, -0.150144f, -0.150238f, -0.150333f, -0.150428f,
+ -0.150523f, -0.150618f, -0.150712f, -0.150807f, -0.150902f, -0.150997f, -0.151092f, -0.151186f,
+ -0.151281f, -0.151376f, -0.151471f, -0.151565f, -0.151660f, -0.151755f, -0.151850f, -0.151944f,
+ -0.152039f, -0.152134f, -0.152229f, -0.152323f, -0.152418f, -0.152513f, -0.152608f, -0.152702f,
+ -0.152797f, -0.152892f, -0.152987f, -0.153081f, -0.153176f, -0.153271f, -0.153366f, -0.153460f,
+ -0.153555f, -0.153650f, -0.153745f, -0.153839f, -0.153934f, -0.154029f, -0.154124f, -0.154218f,
+ -0.154313f, -0.154408f, -0.154502f, -0.154597f, -0.154692f, -0.154787f, -0.154881f, -0.154976f,
+ -0.155071f, -0.155165f, -0.155260f, -0.155355f, -0.155450f, -0.155544f, -0.155639f, -0.155734f,
+ -0.155828f, -0.155923f, -0.156018f, -0.156112f, -0.156207f, -0.156302f, -0.156397f, -0.156491f,
+ -0.156586f, -0.156681f, -0.156775f, -0.156870f, -0.156965f, -0.157059f, -0.157154f, -0.157249f,
+ -0.157343f, -0.157438f, -0.157533f, -0.157627f, -0.157722f, -0.157817f, -0.157912f, -0.158006f,
+ -0.158101f, -0.158196f, -0.158290f, -0.158385f, -0.158480f, -0.158574f, -0.158669f, -0.158763f,
+ -0.158858f, -0.158953f, -0.159047f, -0.159142f, -0.159237f, -0.159331f, -0.159426f, -0.159521f,
+ -0.159615f, -0.159710f, -0.159805f, -0.159899f, -0.159994f, -0.160089f, -0.160183f, -0.160278f,
+ -0.160372f, -0.160467f, -0.160562f, -0.160656f, -0.160751f, -0.160846f, -0.160940f, -0.161035f,
+ -0.161129f, -0.161224f, -0.161319f, -0.161413f, -0.161508f, -0.161603f, -0.161697f, -0.161792f,
+ -0.161886f, -0.161981f, -0.162076f, -0.162170f, -0.162265f, -0.162359f, -0.162454f, -0.162549f,
+ -0.162643f, -0.162738f, -0.162832f, -0.162927f, -0.163022f, -0.163116f, -0.163211f, -0.163305f,
+ -0.163400f, -0.163495f, -0.163589f, -0.163684f, -0.163778f, -0.163873f, -0.163967f, -0.164062f,
+ -0.164157f, -0.164251f, -0.164346f, -0.164440f, -0.164535f, -0.164629f, -0.164724f, -0.164819f,
+ -0.164913f, -0.165008f, -0.165102f, -0.165197f, -0.165291f, -0.165386f, -0.165480f, -0.165575f,
+ -0.165670f, -0.165764f, -0.165859f, -0.165953f, -0.166048f, -0.166142f, -0.166237f, -0.166331f,
+ -0.166426f, -0.166520f, -0.166615f, -0.166710f, -0.166804f, -0.166899f, -0.166993f, -0.167088f,
+ -0.167182f, -0.167277f, -0.167371f, -0.167466f, -0.167560f, -0.167655f, -0.167749f, -0.167844f,
+ -0.167938f, -0.168033f, -0.168127f, -0.168222f, -0.168316f, -0.168411f, -0.168505f, -0.168600f,
+ -0.168694f, -0.168789f, -0.168883f, -0.168978f, -0.169072f, -0.169167f, -0.169261f, -0.169356f,
+ -0.169450f, -0.169545f, -0.169639f, -0.169734f, -0.169828f, -0.169923f, -0.170017f, -0.170112f,
+ -0.170206f, -0.170301f, -0.170395f, -0.170490f, -0.170584f, -0.170678f, -0.170773f, -0.170867f,
+ -0.170962f, -0.171056f, -0.171151f, -0.171245f, -0.171340f, -0.171434f, -0.171529f, -0.171623f,
+ -0.171718f, -0.171812f, -0.171906f, -0.172001f, -0.172095f, -0.172190f, -0.172284f, -0.172379f,
+ -0.172473f, -0.172568f, -0.172662f, -0.172756f, -0.172851f, -0.172945f, -0.173040f, -0.173134f,
+ -0.173229f, -0.173323f, -0.173417f, -0.173512f, -0.173606f, -0.173701f, -0.173795f, -0.173889f,
+ -0.173984f, -0.174078f, -0.174173f, -0.174267f, -0.174362f, -0.174456f, -0.174550f, -0.174645f,
+ -0.174739f, -0.174834f, -0.174928f, -0.175022f, -0.175117f, -0.175211f, -0.175305f, -0.175400f,
+ -0.175494f, -0.175589f, -0.175683f, -0.175777f, -0.175872f, -0.175966f, -0.176061f, -0.176155f,
+ -0.176249f, -0.176344f, -0.176438f, -0.176532f, -0.176627f, -0.176721f, -0.176815f, -0.176910f,
+ -0.177004f, -0.177099f, -0.177193f, -0.177287f, -0.177382f, -0.177476f, -0.177570f, -0.177665f,
+ -0.177759f, -0.177853f, -0.177948f, -0.178042f, -0.178136f, -0.178231f, -0.178325f, -0.178419f,
+ -0.178514f, -0.178608f, -0.178702f, -0.178797f, -0.178891f, -0.178985f, -0.179080f, -0.179174f,
+ -0.179268f, -0.179363f, -0.179457f, -0.179551f, -0.179646f, -0.179740f, -0.179834f, -0.179929f,
+ -0.180023f, -0.180117f, -0.180212f, -0.180306f, -0.180400f, -0.180494f, -0.180589f, -0.180683f,
+ -0.180777f, -0.180872f, -0.180966f, -0.181060f, -0.181154f, -0.181249f, -0.181343f, -0.181437f,
+ -0.181532f, -0.181626f, -0.181720f, -0.181814f, -0.181909f, -0.182003f, -0.182097f, -0.182192f,
+ -0.182286f, -0.182380f, -0.182474f, -0.182569f, -0.182663f, -0.182757f, -0.182851f, -0.182946f,
+ -0.183040f, -0.183134f, -0.183228f, -0.183323f, -0.183417f, -0.183511f, -0.183605f, -0.183700f,
+ -0.183794f, -0.183888f, -0.183982f, -0.184077f, -0.184171f, -0.184265f, -0.184359f, -0.184454f,
+ -0.184548f, -0.184642f, -0.184736f, -0.184830f, -0.184925f, -0.185019f, -0.185113f, -0.185207f,
+ -0.185301f, -0.185396f, -0.185490f, -0.185584f, -0.185678f, -0.185773f, -0.185867f, -0.185961f,
+ -0.186055f, -0.186149f, -0.186244f, -0.186338f, -0.186432f, -0.186526f, -0.186620f, -0.186715f,
+ -0.186809f, -0.186903f, -0.186997f, -0.187091f, -0.187185f, -0.187280f, -0.187374f, -0.187468f,
+ -0.187562f, -0.187656f, -0.187750f, -0.187845f, -0.187939f, -0.188033f, -0.188127f, -0.188221f,
+ -0.188315f, -0.188410f, -0.188504f, -0.188598f, -0.188692f, -0.188786f, -0.188880f, -0.188975f,
+ -0.189069f, -0.189163f, -0.189257f, -0.189351f, -0.189445f, -0.189539f, -0.189634f, -0.189728f,
+ -0.189822f, -0.189916f, -0.190010f, -0.190104f, -0.190198f, -0.190292f, -0.190387f, -0.190481f,
+ -0.190575f, -0.190669f, -0.190763f, -0.190857f, -0.190951f, -0.191045f, -0.191139f, -0.191234f,
+ -0.191328f, -0.191422f, -0.191516f, -0.191610f, -0.191704f, -0.191798f, -0.191892f, -0.191986f,
+ -0.192080f, -0.192174f, -0.192269f, -0.192363f, -0.192457f, -0.192551f, -0.192645f, -0.192739f,
+ -0.192833f, -0.192927f, -0.193021f, -0.193115f, -0.193209f, -0.193303f, -0.193397f, -0.193492f,
+ -0.193586f, -0.193680f, -0.193774f, -0.193868f, -0.193962f, -0.194056f, -0.194150f, -0.194244f,
+ -0.194338f, -0.194432f, -0.194526f, -0.194620f, -0.194714f, -0.194808f, -0.194902f, -0.194996f,
+ -0.195090f, -0.195184f, -0.195278f, -0.195372f, -0.195466f, -0.195560f, -0.195654f, -0.195748f,
+ -0.195843f, -0.195937f, -0.196031f, -0.196125f, -0.196219f, -0.196313f, -0.196407f, -0.196501f,
+ -0.196595f, -0.196689f, -0.196783f, -0.196877f, -0.196971f, -0.197065f, -0.197159f, -0.197253f,
+ -0.197347f, -0.197441f, -0.197535f, -0.197629f, -0.197722f, -0.197816f, -0.197910f, -0.198004f,
+ -0.198098f, -0.198192f, -0.198286f, -0.198380f, -0.198474f, -0.198568f, -0.198662f, -0.198756f,
+ -0.198850f, -0.198944f, -0.199038f, -0.199132f, -0.199226f, -0.199320f, -0.199414f, -0.199508f,
+ -0.199602f, -0.199696f, -0.199790f, -0.199884f, -0.199978f, -0.200071f, -0.200165f, -0.200259f,
+ -0.200353f, -0.200447f, -0.200541f, -0.200635f, -0.200729f, -0.200823f, -0.200917f, -0.201011f,
+ -0.201105f, -0.201199f, -0.201292f, -0.201386f, -0.201480f, -0.201574f, -0.201668f, -0.201762f,
+ -0.201856f, -0.201950f, -0.202044f, -0.202138f, -0.202231f, -0.202325f, -0.202419f, -0.202513f,
+ -0.202607f, -0.202701f, -0.202795f, -0.202889f, -0.202983f, -0.203076f, -0.203170f, -0.203264f,
+ -0.203358f, -0.203452f, -0.203546f, -0.203640f, -0.203734f, -0.203827f, -0.203921f, -0.204015f,
+ -0.204109f, -0.204203f, -0.204297f, -0.204391f, -0.204484f, -0.204578f, -0.204672f, -0.204766f,
+ -0.204860f, -0.204954f, -0.205047f, -0.205141f, -0.205235f, -0.205329f, -0.205423f, -0.205517f,
+ -0.205610f, -0.205704f, -0.205798f, -0.205892f, -0.205986f, -0.206080f, -0.206173f, -0.206267f,
+ -0.206361f, -0.206455f, -0.206549f, -0.206642f, -0.206736f, -0.206830f, -0.206924f, -0.207018f,
+ -0.207111f, -0.207205f, -0.207299f, -0.207393f, -0.207487f, -0.207580f, -0.207674f, -0.207768f,
+ -0.207862f, -0.207955f, -0.208049f, -0.208143f, -0.208237f, -0.208331f, -0.208424f, -0.208518f,
+ -0.208612f, -0.208706f, -0.208799f, -0.208893f, -0.208987f, -0.209081f, -0.209174f, -0.209268f,
+ -0.209362f, -0.209456f, -0.209549f, -0.209643f, -0.209737f, -0.209831f, -0.209924f, -0.210018f,
+ -0.210112f, -0.210206f, -0.210299f, -0.210393f, -0.210487f, -0.210580f, -0.210674f, -0.210768f,
+ -0.210862f, -0.210955f, -0.211049f, -0.211143f, -0.211237f, -0.211330f, -0.211424f, -0.211518f,
+ -0.211611f, -0.211705f, -0.211799f, -0.211892f, -0.211986f, -0.212080f, -0.212174f, -0.212267f,
+ -0.212361f, -0.212455f, -0.212548f, -0.212642f, -0.212736f, -0.212829f, -0.212923f, -0.213017f,
+ -0.213110f, -0.213204f, -0.213298f, -0.213391f, -0.213485f, -0.213579f, -0.213672f, -0.213766f,
+ -0.213860f, -0.213953f, -0.214047f, -0.214141f, -0.214234f, -0.214328f, -0.214422f, -0.214515f,
+ -0.214609f, -0.214702f, -0.214796f, -0.214890f, -0.214983f, -0.215077f, -0.215171f, -0.215264f,
+ -0.215358f, -0.215451f, -0.215545f, -0.215639f, -0.215732f, -0.215826f, -0.215920f, -0.216013f,
+ -0.216107f, -0.216200f, -0.216294f, -0.216388f, -0.216481f, -0.216575f, -0.216668f, -0.216762f,
+ -0.216856f, -0.216949f, -0.217043f, -0.217136f, -0.217230f, -0.217324f, -0.217417f, -0.217511f,
+ -0.217604f, -0.217698f, -0.217791f, -0.217885f, -0.217979f, -0.218072f, -0.218166f, -0.218259f,
+ -0.218353f, -0.218446f, -0.218540f, -0.218633f, -0.218727f, -0.218821f, -0.218914f, -0.219008f,
+ -0.219101f, -0.219195f, -0.219288f, -0.219382f, -0.219475f, -0.219569f, -0.219662f, -0.219756f,
+ -0.219850f, -0.219943f, -0.220037f, -0.220130f, -0.220224f, -0.220317f, -0.220411f, -0.220504f,
+ -0.220598f, -0.220691f, -0.220785f, -0.220878f, -0.220972f, -0.221065f, -0.221159f, -0.221252f,
+ -0.221346f, -0.221439f, -0.221533f, -0.221626f, -0.221720f, -0.221813f, -0.221907f, -0.222000f,
+ -0.222094f, -0.222187f, -0.222281f, -0.222374f, -0.222468f, -0.222561f, -0.222654f, -0.222748f,
+ -0.222841f, -0.222935f, -0.223028f, -0.223122f, -0.223215f, -0.223309f, -0.223402f, -0.223496f,
+ -0.223589f, -0.223682f, -0.223776f, -0.223869f, -0.223963f, -0.224056f, -0.224150f, -0.224243f,
+ -0.224337f, -0.224430f, -0.224523f, -0.224617f, -0.224710f, -0.224804f, -0.224897f, -0.224991f,
+ -0.225084f, -0.225177f, -0.225271f, -0.225364f, -0.225458f, -0.225551f, -0.225644f, -0.225738f,
+ -0.225831f, -0.225925f, -0.226018f, -0.226111f, -0.226205f, -0.226298f, -0.226391f, -0.226485f,
+ -0.226578f, -0.226672f, -0.226765f, -0.226858f, -0.226952f, -0.227045f, -0.227139f, -0.227232f,
+ -0.227325f, -0.227419f, -0.227512f, -0.227605f, -0.227699f, -0.227792f, -0.227885f, -0.227979f,
+ -0.228072f, -0.228165f, -0.228259f, -0.228352f, -0.228445f, -0.228539f, -0.228632f, -0.228725f,
+ -0.228819f, -0.228912f, -0.229005f, -0.229099f, -0.229192f, -0.229285f, -0.229379f, -0.229472f,
+ -0.229565f, -0.229659f, -0.229752f, -0.229845f, -0.229939f, -0.230032f, -0.230125f, -0.230218f,
+ -0.230312f, -0.230405f, -0.230498f, -0.230592f, -0.230685f, -0.230778f, -0.230872f, -0.230965f,
+ -0.231058f, -0.231151f, -0.231245f, -0.231338f, -0.231431f, -0.231524f, -0.231618f, -0.231711f,
+ -0.231804f, -0.231898f, -0.231991f, -0.232084f, -0.232177f, -0.232271f, -0.232364f, -0.232457f,
+ -0.232550f, -0.232644f, -0.232737f, -0.232830f, -0.232923f, -0.233017f, -0.233110f, -0.233203f,
+ -0.233296f, -0.233389f, -0.233483f, -0.233576f, -0.233669f, -0.233762f, -0.233856f, -0.233949f,
+ -0.234042f, -0.234135f, -0.234228f, -0.234322f, -0.234415f, -0.234508f, -0.234601f, -0.234694f,
+ -0.234788f, -0.234881f, -0.234974f, -0.235067f, -0.235160f, -0.235254f, -0.235347f, -0.235440f,
+ -0.235533f, -0.235626f, -0.235719f, -0.235813f, -0.235906f, -0.235999f, -0.236092f, -0.236185f,
+ -0.236278f, -0.236372f, -0.236465f, -0.236558f, -0.236651f, -0.236744f, -0.236837f, -0.236930f,
+ -0.237024f, -0.237117f, -0.237210f, -0.237303f, -0.237396f, -0.237489f, -0.237582f, -0.237676f,
+ -0.237769f, -0.237862f, -0.237955f, -0.238048f, -0.238141f, -0.238234f, -0.238327f, -0.238420f,
+ -0.238514f, -0.238607f, -0.238700f, -0.238793f, -0.238886f, -0.238979f, -0.239072f, -0.239165f,
+ -0.239258f, -0.239351f, -0.239445f, -0.239538f, -0.239631f, -0.239724f, -0.239817f, -0.239910f,
+ -0.240003f, -0.240096f, -0.240189f, -0.240282f, -0.240375f, -0.240468f, -0.240561f, -0.240654f,
+ -0.240748f, -0.240841f, -0.240934f, -0.241027f, -0.241120f, -0.241213f, -0.241306f, -0.241399f,
+ -0.241492f, -0.241585f, -0.241678f, -0.241771f, -0.241864f, -0.241957f, -0.242050f, -0.242143f,
+ -0.242236f, -0.242329f, -0.242422f, -0.242515f, -0.242608f, -0.242701f, -0.242794f, -0.242887f,
+ -0.242980f, -0.243073f, -0.243166f, -0.243259f, -0.243352f, -0.243445f, -0.243538f, -0.243631f,
+ -0.243724f, -0.243817f, -0.243910f, -0.244003f, -0.244096f, -0.244189f, -0.244282f, -0.244375f,
+ -0.244468f, -0.244561f, -0.244654f, -0.244747f, -0.244840f, -0.244933f, -0.245026f, -0.245119f,
+ -0.245212f, -0.245304f, -0.245397f, -0.245490f, -0.245583f, -0.245676f, -0.245769f, -0.245862f,
+ -0.245955f, -0.246048f, -0.246141f, -0.246234f, -0.246327f, -0.246420f, -0.246513f, -0.246606f,
+ -0.246698f, -0.246791f, -0.246884f, -0.246977f, -0.247070f, -0.247163f, -0.247256f, -0.247349f,
+ -0.247442f, -0.247535f, -0.247627f, -0.247720f, -0.247813f, -0.247906f, -0.247999f, -0.248092f,
+ -0.248185f, -0.248278f, -0.248370f, -0.248463f, -0.248556f, -0.248649f, -0.248742f, -0.248835f,
+ -0.248928f, -0.249020f, -0.249113f, -0.249206f, -0.249299f, -0.249392f, -0.249485f, -0.249578f,
+ -0.249670f, -0.249763f, -0.249856f, -0.249949f, -0.250042f, -0.250135f, -0.250227f, -0.250320f,
+ -0.250413f, -0.250506f, -0.250599f, -0.250691f, -0.250784f, -0.250877f, -0.250970f, -0.251063f,
+ -0.251155f, -0.251248f, -0.251341f, -0.251434f, -0.251527f, -0.251619f, -0.251712f, -0.251805f,
+ -0.251898f, -0.251991f, -0.252083f, -0.252176f, -0.252269f, -0.252362f, -0.252454f, -0.252547f,
+ -0.252640f, -0.252733f, -0.252826f, -0.252918f, -0.253011f, -0.253104f, -0.253197f, -0.253289f,
+ -0.253382f, -0.253475f, -0.253568f, -0.253660f, -0.253753f, -0.253846f, -0.253938f, -0.254031f,
+ -0.254124f, -0.254217f, -0.254309f, -0.254402f, -0.254495f, -0.254588f, -0.254680f, -0.254773f,
+ -0.254866f, -0.254958f, -0.255051f, -0.255144f, -0.255236f, -0.255329f, -0.255422f, -0.255515f,
+ -0.255607f, -0.255700f, -0.255793f, -0.255885f, -0.255978f, -0.256071f, -0.256163f, -0.256256f,
+ -0.256349f, -0.256441f, -0.256534f, -0.256627f, -0.256719f, -0.256812f, -0.256905f, -0.256997f,
+ -0.257090f, -0.257183f, -0.257275f, -0.257368f, -0.257461f, -0.257553f, -0.257646f, -0.257738f,
+ -0.257831f, -0.257924f, -0.258016f, -0.258109f, -0.258202f, -0.258294f, -0.258387f, -0.258479f,
+ -0.258572f, -0.258665f, -0.258757f, -0.258850f, -0.258943f, -0.259035f, -0.259128f, -0.259220f,
+ -0.259313f, -0.259405f, -0.259498f, -0.259591f, -0.259683f, -0.259776f, -0.259868f, -0.259961f,
+ -0.260054f, -0.260146f, -0.260239f, -0.260331f, -0.260424f, -0.260516f, -0.260609f, -0.260702f,
+ -0.260794f, -0.260887f, -0.260979f, -0.261072f, -0.261164f, -0.261257f, -0.261349f, -0.261442f,
+ -0.261534f, -0.261627f, -0.261720f, -0.261812f, -0.261905f, -0.261997f, -0.262090f, -0.262182f,
+ -0.262275f, -0.262367f, -0.262460f, -0.262552f, -0.262645f, -0.262737f, -0.262830f, -0.262922f,
+ -0.263015f, -0.263107f, -0.263200f, -0.263292f, -0.263385f, -0.263477f, -0.263570f, -0.263662f,
+ -0.263755f, -0.263847f, -0.263940f, -0.264032f, -0.264125f, -0.264217f, -0.264309f, -0.264402f,
+ -0.264494f, -0.264587f, -0.264679f, -0.264772f, -0.264864f, -0.264957f, -0.265049f, -0.265142f,
+ -0.265234f, -0.265326f, -0.265419f, -0.265511f, -0.265604f, -0.265696f, -0.265789f, -0.265881f,
+ -0.265973f, -0.266066f, -0.266158f, -0.266251f, -0.266343f, -0.266436f, -0.266528f, -0.266620f,
+ -0.266713f, -0.266805f, -0.266898f, -0.266990f, -0.267082f, -0.267175f, -0.267267f, -0.267359f,
+ -0.267452f, -0.267544f, -0.267637f, -0.267729f, -0.267821f, -0.267914f, -0.268006f, -0.268099f,
+ -0.268191f, -0.268283f, -0.268376f, -0.268468f, -0.268560f, -0.268653f, -0.268745f, -0.268837f,
+ -0.268930f, -0.269022f, -0.269114f, -0.269207f, -0.269299f, -0.269391f, -0.269484f, -0.269576f,
+ -0.269668f, -0.269761f, -0.269853f, -0.269945f, -0.270038f, -0.270130f, -0.270222f, -0.270315f,
+ -0.270407f, -0.270499f, -0.270591f, -0.270684f, -0.270776f, -0.270868f, -0.270961f, -0.271053f,
+ -0.271145f, -0.271237f, -0.271330f, -0.271422f, -0.271514f, -0.271607f, -0.271699f, -0.271791f,
+ -0.271883f, -0.271976f, -0.272068f, -0.272160f, -0.272252f, -0.272345f, -0.272437f, -0.272529f,
+ -0.272621f, -0.272714f, -0.272806f, -0.272898f, -0.272990f, -0.273083f, -0.273175f, -0.273267f,
+ -0.273359f, -0.273451f, -0.273544f, -0.273636f, -0.273728f, -0.273820f, -0.273912f, -0.274005f,
+ -0.274097f, -0.274189f, -0.274281f, -0.274374f, -0.274466f, -0.274558f, -0.274650f, -0.274742f,
+ -0.274834f, -0.274927f, -0.275019f, -0.275111f, -0.275203f, -0.275295f, -0.275387f, -0.275480f,
+ -0.275572f, -0.275664f, -0.275756f, -0.275848f, -0.275940f, -0.276033f, -0.276125f, -0.276217f,
+ -0.276309f, -0.276401f, -0.276493f, -0.276585f, -0.276678f, -0.276770f, -0.276862f, -0.276954f,
+ -0.277046f, -0.277138f, -0.277230f, -0.277322f, -0.277415f, -0.277507f, -0.277599f, -0.277691f,
+ -0.277783f, -0.277875f, -0.277967f, -0.278059f, -0.278151f, -0.278243f, -0.278336f, -0.278428f,
+ -0.278520f, -0.278612f, -0.278704f, -0.278796f, -0.278888f, -0.278980f, -0.279072f, -0.279164f,
+ -0.279256f, -0.279348f, -0.279440f, -0.279532f, -0.279624f, -0.279717f, -0.279809f, -0.279901f,
+ -0.279993f, -0.280085f, -0.280177f, -0.280269f, -0.280361f, -0.280453f, -0.280545f, -0.280637f,
+ -0.280729f, -0.280821f, -0.280913f, -0.281005f, -0.281097f, -0.281189f, -0.281281f, -0.281373f,
+ -0.281465f, -0.281557f, -0.281649f, -0.281741f, -0.281833f, -0.281925f, -0.282017f, -0.282109f,
+ -0.282201f, -0.282293f, -0.282385f, -0.282477f, -0.282569f, -0.282661f, -0.282753f, -0.282845f,
+ -0.282937f, -0.283029f, -0.283120f, -0.283212f, -0.283304f, -0.283396f, -0.283488f, -0.283580f,
+ -0.283672f, -0.283764f, -0.283856f, -0.283948f, -0.284040f, -0.284132f, -0.284224f, -0.284316f,
+ -0.284408f, -0.284499f, -0.284591f, -0.284683f, -0.284775f, -0.284867f, -0.284959f, -0.285051f,
+ -0.285143f, -0.285235f, -0.285327f, -0.285418f, -0.285510f, -0.285602f, -0.285694f, -0.285786f,
+ -0.285878f, -0.285970f, -0.286062f, -0.286153f, -0.286245f, -0.286337f, -0.286429f, -0.286521f,
+ -0.286613f, -0.286705f, -0.286796f, -0.286888f, -0.286980f, -0.287072f, -0.287164f, -0.287256f,
+ -0.287347f, -0.287439f, -0.287531f, -0.287623f, -0.287715f, -0.287807f, -0.287898f, -0.287990f,
+ -0.288082f, -0.288174f, -0.288266f, -0.288357f, -0.288449f, -0.288541f, -0.288633f, -0.288725f,
+ -0.288816f, -0.288908f, -0.289000f, -0.289092f, -0.289184f, -0.289275f, -0.289367f, -0.289459f,
+ -0.289551f, -0.289642f, -0.289734f, -0.289826f, -0.289918f, -0.290009f, -0.290101f, -0.290193f,
+ -0.290285f, -0.290376f, -0.290468f, -0.290560f, -0.290652f, -0.290743f, -0.290835f, -0.290927f,
+ -0.291019f, -0.291110f, -0.291202f, -0.291294f, -0.291385f, -0.291477f, -0.291569f, -0.291661f,
+ -0.291752f, -0.291844f, -0.291936f, -0.292027f, -0.292119f, -0.292211f, -0.292302f, -0.292394f,
+ -0.292486f, -0.292577f, -0.292669f, -0.292761f, -0.292852f, -0.292944f, -0.293036f, -0.293128f,
+ -0.293219f, -0.293311f, -0.293402f, -0.293494f, -0.293586f, -0.293677f, -0.293769f, -0.293861f,
+ -0.293952f, -0.294044f, -0.294136f, -0.294227f, -0.294319f, -0.294410f, -0.294502f, -0.294594f,
+ -0.294685f, -0.294777f, -0.294869f, -0.294960f, -0.295052f, -0.295143f, -0.295235f, -0.295327f,
+ -0.295418f, -0.295510f, -0.295601f, -0.295693f, -0.295785f, -0.295876f, -0.295968f, -0.296059f,
+ -0.296151f, -0.296242f, -0.296334f, -0.296426f, -0.296517f, -0.296609f, -0.296700f, -0.296792f,
+ -0.296883f, -0.296975f, -0.297066f, -0.297158f, -0.297250f, -0.297341f, -0.297433f, -0.297524f,
+ -0.297616f, -0.297707f, -0.297799f, -0.297890f, -0.297982f, -0.298073f, -0.298165f, -0.298256f,
+ -0.298348f, -0.298439f, -0.298531f, -0.298622f, -0.298714f, -0.298805f, -0.298897f, -0.298988f,
+ -0.299080f, -0.299171f, -0.299263f, -0.299354f, -0.299446f, -0.299537f, -0.299629f, -0.299720f,
+ -0.299812f, -0.299903f, -0.299995f, -0.300086f, -0.300177f, -0.300269f, -0.300360f, -0.300452f,
+ -0.300543f, -0.300635f, -0.300726f, -0.300818f, -0.300909f, -0.301000f, -0.301092f, -0.301183f,
+ -0.301275f, -0.301366f, -0.301458f, -0.301549f, -0.301640f, -0.301732f, -0.301823f, -0.301915f,
+ -0.302006f, -0.302097f, -0.302189f, -0.302280f, -0.302372f, -0.302463f, -0.302554f, -0.302646f,
+ -0.302737f, -0.302828f, -0.302920f, -0.303011f, -0.303103f, -0.303194f, -0.303285f, -0.303377f,
+ -0.303468f, -0.303559f, -0.303651f, -0.303742f, -0.303833f, -0.303925f, -0.304016f, -0.304107f,
+ -0.304199f, -0.304290f, -0.304381f, -0.304473f, -0.304564f, -0.304655f, -0.304747f, -0.304838f,
+ -0.304929f, -0.305021f, -0.305112f, -0.305203f, -0.305294f, -0.305386f, -0.305477f, -0.305568f,
+ -0.305660f, -0.305751f, -0.305842f, -0.305933f, -0.306025f, -0.306116f, -0.306207f, -0.306299f,
+ -0.306390f, -0.306481f, -0.306572f, -0.306664f, -0.306755f, -0.306846f, -0.306937f, -0.307029f,
+ -0.307120f, -0.307211f, -0.307302f, -0.307394f, -0.307485f, -0.307576f, -0.307667f, -0.307758f,
+ -0.307850f, -0.307941f, -0.308032f, -0.308123f, -0.308214f, -0.308306f, -0.308397f, -0.308488f,
+ -0.308579f, -0.308670f, -0.308762f, -0.308853f, -0.308944f, -0.309035f, -0.309126f, -0.309218f,
+ -0.309309f, -0.309400f, -0.309491f, -0.309582f, -0.309673f, -0.309765f, -0.309856f, -0.309947f,
+ -0.310038f, -0.310129f, -0.310220f, -0.310311f, -0.310403f, -0.310494f, -0.310585f, -0.310676f,
+ -0.310767f, -0.310858f, -0.310949f, -0.311041f, -0.311132f, -0.311223f, -0.311314f, -0.311405f,
+ -0.311496f, -0.311587f, -0.311678f, -0.311769f, -0.311860f, -0.311952f, -0.312043f, -0.312134f,
+ -0.312225f, -0.312316f, -0.312407f, -0.312498f, -0.312589f, -0.312680f, -0.312771f, -0.312862f,
+ -0.312953f, -0.313044f, -0.313135f, -0.313227f, -0.313318f, -0.313409f, -0.313500f, -0.313591f,
+ -0.313682f, -0.313773f, -0.313864f, -0.313955f, -0.314046f, -0.314137f, -0.314228f, -0.314319f,
+ -0.314410f, -0.314501f, -0.314592f, -0.314683f, -0.314774f, -0.314865f, -0.314956f, -0.315047f,
+ -0.315138f, -0.315229f, -0.315320f, -0.315411f, -0.315502f, -0.315593f, -0.315684f, -0.315775f,
+ -0.315866f, -0.315957f, -0.316048f, -0.316139f, -0.316230f, -0.316321f, -0.316411f, -0.316502f,
+ -0.316593f, -0.316684f, -0.316775f, -0.316866f, -0.316957f, -0.317048f, -0.317139f, -0.317230f,
+ -0.317321f, -0.317412f, -0.317503f, -0.317594f, -0.317684f, -0.317775f, -0.317866f, -0.317957f,
+ -0.318048f, -0.318139f, -0.318230f, -0.318321f, -0.318412f, -0.318503f, -0.318593f, -0.318684f,
+ -0.318775f, -0.318866f, -0.318957f, -0.319048f, -0.319139f, -0.319229f, -0.319320f, -0.319411f,
+ -0.319502f, -0.319593f, -0.319684f, -0.319775f, -0.319865f, -0.319956f, -0.320047f, -0.320138f,
+ -0.320229f, -0.320320f, -0.320410f, -0.320501f, -0.320592f, -0.320683f, -0.320774f, -0.320864f,
+ -0.320955f, -0.321046f, -0.321137f, -0.321228f, -0.321318f, -0.321409f, -0.321500f, -0.321591f,
+ -0.321682f, -0.321772f, -0.321863f, -0.321954f, -0.322045f, -0.322135f, -0.322226f, -0.322317f,
+ -0.322408f, -0.322498f, -0.322589f, -0.322680f, -0.322771f, -0.322861f, -0.322952f, -0.323043f,
+ -0.323134f, -0.323224f, -0.323315f, -0.323406f, -0.323497f, -0.323587f, -0.323678f, -0.323769f,
+ -0.323859f, -0.323950f, -0.324041f, -0.324131f, -0.324222f, -0.324313f, -0.324404f, -0.324494f,
+ -0.324585f, -0.324676f, -0.324766f, -0.324857f, -0.324948f, -0.325038f, -0.325129f, -0.325220f,
+ -0.325310f, -0.325401f, -0.325492f, -0.325582f, -0.325673f, -0.325764f, -0.325854f, -0.325945f,
+ -0.326035f, -0.326126f, -0.326217f, -0.326307f, -0.326398f, -0.326489f, -0.326579f, -0.326670f,
+ -0.326760f, -0.326851f, -0.326942f, -0.327032f, -0.327123f, -0.327213f, -0.327304f, -0.327395f,
+ -0.327485f, -0.327576f, -0.327666f, -0.327757f, -0.327848f, -0.327938f, -0.328029f, -0.328119f,
+ -0.328210f, -0.328300f, -0.328391f, -0.328482f, -0.328572f, -0.328663f, -0.328753f, -0.328844f,
+ -0.328934f, -0.329025f, -0.329115f, -0.329206f, -0.329296f, -0.329387f, -0.329477f, -0.329568f,
+ -0.329658f, -0.329749f, -0.329839f, -0.329930f, -0.330020f, -0.330111f, -0.330202f, -0.330292f,
+ -0.330382f, -0.330473f, -0.330563f, -0.330654f, -0.330744f, -0.330835f, -0.330925f, -0.331016f,
+ -0.331106f, -0.331197f, -0.331287f, -0.331378f, -0.331468f, -0.331559f, -0.331649f, -0.331739f,
+ -0.331830f, -0.331920f, -0.332011f, -0.332101f, -0.332192f, -0.332282f, -0.332373f, -0.332463f,
+ -0.332553f, -0.332644f, -0.332734f, -0.332825f, -0.332915f, -0.333005f, -0.333096f, -0.333186f,
+ -0.333277f, -0.333367f, -0.333457f, -0.333548f, -0.333638f, -0.333729f, -0.333819f, -0.333909f,
+ -0.334000f, -0.334090f, -0.334180f, -0.334271f, -0.334361f, -0.334451f, -0.334542f, -0.334632f,
+ -0.334722f, -0.334813f, -0.334903f, -0.334994f, -0.335084f, -0.335174f, -0.335265f, -0.335355f,
+ -0.335445f, -0.335535f, -0.335626f, -0.335716f, -0.335806f, -0.335897f, -0.335987f, -0.336077f,
+ -0.336168f, -0.336258f, -0.336348f, -0.336438f, -0.336529f, -0.336619f, -0.336709f, -0.336800f,
+ -0.336890f, -0.336980f, -0.337070f, -0.337161f, -0.337251f, -0.337341f, -0.337431f, -0.337522f,
+ -0.337612f, -0.337702f, -0.337792f, -0.337883f, -0.337973f, -0.338063f, -0.338153f, -0.338244f,
+ -0.338334f, -0.338424f, -0.338514f, -0.338604f, -0.338695f, -0.338785f, -0.338875f, -0.338965f,
+ -0.339055f, -0.339146f, -0.339236f, -0.339326f, -0.339416f, -0.339506f, -0.339597f, -0.339687f,
+ -0.339777f, -0.339867f, -0.339957f, -0.340047f, -0.340138f, -0.340228f, -0.340318f, -0.340408f,
+ -0.340498f, -0.340588f, -0.340678f, -0.340769f, -0.340859f, -0.340949f, -0.341039f, -0.341129f,
+ -0.341219f, -0.341309f, -0.341399f, -0.341490f, -0.341580f, -0.341670f, -0.341760f, -0.341850f,
+ -0.341940f, -0.342030f, -0.342120f, -0.342210f, -0.342300f, -0.342391f, -0.342481f, -0.342571f,
+ -0.342661f, -0.342751f, -0.342841f, -0.342931f, -0.343021f, -0.343111f, -0.343201f, -0.343291f,
+ -0.343381f, -0.343471f, -0.343561f, -0.343651f, -0.343741f, -0.343831f, -0.343921f, -0.344011f,
+ -0.344101f, -0.344191f, -0.344281f, -0.344371f, -0.344461f, -0.344551f, -0.344641f, -0.344731f,
+ -0.344821f, -0.344911f, -0.345001f, -0.345091f, -0.345181f, -0.345271f, -0.345361f, -0.345451f,
+ -0.345541f, -0.345631f, -0.345721f, -0.345811f, -0.345901f, -0.345991f, -0.346081f, -0.346171f,
+ -0.346261f, -0.346351f, -0.346441f, -0.346531f, -0.346621f, -0.346711f, -0.346801f, -0.346890f,
+ -0.346980f, -0.347070f, -0.347160f, -0.347250f, -0.347340f, -0.347430f, -0.347520f, -0.347610f,
+ -0.347700f, -0.347790f, -0.347879f, -0.347969f, -0.348059f, -0.348149f, -0.348239f, -0.348329f,
+ -0.348419f, -0.348509f, -0.348598f, -0.348688f, -0.348778f, -0.348868f, -0.348958f, -0.349048f,
+ -0.349138f, -0.349227f, -0.349317f, -0.349407f, -0.349497f, -0.349587f, -0.349676f, -0.349766f,
+ -0.349856f, -0.349946f, -0.350036f, -0.350126f, -0.350215f, -0.350305f, -0.350395f, -0.350485f,
+ -0.350575f, -0.350664f, -0.350754f, -0.350844f, -0.350934f, -0.351023f, -0.351113f, -0.351203f,
+ -0.351293f, -0.351383f, -0.351472f, -0.351562f, -0.351652f, -0.351742f, -0.351831f, -0.351921f,
+ -0.352011f, -0.352100f, -0.352190f, -0.352280f, -0.352370f, -0.352459f, -0.352549f, -0.352639f,
+ -0.352729f, -0.352818f, -0.352908f, -0.352998f, -0.353087f, -0.353177f, -0.353267f, -0.353356f,
+ -0.353446f, -0.353536f, -0.353626f, -0.353715f, -0.353805f, -0.353895f, -0.353984f, -0.354074f,
+ -0.354164f, -0.354253f, -0.354343f, -0.354432f, -0.354522f, -0.354612f, -0.354701f, -0.354791f,
+ -0.354881f, -0.354970f, -0.355060f, -0.355150f, -0.355239f, -0.355329f, -0.355418f, -0.355508f,
+ -0.355598f, -0.355687f, -0.355777f, -0.355866f, -0.355956f, -0.356046f, -0.356135f, -0.356225f,
+ -0.356314f, -0.356404f, -0.356494f, -0.356583f, -0.356673f, -0.356762f, -0.356852f, -0.356941f,
+ -0.357031f, -0.357121f, -0.357210f, -0.357300f, -0.357389f, -0.357479f, -0.357568f, -0.357658f,
+ -0.357747f, -0.357837f, -0.357926f, -0.358016f, -0.358105f, -0.358195f, -0.358284f, -0.358374f,
+ -0.358463f, -0.358553f, -0.358642f, -0.358732f, -0.358821f, -0.358911f, -0.359000f, -0.359090f,
+ -0.359179f, -0.359269f, -0.359358f, -0.359448f, -0.359537f, -0.359627f, -0.359716f, -0.359806f,
+ -0.359895f, -0.359984f, -0.360074f, -0.360163f, -0.360253f, -0.360342f, -0.360432f, -0.360521f,
+ -0.360611f, -0.360700f, -0.360789f, -0.360879f, -0.360968f, -0.361058f, -0.361147f, -0.361236f,
+ -0.361326f, -0.361415f, -0.361505f, -0.361594f, -0.361683f, -0.361773f, -0.361862f, -0.361952f,
+ -0.362041f, -0.362130f, -0.362220f, -0.362309f, -0.362398f, -0.362488f, -0.362577f, -0.362666f,
+ -0.362756f, -0.362845f, -0.362934f, -0.363024f, -0.363113f, -0.363202f, -0.363292f, -0.363381f,
+ -0.363470f, -0.363560f, -0.363649f, -0.363738f, -0.363828f, -0.363917f, -0.364006f, -0.364096f,
+ -0.364185f, -0.364274f, -0.364363f, -0.364453f, -0.364542f, -0.364631f, -0.364720f, -0.364810f,
+ -0.364899f, -0.364988f, -0.365078f, -0.365167f, -0.365256f, -0.365345f, -0.365435f, -0.365524f,
+ -0.365613f, -0.365702f, -0.365791f, -0.365881f, -0.365970f, -0.366059f, -0.366148f, -0.366238f,
+ -0.366327f, -0.366416f, -0.366505f, -0.366594f, -0.366684f, -0.366773f, -0.366862f, -0.366951f,
+ -0.367040f, -0.367130f, -0.367219f, -0.367308f, -0.367397f, -0.367486f, -0.367575f, -0.367665f,
+ -0.367754f, -0.367843f, -0.367932f, -0.368021f, -0.368110f, -0.368199f, -0.368289f, -0.368378f,
+ -0.368467f, -0.368556f, -0.368645f, -0.368734f, -0.368823f, -0.368912f, -0.369002f, -0.369091f,
+ -0.369180f, -0.369269f, -0.369358f, -0.369447f, -0.369536f, -0.369625f, -0.369714f, -0.369803f,
+ -0.369892f, -0.369982f, -0.370071f, -0.370160f, -0.370249f, -0.370338f, -0.370427f, -0.370516f,
+ -0.370605f, -0.370694f, -0.370783f, -0.370872f, -0.370961f, -0.371050f, -0.371139f, -0.371228f,
+ -0.371317f, -0.371406f, -0.371495f, -0.371584f, -0.371673f, -0.371762f, -0.371851f, -0.371940f,
+ -0.372029f, -0.372118f, -0.372207f, -0.372296f, -0.372385f, -0.372474f, -0.372563f, -0.372652f,
+ -0.372741f, -0.372830f, -0.372919f, -0.373008f, -0.373097f, -0.373186f, -0.373275f, -0.373364f,
+ -0.373453f, -0.373542f, -0.373631f, -0.373719f, -0.373808f, -0.373897f, -0.373986f, -0.374075f,
+ -0.374164f, -0.374253f, -0.374342f, -0.374431f, -0.374520f, -0.374609f, -0.374697f, -0.374786f,
+ -0.374875f, -0.374964f, -0.375053f, -0.375142f, -0.375231f, -0.375320f, -0.375408f, -0.375497f,
+ -0.375586f, -0.375675f, -0.375764f, -0.375853f, -0.375942f, -0.376030f, -0.376119f, -0.376208f,
+ -0.376297f, -0.376386f, -0.376475f, -0.376563f, -0.376652f, -0.376741f, -0.376830f, -0.376919f,
+ -0.377007f, -0.377096f, -0.377185f, -0.377274f, -0.377363f, -0.377451f, -0.377540f, -0.377629f,
+ -0.377718f, -0.377806f, -0.377895f, -0.377984f, -0.378073f, -0.378162f, -0.378250f, -0.378339f,
+ -0.378428f, -0.378516f, -0.378605f, -0.378694f, -0.378783f, -0.378871f, -0.378960f, -0.379049f,
+ -0.379138f, -0.379226f, -0.379315f, -0.379404f, -0.379492f, -0.379581f, -0.379670f, -0.379759f,
+ -0.379847f, -0.379936f, -0.380025f, -0.380113f, -0.380202f, -0.380291f, -0.380379f, -0.380468f,
+ -0.380557f, -0.380645f, -0.380734f, -0.380823f, -0.380911f, -0.381000f, -0.381088f, -0.381177f,
+ -0.381266f, -0.381354f, -0.381443f, -0.381532f, -0.381620f, -0.381709f, -0.381797f, -0.381886f,
+ -0.381975f, -0.382063f, -0.382152f, -0.382241f, -0.382329f, -0.382418f, -0.382506f, -0.382595f,
+ -0.382683f, -0.382772f, -0.382861f, -0.382949f, -0.383038f, -0.383126f, -0.383215f, -0.383303f,
+ -0.383392f, -0.383480f, -0.383569f, -0.383658f, -0.383746f, -0.383835f, -0.383923f, -0.384012f,
+ -0.384100f, -0.384189f, -0.384277f, -0.384366f, -0.384454f, -0.384543f, -0.384631f, -0.384720f,
+ -0.384808f, -0.384897f, -0.384985f, -0.385074f, -0.385162f, -0.385251f, -0.385339f, -0.385428f,
+ -0.385516f, -0.385605f, -0.385693f, -0.385781f, -0.385870f, -0.385958f, -0.386047f, -0.386135f,
+ -0.386224f, -0.386312f, -0.386400f, -0.386489f, -0.386577f, -0.386666f, -0.386754f, -0.386843f,
+ -0.386931f, -0.387019f, -0.387108f, -0.387196f, -0.387285f, -0.387373f, -0.387461f, -0.387550f,
+ -0.387638f, -0.387727f, -0.387815f, -0.387903f, -0.387992f, -0.388080f, -0.388168f, -0.388257f,
+ -0.388345f, -0.388433f, -0.388522f, -0.388610f, -0.388698f, -0.388787f, -0.388875f, -0.388963f,
+ -0.389052f, -0.389140f, -0.389228f, -0.389317f, -0.389405f, -0.389493f, -0.389582f, -0.389670f,
+ -0.389758f, -0.389846f, -0.389935f, -0.390023f, -0.390111f, -0.390200f, -0.390288f, -0.390376f,
+ -0.390464f, -0.390553f, -0.390641f, -0.390729f, -0.390817f, -0.390906f, -0.390994f, -0.391082f,
+ -0.391170f, -0.391259f, -0.391347f, -0.391435f, -0.391523f, -0.391612f, -0.391700f, -0.391788f,
+ -0.391876f, -0.391964f, -0.392053f, -0.392141f, -0.392229f, -0.392317f, -0.392405f, -0.392493f,
+ -0.392582f, -0.392670f, -0.392758f, -0.392846f, -0.392934f, -0.393023f, -0.393111f, -0.393199f,
+ -0.393287f, -0.393375f, -0.393463f, -0.393551f, -0.393640f, -0.393728f, -0.393816f, -0.393904f,
+ -0.393992f, -0.394080f, -0.394168f, -0.394256f, -0.394344f, -0.394433f, -0.394521f, -0.394609f,
+ -0.394697f, -0.394785f, -0.394873f, -0.394961f, -0.395049f, -0.395137f, -0.395225f, -0.395313f,
+ -0.395401f, -0.395490f, -0.395578f, -0.395666f, -0.395754f, -0.395842f, -0.395930f, -0.396018f,
+ -0.396106f, -0.396194f, -0.396282f, -0.396370f, -0.396458f, -0.396546f, -0.396634f, -0.396722f,
+ -0.396810f, -0.396898f, -0.396986f, -0.397074f, -0.397162f, -0.397250f, -0.397338f, -0.397426f,
+ -0.397514f, -0.397602f, -0.397690f, -0.397778f, -0.397866f, -0.397954f, -0.398042f, -0.398130f,
+ -0.398218f, -0.398306f, -0.398393f, -0.398481f, -0.398569f, -0.398657f, -0.398745f, -0.398833f,
+ -0.398921f, -0.399009f, -0.399097f, -0.399185f, -0.399273f, -0.399361f, -0.399448f, -0.399536f,
+ -0.399624f, -0.399712f, -0.399800f, -0.399888f, -0.399976f, -0.400064f, -0.400151f, -0.400239f,
+ -0.400327f, -0.400415f, -0.400503f, -0.400591f, -0.400679f, -0.400766f, -0.400854f, -0.400942f,
+ -0.401030f, -0.401118f, -0.401206f, -0.401293f, -0.401381f, -0.401469f, -0.401557f, -0.401645f,
+ -0.401732f, -0.401820f, -0.401908f, -0.401996f, -0.402084f, -0.402171f, -0.402259f, -0.402347f,
+ -0.402435f, -0.402522f, -0.402610f, -0.402698f, -0.402786f, -0.402873f, -0.402961f, -0.403049f,
+ -0.403137f, -0.403224f, -0.403312f, -0.403400f, -0.403488f, -0.403575f, -0.403663f, -0.403751f,
+ -0.403838f, -0.403926f, -0.404014f, -0.404102f, -0.404189f, -0.404277f, -0.404365f, -0.404452f,
+ -0.404540f, -0.404628f, -0.404715f, -0.404803f, -0.404891f, -0.404978f, -0.405066f, -0.405154f,
+ -0.405241f, -0.405329f, -0.405417f, -0.405504f, -0.405592f, -0.405680f, -0.405767f, -0.405855f,
+ -0.405942f, -0.406030f, -0.406118f, -0.406205f, -0.406293f, -0.406380f, -0.406468f, -0.406556f,
+ -0.406643f, -0.406731f, -0.406818f, -0.406906f, -0.406994f, -0.407081f, -0.407169f, -0.407256f,
+ -0.407344f, -0.407431f, -0.407519f, -0.407606f, -0.407694f, -0.407782f, -0.407869f, -0.407957f,
+ -0.408044f, -0.408132f, -0.408219f, -0.408307f, -0.408394f, -0.408482f, -0.408569f, -0.408657f,
+ -0.408744f, -0.408832f, -0.408919f, -0.409007f, -0.409094f, -0.409182f, -0.409269f, -0.409357f,
+ -0.409444f, -0.409532f, -0.409619f, -0.409707f, -0.409794f, -0.409881f, -0.409969f, -0.410056f,
+ -0.410144f, -0.410231f, -0.410319f, -0.410406f, -0.410493f, -0.410581f, -0.410668f, -0.410756f,
+ -0.410843f, -0.410931f, -0.411018f, -0.411105f, -0.411193f, -0.411280f, -0.411368f, -0.411455f,
+ -0.411542f, -0.411630f, -0.411717f, -0.411804f, -0.411892f, -0.411979f, -0.412067f, -0.412154f,
+ -0.412241f, -0.412329f, -0.412416f, -0.412503f, -0.412591f, -0.412678f, -0.412765f, -0.412853f,
+ -0.412940f, -0.413027f, -0.413115f, -0.413202f, -0.413289f, -0.413376f, -0.413464f, -0.413551f,
+ -0.413638f, -0.413726f, -0.413813f, -0.413900f, -0.413987f, -0.414075f, -0.414162f, -0.414249f,
+ -0.414337f, -0.414424f, -0.414511f, -0.414598f, -0.414685f, -0.414773f, -0.414860f, -0.414947f,
+ -0.415034f, -0.415122f, -0.415209f, -0.415296f, -0.415383f, -0.415471f, -0.415558f, -0.415645f,
+ -0.415732f, -0.415819f, -0.415906f, -0.415994f, -0.416081f, -0.416168f, -0.416255f, -0.416342f,
+ -0.416430f, -0.416517f, -0.416604f, -0.416691f, -0.416778f, -0.416865f, -0.416952f, -0.417040f,
+ -0.417127f, -0.417214f, -0.417301f, -0.417388f, -0.417475f, -0.417562f, -0.417650f, -0.417737f,
+ -0.417824f, -0.417911f, -0.417998f, -0.418085f, -0.418172f, -0.418259f, -0.418346f, -0.418433f,
+ -0.418520f, -0.418608f, -0.418695f, -0.418782f, -0.418869f, -0.418956f, -0.419043f, -0.419130f,
+ -0.419217f, -0.419304f, -0.419391f, -0.419478f, -0.419565f, -0.419652f, -0.419739f, -0.419826f,
+ -0.419913f, -0.420000f, -0.420087f, -0.420174f, -0.420261f, -0.420348f, -0.420435f, -0.420522f,
+ -0.420609f, -0.420696f, -0.420783f, -0.420870f, -0.420957f, -0.421044f, -0.421131f, -0.421218f,
+ -0.421305f, -0.421392f, -0.421479f, -0.421566f, -0.421653f, -0.421739f, -0.421826f, -0.421913f,
+ -0.422000f, -0.422087f, -0.422174f, -0.422261f, -0.422348f, -0.422435f, -0.422522f, -0.422609f,
+ -0.422695f, -0.422782f, -0.422869f, -0.422956f, -0.423043f, -0.423130f, -0.423217f, -0.423304f,
+ -0.423390f, -0.423477f, -0.423564f, -0.423651f, -0.423738f, -0.423825f, -0.423912f, -0.423998f,
+ -0.424085f, -0.424172f, -0.424259f, -0.424346f, -0.424432f, -0.424519f, -0.424606f, -0.424693f,
+ -0.424780f, -0.424866f, -0.424953f, -0.425040f, -0.425127f, -0.425214f, -0.425300f, -0.425387f,
+ -0.425474f, -0.425561f, -0.425647f, -0.425734f, -0.425821f, -0.425908f, -0.425994f, -0.426081f,
+ -0.426168f, -0.426255f, -0.426341f, -0.426428f, -0.426515f, -0.426601f, -0.426688f, -0.426775f,
+ -0.426862f, -0.426948f, -0.427035f, -0.427122f, -0.427208f, -0.427295f, -0.427382f, -0.427468f,
+ -0.427555f, -0.427642f, -0.427728f, -0.427815f, -0.427902f, -0.427988f, -0.428075f, -0.428162f,
+ -0.428248f, -0.428335f, -0.428422f, -0.428508f, -0.428595f, -0.428681f, -0.428768f, -0.428855f,
+ -0.428941f, -0.429028f, -0.429114f, -0.429201f, -0.429288f, -0.429374f, -0.429461f, -0.429547f,
+ -0.429634f, -0.429721f, -0.429807f, -0.429894f, -0.429980f, -0.430067f, -0.430153f, -0.430240f,
+ -0.430326f, -0.430413f, -0.430500f, -0.430586f, -0.430673f, -0.430759f, -0.430846f, -0.430932f,
+ -0.431019f, -0.431105f, -0.431192f, -0.431278f, -0.431365f, -0.431451f, -0.431538f, -0.431624f,
+ -0.431711f, -0.431797f, -0.431884f, -0.431970f, -0.432057f, -0.432143f, -0.432229f, -0.432316f,
+ -0.432402f, -0.432489f, -0.432575f, -0.432662f, -0.432748f, -0.432835f, -0.432921f, -0.433007f,
+ -0.433094f, -0.433180f, -0.433267f, -0.433353f, -0.433439f, -0.433526f, -0.433612f, -0.433699f,
+ -0.433785f, -0.433871f, -0.433958f, -0.434044f, -0.434131f, -0.434217f, -0.434303f, -0.434390f,
+ -0.434476f, -0.434562f, -0.434649f, -0.434735f, -0.434821f, -0.434908f, -0.434994f, -0.435080f,
+ -0.435167f, -0.435253f, -0.435339f, -0.435426f, -0.435512f, -0.435598f, -0.435685f, -0.435771f,
+ -0.435857f, -0.435943f, -0.436030f, -0.436116f, -0.436202f, -0.436288f, -0.436375f, -0.436461f,
+ -0.436547f, -0.436633f, -0.436720f, -0.436806f, -0.436892f, -0.436978f, -0.437065f, -0.437151f,
+ -0.437237f, -0.437323f, -0.437410f, -0.437496f, -0.437582f, -0.437668f, -0.437754f, -0.437841f,
+ -0.437927f, -0.438013f, -0.438099f, -0.438185f, -0.438272f, -0.438358f, -0.438444f, -0.438530f,
+ -0.438616f, -0.438702f, -0.438789f, -0.438875f, -0.438961f, -0.439047f, -0.439133f, -0.439219f,
+ -0.439305f, -0.439392f, -0.439478f, -0.439564f, -0.439650f, -0.439736f, -0.439822f, -0.439908f,
+ -0.439994f, -0.440080f, -0.440166f, -0.440253f, -0.440339f, -0.440425f, -0.440511f, -0.440597f,
+ -0.440683f, -0.440769f, -0.440855f, -0.440941f, -0.441027f, -0.441113f, -0.441199f, -0.441285f,
+ -0.441371f, -0.441457f, -0.441543f, -0.441629f, -0.441715f, -0.441801f, -0.441887f, -0.441973f,
+ -0.442059f, -0.442145f, -0.442231f, -0.442317f, -0.442403f, -0.442489f, -0.442575f, -0.442661f,
+ -0.442747f, -0.442833f, -0.442919f, -0.443005f, -0.443091f, -0.443177f, -0.443263f, -0.443349f,
+ -0.443435f, -0.443521f, -0.443607f, -0.443693f, -0.443779f, -0.443864f, -0.443950f, -0.444036f,
+ -0.444122f, -0.444208f, -0.444294f, -0.444380f, -0.444466f, -0.444552f, -0.444637f, -0.444723f,
+ -0.444809f, -0.444895f, -0.444981f, -0.445067f, -0.445153f, -0.445239f, -0.445324f, -0.445410f,
+ -0.445496f, -0.445582f, -0.445668f, -0.445754f, -0.445839f, -0.445925f, -0.446011f, -0.446097f,
+ -0.446183f, -0.446268f, -0.446354f, -0.446440f, -0.446526f, -0.446612f, -0.446697f, -0.446783f,
+ -0.446869f, -0.446955f, -0.447040f, -0.447126f, -0.447212f, -0.447298f, -0.447383f, -0.447469f,
+ -0.447555f, -0.447641f, -0.447726f, -0.447812f, -0.447898f, -0.447983f, -0.448069f, -0.448155f,
+ -0.448241f, -0.448326f, -0.448412f, -0.448498f, -0.448583f, -0.448669f, -0.448755f, -0.448840f,
+ -0.448926f, -0.449012f, -0.449097f, -0.449183f, -0.449269f, -0.449354f, -0.449440f, -0.449526f,
+ -0.449611f, -0.449697f, -0.449783f, -0.449868f, -0.449954f, -0.450039f, -0.450125f, -0.450211f,
+ -0.450296f, -0.450382f, -0.450467f, -0.450553f, -0.450639f, -0.450724f, -0.450810f, -0.450895f,
+ -0.450981f, -0.451067f, -0.451152f, -0.451238f, -0.451323f, -0.451409f, -0.451494f, -0.451580f,
+ -0.451665f, -0.451751f, -0.451836f, -0.451922f, -0.452008f, -0.452093f, -0.452179f, -0.452264f,
+ -0.452350f, -0.452435f, -0.452521f, -0.452606f, -0.452692f, -0.452777f, -0.452863f, -0.452948f,
+ -0.453033f, -0.453119f, -0.453204f, -0.453290f, -0.453375f, -0.453461f, -0.453546f, -0.453632f,
+ -0.453717f, -0.453803f, -0.453888f, -0.453973f, -0.454059f, -0.454144f, -0.454230f, -0.454315f,
+ -0.454400f, -0.454486f, -0.454571f, -0.454657f, -0.454742f, -0.454827f, -0.454913f, -0.454998f,
+ -0.455084f, -0.455169f, -0.455254f, -0.455340f, -0.455425f, -0.455510f, -0.455596f, -0.455681f,
+ -0.455766f, -0.455852f, -0.455937f, -0.456022f, -0.456108f, -0.456193f, -0.456278f, -0.456364f,
+ -0.456449f, -0.456534f, -0.456620f, -0.456705f, -0.456790f, -0.456875f, -0.456961f, -0.457046f,
+ -0.457131f, -0.457217f, -0.457302f, -0.457387f, -0.457472f, -0.457558f, -0.457643f, -0.457728f,
+ -0.457813f, -0.457899f, -0.457984f, -0.458069f, -0.458154f, -0.458239f, -0.458325f, -0.458410f,
+ -0.458495f, -0.458580f, -0.458665f, -0.458751f, -0.458836f, -0.458921f, -0.459006f, -0.459091f,
+ -0.459177f, -0.459262f, -0.459347f, -0.459432f, -0.459517f, -0.459602f, -0.459687f, -0.459773f,
+ -0.459858f, -0.459943f, -0.460028f, -0.460113f, -0.460198f, -0.460283f, -0.460369f, -0.460454f,
+ -0.460539f, -0.460624f, -0.460709f, -0.460794f, -0.460879f, -0.460964f, -0.461049f, -0.461134f,
+ -0.461219f, -0.461304f, -0.461390f, -0.461475f, -0.461560f, -0.461645f, -0.461730f, -0.461815f,
+ -0.461900f, -0.461985f, -0.462070f, -0.462155f, -0.462240f, -0.462325f, -0.462410f, -0.462495f,
+ -0.462580f, -0.462665f, -0.462750f, -0.462835f, -0.462920f, -0.463005f, -0.463090f, -0.463175f,
+ -0.463260f, -0.463345f, -0.463430f, -0.463515f, -0.463600f, -0.463685f, -0.463769f, -0.463854f,
+ -0.463939f, -0.464024f, -0.464109f, -0.464194f, -0.464279f, -0.464364f, -0.464449f, -0.464534f,
+ -0.464619f, -0.464704f, -0.464788f, -0.464873f, -0.464958f, -0.465043f, -0.465128f, -0.465213f,
+ -0.465298f, -0.465383f, -0.465467f, -0.465552f, -0.465637f, -0.465722f, -0.465807f, -0.465892f,
+ -0.465977f, -0.466061f, -0.466146f, -0.466231f, -0.466316f, -0.466401f, -0.466485f, -0.466570f,
+ -0.466655f, -0.466740f, -0.466825f, -0.466909f, -0.466994f, -0.467079f, -0.467164f, -0.467248f,
+ -0.467333f, -0.467418f, -0.467503f, -0.467587f, -0.467672f, -0.467757f, -0.467842f, -0.467926f,
+ -0.468011f, -0.468096f, -0.468181f, -0.468265f, -0.468350f, -0.468435f, -0.468519f, -0.468604f,
+ -0.468689f, -0.468774f, -0.468858f, -0.468943f, -0.469028f, -0.469112f, -0.469197f, -0.469282f,
+ -0.469366f, -0.469451f, -0.469536f, -0.469620f, -0.469705f, -0.469789f, -0.469874f, -0.469959f,
+ -0.470043f, -0.470128f, -0.470213f, -0.470297f, -0.470382f, -0.470466f, -0.470551f, -0.470636f,
+ -0.470720f, -0.470805f, -0.470889f, -0.470974f, -0.471058f, -0.471143f, -0.471228f, -0.471312f,
+ -0.471397f, -0.471481f, -0.471566f, -0.471650f, -0.471735f, -0.471819f, -0.471904f, -0.471988f,
+ -0.472073f, -0.472158f, -0.472242f, -0.472327f, -0.472411f, -0.472496f, -0.472580f, -0.472665f,
+ -0.472749f, -0.472834f, -0.472918f, -0.473002f, -0.473087f, -0.473171f, -0.473256f, -0.473340f,
+ -0.473425f, -0.473509f, -0.473594f, -0.473678f, -0.473763f, -0.473847f, -0.473931f, -0.474016f,
+ -0.474100f, -0.474185f, -0.474269f, -0.474353f, -0.474438f, -0.474522f, -0.474607f, -0.474691f,
+ -0.474775f, -0.474860f, -0.474944f, -0.475029f, -0.475113f, -0.475197f, -0.475282f, -0.475366f,
+ -0.475450f, -0.475535f, -0.475619f, -0.475703f, -0.475788f, -0.475872f, -0.475956f, -0.476041f,
+ -0.476125f, -0.476209f, -0.476294f, -0.476378f, -0.476462f, -0.476546f, -0.476631f, -0.476715f,
+ -0.476799f, -0.476884f, -0.476968f, -0.477052f, -0.477136f, -0.477221f, -0.477305f, -0.477389f,
+ -0.477473f, -0.477558f, -0.477642f, -0.477726f, -0.477810f, -0.477894f, -0.477979f, -0.478063f,
+ -0.478147f, -0.478231f, -0.478315f, -0.478400f, -0.478484f, -0.478568f, -0.478652f, -0.478736f,
+ -0.478821f, -0.478905f, -0.478989f, -0.479073f, -0.479157f, -0.479241f, -0.479325f, -0.479410f,
+ -0.479494f, -0.479578f, -0.479662f, -0.479746f, -0.479830f, -0.479914f, -0.479998f, -0.480083f,
+ -0.480167f, -0.480251f, -0.480335f, -0.480419f, -0.480503f, -0.480587f, -0.480671f, -0.480755f,
+ -0.480839f, -0.480923f, -0.481007f, -0.481091f, -0.481176f, -0.481260f, -0.481344f, -0.481428f,
+ -0.481512f, -0.481596f, -0.481680f, -0.481764f, -0.481848f, -0.481932f, -0.482016f, -0.482100f,
+ -0.482184f, -0.482268f, -0.482352f, -0.482436f, -0.482520f, -0.482604f, -0.482688f, -0.482772f,
+ -0.482856f, -0.482940f, -0.483023f, -0.483107f, -0.483191f, -0.483275f, -0.483359f, -0.483443f,
+ -0.483527f, -0.483611f, -0.483695f, -0.483779f, -0.483863f, -0.483947f, -0.484031f, -0.484114f,
+ -0.484198f, -0.484282f, -0.484366f, -0.484450f, -0.484534f, -0.484618f, -0.484702f, -0.484785f,
+ -0.484869f, -0.484953f, -0.485037f, -0.485121f, -0.485205f, -0.485288f, -0.485372f, -0.485456f,
+ -0.485540f, -0.485624f, -0.485708f, -0.485791f, -0.485875f, -0.485959f, -0.486043f, -0.486126f,
+ -0.486210f, -0.486294f, -0.486378f, -0.486462f, -0.486545f, -0.486629f, -0.486713f, -0.486797f,
+ -0.486880f, -0.486964f, -0.487048f, -0.487132f, -0.487215f, -0.487299f, -0.487383f, -0.487466f,
+ -0.487550f, -0.487634f, -0.487718f, -0.487801f, -0.487885f, -0.487969f, -0.488052f, -0.488136f,
+ -0.488220f, -0.488303f, -0.488387f, -0.488471f, -0.488554f, -0.488638f, -0.488722f, -0.488805f,
+ -0.488889f, -0.488973f, -0.489056f, -0.489140f, -0.489223f, -0.489307f, -0.489391f, -0.489474f,
+ -0.489558f, -0.489641f, -0.489725f, -0.489809f, -0.489892f, -0.489976f, -0.490059f, -0.490143f,
+ -0.490226f, -0.490310f, -0.490394f, -0.490477f, -0.490561f, -0.490644f, -0.490728f, -0.490811f,
+ -0.490895f, -0.490978f, -0.491062f, -0.491145f, -0.491229f, -0.491312f, -0.491396f, -0.491479f,
+ -0.491563f, -0.491646f, -0.491730f, -0.491813f, -0.491897f, -0.491980f, -0.492064f, -0.492147f,
+ -0.492231f, -0.492314f, -0.492398f, -0.492481f, -0.492564f, -0.492648f, -0.492731f, -0.492815f,
+ -0.492898f, -0.492982f, -0.493065f, -0.493148f, -0.493232f, -0.493315f, -0.493399f, -0.493482f,
+ -0.493565f, -0.493649f, -0.493732f, -0.493816f, -0.493899f, -0.493982f, -0.494066f, -0.494149f,
+ -0.494232f, -0.494316f, -0.494399f, -0.494482f, -0.494566f, -0.494649f, -0.494732f, -0.494816f,
+ -0.494899f, -0.494982f, -0.495066f, -0.495149f, -0.495232f, -0.495315f, -0.495399f, -0.495482f,
+ -0.495565f, -0.495649f, -0.495732f, -0.495815f, -0.495898f, -0.495982f, -0.496065f, -0.496148f,
+ -0.496231f, -0.496315f, -0.496398f, -0.496481f, -0.496564f, -0.496647f, -0.496731f, -0.496814f,
+ -0.496897f, -0.496980f, -0.497063f, -0.497147f, -0.497230f, -0.497313f, -0.497396f, -0.497479f,
+ -0.497562f, -0.497646f, -0.497729f, -0.497812f, -0.497895f, -0.497978f, -0.498061f, -0.498145f,
+ -0.498228f, -0.498311f, -0.498394f, -0.498477f, -0.498560f, -0.498643f, -0.498726f, -0.498809f,
+ -0.498893f, -0.498976f, -0.499059f, -0.499142f, -0.499225f, -0.499308f, -0.499391f, -0.499474f,
+ -0.499557f, -0.499640f, -0.499723f, -0.499806f, -0.499889f, -0.499972f, -0.500055f, -0.500138f,
+ -0.500221f, -0.500304f, -0.500387f, -0.500470f, -0.500553f, -0.500636f, -0.500719f, -0.500802f,
+ -0.500885f, -0.500968f, -0.501051f, -0.501134f, -0.501217f, -0.501300f, -0.501383f, -0.501466f,
+ -0.501549f, -0.501632f, -0.501715f, -0.501798f, -0.501881f, -0.501964f, -0.502047f, -0.502130f,
+ -0.502212f, -0.502295f, -0.502378f, -0.502461f, -0.502544f, -0.502627f, -0.502710f, -0.502793f,
+ -0.502876f, -0.502958f, -0.503041f, -0.503124f, -0.503207f, -0.503290f, -0.503373f, -0.503456f,
+ -0.503538f, -0.503621f, -0.503704f, -0.503787f, -0.503870f, -0.503953f, -0.504035f, -0.504118f,
+ -0.504201f, -0.504284f, -0.504366f, -0.504449f, -0.504532f, -0.504615f, -0.504698f, -0.504780f,
+ -0.504863f, -0.504946f, -0.505029f, -0.505111f, -0.505194f, -0.505277f, -0.505360f, -0.505442f,
+ -0.505525f, -0.505608f, -0.505690f, -0.505773f, -0.505856f, -0.505939f, -0.506021f, -0.506104f,
+ -0.506187f, -0.506269f, -0.506352f, -0.506435f, -0.506517f, -0.506600f, -0.506683f, -0.506765f,
+ -0.506848f, -0.506931f, -0.507013f, -0.507096f, -0.507179f, -0.507261f, -0.507344f, -0.507426f,
+ -0.507509f, -0.507592f, -0.507674f, -0.507757f, -0.507839f, -0.507922f, -0.508005f, -0.508087f,
+ -0.508170f, -0.508252f, -0.508335f, -0.508417f, -0.508500f, -0.508583f, -0.508665f, -0.508748f,
+ -0.508830f, -0.508913f, -0.508995f, -0.509078f, -0.509160f, -0.509243f, -0.509325f, -0.509408f,
+ -0.509490f, -0.509573f, -0.509655f, -0.509738f, -0.509820f, -0.509903f, -0.509985f, -0.510068f,
+ -0.510150f, -0.510233f, -0.510315f, -0.510397f, -0.510480f, -0.510562f, -0.510645f, -0.510727f,
+ -0.510810f, -0.510892f, -0.510974f, -0.511057f, -0.511139f, -0.511222f, -0.511304f, -0.511386f,
+ -0.511469f, -0.511551f, -0.511634f, -0.511716f, -0.511798f, -0.511881f, -0.511963f, -0.512045f,
+ -0.512128f, -0.512210f, -0.512292f, -0.512375f, -0.512457f, -0.512539f, -0.512622f, -0.512704f,
+ -0.512786f, -0.512869f, -0.512951f, -0.513033f, -0.513116f, -0.513198f, -0.513280f, -0.513362f,
+ -0.513445f, -0.513527f, -0.513609f, -0.513692f, -0.513774f, -0.513856f, -0.513938f, -0.514021f,
+ -0.514103f, -0.514185f, -0.514267f, -0.514349f, -0.514432f, -0.514514f, -0.514596f, -0.514678f,
+ -0.514760f, -0.514843f, -0.514925f, -0.515007f, -0.515089f, -0.515171f, -0.515254f, -0.515336f,
+ -0.515418f, -0.515500f, -0.515582f, -0.515664f, -0.515746f, -0.515829f, -0.515911f, -0.515993f,
+ -0.516075f, -0.516157f, -0.516239f, -0.516321f, -0.516403f, -0.516486f, -0.516568f, -0.516650f,
+ -0.516732f, -0.516814f, -0.516896f, -0.516978f, -0.517060f, -0.517142f, -0.517224f, -0.517306f,
+ -0.517388f, -0.517470f, -0.517552f, -0.517634f, -0.517716f, -0.517798f, -0.517880f, -0.517963f,
+ -0.518045f, -0.518126f, -0.518209f, -0.518291f, -0.518372f, -0.518454f, -0.518536f, -0.518618f,
+ -0.518700f, -0.518782f, -0.518864f, -0.518946f, -0.519028f, -0.519110f, -0.519192f, -0.519274f,
+ -0.519356f, -0.519438f, -0.519520f, -0.519602f, -0.519684f, -0.519766f, -0.519848f, -0.519929f,
+ -0.520011f, -0.520093f, -0.520175f, -0.520257f, -0.520339f, -0.520421f, -0.520503f, -0.520584f,
+ -0.520666f, -0.520748f, -0.520830f, -0.520912f, -0.520994f, -0.521075f, -0.521157f, -0.521239f,
+ -0.521321f, -0.521403f, -0.521485f, -0.521566f, -0.521648f, -0.521730f, -0.521812f, -0.521894f,
+ -0.521975f, -0.522057f, -0.522139f, -0.522221f, -0.522302f, -0.522384f, -0.522466f, -0.522548f,
+ -0.522629f, -0.522711f, -0.522793f, -0.522875f, -0.522956f, -0.523038f, -0.523120f, -0.523201f,
+ -0.523283f, -0.523365f, -0.523447f, -0.523528f, -0.523610f, -0.523692f, -0.523773f, -0.523855f,
+ -0.523937f, -0.524018f, -0.524100f, -0.524181f, -0.524263f, -0.524345f, -0.524426f, -0.524508f,
+ -0.524590f, -0.524671f, -0.524753f, -0.524835f, -0.524916f, -0.524998f, -0.525079f, -0.525161f,
+ -0.525243f, -0.525324f, -0.525406f, -0.525487f, -0.525569f, -0.525650f, -0.525732f, -0.525813f,
+ -0.525895f, -0.525977f, -0.526058f, -0.526140f, -0.526221f, -0.526303f, -0.526384f, -0.526466f,
+ -0.526547f, -0.526629f, -0.526710f, -0.526792f, -0.526873f, -0.526955f, -0.527036f, -0.527118f,
+ -0.527199f, -0.527281f, -0.527362f, -0.527444f, -0.527525f, -0.527606f, -0.527688f, -0.527769f,
+ -0.527851f, -0.527932f, -0.528014f, -0.528095f, -0.528176f, -0.528258f, -0.528339f, -0.528421f,
+ -0.528502f, -0.528583f, -0.528665f, -0.528746f, -0.528828f, -0.528909f, -0.528990f, -0.529072f,
+ -0.529153f, -0.529234f, -0.529316f, -0.529397f, -0.529478f, -0.529560f, -0.529641f, -0.529722f,
+ -0.529804f, -0.529885f, -0.529966f, -0.530048f, -0.530129f, -0.530210f, -0.530291f, -0.530373f,
+ -0.530454f, -0.530535f, -0.530617f, -0.530698f, -0.530779f, -0.530860f, -0.530942f, -0.531023f,
+ -0.531104f, -0.531185f, -0.531266f, -0.531348f, -0.531429f, -0.531510f, -0.531591f, -0.531673f,
+ -0.531754f, -0.531835f, -0.531916f, -0.531997f, -0.532078f, -0.532160f, -0.532241f, -0.532322f,
+ -0.532403f, -0.532484f, -0.532565f, -0.532647f, -0.532728f, -0.532809f, -0.532890f, -0.532971f,
+ -0.533052f, -0.533133f, -0.533214f, -0.533296f, -0.533377f, -0.533458f, -0.533539f, -0.533620f,
+ -0.533701f, -0.533782f, -0.533863f, -0.533944f, -0.534025f, -0.534106f, -0.534187f, -0.534268f,
+ -0.534349f, -0.534431f, -0.534512f, -0.534593f, -0.534674f, -0.534755f, -0.534836f, -0.534917f,
+ -0.534998f, -0.535079f, -0.535160f, -0.535241f, -0.535322f, -0.535403f, -0.535484f, -0.535564f,
+ -0.535645f, -0.535726f, -0.535807f, -0.535888f, -0.535969f, -0.536050f, -0.536131f, -0.536212f,
+ -0.536293f, -0.536374f, -0.536455f, -0.536536f, -0.536617f, -0.536698f, -0.536778f, -0.536859f,
+ -0.536940f, -0.537021f, -0.537102f, -0.537183f, -0.537264f, -0.537345f, -0.537425f, -0.537506f,
+ -0.537587f, -0.537668f, -0.537749f, -0.537830f, -0.537910f, -0.537991f, -0.538072f, -0.538153f,
+ -0.538234f, -0.538314f, -0.538395f, -0.538476f, -0.538557f, -0.538638f, -0.538718f, -0.538799f,
+ -0.538880f, -0.538961f, -0.539041f, -0.539122f, -0.539203f, -0.539284f, -0.539364f, -0.539445f,
+ -0.539526f, -0.539607f, -0.539687f, -0.539768f, -0.539849f, -0.539929f, -0.540010f, -0.540091f,
+ -0.540171f, -0.540252f, -0.540333f, -0.540413f, -0.540494f, -0.540575f, -0.540655f, -0.540736f,
+ -0.540817f, -0.540897f, -0.540978f, -0.541059f, -0.541139f, -0.541220f, -0.541301f, -0.541381f,
+ -0.541462f, -0.541542f, -0.541623f, -0.541704f, -0.541784f, -0.541865f, -0.541945f, -0.542026f,
+ -0.542106f, -0.542187f, -0.542268f, -0.542348f, -0.542429f, -0.542509f, -0.542590f, -0.542670f,
+ -0.542751f, -0.542831f, -0.542912f, -0.542992f, -0.543073f, -0.543153f, -0.543234f, -0.543314f,
+ -0.543395f, -0.543475f, -0.543556f, -0.543636f, -0.543717f, -0.543797f, -0.543878f, -0.543958f,
+ -0.544039f, -0.544119f, -0.544199f, -0.544280f, -0.544360f, -0.544441f, -0.544521f, -0.544602f,
+ -0.544682f, -0.544762f, -0.544843f, -0.544923f, -0.545003f, -0.545084f, -0.545164f, -0.545245f,
+ -0.545325f, -0.545405f, -0.545486f, -0.545566f, -0.545646f, -0.545727f, -0.545807f, -0.545887f,
+ -0.545968f, -0.546048f, -0.546128f, -0.546209f, -0.546289f, -0.546369f, -0.546450f, -0.546530f,
+ -0.546610f, -0.546690f, -0.546771f, -0.546851f, -0.546931f, -0.547011f, -0.547092f, -0.547172f,
+ -0.547252f, -0.547333f, -0.547413f, -0.547493f, -0.547573f, -0.547653f, -0.547734f, -0.547814f,
+ -0.547894f, -0.547974f, -0.548054f, -0.548135f, -0.548215f, -0.548295f, -0.548375f, -0.548455f,
+ -0.548536f, -0.548616f, -0.548696f, -0.548776f, -0.548856f, -0.548936f, -0.549016f, -0.549097f,
+ -0.549177f, -0.549257f, -0.549337f, -0.549417f, -0.549497f, -0.549577f, -0.549657f, -0.549737f,
+ -0.549818f, -0.549898f, -0.549978f, -0.550058f, -0.550138f, -0.550218f, -0.550298f, -0.550378f,
+ -0.550458f, -0.550538f, -0.550618f, -0.550698f, -0.550778f, -0.550858f, -0.550938f, -0.551018f,
+ -0.551098f, -0.551178f, -0.551258f, -0.551338f, -0.551418f, -0.551498f, -0.551578f, -0.551658f,
+ -0.551738f, -0.551818f, -0.551898f, -0.551978f, -0.552058f, -0.552138f, -0.552218f, -0.552298f,
+ -0.552378f, -0.552457f, -0.552537f, -0.552617f, -0.552697f, -0.552777f, -0.552857f, -0.552937f,
+ -0.553017f, -0.553097f, -0.553176f, -0.553256f, -0.553336f, -0.553416f, -0.553496f, -0.553576f,
+ -0.553656f, -0.553735f, -0.553815f, -0.553895f, -0.553975f, -0.554055f, -0.554134f, -0.554214f,
+ -0.554294f, -0.554374f, -0.554454f, -0.554533f, -0.554613f, -0.554693f, -0.554773f, -0.554853f,
+ -0.554932f, -0.555012f, -0.555092f, -0.555172f, -0.555251f, -0.555331f, -0.555411f, -0.555490f,
+ -0.555570f, -0.555650f, -0.555730f, -0.555809f, -0.555889f, -0.555969f, -0.556048f, -0.556128f,
+ -0.556208f, -0.556287f, -0.556367f, -0.556447f, -0.556526f, -0.556606f, -0.556686f, -0.556765f,
+ -0.556845f, -0.556925f, -0.557004f, -0.557084f, -0.557164f, -0.557243f, -0.557323f, -0.557402f,
+ -0.557482f, -0.557562f, -0.557641f, -0.557721f, -0.557800f, -0.557880f, -0.557959f, -0.558039f,
+ -0.558119f, -0.558198f, -0.558278f, -0.558357f, -0.558437f, -0.558516f, -0.558596f, -0.558675f,
+ -0.558755f, -0.558834f, -0.558914f, -0.558993f, -0.559073f, -0.559152f, -0.559232f, -0.559311f,
+ -0.559391f, -0.559470f, -0.559550f, -0.559629f, -0.559709f, -0.559788f, -0.559867f, -0.559947f,
+ -0.560026f, -0.560106f, -0.560185f, -0.560265f, -0.560344f, -0.560423f, -0.560503f, -0.560582f,
+ -0.560662f, -0.560741f, -0.560820f, -0.560900f, -0.560979f, -0.561058f, -0.561138f, -0.561217f,
+ -0.561297f, -0.561376f, -0.561455f, -0.561535f, -0.561614f, -0.561693f, -0.561773f, -0.561852f,
+ -0.561931f, -0.562010f, -0.562090f, -0.562169f, -0.562248f, -0.562328f, -0.562407f, -0.562486f,
+ -0.562565f, -0.562645f, -0.562724f, -0.562803f, -0.562882f, -0.562962f, -0.563041f, -0.563120f,
+ -0.563199f, -0.563279f, -0.563358f, -0.563437f, -0.563516f, -0.563595f, -0.563675f, -0.563754f,
+ -0.563833f, -0.563912f, -0.563991f, -0.564070f, -0.564150f, -0.564229f, -0.564308f, -0.564387f,
+ -0.564466f, -0.564545f, -0.564624f, -0.564704f, -0.564783f, -0.564862f, -0.564941f, -0.565020f,
+ -0.565099f, -0.565178f, -0.565257f, -0.565336f, -0.565416f, -0.565495f, -0.565574f, -0.565653f,
+ -0.565732f, -0.565811f, -0.565890f, -0.565969f, -0.566048f, -0.566127f, -0.566206f, -0.566285f,
+ -0.566364f, -0.566443f, -0.566522f, -0.566601f, -0.566680f, -0.566759f, -0.566838f, -0.566917f,
+ -0.566996f, -0.567075f, -0.567154f, -0.567233f, -0.567312f, -0.567391f, -0.567470f, -0.567549f,
+ -0.567628f, -0.567707f, -0.567786f, -0.567864f, -0.567943f, -0.568022f, -0.568101f, -0.568180f,
+ -0.568259f, -0.568338f, -0.568417f, -0.568496f, -0.568574f, -0.568653f, -0.568732f, -0.568811f,
+ -0.568890f, -0.568969f, -0.569048f, -0.569126f, -0.569205f, -0.569284f, -0.569363f, -0.569442f,
+ -0.569521f, -0.569599f, -0.569678f, -0.569757f, -0.569836f, -0.569914f, -0.569993f, -0.570072f,
+ -0.570151f, -0.570230f, -0.570308f, -0.570387f, -0.570466f, -0.570545f, -0.570623f, -0.570702f,
+ -0.570781f, -0.570859f, -0.570938f, -0.571017f, -0.571096f, -0.571174f, -0.571253f, -0.571332f,
+ -0.571410f, -0.571489f, -0.571568f, -0.571646f, -0.571725f, -0.571804f, -0.571882f, -0.571961f,
+ -0.572040f, -0.572118f, -0.572197f, -0.572276f, -0.572354f, -0.572433f, -0.572511f, -0.572590f,
+ -0.572669f, -0.572747f, -0.572826f, -0.572904f, -0.572983f, -0.573061f, -0.573140f, -0.573219f,
+ -0.573297f, -0.573376f, -0.573454f, -0.573533f, -0.573611f, -0.573690f, -0.573768f, -0.573847f,
+ -0.573925f, -0.574004f, -0.574082f, -0.574161f, -0.574239f, -0.574318f, -0.574396f, -0.574475f,
+ -0.574553f, -0.574632f, -0.574710f, -0.574789f, -0.574867f, -0.574946f, -0.575024f, -0.575103f,
+ -0.575181f, -0.575259f, -0.575338f, -0.575416f, -0.575495f, -0.575573f, -0.575651f, -0.575730f,
+ -0.575808f, -0.575887f, -0.575965f, -0.576043f, -0.576122f, -0.576200f, -0.576278f, -0.576357f,
+ -0.576435f, -0.576513f, -0.576592f, -0.576670f, -0.576748f, -0.576827f, -0.576905f, -0.576983f,
+ -0.577062f, -0.577140f, -0.577218f, -0.577297f, -0.577375f, -0.577453f, -0.577531f, -0.577610f,
+ -0.577688f, -0.577766f, -0.577844f, -0.577923f, -0.578001f, -0.578079f, -0.578157f, -0.578236f,
+ -0.578314f, -0.578392f, -0.578470f, -0.578548f, -0.578627f, -0.578705f, -0.578783f, -0.578861f,
+ -0.578939f, -0.579018f, -0.579096f, -0.579174f, -0.579252f, -0.579330f, -0.579408f, -0.579486f,
+ -0.579565f, -0.579643f, -0.579721f, -0.579799f, -0.579877f, -0.579955f, -0.580033f, -0.580111f,
+ -0.580189f, -0.580267f, -0.580346f, -0.580424f, -0.580502f, -0.580580f, -0.580658f, -0.580736f,
+ -0.580814f, -0.580892f, -0.580970f, -0.581048f, -0.581126f, -0.581204f, -0.581282f, -0.581360f,
+ -0.581438f, -0.581516f, -0.581594f, -0.581672f, -0.581750f, -0.581828f, -0.581906f, -0.581984f,
+ -0.582062f, -0.582140f, -0.582218f, -0.582296f, -0.582374f, -0.582452f, -0.582530f, -0.582608f,
+ -0.582685f, -0.582763f, -0.582841f, -0.582919f, -0.582997f, -0.583075f, -0.583153f, -0.583231f,
+ -0.583309f, -0.583387f, -0.583464f, -0.583542f, -0.583620f, -0.583698f, -0.583776f, -0.583854f,
+ -0.583931f, -0.584009f, -0.584087f, -0.584165f, -0.584243f, -0.584321f, -0.584398f, -0.584476f,
+ -0.584554f, -0.584632f, -0.584710f, -0.584787f, -0.584865f, -0.584943f, -0.585021f, -0.585098f,
+ -0.585176f, -0.585254f, -0.585332f, -0.585409f, -0.585487f, -0.585565f, -0.585642f, -0.585720f,
+ -0.585798f, -0.585876f, -0.585953f, -0.586031f, -0.586109f, -0.586186f, -0.586264f, -0.586342f,
+ -0.586419f, -0.586497f, -0.586575f, -0.586652f, -0.586730f, -0.586808f, -0.586885f, -0.586963f,
+ -0.587040f, -0.587118f, -0.587196f, -0.587273f, -0.587351f, -0.587428f, -0.587506f, -0.587584f,
+ -0.587661f, -0.587739f, -0.587816f, -0.587894f, -0.587971f, -0.588049f, -0.588126f, -0.588204f,
+ -0.588282f, -0.588359f, -0.588437f, -0.588514f, -0.588592f, -0.588669f, -0.588747f, -0.588824f,
+ -0.588902f, -0.588979f, -0.589057f, -0.589134f, -0.589212f, -0.589289f, -0.589366f, -0.589444f,
+ -0.589521f, -0.589599f, -0.589676f, -0.589754f, -0.589831f, -0.589908f, -0.589986f, -0.590063f,
+ -0.590141f, -0.590218f, -0.590295f, -0.590373f, -0.590450f, -0.590528f, -0.590605f, -0.590682f,
+ -0.590760f, -0.590837f, -0.590914f, -0.590992f, -0.591069f, -0.591146f, -0.591224f, -0.591301f,
+ -0.591378f, -0.591456f, -0.591533f, -0.591610f, -0.591688f, -0.591765f, -0.591842f, -0.591919f,
+ -0.591997f, -0.592074f, -0.592151f, -0.592228f, -0.592306f, -0.592383f, -0.592460f, -0.592537f,
+ -0.592615f, -0.592692f, -0.592769f, -0.592846f, -0.592924f, -0.593001f, -0.593078f, -0.593155f,
+ -0.593232f, -0.593309f, -0.593387f, -0.593464f, -0.593541f, -0.593618f, -0.593695f, -0.593772f,
+ -0.593850f, -0.593927f, -0.594004f, -0.594081f, -0.594158f, -0.594235f, -0.594312f, -0.594389f,
+ -0.594467f, -0.594544f, -0.594621f, -0.594698f, -0.594775f, -0.594852f, -0.594929f, -0.595006f,
+ -0.595083f, -0.595160f, -0.595237f, -0.595314f, -0.595391f, -0.595468f, -0.595545f, -0.595622f,
+ -0.595699f, -0.595776f, -0.595853f, -0.595930f, -0.596007f, -0.596084f, -0.596161f, -0.596238f,
+ -0.596315f, -0.596392f, -0.596469f, -0.596546f, -0.596623f, -0.596700f, -0.596777f, -0.596854f,
+ -0.596931f, -0.597008f, -0.597085f, -0.597161f, -0.597238f, -0.597315f, -0.597392f, -0.597469f,
+ -0.597546f, -0.597623f, -0.597700f, -0.597776f, -0.597853f, -0.597930f, -0.598007f, -0.598084f,
+ -0.598161f, -0.598238f, -0.598314f, -0.598391f, -0.598468f, -0.598545f, -0.598622f, -0.598698f,
+ -0.598775f, -0.598852f, -0.598929f, -0.599006f, -0.599082f, -0.599159f, -0.599236f, -0.599313f,
+ -0.599389f, -0.599466f, -0.599543f, -0.599620f, -0.599696f, -0.599773f, -0.599850f, -0.599926f,
+ -0.600003f, -0.600080f, -0.600156f, -0.600233f, -0.600310f, -0.600387f, -0.600463f, -0.600540f,
+ -0.600616f, -0.600693f, -0.600770f, -0.600846f, -0.600923f, -0.601000f, -0.601076f, -0.601153f,
+ -0.601230f, -0.601306f, -0.601383f, -0.601459f, -0.601536f, -0.601613f, -0.601689f, -0.601766f,
+ -0.601842f, -0.601919f, -0.601995f, -0.602072f, -0.602148f, -0.602225f, -0.602302f, -0.602378f,
+ -0.602455f, -0.602531f, -0.602608f, -0.602684f, -0.602761f, -0.602837f, -0.602914f, -0.602990f,
+ -0.603067f, -0.603143f, -0.603220f, -0.603296f, -0.603372f, -0.603449f, -0.603525f, -0.603602f,
+ -0.603678f, -0.603755f, -0.603831f, -0.603908f, -0.603984f, -0.604060f, -0.604137f, -0.604213f,
+ -0.604290f, -0.604366f, -0.604442f, -0.604519f, -0.604595f, -0.604671f, -0.604748f, -0.604824f,
+ -0.604900f, -0.604977f, -0.605053f, -0.605129f, -0.605206f, -0.605282f, -0.605358f, -0.605435f,
+ -0.605511f, -0.605587f, -0.605664f, -0.605740f, -0.605816f, -0.605892f, -0.605969f, -0.606045f,
+ -0.606121f, -0.606198f, -0.606274f, -0.606350f, -0.606426f, -0.606502f, -0.606579f, -0.606655f,
+ -0.606731f, -0.606807f, -0.606884f, -0.606960f, -0.607036f, -0.607112f, -0.607188f, -0.607264f,
+ -0.607341f, -0.607417f, -0.607493f, -0.607569f, -0.607645f, -0.607721f, -0.607798f, -0.607874f,
+ -0.607950f, -0.608026f, -0.608102f, -0.608178f, -0.608254f, -0.608330f, -0.608406f, -0.608482f,
+ -0.608559f, -0.608635f, -0.608711f, -0.608787f, -0.608863f, -0.608939f, -0.609015f, -0.609091f,
+ -0.609167f, -0.609243f, -0.609319f, -0.609395f, -0.609471f, -0.609547f, -0.609623f, -0.609699f,
+ -0.609775f, -0.609851f, -0.609927f, -0.610003f, -0.610079f, -0.610155f, -0.610231f, -0.610307f,
+ -0.610383f, -0.610459f, -0.610535f, -0.610611f, -0.610687f, -0.610762f, -0.610838f, -0.610914f,
+ -0.610990f, -0.611066f, -0.611142f, -0.611218f, -0.611294f, -0.611370f, -0.611445f, -0.611521f,
+ -0.611597f, -0.611673f, -0.611749f, -0.611825f, -0.611901f, -0.611976f, -0.612052f, -0.612128f,
+ -0.612204f, -0.612280f, -0.612355f, -0.612431f, -0.612507f, -0.612583f, -0.612659f, -0.612734f,
+ -0.612810f, -0.612886f, -0.612962f, -0.613037f, -0.613113f, -0.613189f, -0.613265f, -0.613340f,
+ -0.613416f, -0.613492f, -0.613567f, -0.613643f, -0.613719f, -0.613795f, -0.613870f, -0.613946f,
+ -0.614022f, -0.614097f, -0.614173f, -0.614249f, -0.614324f, -0.614400f, -0.614475f, -0.614551f,
+ -0.614627f, -0.614702f, -0.614778f, -0.614854f, -0.614929f, -0.615005f, -0.615080f, -0.615156f,
+ -0.615232f, -0.615307f, -0.615383f, -0.615458f, -0.615534f, -0.615609f, -0.615685f, -0.615761f,
+ -0.615836f, -0.615912f, -0.615987f, -0.616063f, -0.616138f, -0.616214f, -0.616289f, -0.616365f,
+ -0.616440f, -0.616516f, -0.616591f, -0.616667f, -0.616742f, -0.616818f, -0.616893f, -0.616968f,
+ -0.617044f, -0.617119f, -0.617195f, -0.617270f, -0.617346f, -0.617421f, -0.617496f, -0.617572f,
+ -0.617647f, -0.617723f, -0.617798f, -0.617873f, -0.617949f, -0.618024f, -0.618100f, -0.618175f,
+ -0.618250f, -0.618326f, -0.618401f, -0.618476f, -0.618552f, -0.618627f, -0.618702f, -0.618778f,
+ -0.618853f, -0.618928f, -0.619004f, -0.619079f, -0.619154f, -0.619229f, -0.619305f, -0.619380f,
+ -0.619455f, -0.619531f, -0.619606f, -0.619681f, -0.619756f, -0.619832f, -0.619907f, -0.619982f,
+ -0.620057f, -0.620132f, -0.620208f, -0.620283f, -0.620358f, -0.620433f, -0.620508f, -0.620584f,
+ -0.620659f, -0.620734f, -0.620809f, -0.620884f, -0.620959f, -0.621035f, -0.621110f, -0.621185f,
+ -0.621260f, -0.621335f, -0.621410f, -0.621485f, -0.621560f, -0.621636f, -0.621711f, -0.621786f,
+ -0.621861f, -0.621936f, -0.622011f, -0.622086f, -0.622161f, -0.622236f, -0.622311f, -0.622386f,
+ -0.622461f, -0.622536f, -0.622611f, -0.622686f, -0.622761f, -0.622836f, -0.622911f, -0.622986f,
+ -0.623061f, -0.623136f, -0.623211f, -0.623286f, -0.623361f, -0.623436f, -0.623511f, -0.623586f,
+ -0.623661f, -0.623736f, -0.623811f, -0.623886f, -0.623961f, -0.624036f, -0.624111f, -0.624186f,
+ -0.624260f, -0.624335f, -0.624410f, -0.624485f, -0.624560f, -0.624635f, -0.624710f, -0.624785f,
+ -0.624860f, -0.624934f, -0.625009f, -0.625084f, -0.625159f, -0.625234f, -0.625309f, -0.625383f,
+ -0.625458f, -0.625533f, -0.625608f, -0.625683f, -0.625757f, -0.625832f, -0.625907f, -0.625982f,
+ -0.626056f, -0.626131f, -0.626206f, -0.626281f, -0.626355f, -0.626430f, -0.626505f, -0.626580f,
+ -0.626654f, -0.626729f, -0.626804f, -0.626878f, -0.626953f, -0.627028f, -0.627102f, -0.627177f,
+ -0.627252f, -0.627326f, -0.627401f, -0.627476f, -0.627550f, -0.627625f, -0.627700f, -0.627774f,
+ -0.627849f, -0.627924f, -0.627998f, -0.628073f, -0.628147f, -0.628222f, -0.628297f, -0.628371f,
+ -0.628446f, -0.628520f, -0.628595f, -0.628669f, -0.628744f, -0.628819f, -0.628893f, -0.628968f,
+ -0.629042f, -0.629117f, -0.629191f, -0.629266f, -0.629340f, -0.629415f, -0.629489f, -0.629564f,
+ -0.629638f, -0.629713f, -0.629787f, -0.629862f, -0.629936f, -0.630011f, -0.630085f, -0.630159f,
+ -0.630234f, -0.630308f, -0.630383f, -0.630457f, -0.630532f, -0.630606f, -0.630680f, -0.630755f,
+ -0.630829f, -0.630904f, -0.630978f, -0.631052f, -0.631127f, -0.631201f, -0.631275f, -0.631350f,
+ -0.631424f, -0.631499f, -0.631573f, -0.631647f, -0.631721f, -0.631796f, -0.631870f, -0.631944f,
+ -0.632019f, -0.632093f, -0.632167f, -0.632242f, -0.632316f, -0.632390f, -0.632464f, -0.632539f,
+ -0.632613f, -0.632687f, -0.632761f, -0.632836f, -0.632910f, -0.632984f, -0.633058f, -0.633133f,
+ -0.633207f, -0.633281f, -0.633355f, -0.633429f, -0.633504f, -0.633578f, -0.633652f, -0.633726f,
+ -0.633800f, -0.633874f, -0.633949f, -0.634023f, -0.634097f, -0.634171f, -0.634245f, -0.634319f,
+ -0.634393f, -0.634467f, -0.634542f, -0.634616f, -0.634690f, -0.634764f, -0.634838f, -0.634912f,
+ -0.634986f, -0.635060f, -0.635134f, -0.635208f, -0.635282f, -0.635356f, -0.635430f, -0.635504f,
+ -0.635578f, -0.635652f, -0.635726f, -0.635800f, -0.635874f, -0.635948f, -0.636022f, -0.636096f,
+ -0.636170f, -0.636244f, -0.636318f, -0.636392f, -0.636466f, -0.636540f, -0.636614f, -0.636688f,
+ -0.636762f, -0.636836f, -0.636910f, -0.636984f, -0.637057f, -0.637131f, -0.637205f, -0.637279f,
+ -0.637353f, -0.637427f, -0.637501f, -0.637575f, -0.637649f, -0.637722f, -0.637796f, -0.637870f,
+ -0.637944f, -0.638018f, -0.638092f, -0.638165f, -0.638239f, -0.638313f, -0.638387f, -0.638461f,
+ -0.638534f, -0.638608f, -0.638682f, -0.638756f, -0.638829f, -0.638903f, -0.638977f, -0.639051f,
+ -0.639124f, -0.639198f, -0.639272f, -0.639346f, -0.639419f, -0.639493f, -0.639567f, -0.639640f,
+ -0.639714f, -0.639788f, -0.639862f, -0.639935f, -0.640009f, -0.640083f, -0.640156f, -0.640230f,
+ -0.640303f, -0.640377f, -0.640451f, -0.640524f, -0.640598f, -0.640672f, -0.640745f, -0.640819f,
+ -0.640892f, -0.640966f, -0.641040f, -0.641113f, -0.641187f, -0.641260f, -0.641334f, -0.641407f,
+ -0.641481f, -0.641555f, -0.641628f, -0.641702f, -0.641775f, -0.641849f, -0.641922f, -0.641996f,
+ -0.642069f, -0.642143f, -0.642216f, -0.642290f, -0.642363f, -0.642437f, -0.642510f, -0.642584f,
+ -0.642657f, -0.642730f, -0.642804f, -0.642877f, -0.642951f, -0.643024f, -0.643098f, -0.643171f,
+ -0.643245f, -0.643318f, -0.643391f, -0.643465f, -0.643538f, -0.643611f, -0.643685f, -0.643758f,
+ -0.643832f, -0.643905f, -0.643978f, -0.644052f, -0.644125f, -0.644198f, -0.644272f, -0.644345f,
+ -0.644418f, -0.644492f, -0.644565f, -0.644638f, -0.644711f, -0.644785f, -0.644858f, -0.644931f,
+ -0.645005f, -0.645078f, -0.645151f, -0.645224f, -0.645298f, -0.645371f, -0.645444f, -0.645517f,
+ -0.645590f, -0.645664f, -0.645737f, -0.645810f, -0.645883f, -0.645956f, -0.646030f, -0.646103f,
+ -0.646176f, -0.646249f, -0.646322f, -0.646396f, -0.646469f, -0.646542f, -0.646615f, -0.646688f,
+ -0.646761f, -0.646834f, -0.646907f, -0.646981f, -0.647054f, -0.647127f, -0.647200f, -0.647273f,
+ -0.647346f, -0.647419f, -0.647492f, -0.647565f, -0.647638f, -0.647711f, -0.647784f, -0.647857f,
+ -0.647930f, -0.648003f, -0.648076f, -0.648149f, -0.648222f, -0.648295f, -0.648368f, -0.648441f,
+ -0.648514f, -0.648587f, -0.648660f, -0.648733f, -0.648806f, -0.648879f, -0.648952f, -0.649025f,
+ -0.649098f, -0.649171f, -0.649244f, -0.649317f, -0.649390f, -0.649463f, -0.649536f, -0.649608f,
+ -0.649681f, -0.649754f, -0.649827f, -0.649900f, -0.649973f, -0.650046f, -0.650119f, -0.650191f,
+ -0.650264f, -0.650337f, -0.650410f, -0.650483f, -0.650555f, -0.650628f, -0.650701f, -0.650774f,
+ -0.650847f, -0.650919f, -0.650992f, -0.651065f, -0.651138f, -0.651211f, -0.651283f, -0.651356f,
+ -0.651429f, -0.651502f, -0.651574f, -0.651647f, -0.651720f, -0.651792f, -0.651865f, -0.651938f,
+ -0.652011f, -0.652083f, -0.652156f, -0.652229f, -0.652301f, -0.652374f, -0.652447f, -0.652519f,
+ -0.652592f, -0.652665f, -0.652737f, -0.652810f, -0.652882f, -0.652955f, -0.653028f, -0.653100f,
+ -0.653173f, -0.653245f, -0.653318f, -0.653391f, -0.653463f, -0.653536f, -0.653608f, -0.653681f,
+ -0.653753f, -0.653826f, -0.653899f, -0.653971f, -0.654044f, -0.654116f, -0.654189f, -0.654261f,
+ -0.654334f, -0.654406f, -0.654479f, -0.654551f, -0.654624f, -0.654696f, -0.654769f, -0.654841f,
+ -0.654913f, -0.654986f, -0.655058f, -0.655131f, -0.655203f, -0.655276f, -0.655348f, -0.655420f,
+ -0.655493f, -0.655565f, -0.655638f, -0.655710f, -0.655782f, -0.655855f, -0.655927f, -0.656000f,
+ -0.656072f, -0.656144f, -0.656217f, -0.656289f, -0.656361f, -0.656434f, -0.656506f, -0.656578f,
+ -0.656651f, -0.656723f, -0.656795f, -0.656867f, -0.656940f, -0.657012f, -0.657084f, -0.657157f,
+ -0.657229f, -0.657301f, -0.657373f, -0.657446f, -0.657518f, -0.657590f, -0.657662f, -0.657734f,
+ -0.657807f, -0.657879f, -0.657951f, -0.658023f, -0.658095f, -0.658168f, -0.658240f, -0.658312f,
+ -0.658384f, -0.658456f, -0.658529f, -0.658601f, -0.658673f, -0.658745f, -0.658817f, -0.658889f,
+ -0.658961f, -0.659033f, -0.659105f, -0.659178f, -0.659250f, -0.659322f, -0.659394f, -0.659466f,
+ -0.659538f, -0.659610f, -0.659682f, -0.659754f, -0.659826f, -0.659898f, -0.659970f, -0.660042f,
+ -0.660114f, -0.660186f, -0.660258f, -0.660330f, -0.660402f, -0.660474f, -0.660546f, -0.660618f,
+ -0.660690f, -0.660762f, -0.660834f, -0.660906f, -0.660978f, -0.661050f, -0.661122f, -0.661194f,
+ -0.661266f, -0.661338f, -0.661410f, -0.661482f, -0.661553f, -0.661625f, -0.661697f, -0.661769f,
+ -0.661841f, -0.661913f, -0.661985f, -0.662057f, -0.662128f, -0.662200f, -0.662272f, -0.662344f,
+ -0.662416f, -0.662488f, -0.662559f, -0.662631f, -0.662703f, -0.662775f, -0.662847f, -0.662918f,
+ -0.662990f, -0.663062f, -0.663134f, -0.663205f, -0.663277f, -0.663349f, -0.663421f, -0.663492f,
+ -0.663564f, -0.663636f, -0.663708f, -0.663779f, -0.663851f, -0.663923f, -0.663994f, -0.664066f,
+ -0.664138f, -0.664209f, -0.664281f, -0.664353f, -0.664424f, -0.664496f, -0.664568f, -0.664639f,
+ -0.664711f, -0.664783f, -0.664854f, -0.664926f, -0.664997f, -0.665069f, -0.665141f, -0.665212f,
+ -0.665284f, -0.665355f, -0.665427f, -0.665498f, -0.665570f, -0.665642f, -0.665713f, -0.665785f,
+ -0.665856f, -0.665928f, -0.665999f, -0.666071f, -0.666142f, -0.666214f, -0.666285f, -0.666357f,
+ -0.666428f, -0.666500f, -0.666571f, -0.666643f, -0.666714f, -0.666786f, -0.666857f, -0.666928f,
+ -0.667000f, -0.667071f, -0.667143f, -0.667214f, -0.667286f, -0.667357f, -0.667428f, -0.667500f,
+ -0.667571f, -0.667643f, -0.667714f, -0.667785f, -0.667857f, -0.667928f, -0.667999f, -0.668071f,
+ -0.668142f, -0.668213f, -0.668285f, -0.668356f, -0.668427f, -0.668499f, -0.668570f, -0.668641f,
+ -0.668712f, -0.668784f, -0.668855f, -0.668926f, -0.668998f, -0.669069f, -0.669140f, -0.669211f,
+ -0.669283f, -0.669354f, -0.669425f, -0.669496f, -0.669567f, -0.669639f, -0.669710f, -0.669781f,
+ -0.669852f, -0.669923f, -0.669995f, -0.670066f, -0.670137f, -0.670208f, -0.670279f, -0.670350f,
+ -0.670422f, -0.670493f, -0.670564f, -0.670635f, -0.670706f, -0.670777f, -0.670848f, -0.670919f,
+ -0.670990f, -0.671062f, -0.671133f, -0.671204f, -0.671275f, -0.671346f, -0.671417f, -0.671488f,
+ -0.671559f, -0.671630f, -0.671701f, -0.671772f, -0.671843f, -0.671914f, -0.671985f, -0.672056f,
+ -0.672127f, -0.672198f, -0.672269f, -0.672340f, -0.672411f, -0.672482f, -0.672553f, -0.672624f,
+ -0.672695f, -0.672766f, -0.672837f, -0.672908f, -0.672978f, -0.673049f, -0.673120f, -0.673191f,
+ -0.673262f, -0.673333f, -0.673404f, -0.673475f, -0.673546f, -0.673616f, -0.673687f, -0.673758f,
+ -0.673829f, -0.673900f, -0.673971f, -0.674042f, -0.674112f, -0.674183f, -0.674254f, -0.674325f,
+ -0.674396f, -0.674466f, -0.674537f, -0.674608f, -0.674679f, -0.674749f, -0.674820f, -0.674891f,
+ -0.674962f, -0.675032f, -0.675103f, -0.675174f, -0.675245f, -0.675315f, -0.675386f, -0.675457f,
+ -0.675527f, -0.675598f, -0.675669f, -0.675739f, -0.675810f, -0.675881f, -0.675951f, -0.676022f,
+ -0.676093f, -0.676163f, -0.676234f, -0.676305f, -0.676375f, -0.676446f, -0.676516f, -0.676587f,
+ -0.676658f, -0.676728f, -0.676799f, -0.676869f, -0.676940f, -0.677011f, -0.677081f, -0.677152f,
+ -0.677222f, -0.677293f, -0.677363f, -0.677434f, -0.677504f, -0.677575f, -0.677645f, -0.677716f,
+ -0.677786f, -0.677857f, -0.677927f, -0.677998f, -0.678068f, -0.678139f, -0.678209f, -0.678280f,
+ -0.678350f, -0.678420f, -0.678491f, -0.678561f, -0.678632f, -0.678702f, -0.678773f, -0.678843f,
+ -0.678913f, -0.678984f, -0.679054f, -0.679125f, -0.679195f, -0.679265f, -0.679336f, -0.679406f,
+ -0.679476f, -0.679547f, -0.679617f, -0.679687f, -0.679758f, -0.679828f, -0.679898f, -0.679969f,
+ -0.680039f, -0.680109f, -0.680179f, -0.680250f, -0.680320f, -0.680390f, -0.680461f, -0.680531f,
+ -0.680601f, -0.680671f, -0.680741f, -0.680812f, -0.680882f, -0.680952f, -0.681022f, -0.681093f,
+ -0.681163f, -0.681233f, -0.681303f, -0.681373f, -0.681443f, -0.681514f, -0.681584f, -0.681654f,
+ -0.681724f, -0.681794f, -0.681864f, -0.681934f, -0.682005f, -0.682075f, -0.682145f, -0.682215f,
+ -0.682285f, -0.682355f, -0.682425f, -0.682495f, -0.682565f, -0.682635f, -0.682705f, -0.682775f,
+ -0.682846f, -0.682916f, -0.682986f, -0.683056f, -0.683126f, -0.683196f, -0.683266f, -0.683336f,
+ -0.683406f, -0.683476f, -0.683546f, -0.683616f, -0.683686f, -0.683756f, -0.683825f, -0.683895f,
+ -0.683965f, -0.684035f, -0.684105f, -0.684175f, -0.684245f, -0.684315f, -0.684385f, -0.684455f,
+ -0.684525f, -0.684595f, -0.684664f, -0.684734f, -0.684804f, -0.684874f, -0.684944f, -0.685014f,
+ -0.685084f, -0.685153f, -0.685223f, -0.685293f, -0.685363f, -0.685433f, -0.685503f, -0.685572f,
+ -0.685642f, -0.685712f, -0.685782f, -0.685852f, -0.685921f, -0.685991f, -0.686061f, -0.686131f,
+ -0.686200f, -0.686270f, -0.686340f, -0.686409f, -0.686479f, -0.686549f, -0.686619f, -0.686688f,
+ -0.686758f, -0.686828f, -0.686897f, -0.686967f, -0.687037f, -0.687106f, -0.687176f, -0.687246f,
+ -0.687315f, -0.687385f, -0.687455f, -0.687524f, -0.687594f, -0.687663f, -0.687733f, -0.687803f,
+ -0.687872f, -0.687942f, -0.688011f, -0.688081f, -0.688151f, -0.688220f, -0.688290f, -0.688359f,
+ -0.688429f, -0.688498f, -0.688568f, -0.688637f, -0.688707f, -0.688776f, -0.688846f, -0.688915f,
+ -0.688985f, -0.689054f, -0.689124f, -0.689193f, -0.689263f, -0.689332f, -0.689402f, -0.689471f,
+ -0.689541f, -0.689610f, -0.689679f, -0.689749f, -0.689818f, -0.689888f, -0.689957f, -0.690026f,
+ -0.690096f, -0.690165f, -0.690235f, -0.690304f, -0.690373f, -0.690443f, -0.690512f, -0.690581f,
+ -0.690651f, -0.690720f, -0.690789f, -0.690859f, -0.690928f, -0.690997f, -0.691067f, -0.691136f,
+ -0.691205f, -0.691274f, -0.691344f, -0.691413f, -0.691482f, -0.691552f, -0.691621f, -0.691690f,
+ -0.691759f, -0.691828f, -0.691898f, -0.691967f, -0.692036f, -0.692105f, -0.692175f, -0.692244f,
+ -0.692313f, -0.692382f, -0.692451f, -0.692520f, -0.692590f, -0.692659f, -0.692728f, -0.692797f,
+ -0.692866f, -0.692935f, -0.693004f, -0.693074f, -0.693143f, -0.693212f, -0.693281f, -0.693350f,
+ -0.693419f, -0.693488f, -0.693557f, -0.693626f, -0.693695f, -0.693764f, -0.693833f, -0.693902f,
+ -0.693971f, -0.694040f, -0.694109f, -0.694179f, -0.694248f, -0.694317f, -0.694386f, -0.694454f,
+ -0.694524f, -0.694592f, -0.694661f, -0.694730f, -0.694799f, -0.694868f, -0.694937f, -0.695006f,
+ -0.695075f, -0.695144f, -0.695213f, -0.695282f, -0.695351f, -0.695420f, -0.695489f, -0.695557f,
+ -0.695626f, -0.695695f, -0.695764f, -0.695833f, -0.695902f, -0.695971f, -0.696039f, -0.696108f,
+ -0.696177f, -0.696246f, -0.696315f, -0.696384f, -0.696452f, -0.696521f, -0.696590f, -0.696659f,
+ -0.696728f, -0.696796f, -0.696865f, -0.696934f, -0.697003f, -0.697071f, -0.697140f, -0.697209f,
+ -0.697277f, -0.697346f, -0.697415f, -0.697484f, -0.697552f, -0.697621f, -0.697690f, -0.697758f,
+ -0.697827f, -0.697896f, -0.697964f, -0.698033f, -0.698102f, -0.698170f, -0.698239f, -0.698308f,
+ -0.698376f, -0.698445f, -0.698513f, -0.698582f, -0.698651f, -0.698719f, -0.698788f, -0.698856f,
+ -0.698925f, -0.698994f, -0.699062f, -0.699131f, -0.699199f, -0.699268f, -0.699336f, -0.699405f,
+ -0.699473f, -0.699542f, -0.699610f, -0.699679f, -0.699747f, -0.699816f, -0.699884f, -0.699953f,
+ -0.700021f, -0.700090f, -0.700158f, -0.700227f, -0.700295f, -0.700364f, -0.700432f, -0.700500f,
+ -0.700569f, -0.700637f, -0.700706f, -0.700774f, -0.700842f, -0.700911f, -0.700979f, -0.701048f,
+ -0.701116f, -0.701184f, -0.701253f, -0.701321f, -0.701389f, -0.701458f, -0.701526f, -0.701594f,
+ -0.701663f, -0.701731f, -0.701799f, -0.701868f, -0.701936f, -0.702004f, -0.702072f, -0.702141f,
+ -0.702209f, -0.702277f, -0.702345f, -0.702414f, -0.702482f, -0.702550f, -0.702618f, -0.702687f,
+ -0.702755f, -0.702823f, -0.702891f, -0.702959f, -0.703028f, -0.703096f, -0.703164f, -0.703232f,
+ -0.703300f, -0.703368f, -0.703436f, -0.703505f, -0.703573f, -0.703641f, -0.703709f, -0.703777f,
+ -0.703845f, -0.703913f, -0.703981f, -0.704050f, -0.704118f, -0.704186f, -0.704254f, -0.704322f,
+ -0.704390f, -0.704458f, -0.704526f, -0.704594f, -0.704662f, -0.704730f, -0.704798f, -0.704866f,
+ -0.704934f, -0.705002f, -0.705070f, -0.705138f, -0.705206f, -0.705274f, -0.705342f, -0.705410f,
+ -0.705478f, -0.705546f, -0.705614f, -0.705682f, -0.705750f, -0.705818f, -0.705885f, -0.705953f,
+ -0.706021f, -0.706089f, -0.706157f, -0.706225f, -0.706293f, -0.706361f, -0.706429f, -0.706496f,
+ -0.706564f, -0.706632f, -0.706700f, -0.706768f, -0.706836f, -0.706903f, -0.706971f, -0.707039f,
+ -0.707107f, -0.707175f, -0.707242f, -0.707310f, -0.707378f, -0.707446f, -0.707513f, -0.707581f,
+ -0.707649f, -0.707717f, -0.707784f, -0.707852f, -0.707920f, -0.707988f, -0.708055f, -0.708123f,
+ -0.708191f, -0.708258f, -0.708326f, -0.708394f, -0.708461f, -0.708529f, -0.708597f, -0.708664f,
+ -0.708732f, -0.708800f, -0.708867f, -0.708935f, -0.709002f, -0.709070f, -0.709138f, -0.709205f,
+ -0.709273f, -0.709340f, -0.709408f, -0.709476f, -0.709543f, -0.709611f, -0.709678f, -0.709746f,
+ -0.709813f, -0.709881f, -0.709948f, -0.710016f, -0.710083f, -0.710151f, -0.710218f, -0.710286f,
+ -0.710353f, -0.710421f, -0.710488f, -0.710556f, -0.710623f, -0.710691f, -0.710758f, -0.710826f,
+ -0.710893f, -0.710960f, -0.711028f, -0.711095f, -0.711163f, -0.711230f, -0.711297f, -0.711365f,
+ -0.711432f, -0.711500f, -0.711567f, -0.711634f, -0.711702f, -0.711769f, -0.711836f, -0.711904f,
+ -0.711971f, -0.712038f, -0.712106f, -0.712173f, -0.712240f, -0.712308f, -0.712375f, -0.712442f,
+ -0.712509f, -0.712577f, -0.712644f, -0.712711f, -0.712778f, -0.712846f, -0.712913f, -0.712980f,
+ -0.713047f, -0.713115f, -0.713182f, -0.713249f, -0.713316f, -0.713383f, -0.713451f, -0.713518f,
+ -0.713585f, -0.713652f, -0.713719f, -0.713786f, -0.713853f, -0.713921f, -0.713988f, -0.714055f,
+ -0.714122f, -0.714189f, -0.714256f, -0.714323f, -0.714390f, -0.714457f, -0.714525f, -0.714592f,
+ -0.714659f, -0.714726f, -0.714793f, -0.714860f, -0.714927f, -0.714994f, -0.715061f, -0.715128f,
+ -0.715195f, -0.715262f, -0.715329f, -0.715396f, -0.715463f, -0.715530f, -0.715597f, -0.715664f,
+ -0.715731f, -0.715798f, -0.715865f, -0.715932f, -0.715999f, -0.716066f, -0.716132f, -0.716199f,
+ -0.716266f, -0.716333f, -0.716400f, -0.716467f, -0.716534f, -0.716601f, -0.716668f, -0.716734f,
+ -0.716801f, -0.716868f, -0.716935f, -0.717002f, -0.717069f, -0.717135f, -0.717202f, -0.717269f,
+ -0.717336f, -0.717403f, -0.717469f, -0.717536f, -0.717603f, -0.717670f, -0.717737f, -0.717803f,
+ -0.717870f, -0.717937f, -0.718004f, -0.718070f, -0.718137f, -0.718204f, -0.718270f, -0.718337f,
+ -0.718404f, -0.718471f, -0.718537f, -0.718604f, -0.718670f, -0.718737f, -0.718804f, -0.718870f,
+ -0.718937f, -0.719004f, -0.719070f, -0.719137f, -0.719204f, -0.719270f, -0.719337f, -0.719403f,
+ -0.719470f, -0.719537f, -0.719603f, -0.719670f, -0.719736f, -0.719803f, -0.719869f, -0.719936f,
+ -0.720003f, -0.720069f, -0.720136f, -0.720202f, -0.720269f, -0.720335f, -0.720402f, -0.720468f,
+ -0.720535f, -0.720601f, -0.720668f, -0.720734f, -0.720800f, -0.720867f, -0.720933f, -0.721000f,
+ -0.721066f, -0.721133f, -0.721199f, -0.721265f, -0.721332f, -0.721398f, -0.721465f, -0.721531f,
+ -0.721597f, -0.721664f, -0.721730f, -0.721797f, -0.721863f, -0.721929f, -0.721996f, -0.722062f,
+ -0.722128f, -0.722194f, -0.722261f, -0.722327f, -0.722393f, -0.722460f, -0.722526f, -0.722592f,
+ -0.722659f, -0.722725f, -0.722791f, -0.722857f, -0.722924f, -0.722990f, -0.723056f, -0.723122f,
+ -0.723188f, -0.723255f, -0.723321f, -0.723387f, -0.723453f, -0.723520f, -0.723586f, -0.723652f,
+ -0.723718f, -0.723784f, -0.723850f, -0.723916f, -0.723983f, -0.724049f, -0.724115f, -0.724181f,
+ -0.724247f, -0.724313f, -0.724379f, -0.724445f, -0.724511f, -0.724578f, -0.724644f, -0.724710f,
+ -0.724776f, -0.724842f, -0.724908f, -0.724974f, -0.725040f, -0.725106f, -0.725172f, -0.725238f,
+ -0.725304f, -0.725370f, -0.725436f, -0.725502f, -0.725568f, -0.725634f, -0.725700f, -0.725766f,
+ -0.725832f, -0.725898f, -0.725964f, -0.726030f, -0.726095f, -0.726161f, -0.726227f, -0.726293f,
+ -0.726359f, -0.726425f, -0.726491f, -0.726557f, -0.726623f, -0.726689f, -0.726754f, -0.726820f,
+ -0.726886f, -0.726952f, -0.727018f, -0.727084f, -0.727149f, -0.727215f, -0.727281f, -0.727347f,
+ -0.727413f, -0.727478f, -0.727544f, -0.727610f, -0.727676f, -0.727741f, -0.727807f, -0.727873f,
+ -0.727939f, -0.728004f, -0.728070f, -0.728136f, -0.728202f, -0.728267f, -0.728333f, -0.728399f,
+ -0.728464f, -0.728530f, -0.728596f, -0.728661f, -0.728727f, -0.728793f, -0.728858f, -0.728924f,
+ -0.728990f, -0.729055f, -0.729121f, -0.729186f, -0.729252f, -0.729318f, -0.729383f, -0.729449f,
+ -0.729514f, -0.729580f, -0.729646f, -0.729711f, -0.729777f, -0.729842f, -0.729908f, -0.729973f,
+ -0.730039f, -0.730104f, -0.730170f, -0.730235f, -0.730301f, -0.730366f, -0.730432f, -0.730497f,
+ -0.730563f, -0.730628f, -0.730694f, -0.730759f, -0.730825f, -0.730890f, -0.730955f, -0.731021f,
+ -0.731086f, -0.731152f, -0.731217f, -0.731282f, -0.731348f, -0.731413f, -0.731479f, -0.731544f,
+ -0.731609f, -0.731675f, -0.731740f, -0.731805f, -0.731871f, -0.731936f, -0.732001f, -0.732067f,
+ -0.732132f, -0.732197f, -0.732263f, -0.732328f, -0.732393f, -0.732458f, -0.732524f, -0.732589f,
+ -0.732654f, -0.732720f, -0.732785f, -0.732850f, -0.732915f, -0.732980f, -0.733046f, -0.733111f,
+ -0.733176f, -0.733241f, -0.733306f, -0.733372f, -0.733437f, -0.733502f, -0.733567f, -0.733632f,
+ -0.733697f, -0.733763f, -0.733828f, -0.733893f, -0.733958f, -0.734023f, -0.734088f, -0.734153f,
+ -0.734218f, -0.734283f, -0.734349f, -0.734414f, -0.734479f, -0.734544f, -0.734609f, -0.734674f,
+ -0.734739f, -0.734804f, -0.734869f, -0.734934f, -0.734999f, -0.735064f, -0.735129f, -0.735194f,
+ -0.735259f, -0.735324f, -0.735389f, -0.735454f, -0.735519f, -0.735584f, -0.735649f, -0.735714f,
+ -0.735779f, -0.735844f, -0.735908f, -0.735973f, -0.736038f, -0.736103f, -0.736168f, -0.736233f,
+ -0.736298f, -0.736363f, -0.736428f, -0.736492f, -0.736557f, -0.736622f, -0.736687f, -0.736752f,
+ -0.736817f, -0.736881f, -0.736946f, -0.737011f, -0.737076f, -0.737141f, -0.737205f, -0.737270f,
+ -0.737335f, -0.737400f, -0.737464f, -0.737529f, -0.737594f, -0.737659f, -0.737723f, -0.737788f,
+ -0.737853f, -0.737918f, -0.737982f, -0.738047f, -0.738112f, -0.738176f, -0.738241f, -0.738306f,
+ -0.738370f, -0.738435f, -0.738500f, -0.738564f, -0.738629f, -0.738693f, -0.738758f, -0.738823f,
+ -0.738887f, -0.738952f, -0.739017f, -0.739081f, -0.739146f, -0.739210f, -0.739275f, -0.739339f,
+ -0.739404f, -0.739468f, -0.739533f, -0.739598f, -0.739662f, -0.739727f, -0.739791f, -0.739856f,
+ -0.739920f, -0.739985f, -0.740049f, -0.740114f, -0.740178f, -0.740242f, -0.740307f, -0.740371f,
+ -0.740436f, -0.740500f, -0.740565f, -0.740629f, -0.740694f, -0.740758f, -0.740822f, -0.740887f,
+ -0.740951f, -0.741015f, -0.741080f, -0.741144f, -0.741209f, -0.741273f, -0.741337f, -0.741402f,
+ -0.741466f, -0.741530f, -0.741595f, -0.741659f, -0.741723f, -0.741788f, -0.741852f, -0.741916f,
+ -0.741980f, -0.742045f, -0.742109f, -0.742173f, -0.742237f, -0.742302f, -0.742366f, -0.742430f,
+ -0.742494f, -0.742559f, -0.742623f, -0.742687f, -0.742751f, -0.742815f, -0.742880f, -0.742944f,
+ -0.743008f, -0.743072f, -0.743136f, -0.743200f, -0.743265f, -0.743329f, -0.743393f, -0.743457f,
+ -0.743521f, -0.743585f, -0.743649f, -0.743713f, -0.743777f, -0.743842f, -0.743906f, -0.743970f,
+ -0.744034f, -0.744098f, -0.744162f, -0.744226f, -0.744290f, -0.744354f, -0.744418f, -0.744482f,
+ -0.744546f, -0.744610f, -0.744674f, -0.744738f, -0.744802f, -0.744866f, -0.744930f, -0.744994f,
+ -0.745058f, -0.745122f, -0.745186f, -0.745250f, -0.745314f, -0.745377f, -0.745441f, -0.745505f,
+ -0.745569f, -0.745633f, -0.745697f, -0.745761f, -0.745825f, -0.745889f, -0.745952f, -0.746016f,
+ -0.746080f, -0.746144f, -0.746208f, -0.746272f, -0.746335f, -0.746399f, -0.746463f, -0.746527f,
+ -0.746591f, -0.746654f, -0.746718f, -0.746782f, -0.746846f, -0.746909f, -0.746973f, -0.747037f,
+ -0.747101f, -0.747164f, -0.747228f, -0.747292f, -0.747355f, -0.747419f, -0.747483f, -0.747547f,
+ -0.747610f, -0.747674f, -0.747738f, -0.747801f, -0.747865f, -0.747929f, -0.747992f, -0.748056f,
+ -0.748119f, -0.748183f, -0.748247f, -0.748310f, -0.748374f, -0.748437f, -0.748501f, -0.748565f,
+ -0.748628f, -0.748692f, -0.748755f, -0.748819f, -0.748882f, -0.748946f, -0.749009f, -0.749073f,
+ -0.749136f, -0.749200f, -0.749263f, -0.749327f, -0.749390f, -0.749454f, -0.749517f, -0.749581f,
+ -0.749644f, -0.749708f, -0.749771f, -0.749835f, -0.749898f, -0.749961f, -0.750025f, -0.750088f,
+ -0.750152f, -0.750215f, -0.750278f, -0.750342f, -0.750405f, -0.750469f, -0.750532f, -0.750595f,
+ -0.750659f, -0.750722f, -0.750785f, -0.750849f, -0.750912f, -0.750975f, -0.751039f, -0.751102f,
+ -0.751165f, -0.751228f, -0.751292f, -0.751355f, -0.751418f, -0.751481f, -0.751545f, -0.751608f,
+ -0.751671f, -0.751734f, -0.751798f, -0.751861f, -0.751924f, -0.751987f, -0.752050f, -0.752114f,
+ -0.752177f, -0.752240f, -0.752303f, -0.752366f, -0.752429f, -0.752493f, -0.752556f, -0.752619f,
+ -0.752682f, -0.752745f, -0.752808f, -0.752871f, -0.752934f, -0.752998f, -0.753061f, -0.753124f,
+ -0.753187f, -0.753250f, -0.753313f, -0.753376f, -0.753439f, -0.753502f, -0.753565f, -0.753628f,
+ -0.753691f, -0.753754f, -0.753817f, -0.753880f, -0.753943f, -0.754006f, -0.754069f, -0.754132f,
+ -0.754195f, -0.754258f, -0.754321f, -0.754384f, -0.754447f, -0.754510f, -0.754573f, -0.754636f,
+ -0.754698f, -0.754761f, -0.754824f, -0.754887f, -0.754950f, -0.755013f, -0.755076f, -0.755139f,
+ -0.755201f, -0.755264f, -0.755327f, -0.755390f, -0.755453f, -0.755516f, -0.755578f, -0.755641f,
+ -0.755704f, -0.755767f, -0.755829f, -0.755892f, -0.755955f, -0.756018f, -0.756081f, -0.756143f,
+ -0.756206f, -0.756269f, -0.756331f, -0.756394f, -0.756457f, -0.756520f, -0.756582f, -0.756645f,
+ -0.756708f, -0.756770f, -0.756833f, -0.756896f, -0.756958f, -0.757021f, -0.757084f, -0.757146f,
+ -0.757209f, -0.757271f, -0.757334f, -0.757397f, -0.757459f, -0.757522f, -0.757584f, -0.757647f,
+ -0.757710f, -0.757772f, -0.757835f, -0.757897f, -0.757960f, -0.758022f, -0.758085f, -0.758147f,
+ -0.758210f, -0.758272f, -0.758335f, -0.758397f, -0.758460f, -0.758522f, -0.758585f, -0.758647f,
+ -0.758710f, -0.758772f, -0.758835f, -0.758897f, -0.758960f, -0.759022f, -0.759084f, -0.759147f,
+ -0.759209f, -0.759272f, -0.759334f, -0.759396f, -0.759459f, -0.759521f, -0.759583f, -0.759646f,
+ -0.759708f, -0.759771f, -0.759833f, -0.759895f, -0.759957f, -0.760020f, -0.760082f, -0.760144f,
+ -0.760207f, -0.760269f, -0.760331f, -0.760394f, -0.760456f, -0.760518f, -0.760580f, -0.760643f,
+ -0.760705f, -0.760767f, -0.760829f, -0.760891f, -0.760954f, -0.761016f, -0.761078f, -0.761140f,
+ -0.761202f, -0.761265f, -0.761327f, -0.761389f, -0.761451f, -0.761513f, -0.761575f, -0.761637f,
+ -0.761700f, -0.761762f, -0.761824f, -0.761886f, -0.761948f, -0.762010f, -0.762072f, -0.762134f,
+ -0.762196f, -0.762258f, -0.762320f, -0.762382f, -0.762444f, -0.762507f, -0.762569f, -0.762631f,
+ -0.762693f, -0.762755f, -0.762817f, -0.762879f, -0.762941f, -0.763003f, -0.763065f, -0.763126f,
+ -0.763188f, -0.763250f, -0.763312f, -0.763374f, -0.763436f, -0.763498f, -0.763560f, -0.763622f,
+ -0.763684f, -0.763746f, -0.763808f, -0.763869f, -0.763931f, -0.763993f, -0.764055f, -0.764117f,
+ -0.764179f, -0.764241f, -0.764302f, -0.764364f, -0.764426f, -0.764488f, -0.764550f, -0.764611f,
+ -0.764673f, -0.764735f, -0.764797f, -0.764859f, -0.764920f, -0.764982f, -0.765044f, -0.765106f,
+ -0.765167f, -0.765229f, -0.765291f, -0.765352f, -0.765414f, -0.765476f, -0.765538f, -0.765599f,
+ -0.765661f, -0.765723f, -0.765784f, -0.765846f, -0.765907f, -0.765969f, -0.766031f, -0.766092f,
+ -0.766154f, -0.766216f, -0.766277f, -0.766339f, -0.766400f, -0.766462f, -0.766524f, -0.766585f,
+ -0.766647f, -0.766708f, -0.766770f, -0.766831f, -0.766893f, -0.766954f, -0.767016f, -0.767077f,
+ -0.767139f, -0.767200f, -0.767262f, -0.767323f, -0.767385f, -0.767446f, -0.767508f, -0.767569f,
+ -0.767631f, -0.767692f, -0.767754f, -0.767815f, -0.767876f, -0.767938f, -0.767999f, -0.768061f,
+ -0.768122f, -0.768183f, -0.768245f, -0.768306f, -0.768368f, -0.768429f, -0.768490f, -0.768552f,
+ -0.768613f, -0.768674f, -0.768736f, -0.768797f, -0.768858f, -0.768919f, -0.768981f, -0.769042f,
+ -0.769103f, -0.769165f, -0.769226f, -0.769287f, -0.769348f, -0.769410f, -0.769471f, -0.769532f,
+ -0.769593f, -0.769655f, -0.769716f, -0.769777f, -0.769838f, -0.769899f, -0.769961f, -0.770022f,
+ -0.770083f, -0.770144f, -0.770205f, -0.770266f, -0.770327f, -0.770389f, -0.770450f, -0.770511f,
+ -0.770572f, -0.770633f, -0.770694f, -0.770755f, -0.770816f, -0.770877f, -0.770938f, -0.770999f,
+ -0.771061f, -0.771122f, -0.771183f, -0.771244f, -0.771305f, -0.771366f, -0.771427f, -0.771488f,
+ -0.771549f, -0.771610f, -0.771671f, -0.771732f, -0.771793f, -0.771854f, -0.771915f, -0.771975f,
+ -0.772036f, -0.772097f, -0.772158f, -0.772219f, -0.772280f, -0.772341f, -0.772402f, -0.772463f,
+ -0.772524f, -0.772584f, -0.772645f, -0.772706f, -0.772767f, -0.772828f, -0.772889f, -0.772950f,
+ -0.773010f, -0.773071f, -0.773132f, -0.773193f, -0.773254f, -0.773314f, -0.773375f, -0.773436f,
+ -0.773497f, -0.773558f, -0.773618f, -0.773679f, -0.773740f, -0.773801f, -0.773861f, -0.773922f,
+ -0.773983f, -0.774043f, -0.774104f, -0.774165f, -0.774225f, -0.774286f, -0.774347f, -0.774407f,
+ -0.774468f, -0.774529f, -0.774589f, -0.774650f, -0.774711f, -0.774771f, -0.774832f, -0.774893f,
+ -0.774953f, -0.775014f, -0.775074f, -0.775135f, -0.775195f, -0.775256f, -0.775317f, -0.775377f,
+ -0.775438f, -0.775498f, -0.775559f, -0.775619f, -0.775680f, -0.775740f, -0.775801f, -0.775861f,
+ -0.775922f, -0.775982f, -0.776043f, -0.776103f, -0.776164f, -0.776224f, -0.776284f, -0.776345f,
+ -0.776405f, -0.776466f, -0.776526f, -0.776587f, -0.776647f, -0.776707f, -0.776768f, -0.776828f,
+ -0.776888f, -0.776949f, -0.777009f, -0.777070f, -0.777130f, -0.777190f, -0.777251f, -0.777311f,
+ -0.777371f, -0.777431f, -0.777492f, -0.777552f, -0.777612f, -0.777673f, -0.777733f, -0.777793f,
+ -0.777853f, -0.777914f, -0.777974f, -0.778034f, -0.778094f, -0.778155f, -0.778215f, -0.778275f,
+ -0.778335f, -0.778395f, -0.778456f, -0.778516f, -0.778576f, -0.778636f, -0.778696f, -0.778756f,
+ -0.778817f, -0.778877f, -0.778937f, -0.778997f, -0.779057f, -0.779117f, -0.779177f, -0.779237f,
+ -0.779297f, -0.779357f, -0.779418f, -0.779478f, -0.779538f, -0.779598f, -0.779658f, -0.779718f,
+ -0.779778f, -0.779838f, -0.779898f, -0.779958f, -0.780018f, -0.780078f, -0.780138f, -0.780198f,
+ -0.780258f, -0.780318f, -0.780378f, -0.780438f, -0.780498f, -0.780557f, -0.780617f, -0.780677f,
+ -0.780737f, -0.780797f, -0.780857f, -0.780917f, -0.780977f, -0.781037f, -0.781097f, -0.781156f,
+ -0.781216f, -0.781276f, -0.781336f, -0.781396f, -0.781456f, -0.781515f, -0.781575f, -0.781635f,
+ -0.781695f, -0.781755f, -0.781814f, -0.781874f, -0.781934f, -0.781994f, -0.782053f, -0.782113f,
+ -0.782173f, -0.782233f, -0.782292f, -0.782352f, -0.782412f, -0.782472f, -0.782531f, -0.782591f,
+ -0.782651f, -0.782710f, -0.782770f, -0.782830f, -0.782889f, -0.782949f, -0.783009f, -0.783068f,
+ -0.783128f, -0.783187f, -0.783247f, -0.783307f, -0.783366f, -0.783426f, -0.783485f, -0.783545f,
+ -0.783605f, -0.783664f, -0.783724f, -0.783783f, -0.783843f, -0.783902f, -0.783962f, -0.784021f,
+ -0.784081f, -0.784140f, -0.784200f, -0.784259f, -0.784319f, -0.784378f, -0.784438f, -0.784497f,
+ -0.784557f, -0.784616f, -0.784675f, -0.784735f, -0.784794f, -0.784854f, -0.784913f, -0.784973f,
+ -0.785032f, -0.785091f, -0.785151f, -0.785210f, -0.785269f, -0.785329f, -0.785388f, -0.785447f,
+ -0.785507f, -0.785566f, -0.785625f, -0.785685f, -0.785744f, -0.785803f, -0.785863f, -0.785922f,
+ -0.785981f, -0.786041f, -0.786100f, -0.786159f, -0.786218f, -0.786278f, -0.786337f, -0.786396f,
+ -0.786455f, -0.786514f, -0.786574f, -0.786633f, -0.786692f, -0.786751f, -0.786810f, -0.786870f,
+ -0.786929f, -0.786988f, -0.787047f, -0.787106f, -0.787165f, -0.787224f, -0.787284f, -0.787343f,
+ -0.787402f, -0.787461f, -0.787520f, -0.787579f, -0.787638f, -0.787697f, -0.787756f, -0.787815f,
+ -0.787874f, -0.787933f, -0.787992f, -0.788051f, -0.788110f, -0.788169f, -0.788228f, -0.788287f,
+ -0.788346f, -0.788405f, -0.788464f, -0.788523f, -0.788582f, -0.788641f, -0.788700f, -0.788759f,
+ -0.788818f, -0.788877f, -0.788936f, -0.788995f, -0.789054f, -0.789113f, -0.789172f, -0.789230f,
+ -0.789289f, -0.789348f, -0.789407f, -0.789466f, -0.789525f, -0.789584f, -0.789642f, -0.789701f,
+ -0.789760f, -0.789819f, -0.789878f, -0.789936f, -0.789995f, -0.790054f, -0.790113f, -0.790171f,
+ -0.790230f, -0.790289f, -0.790348f, -0.790406f, -0.790465f, -0.790524f, -0.790583f, -0.790641f,
+ -0.790700f, -0.790759f, -0.790817f, -0.790876f, -0.790935f, -0.790993f, -0.791052f, -0.791111f,
+ -0.791169f, -0.791228f, -0.791287f, -0.791345f, -0.791404f, -0.791462f, -0.791521f, -0.791580f,
+ -0.791638f, -0.791697f, -0.791755f, -0.791814f, -0.791872f, -0.791931f, -0.791990f, -0.792048f,
+ -0.792107f, -0.792165f, -0.792224f, -0.792282f, -0.792341f, -0.792399f, -0.792458f, -0.792516f,
+ -0.792575f, -0.792633f, -0.792691f, -0.792750f, -0.792808f, -0.792867f, -0.792925f, -0.792984f,
+ -0.793042f, -0.793100f, -0.793159f, -0.793217f, -0.793276f, -0.793334f, -0.793392f, -0.793451f,
+ -0.793509f, -0.793567f, -0.793626f, -0.793684f, -0.793742f, -0.793801f, -0.793859f, -0.793917f,
+ -0.793975f, -0.794034f, -0.794092f, -0.794150f, -0.794209f, -0.794267f, -0.794325f, -0.794383f,
+ -0.794442f, -0.794500f, -0.794558f, -0.794616f, -0.794674f, -0.794733f, -0.794791f, -0.794849f,
+ -0.794907f, -0.794965f, -0.795023f, -0.795082f, -0.795140f, -0.795198f, -0.795256f, -0.795314f,
+ -0.795372f, -0.795430f, -0.795488f, -0.795547f, -0.795605f, -0.795663f, -0.795721f, -0.795779f,
+ -0.795837f, -0.795895f, -0.795953f, -0.796011f, -0.796069f, -0.796127f, -0.796185f, -0.796243f,
+ -0.796301f, -0.796359f, -0.796417f, -0.796475f, -0.796533f, -0.796591f, -0.796649f, -0.796707f,
+ -0.796765f, -0.796823f, -0.796881f, -0.796939f, -0.796996f, -0.797054f, -0.797112f, -0.797170f,
+ -0.797228f, -0.797286f, -0.797344f, -0.797402f, -0.797459f, -0.797517f, -0.797575f, -0.797633f,
+ -0.797691f, -0.797749f, -0.797806f, -0.797864f, -0.797922f, -0.797980f, -0.798038f, -0.798095f,
+ -0.798153f, -0.798211f, -0.798269f, -0.798326f, -0.798384f, -0.798442f, -0.798500f, -0.798557f,
+ -0.798615f, -0.798673f, -0.798730f, -0.798788f, -0.798846f, -0.798903f, -0.798961f, -0.799019f,
+ -0.799076f, -0.799134f, -0.799192f, -0.799249f, -0.799307f, -0.799365f, -0.799422f, -0.799480f,
+ -0.799537f, -0.799595f, -0.799652f, -0.799710f, -0.799768f, -0.799825f, -0.799883f, -0.799940f,
+ -0.799998f, -0.800055f, -0.800113f, -0.800170f, -0.800228f, -0.800285f, -0.800343f, -0.800400f,
+ -0.800458f, -0.800515f, -0.800573f, -0.800630f, -0.800687f, -0.800745f, -0.800802f, -0.800860f,
+ -0.800917f, -0.800975f, -0.801032f, -0.801089f, -0.801147f, -0.801204f, -0.801261f, -0.801319f,
+ -0.801376f, -0.801434f, -0.801491f, -0.801548f, -0.801606f, -0.801663f, -0.801720f, -0.801777f,
+ -0.801835f, -0.801892f, -0.801949f, -0.802007f, -0.802064f, -0.802121f, -0.802178f, -0.802236f,
+ -0.802293f, -0.802350f, -0.802407f, -0.802464f, -0.802522f, -0.802579f, -0.802636f, -0.802693f,
+ -0.802750f, -0.802808f, -0.802865f, -0.802922f, -0.802979f, -0.803036f, -0.803093f, -0.803150f,
+ -0.803208f, -0.803265f, -0.803322f, -0.803379f, -0.803436f, -0.803493f, -0.803550f, -0.803607f,
+ -0.803664f, -0.803721f, -0.803778f, -0.803835f, -0.803892f, -0.803949f, -0.804006f, -0.804063f,
+ -0.804120f, -0.804177f, -0.804234f, -0.804291f, -0.804348f, -0.804405f, -0.804462f, -0.804519f,
+ -0.804576f, -0.804633f, -0.804690f, -0.804747f, -0.804804f, -0.804861f, -0.804918f, -0.804974f,
+ -0.805031f, -0.805088f, -0.805145f, -0.805202f, -0.805259f, -0.805316f, -0.805372f, -0.805429f,
+ -0.805486f, -0.805543f, -0.805600f, -0.805656f, -0.805713f, -0.805770f, -0.805827f, -0.805884f,
+ -0.805940f, -0.805997f, -0.806054f, -0.806111f, -0.806167f, -0.806224f, -0.806281f, -0.806338f,
+ -0.806394f, -0.806451f, -0.806508f, -0.806564f, -0.806621f, -0.806678f, -0.806734f, -0.806791f,
+ -0.806848f, -0.806904f, -0.806961f, -0.807017f, -0.807074f, -0.807131f, -0.807187f, -0.807244f,
+ -0.807300f, -0.807357f, -0.807414f, -0.807470f, -0.807527f, -0.807583f, -0.807640f, -0.807696f,
+ -0.807753f, -0.807809f, -0.807866f, -0.807922f, -0.807979f, -0.808035f, -0.808092f, -0.808148f,
+ -0.808205f, -0.808261f, -0.808318f, -0.808374f, -0.808430f, -0.808487f, -0.808543f, -0.808600f,
+ -0.808656f, -0.808713f, -0.808769f, -0.808825f, -0.808882f, -0.808938f, -0.808994f, -0.809051f,
+ -0.809107f, -0.809164f, -0.809220f, -0.809276f, -0.809332f, -0.809389f, -0.809445f, -0.809501f,
+ -0.809558f, -0.809614f, -0.809670f, -0.809726f, -0.809783f, -0.809839f, -0.809895f, -0.809951f,
+ -0.810008f, -0.810064f, -0.810120f, -0.810176f, -0.810232f, -0.810289f, -0.810345f, -0.810401f,
+ -0.810457f, -0.810513f, -0.810570f, -0.810626f, -0.810682f, -0.810738f, -0.810794f, -0.810850f,
+ -0.810906f, -0.810962f, -0.811018f, -0.811075f, -0.811131f, -0.811187f, -0.811243f, -0.811299f,
+ -0.811355f, -0.811411f, -0.811467f, -0.811523f, -0.811579f, -0.811635f, -0.811691f, -0.811747f,
+ -0.811803f, -0.811859f, -0.811915f, -0.811971f, -0.812027f, -0.812083f, -0.812139f, -0.812195f,
+ -0.812251f, -0.812307f, -0.812362f, -0.812418f, -0.812474f, -0.812530f, -0.812586f, -0.812642f,
+ -0.812698f, -0.812754f, -0.812809f, -0.812865f, -0.812921f, -0.812977f, -0.813033f, -0.813089f,
+ -0.813144f, -0.813200f, -0.813256f, -0.813312f, -0.813368f, -0.813423f, -0.813479f, -0.813535f,
+ -0.813591f, -0.813646f, -0.813702f, -0.813758f, -0.813814f, -0.813869f, -0.813925f, -0.813981f,
+ -0.814036f, -0.814092f, -0.814148f, -0.814203f, -0.814259f, -0.814315f, -0.814370f, -0.814426f,
+ -0.814482f, -0.814537f, -0.814593f, -0.814648f, -0.814704f, -0.814760f, -0.814815f, -0.814871f,
+ -0.814926f, -0.814982f, -0.815037f, -0.815093f, -0.815149f, -0.815204f, -0.815260f, -0.815315f,
+ -0.815371f, -0.815426f, -0.815482f, -0.815537f, -0.815593f, -0.815648f, -0.815704f, -0.815759f,
+ -0.815814f, -0.815870f, -0.815925f, -0.815981f, -0.816036f, -0.816092f, -0.816147f, -0.816202f,
+ -0.816258f, -0.816313f, -0.816368f, -0.816424f, -0.816479f, -0.816535f, -0.816590f, -0.816645f,
+ -0.816701f, -0.816756f, -0.816811f, -0.816867f, -0.816922f, -0.816977f, -0.817032f, -0.817088f,
+ -0.817143f, -0.817198f, -0.817253f, -0.817309f, -0.817364f, -0.817419f, -0.817474f, -0.817530f,
+ -0.817585f, -0.817640f, -0.817695f, -0.817750f, -0.817806f, -0.817861f, -0.817916f, -0.817971f,
+ -0.818026f, -0.818081f, -0.818137f, -0.818192f, -0.818247f, -0.818302f, -0.818357f, -0.818412f,
+ -0.818467f, -0.818522f, -0.818577f, -0.818632f, -0.818687f, -0.818742f, -0.818798f, -0.818853f,
+ -0.818908f, -0.818963f, -0.819018f, -0.819073f, -0.819128f, -0.819183f, -0.819238f, -0.819293f,
+ -0.819348f, -0.819402f, -0.819457f, -0.819512f, -0.819567f, -0.819622f, -0.819677f, -0.819732f,
+ -0.819787f, -0.819842f, -0.819897f, -0.819952f, -0.820007f, -0.820061f, -0.820116f, -0.820171f,
+ -0.820226f, -0.820281f, -0.820336f, -0.820390f, -0.820445f, -0.820500f, -0.820555f, -0.820610f,
+ -0.820664f, -0.820719f, -0.820774f, -0.820829f, -0.820884f, -0.820938f, -0.820993f, -0.821048f,
+ -0.821102f, -0.821157f, -0.821212f, -0.821267f, -0.821321f, -0.821376f, -0.821431f, -0.821485f,
+ -0.821540f, -0.821595f, -0.821649f, -0.821704f, -0.821759f, -0.821813f, -0.821868f, -0.821922f,
+ -0.821977f, -0.822032f, -0.822086f, -0.822141f, -0.822195f, -0.822250f, -0.822305f, -0.822359f,
+ -0.822414f, -0.822468f, -0.822523f, -0.822577f, -0.822632f, -0.822686f, -0.822741f, -0.822795f,
+ -0.822850f, -0.822904f, -0.822959f, -0.823013f, -0.823068f, -0.823122f, -0.823177f, -0.823231f,
+ -0.823285f, -0.823340f, -0.823394f, -0.823449f, -0.823503f, -0.823557f, -0.823612f, -0.823666f,
+ -0.823721f, -0.823775f, -0.823829f, -0.823884f, -0.823938f, -0.823992f, -0.824047f, -0.824101f,
+ -0.824155f, -0.824209f, -0.824264f, -0.824318f, -0.824372f, -0.824427f, -0.824481f, -0.824535f,
+ -0.824589f, -0.824644f, -0.824698f, -0.824752f, -0.824806f, -0.824860f, -0.824915f, -0.824969f,
+ -0.825023f, -0.825077f, -0.825131f, -0.825185f, -0.825240f, -0.825294f, -0.825348f, -0.825402f,
+ -0.825456f, -0.825510f, -0.825564f, -0.825618f, -0.825673f, -0.825727f, -0.825781f, -0.825835f,
+ -0.825889f, -0.825943f, -0.825997f, -0.826051f, -0.826105f, -0.826159f, -0.826213f, -0.826267f,
+ -0.826321f, -0.826375f, -0.826429f, -0.826483f, -0.826537f, -0.826591f, -0.826645f, -0.826699f,
+ -0.826753f, -0.826807f, -0.826861f, -0.826915f, -0.826968f, -0.827022f, -0.827076f, -0.827130f,
+ -0.827184f, -0.827238f, -0.827292f, -0.827346f, -0.827399f, -0.827453f, -0.827507f, -0.827561f,
+ -0.827615f, -0.827669f, -0.827722f, -0.827776f, -0.827830f, -0.827884f, -0.827938f, -0.827991f,
+ -0.828045f, -0.828099f, -0.828153f, -0.828206f, -0.828260f, -0.828314f, -0.828367f, -0.828421f,
+ -0.828475f, -0.828529f, -0.828582f, -0.828636f, -0.828690f, -0.828743f, -0.828797f, -0.828851f,
+ -0.828904f, -0.828958f, -0.829011f, -0.829065f, -0.829119f, -0.829172f, -0.829226f, -0.829279f,
+ -0.829333f, -0.829386f, -0.829440f, -0.829494f, -0.829547f, -0.829601f, -0.829654f, -0.829708f,
+ -0.829761f, -0.829815f, -0.829868f, -0.829922f, -0.829975f, -0.830029f, -0.830082f, -0.830136f,
+ -0.830189f, -0.830243f, -0.830296f, -0.830349f, -0.830403f, -0.830456f, -0.830510f, -0.830563f,
+ -0.830616f, -0.830670f, -0.830723f, -0.830777f, -0.830830f, -0.830883f, -0.830937f, -0.830990f,
+ -0.831043f, -0.831097f, -0.831150f, -0.831203f, -0.831257f, -0.831310f, -0.831363f, -0.831416f,
+ -0.831470f, -0.831523f, -0.831576f, -0.831629f, -0.831683f, -0.831736f, -0.831789f, -0.831842f,
+ -0.831895f, -0.831949f, -0.832002f, -0.832055f, -0.832108f, -0.832161f, -0.832215f, -0.832268f,
+ -0.832321f, -0.832374f, -0.832427f, -0.832480f, -0.832533f, -0.832586f, -0.832640f, -0.832693f,
+ -0.832746f, -0.832799f, -0.832852f, -0.832905f, -0.832958f, -0.833011f, -0.833064f, -0.833117f,
+ -0.833170f, -0.833223f, -0.833276f, -0.833329f, -0.833382f, -0.833435f, -0.833488f, -0.833541f,
+ -0.833594f, -0.833647f, -0.833700f, -0.833753f, -0.833806f, -0.833859f, -0.833912f, -0.833965f,
+ -0.834018f, -0.834070f, -0.834123f, -0.834176f, -0.834229f, -0.834282f, -0.834335f, -0.834388f,
+ -0.834440f, -0.834493f, -0.834546f, -0.834599f, -0.834652f, -0.834705f, -0.834757f, -0.834810f,
+ -0.834863f, -0.834916f, -0.834968f, -0.835021f, -0.835074f, -0.835127f, -0.835179f, -0.835232f,
+ -0.835285f, -0.835338f, -0.835390f, -0.835443f, -0.835496f, -0.835548f, -0.835601f, -0.835654f,
+ -0.835706f, -0.835759f, -0.835812f, -0.835864f, -0.835917f, -0.835969f, -0.836022f, -0.836075f,
+ -0.836127f, -0.836180f, -0.836232f, -0.836285f, -0.836338f, -0.836390f, -0.836443f, -0.836495f,
+ -0.836548f, -0.836600f, -0.836653f, -0.836705f, -0.836758f, -0.836810f, -0.836863f, -0.836915f,
+ -0.836968f, -0.837020f, -0.837073f, -0.837125f, -0.837178f, -0.837230f, -0.837282f, -0.837335f,
+ -0.837387f, -0.837440f, -0.837492f, -0.837544f, -0.837597f, -0.837649f, -0.837701f, -0.837754f,
+ -0.837806f, -0.837859f, -0.837911f, -0.837963f, -0.838015f, -0.838068f, -0.838120f, -0.838172f,
+ -0.838225f, -0.838277f, -0.838329f, -0.838382f, -0.838434f, -0.838486f, -0.838538f, -0.838591f,
+ -0.838643f, -0.838695f, -0.838747f, -0.838799f, -0.838852f, -0.838904f, -0.838956f, -0.839008f,
+ -0.839060f, -0.839112f, -0.839165f, -0.839217f, -0.839269f, -0.839321f, -0.839373f, -0.839425f,
+ -0.839477f, -0.839529f, -0.839581f, -0.839634f, -0.839686f, -0.839738f, -0.839790f, -0.839842f,
+ -0.839894f, -0.839946f, -0.839998f, -0.840050f, -0.840102f, -0.840154f, -0.840206f, -0.840258f,
+ -0.840310f, -0.840362f, -0.840414f, -0.840466f, -0.840518f, -0.840570f, -0.840622f, -0.840673f,
+ -0.840725f, -0.840777f, -0.840829f, -0.840881f, -0.840933f, -0.840985f, -0.841037f, -0.841089f,
+ -0.841140f, -0.841192f, -0.841244f, -0.841296f, -0.841348f, -0.841400f, -0.841451f, -0.841503f,
+ -0.841555f, -0.841607f, -0.841659f, -0.841710f, -0.841762f, -0.841814f, -0.841866f, -0.841917f,
+ -0.841969f, -0.842021f, -0.842072f, -0.842124f, -0.842176f, -0.842228f, -0.842279f, -0.842331f,
+ -0.842383f, -0.842434f, -0.842486f, -0.842538f, -0.842589f, -0.842641f, -0.842692f, -0.842744f,
+ -0.842796f, -0.842847f, -0.842899f, -0.842950f, -0.843002f, -0.843054f, -0.843105f, -0.843157f,
+ -0.843208f, -0.843260f, -0.843311f, -0.843363f, -0.843414f, -0.843466f, -0.843517f, -0.843569f,
+ -0.843620f, -0.843672f, -0.843723f, -0.843775f, -0.843826f, -0.843878f, -0.843929f, -0.843980f,
+ -0.844032f, -0.844083f, -0.844135f, -0.844186f, -0.844238f, -0.844289f, -0.844340f, -0.844392f,
+ -0.844443f, -0.844494f, -0.844546f, -0.844597f, -0.844648f, -0.844700f, -0.844751f, -0.844802f,
+ -0.844854f, -0.844905f, -0.844956f, -0.845007f, -0.845059f, -0.845110f, -0.845161f, -0.845212f,
+ -0.845264f, -0.845315f, -0.845366f, -0.845417f, -0.845469f, -0.845520f, -0.845571f, -0.845622f,
+ -0.845673f, -0.845724f, -0.845776f, -0.845827f, -0.845878f, -0.845929f, -0.845980f, -0.846031f,
+ -0.846082f, -0.846133f, -0.846185f, -0.846236f, -0.846287f, -0.846338f, -0.846389f, -0.846440f,
+ -0.846491f, -0.846542f, -0.846593f, -0.846644f, -0.846695f, -0.846746f, -0.846797f, -0.846848f,
+ -0.846899f, -0.846950f, -0.847001f, -0.847052f, -0.847103f, -0.847154f, -0.847205f, -0.847256f,
+ -0.847307f, -0.847358f, -0.847408f, -0.847459f, -0.847510f, -0.847561f, -0.847612f, -0.847663f,
+ -0.847714f, -0.847765f, -0.847815f, -0.847866f, -0.847917f, -0.847968f, -0.848019f, -0.848070f,
+ -0.848120f, -0.848171f, -0.848222f, -0.848273f, -0.848323f, -0.848374f, -0.848425f, -0.848476f,
+ -0.848526f, -0.848577f, -0.848628f, -0.848679f, -0.848729f, -0.848780f, -0.848831f, -0.848881f,
+ -0.848932f, -0.848983f, -0.849033f, -0.849084f, -0.849135f, -0.849185f, -0.849236f, -0.849287f,
+ -0.849337f, -0.849388f, -0.849438f, -0.849489f, -0.849540f, -0.849590f, -0.849641f, -0.849691f,
+ -0.849742f, -0.849792f, -0.849843f, -0.849893f, -0.849944f, -0.849994f, -0.850045f, -0.850095f,
+ -0.850146f, -0.850196f, -0.850247f, -0.850297f, -0.850348f, -0.850398f, -0.850449f, -0.850499f,
+ -0.850549f, -0.850600f, -0.850650f, -0.850701f, -0.850751f, -0.850801f, -0.850852f, -0.850902f,
+ -0.850953f, -0.851003f, -0.851053f, -0.851104f, -0.851154f, -0.851204f, -0.851255f, -0.851305f,
+ -0.851355f, -0.851406f, -0.851456f, -0.851506f, -0.851556f, -0.851607f, -0.851657f, -0.851707f,
+ -0.851757f, -0.851808f, -0.851858f, -0.851908f, -0.851958f, -0.852008f, -0.852059f, -0.852109f,
+ -0.852159f, -0.852209f, -0.852259f, -0.852309f, -0.852360f, -0.852410f, -0.852460f, -0.852510f,
+ -0.852560f, -0.852610f, -0.852660f, -0.852710f, -0.852760f, -0.852810f, -0.852861f, -0.852911f,
+ -0.852961f, -0.853011f, -0.853061f, -0.853111f, -0.853161f, -0.853211f, -0.853261f, -0.853311f,
+ -0.853361f, -0.853411f, -0.853461f, -0.853511f, -0.853561f, -0.853611f, -0.853660f, -0.853710f,
+ -0.853760f, -0.853810f, -0.853860f, -0.853910f, -0.853960f, -0.854010f, -0.854060f, -0.854110f,
+ -0.854159f, -0.854209f, -0.854259f, -0.854309f, -0.854359f, -0.854409f, -0.854458f, -0.854508f,
+ -0.854558f, -0.854608f, -0.854658f, -0.854707f, -0.854757f, -0.854807f, -0.854857f, -0.854906f,
+ -0.854956f, -0.855006f, -0.855056f, -0.855105f, -0.855155f, -0.855205f, -0.855254f, -0.855304f,
+ -0.855354f, -0.855403f, -0.855453f, -0.855503f, -0.855552f, -0.855602f, -0.855651f, -0.855701f,
+ -0.855751f, -0.855800f, -0.855850f, -0.855900f, -0.855949f, -0.855999f, -0.856048f, -0.856098f,
+ -0.856147f, -0.856197f, -0.856246f, -0.856296f, -0.856345f, -0.856395f, -0.856444f, -0.856494f,
+ -0.856543f, -0.856593f, -0.856642f, -0.856692f, -0.856741f, -0.856791f, -0.856840f, -0.856890f,
+ -0.856939f, -0.856988f, -0.857038f, -0.857087f, -0.857137f, -0.857186f, -0.857235f, -0.857285f,
+ -0.857334f, -0.857383f, -0.857433f, -0.857482f, -0.857531f, -0.857581f, -0.857630f, -0.857679f,
+ -0.857729f, -0.857778f, -0.857827f, -0.857876f, -0.857926f, -0.857975f, -0.858024f, -0.858073f,
+ -0.858123f, -0.858172f, -0.858221f, -0.858270f, -0.858320f, -0.858369f, -0.858418f, -0.858467f,
+ -0.858516f, -0.858565f, -0.858615f, -0.858664f, -0.858713f, -0.858762f, -0.858811f, -0.858860f,
+ -0.858909f, -0.858958f, -0.859007f, -0.859057f, -0.859106f, -0.859155f, -0.859204f, -0.859253f,
+ -0.859302f, -0.859351f, -0.859400f, -0.859449f, -0.859498f, -0.859547f, -0.859596f, -0.859645f,
+ -0.859694f, -0.859743f, -0.859792f, -0.859841f, -0.859890f, -0.859939f, -0.859988f, -0.860036f,
+ -0.860085f, -0.860134f, -0.860183f, -0.860232f, -0.860281f, -0.860330f, -0.860379f, -0.860428f,
+ -0.860476f, -0.860525f, -0.860574f, -0.860623f, -0.860672f, -0.860721f, -0.860769f, -0.860818f,
+ -0.860867f, -0.860916f, -0.860964f, -0.861013f, -0.861062f, -0.861111f, -0.861160f, -0.861208f,
+ -0.861257f, -0.861306f, -0.861354f, -0.861403f, -0.861452f, -0.861500f, -0.861549f, -0.861598f,
+ -0.861646f, -0.861695f, -0.861744f, -0.861792f, -0.861841f, -0.861890f, -0.861938f, -0.861987f,
+ -0.862035f, -0.862084f, -0.862133f, -0.862181f, -0.862230f, -0.862278f, -0.862327f, -0.862375f,
+ -0.862424f, -0.862472f, -0.862521f, -0.862570f, -0.862618f, -0.862666f, -0.862715f, -0.862763f,
+ -0.862812f, -0.862860f, -0.862909f, -0.862957f, -0.863006f, -0.863054f, -0.863103f, -0.863151f,
+ -0.863199f, -0.863248f, -0.863296f, -0.863345f, -0.863393f, -0.863441f, -0.863490f, -0.863538f,
+ -0.863586f, -0.863635f, -0.863683f, -0.863731f, -0.863780f, -0.863828f, -0.863876f, -0.863925f,
+ -0.863973f, -0.864021f, -0.864069f, -0.864118f, -0.864166f, -0.864214f, -0.864262f, -0.864311f,
+ -0.864359f, -0.864407f, -0.864455f, -0.864503f, -0.864552f, -0.864600f, -0.864648f, -0.864696f,
+ -0.864744f, -0.864792f, -0.864841f, -0.864889f, -0.864937f, -0.864985f, -0.865033f, -0.865081f,
+ -0.865129f, -0.865177f, -0.865225f, -0.865273f, -0.865321f, -0.865369f, -0.865418f, -0.865466f,
+ -0.865514f, -0.865562f, -0.865610f, -0.865658f, -0.865706f, -0.865754f, -0.865802f, -0.865850f,
+ -0.865898f, -0.865946f, -0.865993f, -0.866041f, -0.866089f, -0.866137f, -0.866185f, -0.866233f,
+ -0.866281f, -0.866329f, -0.866377f, -0.866425f, -0.866472f, -0.866520f, -0.866568f, -0.866616f,
+ -0.866664f, -0.866712f, -0.866759f, -0.866807f, -0.866855f, -0.866903f, -0.866951f, -0.866998f,
+ -0.867046f, -0.867094f, -0.867142f, -0.867190f, -0.867237f, -0.867285f, -0.867333f, -0.867380f,
+ -0.867428f, -0.867476f, -0.867523f, -0.867571f, -0.867619f, -0.867667f, -0.867714f, -0.867762f,
+ -0.867809f, -0.867857f, -0.867905f, -0.867952f, -0.868000f, -0.868048f, -0.868095f, -0.868143f,
+ -0.868190f, -0.868238f, -0.868285f, -0.868333f, -0.868381f, -0.868428f, -0.868476f, -0.868523f,
+ -0.868571f, -0.868618f, -0.868666f, -0.868713f, -0.868761f, -0.868808f, -0.868856f, -0.868903f,
+ -0.868951f, -0.868998f, -0.869045f, -0.869093f, -0.869140f, -0.869188f, -0.869235f, -0.869282f,
+ -0.869330f, -0.869377f, -0.869425f, -0.869472f, -0.869519f, -0.869567f, -0.869614f, -0.869661f,
+ -0.869709f, -0.869756f, -0.869803f, -0.869851f, -0.869898f, -0.869945f, -0.869992f, -0.870040f,
+ -0.870087f, -0.870134f, -0.870182f, -0.870229f, -0.870276f, -0.870323f, -0.870370f, -0.870418f,
+ -0.870465f, -0.870512f, -0.870559f, -0.870606f, -0.870654f, -0.870701f, -0.870748f, -0.870795f,
+ -0.870842f, -0.870889f, -0.870936f, -0.870983f, -0.871031f, -0.871078f, -0.871125f, -0.871172f,
+ -0.871219f, -0.871266f, -0.871313f, -0.871360f, -0.871407f, -0.871454f, -0.871501f, -0.871548f,
+ -0.871595f, -0.871642f, -0.871689f, -0.871736f, -0.871783f, -0.871830f, -0.871877f, -0.871924f,
+ -0.871971f, -0.872018f, -0.872065f, -0.872112f, -0.872159f, -0.872205f, -0.872252f, -0.872299f,
+ -0.872346f, -0.872393f, -0.872440f, -0.872487f, -0.872534f, -0.872580f, -0.872627f, -0.872674f,
+ -0.872721f, -0.872768f, -0.872814f, -0.872861f, -0.872908f, -0.872955f, -0.873001f, -0.873048f,
+ -0.873095f, -0.873142f, -0.873188f, -0.873235f, -0.873282f, -0.873329f, -0.873375f, -0.873422f,
+ -0.873469f, -0.873515f, -0.873562f, -0.873609f, -0.873655f, -0.873702f, -0.873749f, -0.873795f,
+ -0.873842f, -0.873888f, -0.873935f, -0.873982f, -0.874028f, -0.874075f, -0.874121f, -0.874168f,
+ -0.874215f, -0.874261f, -0.874308f, -0.874354f, -0.874401f, -0.874447f, -0.874494f, -0.874540f,
+ -0.874587f, -0.874633f, -0.874680f, -0.874726f, -0.874773f, -0.874819f, -0.874865f, -0.874912f,
+ -0.874958f, -0.875005f, -0.875051f, -0.875098f, -0.875144f, -0.875190f, -0.875237f, -0.875283f,
+ -0.875329f, -0.875376f, -0.875422f, -0.875468f, -0.875515f, -0.875561f, -0.875607f, -0.875654f,
+ -0.875700f, -0.875746f, -0.875793f, -0.875839f, -0.875885f, -0.875931f, -0.875978f, -0.876024f,
+ -0.876070f, -0.876116f, -0.876163f, -0.876209f, -0.876255f, -0.876301f, -0.876347f, -0.876393f,
+ -0.876440f, -0.876486f, -0.876532f, -0.876578f, -0.876624f, -0.876670f, -0.876716f, -0.876763f,
+ -0.876809f, -0.876855f, -0.876901f, -0.876947f, -0.876993f, -0.877039f, -0.877085f, -0.877131f,
+ -0.877177f, -0.877223f, -0.877269f, -0.877315f, -0.877361f, -0.877407f, -0.877453f, -0.877499f,
+ -0.877545f, -0.877591f, -0.877637f, -0.877683f, -0.877729f, -0.877775f, -0.877821f, -0.877867f,
+ -0.877913f, -0.877959f, -0.878005f, -0.878051f, -0.878096f, -0.878142f, -0.878188f, -0.878234f,
+ -0.878280f, -0.878326f, -0.878371f, -0.878417f, -0.878463f, -0.878509f, -0.878555f, -0.878600f,
+ -0.878646f, -0.878692f, -0.878738f, -0.878784f, -0.878829f, -0.878875f, -0.878921f, -0.878967f,
+ -0.879012f, -0.879058f, -0.879104f, -0.879149f, -0.879195f, -0.879241f, -0.879286f, -0.879332f,
+ -0.879378f, -0.879423f, -0.879469f, -0.879515f, -0.879560f, -0.879606f, -0.879651f, -0.879697f,
+ -0.879743f, -0.879788f, -0.879834f, -0.879879f, -0.879925f, -0.879970f, -0.880016f, -0.880061f,
+ -0.880107f, -0.880153f, -0.880198f, -0.880244f, -0.880289f, -0.880334f, -0.880380f, -0.880425f,
+ -0.880471f, -0.880516f, -0.880562f, -0.880607f, -0.880653f, -0.880698f, -0.880743f, -0.880789f,
+ -0.880834f, -0.880880f, -0.880925f, -0.880970f, -0.881016f, -0.881061f, -0.881106f, -0.881152f,
+ -0.881197f, -0.881242f, -0.881288f, -0.881333f, -0.881378f, -0.881424f, -0.881469f, -0.881514f,
+ -0.881559f, -0.881605f, -0.881650f, -0.881695f, -0.881740f, -0.881786f, -0.881831f, -0.881876f,
+ -0.881921f, -0.881966f, -0.882012f, -0.882057f, -0.882102f, -0.882147f, -0.882192f, -0.882237f,
+ -0.882283f, -0.882328f, -0.882373f, -0.882418f, -0.882463f, -0.882508f, -0.882553f, -0.882598f,
+ -0.882643f, -0.882688f, -0.882733f, -0.882779f, -0.882824f, -0.882869f, -0.882914f, -0.882959f,
+ -0.883004f, -0.883049f, -0.883094f, -0.883139f, -0.883184f, -0.883228f, -0.883273f, -0.883318f,
+ -0.883363f, -0.883408f, -0.883453f, -0.883498f, -0.883543f, -0.883588f, -0.883633f, -0.883678f,
+ -0.883723f, -0.883767f, -0.883812f, -0.883857f, -0.883902f, -0.883947f, -0.883992f, -0.884036f,
+ -0.884081f, -0.884126f, -0.884171f, -0.884216f, -0.884260f, -0.884305f, -0.884350f, -0.884395f,
+ -0.884439f, -0.884484f, -0.884529f, -0.884574f, -0.884618f, -0.884663f, -0.884708f, -0.884752f,
+ -0.884797f, -0.884842f, -0.884886f, -0.884931f, -0.884976f, -0.885020f, -0.885065f, -0.885110f,
+ -0.885154f, -0.885199f, -0.885243f, -0.885288f, -0.885333f, -0.885377f, -0.885422f, -0.885466f,
+ -0.885511f, -0.885555f, -0.885600f, -0.885644f, -0.885689f, -0.885733f, -0.885778f, -0.885822f,
+ -0.885867f, -0.885911f, -0.885956f, -0.886000f, -0.886045f, -0.886089f, -0.886134f, -0.886178f,
+ -0.886223f, -0.886267f, -0.886311f, -0.886356f, -0.886400f, -0.886445f, -0.886489f, -0.886533f,
+ -0.886578f, -0.886622f, -0.886666f, -0.886711f, -0.886755f, -0.886799f, -0.886844f, -0.886888f,
+ -0.886932f, -0.886976f, -0.887021f, -0.887065f, -0.887109f, -0.887153f, -0.887198f, -0.887242f,
+ -0.887286f, -0.887330f, -0.887375f, -0.887419f, -0.887463f, -0.887507f, -0.887551f, -0.887595f,
+ -0.887640f, -0.887684f, -0.887728f, -0.887772f, -0.887816f, -0.887860f, -0.887904f, -0.887949f,
+ -0.887993f, -0.888037f, -0.888081f, -0.888125f, -0.888169f, -0.888213f, -0.888257f, -0.888301f,
+ -0.888345f, -0.888389f, -0.888433f, -0.888477f, -0.888521f, -0.888565f, -0.888609f, -0.888653f,
+ -0.888697f, -0.888741f, -0.888785f, -0.888829f, -0.888873f, -0.888917f, -0.888961f, -0.889004f,
+ -0.889048f, -0.889092f, -0.889136f, -0.889180f, -0.889224f, -0.889268f, -0.889312f, -0.889355f,
+ -0.889399f, -0.889443f, -0.889487f, -0.889531f, -0.889574f, -0.889618f, -0.889662f, -0.889706f,
+ -0.889750f, -0.889793f, -0.889837f, -0.889881f, -0.889925f, -0.889968f, -0.890012f, -0.890056f,
+ -0.890099f, -0.890143f, -0.890187f, -0.890230f, -0.890274f, -0.890318f, -0.890361f, -0.890405f,
+ -0.890449f, -0.890492f, -0.890536f, -0.890580f, -0.890623f, -0.890667f, -0.890710f, -0.890754f,
+ -0.890797f, -0.890841f, -0.890885f, -0.890928f, -0.890972f, -0.891015f, -0.891059f, -0.891102f,
+ -0.891146f, -0.891189f, -0.891233f, -0.891276f, -0.891320f, -0.891363f, -0.891407f, -0.891450f,
+ -0.891493f, -0.891537f, -0.891580f, -0.891624f, -0.891667f, -0.891711f, -0.891754f, -0.891797f,
+ -0.891841f, -0.891884f, -0.891927f, -0.891971f, -0.892014f, -0.892057f, -0.892101f, -0.892144f,
+ -0.892187f, -0.892231f, -0.892274f, -0.892317f, -0.892361f, -0.892404f, -0.892447f, -0.892490f,
+ -0.892534f, -0.892577f, -0.892620f, -0.892663f, -0.892706f, -0.892750f, -0.892793f, -0.892836f,
+ -0.892879f, -0.892922f, -0.892965f, -0.893009f, -0.893052f, -0.893095f, -0.893138f, -0.893181f,
+ -0.893224f, -0.893267f, -0.893310f, -0.893354f, -0.893397f, -0.893440f, -0.893483f, -0.893526f,
+ -0.893569f, -0.893612f, -0.893655f, -0.893698f, -0.893741f, -0.893784f, -0.893827f, -0.893870f,
+ -0.893913f, -0.893956f, -0.893999f, -0.894042f, -0.894085f, -0.894128f, -0.894171f, -0.894214f,
+ -0.894256f, -0.894299f, -0.894342f, -0.894385f, -0.894428f, -0.894471f, -0.894514f, -0.894557f,
+ -0.894599f, -0.894642f, -0.894685f, -0.894728f, -0.894771f, -0.894814f, -0.894856f, -0.894899f,
+ -0.894942f, -0.894985f, -0.895028f, -0.895070f, -0.895113f, -0.895156f, -0.895198f, -0.895241f,
+ -0.895284f, -0.895327f, -0.895369f, -0.895412f, -0.895455f, -0.895497f, -0.895540f, -0.895583f,
+ -0.895625f, -0.895668f, -0.895711f, -0.895753f, -0.895796f, -0.895838f, -0.895881f, -0.895924f,
+ -0.895966f, -0.896009f, -0.896051f, -0.896094f, -0.896137f, -0.896179f, -0.896222f, -0.896264f,
+ -0.896307f, -0.896349f, -0.896392f, -0.896434f, -0.896477f, -0.896519f, -0.896562f, -0.896604f,
+ -0.896646f, -0.896689f, -0.896731f, -0.896774f, -0.896816f, -0.896859f, -0.896901f, -0.896943f,
+ -0.896986f, -0.897028f, -0.897071f, -0.897113f, -0.897155f, -0.897198f, -0.897240f, -0.897282f,
+ -0.897325f, -0.897367f, -0.897409f, -0.897452f, -0.897494f, -0.897536f, -0.897578f, -0.897621f,
+ -0.897663f, -0.897705f, -0.897747f, -0.897790f, -0.897832f, -0.897874f, -0.897916f, -0.897958f,
+ -0.898001f, -0.898043f, -0.898085f, -0.898127f, -0.898169f, -0.898211f, -0.898254f, -0.898296f,
+ -0.898338f, -0.898380f, -0.898422f, -0.898464f, -0.898506f, -0.898548f, -0.898590f, -0.898632f,
+ -0.898674f, -0.898717f, -0.898759f, -0.898801f, -0.898843f, -0.898885f, -0.898927f, -0.898969f,
+ -0.899011f, -0.899053f, -0.899095f, -0.899137f, -0.899179f, -0.899220f, -0.899262f, -0.899304f,
+ -0.899346f, -0.899388f, -0.899430f, -0.899472f, -0.899514f, -0.899556f, -0.899598f, -0.899639f,
+ -0.899681f, -0.899723f, -0.899765f, -0.899807f, -0.899849f, -0.899890f, -0.899932f, -0.899974f,
+ -0.900016f, -0.900058f, -0.900099f, -0.900141f, -0.900183f, -0.900225f, -0.900266f, -0.900308f,
+ -0.900350f, -0.900392f, -0.900433f, -0.900475f, -0.900517f, -0.900558f, -0.900600f, -0.900642f,
+ -0.900683f, -0.900725f, -0.900767f, -0.900808f, -0.900850f, -0.900892f, -0.900933f, -0.900975f,
+ -0.901016f, -0.901058f, -0.901100f, -0.901141f, -0.901183f, -0.901224f, -0.901266f, -0.901307f,
+ -0.901349f, -0.901390f, -0.901432f, -0.901473f, -0.901515f, -0.901556f, -0.901598f, -0.901639f,
+ -0.901681f, -0.901722f, -0.901764f, -0.901805f, -0.901847f, -0.901888f, -0.901929f, -0.901971f,
+ -0.902012f, -0.902054f, -0.902095f, -0.902136f, -0.902178f, -0.902219f, -0.902260f, -0.902302f,
+ -0.902343f, -0.902384f, -0.902426f, -0.902467f, -0.902508f, -0.902550f, -0.902591f, -0.902632f,
+ -0.902673f, -0.902715f, -0.902756f, -0.902797f, -0.902838f, -0.902879f, -0.902921f, -0.902962f,
+ -0.903003f, -0.903044f, -0.903085f, -0.903127f, -0.903168f, -0.903209f, -0.903250f, -0.903291f,
+ -0.903332f, -0.903373f, -0.903415f, -0.903456f, -0.903497f, -0.903538f, -0.903579f, -0.903620f,
+ -0.903661f, -0.903702f, -0.903743f, -0.903784f, -0.903825f, -0.903866f, -0.903907f, -0.903948f,
+ -0.903989f, -0.904030f, -0.904071f, -0.904112f, -0.904153f, -0.904194f, -0.904235f, -0.904276f,
+ -0.904317f, -0.904358f, -0.904399f, -0.904440f, -0.904481f, -0.904521f, -0.904562f, -0.904603f,
+ -0.904644f, -0.904685f, -0.904726f, -0.904767f, -0.904807f, -0.904848f, -0.904889f, -0.904930f,
+ -0.904971f, -0.905011f, -0.905052f, -0.905093f, -0.905134f, -0.905175f, -0.905215f, -0.905256f,
+ -0.905297f, -0.905337f, -0.905378f, -0.905419f, -0.905460f, -0.905500f, -0.905541f, -0.905582f,
+ -0.905622f, -0.905663f, -0.905704f, -0.905744f, -0.905785f, -0.905825f, -0.905866f, -0.905907f,
+ -0.905947f, -0.905988f, -0.906028f, -0.906069f, -0.906110f, -0.906150f, -0.906191f, -0.906231f,
+ -0.906272f, -0.906312f, -0.906353f, -0.906393f, -0.906434f, -0.906474f, -0.906515f, -0.906555f,
+ -0.906596f, -0.906636f, -0.906677f, -0.906717f, -0.906757f, -0.906798f, -0.906838f, -0.906879f,
+ -0.906919f, -0.906959f, -0.907000f, -0.907040f, -0.907081f, -0.907121f, -0.907161f, -0.907202f,
+ -0.907242f, -0.907282f, -0.907323f, -0.907363f, -0.907403f, -0.907444f, -0.907484f, -0.907524f,
+ -0.907564f, -0.907605f, -0.907645f, -0.907685f, -0.907725f, -0.907766f, -0.907806f, -0.907846f,
+ -0.907886f, -0.907926f, -0.907966f, -0.908007f, -0.908047f, -0.908087f, -0.908127f, -0.908167f,
+ -0.908207f, -0.908248f, -0.908288f, -0.908328f, -0.908368f, -0.908408f, -0.908448f, -0.908488f,
+ -0.908528f, -0.908568f, -0.908608f, -0.908648f, -0.908688f, -0.908728f, -0.908768f, -0.908808f,
+ -0.908848f, -0.908888f, -0.908928f, -0.908968f, -0.909008f, -0.909048f, -0.909088f, -0.909128f,
+ -0.909168f, -0.909208f, -0.909248f, -0.909288f, -0.909328f, -0.909368f, -0.909407f, -0.909447f,
+ -0.909487f, -0.909527f, -0.909567f, -0.909607f, -0.909646f, -0.909686f, -0.909726f, -0.909766f,
+ -0.909806f, -0.909845f, -0.909885f, -0.909925f, -0.909965f, -0.910005f, -0.910044f, -0.910084f,
+ -0.910124f, -0.910163f, -0.910203f, -0.910243f, -0.910283f, -0.910322f, -0.910362f, -0.910402f,
+ -0.910441f, -0.910481f, -0.910521f, -0.910560f, -0.910600f, -0.910639f, -0.910679f, -0.910719f,
+ -0.910758f, -0.910798f, -0.910837f, -0.910877f, -0.910917f, -0.910956f, -0.910996f, -0.911035f,
+ -0.911075f, -0.911114f, -0.911154f, -0.911193f, -0.911233f, -0.911272f, -0.911312f, -0.911351f,
+ -0.911391f, -0.911430f, -0.911470f, -0.911509f, -0.911548f, -0.911588f, -0.911627f, -0.911667f,
+ -0.911706f, -0.911745f, -0.911785f, -0.911824f, -0.911864f, -0.911903f, -0.911942f, -0.911982f,
+ -0.912021f, -0.912060f, -0.912099f, -0.912139f, -0.912178f, -0.912217f, -0.912257f, -0.912296f,
+ -0.912335f, -0.912374f, -0.912414f, -0.912453f, -0.912492f, -0.912531f, -0.912571f, -0.912610f,
+ -0.912649f, -0.912688f, -0.912727f, -0.912766f, -0.912806f, -0.912845f, -0.912884f, -0.912923f,
+ -0.912962f, -0.913001f, -0.913040f, -0.913080f, -0.913119f, -0.913158f, -0.913197f, -0.913236f,
+ -0.913275f, -0.913314f, -0.913353f, -0.913392f, -0.913431f, -0.913470f, -0.913509f, -0.913548f,
+ -0.913587f, -0.913626f, -0.913665f, -0.913704f, -0.913743f, -0.913782f, -0.913821f, -0.913860f,
+ -0.913899f, -0.913938f, -0.913976f, -0.914015f, -0.914054f, -0.914093f, -0.914132f, -0.914171f,
+ -0.914210f, -0.914249f, -0.914287f, -0.914326f, -0.914365f, -0.914404f, -0.914443f, -0.914482f,
+ -0.914520f, -0.914559f, -0.914598f, -0.914637f, -0.914675f, -0.914714f, -0.914753f, -0.914792f,
+ -0.914830f, -0.914869f, -0.914908f, -0.914946f, -0.914985f, -0.915024f, -0.915062f, -0.915101f,
+ -0.915140f, -0.915178f, -0.915217f, -0.915256f, -0.915294f, -0.915333f, -0.915372f, -0.915410f,
+ -0.915449f, -0.915487f, -0.915526f, -0.915564f, -0.915603f, -0.915642f, -0.915680f, -0.915719f,
+ -0.915757f, -0.915796f, -0.915834f, -0.915873f, -0.915911f, -0.915950f, -0.915988f, -0.916027f,
+ -0.916065f, -0.916103f, -0.916142f, -0.916180f, -0.916219f, -0.916257f, -0.916296f, -0.916334f,
+ -0.916372f, -0.916411f, -0.916449f, -0.916487f, -0.916526f, -0.916564f, -0.916602f, -0.916641f,
+ -0.916679f, -0.916717f, -0.916756f, -0.916794f, -0.916832f, -0.916871f, -0.916909f, -0.916947f,
+ -0.916985f, -0.917024f, -0.917062f, -0.917100f, -0.917138f, -0.917176f, -0.917215f, -0.917253f,
+ -0.917291f, -0.917329f, -0.917367f, -0.917405f, -0.917444f, -0.917482f, -0.917520f, -0.917558f,
+ -0.917596f, -0.917634f, -0.917672f, -0.917710f, -0.917749f, -0.917787f, -0.917825f, -0.917863f,
+ -0.917901f, -0.917939f, -0.917977f, -0.918015f, -0.918053f, -0.918091f, -0.918129f, -0.918167f,
+ -0.918205f, -0.918243f, -0.918281f, -0.918319f, -0.918357f, -0.918395f, -0.918433f, -0.918471f,
+ -0.918508f, -0.918546f, -0.918584f, -0.918622f, -0.918660f, -0.918698f, -0.918736f, -0.918774f,
+ -0.918811f, -0.918849f, -0.918887f, -0.918925f, -0.918963f, -0.919001f, -0.919038f, -0.919076f,
+ -0.919114f, -0.919152f, -0.919189f, -0.919227f, -0.919265f, -0.919303f, -0.919340f, -0.919378f,
+ -0.919416f, -0.919453f, -0.919491f, -0.919529f, -0.919567f, -0.919604f, -0.919642f, -0.919680f,
+ -0.919717f, -0.919755f, -0.919792f, -0.919830f, -0.919868f, -0.919905f, -0.919943f, -0.919980f,
+ -0.920018f, -0.920056f, -0.920093f, -0.920131f, -0.920168f, -0.920206f, -0.920243f, -0.920281f,
+ -0.920318f, -0.920356f, -0.920393f, -0.920431f, -0.920468f, -0.920506f, -0.920543f, -0.920581f,
+ -0.920618f, -0.920655f, -0.920693f, -0.920730f, -0.920768f, -0.920805f, -0.920842f, -0.920880f,
+ -0.920917f, -0.920955f, -0.920992f, -0.921029f, -0.921067f, -0.921104f, -0.921141f, -0.921179f,
+ -0.921216f, -0.921253f, -0.921291f, -0.921328f, -0.921365f, -0.921402f, -0.921440f, -0.921477f,
+ -0.921514f, -0.921551f, -0.921588f, -0.921626f, -0.921663f, -0.921700f, -0.921737f, -0.921774f,
+ -0.921812f, -0.921849f, -0.921886f, -0.921923f, -0.921960f, -0.921997f, -0.922034f, -0.922072f,
+ -0.922109f, -0.922146f, -0.922183f, -0.922220f, -0.922257f, -0.922294f, -0.922331f, -0.922368f,
+ -0.922405f, -0.922442f, -0.922479f, -0.922516f, -0.922553f, -0.922590f, -0.922627f, -0.922664f,
+ -0.922701f, -0.922738f, -0.922775f, -0.922812f, -0.922849f, -0.922886f, -0.922923f, -0.922960f,
+ -0.922997f, -0.923033f, -0.923070f, -0.923107f, -0.923144f, -0.923181f, -0.923218f, -0.923255f,
+ -0.923291f, -0.923328f, -0.923365f, -0.923402f, -0.923439f, -0.923475f, -0.923512f, -0.923549f,
+ -0.923586f, -0.923622f, -0.923659f, -0.923696f, -0.923733f, -0.923769f, -0.923806f, -0.923843f,
+ -0.923880f, -0.923916f, -0.923953f, -0.923990f, -0.924026f, -0.924063f, -0.924100f, -0.924136f,
+ -0.924173f, -0.924209f, -0.924246f, -0.924283f, -0.924319f, -0.924356f, -0.924392f, -0.924429f,
+ -0.924465f, -0.924502f, -0.924539f, -0.924575f, -0.924612f, -0.924648f, -0.924685f, -0.924721f,
+ -0.924758f, -0.924794f, -0.924831f, -0.924867f, -0.924904f, -0.924940f, -0.924976f, -0.925013f,
+ -0.925049f, -0.925086f, -0.925122f, -0.925158f, -0.925195f, -0.925231f, -0.925268f, -0.925304f,
+ -0.925340f, -0.925377f, -0.925413f, -0.925449f, -0.925486f, -0.925522f, -0.925558f, -0.925595f,
+ -0.925631f, -0.925667f, -0.925703f, -0.925740f, -0.925776f, -0.925812f, -0.925848f, -0.925885f,
+ -0.925921f, -0.925957f, -0.925993f, -0.926029f, -0.926066f, -0.926102f, -0.926138f, -0.926174f,
+ -0.926210f, -0.926246f, -0.926283f, -0.926319f, -0.926355f, -0.926391f, -0.926427f, -0.926463f,
+ -0.926499f, -0.926535f, -0.926571f, -0.926607f, -0.926643f, -0.926679f, -0.926715f, -0.926751f,
+ -0.926787f, -0.926823f, -0.926859f, -0.926895f, -0.926931f, -0.926967f, -0.927003f, -0.927039f,
+ -0.927075f, -0.927111f, -0.927147f, -0.927183f, -0.927219f, -0.927255f, -0.927291f, -0.927327f,
+ -0.927363f, -0.927398f, -0.927434f, -0.927470f, -0.927506f, -0.927542f, -0.927578f, -0.927613f,
+ -0.927649f, -0.927685f, -0.927721f, -0.927757f, -0.927792f, -0.927828f, -0.927864f, -0.927900f,
+ -0.927935f, -0.927971f, -0.928007f, -0.928043f, -0.928078f, -0.928114f, -0.928150f, -0.928185f,
+ -0.928221f, -0.928257f, -0.928292f, -0.928328f, -0.928364f, -0.928399f, -0.928435f, -0.928470f,
+ -0.928506f, -0.928542f, -0.928577f, -0.928613f, -0.928648f, -0.928684f, -0.928720f, -0.928755f,
+ -0.928791f, -0.928826f, -0.928862f, -0.928897f, -0.928933f, -0.928968f, -0.929004f, -0.929039f,
+ -0.929075f, -0.929110f, -0.929146f, -0.929181f, -0.929216f, -0.929252f, -0.929287f, -0.929323f,
+ -0.929358f, -0.929393f, -0.929429f, -0.929464f, -0.929500f, -0.929535f, -0.929570f, -0.929606f,
+ -0.929641f, -0.929676f, -0.929712f, -0.929747f, -0.929782f, -0.929817f, -0.929853f, -0.929888f,
+ -0.929923f, -0.929958f, -0.929994f, -0.930029f, -0.930064f, -0.930099f, -0.930135f, -0.930170f,
+ -0.930205f, -0.930240f, -0.930275f, -0.930311f, -0.930346f, -0.930381f, -0.930416f, -0.930451f,
+ -0.930486f, -0.930521f, -0.930556f, -0.930592f, -0.930627f, -0.930662f, -0.930697f, -0.930732f,
+ -0.930767f, -0.930802f, -0.930837f, -0.930872f, -0.930907f, -0.930942f, -0.930977f, -0.931012f,
+ -0.931047f, -0.931082f, -0.931117f, -0.931152f, -0.931187f, -0.931222f, -0.931257f, -0.931292f,
+ -0.931327f, -0.931362f, -0.931397f, -0.931431f, -0.931466f, -0.931501f, -0.931536f, -0.931571f,
+ -0.931606f, -0.931641f, -0.931675f, -0.931710f, -0.931745f, -0.931780f, -0.931815f, -0.931849f,
+ -0.931884f, -0.931919f, -0.931954f, -0.931989f, -0.932023f, -0.932058f, -0.932093f, -0.932128f,
+ -0.932162f, -0.932197f, -0.932232f, -0.932266f, -0.932301f, -0.932336f, -0.932370f, -0.932405f,
+ -0.932440f, -0.932474f, -0.932509f, -0.932544f, -0.932578f, -0.932613f, -0.932647f, -0.932682f,
+ -0.932716f, -0.932751f, -0.932786f, -0.932820f, -0.932855f, -0.932889f, -0.932924f, -0.932958f,
+ -0.932993f, -0.933027f, -0.933062f, -0.933096f, -0.933131f, -0.933165f, -0.933200f, -0.933234f,
+ -0.933269f, -0.933303f, -0.933337f, -0.933372f, -0.933406f, -0.933441f, -0.933475f, -0.933509f,
+ -0.933544f, -0.933578f, -0.933612f, -0.933647f, -0.933681f, -0.933716f, -0.933750f, -0.933784f,
+ -0.933818f, -0.933853f, -0.933887f, -0.933921f, -0.933956f, -0.933990f, -0.934024f, -0.934058f,
+ -0.934093f, -0.934127f, -0.934161f, -0.934195f, -0.934229f, -0.934264f, -0.934298f, -0.934332f,
+ -0.934366f, -0.934400f, -0.934434f, -0.934469f, -0.934503f, -0.934537f, -0.934571f, -0.934605f,
+ -0.934639f, -0.934673f, -0.934707f, -0.934741f, -0.934775f, -0.934810f, -0.934844f, -0.934878f,
+ -0.934912f, -0.934946f, -0.934980f, -0.935014f, -0.935048f, -0.935082f, -0.935116f, -0.935150f,
+ -0.935184f, -0.935217f, -0.935251f, -0.935285f, -0.935319f, -0.935353f, -0.935387f, -0.935421f,
+ -0.935455f, -0.935489f, -0.935523f, -0.935556f, -0.935590f, -0.935624f, -0.935658f, -0.935692f,
+ -0.935726f, -0.935759f, -0.935793f, -0.935827f, -0.935861f, -0.935895f, -0.935928f, -0.935962f,
+ -0.935996f, -0.936030f, -0.936063f, -0.936097f, -0.936131f, -0.936165f, -0.936198f, -0.936232f,
+ -0.936266f, -0.936299f, -0.936333f, -0.936367f, -0.936400f, -0.936434f, -0.936468f, -0.936501f,
+ -0.936535f, -0.936568f, -0.936602f, -0.936636f, -0.936669f, -0.936703f, -0.936736f, -0.936770f,
+ -0.936803f, -0.936837f, -0.936871f, -0.936904f, -0.936938f, -0.936971f, -0.937005f, -0.937038f,
+ -0.937072f, -0.937105f, -0.937138f, -0.937172f, -0.937205f, -0.937239f, -0.937272f, -0.937306f,
+ -0.937339f, -0.937372f, -0.937406f, -0.937439f, -0.937473f, -0.937506f, -0.937539f, -0.937573f,
+ -0.937606f, -0.937639f, -0.937673f, -0.937706f, -0.937739f, -0.937773f, -0.937806f, -0.937839f,
+ -0.937872f, -0.937906f, -0.937939f, -0.937972f, -0.938005f, -0.938039f, -0.938072f, -0.938105f,
+ -0.938138f, -0.938171f, -0.938205f, -0.938238f, -0.938271f, -0.938304f, -0.938337f, -0.938370f,
+ -0.938404f, -0.938437f, -0.938470f, -0.938503f, -0.938536f, -0.938569f, -0.938602f, -0.938635f,
+ -0.938668f, -0.938701f, -0.938734f, -0.938767f, -0.938800f, -0.938833f, -0.938866f, -0.938900f,
+ -0.938932f, -0.938965f, -0.938998f, -0.939031f, -0.939064f, -0.939097f, -0.939130f, -0.939163f,
+ -0.939196f, -0.939229f, -0.939262f, -0.939295f, -0.939328f, -0.939361f, -0.939394f, -0.939426f,
+ -0.939459f, -0.939492f, -0.939525f, -0.939558f, -0.939591f, -0.939623f, -0.939656f, -0.939689f,
+ -0.939722f, -0.939755f, -0.939787f, -0.939820f, -0.939853f, -0.939886f, -0.939918f, -0.939951f,
+ -0.939984f, -0.940016f, -0.940049f, -0.940082f, -0.940115f, -0.940147f, -0.940180f, -0.940213f,
+ -0.940245f, -0.940278f, -0.940310f, -0.940343f, -0.940376f, -0.940408f, -0.940441f, -0.940473f,
+ -0.940506f, -0.940539f, -0.940571f, -0.940604f, -0.940636f, -0.940669f, -0.940701f, -0.940734f,
+ -0.940766f, -0.940799f, -0.940831f, -0.940864f, -0.940896f, -0.940929f, -0.940961f, -0.940994f,
+ -0.941026f, -0.941059f, -0.941091f, -0.941123f, -0.941156f, -0.941188f, -0.941221f, -0.941253f,
+ -0.941285f, -0.941318f, -0.941350f, -0.941382f, -0.941415f, -0.941447f, -0.941479f, -0.941512f,
+ -0.941544f, -0.941576f, -0.941609f, -0.941641f, -0.941673f, -0.941705f, -0.941738f, -0.941770f,
+ -0.941802f, -0.941834f, -0.941867f, -0.941899f, -0.941931f, -0.941963f, -0.941995f, -0.942028f,
+ -0.942060f, -0.942092f, -0.942124f, -0.942156f, -0.942188f, -0.942220f, -0.942253f, -0.942285f,
+ -0.942317f, -0.942349f, -0.942381f, -0.942413f, -0.942445f, -0.942477f, -0.942509f, -0.942541f,
+ -0.942573f, -0.942605f, -0.942637f, -0.942669f, -0.942701f, -0.942733f, -0.942765f, -0.942797f,
+ -0.942829f, -0.942861f, -0.942893f, -0.942925f, -0.942957f, -0.942989f, -0.943021f, -0.943053f,
+ -0.943084f, -0.943116f, -0.943148f, -0.943180f, -0.943212f, -0.943244f, -0.943276f, -0.943307f,
+ -0.943339f, -0.943371f, -0.943403f, -0.943435f, -0.943466f, -0.943498f, -0.943530f, -0.943562f,
+ -0.943593f, -0.943625f, -0.943657f, -0.943689f, -0.943720f, -0.943752f, -0.943784f, -0.943815f,
+ -0.943847f, -0.943879f, -0.943910f, -0.943942f, -0.943974f, -0.944005f, -0.944037f, -0.944069f,
+ -0.944100f, -0.944132f, -0.944163f, -0.944195f, -0.944227f, -0.944258f, -0.944290f, -0.944321f,
+ -0.944353f, -0.944384f, -0.944416f, -0.944447f, -0.944479f, -0.944510f, -0.944542f, -0.944573f,
+ -0.944605f, -0.944636f, -0.944668f, -0.944699f, -0.944731f, -0.944762f, -0.944793f, -0.944825f,
+ -0.944856f, -0.944888f, -0.944919f, -0.944950f, -0.944982f, -0.945013f, -0.945045f, -0.945076f,
+ -0.945107f, -0.945139f, -0.945170f, -0.945201f, -0.945232f, -0.945264f, -0.945295f, -0.945326f,
+ -0.945358f, -0.945389f, -0.945420f, -0.945451f, -0.945482f, -0.945514f, -0.945545f, -0.945576f,
+ -0.945607f, -0.945639f, -0.945670f, -0.945701f, -0.945732f, -0.945763f, -0.945794f, -0.945825f,
+ -0.945857f, -0.945888f, -0.945919f, -0.945950f, -0.945981f, -0.946012f, -0.946043f, -0.946074f,
+ -0.946105f, -0.946136f, -0.946167f, -0.946198f, -0.946229f, -0.946260f, -0.946291f, -0.946322f,
+ -0.946353f, -0.946384f, -0.946415f, -0.946446f, -0.946477f, -0.946508f, -0.946539f, -0.946570f,
+ -0.946601f, -0.946632f, -0.946663f, -0.946694f, -0.946724f, -0.946755f, -0.946786f, -0.946817f,
+ -0.946848f, -0.946879f, -0.946910f, -0.946940f, -0.946971f, -0.947002f, -0.947033f, -0.947064f,
+ -0.947094f, -0.947125f, -0.947156f, -0.947187f, -0.947217f, -0.947248f, -0.947279f, -0.947310f,
+ -0.947340f, -0.947371f, -0.947402f, -0.947432f, -0.947463f, -0.947494f, -0.947524f, -0.947555f,
+ -0.947586f, -0.947616f, -0.947647f, -0.947677f, -0.947708f, -0.947739f, -0.947769f, -0.947800f,
+ -0.947830f, -0.947861f, -0.947891f, -0.947922f, -0.947953f, -0.947983f, -0.948014f, -0.948044f,
+ -0.948075f, -0.948105f, -0.948136f, -0.948166f, -0.948196f, -0.948227f, -0.948257f, -0.948288f,
+ -0.948318f, -0.948349f, -0.948379f, -0.948409f, -0.948440f, -0.948470f, -0.948501f, -0.948531f,
+ -0.948561f, -0.948592f, -0.948622f, -0.948652f, -0.948683f, -0.948713f, -0.948743f, -0.948774f,
+ -0.948804f, -0.948834f, -0.948864f, -0.948895f, -0.948925f, -0.948955f, -0.948985f, -0.949016f,
+ -0.949046f, -0.949076f, -0.949106f, -0.949136f, -0.949167f, -0.949197f, -0.949227f, -0.949257f,
+ -0.949287f, -0.949317f, -0.949348f, -0.949378f, -0.949408f, -0.949438f, -0.949468f, -0.949498f,
+ -0.949528f, -0.949558f, -0.949588f, -0.949618f, -0.949648f, -0.949678f, -0.949708f, -0.949739f,
+ -0.949768f, -0.949798f, -0.949829f, -0.949858f, -0.949888f, -0.949918f, -0.949948f, -0.949978f,
+ -0.950008f, -0.950038f, -0.950068f, -0.950098f, -0.950128f, -0.950158f, -0.950188f, -0.950218f,
+ -0.950247f, -0.950277f, -0.950307f, -0.950337f, -0.950367f, -0.950397f, -0.950426f, -0.950456f,
+ -0.950486f, -0.950516f, -0.950546f, -0.950575f, -0.950605f, -0.950635f, -0.950665f, -0.950694f,
+ -0.950724f, -0.950754f, -0.950784f, -0.950813f, -0.950843f, -0.950873f, -0.950902f, -0.950932f,
+ -0.950962f, -0.950991f, -0.951021f, -0.951051f, -0.951080f, -0.951110f, -0.951139f, -0.951169f,
+ -0.951199f, -0.951228f, -0.951258f, -0.951287f, -0.951317f, -0.951346f, -0.951376f, -0.951406f,
+ -0.951435f, -0.951465f, -0.951494f, -0.951524f, -0.951553f, -0.951582f, -0.951612f, -0.951641f,
+ -0.951671f, -0.951700f, -0.951730f, -0.951759f, -0.951789f, -0.951818f, -0.951847f, -0.951877f,
+ -0.951906f, -0.951936f, -0.951965f, -0.951994f, -0.952024f, -0.952053f, -0.952082f, -0.952112f,
+ -0.952141f, -0.952170f, -0.952199f, -0.952229f, -0.952258f, -0.952287f, -0.952317f, -0.952346f,
+ -0.952375f, -0.952404f, -0.952433f, -0.952463f, -0.952492f, -0.952521f, -0.952550f, -0.952579f,
+ -0.952609f, -0.952638f, -0.952667f, -0.952696f, -0.952725f, -0.952754f, -0.952783f, -0.952813f,
+ -0.952842f, -0.952871f, -0.952900f, -0.952929f, -0.952958f, -0.952987f, -0.953016f, -0.953045f,
+ -0.953074f, -0.953103f, -0.953132f, -0.953161f, -0.953190f, -0.953219f, -0.953248f, -0.953277f,
+ -0.953306f, -0.953335f, -0.953364f, -0.953393f, -0.953422f, -0.953451f, -0.953480f, -0.953508f,
+ -0.953537f, -0.953566f, -0.953595f, -0.953624f, -0.953653f, -0.953682f, -0.953711f, -0.953739f,
+ -0.953768f, -0.953797f, -0.953826f, -0.953855f, -0.953883f, -0.953912f, -0.953941f, -0.953970f,
+ -0.953998f, -0.954027f, -0.954056f, -0.954085f, -0.954113f, -0.954142f, -0.954171f, -0.954199f,
+ -0.954228f, -0.954257f, -0.954285f, -0.954314f, -0.954343f, -0.954371f, -0.954400f, -0.954429f,
+ -0.954457f, -0.954486f, -0.954514f, -0.954543f, -0.954572f, -0.954600f, -0.954629f, -0.954657f,
+ -0.954686f, -0.954714f, -0.954743f, -0.954771f, -0.954800f, -0.954828f, -0.954857f, -0.954885f,
+ -0.954914f, -0.954942f, -0.954971f, -0.954999f, -0.955028f, -0.955056f, -0.955084f, -0.955113f,
+ -0.955141f, -0.955170f, -0.955198f, -0.955226f, -0.955255f, -0.955283f, -0.955311f, -0.955340f,
+ -0.955368f, -0.955396f, -0.955425f, -0.955453f, -0.955481f, -0.955510f, -0.955538f, -0.955566f,
+ -0.955594f, -0.955623f, -0.955651f, -0.955679f, -0.955707f, -0.955736f, -0.955764f, -0.955792f,
+ -0.955820f, -0.955848f, -0.955876f, -0.955905f, -0.955933f, -0.955961f, -0.955989f, -0.956017f,
+ -0.956045f, -0.956073f, -0.956101f, -0.956130f, -0.956158f, -0.956186f, -0.956214f, -0.956242f,
+ -0.956270f, -0.956298f, -0.956326f, -0.956354f, -0.956382f, -0.956410f, -0.956438f, -0.956466f,
+ -0.956494f, -0.956522f, -0.956550f, -0.956578f, -0.956606f, -0.956634f, -0.956662f, -0.956689f,
+ -0.956717f, -0.956745f, -0.956773f, -0.956801f, -0.956829f, -0.956857f, -0.956885f, -0.956913f,
+ -0.956940f, -0.956968f, -0.956996f, -0.957024f, -0.957052f, -0.957079f, -0.957107f, -0.957135f,
+ -0.957163f, -0.957190f, -0.957218f, -0.957246f, -0.957274f, -0.957301f, -0.957329f, -0.957357f,
+ -0.957385f, -0.957412f, -0.957440f, -0.957468f, -0.957495f, -0.957523f, -0.957550f, -0.957578f,
+ -0.957606f, -0.957633f, -0.957661f, -0.957689f, -0.957716f, -0.957744f, -0.957771f, -0.957799f,
+ -0.957826f, -0.957854f, -0.957882f, -0.957909f, -0.957937f, -0.957964f, -0.957992f, -0.958019f,
+ -0.958046f, -0.958074f, -0.958101f, -0.958129f, -0.958156f, -0.958184f, -0.958211f, -0.958239f,
+ -0.958266f, -0.958293f, -0.958321f, -0.958348f, -0.958376f, -0.958403f, -0.958430f, -0.958458f,
+ -0.958485f, -0.958512f, -0.958540f, -0.958567f, -0.958594f, -0.958622f, -0.958649f, -0.958676f,
+ -0.958703f, -0.958731f, -0.958758f, -0.958785f, -0.958812f, -0.958840f, -0.958867f, -0.958894f,
+ -0.958921f, -0.958949f, -0.958976f, -0.959003f, -0.959030f, -0.959057f, -0.959084f, -0.959112f,
+ -0.959139f, -0.959166f, -0.959193f, -0.959220f, -0.959247f, -0.959274f, -0.959301f, -0.959328f,
+ -0.959355f, -0.959382f, -0.959409f, -0.959436f, -0.959463f, -0.959491f, -0.959518f, -0.959545f,
+ -0.959572f, -0.959598f, -0.959625f, -0.959652f, -0.959679f, -0.959706f, -0.959733f, -0.959760f,
+ -0.959787f, -0.959814f, -0.959841f, -0.959868f, -0.959895f, -0.959922f, -0.959948f, -0.959975f,
+ -0.960002f, -0.960029f, -0.960056f, -0.960083f, -0.960109f, -0.960136f, -0.960163f, -0.960190f,
+ -0.960217f, -0.960243f, -0.960270f, -0.960297f, -0.960324f, -0.960350f, -0.960377f, -0.960404f,
+ -0.960431f, -0.960457f, -0.960484f, -0.960511f, -0.960537f, -0.960564f, -0.960591f, -0.960617f,
+ -0.960644f, -0.960670f, -0.960697f, -0.960724f, -0.960750f, -0.960777f, -0.960804f, -0.960830f,
+ -0.960857f, -0.960883f, -0.960910f, -0.960936f, -0.960963f, -0.960989f, -0.961016f, -0.961042f,
+ -0.961069f, -0.961095f, -0.961122f, -0.961148f, -0.961175f, -0.961201f, -0.961228f, -0.961254f,
+ -0.961280f, -0.961307f, -0.961333f, -0.961360f, -0.961386f, -0.961412f, -0.961439f, -0.961465f,
+ -0.961492f, -0.961518f, -0.961544f, -0.961571f, -0.961597f, -0.961623f, -0.961649f, -0.961676f,
+ -0.961702f, -0.961728f, -0.961755f, -0.961781f, -0.961807f, -0.961833f, -0.961860f, -0.961886f,
+ -0.961912f, -0.961938f, -0.961964f, -0.961991f, -0.962017f, -0.962043f, -0.962069f, -0.962095f,
+ -0.962121f, -0.962148f, -0.962174f, -0.962200f, -0.962226f, -0.962252f, -0.962278f, -0.962304f,
+ -0.962330f, -0.962356f, -0.962382f, -0.962408f, -0.962434f, -0.962460f, -0.962486f, -0.962512f,
+ -0.962538f, -0.962564f, -0.962590f, -0.962616f, -0.962642f, -0.962668f, -0.962694f, -0.962720f,
+ -0.962746f, -0.962772f, -0.962798f, -0.962824f, -0.962850f, -0.962876f, -0.962902f, -0.962927f,
+ -0.962953f, -0.962979f, -0.963005f, -0.963031f, -0.963057f, -0.963082f, -0.963108f, -0.963134f,
+ -0.963160f, -0.963186f, -0.963211f, -0.963237f, -0.963263f, -0.963289f, -0.963314f, -0.963340f,
+ -0.963366f, -0.963391f, -0.963417f, -0.963443f, -0.963469f, -0.963494f, -0.963520f, -0.963546f,
+ -0.963571f, -0.963597f, -0.963623f, -0.963648f, -0.963674f, -0.963699f, -0.963725f, -0.963750f,
+ -0.963776f, -0.963802f, -0.963827f, -0.963853f, -0.963878f, -0.963904f, -0.963929f, -0.963955f,
+ -0.963980f, -0.964006f, -0.964031f, -0.964057f, -0.964082f, -0.964108f, -0.964133f, -0.964159f,
+ -0.964184f, -0.964209f, -0.964235f, -0.964260f, -0.964286f, -0.964311f, -0.964336f, -0.964362f,
+ -0.964387f, -0.964413f, -0.964438f, -0.964463f, -0.964489f, -0.964514f, -0.964539f, -0.964565f,
+ -0.964590f, -0.964615f, -0.964640f, -0.964666f, -0.964691f, -0.964716f, -0.964741f, -0.964767f,
+ -0.964792f, -0.964817f, -0.964842f, -0.964867f, -0.964893f, -0.964918f, -0.964943f, -0.964968f,
+ -0.964993f, -0.965018f, -0.965044f, -0.965069f, -0.965094f, -0.965119f, -0.965144f, -0.965169f,
+ -0.965194f, -0.965219f, -0.965244f, -0.965269f, -0.965294f, -0.965319f, -0.965344f, -0.965369f,
+ -0.965394f, -0.965419f, -0.965444f, -0.965469f, -0.965494f, -0.965519f, -0.965544f, -0.965569f,
+ -0.965594f, -0.965619f, -0.965644f, -0.965669f, -0.965694f, -0.965719f, -0.965744f, -0.965769f,
+ -0.965793f, -0.965818f, -0.965843f, -0.965868f, -0.965893f, -0.965918f, -0.965942f, -0.965967f,
+ -0.965992f, -0.966017f, -0.966042f, -0.966066f, -0.966091f, -0.966116f, -0.966141f, -0.966165f,
+ -0.966190f, -0.966215f, -0.966239f, -0.966264f, -0.966289f, -0.966313f, -0.966338f, -0.966363f,
+ -0.966387f, -0.966412f, -0.966437f, -0.966461f, -0.966486f, -0.966511f, -0.966535f, -0.966560f,
+ -0.966584f, -0.966609f, -0.966633f, -0.966658f, -0.966683f, -0.966707f, -0.966732f, -0.966756f,
+ -0.966781f, -0.966805f, -0.966830f, -0.966854f, -0.966879f, -0.966903f, -0.966928f, -0.966952f,
+ -0.966976f, -0.967001f, -0.967025f, -0.967050f, -0.967074f, -0.967099f, -0.967123f, -0.967147f,
+ -0.967172f, -0.967196f, -0.967220f, -0.967245f, -0.967269f, -0.967293f, -0.967318f, -0.967342f,
+ -0.967366f, -0.967391f, -0.967415f, -0.967439f, -0.967463f, -0.967488f, -0.967512f, -0.967536f,
+ -0.967560f, -0.967585f, -0.967609f, -0.967633f, -0.967657f, -0.967681f, -0.967706f, -0.967730f,
+ -0.967754f, -0.967778f, -0.967802f, -0.967826f, -0.967850f, -0.967874f, -0.967899f, -0.967923f,
+ -0.967947f, -0.967971f, -0.967995f, -0.968019f, -0.968043f, -0.968067f, -0.968091f, -0.968115f,
+ -0.968139f, -0.968163f, -0.968187f, -0.968211f, -0.968235f, -0.968259f, -0.968283f, -0.968307f,
+ -0.968331f, -0.968355f, -0.968379f, -0.968403f, -0.968427f, -0.968450f, -0.968474f, -0.968498f,
+ -0.968522f, -0.968546f, -0.968570f, -0.968594f, -0.968617f, -0.968641f, -0.968665f, -0.968689f,
+ -0.968713f, -0.968737f, -0.968760f, -0.968784f, -0.968808f, -0.968832f, -0.968855f, -0.968879f,
+ -0.968903f, -0.968927f, -0.968950f, -0.968974f, -0.968998f, -0.969021f, -0.969045f, -0.969069f,
+ -0.969092f, -0.969116f, -0.969140f, -0.969163f, -0.969187f, -0.969210f, -0.969234f, -0.969258f,
+ -0.969281f, -0.969305f, -0.969328f, -0.969352f, -0.969375f, -0.969399f, -0.969423f, -0.969446f,
+ -0.969470f, -0.969493f, -0.969517f, -0.969540f, -0.969564f, -0.969587f, -0.969611f, -0.969634f,
+ -0.969657f, -0.969681f, -0.969704f, -0.969728f, -0.969751f, -0.969774f, -0.969798f, -0.969821f,
+ -0.969845f, -0.969868f, -0.969891f, -0.969915f, -0.969938f, -0.969961f, -0.969985f, -0.970008f,
+ -0.970031f, -0.970055f, -0.970078f, -0.970101f, -0.970124f, -0.970148f, -0.970171f, -0.970194f,
+ -0.970217f, -0.970241f, -0.970264f, -0.970287f, -0.970310f, -0.970333f, -0.970357f, -0.970380f,
+ -0.970403f, -0.970426f, -0.970449f, -0.970472f, -0.970495f, -0.970518f, -0.970542f, -0.970565f,
+ -0.970588f, -0.970611f, -0.970634f, -0.970657f, -0.970680f, -0.970703f, -0.970726f, -0.970749f,
+ -0.970772f, -0.970795f, -0.970818f, -0.970841f, -0.970864f, -0.970887f, -0.970910f, -0.970933f,
+ -0.970956f, -0.970979f, -0.971002f, -0.971025f, -0.971048f, -0.971071f, -0.971093f, -0.971116f,
+ -0.971139f, -0.971162f, -0.971185f, -0.971208f, -0.971231f, -0.971253f, -0.971276f, -0.971299f,
+ -0.971322f, -0.971345f, -0.971367f, -0.971390f, -0.971413f, -0.971436f, -0.971458f, -0.971481f,
+ -0.971504f, -0.971527f, -0.971549f, -0.971572f, -0.971595f, -0.971617f, -0.971640f, -0.971663f,
+ -0.971685f, -0.971708f, -0.971731f, -0.971753f, -0.971776f, -0.971799f, -0.971821f, -0.971844f,
+ -0.971866f, -0.971889f, -0.971911f, -0.971934f, -0.971957f, -0.971979f, -0.972002f, -0.972024f,
+ -0.972047f, -0.972069f, -0.972092f, -0.972114f, -0.972137f, -0.972159f, -0.972182f, -0.972204f,
+ -0.972227f, -0.972249f, -0.972271f, -0.972294f, -0.972316f, -0.972339f, -0.972361f, -0.972383f,
+ -0.972406f, -0.972428f, -0.972450f, -0.972473f, -0.972495f, -0.972517f, -0.972540f, -0.972562f,
+ -0.972584f, -0.972607f, -0.972629f, -0.972651f, -0.972673f, -0.972696f, -0.972718f, -0.972740f,
+ -0.972762f, -0.972785f, -0.972807f, -0.972829f, -0.972851f, -0.972873f, -0.972896f, -0.972918f,
+ -0.972940f, -0.972962f, -0.972984f, -0.973006f, -0.973028f, -0.973051f, -0.973073f, -0.973095f,
+ -0.973117f, -0.973139f, -0.973161f, -0.973183f, -0.973205f, -0.973227f, -0.973249f, -0.973271f,
+ -0.973293f, -0.973315f, -0.973337f, -0.973359f, -0.973381f, -0.973403f, -0.973425f, -0.973447f,
+ -0.973469f, -0.973491f, -0.973513f, -0.973535f, -0.973557f, -0.973579f, -0.973601f, -0.973622f,
+ -0.973644f, -0.973666f, -0.973688f, -0.973710f, -0.973732f, -0.973753f, -0.973775f, -0.973797f,
+ -0.973819f, -0.973841f, -0.973862f, -0.973884f, -0.973906f, -0.973928f, -0.973949f, -0.973971f,
+ -0.973993f, -0.974015f, -0.974036f, -0.974058f, -0.974080f, -0.974101f, -0.974123f, -0.974145f,
+ -0.974166f, -0.974188f, -0.974210f, -0.974231f, -0.974253f, -0.974275f, -0.974296f, -0.974318f,
+ -0.974339f, -0.974361f, -0.974383f, -0.974404f, -0.974426f, -0.974447f, -0.974469f, -0.974490f,
+ -0.974512f, -0.974533f, -0.974555f, -0.974576f, -0.974598f, -0.974619f, -0.974641f, -0.974662f,
+ -0.974684f, -0.974705f, -0.974726f, -0.974748f, -0.974769f, -0.974791f, -0.974812f, -0.974833f,
+ -0.974855f, -0.974876f, -0.974897f, -0.974919f, -0.974940f, -0.974961f, -0.974983f, -0.975004f,
+ -0.975025f, -0.975047f, -0.975068f, -0.975089f, -0.975110f, -0.975132f, -0.975153f, -0.975174f,
+ -0.975195f, -0.975217f, -0.975238f, -0.975259f, -0.975280f, -0.975301f, -0.975323f, -0.975344f,
+ -0.975365f, -0.975386f, -0.975407f, -0.975428f, -0.975449f, -0.975471f, -0.975492f, -0.975513f,
+ -0.975534f, -0.975555f, -0.975576f, -0.975597f, -0.975618f, -0.975639f, -0.975660f, -0.975681f,
+ -0.975702f, -0.975723f, -0.975744f, -0.975765f, -0.975786f, -0.975807f, -0.975828f, -0.975849f,
+ -0.975870f, -0.975891f, -0.975912f, -0.975933f, -0.975954f, -0.975974f, -0.975995f, -0.976016f,
+ -0.976037f, -0.976058f, -0.976079f, -0.976100f, -0.976120f, -0.976141f, -0.976162f, -0.976183f,
+ -0.976204f, -0.976224f, -0.976245f, -0.976266f, -0.976287f, -0.976308f, -0.976328f, -0.976349f,
+ -0.976370f, -0.976390f, -0.976411f, -0.976432f, -0.976453f, -0.976473f, -0.976494f, -0.976515f,
+ -0.976535f, -0.976556f, -0.976576f, -0.976597f, -0.976618f, -0.976638f, -0.976659f, -0.976680f,
+ -0.976700f, -0.976721f, -0.976741f, -0.976762f, -0.976782f, -0.976803f, -0.976823f, -0.976844f,
+ -0.976864f, -0.976885f, -0.976905f, -0.976926f, -0.976946f, -0.976967f, -0.976987f, -0.977008f,
+ -0.977028f, -0.977049f, -0.977069f, -0.977089f, -0.977110f, -0.977130f, -0.977151f, -0.977171f,
+ -0.977191f, -0.977212f, -0.977232f, -0.977252f, -0.977273f, -0.977293f, -0.977313f, -0.977334f,
+ -0.977354f, -0.977374f, -0.977394f, -0.977415f, -0.977435f, -0.977455f, -0.977475f, -0.977496f,
+ -0.977516f, -0.977536f, -0.977556f, -0.977577f, -0.977597f, -0.977617f, -0.977637f, -0.977657f,
+ -0.977677f, -0.977697f, -0.977718f, -0.977738f, -0.977758f, -0.977778f, -0.977798f, -0.977818f,
+ -0.977838f, -0.977858f, -0.977878f, -0.977898f, -0.977918f, -0.977938f, -0.977959f, -0.977979f,
+ -0.977998f, -0.978019f, -0.978038f, -0.978058f, -0.978078f, -0.978098f, -0.978118f, -0.978138f,
+ -0.978158f, -0.978178f, -0.978198f, -0.978218f, -0.978238f, -0.978258f, -0.978278f, -0.978298f,
+ -0.978317f, -0.978337f, -0.978357f, -0.978377f, -0.978397f, -0.978417f, -0.978436f, -0.978456f,
+ -0.978476f, -0.978496f, -0.978516f, -0.978535f, -0.978555f, -0.978575f, -0.978594f, -0.978614f,
+ -0.978634f, -0.978654f, -0.978673f, -0.978693f, -0.978713f, -0.978732f, -0.978752f, -0.978772f,
+ -0.978791f, -0.978811f, -0.978831f, -0.978850f, -0.978870f, -0.978889f, -0.978909f, -0.978929f,
+ -0.978948f, -0.978968f, -0.978987f, -0.979007f, -0.979026f, -0.979046f, -0.979065f, -0.979085f,
+ -0.979104f, -0.979124f, -0.979143f, -0.979163f, -0.979182f, -0.979202f, -0.979221f, -0.979241f,
+ -0.979260f, -0.979280f, -0.979299f, -0.979318f, -0.979338f, -0.979357f, -0.979376f, -0.979396f,
+ -0.979415f, -0.979435f, -0.979454f, -0.979473f, -0.979493f, -0.979512f, -0.979531f, -0.979550f,
+ -0.979570f, -0.979589f, -0.979608f, -0.979628f, -0.979647f, -0.979666f, -0.979685f, -0.979704f,
+ -0.979724f, -0.979743f, -0.979762f, -0.979781f, -0.979800f, -0.979820f, -0.979839f, -0.979858f,
+ -0.979877f, -0.979896f, -0.979915f, -0.979934f, -0.979954f, -0.979973f, -0.979992f, -0.980011f,
+ -0.980030f, -0.980049f, -0.980068f, -0.980087f, -0.980106f, -0.980125f, -0.980144f, -0.980163f,
+ -0.980182f, -0.980201f, -0.980220f, -0.980239f, -0.980258f, -0.980277f, -0.980296f, -0.980315f,
+ -0.980334f, -0.980353f, -0.980372f, -0.980390f, -0.980409f, -0.980428f, -0.980447f, -0.980466f,
+ -0.980485f, -0.980504f, -0.980523f, -0.980541f, -0.980560f, -0.980579f, -0.980598f, -0.980617f,
+ -0.980635f, -0.980654f, -0.980673f, -0.980692f, -0.980710f, -0.980729f, -0.980748f, -0.980767f,
+ -0.980785f, -0.980804f, -0.980823f, -0.980841f, -0.980860f, -0.980879f, -0.980897f, -0.980916f,
+ -0.980935f, -0.980953f, -0.980972f, -0.980990f, -0.981009f, -0.981028f, -0.981046f, -0.981065f,
+ -0.981083f, -0.981102f, -0.981120f, -0.981139f, -0.981158f, -0.981176f, -0.981195f, -0.981213f,
+ -0.981232f, -0.981250f, -0.981269f, -0.981287f, -0.981305f, -0.981324f, -0.981342f, -0.981361f,
+ -0.981379f, -0.981398f, -0.981416f, -0.981434f, -0.981453f, -0.981471f, -0.981490f, -0.981508f,
+ -0.981526f, -0.981545f, -0.981563f, -0.981581f, -0.981600f, -0.981618f, -0.981636f, -0.981654f,
+ -0.981673f, -0.981691f, -0.981709f, -0.981727f, -0.981746f, -0.981764f, -0.981782f, -0.981800f,
+ -0.981819f, -0.981837f, -0.981855f, -0.981873f, -0.981891f, -0.981909f, -0.981928f, -0.981946f,
+ -0.981964f, -0.981982f, -0.982000f, -0.982018f, -0.982036f, -0.982054f, -0.982072f, -0.982091f,
+ -0.982109f, -0.982127f, -0.982145f, -0.982163f, -0.982181f, -0.982199f, -0.982217f, -0.982235f,
+ -0.982253f, -0.982271f, -0.982289f, -0.982307f, -0.982325f, -0.982343f, -0.982360f, -0.982378f,
+ -0.982396f, -0.982414f, -0.982432f, -0.982450f, -0.982468f, -0.982486f, -0.982504f, -0.982521f,
+ -0.982539f, -0.982557f, -0.982575f, -0.982593f, -0.982611f, -0.982628f, -0.982646f, -0.982664f,
+ -0.982682f, -0.982699f, -0.982717f, -0.982735f, -0.982753f, -0.982770f, -0.982788f, -0.982806f,
+ -0.982824f, -0.982841f, -0.982859f, -0.982877f, -0.982894f, -0.982912f, -0.982930f, -0.982947f,
+ -0.982965f, -0.982982f, -0.983000f, -0.983018f, -0.983035f, -0.983053f, -0.983070f, -0.983088f,
+ -0.983105f, -0.983123f, -0.983141f, -0.983158f, -0.983176f, -0.983193f, -0.983211f, -0.983228f,
+ -0.983246f, -0.983263f, -0.983281f, -0.983298f, -0.983315f, -0.983333f, -0.983350f, -0.983368f,
+ -0.983385f, -0.983402f, -0.983420f, -0.983437f, -0.983455f, -0.983472f, -0.983489f, -0.983507f,
+ -0.983524f, -0.983541f, -0.983559f, -0.983576f, -0.983593f, -0.983611f, -0.983628f, -0.983645f,
+ -0.983662f, -0.983680f, -0.983697f, -0.983714f, -0.983731f, -0.983749f, -0.983766f, -0.983783f,
+ -0.983800f, -0.983817f, -0.983835f, -0.983852f, -0.983869f, -0.983886f, -0.983903f, -0.983920f,
+ -0.983937f, -0.983955f, -0.983972f, -0.983989f, -0.984006f, -0.984023f, -0.984040f, -0.984057f,
+ -0.984074f, -0.984091f, -0.984108f, -0.984125f, -0.984142f, -0.984159f, -0.984176f, -0.984193f,
+ -0.984210f, -0.984227f, -0.984244f, -0.984261f, -0.984278f, -0.984295f, -0.984312f, -0.984329f,
+ -0.984346f, -0.984362f, -0.984379f, -0.984396f, -0.984413f, -0.984430f, -0.984447f, -0.984464f,
+ -0.984480f, -0.984497f, -0.984514f, -0.984531f, -0.984548f, -0.984564f, -0.984581f, -0.984598f,
+ -0.984615f, -0.984632f, -0.984648f, -0.984665f, -0.984682f, -0.984698f, -0.984715f, -0.984732f,
+ -0.984748f, -0.984765f, -0.984782f, -0.984798f, -0.984815f, -0.984832f, -0.984848f, -0.984865f,
+ -0.984882f, -0.984898f, -0.984915f, -0.984931f, -0.984948f, -0.984965f, -0.984981f, -0.984998f,
+ -0.985014f, -0.985031f, -0.985047f, -0.985064f, -0.985080f, -0.985097f, -0.985113f, -0.985130f,
+ -0.985146f, -0.985163f, -0.985179f, -0.985196f, -0.985212f, -0.985228f, -0.985245f, -0.985261f,
+ -0.985278f, -0.985294f, -0.985310f, -0.985327f, -0.985343f, -0.985359f, -0.985376f, -0.985392f,
+ -0.985408f, -0.985425f, -0.985441f, -0.985457f, -0.985474f, -0.985490f, -0.985506f, -0.985523f,
+ -0.985539f, -0.985555f, -0.985571f, -0.985587f, -0.985604f, -0.985620f, -0.985636f, -0.985652f,
+ -0.985668f, -0.985685f, -0.985701f, -0.985717f, -0.985733f, -0.985749f, -0.985765f, -0.985781f,
+ -0.985798f, -0.985814f, -0.985830f, -0.985846f, -0.985862f, -0.985878f, -0.985894f, -0.985910f,
+ -0.985926f, -0.985942f, -0.985958f, -0.985974f, -0.985990f, -0.986006f, -0.986022f, -0.986038f,
+ -0.986054f, -0.986070f, -0.986086f, -0.986102f, -0.986118f, -0.986134f, -0.986150f, -0.986165f,
+ -0.986181f, -0.986197f, -0.986213f, -0.986229f, -0.986245f, -0.986261f, -0.986276f, -0.986292f,
+ -0.986308f, -0.986324f, -0.986340f, -0.986355f, -0.986371f, -0.986387f, -0.986403f, -0.986419f,
+ -0.986434f, -0.986450f, -0.986466f, -0.986481f, -0.986497f, -0.986513f, -0.986529f, -0.986544f,
+ -0.986560f, -0.986576f, -0.986591f, -0.986607f, -0.986623f, -0.986638f, -0.986654f, -0.986669f,
+ -0.986685f, -0.986701f, -0.986716f, -0.986732f, -0.986747f, -0.986763f, -0.986778f, -0.986794f,
+ -0.986809f, -0.986825f, -0.986840f, -0.986856f, -0.986871f, -0.986887f, -0.986902f, -0.986918f,
+ -0.986933f, -0.986949f, -0.986964f, -0.986980f, -0.986995f, -0.987010f, -0.987026f, -0.987041f,
+ -0.987057f, -0.987072f, -0.987087f, -0.987103f, -0.987118f, -0.987133f, -0.987149f, -0.987164f,
+ -0.987179f, -0.987195f, -0.987210f, -0.987225f, -0.987240f, -0.987256f, -0.987271f, -0.987286f,
+ -0.987301f, -0.987317f, -0.987332f, -0.987347f, -0.987362f, -0.987377f, -0.987393f, -0.987408f,
+ -0.987423f, -0.987438f, -0.987453f, -0.987468f, -0.987484f, -0.987499f, -0.987514f, -0.987529f,
+ -0.987544f, -0.987559f, -0.987574f, -0.987589f, -0.987604f, -0.987619f, -0.987634f, -0.987649f,
+ -0.987664f, -0.987679f, -0.987694f, -0.987709f, -0.987724f, -0.987739f, -0.987754f, -0.987769f,
+ -0.987784f, -0.987799f, -0.987814f, -0.987829f, -0.987844f, -0.987859f, -0.987874f, -0.987889f,
+ -0.987903f, -0.987918f, -0.987933f, -0.987948f, -0.987963f, -0.987978f, -0.987992f, -0.988007f,
+ -0.988022f, -0.988037f, -0.988052f, -0.988066f, -0.988081f, -0.988096f, -0.988111f, -0.988125f,
+ -0.988140f, -0.988155f, -0.988169f, -0.988184f, -0.988199f, -0.988214f, -0.988228f, -0.988243f,
+ -0.988258f, -0.988272f, -0.988287f, -0.988301f, -0.988316f, -0.988331f, -0.988345f, -0.988360f,
+ -0.988374f, -0.988389f, -0.988404f, -0.988418f, -0.988433f, -0.988447f, -0.988462f, -0.988476f,
+ -0.988491f, -0.988505f, -0.988520f, -0.988534f, -0.988549f, -0.988563f, -0.988578f, -0.988592f,
+ -0.988607f, -0.988621f, -0.988635f, -0.988650f, -0.988664f, -0.988679f, -0.988693f, -0.988707f,
+ -0.988722f, -0.988736f, -0.988750f, -0.988765f, -0.988779f, -0.988793f, -0.988808f, -0.988822f,
+ -0.988836f, -0.988851f, -0.988865f, -0.988879f, -0.988893f, -0.988908f, -0.988922f, -0.988936f,
+ -0.988950f, -0.988964f, -0.988979f, -0.988993f, -0.989007f, -0.989021f, -0.989035f, -0.989050f,
+ -0.989064f, -0.989078f, -0.989092f, -0.989106f, -0.989120f, -0.989134f, -0.989148f, -0.989162f,
+ -0.989177f, -0.989191f, -0.989205f, -0.989219f, -0.989233f, -0.989247f, -0.989261f, -0.989275f,
+ -0.989289f, -0.989303f, -0.989317f, -0.989331f, -0.989345f, -0.989359f, -0.989373f, -0.989386f,
+ -0.989400f, -0.989414f, -0.989428f, -0.989442f, -0.989456f, -0.989470f, -0.989484f, -0.989498f,
+ -0.989511f, -0.989525f, -0.989539f, -0.989553f, -0.989567f, -0.989581f, -0.989594f, -0.989608f,
+ -0.989622f, -0.989636f, -0.989650f, -0.989663f, -0.989677f, -0.989691f, -0.989704f, -0.989718f,
+ -0.989732f, -0.989746f, -0.989759f, -0.989773f, -0.989787f, -0.989800f, -0.989814f, -0.989828f,
+ -0.989841f, -0.989855f, -0.989869f, -0.989882f, -0.989896f, -0.989909f, -0.989923f, -0.989936f,
+ -0.989950f, -0.989964f, -0.989977f, -0.989991f, -0.990004f, -0.990018f, -0.990031f, -0.990045f,
+ -0.990058f, -0.990072f, -0.990085f, -0.990099f, -0.990112f, -0.990126f, -0.990139f, -0.990152f,
+ -0.990166f, -0.990179f, -0.990193f, -0.990206f, -0.990219f, -0.990233f, -0.990246f, -0.990259f,
+ -0.990273f, -0.990286f, -0.990299f, -0.990313f, -0.990326f, -0.990339f, -0.990353f, -0.990366f,
+ -0.990379f, -0.990393f, -0.990406f, -0.990419f, -0.990432f, -0.990445f, -0.990459f, -0.990472f,
+ -0.990485f, -0.990498f, -0.990511f, -0.990525f, -0.990538f, -0.990551f, -0.990564f, -0.990577f,
+ -0.990590f, -0.990603f, -0.990617f, -0.990630f, -0.990643f, -0.990656f, -0.990669f, -0.990682f,
+ -0.990695f, -0.990708f, -0.990721f, -0.990734f, -0.990747f, -0.990760f, -0.990773f, -0.990786f,
+ -0.990799f, -0.990812f, -0.990825f, -0.990838f, -0.990851f, -0.990864f, -0.990877f, -0.990890f,
+ -0.990903f, -0.990916f, -0.990928f, -0.990941f, -0.990954f, -0.990967f, -0.990980f, -0.990993f,
+ -0.991006f, -0.991018f, -0.991031f, -0.991044f, -0.991057f, -0.991070f, -0.991082f, -0.991095f,
+ -0.991108f, -0.991121f, -0.991133f, -0.991146f, -0.991159f, -0.991172f, -0.991184f, -0.991197f,
+ -0.991210f, -0.991222f, -0.991235f, -0.991248f, -0.991260f, -0.991273f, -0.991286f, -0.991298f,
+ -0.991311f, -0.991323f, -0.991336f, -0.991349f, -0.991361f, -0.991374f, -0.991386f, -0.991399f,
+ -0.991411f, -0.991424f, -0.991437f, -0.991449f, -0.991462f, -0.991474f, -0.991487f, -0.991499f,
+ -0.991511f, -0.991524f, -0.991536f, -0.991549f, -0.991561f, -0.991574f, -0.991586f, -0.991598f,
+ -0.991611f, -0.991623f, -0.991636f, -0.991648f, -0.991660f, -0.991673f, -0.991685f, -0.991697f,
+ -0.991710f, -0.991722f, -0.991734f, -0.991747f, -0.991759f, -0.991771f, -0.991783f, -0.991796f,
+ -0.991808f, -0.991820f, -0.991832f, -0.991845f, -0.991857f, -0.991869f, -0.991881f, -0.991894f,
+ -0.991906f, -0.991918f, -0.991930f, -0.991942f, -0.991954f, -0.991966f, -0.991979f, -0.991991f,
+ -0.992003f, -0.992015f, -0.992027f, -0.992039f, -0.992051f, -0.992063f, -0.992075f, -0.992087f,
+ -0.992099f, -0.992111f, -0.992123f, -0.992135f, -0.992147f, -0.992159f, -0.992171f, -0.992183f,
+ -0.992195f, -0.992207f, -0.992219f, -0.992231f, -0.992243f, -0.992255f, -0.992267f, -0.992279f,
+ -0.992291f, -0.992302f, -0.992314f, -0.992326f, -0.992338f, -0.992350f, -0.992362f, -0.992374f,
+ -0.992385f, -0.992397f, -0.992409f, -0.992421f, -0.992433f, -0.992444f, -0.992456f, -0.992468f,
+ -0.992480f, -0.992491f, -0.992503f, -0.992515f, -0.992526f, -0.992538f, -0.992550f, -0.992561f,
+ -0.992573f, -0.992585f, -0.992596f, -0.992608f, -0.992620f, -0.992631f, -0.992643f, -0.992655f,
+ -0.992666f, -0.992678f, -0.992689f, -0.992701f, -0.992712f, -0.992724f, -0.992736f, -0.992747f,
+ -0.992759f, -0.992770f, -0.992782f, -0.992793f, -0.992805f, -0.992816f, -0.992828f, -0.992839f,
+ -0.992850f, -0.992862f, -0.992873f, -0.992885f, -0.992896f, -0.992908f, -0.992919f, -0.992930f,
+ -0.992942f, -0.992953f, -0.992964f, -0.992976f, -0.992987f, -0.992998f, -0.993010f, -0.993021f,
+ -0.993032f, -0.993044f, -0.993055f, -0.993066f, -0.993077f, -0.993089f, -0.993100f, -0.993111f,
+ -0.993122f, -0.993134f, -0.993145f, -0.993156f, -0.993167f, -0.993178f, -0.993190f, -0.993201f,
+ -0.993212f, -0.993223f, -0.993234f, -0.993245f, -0.993257f, -0.993268f, -0.993279f, -0.993290f,
+ -0.993301f, -0.993312f, -0.993323f, -0.993334f, -0.993345f, -0.993356f, -0.993367f, -0.993378f,
+ -0.993389f, -0.993400f, -0.993411f, -0.993422f, -0.993433f, -0.993444f, -0.993455f, -0.993466f,
+ -0.993477f, -0.993488f, -0.993499f, -0.993510f, -0.993521f, -0.993532f, -0.993542f, -0.993553f,
+ -0.993564f, -0.993575f, -0.993586f, -0.993597f, -0.993608f, -0.993618f, -0.993629f, -0.993640f,
+ -0.993651f, -0.993662f, -0.993672f, -0.993683f, -0.993694f, -0.993705f, -0.993715f, -0.993726f,
+ -0.993737f, -0.993747f, -0.993758f, -0.993769f, -0.993779f, -0.993790f, -0.993801f, -0.993811f,
+ -0.993822f, -0.993833f, -0.993843f, -0.993854f, -0.993865f, -0.993875f, -0.993886f, -0.993896f,
+ -0.993907f, -0.993918f, -0.993928f, -0.993939f, -0.993949f, -0.993960f, -0.993970f, -0.993981f,
+ -0.993991f, -0.994002f, -0.994012f, -0.994023f, -0.994033f, -0.994044f, -0.994054f, -0.994064f,
+ -0.994075f, -0.994085f, -0.994096f, -0.994106f, -0.994116f, -0.994127f, -0.994137f, -0.994148f,
+ -0.994158f, -0.994168f, -0.994179f, -0.994189f, -0.994199f, -0.994210f, -0.994220f, -0.994230f,
+ -0.994240f, -0.994251f, -0.994261f, -0.994271f, -0.994281f, -0.994292f, -0.994302f, -0.994312f,
+ -0.994322f, -0.994333f, -0.994343f, -0.994353f, -0.994363f, -0.994373f, -0.994383f, -0.994394f,
+ -0.994404f, -0.994414f, -0.994424f, -0.994434f, -0.994444f, -0.994454f, -0.994464f, -0.994474f,
+ -0.994484f, -0.994494f, -0.994505f, -0.994515f, -0.994525f, -0.994535f, -0.994545f, -0.994555f,
+ -0.994565f, -0.994575f, -0.994585f, -0.994594f, -0.994604f, -0.994614f, -0.994624f, -0.994634f,
+ -0.994644f, -0.994654f, -0.994664f, -0.994674f, -0.994684f, -0.994694f, -0.994703f, -0.994713f,
+ -0.994723f, -0.994733f, -0.994743f, -0.994753f, -0.994762f, -0.994772f, -0.994782f, -0.994792f,
+ -0.994802f, -0.994811f, -0.994821f, -0.994831f, -0.994841f, -0.994850f, -0.994860f, -0.994870f,
+ -0.994879f, -0.994889f, -0.994899f, -0.994908f, -0.994918f, -0.994928f, -0.994937f, -0.994947f,
+ -0.994957f, -0.994966f, -0.994976f, -0.994985f, -0.994995f, -0.995005f, -0.995014f, -0.995024f,
+ -0.995033f, -0.995043f, -0.995052f, -0.995062f, -0.995071f, -0.995081f, -0.995090f, -0.995100f,
+ -0.995109f, -0.995119f, -0.995128f, -0.995138f, -0.995147f, -0.995156f, -0.995166f, -0.995175f,
+ -0.995185f, -0.995194f, -0.995203f, -0.995213f, -0.995222f, -0.995232f, -0.995241f, -0.995250f,
+ -0.995260f, -0.995269f, -0.995278f, -0.995288f, -0.995297f, -0.995306f, -0.995315f, -0.995325f,
+ -0.995334f, -0.995343f, -0.995352f, -0.995362f, -0.995371f, -0.995380f, -0.995389f, -0.995398f,
+ -0.995408f, -0.995417f, -0.995426f, -0.995435f, -0.995444f, -0.995453f, -0.995463f, -0.995472f,
+ -0.995481f, -0.995490f, -0.995499f, -0.995508f, -0.995517f, -0.995526f, -0.995535f, -0.995544f,
+ -0.995553f, -0.995562f, -0.995571f, -0.995580f, -0.995589f, -0.995598f, -0.995607f, -0.995616f,
+ -0.995625f, -0.995634f, -0.995643f, -0.995652f, -0.995661f, -0.995670f, -0.995679f, -0.995688f,
+ -0.995697f, -0.995705f, -0.995714f, -0.995723f, -0.995732f, -0.995741f, -0.995750f, -0.995759f,
+ -0.995767f, -0.995776f, -0.995785f, -0.995794f, -0.995803f, -0.995811f, -0.995820f, -0.995829f,
+ -0.995838f, -0.995846f, -0.995855f, -0.995864f, -0.995872f, -0.995881f, -0.995890f, -0.995899f,
+ -0.995907f, -0.995916f, -0.995925f, -0.995933f, -0.995942f, -0.995950f, -0.995959f, -0.995968f,
+ -0.995976f, -0.995985f, -0.995993f, -0.996002f, -0.996011f, -0.996019f, -0.996028f, -0.996036f,
+ -0.996045f, -0.996053f, -0.996062f, -0.996070f, -0.996079f, -0.996087f, -0.996096f, -0.996104f,
+ -0.996113f, -0.996121f, -0.996129f, -0.996138f, -0.996146f, -0.996155f, -0.996163f, -0.996171f,
+ -0.996180f, -0.996188f, -0.996197f, -0.996205f, -0.996213f, -0.996222f, -0.996230f, -0.996238f,
+ -0.996247f, -0.996255f, -0.996263f, -0.996271f, -0.996280f, -0.996288f, -0.996296f, -0.996304f,
+ -0.996313f, -0.996321f, -0.996329f, -0.996337f, -0.996345f, -0.996354f, -0.996362f, -0.996370f,
+ -0.996378f, -0.996386f, -0.996394f, -0.996403f, -0.996411f, -0.996419f, -0.996427f, -0.996435f,
+ -0.996443f, -0.996451f, -0.996459f, -0.996467f, -0.996475f, -0.996483f, -0.996491f, -0.996499f,
+ -0.996507f, -0.996515f, -0.996523f, -0.996531f, -0.996539f, -0.996547f, -0.996555f, -0.996563f,
+ -0.996571f, -0.996579f, -0.996587f, -0.996595f, -0.996603f, -0.996611f, -0.996619f, -0.996626f,
+ -0.996634f, -0.996642f, -0.996650f, -0.996658f, -0.996666f, -0.996674f, -0.996681f, -0.996689f,
+ -0.996697f, -0.996705f, -0.996712f, -0.996720f, -0.996728f, -0.996736f, -0.996743f, -0.996751f,
+ -0.996759f, -0.996767f, -0.996774f, -0.996782f, -0.996790f, -0.996797f, -0.996805f, -0.996813f,
+ -0.996820f, -0.996828f, -0.996836f, -0.996843f, -0.996851f, -0.996858f, -0.996866f, -0.996874f,
+ -0.996881f, -0.996889f, -0.996896f, -0.996904f, -0.996911f, -0.996919f, -0.996926f, -0.996934f,
+ -0.996941f, -0.996949f, -0.996956f, -0.996964f, -0.996971f, -0.996979f, -0.996986f, -0.996994f,
+ -0.997001f, -0.997008f, -0.997016f, -0.997023f, -0.997031f, -0.997038f, -0.997045f, -0.997053f,
+ -0.997060f, -0.997067f, -0.997075f, -0.997082f, -0.997089f, -0.997097f, -0.997104f, -0.997111f,
+ -0.997119f, -0.997126f, -0.997133f, -0.997140f, -0.997148f, -0.997155f, -0.997162f, -0.997169f,
+ -0.997176f, -0.997184f, -0.997191f, -0.997198f, -0.997205f, -0.997212f, -0.997219f, -0.997227f,
+ -0.997234f, -0.997241f, -0.997248f, -0.997255f, -0.997262f, -0.997269f, -0.997276f, -0.997283f,
+ -0.997290f, -0.997298f, -0.997305f, -0.997312f, -0.997319f, -0.997326f, -0.997333f, -0.997340f,
+ -0.997347f, -0.997354f, -0.997361f, -0.997368f, -0.997374f, -0.997381f, -0.997388f, -0.997395f,
+ -0.997402f, -0.997409f, -0.997416f, -0.997423f, -0.997430f, -0.997437f, -0.997443f, -0.997450f,
+ -0.997457f, -0.997464f, -0.997471f, -0.997478f, -0.997484f, -0.997491f, -0.997498f, -0.997505f,
+ -0.997511f, -0.997518f, -0.997525f, -0.997532f, -0.997538f, -0.997545f, -0.997552f, -0.997559f,
+ -0.997565f, -0.997572f, -0.997579f, -0.997585f, -0.997592f, -0.997599f, -0.997605f, -0.997612f,
+ -0.997618f, -0.997625f, -0.997632f, -0.997638f, -0.997645f, -0.997651f, -0.997658f, -0.997665f,
+ -0.997671f, -0.997678f, -0.997684f, -0.997691f, -0.997697f, -0.997704f, -0.997710f, -0.997717f,
+ -0.997723f, -0.997730f, -0.997736f, -0.997742f, -0.997749f, -0.997755f, -0.997762f, -0.997768f,
+ -0.997774f, -0.997781f, -0.997787f, -0.997794f, -0.997800f, -0.997806f, -0.997813f, -0.997819f,
+ -0.997825f, -0.997832f, -0.997838f, -0.997844f, -0.997851f, -0.997857f, -0.997863f, -0.997869f,
+ -0.997876f, -0.997882f, -0.997888f, -0.997894f, -0.997901f, -0.997907f, -0.997913f, -0.997919f,
+ -0.997925f, -0.997931f, -0.997938f, -0.997944f, -0.997950f, -0.997956f, -0.997962f, -0.997968f,
+ -0.997974f, -0.997980f, -0.997987f, -0.997993f, -0.997999f, -0.998005f, -0.998011f, -0.998017f,
+ -0.998023f, -0.998029f, -0.998035f, -0.998041f, -0.998047f, -0.998053f, -0.998059f, -0.998065f,
+ -0.998071f, -0.998077f, -0.998083f, -0.998089f, -0.998094f, -0.998100f, -0.998106f, -0.998112f,
+ -0.998118f, -0.998124f, -0.998130f, -0.998136f, -0.998142f, -0.998147f, -0.998153f, -0.998159f,
+ -0.998165f, -0.998171f, -0.998176f, -0.998182f, -0.998188f, -0.998194f, -0.998200f, -0.998205f,
+ -0.998211f, -0.998217f, -0.998222f, -0.998228f, -0.998234f, -0.998240f, -0.998245f, -0.998251f,
+ -0.998257f, -0.998262f, -0.998268f, -0.998273f, -0.998279f, -0.998285f, -0.998290f, -0.998296f,
+ -0.998302f, -0.998307f, -0.998313f, -0.998318f, -0.998324f, -0.998329f, -0.998335f, -0.998340f,
+ -0.998346f, -0.998351f, -0.998357f, -0.998362f, -0.998368f, -0.998373f, -0.998379f, -0.998384f,
+ -0.998390f, -0.998395f, -0.998401f, -0.998406f, -0.998411f, -0.998417f, -0.998422f, -0.998428f,
+ -0.998433f, -0.998438f, -0.998444f, -0.998449f, -0.998454f, -0.998460f, -0.998465f, -0.998470f,
+ -0.998476f, -0.998481f, -0.998486f, -0.998491f, -0.998497f, -0.998502f, -0.998507f, -0.998512f,
+ -0.998518f, -0.998523f, -0.998528f, -0.998533f, -0.998538f, -0.998544f, -0.998549f, -0.998554f,
+ -0.998559f, -0.998564f, -0.998569f, -0.998574f, -0.998580f, -0.998585f, -0.998590f, -0.998595f,
+ -0.998600f, -0.998605f, -0.998610f, -0.998615f, -0.998620f, -0.998625f, -0.998630f, -0.998635f,
+ -0.998640f, -0.998645f, -0.998650f, -0.998655f, -0.998660f, -0.998665f, -0.998670f, -0.998675f,
+ -0.998680f, -0.998685f, -0.998690f, -0.998695f, -0.998700f, -0.998704f, -0.998709f, -0.998714f,
+ -0.998719f, -0.998724f, -0.998729f, -0.998734f, -0.998738f, -0.998743f, -0.998748f, -0.998753f,
+ -0.998758f, -0.998762f, -0.998767f, -0.998772f, -0.998777f, -0.998781f, -0.998786f, -0.998791f,
+ -0.998795f, -0.998800f, -0.998805f, -0.998810f, -0.998814f, -0.998819f, -0.998824f, -0.998828f,
+ -0.998833f, -0.998837f, -0.998842f, -0.998847f, -0.998851f, -0.998856f, -0.998860f, -0.998865f,
+ -0.998870f, -0.998874f, -0.998879f, -0.998883f, -0.998888f, -0.998892f, -0.998897f, -0.998901f,
+ -0.998906f, -0.998910f, -0.998915f, -0.998919f, -0.998924f, -0.998928f, -0.998932f, -0.998937f,
+ -0.998941f, -0.998946f, -0.998950f, -0.998954f, -0.998959f, -0.998963f, -0.998968f, -0.998972f,
+ -0.998976f, -0.998981f, -0.998985f, -0.998989f, -0.998994f, -0.998998f, -0.999002f, -0.999006f,
+ -0.999011f, -0.999015f, -0.999019f, -0.999023f, -0.999028f, -0.999032f, -0.999036f, -0.999040f,
+ -0.999044f, -0.999049f, -0.999053f, -0.999057f, -0.999061f, -0.999065f, -0.999069f, -0.999074f,
+ -0.999078f, -0.999082f, -0.999086f, -0.999090f, -0.999094f, -0.999098f, -0.999102f, -0.999106f,
+ -0.999110f, -0.999114f, -0.999118f, -0.999122f, -0.999126f, -0.999130f, -0.999134f, -0.999138f,
+ -0.999142f, -0.999146f, -0.999150f, -0.999154f, -0.999158f, -0.999162f, -0.999166f, -0.999170f,
+ -0.999174f, -0.999178f, -0.999182f, -0.999186f, -0.999189f, -0.999193f, -0.999197f, -0.999201f,
+ -0.999205f, -0.999209f, -0.999212f, -0.999216f, -0.999220f, -0.999224f, -0.999228f, -0.999231f,
+ -0.999235f, -0.999239f, -0.999243f, -0.999246f, -0.999250f, -0.999254f, -0.999257f, -0.999261f,
+ -0.999265f, -0.999268f, -0.999272f, -0.999276f, -0.999279f, -0.999283f, -0.999287f, -0.999290f,
+ -0.999294f, -0.999297f, -0.999301f, -0.999305f, -0.999308f, -0.999312f, -0.999315f, -0.999319f,
+ -0.999322f, -0.999326f, -0.999329f, -0.999333f, -0.999336f, -0.999340f, -0.999343f, -0.999347f,
+ -0.999350f, -0.999354f, -0.999357f, -0.999361f, -0.999364f, -0.999367f, -0.999371f, -0.999374f,
+ -0.999378f, -0.999381f, -0.999384f, -0.999388f, -0.999391f, -0.999394f, -0.999398f, -0.999401f,
+ -0.999404f, -0.999408f, -0.999411f, -0.999414f, -0.999418f, -0.999421f, -0.999424f, -0.999427f,
+ -0.999431f, -0.999434f, -0.999437f, -0.999440f, -0.999443f, -0.999447f, -0.999450f, -0.999453f,
+ -0.999456f, -0.999459f, -0.999462f, -0.999466f, -0.999469f, -0.999472f, -0.999475f, -0.999478f,
+ -0.999481f, -0.999484f, -0.999487f, -0.999490f, -0.999493f, -0.999497f, -0.999500f, -0.999503f,
+ -0.999506f, -0.999509f, -0.999512f, -0.999515f, -0.999518f, -0.999521f, -0.999524f, -0.999527f,
+ -0.999529f, -0.999532f, -0.999535f, -0.999538f, -0.999541f, -0.999544f, -0.999547f, -0.999550f,
+ -0.999553f, -0.999556f, -0.999558f, -0.999561f, -0.999564f, -0.999567f, -0.999570f, -0.999573f,
+ -0.999575f, -0.999578f, -0.999581f, -0.999584f, -0.999586f, -0.999589f, -0.999592f, -0.999595f,
+ -0.999597f, -0.999600f, -0.999603f, -0.999605f, -0.999608f, -0.999611f, -0.999614f, -0.999616f,
+ -0.999619f, -0.999621f, -0.999624f, -0.999627f, -0.999629f, -0.999632f, -0.999635f, -0.999637f,
+ -0.999640f, -0.999642f, -0.999645f, -0.999647f, -0.999650f, -0.999652f, -0.999655f, -0.999658f,
+ -0.999660f, -0.999663f, -0.999665f, -0.999667f, -0.999670f, -0.999672f, -0.999675f, -0.999677f,
+ -0.999680f, -0.999682f, -0.999685f, -0.999687f, -0.999689f, -0.999692f, -0.999694f, -0.999696f,
+ -0.999699f, -0.999701f, -0.999704f, -0.999706f, -0.999708f, -0.999710f, -0.999713f, -0.999715f,
+ -0.999717f, -0.999720f, -0.999722f, -0.999724f, -0.999726f, -0.999729f, -0.999731f, -0.999733f,
+ -0.999735f, -0.999738f, -0.999740f, -0.999742f, -0.999744f, -0.999746f, -0.999748f, -0.999750f,
+ -0.999753f, -0.999755f, -0.999757f, -0.999759f, -0.999761f, -0.999763f, -0.999765f, -0.999767f,
+ -0.999769f, -0.999771f, -0.999774f, -0.999776f, -0.999778f, -0.999780f, -0.999782f, -0.999784f,
+ -0.999786f, -0.999788f, -0.999790f, -0.999792f, -0.999793f, -0.999795f, -0.999797f, -0.999799f,
+ -0.999801f, -0.999803f, -0.999805f, -0.999807f, -0.999809f, -0.999811f, -0.999812f, -0.999814f,
+ -0.999816f, -0.999818f, -0.999820f, -0.999822f, -0.999823f, -0.999825f, -0.999827f, -0.999829f,
+ -0.999831f, -0.999832f, -0.999834f, -0.999836f, -0.999838f, -0.999839f, -0.999841f, -0.999843f,
+ -0.999844f, -0.999846f, -0.999848f, -0.999849f, -0.999851f, -0.999853f, -0.999854f, -0.999856f,
+ -0.999858f, -0.999859f, -0.999861f, -0.999862f, -0.999864f, -0.999866f, -0.999867f, -0.999869f,
+ -0.999870f, -0.999872f, -0.999873f, -0.999875f, -0.999876f, -0.999878f, -0.999879f, -0.999881f,
+ -0.999882f, -0.999884f, -0.999885f, -0.999887f, -0.999888f, -0.999890f, -0.999891f, -0.999892f,
+ -0.999894f, -0.999895f, -0.999897f, -0.999898f, -0.999899f, -0.999901f, -0.999902f, -0.999903f,
+ -0.999905f, -0.999906f, -0.999907f, -0.999909f, -0.999910f, -0.999911f, -0.999913f, -0.999914f,
+ -0.999915f, -0.999916f, -0.999917f, -0.999919f, -0.999920f, -0.999921f, -0.999922f, -0.999924f,
+ -0.999925f, -0.999926f, -0.999927f, -0.999928f, -0.999929f, -0.999930f, -0.999932f, -0.999933f,
+ -0.999934f, -0.999935f, -0.999936f, -0.999937f, -0.999938f, -0.999939f, -0.999940f, -0.999941f,
+ -0.999942f, -0.999943f, -0.999944f, -0.999945f, -0.999946f, -0.999947f, -0.999948f, -0.999949f,
+ -0.999950f, -0.999951f, -0.999952f, -0.999953f, -0.999954f, -0.999955f, -0.999956f, -0.999957f,
+ -0.999958f, -0.999959f, -0.999959f, -0.999960f, -0.999961f, -0.999962f, -0.999963f, -0.999964f,
+ -0.999964f, -0.999965f, -0.999966f, -0.999967f, -0.999968f, -0.999968f, -0.999969f, -0.999970f,
+ -0.999971f, -0.999971f, -0.999972f, -0.999973f, -0.999973f, -0.999974f, -0.999975f, -0.999976f,
+ -0.999976f, -0.999977f, -0.999977f, -0.999978f, -0.999979f, -0.999979f, -0.999980f, -0.999981f,
+ -0.999981f, -0.999982f, -0.999982f, -0.999983f, -0.999983f, -0.999984f, -0.999985f, -0.999985f,
+ -0.999986f, -0.999986f, -0.999987f, -0.999987f, -0.999988f, -0.999988f, -0.999988f, -0.999989f,
+ -0.999989f, -0.999990f, -0.999990f, -0.999991f, -0.999991f, -0.999991f, -0.999992f, -0.999992f,
+ -0.999993f, -0.999993f, -0.999993f, -0.999994f, -0.999994f, -0.999994f, -0.999995f, -0.999995f,
+ -0.999995f, -0.999996f, -0.999996f, -0.999996f, -0.999996f, -0.999997f, -0.999997f, -0.999997f,
+ -0.999997f, -0.999998f, -0.999998f, -0.999998f, -0.999998f, -0.999998f, -0.999999f, -0.999999f,
+ -0.999999f, -0.999999f, -0.999999f, -0.999999f, -0.999999f, -0.999999f, -1.000000f, -1.000000f,
+ -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f, -1.000000f
+};
+
+static const float *sinTables[17] = {
+ 0 , 0 , 0 , 0 ,
+ sinTable16 , sinTable32 , sinTable64 , sinTable128 ,
+ sinTable256 , sinTable512 , sinTable1024 , sinTable2048 ,
+ sinTable4096, sinTable8192, sinTable16384, sinTable32768,
+ sinTable65536
+};
+
+const float *getSineTable(int bits) {
+ assert((bits >= 4) && (bits <= 16));
+
+ return sinTables[bits];
+}
+
+} // End of namespace Common
diff --git a/common/sinetables.h b/common/sinetables.h
new file mode 100644
index 0000000000..28918838f4
--- /dev/null
+++ b/common/sinetables.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 COMMON_SINETABLES_H
+#define COMMON_SINETABLES_H
+
+namespace Common {
+
+/**
+ * Get a sine table with the specified bit precision
+ *
+ * @param bits Precision of the table, which must be in range [4, 16]
+ */
+const float *getSineTable(int bits);
+
+} // End of namespace Common
+
+#endif // COMMON_SINETABLES_H
diff --git a/common/singleton.h b/common/singleton.h
index 2f5fa41877..43f1c0c4d0 100644
--- a/common/singleton.h
+++ b/common/singleton.h
@@ -89,15 +89,13 @@ protected:
};
/**
- * Note that you need to use this macro from the global namespace.
+ * Note that you need to use this macro from the Common namespace.
*
* This is because C++ requires initial explicit specialization
* to be placed in the same namespace as the template.
- * It has to be put in the global namespace to assure the correct
- * namespace Common is referenced.
*/
#define DECLARE_SINGLETON(T) \
- template<> T *Common::Singleton<T>::_singleton = 0
+ template<> T *Singleton<T>::_singleton = 0
} // End of namespace Common
diff --git a/common/str.cpp b/common/str.cpp
index 223188bdd6..32f4b44e79 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -25,8 +25,6 @@
#include "common/str.h"
#include "common/util.h"
-#include <stdarg.h>
-
namespace Common {
MemoryPool *g_refCountPool = 0; // FIXME: This is never freed right now
@@ -407,7 +405,7 @@ void String::trim() {
makeUnique();
// Trim trailing whitespace
- while (_size >= 1 && isspace(_str[_size - 1]))
+ while (_size >= 1 && isspace(static_cast<unsigned char>(_str[_size - 1])))
--_size;
_str[_size] = 0;
@@ -429,10 +427,22 @@ uint String::hash() const {
// static
String String::format(const char *fmt, ...) {
String output;
- assert(output.isStorageIntern());
va_list va;
va_start(va, fmt);
+ output = String::vformat(fmt, va);
+ va_end(va);
+
+ return output;
+}
+
+// static
+String String::vformat(const char *fmt, va_list args) {
+ String output;
+ assert(output.isStorageIntern());
+
+ va_list va;
+ scumm_va_copy(va, args);
int len = vsnprintf(output._str, _builtinCapacity, fmt, va);
va_end(va);
@@ -457,7 +467,7 @@ String String::format(const char *fmt, ...) {
assert(!output.isStorageIntern());
size = output._extern._capacity;
- va_start(va, fmt);
+ scumm_va_copy(va, args);
len = vsnprintf(output._str, size, fmt, va);
va_end(va);
} while (len == -1 || len >= size - 1);
@@ -468,7 +478,7 @@ String String::format(const char *fmt, ...) {
} else {
// vsnprintf didn't have enough space, so grow buffer
output.ensureCapacity(len, false);
- va_start(va, fmt);
+ scumm_va_copy(va, args);
int len2 = vsnprintf(output._str, len+1, fmt, va);
va_end(va);
assert(len == len2);
@@ -596,14 +606,14 @@ String operator+(const String &x, char y) {
}
char *ltrim(char *t) {
- while (isspace(*t))
+ while (isspace(static_cast<unsigned char>(*t)))
t++;
return t;
}
char *rtrim(char *t) {
int l = strlen(t) - 1;
- while (l >= 0 && isspace(t[l]))
+ while (l >= 0 && isspace(static_cast<unsigned char>(t[l])))
t[l--] = 0;
return t;
}
diff --git a/common/str.h b/common/str.h
index 7b97dfe945..8e07b6233d 100644
--- a/common/str.h
+++ b/common/str.h
@@ -24,6 +24,8 @@
#include "common/scummsys.h"
+#include <stdarg.h>
+
namespace Common {
/**
@@ -213,10 +215,19 @@ public:
uint hash() const;
/**
- * Printf-like function. Returns a formatted String.
+ * Print formatted data into a String object. Similar to sprintf,
+ * except that it stores the result in (variably sized) String
+ * instead of a fixed size buffer.
*/
static Common::String format(const char *fmt, ...) GCC_PRINTF(1,2);
+ /**
+ * Print formatted data into a String object. Similar to vsprintf,
+ * except that it stores the result in (variably sized) String
+ * instead of a fixed size buffer.
+ */
+ static Common::String vformat(const char *fmt, va_list args);
+
public:
typedef char * iterator;
typedef const char * const_iterator;
diff --git a/common/system.cpp b/common/system.cpp
index fae7a3ef34..8d5bfd39cd 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -21,17 +21,13 @@
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_exit
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-#define FORBIDDEN_SYMBOL_EXCEPTION_fputs
-#define FORBIDDEN_SYMBOL_EXCEPTION_fflush
-#define FORBIDDEN_SYMBOL_EXCEPTION_stdout
-#define FORBIDDEN_SYMBOL_EXCEPTION_stderr
#include "common/system.h"
#include "common/events.h"
#include "common/fs.h"
#include "common/savefile.h"
#include "common/str.h"
+#include "common/taskbar.h"
#include "common/textconsole.h"
#include "backends/audiocd/default/default-audiocd.h"
@@ -45,6 +41,9 @@ OSystem::OSystem() {
_eventManager = 0;
_timerManager = 0;
_savefileManager = 0;
+#if defined(USE_TASKBAR)
+ _taskbarManager = 0;
+#endif
_fsFactory = 0;
}
@@ -58,6 +57,11 @@ OSystem::~OSystem() {
delete _timerManager;
_timerManager = 0;
+#if defined(USE_TASKBAR)
+ delete _taskbarManager;
+ _taskbarManager = 0;
+#endif
+
delete _savefileManager;
_savefileManager = 0;
@@ -136,20 +140,6 @@ Common::String OSystem::getDefaultConfigFileName() {
return "scummvm.ini";
}
-void OSystem::logMessage(LogMessageType::Type type, const char *message) {
-#if !defined(__PLAYSTATION2__) && !defined(__DS__)
- FILE *output = 0;
-
- if (type == LogMessageType::kInfo || type == LogMessageType::kDebug)
- output = stdout;
- else
- output = stderr;
-
- fputs(message, output);
- fflush(output);
-#endif
-}
-
Common::String OSystem::getSystemLanguage() const {
return "en_US";
}
diff --git a/common/system.h b/common/system.h
index d26bc593aa..9b833c5b1a 100644
--- a/common/system.h
+++ b/common/system.h
@@ -42,6 +42,9 @@ struct Rect;
class SaveFileManager;
class SearchSet;
class String;
+#if defined(USE_TASKBAR)
+class TaskbarManager;
+#endif
class TimerManager;
class SeekableReadStream;
class WriteStream;
@@ -149,6 +152,15 @@ protected:
*/
Common::SaveFileManager *_savefileManager;
+#if defined(USE_TASKBAR)
+ /**
+ * No default value is provided for _taskbarManager by OSystem.
+ *
+ * @note _taskbarManager is deleted by the OSystem destructor.
+ */
+ Common::TaskbarManager *_taskbarManager;
+#endif
+
/**
* No default value is provided for _fsFactory by OSystem.
*
@@ -1047,6 +1059,18 @@ public:
return _savefileManager;
}
+#if defined(USE_TASKBAR)
+ /**
+ * Returns the TaskbarManager, used to handle progress bars,
+ * icon overlay, tasks and recent items list on the taskbar.
+ *
+ * @return the TaskbarManager for the current architecture
+ */
+ virtual Common::TaskbarManager *getTaskbarManager() {
+ return _taskbarManager;
+ }
+#endif
+
/**
* Returns the FilesystemFactory object, depending on the current architecture.
*
@@ -1101,7 +1125,7 @@ public:
* @param type the type of the message
* @param message the message itself
*/
- virtual void logMessage(LogMessageType::Type type, const char *message);
+ virtual void logMessage(LogMessageType::Type type, const char *message) = 0;
/**
* Open the log file in a way that allows the user to review it,
diff --git a/common/taskbar.h b/common/taskbar.h
new file mode 100644
index 0000000000..023227e5e0
--- /dev/null
+++ b/common/taskbar.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.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef COMMON_TASKBAR_MANAGER_H
+#define COMMON_TASKBAR_MANAGER_H
+
+#include "common/scummsys.h"
+#include "common/str.h"
+
+#if defined(USE_TASKBAR)
+
+namespace Common {
+
+/**
+ * The TaskbarManager allows interaction with the ScummVM application icon:
+ * - in the taskbar on Windows 7 and later
+ * - in the launcher for Unity
+ * - in the dock on MacOSX
+ * - ...
+ *
+ * This allows GUI code and engines to display a progress bar, an overlay icon and/or count
+ * associated with the ScummVM icon as well as add the started engine to the recent items
+ * list (so that the user can start the engine directly in one click).
+ *
+ * Examples of use:
+ * - Track search progress and found engines when running the Mass Add dialog
+ * - Add an entry to the recent items when starting an engine
+ * - Show the current running engine icon as an overlay
+ *
+ * @note functionality will vary between supported platforms (due to API limitations)
+ * and some of the methods will just be no-ops or approximate the functionality
+ * as best as possible
+ */
+class TaskbarManager {
+public:
+ /**
+ * Values representing the taskbar progress state
+ */
+ enum TaskbarProgressState {
+ kTaskbarNoProgress = 0,
+ kTaskbarIndeterminate = 1,
+ kTaskbarNormal = 2,
+ kTaskbarError = 4,
+ kTaskbarPaused = 8
+ };
+
+ TaskbarManager() {}
+ virtual ~TaskbarManager() {}
+
+ /**
+ * Sets an overlay icon on the taskbar icon
+ *
+ * When an empty name is given, no icon is shown
+ * and the current overlay icon (if any) is removed
+ *
+ * @param name Path to the icon
+ * @param description The description
+ *
+ * @note on Windows, the icon should be an ICO file
+ */
+ virtual void setOverlayIcon(const String &name, const String &description) {}
+
+ /**
+ * Sets a progress value on the taskbar icon
+ *
+ * @param completed The current progress value.
+ * @param total The maximum progress value.
+ */
+ virtual void setProgressValue(int completed, int total) {}
+
+ /**
+ * Sets the progress state on the taskbar icon
+ *
+ * State can be any of the following:
+ * - NoProgress: disable display of progress state
+ * - Indeterminate
+ * - Normal
+ * - Error
+ * - Paused
+ *
+ * @param state The progress state
+ */
+ virtual void setProgressState(TaskbarProgressState state) {}
+
+ /**
+ * Sets the count number associated with the icon as an overlay
+ *
+ * @param count The count
+ *
+ * @note Setting a count of 0 will hide the count
+ */
+ virtual void setCount(int count) {}
+
+ /**
+ * Adds an engine to the recent items list
+ *
+ * Path is automatically set to the current executable path,
+ * an icon name is generated (with fallback to default icon)
+ * and the command line is set to start the engine on click.
+ *
+ * @param name The target name.
+ * @param description The description.
+ */
+ virtual void addRecent(const String &name, const String &description) {}
+
+};
+
+} // End of namespace Common
+
+#endif
+
+#endif // COMMON_TASKBAR_MANAGER_H
diff --git a/common/textconsole.cpp b/common/textconsole.cpp
index f2325ac9ad..ffa42e63a0 100644
--- a/common/textconsole.cpp
+++ b/common/textconsole.cpp
@@ -46,14 +46,14 @@ void setErrorHandler(ErrorHandler handler) {
#ifndef DISABLE_TEXT_CONSOLE
void warning(const char *s, ...) {
- char buf[STRINGBUFLEN];
+ Common::String output;
va_list va;
va_start(va, s);
- vsnprintf(buf, STRINGBUFLEN, s, va);
+ output = Common::String::vformat(s, va);
va_end(va);
- Common::String output = Common::String::format("WARNING: %s!\n", buf);
+ output = "WARNING: " + output + "!\n";
if (g_system)
g_system->logMessage(LogMessageType::kWarning, output.c_str());
@@ -64,6 +64,9 @@ void warning(const char *s, ...) {
#endif
void NORETURN_PRE error(const char *s, ...) {
+ // We don't use String::vformat here, as that require
+ // using the heap, and that might be impossible at this
+ // point, e.g. if the error was an "out-of-memory" error.
char buf_input[STRINGBUFLEN];
char buf_output[STRINGBUFLEN];
va_list va;
diff --git a/common/translation.cpp b/common/translation.cpp
index dc71ddc52f..5c8a04352d 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -37,10 +37,10 @@
#ifdef USE_TRANSLATION
-DECLARE_SINGLETON(Common::TranslationManager);
-
namespace Common {
+DECLARE_SINGLETON(TranslationManager);
+
bool operator<(const TLanguage &l, const TLanguage &r) {
return strcmp(l.name, r.name) < 0;
}
@@ -223,13 +223,21 @@ String TranslationManager::getLangById(int id) const {
}
bool TranslationManager::openTranslationsFile(File& inFile) {
- // First try to open it directly (i.e. using the SearchMan).
- if (inFile.open("translations.dat"))
+ // First look in the Themepath if we can find the file.
+ if (ConfMan.hasKey("themepath") && openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile))
return true;
- // Then look in the Themepath if we can find the file.
- if (ConfMan.hasKey("themepath"))
- return openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile);
+ // Then try to open it using the SearchMan.
+ ArchiveMemberList fileList;
+ SearchMan.listMatchingMembers(fileList, "translations.dat");
+ for (ArchiveMemberList::iterator it = fileList.begin(); it != fileList.end(); ++it) {
+ SeekableReadStream *stream = it->get()->createReadStream();
+ if (stream && inFile.open(stream, it->get()->getName())) {
+ if (checkHeader(inFile))
+ return true;
+ inFile.close();
+ }
+ }
return false;
}
@@ -243,8 +251,11 @@ bool TranslationManager::openTranslationsFile(const FSNode &node, File& inFile,
// necessary to make them here. But it avoid printing warnings.
FSNode fileNode = node.getChild("translations.dat");
if (fileNode.exists() && fileNode.isReadable() && !fileNode.isDirectory()) {
- if (inFile.open(fileNode))
- return true;
+ if (inFile.open(fileNode)) {
+ if (checkHeader(inFile))
+ return true;
+ inFile.close();
+ }
}
// Check if we exceeded the given recursion depth
@@ -268,13 +279,10 @@ bool TranslationManager::openTranslationsFile(const FSNode &node, File& inFile,
void TranslationManager::loadTranslationsInfoDat() {
File in;
if (!openTranslationsFile(in)) {
- warning("You are missing the 'translations.dat' file. GUI translation will not be available");
+ warning("You are missing a valid 'translations.dat' file. GUI translation will not be available");
return;
}
- if (!checkHeader(in))
- return;
-
char buf[256];
int len;
@@ -302,8 +310,13 @@ void TranslationManager::loadTranslationsInfoDat() {
_messageIds.resize(numMessages);
for (int i = 0; i < numMessages; ++i) {
len = in.readUint16BE();
- in.read(buf, len);
- _messageIds[i] = String(buf, len - 1);
+ String msg;
+ while (len > 0) {
+ in.read(buf, len > 256 ? 256 : len);
+ msg += String(buf, len > 256 ? 256 : len - 1);
+ len -= 256;
+ }
+ _messageIds[i] = msg;
}
}
@@ -321,9 +334,6 @@ void TranslationManager::loadLanguageDat(int index) {
if (!openTranslationsFile(in))
return;
- if (!checkHeader(in))
- return;
-
char buf[1024];
int len;
@@ -357,8 +367,13 @@ void TranslationManager::loadLanguageDat(int index) {
for (int i = 0; i < nbMessages; ++i) {
_currentTranslationMessages[i].msgid = in.readUint16BE();
len = in.readUint16BE();
- in.read(buf, len);
- _currentTranslationMessages[i].msgstr = String(buf, len - 1);
+ String msg;
+ while (len > 0) {
+ in.read(buf, len > 256 ? 256 : len);
+ msg += String(buf, len > 256 ? 256 : len - 1);
+ len -= 256;
+ }
+ _currentTranslationMessages[i].msgstr = msg;
len = in.readUint16BE();
if (len > 0) {
in.read(buf, len);
@@ -376,7 +391,7 @@ bool TranslationManager::checkHeader(File &in) {
// Check header
if (strcmp(buf, "TRANSLATIONS")) {
- warning("Your 'translations.dat' file is corrupt. GUI translation will not be available");
+ warning("File '%s' is not a valid translations data file. Skipping this file", in.getName());
return false;
}
@@ -384,7 +399,7 @@ bool TranslationManager::checkHeader(File &in) {
ver = in.readByte();
if (ver != TRANSLATIONS_DAT_VER) {
- warning("Your 'translations.dat' file has a mismatching version, expected was %d but you got %d. GUI translation will not be available", TRANSLATIONS_DAT_VER, ver);
+ warning("File '%s' has a mismatching version, expected was %d but you got %d. Skipping this file", in.getName(), TRANSLATIONS_DAT_VER, ver);
return false;
}
diff --git a/common/util.h b/common/util.h
index 5837c8beab..cd890c970f 100644
--- a/common/util.h
+++ b/common/util.h
@@ -208,11 +208,6 @@ enum RenderMode {
kRenderAmiga = 5
};
-enum HerculesDimensions {
- kHercW = 720,
- kHercH = 350
-};
-
struct RenderModeDescription {
const char *code;
const char *description;
diff --git a/common/winexe_ne.cpp b/common/winexe_ne.cpp
index 80266ba87e..8690f6795b 100644
--- a/common/winexe_ne.cpp
+++ b/common/winexe_ne.cpp
@@ -136,7 +136,7 @@ bool NEResources::loadFromCompressedEXE(const String &fileName) {
matchPos &= 0xFFF;
}
}
-
+
}
}
diff --git a/common/winexe_pe.h b/common/winexe_pe.h
index cc1d0c9770..b38f2f78f5 100644
--- a/common/winexe_pe.h
+++ b/common/winexe_pe.h
@@ -107,7 +107,7 @@ private:
uint32 offset;
uint32 size;
};
-
+
typedef HashMap<WinResourceID, Resource, WinResourceID_Hash, WinResourceID_EqualTo> LangMap;
typedef HashMap<WinResourceID, LangMap, WinResourceID_Hash, WinResourceID_EqualTo> NameMap;
typedef HashMap<WinResourceID, NameMap, WinResourceID_Hash, WinResourceID_EqualTo> TypeMap;
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp
index 5217c4e82c..623619914a 100644
--- a/common/xmlparser.cpp
+++ b/common/xmlparser.cpp
@@ -263,7 +263,7 @@ bool XMLParser::vparseIntegerKey(const char *key, int count, va_list args) {
int *num_ptr;
while (count--) {
- while (isspace(*key))
+ while (isspace(static_cast<unsigned char>(*key)))
key++;
num_ptr = va_arg(args, int*);
@@ -271,7 +271,7 @@ bool XMLParser::vparseIntegerKey(const char *key, int count, va_list args) {
key = parseEnd;
- while (isspace(*key))
+ while (isspace(static_cast<unsigned char>(*key)))
key++;
if (count && *key++ != ',')
@@ -463,10 +463,10 @@ bool XMLParser::parse() {
}
bool XMLParser::skipSpaces() {
- if (!isspace(_char))
+ if (!isspace(static_cast<unsigned char>(_char)))
return false;
- while (_char && isspace(_char))
+ while (_char && isspace(static_cast<unsigned char>(_char)))
_char = _stream->readByte();
return true;
@@ -516,7 +516,7 @@ bool XMLParser::parseToken() {
_char = _stream->readByte();
}
- return isspace(_char) != 0 || _char == '>' || _char == '=' || _char == '/';
+ return isspace(static_cast<unsigned char>(_char)) != 0 || _char == '>' || _char == '=' || _char == '/';
}
} // End of namespace Common
diff --git a/common/xmlparser.h b/common/xmlparser.h
index 7923e43a37..d75dc0e4a9 100644
--- a/common/xmlparser.h
+++ b/common/xmlparser.h
@@ -31,6 +31,7 @@
#include "common/hashmap.h"
#include "common/hash-str.h"
#include "common/stack.h"
+#include "common/memorypool.h"
namespace Common {
@@ -294,7 +295,7 @@ protected:
* in their name.
*/
virtual inline bool isValidNameChar(char c) {
- return isalnum(c) || c == '_';
+ return isalnum(static_cast<unsigned char>(c)) || c == '_';
}
/**
diff --git a/configure b/configure
index 355492e3c9..16b3dea0dc 100755
--- a/configure
+++ b/configure
@@ -65,8 +65,12 @@ get_var() {
# Add an engine: id name build subengines
add_engine() {
_engines="${_engines} ${1}"
+ if test "${3}" = "no" ; then
+ set_var _wip_engines "${_wip_engines} ${1}"
+ fi
set_var _engine_${1}_name "${2}"
set_var _engine_${1}_build "${3}"
+ set_var _engine_${1}_build_default "${3}"
set_var _engine_${1}_subengines "${4}"
for sub in ${4}; do
set_var _engine_${sub}_sub "yes"
@@ -83,6 +87,7 @@ add_engine cine "Cinematique evo 1" yes
add_engine cruise "Cinematique evo 2" yes
add_engine draci "Dragon History" yes
add_engine drascula "Drascula: The Vampire Strikes Back" yes
+add_engine dreamweb "Dreamweb" no
add_engine gob "Gobli*ns" yes
add_engine groovie "Groovie" yes "groovie2"
add_engine groovie2 "Groovie 2 games" no
@@ -117,7 +122,6 @@ add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
add_engine tsage "Ringworld: Revenge Of The Patriarch" no
add_engine tucker "Bud Tucker in Double Trouble" yes
-
#
# Default settings
#
@@ -138,6 +142,8 @@ _fluidsynth=auto
_opengl=auto
_opengles=auto
_readline=auto
+_taskbar=yes
+_libunity=auto
# Default option behaviour yes/no
_debug_build=auto
_release_build=auto
@@ -148,6 +154,7 @@ _build_scalers=yes
_build_hq_scalers=yes
_enable_prof=no
_global_constructors=no
+_bink=yes
# Default vkeybd/keymapper options
_vkeybd=no
_keymapper=no
@@ -168,7 +175,8 @@ _strip=strip
_ar="ar cru"
_as="as"
_windres=windres
-_win32path="build/x86"
+_stagingpath="staging"
+_win32path="c:/scummvm"
_aos4path="Games:ScummVM"
_staticlibpath=/sw
_sdlconfig=sdl-config
@@ -176,6 +184,7 @@ _sdlpath="$PATH"
_nasmpath="$PATH"
NASMFLAGS=""
NASM=""
+_tainted_build=no
# The following variables are automatically detected, and should not
# be modified otherwise. Consider them read-only.
_posix=no
@@ -423,6 +432,11 @@ get_engine_build() {
get_var _engine_$1_build
}
+# Was this engine set to be built by default?
+get_engine_build_default() {
+ get_var _engine_$1_build_default
+}
+
# Get the subengines
get_engine_subengines() {
get_var _engine_$1_subengines
@@ -542,12 +556,19 @@ prepare_engine_build_strings() {
if test -n "$string" ; then
_engines_skipped="${_engines_skipped}#$string@"
fi
+
+ string=`get_engine_build_string $1 wip`
+ if test -n "$string" ; then
+ _engines_built_wip="${_engines_built_wip}#$string@"
+ fi
+
}
# Get the string about building an engine
get_engine_build_string() {
engine_string=""
engine_build=`get_engine_build $1`
+ engine_build_default=`get_engine_build_default $1`
show=no
# Check if the current engine should be shown for the current status
@@ -563,6 +584,14 @@ get_engine_build_string() {
fi
done
fi
+ # Test for enabled wip sub-engines
+ if test $2 = wip ; then
+ for subeng in `get_engine_subengines $1` ; do
+ if test `get_engine_build $subeng` != no -a `get_engine_build_default $subeng` = no ; then
+ show=yes
+ fi
+ done
+ fi
fi
# Convert static/dynamic to yes to ease the check of subengines
@@ -570,13 +599,18 @@ get_engine_build_string() {
engine_build=yes
fi
+ # Check if it is a wip engine
+ if test "$2" = "wip" -a "$engine_build" != "no" -a "$engine_build_default" = no; then
+ show=yes
+ fi
+
# The engine should be shown, build the string
if test $show = yes ; then
build_string_func=get_${1}_build_string
if ( type $build_string_func | grep function ) 2> /dev/null > /dev/null ; then
- engine_string=`$build_string_func $1 $engine_build`
+ engine_string=`$build_string_func $1 $engine_build $2`
else
- engine_string=`get_subengines_build_string $1 $engine_build`
+ engine_string=`get_subengines_build_string $1 $engine_build "" $2`
fi
engine_string="`get_engine_name $1` $engine_string"
@@ -588,14 +622,29 @@ get_engine_build_string() {
# Get the string about building subengines
get_subengines_build_string() {
all=yes
+ parent_engine=$1
subengine_string=$3
- for subeng in `get_engine_subengines $1` ; do
- if test `get_engine_build $subeng` = $2 ; then
+ parent_status=$4
+ parent_engine_build_default=`get_engine_build_default $parent_engine`
+
+ for subeng in `get_engine_subengines $parent_engine` ; do
+ subengine_build=`get_engine_build $subeng`
+ subengine_build_default=`get_engine_build_default $subeng`
+ if test \( $subengine_build = $2 -a "$parent_status" != wip \) -o \( "$parent_status" = wip -a $subengine_build != no -a "$subengine_build_default" = no \) ; then
subengine_string="$subengine_string [`get_engine_name $subeng`]"
else
all=no
fi
+
+ # handle engines that are on by default and have a single subengine that is off by default
+ if test "$parent_status" = wip ; then
+ if test $parent_engine_build_default = yes -a subengine ; then
+ all=no
+ fi
+ fi
+
done
+
if test $2 != no ; then
if test -n "$subengine_string" ; then
if test $all = yes ; then
@@ -610,19 +659,19 @@ get_subengines_build_string() {
# Engine specific build strings
get_scumm_build_string() {
if test `get_engine_build $1` != no ; then
- if test $2 != no ; then
+ if test $2 != no -a "$3" != wip ; then
base="[v0-v6 games]"
fi
- get_subengines_build_string $1 $2 "$base"
+ get_subengines_build_string $1 $2 "$base" $3
fi
}
get_saga_build_string() {
if test `get_engine_build $1` != no ; then
- if test $2 != no ; then
+ if test $2 != no -a "$3" != wip; then
base="[ITE]"
fi
- get_subengines_build_string $1 $2 "$base"
+ get_subengines_build_string $1 $2 "$base" $3
fi
}
@@ -698,6 +747,7 @@ Special configuration feature:
n64 for Nintendo 64
openpandora for OpenPandora
ps2 for PlayStation 2
+ ps3 for PlayStation 3
psp for PlayStation Portable
samsungtv for Samsung TV
webos for HP Palm WebOS
@@ -722,9 +772,11 @@ Optional Features:
--disable-scalers exclude scalers
--disable-hq-scalers exclude HQ2x and HQ3x scalers
--disable-translation don't build support for translated messages
+ --disable-taskbar don't build support for taskbar and launcher integration
--enable-text-console use text console instead of graphical console
--enable-verbose-build enable regular echoing of commands during build
process
+ --disable-bink don't build with Bink video support
Optional Libraries:
--with-alsa-prefix=DIR Prefix where alsa is installed (optional)
@@ -771,6 +823,9 @@ Optional Libraries:
--with-readline-prefix=DIR Prefix where readline is installed (optional)
--disable-readline disable readline support in text console [autodetect]
+ --with-libunity-prefix=DIR Prefix where libunity is installed (optional)
+ --disable-libunity disable Unity launcher integration [autodetect]
+
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
@@ -818,8 +873,14 @@ for ac_option in $@; do
--disable-fluidsynth) _fluidsynth=no ;;
--enable-readline) _readline=yes ;;
--disable-readline) _readline=no ;;
+ --enable-taskbar) _taskbar=yes ;;
+ --disable-taskbar) _taskbar=no ;;
+ --enable-libunity) _libunity=yes ;;
+ --disable-libunity) _libunity=no ;;
--enable-opengl) _opengl=yes ;;
--disable-opengl) _opengl=no ;;
+ --enable-bink) _bink=yes ;;
+ --disable-bink) _bink=no ;;
--enable-verbose-build) _verbose_build=yes ;;
--enable-plugins) _dynamic_modules=yes ;;
--default-dynamic) _plugins_default=dynamic ;;
@@ -893,6 +954,11 @@ for ac_option in $@; do
READLINE_CFLAGS="-I$arg/include"
READLINE_LIBS="-L$arg/lib"
;;
+ --with-libunity-prefix=*)
+ arg=`echo $ac_option | cut -d '=' -f 2`
+ LIBUNITY_CFLAGS="-I$arg/include"
+ LIBUNITY_LIBS="-L$arg/lib"
+ ;;
--with-opengl-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
OPENGL_CFLAGS="-I$arg/include"
@@ -1072,6 +1138,22 @@ ps2)
_host_cpu=mips64r5900el
_host_alias=ee
;;
+ps3)
+ _host_os=ps3
+ _host_cpu=ppc
+ _host_alias=powerpc64-ps3-elf
+
+ # The prefix is always the same on PS3 so we hardcode the default
+ # here. It is still possible to define a custom prefix which is
+ # needed when packaging the app with a user-specific app ID.
+ test "x$prefix" = xNONE && prefix=/dev_hdd0/game/SCUM12000/USRDIR
+ # PS3 apps are installed into app-specific directories. The
+ # default directory structure of ScummVM makes no sense here so we
+ # hardcode PS3 specific directories here.
+ datarootdir='${prefix}/data'
+ datadir='${datarootdir}'
+ docdir='${prefix}/doc'
+ ;;
psp)
_host_os=psp
_host_cpu=mipsallegrexel
@@ -1213,6 +1295,12 @@ ps2)
exit 1
fi
;;
+ps3)
+ if test -z "$PS3DEV"; then
+ echo "Please set PS3DEV in your environment. export PS3DEV=<path to ps3 toolchain>"
+ exit 1
+ fi
+ ;;
psp)
if test -z "$PSPDEV"; then
PSPDEV=`psp-config --pspdev-path`
@@ -1405,7 +1493,7 @@ if test "$have_gcc" = yes ; then
case $_host_os in
# newlib-based system include files suppress non-C89 function
# declarations under __STRICT_ANSI__
- amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | wii | wince )
+ amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | ps3 | wii | wince )
;;
*)
CXXFLAGS="$CXXFLAGS -ansi"
@@ -1770,7 +1858,8 @@ case $_host_os in
mingw*)
DEFINES="$DEFINES -DWIN32"
DEFINES="$DEFINES -D__USE_MINGW_ANSI_STDIO=0"
- LIBS="$LIBS -lmingw32 -lwinmm"
+ LDFLAGS="$LDFLAGS -static-libgcc -static-libstdc++"
+ LIBS="$LIBS -lmingw32 -lwinmm -lgdi32"
OBJS="$OBJS scummvmwinres.o"
add_line_to_config_mk 'WIN32 = 1'
;;
@@ -1794,6 +1883,16 @@ case $_host_os in
DEFINES="$DEFINES -D_EE"
DEFINES="$DEFINES -D__PLAYSTATION2__"
;;
+ ps3)
+ # Force use of SDL from the ps3 toolchain
+ _sdlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
+
+ DEFINES="$DEFINES -DPLAYSTATION3"
+ CXXFLAGS="$CXXFLAGS -mcpu=cell -mminimal-toc -I$PS3DEV/psl1ght/ppu/include -I$PS3DEV/portlibs/ppu/include"
+ LDFLAGS="$LDFLAGS -L$PS3DEV/psl1ght/ppu/lib -L$PS3DEV/portlibs/ppu/lib"
+ add_line_to_config_mk 'PLAYSTATION3 = 1'
+ add_line_to_config_h "#define PREFIX \"${prefix}\""
+ ;;
psp)
if test -d "$PSPDEV/psp/lib"; then
LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib"
@@ -1970,6 +2069,7 @@ if test -n "$_host"; then
gamecube)
_backend="wii"
_build_scalers=no
+ _vkeybd=yes
_mt32emu=no
_port_mk="backends/platform/wii/wii.mk"
add_line_to_config_mk 'GAMECUBE = 1'
@@ -2151,6 +2251,11 @@ if test -n "$_host"; then
CXXFLAGS="$CXXFLAGS -s"
fi
;;
+ ps3)
+ _mt32emu=no
+ _timidity=no
+ _vkeybd=yes
+ ;;
psp)
_backend="psp"
_build_scalers=no
@@ -2179,6 +2284,7 @@ if test -n "$_host"; then
wii)
_backend="wii"
_build_scalers=no
+ _vkeybd=yes
_port_mk="backends/platform/wii/wii.mk"
add_line_to_config_mk 'GAMECUBE = 0'
add_line_to_config_h '#define AUDIO_REVERSE_STEREO'
@@ -2193,6 +2299,7 @@ if test -n "$_host"; then
LDFLAGS="$LDFLAGS -Wl,--stack,65536"
_tremolo=yes
_backend="wince"
+ _detectlang=yes
_mt32emu=no
_port_mk="backends/platform/wince/wince.mk"
;;
@@ -2207,16 +2314,9 @@ fi
#
case $_backend in
android)
- # ssp at this point so the cxxtests link
- if test "$_debug_build" = yes; then
- CXXFLAGS="$CXXFLAGS -fstack-protector"
- else
- CXXFLAGS="$CXXFLAGS -fno-stack-protector"
- fi
+ DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE"
CXXFLAGS="$CXXFLAGS -Wa,--noexecstack"
LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
-
- DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE"
;;
dc)
INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc'
@@ -2340,6 +2440,15 @@ case $_backend in
LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`"
DEFINES="$DEFINES -DSDL_BACKEND"
add_line_to_config_mk "SDL_BACKEND = 1"
+
+ _sdlversion=`$_sdlconfig --version`
+ case $_sdlversion in
+ 1.3.*)
+ add_line_to_config_mk "USE_SDL13 = 1"
+ ;;
+ *)
+ ;;
+ esac
;;
esac
@@ -2371,7 +2480,7 @@ esac
#
echo_n "Checking if host is POSIX compliant... "
case $_host_os in
- amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | n64 | ps2 | psp | wii | wince)
+ 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* | mint* | netbsd* | openbsd* | solaris* | sunos* | uclinux* | webos)
@@ -2927,6 +3036,43 @@ define_in_config_h_if_yes "$_readline" 'USE_READLINE'
define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE_FOR_DEBUGGER'
#
+# Check for Unity if taskbar integration is enabled
+#
+echocheck "libunity"
+if test "$_unix" = no || test "$_taskbar" = no; then
+ _libunity=no
+else
+if test "$_libunity" = auto ; then
+ case $_host_os in
+ mingw*)
+ # pkgconfig and unity are not supported on mingw
+ _libunity=no
+ ;;
+ *)
+ # Unity has a lots of dependencies, update the libs and cflags var with them
+ LIBUNITY_LIBS="$LIBUNITY_LIBS $(pkg-config --libs unity = 3.8.4 2>> "$TMPLOG")"
+ LIBUNITY_CFLAGS="$LIBUNITY_CFLAGS $(pkg-config --cflags unity = 3.8.4 2>> "$TMPLOG")"
+ _libunity=no
+ cat > $TMPC << EOF
+#include <unity.h>
+int main(void) {
+ unity_launcher_entry_get_for_desktop_id("scummvm.desktop");
+ return 0;
+}
+EOF
+ cc_check $LIBUNITY_CFLAGS $LIBUNITY_LIBS && _libunity=yes
+ ;;
+ esac
+fi
+if test "$_libunity" = yes ; then
+ LIBS="$LIBS $LIBUNITY_LIBS"
+ INCLUDES="$INCLUDES $LIBUNITY_CFLAGS"
+fi
+define_in_config_h_if_yes "$_libunity" 'USE_TASKBAR_UNITY'
+fi
+echo "$_libunity"
+
+#
# Check for OpenGL (ES)
#
echocheck "OpenGL"
@@ -3084,12 +3230,14 @@ if test "$_translation" = no ; then
else
echo_n "yes ("
- cat > $TMPC << EOF
+ if test "$_detectlang" != yes ; then
+ cat > $TMPC << EOF
#include <locale.h>
int main(void) { setlocale(LC_ALL, ""); return 0; }
EOF
- _detectlang=no
- cc_check $LDFLAGS $CXXFLAGS && _detectlang=yes
+ _detectlang=no
+ cc_check $LDFLAGS $CXXFLAGS && _detectlang=yes
+ fi
define_in_config_h_if_yes $_detectlang 'USE_DETECTLANG'
if test "$_detectlang" = yes ; then
@@ -3100,6 +3248,36 @@ EOF
fi
#
+# Check whether to build taskbar integration support
+#
+echo_n "Building taskbar integration support... "
+define_in_config_if_yes $_taskbar 'USE_TASKBAR'
+if test "$_taskbar" = yes; then
+ case $_host_os in
+ mingw*)
+ LIBS="$LIBS -lole32 -luuid"
+ echo "win32"
+ ;;
+ *)
+ if test "$_libunity" = yes; then
+ echo "unity"
+ else
+ echo "$_taskbar"
+ fi
+ ;;
+ esac
+else
+ echo "$_taskbar"
+fi
+
+#
+# Check whether to build Bink video support
+#
+echo_n "Building Bink video support... "
+define_in_config_if_yes $_bink 'USE_BINK'
+echo "$_bink"
+
+#
# Figure out installation directories
#
test "x$prefix" = xNONE && prefix=/usr/local
@@ -3135,6 +3313,10 @@ fi
echo_n "Backend... "
echo_n "$_backend"
+if test "$_backend" = "sdl" -a -n "$_sdlversion"; then
+ echo_n " ($_sdlversion)"
+fi
+
if test "$_nasm" = yes ; then
echo_n ", assembly routines"
fi
@@ -3175,6 +3357,13 @@ fi
#
case $_backend in
android)
+ # ssp at this point so the cxxtests link
+ if test "$_debug_build" = yes; then
+ CXXFLAGS="$CXXFLAGS -fstack-protector"
+ else
+ CXXFLAGS="$CXXFLAGS -fno-stack-protector"
+ fi
+
static_libs=''
system_libs=''
for lib in $LIBS; do
@@ -3256,6 +3445,23 @@ for engine in $_engines; do
done
#
+# Detection of WIP/unstable engines
+#
+for engine in $_engines; do
+ engine_build=`get_engine_build $engine`
+ engine_build_default=`get_engine_build_default $engine`
+ engine_wip=false
+ if test $engine_build != no -a $engine_build_default = no ; then
+ engine_wip=true
+ set_var _tainted_build "yes"
+ fi
+ engine_wip_defname="ENGINE_WIP_`echo $engine | tr '[a-z]' '[A-Z]'`"
+ add_line_to_config_h "#define $engine_wip_defname $engine_wip"
+done
+
+add_to_config_h_if_yes `get_var _tainted_build` '#define TAINTED_BUILD'
+
+#
# Show which engines ("frontends") are to be built
#
echo
@@ -3280,6 +3486,12 @@ if test -n "$_engines_skipped" ; then
s/#/ /g'
fi
+if test -n "$_engines_built_wip" ; then
+ echo "WARNING: This ScummVM build contains the following UNSTABLE engines:"
+ echo $_engines_built_wip | sed 's/@/\
+/g
+s/#/ /g'
+fi
echo
echo "Creating config.h"
@@ -3320,6 +3532,7 @@ AS := $_as
ASFLAGS := $ASFLAGS
WINDRES := $_windres
WINDRESFLAGS := $WINDRESFLAGS
+STAGINGPATH=$_stagingpath
WIN32PATH=$_win32path
AOS4PATH=$_aos4path
STATICLIBPATH=$_staticlibpath
diff --git a/devtools/convbdf.c b/devtools/convbdf.c
index 4b1640dba7..e465b77a9c 100644
--- a/devtools/convbdf.c
+++ b/devtools/convbdf.c
@@ -721,7 +721,7 @@ int gen_c_source(struct font* pf, char *path) {
char bbuf[256];
char hdr1[] = {
"/* Generated by convbdf on %s. */\n"
- "#include \"graphics/font.h\"\n"
+ "#include \"graphics/fonts/bdf.h\"\n"
"\n"
"/* Font information:\n"
" name: %s\n"
@@ -890,7 +890,7 @@ int gen_c_source(struct font* pf, char *path) {
fprintf(ofp,
"/* Exported structure definition. */\n"
- "static const FontDesc desc = {\n"
+ "static const BdfFontDesc desc = {\n"
"\t" "\"%s\",\n"
"\t" "%d,\n"
"\t" "%d,\n"
@@ -917,7 +917,7 @@ int gen_c_source(struct font* pf, char *path) {
pf->defaultchar);
fprintf(ofp, "\n" "#if !(defined(__GP32__))\n");
- fprintf(ofp, "extern const NewFont g_sysfont(desc);\n");
+ fprintf(ofp, "extern const BdfFont g_sysfont(desc);\n");
fprintf(ofp, "#else\n");
fprintf(ofp, "DEFINE_FONT(g_sysfont)\n");
fprintf(ofp, "#endif\n");
diff --git a/devtools/create_hugo/create_hugo.cpp b/devtools/create_hugo/create_hugo.cpp
index e54ade2b28..63b57f9c8f 100644
--- a/devtools/create_hugo/create_hugo.cpp
+++ b/devtools/create_hugo/create_hugo.cpp
@@ -743,7 +743,7 @@ int main(int argc, char *argv[]) {
writeUint16BE(outFile, 0);
writeUint16BE(outFile, kALnewscr_2d);
writeUint16BE(outFile, 0);
-
+
writeSByte(outFile, NUM_TUNES_1w);
writeSByte(outFile, SILENCE_1w);
writeSByte(outFile, TEST_SOUND_1w);
diff --git a/devtools/create_hugo/staticdisplay.h b/devtools/create_hugo/staticdisplay.h
index 03800017b5..99d155dc13 100644
--- a/devtools/create_hugo/staticdisplay.h
+++ b/devtools/create_hugo/staticdisplay.h
@@ -60,7 +60,7 @@ byte _palette[SIZE_PAL_ARRAY] = {
V2, V2, V2 // BRIGHTWHITE
};
#else
-// Original paletter found in original exe.
+// Original paletter found in original exe.
// Currently disabled, because the result is quite ugly!
// Color table of nearest standard 16 colors in system static palette
#define C1 191 // Low intensity value
diff --git a/devtools/create_kyradat/extract.cpp b/devtools/create_kyradat/extract.cpp
index 2b6499d3fb..5581dacec0 100644
--- a/devtools/create_kyradat/extract.cpp
+++ b/devtools/create_kyradat/extract.cpp
@@ -415,7 +415,7 @@ bool extractKyraForestSeqData(PAKFile &out, const ExtractInformation *info, cons
const uint8 *src = data;
uint8 *dst = buffer;
const PatchEntry *patchPos = patchData;
-
+
while (dst < (buffer + outsize)) {
if ((dst - buffer) == patchPos->pos) {
*dst++ = patchPos->val;
diff --git a/devtools/create_mads/main.cpp b/devtools/create_mads/main.cpp
index c5cd6d5b2e..aec9e45b8b 100644
--- a/devtools/create_mads/main.cpp
+++ b/devtools/create_mads/main.cpp
@@ -48,7 +48,7 @@ void link(const char *destFilename, char **srcFilenames, int srcCount) {
fwrite(headerStr, 1, 4, destFile);
for (int i = 0; i <= srcCount; ++i)
fwrite(&v, 1, 4, destFile);
-
+
// Set up buffer for copying
void *tempBuffer = malloc(BUFFER_SIZE);
@@ -117,7 +117,7 @@ int main(int argc, char *argv[]) {
// Change the extension
strcpy(p, ".bin");
}
-
+
// Compile the specified source file
bool result = Compile(argv[1], destFilename);
return result ? 0 : 1;
diff --git a/devtools/create_mads/parser.cpp b/devtools/create_mads/parser.cpp
index 0c6df43046..5df505e0df 100644
--- a/devtools/create_mads/parser.cpp
+++ b/devtools/create_mads/parser.cpp
@@ -44,7 +44,7 @@ enum CharCode {
};
enum TokenCode {
- NO_TOKEN, WORD, NUMBER, IDENTIFIER, END_OF_FILE, END_OF_LINE,
+ NO_TOKEN, WORD, NUMBER, IDENTIFIER, END_OF_FILE, END_OF_LINE,
RW_DEFINE, RW_COLON, RW_SUB, RW_END, RW_OPCODE,
ERROR
};
@@ -58,7 +58,7 @@ struct Literal {
union {
int integer;
} value;
-};
+};
struct SymbolEntry {
char symbol[MAX_TOKEN_STRING_LENGTH];
@@ -109,12 +109,12 @@ struct OpcodeEntry {
};
OpcodeEntry OpcodeList[OP_DUP + 1] = {
- {"HALT", OP_NO_PARAM}, {"IMM", OP_IMM_PARAM}, {"ZERO", OP_NO_PARAM}, {"ONE", OP_NO_PARAM},
- {"MINUSONE", OP_NO_PARAM}, {"STR", OP_IMM_PARAM}, {"DLOAD", OP_IMM_PARAM}, {"DSTORE", OP_IMM_PARAM},
+ {"HALT", OP_NO_PARAM}, {"IMM", OP_IMM_PARAM}, {"ZERO", OP_NO_PARAM}, {"ONE", OP_NO_PARAM},
+ {"MINUSONE", OP_NO_PARAM}, {"STR", OP_IMM_PARAM}, {"DLOAD", OP_IMM_PARAM}, {"DSTORE", OP_IMM_PARAM},
{"PAL", OP_IMM_PARAM}, {"LOAD", OP_IMM_PARAM}, {"GLOAD", OP_IMM_PARAM}, {"STORE", OP_IMM_PARAM},
{"GSTORE", OP_IMM_PARAM}, {"CALL", OP_IMM_PARAM}, {"LIBCALL", OP_IMM_PARAM}, {"RET", OP_NO_PARAM},
{"ALLOC", OP_IMM_PARAM}, {"JUMP", OP_TRANSFER_PARAM}, {"JMPFALSE", OP_TRANSFER_PARAM},
- {"JMPTRUE", OP_TRANSFER_PARAM}, {"EQUAL", OP_NO_PARAM}, {"LESS", OP_NO_PARAM},
+ {"JMPTRUE", OP_TRANSFER_PARAM}, {"EQUAL", OP_NO_PARAM}, {"LESS", OP_NO_PARAM},
{"LEQUAL", OP_NO_PARAM}, {"NEQUAL", OP_NO_PARAM}, {"GEQUAL", OP_NO_PARAM},
{"GREAT", OP_NO_PARAM}, {"PLUS", OP_NO_PARAM}, {"MINUS", OP_NO_PARAM},
{"LOR", OP_NO_PARAM}, {"MULT", OP_NO_PARAM}, {"DIV", OP_IMM_PARAM}, {"MOD", OP_NO_PARAM},
@@ -418,7 +418,7 @@ void handle_define() {
printf("Duplicate symbol encountered.\n");
token = ERROR;
return;
- }
+ }
// Store the new symbol name
strcpy(symbolTable[symbolCount].symbol, token_string);
@@ -529,7 +529,7 @@ void handle_instruction() {
printf("Incorrect opcode parameter encountered\n");
token = ERROR;
return;
- }
+ }
// Apply the correct opcode size to the previously stored opcode and save the byte(s)
if (literal.value.integer <= 0xff) {
@@ -559,7 +559,7 @@ void handle_instruction() {
printf("Incorrect opcode parameter encountered\n");
token = ERROR;
return;
- }
+ }
// Check to see if it's a backward jump to an existing label
int idx = jumpIndexOf(token_string);
@@ -641,7 +641,7 @@ void handle_sub() {
token = ERROR;
return;
}
-
+
// If this is the first subroutine, start writing out the data
if (subroutinesCount == 0)
write_header();
@@ -681,7 +681,7 @@ void handle_sub() {
// Save identifier, it's hopefully a jump symbol
strcpy(jumpDests[jumpDestCount].name, token_string);
get_token();
- if (token != RW_COLON)
+ if (token != RW_COLON)
token = ERROR;
else {
// Save the jump point
@@ -863,7 +863,7 @@ void get_special() {
strToUpper(token_string);
if (token_string[0] == '@')
token = IDENTIFIER;
- else if (!is_reserved_word())
+ else if (!is_reserved_word())
token = ERROR;
}
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 29bc5bfcd5..0b190b3f0e 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -364,6 +364,11 @@ int main(int argc, char *argv[]) {
provider = new CreateProjectTool::CodeBlocksProvider(globalWarnings, projectWarnings);
+
+ // Those libraries are automatically added by MSVC, but we need to add them manually with mingw
+ setup.libraries.push_back("ole32");
+ setup.libraries.push_back("uuid");
+
break;
case kProjectMSVC:
@@ -768,12 +773,14 @@ const Feature s_features[] = {
{ "theora", "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" },
// Feature flags
+ { "bink", "USE_BINK", "", true, "Bink video support" },
{ "scalers", "USE_SCALERS", "", true, "Scalers" },
{ "hqscalers", "USE_HQ_SCALERS", "", true, "HQ scalers" },
{ "16bit", "USE_RGB_COLOR", "", true, "16bit color support" },
{ "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" },
{ "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling.
{ "opengl", "USE_OPENGL", "opengl32", true, "OpenGL support" },
+ { "taskbar", "USE_TASKBAR", "", true, "Taskbar integration support" },
{ "translation", "USE_TRANSLATION", "", true, "Translation support" },
{ "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"},
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there
diff --git a/devtools/create_project/msvc10/create_project.vcxproj b/devtools/create_project/msvc10/create_project.vcxproj
index 3d7f8fdd3d..40c515f26b 100644
--- a/devtools/create_project/msvc10/create_project.vcxproj
+++ b/devtools/create_project/msvc10/create_project.vcxproj
@@ -59,11 +59,11 @@
</Link>
<PostBuildEvent>
<Command>@echo off
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\msvc10\
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\msvc9\
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\msvc8\
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\codeblocks\
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\iphone\</Command>
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -84,10 +84,12 @@ xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\iphone\</Command>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<PostBuildEvent>
- <Command>xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\msvc10\
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\msvc9\
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\msvc8\
-xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\codeblocks\</Command>
+ <Command>@echo off
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc10\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc9\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\msvc8\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\codeblocks\"
+xcopy /Y "$(TargetPath)" "$(SolutionDir)\..\..\..\dists\iphone\"</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>
@@ -120,4 +122,4 @@ xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\codeblocks\</Command>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/devtools/create_project/scripts/installer.vbs b/devtools/create_project/scripts/installer.vbs
index d752355acd..19b4eee49b 100644
--- a/devtools/create_project/scripts/installer.vbs
+++ b/devtools/create_project/scripts/installer.vbs
@@ -72,10 +72,9 @@ Sub CreateInstaller()
' Build command line
Dim commandLine : commandLine = """" & nsisPath & "\makensis.exe"" /V2" & _
" /Dtop_srcdir=""" & rootFolder & """" & _
- " /Dbuild_dir=""" & targetFolder & """" & _
- " /Dtext_dir=""" & rootFolder & """" & _
+ " /Dstaging_dir=""" & targetFolder & """" & _
" /DARCH=""" & arch & """" & _
- " """ & rootFolder & "\dists\nsis\scummvm.nsi"""
+ " """ & rootFolder & "\dists\win32\scummvm.nsi"""
Dim oExec: Set oExec = WshShell.Exec(commandline)
If Err.Number <> 0 Then
diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd
index a5051d8228..dd52c0217c 100644
--- a/devtools/create_project/scripts/postbuild.cmd
+++ b/devtools/create_project/scripts/postbuild.cmd
@@ -23,23 +23,7 @@ if "%~5"=="" goto error_installer
echo Copying data files
echo.
-REM xcopy /F /Y "%~1/AUTHORS" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/COPYING.GPL" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/COPYING" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/COPYING.LGPL" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/COPYRIGHT" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/NEWS" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/README" %~2 1>NUL 2>&1
-
-REM xcopy /F /Y "%~1/dists/engine-data/*.dat" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/dists/engine-data/*.tbl" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/dists/engine-data/*.cpt" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/gui/themes/*.zip" %~2 1>NUL 2>&1
-REM xcopy /F /Y "%~1/gui/themes/translations.dat" %~2 1>NUL 2>&1
-
-xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1
-xcopy /F /Y "%~4/README-SDL" "%~2" 1>NUL 2>&1
-
+xcopy /F /Y "%~4/lib/%~3/SDL.dll" "%~2" 1>NUL 2>&1
xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" "%~2" 1>NUL 2>&1
if "%~5"=="0" goto done
diff --git a/devtools/create_toon/create_toon.cpp b/devtools/create_toon/create_toon.cpp
index bdd57be7df..d01102bb71 100644
--- a/devtools/create_toon/create_toon.cpp
+++ b/devtools/create_toon/create_toon.cpp
@@ -77,8 +77,8 @@ int main(int argc, char *argv[]) {
writeByte(outFile, TOON_DAT_VER_MAJ);
writeByte(outFile, TOON_DAT_VER_MIN);
- // game versions/variantes
- writeUint16BE(outFile, NUM_VARIANTE);
+ // game versions/variants
+ writeUint16BE(outFile, NUM_VARIANTS);
// Write locationDirNotVisited
nbrElem = sizeof(locationDirNotVisited_EN) / sizeof(char *);
@@ -128,7 +128,7 @@ int main(int argc, char *argv[]) {
nbrElem = sizeof(specialInfoLine_SP) / sizeof(char *);
writeTextArray(outFile, specialInfoLine_SP, nbrElem);
-// Not yet handled : miscTexts, endingLine and exitLine. Are they useful?
+ // Not yet handled: miscTexts, endingLine and exitLine. Are they useful?
fclose(outFile);
return 0;
diff --git a/devtools/create_toon/create_toon.h b/devtools/create_toon/create_toon.h
index 60b33013f4..b047959215 100644
--- a/devtools/create_toon/create_toon.h
+++ b/devtools/create_toon/create_toon.h
@@ -30,9 +30,9 @@
#define TOON_DAT_VER_MAJ 0 // 1 byte
#define TOON_DAT_VER_MIN 3 // 1 byte
-// Number of Variante of the game. For the moment, it's the same
-// than the number of languages
-#define NUM_VARIANTE 5
+// Number of variants of the game. For the moment, it's the same
+// as the number of languages
+#define NUM_VARIANTS 5
typedef unsigned char uint8;
typedef unsigned char byte;
diff --git a/devtools/credits.pl b/devtools/credits.pl
index b0f40cbe6e..a124314670 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -447,7 +447,6 @@ begin_credits("Credits");
begin_section("ScummVM Team");
begin_section("Project Leaders");
begin_persons();
- add_person("Max Horn", "Fingolfin", "");
add_person("Eugene Sandulenko", "sev", "");
end_persons();
end_section();
@@ -456,6 +455,7 @@ begin_credits("Credits");
begin_persons();
add_person("James Brown", "ender", "");
add_person("Vincent Hamm", "yaz0r", "ScummVM co-founder, Original Cruise/CinE author");
+ add_person("Max Horn", "Fingolfin", "");
add_person("Ludvig Strigeus", "ludde", "Original ScummVM and SimonVM author");
end_persons();
end_section();
@@ -466,8 +466,8 @@ begin_credits("Credits");
add_person("James Brown", "ender", "(retired)");
add_person("Jonathan Gray", "khalek", "(retired)");
add_person("Vincent Hamm", "yaz0r", "(retired)");
- add_person("Max Horn", "Fingolfin", "");
- add_person("Travis Howell", "Kirben", "(retired)");
+ add_person("Max Horn", "Fingolfin", "(retired)");
+ add_person("Travis Howell", "Kirben", "");
add_person("Pawe&#322; Ko&#322;odziejski", "aquadran", "Codecs, iMUSE, Smush, etc.");
add_person("Gregory Montoir", "cyx", "");
add_person("Eugene Sandulenko", "sev", "FT INSANE, MM NES, MM C64, game detection, Herc/CGA");
@@ -476,7 +476,7 @@ begin_credits("Credits");
begin_section("HE");
add_person("Jonathan Gray", "khalek", "(retired)");
- add_person("Travis Howell", "Kirben", "(retired)");
+ add_person("Travis Howell", "Kirben", "");
add_person("Gregory Montoir", "cyx", "");
add_person("Eugene Sandulenko", "sev", "");
end_section();
@@ -486,7 +486,7 @@ begin_credits("Credits");
add_person("Matthew Hoops", "clone2727", "");
add_person("Filippos Karapetis", "[md5]", "");
add_person("Pawe&#322; Ko&#322;odziejski", "aquadran", "");
- add_person("Walter van Niftrik", "waltervn", "");
+ add_person("Walter van Niftrik", "waltervn", "(retired)");
add_person("Kari Salminen", "Buddha^", "");
add_person("Eugene Sandulenko", "sev", "");
add_person("David Symonds", "dsymonds", "(retired)");
@@ -495,7 +495,7 @@ begin_credits("Credits");
begin_section("AGOS");
add_person("Torbj&ouml;rn Andersson", "eriktorbjorn", "");
add_person("Paul Gilbert", "dreammaster", "");
- add_person("Travis Howell", "Kirben", "(retired)");
+ add_person("Travis Howell", "Kirben", "");
add_person("Oliver Kiehl", "olki", "(retired)");
add_person("Ludvig Strigeus", "ludde", "(retired)");
end_section();
@@ -523,6 +523,11 @@ begin_credits("Credits");
add_person("Pawe&#322; Ko&#322;odziejski", "aquadran", "");
end_section();
+ begin_section("DreamWeb");
+ add_person("Vladimir Menshakov", "whoozle", "");
+ add_person("Torbj&ouml;rn Andersson", "eriktorbjorn", "");
+ end_section();
+
begin_section("Gob");
add_person("Torbj&ouml;rn Andersson", "eriktorbjorn", "");
add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
@@ -601,10 +606,10 @@ begin_credits("Credits");
begin_section("SCI");
add_person("Greg Frieger", "_FRG_", "");
add_person("Paul Gilbert", "dreammaster", "");
- add_person("Max Horn", "Fingolfin", "");
+ add_person("Max Horn", "Fingolfin", "(retired)");
add_person("Filippos Karapetis", "[md5]", "");
add_person("Martin Kiewitz", "m_kiewitz", "");
- add_person("Walter van Niftrik", "waltervn", "");
+ add_person("Walter van Niftrik", "waltervn", "(retired)");
add_person("Willem Jan Palenstijn", "wjp", "");
add_person("Jordi Vilalta Prat", "jvprat", "");
add_person("Lars Skovlund", "lskovlun", "");
@@ -631,7 +636,7 @@ begin_credits("Credits");
begin_section("Sword25");
add_person("Eugene Sandulenko", "sev", "");
add_person("Filippos Karapetis", "[md5]", "");
- add_person("Max Horn", "Fingolfin", "");
+ add_person("Max Horn", "Fingolfin", "(retired)");
add_person("Paul Gilbert", "dreammaster", "");
add_person("Torbj&ouml;rn Andersson", "eriktorbjorn", "");
end_section();
@@ -647,7 +652,7 @@ begin_credits("Credits");
add_person("Fabio Battaglia", "Hkz", "PSX version support");
add_person("Paul Gilbert", "dreammaster", "");
add_person("Sven Hesse", "DrMcCoy", "");
- add_person("Max Horn", "Fingolfin", "");
+ add_person("Max Horn", "Fingolfin", "(retired)");
add_person("Filippos Karapetis", "[md5]", "");
add_person("Joost Peters", "joostp", "");
end_section();
@@ -727,7 +732,7 @@ begin_credits("Credits");
end_section();
begin_section("SDL (Win/Linux/OS X/etc.)");
- add_person("Max Horn", "Fingolfin", "");
+ add_person("Max Horn", "Fingolfin", "(retired)");
add_person("Eugene Sandulenko", "sev", "Asm routines, GFX layers");
end_section();
@@ -748,7 +753,7 @@ begin_credits("Credits");
begin_section("Other subsystems");
begin_section("Infrastructure");
- add_person("Max Horn", "Fingolfin", "Backend &amp; Engine APIs, file API, sound mixer, audiostreams, data structures, etc.");
+ add_person("Max Horn", "Fingolfin", "Backend &amp; Engine APIs, file API, sound mixer, audiostreams, data structures, etc. (retired)");
add_person("Eugene Sandulenko", "sev", "");
add_person("Johannes Schickel", "LordHoto", "");
end_section();
@@ -780,7 +785,6 @@ begin_credits("Credits");
add_person("James Brown", "Ender", "IRC Logs maintainer");
add_person("Thierry Crozat", "criezy", "Wiki maintainer");
add_person("Andre Heider", "dhewg", "Buildbot maintainer");
- add_person("Max Horn", "Fingolfin", "Forum, IRC channel and Mailing list maintainer");
add_person("Joost Peters", "JoostP", "Doxygen Project Documentation maintainer");
add_person("Jordi Vilalta Prat", "jvprat", "Wiki maintainer");
add_person("Eugene Sandulenko", "sev", "Forum, IRC channel, Screen Shots and Mailing list maintainer");
@@ -844,7 +848,7 @@ begin_credits("Credits");
end_section();
begin_section("Mac OS X");
- add_person("Max Horn", "Fingolfin", "");
+ add_person("Max Horn", "Fingolfin", "(retired)");
add_person("Oystein Eftevaag", "vinterstum", "");
end_section();
@@ -874,7 +878,7 @@ begin_credits("Credits");
end_section();
begin_section("Win32");
- add_person("Travis Howell", "Kirben", "(retired)");
+ add_person("Travis Howell", "Kirben", "");
end_section();
begin_section("Win64");
@@ -967,7 +971,7 @@ begin_credits("Credits");
add_person("Nicolas Noble", "pixels", "Config file and ALSA support");
add_person("Tim Phillips", "realmz", "Initial MI1 CD music support");
add_person("", "Quietust", "Sound support for Amiga SCUMM V2/V3 games, MM NES support");
- add_person("", "segra", "Improved support for Apple II/C64 versions of MM");
+ add_person("Robert Crossfield", "segra", "Improved support for Apple II/C64 versions of MM");
add_person("Andreas R&ouml;ver", "", "Broken Sword I &amp; II MPEG2 cutscene support");
add_person("Edward Rudd", "urkle", "Fixes for playing MP3 versions of MI1/Loom audio");
add_person("Daniel Schepler", "dschepler", "Final MI1 CD music support, initial Ogg Vorbis support");
diff --git a/devtools/skycpt/cptcompiler.cpp b/devtools/skycpt/cptcompiler.cpp
index 264646816c..f6ee926075 100644
--- a/devtools/skycpt/cptcompiler.cpp
+++ b/devtools/skycpt/cptcompiler.cpp
@@ -503,7 +503,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
fwrite(&tmp, 2, 1, debOutf);
tmp = 0;
fwrite(&tmp, 2, 1, debOutf);
-
+
printf("DEBUG Output File Position: 0x%08lX\r\n", ftell(debOutf));
printf("reset destination: %ld\n", ftell(debOutf));
for (int cnt = 0; cnt < 6; cnt++) {
diff --git a/devtools/tasmrecover/.gitignore b/devtools/tasmrecover/.gitignore
new file mode 100644
index 0000000000..f2bff8e8d9
--- /dev/null
+++ b/devtools/tasmrecover/.gitignore
@@ -0,0 +1,4 @@
+*.pyc
+dreamgen.*
+_stubs*
+
diff --git a/devtools/tasmrecover/dreamweb/LICENSE b/devtools/tasmrecover/dreamweb/LICENSE
new file mode 100644
index 0000000000..d159169d10
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/LICENSE
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/devtools/tasmrecover/dreamweb/backdrop.asm b/devtools/tasmrecover/dreamweb/backdrop.asm
new file mode 100644
index 0000000000..5dfe20bf5d
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/backdrop.asm
@@ -0,0 +1,876 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+;----------------------------------------------Code to draw floor and panel----
+
+Blockget proc near
+
+ mov ah,al
+ mov al,0
+ mov ds,backdrop
+ mov si,blocks
+ add si,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;--------------------------------------------------------Background display----
+
+
+
+
+
+
+
+
+Drawfloor proc near
+
+ push es bx ;in case this was called during
+ call eraseoldobs ;some sprite update.
+ call drawflags
+ call calcmapad
+ call doblocks
+ call showallobs
+ call showallfree
+ call showallex
+ call paneltomap
+ call initrain
+ mov newobs,0
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Calcmapad proc near
+
+ call getdimension
+
+ push cx dx
+
+ mov al,11
+ sub al,dl
+ sub al,cl
+ sub al,cl
+ cbw
+ mov bx,8
+ mul bx
+ add ax,mapoffsetx
+ mov mapadx,ax
+ pop dx cx
+
+ mov al,10
+ sub al,dh
+ sub al,ch
+ sub al,ch
+ cbw
+ mov bx,8
+ mul bx
+ add ax,mapoffsety
+ mov mapady,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Getdimension proc near ;Routine finds width, length
+ ;and top corner of room
+
+ mov es,buffers
+ mov bx,mapflags
+ mov ch,0
+dimloop1: call addalong
+ cmp al,0
+ jnz finishdim1
+ inc ch
+ jmp dimloop1 ;ch holds y of top corner
+
+finishdim1: mov bx,mapflags
+ mov cl,0
+dimloop2: push bx
+ call addlength
+ pop bx
+ cmp al,0
+ jnz finishdim2
+ inc cl
+ add bx,3
+ jmp dimloop2 ;cl holds x of top corner
+
+finishdim2: mov bx,mapflags+(11*3*9)
+ mov dh,10
+dimloop3: push bx
+ call addalong
+ pop bx
+ cmp al,0
+ jnz finishdim3
+ dec dh
+ sub bx,11*3
+ jmp dimloop3 ;dh holds y of bottom corner
+
+finishdim3: mov bx,mapflags+(3*10)
+ mov dl,11
+dimloop4: push bx
+ call addlength
+ pop bx
+ cmp al,0
+ jnz finishdim4
+ dec dl
+ sub bx,3
+ jmp dimloop4 ;dl holds x of bottom corner
+
+finishdim4: mov al,cl ;cl holds x start
+ mov ah,0
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ mov mapxstart,ax
+ mov al,ch ;ch holds y start
+ mov ah,0
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ mov mapystart,ax
+
+ sub dl,cl
+ sub dh,ch
+ ;dx holds x and y size of room
+ mov al,dl ;dl holds x size
+ mov ah,0
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ mov mapxsize,al
+ mov al,dh ;dh holds y size
+ mov ah,0
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ shl ax,1
+ mov mapysize,al ;cx still holds top left corner
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Addalong proc near
+
+ mov ah,11
+addloop: cmp byte ptr [es:bx],0
+ jnz gotalong
+ add bx,3
+ dec ah
+ jnz addloop
+ mov al,0
+ ret
+gotalong: mov al,1
+ ret
+
+ endp
+
+
+
+
+
+Addlength proc near
+
+ mov ah,10
+addloop2: cmp byte ptr [es:bx],0
+ jnz gotlength
+ add bx,3*11
+ dec ah
+ jnz addloop2
+ mov al,0
+ ret
+gotlength: mov al,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Drawflags proc near
+
+ mov es,buffers
+ mov di,mapflags
+ mov al,mapy
+ mov ah,0
+ mov cx,mapwidth
+ mul cx
+ mov bl,mapx
+ mov bh,0
+ add ax,bx
+ mov si,map
+ add si,ax
+
+ mov cx,10
+$28: push cx
+ mov cx,11
+$28a: mov ds,mapdata
+ lodsb
+ mov ds,backdrop
+ push si ax
+ mov ah,0
+ add ax,ax
+ mov si,flags
+ add si,ax
+ movsw
+ pop ax
+ stosb
+ pop si
+ loop $28a
+ add si,mapwidth-11
+ pop cx
+ loop $28
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;-------------------------------------------------------Set object printing----
+
+Eraseoldobs proc near
+
+ cmp newobs,0
+ jz donterase
+
+ mov es,buffers
+ mov bx,spritetable
+
+ mov cx,16
+oberase: push cx bx
+ mov ax,[es:bx+20]
+ cmp ax,0ffffh
+ jz notthisob
+ mov di,bx
+ mov al,255
+ mov cx,tablesize
+ rep stosb
+notthisob: pop bx cx
+ add bx,tablesize
+ loop oberase
+
+donterase: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Showallobs proc near
+
+ mov es,buffers
+ mov bx,setlist
+ mov listpos,bx
+ mov di,bx
+ mov cx,128*5
+ mov al,255
+ rep stosb
+
+ mov es,setframes
+ mov frsegment,es
+ mov ax,framedata
+ mov dataad,ax
+ mov ax,frames
+ mov framesad,ax
+ mov currentob,0
+
+ mov ds,setdat
+ mov si,0
+
+ mov cx,128
+showobsloop: push cx si
+
+ push si
+ add si,58
+ mov es,setdat
+ call getmapad
+ pop si
+ cmp ch,0
+ jz blankframe
+
+ mov al,[es:si+18]
+ mov ah,0
+ mov currentframe,ax
+ cmp al,255
+ jz blankframe
+
+ push es si
+ call calcfrframe
+ call finalframe
+ pop si es
+
+ mov al,[es:si+18]
+ mov [es:si+17],al
+ cmp byte ptr [es:si+8],0
+ jnz animating
+ cmp byte ptr [es:si+5],5
+ jz animating
+ cmp byte ptr [es:si+5],6
+ jz animating
+ mov ax,currentframe
+ mov ah,0
+ add di,mapadx
+ add bx,mapady
+ call showframe
+ jmp drawnsetob
+
+animating: call makebackob
+
+drawnsetob: mov si,listpos
+ mov es,buffers
+ mov al,savex
+ mov ah,savey
+ mov [es:si],ax
+ mov cx,ax
+ mov ax,savesize
+ add al,cl
+ add ah,ch
+ mov [es:si+2],ax
+ mov al,currentob
+ mov [es:si+4],al
+ add si,5
+ mov listpos,si
+
+blankframe: inc currentob
+ pop si cx
+ add si,64
+ dec cx
+ jz finishedsetobs
+ jmp showobsloop
+
+finishedsetobs: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Makebackob proc near
+
+ cmp newobs,0
+ jz nomake
+
+ mov al,[es:si+5] ; priority
+ mov ah,[es:si+8] ; type - steady, constant,random,door etc.
+ push si ax si
+ mov ax,objectx
+ mov bx,objecty
+ mov ah,bl
+ mov si,ax
+ mov cx,offset cs:backobject
+ mov dx,setframes
+ mov di,framedata
+ call makesprite
+ pop ax
+ mov [es:bx+20],ax
+ pop ax
+ cmp al,255
+ jnz usedpriority ; forgotten to specify priority
+ mov al,0
+usedpriority: mov [es:bx+23],al
+ mov [es:bx+30],ah
+ mov byte ptr [es:bx+16],0
+ mov byte ptr [es:bx+18],0
+ mov byte ptr [es:bx+19],0
+ pop si
+nomake: ret
+
+ endp
+
+
+
+
+;------------------------------------------------------Free object printing----
+
+Showallfree proc near
+
+ mov es,buffers
+ mov bx,freelist
+ mov listpos,bx
+ mov di,freelist
+ mov cx,80*5
+ mov al,255
+ rep stosb
+
+ mov es,freeframes
+ mov frsegment,es
+ mov ax,frframedata
+ mov dataad,ax
+ mov ax,frframes
+ mov framesad,ax
+ mov al,0
+ mov currentfree,al
+
+ mov ds,freedat
+ mov si,2
+
+ mov cx,0
+loop127: push cx si
+
+ push si
+ mov es,freedat
+ call getmapad
+ pop si
+ cmp ch,0
+ jz over138
+
+ mov al,currentfree
+ mov ah,0
+ mov dx,ax
+ add ax,ax
+ add ax,dx
+ mov currentframe,ax
+
+ push es si
+ call calcfrframe
+ mov es,mapstore
+ mov ds,frsegment
+ call finalframe
+ pop si es
+ cmp cx,0
+ jz over138
+
+ mov ax,currentframe
+ mov ah,0
+ add di,mapadx
+ add bx,mapady
+ call showframe
+ mov si,listpos
+ mov es,buffers
+ mov al,savex
+ mov ah,savey
+ mov [es:si],ax
+ mov cx,ax
+ mov ax,savesize
+ add al,cl
+ add ah,ch
+ mov [es:si+2],ax
+ pop ax cx
+ push cx ax
+ mov [es:si+4],cl
+ add si,5
+ mov listpos,si
+
+over138: inc currentfree
+ pop si cx
+ add si,16
+ inc cx
+ cmp cx,80
+ jz finfree
+ jmp loop127
+
+finfree: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Showallex proc near
+
+ mov es,buffers
+ mov bx,exlist
+ mov listpos,bx
+ mov di,exlist
+ mov cx,100*5
+ mov al,255
+ rep stosb
+
+ mov es,extras
+ mov frsegment,es
+ mov ax,exframedata
+ mov dataad,ax
+ mov ax,exframes
+ mov framesad,ax
+ mov currentex,0
+
+ mov si,exdata+2
+
+ mov cx,0
+exloop: push cx si
+
+ mov es,extras
+
+ push si
+ mov ch,0
+ cmp byte ptr [es:si],255
+ jz notinroom
+ mov al,[es:si-2]
+ cmp al,reallocation
+ jnz notinroom
+ call getmapad
+notinroom: pop si
+ cmp ch,0
+ jz blankex
+
+ mov al,currentex
+ mov ah,0
+ mov dx,ax
+ add ax,ax
+ add ax,dx
+ mov currentframe,ax
+
+ push es si
+ call calcfrframe
+ mov es,mapstore
+ mov ds,frsegment
+ call finalframe
+ pop si es
+ cmp cx,0
+ jz blankex
+
+ mov ax,currentframe
+ mov ah,0
+ add di,mapadx
+ add bx,mapady
+ call showframe
+ mov si,listpos
+ mov es,buffers
+ mov al,savex
+ mov ah,savey
+ mov [es:si],ax
+ mov cx,ax
+ mov ax,savesize
+ add al,cl
+ add ah,ch
+ mov [es:si+2],ax
+ pop ax cx
+ push cx ax
+ mov [es:si+4],cl
+ add si,5
+ mov listpos,si
+
+blankex: inc currentex
+ pop si cx
+ add si,16
+ inc cx
+ cmp cx,100
+ jz finex
+ jmp exloop
+
+finex: ret
+
+ endp
+
+
+
+
+
+
+
+Calcfrframe proc near
+
+ mov dx,frsegment
+ mov ax,framesad
+ push ax
+ mov cx,dataad
+ mov ax,currentframe
+ mov ds,dx
+ mov bx,6
+ mul bx
+ add ax,cx
+ mov bx,ax
+ mov cx,[bx]
+ mov ax,[bx+2]
+ mov dx,[bx+4]
+ pop bx
+ push dx
+ add ax,bx ;ax=source add, cx=x,y
+ ;need this later
+ mov savesource,ax
+ mov savesize,cx
+ pop ax
+ push ax
+ mov ah,0
+ mov offsetx,ax
+ pop ax
+ mov al,ah
+ mov ah,0
+ mov offsety,ax
+ ret
+nullframe: pop ax
+ mov cx,0
+ mov savesize,cx
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Finalframe proc near
+
+ mov ax,objecty
+ add ax,offsety
+ mov bx,objectx
+ add bx,offsetx
+ mov savex,bl
+ mov savey,al
+ mov di,objectx
+ mov bx,objecty
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+Adjustlen proc near
+
+ mov ah,al
+ add al,ch
+ cmp al,100
+ jc over242
+ mov al,224
+ sub al,ch
+ mov ch,al
+over242: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Getmapad proc near
+
+ call getxad
+ cmp ch,0
+ jz over146
+ mov objectx,ax
+ call getyad
+ cmp ch,0
+ jz over146
+ mov objecty,ax
+ mov ch,1
+over146: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Getxad proc near
+
+ mov cl,[es:si]
+ inc si
+ mov al,[es:si]
+ inc si
+ mov ah,[es:si]
+ inc si
+ cmp cl,0
+ jnz over148
+ sub al,mapx
+ jc over148
+ cmp al,11
+ jnc over148
+ mov cl,4
+ shl al,cl
+ or al,ah
+ mov ah,0
+ mov ch,1
+ ret
+over148: mov ch,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Getyad proc near
+
+ mov al,[es:si]
+ inc si
+ mov ah,[es:si]
+ inc si
+ sub al,mapy
+ jc over147
+ cmp al,10
+ jnc over147
+ mov cl,4
+ shl al,cl
+ or al,ah
+ mov ah,0
+ mov ch,1
+ ret
+
+over147: mov ch,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/debug.asm b/devtools/tasmrecover/dreamweb/debug.asm
new file mode 100644
index 0000000000..951da4fa3f
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/debug.asm
@@ -0,0 +1,381 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+
+ if debuglevel2
+
+
+Debugkeys proc near
+
+ ret
+
+ endp
+
+
+
+Debugstart proc near
+
+ call allpalette
+ mov reeltohold,-1
+ mov newlocation,23
+ mov dreamnumber,0
+ mov al,"W"
+ mov ah,"S"
+ mov cl,"H"
+ mov ch,"D"
+ call findexobject
+ mov byte ptr [es:bx+12],"S"-"A"
+ mov byte ptr [es:bx+13],"C"-"A"
+ mov byte ptr [es:bx+14],"R"-"A"
+ mov byte ptr [es:bx+15],"W"-"A"
+ mov al,"W"
+ mov ah,"E"
+ mov cl,"T"
+ mov ch,"A"
+ call findexobject
+ mov byte ptr [es:bx+12],"G"-"A"
+ mov byte ptr [es:bx+13],"U"-"A"
+ mov byte ptr [es:bx+14],"N"-"A"
+ mov byte ptr [es:bx+15],"A"-"A"
+ mov al,"W"
+ mov ah,"E"
+ mov cl,"T"
+ mov ch,"B"
+ call findexobject
+ mov byte ptr [es:bx+12],"S"-"A"
+ mov byte ptr [es:bx+13],"H"-"A"
+ mov byte ptr [es:bx+14],"L"-"A"
+ mov byte ptr [es:bx+15],"D"-"A"
+ mov card1money,12342
+
+ ret
+
+ endp
+
+
+
+
+
+Debuggreen proc near
+
+ push ax dx
+ mov al,0
+ mov dx,3c8h
+ out dx,al
+ mov dx,3c9h
+ mov al,0
+ out dx,al
+ mov al,63
+ out dx,al
+ mov al,0
+ out dx,al
+ pop dx ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Debugred proc near
+
+ push ax dx
+ mov al,0
+ mov dx,3c8h
+ out dx,al
+ mov dx,3c9h
+ mov al,63
+ out dx,al
+ mov al,0
+ out dx,al
+ mov al,0
+ out dx,al
+ pop dx ax
+ ret
+
+ endp
+
+
+
+
+Debugblue proc near
+
+ push ax dx
+ mov al,0
+ mov dx,3c8h
+ out dx,al
+ mov dx,3c9h
+ mov al,0
+ out dx,al
+ mov al,0
+ out dx,al
+ mov al,63
+ out dx,al
+ pop dx ax
+ ret
+
+ endp
+
+
+
+
+
+Debugblack proc near
+
+ push dx ax
+ mov al,0
+ mov dx,3c8h
+ out dx,al
+ mov dx,3c9h
+ mov al,0
+ out dx,al
+ mov al,0
+ out dx,al
+ mov al,0
+ out dx,al
+ pop ax dx
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Debug proc near
+
+ push ds dx cx
+ mov ah,3ch
+ mov cx,0
+ mov dx,seg filenamed
+ mov ds,dx
+ mov dx,offset filenamed
+ int 21h
+ mov bx,ax
+ pop cx dx ds
+ push bx
+ mov ah,40h
+ int 21h
+ pop bx
+ mov ah,3eh
+ int 21h
+ ret
+
+filenamed db "DREAMWEB.TXT",0
+
+ endp
+
+
+
+
+
+
+
+
+Shout proc near
+
+ push ax bx cx dx si di es ds
+ call debugblue
+ mov cx,50
+ call hangon
+ call debugblack
+ mov cx,10
+ call hangon
+ pop ds es di si dx cx bx ax
+ ret
+
+ endp
+
+
+Shoutred proc near
+
+ push ax bx cx dx si di es ds
+ call debugred
+ mov cx,4
+ call hangon
+ call debugblack
+ mov cx,40
+ call hangon
+ pop ds es di si dx cx bx ax
+ ret
+
+ endp
+
+
+
+Shoutgreen proc near
+
+ push ax bx cx dx si di es ds
+ call debuggreen
+ mov cx,4
+ call hangon
+ call debugblack
+ mov cx,40
+ call hangon
+ pop ds es di si dx cx bx ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+;Checkmemingame proc near
+
+; cmp charset1,0
+; jz nodebug
+; mov bx,60000
+; mov ah,48h
+; int 21h
+; mov ax,bx
+; mov cl,6
+; shr ax,cl
+; mov di,offset cs:debugtextig
+; call showword
+
+; mov ax,soundbufferwrite
+; ;mov ax,exframepos
+; mov di,offset cs:debugtextex
+; call showword
+
+; ;mov ax,extextpos
+; ;mov di,offset cs:debugtextex2
+; ;call showword
+
+; push cs
+; pop es
+; mov si,offset cs:debugtextig
+; mov al,0
+; mov ah,0
+; mov dl,100
+; mov di,204
+; mov bx,14
+; call printdirect
+; push cs
+; pop es
+; mov si,offset cs:debugtextex
+; mov al,0
+; mov ah,0
+; mov dl,100
+; mov di,204
+; mov bx,22
+; call printdirect
+; push cs
+; pop es
+; mov si,offset cs:debugtextex2
+; mov al,0
+; mov ah,0
+; mov dl,100
+; mov di,204
+; mov bx,30
+; call printdirect
+; mov di,204
+; mov bx,14
+; mov cl,40
+; mov ch,24
+; call multidump
+;nodebug: ret
+
+ endp
+
+debugtextig: db "00000K",0
+
+debugtextex: db "00000b",0
+
+debugtextex2: db "00000b",0
+
+
+
+
+
+
+ if recording
+
+ mov ax,recordpos
+ mov di,offset cs:debugtextr
+ call showword
+
+ mov al,0
+ call print
+ dw 4,4,100
+debugtextr: db "00000",0
+
+ mov si,0
+ mov di,0
+ mov cl,40
+ mov ch,12
+ call multidump
+
+ endif
+
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;Debugax proc near
+;
+; push ax
+; call showpanel
+; pop ax
+; mov di,offset cs:debugaxtext
+; call showword
+;
+; mov di,204
+; mov bx,14
+; mov al,0
+; mov ah,0
+; mov dl,100
+; push cs
+; pop es
+; mov si,offset cs:debugaxtext
+; call printdirect
+; mov di,204
+; mov bx,14
+; mov cl,40
+; mov ch,24
+; call multidump
+; ret
+;
+;debugaxtext db "00000 ",0
+;
+; endp
+
+
+
+
+
+
+
+ endif
diff --git a/devtools/tasmrecover/dreamweb/dreamweb.asm b/devtools/tasmrecover/dreamweb/dreamweb.asm
new file mode 100644
index 0000000000..c222a63178
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/dreamweb.asm
@@ -0,0 +1,6283 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+
+
+
+
+
+
+
+
+
+;ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
+;³ ³
+;³ DREAMWEB ³
+;³ ³
+;³ ³
+;³ ³
+;³ ³
+;³ Written by Neil Dodwell. Graphics by Dave Dew. ³
+;³ ³
+;³ Started on Friday 28 December 1990 at 1:20 pm ³
+;³ ³
+;³ Copyright 1990/1991 Creative Reality ³ ³
+;³ ³
+;³ ³
+;ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;----------------------------------------------------------Assembly options----
+
+JUMPS
+
+playback equ 0
+recording equ 0
+debuglevel1 equ 0 ;memory debug on
+debuglevel2 equ 0 ;debug keys on+shouts
+demo equ 0
+CD equ 1
+Foreign equ 1
+Spanish equ 0
+German equ 0
+
+;----------------------------------------------------------------Code start----
+
+DREAMWEBPROG segment para public 'CODE'
+
+ assume cs:DREAMWEBPROG,ss:STACKSPACE
+
+
+
+
+;------------------------------------------------------------------Includes----
+
+include \pc\dreamweb\vars.asm ;variables and equates
+include \pc\dreamweb\sprite.asm ;sprite routines
+include \pc\dreamweb\vgagrafx.asm ;screen routines for vga
+include \pc\dreamweb\vgafades.asm ;fade routines
+include \pc\dreamweb\titles.asm ;guess!
+include \pc\dreamweb\print.asm ;text printing routines
+include \pc\dreamweb\object.asm ;pickup
+include \pc\dreamweb\backdrop.asm ;draws floor etc.
+include \pc\dreamweb\look.asm ;look command
+include \pc\dreamweb\talk.asm ;conversations
+include \pc\dreamweb\newplace.asm ;travel
+include \pc\dreamweb\monitor.asm ;network machine
+include \pc\dreamweb\use.asm ;individual use routines
+include \pc\dreamweb\keypad.asm ;accept code with keypad
+include \pc\dreamweb\saveload.asm ;in game options
+include \pc\dreamweb\sblaster.asm
+ if debuglevel1
+include \pc\dreamweb\debug.asm
+ else
+ if debuglevel2
+include \pc\dreamweb\debug.asm
+ endif
+ endif
+
+;-----------------------------------------------------------------Main loop----
+
+
+Dreamweb proc near
+
+ call seecommandtail
+
+ call checkbasemem
+ call soundstartup
+ call setkeyboardint
+ call setupemm
+ call allocatebuffers
+ call setmouse
+ call fadedos
+ call gettime
+
+ call clearbuffers
+ call clearpalette
+ call set16colpalette
+ call readsetdata
+ if demo
+ call changeroomnums
+ endif
+ mov wongame,0
+
+ mov dx,offset cs:basicsample
+ call loadsample
+ call setsoundoff
+
+ if demo
+ else
+ call scanfornames
+ cmp al,0
+ jnz dodecisions
+ endif
+
+ call setmode
+ call loadpalfromiff
+
+ call titles
+ call credits
+ jmp playgame
+
+dodecisions: call cls
+ call setmode
+ call decide
+
+ cmp quitrequested, 0
+ jnz exitgame
+
+ cmp getback,4
+ jz mainloop
+
+ call titles
+
+ cmp quitrequested, 0
+ jnz exitgame
+
+ call credits
+
+playgame:
+ cmp quitrequested, 0
+ jnz exitgame
+ call clearchanges
+ call setmode
+ call loadpalfromiff
+ mov location,255
+ mov roomafterdream,1
+ if demo
+ mov newlocation,5
+ else
+ mov newlocation,35
+ endif
+ mov volume,7
+ call loadroom
+ call clearsprites
+ call initman
+ call entrytexts
+ call entryanims
+ mov destpos,3
+ call initialinv
+ mov lastflag,32
+ call startup1
+ mov volumeto,0
+ mov volumedirection,-1
+ mov commandtype,255
+ jmp mainloop
+
+loadnew: if demo
+ cmp newlocation,27
+ jnz not27
+ call fadescreendowns
+ mov cx,260
+ call hangon
+ call clearbeforeload
+ jmp playgame
+not27:
+ endif
+ call clearbeforeload
+ call loadroom
+ call clearsprites
+ call initman
+ call entrytexts
+ call entryanims
+ mov newlocation,255
+ call startup
+ mov commandtype,255
+ call worktoscreenm
+ jmp mainloop
+
+alreadyloaded: mov newlocation,255
+ call clearsprites
+ call initman
+ call startup
+ mov commandtype,255
+
+mainloop:
+ cmp quitrequested, 0
+ jnz exitgame
+
+ call screenupdate
+ cmp wongame,0
+ jnz endofgame
+ cmp mandead,1
+ jz gameover
+ cmp mandead,2
+ jz gameover
+ cmp watchingtime,0
+ jz notwatching
+ mov al,finaldest
+ cmp al,manspath
+ jnz mainloop
+ dec watchingtime
+ jnz mainloop
+
+notwatching: cmp mandead,4
+ jz gameover
+ cmp newlocation,255
+ jnz loadnew
+ jmp mainloop
+
+gameover: if demo
+ call fadescreendowns
+ mov cx,260
+ call hangon
+ call clearbeforeload
+ jmp playgame
+ endif
+ call clearbeforeload
+ call showgun
+ call fadescreendown
+ mov cx,100
+ call hangon
+ jmp dodecisions
+
+endofgame: call clearbeforeload
+ call fadescreendowns
+ mov cx,200
+ call hangon
+ call endgame
+ jmp quickquit2
+
+exitgame:
+ ret
+ endp
+
+
+
+
+ endp
+
+
+
+ if demo
+
+Changeroomnums proc near
+
+ mov di,offset cs:roomdata+10
+ mov cx,50
+changenumloop: mov al,[cs:di]
+ cmp al,"0"
+ jnz nochange
+ mov al,[cs:di+1]
+ cmp al,"5"
+ jnz nochange
+ mov al,"6"
+ mov ah,"0"
+ mov [cs:di],ax
+nochange: add di,32
+ loop changenumloop
+ ret
+
+ endp
+
+ endif
+
+
+
+
+Entrytexts proc near
+
+ cmp location,21
+ jnz notloc15
+ mov al,28
+ mov cx,60
+ mov dx,11
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ ret
+notloc15: cmp location,30
+ jnz notloc43
+ mov al,27
+ mov cx,60
+ mov dx,11
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ ret
+notloc43: cmp location,23
+ jnz notloc23
+ mov al,29
+ mov cx,60
+ mov dx,11
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ ret
+notloc23: cmp location,31
+ jnz notloc44
+ mov al,30
+ mov cx,60
+ mov dx,11
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ ret
+notloc44: cmp location,20
+ jnz notsarters2
+ mov al,31
+ mov cx,60
+ mov dx,11
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ ret
+notsarters2: cmp location,24
+ jnz notedenlob
+ mov al,32
+ mov cx,60
+ mov dx,3
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ ret
+notedenlob: cmp location,34
+ jnz noteden2
+ mov al,33
+ mov cx,60
+ mov dx,3
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ ret
+noteden2: ret
+
+ endp
+
+
+
+
+
+
+
+
+Entryanims proc near
+
+ mov reeltowatch,-1
+ mov watchmode,-1
+ cmp location,33
+ jnz notinthebeach
+ call switchryanoff
+ mov watchingtime,76*2
+ mov reeltowatch,0
+ mov endwatchreel,76
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+notinthebeach: cmp location,44
+ jnz notsparkys
+ mov al,8
+ call resetlocation
+ mov watchingtime,50*2
+ mov reeltowatch,247
+ mov endwatchreel,297
+ mov watchspeed,1
+ mov speedcount,1
+ call switchryanoff
+ ret
+notsparkys: cmp location,22
+ jnz notinthelift
+ mov watchingtime,31*2
+ mov reeltowatch,0
+ mov endwatchreel,30
+ mov watchspeed,1
+ mov speedcount,1
+ call switchryanoff
+ ret
+notinthelift: cmp location,26
+ jnz notunderchurch
+ mov symboltopnum,2
+ mov symbolbotnum,1
+ ret
+notunderchurch: cmp location,45
+ jnz notenterdream
+ mov keeperflag,0
+ mov watchingtime,296
+ mov reeltowatch,45
+ mov endwatchreel,198
+ mov watchspeed,1
+ mov speedcount,1
+ call switchryanoff
+ ret
+notenterdream: cmp reallocation,46
+ jnz notcrystal
+ cmp sartaindead,1
+ jnz notcrystal
+ mov al,0
+ call removefreeobject
+ ret
+notcrystal: cmp location,9
+ jnz nottopchurch
+ mov al,2
+ call checkifpathison
+ jz nottopchurch
+ cmp aidedead,0
+ jz nottopchurch
+ mov al,3
+ call checkifpathison
+ jnz makedoorsopen
+ mov al,2
+ call turnpathon
+makedoorsopen: mov al,4
+ call removesetobject
+ mov al,5
+ call placesetobject
+ ret
+nottopchurch: cmp location,47
+ jnz notdreamcentre
+ mov al,4
+ call placesetobject
+ mov al,5
+ call placesetobject
+ ret
+notdreamcentre: cmp location,38
+ jnz notcarpark
+ mov watchingtime,57*2
+ mov reeltowatch,4
+ mov endwatchreel,57
+ mov watchspeed,1
+ mov speedcount,1
+ call switchryanoff
+ ret
+notcarpark: cmp location,32
+ jnz notalley
+ mov watchingtime,66*2
+ mov reeltowatch,0
+ mov endwatchreel,66
+ mov watchspeed,1
+ mov speedcount,1
+ call switchryanoff
+ ret
+notalley: cmp location,24
+ jnz notedensagain
+ mov al,2
+ mov ah,roomnum
+ dec ah
+ call turnanypathon
+notedensagain: ret
+
+ endp
+
+
+
+
+
+
+ if demo
+Initialinv proc near
+
+ mov al,11
+ mov ah,5
+ call pickupob
+ mov al,12
+ mov ah,6
+ call pickupob
+ mov al,13
+ mov ah,7
+ call pickupob
+ mov al,14
+ mov ah,8
+ call pickupob
+ mov al,18
+ mov ah,0
+ call pickupob
+ mov al,19
+ mov ah,1
+ call pickupob
+ mov al,20
+ mov ah,9
+ call pickupob
+ mov al,16
+ mov ah,2
+ call pickupob
+
+ mov al,2
+ mov ah,4
+ call pickupob
+
+ mov al,29
+ mov ah,10
+ call pickupob
+ mov al,33
+ mov ah,11
+ call pickupob
+ mov al,44
+ mov ah,12
+ call pickupob
+ mov card1money,12342
+ ret
+
+ endp
+ else
+Initialinv proc near
+
+ cmp reallocation,24
+ jz isedens
+ ret
+
+isedens: mov al,11
+ mov ah,5
+ call pickupob
+ mov al,12
+ mov ah,6
+ call pickupob
+ mov al,13
+ mov ah,7
+ call pickupob
+ mov al,14
+ mov ah,8
+ call pickupob
+ mov al,18
+ mov al,18
+ mov ah,0
+ call pickupob
+ mov al,19
+ mov ah,1
+ call pickupob
+ mov al,20
+ mov ah,9
+ call pickupob
+ mov al,16
+ mov ah,2
+ call pickupob
+
+ mov watchmode,1
+ mov reeltohold,0
+ mov endofholdreel,6
+ mov watchspeed,1
+ mov speedcount,1
+ call switchryanoff
+ ret
+
+ endp
+
+ endif
+
+
+
+
+
+
+
+
+
+
+
+Pickupob proc near
+
+ mov lastinvpos,ah
+ mov objecttype,2
+ mov itemframe,al
+ mov command,al
+ call getanyad
+ call transfertoex
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;---------------------------------------------------------Memory allocation----
+
+
+
+
+Setupemm proc near
+
+ cmp soundint,255
+ jz noneedforemm
+ call checkforemm
+
+ mov ah,43h ;allocate handle and 160 pages
+ mov bx,176 ;was 176
+ int 67h
+ cmp ah,0
+ jnz emmerror1 ;if there's an error drop to DOS
+ mov emmhandle,dx
+ mov ah,41h ;get the page frame base address
+ int 67h
+ cmp ah,0
+ jnz emmerror1
+ mov emmpageframe,bx
+ mov ax,bx
+ mov cl,12
+ shr ax,cl
+ mov emmhardwarepage,al
+noneedforemm: ret
+emmerror1: mov gameerror,1
+ jmp quickquit2
+
+ endp
+
+
+
+
+
+
+
+
+Removeemm proc near
+
+ cmp soundint,255
+ jz noneedtoremove
+ mov ah,45h
+ mov dx,emmhandle
+ int 67h
+noneedtoremove: ret
+
+ endp
+
+
+
+
+
+Checkforemm proc near
+
+ ret
+
+ endp
+
+
+
+
+Checkbasemem proc near
+
+ mov bx,howmuchalloc
+ cmp bx,9360h
+ jnc enoughmem
+ mov gameerror,5
+ jmp quickquit
+enoughmem: ret
+
+ endp
+
+
+
+Allocatebuffers proc near
+
+ mov bx,lengthofextra/16
+ call allocatemem
+ mov extras,ax
+
+ call trysoundalloc
+ mov bx,lengthofmap/16
+ call allocatemem
+ mov mapdata,ax
+
+ call trysoundalloc
+ mov bx,lengthofbuffer/16
+ call allocatemem
+ mov buffers,ax
+
+ call trysoundalloc
+ mov bx,freedatlen/16
+ call allocatemem
+ mov freedat,ax
+
+ call trysoundalloc
+ mov bx,setdatlen/16
+ call allocatemem
+ mov setdat,ax
+
+ call trysoundalloc
+ mov bx,lenofmapstore/16
+ call allocatemem
+ mov mapstore,ax
+
+ if recording
+ mov bx,1028
+ call allocatemem
+ mov recordspace,ax
+ endif
+
+ if playback
+ mov bx,1028
+ call allocatemem
+ mov recordspace,ax
+ endif
+
+ call allocatework
+
+ mov bx,2048/16
+ call allocatemem
+ mov sounddata,ax
+
+ mov bx,2048/16
+ call allocatemem
+ mov sounddata2,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Clearbuffers proc near
+
+ mov es,buffers
+ mov cx,lengthofbuffer/2
+ mov ax,0
+ mov di,0
+ rep stosw
+
+ mov es,extras
+ mov cx,lengthofextra/2
+ mov ax,0ffffh
+ mov di,0
+ rep stosw
+
+ mov es,buffers
+ mov di,initialreelrouts
+ push cs
+ pop ds
+ mov si,offset cs:reelroutines
+ mov cx,lenofreelrouts
+ rep movsb
+
+ mov es,buffers
+ mov di,initialvars
+ push cs
+ pop ds
+ mov si,offset cs:startvars
+ mov cx,lengthofvars
+ rep movsb
+ call clearchanges
+ ret
+
+ endp
+
+
+
+
+
+
+Clearchanges proc near
+
+ mov es,buffers
+ mov cx,numchanges*2
+ mov ax,0ffffh
+ mov di,listofchanges
+ rep stosw
+ mov ds,buffers
+ mov si,initialreelrouts
+ push cs
+ pop es
+ mov di,offset cs:reelroutines
+ mov cx,lenofreelrouts
+ rep movsb
+
+ mov ds,buffers
+ mov si,initialvars
+ push cs
+ pop es
+ mov di,offset cs:startvars
+ mov cx,lengthofvars
+ rep movsb
+
+ mov expos,0
+ mov exframepos,0
+ mov extextpos,0
+ mov es,extras
+ mov cx,lengthofextra/2
+ mov ax,0ffffh
+ mov di,0
+ rep stosw
+
+ push cs
+ pop es
+ mov di,offset cs:roomscango
+ mov al,1
+ stosb
+ stosb
+ mov al,0
+ stosb
+ mov al,1
+ stosb
+ mov ax,0
+ mov cx,6
+ rep stosw
+ ret
+
+ endp
+
+
+
+
+
+
+
+Clearbeforeload proc near ;deallocates variable buffers
+ ;and clears out fixed ones
+ cmp roomloaded,1
+ jnz noclear
+ call clearreels
+ call clearrest
+ mov roomloaded,0
+noclear: ret
+
+ endp
+
+
+
+;Clearnoreels proc near
+;
+; cmp roomloaded,1
+; jnz noclear2
+; call clearrest
+; mov roomloaded,0
+;noclear2: ret
+;
+; endp
+
+
+
+
+
+
+Clearreels proc near
+
+ mov es,reel1
+ call deallocatemem
+ mov es,reel2
+ call deallocatemem
+ mov es,reel3
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+Clearrest proc near
+
+ mov es,mapdata
+ mov cx,maplen/2
+ mov ax,0
+ mov di,map
+ rep stosw
+
+ mov es,backdrop
+ call deallocatemem
+ mov es,setframes
+ call deallocatemem
+ mov es,reels
+ call deallocatemem
+ mov es,people
+ call deallocatemem
+ mov es,setdesc
+ call deallocatemem
+ mov es,blockdesc
+ call deallocatemem
+ mov es,roomdesc
+ call deallocatemem
+ mov es,freeframes
+ call deallocatemem
+ mov es,freedesc
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+
+
+
+Deallocatemem proc near
+
+ mov ah,49h
+ int 21h
+ jc deallerror
+ ret
+deallerror: mov gameerror,4
+ jmp quickquit2
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Allocatemem proc near
+
+ add bx,2
+ mov ah,48h
+ int 21h
+ jc memerror
+ ret
+
+memerror: mov gameerror,3
+ jmp quickquit2
+
+ endp
+
+
+
+
+Seecommandtail proc near
+
+ mov soundbaseadd,220h
+ mov soundint,5
+ mov sounddmachannel,1
+ mov brightness,0
+
+ mov bx,2
+ mov ax,[es:bx]
+ mov dx,es
+ sub ax,dx
+ mov howmuchalloc,ax
+
+ mov bx,02ch
+ mov ax,[es:bx]
+ push es bx
+
+ mov es,ax
+ mov bx,0
+findblaster: mov ax,[es:bx]
+ cmp ax,0
+ jz endofenvironment
+ cmp al,"B"
+ jnz notblast
+ cmp ah,"L"
+ jnz notblast
+ cmp byte ptr [es:bx+2],"A"
+ jnz notblast
+ cmp byte ptr [es:bx+3],"S"
+ jnz notblast
+ cmp byte ptr [es:bx+4],"T"
+ jnz notblast
+ cmp byte ptr [es:bx+5],"E"
+ jnz notblast
+ cmp byte ptr [es:bx+6],"R"
+ jnz notblast
+ add bx,7
+ call parseblaster
+ jmp endofenvironment
+notblast: inc bx
+ jmp findblaster
+
+endofenvironment: pop bx es
+ mov bx,81h
+ call parseblaster
+ ret
+
+ endp
+
+
+
+Parseblaster proc near
+
+lookattail: mov al,[es:bx]
+ cmp al,0
+ jz endtail
+ cmp al,13
+ jz endtail
+ cmp al,"i"
+ jz issoundint
+ cmp al,"I"
+ jz issoundint
+ cmp al,"b"
+ jz isbright
+ cmp al,"B"
+ jz isbright
+ cmp al,"a"
+ jz isbaseadd
+ cmp al,"A"
+ jz isbaseadd
+ cmp al,"n"
+ jz isnosound
+ cmp al,"N"
+ jz isnosound
+ cmp al,"d"
+ jz isdma
+ cmp al,"D"
+ jz isdma
+ inc bx
+ loop lookattail
+ ret
+
+issoundint: mov al,[es:bx+1]
+ sub al,"0"
+ mov soundint,al
+ inc bx
+ jmp lookattail
+isdma: mov al,[es:bx+1]
+ sub al,"0"
+ mov sounddmachannel,al
+ inc bx
+ jmp lookattail
+isbaseadd: push cx
+ mov al,[es:bx+2]
+ sub al,"0"
+ mov ah,0
+ mov cl,4
+ shl ax,cl
+ add ax,200h
+ mov soundbaseadd,ax
+ pop cx
+ inc bx
+ jmp lookattail
+isbright: mov brightness,1
+ inc bx
+ jmp lookattail
+isnosound: mov soundint,255
+ inc bx
+ jmp lookattail
+endtail: ret
+
+ endp
+
+
+
+
+;-------------------------------------------------------High level routines----
+
+Startup proc near
+
+ mov currentkey,0
+ mov mainmode,0
+ call createpanel
+ mov newobs,1
+ call drawfloor
+ call showicon
+ call getunderzoom
+ call spriteupdate
+ call printsprites
+ call undertextline
+ call reelsonscreen
+ call atmospheres
+ ret
+
+ endp
+
+
+
+
+Startup1 proc near
+
+
+ call clearpalette
+ mov throughdoor,0
+ mov currentkey,"0"
+ mov mainmode,0
+ call createpanel
+ mov newobs,1
+ call drawfloor
+
+ call showicon
+ call getunderzoom
+ call spriteupdate
+ call printsprites
+ call undertextline
+ call reelsonscreen
+ call atmospheres
+ call worktoscreen
+ call fadescreenup
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+;--------------------------------------------------Scroll location routines----
+
+
+
+
+
+Screenupdate proc near
+
+ call newplace
+ call mainscreen
+ call animpointer
+ call showpointer
+ cmp watchingtime,0
+ jnz iswatchingmode
+ cmp newlocation,255
+ jnz finishearly
+iswatchingmode: call vsync
+ call readmouse1
+ call dumppointer
+ call dumptextline
+ call delpointer
+ call autolook
+ call spriteupdate
+ call watchcount
+ call zoom
+ call showpointer
+ cmp wongame,0
+ jnz finishearly
+
+ call vsync
+ call readmouse2
+ call dumppointer
+ call dumpzoom
+ call delpointer
+ call deleverything
+ call printsprites
+ call reelsonscreen
+ call afternewroom
+ call showpointer
+
+ call vsync
+ call readmouse3
+ call dumppointer
+ call dumpmap
+ call dumptimedtext
+ call delpointer
+ call showpointer
+
+ call vsync
+ call readmouse4
+ call dumppointer
+ call dumpwatch
+ call delpointer
+
+finishearly: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Watchreel proc near
+
+ cmp reeltowatch,-1
+ jz notplayingreel
+ mov al,manspath
+ cmp al,finaldest
+ jnz waitstopwalk
+ mov al,turntoface
+ cmp al,facing
+ jz notwatchpath
+waitstopwalk: ret
+
+notwatchpath: dec speedcount
+ cmp speedcount,-1
+ jnz showwatchreel
+ mov al,watchspeed
+ mov speedcount,al
+ mov ax,reeltowatch
+ cmp ax,endwatchreel
+ jnz ismorereel
+ cmp watchingtime,0
+ jnz showwatchreel
+ mov reeltowatch,-1
+ mov watchmode,-1
+ cmp reeltohold,-1
+ jz nomorereel
+ mov watchmode,1
+ jmp notplayingreel
+ismorereel: inc reeltowatch
+showwatchreel: mov ax,reeltowatch
+ mov reelpointer,ax
+ call plotreel
+ mov ax,reelpointer
+ mov reeltowatch,ax
+ call checkforshake
+nomorereel: ret
+
+
+notplayingreel: cmp watchmode,1
+ jnz notholdingreel
+ mov ax,reeltohold
+ mov reelpointer,ax
+ call plotreel
+ ret
+
+notholdingreel: cmp watchmode,2
+ jnz notreleasehold
+ dec speedcount
+ cmp speedcount,-1
+ jnz notlastspeed2
+ mov al,watchspeed
+ mov speedcount,al
+ inc reeltohold
+notlastspeed2: mov ax,reeltohold
+ cmp ax,endofholdreel
+ jnz ismorereel2
+ mov reeltohold,-1
+ mov watchmode,-1
+ mov al,destafterhold
+ mov destination,al
+ mov finaldest,al
+ call autosetwalk
+ ret
+ismorereel2: mov ax,reeltohold
+ mov reelpointer,ax
+ call plotreel
+ ret
+
+notreleasehold: ret
+
+ endp
+
+
+
+
+
+Checkforshake proc near
+
+ cmp reallocation,26
+ jnz notstartshake
+ cmp ax,104
+ jnz notstartshake
+ mov shakecounter,-1
+notstartshake: ret
+
+ endp
+
+
+
+
+
+Watchcount proc near
+
+ cmp watchon,0
+ jz nowatchworn
+ inc timercount
+ cmp timercount,9
+ jz flashdots
+ cmp timercount,18
+ jz uptime
+nowatchworn: ret
+
+flashdots: mov ax,91*3+21
+ mov di,268+4
+ mov bx,21
+ mov ds,charset1
+ call showframe
+ jmp finishwatch
+
+uptime: mov timercount,0
+ add secondcount,1
+ cmp secondcount,60
+ jnz finishtime
+ mov secondcount,0
+ inc minutecount
+ cmp minutecount,60
+ jnz finishtime
+ mov minutecount,0
+ inc hourcount
+ cmp hourcount,24
+ jnz finishtime
+ mov hourcount,0
+
+finishtime: call showtime
+finishwatch: mov watchdump,1
+ ret
+
+ endp
+
+
+
+Showtime proc near
+
+ cmp watchon,0
+ jz nowatch
+
+ mov al,secondcount
+ mov cl,0
+ call twodigitnum
+ push ax
+ mov al,ah
+ mov ah,0
+ add ax,91*3+10
+ mov ds,charset1
+ mov di,282+5
+ mov bx,21
+ call showframe
+ pop ax
+ mov ah,0
+ add ax,91*3+10
+ mov ds,charset1
+ mov di,282+9
+ mov bx,21
+ call showframe
+
+ mov al,minutecount
+ mov cl,0
+ call twodigitnum
+ push ax
+ mov al,ah
+ mov ah,0
+ add ax,91*3
+ mov ds,charset1
+ mov di,270+5
+ mov bx,21
+ call showframe
+ pop ax
+ mov ah,0
+ add ax,91*3
+ mov ds,charset1
+ mov di,270+11
+ mov bx,21
+ call showframe
+
+ mov al,hourcount
+ mov cl,0
+ call twodigitnum
+ push ax
+ mov al,ah
+ mov ah,0
+ add ax,91*3
+ mov ds,charset1
+ mov di,256+5
+ mov bx,21
+ call showframe
+ pop ax
+ mov ah,0
+ add ax,91*3
+ mov ds,charset1
+ mov di,256+11
+ mov bx,21
+ call showframe
+
+ mov ax,91*3+20
+ mov ds,charset1
+ mov di,267+5
+ mov bx,21
+ call showframe
+nowatch: ret
+
+
+ endp
+
+
+
+
+Dumpwatch proc near
+
+ cmp watchdump,1
+ jnz nodumpwatch
+ mov di,256
+ mov bx,21
+ mov cl,40
+ mov ch,12
+ call multidump
+ mov watchdump,0
+nodumpwatch: ret
+
+ endp
+
+
+
+
+Showbyte proc near
+
+ mov dl,al
+ shr dl,1
+ shr dl,1
+ shr dl,1
+ shr dl,1
+ call onedigit
+ mov [es:di],dl
+ mov dl,al
+ and dl,15
+ call onedigit
+ mov [es:di+1],dl
+ add di,3
+ ret
+
+ endp
+
+
+Onedigit proc near
+
+ cmp dl,10
+ jnc morethan10
+ add dl,"0"
+ ret
+morethan10: sub dl,10
+ add dl,"A"
+ ret
+
+ endp
+
+
+
+
+
+Twodigitnum proc near
+
+ mov ah,cl
+ dec ah
+numloop1: inc ah
+ sub al,10
+ jnc numloop1
+ add al,10
+ add al,cl
+ ret
+
+ endp
+
+
+
+
+
+Showword proc near
+
+ mov ch,0
+ mov bx,10000
+ mov cl,47
+word1: inc cl
+ sub ax,bx
+ jnc word1
+ add ax,bx
+ call convnum
+ mov [cs:di],cl
+ mov bx,1000
+ mov cl,47
+word2: inc cl
+ sub ax,bx
+ jnc word2
+ add ax,bx
+ call convnum
+ mov [cs:di+1],cl
+ mov bx,100
+ mov cl,47
+word3: inc cl
+ sub ax,bx
+ jnc word3
+ add ax,bx
+ call convnum
+ mov [cs:di+2],cl
+ mov bx,10
+ mov cl,47
+word4: inc cl
+ sub ax,bx
+ jnc word4
+ add ax,bx
+ call convnum
+ mov [cs:di+3],cl
+ add al,48
+ mov cl,al
+ call convnum
+ mov [cs:di+4],cl
+ ret
+
+ endp
+
+
+
+
+Convnum proc near
+
+ cmp ch,0
+ jnz noconvnum
+ cmp cl,"0"
+ jnz notzeronum
+ mov cl,32
+ jmp noconvnum
+notzeronum: mov ch,1
+noconvnum: ret
+
+ endp
+
+
+
+
+
+
+
+
+;---------------------------------------------Handling of pointer on screen----
+
+Mainscreen proc near
+
+ mov inmaparea,0
+ mov bx,offset cs:mainlist
+ cmp watchon,1
+ jz checkmain
+ mov bx,offset cs:mainlist2
+checkmain: call checkcoords
+ cmp walkandexam,0
+ jz finishmain
+ call walkandexamine
+finishmain: ret
+
+mainlist: dw 44,70,32,46,look
+ dw 0,50,0,180,inventory
+ dw 226,244,10,26,zoomonoff
+ dw 226,244,26,40,saveload
+ dw 240,260,100,124,madmanrun
+ dw 0,320,0,200,identifyob
+ dw 0ffffh
+
+mainlist2: dw 44,70,32,46,look
+ dw 0,50,0,180,inventory
+ dw 226+48,244+48,10,26,zoomonoff
+ dw 226+48,244+48,26,40,saveload
+ dw 240,260,100,124,madmanrun
+ dw 0,320,0,200,identifyob
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+Madmanrun proc near
+
+ cmp location,14
+ jnz identifyob
+ cmp mapx,22
+ jnz identifyob
+ cmp pointermode,2
+ jnz identifyob
+ cmp madmanflag,0
+ jnz identifyob
+
+ cmp commandtype,211
+ jz alreadyrun
+ mov commandtype,211
+ mov al,52
+ call commandonly
+alreadyrun: cmp mousebutton,1
+ jnz norun
+ mov ax,mousebutton
+ cmp ax,oldbutton
+ jz norun
+ mov lastweapon,8
+norun: ret
+
+ endp
+
+
+
+
+
+
+Checkcoords proc near
+ cmp newlocation,255 ;objects keep enumerated even in loading state, fixme
+ jz loop048
+ ret
+
+loop048: mov ax,[cs:bx]
+ cmp ax,0ffffh
+ jz nonefound
+ push bx
+ cmp mousex,ax
+ jl over045
+ mov ax,[cs:bx+2]
+ cmp mousex,ax
+ jge over045
+ mov ax,[cs:bx+4]
+ cmp mousey,ax
+ jl over045
+ mov ax,[cs:bx+6]
+ cmp mousey,ax
+ jge over045
+ mov ax,[cs:bx+8]
+ call ax
+finished: pop ax
+ ret
+over045: pop bx
+ add bx,10
+ jmp loop048
+nonefound: ret
+
+ endp
+
+
+
+
+
+;-------------------------------------------Printing of icons during scroll----
+
+
+
+
+
+Identifyob proc near
+
+ cmp watchingtime,0
+ jnz blank
+
+ mov ax,mousex
+ sub ax,mapadx
+ cmp ax,22*8
+ jc notover1
+ call blank
+ ret
+
+notover1: mov bx,mousey
+ sub bx,mapady
+ cmp bx,20*8
+ jc notover2
+ call blank
+ ret
+
+notover2: mov inmaparea,1
+ mov ah,bl
+ push ax
+ call findpathofpoint
+ mov pointerspath,dl
+ pop ax
+ push ax
+ call findfirstpath
+ mov pointerfirstpath,al
+ pop ax
+
+ call checkifex
+ jnz finishidentify
+ call checkiffree
+ jnz finishidentify
+ call checkifperson
+ jnz finishidentify
+ call checkifset
+ jnz finishidentify
+
+ mov ax,mousex
+ sub ax,mapadx
+ mov cl,al
+ mov ax,mousey
+ sub ax,mapady
+ mov ch,al
+ call checkone
+ cmp al,0
+ jz nothingund
+ ;cmp watchingtime,0
+ ;jnz nothingund
+ cmp mandead,1
+ jz nothingund
+ mov ah,3
+ call obname
+finishidentify: ret
+
+nothingund: call blank
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Checkifperson proc near
+
+ mov es,buffers
+ mov bx,peoplelist
+ mov cx,12
+identifyreel: push cx
+
+ cmp byte ptr [es:bx+4],255
+ jz notareelid
+
+ push es bx ax
+ mov ax,[es:bx+0]
+ mov reelpointer,ax
+ call getreelstart
+ cmp [es:si+2],0ffffh
+ jnz notblankpers
+ add si,5
+notblankpers: mov cx,[es:si+2] ;x,y of reel slot
+ mov ax,[es:si+0] ;frame number
+ push cx
+ call getreelframeax
+ pop cx
+ add cl,[es:bx+4]
+ add ch,[es:bx+5]
+ mov dx,cx
+ add dl,[es:bx+0]
+ add dh,[es:bx+1]
+ pop ax bx es
+
+ cmp al,cl
+ jc notareelid
+ cmp ah,ch
+ jc notareelid
+ cmp al,dl
+ jnc notareelid
+ cmp ah,dh
+ jnc notareelid
+
+ pop cx
+ mov ax,[es:bx+2]
+ mov persondata,ax
+ mov al,[es:bx+4]
+ mov ah,5
+ call obname
+ mov al,0
+ cmp al,1
+ ret
+
+notareelid: pop cx
+ add bx,5
+ dec cx
+ jnz identifyreel
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Checkifset proc near
+
+ mov es,buffers
+ mov bx,setlist+(127*5)
+ mov cx,127
+identifyset: cmp byte ptr [es:bx+4],255
+ jz notasetid
+ cmp al,[es:bx]
+ jc notasetid
+ cmp al,[es:bx+2]
+ jnc notasetid
+ cmp ah,[es:bx+1]
+ jc notasetid
+ cmp ah,[es:bx+3]
+ jnc notasetid
+ call pixelcheckset
+ jz notasetid
+ call isitdescribed
+ jz notasetid
+ mov al,[es:bx+4]
+ mov ah,1
+ call obname
+ mov al,0
+ cmp al,1
+ ret
+notasetid: sub bx,5
+ dec cx
+ cmp cx,-1
+ jnz identifyset
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Checkifex proc near
+
+ mov es,buffers
+ mov bx,exlist+(99*5)
+ mov cx,99
+identifyex: cmp byte ptr [es:bx+4],255
+ jz notanexid
+ cmp al,[es:bx]
+ jc notanexid
+ cmp al,[es:bx+2]
+ jnc notanexid
+ cmp ah,[es:bx+1]
+ jc notanexid
+ cmp ah,[es:bx+3]
+ jnc notanexid
+ mov al,[es:bx+4]
+ mov ah,4
+ call obname
+ mov al,1
+ cmp al,0
+ ret
+notanexid: sub bx,5
+ dec cx
+ cmp cx,-1
+ jnz identifyex
+ ret
+
+ endp
+
+
+
+
+
+
+Checkiffree proc near
+
+ mov es,buffers
+ mov bx,freelist+(79*5)
+ mov cx,79
+identifyfree: cmp byte ptr [es:bx+4],255
+ jz notafreeid
+ cmp al,[es:bx]
+ jc notafreeid
+ cmp al,[es:bx+2]
+ jnc notafreeid
+ cmp ah,[es:bx+1]
+ jc notafreeid
+ cmp ah,[es:bx+3]
+ jnc notafreeid
+ mov al,[es:bx+4]
+ mov ah,2
+ call obname
+ mov al,0
+ cmp al,1
+ ret
+notafreeid: sub bx,5
+ dec cx
+ cmp cx,-1
+ jnz identifyfree
+ ret
+
+ endp
+
+
+
+
+
+
+Isitdescribed proc near
+
+ push ax cx es bx
+ mov al,[es:bx+4] ;get object number
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ mov es,setdesc
+ add bx,settextdat
+ mov ax,[es:bx]
+ add ax,settext
+ mov bx,ax
+ mov dl,[es:bx]
+ pop bx es cx ax
+ cmp dl,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+;Getcurrentpath proc near ;routine finds out which path
+; ;block the pointer is in.
+; push ax ;used to see if an object is
+; call findpathofpoint ;close or not
+; pop ax
+; mov pointerspath,dl
+; ret
+;
+; endp
+
+
+
+
+
+Findpathofpoint proc near
+
+ push ax
+ mov bx,pathdata
+ mov es,reels
+ mov al,roomnum
+ mov ah,0
+ mov cx,144
+ mul cx
+ add bx,ax
+ pop cx
+
+ mov dl,0
+pathloop: mov al,[es:bx+6]
+ cmp al,255
+ jnz flunkedit
+ mov ax,[es:bx+2]
+ cmp ax,0ffffh
+ jz flunkedit
+ cmp cl,al
+ jc flunkedit
+ cmp ch,ah
+ jc flunkedit
+ mov ax,[es:bx+4]
+ cmp cl,al
+ jnc flunkedit
+ cmp ch,ah
+ jnc flunkedit
+ jmp gotvalidpath
+flunkedit: add bx,8
+ inc dl
+ cmp dl,12
+ jnz pathloop
+ mov dl,255
+gotvalidpath: ret
+
+ endp
+
+
+
+
+
+Findfirstpath proc near ;similar to last routine, but it
+ ;searches each path to see if
+ push ax ;pointer is within it, regardless
+ mov bx,pathdata ;of whether the path is on or off
+ mov es,reels ;it returns the on or off state in
+ mov al,roomnum ;al (255=on 0=off) 0 if no path
+ mov ah,0
+ mov cx,144
+ mul cx
+ add bx,ax
+ pop cx
+
+ mov dl,0
+fpathloop: mov ax,[es:bx+2]
+ cmp ax,0ffffh
+ jz nofirst
+ cmp cl,al
+ jc nofirst
+ cmp ch,ah
+ jc nofirst
+ mov ax,[es:bx+4]
+ cmp cl,al
+ jnc nofirst
+ cmp ch,ah
+ jnc nofirst
+ jmp gotfirst
+nofirst: add bx,8
+ inc dl
+ cmp dl,12
+ jnz fpathloop
+ mov al,0
+ ret
+gotfirst: mov al,[es:bx+6]
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Turnpathon proc near ;turns path on permanently
+
+ push ax ax
+ mov cl,255
+ mov ch,roomnum
+ add ch,100
+ call findormake
+ pop ax
+ call getroomspaths
+ pop ax
+ cmp al,255
+ jz nopathon
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,255
+ mov [es:bx+6],al
+nopathon: ret
+
+ endp
+
+
+
+
+
+
+
+Turnpathoff proc near ;turns path on permanently
+
+ push ax ax
+ mov cl,0
+ mov ch,roomnum
+ add ch,100
+ call findormake
+ pop ax
+ call getroomspaths
+ pop ax
+ cmp al,255
+ jz nopathoff
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,0
+ mov [es:bx+6],al
+nopathoff: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Turnanypathon proc near
+
+ push ax ax
+ mov cl,255
+ mov ch,ah
+ add ch,100
+ call findormake
+ pop ax
+ mov al,ah
+ mov ah,0
+ mov cx,144
+ mul cx
+ mov es,reels
+ mov bx,pathdata
+ add bx,ax
+ pop ax
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,255
+ mov [es:bx+6],al
+ ret
+
+ endp
+
+
+
+
+
+
+Turnanypathoff proc near
+
+ push ax ax
+ mov cl,0
+ mov ch,ah
+ add ch,100
+ call findormake
+ pop ax
+ mov al,ah
+ mov ah,0
+ mov cx,144
+ mul cx
+ mov es,reels
+ mov bx,pathdata
+ add bx,ax
+ pop ax
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,0
+ mov [es:bx+6],al
+ ret
+
+ endp
+
+
+
+
+
+Checkifpathison proc near
+
+ push ax
+ call getroomspaths
+ pop ax
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,[es:bx+6]
+ cmp al,255
+ ret
+
+ endp
+
+
+
+
+
+Afternewroom proc near
+
+ cmp nowinnewroom,0
+ jz notnew
+ mov timecount,0
+ call createpanel
+ mov commandtype,0
+ call findroominloc
+
+ cmp ryanon,1
+ jz ryansoff
+
+ mov al,ryanx
+ add al,12
+ mov ah,ryany
+ add ah,12
+ call findpathofpoint
+ mov manspath,dl
+ call findxyfrompath
+ mov resetmanxy,1
+
+ryansoff: mov newobs,1
+ call drawfloor
+ mov lookcounter,160
+ mov nowinnewroom,0
+
+ call showicon
+ call spriteupdate
+ call printsprites
+ call undertextline
+ call reelsonscreen
+ call mainscreen
+ call getunderzoom
+ call zoom
+ call worktoscreenm
+ call walkintoroom
+ call reminders
+ call atmospheres
+notnew: ret
+
+ endp
+
+
+
+
+
+
+Atmospheres proc near
+
+ mov cl,mapx
+ mov ch,mapy
+ mov bx,offset cs:atmospherelist
+nextatmos: mov al,[cs:bx]
+ cmp al,255
+ jz nomoreatmos
+ cmp al,reallocation
+ jnz wrongatmos
+ mov ax,[cs:bx+1]
+ cmp ax,cx
+ jnz wrongatmos
+ mov ax,[cs:bx+3]
+ cmp al,ch0playing
+ jz playingalready
+ cmp location,45
+ jnz notweb
+ cmp reeltowatch,45
+ jz wrongatmos
+notweb: call playchannel0
+ cmp reallocation,2
+ cmp mapy,0
+ jz fullvol
+ jnz notlouisvol
+ cmp mapy,10
+ jnz notlouisvol
+ cmp mapx,22
+ jnz notlouisvol
+ mov volume,5
+notlouisvol: if cd
+ cmp reallocation,14
+ jnz notmad1
+ cmp mapx,33
+ jz ismad2
+ cmp mapx,22
+ jnz notmad1
+ mov volume,5
+ ret
+ismad2: mov volume,0
+ ret
+notmad1: endif
+playingalready: cmp reallocation,2
+ jnz notlouisvol2
+ cmp mapx,22
+ jz louisvol
+ cmp mapx,11
+ jnz notlouisvol2
+fullvol: mov volume,0
+notlouisvol2: ret
+louisvol: mov volume,5
+ ret
+wrongatmos: add bx,5
+ jmp nextatmos
+nomoreatmos: call cancelch0
+ ret
+
+atmospherelist: db 0,33,10,15,255
+ db 0,22,10,15,255
+ db 0,22,0,15,255
+ db 0,11,0,15,255
+ db 0,11,10,15,255
+ db 0,0,10,15,255
+
+ db 1,44,10,6,255 ;location,map x,y,sound,repeat
+ db 1,44,0,13,255
+
+ db 2,33,0,6,255
+ db 2,22,0,5,255
+ db 2,22,10,16,255
+ db 2,11,10,16,255
+
+ db 3,44,0,15,255
+ db 3,33,10,6,255
+ db 3,33,0,5,255
+
+ db 4,11,30,6,255
+ db 4,22,30,5,255
+ db 4,22,20,13,255
+
+ db 10,33,30,6,255
+ db 10,22,30,6,255
+
+ db 9,22,10,6,255
+ db 9,22,20,16,255
+ db 9,22,30,16,255
+ db 9,22,40,16,255
+ db 9,22,50,16,255
+
+ db 6,11,30,6,255
+ db 6,0,10,15,255
+ db 6,0,20,15,255
+ db 6,11,20,15,255
+ db 6,22,20,15,255
+
+ db 7,11,20,6,255
+ db 7,0,20,6,255
+ db 7,0,30,6,255
+
+ db 55,44,0,5,255
+ db 55,44,10,5,255
+
+ db 5,22,30,6,255
+ if demo
+ db 5,22,20,16,255
+ db 5,22,10,16,255
+ else
+ db 5,22,20,15,255
+ db 5,22,10,15,255
+ endif
+
+ db 24,22,0,15,255
+ db 24,33,0,15,255
+ db 24,44,0,15,255
+ db 24,33,10,15,255
+
+ db 8,0,10,6,255
+ db 8,11,10,6,255
+ db 8,22,10,6,255
+ db 8,33,10,6,255
+ db 8,33,20,6,255
+ db 8,33,30,6,255
+ db 8,33,40,6,255
+ db 8,22,40,6,255
+ db 8,11,40,6,255
+
+ db 11,11,20,12,255
+ db 11,11,30,12,255
+ db 11,22,20,12,255
+ db 11,22,30,12,255
+
+ db 12,22,20,12,255
+ db 13,22,20,12,255
+ db 13,33,20,12,255
+
+ db 14,44,20,12,255
+ db 14,33,0,12,255
+ db 14,33,10,12,255
+ db 14,33,20,12,255
+ db 14,33,30,12,255
+ db 14,33,40,12,255
+ db 14,22,0,16,255
+
+ db 19,0,0,12,255
+
+ db 20,0,20,16,255
+ db 20,0,30,16,255
+ db 20,11,30,16,255
+ db 20,0,40,16,255
+ db 20,11,40,16,255
+
+ if demo
+ db 21,11,10,16,255
+ db 21,11,20,16,255
+ db 21,0,20,16,255
+ db 21,22,20,16,255
+ db 21,33,20,16,255
+ db 21,44,20,16,255
+ db 21,44,10,16,255
+ else
+ db 21,11,10,15,255
+ db 21,11,20,15,255
+ db 21,0,20,15,255
+ db 21,22,20,15,255
+ db 21,33,20,15,255
+ db 21,44,20,15,255
+ db 21,44,10,15,255
+ endif
+
+ db 22,22,10,16,255
+ db 22,22,20,16,255
+
+ db 23,22,30,13,255
+ db 23,22,40,13,255
+ db 23,33,40,13,255
+ db 23,11,40,13,255
+ db 23,0,40,13,255
+ db 23,0,50,13,255
+
+ db 25,11,40,16,255
+ db 25,11,50,16,255
+ db 25,0,50,16,255
+
+ db 27,11,20,16,255
+ db 27,11,30,16,255
+
+ db 29,11,10,16,255
+
+ db 45,22,30,12,255
+ db 45,22,40,12,255
+ db 45,22,50,12,255
+
+ db 46,22,40,12,255
+ db 46,11,50,12,255
+ db 46,22,50,12,255
+ db 46,33,50,12,255
+
+ db 47,0,0,12,255
+
+ db 26,22,20,16,255
+ db 26,33,10,16,255
+ db 26,33,20,16,255
+ db 26,33,30,16,255
+ db 26,44,30,16,255
+ db 26,22,30,16,255
+ db 26,11,30,16,255
+ db 26,11,20,16,255
+ db 26,0,20,16,255
+ db 26,11,40,16,255
+ db 26,0,40,16,255
+ db 26,22,40,16,255
+ db 26,11,50,16,255
+
+ db 28,0,30,15,255
+ db 28,0,20,15,255
+ db 28,0,40,15,255
+ db 28,11,30,15,255
+ db 28,11,20,15,255
+ db 28,22,30,15,255
+ db 28,22,20,15,255
+
+ db 255
+
+ endp
+
+
+
+
+
+
+Walkintoroom proc near
+
+ cmp location,14
+ jnz notlair
+ cmp mapx,22
+ jnz notlair
+ mov destination,1
+ mov finaldest,1
+ call autosetwalk
+notlair: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Afterintroroom proc near
+
+ cmp nowinnewroom,0
+ jz notnewintro
+ call clearwork
+ call findroominloc
+ mov newobs,1
+ call drawfloor
+ call reelsonscreen
+ call spriteupdate
+ call printsprites
+ call worktoscreen
+ mov nowinnewroom,0
+notnewintro: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Obname proc near
+
+ cmp reasseschanges,0
+ jz notnewpath
+ mov reasseschanges,0
+ jmp diff
+
+notnewpath: cmp ah,commandtype
+ jz notdiffob
+ jmp diff
+notdiffob: cmp al,command
+ jnz diff
+ cmp walkandexam,1
+ jz walkandexamine
+ cmp mousebutton,0
+ jz noobselect
+ cmp commandtype,3
+ jnz isntblock
+ cmp lastflag,2
+ jc noobselect
+isntblock: mov bl,manspath
+ cmp bl,pointerspath
+ jnz wantstowalk
+ cmp commandtype,3
+ jz wantstowalk
+ call finishedwalking
+ jnz noobselect
+ cmp commandtype,5
+ jz wantstotalk
+ cmp watchingtime,0
+ jnz noobselect
+ call examineob
+ ret
+wantstotalk: cmp watchingtime,0
+ jnz noobselect
+ call talk
+ ret
+walkandexamine: call finishedwalking
+ jnz noobselect
+ mov al,walkexamtype
+ mov commandtype,al
+ mov al,walkexamnum
+ mov command,al
+ mov walkandexam,0
+ cmp commandtype,5
+ jz noobselect
+ call examineob
+ ret
+wantstowalk: call setwalk
+ mov reasseschanges,1
+noobselect: ret
+
+
+diff: mov command,al
+ mov commandtype,ah
+diff2: cmp linepointer,254
+ jnz middleofwalk
+ cmp watchingtime,0
+ jnz middleofwalk
+ mov al,facing
+ cmp al,turntoface
+ jnz middleofwalk
+ cmp commandtype,3
+ jnz notblock
+ mov bl,manspath
+ cmp bl,pointerspath
+ jnz dontcheck
+ mov cl,ryanx ;look under feet to see if
+ add cl,12 ;any flags are there
+ mov ch,ryany
+ add ch,12
+ call checkone
+ cmp cl,2
+ jc isblock
+dontcheck: call getflagunderp
+ cmp lastflag,2
+ jc isblock
+ cmp lastflag,128
+ jnc isblock
+ jmp toofaraway ; only here for turning on doorstep
+notblock: mov bl,manspath
+ cmp bl,pointerspath
+ jnz toofaraway
+ cmp commandtype,3
+ jz isblock
+ cmp commandtype,5
+ jz isaperson
+ call examineobtext
+ ret
+middleofwalk: call blocknametext
+ ret
+isblock: call blocknametext
+ ret
+isaperson: call personnametext
+ ret
+toofaraway: call walktotext
+ ret
+
+ endp
+
+
+
+
+
+
+
+Finishedwalking proc near
+
+ cmp linepointer,254
+ jnz iswalking
+ mov al,facing
+ cmp al,turntoface
+iswalking: ret
+
+ endp
+
+
+
+
+
+
+
+Examineobtext proc near
+
+ mov bl,command
+ mov bh,commandtype
+ mov al,1
+ call commandwithob
+ ret
+
+ endp
+
+
+
+
+
+Commandwithob proc near
+
+ push ax
+ push ax bx cx dx es ds si di
+ call deltextline
+ pop di si ds es dx cx bx ax
+
+ push bx
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ mov es,commandtext
+ mov ax,[es:bx]
+ add ax,textstart
+ mov si,ax
+
+ mov di,textaddressx
+ mov bx,textaddressy
+ mov dl,textlen
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ pop ax
+ mov di,offset cs:commandline
+ call copyname
+ pop ax
+
+ mov di,lastxpos
+ cmp al,0
+ jz noadd
+ add di,5
+noadd: mov bx,textaddressy
+ push cs
+ pop es
+ mov si,offset cs:commandline
+ mov dl,textlen
+ mov al,0
+ mov ah,0
+ call printdirect
+ mov newtextline,1
+ ret
+
+commandline: db "OBJECT NAME ONE ",0
+
+ endp
+
+
+
+
+Commandonly proc near
+
+ push ax bx cx dx es ds si di
+ call deltextline
+ pop di si ds es dx cx bx ax
+
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ mov es,commandtext
+ mov ax,[es:bx]
+ add ax,textstart
+ mov si,ax
+
+ mov di,textaddressx
+ mov bx,textaddressy
+ mov dl,textlen
+ mov al,0
+ mov ah,0
+ call printdirect
+ mov newtextline,1
+ ret
+
+ endp
+
+
+
+
+
+Printmessage proc near
+
+ push dx bx di
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ mov es,commandtext
+ mov ax,[es:bx]
+ add ax,textstart
+ mov si,ax
+ pop di bx dx
+ mov al,0
+ mov ah,0
+ call printdirect
+ ret
+
+ endp
+
+
+
+Printmessage2 proc near
+
+ push dx bx di
+ push ax
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ mov es,commandtext
+ mov ax,[es:bx]
+ add ax,textstart
+ mov si,ax
+ pop ax
+
+searchmess: push ax
+ call findnextcolon
+ pop ax
+ dec ah
+ jnz searchmess
+
+ pop di bx dx
+ mov al,0
+ mov ah,0
+ call printdirect
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Blocknametext proc near
+
+ mov bl,command
+ mov bh,commandtype
+ mov al,0
+ call commandwithob
+ ret
+
+ endp
+
+
+
+
+Personnametext proc near
+
+ mov bl,command
+ and bl,127
+ mov bh,commandtype
+ mov al,2
+ call commandwithob
+ ret
+
+ endp
+
+
+
+
+
+
+
+Walktotext proc near
+
+ mov bl,command
+ mov bh,commandtype
+ mov al,3
+ call commandwithob
+ ret
+
+ endp
+
+
+
+
+
+Getflagunderp proc near
+
+ mov cx,mousex
+ sub cx,mapadx
+ mov ax,mousey
+ sub ax,mapady
+ mov ch,al
+ call checkone
+ mov lastflag,cl
+ mov lastflagex,ch
+ ret
+
+ endp
+
+
+
+
+
+Setwalk proc near
+
+ cmp linepointer,254
+ jnz alreadywalking
+ mov al,pointerspath
+ cmp al,manspath
+ jz cantwalk2
+ cmp watchmode,1
+ jz holdingreel
+ cmp watchmode,2
+ jz cantwalk
+ mov destination,al
+ mov finaldest,al
+ cmp mousebutton,2
+ jnz notwalkandexam
+ cmp commandtype,3
+ jz notwalkandexam
+ mov walkandexam,1
+ mov al,commandtype
+ mov walkexamtype,al
+ mov al,command
+ mov walkexamnum,al
+notwalkandexam: call autosetwalk
+cantwalk: ret
+cantwalk2: call facerightway
+ ret
+alreadywalking: mov al,pointerspath
+ mov finaldest,al
+ ret
+
+holdingreel: mov destafterhold,al
+ mov watchmode,2
+ ret
+
+ endp
+
+
+
+
+
+
+
+Autosetwalk proc near
+
+ mov al,manspath
+ cmp finaldest,al
+ jnz notsamealready
+ ret
+notsamealready: call getroomspaths
+ call checkdest
+ push bx
+ mov al,manspath
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,[es:bx]
+ mov ah,0
+ sub ax,12
+ mov linestartx,ax
+ mov al,[es:bx+1]
+ mov ah,0
+ sub ax,12
+ mov linestarty,ax
+ pop bx
+
+ mov al,destination
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,[es:bx]
+ mov ah,0
+ sub ax,12
+ mov lineendx,ax
+ mov al,[es:bx+1]
+ mov ah,0
+ sub ax,12
+ mov lineendy,ax
+ call bresenhams
+
+ cmp linedirection,0
+ jz normalline
+ mov al,linelength
+ dec al
+ mov linepointer,al
+ mov linedirection,1
+ ret
+
+normalline: mov linepointer,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Checkdest proc near
+
+ push bx
+ add bx,12*8
+ mov ah,manspath
+ mov cl,4
+ shl ah,cl
+ mov al,destination
+
+ mov cl,24
+ mov ch,destination
+checkdestloop: mov dh,[es:bx]
+ and dh,11110000b
+ mov dl,[es:bx]
+ and dl,00001111b
+ cmp ax,dx
+ jnz nextcheck
+ mov al,[es:bx+1]
+ and al,15
+ mov destination,al
+ pop bx
+ ret
+nextcheck: mov dl,[es:bx]
+ and dl,11110000b
+ shr dl,1
+ shr dl,1
+ shr dl,1
+ shr dl,1
+ mov dh,[es:bx]
+ and dh,00001111b
+ shl dh,1
+ shl dh,1
+ shl dh,1
+ shl dh,1
+ cmp ax,dx
+ jnz nextcheck2
+ mov ch,[es:bx+1]
+ and ch,15
+nextcheck2: add bx,2
+ dec cl
+ jnz checkdestloop
+ mov destination,ch
+ pop bx
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Bresenhams proc near
+
+ call workoutframes
+
+ mov dx,seg linedata
+ mov es,dx
+ mov di,offset es:linedata
+ mov si,1
+ mov linedirection,0
+
+ mov cx,lineendx
+ sub cx,linestartx
+ jz vertline
+ jns line1
+
+ neg cx
+ mov bx,lineendx
+ xchg bx,linestartx
+ mov lineendx,bx
+
+ mov bx,lineendy
+ xchg bx,linestarty
+ mov lineendy,bx
+ mov linedirection,1
+
+line1: mov bx,lineendy
+ sub bx,linestarty
+ jz horizline
+ jns line3
+
+ neg bx
+ neg si
+
+line3: push si
+ mov lineroutine,0 ; means lo slope
+ cmp bx,cx
+ jle line4
+ mov lineroutine,1 ; means hi slope
+ xchg bx,cx
+
+line4: shl bx,1
+ mov increment1,bx
+ sub bx,cx
+ mov si,bx
+ sub bx,cx
+ mov increment2,bx
+
+ mov ax,linestartx
+ mov bx,linestarty
+ mov ah,bl
+ inc cx
+ pop bx
+ cmp lineroutine,1
+ jz hislope
+ jmp loslope
+
+vertline: mov ax,linestarty
+ mov bx,lineendy
+ mov cx,bx
+ sub cx,ax
+ jge line31
+
+ neg cx
+ mov ax,bx
+ mov linedirection,1
+
+line31: inc cx
+ mov bx,linestartx
+ xchg ax,bx
+ mov ah,bl
+ mov bx,si
+line32: stosw
+ add ah,bl
+ loop line32
+ jmp lineexit
+
+
+horizline: mov ax,linestartx
+ mov bx,linestarty
+ mov ah,bl
+ inc cx
+horizloop: stosw
+ inc al
+ loop horizloop
+ jmp lineexit
+
+
+loslope:
+loloop: stosw
+ inc al
+ or si,si
+ jns line12
+ add si,increment1
+ loop loloop
+ jmp lineexit
+
+line12: add si,increment2
+ add ah,bl
+ loop loloop
+ jmp lineexit
+
+
+
+hislope:
+hiloop: stosw
+ add ah,bl
+ or si,si
+ jns line23
+ add si,increment1
+ loop hiloop
+ jmp lineexit
+
+line23: add si,increment2
+ inc al
+ loop hiloop
+
+lineexit: sub di,offset es:linedata
+ mov ax,di
+ shr ax,1
+ mov linelength,al
+ ret
+
+ endp
+
+
+
+
+
+
+
+Workoutframes proc near
+
+ mov bx,linestartx
+ add bx,32
+ mov ax,lineendx
+ add ax,32
+ sub bx,ax
+ jnc notneg1
+ neg bx
+notneg1: mov cx,linestarty
+ add cx,32
+ mov ax,lineendy
+ add ax,32
+ sub cx,ax
+ jnc notneg2
+ neg cx
+notneg2: cmp bx,cx
+ jnc tendstohoriz
+ mov dl,2
+ mov ax,cx
+ shr ax,1
+ cmp bx,ax
+ jc gotquad
+ mov dl,1
+ jmp gotquad
+tendstohoriz: mov dl,0
+ mov ax,bx
+ shr ax,1
+ cmp cx,ax
+ jc gotquad
+ mov dl,1
+ jmp gotquad
+
+gotquad: mov bx,linestartx
+ add bx,32
+ mov ax,lineendx
+ add ax,32
+ sub bx,ax
+ jc isinright
+isinleft: mov cx,linestarty
+ add cx,32
+ mov ax,lineendy
+ add ax,32
+ sub cx,ax
+ jnc topleft
+ cmp dl,1
+ jz noswap1
+ xor dl,2
+noswap1: add dl,4
+ jmp success
+topleft: add dl,6
+ jmp success
+
+isinright: mov cx,linestarty
+ add cx,32
+ mov ax,lineendy
+ add ax,32
+ sub cx,ax
+ jnc botright
+ add dl,2
+ jmp success
+botright: cmp dl,1
+ jz noswap2
+ xor dl,2
+noswap2:
+
+success: and dl,7
+ mov turntoface,dl
+ mov turndirection,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;Multiply8 proc near
+;
+; mov ah,0
+; mov cx,8
+; mul cx
+; ret
+;
+; endp
+
+
+
+
+
+
+Getroomspaths proc near
+
+ mov al,roomnum
+ mov ah,0
+ mov cx,144
+ mul cx
+ mov es,reels
+ mov bx,pathdata
+ add bx,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Copyname proc near
+
+ push di
+ call findobname
+ pop di
+ push cs
+ pop es
+
+copytext: mov cx,28
+make: lodsb
+ cmp al,":"
+ jz finishmakename
+ cmp al,0
+ jz finishmakename
+ stosb
+ loop make
+
+finishmakename: inc cx
+ mov al,0
+ stosb
+ ret
+ mov al,255
+ rep stosb
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Findobname proc near
+
+ push ax
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ pop ax
+
+ cmp ah,5
+ jnz notpersonname
+
+ push ax
+ and al,127
+ mov ah,0
+ mov bx,64*2
+ mul bx
+ mov si,ax
+ mov ds,people
+ add si,persontxtdat
+ mov cx,persontext
+ mov ax,[si]
+ add ax,cx
+ mov si,ax
+ pop ax
+ ret
+
+notpersonname: cmp ah,4
+ jnz notextraname
+ mov ds,extras
+ add bx,extextdat
+ mov ax,[bx]
+ add ax,extext
+ mov si,ax
+ ret
+
+notextraname: cmp ah,2
+ jnz notfreename
+ mov ds,freedesc
+ add bx,freetextdat
+ mov ax,[bx]
+ add ax,freetext
+ mov si,ax
+ ret
+
+notfreename: cmp ah,1
+ jnz notsetname
+ mov ds,setdesc
+ add bx,settextdat
+ mov ax,[bx]
+ add ax,settext
+ mov si,ax
+ ret
+
+notsetname: mov ds,blockdesc
+ add bx,blocktextdat
+ mov ax,[bx]
+ add ax,blocktext
+ mov si,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+;-------------------------------------------Printing of non scrolling icons----
+
+Showicon proc near
+
+ cmp reallocation,50
+ jnc isdream1
+ call showpanel
+ call showman
+ call roomname
+ call panelicons1
+ call zoomicon
+ ret
+
+isdream1: mov ds,tempsprites
+ mov di,72
+ mov bx,2
+ mov al,45
+ mov ah,0
+ call showframe
+ mov ds,tempsprites
+ mov di,72+47
+ mov bx,2
+ mov al,46
+ mov ah,0
+ call showframe
+ mov ds,tempsprites
+ mov di,69-10
+ mov bx,21
+ mov al,49
+ mov ah,0
+ call showframe
+
+ mov ds,tempsprites
+ mov di,160+88
+ mov bx,2
+ mov al,45
+ mov ah,4
+ call showframe
+ mov ds,tempsprites
+ mov di,160+43
+ mov bx,2
+ mov al,46
+ mov ah,4
+ call showframe
+ mov ds,tempsprites
+ mov di,160+101
+ mov bx,21
+ mov al,49
+ mov ah,4
+ call showframe
+ call middlepanel
+ ret
+
+ endp
+
+
+
+
+
+Middlepanel proc near
+
+ mov ds,tempsprites
+ mov di,72+47+20
+ mov bx,0
+ mov al,48
+ mov ah,0
+ call showframe
+ mov ds,tempsprites
+ mov di,72+19
+ mov bx,21
+ mov al,47
+ mov ah,0
+ call showframe
+ mov ds,tempsprites
+ mov di,160+23
+ mov bx,0
+ mov al,48
+ mov ah,4
+ call showframe
+ mov ds,tempsprites
+ mov di,160+71
+ mov bx,21
+ mov al,47
+ mov ah,4
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Showman proc near
+
+ mov ds,icons1
+ mov di,0
+ mov bx,0
+ mov al,0
+ mov ah,0
+ call showframe
+ mov ds,icons1
+ mov di,0
+ mov bx,114
+ mov al,1
+ mov ah,0
+ call showframe
+
+ cmp shadeson,0
+ jz notverycool
+
+ mov ds,icons1
+ mov di,28
+ mov bx,25
+ mov al,2
+ mov ah,0
+ call showframe
+notverycool: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Showpanel proc near
+
+ mov ds,icons1
+ mov di,72
+ mov bx,0
+ mov al,19
+ mov ah,0
+ call showframe
+ mov ds,icons1
+ mov di,192
+ mov bx,0
+ mov al,19
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Roomname proc near
+
+ mov di,88
+ mov bx,18
+ mov al,53
+ mov dl,240
+ call printmessage
+
+ mov bl,roomnum
+ cmp bl,32
+ jc notover32
+ sub bl,32
+
+notover32: mov bh,0
+ add bx,bx
+ mov es,roomdesc
+ add bx,intextdat
+ mov ax,[es:bx]
+ add ax,intext
+ mov si,ax
+
+ mov linespacing,7
+ mov di,88
+ mov bx,25
+ mov dl,120
+ cmp watchon,1
+ jz gotpl
+ mov dl,160
+gotpl: mov al,0
+ mov ah,0
+ call printdirect
+ mov linespacing,10
+
+ call usecharset1
+ ret
+
+ endp
+
+
+
+
+
+
+Usecharset1 proc near
+
+ mov ax,charset1
+ mov currentset,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Usetempcharset proc near
+
+ mov ax,tempcharset
+ mov currentset,ax
+ ret
+
+ endp
+
+
+
+
+
+Showexit proc near
+
+ mov ds,icons1
+ mov di,274
+ mov bx,154
+ mov al,11
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+Panelicons1 proc near
+
+ mov di,0
+ cmp watchon,1
+ jz watchison
+ mov di,48
+watchison: push di
+ mov ds,icons2
+ add di,204
+ mov bx,4
+ mov al,2
+ mov ah,0
+ call showframe
+ pop di
+ push di
+ cmp zoomon,1
+ jz zoomisoff
+ mov ds,icons1
+ add di,228
+ mov bx,8
+ mov al,5
+ mov ah,0
+ call showframe
+zoomisoff: pop di
+ call showwatch
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Showwatch proc near
+
+ cmp watchon,0
+ jz nowristwatch
+ mov ds,icons1
+ mov di,250
+ mov bx,1
+ mov al,6
+ mov ah,0
+ call showframe
+ call showtime
+nowristwatch: ret
+
+ endp
+
+
+Gettime proc near
+
+ mov ah,2ch
+ int 21h
+ mov secondcount,dh
+ mov minutecount,cl
+ mov hourcount,ch
+ ret
+
+ endp
+
+
+
+
+
+Zoomicon proc near
+
+ cmp zoomon,0
+ jz nozoom1
+ mov ds,icons1
+ mov di,zoomx
+ mov bx,zoomy-1
+ mov al,8
+ mov ah,0
+ call showframe
+nozoom1: ret
+
+ endp
+
+
+
+
+
+
+Showblink proc near
+
+ cmp manisoffscreen,1
+ jz finblink1
+ inc blinkcount
+ cmp shadeson,0
+ jnz finblink1
+ cmp reallocation,50
+ jnc eyesshut
+ mov al,blinkcount
+ cmp al,3
+ jnz finblink1
+ mov blinkcount,0
+ mov al,blinkframe
+ inc al
+ mov blinkframe,al
+ cmp al,6
+ jc nomorethan6
+ mov al,6
+nomorethan6: mov ah,0
+ mov bx,offset cs:blinktab
+ add bx,ax
+
+ mov al,[cs:bx]
+ mov ds,icons1
+ mov di,44
+ mov bx,32
+ mov ah,0
+ call showframe
+finblink1: ret
+
+eyesshut: ;mov al,32
+ ;mov ds,icons1
+ ;mov di,44
+ ;mov bx,32
+ ;mov ah,0
+ ;call showframe
+ ret
+
+blinktab: db 16,18,18,17,16,16,16
+
+ endp
+
+
+
+
+
+
+Dumpblink proc near
+
+ cmp shadeson,0
+ jnz nodumpeye
+ cmp blinkcount,0
+ jnz nodumpeye
+ mov al,blinkframe
+ cmp al,6
+ jnc nodumpeye
+ push ds
+ mov di,44
+ mov bx,32
+ mov cl,16
+ mov ch,12
+ call multidump
+ pop ds
+nodumpeye: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Worktoscreenm proc near
+
+ call animpointer
+ call readmouse
+ call showpointer
+ call vsync
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+;-------------------------------------------------------------Blank routine----
+
+
+
+
+Blank proc near
+
+ cmp commandtype,199
+ jz alreadyblnk
+ mov commandtype,199
+ mov al,0
+ call commandonly
+alreadyblnk: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+;---------------------------------------------------------Standard routines----
+
+
+
+
+
+
+
+
+
+
+
+
+
+Allpointer proc near
+
+ call readmouse
+ call showpointer
+ call dumppointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+Hangonp proc near
+
+ push cx
+ add cx,cx
+ pop ax
+ add cx,ax
+ mov maintimer,0
+ mov al,pointerframe
+ mov ah,pickup
+ push ax
+ mov pointermode,3
+ mov pickup,0
+ push cx
+ mov commandtype,255
+ call readmouse
+ call animpointer
+ call showpointer
+ call vsync
+ call dumppointer
+ pop cx
+
+hangloop: push cx
+ call delpointer
+ call readmouse
+ call animpointer
+ call showpointer
+ call vsync
+ call dumppointer
+ pop cx
+ mov ax,mousebutton
+ cmp ax,0
+ jz notpressed
+ cmp ax,oldbutton
+ jnz getoutofit
+notpressed: loop hangloop
+
+getoutofit: call delpointer
+ pop ax
+ mov pointerframe,al
+ mov pickup,ah
+ mov pointermode,0
+ ret
+
+ endp
+
+
+
+
+
+Hangonw proc near
+
+hangloopw: push cx
+ call delpointer
+ call readmouse
+ call animpointer
+ call showpointer
+ call vsync
+ call dumppointer
+ pop cx
+ loop hangloopw
+ ret
+
+ endp
+
+
+
+
+Hangoncurs proc near
+
+monloop1: push cx
+ call printcurs
+ call vsync
+ call delcurs
+ pop cx
+ loop monloop1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Getunderzoom proc near
+
+ mov di,zoomx+5
+ mov bx,zoomy+4
+ mov ds,buffers
+ mov si,zoomspace
+ mov cl,46
+ mov ch,40
+ call multiget
+ ret
+
+ endp
+
+
+
+
+
+Dumpzoom proc near
+
+ cmp zoomon,1
+ jnz notzoomon
+ mov di,zoomx+5
+ mov bx,zoomy+4
+ mov cl,46
+ mov ch,40
+ call multidump
+notzoomon: ret
+
+ endp
+
+
+
+
+
+
+
+Putunderzoom proc near
+
+ mov di,zoomx+5
+ mov bx,zoomy+4
+ mov ds,buffers
+ mov si,zoomspace
+ mov cl,46
+ mov ch,40
+ call multiput
+ ret
+
+ endp
+
+
+
+
+
+Crosshair proc near
+
+ cmp commandtype,3
+ jz nocross
+ cmp commandtype,10
+ jnc nocross
+
+ mov es,workspace
+ mov ds,icons1
+ mov di,zoomx+24
+ mov bx,zoomy+19
+ mov al,9
+ mov ah,0
+ call showframe
+ ret
+
+nocross: mov es,workspace
+ mov ds,icons1
+ mov di,zoomx+24
+ mov bx,zoomy+19
+ mov al,29
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+Showpointer proc near
+
+ call showblink
+ mov di,mousex
+ mov oldpointerx,di
+ mov bx,mousey
+ mov oldpointery,bx
+ cmp pickup,1
+ jz itsanobject
+
+ push bx di
+ mov ds,icons1
+ mov al,pointerframe
+ add al,20
+ mov ah,0
+ add ax,ax
+ mov si,ax
+ add ax,ax
+ add si,ax
+ mov cx,[si]
+ cmp cl,12
+ jnc notsmallx
+ mov cl,12
+notsmallx: cmp ch,12
+ jnc notsmally
+ mov ch,12
+notsmally: mov pointerxs,cl
+ mov pointerys,ch
+ push ds
+ mov ds,buffers
+ mov si,pointerback
+ call multiget
+ pop ds di bx
+ push di bx
+ mov al,pointerframe
+ add al,20
+ mov ah,0
+ call showframe
+ pop bx di
+ ret
+
+itsanobject: mov al,itemframe
+ mov ds,extras
+ cmp objecttype,4
+ jz itsfrominv
+ mov ds,freeframes
+itsfrominv: mov cl,al
+ add al,al
+ add al,cl
+ inc al
+ mov ah,0
+
+ push ax
+ add ax,ax
+ mov si,ax
+ add ax,ax
+ add si,ax
+ mov ax,2080
+ mov cx,[si]
+ cmp cl,12
+ jnc notsmallx2
+ mov cl,12
+notsmallx2: cmp ch,12
+ jnc notsmally2
+ mov ch,12
+notsmally2: mov pointerxs,cl
+ mov pointerys,ch
+ pop ax
+
+ push di bx
+ push ax bx di ds
+ mov al,cl
+ mov ah,0
+ shr ax,1
+ sub oldpointerx,ax
+ sub di,ax
+ mov al,ch
+ shr ax,1
+ sub oldpointery,ax
+ sub bx,ax
+ mov ds,buffers
+ mov si,pointerback
+ call multiget
+ pop ds di bx ax
+ mov ah,128
+ call showframe
+ pop bx di
+ mov ds,icons1
+ mov al,3
+ mov ah,128
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+Delpointer proc near
+
+ mov ax,oldpointerx
+ cmp ax,0ffffh
+ jz nevershown
+ mov delherex,ax
+ mov ax,oldpointery
+ mov delherey,ax
+ mov cl,pointerxs
+ mov delxs,cl
+ mov ch,pointerys
+ mov delys,ch
+ mov ds,buffers
+ mov si,pointerback
+ mov di,delherex
+ mov bx,delherey
+ call multiput
+nevershown: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Dumppointer proc near
+
+ call dumpblink
+ mov cl,delxs
+ mov ch,delys
+ mov di,delherex
+ mov bx,delherey
+ call multidump
+
+ mov bx,oldpointery
+ mov di,oldpointerx
+ cmp di,delherex
+ jnz difffound
+ cmp bx,delherey
+ jz notboth
+difffound: mov cl,pointerxs
+ mov ch,pointerys
+ call multidump
+notboth: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Undertextline proc near
+
+ mov di,textaddressx
+ mov bx,textaddressy
+ cmp foreignrelease, 0
+ jz $1
+ sub bx,3
+$1:
+ mov ds,buffers
+ mov si,textunder
+ mov cl,undertextsizex
+ mov ch,undertextsizey
+ call multiget
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Deltextline proc near
+
+ mov di,textaddressx
+ mov bx,textaddressy
+ cmp foreignrelease, 0
+ jz $1
+ sub bx,3
+$1:
+ mov ds,buffers
+ mov si,textunder
+ mov cl,undertextsizex
+ mov ch,undertextsizey
+ call multiput
+ ret
+
+ endp
+
+
+
+
+
+Dumptextline proc near
+
+ cmp newtextline,1
+ jnz nodumptextline
+ mov newtextline,0
+ mov di,textaddressx
+ mov bx,textaddressy
+ cmp foreignrelease, 0
+ jz $1
+ sub bx,3
+$1:
+ mov cl,undertextsizex
+ mov ch,undertextsizey
+ call multidump
+nodumptextline: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Animpointer proc near
+
+ cmp pointermode,2
+ jz combathand
+ cmp pointermode,3
+ jz mousehand
+
+ cmp watchingtime,0
+ jz notwatchpoint
+ mov pointerframe,11
+ ret
+notwatchpoint: mov pointerframe,0
+ cmp inmaparea,0
+ jz gothand
+ cmp pointerfirstpath,0
+ jz gothand
+arrow: call getflagunderp
+ cmp cl,2
+ jc gothand
+ cmp cl,128
+ jnc gothand
+ mov pointerframe,3
+ test cl,4
+ jnz gothand
+ mov pointerframe,4
+ test cl,16
+ jnz gothand
+ mov pointerframe,5
+ test cl,2
+ jnz gothand
+ mov pointerframe,6
+ test cl,8
+ jnz gothand
+ mov pointerframe,8
+gothand: ret
+
+mousehand: cmp pointerspeed,0
+ jz rightspeed3
+ dec pointerspeed
+ jmp finflashmouse
+rightspeed3: mov pointerspeed,5
+ inc pointercount
+ cmp pointercount,16
+ jnz finflashmouse
+ mov pointercount,0
+finflashmouse: mov al,pointercount
+ mov ah,0
+ mov bx,offset cs:flashmousetab
+ add bx,ax
+ mov al,[cs:bx]
+ mov pointerframe,al
+ ret
+
+combathand: mov pointerframe,0
+ cmp reallocation,14
+ jnz notarrow
+ cmp commandtype,211
+ jnz notarrow
+ mov pointerframe,5
+notarrow: ret
+
+flashmousetab: db 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2
+
+ endp
+
+
+
+
+;------------------------------------------------Mouse and keyboard-readers----
+
+Setmouse proc near
+
+ if recording
+ mov recordpos,-8
+ mov dx,seg recname
+ mov ds,dx
+ mov dx,offset recname
+ mov cx,0
+ mov ah,3ch
+ mov al,2
+ int 21h
+ mov rechandle,ax
+ endif
+
+ if playback
+ mov dx,seg recname
+ mov ds,dx
+ mov dx,offset recname
+ mov ah,3dh
+ mov al,2
+ int 21h
+ mov rechandle,ax
+ call loadrec
+ endif
+
+ mov oldpointerx,0ffffh
+
+ mov ax,0
+ int 33h
+ mov ax,8
+ mov cx,15
+ mov dx,184
+ int 33h
+ mov ax,7
+ mov cx,15
+ mov dx,298*2
+ int 33h
+ ret
+
+ endp
+
+
+
+
+
+Readmouse proc near
+
+ mov ax,mousebutton
+ mov oldbutton,ax
+ mov ax,mousex
+ mov oldx,ax
+ mov ax,mousey
+ mov oldy,ax
+ call mousecall
+ mov mousex,cx
+ mov mousey,dx
+ mov mousebutton,bx
+ ret
+
+ endp
+
+
+
+
+
+
+
+Mousecall proc near
+
+ if playback
+ call playmouse
+ ret
+ endif
+
+ mov ax,3
+ int 33h
+ shr cx,1
+ cmp cx,298
+ jc notxover
+ mov cx,298
+notxover: cmp cx,15
+ jnc notxover2
+ mov cx,15
+notxover2: cmp dx,184
+ jc notyover
+ mov dx,184
+notyover: cmp dx,15
+ jnc notyover2
+ mov dx,15
+notyover2:
+ if recording
+ call recmouse
+ endif
+ ret
+
+ endp
+
+
+
+
+
+
+ if playback
+
+Playmouse proc near
+
+ mov es,recordspace
+ mov di,recordpos
+ cmp word ptr [es:di+6],0
+ jnz isthisplay
+ add di,8
+ add recordpos,8
+ cmp di,16384
+ jnz isthisplay
+ call loadrec
+isthisplay: mov cx,[es:di]
+ mov dx,[es:di+2]
+ mov bx,[es:di+4]
+ dec word ptr [es:di+6]
+ ret
+
+ endp
+
+ endif
+
+ if recording
+
+Recmouse proc near
+
+ mov es,recordspace
+ mov di,recordpos
+ cmp di,-8
+ jz diffrec
+ cmp [es:di],cx
+ jnz diffrec
+ cmp [es:di+2],dx
+ jnz diffrec
+ cmp [es:di+4],bx
+ jnz diffrec
+ inc word ptr [es:di+6]
+ cmp word ptr [es:di+5],0ffffh
+ jz diffrec
+ ret
+diffrec: add recordpos,8
+ add di,8
+ cmp di,16384
+ jnz notsaverec
+ push cx dx bx
+ call saverec
+ pop bx dx cx
+notsaverec: mov [es:di],cx
+ mov [es:di+2],dx
+ mov [es:di+4],bx
+ mov word ptr [es:di+6],1
+ ret
+
+ endp
+
+
+
+
+
+Saverec proc near
+
+ mov bx,rechandle
+ mov ds,recordspace
+ mov dx,0
+ mov cx,recordpos
+ add cx,8
+ mov ah,40h
+ int 21h
+ mov di,0
+ mov recordpos,0
+ ret
+
+ endp
+
+
+
+
+
+
+Loadrec proc near
+
+ mov bx,rechandle
+ mov ds,recordspace
+ mov dx,0
+ mov cx,16384+8
+ mov ah,3fh
+ int 21h
+ mov di,0
+ mov recordpos,0
+ ret
+
+ endp
+
+
+ endif
+
+
+
+
+
+
+
+Readmouse1 proc near
+
+ mov ax,mousex
+ mov oldx,ax
+ mov ax,mousey
+ mov oldy,ax
+ call mousecall
+ mov mousex,cx
+ mov mousey,dx
+ mov mousebutton1,bx
+ ret
+
+ endp
+
+
+
+Readmouse2 proc near
+
+ mov ax,mousex
+ mov oldx,ax
+ mov ax,mousey
+ mov oldy,ax
+ call mousecall
+ mov mousex,cx
+ mov mousey,dx
+ mov mousebutton2,bx
+ ret
+
+ endp
+
+
+Readmouse3 proc near
+
+ mov ax,mousex
+ mov oldx,ax
+ mov ax,mousey
+ mov oldy,ax
+ call mousecall
+ mov mousex,cx
+ mov mousey,dx
+ mov mousebutton3,bx
+ ret
+
+ endp
+
+
+
+
+
+
+Readmouse4 proc near
+
+ mov ax,mousebutton
+ mov oldbutton,ax
+ mov ax,mousex
+ mov oldx,ax
+ mov ax,mousey
+ mov oldy,ax
+ call mousecall
+ mov mousex,cx
+ mov mousey,dx
+ mov ax,mousebutton1
+ or ax,mousebutton2
+ or ax,mousebutton3
+ or bx,ax
+ mov mousebutton,bx
+ ret
+
+ endp
+
+
+
+
+
+Readkey proc near
+
+ mov bx,bufferout
+ cmp bx,bufferin
+ jz nokey
+ inc bx
+ and bx,15
+ mov bufferout,bx
+ mov di,offset cs:keybuffer
+ add di,bx
+ mov al,[cs:di]
+ mov currentkey,al
+ ret
+nokey: mov currentkey,0
+ ret
+
+
+ endp
+
+keybuffer: db 16 dup (0)
+
+
+
+Convertkey proc near
+
+ and al,127
+ mov ah,0
+ mov di,offset cs:keyconverttab
+ add di,ax
+ mov al,[cs:di]
+ ret
+
+keyconverttab: db 0,0,"1","2","3","4","5","6","7","8","9","0","-",0,8,0
+ db "Q","W","E","R","T","Y","U","I","O","P",0,0,13,0,"A","S"
+ db "D","F","G","H","J","K","L",0,0,0,0,0,"Z","X","C","V","B","N","M"
+ db 0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0
+ db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+
+ endp
+
+
+
+
+;-------------------------------------------------------------Miscellaneous----
+
+Randomnum1 proc near
+
+ push ds es di bx cx
+ call randomnumber
+ pop cx bx di es ds
+ ret
+
+ endp
+
+
+
+
+
+Randomnum2 proc near
+
+ push ds es di bx ax
+ call randomnumber
+ mov cl,al
+ pop ax bx di es ds
+ ret
+
+ endp
+
+
+
+
+
+Randomnumber proc near
+
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+ mov al,seed
+ and al,48h
+ add al,38h
+ sal al,1
+ sal al,1
+ rcl seed+2,1
+ rcl seed+1,1
+ rcl seed+0,1
+
+ mov al,seed
+ ret
+
+ endp
+
+
+
+
+
+
+Hangon proc near
+
+hangonloop: push cx
+ call vsync
+ pop cx
+ loop hangonloop
+ ret
+
+ endp
+
+
+
+
+
+;-------------------------------------------------------------Disc handling----
+
+
+Loadtraveltext proc near
+
+ mov dx,offset cs:traveltextname
+ call standardload
+ mov traveltext,ax
+ ret
+
+ endp
+
+
+
+
+
+
+Loadintotemp proc near
+
+ push cs
+ pop ds
+ call standardload
+ mov tempgraphics,ax
+ ret
+
+ endp
+
+
+
+
+
+
+Loadintotemp2 proc near
+
+ push cs
+ pop ds
+ call standardload
+ mov tempgraphics2,ax
+ ret
+
+ endp
+
+
+
+
+Loadintotemp3 proc near
+
+ push cs
+ pop ds
+ call standardload
+ mov tempgraphics3,ax
+ ret
+
+ endp
+
+
+
+Loadtempcharset proc near
+
+ call standardload
+ mov tempcharset,ax
+ ret
+
+ endp
+
+
+
+
+
+
+Standardload proc near
+
+ call openfile
+ call readheader
+ mov bx,[es:di]
+ push bx
+ mov cl,4
+ shr bx,cl
+ call allocatemem
+ mov ds,ax
+ pop cx
+ push ax
+ mov dx,0
+ call readfromfile
+ call closefile
+ pop ax
+ ret
+
+ endp
+
+
+
+
+
+
+Loadtemptext proc near
+
+ call standardload
+ mov textfile1,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+Loadroom proc near
+
+ mov roomloaded,1
+ mov timecount,0
+ mov maintimer,0
+ mov mapoffsetx,104
+ mov mapoffsety,38
+ mov textaddressx,13
+ mov textaddressy,182
+ mov textlen,240
+ mov al,newlocation
+ mov location,al
+ call getroomdata
+ call startloading
+ call loadroomssample
+ call switchryanon
+ call drawflags
+ call getdimension
+ ret
+
+ endp
+
+
+
+
+Loadroomssample proc near
+
+ mov al,roomssample
+ cmp al,255
+ jz loadedalready
+ cmp al,currentsample
+ jz loadedalready
+ mov currentsample,al
+ mov al,currentsample
+ mov cl,"0"
+ call twodigitnum
+ mov di,offset cs:samplename
+ xchg al,ah
+ mov [cs:di+10],ax
+ mov dx,di
+ call loadsecondsample
+loadedalready: ret
+
+ endp
+
+
+
+
+
+Getridofreels proc near
+
+ cmp roomloaded,0
+ jz dontgetrid
+ mov es,reel1
+ call deallocatemem
+ mov es,reel2
+ call deallocatemem
+ mov es,reel3
+ call deallocatemem
+dontgetrid: ret
+
+ endp
+
+
+
+
+
+Getridofall proc near
+
+ mov es,backdrop
+ call deallocatemem
+ mov es,setframes
+ call deallocatemem
+ mov es,reel1
+ call deallocatemem
+ mov es,reel2
+ call deallocatemem
+ mov es,reel3
+ call deallocatemem
+ mov es,reels
+ call deallocatemem
+ mov es,people
+ call deallocatemem
+ mov es,setdesc
+ call deallocatemem
+ mov es,blockdesc
+ call deallocatemem
+ mov es,roomdesc
+ call deallocatemem
+ mov es,freeframes
+ call deallocatemem
+ mov es,freedesc
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+
+
+Restorereels proc near
+
+ cmp roomloaded,0
+ jz dontrestore
+ mov al,reallocation
+ call getroomdata
+ mov dx,bx
+ call openfile
+ call readheader
+
+ call dontloadseg
+ call dontloadseg
+ call dontloadseg
+ call dontloadseg
+
+ call allocateload
+ mov reel1,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+ call allocateload
+ mov reel2,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+ call allocateload
+ mov reel3,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+ call closefile
+dontrestore: ret
+
+ endp
+
+
+
+
+
+
+
+Restoreall proc near
+
+ mov al,location
+ call getroomdata
+ mov dx,bx
+ call openfile
+ call readheader
+
+ call allocateload
+ mov ds,ax
+ mov backdrop,ax
+ mov dx,flags
+ call loadseg
+
+ mov ds,workspace ;mapdata
+ mov dx,map
+ mov cx,132*66 ;maplen
+ mov al,0
+ call fillspace
+ call loadseg
+ call sortoutmap
+
+ call allocateload
+ mov setframes,ax
+ mov ds,ax
+ mov dx,framedata
+ call loadseg
+
+ ;mov ds,setdat
+ ;mov dx,0
+ ;mov cx,setdatlen
+ ;mov al,255
+ ;call fillspace
+ call dontloadseg
+
+ call allocateload
+ mov reel1,ax
+ mov ds,ax
+ mov dx,0
+ ;call bloc
+ ;BIG FIXME: undefined bloc, replaced with loadseg. dunno!
+ call loadseg
+ call allocateload
+ mov reel2,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+ call allocateload
+ mov reel3,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov reels,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov people,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov setdesc,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov blockdesc,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov roomdesc,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov freeframes,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ ;mov ds,freedat
+ ;mov dx,0
+ ;mov cx,freedatlen
+ ;mov al,255
+ ;call fillspace
+ call dontloadseg
+
+ call allocateload
+ mov freedesc,ax
+ mov ds,ax
+ mov dx,freetextdat
+ call loadseg
+
+ call closefile
+
+ call setallchanges
+ ret
+
+ endp
+
+
+
+Sortoutmap proc near
+
+ push es di
+ mov ds,workspace
+ mov si,0
+ mov es,mapdata
+ mov di,0
+
+ mov cx,maplength
+blimey: push cx si
+ mov cx,mapwidth
+ rep movsb
+ pop si cx
+ add si,132
+ loop blimey
+ pop di es
+ ret
+
+ endp
+
+
+
+
+Startloading proc near
+
+ mov combatcount,0
+ mov al,[cs:bx+13]
+ mov roomssample,al
+ mov al,[cs:bx+15]
+ mov mapx,al
+ mov al,[cs:bx+16]
+ mov mapy,al
+
+ mov al,[cs:bx+20] ; start path pos
+ mov liftflag,al
+ mov al,[cs:bx+21] ; start path pos
+ mov manspath,al
+ mov destination,al
+ mov finaldest,al
+ mov al,[cs:bx+22]
+ mov facing,al
+ mov turntoface,al
+ mov al,[cs:bx+23]
+ mov counttoopen,al
+ mov al,[cs:bx+24]
+ mov liftpath,al
+ mov al,[cs:bx+25]
+ mov doorpath,al
+ mov lastweapon,-1
+ mov al,[cs:bx+27]
+ push ax
+
+ mov al,[cs:bx+31]
+ mov ah,reallocation
+ mov reallocation,al
+
+ mov dx,bx
+ call openfile
+ call readheader
+
+ call allocateload
+ mov ds,ax
+ mov backdrop,ax
+ mov dx,flags
+ call loadseg
+
+ mov ds,workspace ;mapdata
+ mov dx,map
+ mov cx,132*66 ;maplen
+ mov al,0
+ call fillspace
+ call loadseg
+ call sortoutmap
+
+ call allocateload
+ mov setframes,ax
+ mov ds,ax
+ mov dx,framedata
+ call loadseg
+
+ mov ds,setdat
+ mov dx,0
+ mov cx,setdatlen
+ mov al,255
+ call fillspace
+ call loadseg
+
+ call allocateload
+ mov reel1,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+ call allocateload
+ mov reel2,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+ call allocateload
+ mov reel3,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov reels,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov people,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov setdesc,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov blockdesc,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov roomdesc,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ call allocateload
+ mov freeframes,ax
+ mov ds,ax
+ mov dx,0
+ call loadseg
+
+ mov ds,freedat
+ mov dx,0
+ mov cx,freedatlen
+ mov al,255
+ call fillspace
+ call loadseg
+
+ call allocateload
+ mov freedesc,ax
+ mov ds,ax
+ mov dx,freetextdat
+ call loadseg
+
+ call closefile
+
+
+ call findroominloc
+ call deletetaken
+ call setallchanges
+ call autoappear
+ mov al,newlocation
+ call getroomdata
+ mov lastweapon,-1
+ mov mandead,0
+ mov lookcounter,160
+ mov newlocation,255
+ mov linepointer,254
+ pop ax
+ cmp al,255
+ jz dontwalkin
+ mov manspath,al
+ push bx
+ call autosetwalk
+ pop bx
+dontwalkin: call findxyfrompath
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Disablepath proc near ;needs al,ah map x,y cl=path
+
+ push cx
+ xchg al,ah
+ mov cx,-6
+looky2: add cx,6
+ sub al,10
+ jnc looky2
+ mov al,ah
+ dec cx
+lookx2: inc cx
+ sub al,11
+ jnc lookx2
+ mov al,cl
+ mov ah,0
+ mov cx,144
+ mul cx
+ mov es,reels
+ mov bx,pathdata
+ add bx,ax
+ pop ax
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,0
+ mov [es:bx+6],al
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Findxyfrompath proc near ;path number was found from
+ ;room data. Fill ryanxy from
+ call getroomspaths ;the pathdata.
+ mov al,manspath
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov ax,[es:bx]
+ sub al,12
+ sub ah,12
+ mov ryanx,al
+ mov ryany,ah
+ ret
+
+ endp
+
+
+
+
+
+Findroominloc proc near
+
+ mov al,mapy
+ mov cx,-6
+looky: add cx,6
+ sub al,10
+ jnc looky
+ mov al,mapx
+ dec cx
+lookx: inc cx
+ sub al,11
+ jnc lookx
+ mov roomnum,cl
+ ret
+
+ endp
+
+
+
+
+
+
+Getroomdata proc near
+
+ mov ah,0
+ mov cx,32
+ mul cx
+ mov bx,offset cs:roomdata
+ add bx,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+Readheader proc near
+
+ push cs
+ pop ds
+ mov dx,offset cs:fileheader
+ mov cx,headerlen
+ call readfromfile
+ push cs
+ pop es
+ mov di,offset cs:filedata
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Dontloadseg proc neqr
+
+ mov ax,[es:di]
+ add di,2
+ push bx di es
+ mov cx,0
+ mov dx,ax
+ mov al,1
+ mov ah,42h
+ int 21h
+ pop es di bx
+ ret
+
+ endp
+
+
+
+
+
+
+Allocateload proc near
+
+ push es di
+ mov bx,[es:di]
+ mov cl,4
+ shr bx,cl
+ call allocatemem
+ pop di es
+ ret
+
+ endp
+
+
+
+
+Fillspace proc near
+
+ push es ds dx di bx
+ mov di,dx
+ push ds
+ pop es
+ rep stosb
+ pop bx di dx ds es
+ ret
+
+ endp
+
+
+
+
+
+
+
+Getridoftemp proc near
+
+ mov es,tempgraphics
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+
+
+Getridoftemptext proc near
+
+ mov es,textfile1
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+
+
+Getridoftemp2 proc near
+
+ mov es,tempgraphics2
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+Getridoftemp3 proc near
+
+ mov es,tempgraphics3
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+Getridoftempcharset proc near
+
+ mov es,tempcharset
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+Getridoftempsp proc near
+
+ mov es,tempsprites
+ call deallocatemem
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Readsetdata proc near
+
+ mov dx,offset cs:characterset1
+ call standardload
+ mov charset1,ax
+
+ mov dx,offset cs:icongraphics0
+ call standardload
+ mov icons1,ax
+
+ mov dx,offset cs:icongraphics1
+ call standardload
+ mov icons2,ax
+
+ mov dx,offset cs:spritename1
+ call standardload
+ mov mainsprites,ax
+
+ mov dx,offset cs:puzzletextname
+ call standardload
+ mov puzzletext,ax
+
+ mov dx,offset cs:commandtextname
+ call standardload
+ mov commandtext,ax
+
+ mov ax,charset1
+ mov currentset,ax
+
+ cmp soundint,255
+ jz novolumeload
+ mov dx,offset cs:volumetabname
+ call openfile
+ mov cx,2048-256
+ mov ds,soundbuffer
+ mov dx,16384
+ call readfromfile
+ call closefile
+novolumeload: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Createfile proc near
+
+ mov ah,3ch
+ mov cx,0
+ int 21h
+ mov bx,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+Openfile proc near
+
+ if cd
+ call makename
+ endif
+ push cs
+ pop ds
+ mov ah,3dh
+ mov al,2
+ push dx
+ int 21h
+ pop dx
+ jc fileerror
+ mov handle,ax
+ ret
+fileerror: mov gameerror,8
+ jmp quickquit2
+
+ endp
+
+
+ if cd
+Openfilefromc proc near
+
+ push cs
+ pop ds
+ mov ah,3dh
+ mov al,2
+ push dx
+ int 21h
+ pop dx
+ mov handle,ax
+ ret
+
+ endp
+ endif
+
+
+ if cd
+Makename proc near
+
+ if demo
+ ret
+ endif
+ mov si,dx
+ mov di,offset cs:place
+transfer: mov al,[cs:si]
+ mov [cs:di],al
+ inc si
+ inc di
+ cmp al,0
+ jnz transfer
+ mov dx,offset cs:id
+ ret
+id: db "D:\"
+place: db 30 dup (0)
+
+ endp
+ endif
+
+
+
+
+
+Openfilenocheck proc near
+
+ if cd
+ call makename
+ endif
+ push cs
+ pop ds
+ mov ah,3dh
+ mov al,2
+ int 21h
+ mov handle,ax
+ ret
+
+ endp
+
+
+
+Openforsave proc near
+
+ mov cx,0
+ mov ah,3ch
+ mov al,2
+ int 21h
+ mov handle,ax
+ ret
+
+ endp
+
+
+
+Closefile proc near
+
+ mov bx,handle
+ mov ah,3eh
+ int 21h
+ ret
+
+ endp
+
+
+
+
+Readfromfile proc near
+
+ mov bx,handle
+ mov ah,3fh
+ int 21h
+ ret
+
+ endp
+
+
+
+
+Setkeyboardint proc near
+
+ mov ah,35h
+ mov al,9
+ int 21h
+ mov oldint9seg,es ; Save es:bx to temp memory
+ mov oldint9add,bx
+ push cs
+ pop ds
+ mov dx,offset cs:keyboardread
+ mov ah,25h
+ mov al,9
+ int 21h ; Set to new
+ ret
+
+ endp
+
+
+
+
+Resetkeyboard proc near
+
+ cmp oldint9add,-1
+ jz noreset
+ mov dx,oldint9add ;Restore old interupt vector
+ mov ax,oldint9seg ;for keys
+ mov ds,ax
+ mov ah,25h
+ mov al,9
+ int 21h
+noreset: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Keyboardread proc near
+
+ push ax dx di ds es
+ in al,60h
+ cmp al,lasthardkey
+ jz same
+ mov lasthardkey,al
+ cmp al,128
+ jnc same
+ mov dx,bufferin
+ inc dx
+ and dx,15
+ cmp dx,bufferout
+ jz same ;buffer is full
+ mov bufferin,dx
+ call convertkey
+ mov di,offset cs:keybuffer
+ mov dx,bufferin
+ add di,dx
+ mov [cs:di],al
+same: in al,61h
+ mov ah,al
+ or al,80h ; Mask for Akn
+ out 61h,al ; Set Akn.
+ and al,7fh
+ out 61h,al
+ cli
+ mov al,20h ; 8259 end of interrupt
+ out 20h,al
+ pop es ds di dx ax
+ iret
+
+ endp
+
+
+
+;------------------------------------------------------Text and tables data----
+
+
+
+Fileheader db "DREAMWEB DATA FILE "
+ db "COPYRIGHT 1992 "
+ db "CREATIVE REALITY"
+Filedata dw 20 dup (0)
+Extradata db 6 dup (0)
+Headerlen equ $-Fileheader
+
+
+Roomdata db "DREAMWEB.R00",0 ;Ryan's apartment
+ db 5,255,33,10
+ db 255,255,255,0
+ db 1,6,2,255,3,255,255,255,255,255,0
+
+ db "DREAMWEB.R01",0
+ db 1,255,44,10
+ db 255,255,255,0
+ db 7,2,255,255,255,255,6,255,255,255,1
+
+ db "DREAMWEB.R02",0
+ db 2,255,33,0
+ db 255,255,255,0
+ db 1,0,255,255,1,255,3,255,255,255,2
+
+ db "DREAMWEB.R03",0
+ db 5,255,33,10
+ db 255,255,255,0
+ db 2,2,0,2,4,255,0,255,255,255,3
+
+ db "DREAMWEB.R04",0
+ db 23,255,11,30
+ db 255,255,255,0
+ db 1,4,0,5,255,255,3,255,255,255,4
+
+ db "DREAMWEB.R05",0
+ if demo
+ db 22,255,22,30
+ else
+ db 5,255,22,30
+ endif
+ db 255,255,255,0
+ db 1,2,0,4,255,255,3,255,255,255,5
+
+ db "DREAMWEB.R06",0
+ db 5,255,11,30
+ db 255,255,255,0
+ db 1,0,0,1,2,255,0,255,255,255,6
+
+ db "DREAMWEB.R07",0
+ db 255,255,0,20
+ db 255,255,255,0
+ db 2,2,255,255,255,255,0,255,255,255,7
+
+ db "DREAMWEB.R08",0
+ db 8,255,0,10
+ db 255,255,255,0
+ db 1,2,255,255,255,255,0,11,40,0,8
+
+ db "DREAMWEB.R09",0
+ db 9,255,22,10
+ db 255,255,255,0
+ db 4,6,255,255,255,255,0,255,255,255,9
+
+ db "DREAMWEB.R10",0
+ db 10,255,33,30
+ db 255,255,255,0
+ db 2,0,255,255,2,2,4,22,30,255,10 ;22,30,0 switches
+ ;off path 0 in skip
+ db "DREAMWEB.R11",0
+ db 11,255,11,20
+ db 255,255,255,0
+ db 0,4,255,255,255,255,255,255,255,255,11
+
+ db "DREAMWEB.R12",0
+ db 12,255,22,20
+ db 255,255,255,0
+ db 1,4,255,255,255,255,255,255,255,255,12
+
+ db "DREAMWEB.R13",0
+ db 12,255,22,20
+ db 255,255,255,0
+ db 1,4,255,255,255,255,255,255,255,255,13
+
+ db "DREAMWEB.R14",0
+ db 14,255,44,20
+ db 255,255,255,0
+ db 0,6,255,255,255,255,255,255,255,255,14
+
+ db 32 dup (0)
+ db 32 dup (0)
+ db 32 dup (0)
+ db 32 dup (0)
+
+ db "DREAMWEB.R19",0
+ db 19,255,0,0
+ db 255,255,255,0
+ db 0,4,255,255,255,255,255,255,255,255,19
+
+ db "DREAMWEB.R20",0
+ db 22,255,0,20
+ db 255,255,255,0
+ db 1,4,2,15,255,255,255,255,255,255,20
+
+ db "DREAMWEB.R21",0
+ if demo
+ db 22,255,11,10
+ else
+ db 5,255,11,10
+ endif
+ db 255,255,255,0
+ db 1,4,2,15,1,255,255,255,255,255,21
+
+ db "DREAMWEB.R22",0
+ db 22,255,22,10
+ db 255,255,255,0
+ db 0,4,255,255,1,255,255,255,255,255,22
+
+ db "DREAMWEB.R23",0
+ db 23,255,22,30
+ db 255,255,255,0
+ db 1,4,2,15,3,255,255,255,255,255,23
+
+ db "DREAMWEB.R24",0
+ db 5,255,44,0
+ db 255,255,255,0
+ db 1,6,2,15,255,255,255,255,255,255,24
+
+ db "DREAMWEB.R25",0
+ db 22,255,11,40
+ db 255,255,255,0
+ db 1,0,255,255,255,255,255,255,255,255,25
+
+ db "DREAMWEB.R26",0
+ db 9,255,22,20
+ db 255,255,255,0
+ db 4,2,255,255,255,255,255,255,255,255,26
+
+ db "DREAMWEB.R27",0
+ db 22,255,11,20
+ db 255,255,255,0
+ db 0,6,255,255,255,255,255,255,255,255,27
+
+ db "DREAMWEB.R28",0
+ db 5,255,11,30
+ db 255,255,255,0
+ db 0,0,255,255,2,255,255,255,255,255,28
+
+ db "DREAMWEB.R29",0
+ db 22,255,11,10
+ db 255,255,255,0
+ db 0,2,255,255,255,255,255,255,255,255,29
+
+
+
+ db "DREAMWEB.R05",0 ;Duplicate of hotel lobby,
+ if demo
+ db 22,255,22,10 ;but emerging from the lift.
+ else
+ db 5,255,22,10
+ endif
+ db 255,255,255,0
+ db 1,4,1,15,255,255,255,255,255,255,5
+
+ db "DREAMWEB.R04",0 ;Duplicate of pool hall lobby,
+ db 23,255,22,20 ;but emerging from the lift.
+ db 255,255,255,0
+ db 1,4,2,15,255,255,255,255,255,255,4
+
+ db "DREAMWEB.R10",0 ;entering alley via skip
+ db 10,255,22,30
+ db 255,255,255,0
+ db 3,6,255,255,255,255,255,255,255,255,10
+
+ db "DREAMWEB.R12",0 ;on the beach, getting up.
+ db 12,255,22,20
+ db 255,255,255,0
+ db 0,2,255,255,255,255,255,255,255,255,12
+
+ db "DREAMWEB.R03",0 ;Duplicate of Eden's lobby
+ db 5,255,44,0 ;but emerging from the lift
+ db 255,255,255,0
+ db 1,6,2,255,4,255,255,255,255,255,3
+
+ db "DREAMWEB.R24",0 ;Duplicate of Eden's flat
+ db 5,255,22,0 ;but starting on the bed
+ db 255,255,255,0
+ db 3,6,0,255,255,255,255,33,0,3,24 ; 33,0,3 turns off
+ ; path for lift
+ db "DREAMWEB.R22",0 ;Duplicate
+ db 22,255,22,20 ;of hotel but in pool room
+ db 255,255,255,0
+ db 1,4,255,255,255,255,255,255,255,255,22
+
+ db "DREAMWEB.R22",0 ;Duplicate
+ db 22,255,22,20 ;of hotel but in pool room
+ db 255,255,255,0 ;coming out of bedroom
+ db 0,2,255,255,255,255,255,255,255,255,22
+
+ db "DREAMWEB.R11",0 ;Duplicate
+ db 11,255,22,30 ;of carpark but getting
+ db 255,255,255,0 ;up off the floor
+ db 0,0,255,255,255,255,255,255,255,255,11
+
+ db "DREAMWEB.R28",0
+ db 5,255,11,20
+ db 255,255,255,0
+ db 0,6,255,255,2,255,255,255,255,255,28
+
+ db "DREAMWEB.R21",0
+ if demo
+ db 22,255,11,10
+ else
+ db 5,255,11,10
+ endif
+ db 255,255,255,0
+ db 1,4,2,15,1,255,255,255,255,255,21
+
+ db "DREAMWEB.R26",0
+ db 9,255,0,40
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,26
+
+ db "DREAMWEB.R19",0
+ db 19,255,0,0
+ db 255,255,255,0
+ db 2,2,255,255,255,255,255,255,255,255,19
+
+ db "DREAMWEB.R08",0 ;leaving tvstudio into street
+ db 8,255,11,40
+ db 255,255,255,0
+ db 0,4,255,255,255,255,255,255,255,255,8
+
+ db "DREAMWEB.R01",0
+ db 1,255,44,10
+ db 255,255,255,0
+ db 3,6,255,255,255,255,255,255,255,255,1
+
+
+
+ db "DREAMWEB.R45",0 ;Dream room
+ db 35,255,22,30
+ db 255,255,255,0
+ db 0,6,255,255,255,255,255,255,255,255,45
+
+ db "DREAMWEB.R46",0 ;Dream room
+ db 35,255,22,40
+ db 255,255,255,0
+ db 0,4,255,255,255,255,255,255,255,255,46
+
+ db "DREAMWEB.R47",0 ;Dream room
+ db 35,255,0,0
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,47
+
+ db "DREAMWEB.R45",0 ;Dream room
+ db 35,255,22,30
+ db 255,255,255,0
+ db 4,0,255,255,255,255,255,255,255,255,45
+
+ db "DREAMWEB.R46",0 ;Dream room
+ db 35,255,22,50
+ db 255,255,255,0
+ db 0,4,255,255,255,255,255,255,255,255,46
+
+
+
+ db "DREAMWEB.R50",0 ; Intro sequence one
+ db 35,255,22,30
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,50
+
+ db "DREAMWEB.R51",0 ; Intro sequence two
+ db 35,255,11,30
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,51
+
+ db "DREAMWEB.R52",0 ; Intro sequence three
+ db 35,255,22,30
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,52
+
+ db "DREAMWEB.R53",0 ; Intro sequence four
+ db 35,255,33,0
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,53
+
+ db "DREAMWEB.R54",0 ; Intro sequence five - wasteland
+ db 35,255,0,0
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,54
+
+ db "DREAMWEB.R55",0 ; End sequence
+ db 14,255,44,0
+ db 255,255,255,0
+ db 0,0,255,255,255,255,255,255,255,255,55
+
+
+Madeuproomdat db 32 dup (0)
+
+Roomscango db 1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0
+
+Roompics db 5,0,3,2,4,1,10,9,8,6,11,4,7,7,0
+
+Oplist db 3 dup (0)
+
+Inputline db 128 dup (0)
+
+linedata dw 200 dup (0ffffh)
+
+presslist db 6 dup (255)
+
+savenames db 2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+ db 2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+ db 2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+ db 2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+ db 2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+ db 2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+ db 2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+
+
+
+savefiles db "DREAMWEB.D00",0
+ db "DREAMWEB.D01",0
+ db "DREAMWEB.D02",0
+ db "DREAMWEB.D03",0
+ db "DREAMWEB.D04",0
+ db "DREAMWEB.D05",0
+ db "DREAMWEB.D06",0
+
+Recname db "DREAMWEB.DEM",0
+
+Quitrequested db 0
+Subtitles db 0
+ForeignRelease db 0
+
+
+;-------------------------------------------------------End of code segment----
+
+DREAMWEBPROG ends
+
+
+
+
+;---------------------------------------------------------------Stack space----s
+
+STACKSPACE segment para stack 'STACK'
+
+stak db 256 dup (?)
+
+STACKSPACE ends
+
+
+
+;-----------------------------------------------------------End of all code----
+
+ end Dreamweb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/keypad.asm b/devtools/tasmrecover/dreamweb/keypad.asm
new file mode 100644
index 0000000000..8d918e618b
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/keypad.asm
@@ -0,0 +1,1762 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+Entercode proc near
+
+ mov keypadax,ax
+ mov keypadcx,cx
+ call getridofreels
+ call loadkeypad
+ call createpanel
+ call showicon
+ call showouterpad
+ call showkeypad
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ mov presspointer,0
+ mov getback,0
+
+keypadloop:
+ cmp quitrequested, 0
+ jnz numberright
+
+ call delpointer
+ call readmouse
+ call showkeypad
+ call showpointer
+ call vsync
+ cmp presscount,0
+ jz nopresses
+ dec presscount
+ jmp afterpress
+nopresses: mov pressed,255
+ mov graphicpress,255
+ call vsync
+
+afterpress: call dumppointer
+ call dumpkeypad
+ call dumptextline
+ mov bx,offset cs:keypadlist
+ call checkcoords
+ cmp getback,1
+ jz numberright
+
+ cmp lightcount,1
+ jnz notendkey
+ cmp lockstatus,0
+ jz numberright
+ jmp keypadloop
+
+notendkey: cmp presscount,40
+ jnz keypadloop
+ call addtopresslist
+ cmp pressed,11
+ jnz keypadloop
+ mov ax,keypadax
+ mov cx,keypadcx
+ call isitright
+ jnz incorrect
+ mov lockstatus,0
+ mov al,11
+ call playchannel1
+ mov lightcount,120
+ mov presspointer,0
+ jmp keypadloop
+incorrect: mov al,11
+ call playchannel1
+ mov lightcount,120
+ mov presspointer,0
+ jmp keypadloop
+
+numberright: mov manisoffscreen,0
+ call getridoftemp
+ call restorereels
+ call redrawmainscrn
+ call worktoscreenm
+ ret
+
+keypadlist: dw keypadx+9,keypadx+30,keypady+9,keypady+22,buttonone
+ dw keypadx+31,keypadx+52,keypady+9,keypady+22,buttontwo
+ dw keypadx+53,keypadx+74,keypady+9,keypady+22,buttonthree
+ dw keypadx+9,keypadx+30,keypady+23,keypady+40,buttonfour
+ dw keypadx+31,keypadx+52,keypady+23,keypady+40,buttonfive
+ dw keypadx+53,keypadx+74,keypady+23,keypady+40,buttonsix
+ dw keypadx+9,keypadx+30,keypady+41,keypady+58,buttonseven
+ dw keypadx+31,keypadx+52,keypady+41,keypady+58,buttoneight
+ dw keypadx+53,keypadx+74,keypady+41,keypady+58,buttonnine
+ dw keypadx+9,keypadx+30,keypady+59,keypady+73,buttonnought
+ dw keypadx+31,keypadx+74,keypady+59,keypady+73,buttonenter
+ dw keypadx+72,keypadx+86,keypady+80,keypady+94,quitkey
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+
+
+Loadkeypad proc near
+
+ mov dx,offset cs:extragraphics1
+ call loadintotemp
+ ret
+
+ endp
+
+
+
+
+Quitkey proc near
+
+ cmp commandtype,222
+ jz alreadyqk
+ mov commandtype,222
+ mov al,4
+ call commandonly
+alreadyqk: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notqk
+ and ax,1
+ jnz doqk
+notqk: ret
+
+doqk: mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Addtopresslist proc near
+
+ cmp presspointer,5
+ jz nomorekeys
+ mov al,pressed
+ cmp al,10
+ jnz not10
+ mov al,0
+not10: mov bx,presspointer
+ mov dx,seg presslist
+ mov es,dx
+ add bx,offset es:presslist
+ mov [es:bx],al
+ inc presspointer
+nomorekeys: ret
+
+ endp
+
+
+
+
+Buttonone proc near
+
+ mov cl,1
+ call buttonpress
+ ret
+
+ endp
+
+
+Buttontwo proc near
+
+ mov cl,2
+ call buttonpress
+ ret
+
+ endp
+
+
+
+Buttonthree proc near
+
+ mov cl,3
+ call buttonpress
+ ret
+
+ endp
+
+
+
+Buttonfour proc near
+
+ mov cl,4
+ call buttonpress
+ ret
+
+ endp
+
+
+Buttonfive proc near
+
+ mov cl,5
+ call buttonpress
+ ret
+
+ endp
+
+
+
+Buttonsix proc near
+
+ mov cl,6
+ call buttonpress
+ ret
+
+ endp
+
+
+Buttonseven proc near
+
+ mov cl,7
+ call buttonpress
+ ret
+
+ endp
+
+
+Buttoneight proc near
+
+ mov cl,8
+ call buttonpress
+ ret
+
+ endp
+
+Buttonnine proc near
+
+ mov cl,9
+ call buttonpress
+ ret
+
+ endp
+
+
+
+Buttonnought proc near
+
+ mov cl,10
+ call buttonpress
+ ret
+
+ endp
+
+
+
+
+
+
+Buttonenter proc near
+
+ mov cl,11
+ call buttonpress
+ ret
+
+ endp
+
+
+
+Buttonpress proc near
+
+ mov ch,cl
+ add ch,100
+ cmp commandtype,ch
+ jz alreadyb
+ mov commandtype,ch
+ mov al,cl
+ add al,4
+ push cx
+ call commandonly
+ pop cx
+alreadyb: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notb
+ and ax,1
+ jnz dob
+notb: ret
+
+dob: mov pressed,cl
+ add cl,21
+ mov graphicpress,cl
+ mov presscount,40
+ cmp cl,32
+ jz nonoise
+ mov al,10
+ call playchannel1
+nonoise: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Showouterpad proc near
+
+ mov di,keypadx-3
+ mov bx,keypady-4
+ mov ds,tempgraphics
+ mov al,1
+ mov ah,0
+ call showframe
+ mov di,keypadx+74
+ mov bx,keypady+76
+ mov ds,tempgraphics
+ mov al,37
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Showkeypad proc near
+
+ mov al,22
+ mov di,keypadx+9
+ mov bx,keypady+5
+ call singlekey
+ mov al,23
+ mov di,keypadx+31
+ mov bx,keypady+5
+ call singlekey
+ mov al,24
+ mov di,keypadx+53
+ mov bx,keypady+5
+ call singlekey
+
+ mov al,25
+ mov di,keypadx+9
+ mov bx,keypady+23
+ call singlekey
+ mov al,26
+ mov di,keypadx+31
+ mov bx,keypady+23
+ call singlekey
+ mov al,27
+ mov di,keypadx+53
+ mov bx,keypady+23
+ call singlekey
+
+ mov al,28
+ mov di,keypadx+9
+ mov bx,keypady+41
+ call singlekey
+ mov al,29
+ mov di,keypadx+31
+ mov bx,keypady+41
+ call singlekey
+ mov al,30
+ mov di,keypadx+53
+ mov bx,keypady+41
+ call singlekey
+
+ mov al,31
+ mov di,keypadx+9
+ mov bx,keypady+59
+ call singlekey
+ mov al,32
+ mov di,keypadx+31
+ mov bx,keypady+59
+ call singlekey
+
+ cmp lightcount,0
+ jz notenter
+ dec lightcount
+ mov al,36
+ mov bx,keypady-1+63
+ cmp lockstatus,0
+ jnz changelight
+ mov al,41
+ mov bx,keypady+4+63
+changelight: cmp lightcount,60
+ jc gotlight
+ cmp lightcount,100
+ jnc gotlight
+ dec al
+gotlight: mov ds,tempgraphics
+ mov ah,0
+ mov di,keypadx+60
+ call showframe
+
+notenter: ret
+
+ endp
+
+
+
+
+
+Singlekey proc near
+
+ cmp graphicpress,al
+ jnz gotkey
+ add al,11
+ cmp presscount,8
+ jnc gotkey
+ sub al,11
+; cmp presscount,10
+; jnc gotkey
+; sub al,11
+gotkey: mov ds,tempgraphics
+ sub al,20
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Dumpkeypad proc near
+
+ mov di,keypadx-3
+ mov bx,keypady-4
+ mov cl,120
+ mov ch,90
+ call multidump
+ ret
+
+ endp
+
+
+
+
+
+;---------------------------------
+
+
+
+
+Usemenu proc near
+
+ call getridofreels
+ call loadmenu
+ call createpanel
+ call showpanel
+ call showicon
+ mov newobs,0
+ call drawfloor
+ call printsprites
+
+ mov al,4
+ mov ah,0
+ mov di,menux-48
+ mov bx,menuy-4
+ mov ds,tempgraphics2
+ call showframe
+ call getundermenu
+ mov al,5
+ mov ah,0
+ mov di,menux+54
+ mov bx,menuy+72
+ mov ds,tempgraphics2
+ call showframe
+
+
+ call worktoscreenm
+ mov getback,0
+
+menuloop: call delpointer
+ call putundermenu
+ call showmenu
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumpmenu
+ call dumptextline
+ mov bx,offset cs:menulist
+ call checkcoords
+ cmp getback,1
+ jnz menuloop
+
+ mov manisoffscreen,0
+ call redrawmainscrn
+ call getridoftemp
+ call getridoftemp2
+ call restorereels
+ call worktoscreenm
+ ret
+
+menulist: dw menux+54,menux+68,menuy+72,menuy+88,quitkey
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ ret
+
+ endp
+
+
+
+
+
+
+
+Dumpmenu proc near
+
+ mov di,menux
+ mov bx,menuy
+ mov cl,48
+ mov ch,48
+ call multidump
+ ret
+
+ endp
+
+
+
+
+
+
+Getundermenu proc near
+
+ mov di,menux
+ mov bx,menuy
+ mov cl,48
+ mov ch,48
+ mov ds,buffers
+ mov si,undertimedtext
+ call multiget
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Putundermenu proc near
+
+ mov di,menux
+ mov bx,menuy
+ mov cl,48
+ mov ch,48
+ mov ds,buffers
+ mov si,undertimedtext
+ call multiput
+ ret
+
+ endp
+
+
+
+Showoutermenu proc near
+
+ mov al,40
+ mov ah,0
+ mov di,menux-34
+ mov bx,menuy-40
+ mov ds,tempgraphics
+ call showframe
+ mov al,41
+ mov ah,0
+ mov di,menux+64-34
+ mov bx,menuy-40
+ mov ds,tempgraphics
+ call showframe
+ mov al,42
+ mov ah,0
+ mov di,menux-26
+ mov bx,menuy+57-40
+ mov ds,tempgraphics
+ call showframe
+ mov al,43
+ mov ah,0
+ mov di,menux+64-26
+ mov bx,menuy+57-40
+ mov ds,tempgraphics
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Showmenu proc near
+
+ inc menucount
+ cmp menucount,37*2
+ jnz menuframeok
+ mov menucount,0
+menuframeok: mov al,menucount
+ shr al,1
+ mov ah,0
+ mov di,menux
+ mov bx,menuy
+ mov ds,tempgraphics
+ call showframe
+ ret
+
+ endp
+
+
+
+Loadmenu proc near
+
+ mov dx,offset cs:spritename3
+ call loadintotemp
+ mov dx,offset cs:mongraphics2
+ call loadintotemp2
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Viewfolder proc near
+
+ mov manisoffscreen,1
+ call getridofall
+ call loadfolder
+ mov folderpage,0
+ call showfolder
+ call worktoscreenm
+ mov getback,0
+
+folderloop: call delpointer
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ mov bx,offset cs:folderlist
+ call checkcoords
+ cmp getback,0
+ jz folderloop
+
+ mov manisoffscreen,0
+ call getridoftemp
+ call getridoftemp2
+ call getridoftemp3
+ call getridoftempcharset
+ call restoreall
+ call redrawmainscrn
+ call worktoscreenm
+ ret
+
+folderlist: dw 280,320,160,200,quitkey
+ dw 143,300,6,194,nextfolder
+ dw 0,143,6,194,lastfolder
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+Nextfolder proc near
+
+ cmp folderpage,12
+ jnz cannextf
+ call blank
+ ret
+cannextf: cmp commandtype,201
+ jz alreadynextf
+ mov commandtype,201
+ mov al,16
+ call commandonly
+alreadynextf: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notnextf
+ cmp ax,1
+ jz donextf
+notnextf: ret
+donextf: inc folderpage
+ call folderhints
+ call delpointer
+ call showfolder
+ mov mousebutton,0
+ mov bx,offset cs:folderlist
+ call checkcoords
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+Folderhints proc near
+
+ cmp folderpage,5
+ jnz notaideadd
+ cmp aidedead,1
+ jz notaideadd
+ mov al,13
+ call getlocation
+ cmp al,1
+ jz notaideadd
+ mov al,13
+ call setlocation
+ call showfolder
+ mov al,30
+ call findtext1
+ mov di,0
+ mov bx,86
+ mov dl,141
+ mov ah,16
+ call printdirect
+ call worktoscreenm
+ mov cx,200
+ call hangonp
+ ret
+
+notaideadd: cmp folderpage,9
+ jnz notaristoadd
+ mov al,7
+ call getlocation
+ cmp al,1
+ jz notaristoadd
+ mov al,7
+ call setlocation
+ call showfolder
+ mov al,31
+ call findtext1
+ mov di,0
+ mov bx,86
+ mov dl,141
+ mov ah,16
+ call printdirect
+ call worktoscreenm
+ mov cx,200
+ call hangonp
+notaristoadd: ret
+
+ endp
+
+
+
+Lastfolder proc near
+
+ cmp folderpage,0
+ jnz canlastf
+ call blank
+ ret
+canlastf: cmp commandtype,202
+ jz alreadylastf
+ mov commandtype,202
+ mov al,17
+ call commandonly
+alreadylastf: cmp folderpage,0
+ jz notlastf
+ mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notlastf
+ cmp ax,1
+ jz dolastf
+notlastf: ret
+dolastf: dec folderpage
+ call delpointer
+ call showfolder
+ mov mousebutton,0
+ mov bx,offset cs:folderlist
+ call checkcoords
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+Loadfolder proc near
+
+ mov dx,offset cs:foldergraphic1
+ call loadintotemp
+ mov dx,offset cs:foldergraphic2
+ call loadintotemp2
+ mov dx,offset cs:foldergraphic3
+ call loadintotemp3
+ mov dx,offset cs:characterset3
+ call loadtempcharset
+ mov dx,offset cs:foldertext
+ call loadtemptext
+ ret
+
+ endp
+
+
+
+
+Showfolder proc near
+
+ mov commandtype,255
+ cmp folderpage,0
+ jz closedfolder
+ call usetempcharset
+ call createpanel2
+ mov ds,tempgraphics
+ mov di,0
+ mov bx,0
+ mov al,0
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,143
+ mov bx,0
+ mov al,1
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,0
+ mov bx,92
+ mov al,2
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,143
+ mov bx,92
+ mov al,3
+ mov ah,0
+ call showframe
+ call folderexit
+
+ cmp folderpage,1
+ jz noleftpage
+ call showleftpage
+noleftpage: cmp folderpage,12
+ jz norightpage
+ call showrightpage
+norightpage: call usecharset1
+ call undertextline
+ ret
+
+closedfolder: call createpanel2
+ mov ds,tempgraphics3
+ mov di,143-28
+ mov bx,0
+ mov al,0
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics3
+ mov di,143-28
+ mov bx,92
+ mov al,1
+ mov ah,0
+ call showframe
+ call folderexit
+ call undertextline
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Folderexit proc near
+
+ mov ds,tempgraphics2
+ mov di,296
+ mov bx,178
+ mov al,6
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+Showleftpage proc near
+
+ mov ds,tempgraphics2
+ mov di,0
+ mov bx,12
+ mov al,3
+ mov ah,0
+ call showframe
+
+ mov bx,12+5
+ mov cx,9
+leftpageloop: push cx bx
+ mov ds,tempgraphics2
+ mov di,0
+ mov al,4
+ mov ah,0
+ call showframe
+ pop bx cx
+ add bx,16
+ loop leftpageloop
+
+ mov ds,tempgraphics2
+ mov di,0
+ mov al,5
+ mov ah,0
+ call showframe
+
+ mov linespacing,8
+ mov charshift,91
+ mov kerning,1
+ mov bl,folderpage
+ dec bl
+ dec bl
+ add bl,bl
+ mov bh,0
+ add bx,bx
+ mov es,textfile1
+ mov si,[es:bx]
+ add si,66*2
+ mov di,2
+ mov bx,48
+ mov dl,140
+ mov cx,2
+twolotsleft: push cx
+contleftpage: call printdirect
+ add bx,linespacing
+ cmp al,0
+ jnz contleftpage
+ pop cx
+ loop twolotsleft
+
+ mov kerning,0
+ mov charshift,0
+ mov linespacing,10
+
+ mov es,workspace
+ mov ds,workspace
+ mov di,(48*320)+2
+ mov si,(48*320)+2+130
+ mov cx,120
+flipfolder: push cx di si
+ mov cx,65
+flipfolderline: mov al,[es:di]
+ mov ah,[es:si]
+ mov [es:di],ah
+ mov [es:si],al
+ dec si
+ inc di
+ loop flipfolderline
+ pop si di cx
+ add si,320
+ add di,320
+ loop flipfolder
+ ret
+
+ endp
+
+
+
+Showrightpage proc near
+
+ mov ds,tempgraphics2
+ mov di,143
+ mov bx,12
+ mov al,0
+ mov ah,0
+ call showframe
+
+ mov bx,12+37
+ mov cx,7
+rightpageloop: push cx bx
+ mov ds,tempgraphics2
+ mov di,143
+ mov al,1
+ mov ah,0
+ call showframe
+ pop bx cx
+ add bx,16
+ loop rightpageloop
+
+ mov ds,tempgraphics2
+ mov di,143
+ mov al,2
+ mov ah,0
+ call showframe
+
+ mov linespacing,8
+ mov kerning,1
+ mov bl,folderpage
+ dec bl
+ add bl,bl
+ mov bh,0
+ add bx,bx
+ mov es,textfile1
+ mov si,[es:bx]
+ add si,66*2
+ mov di,152
+ mov bx,48
+ mov dl,140
+ mov cx,2
+twolotsright: push cx
+contrightpage: call printdirect
+ add bx,linespacing
+ cmp al,0
+ jnz contrightpage
+ pop cx
+ loop twolotsright
+
+ mov kerning,0
+ mov linespacing,10
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Entersymbol proc near
+
+ mov manisoffscreen,1
+ call getridofreels
+ mov dx,offset cs:symbolgraphic
+ call loadintotemp
+ mov symboltopx,24
+ mov symboltopdir,0
+ mov symbolbotx,24
+ mov symbolbotdir,0
+ call redrawmainscrn
+ call showsymbol
+ call undertextline
+ call worktoscreenm
+ mov getback,0
+
+symbolloop: call delpointer
+ call updatesymboltop
+ call updatesymbolbot
+ call showsymbol
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ call dumpsymbol
+ mov bx,offset cs:symbollist
+ call checkcoords
+ cmp getback,0
+ jz symbolloop
+
+ cmp symbolbotnum,3
+ jnz symbolwrong
+ cmp symboltopnum,5
+ jnz symbolwrong
+ mov al,43
+ call removesetobject
+ mov al,46
+ call placesetobject
+ mov ah,roomnum
+ add ah,12
+ mov al,0
+ call turnanypathon
+ mov manisoffscreen,0
+ call redrawmainscrn
+ call getridoftemp
+ call restorereels
+ call worktoscreenm
+ mov al,13
+ call playchannel1
+ ret
+
+symbolwrong: mov al,46
+ call removesetobject
+ mov al,43
+ call placesetobject
+ mov ah,roomnum
+ add ah,12
+ mov al,0
+ call turnanypathoff
+ mov manisoffscreen,0
+ call redrawmainscrn
+ call getridoftemp
+ call restorereels
+ call worktoscreenm
+ ret
+
+symbollist: dw symbolx+40,symbolx+64,symboly+2,symboly+16,quitsymbol
+ dw symbolx,symbolx+52,symboly+20,symboly+50,settopleft
+ dw symbolx+52,symbolx+104,symboly+20,symboly+50,settopright
+ dw symbolx,symbolx+52,symboly+50,symboly+80,setbotleft
+ dw symbolx+52,symbolx+104,symboly+50,symboly+80,setbotright
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Quitsymbol proc near
+
+ cmp symboltopx,24
+ jnz blank
+ cmp symbolbotx,24
+ jnz blank
+ cmp commandtype,222
+ jz alreadyqs
+ mov commandtype,222
+ mov al,18
+ call commandonly
+alreadyqs: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notqs
+ and ax,1
+ jnz doqs
+notqs: ret
+
+doqs: mov getback,1
+ ret
+
+ endp
+
+
+
+
+Settopleft proc near
+
+ cmp symboltopdir,0
+ jnz blank
+ cmp commandtype,210
+ jz alreadytopl
+ mov commandtype,210
+ mov al,19
+ call commandonly
+alreadytopl: cmp mousebutton,0
+ jz notopleft
+ mov symboltopdir,-1
+notopleft: ret
+
+ endp
+
+
+
+Settopright proc near
+
+ cmp symboltopdir,0
+ jnz blank
+ cmp commandtype,211
+ jz alreadytopr
+ mov commandtype,211
+ mov al,20
+ call commandonly
+alreadytopr: cmp mousebutton,0
+ jz notopright
+ mov symboltopdir,1
+notopright: ret
+
+ endp
+
+
+
+
+Setbotleft proc near
+
+ cmp symbolbotdir,0
+ jnz blank
+ cmp commandtype,212
+ jz alreadybotl
+ mov commandtype,212
+ mov al,21
+ call commandonly
+alreadybotl: cmp mousebutton,0
+ jz nobotleft
+ mov symbolbotdir,-1
+nobotleft: ret
+
+ endp
+
+
+
+Setbotright proc near
+
+ cmp symbolbotdir,0
+ jnz blank
+ cmp commandtype,213
+ jz alreadybotr
+ mov commandtype,213
+ mov al,22
+ call commandonly
+alreadybotr: cmp mousebutton,0
+ jz nobotright
+ mov symbolbotdir,1
+nobotright: ret
+
+ endp
+
+
+
+
+
+
+
+Dumpsymbol proc near
+
+ mov newtextline,0
+ mov di,symbolx
+ mov bx,symboly+20
+ mov cl,104
+ mov ch,60
+ call multidump
+ ret
+
+ endp
+
+
+
+
+Showsymbol proc near
+
+ mov al,12
+ mov ah,0
+ mov di,symbolx
+ mov bx,symboly
+ mov ds,tempgraphics
+ call showframe
+
+ mov al,symboltopx
+ mov ah,0
+ mov di,ax
+ add di,symbolx-44
+ mov al,symboltopnum
+ mov bx,symboly+20
+ mov ds,tempgraphics
+ mov ah,32
+ push ax di bx ds
+ call showframe
+ pop ds bx di ax
+ call nextsymbol
+ add di,49
+ push ax di bx ds
+ call showframe
+ pop ds bx di ax
+ call nextsymbol
+ add di,49
+ call showframe
+
+ mov al,symbolbotx
+ mov ah,0
+ mov di,ax
+ add di,symbolx-44
+ mov al,symbolbotnum
+ add al,6
+ mov bx,symboly+49
+ mov ds,tempgraphics
+ mov ah,32
+ push ax di bx ds
+ call showframe
+ pop ds bx di ax
+ call nextsymbol
+ add di,49
+ push ax di bx ds
+ call showframe
+ pop ds bx di ax
+ call nextsymbol
+ add di,49
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+Nextsymbol proc near
+
+ inc al
+ cmp al,6
+ jz topwrap
+ cmp al,12
+ jz botwrap
+ ret
+topwrap: mov al,0
+ ret
+botwrap: mov al,6
+ ret
+
+ endp
+
+
+
+Updatesymboltop proc near
+
+ cmp symboltopdir,0
+ jz topfinished
+ cmp symboltopdir,-1
+ jz backwards
+
+ inc symboltopx
+ cmp symboltopx,49
+ jnz notwrapfor
+ mov symboltopx,0
+ dec symboltopnum
+ cmp symboltopnum,-1
+ jnz topfinished
+ mov symboltopnum,5
+ ret
+notwrapfor: cmp symboltopx,24
+ jnz topfinished
+ mov symboltopdir,0
+ ret
+
+backwards: dec symboltopx
+ cmp symboltopx,-1
+ jnz notwrapback
+ mov symboltopx,48
+ inc symboltopnum
+ cmp symboltopnum,6
+ jnz topfinished
+ mov symboltopnum,0
+ ret
+notwrapback: cmp symboltopx,24
+ jnz topfinished
+ mov symboltopdir,0
+topfinished: ret
+
+ endp
+
+
+
+Updatesymbolbot proc near
+
+ cmp symbolbotdir,0
+ jz botfinished
+ cmp symbolbotdir,-1
+ jz backwardsbot
+
+ inc symbolbotx
+ cmp symbolbotx,49
+ jnz notwrapforb
+ mov symbolbotx,0
+ dec symbolbotnum
+ cmp symbolbotnum,-1
+ jnz botfinished
+ mov symbolbotnum,5
+ ret
+notwrapforb: cmp symbolbotx,24
+ jnz botfinished
+ mov symbolbotdir,0
+ ret
+
+backwardsbot: dec symbolbotx
+ cmp symbolbotx,-1
+ jnz notwrapbackb
+ mov symbolbotx,48
+ inc symbolbotnum
+ cmp symbolbotnum,6
+ jnz botfinished
+ mov symbolbotnum,0
+ ret
+notwrapbackb: cmp symbolbotx,24
+ jnz botfinished
+ mov symbolbotdir,0
+botfinished: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Dumpsymbox proc near
+
+ cmp dumpx,-1
+ jz nodumpsym
+ mov di,dumpx
+ mov bx,dumpy
+ mov cl,30
+ mov ch,77;30
+ call multidump
+ mov dumpx,-1
+nodumpsym: ret
+
+ endp
+
+
+
+
+
+
+
+Usediary proc near
+
+ call getridofreels
+ mov dx,offset cs:diarygraphic
+ call loadintotemp
+ mov dx,offset cs:diarytext
+ call loadtemptext
+
+ mov dx,offset cs:characterset3
+ call loadtempcharset
+ call createpanel
+ call showicon
+ call showdiary
+ call undertextline
+ call showdiarypage
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ mov getback,0
+
+diaryloop: call delpointer
+ call readmouse
+ call showdiarykeys
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumpdiarykeys
+ call dumptextline
+ mov bx,offset cs:diarylist
+ call checkcoords
+ cmp getback,0
+ jz diaryloop
+
+ call getridoftemp
+ call getridoftemptext
+ call getridoftempcharset
+ call restorereels
+ mov manisoffscreen,0
+ call redrawmainscrn
+ call worktoscreenm
+ ret
+
+diarylist: dw diaryx+94,diaryx+110,diaryy+97,diaryy+113,diarykeyn
+ dw diaryx+151,diaryx+167,diaryy+71,diaryy+87,diarykeyp
+ dw diaryx+176,diaryx+192,diaryy+108,diaryy+124,quitkey
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ ret
+
+ endp
+
+
+
+
+
+
+
+Showdiary proc near
+
+ mov al,1
+ mov ah,0
+ mov di,diaryx
+ mov bx,diaryy+37
+ mov ds,tempgraphics
+ call showframe
+ mov al,2
+ mov ah,0
+ mov di,diaryx+176
+ mov bx,diaryy+108
+ mov ds,tempgraphics
+ call showframe
+ ret
+
+ endp
+
+
+
+
+Showdiarykeys proc near
+
+ cmp presscount,0
+ jz nokeyatall
+ dec presscount
+ cmp presscount,0
+ jz nokeyatall
+ cmp pressed,"N"
+ jnz nokeyn
+ mov al,3
+ cmp presscount,1
+ jz gotkeyn
+ mov al,4
+gotkeyn: mov ah,0
+ mov di,diaryx+94
+ mov bx,diaryy+97
+ mov ds,tempgraphics
+ call showframe
+ cmp presscount,1
+ jnz notshown
+ call showdiarypage
+notshown: ret
+
+nokeyn: mov al,5
+ cmp presscount,1
+ jz gotkeyp
+ mov al,6
+gotkeyp: mov ah,0
+ mov di,diaryx+151
+ mov bx,diaryy+71
+ mov ds,tempgraphics
+ call showframe
+ cmp presscount,1
+ jnz notshowp
+ call showdiarypage
+notshowp: ret
+
+nokeyatall: ret
+
+ endp
+
+
+
+
+
+
+Dumpdiarykeys proc near
+
+ cmp presscount,1
+ jnz notdumpdiary
+ cmp sartaindead,1
+ jz notsartadd
+ cmp diarypage,5
+ jnz notsartadd
+ cmp diarypage,5
+ jnz notsartadd
+ mov al,6
+ call getlocation
+ cmp al,1
+ jz notsartadd
+ mov al,6
+ call setlocation
+
+ call delpointer
+ mov al,12
+ call findtext1
+ mov di,70 ;diaryx+48
+ mov bx,106 ;diaryy+16
+ mov dl,241
+ mov ah,16
+ call printdirect
+
+ call worktoscreenm
+ mov cx,200
+ call hangonp
+ call createpanel
+ call showicon
+ call showdiary
+ call showdiarypage
+ call worktoscreenm
+ call showpointer
+ ret
+
+notsartadd: mov di,diaryx+48
+ mov bx,diaryy+15
+ mov cl,200
+ mov ch,16
+ call multidump
+notdumpdiary: mov di,diaryx+94
+ mov bx,diaryy+97
+ mov cl,16
+ mov ch,16
+ call multidump
+ mov di,diaryx+151
+ mov bx,diaryy+71
+ mov cl,16
+ mov ch,16
+ call multidump
+ ret
+
+ endp
+
+
+
+Diarykeyp proc near
+
+ cmp commandtype,214
+ jz alreadykeyp
+ mov commandtype,214
+ mov al,23
+ call commandonly
+alreadykeyp: cmp mousebutton,0
+ jz notkeyp
+ mov ax,oldbutton
+ cmp ax,mousebutton
+ jz notkeyp
+ cmp presscount,0
+ jnz notkeyp
+ mov al,16
+ call playchannel1
+ mov presscount,12
+ mov pressed,"P"
+ dec diarypage
+ cmp diarypage,-1
+ jnz notkeyp
+ mov diarypage,11
+notkeyp: ret
+
+ endp
+
+
+
+Diarykeyn proc near
+
+ cmp commandtype,213
+ jz alreadykeyn
+ mov commandtype,213
+ mov al,23
+ call commandonly
+alreadykeyn: cmp mousebutton,0
+ jz notkeyn
+ mov ax,oldbutton
+ cmp ax,mousebutton
+ jz notkeyn
+ cmp presscount,0
+ jnz notkeyn
+ mov al,16
+ call playchannel1
+ mov presscount,12
+ mov pressed,"N"
+ inc diarypage
+ cmp diarypage,12
+ jnz notkeyn
+ mov diarypage,0
+notkeyn: ret
+
+ endp
+
+
+
+
+
+
+Showdiarypage proc near
+
+ mov al,0
+ mov ah,0
+ mov di,diaryx
+ mov bx,diaryy
+ mov ds,tempgraphics
+ call showframe
+
+ mov al,diarypage
+ call findtext1
+
+ mov kerning,1
+ call usetempcharset
+ mov di,diaryx+48
+ mov bx,diaryy+16
+ mov dl,240
+ mov ah,16
+ mov charshift,91+91
+ call printdirect
+
+ mov di,diaryx+129
+ mov bx,diaryy+16
+ mov dl,240
+ mov ah,16
+ call printdirect
+
+ mov di,diaryx+48
+ mov bx,diaryy+23
+ mov dl,240
+ mov ah,16
+ call printdirect
+
+ mov kerning,0
+ mov charshift,0
+ call usecharset1
+ ret
+
+ endp
+
+
+
+
+
+Findtext1 proc near
+
+ mov ah,0
+ mov si,ax
+ add si,si
+ mov es,textfile1
+ mov ax,[es:si]
+ add ax,textstart
+ mov si,ax
+ ret
+
+ endp
+
diff --git a/devtools/tasmrecover/dreamweb/look.asm b/devtools/tasmrecover/dreamweb/look.asm
new file mode 100644
index 0000000000..399e1f16fd
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/look.asm
@@ -0,0 +1,166 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+;---------------------------------------------------------------Look-routine----
+
+Autolook proc near
+
+ mov ax,mousex
+ cmp ax,oldx
+ jnz diffmouse
+ mov ax,mousey
+ cmp ax,oldy
+ jnz diffmouse
+
+ dec lookcounter
+ cmp lookcounter,0
+ jnz noautolook
+ cmp watchingtime,0
+ jnz noautolook
+ call dolook
+noautolook: ret
+
+diffmouse: mov lookcounter,1000
+ ret
+
+ endp
+
+
+
+
+Look proc near
+
+ cmp watchingtime,0
+ jnz blank
+ cmp pointermode,2
+ jz blank
+
+ cmp commandtype,241
+ jz alreadylook
+ mov commandtype,241
+ mov al,25
+ call commandonly
+alreadylook: cmp mousebutton,1
+ jnz nolook
+ mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nolook
+ call dolook
+nolook: ret
+
+ endp
+
+
+
+
+
+Dolook proc near
+
+ call createpanel
+ call showicon
+ call undertextline
+ call worktoscreenm
+
+ mov commandtype,255
+ call dumptextline
+
+ mov bl,roomnum
+ and bl,31
+ mov bh,0
+ add bx,bx
+
+ mov es,roomdesc
+ add bx,intextdat
+
+ mov si,[es:bx]
+ add si,intext
+
+ call findnextcolon
+
+ mov di,66
+ cmp reallocation,50
+ jc notdream3
+ mov di,40
+notdream3: mov bx,80
+ mov dl,241
+ call printslow
+
+ cmp al,1
+ jz afterlook
+ mov cx,400
+ call hangonp
+
+afterlook: mov pointermode,0
+ mov commandtype,0
+ call redrawmainscrn
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+
+Redrawmainscrn proc near
+
+ mov timecount,0
+ call createpanel
+ mov newobs,0
+ call drawfloor
+ call printsprites
+ call reelsonscreen
+ call showicon
+ call getunderzoom
+ call undertextline
+ call readmouse
+ mov commandtype,255
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Getback1 proc near
+
+ cmp pickup,0
+ jz notgotobject
+ call blank
+ ret
+
+notgotobject: cmp commandtype,202
+ jz alreadyget
+ mov commandtype,202
+ mov al,26
+ call commandonly
+alreadyget: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nogetback
+ and ax,1
+ jnz dogetback
+nogetback: ret
+
+dogetback: mov getback,1
+ mov pickup,0
+ ret
+
+ endp
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/monitor.asm b/devtools/tasmrecover/dreamweb/monitor.asm
new file mode 100644
index 0000000000..7f3979c2b3
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/monitor.asm
@@ -0,0 +1,1497 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+Usemon proc near
+
+ mov lasttrigger,0
+
+ push cs ;start off with no file name
+ pop es
+ mov di,offset cs:currentfile+1
+ mov cx,12
+ mov al,32
+ rep stosb
+ push cs ;start off with no file name
+ pop es
+ mov di,offset cs:operand1+1
+ mov cx,12
+ mov al,32
+ rep stosb
+
+ push cs ;clear all keys
+ pop es
+ mov di,offset cs:keys
+ mov byte ptr [es:di],1
+ add di,26
+ mov cx,3
+keyloop: mov byte ptr [es:di],0
+ add di,26
+ loop keyloop
+
+ call createpanel
+ call showpanel
+ call showicon
+ call drawfloor
+ call getridofall ;reels
+
+ mov dx,offset cs:mongraphicname
+ call loadintotemp
+ call loadpersonal
+ call loadnews
+ call loadcart
+ mov dx,offset cs:characterset2
+ call loadtempcharset
+
+ call printoutermon
+ call initialmoncols
+ call printlogo
+ call worktoscreen
+ call turnonpower
+ call fadeupyellows
+ call fadeupmonfirst
+
+ mov monadx,76
+ mov monady,141
+ mov al,1
+ call monmessage
+ mov cx,120
+ call hangoncurs
+ mov al,2
+ call monmessage
+ mov cx,60
+ call randomaccess
+ mov al,3
+ call monmessage
+ mov cx,100
+ call hangoncurs
+ call printlogo
+ call scrollmonitor
+ mov bufferin,0
+ mov bufferout,0
+
+moreinput: mov di,monadx
+ mov bx,monady
+ push di bx
+ call input
+ pop bx di
+ mov monadx,di
+ mov monady,bx
+ call execcommand
+ cmp al,0
+ jz moreinput
+
+endmon: call getridoftemp
+ call getridoftempcharset
+ mov es,textfile1
+ call deallocatemem
+ mov es,textfile2
+ call deallocatemem
+ mov es,textfile3
+ call deallocatemem
+ mov getback,1
+ mov al,26
+ call playchannel1
+ mov manisoffscreen,0
+ call restoreall ;reels
+ call redrawmainscrn
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+
+Printoutermon proc near
+
+ mov di,40
+ mov bx,32
+ mov ds,tempgraphics
+ mov al,1
+ mov ah,0
+ call showframe
+ mov di,264
+ mov bx,32
+ mov ds,tempgraphics
+ mov al,2
+ mov ah,0
+ call showframe
+ mov di,40
+ mov bx,12
+ mov ds,tempgraphics
+ mov al,3
+ mov ah,0
+ call showframe
+ mov di,40
+ mov bx,164
+ mov ds,tempgraphics
+ mov al,4
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+Loadpersonal proc near
+
+ mov al,location
+ mov dx,offset cs:monitorfile1
+ cmp al,0
+ jz foundpersonal
+ cmp al,42
+ jz foundpersonal
+ mov dx,offset cs:monitorfile2
+ cmp al,2
+ jz foundpersonal
+
+foundpersonal: call openfile
+ call readheader
+ mov bx,[es:di]
+ push bx
+ mov cl,4
+ shr bx,cl
+ call allocatemem
+ mov textfile1,ax
+ mov ds,ax
+ pop cx
+ mov dx,0
+ call readfromfile
+ call closefile
+ ret
+
+ endp
+
+
+
+
+Loadnews proc near ;textfile2 holds information
+ ;accessable by anyone
+ mov al,newsitem
+ mov dx,offset cs:monitorfile10
+ cmp al,0
+ jz foundnews
+ mov dx,offset cs:monitorfile11
+ cmp al,1
+ jz foundnews
+ mov dx,offset cs:monitorfile12
+ cmp al,2
+ jz foundnews
+ mov dx,offset cs:monitorfile13
+foundnews: call openfile
+ call readheader
+ mov bx,[es:di]
+ push bx
+ mov cl,4
+ shr bx,cl
+ call allocatemem
+ mov textfile2,ax
+ mov ds,ax
+ pop cx
+ mov dx,0
+ call readfromfile
+ call closefile
+ ret
+
+ endp
+
+
+
+
+
+
+Loadcart proc near
+
+ call lookininterface
+
+ mov dx,offset cs:monitorfile20
+ cmp al,0
+ jz gotcart
+ mov dx,offset cs:monitorfile21
+ cmp al,1
+ jz gotcart
+ mov dx,offset cs:monitorfile22
+ cmp al,2
+ jz gotcart
+ mov dx,offset cs:monitorfile23
+ cmp al,3
+ jz gotcart
+ mov dx,offset cs:monitorfile24
+gotcart: call openfile
+ call readheader
+ mov bx,[es:di]
+ push bx
+ mov cl,4
+ shr bx,cl
+ call allocatemem
+ mov textfile3,ax
+ mov ds,ax
+ pop cx
+ mov dx,0
+ call readfromfile
+ call closefile
+ ret
+
+ endp
+
+
+
+
+
+
+Lookininterface proc near
+
+ mov al,"I"
+ mov ah,"N"
+ mov cl,"T"
+ mov ch,"F"
+ call findsetobject ;this bit searches set obs
+ ;until the interface is found
+ ;al holds object number
+ mov ah,1 ;ah holds type, 1=set object
+ call checkinside ;this searches for any extra
+ ;object inside the interface..
+ cmp cl,numexobjects
+ jz emptyinterface
+ mov al,[es:bx+15] ;get the last letter of ID code
+ inc al
+ ret
+emptyinterface: mov al,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+Turnonpower proc near
+
+ mov cx,3
+powerloop: push cx
+ call powerlighton
+ mov cx,30
+ call hangon
+ call powerlightoff
+ mov cx,30
+ call hangon
+ pop cx
+ loop powerloop
+ call powerlighton
+ ret
+
+ endp
+
+
+
+
+
+Randomaccess proc near
+
+accessloop: push cx
+ call vsync
+ call vsync
+ call randomnum1
+ and al,15
+ cmp al,10
+ jc off
+ call accesslighton
+ jmp chosenaccess
+off: call accesslightoff
+chosenaccess: pop cx
+ loop accessloop
+ call accesslightoff
+ ret
+
+ endp
+
+
+
+Powerlighton proc near
+
+ mov di,257+4
+ mov bx,182
+ mov ds,tempgraphics
+ mov al,6
+ mov ah,0
+ push di bx
+ call showframe
+ pop bx di
+ mov cl,12
+ mov ch,8
+ call multidump
+ ret
+
+ endp
+
+
+
+
+Powerlightoff proc near
+
+ mov di,257+4
+ mov bx,182
+ mov ds,tempgraphics
+ mov al,5
+ mov ah,0
+ push di bx
+ call showframe
+ pop bx di
+ mov cl,12
+ mov ch,8
+ call multidump
+ ret
+
+ endp
+
+
+
+
+Accesslighton proc near
+
+ mov di,74
+ mov bx,182
+ mov ds,tempgraphics
+ mov al,8
+ mov ah,0
+ push di bx
+ call showframe
+ pop bx di
+ mov cl,12
+ mov ch,8
+ call multidump
+ ret
+
+ endp
+
+
+
+
+Accesslightoff proc near
+
+ mov di,74
+ mov bx,182
+ mov ds,tempgraphics
+ mov al,7
+ mov ah,0
+ push di bx
+ call showframe
+ pop bx di
+ mov cl,12
+ mov ch,8
+ call multidump
+ ret
+
+ endp
+
+
+
+
+
+Locklighton proc near
+
+ mov di,56
+ mov bx,182
+ mov ds,tempgraphics
+ mov al,10
+ mov ah,0
+ push di bx
+ call showframe
+ pop bx di
+ mov cl,12
+ mov ch,8
+ call multidump
+ ret
+
+ endp
+
+
+
+
+Locklightoff proc near
+
+ mov di,56
+ mov bx,182
+ mov ds,tempgraphics
+ mov al,9
+ mov ah,0
+ push di bx
+ call showframe
+ pop bx di
+ mov cl,12
+ mov ch,8
+ call multidump
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Input proc near
+
+ push cs
+ pop es
+ mov di,offset cs:inputline
+ mov cx,64
+ mov al,0
+ rep stosb
+
+ mov curpos,0
+ mov al,">"
+ mov di,monadx
+ mov bx,monady
+ mov ds,tempcharset
+ mov ah,0
+ call printchar
+ mov di,monadx
+ mov bx,monady
+ mov cl,6
+ mov ch,8
+ call multidump
+ add monadx,6
+ mov ax,monadx
+ mov curslocx,ax
+ mov ax,monady
+ mov curslocy,ax
+
+waitkey: call printcurs
+ call vsync
+ call delcurs
+ call readkey
+ mov al,currentkey
+ cmp al,0
+ jz waitkey
+ cmp al,13
+ jz endofinput
+ cmp al,8
+ jnz notdel
+ cmp curpos,0
+ jz waitkey
+ call delchar
+ jmp waitkey
+notdel: cmp curpos,28
+ jz waitkey
+ cmp currentkey,32
+ jnz notleadingspace
+ cmp curpos,0
+ jz waitkey
+notleadingspace: call makecaps
+ push cs
+ pop es
+ mov si,curpos
+ add si,si
+ add si,offset cs:inputline
+ mov [es:si],al
+
+ cmp al,"Z"+1
+ jnc waitkey
+
+ push ax es si
+ mov di,monadx
+ mov bx,monady
+ mov ds,mapstore
+ mov ax,curpos
+ xchg al,ah
+ mov si,ax
+ mov cl,8
+ mov ch,8
+ call multiget
+ pop si es ax
+
+ push es si
+ mov di,monadx
+ mov bx,monady
+ mov ds,tempcharset
+ mov ah,0
+ call printchar
+ pop si es
+ ;dec cx
+ mov [es:si+1],cl
+ mov ch,0
+ add monadx,cx
+ inc curpos
+ add curslocx,cx
+ jmp waitkey
+
+endofinput: ret
+
+ endp
+
+
+
+
+
+
+
+
+Makecaps proc near
+
+ cmp al,"a"
+ jc notupperc
+ sub al,32
+notupperc: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Delchar proc near
+
+ dec curpos
+ mov si,curpos
+ add si,si
+ push cs
+ pop es
+ add si,offset cs:inputline
+ mov byte ptr [es:si],0
+ mov al,[es:si+1]
+ mov ah,0
+ sub monadx,ax
+ sub curslocx,ax
+ mov di,monadx
+ mov bx,monady
+ mov ds,mapstore
+ mov ax,curpos
+ xchg al,ah
+ mov si,ax
+ mov cl,8
+ mov ch,8
+ call multiput
+ mov di,monadx
+ mov bx,monady
+ mov cl,al
+ mov ch,8
+ call multidump
+ ret
+
+ endp
+
+
+
+
+
+
+
+Execcommand proc near
+
+ push cs
+ pop es
+ mov bx,offset cs:comlist
+ push cs
+ pop ds
+ mov si,offset cs:inputline
+ mov al,[si]
+ cmp al,0
+ jnz notblankinp
+ call scrollmonitor
+ ret
+
+notblankinp: mov cl,0
+comloop: push bx si
+comloop2: mov al,[si]
+ add si,2
+ mov ah,[es:bx]
+ inc bx
+ cmp ah,32
+ jz foundcom
+ cmp al,ah
+ jz comloop2
+ pop si bx
+ add bx,10
+ inc cl
+ cmp cl,6
+ jnz comloop
+ call neterror
+ mov al,0
+ ret
+foundcom: pop si bx
+ cmp cl,1
+ jz testcom
+ cmp cl,2
+ jz directory
+ cmp cl,3
+ jz accesscom
+ cmp cl,4
+ jz signoncom
+ cmp cl,5
+ jz keyscom
+ jmp quitcom
+
+directory: call dircom
+ mov al,0
+ ret
+
+signoncom: call signon
+ mov al,0
+ ret
+
+accesscom: call read
+ mov al,0
+ ret
+
+keyscom: call showkeys
+ mov al,0
+ ret
+
+testcom: mov al,6
+ call monmessage
+ mov al,0
+ ret
+
+quitcom: mov al,1
+ ret
+
+comlist: db "EXIT "
+ db "HELP "
+ db "LIST "
+ db "READ "
+ db "LOGON "
+ db "KEYS "
+
+keys: db 1,0,"PUBLIC PUBLIC ",0
+ db 0,0,"BLACKDRAGON RYAN ",0
+ db 0,0,"HENDRIX LOUIS ",0
+ db 0,0,"SEPTIMUS BECKETT ",0
+ db 255,255
+
+operand1: db " ",0
+rootdir: db 34,"ROOT ",0
+currentfile db 34," ",0
+
+ endp
+
+
+
+
+
+
+
+Neterror proc near
+
+ mov al,5
+ call monmessage
+ call scrollmonitor
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Dircom proc near
+
+ mov cx,30
+ call randomaccess
+ call parser
+ cmp byte ptr [es:di+1],0
+ jz dirroot
+ call dirfile
+ ret
+
+dirroot: mov logonum,0
+ push cs
+ pop ds
+ mov si,offset cs:rootdir
+ inc si
+ push cs
+ pop es
+ mov di,offset cs:currentfile
+ inc di
+ mov cx,12
+ rep movsb
+ call monitorlogo
+ call scrollmonitor
+
+ mov al,9
+ call monmessage
+
+ mov es,textfile1
+ call searchforfiles
+ mov es,textfile2
+ call searchforfiles
+ mov es,textfile3
+ call searchforfiles
+
+ call scrollmonitor
+ ret
+
+ endp
+
+
+
+
+
+
+Searchforfiles proc near
+
+ mov bx,textstart
+directloop1: mov al,[es:bx]
+ inc bx
+ cmp al,"*"
+ jz endofdir
+ cmp al,34
+ jnz directloop1
+ call monprint
+ jmp directloop1
+endofdir: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Signon proc near
+
+ call parser
+ inc di
+ push cs
+ pop ds
+ mov si,offset cs:keys
+ mov cx,4
+signonloop: push cx si di
+ add si,14
+ mov cx,11
+signonloop2: lodsb
+ cmp al,32
+ jz foundsign
+ call makecaps
+ mov ah,[es:di]
+ inc di
+ cmp al,ah
+ jnz nomatch
+ loop signonloop2
+nomatch: pop di si cx
+ add si,26
+ loop signonloop
+ mov al,13
+ call monmessage
+ ret
+
+foundsign: pop di si cx ;ds:si contains ad of key matched
+ mov bx,si
+ push ds
+ pop es ;now ds:si is in es:bx
+
+ cmp byte ptr [es:bx],0
+ jz notyetassigned
+
+ mov al,17
+ call monmessage
+ ret
+
+notyetassigned: push es bx
+ call scrollmonitor
+ mov al,15
+ call monmessage
+ mov di,monadx
+ mov bx,monady
+ push di bx
+ call input
+ pop bx di
+ mov monadx,di
+ mov monady,bx
+ pop bx es
+ push es bx
+
+ add bx,2
+ push cs
+ pop ds
+ mov si,offset cs:inputline
+checkpass: lodsw
+ mov ah,[es:bx]
+ inc bx
+ ;cmp al,0
+ cmp ah,32
+ jz passpassed
+ cmp al,ah
+ jz checkpass
+passerror: pop bx es
+ call scrollmonitor
+ mov al,16
+ call monmessage
+ ret
+
+passpassed: mov al,14
+ call monmessage
+ pop bx es
+ push es bx
+ add bx,14
+ call monprint
+ call scrollmonitor
+ pop bx es
+ mov byte ptr [es:bx],1
+ ret
+
+ endp
+
+
+
+
+
+
+
+Showkeys proc near
+
+ mov cx,10
+ call randomaccess
+ call scrollmonitor
+ mov al,18
+ call monmessage
+
+ push cs
+ pop es
+ mov bx,offset cs:keys
+ mov cx,4
+keysloop: push cx bx
+ cmp byte ptr [es:bx],0
+ jz notheld
+ add bx,14
+ call monprint
+notheld: pop bx cx
+ add bx,26
+ loop keysloop
+ call scrollmonitor
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Read proc near
+
+ mov cx,40
+ call randomaccess
+ call parser
+ cmp byte ptr [es:di+1],0
+ jnz okcom
+ call neterror
+ ret
+okcom: push cs
+ pop es
+ mov di,offset cs:currentfile
+ mov ax,textfile1
+ mov monsource,ax
+ mov ds,ax
+ mov si,textstart
+ call searchforstring
+ cmp al,0
+ jz foundfile2
+ mov ax,textfile2
+ mov monsource,ax
+ mov ds,ax
+ mov si,textstart
+ call searchforstring
+ cmp al,0
+ jz foundfile2
+ mov ax,textfile3
+ mov monsource,ax
+ mov ds,ax
+ mov si,textstart
+ call searchforstring
+ cmp al,0
+ jz foundfile2
+ mov al,7
+ call monmessage
+ ret
+foundfile2: call getkeyandlogo
+ cmp al,0
+ jz keyok1
+ ret
+keyok1: push cs
+ pop es
+ mov di,offset cs:operand1
+ mov ds,monsource
+ call searchforstring
+ cmp al,0
+ jz findtopictext
+ mov al,oldlogonum
+ mov logonum,al
+ mov al,11
+ call monmessage
+ ret
+
+findtopictext: inc bx
+ push es bx
+ call monitorlogo
+ call scrollmonitor
+ pop bx es
+moretopic: call monprint
+ mov al,[es:bx]
+ cmp al,34
+ jz endoftopic
+ cmp al,"="
+ jz endoftopic
+ cmp al,"*"
+ jz endoftopic
+ push es bx
+ call processtrigger
+ mov cx,24
+ call randomaccess
+ pop bx es
+ jmp moretopic
+
+endoftopic: call scrollmonitor
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Dirfile proc near
+
+ mov al,34
+ mov [es:di],al
+ push es di ;save start point held in es:di
+ mov ds,textfile1
+ mov si,textstart
+ call searchforstring
+ cmp al,0
+ jz foundfile
+ pop di es
+ push es di
+ mov ds,textfile2
+ mov si,textstart
+ call searchforstring
+ cmp al,0
+ jz foundfile
+ pop di es
+ push es di
+ mov ds,textfile3
+ mov si,textstart
+ call searchforstring
+ cmp al,0
+ jz foundfile
+
+ pop di es
+ mov al,7
+ call monmessage
+ ret
+
+foundfile: pop ax ax ;discard old values of es:di
+ call getkeyandlogo
+ cmp al,0
+ jz keyok2
+ ret
+
+keyok2: push es bx
+ push cs
+ pop ds
+ mov si,offset cs:operand1+1
+ push cs
+ pop es
+ mov di,offset cs:currentfile+1
+ mov cx,12
+ rep movsb
+ call monitorlogo
+ call scrollmonitor
+ mov al,10
+ call monmessage
+ pop bx es
+
+
+directloop2: mov al,[es:bx]
+ inc bx
+ cmp al,34
+ jz endofdir2
+ cmp al,"*"
+ jz endofdir2
+ cmp al,"="
+ jnz directloop2
+ call monprint
+ jmp directloop2
+
+endofdir2: call scrollmonitor
+ ret
+
+ endp
+
+
+
+
+
+
+Getkeyandlogo proc near
+
+ inc bx
+ mov al,[es:bx]
+ sub al,48
+ mov newlogonum,al
+ add bx,2
+ mov al,[es:bx]
+ sub al,48
+ mov keynum,al
+ inc bx
+ push es bx
+ mov al,keynum
+ mov ah,0
+ mov cx,26
+ mul cx
+ push cs
+ pop es
+ mov bx,offset cs:keys
+ add bx,ax
+ mov al,[es:bx]
+ cmp al,1
+ jz keyok
+ push bx es
+ mov al,12
+ call monmessage
+ pop es bx
+ add bx,14
+ call monprint
+ call scrollmonitor
+ pop bx es
+ mov al,1
+ ret
+
+keyok: pop bx es
+ mov al,newlogonum
+ mov logonum,al
+ mov al,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Searchforstring proc near ;finds string at es:di in
+ ;text at ds:si
+
+ mov dl,[es:di] ;needs to know first character
+ ;if it's an equals then we must
+ ;stop at the next quotation mark
+ mov cx,di ;need to remember starting point
+
+restartlook: mov di,cx
+ mov bx,si
+
+ mov dh,0 ;dh holds count of brackets
+ ;brackets are either " or =
+keeplooking: lodsb
+ call makecaps
+ cmp al,"*"
+ jz notfound
+ cmp dl,"="
+ jnz nofindingtopic ;are we looking for a topic?
+ cmp al,34 ;if YES, check we haven't reached
+ jz notfound ;the end of this file.
+nofindingtopic: mov ah,[es:di]
+ cmp al,dl ;all searches bracketed by same thing
+ jnz notbracket
+ inc dh
+ cmp dh,2
+ jz complete
+notbracket: cmp al,ah
+ jnz restartlook
+ inc di
+ jmp keeplooking
+complete: push ds ;es:bx returns found string
+ pop es
+ mov al,0
+ mov bx,si
+ ret
+notfound: mov al,1
+ ret
+
+ endp
+
+
+
+
+
+
+Parser proc near
+
+ push cs
+ pop es
+ mov di,offset cs:operand1
+ mov cx,13
+ mov al,0
+ rep stosb
+
+ mov di,offset cs:operand1
+ mov al,"="
+ stosb
+
+ push cs
+ pop ds
+ mov si,offset cs:inputline
+
+notspace1: lodsw
+ cmp al,32
+ jz stillspace1
+ cmp al,0
+ jnz notspace1
+ jmp finishpars
+
+stillspace1: lodsw
+ cmp al,32
+ jz stillspace1
+
+copyin1: stosb
+ lodsw
+ cmp al,0
+ jz finishpars
+ cmp al,32
+ jnz copyin1
+
+finishpars: mov di,offset cs:operand1
+ ret
+
+ endp
+
+
+
+
+
+
+Scrollmonitor proc near
+
+ push ax bx cx dx di si es ds
+
+ call printlogo
+ mov di,monadx
+ mov bx,monady
+ call printundermon
+ mov ax,monady
+ call worktoscreen
+ mov al,25
+ call playchannel1
+
+ pop ds es si di dx cx bx ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Lockmon proc near
+
+ cmp lasthardkey,57
+ jnz notlock
+ call locklighton
+lockloop: cmp lasthardkey,57
+ jz lockloop
+ call locklightoff
+notlock: ret
+
+ endp
+
+
+
+
+
+Monitorlogo proc near
+
+ mov al,logonum
+ cmp al,oldlogonum
+ jz notnewlogo
+ mov oldlogonum,al
+ ;call fadedownmon
+ call printlogo
+ call printundermon
+ call worktoscreen
+ call printlogo
+ ;call fadeupmon
+ call printlogo
+ mov al,26
+ call playchannel1
+ mov cx,20
+ call randomaccess
+ ret
+notnewlogo: call printlogo
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Printlogo proc near
+
+ mov di,56
+ mov bx,32
+ mov ds,tempgraphics
+ mov al,0
+ mov ah,0
+ call showframe
+ call showcurrentfile
+ ret
+
+ endp
+
+
+
+
+
+
+Showcurrentfile proc near
+
+ mov di,178 ;99
+ mov bx,37
+ mov si,offset cs:currentfile+1
+curfileloop: mov al,[cs:si]
+ cmp al,0
+ jz finishfile
+ inc si
+ push si
+ if foreign
+ call modifychar
+ endif
+ mov ds,tempcharset
+ mov ah,0
+ call printchar
+ pop si
+ jmp curfileloop
+finishfile: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Monmessage proc near
+
+ mov es,textfile1
+ mov bx,textstart
+ mov cl,al
+ mov ch,0
+monmessageloop: mov al,[es:bx]
+ inc bx
+ cmp al,"+"
+ jnz monmessageloop
+ loop monmessageloop
+ call monprint
+ ret
+
+ endp
+
+
+
+
+
+
+Processtrigger proc near
+
+ cmp lasttrigger,"1"
+ jnz notfirsttrigger
+ mov al,8
+ call setlocation
+ mov al,45
+ call triggermessage
+ ret
+
+notfirsttrigger: cmp lasttrigger,"2"
+ jnz notsecondtrigger
+ mov al,9
+ call setlocation
+ mov al,55
+ call triggermessage
+ ret
+
+notsecondtrigger: cmp lasttrigger,"3"
+ jnz notthirdtrigger
+ mov al,2
+ call setlocation
+ mov al,59
+ call triggermessage
+
+notthirdtrigger: ret
+
+ endp
+
+
+
+
+Triggermessage proc near
+
+ push ax
+ mov di,174
+ mov bx,153
+ mov cl,200
+ mov ch,63
+ mov ds,mapstore
+ mov si,0
+ call multiget
+ pop ax
+ call findpuztext
+ mov di,174
+ mov bx,156
+ mov dl,141
+ mov ah,16
+ call printdirect
+ mov cx,140
+ call hangon
+ call worktoscreen
+ mov cx,340
+ call hangon
+ mov di,174
+ mov bx,153
+ mov cl,200
+ mov ch,63
+ mov ds,mapstore
+ mov si,0
+ call multiput
+ call worktoscreen
+ mov lasttrigger,0
+ ret
+
+ endp
+
+
+
+
+
+
+Printcurs proc near
+
+ push si di ds dx bx es
+ mov di,curslocx
+ mov bx,curslocy
+ mov cl,6
+ mov ch,8
+ cmp foreignrelease, 0
+ jz $1
+ sub bx,3
+ mov ch,11
+$1:
+ mov ds,buffers
+ mov si,textunder
+ push di bx
+ call multiget
+ pop bx di
+
+ push bx di
+ inc maintimer
+ mov ax,maintimer
+ and al,16
+ jnz flashcurs
+ mov al,"/"
+ sub al,32
+ mov ah,0
+ mov ds,tempcharset
+ call showframe
+
+flashcurs: pop di bx
+ sub di,6
+ mov cl,12
+ mov ch,8
+ cmp foreignrelease, 0
+ jz $2
+ mov ch,11
+$2:
+ call multidump
+
+ pop es bx dx ds di si
+ ret
+
+ endp
+
+
+
+
+
+
+Delcurs proc near
+
+ push es bx di ds dx si
+ mov di,curslocx
+ mov bx,curslocy
+ mov cl,6
+ mov ch,8
+ cmp foreignrelease, 0
+ jz $1
+ sub bx,3
+ mov ch,11
+$1:
+ push di bx cx
+ mov ds,buffers
+ mov si,textunder
+ call multiput
+ pop cx bx di
+ call multidump
+finishcurdel:
+ pop si dx ds di bx es
+ ret
+
+ endp
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/newplace.asm b/devtools/tasmrecover/dreamweb/newplace.asm
new file mode 100644
index 0000000000..2bbf4fe498
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/newplace.asm
@@ -0,0 +1,584 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+;----------------------------------------------------Choosing a new location----
+
+Newplace proc near
+
+ cmp needtotravel,1
+ jz istravel
+ cmp autolocation,-1
+ jnz isautoloc
+ ret
+
+isautoloc: mov al,autolocation
+ mov newlocation,al
+ mov autolocation,-1
+ ret
+
+istravel: mov needtotravel,0
+ call selectlocation
+ ret
+
+ endp
+
+
+
+
+Selectlocation proc near
+
+ mov inmaparea,0
+ call clearbeforeload
+ mov getback,0
+ mov pointerframe,22
+
+ call readcitypic
+ call showcity
+ call getridoftemp
+ call readdesticon
+ call loadtraveltext
+ call showpanel
+ call showman
+ call showarrows
+ call showexit
+ call locationpic
+ call undertextline
+ mov commandtype,255
+ call readmouse
+ mov pointerframe,0
+ call showpointer
+ call worktoscreen
+ mov al,9
+ mov ah,255
+ call playchannel0
+ mov newlocation,255
+
+select:
+ cmp quitrequested, 0
+ jnz quittravel
+ call delpointer
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ cmp getback,1
+ jz quittravel
+ mov bx,offset cs:destlist
+ call checkcoords
+ cmp newlocation,255
+ jz select
+ mov al,newlocation
+ cmp al,location
+ jz quittravel
+
+ call getridoftemp
+ call getridoftemp2
+ call getridoftemp3
+ mov es,traveltext
+ call deallocatemem
+ ret
+
+quittravel: mov al,reallocation ; was just location
+ mov newlocation,al
+ mov getback,0
+ call getridoftemp
+ call getridoftemp2
+ call getridoftemp3
+ mov es,traveltext
+ call deallocatemem
+ ret
+
+destlist: dw 238,258,4,44,nextdest
+ dw 104,124,4,44,lastdest
+ dw 280,308,4,44,lookatplace
+ dw 104,216,138,192,destselect
+ dw 273,320,157,198,getback1
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+Showcity proc near
+
+ call clearwork
+ mov ds,tempgraphics
+ mov di,57
+ mov bx,32
+ mov al,0
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,120+57
+ mov bx,32
+ mov al,1
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+Lookatplace proc near
+
+ cmp commandtype,224
+ jz alreadyinfo
+ mov commandtype,224
+ mov al,27
+ call commandonly
+alreadyinfo: mov ax,mousebutton
+ and ax,1
+ jz noinfo
+ cmp ax,oldbutton
+ jz noinfo
+
+ mov bl,destpos
+ cmp bl,15
+ jnc noinfo
+
+ push bx
+ call delpointer
+ call deltextline
+ call getundercentre
+ mov ds,tempgraphics3
+ mov al,0
+ mov ah,0
+ mov di,60
+ mov bx,72
+ call showframe
+ mov al,4
+ mov ah,0
+ mov di,60
+ mov bx,72+55
+ call showframe
+ cmp foreignrelease, 0
+ jz $1
+ mov al,4
+ mov ah,0
+ mov di,60
+ mov bx,72+55+21
+ call showframe
+$1:
+ pop bx
+
+ mov bh,0
+ add bx,bx
+ mov es,traveltext
+ mov si,[es:bx]
+ add si,textstart
+ call findnextcolon
+
+ mov di,63
+ mov bx,84
+ cmp foreignrelease, 0
+ jz $2
+ mov bx,84+4
+$2:
+ mov dl,191
+ mov al,0
+ mov ah,0
+ call printdirect
+ call worktoscreenm
+
+ mov cx,500
+ call hangonp
+
+afterinfo: mov pointermode,0
+ mov pointerframe,0
+ call putundercentre
+ call worktoscreenm
+
+noinfo: ret
+
+ endp
+
+
+
+
+Getundercentre proc near
+
+ mov di,58
+ mov bx,72
+ mov ds,mapstore
+ mov si,0
+ mov cl,254
+ mov ch,110
+ call multiget
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Putundercentre proc near
+
+ mov di,58
+ mov bx,72
+ mov ds,mapstore
+ mov si,0
+ mov cl,254
+ mov ch,110
+ call multiput
+ ret
+
+ endp
+
+
+
+
+
+
+
+Locationpic proc near
+
+ call getdestinfo
+ mov al,[es:si]
+ push es si
+ mov di,0
+ cmp al,6
+ jnc secondlot
+ mov ds,tempgraphics
+ add al,4
+ jmp gotgraphic
+secondlot: sub al,6
+ mov ds,tempgraphics2
+gotgraphic: add di,104
+ mov bx,138+14
+ mov ah,0
+ call showframe
+ pop si es
+ mov al,destpos
+ cmp al,reallocation
+ jnz notinthisone
+ mov al,3
+ mov di,104
+ mov bx,140+14
+ mov ds,tempgraphics
+ mov ah,0
+ call showframe
+notinthisone: mov bl,destpos
+ mov bh,0
+ add bx,bx
+ mov es,traveltext
+ mov si,[es:bx]
+ add si,textstart
+ mov di,50
+ mov bx,20
+ mov dl,241
+ mov al,0
+ mov ah,0
+ call printdirect
+ ret
+
+ endp
+
+
+
+
+Getdestinfo proc near
+
+ mov al,destpos
+ mov ah,0
+ push ax
+ mov dx,seg roomscango
+ mov es,dx
+ mov si,offset es:roomscango
+ add si,ax
+ mov cl,[es:si]
+ pop ax
+ push cx
+ mov dx,seg roompics
+ mov es,dx
+ mov si,offset es:roompics
+ add si,ax
+ pop ax
+ ret
+
+ endp
+
+
+
+
+
+
+Showarrows proc near
+
+ mov di,116-12
+ mov bx,16
+ mov ds,tempgraphics
+ mov al,0
+ mov ah,0
+ call showframe
+ mov di,226+12
+ mov bx,16
+ mov ds,tempgraphics
+ mov al,1
+ mov ah,0
+ call showframe
+ mov di,280
+ mov bx,14
+ mov ds,tempgraphics
+ mov al,2
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Nextdest proc near
+
+duok: cmp commandtype,218
+ jz alreadydu
+ mov commandtype,218
+ mov al,28
+ call commandonly
+alreadydu: mov ax,mousebutton
+ and ax,1
+ jz nodu
+ cmp ax,oldbutton
+ jz nodu
+
+searchdestup: inc destpos
+ cmp destpos,15
+ jnz notlastdest
+ mov destpos,0
+notlastdest: call getdestinfo
+ cmp al,0
+ jz searchdestup
+
+ mov newtextline,1
+ call deltextline
+ call delpointer
+ call showpanel
+ call showman
+ call showarrows
+ call locationpic
+ call undertextline
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+nodu: ret
+
+ endp
+
+
+
+
+
+
+
+Lastdest proc near
+
+ddok: cmp commandtype,219
+ jz alreadydd
+ mov commandtype,219
+ mov al,29
+ call commandonly
+alreadydd: mov ax,mousebutton
+ and ax,1
+ jz nodd
+ cmp ax,oldbutton
+ jz nodd
+
+searchdestdown: dec destpos
+ cmp destpos,-1
+ jnz notfirstdest
+ mov destpos,15
+notfirstdest: call getdestinfo
+ cmp al,0
+ jz searchdestdown
+
+ mov newtextline,1
+ call deltextline
+ call delpointer
+ call showpanel
+ call showman
+ call showarrows
+ call locationpic
+ call undertextline
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+nodd: ret
+
+ endp
+
+
+
+
+
+
+
+
+Destselect proc near
+
+ cmp commandtype,222
+ jz alreadytrav
+ mov commandtype,222
+ mov al,30
+ call commandonly
+alreadytrav: mov ax,mousebutton
+ and ax,1
+ jz notrav
+ cmp ax,oldbutton
+ jz notrav
+
+ call getdestinfo
+ mov al,destpos
+ mov newlocation,al
+notrav: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Getlocation proc near
+
+ mov ah,0
+ mov bx,ax
+ mov dx,seg roomscango
+ mov es,dx
+ add bx,offset es:roomscango
+ mov al,[es:bx]
+ ret
+
+ endp
+
+
+Setlocation proc near ;makes a location accessable
+
+ mov ah,0
+ mov bx,ax
+ mov dx,seg roomscango
+ mov es,dx
+ add bx,offset es:roomscango
+ mov byte ptr [es:bx],1
+ ret
+
+ endp
+
+
+
+
+Resetlocation proc near ;makes a location inaccessable
+
+ push ax
+ cmp al,5
+ jnz notdelhotel
+ call purgealocation
+ mov al,21
+ call purgealocation
+ mov al,22
+ call purgealocation
+ mov al,27
+ call purgealocation
+ jmp clearedlocations
+
+notdelhotel: cmp al,8
+ jnz notdeltvstud
+ call purgealocation
+ mov al,28
+ call purgealocation
+ jmp clearedlocations
+
+notdeltvstud: cmp al,6
+ jnz notdelsarters
+ call purgealocation
+ mov al,20
+ call purgealocation
+ mov al,25
+ call purgealocation
+ jmp clearedlocations
+
+notdelsarters: cmp al,13
+ jnz notdelboathouse
+ call purgealocation
+ mov al,29
+ call purgealocation
+ jmp clearedlocations
+
+notdelboathouse:
+
+clearedlocations: pop ax
+ mov ah,0
+ mov bx,ax
+ mov dx,seg roomscango
+ mov es,dx
+ add bx,offset es:roomscango
+ mov byte ptr [es:bx],0
+ ret
+
+ endp
+
+
+
+
+Readdesticon proc near
+
+ mov dx,offset cs:travelgraphic1
+ call loadintotemp
+
+ mov dx,offset cs:travelgraphic2
+ call loadintotemp2
+
+ mov dx,offset cs:icongraphics8
+ call loadintotemp3
+ ret
+
+ endp
+
+
+
+
+Readcitypic proc near
+
+ mov dx,offset cs:cityname
+ call loadintotemp
+ ret
+
+ endp
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/object.asm b/devtools/tasmrecover/dreamweb/object.asm
new file mode 100644
index 0000000000..830c9676f3
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/object.asm
@@ -0,0 +1,2610 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+;---------------------------------------------------------Inventory printer----
+
+Fillryan proc near
+ ; cx=what to search for
+ mov es,buffers
+ mov di,ryaninvlist
+ call findallryan
+ mov si,ryaninvlist
+ mov al,ryanpage
+ mov ah,0
+ mov cx,20
+ mul cx
+ add si,ax
+
+ mov di,inventx
+ mov bx,inventy
+
+ mov cx,2
+ryanloop2: push cx di bx
+ mov cx,5
+ryanloop1: push cx di bx
+ mov ax,[es:si]
+ add si,2
+ push si es
+ call obtoinv
+ pop es si
+ pop bx di cx
+ add di,itempicsize
+ loop ryanloop1
+ pop bx di cx
+ add bx,itempicsize
+ loop ryanloop2
+
+ call showryanpage
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Fillopen proc near
+
+ call deltextline
+
+ call getopenedsize ;find out how many slots
+ cmp ah,4 ;ah=slots, al=size holdable
+ jc lessthanapage
+ mov ah,4
+lessthanapage: mov al,1
+
+ push ax
+ mov es,buffers
+ mov di,openinvlist
+ call findallopen
+ mov si,openinvlist
+ mov di,inventx
+ mov bx,inventy+96
+ pop cx
+
+openloop1: push cx di bx
+ mov ax,[es:si]
+ add si,2
+ push si es
+ cmp ch,cl
+ jc nextopenslot
+ call obtoinv
+nextopenslot: pop es si
+ pop bx di cx
+ add di,itempicsize
+ inc cl
+ cmp cl,5
+ jnz openloop1
+
+ call undertextline
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Findallryan proc near
+
+ push di
+ mov cx,30
+ mov ax,0ffffh
+ rep stosw
+ pop di
+
+ mov cl,4
+ mov ds,extras
+ mov bx,exdata
+ mov ch,0
+findryanloop: cmp [bx+2],cl
+ jnz notinryaninv
+ cmp byte ptr [bx+3],255
+ jnz notinryaninv
+ mov al,[bx+4]
+ mov ah,0
+ push di
+ add di,ax
+ add di,ax
+ mov al,ch
+ mov ah,4 ;means it is an exchanged object ie:not free or set
+ stosw
+ pop di
+notinryaninv: add bx,16
+ inc ch
+ cmp ch,numexobjects
+ jnz findryanloop
+ ret
+
+ endp
+
+
+
+
+
+
+
+Findallopen proc near
+
+ push di
+ mov cx,16
+ mov ax,0ffffh
+ rep stosw
+ pop di
+
+ mov cl,openedob
+ mov dl,openedtype
+ mov ds,extras
+ mov bx,exdata
+ mov ch,0
+findopen1: cmp [bx+3],cl
+ jnz findopen2
+ cmp [bx+2],dl
+ jnz findopen2
+ cmp openedtype,4
+ jz noloccheck
+ mov al,[bx+5]
+ cmp al,reallocation
+ jnz findopen2
+noloccheck: mov al,[bx+4]
+ mov ah,0
+ push di
+ add di,ax
+ add di,ax
+ mov al,ch
+ mov ah,4
+ stosw
+ pop di
+findopen2: add bx,16
+ inc ch
+ cmp ch,numexobjects
+ jnz findopen1
+
+ mov cl,openedob
+ mov dl,openedtype
+ push dx
+ mov ds,freedat
+ pop dx
+ mov bx,0
+ mov ch,0
+findopen1a: cmp [bx+3],cl
+ jnz findopen2a
+ cmp [bx+2],dl
+ jnz findopen2a
+ mov al,[bx+4]
+ mov ah,0
+ push di
+ add di,ax
+ add di,ax
+ mov al,ch
+ mov ah,2 ; means it's in a free ob
+ stosw
+ pop di
+findopen2a: add bx,16
+ inc ch
+ cmp ch,80
+ jnz findopen1a
+ ret
+
+ endp
+
+
+
+
+
+
+Obtoinv proc near
+
+ push bx es si ax
+
+ push ax di bx
+ mov ds,icons1
+ sub di,2
+ sub bx,1
+ mov al,10
+ mov ah,0
+ call showframe
+ pop bx di ax
+ cmp al,255
+ jz finishfill
+
+ push bx di ax
+ mov ds,extras
+ cmp ah,4
+ jz isanextra
+ mov ds,freeframes
+isanextra: mov cl,al
+ add al,al
+ add al,cl
+ inc al
+ mov ah,128
+ add bx,19
+ add di,18
+ call showframe
+ pop ax di bx
+
+ push bx
+ call getanyaddir
+ call isitworn
+ pop bx
+ jnz finishfill
+ mov ds,icons1 ;Print wearing logo
+ sub di,3
+ sub bx,2
+ mov al,7
+ mov ah,0
+ call showframe
+
+finishfill: pop ax si es bx
+ ret
+
+ endp
+
+
+
+
+
+Isitworn proc near ;zero if yes
+
+ mov al,[es:bx+12]
+ cmp al,"W"-"A"
+ jnz notworn
+ mov al,[es:bx+13]
+ cmp al,"E"-"A"
+notworn: ret
+
+ endp
+
+
+
+Makeworn proc near
+
+ mov byte ptr [es:bx+12],"W"-"A"
+ mov byte ptr [es:bx+13],"E"-"A"
+ ret
+
+ endp
+
+
+
+
+
+
+;-------------------------------------------------------Examining an object----
+
+Examineob proc near
+
+ mov pointermode,0
+ mov timecount,0
+
+examineagain: mov inmaparea,0
+ mov examagain,0
+ mov openedob,255
+ mov openedtype,255
+ mov invopen,0
+ mov al,commandtype
+ mov objecttype,al
+ mov itemframe,0
+ mov pointerframe,0
+
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call obicons
+ call obpicture
+ call describeob
+ call undertextline
+
+ mov commandtype,255
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+
+waitexam: ;call delpointer
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ call delpointer
+
+ mov getback,0
+ mov bx,offset cs:examlist
+ cmp invopen,0
+ jz notuseinv
+ mov bx,offset cs:invlist1
+ cmp invopen,1
+ jz notuseinv
+ mov bx,offset cs:withlist1
+notuseinv: call checkcoords
+ cmp examagain,0
+ jz norex
+ jmp examineagain
+norex: cmp getback,0
+ jz waitexam
+
+ mov pickup,0
+ cmp watchingtime,0
+ jnz iswatching
+ cmp newlocation,255
+ jnz justgetback
+
+iswatching: call makemainscreen
+ mov invopen,0
+ mov openedob,255
+ ret
+
+justgetback: mov invopen,0
+ mov openedob,255
+ ret
+
+examlist: dw 273,320,157,198,getbackfromob
+ dw 260,300,0,44,useobject
+ dw 210,254,0,44,selectopenob
+ dw 144,176,64,96,setpickup
+ dw 0,50,50,200,examinventory
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+invlist1: dw 273,320,157,198,getbackfromob
+ dw 255,294,0,24,dropobject
+ dw inventx+167,inventx+167+(18*3),inventy-18,inventy-2,incryanpage
+ dw inventx
+openchangesize: dw inventx+(4*itempicsize)
+ dw inventy+100,inventy+100+itempicsize,useopened
+ dw inventx,inventx+(5*itempicsize)
+ dw inventy,inventy+(2*itempicsize),intoinv
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+withlist1: dw 273,320,157,198,getbackfromob
+ dw inventx+167,inventx+167+(18*3),inventy-18,inventy-2,incryanpage
+ dw inventx,inventx+(5*itempicsize)
+ dw inventy,inventy+(2*itempicsize),selectob
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+Makemainscreen proc near
+
+ call createpanel
+ mov newobs,1
+ call drawfloor
+ call spriteupdate
+ call printsprites
+ call reelsonscreen
+ call showicon
+ call getunderzoom
+ call undertextline
+ mov commandtype,255
+ call animpointer
+ call worktoscreenm
+ mov commandtype,200
+ mov manisoffscreen,0
+ ret
+
+ endp
+
+
+
+
+Getbackfromob proc near
+
+ cmp pickup,1
+ jnz notheldob
+ call blank
+ ret
+notheldob: call getback1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Incryanpage proc near
+
+ cmp commandtype,222
+ jz alreadyincryan
+ mov commandtype,222
+ mov al,31
+ call commandonly
+alreadyincryan: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz noincryan
+ and ax,1
+ jnz doincryan
+noincryan: ret
+
+doincryan: mov ax,mousex
+ sub ax,inventx+167
+ mov ryanpage,-1
+findnewpage: inc ryanpage
+ sub ax,18
+ jnc findnewpage
+ call delpointer
+ call fillryan
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+Openinv proc near
+
+ mov invopen,1
+ mov al,61
+ mov di,inventx
+ mov bx,inventy-10
+ mov dl,240
+ call printmessage
+ call fillryan
+ mov commandtype,255
+ ret
+
+ endp
+
+
+
+
+
+
+
+Showryanpage proc near
+
+ mov ds,icons1
+ mov di,inventx+167
+ mov bx,inventy-12
+ mov al,12
+ mov ah,0
+ call showframe
+
+ mov al,13
+ add al,ryanpage
+ push ax
+ mov al,ryanpage
+ mov ah,0
+ mov cx,18
+ mul cx
+ mov ds,icons1
+ mov di,inventx+167
+ add di,ax
+ mov bx,inventy-12
+ pop ax
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Openob proc near
+
+ mov al,openedob
+ mov ah,openedtype
+ mov di,offset cs:commandline
+ call copyname
+
+ mov di,inventx
+ mov bx,inventy+86
+ mov al,62
+ mov dl,240
+ call printmessage
+
+ mov di,lastxpos
+ add di,5
+ mov bx,inventy+86
+ push cs
+ pop es
+ mov si,offset cs:commandline
+ mov dl,220
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ call fillopen
+ call getopenedsize
+ mov al,ah
+ mov ah,0
+ mov cx,itempicsize
+ mul cx
+ add ax,inventx
+ mov bx,offset cs:openchangesize
+ mov [cs:bx],ax
+ ret
+
+ endp
+
+
+
+
+
+
+Obicons proc near
+
+ mov al,command
+ call getanyad
+ cmp al,255
+ jz cantopenit
+
+ mov ds,icons2
+ mov di,210
+ mov bx,1
+ mov al,4
+ mov ah,0
+ call showframe
+
+cantopenit: mov ds,icons2
+ mov di,260
+ mov bx,1
+ mov al,1
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+Examicon proc near
+
+ mov ds,icons2
+ mov di,254
+ mov bx,5
+ mov al,3
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+Obpicture proc near
+
+ mov al,command
+ mov ah,objecttype
+ cmp ah,1
+ jz setframe
+ cmp ah,4
+ jz exframe
+
+ mov ds,freeframes
+ mov di,160
+ mov bx,68
+ mov cl,al
+ add al,al
+ add al,cl
+ inc al
+ mov ah,128
+ call showframe
+ ret
+
+setframe: ret
+
+exframe: mov ds,extras
+ mov di,160
+ mov bx,68
+ mov cl,al
+ add al,al
+ add al,cl
+ inc al
+ mov ah,128
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Describeob proc near
+
+ call getobtextstart
+
+ mov di,33
+ mov bx,92
+
+ cmp foreignrelease, 0
+ jz notsetd
+ cmp objecttype,1
+ jnz notsetd
+ mov bx,82
+notsetd:
+ mov dl,241
+ mov ah,16
+ mov charshift,91+91
+ call printdirect
+ mov charshift,0
+ mov di,36
+ mov bx,104
+ cmp foreignrelease, 0
+ jz notsetd2
+ cmp objecttype,1
+ jnz notsetd2
+ mov bx,94
+notsetd2:
+ mov dl,241
+ mov ah,0
+ call printdirect
+ push bx
+ call obsthatdothings
+ pop bx
+ call additionaltext
+ ret
+
+
+ endp
+
+
+
+
+
+Additionaltext proc near
+
+ add bx,10
+ push bx
+ mov al,command
+ mov ah,objecttype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"E"
+ call compare
+ jz emptycup
+ mov al,command
+ mov ah,objecttype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"F"
+ call compare
+ jz fullcup
+ pop bx
+ ret
+emptycup: mov al,40
+ call findpuztext
+ pop bx
+ mov di,36
+ mov dl,241
+ mov ah,0
+ call printdirect
+ ret
+fullcup: mov al,39
+ call findpuztext
+ pop bx
+ mov di,36
+ mov dl,241
+ mov ah,0
+ call printdirect
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Obsthatdothings proc near
+
+ mov al,command
+ mov ah,objecttype
+ mov cl,"M"
+ mov ch,"E"
+ mov dl,"M"
+ mov dh,"B"
+ call compare
+ jnz notlouiscard
+ mov al,4
+ call getlocation
+ cmp al,1
+ jz seencard
+ mov al,4
+ call setlocation
+ call lookatcard
+seencard: ret
+notlouiscard: ret
+
+ endp
+
+
+
+
+
+
+
+Getobtextstart proc near
+
+ mov es,freedesc
+ mov si,freetextdat
+ mov cx,freetext
+ cmp objecttype,2
+ jz describe
+ mov es,setdesc
+ mov si,settextdat
+ mov cx,settext
+ cmp objecttype,1
+ jz describe
+ mov es,extras
+ mov si,extextdat
+ mov cx,extext
+
+describe: mov al,command
+ mov ah,0
+ add ax,ax
+ add si,ax
+ mov ax,[es:si]
+ add ax,cx
+ mov si,ax
+ mov bx,ax
+tryagain: push si
+ call findnextcolon
+ mov al,[es:si]
+ mov cx,si
+ pop si
+ cmp objecttype,1
+ jnz cantmakeoneup
+ cmp al,0
+ jz findsometext
+ cmp al,":"
+ jz findsometext
+cantmakeoneup: ret
+
+findsometext: call searchforsame
+ jmp tryagain
+ ret
+
+ endp
+
+
+
+
+
+
+Searchforsame proc near
+
+ mov si,cx
+searchagain: inc si
+ mov al,[es:bx]
+search: cmp [es:si],al
+ jz gotstartletter
+ inc cx
+ inc si
+ cmp si,8000 ;arbitrary give-up
+ jc search ;counter.
+ mov si,bx
+ pop ax
+ ret
+
+gotstartletter: push bx si
+keepchecking: inc si
+ inc bx
+ mov al,[es:bx]
+ mov ah,[es:si]
+ cmp al,":"
+ jz foundmatch
+ cmp al,0
+ jz foundmatch
+ cmp al,ah
+ jz keepchecking
+ pop si bx
+ jmp searchagain
+
+foundmatch: pop si bx
+ ret
+
+ endp
+
+
+
+
+
+
+
+;-----------------------------------------------------------Using an object----
+
+
+
+
+
+Findnextcolon proc near
+
+isntcolon: mov al,[es:si]
+ inc si
+ cmp al,0
+ jz endofcolon
+ cmp al,":"
+ jnz isntcolon
+endofcolon: ret
+
+ endp
+
+
+;------------------------------------------------------Taking, dropping etc----
+
+
+
+
+
+
+Inventory proc near
+
+ cmp mandead,1
+ jz iswatchinv
+ cmp watchingtime,0
+ jz notwatchinv
+iswatchinv: call blank
+ ret
+notwatchinv: cmp commandtype,239
+ jz alreadyopinv
+ mov commandtype,239
+ mov al,32
+ call commandonly
+alreadyopinv: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz cantopinv
+ and ax,1
+ jnz doopeninv
+cantopinv: ret
+
+doopeninv: mov timecount,0
+ mov pointermode,0
+ mov inmaparea,0
+ call animpointer
+ call createpanel
+ call showpanel
+ call examicon
+ call showman
+ call showexit
+ call undertextline
+ mov pickup,0
+ mov invopen,2
+ call openinv
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ mov openedob,255
+ jmp waitexam ; very naughty!
+
+ endp
+
+
+
+
+
+
+Setpickup proc near
+
+ cmp objecttype,1
+ jz cantpick
+ cmp objecttype,3
+ jz cantpick
+ call getanyad
+ mov al,[es:bx+2]
+ cmp al,4
+ jnz canpick
+cantpick: call blank
+ ret
+
+canpick: cmp commandtype,209
+ jz alreadysp
+ mov commandtype,209
+
+ mov bl,command
+ mov bh,objecttype
+ mov al,33
+ call commandwithob
+alreadysp: mov ax,mousebutton
+ cmp ax,1
+ jnz nosetpick
+ cmp ax,oldbutton
+ jnz dosetpick
+nosetpick: ret
+
+dosetpick: call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call examicon
+ mov pickup,1
+ mov invopen,2
+ cmp objecttype,4
+ jz pickupexob
+
+ mov al,command
+ mov itemframe,al
+ mov openedob,255
+ call transfertoex
+ mov itemframe,al
+ mov objecttype,4
+ call geteitherad
+ mov byte ptr [es:bx+2],20 ; means it is in transit
+ mov byte ptr [es:bx+3],255
+ call openinv
+ call worktoscreenm
+ ret
+
+pickupexob: mov al,command
+ mov itemframe,al
+ mov openedob,255
+ call openinv
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+Examinventory proc near
+
+ cmp commandtype,249
+ jz alreadyexinv
+ mov commandtype,249
+ mov al,32
+ call commandonly
+alreadyexinv: mov ax,mousebutton
+ and ax,1
+ jnz doexinv
+ ret
+
+doexinv: call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call examicon
+ mov pickup,0
+ mov invopen,2
+ call openinv
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+Reexfrominv proc near
+
+ call findinvpos
+ mov ax,[es:bx]
+ mov commandtype,ah
+ mov command,al
+ mov examagain,1
+ mov pointermode,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+Reexfromopen proc near
+
+ ret
+ call findopenpos
+ mov ax,[es:bx]
+ mov commandtype,ah
+ mov command,al
+ mov examagain,1
+ mov pointermode,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Swapwithinv proc near
+
+ mov al,itemframe
+ mov ah,objecttype
+ cmp ax,oldsubject
+ jnz difsub7
+ cmp commandtype,243
+ jz alreadyswap1
+ mov commandtype,243
+
+difsub7: mov oldsubject,ax
+ mov bx,ax
+ mov al,34
+ call commandwithob
+alreadyswap1: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz cantswap1
+ and ax,1
+ jnz doswap1
+cantswap1: ret
+
+doswap1: mov ah,objecttype
+ mov al,itemframe
+ push ax
+
+ call findinvpos
+ mov ax,[es:bx]
+ mov itemframe,al
+ mov objecttype,ah
+ call geteitherad
+ mov byte ptr [es:bx+2],20 ; means unplaced object
+ mov byte ptr [es:bx+3],255
+ mov bl,itemframe
+ mov bh,objecttype
+
+ pop ax
+ mov objecttype,ah
+ mov itemframe,al
+ push bx
+
+ call findinvpos ;NONE OF THIS IS NEEDED
+ call delpointer ;ONLY EXTRAS CAN BE IN
+ mov al,itemframe
+ call geteitherad
+ mov byte ptr [es:bx+2],4
+ mov byte ptr [es:bx+3],255
+ mov al,lastinvpos
+ mov [es:bx+4],al
+
+ pop ax
+ mov objecttype,ah
+ mov itemframe,al
+ call fillryan
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Swapwithopen proc near
+
+ mov al,itemframe
+ mov ah,objecttype
+ cmp ax,oldsubject
+ jnz difsub8
+ cmp commandtype,242
+ jz alreadyswap2
+ mov commandtype,242
+
+difsub8: mov oldsubject,ax
+ mov bx,ax
+ mov al,34
+ call commandwithob
+alreadyswap2: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz cantswap2
+ and ax,1
+ jnz doswap2
+cantswap2: ret
+
+doswap2: call geteitherad
+ call isitworn
+ jnz notwornswap
+ call wornerror
+ ret
+notwornswap: call delpointer
+ mov al,itemframe
+ cmp al,openedob
+ jnz isntsame2
+ mov al,objecttype
+ cmp al,openedtype
+ jnz isntsame2
+ call errormessage1
+ ret
+
+isntsame2: call checkobjectsize
+ cmp al,0
+ jz sizeok2
+ ret
+
+sizeok2: mov ah,objecttype
+ mov al,itemframe
+ push ax
+
+ call findopenpos
+ mov ax,[es:bx]
+ mov itemframe,al
+ mov objecttype,ah
+
+ cmp ah,4
+ jnz makeswapex
+ call geteitherad
+ mov byte ptr [es:bx+2],20
+ mov byte ptr [es:bx+3],255
+ jmp actuallyswap
+
+makeswapex: call transfertoex
+ mov itemframe,al
+ mov objecttype,4
+ call geteitherad
+ mov byte ptr [es:bx+2],20
+ mov byte ptr [es:bx+3],255
+
+actuallyswap: mov bl,itemframe
+ mov bh,objecttype
+ pop ax
+ mov objecttype,ah
+ mov itemframe,al
+ push bx
+
+ call findopenpos
+ call geteitherad
+ mov al,openedtype
+ mov byte ptr [es:bx+2],al
+ mov al,openedob
+ mov byte ptr [es:bx+3],al
+ mov al,lastinvpos
+ mov [es:bx+4],al
+ mov al,reallocation
+ mov [es:bx+5],al
+
+ pop ax
+ mov objecttype,ah
+ mov itemframe,al
+ call fillopen
+ call fillryan
+ call undertextline
+ call readmouse
+ call useopened
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Intoinv proc near
+
+ cmp pickup,0
+ jnz notout
+ call outofinv
+ ret
+
+notout: call findinvpos
+ mov ax,[es:bx]
+ cmp al,255
+ jz canplace1
+ call swapwithinv
+ ret
+
+canplace1: mov al,itemframe
+ mov ah,objecttype
+ cmp ax,oldsubject
+ jnz difsub1
+ cmp commandtype,220
+ jz alreadyplce
+ mov commandtype,220
+
+difsub1: mov oldsubject,ax
+ mov bx,ax
+ mov al,35
+ call commandwithob
+alreadyplce: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notletgo2
+ and ax,1
+ jnz doplace
+notletgo2: ret
+
+doplace: call delpointer
+ mov al,itemframe
+ call getexad
+ mov byte ptr [es:bx+2],4
+ mov byte ptr [es:bx+3],255
+ mov al,lastinvpos
+ mov [es:bx+4],al
+
+ mov pickup,0
+ call fillryan
+ call readmouse
+ call showpointer
+ call outofinv
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+Deletetaken proc near ;gets rid of objects that were
+ ;transfered to exlist ages ago
+ mov es,freedat
+ mov ah,reallocation
+ mov ds,extras
+ mov si,exdata
+
+ mov cx,numexobjects
+takenloop: mov al,[si+11]
+ cmp al,ah
+ jnz notinhere
+ mov bl,[si+1]
+ mov bh,0
+ add bx,bx
+ add bx,bx
+ add bx,bx
+ add bx,bx
+ mov byte ptr [es:bx+2],254 ; was 255
+
+notinhere: add si,16
+ loop takenloop
+
+ ret
+
+ endp
+
+
+
+
+
+
+Outofinv proc near
+
+ call findinvpos
+ mov ax,[es:bx]
+ cmp al,255
+ jnz canpick2
+ call blank
+ ret
+
+canpick2: mov bx,mousebutton
+ cmp bx,2
+ jnz canpick2a
+ call reexfrominv
+ ret
+
+canpick2a: cmp ax,oldsubject
+ jnz difsub3
+ cmp commandtype,221
+ jz alreadygrab
+ mov commandtype,221
+
+difsub3: mov oldsubject,ax
+ mov bx,ax
+ mov al,36
+ call commandwithob
+alreadygrab: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notletgo
+ and ax,1
+ jnz dograb
+notletgo: ret
+
+dograb: call delpointer
+ mov pickup,1
+ call findinvpos
+ mov ax,[es:bx]
+ mov itemframe,al
+ mov objecttype,ah
+ call getexad
+ mov byte ptr [es:bx+2],20 ; means unplaced object
+ mov byte ptr [es:bx+3],255
+ call fillryan
+ call readmouse
+ call showpointer
+ call intoinv
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+Getfreead proc near
+
+ mov ah,0
+ mov cl,4
+ shl ax,cl
+ mov bx,ax
+ mov es,freedat
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Getexad proc near
+
+ mov ah,0
+ mov bx,16
+ mul bx
+ mov bx,ax
+ mov es,extras
+ add bx,exdata
+ ret
+
+ endp
+
+
+
+
+
+
+Geteitherad proc near
+
+ cmp objecttype,4
+ jz isinexlist
+ mov al,itemframe
+ call getfreead
+ ret
+isinexlist: mov al,itemframe
+ call getexad
+ ret
+
+ endp
+
+
+
+
+
+
+Getanyad proc near ;nearly same as above
+ ;but uses command
+ cmp objecttype,4
+ jz isex
+ cmp objecttype,2
+ jz isfree
+ mov al,command
+ call getsetad
+ mov ax,[es:bx+4]
+ ret
+isfree: mov al,command
+ call getfreead
+ mov ax,[es:bx+7]
+ ret
+isex: mov al,command
+ call getexad
+ mov ax,[es:bx+7]
+ ret
+
+ endp
+
+
+
+Getanyaddir proc near ;nearly same as above
+ ;but uses ax
+ cmp ah,4
+ jz isex3
+ cmp ah,2
+ jz isfree3
+ call getsetad
+ ret
+isfree3: call getfreead
+ ret
+isex3: call getexad
+ ret
+
+ endp
+
+
+
+
+
+
+Getopenedsize proc near ;nearly same as above again
+ ;but finds ad of opened ob
+ cmp openedtype,4
+ jz isex2
+ cmp openedtype,2
+ jz isfree2
+ mov al,openedob
+ call getsetad
+ mov ax,[es:bx+3]
+ ret
+isfree2: mov al,openedob
+ call getfreead
+ mov ax,[es:bx+7]
+ ret
+isex2: mov al,openedob
+ call getexad
+ mov ax,[es:bx+7]
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Getsetad proc near
+
+ mov ah,0
+ mov bx,64
+ mul bx
+ mov bx,ax
+ mov es,setdat
+ ret
+
+ endp
+
+
+
+
+
+
+Findinvpos proc near
+
+ mov cx,mousex
+ sub cx,inventx
+ mov bx,-1
+findinv1: inc bx
+ sub cx,itempicsize
+ jnc findinv1
+
+ mov cx,mousey
+ sub cx,inventy
+ sub bx,5
+findinv2: add bx,5
+ sub cx,itempicsize
+ jnc findinv2
+
+ mov al,ryanpage
+ mov ah,0
+ mov cx,10
+ mul cx
+ add bx,ax
+
+ mov al,bl
+ mov lastinvpos,al
+ add bx,bx
+
+ mov es,buffers
+ add bx,ryaninvlist
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Findopenpos proc near
+
+ mov cx,mousex
+ sub cx,inventx
+ mov bx,-1
+findopenp1: inc bx
+ sub cx,itempicsize
+ jnc findopenp1
+
+ mov al,bl
+ mov lastinvpos,al
+
+ add bx,bx
+ mov es,buffers
+ add bx,openinvlist
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+;--------------------------------------------------------Dropping an object----
+
+Dropobject proc near
+
+ cmp commandtype,223
+ jz alreadydrop
+ mov commandtype,223
+ cmp pickup,0
+ jz blank
+
+ mov bl,itemframe
+ mov bh,objecttype
+ mov al,37
+ call commandwithob
+alreadydrop: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nodrop
+ and ax,1
+ jnz dodrop
+nodrop: ret
+
+dodrop: call geteitherad
+ call isitworn
+ jnz nowornerror
+ call wornerror
+ ret
+nowornerror: cmp reallocation,47
+ jz nodrop2
+ mov cl,ryanx
+ add cl,12
+ mov ch,ryany
+ add ch,12
+ call checkone
+ cmp cl,2
+ jc nodroperror
+nodrop2: call droperror
+ ret
+nodroperror: cmp mapxsize,64
+ jnz notinlift
+ cmp mapysize,64
+ jnz notinlift
+ call droperror
+ ret
+notinlift: mov al,itemframe
+ mov ah,4
+ mov cl,"G"
+ mov ch,"U"
+ mov dl,"N"
+ mov dh,"A"
+ call compare
+ jz cantdrop
+ mov al,itemframe
+ mov ah,4
+ mov cl,"S"
+ mov ch,"H"
+ mov dl,"L"
+ mov dh,"D"
+ call compare
+ jz cantdrop
+ mov objecttype,4
+ mov al,itemframe
+ call getexad
+ mov byte ptr [es:bx+2],0
+ mov al,ryanx
+ add al,4
+ mov cl,4
+ shr al,cl
+ add al,mapx
+ mov ah,ryany
+ add ah,8
+ mov cl,4
+ shr ah,cl
+ add ah,mapy
+ mov byte ptr [es:bx+3],al
+ mov byte ptr [es:bx+5],ah
+ mov al,ryanx
+ add al,4
+ and al,15
+ mov ah,ryany
+ add ah,8
+ and ah,15
+ mov byte ptr [es:bx+4],al
+ mov byte ptr [es:bx+6],ah
+ mov pickup,0
+ mov al,reallocation
+ mov [es:bx],al
+ ret
+
+ endp
+
+
+
+
+Droperror proc near
+
+ mov commandtype,255
+ call delpointer
+ mov di,76
+ mov bx,21
+ mov al,56
+ mov dl,240
+ call printmessage
+ call worktoscreenm
+ mov cx,50
+ call hangonp
+ call showpanel
+ call showman
+ call examicon
+ mov commandtype,255
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+Cantdrop proc near
+
+ mov commandtype,255
+ call delpointer
+ mov di,76
+ mov bx,21
+ mov al,24
+ mov dl,240
+ call printmessage
+ call worktoscreenm
+ mov cx,50
+ call hangonp
+ call showpanel
+ call showman
+ call examicon
+ mov commandtype,255
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+Wornerror proc near
+
+ mov commandtype,255
+ call delpointer
+ mov di,76
+ mov bx,21
+ mov al,57
+ mov dl,240
+ call printmessage
+ call worktoscreenm
+ mov cx,50
+ call hangonp
+ call showpanel
+ call showman
+ call examicon
+ mov commandtype,255
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Removeobfrominv proc near
+
+ cmp command,100
+ jz obnotexist
+ call getanyad
+ mov di,bx
+ mov cl,command
+ mov ch,0
+ call deleteexobject
+ ;mov byte ptr [es:bx+2],0
+obnotexist: ret
+
+ endp
+
+
+
+
+;---------------------------------------------------------Opening an object----
+
+Selectopenob proc near
+
+ mov al,command
+ call getanyad
+ cmp al,255
+ jnz canopenit1
+ call blank
+ ret
+
+canopenit1: cmp commandtype,224
+ jz alreadyopob
+ mov commandtype,224
+
+ mov bl,command
+ mov bh,objecttype
+ mov al,38
+ call commandwithob
+alreadyopob: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz noopenob
+ and ax,1
+ jnz doopenob
+noopenob: ret
+
+doopenob: mov al,command
+ mov openedob,al
+ mov al,objecttype
+ mov openedtype,al
+
+ call createpanel
+ call showpanel
+ call showman
+ call examicon
+ call showexit
+ call openinv
+ call openob
+ call undertextline
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Useopened proc near
+
+ cmp openedob,255
+ jz cannotuseopen
+ cmp pickup,0
+ jnz notout2
+ call outofopen
+ ret
+
+notout2: call findopenpos
+ mov ax,[es:bx]
+ cmp al,255
+ jz canplace3
+ call swapwithopen
+cannotuseopen: ret
+
+canplace3: cmp pickup,1
+ jz intoopen
+ call blank
+ ret
+
+intoopen: mov al,itemframe
+ mov ah,objecttype
+ cmp ax,oldsubject
+ jnz difsub2
+ cmp commandtype,227
+ jz alreadyplc2
+ mov commandtype,227
+
+difsub2: mov oldsubject,ax
+ mov bx,ax
+ mov al,35
+ call commandwithob
+alreadyplc2: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notletgo3
+ cmp ax,1
+ jz doplace2
+notletgo3: ret
+
+doplace2: call geteitherad
+ call isitworn
+ jnz notworntoopen
+ call wornerror
+ ret
+notworntoopen: call delpointer
+ mov al,itemframe
+ cmp al,openedob
+ jnz isntsame
+ mov al,objecttype
+ cmp al,openedtype
+ jnz isntsame
+ call errormessage1
+ ret
+
+isntsame: call checkobjectsize
+ cmp al,0
+ jz sizeok1
+ ret
+
+sizeok1: mov pickup,0
+ mov al,itemframe
+ call geteitherad
+ mov al,openedtype
+ mov byte ptr [es:bx+2],al
+ mov al,openedob
+ mov byte ptr [es:bx+3],al
+ mov al,lastinvpos
+ mov [es:bx+4],al
+ mov al,reallocation
+ mov [es:bx+5],al
+ call fillopen
+ call undertextline
+ call readmouse
+ call useopened
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Errormessage1 proc near
+
+ call delpointer
+ mov di,76
+ mov bx,21
+ mov al,58
+ mov dl,240
+ call printmessage
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ mov cx,50
+ call hangonp
+ call showpanel
+ call showman
+ call examicon
+ call readmouse
+ call useopened
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+Errormessage2 proc near
+
+ mov commandtype,255
+ call delpointer
+ mov di,76
+ mov bx,21
+ mov al,59
+ mov dl,240
+ call printmessage
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ mov cx,50
+ call hangonp
+ call showpanel
+ call showman
+ call examicon
+ call readmouse
+ call useopened
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Errormessage3 proc near
+
+ call delpointer
+ mov di,76
+ mov bx,21
+ mov al,60
+ mov dl,240
+ call printmessage
+ call worktoscreenm
+ mov cx,50
+ call hangonp
+ call showpanel
+ call showman
+ call examicon
+ call readmouse
+ call useopened
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+Checkobjectsize proc near
+
+ call getopenedsize
+ push ax
+ mov al,itemframe
+ call geteitherad
+ mov al,[es:bx+9]
+ pop cx
+
+ cmp al,255 ;gives a size of 6 if no
+ jnz notunsized ;size was defined in the editor
+ mov al,6 ;could be a bad idea
+notunsized:
+
+
+ cmp al,100
+ jnc specialcase
+ cmp cl,100
+ jc isntspecial
+ call errormessage3
+ jmp sizewrong
+isntspecial: cmp cl,al
+ jnc sizeok
+specialcase: sub al,100
+ cmp cl,100
+ jnc bothspecial
+ cmp cl,al
+ jnc sizeok
+ call errormessage2
+ jmp sizewrong
+bothspecial: sub cl,100
+ cmp al,cl
+ jz sizeok
+ call errormessage3
+sizewrong: mov al,1
+ ret
+sizeok: mov al,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Outofopen proc near
+
+ cmp openedob,255
+ jz cantuseopen
+ call findopenpos
+ mov ax,[es:bx]
+ cmp al,255
+ jnz canpick4
+cantuseopen: call blank
+ ret
+
+canpick4: cmp ax,oldsubject
+ jnz difsub4
+ cmp commandtype,228
+ jz alreadygrb
+ mov commandtype,228
+
+difsub4: mov oldsubject,ax
+ mov bx,ax
+ mov al,36
+ call commandwithob
+alreadygrb: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notletgo4
+ cmp ax,1
+ jz dogrb
+ cmp ax,2
+ jnz notletgo4
+ call reexfromopen
+notletgo4: ret
+
+dogrb: call delpointer
+ mov pickup,1
+ call findopenpos
+ mov ax,[es:bx]
+ mov itemframe,al
+ mov objecttype,ah
+
+ cmp ah,4
+ jnz makeintoex
+ call geteitherad
+ mov byte ptr [es:bx+2],20 ; means unplaced object
+ mov byte ptr [es:bx+3],255
+ jmp actuallyout
+
+makeintoex: call transfertoex
+ mov itemframe,al
+ mov objecttype,4
+ call geteitherad
+ mov byte ptr [es:bx+2],20 ; means it is in transit
+ mov byte ptr [es:bx+3],255
+
+actuallyout: call fillopen
+ call undertextline
+ call readmouse
+ call useopened
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+;All Extra object code - adding and removing plus purge routines -------------
+
+
+
+
+
+
+Transfertoex proc near
+
+ call emergencypurge
+
+ call getexpos
+ mov al,expos
+ push ax
+
+ push di
+ mov al,itemframe
+ mov ah,0
+ mov bx,16
+ mul bx
+ mov ds,freedat
+ mov si,ax
+ mov cx,8
+ rep movsw
+ pop di
+
+ mov al,reallocation
+ mov [es:di],al
+ mov [es:di+11],al
+ mov al,itemframe
+ mov [es:di+1],al
+ mov byte ptr [es:di+2],4
+ mov byte ptr [es:di+3],255
+ mov al,lastinvpos
+ mov [es:di+4],al
+
+ mov al,itemframe
+ mov itemtotran,al
+ call transfermap
+ call transferinv
+ call transfertext
+
+ mov al,itemframe
+ mov ah,0
+ mov bx,16
+ mul bx
+ mov ds,freedat
+ mov si,ax
+ mov byte ptr [si+2],254 ; was 255
+ call pickupconts
+
+ pop ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Pickupconts proc near
+
+ mov al,[si+7]
+ cmp al,255
+ jz notopenable
+
+ mov al,itemframe
+ mov ah,objecttype
+ mov dl,expos
+ ;dec dl
+ mov es,freedat
+ mov bx,0
+ mov cx,0
+pickupcontloop: push cx es bx dx ax
+
+ cmp byte ptr [es:bx+2],ah
+ jnz notinsidethis
+ cmp byte ptr [es:bx+3],al
+ jnz notinsidethis
+
+ mov itemtotran,cl
+ call transfercontoex
+
+notinsidethis: pop ax dx bx es cx
+ add bx,16
+ inc cx
+ cmp cx,80
+ jnz pickupcontloop
+
+notopenable: ret
+
+ endp
+
+
+
+
+
+
+
+Transfercontoex proc near
+
+ push es bx
+
+ push dx es bx
+ call getexpos
+ pop si ds
+
+ push di
+ mov cx,8
+ rep movsw
+ pop di
+ pop dx
+
+ mov al,reallocation
+ mov [es:di],al
+ mov [es:di+11],al
+ mov al,itemtotran
+ mov [es:di+1],al
+ mov [es:di+3],dl
+ mov byte ptr [es:di+2],4
+
+ call transfermap
+ call transferinv
+ call transfertext
+ ;inc expos
+
+ pop si ds
+ mov byte ptr [si+2],255
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Transfertext proc near
+
+ mov es,extras
+ mov al,expos
+ mov ah,0
+ add ax,ax
+ mov bx,extextdat
+ add bx,ax
+ mov di,extextpos
+ mov [es:bx],di
+ add di,extext
+
+ mov al,itemtotran
+ mov ah,0
+ add ax,ax
+ mov ds,freedesc
+ mov bx,freetextdat
+ add bx,ax
+ mov si,freetext
+ mov ax,[bx]
+ add si,ax
+
+moretext: lodsb
+ stosb
+ inc extextpos
+ cmp al,0
+ jnz moretext
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Getexpos proc near
+
+
+ mov es,extras
+ mov al,0
+ mov di,exdata
+tryanotherex: cmp byte ptr [es:di+2],255
+ jz foundnewex
+ add di,16
+ inc al
+ cmp al,numexobjects
+ jnz tryanotherex
+foundnewex: mov expos,al
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Purgealocation proc near
+
+ push ax
+ mov es,extras
+ mov di,exdata
+ pop bx
+ mov cx,0
+purgeloc: cmp bl,[es:di+0]
+ jnz dontpurge
+ cmp byte ptr [es:di+2],0
+ jnz dontpurge
+ push di es bx cx
+ call deleteexobject
+ pop cx bx es di
+dontpurge: add di,16
+ inc cx
+ cmp cx,numexobjects
+ jnz purgeloc
+ ret
+
+ endp
+
+
+
+
+
+Emergencypurge proc near
+
+checkpurgeagain: mov ax,exframepos
+ add ax,4000
+ cmp ax,exframeslen
+ jc notnearframeend
+ call purgeanitem
+ jmp checkpurgeagain
+notnearframeend: mov ax,extextpos
+ add ax,400
+ cmp ax,extextlen
+ jc notneartextend
+ call purgeanitem
+ jmp checkpurgeagain
+notneartextend: ret
+
+ endp
+
+
+
+
+
+
+Purgeanitem proc near
+
+ mov es,extras ;first time try and
+ mov di,exdata ;find an object in a
+ mov bl,reallocation ;location other than
+ mov cx,0 ;the one the player is
+lookforpurge: mov al,[es:di+2] ;in
+ cmp al,0
+ jnz cantpurge
+ cmp byte ptr [es:di+12],2
+ jz iscup
+ cmp byte ptr [es:di+12],255
+ jnz cantpurge
+iscup: cmp byte ptr [es:di+11],bl
+ jz cantpurge
+ call deleteexobject
+ ret
+cantpurge: add di,16
+ inc cx
+ cmp cx,numexobjects
+ jnz lookforpurge
+
+ mov di,exdata
+ mov bl,reallocation
+ mov cx,0
+lookforpurge2: mov al,[es:di+2]
+ cmp al,0
+ jnz cantpurge2
+ cmp byte ptr [es:di+12],255
+ jnz cantpurge2
+ call deleteexobject
+ ret
+cantpurge2: add di,16
+ inc cx
+ cmp cx,numexobjects
+ jnz lookforpurge2
+ ret
+
+ endp
+
+
+
+
+
+Deleteexobject proc near ;es:di holds data ad
+ ;cx holds number
+ push cx cx cx cx
+ mov al,255
+ mov cx,16
+ rep stosb
+ pop ax
+ mov cl,al
+ add al,al
+ add al,cl
+ call deleteexframe
+ pop ax
+ mov cl,al
+ add al,al
+ add al,cl
+ inc al
+ call deleteexframe
+ pop ax
+ call deleteextext
+
+ pop bx
+ mov bh,bl
+ mov bl,4
+ mov di,exdata
+ mov cx,0
+deleteconts: cmp [es:di+2],bx
+ jnz notinsideex
+ push bx cx di
+ call deleteexobject ;Oooh missus!
+ pop di cx bx ;Recursive code!
+notinsideex: add di,16
+ inc cx
+ cmp cx,numexobjects
+ jnz deleteconts
+ ret
+
+ endp
+
+
+
+
+
+Deleteexframe proc near ;al holds frame to delete
+
+ mov di,exframedata
+ mov ah,0
+ add ax,ax
+ add di,ax
+ add ax,ax
+ add di,ax
+ mov al,[es:di]
+ mov ah,0
+ mov cl,[es:di+1]
+ mov ch,0
+ mul cx ;ax holds size of this
+ ;frame in bytes
+ mov si,[es:di+2]
+ push si
+ add si,exframes
+ mov cx,exframeslen
+ sub cx,[es:di+2]
+ mov di,si ;di/si hold start of frame
+ add si,ax ;si holds end of frame
+ push ax
+ push es
+ pop ds
+ rep movsb
+ pop bx ;bx holds size now
+ sub exframepos,bx
+ pop si ;si holds start of frame
+ ;(offset only)
+ mov cx,numexobjects*3
+ mov di,exframedata
+shuffleadsdown: mov ax,[es:di+2]
+ cmp ax,si
+ jc beforethisone
+ sub ax,bx
+beforethisone: mov [es:di+2],ax
+ add di,6
+ loop shuffleadsdown
+ ret
+
+ endp
+
+
+
+
+Deleteextext proc near
+
+ mov di,extextdat
+ mov ah,0
+ add ax,ax
+ add di,ax
+ mov ax,[es:di]
+ mov si,ax
+ mov di,ax
+ add si,extext
+ add di,extext
+ mov ax,0
+findlenextext: mov cl,[es:si]
+ inc ax
+ inc si
+ cmp cl,0
+ jnz findlenextext
+
+ mov cx,extextlen
+ mov bx,si
+ sub bx,extext
+ push bx ax
+ sub cx,bx
+ rep movsb
+ pop bx
+ sub extextpos,bx
+
+ pop si
+ mov cx,numexobjects
+ mov di,extextdat
+shuffletextads: mov ax,[es:di]
+ cmp ax,si
+ jc beforethistext
+ sub ax,bx
+beforethistext: mov [es:di],ax
+ add di,2
+ loop shuffletextads
+ ret
+
+ endp
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/print.asm b/devtools/tasmrecover/dreamweb/print.asm
new file mode 100644
index 0000000000..7cbb45c08b
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/print.asm
@@ -0,0 +1,591 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+Printchar proc near
+
+ cmp al,255
+ jz ignoreit
+ push si bx di
+ cmp foreignrelease, 0
+ jz $1
+ sub bx,3
+$1:
+ push ax
+ sub al,32 ;"A"
+ mov ah,0
+ add ax,charshift
+ call showframe
+ pop ax di bx si
+ cmp kerning,0
+ jnz nokern
+ call kernchars
+nokern: push cx
+ mov ch,0
+ add di,cx
+ pop cx
+ ;dec di
+ignoreit: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Kernchars proc near
+
+ ;sub al,13
+ cmp al,"a"
+ jz iskern
+ cmp al,"u"
+ jz iskern
+ ret
+iskern: cmp ah,"n"
+ jz kernit
+ cmp ah,"t"
+ jz kernit
+ cmp ah,"r"
+ jz kernit
+ cmp ah,"i"
+ jz kernit
+ cmp ah,"l"
+ jz kernit
+ ret
+kernit: dec cl
+ ret
+
+ endp
+
+
+
+
+
+
+;------------------------------------------------Proportional text printing----
+
+
+;Memprint proc near
+;
+; call usecharset1
+;
+; push ax bx cx dx es ds si di
+; call deltextline
+; pop di si ds es dx cx bx ax
+;
+; pop si
+; push cs
+; pop es
+; inc si
+; mov ds,currentset
+; mov di,textaddressx
+; mov bx,textaddressy
+; mov dl,textlen
+; mov al,0
+; mov ah,0
+; call printdirect
+; push si
+
+; mov newtextline,1
+; ret
+
+; endp
+
+
+
+
+
+
+;------------------------------------------------Proportional text printing----
+
+;Print proc near
+;
+; pop si
+; mov bx,[cs:si+2]
+; mov di,[cs:si+0]
+; mov dl,[cs:si+4]
+; add si,6
+; mov ds,currentset
+;
+;printloop2: push bx di dx
+; push es cs
+; pop es
+; call getnumber
+; pop es
+; mov ch,0
+;printloop1: mov ax,[cs:si]
+; inc si
+; cmp al,0
+; jz finishprint
+; push cx es
+; call modifychar
+; call printchar
+; pop es cx
+; loop printloop1
+; pop dx di bx
+; add bx,linespacing
+; jmp printloop2
+
+;finishprint: pop dx di bx
+ ; push si
+ ; ret
+
+ ; endp
+
+
+
+
+
+
+
+
+
+Printslow proc near
+
+ mov pointerframe,1
+ mov pointermode,3
+ mov ds,charset1
+printloopslow6: push bx di dx
+ call getnumber
+
+ mov ch,0
+printloopslow5: push cx si es
+ mov ax,[es:si]
+ push bx cx es si ds
+ if foreign
+ call modifychar
+ endif
+ call printboth
+ pop ds si es cx bx
+ mov ax,[es:si+1]
+ inc si
+ cmp al,0
+ jz finishslow
+ cmp al,":"
+ jz finishslow
+ cmp cl,1
+ jz afterslow
+ push di ds bx cx es si
+ if foreign
+ call modifychar
+ endif
+ mov charshift,91
+ call printboth
+ mov charshift,0
+ pop si es cx bx ds di
+ call waitframes
+ cmp ax,0
+ jz keepgoing
+ cmp ax,oldbutton
+ jnz finishslow2
+keepgoing: call waitframes
+noslow: cmp ax,0
+ jz afterslow
+ cmp ax,oldbutton
+ jnz finishslow2 ;used to finish early
+afterslow: pop es si cx
+ inc si
+ loop printloopslow5
+
+ pop dx di bx
+ add bx,10
+ jmp printloopslow6
+
+finishslow: pop es si cx dx di bx
+ mov al,0
+ ret
+
+finishslow2: pop es si cx dx di bx
+ mov al,1
+ ret
+
+ endp
+
+
+
+Waitframes proc near
+
+ push di bx es si ds
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call delpointer
+ mov ax,mousebutton
+ pop ds si es bx di
+ ret
+
+ endp
+
+
+
+
+Printboth proc near
+
+ push ax cx bx
+ push di
+ call printchar
+ pop ax
+ push di
+ mov di,ax
+ call multidump
+ pop di
+ pop bx cx ax
+ ret
+
+ endp
+
+
+
+
+
+
+Printdirect proc near
+
+ mov lastxpos,di
+ mov ds,currentset
+printloop6: push bx di dx
+ call getnumber
+ mov ch,0
+printloop5: mov ax,[es:si]
+ inc si
+ cmp al,0
+ jz finishdirct
+ cmp al,":"
+ jz finishdirct
+ push cx es
+ if foreign
+ call modifychar
+ endif
+ call printchar
+ mov lastxpos,di
+ pop es cx
+ loop printloop5
+ pop dx di bx
+ add bx,linespacing
+ jmp printloop6
+
+finishdirct: pop dx di bx
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Monprint proc near
+
+ mov kerning,1
+ mov si,bx
+ mov dl,166
+ mov di,monadx
+ mov bx,monady
+ mov ds,tempcharset
+
+printloop8: push bx di dx
+ call getnumber
+ mov ch,0
+printloop7: mov al,[es:si]
+ inc si
+
+ cmp al,":"
+ jz finishmon2
+ cmp al,0
+ jz finishmon
+ cmp al,34
+ jz finishmon
+ cmp al,"="
+ jz finishmon
+ cmp al,"%"
+ jnz nottrigger
+ mov ah,[es:si]
+ inc si
+ inc si
+ jmp finishmon
+nottrigger: push cx es
+ if foreign
+ call modifychar
+ endif
+ call printchar
+ mov curslocx,di
+ mov curslocy,bx
+ mov maintimer,1
+ call printcurs
+
+ call vsync
+ push si dx ds es bx di
+ call lockmon
+ pop di bx es ds dx si
+ call delcurs
+ pop es cx
+ loop printloop7
+
+finishmon2: pop dx di bx
+ call scrollmonitor
+ mov curslocx,di
+ jmp printloop8
+
+finishmon: pop dx di bx
+ cmp al,"%"
+ jnz nottrigger2
+ mov lasttrigger,ah
+nottrigger2: mov curslocx,di
+ call scrollmonitor
+ mov bx,si
+ mov kerning,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Getnumber proc near
+
+ mov cx,0
+ push si bx di ds es
+ mov di,si
+
+wordloop: push cx dx
+ call getnextword
+ pop dx cx
+ cmp al,1
+ jz endoftext
+ mov al,cl
+ mov ah,0
+ push bx
+ mov bh,0
+ add ax,bx
+ pop bx
+ sub ax,10
+ mov dh,0
+ cmp ax,dx
+ jnc gotoverend
+ add cl,bl
+ add ch,bh
+ jmp wordloop
+
+gotoverend: mov al,dl
+ and al,1
+ jz notcentre
+ push cx
+ mov al,dl
+ and al,11111110b
+ mov ah,0
+ mov ch,0
+ sub ax,cx
+ add ax,20
+ shr ax,1
+ pop cx
+ pop es ds di bx si
+ add di,ax
+ mov cl,ch
+ ret
+notcentre: pop es ds di bx si
+ mov cl,ch
+ ret
+
+
+
+endoftext: mov al,cl
+ mov ah,0
+ push bx
+ mov bh,0
+ add ax,bx
+ pop bx
+ sub ax,10
+ mov dh,0
+ cmp ax,dx
+ jnc gotoverend2
+ add cl,bl
+ add ch,bh
+
+gotoverend2: mov al,dl
+ and al,1
+ jz notcent2
+ push cx
+ mov al,dl
+ and al,11111110b
+ add al,2
+ mov ah,0
+ mov ch,0
+ add ax,20
+ sub ax,cx
+ shr ax,1
+ pop cx
+ pop es ds di bx si
+ add di,ax
+ mov cl,ch
+ ret
+notcent2: pop es ds di bx si
+ mov cl,ch
+ ret
+
+ endp
+
+
+
+
+
+Getnextword proc near
+
+ mov bx,0
+getloop: mov ax,[es:di]
+ inc di
+ inc bh
+ cmp al,":"
+ jz endall
+ cmp al,0
+ jz endall
+ cmp al,32
+ jz endword
+ if foreign
+ call modifychar
+ endif
+ cmp al,255
+ jz getloop
+ push ax
+ sub al,32 ;"A"
+ mov ah,0
+ add ax,charshift
+ add ax,ax
+ mov si,ax
+ add ax,ax
+ add si,ax
+ mov cl,[si+0]
+ pop ax
+ call kernchars
+ add bl,cl
+ ;dec bl
+ jmp getloop
+
+endword: add bl,6
+ mov al,0
+ ret
+
+endall: add bl,6
+ mov al,1
+ ret
+
+ endp
+
+
+
+
+
+ if german
+
+Modifychar proc near
+
+ cmp al,128
+ jc nomod
+ cmp al,129
+ jnz not129
+ mov al,"Z"+3
+ ret
+not129: cmp al,132
+ jnz not132
+ mov al,"Z"+1
+ ret
+not132: cmp al,142
+ jnz not142
+ mov al,"Z"+4
+ ret
+not142: cmp al,154
+ jnz not154
+ mov al,"Z"+6
+ ret
+not154: cmp al,225
+ jnz not225
+ mov al,"A"-1
+ ret
+not225: cmp al,153
+ jnz not153
+ mov al,"Z"+5
+ ret
+not153: cmp al,148
+ jnz not148
+ mov al,"Z"+2
+ ret
+not148: ret
+
+nomod: ret
+
+ endp
+
+ endif
+
+
+
+
+ if spanish
+
+Modifychar proc near
+
+ cmp al,128
+ jc nomod
+ cmp al,160
+ jnz not160
+ mov al,"Z"+1
+ ret
+not160: cmp al,130
+ jnz not130
+ mov al,"Z"+2
+ ret
+not130: cmp al,161
+ jnz not161
+ mov al,"Z"+3
+ ret
+not161: cmp al,162
+ jnz not162
+ mov al,"Z"+4
+ ret
+not162: cmp al,163
+ jnz not163
+ mov al,"Z"+5
+ ret
+not163: cmp al,164
+ jnz not164
+ mov al,"Z"+6
+ ret
+not164: cmp al,165
+ jnz not165
+ mov al,","-1
+ ret
+not165: cmp al,168
+ jnz not168
+ mov al,"A"-1
+ ret
+not168: cmp al,173
+ jnz not173
+ mov al,"A"-4
+ ret
+not173: cmp al,129
+ jnz not129
+ mov al,"A"-5
+not129: ret
+
+nomod: ret
+
+ endp
+
+ endif
diff --git a/devtools/tasmrecover/dreamweb/saveload.asm b/devtools/tasmrecover/dreamweb/saveload.asm
new file mode 100644
index 0000000000..369e799d53
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/saveload.asm
@@ -0,0 +1,1519 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+
+
+Zoomonoff proc near
+
+ cmp watchingtime,0
+ jnz blank
+ cmp pointermode,2
+ jz blank
+ cmp commandtype,222
+ jz alreadyonoff
+ mov commandtype,222
+ mov al,39
+ call commandonly
+alreadyonoff: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nozoomonoff
+ and ax,1
+ jnz dozoomonoff
+nozoomonoff: ret
+
+dozoomonoff: mov al,zoomon
+ xor al,1
+ mov zoomon,al
+
+ call createpanel
+ mov newobs,0
+ call drawfloor
+ call printsprites
+ call reelsonscreen
+ call showicon
+ call getunderzoom
+ call undertextline
+ mov al,39
+ call commandonly
+ call readmouse
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Saveload proc near
+
+ if demo
+ call dosreturn
+ ret
+ else
+ cmp watchingtime,0
+ jnz blank
+ cmp pointermode,2
+ jz blank
+ cmp commandtype,253
+ jz alreadyops
+ mov commandtype,253
+ mov al,43
+ call commandonly
+alreadyops: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz noops
+ and ax,1
+ jz noops
+ call dosaveload
+noops: ret
+ endif
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Dosaveload proc near
+
+ mov pointerframe,0
+ mov textaddressx,70
+ mov textaddressy,182-8
+ mov textlen,181
+ mov manisoffscreen,1
+ call clearwork
+ call createpanel2
+ call undertextline
+ call getridofall ;reels
+ call loadsavebox
+ call showopbox
+ call showmainops
+ call worktoscreen ;2
+ jmp donefirstops
+
+restartops: call showopbox
+ call showmainops
+ call worktoscreenm
+donefirstops: mov getback,0
+waitops:
+ cmp quitrequested, 0
+ jnz justret
+
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ call delpointer
+ mov bx,offset cs:opslist
+ call checkcoords
+ cmp getback,0
+ jz waitops
+ cmp getback,2
+ jz restartops
+ mov textaddressx,13
+ mov textaddressy,182
+ mov textlen,240
+ cmp getback,4
+ jz justret
+ call getridoftemp
+ call restoreall ;reels
+ call redrawmainscrn
+ call worktoscreenm
+ mov commandtype,200
+justret: mov manisoffscreen,0
+ ret
+
+opslist: dw opsx+59,opsx+114,opsy+30,opsy+76,getbackfromops
+ dw opsx+10,opsx+77,opsy+10,opsy+59,dosreturn
+ dw opsx+128,opsx+190,opsy+16,opsy+100,discops
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+
+ endp
+
+
+
+Getbackfromops proc near
+
+ cmp mandead,2
+ jz opsblock1
+ call getback1
+ ret
+opsblock1: call blank
+ ret
+
+ endp
+
+
+
+
+
+Showmainops proc near
+
+ mov ds,tempgraphics
+ mov di,opsx+10
+ mov bx,opsy+10
+ mov al,8
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,opsx+59
+ mov bx,opsy+30
+ mov al,7
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,opsx+128+4
+ mov bx,opsy+12
+ mov al,1
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+Showdiscops proc near
+
+ mov ds,tempgraphics
+ mov di,opsx+128+4
+ mov bx,opsy+12
+ mov al,1
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,opsx+10
+ mov bx,opsy+10
+ mov al,9
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,opsx+59
+ mov bx,opsy+30
+ mov al,10
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,opsx+176+2
+ mov bx,opsy+60-4
+ mov al,5
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+Loadsavebox proc near
+
+ mov dx,offset cs:icongraphics8
+ call loadintotemp
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Loadgame proc near
+
+ cmp commandtype,246
+ jz alreadyload
+ mov commandtype,246
+ mov al,41
+ call commandonly
+alreadyload: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz noload
+ cmp ax,1
+ jz doload
+noload: ret
+
+doload: mov loadingorsave,1
+ call showopbox
+ call showloadops
+ mov currentslot,0
+ call showslots
+ call shownames
+ mov pointerframe,0
+ call worktoscreenm
+ call namestoold
+ mov getback,0
+
+loadops:
+ cmp quitrequested, 0
+ jnz quitloaded
+
+ call delpointer
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+
+ mov bx,offset cs:loadlist
+ call checkcoords
+ cmp getback,0
+ jz loadops
+ cmp getback,2
+ jz quitloaded
+ call getridoftemp
+ ;call clearnoreels
+ mov dx,seg madeuproomdat
+ mov es,dx
+ mov bx,offset es:madeuproomdat
+ call startloading
+ call loadroomssample
+ mov roomloaded,1
+ mov newlocation,255
+ call clearsprites
+ call initman
+ call initrain
+ mov textaddressx,13
+ mov textaddressy,182
+ mov textlen,240
+ call startup
+ call worktoscreen
+ mov getback,4
+quitloaded: ret
+
+loadlist: dw opsx+176,opsx+192,opsy+60,opsy+76,getbacktoops
+ dw opsx+128,opsx+190,opsy+12,opsy+100,actualload
+ dw opsx+2,opsx+92,opsy+4,opsy+81,selectslot
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+
+Getbacktoops proc near
+
+ cmp commandtype,201
+ jz alreadygetops
+ mov commandtype,201
+ mov al,42
+ call commandonly
+alreadygetops: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nogetbackops
+ and ax,1
+ jnz dogetbackops
+nogetbackops: ret
+
+dogetbackops: call oldtonames
+ mov getback,2
+ ret
+
+ endp
+
+
+
+
+
+
+
+Discops proc near
+
+ cmp commandtype,249
+ jz alreadydiscops
+ mov commandtype,249
+ mov al,43
+ call commandonly
+alreadydiscops: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nodiscops
+ and ax,1
+ jnz dodiscops
+nodiscops: ret
+dodiscops: call scanfornames
+ mov loadingorsave,2
+ call showopbox
+ call showdiscops
+ mov currentslot,0
+ call worktoscreenm
+
+ mov getback,0
+discopsloop:
+ cmp quitrequested, 0
+ jnz quitdiscops
+
+ call delpointer
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ mov bx,offset cs:discopslist
+ call checkcoords
+ cmp getback,0
+ jz discopsloop
+quitdiscops:
+ ret
+
+discopslist: dw opsx+59,opsx+114,opsy+30,opsy+76,loadgame
+ dw opsx+10,opsx+79,opsy+10,opsy+59,savegame
+ dw opsx+176,opsx+192,opsy+60,opsy+76,getbacktoops
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+
+
+Savegame proc near
+
+ cmp mandead,2
+ jnz cansaveok
+ call blank
+ ret
+
+cansaveok: cmp commandtype,247
+ jz alreadysave
+ mov commandtype,247
+ mov al,44
+ call commandonly
+alreadysave: mov ax,mousebutton
+ and ax,1
+ jnz dosave
+ ret
+dosave: mov loadingorsave,2
+ call showopbox
+ call showsaveops
+ mov currentslot,0
+ call showslots
+ call shownames
+ call worktoscreenm
+
+ call namestoold
+ mov bufferin,0
+ mov bufferout,0
+
+ mov getback,0
+
+saveops:
+ cmp quitrequested, 0
+ jnz quitsavegame
+
+ call delpointer
+ call checkinput
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+
+ mov bx,offset cs:savelist
+ call checkcoords
+ cmp getback,0
+ jz saveops
+quitsavegame:
+ ret
+
+savelist: dw opsx+176,opsx+192,opsy+60,opsy+76,getbacktoops
+ dw opsx+128,opsx+190,opsy+12,opsy+100,actualsave
+ dw opsx+2,opsx+92,opsy+4,opsy+81,selectslot
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+Actualsave proc near
+
+ cmp commandtype,222
+ jz alreadyactsave
+ mov commandtype,222
+ mov al,44
+ call commandonly
+alreadyactsave: mov ax,mousebutton
+ and ax,1
+ jz noactsave
+
+ mov dx,seg savenames
+ mov ds,dx
+ mov si,offset savenames
+ mov al,currentslot
+ mov ah,0
+ mov cx,17
+ mul cx
+ add si,ax
+ inc si
+ cmp byte ptr [si],0
+ jz noactsave
+
+ mov al,location
+ mov ah,0
+ mov cx,32
+ mul cx
+ push cs
+ pop ds
+ mov si,offset cs:roomdata
+ add si,ax
+
+ mov di,offset cs:madeuproomdat
+ mov bx,di
+ push cs
+ pop es
+ mov cx,16
+ rep movsw
+
+ mov al,roomssample
+ mov [es:bx+13],al
+ mov al,mapx
+ mov [es:bx+15],al
+ mov al,mapy
+ mov [es:bx+16],al
+ mov al,liftflag
+ mov [es:bx+20],al
+ mov al,manspath
+ mov [es:bx+21],al
+ mov al,facing
+ mov [es:bx+22],al
+ mov al,255
+ mov [es:bx+27],al
+ call saveposition
+ call getridoftemp
+ call restoreall ;reels
+ mov textaddressx,13
+ mov textaddressy,182
+ mov textlen,240
+ call redrawmainscrn
+ call worktoscreenm
+ mov getback,4
+noactsave: ret
+
+ endp
+
+
+
+
+Actualload proc near
+
+ cmp commandtype,221
+ jz alreadyactload
+ mov commandtype,221
+ mov al,41
+ call commandonly
+alreadyactload: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notactload
+ cmp ax,1
+ jnz notactload
+
+ mov dx,seg savenames
+ mov ds,dx
+ mov si,offset savenames
+ mov al,currentslot
+ mov ah,0
+ mov cx,17
+ mul cx
+ add si,ax
+ inc si
+ cmp byte ptr [si],0
+ jz notactload
+ call loadposition
+ mov getback,1
+notactload: ret
+
+ endp
+
+
+
+
+Selectslot2 proc near
+
+ cmp mousebutton,0
+ jz noselslot2
+ mov loadingorsave,2
+noselslot2: call selectslot
+ ret
+
+ endp
+
+
+
+
+
+Checkinput proc near
+
+ cmp loadingorsave,3
+ jz nokeypress
+ call readkey
+ mov al,currentkey
+ cmp al,0
+ jz nokeypress
+ cmp al,13
+ jnz notret
+ mov loadingorsave,3
+ jmp afterkey
+notret: cmp al,8
+ jnz nodel2
+ cmp cursorpos,0
+ jz nokeypress
+ call getnamepos
+ dec cursorpos
+ mov byte ptr [es:bx],0
+ mov byte ptr [es:bx+1],1
+ jmp afterkey
+nodel2: ;cmp al,32
+ ;jz spacepress
+ ;cmp al,"A"
+ ;jc nokeypress
+ ;cmp al,"Z"+1
+ ;jnc nokeypress
+spacepress: cmp cursorpos,14
+ jz nokeypress
+ call getnamepos
+ inc cursorpos
+ mov al,currentkey
+ mov [es:bx+1],al
+ mov byte ptr [es:bx+2],0
+ mov byte ptr [es:bx+3],1
+ jmp afterkey
+
+nokeypress: ret
+
+afterkey: call showopbox
+ call shownames
+ call showslots
+ call showsaveops
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+Getnamepos proc near
+
+ mov al,currentslot
+ mov ah,0
+ mov cx,17
+ mul cx
+ mov dx,seg savenames
+ mov es,dx
+ mov bx,offset es:savenames
+ add bx,ax
+ mov al,cursorpos
+ mov ah,0
+ add bx,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Showopbox proc near
+
+ mov ds,tempgraphics
+ mov di,opsx
+ mov bx,opsy
+ mov al,0
+ mov ah,0
+ call showframe
+
+ mov ds,tempgraphics
+ mov di,opsx
+ mov bx,opsy+55
+ mov al,4
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Showloadops proc near
+
+ mov ds,tempgraphics
+ mov di,opsx+128+4
+ mov bx,opsy+12
+ mov al,1
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,opsx+176+2
+ mov bx,opsy+60-4
+ mov al,5
+ mov ah,0
+ call showframe
+
+ mov di,opsx+104
+ mov bx,opsy+14
+ mov al,55
+ mov dl,101
+ call printmessage
+ ret
+
+ endp
+
+
+
+
+Showsaveops proc near
+
+ mov ds,tempgraphics
+ mov di,opsx+128+4
+ mov bx,opsy+12
+ mov al,1
+ mov ah,0
+ call showframe
+ mov ds,tempgraphics
+ mov di,opsx+176+2
+ mov bx,opsy+60-4
+ mov al,5
+ mov ah,0
+ call showframe
+
+ mov di,opsx+104
+ mov bx,opsy+14
+ mov al,54
+ mov dl,101
+ call printmessage
+ ret
+
+ endp
+
+
+
+
+
+Selectslot proc near
+
+ cmp commandtype,244
+ jz alreadysel
+ mov commandtype,244
+ mov al,45
+ call commandonly
+alreadysel: mov ax,mousebutton
+ cmp ax,1
+ jnz noselslot
+ cmp ax,oldbutton
+ jz noselslot
+
+ cmp loadingorsave,3
+ jnz notnocurs
+ dec loadingorsave
+notnocurs: call oldtonames
+ mov ax,mousey
+ sub ax,opsy+4
+ mov cl,-1
+getslotnum: inc cl
+ sub ax,11
+ jnc getslotnum
+ mov currentslot,cl
+ call delpointer
+ call showopbox
+ call showslots
+ call shownames
+ cmp loadingorsave,1
+ jz isloadmode
+ call showsaveops
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+isloadmode: call showloadops
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+noselslot: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Showslots proc near
+
+ mov di,opsx+7
+ mov bx,opsy+8
+ mov al,2
+ mov ds,tempgraphics
+ mov ah,0
+ call showframe
+
+ mov di,opsx+10
+ mov bx,opsy+11
+ mov cl,0
+slotloop: push cx di bx
+
+ cmp cl,currentslot
+ jnz nomatchslot
+ mov al,3
+ mov ds,tempgraphics
+ mov ah,0
+ call showframe
+
+nomatchslot: pop bx di cx
+ add bx,10
+ inc cl
+ cmp cl,7
+ jnz slotloop
+ ret
+
+ endp
+
+
+
+
+
+Shownames proc near
+
+ mov dx,seg savenames
+ mov es,dx
+ mov si,offset es:savenames+1
+ mov di,opsx+21
+ mov bx,opsy+10
+ mov cl,0
+
+shownameloop: push cx di es bx si
+ mov al,4
+ cmp cl,currentslot
+ jnz nomatchslot2
+
+ cmp loadingorsave,2
+ jnz loadmode
+
+ mov dx,si
+ mov cx,15
+ add si,15
+zerostill: dec si
+ dec cl
+ cmp byte ptr [es:si],1
+ jnz foundcharacter
+ jmp zerostill
+foundcharacter: mov cursorpos,cl
+ mov byte ptr [es:si],"/"
+ mov byte ptr [es:si+1],0
+ push si
+ mov si,dx
+ mov dl,200
+ mov ah,0
+ call printdirect
+ pop si
+ mov byte ptr [es:si],0
+ mov byte ptr [es:si+1],1
+ jmp afterprintname
+
+loadmode: mov al,0
+ mov dl,200
+ mov ah,0
+ mov charshift,91
+ call printdirect
+ mov charshift,0
+ jmp afterprintname
+
+nomatchslot2: mov dl,200
+ mov ah,0
+ call printdirect
+
+afterprintname: pop si bx es di cx
+ add si,17
+ add bx,10
+ inc cl
+ cmp cl,7
+ jnz shownameloop
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dosreturn proc near
+
+ cmp commandtype,250
+ jz alreadydos
+ mov commandtype,250
+ mov al,46
+ call commandonly
+alreadydos: mov ax,mousebutton
+ and ax,1
+ jz nodos
+
+quickquit2: call soundend
+ call removeemm
+
+quickquit: if recording
+ call saverec
+ mov bx,rechandle
+ mov ah,3eh
+ int 21h
+ endif
+ if playback
+ mov bx,rechandle
+ mov ah,3eh
+ int 21h
+ endif
+
+ call resetkeyboard
+ mov bl,31h
+ mov al,0
+ mov ah,12h
+ int 10h
+ call vsync
+
+ mov ah,0
+ mov al,3
+ int 10h
+ call error
+ mov ax,4c00h
+ int 21h
+ ret
+
+ endp
+
+
+
+Error proc near
+
+ cmp gameerror,1
+ jz error1
+ cmp gameerror,2
+ jz error2
+ cmp gameerror,3
+ jz error3
+ cmp gameerror,4
+ jz error4
+ cmp gameerror,5
+ jz error5
+ cmp gameerror,6
+ jz error6
+ cmp gameerror,7
+ jz error7
+ cmp gameerror,8
+ jz error8
+ ret
+
+error1: mov dx,offset cs:gameerror1
+ jmp generalerror
+
+error2: mov ax,soundbaseadd
+ sub ax,200h
+ mov cl,4
+ shr ax,cl
+ add al,"0"
+ mov bx,offset cs:error2patch
+ mov [cs:bx+1],al
+ mov dx,offset cs:gameerror2
+ call generalerror
+ mov dx,offset cs:gameinfo
+ jmp generalerror
+
+error3: mov dx,offset cs:gameerror3
+ jmp generalerror
+
+error4: mov dx,offset cs:gameerror4
+ jmp generalerror
+
+error5: mov dx,offset cs:gameerror5
+ jmp generalerror
+
+error6: mov al,soundint
+ add al,"0"
+ mov bx,offset cs:error6patch
+ mov [cs:bx],al
+ mov dx,offset cs:gameerror6
+ call generalerror
+ mov dx,offset cs:gameinfo
+ jmp generalerror
+
+error7: mov dx,offset cs:gameerror7
+ jmp generalerror
+
+error8: mov dx,offset cs:gameerror8
+ jmp generalerror
+
+generalerror: mov ah,9h
+ push cs
+ pop ds
+ int 21h
+ ret
+
+nodos: ret
+
+gameerror1: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "Unable to allocate Expanded Memory."
+ db 13,10,13,10
+ db 24h
+gameerror2: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "Sound Blaster card not found at address "
+error2patch: db "220 Hex."
+ db 13,10,13,10
+ db 24h
+gameerror3: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "Out of Base Memory."
+ db 13,10,13,10
+ db 24h
+gameerror4: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "Memory Deallocation problem."
+ db 13,10,13,10
+ db 24h
+gameerror5: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "At least 590K of base memory is required."
+ db 13,10,13,10
+ db 24h
+gameerror6: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "Sound Blaster not found on interupt "
+error6patch: db "0"
+ db 13,10,13,10
+ db 24h
+gameerror7: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "Unable to select EMM page."
+ db 13,10,13,10
+ db 24h
+gameerror8: db 13,10,13,10
+ db "Dreamweb has an Error:",13,10
+ db "File not found.c"
+error8patch: db 13,10,13,10
+ db 24h
+
+gameinfo: db "Dreamweb looks for Sound Blaster information in",13,10
+ db "the BLASTER environment variable (in your AUTOEXEC.BAT)",13,10
+ db 13,10,"If this is not found then IRQ 7, DMA channel 1 and base",13,10
+ db "address 220h are assumed.",13,10,13,10
+
+ db "To alter any or all of these settings you can specify them",13,10
+ db "on the command line. For example:",13,10,13,10
+ db "Type DREAMWEB I7 A220 D1 to run Dreamweb on IRQ 7, DMA",13,10
+ db " channel 1 and base address 220h"
+ db 13,10
+ db " DREAMWEB I5 to run Dreamweb on IRQ 5 and",13,10
+ db " default address of 220h, DMA 1",13,10
+ db 13,10
+ db 24h
+
+endgametext1: db 13,10,13,10
+ db "Try the Dreamweb CD in your stereo....",13,10
+ db 13,10,13,10
+ db 24h
+
+ endp
+
+
+
+
+
+
+
+
+Namestoold proc near
+
+ push cs
+ pop ds
+ mov si,offset cs:savenames
+ mov di,zoomspace
+ mov es,buffers
+ mov cx,17*4
+ rep movsb
+ ret
+
+ endp
+
+
+
+Oldtonames proc near
+
+ push cs
+ pop es
+ mov di,offset cs:savenames
+ mov si,zoomspace
+ mov ds,buffers
+ mov cx,17*4
+ rep movsb
+ ret
+
+ endp
+
+
+
+Savefilewrite proc near
+ mov bx,handle
+ mov ah,40h
+ int 21h
+ ret
+ endp
+
+Savefileread proc near
+ mov bx,handle
+ mov ah,3fh
+ int 21h
+ ret
+ endp
+
+Saveposition proc near
+
+ call makeheader
+
+ mov al,currentslot
+ mov ah,0
+ push ax
+ mov cx,13
+ mul cx
+ mov dx,seg savefiles
+ mov ds,dx
+ mov dx,offset savefiles
+ add dx,ax
+ call openforsave
+
+ mov dx,seg fileheader
+ mov ds,dx
+ mov dx,offset fileheader
+ mov cx,headerlen
+ call savefilewrite
+ mov dx,seg fileheader
+ mov es,dx
+ mov di,offset es:filedata
+
+ pop ax
+ mov cx,17
+ mul cx
+ mov dx,seg savenames
+ mov ds,dx
+ mov dx,offset savenames
+ add dx,ax
+ call saveseg
+
+ mov dx,seg startvars
+ mov ds,dx
+ mov dx,offset startvars
+ call saveseg
+
+ mov ds,extras
+ mov dx,exframedata
+ call saveseg
+
+ mov ds,buffers
+ mov dx,listofchanges
+ call saveseg
+
+ mov dx,seg madeuproomdat
+ mov ds,dx
+ mov dx,offset madeuproomdat
+ call saveseg
+
+ mov dx,seg reelroutines
+ mov ds,dx
+ mov dx,offset reelroutines
+ call saveseg
+
+fquit: call closefile
+ ret
+
+ endp
+
+
+
+
+
+
+Loadposition proc near
+
+ mov timecount,0
+ call clearchanges
+
+ mov al,currentslot
+ mov ah,0
+ push ax
+ mov cx,13
+ mul cx
+ mov dx,seg savefiles
+ mov ds,dx
+ mov dx,offset savefiles
+ add dx,ax
+ if cd
+ call openfilefromc
+ else
+ call openfile
+ endif
+
+ push cs
+ pop ds
+ mov dx,offset cs:fileheader
+ mov cx,headerlen
+ call savefileread
+ push cs
+ pop es
+ mov di,offset cs:filedata
+
+ pop ax
+ mov cx,17
+ mul cx
+ mov dx,seg savenames
+ mov ds,dx
+ mov dx,offset savenames
+ add dx,ax
+ call loadseg
+
+ mov dx,seg startvars
+ mov ds,dx
+ mov dx,offset startvars
+ call loadseg
+
+ mov ds,extras
+ mov dx,exframedata
+ call loadseg
+
+ mov ds,buffers
+ mov dx,listofchanges
+ call loadseg
+
+ mov dx,seg madeuproomdat
+ mov ds,dx
+ mov dx,offset madeuproomdat
+ call loadseg
+
+ push cs
+ pop ds
+ mov dx,offset cs:reelroutines
+ call loadseg
+
+ call closefile
+ ret
+
+ endp
+
+
+
+
+
+Loadseg proc near
+
+ mov bx,handle
+ mov ax,[es:di]
+ add di,2
+ push di
+ push es
+ mov cx,ax
+ mov ah,3fh
+ int 21h
+ pop es
+ pop di
+ ret
+
+ endp
+
+
+
+
+
+Makeheader proc near
+
+ mov dx,seg fileheader
+ mov es,dx
+ mov di,offset es:filedata
+ mov ax,17
+ call storeit
+ mov ax,lengthofvars
+ call storeit
+ mov ax,lengthofextra
+ call storeit
+ mov ax,numchanges*4
+ call storeit
+ mov ax,48
+ call storeit
+ mov ax,lenofreelrouts
+ call storeit
+ ret
+
+ endp
+
+
+
+
+
+Storeit proc near
+
+ cmp ax,0
+ jnz isntblank
+ inc ax
+isntblank: stosw
+ ret
+
+ endp
+
+
+
+
+Saveseg proc near
+
+ mov cx,[es:di]
+ add di,2
+ push di es
+ mov bx,handle
+ mov ah,40h
+ int 21h
+ pop es di
+ ret
+
+ endp
+
+
+
+Findlen proc near
+
+ dec bx
+ add bx,ax
+nextone: cmp cl,[bx]
+ jnz foundlen
+ dec bx
+ dec ax
+ cmp ax,0
+ jnz nextone
+foundlen: ret
+
+ endp
+
+
+
+
+
+Scanfornames proc near
+
+ mov dx,seg savenames
+ mov es,dx
+ mov di,offset es:savenames
+ mov dx,seg savefiles
+ mov ds,dx
+ mov dx,offset savefiles
+ mov cx,7
+scanloop: push es ds di dx cx
+
+ if cd
+ call openfilefromc
+ else
+ call openfilenocheck
+ endif
+ jc notexist
+ pop cx
+ inc ch
+ push cx
+ push di es
+ mov dx,seg fileheader
+ mov ds,dx
+ mov dx,offset fileheader
+ mov cx,headerlen
+ call savefileread
+ mov dx,seg fileheader
+ mov es,dx
+ mov di,offset es:filedata
+ pop ds dx
+ call loadseg
+ mov bx,handle
+ call closefile
+
+notexist: pop cx dx di ds es
+ add dx,13
+ add di,17
+ dec cl
+ jnz scanloop
+ mov al,ch
+ ret
+
+ endp
+
+
+
+
+
+Decide proc near
+
+ call setmode
+ call loadpalfromiff
+ call clearpalette
+ mov pointermode,0
+ mov watchingtime,0
+ mov pointerframe,0
+ mov textaddressx,70
+ mov textaddressy,182-8
+ mov textlen,181
+ mov manisoffscreen,1
+ call loadsavebox
+ call showdecisions
+ call worktoscreen
+ call fadescreenup
+ mov getback,0
+
+waitdecide:
+ cmp quitrequested, 0
+ jz $1
+ ret
+$1:
+ call readmouse
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ call delpointer
+ mov bx,offset cs:decidelist
+ call checkcoords
+ cmp getback,0
+ jz waitdecide
+ cmp getback,4
+ jz hasloadedroom
+ call getridoftemp
+hasloadedroom: mov textaddressx,13
+ mov textaddressy,182
+ mov textlen,240
+ ret
+
+decidelist: dw opsx+69,opsx+124,opsy+30,opsy+76,newgame
+ dw opsx+20,opsx+87,opsy+10,opsy+59,dosreturn
+ dw opsx+123,opsx+190,opsy+10,opsy+59,loadold
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+Showdecisions proc near
+
+ call createpanel2
+ call showopbox
+ mov ds,tempgraphics
+ mov di,opsx+17
+ mov bx,opsy+13
+ mov al,6
+ mov ah,0
+ call showframe
+ call undertextline
+ ret
+
+ endp
+
+
+
+
+
+Newgame proc near
+
+ cmp commandtype,251
+ jz alreadynewgame
+ mov commandtype,251
+ mov al,47
+ call commandonly
+alreadynewgame: mov ax,mousebutton
+ cmp ax,1
+ jnz nonewgame
+ mov getback,3
+nonewgame: ret
+
+ endp
+
+
+
+
+
+
+
+Loadold proc near
+
+ cmp commandtype,252
+ jz alreadyloadold
+ mov commandtype,252
+ mov al,48
+ call commandonly
+alreadyloadold: mov ax,mousebutton
+ and ax,1
+ jz noloadold
+ call doload
+ cmp getback,4
+ jz noloadold
+ cmp quitrequested, 0
+ jnz noloadold
+ call showdecisions
+ call worktoscreenm
+ mov getback,0
+noloadold: ret
+
+ endp
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/sblaster.asm b/devtools/tasmrecover/dreamweb/sblaster.asm
new file mode 100644
index 0000000000..46eb8e2366
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/sblaster.asm
@@ -0,0 +1,1292 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+; Creative Reality Sound Blaster Drivers . (C) 1994 Creative Reality
+
+; Very sparsly commented.
+
+
+
+;These drivers are not stand alone. We had them as an integral part of the
+;game.
+;
+;Put interupt no. into SOUNDINT, base address (eg 220h) into SOUNDBASEADD.
+;If interupt is 255 then no card is assumed.
+;
+;Call soundstartup at beginning of program to test card and initialise.
+;
+;This code assumes that EMS has been initialised
+;Emm page frame is in variable EMMPAGEFRAME. Handle is in EMMHANDLE.
+;
+;Call loadsample with a filename in CS:DX (ie. in the code somewhere)
+;
+;To play a sample call playchannel0 or playchannel1 with sound no. in al.
+;
+;Call endsample to restore interupts and halt sound.
+;
+;
+
+
+
+
+;------------------------------------------- Initial sound set up and end ---
+
+Loadspeech proc near
+
+ cmp soundint,255
+ jz dontbother8
+
+ call cancelch1
+
+ mov speechloaded,0
+ call createname
+
+ mov speechlength,0
+ mov dx,offset cs:speechfilename
+ call openfilenocheck
+ jc dontbother8
+
+ mov bx,speechemmpage
+
+moreloadspeech: push dx bx
+
+ push es di bx
+ mov al,2
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+ cmp ah,0
+ jnz emmerror
+ mov ds,emmpageframe
+ pop bx di es
+ inc bx
+ push es di
+ mov al,3
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+ cmp ah,0
+ jnz emmerror
+ mov ds,emmpageframe
+ mov es,emmpageframe
+ mov di,8000h
+ mov cx,4000h
+ mov ax,0
+ rep stosw
+ pop di es
+
+ mov cx,8000h
+ mov dx,8000h
+ call readfromfile
+ mov cl,11
+ shr ax,cl
+ add speechlength,ax
+ pop bx dx
+ add bx,2
+ cmp ax,0
+ jnz moreloadspeech
+ call closefile
+
+ mov es,sounddata2
+ mov di,50*6
+ mov ax,speechemmpage
+ mov [es:di],al
+ mov ax,0
+ mov [es:di+1],ax
+ mov ax,speechlength
+ mov [es:di+3],ax
+ mov speechloaded,1
+dontbother8: ret
+
+speechfilename: db "SPEECH\"
+speechfile: db "R24C0005.RAW",0
+
+ endp
+
+
+
+Createname proc near
+
+ push ax
+ mov di,offset cs:speechfile
+ mov byte ptr [cs:di+0],dl ;"R"
+ mov [cs:di+3],cl
+
+ mov al,dh ;reallocation
+ mov ah,"0"-1
+findten: inc ah
+ sub al,10
+ jnc findten
+ mov [cs:di+1],ah
+ add al,10+"0"
+ mov [cs:di+2],al
+ pop ax
+
+ mov cl,"0"-1
+thousandsc: inc cl
+ sub ax,1000
+ jnc thousandsc
+ add ax,1000
+ mov [cs:di+4],cl
+ mov cl,"0"-1
+hundredsc: inc cl
+ sub ax,100
+ jnc hundredsc
+ add ax,100
+ mov [cs:di+5],cl
+ mov cl,"0"-1
+tensc: inc cl
+ sub ax,10
+ jnc tensc
+ add ax,10
+ mov [cs:di+6],cl
+ add al,"0"
+ mov [cs:di+7],al
+ ret
+
+ endp
+
+
+
+
+
+
+Loadsample proc near
+
+ cmp soundint,255
+ jz dontbother
+
+ call openfile
+ call readheader
+ mov bx,[es:di]
+ push es di bx
+ mov ds,sounddata
+ pop cx
+ mov dx,0
+ call readfromfile
+ pop di es
+
+ add di,2
+ mov bx,0
+ mov dx,[es:di]
+ add dx,1
+ shr dx,1
+
+ mov soundemmpage,0
+
+moreload: push dx bx
+
+ push es di bx
+ mov al,2
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+ cmp ah,0
+ jnz emmerror
+ mov ds,emmpageframe
+ pop bx di es
+ inc bx
+ push es di
+ mov al,3
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+ cmp ah,0
+ jnz emmerror
+ mov ds,emmpageframe
+ pop di es
+
+ mov cx,8000h
+ mov dx,8000h
+ call readfromfile
+ pop bx dx
+ add bx,2
+ add soundemmpage,2
+ dec dx
+ jnz moreload
+ ;inc soundemmpage
+ call closefile
+dontbother: ret
+
+emmerror: mov gameerror,7
+ jmp quickquit2
+
+ endp
+
+
+
+
+
+
+Loadsecondsample proc near
+
+ cmp soundint,255
+ jz dontbother9
+
+ cmp ch0playing,12
+ jc ch0oksecond
+ cmp ch0playing,255
+ jz ch0oksecond
+ call cancelch0
+ ;mov cx,100
+ ;call hangon
+ jmp ch0oksecond
+justcancel: call cancelch0
+ch0oksecond: cmp ch1playing,12
+ jc ch1oksecond
+ call cancelch1
+
+ch1oksecond: call openfile
+ call readheader
+ mov bx,[es:di]
+ push es di bx
+ mov ds,sounddata2
+ pop cx
+ mov dx,0
+ call readfromfile
+
+ mov cx,100
+ mov di,0
+ mov es,sounddata2
+ mov bx,soundemmpage
+adjustemmpage: mov al,[es:di]
+ add al,bl
+ mov [es:di],al
+ add di,6
+ loop adjustemmpage
+
+ pop di es
+
+ add di,2
+ mov bx,soundemmpage
+ mov speechemmpage,bx
+ mov dx,[es:di]
+ add dx,1
+ shr dx,1
+
+moreload2: push dx bx
+
+ push es di bx
+ mov al,2
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+ cmp ah,0
+ jnz emmerror2
+ mov ds,emmpageframe
+ pop bx di es
+ inc bx
+ push es di
+ mov al,3
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+ cmp ah,0
+ jnz emmerror2
+ mov ds,emmpageframe
+ pop di es
+
+ mov cx,8000h
+ mov dx,8000h
+ call readfromfile
+ pop bx dx
+ add bx,2
+ add speechemmpage,2
+ dec dx
+ jnz moreload2
+ call closefile
+dontbother9: ret
+
+emmerror2: mov gameerror,7
+ jmp quickquit2
+
+ endp
+
+
+
+
+
+
+Soundstartup proc near
+
+ cmp soundint,255
+ jz dontbother2
+
+ mov dx,soundbaseadd
+ add dx,0eh
+ mov DSP_status,dx
+ mov dx,soundbaseadd
+ add dx,0ch
+ mov DSP_write,dx
+
+ mov al,1
+ mov dx,soundbaseadd
+ add dx,0006h
+ out dx,al
+ push ax ax ax ax ax ax ax ax
+ pop ax ax ax ax ax ax ax ax
+ mov al,0
+ out dx,al
+
+ mov dx,DSP_status
+ mov cx,2000
+waitinit: in al,dx
+ and al,128
+ jz waitinit
+ mov dx,soundbaseadd
+ add dx,000ah
+ in al,dx
+ cmp al,0aah
+ jz dspready
+ loop waitinit
+ mov gameerror,2
+ jmp quickquit
+
+dspready: call trysoundalloc
+
+ cli
+ mov ah,40h ;set sample rate
+ call out22c
+ mov ah,210 ;of 22050Hz
+ call out22c
+ sti
+
+ call checksoundint
+
+ mov ah,35h
+ mov al,soundint
+ add al,8
+ int 21h
+ mov oldsoundintseg,es ; Save es:bx to temp memory
+ mov oldsoundintadd,bx
+ push cs
+ pop ds
+ mov dx,offset cs:dmaend
+ mov ah,25h
+ mov al,soundint
+ add al,8
+ int 21h ; Set to new
+
+ call enablesoundint
+
+ mov al,sounddmachannel
+ xor ah,ah
+ mov bx,offset cs:dmaaddresses
+ add bx,ax
+ mov al,[cs:bx]
+ mov dmaaddress,al
+
+ mov ah,0d1h ;speaker on
+ call out22c
+ mov ah,0d0h
+ call out22c
+
+dontbother2: ret
+
+dmaaddresses db 87h,83h,81h,82h
+
+ endp
+
+
+
+
+
+Trysoundalloc proc near
+
+ cmp needsoundbuff,1
+ jz gotsoundbuff
+ inc soundtimes
+ mov bx,(16384+2048)/16
+ call allocatemem
+ mov soundbuffer,ax
+ push ax
+ mov al,ah
+ mov cl,4
+ shr al,cl
+ mov soundbufferpage,al
+ pop ax
+ mov cl,4
+ shl ax,cl
+ mov soundbufferad,ax
+ cmp ax,0b7ffh
+ jnc soundfail
+
+ mov es,soundbuffer
+ mov di,0
+ mov cx,16384/2
+ mov ax,7f7fh
+ rep stosw
+ mov needsoundbuff,1
+ ret
+
+soundfail: mov es,soundbuffer
+ call deallocatemem
+gotsoundbuff: ret
+
+ endp
+
+
+
+
+
+
+Setsoundoff proc near
+
+ cmp soundint,255
+ jz dontbother28
+ mov soundbufferwrite,0
+ cli
+ call setupPIT
+ mov soundbufferwrite,4096
+ call startdmablock
+ sti
+dontbother28: ret
+
+ endp
+
+
+
+
+
+
+Checksoundint proc near
+
+ mov ah,0d3h ;speaker off
+ call out22c
+
+ mov testresult,0
+ mov ah,35h
+ mov al,soundint
+ add al,8
+ int 21h
+ mov oldsoundintseg,es
+ mov oldsoundintadd,bx
+ push cs
+ pop ds
+ mov dx,offset cs:interupttest
+ mov ah,25h
+ mov al,soundint
+ add al,8
+ int 21h
+
+ call enablesoundint
+
+ mov ah,0f2h
+ call out22c
+
+ mov cx,20
+ call hangon
+
+ call disablesoundint
+
+ mov dx,oldsoundintseg
+ mov ds,dx
+ mov dx,oldsoundintadd ;Restore old interupt vector
+ mov ah,25h
+ mov al,soundint
+ add al,8
+ int 21h
+
+ cmp testresult,1
+ jz interuptworked
+ mov gameerror,6 ;interupt wrong
+ jmp quickquit ;exit to DOS with error
+
+interuptworked: ret
+
+ endp
+
+
+
+
+
+Enablesoundint proc near
+
+ mov dx,21h ; Enable int?
+ in al,dx
+ mov currentirq,al
+ mov ah,11111110b
+ mov cl,soundint
+ rol ah,cl
+ and al,ah
+ out dx,al
+ ret
+
+ endp
+
+
+
+
+
+Disablesoundint proc near
+
+ mov al,soundint
+ mov dx,21h
+ mov al,currentirq
+ out dx,al
+ ret
+
+ endp
+
+
+
+
+Interupttest proc near
+
+ cli
+ push ax dx
+ mov testresult,1
+ mov dx,DSP_status
+ in al,dx
+ mov al,20h
+ out 20h,al
+ pop dx ax
+ iret
+
+ endp
+
+
+
+
+
+Soundend proc near
+
+ cmp soundint,255
+ jz dontbother3
+
+ call getridofPIT
+
+ mov ah,0d0h
+ call out22c
+
+ call disablesoundint
+
+ mov ds,oldsoundintseg ;for keys
+ mov dx,oldsoundintadd ;Restore old interupt vector
+ mov ah,25h
+ mov al,soundint
+ add al,8
+ int 21h
+
+dontbother3: ret
+
+ endp
+
+
+
+
+
+Out22c proc near
+
+ mov dx,DSP_write
+notclear: in al,dx
+ or al,al
+ js notclear
+ mov al,ah
+ out dx,al
+ ret
+
+ endp
+
+
+
+
+
+;---------------------------------------------------------------------------
+
+
+
+
+Playchannel0 proc near ;al=sound no
+ ;ah=times to repeat
+ cmp soundint,255
+ jz dontbother4
+
+ push es ds bx cx di si
+
+ mov ch0playing,al
+ mov es,sounddata
+ cmp al,12
+ jc notsecondbank
+ mov es,sounddata2
+ sub al,12
+notsecondbank: mov ch0repeat,ah
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ add ax,ax
+ add bx,ax
+
+ mov al,[es:bx]
+ mov ah,0
+ mov ch0emmpage,ax
+ mov ax,[es:bx+1]
+ mov ch0offset,ax
+ mov ax,[es:bx+3]
+ mov ch0blockstocopy,ax
+
+ cmp ch0repeat,0
+ jz nosetloop
+ mov ax,ch0emmpage
+ mov ch0oldemmpage,ax
+ mov ax,ch0offset
+ mov ch0oldoffset,ax
+ mov ax,ch0blockstocopy
+ mov ch0oldblockstocopy,ax
+
+nosetloop: pop si di cx bx ds es
+
+dontbother4: ret
+
+ endp
+
+
+
+
+
+
+
+Playchannel1 proc near ;al=sound no
+
+ cmp soundint,255
+ jz dontbother5
+ cmp ch1playing,7
+ jz dontbother5
+ push es ds bx cx di si
+
+ mov ch1playing,al
+ mov es,sounddata
+ cmp al,12
+ jc notsecondbank1
+ mov es,sounddata2
+ sub al,12
+notsecondbank1: mov ah,0
+ add ax,ax
+ mov bx,ax
+ add ax,ax
+ add bx,ax
+
+ mov al,[es:bx]
+ mov ah,0
+ mov ch1emmpage,ax
+ mov ax,[es:bx+1]
+ mov ch1offset,ax
+ mov ax,[es:bx+3]
+ mov ch1blockstocopy,ax
+
+ pop si di cx bx ds es
+
+dontbother5: ret
+
+ endp
+
+
+
+
+
+
+
+
+Makenextblock proc near
+
+ call volumeadjust
+
+ call loopchannel0
+ cmp ch1blockstocopy,0
+ jz mightbeonlych0
+ cmp ch0blockstocopy,0
+ jz mightbeonlych1
+
+ dec ch0blockstocopy
+ dec ch1blockstocopy
+ call bothchannels
+ ret
+
+mightbeonlych1: mov ch0playing,255
+ cmp ch1blockstocopy,0
+ jz notch1only
+ dec ch1blockstocopy
+ call channel1only
+notch1only: ret
+
+mightbeonlych0: mov ch1playing,255
+ cmp ch0blockstocopy,0
+ jz notch0only
+ dec ch0blockstocopy
+ call channel0only
+ ret
+notch0only: mov es,soundbuffer
+ mov di,soundbufferwrite
+ mov cx,1024
+ mov ax,7f7fh
+ rep stosw
+ and di,16384-1
+ mov soundbufferwrite,di
+ ret
+
+ endp
+
+
+
+
+Volumeadjust proc near
+
+ mov al,volumedirection
+ cmp al,0
+ jz volok
+ mov al,volume
+ cmp al,volumeto
+ jz volfinish
+ add volumecount,64
+ jnz volok
+ mov al,volume
+ add al,volumedirection
+ mov volume,al
+ ret
+volfinish: mov volumedirection,0
+volok: ret
+
+ endp
+
+
+
+Loopchannel0 proc near
+
+ cmp ch0blockstocopy,0
+ jnz notloop
+ cmp ch0repeat,0
+ jz notloop
+ cmp ch0repeat,255
+ jz endlessloop
+ dec ch0repeat
+endlessloop: mov ax,ch0oldemmpage
+ mov ch0emmpage,ax
+ mov ax,ch0oldoffset
+ mov ch0offset,ax
+ mov ax,ch0blockstocopy
+ add ax,ch0oldblockstocopy
+ mov ch0blockstocopy,ax
+ ret
+notloop: ret
+
+ endp
+
+
+
+
+
+
+
+Cancelch0 proc near
+
+ mov ch0repeat,0
+ mov ch0blockstocopy,0
+ mov ch0playing,255
+ ret
+
+ endp
+
+
+
+Cancelch1 proc near
+
+ mov ch1blockstocopy,0
+ mov ch1playing,255
+ ret
+
+ endp
+
+
+
+
+Channel0only proc near
+
+ call saveems
+ mov al,0
+ mov bx,ch0emmpage
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+
+ mov es,soundbuffer
+ mov ds,emmpageframe
+ mov di,soundbufferwrite
+ mov si,ch0offset
+
+ call channel0tran
+ call restoreems
+
+ and di,16384-1
+ mov soundbufferwrite,di
+ and si,16384-1
+ mov ch0offset,si
+ cmp si,0
+ jnz notch0endofpage0
+ inc ch0emmpage
+notch0endofpage0: ret
+
+ endp
+
+
+
+
+Channel1only proc near
+
+ call saveems
+ mov al,1
+ mov bx,ch1emmpage
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+
+ mov es,soundbuffer
+ mov ds,emmpageframe
+ mov di,soundbufferwrite
+ mov si,ch1offset
+ add si,16384
+
+ mov cx,1024
+ rep movsw
+ call restoreems
+
+ and di,16384-1
+ mov soundbufferwrite,di
+ and si,16384-1
+ mov ch1offset,si
+ cmp si,0
+ jnz notch1endofpage1
+ inc ch1emmpage
+notch1endofpage1: ret
+
+ endp
+
+
+
+
+
+Channel0tran proc near
+
+ cmp volume,0
+ jnz lowvolumetran
+ mov cx,1024
+ rep movsw
+ ret
+
+lowvolumetran: mov cx,1024
+ mov bh,volume
+ mov bl,0
+ add bx,16384-256
+volloop: lodsw
+ mov bl,al
+ mov al,[es:bx]
+ mov bl,ah
+ mov ah,[es:bx]
+ stosw
+ loop volloop
+ ret
+
+
+ endp
+
+
+
+
+
+
+
+
+Bothchannels proc near ;rather slow routine
+ ;to mix two channels
+
+ call saveems
+ mov al,0
+ mov bx,ch0emmpage
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+ mov al,1
+ mov bx,ch1emmpage
+ mov dx,emmhandle
+ mov ah,44h
+ int 67h
+
+ mov es,soundbuffer
+ mov ds,emmpageframe
+ mov di,soundbufferwrite
+ mov si,ch0offset
+ mov bx,ch1offset
+ add bx,16384
+ mov cx,2048
+ mov dh,128
+ mov dl,255
+
+ call domix
+ call restoreems
+
+ and di,16384-1
+ mov soundbufferwrite,di
+
+ mov si,ch0offset
+ add si,2048
+ and si,16384-1
+ mov ch0offset,si
+ cmp si,0
+ jnz notbothendofpage0
+ inc ch0emmpage
+notbothendofpage0: mov si,ch1offset
+ add si,2048
+ and si,16384-1
+ mov ch1offset,si
+ cmp si,0
+ jnz notbothendofpage1
+ inc ch1emmpage
+notbothendofpage1: ret
+
+ endp
+
+
+
+Saveems proc near
+
+ mov ah,4eh
+ mov al,0
+ mov es,soundbuffer
+ mov di,16384+2048-256
+ int 67h
+ ret
+
+ endp
+
+
+Restoreems proc near
+
+ push si di
+ mov ah,4eh
+ mov al,1
+ mov ds,soundbuffer
+ mov si,16384+2048-256
+ int 67h
+ pop di si
+ ret
+
+ endp
+
+
+
+Domix proc near
+
+ cmp volume,0
+ jnz lowvolumemix
+
+slow: lodsb
+ mov ah,[bx]
+ inc bx
+ cmp al,dh
+ jnc toplot
+
+botlot: cmp ah,dh
+ jnc nodistort
+ add al,ah
+ js botok
+ xor al,al
+ stosb
+ loop slow
+ jmp doneit
+botok: xor al,dh
+ stosb
+ loop slow
+ jmp doneit
+
+toplot: cmp ah,dh
+ jc nodistort
+ add al,ah
+ jns topok
+ mov al,dl
+ stosb
+ loop slow
+ jmp doneit
+topok: xor al,dh
+ stosb
+ loop slow
+ jmp doneit
+
+nodistort: add al,ah
+ xor al,dh
+ stosb
+ loop slow
+ jmp doneit
+
+
+lowvolumemix: lodsb
+ push bx
+ mov bh,volume
+ add bh,63
+ mov bl,al
+ mov al,[es:bx]
+ pop bx
+
+ mov ah,[bx]
+ inc bx
+ cmp al,dh
+ jnc toplotv
+
+botlotv: cmp ah,dh
+ jnc nodistortv
+ add al,ah
+ js botokv
+ xor al,al
+ stosb
+ loop lowvolumemix
+ jmp doneit
+botokv: xor al,dh
+ stosb
+ loop lowvolumemix
+ jmp doneit
+
+toplotv: cmp ah,dh
+ jc nodistortv
+ add al,ah
+ jns topokv
+ mov al,dl
+ stosb
+ loop lowvolumemix
+ jmp doneit
+topokv: xor al,dh
+ stosb
+ loop lowvolumemix
+ jmp doneit
+
+nodistortv: add al,ah
+ xor al,dh
+ stosb
+ loop lowvolumemix
+doneit: ret
+
+
+ endp
+
+
+
+
+
+
+
+Dmaend proc near
+
+ cli
+ push ax cx dx
+ call startdmablock
+ mov dx,DSP_status
+ in al,dx
+ mov al,20h
+ out 20h,al
+ pop dx cx ax
+ iret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Startdmablock proc near
+
+ mov al,sounddmachannel ;cx=length
+ or al,4 ;bx=offset
+ out 0ah,al
+ xor al,al
+ out 0ch,al
+
+ mov al,48h
+ or al,sounddmachannel
+ out 0bh,al
+
+ mov cx,soundbufferad
+ xor dh,dh
+ mov dl,sounddmachannel
+ shl dl,1
+ mov al,cl
+ out dx,al
+ mov al,ch
+ out dx,al
+
+ mov dl,dmaaddress
+ mov al,soundbufferpage ;hardware page
+ out dx,al
+
+ mov dl,sounddmachannel
+ shl dl,1
+ inc dl
+ mov cx,16384-1
+ mov al,cl
+ out dx,al
+ mov al,ch
+ out dx,al
+
+ mov al,sounddmachannel
+ out 0ah,al ;dmac programmed
+
+ mov dx,DSP_write
+notclear1: in al,dx
+ or al,al
+ js notclear1
+ mov al,14h
+ out dx,al
+notclear2: in al,dx
+ or al,al
+ js notclear2
+ mov al,cl
+ out dx,al
+notclear3: in al,dx
+ or al,al
+ js notclear3
+ mov al,ch
+ out dx,al
+
+ ret
+
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+SetupPIT proc near
+
+ mov ah,35h
+ mov al,8
+ int 21h
+ mov oldint8seg,es ; Save es:bx to temp memory
+ mov oldint8add,bx
+ push cs
+ pop ds
+ mov dx,offset cs:PITinterupt
+ mov ah,25h
+ mov al,8
+ int 21h ; Set to new
+
+ mov al,34h
+ out 43h,al
+ mov al,0h
+ out 40h,al
+ mov al,0dah
+ out 40h,al
+ ret
+
+ endp
+
+
+
+
+
+
+Getridofpit proc near
+
+ cmp oldint8seg,-1
+ jz noresetPIT
+ mov dx,oldint8add
+ mov ax,oldint8seg
+ mov ds,ax
+ mov ah,25h
+ mov al,8
+ int 21h
+ mov al,34h
+ out 43h,al
+ mov al,0
+ out 40h,al
+ mov al,0
+ out 40h,al
+noresetPIT: ret
+
+ endp
+
+
+
+
+
+
+PITinterupt proc near
+
+ cli
+ push ax dx cx
+
+ xor dh,dh
+ mov dl,sounddmachannel
+ shl dl,1
+ in al,dx
+ mov cl,al
+ in al,dx
+ mov ch,al
+ sub cx,soundbufferad
+ mov ax,soundbufferwrite
+ sub ax,cx
+ and ax,3fffh
+ sti
+ cmp ax,8192
+ jnc mustgo
+ cmp ax,2048
+ jnc nopitflip
+
+mustgo: push bx si di es ds
+ call makenextblock
+ pop ds es di si bx
+
+nopitflip: cli
+ mov al,20h
+ out 20h,al
+ pop cx dx ax
+ iret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/sprite.asm b/devtools/tasmrecover/dreamweb/sprite.asm
new file mode 100644
index 0000000000..45f807da3f
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/sprite.asm
@@ -0,0 +1,5033 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+;------------------------------------------------------------People Routines----
+
+
+
+Reelroutines db 1,44,0 ;Room number and x,y
+ dw 20 ;reel pointer
+ db 2,0,1 ;speed,speed count,convers. no.
+
+ db 1,55,0
+ dw 0
+ db 50,20,0
+
+ db 24,22,0
+ dw 74
+ db 1,0,0
+
+ db 24,33,10
+ dw 75
+ db 1,0,1
+
+ db 1,44,0
+ dw 27
+ db 2,0,2
+
+ db 1,44,0
+ dw 96
+ db 3,0,4
+
+ db 1,44,0
+ dw 118
+ db 2,0,5
+
+ db 1,44,10
+ dw 0
+ db 2,0,0
+
+ db 5,22,20
+ dw 53
+ db 3,0,0
+
+ db 5,22,20
+ dw 40
+ db 1,0,2
+
+ db 5,22,20
+ dw 50
+ db 1,0,3
+
+ db 2,11,10
+ dw 192
+ db 1,0,0
+
+ db 2,11,10
+ dw 182
+ db 2,0,1
+
+ db 8,11,10
+ dw 0
+ db 2,0,1
+
+ db 23,0,50
+ dw 0
+ db 3,0,0
+
+ db 28,11,20
+ dw 250
+ db 4,0,0
+
+ db 23,0,50
+ dw 43
+ db 2,0,8
+
+ db 23,11,40
+ dw 130
+ db 2,0,1
+
+ db 23,22,40
+ dw 122
+ db 2,0,2
+
+ db 23,22,40
+ dw 105
+ db 2,0,3
+
+ db 23,22,40
+ dw 81
+ db 2,0,4
+
+ db 23,11,40
+ dw 135
+ db 2,0,5
+
+ db 23,22,40
+ dw 145
+ db 2,0,6
+
+ db 4,22,30
+ dw 0
+ db 2,0,0
+
+ db 45,22,30
+ dw 200
+ db 0,0,20
+
+ db 45,22,30
+ dw 39
+ db 2,0,0
+
+ db 45,22,30
+ dw 25
+ db 2,0,0
+
+ db 8,22,40
+ dw 32
+ db 2,0,0
+
+ db 7,11,20
+ dw 64
+ db 2,0,0
+
+ db 22,22,20
+ dw 82
+ db 2,0,0
+
+ db 27,11,30
+ dw 0
+ db 2,0,0
+
+ db 20,0,30
+ dw 0
+ db 2,0,0
+
+ db 14,33,40
+ dw 21
+ db 1,0,0
+
+ db 29,11,10
+ dw 0
+ db 1,0,0
+
+ db 2,22,0
+ dw 2
+ db 2,0,0
+
+ db 25,0,50
+ dw 4
+ db 2,0,0
+
+ db 50,22,30
+ dw 121
+ db 2,0,0
+
+ db 50,22,30
+ dw 0
+ db 20,0,0
+
+ db 52,22,30
+ dw 192
+ db 2,0,0
+
+ db 52,22,30
+ dw 233
+ db 2,0,0
+
+ db 50,22,40
+ dw 104
+ if cd
+ if german
+ db 65,0,0
+ else
+ db 55,0,0
+ endif
+ else
+ db 55,0,0
+ endif
+
+ db 53,33,0
+ dw 99
+ db 2,0,0
+
+ db 50,22,40
+ dw 0
+ db 3,0,0
+
+ db 50,22,30
+ dw 162
+ db 2,0,0
+
+ db 52,22,30
+ dw 57
+ db 2,0,0
+
+ db 52,22,30
+ dw 0
+ db 2,0,0
+
+ db 54,0,0
+ dw 72
+ db 3,0,0
+
+ db 55,44,0
+ dw 0
+ db 2,0,0
+
+ db 19,0,0
+ dw 0
+ db 28,0,0
+
+ db 14,22,0
+ dw 2
+ db 2,0,0
+
+ db 14,22,0
+ dw 300
+ db 1,0,0
+
+ db 10,22,30
+ dw 174
+ db 0,0,0
+
+ db 12,22,20
+ dw 0
+ db 1,0,0
+
+ db 11,11,20
+ dw 0
+ db 50,20,0
+
+ db 11,11,30
+ dw 0
+ db 50,20,0
+
+ db 11,22,20
+ dw 0
+ db 50,20,0
+
+ db 14,33,40
+ dw 0
+ db 50,20,0
+
+ db 255
+
+
+Lenofreelrouts equ $-reelroutines
+
+
+Reelcalls dw gamer,sparkydrip,eden,edeninbath,sparky,smokebloke
+ dw manasleep,drunk,receptionist,malefan,femalefan
+ dw louis,louischair,soldier1,bossman,interviewer
+ dw heavy,manasleep2,mansatstill,drinker,bartender
+ dw othersmoker,tattooman,attendant,keeper,candles1
+ dw smallcandle,security,copper,poolguard,rockstar
+ dw businessman,train,aide,mugger,helicopter
+ dw intromagic1,intromusic,intromagic2,candles2,gates
+ dw intromagic3,intromonks1,candles,intromonks2
+ dw handclap,monkandryan,endgameseq,priest,madman
+ dw madmanstelly,alleybarksound,foghornsound
+ dw carparkdrip,carparkdrip,carparkdrip,carparkdrip
+
+
+
+;---------------------------------------------------------Character updates----
+
+
+
+Alleybarksound proc near
+
+ mov ax,[es:bx+3]
+ dec ax
+ cmp ax,0
+ jnz nobark
+ push bx es
+ mov al,14
+ call playchannel1
+ pop es bx
+ mov ax,1000
+nobark: mov [es:bx+3],ax
+ ret
+
+ endp
+
+
+
+
+Intromusic proc near
+
+ ret
+
+ endp
+
+
+Foghornsound proc near
+
+ call randomnumber
+ cmp al,198
+ jnz nofog
+ mov al,13
+ call playchannel1
+nofog: ret
+
+ endp
+
+
+
+
+Receptionist proc near
+
+ call checkspeed
+ jnz gotrecep
+ cmp cardpassflag,1
+ jnz notsetcard
+ inc cardpassflag
+ mov byte ptr [es:bx+7],1
+ mov word ptr [es:bx+3],64
+notsetcard: cmp word ptr [es:bx+3],58
+ jnz notdes1
+ call randomnumber
+ cmp al,30
+ jc notdes2
+ mov word ptr [es:bx+3],55
+ jmp gotrecep
+
+notdes1: cmp word ptr [es:bx+3],60
+ jnz notdes2
+ call randomnumber
+ cmp al,240
+ jc gotrecep
+ mov word ptr [es:bx+3],53
+ jmp gotrecep
+
+notdes2: cmp word ptr [es:bx+3],88
+ jnz notendcard
+ mov word ptr [es:bx+3],53
+ jmp gotrecep
+
+notendcard: inc word ptr [es:bx+3]
+gotrecep: call showgamereel
+ call addtopeoplelist
+
+ mov al,[es:bx+7]
+ and al,128
+ jz nottalkedrecep
+ mov talkedtorecep,1
+nottalkedrecep: ret
+
+ endp
+
+
+
+
+Smokebloke proc near
+
+ cmp rockstardead,0
+ jnz notspokento
+ mov al,[es:bx+7]
+ and al,128
+ jz notspokento
+ push es bx
+ mov al,5
+ call setlocation
+ pop bx es
+notspokento: ;mov al,[es:bx+7]
+ ;and al,127
+ ;mov [es:bx+7],al
+ call checkspeed
+ jnz gotsmokeb
+ cmp word ptr [es:bx+3],100
+ jnz notsmokeb1
+ call randomnumber
+ cmp al,30
+ jc notsmokeb2
+ mov word ptr [es:bx+3],96
+ jmp gotsmokeb
+
+notsmokeb1: cmp word ptr [es:bx+3],117
+ jnz notsmokeb2
+ mov word ptr [es:bx+3],96
+ jmp gotsmokeb
+
+notsmokeb2: inc word ptr [es:bx+3]
+gotsmokeb: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Attendant proc near
+
+ call showgamereel
+ call addtopeoplelist
+ mov al,[es:bx+7]
+ and al,128
+ jz nottalked
+ mov talkedtoattendant,1
+nottalked: ret
+
+ endp
+
+
+
+
+
+
+Manasleep proc near
+
+ mov al,[es:bx+7]
+ and al,127
+ mov [es:bx+7],al
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+Eden proc near
+
+ cmp generaldead,0
+ jnz notinbed
+ call showgamereel
+ call addtopeoplelist
+notinbed: ret
+
+ endp
+
+
+
+Edeninbath proc near
+
+ cmp generaldead,0
+ jz notinbath
+ cmp sartaindead,0
+ jnz notinbath
+ call showgamereel
+ call addtopeoplelist
+notinbath: ret
+
+ endp
+
+
+
+Malefan proc near
+
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+Femalefan proc near
+
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+Louis proc near
+
+ cmp rockstardead,0
+ jnz notlouis1
+ call showgamereel
+ call addtopeoplelist
+notlouis1: ret
+
+ endp
+
+
+
+
+Louischair proc near
+
+ cmp rockstardead,0
+ jz notlouis2
+ call checkspeed
+ jnz notlouisanim
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,191
+ jz restartlouis
+ cmp ax,185
+ jz randomlouis
+ mov [es:bx+3],ax
+ jmp notlouisanim
+randomlouis: mov [es:bx+3],ax
+ call randomnumber
+ cmp al,245
+ jnc notlouisanim
+restartlouis: mov ax,182
+ mov [es:bx+3],ax
+notlouisanim: call showgamereel
+ call addtopeoplelist
+notlouis2: ret
+
+ endp
+
+
+
+Manasleep2 proc near
+
+ mov al,[es:bx+7]
+ and al,127
+ mov [es:bx+7],al
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+Mansatstill proc near
+
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+Tattooman proc near
+
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+Drinker proc near
+
+ call checkspeed
+ jnz gotdrinker
+ inc word ptr [es:bx+3]
+ cmp word ptr [es:bx+3],115
+ jnz notdrinker1
+ mov word ptr [es:bx+3],105
+ jmp gotdrinker
+
+notdrinker1: cmp word ptr [es:bx+3],106
+ jnz gotdrinker
+ call randomnumber
+ cmp al,3
+ jc gotdrinker
+ mov word ptr [es:bx+3],105
+
+gotdrinker: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+Bartender proc near
+
+ call checkspeed
+ jnz gotsmoket
+ cmp word ptr [es:bx+3],86
+ jnz notsmoket1
+ call randomnumber
+ cmp al,18
+ jc notsmoket2
+ mov word ptr [es:bx+3],81
+ jmp gotsmoket
+
+notsmoket1: cmp word ptr [es:bx+3],103
+ jnz notsmoket2
+ mov word ptr [es:bx+3],81
+ jmp gotsmoket
+
+notsmoket2: inc word ptr [es:bx+3]
+gotsmoket: call showgamereel
+ cmp gunpassflag,1
+ jnz notgotgun
+ mov byte ptr [es:bx+7],9
+notgotgun: call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+
+Othersmoker proc near
+
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+Barwoman proc near
+
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Interviewer proc near
+
+ cmp reeltowatch,68
+ jnz notgeneralstart
+ inc word ptr [es:bx+3]
+notgeneralstart: cmp word ptr [es:bx+3],250
+ jz talking
+ call checkspeed
+ jnz talking
+ cmp word ptr [es:bx+3],259
+ jz talking
+ inc word ptr [es:bx+3]
+talking: call showgamereel
+ ret
+
+ endp
+
+
+
+
+
+Soldier1 proc near
+
+ cmp word ptr [es:bx+3],0
+ jz soldierwait
+ mov watchingtime,10
+ cmp word ptr [es:bx+3],30
+ jnz notaftersshot
+ inc combatcount
+ cmp combatcount,40
+ jnz gotsoldframe
+ mov mandead,2
+ jmp gotsoldframe
+notaftersshot: call checkspeed
+ jnz gotsoldframe
+ inc word ptr [es:bx+3]
+ jmp gotsoldframe
+soldierwait: cmp lastweapon,1
+ jnz gotsoldframe
+ mov watchingtime,10
+ cmp manspath,2
+ jnz gotsoldframe
+ cmp facing,4
+ jnz gotsoldframe
+ inc word ptr [es:bx+3]
+ mov lastweapon,-1
+ mov combatcount,0
+gotsoldframe: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Rockstar proc near
+
+ mov ax,[es:bx+3]
+ cmp ax,303
+ jz rockcombatend
+ cmp ax,118
+ jz rockcombatend
+ call checkspeed
+ jnz rockspeed
+
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,118
+ jnz notbeforedead
+ mov mandead,2
+ jmp gotrockframe
+
+notbeforedead: cmp ax,79
+ jnz gotrockframe
+ dec ax
+ cmp lastweapon,1
+ jnz notgunonrock
+ mov lastweapon,-1
+ mov ax,123
+ jmp gotrockframe
+notgunonrock: inc combatcount
+ cmp combatcount,40
+ jnz gotrockframe
+ mov combatcount,0
+ mov ax,79
+
+gotrockframe: mov [es:bx+3],ax
+rockspeed: call showgamereel
+ cmp word ptr [es:bx+3],78
+ jnz notalkrock
+ call addtopeoplelist
+ mov pointermode,2
+ mov watchingtime,0
+ ret
+
+notalkrock: mov watchingtime,2
+ mov pointermode,0
+ mov al,mapy
+ mov [es:bx+2],al
+ ret
+
+rockcombatend: mov newlocation,45
+ call showgamereel
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Helicopter proc near
+
+ mov ax,[es:bx+3]
+ cmp ax,203
+ jz heliwon
+ ;cmp ax,53
+ ;jz helicombatend
+ call checkspeed
+ jnz helispeed
+
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,53
+ jnz notbeforehdead
+ inc combatcount
+ cmp combatcount,8
+ jc waitabit
+ mov mandead,2
+waitabit: mov ax,49
+ jmp gotheliframe
+
+notbeforehdead: cmp ax,9
+ jnz gotheliframe
+ dec ax
+ cmp lastweapon,1
+ jnz notgunonheli
+ mov lastweapon,-1
+ mov ax,55
+ jmp gotheliframe
+notgunonheli: mov ax,5
+ inc combatcount
+ cmp combatcount,20
+ jnz gotheliframe
+ mov combatcount,0
+ mov ax,9
+
+gotheliframe: mov [es:bx+3],ax
+helispeed: call showgamereel
+ mov al,mapx
+ mov [es:bx+1],al
+helicombatend: mov ax,[es:bx+3]
+ cmp ax,9 ;8
+ jnc notwaitingheli
+ cmp combatcount,7
+ jc notwaitingheli
+ mov pointermode,2
+ mov watchingtime,0
+ ret
+notwaitingheli: mov pointermode,0
+ mov watchingtime,2
+ ret
+
+heliwon: mov pointermode,0
+ ret
+
+ endp
+
+
+Mugger proc near
+
+ mov ax,[es:bx+3]
+ cmp ax,138
+ jz endmugger1
+ cmp ax,176
+ jz endmugger2
+ cmp ax,2
+ jnz havesetwatch
+ mov watchingtime,175*2
+havesetwatch: call checkspeed
+ jnz notmugger
+ inc word ptr [es:bx+3]
+notmugger: call showgamereel
+ mov al,mapx
+ mov [es:bx+1],al
+ ret
+
+endmugger1: push es bx
+ call createpanel2
+ call showicon
+ mov al,41
+ call findpuztext
+ mov di,33+20
+ mov bx,104
+ mov dl,241
+ mov ah,0
+ call printdirect
+ call worktoscreen
+ mov cx,300
+ call hangon
+ pop bx es
+ push es bx
+ mov word ptr [es:bx+3],140
+ mov manspath,2
+ mov finaldest,2
+ call findxyfrompath
+ mov resetmanxy,1
+ mov al,"W"
+ mov ah,"E"
+ mov cl,"T"
+ mov ch,"A"
+ call findexobject
+ mov command,al
+ mov objecttype,4
+ call removeobfrominv
+ mov al,"W"
+ mov ah,"E"
+ mov cl,"T"
+ mov ch,"B"
+ call findexobject
+ mov command,al
+ mov objecttype,4
+ call removeobfrominv
+ call makemainscreen
+ mov al,48
+ mov bl,68-32
+ mov bh,54+64
+ mov cx,70 ; time on screen
+ mov dx,10 ; pause before show
+ call setuptimeduse
+ mov beenmugged,1
+ pop bx es
+ ret
+
+endmugger2: ret
+
+
+ endp
+
+
+
+
+
+
+
+
+Aide proc near
+
+ call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+Businessman proc near
+
+ mov pointermode,0
+ mov watchingtime,2
+ mov ax,[es:bx+3]
+ cmp ax,2
+ jnz notfirstbiz
+ push ax bx es
+ mov al,49
+ mov cx,30
+ mov dx,1
+ mov bl,68
+ mov bh,174
+ call setuptimeduse
+ pop es bx ax
+
+notfirstbiz: cmp ax,95
+ jz buscombatwonend
+ cmp ax,49
+ jz buscombatend
+
+ call checkspeed
+ jnz busspeed
+
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,48
+ jnz notbeforedeadb
+ mov mandead,2
+ jmp gotbusframe
+
+notbeforedeadb: cmp ax,15
+ jnz buscombatwon
+ dec ax
+ cmp lastweapon,3
+ jnz notshieldonbus
+ mov lastweapon,-1
+ mov combatcount,0
+ mov ax,51
+ jmp gotbusframe
+notshieldonbus: inc combatcount
+ cmp combatcount,20
+ jnz gotbusframe
+ mov combatcount,0
+ mov ax,15
+ jmp gotbusframe
+
+buscombatwon: cmp ax,91
+ jnz gotbusframe
+ push bx es
+ mov al,0
+ call turnpathon
+ mov al,1
+ call turnpathon
+ mov al,2
+ call turnpathon
+ mov al,3
+ call turnpathoff
+ mov manspath,5
+ mov finaldest,5
+ call findxyfrompath
+ mov resetmanxy,1
+ pop es bx
+ mov ax,92
+ jmp gotbusframe
+
+gotbusframe: mov [es:bx+3],ax
+busspeed: call showgamereel
+ mov al,mapy
+ mov [es:bx+2],al
+ mov ax,[es:bx+3]
+ cmp ax,14
+ jnz buscombatend
+ mov watchingtime,0
+ mov pointermode,2
+ ret
+
+buscombatend: ret
+
+buscombatwonend: mov pointermode,0
+ mov watchingtime,0
+ ret
+
+ endp
+
+
+
+
+
+
+Poolguard proc near
+
+ mov ax,[es:bx+3]
+ cmp ax,214
+ jz combatover2
+ cmp ax,258
+ jz combatover2
+ cmp ax,185
+ jz combatover1
+ cmp ax,0
+ jnz notfirstpool
+ mov al,0
+ call turnpathon
+notfirstpool: call checkspeed
+ jnz guardspeed
+
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,122
+ jnz notendguard1
+ dec ax
+ cmp lastweapon,2
+ jnz notaxeonpool
+ mov lastweapon,-1
+ mov ax,122
+ jmp gotguardframe
+notaxeonpool: inc combatcount
+ cmp combatcount,40
+ jnz gotguardframe
+ mov combatcount,0
+ mov ax,195
+ jmp gotguardframe
+
+notendguard1: cmp ax,147
+ jnz gotguardframe
+ dec ax
+ cmp lastweapon,1
+ jnz notgunonpool
+ mov lastweapon,-1
+ mov ax,147
+ jmp gotguardframe
+notgunonpool: inc combatcount
+ cmp combatcount,40
+ jnz gotguardframe
+ mov combatcount,0
+ mov ax,220
+
+gotguardframe: mov [es:bx+3],ax
+guardspeed: call showgamereel
+ mov ax,[es:bx+3]
+ cmp ax,121
+ jz iswaitingpool
+ cmp ax,146
+ jz iswaitingpool
+ mov pointermode,0
+ mov watchingtime,2
+ ret
+iswaitingpool: mov pointermode,2
+ mov watchingtime,0
+ ret
+
+combatover1: mov watchingtime,0
+ mov pointermode,0
+ mov al,0
+ call turnpathon
+ mov al,1
+ call turnpathoff
+ ret
+
+combatover2: call showgamereel
+ mov watchingtime,2
+ mov pointermode,0
+ inc combatcount
+ cmp combatcount,100
+ jc doneover2
+ mov watchingtime,0
+ mov mandead,2
+doneover2: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Security proc near
+
+ cmp word ptr [es:bx+3],32
+ jz securwait
+ cmp word ptr [es:bx+3],69
+ jnz notaftersec
+ ret
+notaftersec: mov watchingtime,10
+ call checkspeed
+ jnz gotsecurframe
+ inc word ptr [es:bx+3]
+ jmp gotsecurframe
+securwait: cmp lastweapon,1
+ jnz gotsecurframe
+ mov watchingtime,10
+ cmp manspath,9
+ jnz gotsecurframe
+ cmp facing,0
+ jnz gotsecurframe
+ mov lastweapon,-1
+ inc word ptr [es:bx+3]
+gotsecurframe: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+Heavy proc near
+
+ mov al,[es:bx+7]
+ and al,127
+ mov [es:bx+7],al
+ cmp word ptr [es:bx+3],43
+ jz heavywait
+ mov watchingtime,10
+ cmp word ptr [es:bx+3],70
+ jnz notafterhshot
+ inc combatcount
+ cmp combatcount,80
+ jnz gotheavyframe
+ mov mandead,2
+ jmp gotheavyframe
+notafterhshot: call checkspeed
+ jnz gotheavyframe
+ inc word ptr [es:bx+3]
+ jmp gotheavyframe
+heavywait: cmp lastweapon,1
+ jnz gotheavyframe
+ cmp manspath,5
+ jnz gotheavyframe
+ cmp facing,4
+ jnz gotheavyframe
+ mov lastweapon,-1
+ inc word ptr [es:bx+3]
+ mov combatcount,0
+gotheavyframe: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+Bossman proc near
+
+ call checkspeed
+ jnz notboss
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,4
+ jz firstdes
+ cmp ax,20
+ jz secdes
+ cmp ax,41
+ jnz gotallboss
+ mov ax,0
+ inc gunpassflag
+ mov byte ptr [es:bx+7],10
+ jmp gotallboss
+firstdes: cmp gunpassflag,1
+ jz gotallboss
+ push ax
+ call randomnumber
+ mov cl,al
+ pop ax
+ cmp cl,10
+ jc gotallboss
+ mov ax,0
+ jmp gotallboss
+secdes: cmp gunpassflag,1
+ jz gotallboss
+ mov ax,0
+gotallboss: mov [es:bx+3],ax
+notboss: call showgamereel
+ call addtopeoplelist
+
+ mov al,[es:bx+7]
+ and al,128
+ jz nottalkedboss
+ mov talkedtoboss,1
+nottalkedboss: ret
+
+ endp
+
+
+
+
+
+Gamer proc near
+
+ call checkspeed
+ jnz gamerfin
+gameragain: call randomnum1
+ and al,7
+ cmp al,5
+ jnc gameragain
+ add al,20
+ cmp al,[es:bx+3]
+ jz gameragain
+ mov ah,0
+ mov [es:bx+3],ax
+gamerfin: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+Sparkydrip proc near
+
+ call checkspeed
+ jnz cantdrip
+ mov al,14
+ mov ah,0
+ call playchannel0
+cantdrip: ret
+
+ endp
+
+
+
+Carparkdrip proc near
+
+ call checkspeed
+ jnz cantdrip2
+ mov al,14
+ call playchannel1
+cantdrip2: ret
+
+ endp
+
+
+
+Keeper proc near
+
+ cmp keeperflag,0
+ jnz notwaiting
+ cmp reeltowatch,190
+ jc waiting
+ inc keeperflag
+ mov ah,[es:bx+7]
+ and ah,127
+ cmp ah,dreamnumber
+ jz notdiff
+ mov al,dreamnumber
+ mov [es:bx+7],al
+notdiff: ret
+notwaiting: call addtopeoplelist
+ call showgamereel
+waiting: ret
+
+ endp
+
+
+
+Candles1 proc near
+
+ call checkspeed
+ jnz candle1
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,44
+ jnz notendcandle1
+ mov ax,39
+notendcandle1: mov [es:bx+3],ax
+candle1: call showgamereel
+ ret
+
+ endp
+
+
+
+Smallcandle proc near
+
+ call checkspeed
+ jnz smallcandlef
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,37
+ jnz notendsmallcandle
+ mov ax,25
+notendsmallcandle: mov [es:bx+3],ax
+smallcandlef: call showgamereel
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Intromagic1 proc near
+
+ call checkspeed
+ jnz introm1fin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,145
+ jnz gotintrom1
+ mov ax,121
+gotintrom1: mov [es:bx+3],ax
+ cmp ax,121
+ jnz introm1fin
+ inc introcount
+ push es bx
+ call intro1text
+ pop bx es
+ cmp introcount,8 ; was 7
+ jnz introm1fin
+ add mapy,10
+ mov nowinnewroom,1
+introm1fin: call showgamereel
+ ret
+
+ endp
+
+
+
+
+Candles proc near
+
+ call checkspeed
+ jnz candlesfin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,167
+ jnz gotcandles
+ mov ax,162
+gotcandles: mov [es:bx+3],ax
+candlesfin: call showgamereel
+ ret
+
+ endp
+
+
+
+Candles2 proc near
+
+ call checkspeed
+ jnz candles2fin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,238
+ jnz gotcandles2
+ mov ax,233
+gotcandles2: mov [es:bx+3],ax
+candles2fin: call showgamereel
+ ret
+
+ endp
+
+
+
+Gates proc near
+
+ call checkspeed
+ jnz gatesfin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,116
+ jnz notbang
+ push ax bx es
+ mov al,17 ;12
+ call playchannel1
+ pop es bx ax
+notbang: cmp ax,110
+ jc slowgates
+ mov byte ptr [es:bx+5],2
+slowgates: cmp ax,120
+ jnz gotgates
+ mov getback,1
+ mov ax,119
+gotgates: mov [es:bx+3],ax
+ push es bx
+ call intro3text
+ pop bx es
+gatesfin: call showgamereel
+ ret
+
+ endp
+
+
+
+
+Intromagic2 proc near
+
+ call checkspeed
+ jnz introm2fin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,216
+ jnz gotintrom2
+ mov ax,192
+gotintrom2: mov [es:bx+3],ax
+introm2fin: call showgamereel
+ ret
+
+ endp
+
+
+
+
+Intromagic3 proc near
+
+ call checkspeed
+ jnz introm3fin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,218
+ jnz gotintrom3
+ mov getback,1
+gotintrom3: mov [es:bx+3],ax
+introm3fin: call showgamereel
+ mov al,mapx
+ mov [es:bx+1],al
+ ret
+
+ endp
+
+
+
+
+
+
+
+Intromonks1 proc near
+
+ call checkspeed
+ jnz intromonk1fin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,80
+ jnz notendmonk1
+ add mapy,10
+ mov nowinnewroom,1
+ call showgamereel
+ ret
+notendmonk1: cmp ax,30
+ jnz gotintromonk1
+ sub mapy,10
+ mov nowinnewroom,1
+ mov ax,51
+gotintromonk1: mov [es:bx+3],ax
+ cmp ax,5
+ jz waitstep
+ cmp ax,15
+ jz waitstep
+ cmp ax,25
+ jz waitstep
+ cmp ax,61
+ jz waitstep
+ cmp ax,71
+ jz waitstep
+ jmp intromonk1fin
+waitstep: push es bx
+ call intro2text
+ pop bx es
+ mov byte ptr [es:bx+6],-20
+intromonk1fin: call showgamereel
+ mov al,mapy
+ mov [es:bx+2],al
+ ret
+
+ endp
+
+
+
+
+Intromonks2 proc near
+
+ call checkspeed
+ jnz intromonk2fin
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,87
+ jnz nottalk1
+ inc introcount
+ push es bx
+ call monks2text
+ pop bx es
+ cmp introcount,19
+ jnz notlasttalk1
+ mov ax,87
+ jmp gotintromonk2
+notlasttalk1: mov ax,74
+ jmp gotintromonk2
+
+nottalk1: cmp ax,110
+ jnz notraisearm
+ inc introcount
+ push es bx
+ call monks2text
+ pop bx es
+ if cd
+ if german
+ cmp introcount,42
+ else
+ cmp introcount,35
+ endif
+ else
+ cmp introcount,35
+ endif
+ jnz notlastraise
+ mov ax,111
+ jmp gotintromonk2
+notlastraise: mov ax,98
+ jmp gotintromonk2
+
+notraisearm: cmp ax,176
+ jnz notendmonk2
+ mov getback,1
+ jmp gotintromonk2
+notendmonk2: cmp ax,125
+ jnz gotintromonk2
+ mov ax,140
+gotintromonk2: mov [es:bx+3],ax
+intromonk2fin: call showgamereel
+ ret
+
+ endp
+
+
+
+
+
+Handclap proc near
+
+ ret
+
+ endp
+
+
+
+
+ if german
+ if cd
+
+Monks2text proc near
+
+ cmp introcount,1
+ jnz notmonk2text1
+ mov al,8
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text1: cmp introcount,5
+ jnz notmonk2text2
+ mov al,9
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text2: cmp introcount,9
+ jnz notmonk2text3
+ mov al,10
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text3: cmp introcount,13
+ jnz notmonk2text4
+ mov introcount,14
+ mov al,11
+ mov bl,0
+ mov bh,105
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text4: cmp introcount,19
+ jnz notmonk2text7
+ mov al,14
+ mov bl,36
+ mov bh,160
+ mov cx,100 ;32
+ mov dx,1
+ mov ah,82
+ jmp setuptimedtemp
+notmonk2text7: cmp introcount,23
+ jnz notmonk2text8
+ mov al,15
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text8: cmp introcount,27
+ jnz notmonk2text9
+ mov al,16
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text9: cmp introcount,30
+ jnz notmonk2text10
+ mov al,17
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text10: cmp introcount,35
+ jnz notmonk2text11
+ mov al,18
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text11: ret
+
+gotmonks2text: mov dx,1
+ mov cx,120
+ mov ah,82
+ call setuptimedtemp
+ ret
+
+ endp
+
+ else
+
+Monks2text proc near
+
+ cmp introcount,1
+ jnz notmonk2text1
+ mov al,8
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text1: cmp introcount,4
+ jnz notmonk2text2
+ mov al,9
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text2: cmp introcount,7
+ jnz notmonk2text3
+ mov al,10
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text3: cmp introcount,10
+ jnz notmonk2text4
+ if cd
+ mov introcount,12
+ endif
+ mov al,11
+ mov bl,0
+ mov bh,105
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text4: cmp introcount,13
+ jnz notmonk2text5
+ if cd
+ mov introcount,17; 18
+ ret
+ endif
+ mov al,12
+ mov bl,0
+ mov bh,120
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text5: cmp introcount,16
+ jnz notmonk2text6
+ mov al,13
+ mov bl,0
+ mov bh,135
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text6: cmp introcount,19
+ jnz notmonk2text7
+ mov al,14
+ mov bl,36
+ mov bh,160
+ mov cx,100 ;32
+ mov dx,1
+ mov ah,82
+ jmp setuptimedtemp
+notmonk2text7: cmp introcount,22
+ jnz notmonk2text8
+ mov al,15
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text8: cmp introcount,25
+ jnz notmonk2text9
+ mov al,16
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text9: if cd
+ cmp introcount,27
+ else
+ cmp introcount,28
+ endif
+ jnz notmonk2text10
+ mov al,17
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text10: cmp introcount,31
+ jnz notmonk2text11
+ mov al,18
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text11: ret
+
+gotmonks2text: mov dx,1
+ mov cx,120
+ mov ah,82
+ call setuptimedtemp
+ ret
+
+ endp
+
+
+ endif
+ else
+
+Monks2text proc near
+
+ cmp introcount,1
+ jnz notmonk2text1
+ mov al,8
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text1: cmp introcount,4
+ jnz notmonk2text2
+ mov al,9
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text2: cmp introcount,7
+ jnz notmonk2text3
+ mov al,10
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text3: cmp introcount,10
+ jnz notmonk2text4
+ if cd
+ mov introcount,12
+ endif
+ mov al,11
+ mov bl,0
+ mov bh,105
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text4: cmp introcount,13
+ jnz notmonk2text5
+ if cd
+ mov introcount,17; 18
+ ret
+ endif
+ mov al,12
+ mov bl,0
+ mov bh,120
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text5: cmp introcount,16
+ jnz notmonk2text6
+ mov al,13
+ mov bl,0
+ mov bh,135
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text6: cmp introcount,19
+ jnz notmonk2text7
+ mov al,14
+ mov bl,36
+ mov bh,160
+ mov cx,100 ;32
+ mov dx,1
+ mov ah,82
+ jmp setuptimedtemp
+notmonk2text7: cmp introcount,22
+ jnz notmonk2text8
+ mov al,15
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text8: cmp introcount,25
+ jnz notmonk2text9
+ mov al,16
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text9: if cd
+ cmp introcount,27
+ else
+ cmp introcount,28
+ endif
+ jnz notmonk2text10
+ mov al,17
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text10: cmp introcount,31
+ jnz notmonk2text11
+ mov al,18
+ mov bl,36
+ mov bh,160
+ mov cx,100
+ jmp gotmonks2text
+notmonk2text11: ret
+
+gotmonks2text: mov dx,1
+ mov cx,120
+ mov ah,82
+ call setuptimedtemp
+ ret
+
+ endp
+
+ endif
+
+
+
+
+
+
+Intro1text proc near
+
+ cmp introcount,2
+ jnz notintro1text1
+ mov al,40
+ mov bl,34
+ mov bh,130
+ mov cx,90
+ jmp gotintro1text
+notintro1text1: cmp introcount,4
+ jnz notintro1text2
+ mov al,41
+ mov bl,34
+ mov bh,130
+ mov cx,90
+ jmp gotintro1text
+notintro1text2: cmp introcount,6
+ jnz notintro1text3
+ mov al,42
+ mov bl,34
+ mov bh,130
+ mov cx,90
+ jmp gotintro1text
+notintro1text3: ret
+
+gotintro1text: mov dx,1
+ mov ah,82
+ if cd
+ cmp ch1playing,255
+ jz oktalk2
+ dec introcount
+ ret
+ endif
+oktalk2: call setuptimedtemp
+ ret
+
+ endp
+
+
+
+Intro2text proc near
+
+ cmp ax,5
+ jnz notintro2text1
+ mov al,43
+ mov bl,34
+ mov bh,40
+ mov cx,90
+ jmp gotintro2text
+notintro2text1: cmp ax,15
+ jnz notintro2text2
+ mov al,44
+ mov bl,34
+ mov bh,40
+ mov cx,90
+ jmp gotintro2text
+notintro2text2: ret
+
+gotintro2text: mov dx,1
+ mov ah,82
+ call setuptimedtemp
+ ret
+
+ endp
+
+
+
+
+
+
+Intro3text proc near
+
+ cmp ax,107
+ jnz notintro3text1
+ mov al,45
+ mov bl,36
+ mov bh,56
+ mov cx,100
+ jmp gotintro3text
+notintro3text1: if cd
+ cmp ax,108
+ else
+ cmp ax,109
+ endif
+ jnz notintro3text2
+ mov al,46
+ mov bl,36
+ mov bh,56
+ mov cx,100
+ jmp gotintro3text
+notintro3text2: ret
+
+gotintro3text: mov dx,1
+ mov ah,82
+ call setuptimedtemp
+ ret
+
+ endp
+
+
+
+
+
+
+
+Monkandryan proc near
+
+ call checkspeed
+ jnz notmonkryan
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,83
+ jnz gotmonkryan
+ inc introcount
+ push es bx
+ call textformonk
+ pop bx es
+ mov ax,77
+ cmp introcount,57
+ jnz gotmonkryan
+ mov getback,1
+ ret
+gotmonkryan: mov [es:bx+3],ax
+notmonkryan: call showgamereel
+ ret
+
+ endp
+
+
+
+
+
+Endgameseq proc near
+
+ call checkspeed
+ jnz notendseq
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,51
+ jnz gotendseq
+ cmp introcount,140
+ jz gotendseq
+ inc introcount
+ push es bx
+ call textforend
+ pop bx es
+ mov ax,50
+gotendseq: mov [es:bx+3],ax
+ cmp ax,134
+ jnz notfadedown
+ push es bx ax
+ call fadescreendownhalf
+ pop ax bx es
+ jmp notendseq
+notfadedown: cmp ax,324
+ jnz notfadeend
+ push es bx ax
+ call fadescreendowns
+ mov volumeto,7
+ mov volumedirection,1
+ pop ax bx es
+notfadeend: cmp ax,340
+ jnz notendseq
+ mov getback,1
+notendseq: call showgamereel
+ mov al,mapy
+ mov [es:bx+2],al
+ mov ax,[es:bx+3]
+ cmp ax,145
+ jnz notendcreds
+ mov word ptr [es:bx+3],146
+ call rollendcredits
+notendcreds: ret
+
+ endp
+
+
+
+
+
+
+Rollendcredits proc near
+
+ mov al,16
+ mov ah,255
+ call playchannel0
+ mov volume,7
+ mov volumeto,0
+ mov volumedirection,-1
+
+ mov cl,160
+ mov ch,160
+ mov di,75
+ mov bx,20
+ mov ds,mapstore
+ mov si,0
+ call multiget
+
+ mov es,textfile1
+ mov si,3*2
+ mov ax,[es:si]
+ mov si,ax
+ add si,textstart
+
+ mov cx,254
+endcredits1: push cx
+
+ mov bx,10
+ mov cx,linespacing
+endcredits2: push cx si di es bx
+
+ call vsync
+ mov cl,160
+ mov ch,160
+ mov di,75
+ mov bx,20
+ mov ds,mapstore
+ mov si,0
+ call multiput
+ call vsync
+ pop bx es di si
+ push si di es bx
+
+ mov cx,18
+onelot: push cx
+ mov di,75
+ mov dx,161
+ mov ax,0
+ call printdirect
+ add bx,linespacing
+ pop cx
+ loop onelot
+
+ call vsync
+ mov cl,160
+ mov ch,160
+ mov di,75
+ mov bx,20
+ call multidump
+
+ pop bx es di si cx
+ dec bx
+ loop endcredits2
+ pop cx
+looknext: mov al,[es:si]
+ inc si
+ cmp al,":"
+ jz gotnext
+ cmp al,0
+ jz gotnext
+ jmp looknext
+gotnext: loop endcredits1
+
+ mov cx,100
+ call hangon
+ call paneltomap
+ call fadescreenuphalf
+ ret
+
+ endp
+
+
+
+
+
+
+Priest proc near
+
+ cmp word ptr [es:bx+3],8
+ jz priestspoken
+ mov pointermode,0
+ mov watchingtime,2
+ call checkspeed
+ jnz priestwait
+ inc word ptr [es:bx+3]
+ push es bx
+ call priesttext
+ pop bx es
+priestwait: ret
+
+priestspoken: ret
+
+ endp
+
+
+
+
+
+
+Madmanstelly proc near
+
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,307
+ jnz notendtelly
+ mov ax,300
+notendtelly: mov [es:bx+3],ax
+ call showgamereel
+ ret
+
+ endp
+
+
+
+
+
+Madman proc near
+
+ mov watchingtime,2
+ call checkspeed
+ jnz nomadspeed
+ mov ax,[es:bx+3]
+ cmp ax,364
+ jnc ryansded
+ cmp ax,10
+ jnz notfirstmad
+ push es bx ax
+ mov dx,offset cs:introtextname
+ call loadtemptext
+ pop ax bx es
+ mov combatcount,-1
+ mov speechcount,0
+notfirstmad: inc ax
+ cmp ax,294
+ jz madmanspoken
+ cmp ax,66
+ jnz nomadspeak
+ inc combatcount
+ push es bx
+ call madmantext
+ pop bx es
+ mov ax,53
+ if cd
+ cmp combatcount,64
+ else
+ cmp combatcount,62
+ endif
+ jc nomadspeak
+ if cd
+ cmp combatcount,70
+ else
+ cmp combatcount,68
+ endif
+ jz killryan
+ cmp lastweapon,8
+ jnz nomadspeak
+ if cd
+ mov combatcount,72
+ else
+ mov combatcount,70
+ endif
+ mov lastweapon,-1
+ mov madmanflag,1
+ mov ax,67
+ jmp nomadspeak
+killryan: mov ax,310
+nomadspeak: mov [es:bx+3],ax
+nomadspeed: call showgamereel
+ mov al,mapx
+ mov [es:bx+1],al
+ call madmode
+ ret
+madmanspoken: cmp wongame,1
+ jz alreadywon
+ mov wongame,1
+ push es bx
+ call getridoftemptext
+ pop bx es
+alreadywon: ret
+
+ryansded: mov mandead,2
+ call showgamereel
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+ if cd
+Madmantext proc near
+
+ cmp speechcount,63
+ jnc nomadtext
+ cmp ch1playing,255
+ jnz nomadtext
+
+ mov al,speechcount
+ inc speechcount
+ add al,47
+ mov bl,72
+ mov bh,80
+ mov cx,90
+ mov dx,1
+ mov ah,82
+ call setuptimedtemp
+nomadtext: ret
+
+ endp
+
+ else
+
+Madmantext proc near
+
+ cmp combatcount,61
+ jnc nomadtext
+ mov al,combatcount
+ and al,3
+ jnz nomadtext
+ mov al,combatcount
+ shr al,1
+ shr al,1
+ add al,47
+ mov bl,72
+ mov bh,80
+ mov cx,90
+ mov dx,1
+ mov ah,82
+ call setuptimedtemp
+nomadtext: ret
+
+ endp
+ endif
+
+
+
+
+Madmode proc near
+
+ mov watchingtime,2
+ mov pointermode,0
+ if cd
+ cmp combatcount,65
+ else
+ cmp combatcount,63
+ endif
+ jc iswatchmad
+ if cd
+ cmp combatcount,70
+ else
+ cmp combatcount,68
+ endif
+ jnc iswatchmad
+ mov pointermode,2
+iswatchmad: ret
+
+ endp
+
+
+
+
+
+Priesttext proc near
+
+ cmp word ptr [es:bx+3],2
+ jc nopriesttext
+ cmp word ptr [es:bx+3],7
+ jnc nopriesttext
+ mov al,[es:bx+3]
+ and al,1
+ jnz nopriesttext
+ mov al,[es:bx+3]
+ shr al,1
+ add al,50
+ mov bl,72
+ mov bh,80
+ mov cx,54
+ mov dx,1
+ call setuptimeduse
+nopriesttext: ret
+
+ endp
+
+
+
+
+Textforend proc near
+
+ cmp introcount,20
+ jnz notendtext1
+ mov al,0
+ mov bl,34
+ mov bh,20
+ mov cx,60
+ jmp gotendtext
+notendtext1: if cd
+ cmp introcount,50
+ else
+ cmp introcount,65
+ endif
+ jnz notendtext2
+ mov al,1
+ mov bl,34
+ mov bh,20
+ mov cx,60
+ jmp gotendtext
+notendtext2: if cd
+ cmp introcount,85
+ else
+ cmp introcount,110
+ endif
+ jnz notendtext3
+ mov al,2
+ mov bl,34
+ mov bh,20
+ mov cx,60
+ jmp gotendtext
+notendtext3: ret
+
+gotendtext: mov dx,1
+ mov ah,83
+ call setuptimedtemp
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Textformonk proc near
+
+ cmp introcount,1
+ jnz notmonktext1
+ mov al,19
+ mov bl,68
+ mov bh,154
+ mov cx,120
+ jmp gotmonktext
+notmonktext1: cmp introcount,5
+ jnz notmonktext2
+ mov al,20
+ mov bl,68
+ mov bh,38
+ mov cx,120
+ jmp gotmonktext
+notmonktext2: cmp introcount,9
+ jnz notmonktext3
+ mov al,21
+ mov bl,48
+ mov bh,154
+ mov cx,120
+ jmp gotmonktext
+notmonktext3: cmp introcount,13
+ jnz notmonktext4
+ mov al,22
+ mov bl,68
+ mov bh,38
+ mov cx,120
+ jmp gotmonktext
+notmonktext4: if cd
+ cmp introcount,15
+ else
+ cmp introcount,17
+ endif
+ jnz notmonktext5
+ mov al,23
+ mov bl,68
+ mov bh,154
+ mov cx,120
+ jmp gotmonktext
+notmonktext5: cmp introcount,21
+ jnz notmonktext6
+ mov al,24
+ mov bl,68
+ mov bh,38
+ mov cx,120
+ jmp gotmonktext
+notmonktext6: cmp introcount,25
+ jnz notmonktext7
+ mov al,25
+ mov bl,68
+ mov bh,154
+ mov cx,120
+ jmp gotmonktext
+notmonktext7: cmp introcount,29
+ jnz notmonktext8
+ mov al,26
+ mov bl,68
+ mov bh,38
+ mov cx,120
+ jmp gotmonktext
+notmonktext8: cmp introcount,33
+ jnz notmonktext9
+ mov al,27
+ mov bl,68
+ mov bh,154
+ mov cx,120
+ jmp gotmonktext
+notmonktext9: cmp introcount,37
+ jnz notmonktext10
+ mov al,28
+ mov bl,68
+ mov bh,154
+ mov cx,120
+ jmp gotmonktext
+notmonktext10: cmp introcount,41
+ jnz notmonktext11
+ mov al,29
+ mov bl,68
+ mov bh,38
+ mov cx,120
+ jmp gotmonktext
+notmonktext11: cmp introcount,45
+ jnz notmonktext12
+ mov al,30
+ mov bl,68
+ mov bh,154
+ mov cx,120
+ jmp gotmonktext
+notmonktext12: if cd
+ cmp introcount,52
+ else
+ cmp introcount,49
+ endif
+ jnz notmonktext13
+ mov al,31
+ mov bl,68
+ mov bh,154
+ mov cx,220 ;132
+ jmp gotmonktext
+notmonktext13: cmp introcount,53
+ jnz notendtitles
+ call fadescreendowns
+ if cd
+ mov volumeto,7
+ mov volumedirection,1
+ endif
+notendtitles: ret
+
+gotmonktext: mov dx,1
+ mov ah,82
+ if cd
+ cmp ch1playing,255
+ jz oktalk
+ dec introcount
+ ret
+ endif
+oktalk: call setuptimedtemp
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Drunk proc near
+
+ cmp generaldead,0
+ jnz trampgone
+ mov al,[es:bx+7]
+ and al,127
+ mov [es:bx+7],al
+ call showgamereel
+ call addtopeoplelist
+trampgone: ret
+
+ endp
+
+
+Advisor proc near
+
+ call checkspeed
+ jnz noadvisor
+ jmp noadvisor
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,123
+ jnz notendadvis
+ mov ax,106
+ jmp gotadvframe
+notendadvis: cmp ax,108
+ jnz gotadvframe
+ push ax
+ call randomnumber
+ mov cl,al
+ pop ax
+ cmp cl,3
+ jc gotadvframe
+ mov ax,106
+gotadvframe: mov [es:bx+3],ax
+noadvisor: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+Copper proc near
+
+ call checkspeed
+ jnz nocopper
+ mov ax,[es:bx+3]
+ inc ax
+ cmp ax,94
+ jnz notendcopper
+ mov ax,64
+ jmp gotcopframe
+notendcopper: cmp ax,81
+ jz mightwait
+ cmp ax,66
+ jnz gotcopframe
+mightwait: push ax
+ call randomnumber
+ mov cl,al
+ pop ax
+ cmp cl,7
+ jc gotcopframe
+ dec ax
+gotcopframe: mov [es:bx+3],ax
+nocopper: call showgamereel
+ call addtopeoplelist
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Sparky proc near
+
+ cmp card1money,0
+ jz animsparky
+ mov byte ptr [es:bx+7],3
+ jmp animsparky
+
+animsparky: call checkspeed
+ jnz finishsparky
+ cmp word ptr [es:bx+3],34
+ jnz notsparky1
+ call randomnumber
+ cmp al,30
+ jc dosparky
+ mov word ptr [es:bx+3],27
+ jmp finishsparky
+
+notsparky1: cmp word ptr [es:bx+3],48
+ jnz dosparky
+ mov word ptr [es:bx+3],27
+ jmp finishsparky
+
+dosparky: inc word ptr [es:bx+3]
+finishsparky: call showgamereel
+ call addtopeoplelist
+
+ mov al,[es:bx+7]
+ and al,128
+ jz nottalkedsparky
+ mov talkedtosparky,1
+nottalkedsparky: ret
+
+ endp
+
+
+
+
+
+Train proc near
+
+ ret
+ mov ax,[es:bx+3]
+ cmp ax,21
+ jnc notrainyet
+ inc ax
+ jmp gottrainframe
+notrainyet: call randomnumber
+ cmp al,253
+ jc notrainatall
+ cmp manspath,5
+ jnz notrainatall
+ cmp finaldest,5
+ jnz notrainatall
+ mov ax,5
+gottrainframe: mov [es:bx+3],ax
+ call showgamereel
+notrainatall: ret
+
+ endp
+
+
+
+
+
+
+
+Addtopeoplelist proc near
+
+ push es bx bx
+ mov cl,[es:bx+7]
+ mov ax,[es:bx+3]
+ mov bx,listpos
+ mov es,buffers
+ mov [es:bx],ax ;reel pointer position
+ pop ax
+ mov [es:bx+2],ax
+ mov [es:bx+4],cl ;coversation number
+ pop bx es
+ add listpos,5
+ ret
+
+ endp
+
+
+
+Showgamereel proc near
+
+ mov ax,[es:bx+3]
+ cmp ax,512
+ jnc noshow
+ mov reelpointer,ax
+ push es bx
+ call plotreel
+ pop bx es
+ mov ax,reelpointer
+ mov [es:bx+3],ax
+noshow: ret
+
+ endp
+
+
+
+
+
+
+Checkspeed proc near
+
+ cmp lastweapon,-1
+ jnz forcenext
+ inc byte ptr [es:bx+6]
+ mov al,[es:bx+6]
+ cmp al,[es:bx+5]
+ jnz notspeed
+ mov al,0
+ mov [es:bx+6],al
+ cmp al,al
+notspeed: ret
+
+forcenext: cmp al,al
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+;------------------------------------------------------------Sprite Routines----
+
+
+
+Clearsprites proc near
+
+ mov es,buffers
+ mov di,spritetable
+ mov al,255
+ mov cx,tablesize*16
+ rep stosb
+ ret
+
+ endp
+
+
+
+
+Makesprite proc near ;si holds x,y cx holds update
+ ;di,dx holds data offset,seg
+ mov es,buffers
+ mov bx,spritetable
+$17: cmp byte ptr [es:bx+15],255
+ jz $17a
+ add bx,tablesize
+ jmp $17
+
+$17a: mov [es:bx],cx
+ mov [es:bx+10],si
+ mov [es:bx+6],dx
+ mov [es:bx+8],di
+ mov [es:bx+2],0ffffh
+ mov byte ptr [es:bx+15],0
+ mov byte ptr [es:bx+18],0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Delsprite proc near
+
+ mov di,bx
+ mov cx,tablesize
+ mov al,255
+ rep stosb
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Spriteupdate proc near
+
+ mov es,buffers
+ mov bx,spritetable
+ mov al,ryanon
+ mov byte ptr [es:bx+31],al
+
+ mov es,buffers
+ mov bx,spritetable
+ mov cx,16
+$18: push cx bx
+ mov ax,[es:bx]
+ cmp ax,0ffffh
+ jz $18a
+ push es ds
+ mov cx,[es:bx+2]
+ mov [es:bx+24],cx
+ call ax
+ pop ds es
+$18a: pop bx cx
+ cmp nowinnewroom,1
+ jz $18b
+ add bx,tablesize
+ loop $18
+
+$18b: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Printsprites proc near
+
+ mov es,buffers
+ mov cx,0
+priorityloop: push cx
+ mov priority,cl
+ mov bx,spritetable
+ mov cx,16
+prtspriteloop: push cx bx
+ mov ax,[es:bx]
+ cmp ax,0ffffh
+ jz skipsprite
+ mov al,priority
+ cmp al,[es:bx+23]
+ jnz skipsprite
+ cmp byte ptr [es:bx+31],1
+ jz skipsprite
+ call printasprite
+skipsprite: pop bx cx
+ add bx,tablesize
+ loop prtspriteloop
+ pop cx
+ inc cx
+ cmp cx,7
+ jnz priorityloop
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Printasprite proc near
+
+ push es bx
+ mov si,bx
+ mov ds,[es:si+6]
+ mov al,[es:si+11]
+ mov ah,0
+ cmp al,220
+ jc notnegative1
+ mov ah,255
+notnegative1: mov bx,ax
+ add bx,mapady
+ mov al,[es:si+10]
+ mov ah,0
+ cmp al,220
+ jc notnegative2
+ mov ah,255
+notnegative2: mov di,ax
+ add di,mapadx
+ mov al,[es:si+15]
+ mov ah,0
+ cmp byte ptr [es:si+30],0
+ jz steadyframe
+ mov ah,8
+steadyframe: cmp priority,6
+ jnz notquickp
+notquickp: call showframe
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+;cmp priority,6
+; ;jz quicksprite ; WIll NEED TO DO THIS LATER!!!!!
+;Quicksprite: mov cl,al
+; mov ch,0
+; mov dx,[es:bx+6]
+; mov es,workspace
+; mov ds,dx
+; mov bx,ax
+; mov dx,vgawidth
+;
+;printquickloop: push di si
+;
+; push si
+; add si,cx
+; dec si
+; jmp startzero
+;zeroloop: dec si
+; dec cl
+;startzero: cmp [si],ch
+; jz zeroloop
+; pop si
+;
+;;printquickline: cmp [si],ch
+; jnz foundfirstpix
+; inc si
+; inc di
+; dec cl
+; jnz printquickline
+;
+;foundfirstpix: cmp cl,0
+; jz finquickspr
+; rep movsb
+;
+;finquickspr: pop si di
+; mov cl,bl
+; add si,cx
+; add di,dx
+; dec bh
+; jnz printquickloop
+;
+; pop bx ds es
+; ret
+
+
+
+
+
+
+
+;Calcframe proc near
+;
+; ret
+;
+; mov al,[es:bx+15]
+; mov ah,0
+; mov cx,6
+; mul cx
+; add ax,[es:bx+8]
+;
+; mov dx,[es:bx+6]
+; push bx
+; mov ds,dx
+; mov bx,ax
+; mov ax,[bx]
+; mov cx,[bx+2]
+; mov dx,[bx+4]
+; pop bx
+; mov [es:bx+2],ax
+; add cx,[es:bx+8]
+; add cx,2080
+; mov [es:bx+4],cx ;calculates frame data
+;
+; mov al,[es:bx+10] ;this bit calculates the actual
+; add al,dl ;x and y (including any offset)
+; mov [es:bx+12],al
+; mov al,[es:bx+11]
+; add al,dh
+; mov [es:bx+13],al
+; ret
+;
+; endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Checkone proc near ;cx=x,y to check
+
+ push cx
+ mov al,ch
+ mov ah,0
+ mov cl,4
+ shr ax,cl
+ mov dl,al
+ pop cx
+ mov al,cl
+ mov ah,0
+ mov cl,4
+ shr ax,cl
+ mov ah,dl ; al,ah holds x,y in blocks
+
+ push ax
+ mov ch,0
+ mov cl,al
+ push cx
+ mov al,ah
+ mov ah,0
+ mov cx,11
+ mul cx
+ pop cx
+ add ax,cx
+
+ mov cx,3
+ mul cx
+ mov si,ax
+
+ mov ds,buffers
+ add si,mapflags
+ lodsw
+ mov cx,ax
+ lodsb
+ pop dx
+ ret
+
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Findsource proc near
+
+ mov ax,currentframe
+ cmp ax,160
+ jnc over1000
+ mov ds,reel1
+ mov takeoff,0
+ ret
+over1000: cmp ax,320
+ jnc over1001
+ mov ds,reel2
+ mov takeoff,160
+ ret
+over1001: mov ds,reel3
+ mov takeoff,320
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+;---------------------------------------------------------Routines for Ryan----
+
+
+Initman proc near
+
+ ;mov linepointer,254
+ mov al,ryanx
+ mov ah,ryany
+ mov si,ax
+ mov cx,offset cs:mainman
+ mov dx,mainsprites
+ mov di,0
+ call makesprite
+ mov byte ptr [es:bx+23],4
+ mov byte ptr [es:bx+22],0
+ mov byte ptr [es:bx+29],0
+ ret
+
+ endp
+
+
+
+
+
+
+
+Mainman proc near
+
+ cmp resetmanxy,1
+ jnz notinnewroom
+ mov resetmanxy,0
+ mov al,ryanx
+ mov ah,ryany
+ mov [es:bx+10],ax
+ mov byte ptr [es:bx+29],0
+ jmp executewalk
+notinnewroom: dec byte ptr [es:bx+22]
+ cmp byte ptr [es:bx+22],-1
+ jz executewalk
+ ret
+
+
+executewalk: mov byte ptr [es:bx+22],0 ; speed
+ mov al,turntoface
+ cmp al,facing
+ jz facingok
+ call aboutturn
+ jmp notwalk
+
+facingok: cmp turndirection,0
+ jz alreadyturned
+ cmp linepointer,254
+ jnz alreadyturned
+ mov reasseschanges,1
+ mov al,facing
+ cmp al,leavedirection
+ jnz alreadyturned
+ call checkforexit
+alreadyturned: mov turndirection,0
+ cmp linepointer,254
+ jnz walkman
+ mov byte ptr [es:bx+29],0
+ jmp notwalk
+
+walkman: mov al,[es:bx+29]
+ inc al
+ cmp al,11
+ jnz notanimend1
+ mov al,1
+notanimend1: mov [es:bx+29],al
+
+ call walking
+ cmp linepointer,254
+ jz afterwalk
+
+ mov al,facing
+ and al,1
+ jz isdouble
+ mov al,[es:bx+29]
+ cmp al,2
+ jz afterwalk
+ cmp al,7
+ jz afterwalk
+isdouble: call walking
+afterwalk: cmp linepointer,254
+ jnz notwalk
+ mov al,turntoface
+ cmp al,facing
+ jnz notwalk
+ mov reasseschanges,1
+ mov al,facing
+ cmp al,leavedirection
+ jnz notwalk
+ call checkforexit
+
+notwalk: mov al,facing
+ mov ah,0
+ mov di,offset cs:facelist
+ add di,ax
+ mov al,[cs:di]
+ add al,[es:bx+29]
+ mov [es:bx+15],al
+ mov ax,[es:bx+10]
+ mov ryanx,al
+ mov ryany,ah
+ ret
+
+facelist: db 0,60,33,71,11,82,22,93
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Aboutturn proc near
+
+ cmp turndirection,1
+ jz incdir
+ cmp turndirection,-1
+ jz decdir
+ mov al,facing
+ sub al,turntoface
+ jnc higher
+ neg al
+ cmp al,4
+ jnc decdir
+ jmp incdir
+higher: cmp al,4
+ jnc incdir
+ jmp decdir
+
+incdir: mov turndirection,1
+ mov al,facing
+ inc al
+ and al,7
+ mov facing,al
+ mov byte ptr [es:bx+29],0
+ ret
+
+decdir: mov turndirection,-1
+ mov al,facing
+ dec al
+ and al,7
+ mov facing,al
+ mov byte ptr [es:bx+29],0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Walking proc near
+
+ cmp linedirection,0
+ jz normalwalk
+ mov al,linepointer
+ dec al
+ mov linepointer,al
+ cmp al,200
+ jnc endofline
+ jmp continuewalk
+
+normalwalk: mov al,linepointer
+ inc al
+ mov linepointer,al
+ cmp al,linelength
+ jnc endofline
+
+continuewalk: mov ah,0
+ add ax,ax
+ push es bx
+ mov dx,seg linedata
+ mov es,dx
+ mov bx,offset es:linedata
+ add bx,ax
+ mov ax,[es:bx]
+ pop bx es
+stillline: mov [es:bx+10],ax
+ ret
+
+endofline: mov linepointer,254
+ mov al,destination
+ mov manspath,al
+ cmp al,finaldest
+ jz finishedwalk
+ mov al,finaldest
+ mov destination,al
+ push es bx
+ call autosetwalk
+ pop bx es
+ ret
+
+finishedwalk: call facerightway
+ ret
+
+ endp
+
+
+
+
+
+
+
+Facerightway proc near
+
+ push es bx ;Face object when finished
+ call getroomspaths ;walking
+ mov al,manspath
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ add bx,ax
+ mov al,[es:bx+7]
+ mov turntoface,al
+ mov leavedirection,al
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+
+
+Checkforexit proc near
+
+ mov cl,ryanx ;look under feet to see if
+ add cl,12 ;any flags are there
+ mov ch,ryany
+ add ch,12
+ call checkone
+ mov lastflag,cl
+ mov lastflagex,ch
+ mov flagx,dl
+ mov flagy,dh
+ mov al,lastflag
+
+ test al,64
+ jz notnewdirect
+ mov al,lastflagex
+ mov autolocation,al
+ ret
+
+notnewdirect: test al,32
+ jz notleave
+ push es bx
+ cmp reallocation,2
+ jnz notlouis
+ mov bl,0
+ push bx
+ mov al,"W"
+ mov ah,"E"
+ mov cl,"T"
+ mov ch,"A"
+ call isryanholding
+ pop bx
+ jz noshoe1
+ inc bl
+noshoe1: push bx
+ mov al,"W"
+ mov ah,"E"
+ mov cl,"T"
+ mov ch,"B"
+ call isryanholding
+ pop bx
+ jz noshoe2
+ inc bl
+noshoe2: cmp bl,2
+ jz notlouis
+ mov al,42
+ cmp bl,0
+ jz notravmessage
+ inc al
+notravmessage: mov cx,80
+ mov dx,10
+ mov bl,68
+ mov bh,64
+ call setuptimeduse
+ mov al,facing
+ add al,4
+ and al,7
+ mov turntoface,al
+ pop bx es
+ ret
+
+notlouis: pop bx es
+ mov needtotravel,1
+ ret
+
+
+
+notleave: test al,4
+ jz notaleft
+ call adjustleft
+ ret
+
+notaleft: test al,2
+ jz notaright
+ call adjustright
+ ret
+
+notaright: test al,8
+ jz notadown
+ call adjustdown
+ ret
+
+notadown: test al,16
+ jz notanup
+ call adjustup
+ ret
+
+notanup: ret
+
+ endp
+
+
+
+
+
+Adjustdown proc near
+
+ push es bx
+ add mapy,10
+ mov al,lastflagex
+ mov cl,16
+ mul cl
+ mov [es:bx+11],al
+ mov nowinnewroom,1
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+Adjustup proc near
+
+ push es bx
+ sub mapy,10
+ mov al,lastflagex
+ mov cl,16
+ mul cl
+ mov [es:bx+11],al
+ mov nowinnewroom,1
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+Adjustleft proc near
+
+ push es bx
+ mov lastflag,0
+ sub mapx,11
+ mov al,lastflagex
+ mov cl,16
+ mul cl
+ mov [es:bx+10],al
+ mov nowinnewroom,1
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+
+Adjustright proc near
+
+ push es bx
+ add mapx,11
+ mov al,lastflagex
+ mov cl,16
+ mul cl
+ sub al,2
+ mov [es:bx+10],al
+ mov nowinnewroom,1
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+Reminders proc nar
+
+ cmp reallocation,24
+ jnz notinedenslift
+ cmp mapx,44
+ jnz notinedenslift
+ cmp progresspoints,0
+ jnz notfirst
+ mov al,"D"
+ mov ah,"K"
+ mov cl,"E"
+ mov ch,"Y"
+ call isryanholding
+ jz forgotone
+ mov al,"C"
+ mov ah,"S"
+ mov cl,"H"
+ mov ch,"R"
+ call findexobject
+ cmp al,numexobjects
+ jz forgotone
+ mov ax,[es:bx+2]
+ cmp al,4
+ jnz forgotone ;card is in inventory
+ cmp ah,255
+ jz havegotcard ;card must be in an ex
+ mov cl,"P" ;object
+ mov ch,"U"
+ mov dl,"R"
+ mov dh,"S"
+ xchg al,ah
+ call compare
+ jnz forgotone ;is it in wallet?
+havegotcard: inc progresspoints
+notfirst: ret
+
+forgotone: mov al,50 ;message number
+ mov bl,54 ;x pos of message
+ mov bh,70 ;and y pos
+ mov cx,48 ;time on screen
+ mov dx,8 ;pause before show
+ call setuptimeduse
+ ret
+notinedenslift: ret
+
+ endp
+
+
+
+
+
+;---------------------------------------------------------------------------
+;
+; Sprite update routines for rain effect
+;
+;---------------------------------------------------------------------------
+
+
+
+
+Initrain proc near
+
+ mov es,buffers
+ mov di,rainlist
+ mov bx,offset cs:rainlocations
+checkmorerain: mov al,[cs:bx]
+ cmp al,255
+ jz finishinitrain
+ cmp al,reallocation
+ jnz checkrain
+ mov al,[cs:bx+1]
+ cmp al,mapx
+ jnz checkrain
+ mov al,[cs:bx+2]
+ cmp al,mapy
+ jnz checkrain
+ mov al,[cs:bx+3]
+ mov rainspace,al
+ jmp dorain
+checkrain: add bx,4
+ jmp checkmorerain
+
+dorain: mov cx,4
+initraintop: call randomnumber
+ and al,31
+ add al,3
+ cmp al,rainspace
+ jnc initraintop
+ add cl,al
+ cmp cl,mapxsize
+ jnc initrainside
+ push cx
+ call splitintolines
+ pop cx
+ jmp initraintop
+
+initrainside: mov cl,mapxsize
+ dec cl
+initrainside2: call randomnumber
+ and al,31
+ add al,3
+ cmp al,rainspace
+ jnc initrainside2
+ add ch,al
+ cmp ch,mapysize
+ jnc finishinitrain
+ push cx
+ call splitintolines
+ pop cx
+ jmp initrainside2
+finishinitrain: mov al,255
+ stosb
+ ret
+
+rainlocations: db 1,44,10,16 ;location,map x,y,seed
+ db 4,11,30,14
+ db 4,22,30,14
+ db 3,33,10,14
+ db 10,33,30,14
+ db 10,22,30,24
+ db 9,22,10,14
+ db 2,33,0,14
+ db 2,22,0,14
+ db 6,11,30,14
+ db 7,11,20,18
+ db 7,0,20,18
+ db 7,0,30,18
+ db 55,44,0,14
+ db 5,22,30,14
+
+ db 8,0,10,18
+ db 8,11,10,18
+ db 8,22,10,18
+ db 8,33,10,18
+ db 8,33,20,18
+ db 8,33,30,18
+ db 8,33,40,18
+ db 8,22,40,18
+ db 8,11,40,18
+
+ db 21,44,20,18
+ db 255
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Splitintolines proc near
+
+
+lookforlinestart: call getblockofpixel
+ cmp al,0
+ jnz foundlinestart
+ dec cl
+ inc ch
+ cmp cl,0
+ jz endofthisline
+ cmp ch,mapysize
+ jnc endofthisline
+ jmp lookforlinestart
+
+foundlinestart: mov [es:di],cx
+ mov bh,1
+lookforlineend: call getblockofpixel
+ cmp al,0
+ jz foundlineend
+ dec cl
+ inc ch
+ cmp cl,0
+ jz foundlineend
+ cmp ch,mapysize
+ jnc foundlineend
+ inc bh
+ jmp lookforlineend
+
+foundlineend: push cx
+ mov [es:di+2],bh
+ call randomnumber
+ mov [es:di+3],al
+ call randomnumber
+ mov [es:di+4],al
+ call randomnumber
+ and al,3
+ add al,4
+ mov [es:di+5],al
+ add di,6
+ pop cx
+ cmp cl,0
+ jz endofthisline
+ cmp ch,mapysize
+ jnc endofthisline
+ jmp lookforlinestart
+
+endofthisline: ret
+
+ endp
+
+
+
+
+Getblockofpixel proc near
+
+ push cx es di
+ mov ax,mapxstart
+ add cl,al
+ mov ax,mapystart
+ add ch,al
+ call checkone
+ and cl,1
+ jnz failrain
+ pop di es cx
+ ret
+failrain: pop di es cx
+ mov al,0
+ ret
+
+ endp
+
+
+
+
+Showrain proc near
+
+ mov ds,mainsprites
+ mov si,6*58
+ mov ax,[si+2]
+ mov si,ax
+ add si,2080
+
+ mov bx,rainlist
+ mov es,buffers
+ cmp byte ptr [es:bx],255
+ jz nothunder
+
+morerain: mov es,buffers
+ cmp byte ptr [es:bx],255
+ jz finishrain
+
+ mov al,[es:bx+1]
+ mov ah,0
+ add ax,mapady
+ add ax,mapystart
+ mov cx,320
+ mul cx
+ mov cl,[es:bx]
+ mov ch,0
+ add ax,cx
+ add ax,mapadx
+ add ax,mapxstart
+ mov di,ax
+
+ mov cl,[es:bx+2]
+ mov ch,0
+ mov ax,[es:bx+3]
+ mov dl,[es:bx+5]
+ mov dh,0
+ sub ax,dx
+ and ax,511
+ mov [es:bx+3],ax
+ add bx,6
+
+ push si
+ add si,ax
+ mov es,workspace
+ mov ah,0
+ mov dx,320-2
+rainloop: lodsb
+ cmp al,ah
+ jz noplot
+ stosb
+ add di,dx
+ loop rainloop
+ pop si
+ jmp morerain
+noplot: add di,320-1
+ loop rainloop
+ pop si
+ jmp morerain
+
+finishrain: cmp ch1blockstocopy,0
+ jnz nothunder
+ cmp reallocation,2
+ jnz notlouisthund
+ cmp beenmugged,1
+ jnz nothunder
+notlouisthund: cmp reallocation,55
+ jz nothunder
+ call randomnum1
+ cmp al,1
+ jnc nothunder
+ mov al,7
+ cmp ch0playing,6
+ jz isthunder1
+ mov al,4
+isthunder1: call playchannel1
+nothunder: ret
+
+ endp
+
+
+
+
+
+
+
+;---------------------------------------------------------------------------
+;
+; Sprite update routines for background objects
+;
+;---------------------------------------------------------------------------
+
+
+
+
+
+
+Backobject proc near
+
+ mov ds,setdat
+ mov di,[es:bx+20]
+
+ mov al,[es:bx+18]
+ cmp al,0
+ jz $48z
+ dec al
+ mov [es:bx+18],al
+ jmp finishback
+
+$48z: mov al,[di+7]
+ mov [es:bx+18],al
+ mov al,[di+8]
+ cmp al,6
+ jnz notwidedoor
+ call widedoor
+ jmp finishback
+
+notwidedoor: cmp al,5
+ jnz notrandom
+ call random
+ jmp finishback
+
+notrandom: cmp al,4
+ jnz notlockdoor
+ call lockeddoorway
+ jmp finishback
+
+notlockdoor: cmp al,3
+ jnz notlift
+ call liftsprite
+ jmp finishback
+
+notlift: cmp al,2
+ jnz notdoor
+ call doorway
+ jmp finishback
+
+notdoor: cmp al,1
+ jnz steadyob
+ call constant
+ jmp finishback
+
+steadyob: call steady
+
+finishback: ;call calcframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Liftsprite proc near
+
+ mov al,liftflag
+ cmp al,0
+ jz liftclosed
+ cmp al,1
+ jz liftopen
+ cmp al,3
+ jz openlift
+
+ mov al,[es:bx+19]
+ cmp al,0
+ jz finishclose
+ dec al
+ cmp al,11
+ jnz pokelift
+ push ax
+ mov al,3
+ call liftnoise
+ pop ax
+ jmp pokelift
+finishclose: mov liftflag,0
+ ret
+
+openlift: mov al,[es:bx+19]
+ cmp al,12
+ jz endoflist
+ inc al
+ cmp al,1
+ jnz pokelift
+ push ax
+ mov al,2
+ call liftnoise
+ pop ax
+pokelift: mov [es:bx+19],al
+ mov ah,0
+ push di
+ add di,ax
+ mov al,[di+18]
+ pop di
+ mov [es:bx+15],al
+ mov [di+17],al
+ ret
+
+endoflist: mov liftflag,1
+ ret
+
+liftopen: mov al,liftpath
+ push es bx
+ call turnpathon
+ pop bx es
+ cmp counttoclose,0
+ jz nocountclose
+ dec counttoclose
+ cmp counttoclose,0
+ jnz nocountclose
+ mov liftflag,2
+nocountclose: mov al,12
+ jmp pokelift
+
+liftclosed: mov al,liftpath
+ push es bx
+ call turnpathoff
+ pop bx es
+ cmp counttoopen,0
+ jz nocountopen
+ dec counttoopen
+ cmp counttoopen,0
+ jnz nocountopen
+ mov liftflag,3
+nocountopen: mov al,0
+ jmp pokelift
+
+ endp
+
+
+Liftnoise proc near
+
+ cmp reallocation,5
+ jz hissnoise
+ cmp reallocation,21
+ jz hissnoise
+ call playchannel1
+ ret
+hissnoise: if demo
+ mov al,25
+ else
+ mov al,13
+ endif
+ call playchannel1
+ ret
+
+ endp
+
+
+
+
+Random proc near
+
+ call randomnum1
+ push di
+ and ax,7
+ add di,18
+ add di,ax
+ mov al,[di]
+ pop di
+ mov [es:bx+15],al
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Steady proc near
+
+ mov al,[di+18]
+ mov [di+17],al
+ mov [es:bx+15],al
+ ret
+
+ endp
+
+
+
+
+
+Constant proc near
+
+ inc byte ptr [es:bx+19]
+ mov cl,[es:bx+19]
+ mov ch,0
+ add di,cx
+ cmp byte ptr [di+18],255
+ jnz gotconst
+ sub di,cx
+ mov cx,0
+ mov [es:bx+19],cl
+gotconst: mov al,[di+18]
+ sub di,cx
+ mov [es:bx+15],al
+ mov [di+17],al
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Doorway proc near
+
+ mov doorcheck1,-24
+ mov doorcheck2,10
+ mov doorcheck3,-30
+ mov doorcheck4,10
+ call dodoor
+ ret
+
+ endp
+
+
+
+Widedoor proc near
+
+ mov doorcheck1,-24
+ mov doorcheck2,24
+ mov doorcheck3,-30
+ mov doorcheck4,24
+ call dodoor
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Dodoor proc near
+
+ mov al,ryanx
+ mov ah,ryany
+ mov cl,[es:bx+10]
+ mov ch,[es:bx+11]
+
+ cmp al,cl
+ jnc rtofdoor
+ sub al,cl
+ cmp al,doorcheck1
+ jnc upordown
+ jmp shutdoor
+rtofdoor: sub al,cl
+ cmp al,doorcheck2
+ jnc shutdoor
+
+upordown: cmp ah,ch
+ jnc botofdoor
+ sub ah,ch
+ cmp ah,doorcheck3
+ jc shutdoor
+ jmp opendoor
+botofdoor: sub ah,ch
+ cmp ah,doorcheck4
+ jnc shutdoor
+
+opendoor: mov cl,[es:bx+19]
+ cmp throughdoor,1
+ jnz notthrough
+ cmp cl,0
+ jnz notthrough
+ mov cl,6
+notthrough: inc cl
+ cmp cl,1
+ jnz notdoorsound2
+ mov al,0
+ cmp reallocation,5
+ jnz nothoteldoor2
+ if demo
+ mov al,25
+ else
+ mov al,13
+ endif
+nothoteldoor2: call playchannel1
+notdoorsound2: mov ch,0
+
+ push di
+ add di,cx
+ mov al,[di+18] ; must be a better way than this
+ cmp al,255
+ jnz atlast1
+ dec di
+ dec cl
+atlast1: mov [es:bx+19],cl
+ mov al,[di+18]
+ pop di
+ mov [es:bx+15],al
+ mov [di+17],al
+ mov throughdoor,1
+ ret
+
+
+shutdoor: mov cl,[es:bx+19]
+ cmp cl,5
+ jnz notdoorsound1
+ mov al,1
+ cmp reallocation,5
+ jnz nothoteldoor1
+ if demo
+ mov al,25
+ else
+ mov al,13
+ endif
+nothoteldoor1: call playchannel1
+notdoorsound1: cmp cl,0
+ jz atlast2
+ dec cl
+ mov [es:bx+19],cl
+atlast2: mov ch,0
+ push di
+ add di,cx
+ mov al,[di+18]
+ pop di
+ mov [es:bx+15],al
+ mov [di+17],al
+ cmp cl,5
+ jnz notnearly
+ mov throughdoor,0
+notnearly: ret
+
+ endp
+
+
+
+
+
+
+
+
+Lockeddoorway proc near
+
+ mov al,ryanx
+ mov ah,ryany
+ mov cl,[es:bx+10]
+ mov ch,[es:bx+11]
+
+ cmp al,cl
+ jnc rtofdoor2
+ sub al,cl
+ cmp al,-24
+ jnc upordown2
+ jmp shutdoor2
+rtofdoor2: sub al,cl
+ cmp al,10
+ jnc shutdoor2
+
+upordown2: cmp ah,ch
+ jnc botofdoor2
+ sub ah,ch
+ cmp ah,-30
+ jc shutdoor2
+ jmp opendoor2
+botofdoor2: sub ah,ch
+ cmp ah,12
+ jnc shutdoor2
+
+opendoor2: cmp throughdoor,1
+ jz mustbeopen
+ cmp lockstatus,1
+ jz shutdoor
+mustbeopen: mov cl,[es:bx+19]
+ cmp cl,1
+ jnz notdoorsound4
+ mov al,0
+ call playchannel1
+notdoorsound4: cmp cl,6 ; was 3
+ jnz noturnonyet
+ mov al,doorpath
+ push es bx
+ call turnpathon
+ pop bx es
+
+noturnonyet: mov cl,[es:bx+19]
+ cmp throughdoor,1
+ jnz notthrough2
+ cmp cl,0
+ jnz notthrough2
+ mov cl,6
+notthrough2: inc cl
+ mov ch,0
+
+ push di
+ add di,cx
+ mov al,[di+18]
+ cmp al,255
+ jnz atlast3
+ dec di
+ dec cl
+atlast3: mov [es:bx+19],cl
+ mov al,[di+18]
+ pop di
+ mov [es:bx+15],al
+ mov [di+17],al
+ cmp cl,5
+ jnz justshutting
+ mov throughdoor,1
+justshutting: ret
+
+
+
+shutdoor2: mov cl,[es:bx+19]
+ cmp cl,5
+ jnz notdoorsound3
+ mov al,1
+ call playchannel1
+notdoorsound3: cmp cl,0
+ jz atlast4
+ dec cl
+ mov [es:bx+19],cl
+atlast4: mov ch,0
+ mov throughdoor,0
+ push di
+ add di,cx
+ mov al,[di+18]
+ pop di
+ mov [es:bx+15],al
+ mov [di+17],al
+ cmp cl,0 ;1
+ jnz notlocky
+ mov al,doorpath
+ push es bx
+ call turnpathoff
+ pop bx es
+ mov lockstatus,1
+notlocky: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+;------------------------------------------------------------People handler----
+
+Updatepeople proc near
+
+ mov es,buffers
+ mov di,peoplelist
+ mov listpos,di
+ mov cx,12*5
+ mov al,255
+ rep stosb
+
+ inc maintimer
+ push cs
+ pop es
+ mov bx,offset cs:reelroutines
+ mov di,offset cs:reelcalls
+updateloop: mov al,[es:bx]
+ cmp al,255
+ jz endupdate
+ cmp al,reallocation
+ jnz notinthisroom
+ mov cx,[es:bx+1]
+ cmp cl,mapx
+ jnz notinthisroom
+ cmp ch,mapy
+ jnz notinthisroom
+ push di
+ mov ax,[cs:di]
+ call ax
+ pop di
+notinthisroom: add bx,8
+ add di,2
+ jmp updateloop
+endupdate: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Getreelframeax proc near
+
+ push ds
+ mov currentframe,ax
+ call findsource
+ push ds
+ pop es
+ pop ds
+ mov ax,currentframe
+ sub ax,takeoff
+ add ax,ax
+ mov cx,ax
+ add ax,ax
+ add ax,cx
+ mov bx,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Reelsonscreen proc near
+
+ call reconstruct
+ call updatepeople
+ call watchreel
+ call showrain
+ call usetimedtext
+ ret
+
+ endp
+
+
+
+
+
+
+Plotreel proc near
+
+ call getreelstart
+retryreel: push es si
+ mov ax,[es:si+2]
+ cmp al,220
+ jc normalreel
+ cmp al,255
+ jz normalreel
+ call dealwithspecial
+ inc reelpointer
+ pop si es
+ add si,40
+ jmp retryreel
+
+normalreel: mov cx,8
+plotloop: push cx es si
+ mov ax,[es:si]
+ cmp ax,0ffffh
+ jz notplot
+ call showreelframe
+notplot: pop si es cx
+ add si,5
+ loop plotloop
+ call soundonreels
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+Soundonreels proc near
+
+ mov bl,reallocation
+ add bl,bl
+ xor bh,bh
+ add bx,offset cs:roombyroom
+ mov si,[cs:bx]
+
+reelsoundloop: mov al,[cs:si]
+ cmp al,255
+ jz endreelsound
+ mov ax,[cs:si+1]
+ cmp ax,reelpointer
+ jnz skipreelsound
+
+ cmp ax,lastsoundreel
+ jz skipreelsound
+
+ mov lastsoundreel,ax
+ mov al,[cs:si]
+ cmp al,64
+ jc playchannel1
+ cmp al,128
+ jc channel0once
+ and al,63
+ mov ah,255
+ jmp playchannel0
+channel0once: and al,63
+ mov ah,0
+ jmp playchannel0
+skipreelsound: add si,3
+ jmp reelsoundloop
+endreelsound: mov ax,lastsoundreel
+ cmp ax,reelpointer
+ jz nochange2
+ mov lastsoundreel,-1
+nochange2: ret
+
+roombyroom dw r0,r1,r2,r0,r0,r0,r6,r0,r8,r9,r10,r11,r12,r13,r14,r0,r0,r0,r0,r0
+ dw r20,r0,r22,r23,r0,r25,r26,r27,r28,r29,r0,r0,r0,r0,r0
+ dw r0,r0,r0,r0,r0,r0,r0,r0,r0,r0,r45,r46,r47,r0,r0,r0,r0,r52,r53,r0,r55
+
+r0 db 255
+
+r1 db 15
+ dw 257
+ db 255
+
+r2 db 12
+ dw 5
+ db 13
+ dw 21
+ db 15 ;hitting floor?
+ dw 35
+ db 17
+ dw 50
+ db 18
+ dw 103
+ db 19
+ dw 108
+ db 255
+
+r6 db 18
+ dw 19
+ db 19
+ dw 23
+ db 255
+
+r8 db 12
+ dw 51
+ db 13
+ dw 53
+ db 14
+ dw 14
+ db 15
+ dw 20
+ db 0
+ dw 78
+ db 255
+
+r9 db 12
+ dw 119
+ db 12
+ dw 145
+ db 255
+
+r10 db 13
+ dw 16
+ db 255
+
+r11 db 13
+ dw 20
+ db 255
+
+r12 db 14
+ dw 16
+ db 255
+
+r13 db 15
+ dw 4
+ db 16
+ dw 8
+ db 17
+ dw 134
+ db 18
+ dw 153
+ db 255
+
+r14 db 13
+ dw 108
+ db 15
+ dw 326
+ db 15
+ dw 331
+ db 15
+ dw 336
+ db 15
+ dw 342
+ db 15
+ dw 348
+ db 15
+ dw 354
+ db 18
+ dw 159
+ db 18
+ dw 178
+ db 19+128
+ dw 217
+ db 20+64
+ dw 228
+ db 255
+
+r20 db 13
+ dw 20
+ db 13
+ dw 21
+ db 15
+ dw 34
+ db 13
+ dw 52
+ db 13
+ dw 55
+ db 25
+ dw 57
+ db 21
+ dw 73
+ db 255
+
+r22 db 13 ;room,sample
+ dw 196 ;reelpointer
+ db 13
+ dw 234
+ db 13
+ dw 156
+ db 14
+ dw 129
+ db 13
+ dw 124
+ db 15
+ dw 162
+ db 15
+ dw 200
+ db 15
+ dw 239
+ db 17
+ dw 99
+ db 12
+ dw 52
+ db 255
+
+r23 db 15
+ dw 56
+ db 16
+ dw 64
+ db 19
+ dw 22
+ db 20
+ dw 33
+ db 255
+
+r25 db 20
+ dw 11
+ db 20
+ dw 15
+ db 15
+ dw 28
+ db 13
+ dw 80
+ db 21
+ dw 82
+ db 19+128
+ dw 87
+ db 23+64
+ dw 128
+ db 255
+
+r26 db 12
+ dw 13
+ db 14
+ dw 39
+ db 12
+ dw 67
+ db 12
+ dw 75
+ db 12
+ dw 83
+ db 12
+ dw 91
+ db 15
+ dw 102 ; was 90, should be mine cart
+ db 255
+
+r27 db 22
+ dw 36
+ db 13
+ dw 125
+ db 18
+ dw 88
+ db 15
+ dw 107
+ db 14
+ dw 127
+ db 14
+ dw 154
+ db 19+128
+ dw 170
+ db 23+64
+ dw 232
+ db 255
+
+r28 db 21
+ dw 16
+ db 21
+ dw 72
+ db 21
+ dw 205
+ db 22
+ dw 63 ;65
+ db 23+128
+ dw 99
+ db 24+64
+ dw 158
+ db 255
+
+r29 db 13
+ dw 21
+ db 14
+ dw 24
+ db 19+128
+ dw 50
+ db 23+64
+ dw 75
+ if german
+ else
+ db 24
+ dw 128
+ endif
+ db 255
+
+r45 db 19+64
+ dw 46
+ db 16
+ dw 167
+ db 255
+
+r46 db 16
+ dw 19
+ db 14
+ dw 36
+ db 16
+ dw 50
+ db 14
+ dw 65
+ db 16
+ dw 81
+ db 14
+ dw 96
+ db 16
+ dw 114
+ db 14
+ dw 129
+ db 16
+ dw 147
+ db 14
+ dw 162
+ db 16
+ dw 177
+ db 14
+ dw 191
+ db 255
+
+r47 db 13
+ dw 48
+ db 14
+ dw 41
+ db 15
+ dw 78
+ db 16
+ dw 92
+ db 255
+
+r52 db 16
+ dw 115
+ db 255
+
+r53 db 21
+ dw 103
+ db 20
+ dw 199
+ db 255
+
+r55 db 17
+ dw 53
+ db 17
+ dw 54
+ db 17
+ dw 55
+ db 17
+ dw 56
+ db 17
+ dw 57
+ db 17
+ dw 58
+ db 17
+ dw 59
+ db 17
+ dw 61
+ db 17
+ dw 63
+ db 17
+ dw 64
+ db 17
+ dw 65
+ db 255
+
+ endp
+
+
+
+
+
+
+
+
+
+Reconstruct proc near
+
+ cmp havedoneobs,0
+ jz noneedtorecon
+ mov newobs,1
+ call drawfloor
+ call spriteupdate
+ call printsprites
+ cmp foreignrelease, 0
+ jz notfudge
+ cmp reallocation,20
+ jnz notfudge
+ call undertextline
+notfudge:
+ mov havedoneobs,0
+noneedtorecon: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Dealwithspecial proc near
+
+ sub al,220
+ cmp al,0
+ jnz notplset
+ mov al,ah
+ call placesetobject
+ mov havedoneobs,1
+ ret
+notplset: cmp al,1
+ jnz notremset
+ mov al,ah
+ call removesetobject
+ mov havedoneobs,1
+ ret
+notremset: cmp al,2
+ jnz notplfree
+ mov al,ah
+ call placefreeobject
+ mov havedoneobs,1
+ ret
+notplfree: cmp al,3
+ jnz notremfree
+ mov al,ah
+ call removefreeobject
+ mov havedoneobs,1
+ ret
+notremfree: cmp al,4
+ jnz notryanoff
+ call switchryanoff
+ ret
+notryanoff: cmp al,5
+ jnz notryanon
+ mov turntoface,ah
+ mov facing,ah
+ call switchryanon
+ ret
+notryanon: cmp al,6
+ jnz notchangeloc
+ mov newlocation,ah ; was new loc in watch
+ ;call switchryanon
+ ret
+notchangeloc: call movemap
+ ret
+
+ endp
+
+
+
+Movemap proc near
+
+ cmp ah,32
+ jnz notmapup2
+ sub mapy,20
+ mov nowinnewroom,1
+ ret
+
+notmapup2: cmp ah,16
+ jnz notmapupspec
+ sub mapy,10
+ mov nowinnewroom,1
+ ret
+
+notmapupspec: cmp ah,8
+ jnz notmapdownspec
+ add mapy,10
+ mov nowinnewroom,1
+ ret
+
+notmapdownspec: cmp ah,2
+ jnz notmaprightspec
+ add mapx,11
+ mov nowinnewroom,1
+ ret
+
+notmaprightspec: sub mapx,11
+ mov nowinnewroom,1
+ ret
+
+ endp
+
+
+
+
+Getreelstart proc near
+
+ mov ax,reelpointer
+ mov cx,40
+ mul cx
+ mov es,reels
+ mov si,ax
+ add si,reellist
+ ret
+
+ endp
+
+
+
+
+
+;------------------------------------------------------Printing a reel frame----
+
+
+
+Showreelframe proc near
+
+ mov al,[es:si+2]
+ mov ah,0
+ mov di,ax
+ add di,mapadx
+ mov al,[es:si+3]
+ mov bx,ax
+ add bx,mapady
+ mov ax,[es:si]
+ mov currentframe,ax
+ call findsource
+ mov ax,currentframe
+ sub ax,takeoff
+ mov ah,8
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+;-------------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+Deleverything proc near
+
+ mov al,mapysize
+ mov ah,0
+ add ax,mapoffsety
+ cmp ax,182
+ jnc bigroom
+ call maptopanel
+ ret
+bigroom: sub mapysize,8
+ call maptopanel
+ add mapysize,8
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Dumpeverything proc near
+
+ mov es,buffers
+ mov bx,printedlist
+dumpevery1: mov ax,[es:bx]
+ mov cx,[es:bx+2]
+ cmp ax,0ffffh
+ jz finishevery1
+ cmp ax,[es:bx+(40*5)]
+ jnz notskip1
+ cmp cx,[es:bx+(40*5)+2]
+ jz skip1
+
+notskip1: push bx es ds
+ mov bl,ah
+ mov bh,0
+ mov ah,0
+ mov di,ax
+ add di,mapadx
+ add bx,mapady
+ call multidump
+ pop ds es bx
+
+skip1: add bx,5
+ jmp dumpevery1
+
+finishevery1: mov bx,printedlist+(40*5)
+dumpevery2: mov ax,[es:bx]
+ mov cx,[es:bx+2]
+ cmp ax,0ffffh
+ jz finishevery2
+
+ push bx es ds
+ mov bl,ah
+ mov bh,0
+ mov ah,0
+ mov di,ax
+ add di,mapadx
+ add bx,mapady
+ call multidump
+ pop ds es bx
+ add bx,5
+ jmp dumpevery2
+
+finishevery2: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/talk.asm b/devtools/tasmrecover/dreamweb/talk.asm
new file mode 100644
index 0000000000..b6b96313f7
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/talk.asm
@@ -0,0 +1,583 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+Talk proc near
+
+ mov talkpos,0
+ mov inmaparea,0
+ mov al,command
+ mov character,al
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call undertextline
+ call convicons
+ call starttalk
+ mov commandtype,255
+ call readmouse
+ call showpointer
+ call worktoscreen
+waittalk: call delpointer
+ call readmouse
+ call animpointer
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ mov getback,0
+ mov bx,offset cs:talklist
+ call checkcoords
+ cmp quitrequested, 0
+ jnz finishtalk
+ cmp getback,0
+ jz waittalk
+finishtalk: mov bx,persondata
+ push cs
+ pop es
+ cmp talkpos,4
+ jc notnexttalk
+ mov al,[es:bx+7]
+ or al,128
+ mov [es:bx+7],al
+notnexttalk: call redrawmainscrn
+ call worktoscreenm
+ cmp speechloaded,1
+ jnz nospeech
+ call cancelch1
+ mov volumedirection,-1 ;fade (louder)
+ mov volumeto,0 ;up to 0 (max)
+nospeech: ret
+
+talklist: dw 273,320,157,198,getback1
+ dw 240,290,2,44,moretalk
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Convicons proc near
+
+ mov al,character
+ and al,127
+ call getpersframe
+ mov di,234
+ mov bx,2
+ mov currentframe,ax
+ call findsource
+ mov ax,currentframe
+ sub ax,takeoff
+ mov ah,0
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Getpersframe proc near
+
+ mov ah,0
+ add ax,ax
+ mov bx,ax
+ mov es,people
+ add bx,personframes
+ mov ax,[es:bx]
+ ret
+
+ endp
+
+
+
+
+
+Starttalk proc near
+
+ mov talkmode,0
+ mov al,character
+ and al,127
+ call getpersontext
+ mov charshift,91+91
+ mov di,66
+ mov bx,64
+ mov dl,241
+ mov al,0
+ mov ah,79
+ call printdirect
+ mov charshift,0
+ mov di,66
+ mov bx,80
+ mov dl,241
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ if cd
+ mov speechloaded,0
+ mov al,character
+ and al,127
+ mov ah,0
+ mov cx,64
+ mul cx
+ mov cl,"C"
+ mov dl,"R"
+ mov dh,reallocation
+ call loadspeech
+ cmp speechloaded,1
+ jnz nospeech1
+ mov volumedirection,1 ;quieter
+ mov volumeto,6 ;quite quiet!
+ mov al,50+12
+ call playchannel1
+ endif
+nospeech1: ret
+
+ endp
+
+
+
+
+
+Getpersontext proc near
+
+ mov ah,0
+ mov cx,64*2
+ mul cx
+ mov si,ax
+ mov es,people
+ add si,persontxtdat
+ mov cx,persontext
+ mov ax,[es:si]
+ add ax,cx
+ mov si,ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+Moretalk proc near
+
+ ;cmp ch1playing,255
+ ;jnz cantredes
+ cmp talkmode,0
+ jz canmore
+ call redes
+ ret
+
+canmore: cmp commandtype,215
+ jz alreadymore
+ mov commandtype,215
+ mov al,49
+ call commandonly
+alreadymore: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nomore
+ and ax,1
+ jnz domoretalk
+nomore: ret
+
+domoretalk: mov talkmode,2
+ mov talkpos,4
+ cmp character,100
+ jc notsecondpart
+ mov talkpos,48
+notsecondpart: call dosometalk
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Dosometalk proc near
+
+ if cd
+dospeech: mov al,talkpos
+ mov al,character
+ and al,127
+ mov ah,0
+ mov cx,64
+ mul cx
+ mov cx,ax
+ mov al,talkpos
+ mov ah,0
+ add ax,cx
+ add ax,ax
+ mov si,ax
+
+ mov es,people
+ add si,persontxtdat
+ mov cx,persontext
+
+ mov ax,[es:si]
+ add ax,cx
+ mov si,ax
+ cmp byte ptr [es:si],0
+ jz endheartalk
+
+ push es si
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call convicons
+ pop si es
+
+ mov di,164
+ mov bx,64
+ mov dl,144
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ mov al,character
+ and al,127
+ mov ah,0
+ mov cx,64
+ mul cx
+ mov cl,talkpos
+ mov ch,0
+ add ax,cx
+ mov cl,"C"
+ mov dl,"R"
+ mov dh,reallocation
+ call loadspeech
+ cmp speechloaded,0
+ jz noplay1
+ mov al,62
+ call playchannel1
+
+noplay1: mov pointermode,3
+ call worktoscreenm
+ mov cx,180
+ call hangonpq
+ jnc $1
+ ret
+
+$1:
+ inc talkpos
+
+ mov al,talkpos
+ mov al,character
+ and al,127
+ mov ah,0
+ mov cx,64
+ mul cx
+ mov cx,ax
+ mov al,talkpos
+ mov ah,0
+ add ax,cx
+ add ax,ax
+ mov si,ax
+
+ mov es,people
+ add si,persontxtdat
+ mov cx,persontext
+
+ mov ax,[es:si]
+ add ax,cx
+ mov si,ax
+ cmp byte ptr [es:si],0
+ jz endheartalk
+ cmp byte ptr [es:si],":"
+ jz skiptalk2
+ cmp byte ptr [es:si],32
+ jz skiptalk2
+
+ push es si
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call convicons
+ pop si es
+
+ mov di,48
+ mov bx,128
+ mov dl,144
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ mov al,character
+ and al,127
+ mov ah,0
+ mov cx,64
+ mul cx
+ mov cl,talkpos
+ mov ch,0
+ add ax,cx
+ mov cl,"C"
+ mov dl,"R"
+ mov dh,reallocation
+ call loadspeech
+ cmp speechloaded,0
+ jz noplay2
+ mov al,62
+ call playchannel1
+
+noplay2: mov pointermode,3
+ call worktoscreenm
+ mov cx,180
+ call hangonpq
+ jnc skiptalk2
+ ret
+
+skiptalk2: inc talkpos
+ jmp dospeech
+
+endheartalk: mov pointermode,0
+ ret
+
+ else
+
+watchtalk: mov al,talkpos
+ mov al,character
+ and al,127
+ mov ah,0
+ mov cx,64
+ mul cx
+ mov cx,ax
+ mov al,talkpos
+ mov ah,0
+ add ax,cx
+ add ax,ax
+ mov si,ax
+
+ mov es,people
+ add si,persontxtdat
+ mov cx,persontext
+
+ mov ax,[es:si]
+ add ax,cx
+ mov si,ax
+ cmp byte ptr [es:si],0
+ jz endwatchtalk
+
+ push es si
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call convicons
+ pop si es
+
+ mov di,164
+ mov bx,64
+ mov dl,144
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ mov pointermode,3
+ call worktoscreenm
+ mov cx,180
+ call hangonpq
+ jnc $1
+ ret
+$1:
+
+ inc talkpos
+
+ mov al,talkpos
+ mov al,character
+ and al,127
+ mov ah,0
+ mov cx,64
+ mul cx
+ mov cx,ax
+ mov al,talkpos
+ mov ah,0
+ add ax,cx
+ add ax,ax
+ mov si,ax
+
+ mov es,people
+ add si,persontxtdat
+ mov cx,persontext
+
+ mov ax,[es:si]
+ add ax,cx
+ mov si,ax
+ cmp byte ptr [es:si],0
+ jz endwatchtalk
+ cmp byte ptr [es:si],":"
+ jz skiptalk
+ cmp byte ptr [es:si],32
+ jz skiptalk
+
+ push es si
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call convicons
+ pop si es
+
+ mov di,48
+ mov bx,128
+ mov dl,144
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ mov pointermode,3
+ call worktoscreenm
+ mov cx,180
+ call hangonpq
+ jnc skiptalk
+ ret
+
+skiptalk: inc talkpos
+ jmp watchtalk
+
+endwatchtalk: mov pointermode,0
+ ret
+
+ endif
+
+ endp
+
+
+
+
+
+
+
+Hangonpq proc near
+
+ mov getback,0
+ mov bx,0
+hangloopq: push cx bx
+ call delpointer
+ call readmouse
+ call animpointer
+ call showpointer
+ call vsync
+ call dumppointer
+ call dumptextline
+ mov bx,offset cs:quitlist
+ call checkcoords
+ pop bx cx
+ cmp getback,1
+ jz quitconv
+ cmp quitrequested, 0
+ jnz quitconv
+ cmp speechloaded,1
+ jnz notspeaking
+ cmp ch1playing,255
+ jnz notspeaking
+ inc bx
+ cmp bx,40 ;pause after speech ends
+ jz finishconv
+notspeaking: cmp mousebutton,0
+ jz hangloopq
+ cmp oldbutton,0
+ jnz hangloopq
+finishconv: call delpointer
+ mov pointermode,0
+ clc
+ ret
+
+quitconv: call delpointer
+ mov pointermode,0
+ call cancelch1
+ stc
+ ret
+
+quitlist: dw 273,320,157,198,getback1
+ dw 0,320,0,200,blank
+ dw 0ffffh
+
+ endp
+
+
+
+
+
+
+
+
+
+Redes proc near
+
+ cmp ch1playing,255
+ jnz cantredes
+ cmp talkmode,2
+ jz canredes
+cantredes: call blank
+ ret
+
+canredes: cmp commandtype,217
+ jz alreadyreds
+ mov commandtype,217
+ mov al,50
+ call commandonly
+alreadyreds: mov ax,mousebutton
+ and ax,1
+ jnz doredes
+ ret
+
+doredes: call delpointer
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call convicons
+ call starttalk
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/titles.asm b/devtools/tasmrecover/dreamweb/titles.asm
new file mode 100644
index 0000000000..8f2b46e3f4
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/titles.asm
@@ -0,0 +1,585 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+
+Titles proc near
+
+ if demo
+ ret
+ else
+ call clearpalette
+ call biblequote
+ cmp quitrequested, 0
+ jnz titlesearly
+ call intro
+titlesearly:
+ ret
+ endif
+
+ endp
+
+
+
+
+Endgame proc near
+
+ mov dx,offset cs:endtextname
+ call loadtemptext
+ call monkspeaking
+ call gettingshot
+ call getridoftemptext
+ mov volumeto,7
+ mov volumedirection,1
+ mov cx,200
+ call hangon
+ ret
+
+ endp
+
+
+ if cd
+
+Monkspeaking proc near
+
+ mov roomssample,35
+ call loadroomssample
+ mov dx,offset cs:monkface
+ call loadintotemp
+ call clearwork ;createpanel2
+ call showmonk
+ call worktoscreen
+ mov volume,7
+ mov volumedirection,-1
+ mov volumeto,5
+ mov al,12
+ mov ah,255
+ call playchannel0
+ call fadescreenups
+ mov cx,300
+ call hangon
+
+ mov al,40
+loadspeech2: push ax
+ mov dl,"T"
+ mov dh,83
+ mov cl,"T"
+ mov ah,0
+ call loadspeech
+ mov al,50+12
+ call playchannel1
+notloadspeech2:
+ call vsync
+ cmp ch1playing,255
+ jnz notloadspeech2
+ pop ax
+ inc al
+ cmp al,48
+ jnz loadspeech2
+
+ mov volumedirection,1
+ mov volumeto,7
+ call fadescreendowns
+ mov cx,300
+ call hangon
+ call getridoftemp
+ ret
+
+ endp
+
+ else
+
+Monkspeaking proc near
+
+ mov roomssample,35
+ call loadroomssample
+ mov dx,offset cs:monkface
+ call loadintotemp
+ call clearwork ;createpanel2
+ call showmonk
+ call worktoscreen
+ mov volume,7
+ mov volumedirection,-1
+ mov volumeto,0
+ mov al,12
+ mov ah,255
+ call playchannel0
+ call fadescreenups
+ mov cx,300
+ call hangon
+
+ mov al,40
+nextmonkspeak: push ax
+ mov ah,0
+ mov si,ax
+ add si,si
+ mov es,textfile1
+ mov ax,[es:si]
+ add ax,textstart
+ mov si,ax
+nextbit: mov di,36
+ mov bx,140
+ mov dl,239
+ call printdirect
+ push ax si es
+ call worktoscreen
+ call clearwork
+ call showmonk
+ mov cx,240
+ call hangon
+ pop es si ax
+ cmp al,0
+ jnz nextbit
+ pop ax
+ inc al
+ cmp al,44
+ jnz nextmonkspeak
+
+ mov volumedirection,1
+ mov volumeto,7
+ call fadescreendowns
+ mov cx,300
+ call hangon
+ call getridoftemp
+ ret
+
+ endp
+
+ endif
+
+
+
+
+Showmonk proc near
+
+ mov al,0
+ mov ah,128
+ mov di,160
+ mov bx,72
+ mov ds,tempgraphics
+ call showframe
+ ret
+
+ endp
+
+
+Gettingshot proc near
+
+ mov newlocation,55
+ call clearpalette
+ call loadintroroom
+ call fadescreenups
+ mov volumeto,0
+ mov volumedirection,-1
+ call runendseq
+ call clearbeforeload
+ ret
+
+ endp
+
+
+
+
+
+
+Credits proc near
+
+ call clearpalette
+ call realcredits
+ ret
+
+ endp
+
+
+
+Biblequote proc near
+
+ call mode640x480
+ mov dx,offset cs:title0graphics
+ call showpcx
+ call fadescreenups
+ mov cx,80
+ call hangone
+ cmp lasthardkey,1
+ jz biblequotearly
+ mov cx,560
+ call hangone
+ cmp lasthardkey,1
+ jz biblequotearly
+ call fadescreendowns
+ mov cx,200 ;128
+ call hangone
+ cmp lasthardkey,1
+ jz biblequotearly
+ call cancelch0
+biblequotearly:
+ mov lasthardkey,0
+ ret
+
+ endp
+
+
+
+
+Hangone proc near
+
+hangonloope: push cx
+ call vsync
+ pop cx
+ cmp lasthardkey,1
+ jz hangonearly
+ loop hangonloope
+hangonearly:
+ ret
+
+ endp
+
+
+
+
+
+
+Intro proc near
+
+ mov dx,offset cs:introtextname
+ call loadtemptext
+
+ call loadpalfromiff
+ call setmode
+
+ mov newlocation,50
+ call clearpalette
+ call loadintroroom
+ mov volume,7
+ mov volumedirection,-1
+ if cd
+ mov volumeto,4
+ else
+ mov volumeto,0
+ endif
+ mov al,12 ;4
+ mov ah,255
+ call playchannel0
+ call fadescreenups
+ call runintroseq
+ cmp lasthardkey,1
+ jz introearly
+
+;waitsound: cmp ch1blockstoplay,0
+; jnz waitsound
+ call clearbeforeload
+
+ mov newlocation,52
+ call loadintroroom
+ call runintroseq
+ cmp lasthardkey,1
+ jz introearly
+ call clearbeforeload
+
+ mov newlocation,53
+ call loadintroroom
+ call runintroseq
+ cmp lasthardkey,1
+ jz introearly
+ call clearbeforeload
+
+ call allpalette
+ mov newlocation,54
+ call loadintroroom
+ ;mov al,12
+ ;mov ah,255
+ ;call playchannel0
+ call runintroseq
+ cmp lasthardkey,1
+ jz introearly
+
+ call getridoftemptext
+ call clearbeforeload
+introearly:
+ mov lasthardkey, 0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Runintroseq proc near
+
+ mov getback,0
+
+moreintroseq: call vsync
+ cmp lasthardkey,1
+ jz earlyendrun
+ call spriteupdate
+ call vsync
+ cmp lasthardkey,1
+ jz earlyendrun
+ call deleverything
+ call printsprites
+ call reelsonscreen
+ call afterintroroom
+ call usetimedtext
+ call vsync
+ cmp lasthardkey,1
+ jz earlyendrun
+ call dumpmap
+ call dumptimedtext
+ call vsync
+ cmp lasthardkey,1
+ jz earlyendrun
+ cmp getback,1
+ jnz moreintroseq
+ ret
+earlyendrun:
+ call getridoftemptext
+ call clearbeforeload
+ ret
+
+ endp
+
+
+
+
+
+Runendseq proc near
+
+ call atmospheres
+ mov getback,0
+moreendseq: call vsync
+ call spriteupdate
+ call vsync
+ call deleverything
+ call printsprites
+ call reelsonscreen
+ call afterintroroom
+ call usetimedtext
+ call vsync
+ call dumpmap
+ call dumptimedtext
+ call vsync
+ cmp getback,1
+ jnz moreendseq
+ ret
+
+ endp
+
+
+
+
+Loadintroroom proc near
+
+ mov introcount,0
+ mov location,255
+ call loadroom
+ mov mapoffsetx,72
+ mov mapoffsety,16
+ call clearsprites
+ mov throughdoor,0
+ mov currentkey,"0"
+ mov mainmode,0
+ call clearwork
+ mov newobs,1
+ call drawfloor
+ call reelsonscreen
+ call spriteupdate
+ call printsprites
+ call worktoscreen
+ ret
+
+ endp
+
+
+
+
+
+
+Mode640x480 proc near
+
+ mov al,12h+128
+ mov ah,0
+ int 10h
+ ;call clearpalette
+ ret
+
+ endp
+
+
+
+Set16colpalette proc near
+
+ mov cx,16
+ mov bl,0
+ mov bh,0
+ mov al,0
+ mov ah,10h
+set16palloop2: push ax bx cx
+ int 10h
+ pop cx bx ax
+ inc bl
+ inc bh
+ loop set16palloop2
+
+ mov bl,31h
+ mov al,1
+ mov ah,12h
+ int 10h
+ ret
+
+ endp
+
+
+
+
+
+RealCredits proc near
+
+ mov roomssample,33
+ call loadroomssample
+ mov volume,0
+
+ call mode640x480
+ mov cx,35
+ call hangon
+
+ mov dx,offset cs:title1graphics
+ call showpcx
+ mov al,12
+ mov ah,0
+ call playchannel0
+ mov cx,2
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call allpalette
+ mov cx,80
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call fadescreendowns
+ mov cx,256
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+
+ mov dx,offset cs:title2graphics
+ call showpcx
+ mov al,12
+ mov ah,0
+ call playchannel0
+ mov cx,2
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call allpalette
+ mov cx,80
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call fadescreendowns
+ mov cx,256
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+
+ if demo
+ else
+ mov dx,offset cs:title3graphics
+ call showpcx
+ mov al,12
+ mov ah,0
+ call playchannel0
+ mov cx,2
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call allpalette
+ mov cx,80
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call fadescreendowns
+ mov cx,256
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+
+ mov dx,offset cs:title4graphics
+ call showpcx
+ mov al,12
+ mov ah,0
+ call playchannel0
+ mov cx,2
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call allpalette
+ mov cx,80
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call fadescreendowns
+ mov cx,256
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+
+ mov dx,offset cs:title5graphics
+ call showpcx
+ mov al,12
+ mov ah,0
+ call playchannel0
+ mov cx,2
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call allpalette
+ mov cx,80
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call fadescreendowns
+ mov cx,256
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ endif
+
+ mov dx,offset cs:title6graphics
+ call showpcx
+ call fadescreenups
+ mov cx,60
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ mov al,13
+ mov ah,0
+ call playchannel0
+ mov cx,350
+ call hangone
+ cmp lasthardkey,1
+ jz realcreditsearly
+ call fadescreendowns
+ mov cx,256
+ call hangone
+realcreditsearly:
+ mov lasthardkey, 0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/use.asm b/devtools/tasmrecover/dreamweb/use.asm
new file mode 100644
index 0000000000..fbbd9c99db
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/use.asm
@@ -0,0 +1,3828 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+
+Useobject proc near
+
+ mov withobject,255
+
+ cmp commandtype,229
+ jz alreadyuse
+ mov commandtype,229
+
+ mov bl,command
+ mov bh,objecttype
+ mov al,51
+ call commandwithob
+alreadyuse: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz nouse
+ and ax,1
+ jnz douse
+nouse: ret
+
+douse: call useroutine
+ ret
+
+ endp
+
+
+
+
+
+
+
+Useroutine proc near
+
+ cmp reallocation,50
+ jc nodream7
+ cmp pointerpower,0
+ jnz powerok
+ ret
+powerok: mov pointerpower,0
+
+nodream7: call getanyad
+ mov dx,seg uselist
+ mov ds,dx
+ mov si,offset uselist
+checkuselist: push si
+ lodsb
+ sub al,"A"
+ cmp al,[es:bx+12]
+ jnz failed
+ lodsb
+ sub al,"A"
+ cmp al,[es:bx+13]
+ jnz failed
+ lodsb
+ sub al,"A"
+ cmp al,[es:bx+14]
+ jnz failed
+ lodsb
+ sub al,"A"
+ cmp al,[es:bx+15]
+ jnz failed
+ lodsw
+ pop si
+ call ax
+ ret
+failed: pop si
+ add si,6
+ cmp byte ptr [si],140
+ jnz checkuselist
+
+ call delpointer
+ call getobtextstart
+ call findnextcolon
+ cmp al,0
+ jz cantuse2
+ call findnextcolon
+ cmp al,0
+ jz cantuse2
+ mov al,[es:si]
+ cmp al,0
+ jz cantuse2
+ call usetext
+ mov cx,400
+ call hangonp
+ call putbackobstuff
+ ret
+cantuse2: call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call obicons
+ mov di,33
+ mov bx,100
+ mov al,63
+ mov dl,241
+ call printmessage
+ call worktoscreenm
+ mov cx,50
+ call hangonp
+ call putbackobstuff
+ mov commandtype,255
+ ret
+
+Uselist: db "NETW"
+ dw usemon
+ db "ELVA"
+ dw useelevator1
+ db "ELVB"
+ dw useelevator2
+ db "ELVC"
+ dw useelevator3
+ db "ELVE"
+ dw useelevator4
+ db "ELVF"
+ dw useelevator5
+ db "CGAT"
+ dw usechurchgate
+ db "REMO"
+ dw usestereo
+ db "BUTA"
+ dw usebuttona
+ db "CBOX"
+ dw usewinch
+ db "LITE"
+ dw uselighter
+ db "PLAT"
+ dw useplate
+ db "LIFT"
+ dw usecontrol
+ db "WIRE"
+ dw usewire
+ db "HNDL"
+ dw usehandle
+ db "HACH"
+ dw usehatch
+ db "DOOR"
+ dw useelvdoor
+ db "CSHR"
+ dw usecashcard
+ db "GUNA"
+ dw usegun
+ db "CRAA"
+ dw usecardreader1
+ db "CRBB"
+ dw usecardreader2
+ db "CRCC"
+ dw usecardreader3
+ db "SEAT"
+ dw sitdowninbar
+ db "MENU"
+ dw usemenu
+ db "COOK"
+ dw usecooker
+ db "ELCA"
+ dw callhotellift
+ db "EDCA"
+ dw calledenslift
+ db "DDCA"
+ dw calledensdlift
+ db "ALTR"
+ dw usealtar
+ db "LOKA"
+ dw openhoteldoor
+ db "LOKB"
+ dw openhoteldoor2
+ db "ENTA"
+ dw openlouis
+ db "ENTB"
+ dw openryan
+ db "ENTE"
+ dw openpoolboss
+ db "ENTC"
+ dw openyourneighbour
+ db "ENTD"
+ dw openeden
+ db "ENTH"
+ dw opensarters
+ db "WWAT"
+ dw wearwatch
+ db "POOL"
+ dw usepoolreader
+ db "WSHD"
+ dw wearshades
+ db "GRAF"
+ dw grafittidoor
+ db "TRAP"
+ dw trapdoor
+ db "CDPE"
+ dw edenscdplayer
+
+ db "DLOK"
+ dw opentvdoor
+
+ db "HOLE"
+ dw usehole
+
+ db "DRYR"
+ dw usedryer
+
+ db "HOLY"
+ dw usechurchhole
+
+ db "WALL"
+ dw usewall
+ db "BOOK"
+ dw usediary
+
+ db "AXED"
+ dw useaxe
+ db "SHLD"
+ dw useshield
+
+ db "BCNY"
+ dw userailing
+ db "LIDC"
+ dw usecoveredbox
+ db "LIDU"
+ dw useclearbox
+ db "LIDO"
+ dw useopenbox
+ db "PIPE"
+ dw usepipe
+
+ db "BALC"
+ dw usebalcony
+ db "WIND"
+ dw usewindow
+ db "PAPR"
+ dw viewfolder
+
+ db "UWTA"
+ dw usetrainer
+ db "UWTB"
+ dw usetrainer
+
+ db "STAT"
+ dw entersymbol
+ db "TLID"
+ dw opentomb
+ db "SLAB"
+ dw useslab
+ db "CART"
+ dw usecart
+ db "FCAR"
+ dw usefullcart
+
+
+ db "SLBA"
+ dw slabdoora
+ db "SLBB"
+ dw slabdoorb
+ db "SLBC"
+ dw slabdoorc
+ db "SLBD"
+ dw slabdoord
+ db "SLBE"
+ dw slabdoore
+ db "SLBF"
+ dw slabdoorf
+ db "PLIN"
+ dw useplinth
+
+ db "LADD"
+ dw useladder
+ db "LADB"
+ dw useladderb
+
+ db "GUMA"
+ dw chewy
+
+ db "SQEE"
+ dw wheelsound
+ db "TAPP"
+ dw runtap
+ db "GUIT"
+ dw playguitar
+ db "CONT"
+ dw hotelcontrol
+
+ db "BELL"
+ dw hotelbell
+
+ db 140,140,140,140
+
+ endp
+
+
+
+
+
+
+;-----------------------------------------------------------Puzzle routines----
+
+
+Wheelsound proc near
+
+ mov al,17
+ call playchannel1
+ call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+Runtap proc near
+
+ cmp withobject,255
+ jnz tapwith
+ call withwhat
+ ret
+tapwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"E"
+ call compare
+ jz fillcupfromtap
+ mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"F"
+ call compare
+ jz cupfromtapfull
+ mov cx,300
+ mov al,56
+ call showpuztext
+ call putbackobstuff
+ ret
+
+fillcupfromtap: mov al,withobject
+ call getexad
+ mov byte ptr [es:bx+15],"F"-"A"
+ mov al,8
+ call playchannel1
+ mov cx,300
+ mov al,57
+ call showpuztext
+ call putbackobstuff
+ ret
+
+cupfromtapfull: mov cx,300
+ mov al,58
+ call showpuztext
+ call putbackobstuff
+ ret
+
+
+ endp
+
+
+
+Playguitar proc near
+
+ mov al,14
+ call playchannel1
+ call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+Hotelcontrol proc near
+
+ cmp reallocation,21
+ jnz notrightcont
+ cmp mapx,33
+ jnz notrightcont
+ call showfirstuse
+ call putbackobstuff
+ ret
+notrightcont: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+Hotelbell proc near
+
+ if demo
+ mov al,24
+ else
+ mov al,12
+ endif
+ call playchannel1
+ call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+Opentomb proc near
+
+ inc progresspoints
+ call showfirstuse
+ mov watchingtime,35*2
+ mov reeltowatch,1
+ mov endwatchreel,33
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+Usetrainer proc near
+
+ call getanyad
+ cmp byte ptr [es:bx+2],4
+ jnz notheldtrainer
+ inc progresspoints
+ call makeworn
+ call showseconduse
+ call putbackobstuff
+ ret
+notheldtrainer: call nothelderror
+ ret
+
+ endp
+
+
+
+Nothelderror proc near
+
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call obicons
+ mov di,64
+ mov bx,100
+ mov al,63
+ mov ah,1
+ mov dl,201
+ call printmessage2
+ call worktoscreenm
+ mov cx,50
+ call hangonp
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+Usepipe proc near
+
+ cmp withobject,255
+ jnz pipewith
+ call withwhat
+ ret
+pipewith: mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"E"
+ call compare
+ jz fillcup
+ mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"F"
+ call compare
+ jz alreadyfull
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+fillcup: mov cx,300
+ mov al,36
+ call showpuztext
+ call putbackobstuff
+ mov al,withobject
+ call getexad
+ mov byte ptr [es:bx+15],"F"-"A"
+ ret
+
+alreadyfull: mov cx,300
+ mov al,35
+ call showpuztext
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+Usefullcart proc near
+
+ inc progresspoints
+ mov al,2
+ mov ah,roomnum
+ add ah,6
+ call turnanypathon
+ mov manspath,4
+ mov facing,4
+ mov turntoface,4
+ mov finaldest,4
+ call findxyfrompath
+ mov resetmanxy,1
+ call showfirstuse
+ mov watchingtime,72*2
+ mov reeltowatch,58
+ mov endwatchreel,142
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+Useplinth proc near
+
+ cmp withobject,255
+ jnz plinthwith
+ call withwhat
+ ret
+
+plinthwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"D"
+ mov ch,"K"
+ mov dl,"E"
+ mov dh,"Y"
+ call compare
+ jz isrightkey
+ call showfirstuse
+ call putbackobstuff
+ ret
+
+isrightkey: inc progresspoints
+ call showseconduse
+ mov watchingtime,220
+ mov reeltowatch,0
+ mov endwatchreel,104
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ mov al,roomafterdream
+ mov newlocation,al
+ ret
+
+ endp
+
+
+
+Chewy proc near
+
+ call showfirstuse
+ call getanyad
+ mov byte ptr [es:bx+2],255
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Useladder proc near
+
+ call showfirstuse
+ sub mapx,11
+ call findroominloc
+ mov facing,6
+ mov turntoface,6
+ mov manspath,0
+ mov destination,0
+ mov finaldest,0
+ call findxyfrompath
+ mov resetmanxy,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Useladderb proc near
+
+ call showfirstuse
+ add mapx,11
+ call findroominloc
+ mov facing,2
+ mov turntoface,2
+ mov manspath,1
+ mov destination,1
+ mov finaldest,1
+ call findxyfrompath
+ mov resetmanxy,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Slabdoora proc near
+
+ call showfirstuse
+ mov getback,1
+ mov watchspeed,1
+ mov speedcount,1
+ mov reeltowatch,13
+ cmp dreamnumber,3
+ jnz slabawrong
+ inc progresspoints
+ mov watchingtime,60
+ mov endwatchreel,42
+ mov newlocation,47
+ ret
+slabawrong: mov watchingtime,40
+ mov endwatchreel,34
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+
+ endp
+
+
+
+
+Slabdoorb proc near
+
+ cmp dreamnumber,1
+ jnz slabbwrong
+ mov al,"S"
+ mov ah,"H"
+ mov cl,"L"
+ mov ch,"D"
+ call isryanholding
+ jnz gotcrystal
+ mov al,44
+ mov cx,200
+ call showpuztext
+ call putbackobstuff
+ ret
+gotcrystal: call showfirstuse
+ inc progresspoints
+ mov getback,1
+ mov watchspeed,1
+ mov speedcount,1
+ mov reeltowatch,44
+ mov watchingtime,60
+ mov endwatchreel,71
+ mov newlocation,47
+ ret
+slabbwrong: call showfirstuse
+ mov getback,1
+ mov watchspeed,1
+ mov speedcount,1
+ mov reeltowatch,44
+ mov watchingtime,40
+ mov endwatchreel,63
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+
+ endp
+
+
+
+Slabdoord proc near
+
+ call showfirstuse
+ mov getback,1
+ mov watchspeed,1
+ mov speedcount,1
+ mov reeltowatch,75
+ cmp dreamnumber,0
+ jnz slabcwrong
+ inc progresspoints
+ mov watchingtime,60
+ mov endwatchreel,102
+ mov newlocation,47
+ ret
+slabcwrong: mov watchingtime,40
+ mov endwatchreel,94
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+
+ endp
+
+
+
+Slabdoorc proc near
+
+ call showfirstuse
+ mov getback,1
+ mov watchspeed,1
+ mov speedcount,1
+ mov reeltowatch,108
+ cmp dreamnumber,4
+ jnz slabdwrong
+ inc progresspoints
+ mov watchingtime,60
+ mov endwatchreel,135
+ mov newlocation,47
+ ret
+slabdwrong: mov watchingtime,40
+ mov endwatchreel,127
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+
+ endp
+
+
+
+Slabdoore proc near
+
+ call showfirstuse
+ mov getback,1
+ mov watchspeed,1
+ mov speedcount,1
+ mov reeltowatch,141
+ cmp dreamnumber,5
+ jnz slabewrong
+ inc progresspoints
+ mov watchingtime,60
+ mov endwatchreel,168
+ mov newlocation,47
+ ret
+slabewrong: mov watchingtime,40
+ mov endwatchreel,160
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+
+ endp
+
+
+
+Slabdoorf proc near
+
+ call showfirstuse
+ mov getback,1
+ mov watchspeed,1
+ mov speedcount,1
+ mov reeltowatch,171
+ cmp dreamnumber,2
+ jnz slabfwrong
+ inc progresspoints
+ mov watchingtime,60
+ mov endwatchreel,197
+ mov newlocation,47
+ ret
+slabfwrong: mov watchingtime,40
+ mov endwatchreel,189
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+
+ endp
+
+
+
+
+
+
+Useslab proc near
+
+ cmp withobject,255
+ jnz slabwith
+ call withwhat
+ ret
+slabwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"J"
+ mov ch,"E"
+ mov dl,"W"
+ mov dh,"L"
+ call compare
+ jz nextslab
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+nextslab: mov al,withobject
+ call getexad
+ mov byte ptr [es:bx+2],0
+ mov al,command
+ push ax
+ call removesetobject
+ pop ax
+ inc al
+ push ax
+ call placesetobject
+ pop ax
+ cmp al,54
+ jnz notlastslab
+ mov al,0
+ call turnpathon
+ mov watchingtime,22
+ mov reeltowatch,35
+ mov endwatchreel,48
+ mov watchspeed,1
+ mov speedcount,1
+notlastslab: inc progresspoints
+ call showfirstuse
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Usecart proc near
+
+ cmp withobject,255
+ jnz cartwith
+ call withwhat
+ ret
+cartwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"R"
+ mov ch,"O"
+ mov dl,"C"
+ mov dh,"K"
+ call compare
+ jz nextcart
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+nextcart: mov al,withobject
+ call getexad
+ mov byte ptr [es:bx+2],0
+ mov al,command
+ push ax
+ call removesetobject
+ pop ax
+ inc al
+ call placesetobject
+ inc progresspoints
+ mov al,17
+ call playchannel1
+ call showfirstuse
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Useclearbox proc near
+
+ cmp withobject,255
+ jnz clearboxwith
+ call withwhat
+ ret
+clearboxwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"R"
+ mov ch,"A"
+ mov dl,"I"
+ mov dh,"L"
+ call compare
+ jz openbox
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+openbox: inc progresspoints
+ call showfirstuse
+ mov watchingtime,80
+ mov reeltowatch,67
+ mov endwatchreel,105
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Usecoveredbox proc near
+
+ inc progresspoints
+ call showfirstuse
+ mov watchingtime,50
+ mov reeltowatch,41
+ mov endwatchreel,66
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+Userailing proc near
+
+ call showfirstuse
+ mov watchingtime,80
+ mov reeltowatch,0
+ mov endwatchreel,30
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ mov mandead,4
+ ret
+
+ endp
+
+
+
+
+
+Useopenbox proc near
+
+ cmp withobject,255
+ jnz openboxwith
+ call withwhat
+ ret
+openboxwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"F"
+ call compare
+ jz destoryopenbox
+ mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"P"
+ mov dh,"E"
+ call compare
+ jz openboxwrong
+ call showfirstuse
+ ret
+
+destoryopenbox: inc progresspoints
+ mov cx,300
+ mov al,37
+ call showpuztext
+ mov al,withobject
+ call getexad
+ mov byte ptr [es:bx+15],"E"-"A"
+ mov watchingtime,140
+ mov reeltowatch,105
+ mov endwatchreel,181
+ mov watchspeed,1
+ mov speedcount,1
+ mov al,4
+ call turnpathon
+ mov getback,1
+ ret
+
+openboxwrong: mov cx,300
+ mov al,38
+ call showpuztext
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Wearwatch proc near
+
+ cmp watchon,1
+ jz wearingwatch
+ call showfirstuse
+ mov watchon,1
+ mov getback,1
+ call getanyad
+ call makeworn
+ ret
+wearingwatch: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+Wearshades proc near
+
+ cmp shadeson,1
+ jz wearingshades
+ mov shadeson,1
+ call showfirstuse
+ mov getback,1
+ call getanyad
+ call makeworn
+ ret
+wearingshades: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+Sitdowninbar proc near
+
+ cmp watchmode,-1
+ jnz satdown
+ call showfirstuse
+ mov watchingtime,50
+ mov reeltowatch,55
+ mov endwatchreel,71
+ mov reeltohold,73
+ mov endofholdreel,83
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+satdown: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+Usechurchhole proc near
+
+ call showfirstuse
+ mov getback,1
+ mov watchingtime,28
+ mov reeltowatch,13
+ mov endwatchreel,26
+ mov watchspeed,1
+ mov speedcount,1
+ ret
+
+ endp
+
+
+
+Usehole proc near
+
+ cmp withobject,255
+ jnz holewith
+ call withwhat
+ ret
+holewith: mov al,withobject
+ mov ah,withtype
+ mov cl,"H"
+ mov ch,"N"
+ mov dl,"D"
+ mov dh,"A"
+ call compare
+ jz righthand
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+righthand: call showfirstuse
+ mov al,86
+ call removesetobject
+ mov al,withobject
+ call getexad
+ mov byte ptr [es:bx+2],255
+ mov canmovealtar,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+Usealtar proc near
+
+ mov al,"C"
+ mov ah,"N"
+ mov cl,"D"
+ mov ch,"A"
+ call findexobject
+ cmp al,numexobjects
+ jz thingsonaltar
+ mov al,"C"
+ mov ah,"N"
+ mov cl,"D"
+ mov ch,"B"
+ call findexobject
+ cmp al,numexobjects
+ jz thingsonaltar
+ cmp canmovealtar,1
+ jz movealtar
+ mov cx,300
+ mov al,23
+ call showpuztext
+ mov getback,1
+ ret
+
+movealtar: inc progresspoints
+ call showseconduse
+ mov watchingtime,160
+ mov reeltowatch,81
+ mov endwatchreel,174
+ mov watchspeed,1
+ mov speedcount,1
+
+ mov al,47 ;message number
+ mov bl,52 ;x pos of message
+ mov bh,76 ;and y pos
+ mov cx,32 ;time on screen
+ mov dx,98 ;pause before show
+ call setuptimeduse
+ mov getback,1
+ ret
+
+thingsonaltar: call showfirstuse
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Opentvdoor proc near
+
+ cmp withobject,255
+ jnz tvdoorwith
+ call withwhat
+ ret
+tvdoorwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"U"
+ mov ch,"L"
+ mov dl,"O"
+ mov dh,"K"
+ call compare
+ jz keyontv
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+keyontv: call showfirstuse
+ mov lockstatus,0
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+Usedryer proc near
+
+ mov al,12
+ call playchannel1
+ call showfirstuse
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Openlouis proc near
+
+ mov al,5
+ mov ah,2
+ mov cl,3
+ mov ch,8
+ call entercode
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+Nextcolon proc near
+
+lookcolon: mov al,[es:si]
+ inc si
+ cmp al,":"
+ jnz lookcolon
+ ret
+
+ endp
+
+
+
+
+Openyourneighbour proc near
+
+ mov al,255
+ mov ah,255
+ mov cl,255
+ mov ch,255
+ call entercode
+ mov getback,1
+ ret
+
+ endp
+
+
+
+Usewindow proc near
+
+ cmp manspath,6
+ jnz notonbalc
+ inc progresspoints
+ call showfirstuse
+ mov newlocation,29
+ mov getback,1
+ ret
+notonbalc: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+Usebalcony proc near
+
+ call showfirstuse
+ mov al,6
+ call turnpathon
+ mov al,0
+ call turnpathoff
+ mov al,1
+ call turnpathoff
+ mov al,2
+ call turnpathoff
+ mov al,3
+ call turnpathoff
+ mov al,4
+ call turnpathoff
+ mov al,5
+ call turnpathoff
+ inc progresspoints
+ mov manspath,6
+ mov destination,6
+ mov finaldest,6
+ call findxyfrompath
+ call switchryanoff
+ mov resetmanxy,1
+
+ mov watchingtime,30*2
+ mov reeltowatch,183
+ mov endwatchreel,212
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+Openryan proc near
+
+ mov al,5
+ mov ah,1
+ mov cl,0
+ mov ch,6
+ call entercode
+ mov getback,1
+ ret
+
+ endp
+
+
+
+Openpoolboss proc near
+
+ mov al,5
+ mov ah,2
+ mov cl,2
+ mov ch,2
+ call entercode
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+Openeden proc near
+
+ mov al,2
+ mov ah,8
+ mov cl,6
+ mov ch,5
+ call entercode
+ mov getback,1
+ ret
+
+ endp
+
+
+Opensarters proc near
+
+ mov al,7
+ mov ah,8
+ mov cl,3
+ mov ch,3
+ call entercode
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+Isitright proc near
+
+ mov bx,seg presslist
+ mov es,bx
+ mov bx,offset es:presslist
+ cmp [es:bx+0],al
+ jnz notright
+ cmp [es:bx+1],ah
+ jnz notright
+ cmp [es:bx+2],cl
+ jnz notright
+ cmp [es:bx+3],ch
+notright: ret
+
+ endp
+
+
+
+
+Drawitall proc near
+
+ call createpanel
+ call drawfloor
+ ;call dumpallmap
+ call printsprites
+ call showicon
+ ret
+
+ endp
+
+
+
+
+Openhoteldoor proc near
+
+ cmp withobject,255
+ jnz hoteldoorwith
+ call withwhat
+ ret
+hoteldoorwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"K"
+ mov ch,"E"
+ mov dl,"Y"
+ mov dh,"A"
+ call compare
+ jz keyonhotel1
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+keyonhotel1: if demo
+ mov al,27
+ else
+ mov al,16
+ endif
+ call playchannel1
+ call showfirstuse
+ ;mov destination,1
+ ;mov finaldest,1
+ ;call autosetwalk
+ mov lockstatus,0
+ mov getback,1
+ ret
+
+ endp
+
+
+
+Openhoteldoor2 proc near
+
+ cmp withobject,255
+ jnz hoteldoorwith2
+ call withwhat
+ ret
+hoteldoorwith2: mov al,withobject
+ mov ah,withtype
+ mov cl,"K"
+ mov ch,"E"
+ mov dl,"Y"
+ mov dh,"A"
+ call compare
+ jz keyonhotel2
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+keyonhotel2: if demo
+ mov al,27
+ else
+ mov al,16
+ endif
+ call playchannel1
+ call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+Grafittidoor proc near
+
+ cmp withobject,255
+ jnz grafwith
+ call withwhat
+ ret
+grafwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"A"
+ mov ch,"P"
+ mov dl,"E"
+ mov dh,"N"
+ call compare
+ jz dograf
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+dograf: call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+Trapdoor proc near
+
+ inc progresspoints
+ call showfirstuse
+ call switchryanoff
+ mov watchingtime,20*2
+ mov reeltowatch,181
+ mov endwatchreel,197
+ mov newlocation,26
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+Callhotellift proc near
+
+ if demo
+ mov al,24
+ else
+ mov al,12
+ endif
+ call playchannel1
+ call showfirstuse
+ mov counttoopen,8
+ mov getback,1
+ mov destination,5
+ mov finaldest,5
+ call autosetwalk
+ mov al,4
+ call turnpathon
+ ret
+
+ endp
+
+
+
+
+Calledenslift proc near
+
+ call showfirstuse
+ mov counttoopen,8
+ mov getback,1
+ mov al,2
+ call turnpathon
+ ret
+
+ endp
+
+
+
+Calledensdlift proc near
+
+ cmp liftflag,1
+ jz edensdhere
+ call showfirstuse
+ mov counttoopen,8
+ mov getback,1
+ mov al,2
+ call turnpathon
+ ret
+edensdhere: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+Usepoolreader proc near
+
+ cmp withobject,255
+ jnz poolwith
+ call withwhat
+ ret
+poolwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"M"
+ mov ch,"E"
+ mov dl,"M"
+ mov dh,"B"
+ call compare
+ jz openpool
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+openpool: cmp talkedtoattendant,1
+ jz canopenpool
+ call showseconduse
+ call putbackobstuff
+ ret
+
+canopenpool: mov al,17
+ call playchannel1
+ call showfirstuse
+ mov counttoopen,6
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+Uselighter proc near
+
+ cmp withobject,255
+ jnz gotlighterwith
+ call withwhat
+ ret
+gotlighterwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"S"
+ mov ch,"M"
+ mov dl,"K"
+ mov dh,"E"
+ call compare
+ jz cigarette
+ call showfirstuse
+ call putbackobstuff
+ ret
+cigarette: mov cx,300
+ mov al,9
+ call showpuztext
+ mov al,withobject
+ call getexad
+ mov byte ptr [es:bx+2],255
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+Showseconduse proc near
+
+ call getobtextstart
+ call nextcolon
+ call nextcolon
+ call nextcolon
+ call usetext
+ mov cx,400
+ call hangonp
+ ret
+
+ endp
+
+
+
+
+
+
+Usecardreader1 proc near
+
+ cmp withobject,255
+ jnz gotreader1with
+ call withwhat
+ ret
+gotreader1with: mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"S"
+ mov dl,"H"
+ mov dh,"R"
+ call compare
+ jz correctcard
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+correctcard: cmp talkedtosparky,0
+ jz notyet
+ cmp card1money,0
+ jz getscash
+ mov cx,300
+ mov al,17
+ call showpuztext
+ call putbackobstuff
+ ret
+getscash: mov al,16
+ call playchannel1
+ mov cx,300
+ mov al,18
+ call showpuztext
+ inc progresspoints
+ mov card1money,12432
+ mov getback,1
+ ret
+notyet: call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+Usecardreader2 proc near
+
+ cmp withobject,255
+ jnz gotreader2with
+ call withwhat
+ ret
+gotreader2with: mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"S"
+ mov dl,"H"
+ mov dh,"R"
+ call compare
+ jz correctcard2
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+correctcard2: cmp talkedtoboss,0
+ jz notyetboss
+ cmp card1money,0
+ jz nocash
+ cmp gunpassflag,2
+ jz alreadygotnew
+ mov al,18
+ call playchannel1
+ mov cx,300
+ mov al,19
+ call showpuztext
+ mov al,94
+ call placesetobject
+ mov gunpassflag,1
+ sub card1money,2000
+ inc progresspoints
+ mov getback,1
+ ret
+nocash: mov cx,300
+ mov al,20
+ call showpuztext
+ call putbackobstuff
+ ret
+alreadygotnew: mov cx,300
+ mov al,22
+ call showpuztext
+ call putbackobstuff
+ ret
+notyetboss: call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+
+Usecardreader3 proc near
+
+ cmp withobject,255
+ jnz gotreader3with
+ call withwhat
+ ret
+gotreader3with: mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"S"
+ mov dl,"H"
+ mov dh,"R"
+ call compare
+ jz rightcard
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+rightcard: cmp talkedtorecep,0
+ jz notyetrecep
+ cmp cardpassflag,0
+ jnz alreadyusedit
+ if demo
+ mov al,27
+ else
+ mov al,16
+ endif
+ call playchannel1
+ mov cx,300
+ mov al,25
+ call showpuztext
+ inc progresspoints
+ sub card1money,8300
+ mov cardpassflag,1
+ mov getback,1
+ ret
+alreadyusedit: mov cx,300
+ mov al,26
+ call showpuztext
+ call putbackobstuff
+ ret
+notyetrecep: call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Usecashcard proc near
+
+ call getridofreels
+ call loadkeypad
+ call createpanel
+ call showpanel
+ call showexit
+ call showman
+
+ mov di,114
+ mov bx,120
+ cmp foreignrelease, 0
+ jz $1
+ mov bx,120-3
+$1:
+ mov ds,tempgraphics
+ mov al,39
+ mov ah,0
+ call showframe
+
+ mov ax,card1money
+ call moneypoke
+
+ call getobtextstart
+ call nextcolon
+ call nextcolon
+
+ mov di,36
+ mov bx,98
+ mov dl,241
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ mov di,160
+ mov bx,155
+ push cs
+ pop es
+ mov si,offset cs:money1poke
+ mov charshift,91*2+75
+ mov al,0
+ mov ah,0
+ mov dl,240
+ call printdirect
+ mov di,187
+ mov bx,155
+ push cs
+ pop es
+ mov si,offset cs:money2poke
+ mov charshift,91*2+85
+ mov al,0
+ mov ah,0
+ mov dl,240
+ call printdirect
+ mov charshift,0
+ call worktoscreenm
+ mov cx,400
+ call hangonp
+ call getridoftemp
+ call restorereels
+ call putbackobstuff
+ ret
+
+money1poke: db "0000",0
+money2poke: db "00",0
+
+ endp
+
+
+
+
+Lookatcard proc near
+
+ mov manisoffscreen,1
+ call getridofreels
+ call loadkeypad
+
+ call createpanel2
+ mov di,160
+ mov bx,80
+ mov ds,tempgraphics
+ mov al,42
+ mov ah,128
+ call showframe
+
+ call getobtextstart
+ call findnextcolon
+ call findnextcolon
+ call findnextcolon
+ mov di,36
+ mov bx,124
+ mov dl,241
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ push es si
+ call worktoscreenm
+ mov cx,280
+ call hangonw
+ call createpanel2
+ mov di,160
+ mov bx,80
+ mov ds,tempgraphics
+ mov al,42
+ mov ah,128
+ call showframe
+ pop si es
+
+ mov di,36
+ mov bx,130
+ mov dl,241
+ mov al,0
+ mov ah,0
+ call printdirect
+ call worktoscreenm
+
+ mov cx,200
+ call hangonw
+ mov manisoffscreen,0
+ call getridoftemp
+ call restorereels
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+Moneypoke proc near
+
+ mov bx,offset cs:money1poke
+ mov cl,48-1
+numberpoke0: inc cl
+ sub ax,10000
+ jnc numberpoke0
+ add ax,10000
+ mov [cs:bx],cl
+ inc bx
+
+ mov cl,48-1
+numberpoke1: inc cl
+ sub ax,1000
+ jnc numberpoke1
+ add ax,1000
+ mov [cs:bx],cl
+ inc bx
+
+ mov cl,48-1
+numberpoke2: inc cl
+ sub ax,100
+ jnc numberpoke2
+ add ax,100
+ mov [cs:bx],cl
+ inc bx
+
+ mov cl,48-1
+numberpoke3: inc cl
+ sub ax,10
+ jnc numberpoke3
+ add ax,10
+ mov [cs:bx],cl
+
+ mov bx,offset cs:money2poke
+ add al,48
+ mov [cs:bx],al
+ ret
+
+ endp
+
+
+
+
+
+
+
+Usecontrol proc near
+
+ cmp withobject,255
+ jnz gotcontrolwith
+ call withwhat
+ ret
+gotcontrolwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"K"
+ mov ch,"E"
+ mov dl,"Y"
+ mov dh,"A"
+ call compare
+ jz rightkey
+ cmp reallocation,21
+ jnz balls
+ mov al,withobject
+ mov ah,withtype
+ mov cl,"K"
+ mov ch,"N"
+ mov dl,"F"
+ mov dh,"E"
+ call compare
+ jz jimmycontrols
+ mov al,withobject
+ mov ah,withtype
+ mov cl,"A"
+ mov ch,"X"
+ mov dl,"E"
+ mov dh,"D"
+ call compare
+ jz axeoncontrols
+
+balls: call showfirstuse
+ call putbackobstuff
+ ret
+
+rightkey: mov al,16
+ call playchannel1
+ cmp location,21
+ jz goingdown
+ mov cx,300
+ mov al,0
+ call showpuztext
+ mov newlocation,21
+ mov counttoclose,8
+ mov counttoopen,0
+ mov watchingtime,80
+ mov getback,1
+ ret
+
+goingdown: mov cx,300
+ mov al,3
+ call showpuztext
+ mov newlocation,30
+ mov counttoclose,8
+ mov counttoopen,0
+ mov watchingtime,80
+ mov getback,1
+ ret
+
+jimmycontrols: mov al,50
+ call placesetobject
+ mov al,51
+ call placesetobject
+ mov al,26
+ call placesetobject
+ mov al,30
+ call placesetobject
+ mov al,16
+ call removesetobject
+ mov al,17
+ call removesetobject
+ if demo
+ mov al,26
+ else
+ mov al,14
+ endif
+ call playchannel1
+ mov cx,300
+ mov al,10
+ call showpuztext
+ inc progresspoints
+ mov getback,1
+ ret
+
+axeoncontrols: mov cx,300
+ mov al,16
+ call showpuztext
+ inc progresspoints
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+Usehatch proc near
+
+ call showfirstuse
+ mov newlocation,40
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Usewire proc near
+
+ cmp withobject,255
+ jnz gotwirewith
+ call withwhat
+ ret
+gotwirewith: mov al,withobject
+ mov ah,withtype
+ mov cl,"K"
+ mov ch,"N"
+ mov dl,"F"
+ mov dh,"E"
+ call compare
+ jz wireknife
+ mov al,withobject
+ mov ah,withtype
+ mov cl,"A"
+ mov ch,"X"
+ mov dl,"E"
+ mov dh,"D"
+ call compare
+ jz wireaxe
+
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+wireaxe: mov cx,300
+ mov al,16
+ call showpuztext
+ call putbackobstuff
+ ret
+
+wireknife: mov al,51
+ call removesetobject
+ mov al,52
+ call placesetobject
+ mov cx,300
+ mov al,11
+ call showpuztext
+ inc progresspoints
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+Usehandle proc near
+
+ mov al,"C"
+ mov ah,"U"
+ mov cl,"T"
+ mov ch,"W"
+ call findsetobject
+ mov al,[es:bx+58]
+ cmp al,255
+ jnz havecutwire
+ mov cx,300
+ mov al,12
+ call showpuztext
+ mov getback,1
+ ret
+
+havecutwire: mov cx,300
+ mov al,13
+ call showpuztext
+ mov newlocation,22
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Useelevator1 proc near
+
+ call showfirstuse
+ call selectlocation
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+
+Showfirstuse proc near ;shows but does not delete the
+ ;first bit of text after the
+ call getobtextstart ;description
+ call findnextcolon
+ call findnextcolon
+ call usetext
+ mov cx,400
+ call hangonp
+ ret
+
+ endp
+
+
+
+
+
+Useelevator3 proc near
+
+ call showfirstuse
+ mov counttoclose,20
+ mov newlocation,34
+ mov reeltowatch,46
+ mov endwatchreel,63
+ mov watchspeed,1
+ mov speedcount,1
+ mov watchingtime,80 ;40
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+Useelevator4 proc near
+
+ call showfirstuse
+ mov reeltowatch,0
+ mov endwatchreel,11
+ mov watchspeed,1
+ mov speedcount,1
+ mov counttoclose,20
+ mov watchingtime,80 ;40
+ mov getback,1
+ mov newlocation,24
+ ret
+
+ endp
+
+
+
+Useelevator2 proc near
+
+ cmp location,23
+ jz inpoolhall
+ call showfirstuse
+ mov newlocation,23
+ mov counttoclose,20
+ mov counttoopen,0
+ mov watchingtime,80
+ mov getback,1
+ ret
+inpoolhall: call showfirstuse
+ mov newlocation,31
+ mov counttoclose,20
+ mov counttoopen,0
+ mov watchingtime,80
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+Useelevator5 proc near
+
+ mov al,4
+ call placesetobject
+ mov al,0
+ call removesetobject
+ mov newlocation,20
+ mov watchingtime,80
+ mov liftflag,1
+ mov counttoclose,8
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Usekey proc near
+
+ cmp location,5
+ jz usekey1
+ cmp location,30
+ jz usekey1
+ cmp location,21
+ jz usekey2
+ mov cx,200
+ mov al,1
+ call showpuztext
+ call putbackobstuff
+ ret
+
+usekey1: cmp mapx,22
+ jnz wrongroom1
+ cmp mapy,10
+ jnz wrongroom1
+ mov cx,300
+ mov al,0
+ call showpuztext
+ mov counttoclose,100
+ mov getback,1
+ ret
+
+usekey2: cmp mapx,11
+ jnz wrongroom1
+ cmp mapy,10
+ jnz wrongroom1
+ mov cx,300
+ mov al,3
+ call showpuztext
+ mov newlocation,30
+ mov al,2
+ call fadescreendown
+ call showfirstuse
+ call putbackobstuff
+ ret
+
+wrongroom1: mov cx,200
+ mov al,2
+ call showpuztext
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+
+Usestereo proc near
+
+ cmp location,0
+ jz stereook
+ mov cx,400 ;Ryan isn't in his flat.
+ mov al,4
+ call showpuztext
+ call putbackobstuff
+ ret
+
+stereook: cmp mapx,11
+ jnz stereonotok
+ cmp mapy,0
+ jz stereook2
+stereonotok: mov cx,400 ;Ryan isn't in his bedroom.
+ mov al,5
+ call showpuztext
+ call putbackobstuff
+ ret
+
+stereook2: mov al,"C"
+ mov ah,"D"
+ mov cl,"P"
+ mov ch,"L"
+ call findsetobject ;find object number of CD player
+ mov ah,1 ;searching for inside a set ob
+ call checkinside ;see if there is anything inside
+ cmp cl,numexobjects
+ jnz cdinside
+ mov al,6 ;Need a CD inside
+ mov cx,400
+ call showpuztext
+ call putbackobstuff
+ call getanyad ;if the CD's been taken out,
+ mov al,255 ;make sure the player isn't still
+ mov [es:bx+10],al ;playing, ie:reset the puzzle
+ ret ;flag for the remote.
+
+cdinside: call getanyad
+ mov al,[es:bx+10]
+ xor al,1
+ mov [es:bx+10],al
+ cmp al,255
+ jz stereoon
+ mov al,7 ;The stereo works
+ mov cx,400
+ call showpuztext
+ call putbackobstuff
+ ret
+
+stereoon: mov al,8 ;Stereo was already on,
+ mov cx,400 ;so switch it off
+ call showpuztext
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Usecooker proc near
+
+ mov al,command
+ mov ah,objecttype
+ call checkinside ;see if there is anything inside
+ cmp cl,numexobjects
+ jnz foodinside
+ call showfirstuse
+ call putbackobstuff
+ ret ;flag for the remote.
+
+foodinside: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+Useaxe proc near
+
+ cmp reallocation,22
+ jnz notinpool
+ cmp mapy,10
+ jz axeondoor
+ call showseconduse
+ inc progresspoints
+ mov lastweapon,2
+ mov getback,1
+ call removeobfrominv
+ ret
+
+notinpool: call showfirstuse
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Useelvdoor proc near
+
+ cmp withobject,255
+ jnz gotdoorwith
+ call withwhat
+ ret
+gotdoorwith: mov al,withobject
+ mov ah,withtype
+ mov cl,"A"
+ mov ch,"X"
+ mov dl,"E"
+ mov dh,"D"
+ call compare
+ jz axeondoor
+ mov al,14
+ mov cx,300
+ call showpuztext
+ call putbackobstuff
+ ret
+
+axeondoor: mov al,15
+ mov cx,300
+ call showpuztext
+ inc progresspoints
+
+ mov watchingtime,46*2
+ mov reeltowatch,31
+ mov endwatchreel,77
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+;------------------------------------------------------------------------------
+
+Withwhat proc near ;Gets player to identify object
+ ;to use selected item with.
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ mov al,command
+ mov ah,objecttype
+ push cs
+ pop es
+ mov di,offset cs:commandline
+ call copyname
+
+ mov di,100
+ mov bx,21
+ mov dl,200
+ mov al,63
+ mov ah,2
+ call printmessage2
+
+ mov di,lastxpos
+ add di,5
+ mov bx,21
+ push cs
+ pop es
+ mov si,offset cs:commandline
+ mov dl,220
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ mov di,lastxpos
+ add di,5
+ mov bx,21
+ mov dl,200
+ mov al,63
+ mov ah,3
+ call printmessage2
+
+ call fillryan
+ mov commandtype,255
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ mov invopen,2
+ ret
+
+ endp
+
+
+
+
+
+Selectob proc near
+
+ call findinvpos
+ mov ax,[es:bx]
+ cmp al,255
+ jnz canselectob
+ call blank
+ ret
+
+canselectob: mov withobject,al
+ mov withtype,ah
+ cmp ax,oldsubject
+ jnz diffsub3
+ cmp commandtype,221
+ jz alreadyselob
+ mov commandtype,221
+
+diffsub3: mov oldsubject,ax
+ mov bx,ax
+ mov al,0
+ call commandwithob
+alreadyselob: mov ax,mousebutton
+ cmp ax,oldbutton
+ jz notselob
+ and ax,1
+ jnz doselob
+notselob: ret
+
+doselob: call delpointer
+ mov invopen,0
+ call useroutine
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Compare proc near
+
+ sub dl,"A"
+ sub dh,"A"
+ sub cl,"A"
+ sub ch,"A"
+ push cx dx
+ call getanyaddir
+ pop dx cx
+ cmp [es:bx+12],cx
+ jnz comparefin
+ cmp [es:bx+14],dx
+comparefin: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Findsetobject proc near ;searches set object ID's
+ ;for contents of ax,cx
+ sub al,"A" ;returns number in al and data
+ sub ah,"A" ;start point in es:bx
+ sub cl,"A"
+ sub ch,"A"
+ mov es,setdat
+ mov bx,0
+ mov dl,0 ;dl counts object number
+findsetloop: cmp al,[es:bx+12]
+ jnz nofind
+ cmp ah,[es:bx+13]
+ jnz nofind
+ cmp cl,[es:bx+14]
+ jnz nofind
+ cmp ch,[es:bx+15]
+ jnz nofind
+ mov al,dl
+ ret
+nofind: add bx,64
+ inc dl
+ cmp dl,128 ;number of objects to search
+ jnz findsetloop
+ mov al,dl
+ ret
+
+ endp
+
+
+
+
+
+
+Findexobject proc near ;searches ex object ID's
+ ;for contents of ax,cx
+ sub al,"A" ;returns number in al and data
+ sub ah,"A" ;start point in es:bx
+ sub cl,"A"
+ sub ch,"A"
+ mov es,extras
+ mov bx,exdata
+ mov dl,0 ;dl counts object number
+findexloop: cmp al,[es:bx+12]
+ jnz nofindex
+ cmp ah,[es:bx+13]
+ jnz nofindex
+ cmp cl,[es:bx+14]
+ jnz nofindex
+ cmp ch,[es:bx+15]
+ jnz nofindex
+ mov al,dl
+ ret
+nofindex: add bx,16
+ inc dl
+ cmp dl,numexobjects ;number of objects to search
+ jnz findexloop
+ mov al,dl
+ ret
+
+ endp
+
+
+
+Isryanholding proc near
+
+ sub al,"A" ;returns number in al and data
+ sub ah,"A" ;start point in es:bx
+ sub cl,"A"
+ sub ch,"A"
+ mov es,extras
+ mov bx,exdata
+ mov dl,0 ;dl counts object number
+searchinv: cmp byte ptr [es:bx+2],4
+ jnz nofindininv
+ cmp al,[es:bx+12]
+ jnz nofindininv
+ cmp ah,[es:bx+13]
+ jnz nofindininv
+ cmp cl,[es:bx+14]
+ jnz nofindininv
+ cmp ch,[es:bx+15]
+ jnz nofindininv
+ mov al,dl
+ cmp al,numexobjects
+ ret
+nofindininv: add bx,16
+ inc dl
+ cmp dl,numexobjects ;number of objects to search
+ jnz searchinv
+ mov al,dl
+ cmp al,numexobjects ;if not zero he is holding
+ ret ;if zero, he is not holding
+
+ endp
+
+
+
+
+Checkinside proc near ;finds an extra object inside
+ ;object number al, type ah
+
+ mov es,extras
+ mov bx,exdata
+ mov cl,0
+insideloop: cmp al,[es:bx+3] ;OI! might need to check room number!!!
+ jnz notfoundinside
+ cmp ah,[es:bx+2]
+ jnz notfoundinside
+ ret
+notfoundinside: add bx,16
+ inc cl
+ cmp cl,numexobjects
+ jnz insideloop
+ ret ;ch returns the object number
+ ;in the extras list
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Usetext proc near
+
+ push es si
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call obicons
+ pop si es
+
+ mov di,36
+ mov bx,104
+ mov dl,241
+ mov al,0
+ mov ah,0
+ call printdirect
+
+ call worktoscreenm
+ ret
+
+ endp
+
+
+
+
+
+Putbackobstuff proc near
+
+ call createpanel
+ call showpanel
+ call showman
+ call obicons
+ call showexit
+ call obpicture
+ call describeob
+ call undertextline
+ mov commandtype,255
+ call readmouse
+ call showpointer
+ call worktoscreen
+ call delpointer
+ ret
+
+ endp
+
+
+
+
+
+
+
+Showpuztext proc near
+
+ push cx
+ call findpuztext
+ push es si
+ call createpanel
+ call showpanel
+ call showman
+ call showexit
+ call obicons
+ pop si es
+ mov di,36
+ mov bx,104
+ mov dl,241
+ mov ah,0
+ call printdirect
+ call worktoscreenm
+ pop cx
+ call hangonp
+ ret
+
+ endp
+
+
+
+Findpuztext proc near
+
+ mov ah,0
+ mov si,ax
+ add si,si
+ mov es,puzzletext
+ mov ax,[es:si]
+ add ax,textstart
+ mov si,ax
+ ret
+
+ endp
+
+
+
+;-------------------------------------------------------------------------------
+
+Placesetobject proc near
+
+ push es bx
+ mov cl,0
+ mov ch,0
+ call findormake
+ call getsetad
+ mov byte ptr [es:bx+58],0
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+Removesetobject proc near
+
+ push es bx
+ mov cl,255
+ mov ch,0
+ call findormake
+ call getsetad
+ mov byte ptr [es:bx+58],255
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+Issetobonmap proc near
+
+ push es bx
+ call getsetad
+ mov al,[es:bx+58]
+ pop bx es
+ cmp al,0
+ ret
+
+ endp
+
+
+
+
+
+
+Placefreeobject proc near
+
+ push es bx
+ mov cl,0
+ mov ch,1
+ call findormake
+ call getfreead
+ mov byte ptr [es:bx+2],0
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+Removefreeobject proc near
+
+ push es bx
+ ;mov cl,255
+ ;mov ch,1
+ ;call findormake
+ call getfreead
+ mov byte ptr [es:bx+2],255
+ pop bx es
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Findormake proc near
+
+ mov bx,listofchanges
+ push ax
+ mov es,buffers
+ mov ah,reallocation
+changeloop: cmp byte ptr [es:bx],255
+ jz haventfound
+ cmp ax,[es:bx]
+ jnz nofoundchange
+ cmp ch,[es:bx+3]
+ jz foundchange
+nofoundchange: add bx,4
+ jmp changeloop
+foundchange: pop ax
+ mov [es:bx+2],cl
+ ret
+haventfound: mov [es:bx],ax
+ mov [es:bx+2],cx
+ pop ax
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Switchryanon proc near
+
+ mov ryanon,255
+ ret
+
+ endp
+
+
+
+
+
+Switchryanoff proc near
+
+ mov ryanon,1
+ ret
+
+ endp
+
+
+
+Setallchanges proc near
+
+ mov es,buffers
+ mov bx,listofchanges
+setallloop: mov ax,[es:bx]
+ cmp al,255
+ jz endsetloop
+ mov cx,[es:bx+2]
+ add bx,4
+ cmp ah,reallocation
+ jnz setallloop
+ push es bx
+ call dochange
+ pop bx es
+ jmp setallloop
+endsetloop: ret
+
+ endp
+
+
+
+
+
+
+Dochange proc near
+
+ cmp ch,0
+ jz object
+ cmp ch,1
+ jz freeobject
+
+path: push cx
+ mov ah,0
+ add ax,ax
+ add ax,ax
+ add ax,ax
+ push ax
+ mov al,ch
+ sub al,100
+ mov ah,0
+ mov cx,144
+ mul cx
+ pop bx
+ add bx,ax
+ add bx,pathdata
+ mov es,reels
+ pop cx
+ mov byte ptr [es:bx+6],cl
+nopath: ret
+
+object: push cx
+ call getsetad
+ pop cx
+ mov [es:bx+58],cl
+ ret
+
+freeobject: push cx
+ call getfreead
+ pop cx
+ cmp byte ptr [es:bx+2],255
+ jnz beenpickedup
+ mov [es:bx+2],cl
+beenpickedup: ret
+
+ endp
+
+
+
+Autoappear proc near ;places objects that appear
+ ;in rooms after certain
+ cmp location,32 ;conditions are met.
+ jnz notinalley
+ mov al,5 ;switch off travel to
+ call resetlocation ;hotel after kill
+ mov al,10
+ call setlocation
+ mov destpos,10
+ ret
+notinalley: cmp reallocation,24
+ jnz notinedens
+ cmp generaldead,1
+ jnz edenspart2
+ inc generaldead
+ mov al,44
+ call placesetobject
+ mov al,18
+ call placesetobject
+ mov al,93
+ call placesetobject
+ mov al,92
+ call removesetobject
+ mov al,55
+ call removesetobject
+ mov al,75
+ call removesetobject
+ mov al,84
+ call removesetobject
+ mov al,85
+ call removesetobject
+ ret
+edenspart2: cmp sartaindead,1
+ jnz notedens2
+ mov al,44
+ call removesetobject
+ mov al,93
+ call removesetobject
+ mov al,55
+ call placesetobject
+ inc sartaindead
+notedens2: ret
+notinedens: cmp reallocation,25
+ jnz notonsartroof
+ mov newsitem,3
+ mov al,6
+ call resetlocation ;turn off Sartain Industries
+ mov al,11
+ call setlocation ;turn on carpark for later
+ mov destpos,11
+ ret
+notonsartroof: cmp reallocation,2
+ jnz notinlouiss
+ cmp rockstardead,0
+ jz notinlouiss
+ mov al,23
+ call placesetobject
+notinlouiss: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+;--------------------------------------------------------- Timed text stuff ----
+
+
+
+Getundertimed proc near
+
+ mov al,timedy
+ cmp foreignrelease, 0
+ jz $1
+ sub al,3
+$1:
+ mov ah,0
+ mov bx,ax
+ mov al,timedx
+ mov ah,0
+ mov di,ax
+ mov ch,undertimedysize
+ mov cl,240
+ mov ds,buffers
+ mov si,undertimedtext
+ call multiget
+ ret
+
+ endp
+
+
+
+
+Putundertimed proc near
+
+ mov al,timedy
+ cmp foreignrelease, 0
+ jz $1
+ sub al,3
+$1:
+ mov ah,0
+ mov bx,ax
+ mov al,timedx
+ mov ah,0
+ mov di,ax
+ mov ch,undertimedysize
+ mov cl,240
+ mov ds,buffers
+ mov si,undertimedtext
+ call multiput
+ ret
+
+ endp
+
+
+
+
+
+
+Dumptimedtext proc near
+
+ cmp needtodumptimed,1
+ jnz nodumptimed
+ mov al,timedy
+ cmp foreignrelease, 0
+ jz $1
+ sub al,3
+$1:
+ mov ah,0
+ mov bx,ax
+ mov al,timedx
+ mov ah,0
+ mov di,ax
+ mov cl,240
+ mov ch,undertimedysize
+ call multidump
+ mov needtodumptimed,0
+nodumptimed: ret
+
+ endp
+
+
+
+
+
+
+
+
+Setuptimeduse proc near
+
+ cmp timecount,0
+ jnz cantsetup
+
+ mov timedy,bh
+ mov timedx,bl
+ mov counttotimed,cx
+ add dx,cx
+ mov timecount,dx
+ mov bl,al
+ mov bh,0
+ add bx,bx
+ mov es,puzzletext
+ mov cx,textstart
+ mov ax,[es:bx]
+ add ax,cx
+ mov bx,ax
+ mov timedseg,es
+ mov timedoffset,bx
+cantsetup: ret
+
+ endp
+
+
+
+Setuptimedtemp proc near
+
+ if cd
+ cmp ah,0
+ jz notloadspeech3
+ push ax
+ push bx
+ push cx
+ push dx
+ mov dl,"T"
+ mov dh,ah
+ mov cl,"T"
+ mov ah,0
+ call loadspeech
+ cmp speechloaded,1
+ jnz $1
+ mov al,50+12
+ call playchannel1
+$1:
+ pop dx
+ pop cx
+ pop bx
+ pop ax
+
+ cmp speechloaded,1
+ jnz notloadspeech3 ; failed to load speech
+ cmp subtitles, 1
+ jz notloadspeech3
+ ret
+
+notloadspeech3:
+ endif ;if cd
+
+ cmp timecount,0
+ jnz cantsetup2
+ mov timedy,bh
+ mov timedx,bl
+ mov counttotimed,cx
+ add dx,cx
+ mov timecount,dx
+ mov bl,al
+ mov bh,0
+ add bx,bx
+ mov es,textfile1
+ mov cx,textstart
+ mov ax,[es:bx]
+ add ax,cx
+ mov bx,ax
+ mov timedseg,es
+ mov timedoffset,bx
+cantsetup2: ret
+
+ endp
+
+
+
+
+
+
+
+Usetimedtext proc near
+
+ cmp timecount,0
+ jz notext
+ dec timecount
+ cmp timecount,0
+ jz deltimedtext
+ mov ax,timecount
+ cmp ax,counttotimed
+ jz firsttimed
+ jnc notext
+ jmp notfirsttimed
+firsttimed: call getundertimed
+notfirsttimed: mov bl,timedy
+ mov bh,0
+ mov al,timedx
+ mov ah,0
+ mov di,ax
+ mov es,timedseg
+ mov si,timedoffset
+ mov dl,237
+ mov ah,0
+ call printdirect
+ mov needtodumptimed,1
+notext: ret
+
+deltimedtext: call putundertimed
+ mov needtodumptimed,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Edenscdplayer proc near
+
+ call showfirstuse
+ mov watchingtime,18*2
+ mov reeltowatch,25
+ mov endwatchreel,42
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ ret
+
+ endp
+
+
+
+
+
+Usewall proc near
+
+ call showfirstuse
+ cmp manspath,3
+ jz gobackover
+ mov watchingtime,30*2
+ mov reeltowatch,2
+ mov endwatchreel,31
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ mov al,3
+ call turnpathon
+ mov al,4
+ call turnpathon
+ mov al,0
+ call turnpathoff
+ mov al,1
+ call turnpathoff
+ mov al,2
+ call turnpathoff
+ mov al,5
+ call turnpathoff
+ mov manspath,3
+ mov finaldest,3
+ call findxyfrompath
+ mov resetmanxy,1
+ call switchryanoff
+ ret
+gobackover: mov watchingtime,30*2
+ mov reeltowatch,34
+ mov endwatchreel,60
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ mov al,3
+ call turnpathoff
+ mov al,4
+ call turnpathoff
+ mov al,0
+ call turnpathon
+ mov al,1
+ call turnpathon
+ mov al,2
+ call turnpathon
+ mov al,5
+ call turnpathon
+ mov manspath,5
+ mov finaldest,5
+ call findxyfrompath
+ mov resetmanxy,1
+ call switchryanoff
+ ret
+
+ endp
+
+
+
+
+
+
+
+Usechurchgate proc near
+
+ cmp withobject,255
+ jnz gatewith
+ call withwhat
+ ret
+gatewith: mov al,withobject
+ mov ah,withtype
+ mov cl,"C"
+ mov ch,"U"
+ mov dl,"T"
+ mov dh,"T"
+ call compare
+ jz cutgate
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+cutgate: call showfirstuse
+ mov watchingtime,64*2
+ mov reeltowatch,4
+ mov endwatchreel,70
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ inc progresspoints
+ mov al,3
+ call turnpathon
+ cmp aidedead,0
+ jz notopenchurch
+ mov al,2
+ call turnpathon
+notopenchurch: ret
+
+ endp
+
+
+
+
+
+Usegun proc near
+
+ cmp objecttype,4
+ jz istakengun
+ call showseconduse
+ call putbackobstuff
+ ret
+istakengun: cmp reallocation,22
+ jnz notinpoolroom
+ mov cx,300
+ mov al,34
+ call showpuztext
+ mov lastweapon,1
+ mov combatcount,39
+ mov getback,1
+ inc progresspoints
+ ret
+notinpoolroom: cmp reallocation,25
+ jnz nothelicopter
+ mov cx,300
+ mov al,34
+ call showpuztext
+ mov lastweapon,1
+ mov combatcount,19
+ mov getback,1
+ mov dreamnumber,2
+ mov roomafterdream,38
+ mov sartaindead,1
+ inc progresspoints
+ ret
+nothelicopter: cmp reallocation,27
+ jnz notinrockroom
+ mov cx,300
+ mov al,46
+ call showpuztext
+ mov pointermode,2 ;0
+ mov rockstardead,1
+ mov lastweapon,1
+ mov newsitem,1
+ mov getback,1
+ mov roomafterdream,32 ; skip
+ mov dreamnumber,0
+ inc progresspoints
+ ret
+notinrockroom: cmp reallocation,8
+ jnz notbystudio
+ cmp mapx,22
+ jnz notbystudio
+ cmp mapy,40
+ jnz notbystudio
+ mov al,92
+ call issetobonmap
+ jz notbystudio
+ cmp manspath,9
+ jz notbystudio
+ mov destination,9
+ mov finaldest,9
+ call autosetwalk
+ mov lastweapon,1
+ mov getback,1
+ inc progresspoints
+ ret
+notbystudio: cmp reallocation,6
+ jnz notsarters
+ cmp mapx,11
+ jnz notsarters
+ cmp mapy,20
+ jnz notsarters
+ mov al,5
+ call issetobonmap
+ jnz notsarters
+ mov destination,1
+ mov finaldest,1
+ call autosetwalk
+ mov al,5
+ call removesetobject
+ mov al,6
+ call placesetobject
+ mov al,1
+ mov ah,roomnum
+ dec ah
+ call turnanypathon
+ mov liftflag,1
+ mov watchingtime,40*2
+ mov reeltowatch,4
+ mov endwatchreel,43
+ mov watchspeed,1
+ mov speedcount,1
+ mov getback,1
+ inc progresspoints
+ ret
+notsarters: cmp reallocation,29
+ jnz notaide
+ mov getback,1
+ mov al,13
+ call resetlocation
+ mov al,12
+ call setlocation
+ mov destpos,12
+ mov destination,2
+ mov finaldest,2
+ call autosetwalk
+ mov watchingtime,164*2
+ mov reeltowatch,3
+ mov endwatchreel,164
+ mov watchspeed,1
+ mov speedcount,1
+ mov aidedead,1
+ mov dreamnumber,3
+ mov roomafterdream,33
+ inc progresspoints
+ ret
+notaide: cmp reallocation,23
+ jnz notwithboss
+ cmp mapx,0
+ jnz notwithboss
+ cmp mapy,50
+ jnz notwithboss
+ cmp manspath,5
+ jz pathokboss
+ mov destination,5
+ mov finaldest,5
+ call autosetwalk
+pathokboss: mov lastweapon,1
+ mov getback,1
+ ret
+notwithboss: cmp reallocation,8
+ jnz nottvsoldier
+ cmp mapx,11
+ jnz nottvsoldier
+ cmp mapy,10
+ jnz nottvsoldier
+ cmp manspath,2
+ jz pathoktv
+ mov destination,2
+ mov finaldest,2
+ call autosetwalk
+pathoktv: mov lastweapon,1
+ mov getback,1
+ ret
+nottvsoldier: call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+
+Useshield proc near
+
+ cmp reallocation,20
+ jnz notinsartroom
+ cmp combatcount,0
+ jz notinsartroom
+ mov lastweapon,3
+ call showseconduse
+ mov getback,1
+ inc progresspoints
+ call removeobfrominv
+ ret
+notinsartroom: call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+Usebuttona proc near
+
+ mov al,95
+ call issetobonmap
+ jz donethisbit
+
+ call showfirstuse
+ mov al,0
+ mov ah,roomnum
+ dec ah
+ call turnanypathon
+ mov al,9
+ call removesetobject
+ mov al,95
+ call placesetobject
+
+ mov watchingtime,15*2
+ mov reeltowatch,71
+ mov endwatchreel,85
+ mov watchspeed,1
+ mov speedcount,1
+
+ mov getback,1
+ inc progresspoints
+ ret
+donethisbit: call showseconduse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+Useplate proc near
+
+ cmp withobject,255
+ jnz platewith
+ call withwhat
+ ret
+platewith: mov al,withobject
+ mov ah,withtype
+ mov cl,"S"
+ mov ch,"C"
+ mov dl,"R"
+ mov dh,"W"
+ call compare
+ jz unscrewplate
+ mov al,withobject
+ mov ah,withtype
+ mov cl,"K"
+ mov ch,"N"
+ mov dl,"F"
+ mov dh,"E"
+ call compare
+ jz triedknife
+ mov cx,300
+ mov al,14
+ call showpuztext
+ call putbackobstuff
+ ret
+
+unscrewplate: mov al,20
+ call playchannel1
+ call showfirstuse
+ mov al,28
+ call placesetobject
+ mov al,24
+ call placesetobject
+ mov al,25
+ call removesetobject
+ mov al,0
+ call placefreeobject
+ inc progresspoints
+ mov getback,1
+ ret
+
+triedknife: mov cx,300
+ mov al,54
+ call showpuztext
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+Usewinch proc near
+
+ mov al,40
+ mov ah,1
+ call checkinside
+ cmp cl,numexobjects
+ jz nowinch
+ mov al,cl
+ mov ah,4
+ mov cl,"F"
+ mov ch,"U"
+ mov dl,"S"
+ mov dh,"E"
+ call compare
+ jnz nowinch
+
+ mov watchingtime,217*2
+ mov reeltowatch,0
+ mov endwatchreel,217
+ mov watchspeed,1
+ mov speedcount,1
+ mov destpos,1
+ mov newlocation,45
+ mov dreamnumber,1
+ mov roomafterdream,44
+ mov generaldead,1
+ mov newsitem,2
+ mov getback,1
+ inc progresspoints
+ ret
+
+nowinch: call showfirstuse
+ call putbackobstuff
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
diff --git a/devtools/tasmrecover/dreamweb/vars.asm b/devtools/tasmrecover/dreamweb/vars.asm
new file mode 100644
index 0000000000..8678231a9d
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/vars.asm
@@ -0,0 +1,563 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+;---------------------------------------------------Equates and definitions----
+
+Inputport equ 63h
+Mapwidth equ 66 ;132/2
+Maplength equ 60 ;6/2
+Tablesize equ 32 ;size of each entry in spritetable
+Itempicsize equ 44 ;size of inventory slots
+Opsy equ 52
+Opsx equ 60
+Inventx equ 80
+Inventy equ 58
+Zoomx equ 8
+Zoomy equ 132
+Keypadx equ 36+112
+Keypady equ 72
+Diaryx equ 68+24
+Diaryy equ 48+12
+Symbolx equ 64
+Symboly equ 56
+Menux equ 80+40
+Menuy equ 60
+
+ if foreign
+Undertextsizex equ 228
+Undertextsizey equ 13
+Undertimedysize equ 30
+ else
+Undertextsizex equ 180
+Undertextsizey equ 10
+Undertimedysize equ 24
+ endif
+
+Numchanges equ 250
+
+Textunder equ 0 ;offsets for items in buffer segment
+Openinvlist equ textunder+(undertextsizex*undertextsizey)
+Ryaninvlist equ openinvlist+32
+Pointerback equ ryaninvlist+60
+Mapflags equ pointerback+(32*32)
+Startpal equ mapflags+(11*10*3)
+Endpal equ startpal+768
+Maingamepal equ endpal+768
+Spritetable equ maingamepal+768
+Setlist equ spritetable+(32*tablesize)
+Freelist equ setlist+(128*5)
+Exlist equ freelist+(80*5)
+Peoplelist equ exlist+(100*5)
+Zoomspace equ peoplelist+(12*5)
+Printedlist equ zoomspace+(46*40)
+Listofchanges equ printedlist+(5*80)
+Undertimedtext equ listofchanges+(numchanges*4)
+Rainlist equ undertimedtext+(256*undertimedysize)
+Initialreelrouts equ rainlist+(6*64)
+Initialvars equ initialreelrouts+lenofreelrouts
+Lengthofbuffer equ initialvars+lengthofvars
+
+Flags equ 0 ;offsets of items in backdrop segment
+Blocks equ flags+192
+Map equ 0
+Lengthofmap equ map+(mapwidth*maplength)
+
+Intextdat equ 0
+Intext equ intextdat+(38*2)
+Blocktextdat equ 0
+Blocktext equ blocktextdat+(98*2)
+Settextdat equ 0
+Settext equ settextdat+(130*2)
+Freetextdat equ 0
+Freetext equ freetextdat+(82*2)
+
+Numexobjects equ 114
+Exframeslen equ 30000
+Extextlen equ 18000
+
+Exframedata equ 0
+Exframes equ exframedata+2080
+Exdata equ exframes+exframeslen
+Extextdat equ exdata+(16*numexobjects)
+Extext equ extextdat+((numexobjects+2)*2)
+Lengthofextra equ extext+extextlen
+
+Framedata equ 0
+Frames equ framedata+2080
+
+Frframedata equ 0
+Frframes equ frframedata+2080
+
+Personframes equ 0
+Persontxtdat equ personframes+24
+Persontext equ persontxtdat+(1026*2)
+
+Pathdata equ 0
+Reellist equ pathdata+(36*144)
+
+Lenofmapstore equ 22*8*20*8
+Maplen equ mapwidth*maplength
+Freedatlen equ 16*80
+Setdatlen equ 64*128
+Textstart equ 66*2
+
+;-----------------------------------------------------------------Variables----
+
+
+startvars db 0
+progresspoints db 0
+watchon db 0
+shadeson db 0
+secondcount db 0
+minutecount db 30
+hourcount db 19
+zoomon db 1
+location db 0
+expos db 0
+exframepos dw 0
+extextpos dw 0
+card1money dw 0
+listpos dw 0
+ryanpage db 0
+
+
+watchingtime dw 0
+reeltowatch dw -1 ;reel plays from here in mode 0
+endwatchreel dw 0 ;and stops here. Mode set to 1
+speedcount db 0
+watchspeed db 0
+reeltohold dw -1 ;if mode is 1 hold on this reel
+endofholdreel dw -1 ;if mode is 2 then play to end of
+watchmode db -1 ;hold reel. Set mode back to -1
+destafterhold db 0 ;set walking destination.
+
+newsitem db 0
+
+liftflag db 0
+liftpath db 0
+lockstatus db 1
+doorpath db 0
+counttoopen db 0
+counttoclose db 0
+rockstardead db 0
+generaldead db 0
+sartaindead db 0
+aidedead db 0
+beenmugged db 0
+
+gunpassflag db 0
+canmovealtar db 0
+talkedtoattendant db 0
+talkedtosparky db 0
+talkedtoboss db 0
+talkedtorecep db 0
+cardpassflag db 0
+madmanflag db 0
+keeperflag db 0
+lasttrigger db 0
+mandead db 0
+seed db 1,2,3
+needtotravel db 0
+throughdoor db 0
+newobs db 0
+ryanon db 255
+combatcount db 0
+lastweapon db -1
+
+dreamnumber db 0
+roomafterdream db 0
+
+shakecounter db 48
+
+lengthofvars equ $-startvars
+
+
+speechcount db 0
+
+charshift dw 0
+kerning db 0
+
+brightness db 0
+
+roomloaded db 0
+
+didzoom db 0
+
+linespacing dw 10
+textaddressx dw 13
+textaddressy dw 182 ;address on screen for text
+textlen db 0
+lastxpos dw 0
+
+icontop dw 0
+iconleft dw 0
+itemframe db 0
+itemtotran db 0
+roomad dw 0
+oldsubject dw 0
+
+withobject db 0
+withtype db 0
+
+lookcounter dw 0
+
+command db 0
+commandtype db 0
+oldcommandtype db 0
+objecttype db 0
+getback db 0
+invopen db 0
+mainmode db 0
+pickup db 0
+lastinvpos db 0
+examagain db 0
+newtextline db 0
+
+openedob db 0
+openedtype db 0
+
+oldmapadx dw 0
+oldmapady dw 0
+mapadx dw 0
+mapady dw 0
+mapoffsetx dw 104
+mapoffsety dw 38
+
+mapxstart dw 0
+mapystart dw 0
+mapxsize db 0
+mapysize db 0
+
+havedoneobs db 0
+manisoffscreen db 0
+rainspace db 0
+
+facing db 0
+leavedirection db 0
+turntoface db 0
+turndirection db 0
+
+maintimer dw 0
+introcount db 0
+arrowad dw 0
+currentkey db 0
+oldkey db 0
+useddirection db 0
+currentkey2 db 0
+
+timercount db 0
+oldtimercount db 0
+
+mapx db 0
+mapy db 0
+newscreen db 0
+ryanx db 0
+ryany db 0
+lastflag db 0
+lastflagex db 0
+flagx db 0
+flagy db 0
+
+currentex db 0
+currentfree db 0
+currentframe dw 0
+framesad dw 0
+dataad dw 0
+frsegment dw 0
+objectx dw 0
+objecty dw 0
+offsetx dw 0
+offsety dw 0
+savesize dw 0
+savesource dw 0
+savex db 0
+savey db 0
+currentob db 0
+priorityDep db 0 ; dep for deprecated, I leave a byte here to minimize changes to the generated code
+
+destpos db 0
+
+reallocation db 0 ;----------;some rooms have more than one
+roomnum db 0 ;place in the Roomdata list, to
+ ;account for different start points
+nowinnewroom db 0 ;this variable holds the rooms
+resetmanxy db 0 ;real value - ie:which file it's in
+newlocation db -1 ;if set then room is loaded at end of watch mode, or straight away if not in watch mode
+autolocation db -1
+mustload db 0
+answered db 0
+saidno db 0
+
+doorcheck1 db 0
+doorcheck2 db 0
+doorcheck3 db 0
+doorcheck4 db 0
+
+mousex dw 0
+mousey dw 0
+mousebutton dw 0
+mousebutton1 dw 0
+mousebutton2 dw 0
+mousebutton3 dw 0
+mousebutton4 dw 0
+oldbutton dw 0
+oldx dw 0
+oldy dw 0
+lastbutton dw 0
+oldpointerx dw 0
+oldpointery dw 0
+delherex dw 0
+delherey dw 0
+pointerxs db 32
+pointerys db 32
+delxs db 0
+delys db 0
+pointerframe db 0
+pointerpower db 0
+auxpointerframe db 0
+pointermode db 0
+pointerspeed db 0
+pointercount db 0
+inmaparea db 0
+
+reelpointer dw 0
+slotdata db 0
+thisslot db 0
+slotflags db 0
+takeoff dw 0
+
+talkmode db 0
+talkpos db 0
+character db 0
+persondata dw 0
+talknum db 0
+numberinroom db 0
+
+currentcel db 0
+oldselection db 0
+
+stopwalking db 0
+
+mouseon db 0
+played dw 0
+timer1 db 0
+timer2 db 0
+timer3 db 0
+wholetimer dw 0
+timer1to db 0
+timer2to db 0
+timer3to db 0
+
+watchdump db 0
+
+currentset dw 0
+
+logonum db 0
+oldlogonum db 0
+newlogonum db 0
+netseg dw 0
+netpoint dw 0
+keynum db 0
+cursorstate db 0
+
+pressed db 0
+presspointer dw 0
+graphicpress db 0
+presscount db 0
+keypadax dw 0
+keypadcx dw 0
+lightcount db 0
+folderpage db 0
+diarypage db 0
+menucount db 0
+symboltopx db 0
+symboltopnum db 0
+symboltopdir db 0
+symbolbotx db 0
+symbolbotnum db 0
+symbolbotdir db 0
+
+symboltolight db 0
+symbol1 db 0
+symbol2 db 0
+symbol3 db 0
+symbolnum db 0
+dumpx dw 0
+dumpy dw 0
+
+walkandexam db 0
+walkexamtype db 0
+walkexamnum db 0
+
+cursloc dw 0
+curslocx dw 0
+curslocy dw 0
+curpos dw 0
+monadx dw 0
+monady dw 0
+gotfrom dw 0
+
+monsource dw 0
+numtodo dw 0
+
+timecount dw 0
+counttotimed dw 0
+timedseg dw 0
+timedoffset dw 0
+timedy db 0
+timedx db 0
+needtodumptimed db 0
+
+;recordpos dw 0
+;rechandle dw 0
+handle dw 0
+
+loadingorsave db 0 ;1 if load 2 if save
+currentslot db 0
+cursorpos db 0
+
+colourpos db 0
+fadedirection db 0
+numtofade db 0
+fadecount db 0
+addtogreen db 0
+addtored db 0
+addtoblue db 0
+
+
+lastsoundreel dw 0
+
+soundbuffer dw 0
+soundbufferad dw 0
+soundbufferpage db 0
+soundtimes db 0
+needsoundbuff db 0
+
+oldint9seg dw -1
+oldint9add dw -1
+oldint8seg dw -1
+oldint8add dw -1
+oldsoundintseg dw 0
+oldsoundintadd dw 0
+soundbaseadd dw 0
+dsp_status dw 0
+dsp_write dw 0
+dmaaddress db 0
+soundint db 5
+sounddmachannel db 1
+sampleplaying db 255
+testresult db 0
+currentirq db 0
+speechloaded db 0
+speechlength dw 0
+volume db 0
+volumeto db 0
+volumedirection db 0
+volumecount db 0
+
+playblock db 0
+
+wongame db 0
+
+lasthardkey db 0
+bufferin dw 0
+bufferout dw 0
+
+extras dw 0 ;for allocated memory
+workspace dw 0 ;allocated mem for screen buffer
+mapstore dw 0 ;allocated mem for copy of room
+charset1 dw 0 ;allocated mem for normal charset
+tempcharset dw 0 ;monitor char set
+icons1 dw 0 ;allocated mem for on screen stuff
+icons2 dw 0
+buffers dw 0 ;allocated mem for buffers
+mainsprites dw 0 ;allocated mem for Ryan sprites
+backdrop dw 0
+mapdata dw 0
+
+sounddata dw 0
+sounddata2 dw 0
+
+recordspace dw 0
+
+freedat dw 0
+setdat dw 0
+
+reel1 dw -1
+reel2 dw -1
+reel3 dw -1
+roomdesc dw -1
+freedesc dw -1
+setdesc dw -1
+blockdesc dw -1
+setframes dw -1
+freeframes dw -1
+people dw -1
+reels dw -1
+commandtext dw -1
+puzzletext dw -1
+traveltext dw -1
+tempgraphics dw -1
+tempgraphics2 dw -1
+tempgraphics3 dw -1
+tempsprites dw -1
+
+textfile1 dw -1
+textfile2 dw -1
+textfile3 dw -1
+
+blinkframe db 23
+blinkcount db 0
+
+
+reasseschanges db 0 ; if it's a 1 then obname will assume that
+pointerspath db 0 ;the command has changed.
+manspath db 0 ;ie. from "walk to" to "Examine"
+pointerfirstpath db 0
+finaldest db 0
+destination db 0
+linestartx dw 0
+linestarty dw 0
+lineendx dw 0
+lineendy dw 0
+increment1 dw 0
+increment2 dw 0
+lineroutine db 0
+linepointer db 0
+linedirection db 0
+linelength db 0
+
+liftsoundcount db 0
+
+emmhandle dw 0
+emmpageframe dw 0
+emmhardwarepage db 0
+
+ch0emmpage dw 0
+ch0offset dw 0
+ch0blockstocopy dw 0
+
+ch0playing db 0
+ch0repeat db 0
+ch0oldemmpage dw 0
+ch0oldoffset dw 0
+ch0oldblockstocopy dw 0
+
+ch1playing db 255
+ch1emmpage dw 0
+ch1offset dw 0
+ch1blockstocopy dw 0
+ch1blocksplayed dw 0
+
+soundbufferwrite dw 0
+
+soundemmpage dw 0
+speechemmpage dw 0
+
+currentsample db -1
+roomssample db 0
+
+gameerror db 0
+
+howmuchalloc dw 0
+
diff --git a/devtools/tasmrecover/dreamweb/vgafades.asm b/devtools/tasmrecover/dreamweb/vgafades.asm
new file mode 100644
index 0000000000..06cc9d6a44
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/vgafades.asm
@@ -0,0 +1,866 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+Fadedos proc near
+
+ call vsync
+ mov es,buffers
+ mov di,startpal
+ mov al,0
+ mov dx,3c7h
+ out dx,al
+ mov dx,3c9h
+ mov cx,768/4
+dos1: in al,dx
+ stosb
+ loop dos1
+
+ mov cx,64
+fadedosloop: push cx
+
+ mov ds,buffers
+ mov si,startpal
+ mov cx,768
+dos3: lodsb
+ cmp al,0
+ jz nodown
+ dec al
+nodown: mov [si-1],al
+ loop dos3
+
+ call vsync
+ mov ds,buffers
+ mov si,startpal
+ mov al,0
+ mov dx,3c8h
+ out dx,al
+ inc dx
+ mov cx,768/4
+dos2: lodsb
+ out dx,al
+ loop dos2
+
+ pop cx
+ loop fadedosloop
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Dofade proc near
+
+ cmp fadedirection,0
+ jz finishfade
+ mov cl,numtofade
+ mov ch,0
+ mov al,colourpos
+ mov ah,0
+ mov ds,buffers
+ mov si,startpal
+ add si,ax
+ add si,ax
+ add si,ax
+ call showgroup
+ mov al,numtofade
+ add al,colourpos
+ mov colourpos,al
+ cmp al,0
+ jnz finishfade
+ call fadecalculation
+finishfade: ret
+
+ endp
+
+
+
+
+
+
+
+Clearendpal proc near
+
+ mov es,buffers
+ mov di,endpal
+ mov cx,768
+ mov al,0
+ rep stosb
+ ret
+
+ endp
+
+
+
+
+Clearpalette proc near
+
+ mov fadedirection,0
+ call clearstartpal
+ call dumpcurrent
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Fadescreenup proc near
+
+ call clearstartpal
+ call paltoendpal
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ ret
+
+ endp
+
+
+
+
+Fadetowhite proc near
+
+ mov es,buffers
+ mov di,endpal
+ mov cx,768
+ mov al,63
+ rep stosb
+ mov di,endpal
+ mov al,0
+ stosb
+ stosb
+ stosb
+ call paltostartpal
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ ret
+
+ endp
+
+
+
+Fadefromwhite proc near
+
+ mov es,buffers
+ mov di,startpal
+ mov cx,768
+ mov al,63
+ rep stosb
+ mov di,startpal
+ mov al,0
+ stosb
+ stosb
+ stosb
+ call paltoendpal
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Fadescreenups proc near
+
+ call clearstartpal
+ call paltoendpal
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,64
+ ret
+
+ endp
+
+
+
+Fadescreendownhalf proc near
+
+ call paltostartpal
+ call paltoendpal
+ mov cx,768
+ mov es,buffers
+ mov bx,endpal
+halfend: mov al,[es:bx]
+ shr al,1
+ mov [es:bx],al
+ inc bx
+ loop halfend
+
+ mov ds,buffers
+ mov es,buffers
+ mov si,startpal+(56*3)
+ mov di,endpal+(56*3)
+ mov cx,3*5
+ rep movsb
+ mov si,startpal+(77*3)
+ mov di,endpal+(77*3)
+ mov cx,3*2
+ rep movsb
+
+ mov fadedirection,1
+ mov fadecount,31
+ mov colourpos,0
+ mov numtofade,32
+ ret
+
+ endp
+
+
+Fadescreenuphalf proc near
+
+ call endpaltostart
+ call paltoendpal
+ mov fadedirection,1
+ mov fadecount,31
+ mov colourpos,0
+ mov numtofade,32
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Fadescreendown proc near
+
+ call paltostartpal
+ call clearendpal
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ ret
+
+ endp
+
+
+
+Fadescreendowns proc near
+
+ call paltostartpal
+ call clearendpal
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,64
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Clearstartpal proc near
+
+ mov es,buffers
+ mov di,startpal
+ mov cx,256
+wholeloop1: mov ax,0
+ stosw
+ mov al,0
+ stosb
+ loop wholeloop1
+ ret
+
+ endp
+
+
+
+
+
+
+Showgun proc near
+
+ mov addtored,0 ;12
+ mov addtogreen,0
+ mov addtoblue,0
+ call paltostartpal
+ call paltoendpal
+ call greyscalesum
+
+; mov es,buffers
+; mov di,endpal+3
+; mov cx,255
+; mov ax,0
+;reds: mov byte ptr [es:di],63
+; inc di
+; stosw
+; loop reds
+
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ mov cx,130
+ call hangon
+ call endpaltostart
+ call clearendpal
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ mov cx,200
+ call hangon
+ mov roomssample,34
+ call loadroomssample
+ mov volume,0
+ mov dx,offset cs:gungraphic
+ call loadintotemp
+ call createpanel2
+ mov ds,tempgraphics
+ mov al,0
+ mov ah,0
+ mov di,100
+ mov bx,4
+ call showframe
+ mov ds,tempgraphics
+ mov al,1
+ mov ah,0
+ mov di,158
+ mov bx,106
+ call showframe
+ call worktoscreen
+ call getridoftemp
+ call fadescreenup
+ mov cx,160
+ call hangon
+ mov al,12
+ mov ah,0
+ call playchannel0
+ mov dx,offset cs:endtextname
+ call loadtemptext
+ call rollendcredits2
+ call getridoftemptext
+ ret
+
+ endp
+
+
+
+
+
+Rollendcredits2 proc near
+
+ call rollem
+ ret
+
+ endp
+
+
+
+
+Rollem proc near
+
+ mov cl,160
+ mov ch,160
+ mov di,25
+ mov bx,20
+ mov ds,mapstore
+ mov si,0
+ call multiget
+
+ mov es,textfile1
+ mov si,49*2
+ mov ax,[es:si]
+ mov si,ax
+ add si,textstart
+
+ mov cx,80
+endcredits21: push cx
+
+ mov bx,10
+ mov cx,linespacing
+endcredits22: push cx si di es bx
+
+ call vsync
+ mov cl,160
+ mov ch,160
+ mov di,25
+ mov bx,20
+ mov ds,mapstore
+ mov si,0
+ call multiput
+ call vsync
+ pop bx es di si
+ push si di es bx
+
+ mov cx,18
+onelot2: push cx
+ mov di,25 ;75
+ mov dx,161
+ mov ax,0
+ call printdirect
+ add bx,linespacing
+ pop cx
+ loop onelot2
+
+ call vsync
+ mov cl,160
+ mov ch,160
+ mov di,25 ;75
+ mov bx,20
+ call multidump
+
+ pop bx es di si cx
+ cmp lasthardkey,1
+ jz endearly2
+ dec bx
+ loop endcredits22
+ pop cx
+looknext2: mov al,[es:si]
+ inc si
+ cmp al,":"
+ jz gotnext2
+ cmp al,0
+ jz gotnext2
+ jmp looknext2
+gotnext2: cmp lasthardkey,1
+ jz endearly
+ loop endcredits21
+
+ mov cx,120
+ call hangone
+ ret
+endearly2: pop cx
+endearly: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Fadecalculation proc near
+
+ cmp fadecount,0
+ jz nomorefading
+ mov bl,fadecount
+ mov es,buffers
+ mov si,startpal
+ mov di,endpal
+ mov cx,768
+fadecolloop: mov al,[es:si]
+ mov ah,[es:di]
+ cmp al,ah
+ jz gotthere
+ jc lesscolour
+ dec byte ptr [es:si]
+ jmp gotthere
+lesscolour: cmp bl,ah
+ jz withit
+ jnc gotthere
+withit: inc byte ptr [es:si]
+gotthere: inc si
+ inc di
+ loop fadecolloop
+ dec fadecount
+ ret
+nomorefading: mov fadedirection,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Greyscalesum proc near ;converts palette to grey scale
+ ;summed using formula:
+ mov es,buffers ; .20xred + .59xGreen + .11xBlue
+ mov si,maingamepal
+ mov di,endpal
+ mov cx,256 ;convert 256 colours
+
+greysumloop1: push cx
+ mov bx,0
+ mov al,[es:si]
+ mov ah,0
+ mov cx,20
+ mul cx
+ add bx,ax
+ mov al,[es:si+1]
+ mov ah,0
+ mov cx,59
+ mul cx
+ add bx,ax
+ mov al,[es:si+2]
+ mov ah,0
+ mov cx,11
+ mul cx
+ add bx,ax ;bx holds equationx100
+
+ mov al,-1 ;divide result by 100
+greysumloop2: inc al
+ sub bx,100
+ jnc greysumloop2 ;ah holds grey scale number
+ mov bl,al
+
+ mov al,bl
+ mov ah,addtored
+ cmp al,0
+ ;jz noaddr
+ add al,ah
+noaddr: stosb
+ mov ah,addtogreen
+ mov al,bl
+ cmp al,0
+ jz noaddg
+ add al,ah
+noaddg: stosb ;store result in red, green and
+ mov ah,addtoblue
+ mov al,bl
+ cmp al,0
+ jz noaddb
+ add al,ah
+noaddb: stosb ;blue portions of palette.
+
+ add si,3
+ pop cx
+ loop greysumloop1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Showgroup proc near
+
+ mov dx,3c8h
+ out dx,al
+ mov dx,3c9h
+showgroup1: lodsb
+ out dx,al
+ lodsb
+ out dx,al
+ lodsb
+ out dx,al
+ loop showgroup1
+ ret
+
+ endp
+
+
+
+
+
+Paltostartpal proc near
+
+ mov es,buffers
+ mov ds,buffers
+ mov si,maingamepal
+ mov di,startpal
+ mov cx,768/2
+ rep movsw
+ ret
+
+ endp
+
+
+
+Endpaltostart proc near
+
+ mov es,buffers
+ mov ds,buffers
+ mov si,endpal
+ mov di,startpal
+ mov cx,768/2
+ rep movsw
+ ret
+
+ endp
+
+
+Startpaltoend proc near
+
+ mov es,buffers
+ mov ds,buffers
+ mov di,endpal
+ mov si,startpal
+ mov cx,768/2
+ rep movsw
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Paltoendpal proc near
+
+ mov es,buffers
+ mov ds,buffers
+ mov di,endpal
+ mov si,maingamepal
+ mov cx,768/2
+ rep movsw
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+
+Allpalette proc near
+
+ mov es,buffers
+ mov ds,buffers
+ mov di,startpal
+ mov si,maingamepal
+ mov cx,768/2
+ rep movsw
+ call dumpcurrent
+ ret
+
+ endp
+
+
+
+
+
+Dumpcurrent proc near
+
+ mov si,startpal
+ mov ds,buffers
+ call vsync
+ mov al,0
+ mov cx,128
+ call showgroup
+ call vsync
+ mov al,128
+ mov cx,128
+ call showgroup
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+Fadedownmon proc near
+
+ call paltostartpal
+ call paltoendpal
+ mov es,buffers
+ mov di,endpal+(231*3)
+ mov cx,3*8
+ mov ax,0
+ rep stosb
+ mov di,endpal+(246*3)
+ stosb
+ stosw
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ mov cx,64 ;100
+ call hangon ;curs
+ ret
+
+ endp
+
+
+
+
+
+Fadeupmon proc near
+
+ call paltostartpal
+ call paltoendpal
+ mov es,buffers
+ mov di,startpal+(231*3)
+ mov cx,3*8
+ mov ax,0
+ rep stosb
+ mov di,startpal+(246*3)
+ stosb
+ stosw
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ mov cx,128
+ call hangon ;curs
+ ret
+
+ endp
+
+
+
+
+
+Fadeupmonfirst proc near
+
+ call paltostartpal
+ call paltoendpal
+ mov es,buffers
+ mov di,startpal+(231*3)
+ mov cx,3*8
+ mov ax,0
+ rep stosb
+ mov di,startpal+(246*3)
+ stosb
+ stosw
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ mov cx,64
+ call hangon
+ mov al,26
+ call playchannel1
+ mov cx,64
+ call hangon
+
+ ret
+
+ endp
+
+
+
+
+
+
+
+Fadeupyellows proc near
+
+ ;call startpaltoend
+ call paltoendpal
+ mov es,buffers
+ mov di,endpal+(231*3)
+ mov cx,3*8
+ mov ax,0
+ rep stosb
+ mov di,endpal+(246*3)
+ stosb
+ stosw
+ mov fadedirection,1
+ mov fadecount,63
+ mov colourpos,0
+ mov numtofade,128
+ mov cx,128
+ call hangon
+ ret
+
+ endp
+
+
+
+Initialmoncols proc near
+
+ call paltostartpal
+ mov es,buffers
+ mov di,startpal+(230*3)
+ mov cx,3*9
+ mov ax,0
+ rep stosb
+ mov di,startpal+(246*3)
+ stosb
+ stosw
+ mov ds,buffers
+ mov si,startpal+(230*3)
+ mov al,230
+ mov cx,18
+ call showgroup
+ ret
+
+ endp
+
+
diff --git a/devtools/tasmrecover/dreamweb/vgagrafx.asm b/devtools/tasmrecover/dreamweb/vgagrafx.asm
new file mode 100644
index 0000000000..110fc95ee0
--- /dev/null
+++ b/devtools/tasmrecover/dreamweb/vgagrafx.asm
@@ -0,0 +1,1762 @@
+;Copyright (c) 1990-2011 by Neil Dodwell
+;Released with permission from Neil Dodwell under GPLv2
+;See LICENSE file for full license text
+Screenwidth equ 320 ;physical width of screen
+
+
+
+Allocatework proc near
+
+ mov bx,1000h
+ call allocatemem
+ mov workspace,ax
+ ret
+
+ endp
+
+
+
+
+
+Showpcx proc near
+
+ call openfile
+ mov bx,handle
+ mov ds,workspace
+ mov ah,3fh
+ mov cx,128
+ mov dx,0
+ int 21h
+
+ mov ds,workspace
+ mov si,16
+ mov cx,48
+ mov es,buffers
+ mov di,maingamepal
+pcxpal: push cx
+ call readabyte
+ shr al,1
+ shr al,1
+ stosb
+ pop cx
+ loop pcxpal
+ mov cx,768-48
+ mov ax,0ffffh
+ rep stosw
+
+ call readoneblock
+ mov si,0
+ mov di,0
+ mov cx,480
+convertpcx: push cx
+ push di
+ mov ds,workspace
+ mov es,buffers
+ mov di,pointerback
+ mov bx,0
+sameline: call readabyte
+ mov ah,al
+ and ah,11000000b
+ cmp ah,11000000b
+ jnz normal
+ mov cl,al
+ and cl,00111111b
+ mov ch,0
+ push cx
+ call readabyte
+ pop cx
+ add bx,cx
+ rep stosb
+ cmp bx,4*80
+ jnz sameline
+ jmp endline
+normal: stosb
+ inc bx
+ cmp bx,4*80
+ jnz sameline
+
+endline: pop di
+ push si
+ mov dx,0a000h
+ mov es,dx
+ mov si,pointerback
+ mov ds,buffers
+
+ mov dx,03c4h
+ mov al,2
+ mov ah,1
+ out dx,ax
+ mov cx,40
+ push di
+ rep movsw
+ pop di
+ mov ah,2
+ out dx,ax
+ mov cx,40
+ push di
+ rep movsw
+ pop di
+ mov ah,4
+ out dx,ax
+ mov cx,40
+ push di
+ rep movsw
+ pop di
+ mov ah,8
+ out dx,ax
+ mov cx,40
+ rep movsw
+
+ pop si
+ pop cx
+ loop convertpcx
+
+ mov bx,handle
+ call closefile
+ ret
+
+ endp
+
+
+
+
+Readabyte proc near
+
+ cmp si,30000
+ jnz notendblock
+ push bx es di ds si
+ call readoneblock
+ pop si ds di es bx
+ mov si,0
+notendblock: lodsb
+ ret
+
+ endp
+
+
+
+
+Readoneblock proc near
+
+ mov bx,handle
+ mov ah,3fh
+ mov ds,workspace
+ mov ah,3fh
+ mov cx,30000
+ mov dx,0
+ int 21h
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Loadpalfromiff proc near
+
+ mov dx,offset cs:palettescreen
+ call openfile
+ mov cx,2000
+ mov ds,mapstore
+ mov dx,0
+ call readfromfile
+ call closefile
+ mov es,buffers
+ mov di,maingamepal
+ mov ds,mapstore
+ mov si,30h
+ mov cx,768
+palloop: lodsb
+ shr al,1
+ shr al,1
+
+ cmp brightness,1
+ jnz nought
+ cmp al,0
+ jz nought
+ mov ah,al
+ shr ah,1
+ add al,ah
+ shr ah,1
+ add al,ah
+ cmp al,64
+ jc nought
+ mov al,63
+
+nought: stosb
+ loop palloop
+ ret
+
+ endp
+
+
+
+
+
+
+Setmode proc near
+
+ call vsync
+ mov ah,12h
+ mov al,1
+ mov bl,33h
+ int 10h
+
+ mov ah,0
+ mov al,13h
+ int 10h
+
+ mov al,6 ; sets graphic controller
+ mov dx,3ceh ; register 6 (MM) to 1 - 64K
+ out dx,al
+ inc dx
+ in al,dx
+ and al,11110011b
+ or al,00000100b
+ out dx,al
+
+ mov al,4 ; sets sequencer
+ mov dx,3c4h ; register 4 (EM) to 1 - >64K
+ out dx,al
+ inc dx
+ in al,dx
+ and al,11111101b
+ or al,00000010b
+ out dx,al
+
+ mov al,13h ;give screen 16 extra hidden
+ mov dx,3d4h ;pixels at one side
+ out dx,al
+ inc dx
+ mov al,screenwidth/8 ; width of screen
+ out dx,al
+
+ mov al,8h
+ mov dx,3d4h
+ out dx,al
+ inc dx
+ mov al,00000000b
+ out dx,al
+
+ mov al,11h
+ mov dx,3d4h
+ out dx,al
+ inc dx
+ in al,dx
+ or al,128
+ out dx,al
+
+ mov al,00
+ mov dx,3d4h
+ out dx,al
+ inc dx
+ mov al,3fh
+ out dx,al
+ mov al,01
+ mov dx,3d4h
+ out dx,al
+ inc dx
+ mov al,3fh
+ out dx,al
+ ret
+
+ endp
+
+
+
+Cls proc near
+
+ mov ax,0a000h
+ mov es,ax
+ mov di,0
+ mov cx,7fffh
+ mov ax,0
+ rep stosw
+ ret
+
+ endp
+
+
+
+Printundermon proc near ;prints workspace through the text
+
+ mov si,(screenwidth*43)+76
+ mov di,si
+ mov es,workspace
+ add si,8*screenwidth
+ mov dx,0a000h
+ mov ds,dx
+ mov cx,104
+scrollmonloop1: push cx di si
+ mov cx,170
+scrollmonloop2: lodsb
+ cmp al,231
+ jnc dontplace
+placeit: stosb
+ loop scrollmonloop2
+ jmp finmonscroll
+dontplace: inc di
+ loop scrollmonloop2
+
+finmonscroll: pop si di cx
+ add si,screenwidth
+ add di,screenwidth
+ loop scrollmonloop1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+Worktoscreen proc near
+
+ call vsync
+ mov si,0
+ mov di,0
+ mov cx,25
+ mov ds,workspace
+ mov dx,0a000h
+ mov es,dx
+
+dumpallloop: call width160
+ call width160
+ call width160
+ call width160
+ call width160
+ call width160
+ call width160
+ call width160
+ loop dumpallloop
+
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+;
+;Worktoscreen2 proc near
+;
+; call showpointer
+;
+; mov ds,workspace
+; mov dx,0a000h
+; mov es,dx
+;
+; mov si,320-16
+; mov di,320-16
+; mov bl,33
+; mov cx,16
+;screen2loop1: push di si cx
+; call vsync
+; cmp bl,21
+; jc screen2loop2
+; sub cx,16
+; jz isoneblock
+;screen2loop2: movsw
+; movsw
+; movsw
+; movsw
+; movsw
+; movsw
+; movsw
+; movsw
+; add di,320-15
+; add si,320-15
+; loop screen2loop2
+;isoneblock: mov cx,16
+; mov ax,320-15
+;oneblockloop: push cx
+; rep movsb
+; pop cx
+; add si,ax
+; add di,ax
+; inc ax
+; loop oneblockloop
+;
+; pop cx si di
+; add cx,16
+; cmp cx,200
+; jc itsallright
+; mov cx,200
+;itsallright: sub si,16
+; sub di,16
+; dec bl
+; jnz screen2loop1
+;
+; call delpointer
+; ret
+;
+; endp
+;
+;
+;
+;
+
+
+
+
+Paneltomap proc near
+
+ mov di,mapxstart
+ add di,mapadx
+ mov bx,mapystart
+ add bx,mapady
+ mov ds,mapstore
+ mov si,0
+ mov cl,mapxsize
+ mov ch,mapysize
+ call multiget
+ ret
+
+ endp
+
+
+
+Maptopanel proc near
+
+ mov di,mapxstart
+ add di,mapadx
+ mov bx,mapystart
+ add bx,mapady
+ mov ds,mapstore
+ mov si,0
+ mov cl,mapxsize
+ mov ch,mapysize
+ call multiput
+
+ ret
+
+ endp
+
+
+
+
+
+Dumpmap proc near
+
+ mov di,mapxstart
+ add di,mapadx
+ mov bx,mapystart
+ add bx,mapady
+ mov cl,mapxsize
+ mov ch,mapysize
+ call multidump
+ ret
+
+ endp
+
+
+
+
+Pixelcheckset proc near ;al=x, ah=y, es:bx=setlist pos
+ ;checks exact pixel in a frame
+ push ax
+ sub al,[es:bx] ;for detection.
+ sub ah,[es:bx+1] ;al,ah now holds offset within
+ ;the frame
+ push es bx cx ax
+ mov al,[es:bx+4] ;object number
+ call getsetad
+ mov al,[es:bx+17] ;finds frame number
+ mov es,setframes
+ mov bx,framedata
+ mov ah,0
+ mov cx,6
+ mul cx
+ add bx,ax ;get data for this frame in es:bx
+ pop ax
+
+ push ax
+ mov al,ah
+ mov ah,0
+ mov cl,[es:bx]
+ mov ch,0
+ mul cx
+ pop cx
+ mov ch,0
+ add ax,cx ;ax now holds offset from corner
+ ;of the frame
+ add ax,[es:bx+2]
+ mov bx,ax ;es:bx now holds offset of pixel!
+ add bx,frames
+
+ mov al,[es:bx]
+ mov dl,al
+ pop cx bx es ax
+ cmp dl,0
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+
+
+Createpanel proc near
+
+ mov di,0
+ mov bx,8
+ mov ds,icons2
+ mov al,0
+ mov ah,2
+ call showframe ;spritef
+ mov di,160
+ mov bx,8
+ mov ds,icons2
+ mov al,0
+ mov ah,2
+ call showframe ;spritef
+ mov di,0
+ mov bx,104
+ mov ds,icons2
+ mov al,0
+ mov ah,2
+ call showframe ;spritef
+ mov di,160
+ mov bx,104
+ mov ds,icons2
+ mov al,0
+ mov ah,2
+ call showframe ;spritef
+ ret
+
+ endp
+
+
+
+Createpanel2 proc near
+
+ call createpanel
+ mov di,0
+ mov bx,0
+ mov ds,icons2
+ mov al,5
+ mov ah,2
+ call showframe
+ mov di,160
+ mov bx,0
+ mov ds,icons2
+ mov al,5
+ mov ah,2
+ call showframe
+ ret
+
+ endp
+
+
+
+
+
+
+;Showspritef proc near
+;
+; mov ax,bx
+; mov bx,screenwidth
+; mul bx
+; add di,ax
+; mov dx,screenwidth
+; mov es,workspace
+; mov si,2080
+; mov ah,0
+; add ax,ax
+; mov bx,ax
+; add ax,ax
+; add bx,ax
+; add si,[bx+2]
+; mov cx,[bx+0]
+;spritefloop: push cx di
+; call width80
+; pop di cx
+; add di,dx
+; dec ch
+; jnz spritefloop
+; ret
+;
+; endp
+;
+;
+
+
+
+
+
+
+
+
+Clearwork proc near
+
+ mov ax,0h
+ mov es,workspace
+ mov di,0
+ mov cx,(200*320)/64
+clearloop: stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ loop clearloop
+ ret
+
+ endp
+
+
+
+
+
+
+Vsync proc near
+
+ push ax bx cx dx si di ds es
+
+ mov dx,03dah
+loop2: in al,dx
+ test al,8
+ jz loop2
+loop1: in al,dx
+ test al,8
+ jnz loop1
+
+ call doshake
+ call dofade
+ if debuglevel2
+ call debugkeys
+ endif
+ pop es ds di si dx cx bx ax
+ ret
+
+ endp
+
+
+
+Doshake proc near
+
+ cmp shakecounter,48
+ jz finishshake
+ inc shakecounter
+ mov bl,shakecounter
+ mov bh,0
+ add bx,offset cs:shaketable
+ mov al,10h
+ mov dx,3d4h
+ out dx,al
+ inc dx
+ mov al,[cs:bx]
+ out dx,al
+finishshake: ret
+
+shaketable: db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9eh
+ db 9ch,9ah,9fh,9ah,9ch,9eh,0a0h,9bh,9dh,99h,9fh,9ch
+
+ endp
+
+
+
+
+
+
+Zoom proc near
+
+ cmp watchingtime,0
+ jnz inwatching
+ cmp zoomon,1
+ jz zoomswitch
+inwatching: ret
+
+zoomswitch: cmp commandtype,199
+ jc zoomit
+cantzoom: call putunderzoom
+ ret
+
+zoomit: mov ax,oldpointery
+ sub ax,9
+ mov cx,screenwidth
+ mul cx
+ add ax,oldpointerx
+ sub ax,11
+ mov si,ax
+
+ mov ax,zoomy+4
+ mov cx,screenwidth
+ mul cx
+ add ax,zoomx+5
+ mov di,ax
+ mov es,workspace
+ mov ds,workspace
+
+ mov cx,20
+zoomloop: push cx
+ mov cx,23
+zoomloop2: lodsb
+ mov ah,al
+ stosw
+ mov [es:di+screenwidth-2],ax
+ loop zoomloop2
+ add si,screenwidth-23
+ add di,screenwidth-46+screenwidth
+ pop cx
+ loop zoomloop
+
+ call crosshair
+ mov didzoom,1
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Delthisone proc near
+
+ push ax
+ push ax
+ mov al,ah
+ mov ah,0
+ add ax,mapady
+ mov bx,screenwidth
+ mul bx
+ pop bx
+ mov bh,0
+ add bx,mapadx
+ add ax,bx
+ mov di,ax
+ pop ax
+ push ax
+ mov al,ah
+ mov ah,0
+ mov bx,22*8
+ mul bx
+ pop bx
+ mov bh,0
+ add ax,bx
+ mov si,ax
+
+ mov es,workspace
+ mov ds,mapstore
+ mov dl,cl
+ mov dh,0
+ mov ax,screenwidth
+ sub ax,dx
+ neg dx
+ add dx,22*8
+deloneloop: push cx
+ mov ch,0
+ rep movsb
+ pop cx
+ add di,ax
+ add si,dx
+ dec ch
+ jnz deloneloop
+ ret
+
+ endp
+
+
+
+
+
+
+
+;------------------------------------------------------------Pointer update----
+
+
+Multiget proc near ;di,bx = dest x,y
+ ;cl,ch = size
+ mov ax,bx ;si,di = storage
+ mov bx,screenwidth
+ mul bx
+ add di,ax
+
+ mov es,workspace
+ push es ds
+ pop es ds
+ xchg di,si
+ mov al,cl
+ mov ah,0
+ mov dx,screenwidth
+ sub dx,ax
+
+ mov al,cl
+ and al,1
+ jnz oddwidth2
+
+ mov bl,cl
+ mov bh,0
+ mov ax,offset cs:width0
+ shr bx,1
+ sub ax,bx
+ mov cl,ch
+ mov ch,0
+multiloop3: call ax
+ add si,dx
+ loop multiloop3
+ ret
+
+oddwidth2: mov bl,cl
+ mov bh,0
+ shr bx,1
+ mov ax,offset cs:width0
+ sub ax,bx
+ mov cl,ch
+ mov ch,0
+multiloop4: call ax
+ movsb
+ add si,dx
+ loop multiloop4
+ ret
+
+ endp
+
+
+
+
+
+
+
+Multiput proc near ;di,bx = dest x,y
+ ;cl,ch = size
+ mov ax,bx ;si,di = storage
+ mov bx,screenwidth
+ mul bx
+ add di,ax
+
+ mov es,workspace
+ mov al,cl
+ mov ah,0
+ mov dx,screenwidth
+ sub dx,ax
+
+ mov al,cl
+ and al,1
+ jnz oddwidth3
+
+ mov bl,cl
+ mov bh,0
+ shr bx,1
+ mov ax,offset cs:width0
+ sub ax,bx
+ mov cl,ch
+ mov ch,0
+multiloop5: call ax
+ add di,dx
+ loop multiloop5
+ ret
+
+oddwidth3: mov bl,cl
+ mov bh,0
+ shr bx,1
+ mov ax,offset cs:width0
+ sub ax,bx
+ mov cl,ch
+ mov ch,0
+multiloop6: call ax
+ movsb
+ add di,dx
+ loop multiloop6
+ ret
+
+
+ endp
+
+
+
+
+
+
+
+
+
+Multidump proc near ;di,bx = dest x,y
+ ;cl,ch = size
+ mov dx,0a000h
+ mov es,dx
+ mov ds,workspace
+
+ mov ax,bx
+ mov bx,screenwidth
+ mul bx
+ add di,ax
+ mov dx,screenwidth
+ mov si,di
+
+ mov al,cl
+ and al,1
+ jnz oddwidth
+
+ mov bl,cl
+ mov bh,0
+ shr bx,1
+ mov ax,offset cs:width0
+ sub ax,bx
+ mov bl,cl
+ mov bh,0
+ neg bx
+ add bx,dx
+ mov cl,ch
+ mov ch,0
+multiloop1: call ax
+ add di,bx
+ add si,bx
+ loop multiloop1
+ ret
+
+oddwidth: mov bl,cl
+ mov bh,0
+ shr bx,1
+ mov ax,offset cs:width0
+ sub ax,bx
+ mov bl,cl
+ mov bh,0
+ neg bx
+ add bx,screenwidth
+ mov cl,ch
+ mov ch,0
+multiloop2: call ax
+ movsb
+ add di,bx
+ add si,bx
+ loop multiloop2
+ ret
+
+ endp
+
+
+
+
+
+Width160 proc near
+
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+width128: movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+width110: movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+width88: movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+width80: movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+width63: movsw
+width62: movsw
+width61: movsw
+width60: movsw
+width59: movsw
+width58: movsw
+width57: movsw
+width56: movsw
+width55: movsw
+width54: movsw
+width53: movsw
+width52: movsw
+width51: movsw
+width50: movsw
+width49: movsw
+width48: movsw
+width47: movsw
+width46: movsw
+width45: movsw
+width44: movsw
+width43: movsw
+width42: movsw
+width41: movsw
+width40: movsw
+width39: movsw
+width38: movsw
+width37: movsw
+width36: movsw
+width35: movsw
+width34: movsw
+width33: movsw
+width32: movsw
+width31: movsw
+width30: movsw
+width29: movsw
+width28: movsw
+width27: movsw
+width26: movsw
+width25: movsw
+width24: movsw
+width23: movsw
+width22: movsw
+width21: movsw
+width20: movsw
+width19: movsw
+width18: movsw
+width17: movsw
+width16: movsw
+width15: movsw
+width14: movsw
+width13: movsw
+width12: movsw
+width11: movsw
+width10: movsw
+width9: movsw
+width8: movsw
+width7: movsw
+width6: movsw
+width5: movsw
+width4: movsw
+width3: movsw
+width2: movsw
+width1: movsw
+width0: ret
+
+ endp
+
+
+
+
+
+
+
+
+
+Doblocks proc near
+
+ mov es,workspace
+ mov ax,mapady
+ mov cx,screenwidth
+ mul cx
+ mov di,mapadx
+ add di,ax
+
+ mov al,mapy
+ mov ah,0
+ mov bx,mapwidth
+ mul bx
+ mov bl,mapx
+ mov bh,0
+ add ax,bx
+
+ mov si,map
+ add si,ax
+
+ mov cx,10
+loop120: push di cx
+ mov cx,11
+loop124: push cx di
+
+ mov ds,mapdata
+ lodsb
+ mov ds,backdrop
+
+ push si
+ cmp al,0
+ jz zeroblock
+ mov ah,al
+ mov al,0
+ mov si,blocks
+ add si,ax
+ mov bh,14
+
+
+ mov bh,4
+firstbitofblock: movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ add di,screenwidth-16
+ dec bh
+ jnz firstbitofblock
+
+ mov bh,12
+loop125: movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ movsw
+ mov ax,0dfdfh
+ stosw
+ stosw
+
+ add di,screenwidth-20
+ dec bh
+ jnz loop125
+
+ add di,4
+ mov ax,0dfdfh
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ add di,screenwidth-16
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ add di,screenwidth-16
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ add di,screenwidth-16
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+ stosw
+
+
+zeroblock: pop si
+
+ pop di cx
+ add di,16
+ loop loop124
+ add si,mapwidth-11
+ pop cx di
+ add di,screenwidth*16
+ loop loop120
+ ret
+
+ endp
+
+
+
+
+
+
+
+;----------------------------------------------General sprite output routine----
+
+Showframe proc near ; shows a frame from sprites
+
+ push dx ax ; es=destination
+ mov cx,ax ; ds=source
+ and cx,511 ; di=x, bx=y
+ add cx,cx ; al=frame number
+ mov si,cx ; ah=effects flag
+ add cx,cx
+ add si,cx
+ cmp word ptr [si],0
+ jnz notblankshow
+ pop ax dx
+ mov cx,0
+ ret
+
+notblankshow: test ah,128
+ jnz skipoffsets
+ mov al,[si+4]
+ mov ah,0
+ add di,ax
+ mov al,[si+5]
+ mov ah,0
+ add bx,ax
+skipoffsets: mov cx,[si+0]
+ mov ax,[si+2]
+ add ax,2080
+ mov si,ax
+ pop ax dx
+ cmp ah,0
+ jz noeffects
+
+ test ah,128
+ jz notcentred
+ push ax
+ mov al,cl
+ mov ah,0
+ shr ax,1
+ sub di,ax
+ mov al,ch
+ mov ah,0
+ shr ax,1
+ sub bx,ax
+ pop ax
+
+notcentred: test ah,64
+ jz notdiffdest
+ push cx
+ call frameoutfx
+ pop cx
+ ret
+
+notdiffdest: test ah,8
+ jz notprintlist
+ push ax
+ mov ax,di
+ sub ax,mapadx
+ push bx
+ sub bx,mapady
+ mov ah,bl
+ pop bx
+ ;call addtoprintlist
+ pop ax
+
+notprintlist: test ah,4
+ jz notflippedx
+ mov dx,screenwidth
+ mov es,workspace
+ push cx
+ call frameoutfx
+ pop cx
+ ret
+
+notflippedx: test ah,2
+ jz notnomask
+ mov dx,screenwidth
+ mov es,workspace
+ push cx
+ call frameoutnm
+ pop cx
+ ret
+
+notnomask: test ah,32
+ jz noeffects
+ mov dx,screenwidth
+ mov es,workspace
+ push cx
+ call frameoutbh
+ pop cx
+ ret
+
+noeffects: mov dx,screenwidth
+ mov es,workspace
+ push cx
+ call frameoutv
+ pop cx ; returns size printed in cx
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Frameoutv proc near
+
+ push dx
+ mov ax,bx
+ mov bx,dx
+ mul bx
+ add di,ax
+ pop dx
+
+ push cx
+ mov ch,0
+ sub dx,cx
+ pop cx
+
+frameloop1: push cx
+ mov ch,0
+
+frameloop2: lodsb
+ cmp al,0
+ jnz backtosolid
+backtoother: inc di
+ loop frameloop2
+ pop cx
+ add di,dx
+ dec ch
+ jnz frameloop1
+ ret
+
+frameloop3: lodsb
+ cmp al,0
+ jz backtoother
+backtosolid: stosb
+ loop frameloop3
+ pop cx
+ add di,dx
+ dec ch
+ jnz frameloop1
+ ret
+
+ endp
+
+
+
+
+
+
+Frameoutnm proc near
+
+ push dx
+ mov ax,bx
+ mov bx,dx
+ mul bx
+ add di,ax
+ pop dx
+
+ push cx
+ mov ch,0
+ sub dx,cx
+ pop cx
+
+ mov al,cl
+ and al,1
+ jnz oddwidthframe
+
+ mov bl,cl
+ mov bh,0
+ mov ax,offset cs:width0
+ shr bx,1
+ sub ax,bx
+ mov cl,ch
+ mov ch,0
+nmloop1: call ax
+ add di,dx
+ loop nmloop1
+ ret
+
+oddwidthframe: mov bl,cl
+ mov bh,0
+ shr bx,1
+ mov ax,offset cs:width0
+ sub ax,bx
+ mov cl,ch
+ mov ch,0
+nmloop2: call ax
+ movsb
+ add di,dx
+ loop nmloop2
+ ret
+
+ endp
+
+
+
+
+
+
+Frameoutbh proc near
+
+ push dx
+ mov ax,bx
+ mov bx,dx
+ mul bx
+ add di,ax
+ pop dx
+
+ push cx
+ mov ch,0
+ sub dx,cx
+ pop cx
+
+bhloop2: push cx
+ mov ch,0
+ mov ah,255
+bhloop1: cmp [es:di],ah
+ jnz nofill
+ movsb
+ loop bhloop1
+ jmp nextline
+nofill: inc di
+ inc si
+ loop bhloop1
+nextline: add di,dx
+ pop cx
+ dec ch
+ jnz bhloop2
+ ret
+
+ endp
+
+
+
+
+
+
+
+Frameoutfx proc near
+
+ push dx
+ mov ax,bx
+ mov bx,dx
+ mul bx
+ add di,ax
+ pop dx
+
+ push cx
+ mov ch,0
+ add dx,cx
+ pop cx
+
+frameloopfx1: push cx
+ mov ch,0
+
+frameloopfx2: lodsb
+ cmp al,0
+ jnz backtosolidfx
+backtootherfx: dec di
+ loop frameloopfx2
+ pop cx
+ add di,dx
+ dec ch
+ jnz frameloopfx1
+ ret
+
+frameloopfx3: lodsb
+ cmp al,0
+ jz backtootherfx
+backtosolidfx: mov [es:di],al
+ dec di
+ loop frameloopfx3
+ pop cx
+ add di,dx
+ dec ch
+ jnz frameloopfx1
+ ret
+
+ endp
+
+
+
+
+;---------------------------------------------------Transfers for extra data----
+
+Transferinv proc near
+
+ mov di,exframepos
+ push di
+ mov al,expos
+ mov ah,0
+ mov bx,ax
+ add ax,ax
+ add ax,bx
+ inc ax
+ mov cx,6
+ mul cx
+ mov es,extras
+ mov bx,exframedata
+ add bx,ax
+ add di,exframes
+
+ push bx
+ mov al,itemtotran
+ mov ah,0
+ mov bx,ax
+ add ax,ax
+ add ax,bx
+ inc ax
+ mov cx,6
+ mul cx
+ mov ds,freeframes
+ mov bx,frframedata
+ add bx,ax
+ mov si,frframes
+ mov al,[bx]
+ mov ah,0
+ mov cl,[bx+1]
+ mov ch,0
+ add si,[bx+2] ;we have si, and length
+ mov dx,[bx+4]
+ pop bx
+ mov [es:bx+0],al
+ mov [es:bx+1],cl
+ mov [es:bx+4],dx
+
+ mul cx
+ mov cx,ax
+ push cx
+ rep movsb
+ pop cx
+ pop ax
+ mov [es:bx+2],ax
+ add exframepos,cx
+ ret
+
+ endp
+
+
+
+
+
+
+
+
+
+
+Transfermap proc near
+
+ mov di,exframepos
+ push di
+ mov al,expos
+ mov ah,0
+ mov bx,ax
+ add ax,ax
+ add ax,bx
+ mov cx,6
+ mul cx
+ mov es,extras
+ mov bx,exframedata
+ add bx,ax
+ add di,exframes
+
+ push bx
+ mov al,itemtotran
+ mov ah,0
+ mov bx,ax
+ add ax,ax
+ add ax,bx
+ mov cx,6
+ mul cx
+ mov ds,freeframes
+ mov bx,frframedata
+ add bx,ax
+ mov si,frframes
+ mov al,[bx]
+ mov ah,0
+ mov cl,[bx+1]
+ mov ch,0
+ add si,[bx+2] ;we have si, and length
+ mov dx,[bx+4]
+ pop bx
+ mov [es:bx+0],al
+ mov [es:bx+1],cl
+ mov [es:bx+4],dx
+
+ mul cx
+ mov cx,ax
+ push cx
+ rep movsb
+ pop cx
+ pop ax
+ mov [es:bx+2],ax
+ add exframepos,cx
+ ret
+
+ endp
+
+
+;------------------------------------------------------------------Filenames----
+
+
+Spritename1 db "DREAMWEB.S00",0
+Spritename3 db "DREAMWEB.S02",0
+
+Idname db "INSTALL.DAT",0
+
+Characterset1 db "DREAMWEB.C00",0
+Characterset2 db "DREAMWEB.C01",0
+Characterset3 db "DREAMWEB.C02",0
+
+Samplename db "DREAMWEB.V00",0
+
+Basicsample db "DREAMWEB.V99",0
+
+Icongraphics0 db "DREAMWEB.G00",0
+Icongraphics1 db "DREAMWEB.G01",0
+Extragraphics1 db "DREAMWEB.G02",0
+Icongraphics8 db "DREAMWEB.G08",0
+Mongraphicname db "DREAMWEB.G03",0
+Mongraphics2 db "DREAMWEB.G07",0
+Cityname db "DREAMWEB.G04",0
+Travelgraphic1 db "DREAMWEB.G05",0
+Travelgraphic2 db "DREAMWEB.G06",0
+Diarygraphic db "DREAMWEB.G14",0
+
+Monitorfile1 db "DREAMWEB.T01",0
+Monitorfile2 db "DREAMWEB.T02",0
+Monitorfile10 db "DREAMWEB.T10",0 ;News items 10-13
+Monitorfile11 db "DREAMWEB.T11",0
+Monitorfile12 db "DREAMWEB.T12",0
+Monitorfile13 db "DREAMWEB.T13",0
+Monitorfile20 db "DREAMWEB.T20",0
+Monitorfile21 db "DREAMWEB.T21",0 ;Ryan's private stuff
+Monitorfile22 db "DREAMWEB.T22",0 ;Use for blank carts
+Monitorfile23 db "DREAMWEB.T23",0 ;Use for edens cart
+Monitorfile24 db "DREAMWEB.T24",0 ;Use for church cart
+Foldertext db "DREAMWEB.T50",0
+Diarytext db "DREAMWEB.T51",0
+Puzzletextname db "DREAMWEB.T80",0 ;puzzle text
+Traveltextname db "DREAMWEB.T81",0 ;location descriptions
+Introtextname db "DREAMWEB.T82",0 ;intro sequence
+Endtextname db "DREAMWEB.T83",0 ;end sequence/credits
+Commandtextname db "DREAMWEB.T84",0 ;commands
+
+Volumetabname db "DREAMWEB.VOL",0
+
+Foldergraphic1 db "DREAMWEB.G09",0
+Foldergraphic2 db "DREAMWEB.G10",0
+Foldergraphic3 db "DREAMWEB.G11",0
+Symbolgraphic db "DREAMWEB.G12",0
+Gungraphic db "DREAMWEB.G13",0
+Monkface db "DREAMWEB.G15",0
+
+Title0graphics db "DREAMWEB.I00",0
+Title1graphics db "DREAMWEB.I01",0
+Title2graphics db "DREAMWEB.I02",0
+Title3graphics db "DREAMWEB.I03",0
+Title4graphics db "DREAMWEB.I04",0
+Title5graphics db "DREAMWEB.I05",0
+Title6graphics db "DREAMWEB.I06",0
+Title7graphics db "DREAMWEB.I07",0
+
+Palettescreen db "DREAMWEB.PAL",0
+
+
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
new file mode 100755
index 0000000000..705d3ac6b1
--- /dev/null
+++ b/devtools/tasmrecover/tasm-recover
@@ -0,0 +1,68 @@
+#!/usr/bin/python
+
+# ScummVM - Graphic Adventure Engine
+#
+# ScummVM is the legal property of its developers, whose names
+# are too numerous to list here. Please refer to the COPYRIGHT
+# file distributed with this source distribution.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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 tasm.parser import parser
+from tasm.cpp import cpp
+
+p = parser()
+p.strip_path = 3
+context = p.parse('dreamweb/dreamweb.asm')
+p.link()
+generator = cpp(context, "DreamGen", blacklist = [
+ 'randomnumber',
+ 'quickquit',
+ 'quickquit2',
+ 'seecommandtail',
+ 'multiget',
+ 'multiput',
+ 'multidump',
+ 'frameoutnm',
+ 'frameoutbh',
+ 'frameoutfx',
+ 'cls',
+ 'printundermon',
+ 'kernchars',
+ 'getnextword',
+ 'worktoscreen',
+ 'width160',
+ 'convertkey',
+ 'readabyte',
+ 'readoneblock',
+ 'printsprites',
+ 'printasprite',
+ 'eraseoldobs',
+ 'clearsprites',
+ 'makesprite',
+ 'showframe',
+ 'initman',
+ 'walking',
+ 'spriteupdate',
+ 'dodoor',
+ 'liftsprite',
+ 'frameoutv',
+ 'modifychar',
+ 'lockmon',
+ 'cancelch0',
+ 'cancelch1'
+ ])
+generator.generate('dreamweb') #start routine
diff --git a/devtools/tasmrecover/tasm/__init__.py b/devtools/tasmrecover/tasm/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/devtools/tasmrecover/tasm/__init__.py
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py
new file mode 100644
index 0000000000..a73fd6c890
--- /dev/null
+++ b/devtools/tasmrecover/tasm/cpp.py
@@ -0,0 +1,634 @@
+# ScummVM - Graphic Adventure Engine
+#
+# ScummVM is the legal property of its developers, whose names
+# are too numerous to list here. Please refer to the COPYRIGHT
+# file distributed with this source distribution.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+import op, traceback, re, proc
+from copy import copy
+proc_module = proc
+
+class CrossJump(Exception):
+ pass
+
+def parse_bin(s):
+ b = s.group(1)
+ v = hex(int(b, 2))
+ #print "BINARY: %s -> %s" %(b, v)
+ return v
+
+class cpp:
+ def __init__(self, context, namespace, skip_first = 0, blacklist = []):
+ self.namespace = namespace
+ fname = namespace.lower() + ".cpp"
+ header = namespace.lower() + ".h"
+ banner = """/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */
+
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+"""
+ self.fd = open(fname, "wt")
+ self.hd = open(header, "wt")
+ hid = "TASMRECOVER_%s_STUBS_H__" %namespace.upper()
+ self.hd.write("""#ifndef %s
+#define %s
+
+%s
+
+""" %(hid, hid, banner))
+ self.context = context
+ self.data_seg = context.binary_data
+ self.procs = context.proc_list
+ self.skip_first = skip_first
+ self.proc_queue = []
+ self.proc_done = []
+ self.blacklist = blacklist
+ self.failed = list(blacklist)
+ self.translated = []
+ self.proc_addr = []
+ self.methods = []
+ self.fd.write("""%s
+
+#include \"%s\"
+
+namespace %s {
+""" %(banner, header, namespace))
+
+ def expand_cb(self, match):
+ name = match.group(0).lower()
+ if len(name) == 2 and \
+ ((name[0] in ['a', 'b', 'c', 'd'] and name[1] in ['h', 'x', 'l']) or name in ['si', 'di', 'es', 'ds', 'cs']):
+ return "%s" %name
+
+ if self.indirection == -1:
+ try:
+ offset,p,p = self.context.get_offset(name)
+ print "OFFSET = %d" %offset
+ self.indirection = 0
+ return str(offset)
+ except:
+ pass
+
+ g = self.context.get_global(name)
+ if isinstance(g, op.const):
+ value = self.expand_equ(g.value)
+ print "equ: %s -> %s" %(name, value)
+ elif isinstance(g, proc.proc):
+ if self.indirection != -1:
+ raise Exception("invalid proc label usage")
+ value = str(g.offset)
+ self.indirection = 0
+ else:
+ size = g.size
+ if size == 0:
+ raise Exception("invalid var '%s' size %u" %(name, size))
+ if self.indirection == 0:
+ value = "data.%s(k%s)" %("byte" if size == 1 else "word", name.capitalize())
+ elif self.indirection == -1:
+ value = "%s" %g.offset
+ self.indirection = 0
+ else:
+ raise Exception("invalid indirection %d" %self.indirection)
+ return value
+
+ def get_size(self, expr):
+ #print 'get_size("%s")' %expr
+ try:
+ v = self.context.parse_int(expr)
+ return 1 if v < 256 else 2
+ except:
+ pass
+
+ if re.match(r'byte\s+ptr\s', expr) is not None:
+ return 1
+
+ if re.match(r'word\s+ptr\s', expr) is not None:
+ return 2
+
+ if len(expr) == 2 and expr[0] in ['a', 'b', 'c', 'd'] and expr[1] in ['h', 'l']:
+ return 1
+ if expr in ['ax', 'bx', 'cx', 'dx', 'si', 'di', 'sp', 'bp', 'ds', 'cs', 'es', 'fs']:
+ return 2
+
+ m = re.match(r'[a-zA-Z_]\w*', expr)
+ if m is not None:
+ name = m.group(0)
+ try:
+ g = self.context.get_global(name)
+ return g.size
+ except:
+ pass
+
+ return 0
+
+ def expand_equ_cb(self, match):
+ name = match.group(0).lower()
+ g = self.context.get_global(name)
+ if isinstance(g, op.const):
+ return g.value
+ return str(g.offset)
+
+ def expand_equ(self, expr):
+ n = 1
+ while n > 0:
+ expr, n = re.subn(r'\b[a-zA-Z_][a-zA-Z0-9_]+\b', self.expand_equ_cb, expr)
+ expr = re.sub(r'\b([0-9][a-fA-F0-9]*)h', '0x\\1', expr)
+ return "(%s)" %expr
+
+ def expand(self, expr, def_size = 0):
+ #print "EXPAND \"%s\"" %expr
+ size = self.get_size(expr) if def_size == 0 else def_size
+ indirection = 0
+ seg = None
+ reg = True
+
+ m = re.match(r'seg\s+(.*?)$', expr)
+ if m is not None:
+ return "data"
+
+ match_id = True
+ m = re.match(r'offset\s+(.*?)$', expr)
+ if m is not None:
+ indirection -= 1
+ expr = m.group(1).strip()
+
+ m = re.match(r'byte\s+ptr\s+(.*?)$', expr)
+ if m is not None:
+ expr = m.group(1).strip()
+
+ m = re.match(r'word\s+ptr\s+(.*?)$', expr)
+ if m is not None:
+ expr = m.group(1).strip()
+
+ m = re.match(r'\[(.*)\]$', expr)
+ if m is not None:
+ indirection += 1
+ expr = m.group(1).strip()
+
+ m = re.match(r'(\w{2,2}):(.*)$', expr)
+ if m is not None:
+ seg_prefix = m.group(1)
+ expr = m.group(2).strip()
+ print "SEGMENT %s, remains: %s" %(seg_prefix, expr)
+ else:
+ seg_prefix = "ds"
+
+ m = re.match(r'(([abcd][xhl])|si|di|bp|sp)([\+-].*)?$', expr)
+ if m is not None:
+ reg = m.group(1)
+ plus = m.group(3)
+ if plus is not None:
+ plus = self.expand(plus)
+ else:
+ plus = ""
+ match_id = False
+ #print "COMMON_REG: ", reg, plus
+ expr = "%s%s" %(reg, plus)
+
+ expr = re.sub(r'\b([0-9][a-fA-F0-9]*)h', '0x\\1', expr)
+ expr = re.sub(r'\b([0-1]+)b', parse_bin, expr)
+ expr = re.sub(r'"(.)"', '\'\\1\'', expr)
+ if match_id:
+ #print "BEFORE: %d" %indirection
+ self.indirection = indirection
+ expr = re.sub(r'\b[a-zA-Z_][a-zA-Z0-9_]+\b', self.expand_cb, expr)
+ indirection = self.indirection
+ #print "AFTER: %d" %indirection
+
+ if indirection == 1:
+ if size == 1:
+ expr = "%s.byte(%s)" %(seg_prefix, expr)
+ elif size == 2:
+ expr = "%s.word(%s)" %(seg_prefix, expr)
+ else:
+ expr = "@invalid size 0"
+ elif indirection == 0:
+ pass
+ elif indirection == -1:
+ expr = "&%s" %expr
+ else:
+ raise Exception("invalid indirection %d" %indirection)
+ return expr
+
+ def mangle_label(self, name):
+ name = name.lower()
+ return re.sub(r'\$', '_tmp', name)
+
+ def resolve_label(self, name):
+ name = name.lower()
+ if not name in self.proc.labels:
+ try:
+ offset, proc, pos = self.context.get_offset(name)
+ except:
+ print "no label %s, trying procedure" %name
+ proc = self.context.get_global(name)
+ pos = 0
+ if not isinstance(proc, proc_module.proc):
+ raise CrossJump("cross-procedure jump to non label and non procedure %s" %(name))
+ self.proc.labels.add(name)
+ for i in xrange(0, len(self.unbounded)):
+ u = self.unbounded[i]
+ if u[1] == proc:
+ if pos < u[2]:
+ self.unbounded[i] = (name, proc, pos)
+ return self.mangle_label(name)
+ self.unbounded.append((name, proc, pos))
+
+ return self.mangle_label(name)
+
+ def jump_to_label(self, name):
+ jump_proc = False
+ if name in self.blacklist:
+ jump_proc = True
+
+ if self.context.has_global(name) :
+ g = self.context.get_global(name)
+ if isinstance(g, proc_module.proc):
+ jump_proc = True
+
+ if jump_proc:
+ return "{ %s(); return; }" %name
+ else:
+ # TODO: name or self.resolve_label(name) or self.mangle_label(name)??
+ if name in self.proc.retlabels:
+ return "return /* (%s) */" % (name)
+ return "goto %s" %self.resolve_label(name)
+
+ def _label(self, name):
+ self.body += "%s:\n" %self.mangle_label(name)
+
+ def schedule(self, name):
+ name = name.lower()
+ if name in self.proc_queue or name in self.proc_done or name in self.failed:
+ return
+ print "+scheduling function %s..." %name
+ self.proc_queue.append(name)
+
+ def _call(self, name):
+ name = name.lower()
+ if name == 'ax':
+ self.body += "\t__dispatch_call(%s);\n" %self.expand('ax', 2)
+ return
+ self.body += "\t%s();\n" %name
+ self.schedule(name)
+
+ def _ret(self):
+ self.body += "\treturn;\n"
+
+ def parse2(self, dst, src):
+ dst_size, src_size = self.get_size(dst), self.get_size(src)
+ if dst_size == 0:
+ if src_size == 0:
+ raise Exception("both sizes are 0")
+ dst_size = src_size
+ if src_size == 0:
+ src_size = dst_size
+
+ dst = self.expand(dst, dst_size)
+ src = self.expand(src, src_size)
+ return dst, src
+
+ def _mov(self, dst, src):
+ self.body += "\t%s = %s;\n" %self.parse2(dst, src)
+
+ def _add(self, dst, src):
+ self.body += "\t_add(%s, %s);\n" %self.parse2(dst, src)
+
+ def _sub(self, dst, src):
+ self.body += "\t_sub(%s, %s);\n" %self.parse2(dst, src)
+
+ def _and(self, dst, src):
+ self.body += "\t_and(%s, %s);\n" %self.parse2(dst, src)
+
+ def _or(self, dst, src):
+ self.body += "\t_or(%s, %s);\n" %self.parse2(dst, src)
+
+ def _xor(self, dst, src):
+ self.body += "\t_xor(%s, %s);\n" %self.parse2(dst, src)
+
+ def _neg(self, dst):
+ dst = self.expand(dst)
+ self.body += "\t_neg(%s);\n" %(dst)
+
+ def _cbw(self):
+ self.body += "\tax.cbw();\n"
+
+ def _shr(self, dst, src):
+ self.body += "\t_shr(%s, %s);\n" %self.parse2(dst, src)
+
+ def _shl(self, dst, src):
+ self.body += "\t_shl(%s, %s);\n" %self.parse2(dst, src)
+
+ #def _sar(self, dst, src):
+ # self.body += "\t_sar(%s%s);\n" %self.parse2(dst, src)
+
+ #def _sal(self, dst, src):
+ # self.body += "\t_sal(%s, %s);\n" %self.parse2(dst, src)
+
+ #def _rcl(self, dst, src):
+ # self.body += "\t_rcl(%s, %s);\n" %self.parse2(dst, src)
+
+ #def _rcr(self, dst, src):
+ # self.body += "\t_rcr(%s, %s);\n" %self.parse2(dst, src)
+
+ def _mul(self, src):
+ src = self.expand(src)
+ self.body += "\t_mul(%s);\n" %(src)
+
+ def _div(self, src):
+ src = self.expand(src)
+ self.body += "\t_div(%s);\n" %(src)
+
+ def _inc(self, dst):
+ dst = self.expand(dst)
+ self.body += "\t_inc(%s);\n" %(dst)
+
+ def _dec(self, dst):
+ dst = self.expand(dst)
+ self.body += "\t_dec(%s);\n" %(dst)
+
+ def _cmp(self, a, b):
+ self.body += "\t_cmp(%s, %s);\n" %self.parse2(a, b)
+
+ def _test(self, a, b):
+ self.body += "\t_test(%s, %s);\n" %self.parse2(a, b)
+
+ def _js(self, label):
+ self.body += "\tif (flags.s())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jns(self, label):
+ self.body += "\tif (!flags.s())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jz(self, label):
+ self.body += "\tif (flags.z())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jnz(self, label):
+ self.body += "\tif (!flags.z())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jl(self, label):
+ self.body += "\tif (flags.l())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jg(self, label):
+ self.body += "\tif (!flags.le())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jle(self, label):
+ self.body += "\tif (flags.le())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jge(self, label):
+ self.body += "\tif (!flags.l())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jc(self, label):
+ self.body += "\tif (flags.c())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _jnc(self, label):
+ self.body += "\tif (!flags.c())\n\t\t%s;\n" %(self.jump_to_label(label))
+
+ def _xchg(self, dst, src):
+ self.body += "\t_xchg(%s, %s);\n" %self.parse2(dst, src)
+
+ def _jmp(self, label):
+ self.body += "\t%s;\n" %(self.jump_to_label(label))
+
+ def _loop(self, label):
+ self.body += "\tif (--cx)\n\t\t%s;\n" %self.jump_to_label(label)
+
+ def _push(self, regs):
+ p = str();
+ for r in regs:
+ r = self.expand(r)
+ p += "\tpush(%s);\n" %(r)
+ self.body += p
+
+ def _pop(self, regs):
+ p = str();
+ for r in regs:
+ self.temps_count -= 1
+ i = self.temps_count
+ r = self.expand(r)
+ p += "\t%s = pop();\n" %r
+ self.body += p
+
+ def _rep(self):
+ self.body += "\twhile(cx--)\n\t"
+
+ def _lodsb(self):
+ self.body += "\t_lodsb();\n"
+
+ def _lodsw(self):
+ self.body += "\t_lodsw();\n"
+
+ def _stosb(self, n, clear_cx):
+ self.body += "\t_stosb(%s%s);\n" %("" if n == 1 else n, ", true" if clear_cx else "")
+
+ def _stosw(self, n, clear_cx):
+ self.body += "\t_stosw(%s%s);\n" %("" if n == 1 else n, ", true" if clear_cx else "")
+
+ def _movsb(self, n, clear_cx):
+ self.body += "\t_movsb(%s%s);\n" %("" if n == 1 else n, ", true" if clear_cx else "")
+
+ def _movsw(self, n, clear_cx):
+ self.body += "\t_movsw(%s%s);\n" %("" if n == 1 else n, ", true" if clear_cx else "")
+
+ def _stc(self):
+ self.body += "\tflags._c = true;\n "
+
+ def _clc(self):
+ self.body += "\tflags._c = false;\n "
+
+ def __proc(self, name, def_skip = 0):
+ try:
+ skip = def_skip
+ self.temps_count = 0
+ self.temps_max = 0
+ if self.context.has_global(name):
+ self.proc = self.context.get_global(name)
+ else:
+ print "No procedure named %s, trying label" %name
+ off, src_proc, skip = self.context.get_offset(name)
+
+ self.proc = proc_module.proc(name)
+ self.proc.stmts = copy(src_proc.stmts)
+ self.proc.labels = copy(src_proc.labels)
+ self.proc.retlabels = copy(src_proc.retlabels)
+ #for p in xrange(skip, len(self.proc.stmts)):
+ # s = self.proc.stmts[p]
+ # if isinstance(s, op.basejmp):
+ # o, p, s = self.context.get_offset(s.label)
+ # if p == src_proc and s < skip:
+ # skip = s
+
+
+ self.proc_addr.append((name, self.proc.offset))
+ self.body = str()
+ self.body += "void %sContext::%s() {\n\tSTACK_CHECK;\n" %(self.namespace, name);
+ self.proc.optimize()
+ self.unbounded = []
+ self.proc.visit(self, skip)
+
+ #adding remaining labels:
+ for i in xrange(0, len(self.unbounded)):
+ u = self.unbounded[i]
+ print "UNBOUNDED: ", u
+ proc = u[1]
+ for p in xrange(u[2], len(proc.stmts)):
+ s = proc.stmts[p]
+ if isinstance(s, op.basejmp):
+ self.resolve_label(s.label)
+
+ #adding statements
+ #BIG FIXME: this is quite ugly to handle code analysis from the code generation. rewrite me!
+ for label, proc, offset in self.unbounded:
+ self.body += "\treturn;\n" #we need to return before calling code from the other proc
+ self.body += "/*continuing to unbounded code: %s from %s:%d-%d*/\n" %(label, proc.name, offset, len(proc.stmts))
+ start = len(self.proc.stmts)
+ self.proc.add_label(label)
+ for s in proc.stmts[offset:]:
+ if isinstance(s, op.label):
+ self.proc.labels.add(s.name)
+ self.proc.stmts.append(s)
+ self.proc.add("ret")
+ print "skipping %d instructions, todo: %d" %(start, len(self.proc.stmts) - start)
+ print "re-optimizing..."
+ self.proc.optimize(keep_labels=[label])
+ self.proc.visit(self, start)
+ self.body += "}\n";
+ self.translated.insert(0, self.body)
+ self.proc = None
+ if self.temps_count > 0:
+ raise Exception("temps count == %d at the exit of proc" %self.temps_count);
+ return True
+ except (CrossJump, op.Unsupported) as e:
+ print "%s: ERROR: %s" %(name, e)
+ self.failed.append(name)
+ except:
+ raise
+
+ def get_type(self, width):
+ return "uint%d_t" %(width * 8)
+
+ def write_stubs(self, fname, procs):
+ fd = open(fname, "wt")
+ fd.write("namespace %s {\n" %self.namespace)
+ for p in procs:
+ fd.write("void %sContext::%s() {\n\t::error(\"%s\");\n}\n\n" %(self.namespace, p, p))
+ fd.write("} /*namespace %s */\n" %self.namespace)
+ fd.close()
+
+
+ def generate(self, start):
+ #print self.prologue()
+ #print context
+ self.proc_queue.append(start)
+ while len(self.proc_queue):
+ name = self.proc_queue.pop()
+ if name in self.failed or name in self.proc_done:
+ continue
+ if len(self.proc_queue) == 0 and len(self.procs) > 0:
+ print "queue's empty, adding remaining procs:"
+ for p in self.procs:
+ self.schedule(p)
+ self.procs = []
+ print "continuing on %s" %name
+ self.proc_done.append(name)
+ self.__proc(name)
+ self.methods.append(name)
+ self.write_stubs("_stubs.cpp", self.failed)
+ self.methods += self.failed
+ done, failed = len(self.proc_done), len(self.failed)
+
+ self.fd.write("\n")
+ self.fd.write("\n".join(self.translated))
+ self.fd.write("\n\n")
+ print "%d ok, %d failed of %d, %.02g%% translated" %(done, failed, done + failed, 100.0 * done / (done + failed))
+ print "\n".join(self.failed)
+ data_bin = self.data_seg
+ data_impl = "\n\tstatic const uint8 src[] = {\n\t\t"
+ n = 0
+ for v in data_bin:
+ data_impl += "0x%02x, " %v
+ n += 1
+ if (n & 0xf) == 0:
+ data_impl += "\n\t\t"
+ data_impl += "};\n\tds.assign(src, src + sizeof(src));\n"
+ self.hd.write(
+"""\n#include "dreamweb/runtime.h"
+
+namespace %s {
+#include "structs.h"
+class %sContext : public Context {
+public:
+ void __start();
+ void __dispatch_call(uint16 addr);
+#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
+
+"""
+%(self.namespace, self.namespace))
+
+ for name,addr in self.proc_addr:
+ self.hd.write("\tstatic const uint16 addr_%s = 0x%04x;\n" %(name, addr))
+
+ offsets = []
+ for k, v in self.context.get_globals().items():
+ if isinstance(v, op.var):
+ offsets.append((k.capitalize(), v.offset))
+ elif isinstance(v, op.const):
+ offsets.append((k.capitalize(), self.expand_equ(v.value))) #fixme: try to save all constants here
+
+ offsets = sorted(offsets, key=lambda t: t[1])
+ for o in offsets:
+ self.hd.write("\tconst static uint16 k%s = %s;\n" %o)
+ self.hd.write("\n")
+ for p in set(self.methods):
+ if p in self.blacklist:
+ self.hd.write("\t//void %s();\n" %p)
+ else:
+ self.hd.write("\tvoid %s();\n" %p)
+
+ self.hd.write("};\n}\n\n#endif\n")
+ self.hd.close()
+
+ self.fd.write("\nvoid %sContext::__start() { %s%s(); \n}\n" %(self.namespace, data_impl, start))
+
+ self.fd.write("\nvoid %sContext::__dispatch_call(uint16 addr) {\n\tswitch(addr) {\n" %self.namespace)
+ self.proc_addr.sort(cmp = lambda x, y: x[1] - y[1])
+ for name,addr in self.proc_addr:
+ self.fd.write("\t\tcase addr_%s: %s(); break;\n" %(name, name))
+ self.fd.write("\t\tdefault: ::error(\"invalid call to %04x dispatched\", (uint16)ax);")
+ self.fd.write("\n\t}\n}\n\n} /*namespace*/\n")
+
+ self.fd.close()
diff --git a/devtools/tasmrecover/tasm/lex.py b/devtools/tasmrecover/tasm/lex.py
new file mode 100644
index 0000000000..9728c149ca
--- /dev/null
+++ b/devtools/tasmrecover/tasm/lex.py
@@ -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.
+#
+
+def parse_args(text):
+ #print "parsing: [%s]" %text
+ escape = False
+ string = False
+ result = []
+ token = str()
+ value = 0;
+ for c in text:
+ #print "[%s]%s: %s: %s" %(token, c, escape, string)
+ if c == '\\':
+ escape = True
+ continue
+
+ if escape:
+ if not string:
+ raise SyntaxError("escape found in no string: %s" %text);
+
+ #print "escaping[%s]" %c
+ escape = False
+ token += c
+ continue
+
+ if string:
+ if c == '\'' or c == '"':
+ string = False
+
+ token += c
+ continue
+
+ if c == '\'' or c == '"':
+ string = True
+ token += c
+ continue
+
+ if c == ',':
+ result.append(token.strip())
+ token = str()
+ continue
+
+ if c == ';': #comment, bailing out
+ break
+
+ token += c
+ #token = token.strip()
+ if len(token):
+ result.append(token)
+ #print result
+ return result
+
+def compile(width, data):
+ print data
+ return data
diff --git a/devtools/tasmrecover/tasm/op.py b/devtools/tasmrecover/tasm/op.py
new file mode 100644
index 0000000000..6b19068f2a
--- /dev/null
+++ b/devtools/tasmrecover/tasm/op.py
@@ -0,0 +1,431 @@
+# ScummVM - Graphic Adventure Engine
+#
+# ScummVM is the legal property of its developers, whose names
+# are too numerous to list here. Please refer to the COPYRIGHT
+# file distributed with this source distribution.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+import re
+import lex
+
+class Unsupported(Exception):
+ pass
+
+class var:
+ def __init__(self, size, offset):
+ self.size = size
+ self.offset = offset
+
+class const:
+ def __init__(self, value):
+ self.value = value
+
+class reg:
+ def __init__(self, name):
+ self.name = name
+ def size(self):
+ return 2 if self.name[1] == 'x' else 1
+ def __str__(self):
+ return "<register %s>" %self.name
+
+class unref:
+ def __init__(self, exp):
+ self.exp = exp
+ def __str__(self):
+ return "<unref %s>" %self.exp
+
+class ref:
+ def __init__(self, name):
+ self.name = name
+ def __str__(self):
+ return "<ref %s>" %self.name
+
+class glob:
+ def __init__(self, name):
+ self.name = name
+ def __str__(self):
+ return "<global %s>" %self.name
+
+class segment:
+ def __init__(self, name):
+ self.name = name
+ def __str__(self):
+ return "<segment %s>" %self.name
+
+class baseop(object):
+ def parse_arg(self, arg):
+ return arg
+
+ def split(self, text):
+ a, b = lex.parse_args(text)
+ return self.parse_arg(a), self.parse_arg(b)
+ def __str__(self):
+ return str(self.__class__)
+
+class basejmp(baseop):
+ pass
+
+class _call(baseop):
+ def __init__(self, arg):
+ self.name = arg
+ def visit(self, visitor):
+ visitor._call(self.name)
+ def __str__(self):
+ return "call(%s)" %self.name
+
+class _rep(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ visitor._rep()
+
+class _mov(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._mov(self.dst, self.src)
+ def __str__(self):
+ return "mov(%s, %s)" %(self.dst, self.src)
+
+class _mov2(baseop):
+ def __init__(self, dst, src):
+ self.dst, self.src = dst, src
+ def visit(self, visitor):
+ visitor._mov(self.dst, self.src)
+
+class _shr(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._shr(self.dst, self.src)
+
+class _shl(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._shl(self.dst, self.src)
+
+class _ror(baseop):
+ def __init__(self, arg):
+ pass
+
+class _rol(baseop):
+ def __init__(self, arg):
+ pass
+
+class _sar(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._sar(self.dst, self.src)
+
+class _sal(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._sal(self.dst, self.src)
+
+class _rcl(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._rcl(self.dst, self.src)
+
+class _rcr(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._rcr(self.dst, self.src)
+
+class _neg(baseop):
+ def __init__(self, arg):
+ self.arg = arg
+ def visit(self, visitor):
+ visitor._neg(self.arg)
+
+class _dec(baseop):
+ def __init__(self, arg):
+ self.dst = arg
+ def visit(self, visitor):
+ visitor._dec(self.dst)
+
+class _inc(baseop):
+ def __init__(self, arg):
+ self.dst = arg
+ def visit(self, visitor):
+ visitor._inc(self.dst)
+
+class _add(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._add(self.dst, self.src)
+
+class _sub(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._sub(self.dst, self.src)
+
+class _mul(baseop):
+ def __init__(self, arg):
+ self.arg = self.parse_arg(arg)
+ def visit(self, visitor):
+ visitor._mul(self.arg)
+
+class _div(baseop):
+ def __init__(self, arg):
+ self.arg = self.parse_arg(arg)
+ def visit(self, visitor):
+ visitor._div(self.arg)
+
+class _and(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._and(self.dst, self.src)
+
+class _xor(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._xor(self.dst, self.src)
+
+class _or(baseop):
+ def __init__(self, arg):
+ self.dst, self.src = self.split(arg)
+ def visit(self, visitor):
+ visitor._or(self.dst, self.src)
+
+class _cmp(baseop):
+ def __init__(self, arg):
+ self.a, self.b = self.split(arg)
+ def visit(self, visitor):
+ visitor._cmp(self.a, self.b)
+
+class _test(baseop):
+ def __init__(self, arg):
+ self.a, self.b = self.split(arg)
+ def visit(self, visitor):
+ visitor._test(self.a, self.b)
+
+class _xchg(baseop):
+ def __init__(self, arg):
+ self.a, self.b = self.split(arg)
+ def visit(self, visitor):
+ visitor._xchg(self.a, self.b)
+
+class _jnz(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jnz(self.label)
+
+class _jz(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jz(self.label)
+
+class _jc(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jc(self.label)
+
+class _jnc(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jnc(self.label)
+
+class _js(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._js(self.label)
+
+class _jns(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jns(self.label)
+
+class _jl(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jl(self.label)
+
+class _jg(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jg(self.label)
+
+class _jle(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jle(self.label)
+
+class _jge(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jge(self.label)
+
+class _jmp(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._jmp(self.label)
+
+class _loop(basejmp):
+ def __init__(self, label):
+ self.label = label
+ def visit(self, visitor):
+ visitor._loop(self.label)
+
+class _push(baseop):
+ def __init__(self, arg):
+ self.regs = []
+ for r in arg.split():
+ self.regs.append(self.parse_arg(r))
+ def visit(self, visitor):
+ visitor._push(self.regs)
+
+class _pop(baseop):
+ def __init__(self, arg):
+ self.regs = []
+ for r in arg.split():
+ self.regs.append(self.parse_arg(r))
+ def visit(self, visitor):
+ visitor._pop(self.regs)
+
+class _ret(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ visitor._ret()
+
+class _lodsb(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ visitor._lodsb()
+
+class _lodsw(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ visitor._lodsw()
+
+class _stosw(baseop):
+ def __init__(self, arg):
+ self.repeat = 1
+ self.clear_cx = False
+ def visit(self, visitor):
+ visitor._stosw(self.repeat, self.clear_cx)
+
+class _stosb(baseop):
+ def __init__(self, arg):
+ self.repeat = 1
+ self.clear_cx = False
+ def visit(self, visitor):
+ visitor._stosb(self.repeat, self.clear_cx)
+
+class _movsw(baseop):
+ def __init__(self, arg):
+ self.repeat = 1
+ self.clear_cx = False
+ def visit(self, visitor):
+ visitor._movsw(self.repeat, self.clear_cx)
+
+class _movsb(baseop):
+ def __init__(self, arg):
+ self.repeat = 1
+ self.clear_cx = False
+ def visit(self, visitor):
+ visitor._movsb(self.repeat, self.clear_cx)
+
+class _in(baseop):
+ def __init__(self, arg):
+ self.arg = arg
+ def visit(self, visitor):
+ raise Unsupported("input from port: %s" %self.arg)
+
+class _out(baseop):
+ def __init__(self, arg):
+ self.arg = arg
+ def visit(self, visitor):
+ raise Unsupported("out to port: %s" %self.arg)
+
+class _cli(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ raise Unsupported("cli")
+
+class _sti(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ raise Unsupported("sli")
+
+class _int(baseop):
+ def __init__(self, arg):
+ self.arg = arg
+ def visit(self, visitor):
+ raise Unsupported("interrupt: %s" %self.arg)
+
+class _iret(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ raise Unsupported("interrupt return")
+
+class _cbw(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ visitor._cbw()
+
+class _nop(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ pass
+
+class _stc(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ visitor._stc()
+
+class _clc(baseop):
+ def __init__(self, arg):
+ pass
+ def visit(self, visitor):
+ visitor._clc()
+
+class label(baseop):
+ def __init__(self, name):
+ self.name = name
+ def visit(self, visitor):
+ visitor._label(self.name)
+
diff --git a/devtools/tasmrecover/tasm/parser.py b/devtools/tasmrecover/tasm/parser.py
new file mode 100644
index 0000000000..ebbd714cf4
--- /dev/null
+++ b/devtools/tasmrecover/tasm/parser.py
@@ -0,0 +1,282 @@
+# ScummVM - Graphic Adventure Engine
+#
+# ScummVM is the legal property of its developers, whose names
+# are too numerous to list here. Please refer to the COPYRIGHT
+# file distributed with this source distribution.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+import os, re
+from proc import proc
+import lex
+import op
+
+class parser:
+ def __init__(self):
+ self.strip_path = 0
+ self.__globals = {}
+ self.__offsets = {}
+ self.__stack = []
+ self.proc = None
+ self.proc_list = []
+ self.binary_data = []
+
+ self.symbols = []
+ self.link_later = []
+
+ def visible(self):
+ for i in self.__stack:
+ if not i or i == 0:
+ return False
+ return True
+
+ def push_if(self, text):
+ value = self.eval(text)
+ #print "if %s -> %s" %(text, value)
+ self.__stack.append(value)
+
+ def push_else(self):
+ #print "else"
+ self.__stack[-1] = not self.__stack[-1]
+
+ def pop_if(self):
+ #print "endif"
+ return self.__stack.pop()
+
+ def set_global(self, name, value):
+ if len(name) == 0:
+ raise Exception("empty name is not allowed")
+ name = name.lower()
+ #print "adding global %s -> %s" %(name, value)
+ if self.__globals.has_key(name):
+ raise Exception("global %s was already defined", name)
+ self.__globals[name] = value
+
+ def get_global(self, name):
+ name = name.lower()
+ g = self.__globals[name]
+ g.used = True
+ return g
+
+ def get_globals(self):
+ return self.__globals
+
+ def has_global(self, name):
+ name = name.lower()
+ return self.__globals.has_key(name)
+
+ def set_offset(self, name, value):
+ if len(name) == 0:
+ raise Exception("empty name is not allowed")
+ name = name.lower()
+ #print "adding global %s -> %s" %(name, value)
+ if self.__offsets.has_key(name):
+ raise Exception("global %s was already defined", name)
+ self.__offsets[name] = value
+
+ def get_offset(self, name):
+ name = name.lower()
+ return self.__offsets[name]
+
+ def include(self, basedir, fname):
+ path = fname.split('\\')[self.strip_path:]
+ path = os.path.join(basedir, os.path.pathsep.join(path))
+ #print "including %s" %(path)
+
+ self.parse(path)
+
+ def eval(self, stmt):
+ try:
+ return self.parse_int(stmt)
+ except:
+ pass
+ value = self.__globals[stmt.lower()].value
+ return int(value)
+
+ def expr_callback(self, match):
+ name = match.group(1).lower()
+ g = self.get_global(name)
+ if isinstance(g, op.const):
+ return g.value
+ else:
+ return "0x%04x" %g.offset
+
+ def eval_expr(self, expr):
+ n = 1
+ while n > 0:
+ expr, n = re.subn(r'\b([a-zA-Z_]+[a-zA-Z0-9_]*)', self.expr_callback, expr)
+ return eval(expr)
+
+ def expand_globals(self, text):
+ return text
+
+ def fix_dollar(self, v):
+ print("$ = %d" %len(self.binary_data))
+ return re.sub(r'\$', "%d" %len(self.binary_data), v)
+
+ def parse_int(self, v):
+ if re.match(r'[01]+b$', v):
+ v = int(v[:-1], 2)
+ if re.match(r'[\+-]?[0-9a-f]+h$', v):
+ v = int(v[:-1], 16)
+ return int(v)
+
+ def compact_data(self, width, data):
+ #print "COMPACTING %d %s" %(width, data)
+ r = []
+ base = 0x100 if width == 1 else 0x10000
+ for v in data:
+ if v[0] == '"':
+ if v[-1] != '"':
+ raise Exception("invalid string %s" %v)
+ if width == 2:
+ raise Exception("string with data width more than 1") #we could allow it :)
+ for i in xrange(1, len(v) - 1):
+ r.append(ord(v[i]))
+ continue
+
+ m = re.match(r'(\w+)\s+dup\s+\((\s*\S+\s*)\)', v)
+ if m is not None:
+ #we should parse that
+ n = self.parse_int(m.group(1))
+ if m.group(2) != '?':
+ value = self.parse_int(m.group(2))
+ else:
+ value = 0
+ for i in xrange(0, n):
+ v = value
+ for b in xrange(0, width):
+ r.append(v & 0xff);
+ v >>= 8
+ continue
+
+ try:
+ v = self.parse_int(v)
+ if v < 0:
+ v += base
+ except:
+ #global name
+ print "global/expr: %s" %v
+ try:
+ g = self.get_global(v)
+ v = g.offset
+ except:
+ print "unknown address %s" %(v)
+ self.link_later.append((len(self.binary_data) + len(r), v))
+ v = 0
+
+ for b in xrange(0, width):
+ r.append(v & 0xff);
+ v >>= 8
+ #print r
+ return r
+
+ def parse(self, fname):
+# print "opening file %s..." %(fname, basedir)
+ fd = open(fname, 'rb')
+ for line in fd:
+ line = line.strip()
+ if len(line) == 0 or line[0] == ';' or line[0] == chr(0x1a):
+ continue
+
+ #print line
+ m = re.match('(\w+)\s*?:', line)
+ if m is not None:
+ line = line[len(m.group(0)):].strip()
+ if self.visible():
+ name = m.group(1)
+ if self.proc is not None:
+ self.proc.add_label(name)
+ print "offset %s -> %d" %(name, len(self.binary_data))
+ self.set_offset(name, (len(self.binary_data), self.proc, len(self.proc.stmts) if self.proc is not None else 0))
+ #print line
+
+ cmd = line.split()
+ if len(cmd) == 0:
+ continue
+
+ cmd0 = str(cmd[0])
+ if cmd0 == 'if':
+ self.push_if(cmd[1])
+ continue
+ elif cmd0 == 'else':
+ self.push_else()
+ continue
+ elif cmd0 == 'endif':
+ self.pop_if()
+ continue
+
+ if not self.visible():
+ continue
+
+ if cmd0 == 'db' or cmd0 == 'dw' or cmd0 == 'dd':
+ arg = line[len(cmd0):].strip()
+ print "%d:1: %s" %(len(self.binary_data), arg) #fixme: COPYPASTE
+ binary_width = {'b': 1, 'w': 2, 'd': 4}[cmd0[1]]
+ self.binary_data += self.compact_data(binary_width, lex.parse_args(arg))
+ continue
+ elif cmd0 == 'include':
+ self.include(os.path.dirname(fname), cmd[1])
+ continue
+ elif cmd0 == 'endp':
+ self.proc = None
+ continue
+ elif cmd0 == 'assume':
+ print "skipping: %s" %line
+ continue
+ elif cmd0 == 'rep':
+ self.proc.add(cmd0)
+ self.proc.add(" ".join(cmd[1:]))
+ continue
+
+ if len(cmd) >= 3:
+ cmd1 = cmd[1]
+ if cmd1 == 'equ':
+ v = cmd[2]
+ self.set_global(cmd0, op.const(self.fix_dollar(v)))
+ elif cmd1 == 'db' or cmd1 == 'dw' or cmd1 == 'dd':
+ binary_width = {'b': 1, 'w': 2, 'd': 4}[cmd1[1]]
+ offset = len(self.binary_data)
+ arg = line[len(cmd0):].strip()
+ arg = arg[len(cmd1):].strip()
+ print "%d: %s" %(offset, arg)
+ self.binary_data += self.compact_data(binary_width, lex.parse_args(arg))
+ self.set_global(cmd0.lower(), op.var(binary_width, offset))
+ continue
+ elif cmd1 == 'proc':
+ name = cmd0.lower()
+ self.proc = proc(name)
+ print "procedure %s, #%d" %(name, len(self.proc_list))
+ self.proc_list.append(name)
+ self.set_global(name, self.proc)
+ continue
+ if (self.proc):
+ self.proc.add(line)
+ else:
+ #print line
+ pass
+
+ fd.close()
+ return self
+
+ def link(self):
+ for addr, expr in self.link_later:
+ v = self.eval_expr(expr)
+ print "link: patching %04x -> %04x" %(addr, v)
+ while v != 0:
+ self.binary_data[addr] = v & 0xff
+ addr += 1
+ v >>= 8
diff --git a/devtools/tasmrecover/tasm/proc.py b/devtools/tasmrecover/tasm/proc.py
new file mode 100644
index 0000000000..50a394413f
--- /dev/null
+++ b/devtools/tasmrecover/tasm/proc.py
@@ -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.
+#
+
+import re
+import op
+
+class proc:
+ last_addr = 0xc000
+
+ def __init__(self, name):
+ self.name = name
+ self.calls = []
+ self.stmts = []
+ self.labels = set()
+ self.retlabels = set()
+ self.__label_re = re.compile(r'^(\S+):(.*)$')
+ self.offset = proc.last_addr
+ proc.last_addr += 4
+
+ def add_label(self, label):
+ self.stmts.append(op.label(label))
+ self.labels.add(label)
+
+ def remove_label(self, label):
+ try:
+ self.labels.remove(label)
+ except:
+ pass
+ for i in xrange(len(self.stmts)):
+ if isinstance(self.stmts[i], op.label) and self.stmts[i].name == label:
+ self.stmts[i] = op._nop(None)
+ return
+
+ def optimize_sequence(self, cls):
+ i = 0
+ stmts = self.stmts
+ while i < len(stmts):
+ if not isinstance(stmts[i], cls):
+ i += 1
+ continue
+ if i > 0 and isinstance(stmts[i - 1], op._rep): #skip rep prefixed instructions for now
+ i += 1
+ continue
+ j = i + 1
+
+ while j < len(stmts):
+ if not isinstance(stmts[j], cls):
+ break
+ j = j + 1
+
+ n = j - i
+ if n > 1:
+ print "Eliminate consequtive storage instructions at %u-%u" %(i, j)
+ for k in range(i+1,j):
+ stmts[k] = op._nop(None)
+ stmts[i].repeat = n
+ else:
+ i = j
+
+ i = 0
+ while i < len(stmts):
+ if not isinstance(stmts[i], op._rep):
+ i += 1
+ continue
+ if i + 1 >= len(stmts):
+ break
+ if isinstance(stmts[i + 1], cls):
+ stmts[i + 1].repeat = 'cx'
+ stmts[i + 1].clear_cx = True
+ stmts[i] = op._nop(None)
+ i += 1
+ return
+
+ def optimize(self, keep_labels=[]):
+ print "optimizing..."
+ #trivial simplifications
+ while len(self.stmts) and isinstance(self.stmts[-1], op.label):
+ print "stripping last label"
+ self.stmts.pop()
+ #mark labels that directly precede a ret
+ for i in range(len(self.stmts)):
+ if not isinstance(self.stmts[i], op.label):
+ continue
+ j = i
+ while j < len(self.stmts) and isinstance(self.stmts[j], (op.label, op._nop)):
+ j += 1
+ if j == len(self.stmts) or isinstance(self.stmts[j], op._ret):
+ print "Return label: %s" % (self.stmts[i].name,)
+ self.retlabels.add(self.stmts[i].name)
+ #merging push ax pop bx constructs
+ i = 0
+ while i + 1 < len(self.stmts):
+ a, b = self.stmts[i], self.stmts[i + 1]
+ if isinstance(a, op._push) and isinstance(b, op._pop):
+ ar, br = a.regs, b.regs
+ movs = []
+ while len(ar) and len(br):
+ src = ar.pop()
+ dst = br.pop(0)
+ movs.append(op._mov2(dst, src))
+ if len(br) == 0:
+ self.stmts.pop(i + 1)
+ print "merging %d push-pops into movs" %(len(movs))
+ for m in movs:
+ print "\t%s <- %s" %(m.dst, m.src)
+ self.stmts[i + 1:i + 1] = movs
+ if len(ar) == 0:
+ self.stmts.pop(i)
+ else:
+ i += 1
+
+ #eliminating unused labels
+ for s in list(self.stmts):
+ if not isinstance(s, op.label):
+ continue
+ print "checking label %s..." %s.name
+ used = s.name in keep_labels
+ if s.name not in self.retlabels:
+ for j in self.stmts:
+ if isinstance(j, op.basejmp) and j.label == s.name:
+ print "used"
+ used = True
+ break
+ if not used:
+ print self.labels
+ self.remove_label(s.name)
+
+ #removing duplicate rets and rets at end
+ for i in xrange(len(self.stmts)):
+ if isinstance(self.stmts[i], op._ret):
+ j = i+1
+ while j < len(self.stmts) and isinstance(self.stmts[j], op._nop):
+ j += 1
+ if j == len(self.stmts) or isinstance(self.stmts[j], op._ret):
+ self.stmts[i] = op._nop(None)
+
+ self.optimize_sequence(op._stosb);
+ self.optimize_sequence(op._stosw);
+ self.optimize_sequence(op._movsb);
+ self.optimize_sequence(op._movsw);
+
+ def add(self, stmt):
+ #print stmt
+ comment = stmt.rfind(';')
+ if comment >= 0:
+ stmt = stmt[:comment]
+ stmt = stmt.strip()
+
+ r = self.__label_re.search(stmt)
+ if r is not None:
+ #label
+ self.add_label(r.group(1).lower())
+ #print "remains: %s" %r.group(2)
+ stmt = r.group(2).strip()
+
+ if len(stmt) == 0:
+ return
+
+ s = stmt.split(None)
+ cmd = s[0]
+ cl = getattr(op, '_' + cmd)
+ arg = " ".join(s[1:]) if len(s) > 1 else str()
+ o = cl(arg)
+ self.stmts.append(o)
+
+ def __str__(self):
+ r = []
+ for i in self.stmts:
+ r.append(i.__str__())
+ return "\n".join(r)
+
+ def visit(self, visitor, skip = 0):
+ for i in xrange(skip, len(self.stmts)):
+ self.stmts[i].visit(visitor)
diff --git a/devtools/update-version.pl b/devtools/update-version.pl
index 788cbc7e40..169fba7788 100755
--- a/devtools/update-version.pl
+++ b/devtools/update-version.pl
@@ -39,7 +39,7 @@ my @subs_files = qw(
dists/macosx/Info.plist
dists/iphone/Info.plist
dists/irix/scummvm.spec
- dists/nsis/scummvm.nsi
+ dists/win32/scummvm.nsi
dists/wii/meta.xml
dists/android/AndroidManifest.xml
dists/android/plugin-manifest.xml
diff --git a/dists/nsis/graphics/scummvm-install.ico b/dists/nsis/graphics/scummvm-install.ico
deleted file mode 100644
index b8b118c7bd..0000000000
--- a/dists/nsis/graphics/scummvm-install.ico
+++ /dev/null
Binary files differ
diff --git a/dists/ps3/ICON0.PNG b/dists/ps3/ICON0.PNG
new file mode 100644
index 0000000000..e0dc9d7847
--- /dev/null
+++ b/dists/ps3/ICON0.PNG
Binary files differ
diff --git a/dists/ps3/PIC1.PNG b/dists/ps3/PIC1.PNG
new file mode 100644
index 0000000000..1fcdeb71fc
--- /dev/null
+++ b/dists/ps3/PIC1.PNG
Binary files differ
diff --git a/dists/ps3/readme-ps3.md b/dists/ps3/readme-ps3.md
new file mode 100644
index 0000000000..2fb393b4fb
--- /dev/null
+++ b/dists/ps3/readme-ps3.md
@@ -0,0 +1,49 @@
+Prerequisites
+=============
+- A homebrew enabled PlayStation 3 console. As of now that mostly means having a custom firmware installed. Obtaining and installing such a software is out of the scope of this document. Sorry, but you're on your own for that one.
+- At least one ScummVM supported game. The list of compatible games can be seen here: http://www.scummvm.org/compatibility/
+The page http://wiki.scummvm.org/index.php/Where_to_get_the_games references some places where those games can be bought. Demonstration versions for most of the supported games are downloadable on http://scummvm.org/demos/
+- An USB drive.
+
+Installing
+==========
+From a computer, download the installable package of the PS3 port from ScummVM's main site. It should be a .pkg file. Copy it to an USB drive.
+After having plugged the USB drive to you PS3, the installation package should appear in the XMB under the "Games > Install Package" menu. Installing it copies ScummVM and its dependencies to your PS3's hard drive. It also adds the "Games > PlayStation 3 > ScummVM" XMB entry which is to be used to launch ScummVM.
+
+Configuring and playing games
+=============================
+The user manual describes how to add games to ScummVM and launch them : http://wiki.scummvm.org/index.php/User_Manual
+
+PlayStation 3 Specifics
+=======================
+Games can be launched either from an USB drive or from the internal hard drive. The internal hard drive has better performance though.
+Savegames are wrote in the /hdd0/game/SCUM12000/saves folder.
+
+Joypad button mapping
+=====================
+- Left stick => Mouse
+- Cross => Left mouse button
+- Circle => Right mouse button
+- Triangle => Game menu (F5)
+- Square => Escape
+- Start => ScummVM's in global game menu
+- Select => Toggle virtual keyboard
+- L1 => AGI predictive input dialog
+
+Disclaimer
+==========
+Unauthorized distribution of an installable package with non freeware games included is a violation of the copyright law and is as such forbidden.
+
+Building from source
+====================
+This port of ScummVM to the PS3 is based on SDL. It uses the open source SDK PSL1GHT.
+
+The dependencies needed to build it are :
+
+- The toolchain from https://github.com/ps3dev/ps3toolchain
+- SDL from https://github.com/zeldin/SDL_PSL1GHT
+- ScummVM from https://github.com/scummvm/scummvm
+
+Once all the dependencies are correctly setup, an installable package can be obtained from source by issuing the following command :
+
+./configure --host=ps3 && make ps3pkg
diff --git a/dists/ps3/sfo.xml b/dists/ps3/sfo.xml
new file mode 100644
index 0000000000..657e1c1410
--- /dev/null
+++ b/dists/ps3/sfo.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" ?>
+<sfo>
+ <value name="ATTRIBUTE" type="integer">
+ 0
+ </value>
+ <value name="BOOTABLE" type="integer">
+ 1
+ </value>
+ <value name="CATEGORY" type="string">
+ HG
+ </value>
+ <value name="PARENTAL_LEVEL" type="integer">
+ 0
+ </value>
+ <value name="PS3_SYSTEM_VER" type="string">
+ 01.8000
+ </value>
+ <value name="RESOLUTION" type="integer">
+ 63
+ </value>
+ <value name="SOUND_FORMAT" type="integer">
+ 279
+ </value>
+ <value name="TITLE" type="string">
+ ScummVM
+ </value>
+ <value name="TITLE_ID" type="string">
+ SCUM12000
+ </value>
+ <value name="VERSION" type="string">
+ 01.00
+ </value>
+</sfo>
diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec
index 777e0afc8a..cd51f45c0a 100644
--- a/dists/redhat/scummvm.spec
+++ b/dists/redhat/scummvm.spec
@@ -68,6 +68,8 @@ install -m644 -D dists/engine-data/queen.tbl %{buildroot}%{_datadir}/scummvm/que
install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.cpt
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/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
%clean
@@ -105,6 +107,8 @@ fi
%{_datadir}/scummvm/lure.dat
%{_datadir}/scummvm/drascula.dat
%{_datadir}/scummvm/teenagent.dat
+%{_datadir}/scummvm/hugo.dat
+%{_datadir}/scummvm/toon.dat
%{_mandir}/man6/scummvm.6*
#------------------------------------------------------------------------------
diff --git a/dists/redhat/scummvm.spec.in b/dists/redhat/scummvm.spec.in
index 13ce600d02..838a05411a 100644
--- a/dists/redhat/scummvm.spec.in
+++ b/dists/redhat/scummvm.spec.in
@@ -68,6 +68,8 @@ install -m644 -D dists/engine-data/queen.tbl %{buildroot}%{_datadir}/scummvm/que
install -m644 -D dists/engine-data/sky.cpt %{buildroot}%{_datadir}/scummvm/sky.cpt
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/toon.dat %{buildroot}%{_datadir}/scummvm/toon.dat
desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/applications dists/scummvm.desktop
%clean
@@ -105,6 +107,8 @@ fi
%{_datadir}/scummvm/lure.dat
%{_datadir}/scummvm/drascula.dat
%{_datadir}/scummvm/teenagent.dat
+%{_datadir}/scummvm/hugo.dat
+%{_datadir}/scummvm/toon.dat
%{_mandir}/man6/scummvm.6*
#------------------------------------------------------------------------------
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index 109437305c..9fa5489547 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -5,8 +5,14 @@
#endif
#define FILE 256
+#define IDI_ICON 1001
+#define IDI_COUNT 1002
+#define ID_GDF_XML __GDF_XML
IDI_ICON ICON DISCARDABLE "icons/scummvm.ico"
+IDI_COUNT ICON DISCARDABLE "icons/count.ico"
+
+ID_GDF_XML DATA "dists/win32/scummvm.gdf.xml"
scummmodern.zip FILE "gui/themes/scummmodern.zip"
#ifdef USE_TRANSLATION
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index c043ce1644..b91e7ebb0c 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -5,8 +5,14 @@
#endif
#define FILE 256
+#define IDI_ICON 1001
+#define IDI_COUNT 1002
+#define ID_GDF_XML __GDF_XML
IDI_ICON ICON DISCARDABLE "icons/scummvm.ico"
+IDI_COUNT ICON DISCARDABLE "icons/count.ico"
+
+ID_GDF_XML DATA "dists/win32/scummvm.gdf.xml"
scummmodern.zip FILE "gui/themes/scummmodern.zip"
#ifdef USE_TRANSLATION
diff --git a/dists/win32/ScummVM.iss b/dists/win32/ScummVM.iss
index 00f4868e60..8edc647e62 100644
--- a/dists/win32/ScummVM.iss
+++ b/dists/win32/ScummVM.iss
@@ -1,8 +1,12 @@
[Setup]
-DefaultDirName={pf}\ScummVM
AppCopyright=2011
AppName=ScummVM
AppVerName=ScummVM Git
+AppPublisher=The ScummVM Team
+AppPublisherURL=http://www.scummvm.org/
+AppSupportURL=http://www.scummvm.org/
+AppUpdatesURL=http://www.scummvm.org/
+DefaultDirName={pf}\ScummVM
DefaultGroupName=ScummVM
AllowNoIcons=true
AlwaysUsePersonalGroup=false
@@ -14,7 +18,8 @@ DisableStartupPrompt=true
AppendDefaultDirName=false
SolidCompression=true
DirExistsWarning=no
-SetupIconFile=scummvm.ico
+SetupIconFile=graphics\scummvm-install.ico
+WizardImageFile=graphics\left.bmp
ShowLanguageDialog=yes
LanguageDetectionMethod=uilanguage
@@ -44,6 +49,7 @@ Name: es; MessagesFile: compiler:Languages\Spanish.isl
[Icons]
Name: {group}\{cm:UninstallProgram, ScummVM}; Filename: {uninstallexe}
Name: {group}\ScummVM; Filename: {app}\scummvm.exe; WorkingDir: {app}; Comment: scummvm; Flags: createonlyiffileexists; IconIndex: 0
+Name: {group}\ScummVM (noconsole); Filename: {app}\scummvm.exe; Parameters: "--no-console"; WorkingDir: {app}; Comment: scummvm; Flags: createonlyiffileexists; IconIndex: 0
Name: {group}\Authors; Filename: {app}\AUTHORS.txt; WorkingDir: {app}; Comment: AUTHORS; Flags: createonlyiffileexists
Name: {group}\Copying; Filename: {app}\COPYING.txt; WorkingDir: {app}; Comment: COPYING; Flags: createonlyiffileexists
Name: {group}\Copying.LGPL; Filename: {app}\COPYING.LGPL.txt; WorkingDir: {app}; Comment: COPYING.LGPL; Flags: createonlyiffileexists
diff --git a/dists/nsis/graphics/left.bmp b/dists/win32/graphics/left.bmp
index 8b31d7d09a..8b31d7d09a 100644
--- a/dists/nsis/graphics/left.bmp
+++ b/dists/win32/graphics/left.bmp
Binary files differ
diff --git a/dists/win32/graphics/scummvm-install.ico b/dists/win32/graphics/scummvm-install.ico
new file mode 100644
index 0000000000..6312959509
--- /dev/null
+++ b/dists/win32/graphics/scummvm-install.ico
Binary files differ
diff --git a/dists/win32/plugins/Games.dll b/dists/win32/plugins/Games.dll
new file mode 100644
index 0000000000..3a378b7064
--- /dev/null
+++ b/dists/win32/plugins/Games.dll
Binary files differ
diff --git a/dists/win32/scummvm.gdf.xml b/dists/win32/scummvm.gdf.xml
new file mode 100644
index 0000000000..1c50924e15
--- /dev/null
+++ b/dists/win32/scummvm.gdf.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<GameDefinitionFile xmlns:baseTypes="urn:schemas-microsoft-com:GamesExplorerBaseTypes.v1" xmlns="urn:schemas-microsoft-com:GameDescription.v1">
+ <GameDefinition gameID="{F2475C5C-EA7C-41F0-A56D-1ABF7CFEA389}">
+ <Name>ScummVM</Name>
+ <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!</Description>
+ <ReleaseDate>2011-09-30</ReleaseDate>
+ <Genres>
+ <Genre>Adventure</Genre>
+ </Genres>
+ <Version>
+ <VersionFile path="scummvm.exe" />
+ </Version>
+ <WindowsSystemPerformanceRating minimum="1.0" recommended="2.0" />
+ <Developers>
+ <Developer URI="http://www.scummvm.org">The ScummVM Team</Developer>
+ </Developers>
+ <Publishers>
+ <Publisher URI="http://www.scummvm.org">The ScummVM Team</Publisher>
+ </Publishers>
+ <GameExecutables>
+ <GameExecutable path="scummvm.exe" />
+ </GameExecutables>
+ <ExtendedProperties>
+ <GameTasks>
+ <Play>
+ <Primary>
+ <FileTask path="scummvm.exe" arguments="--no-console" />
+ </Primary>
+ <Task index="1" name="Play (console)">
+ <FileTask path="scummvm.exe" arguments="" />
+ </Task>
+ </Play>
+ <Support>
+ <Task index="0" name="View README">
+ <FileTask path="README.txt" arguments="" />
+ </Task>
+ <Task index="1" name="ScummVM Website">
+ <URLTask Link="http://www.scummvm.org" />
+ </Task>
+ </Support>
+ </GameTasks>
+ </ExtendedProperties>
+ </GameDefinition>
+</GameDefinitionFile> \ No newline at end of file
diff --git a/dists/nsis/scummvm.nsi b/dists/win32/scummvm.nsi
index 50ccadaf74..01a7e72afe 100644
--- a/dists/nsis/scummvm.nsi
+++ b/dists/win32/scummvm.nsi
@@ -20,19 +20,26 @@
#!define _DEBUG
#!define _INCLUDE_DATA_FILES
+!define _ENABLE_GAME_EXPLORER
+#!define _LOG_BUILD
+!define _CONVERT_TEXT
Name ScummVM
# Included files
!include MUI2.nsh
+# Plugins
+!ifdef _ENABLE_GAME_EXPLORER
+!AddPluginDir "./plugins"
+!endif
+
#########################################################################################
# Command line options
#########################################################################################
#!define top_srcdir ""
-#!define build_dir ""
-#!define text_dir ""
+#!define staging_dir ""
#!define ARCH "" ;(optional, defaults to win32)
# Check parameters
@@ -40,17 +47,19 @@ Name ScummVM
!error "Top source folder has not been passed to command line!"
!endif
-!ifndef build_dir
- !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
-!endif
-
-!ifndef text_dir
- !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!"
+!ifndef staging_dir
+ !error "Staging folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
!endif
!ifndef ARCH
!warning "ARCH has not been defined, defaulting to 'win32'"
!define ARCH "win32"
+!else
+ !if "${ARCH}" == ""
+ !warning "ARCH was empty, defaulting to 'win32'"
+ !undef ARCH
+ !define ARCH "win32"
+ !endif
!endif
#########################################################################################
@@ -72,7 +81,7 @@ Name ScummVM
#########################################################################################
# Installer configuration
#########################################################################################
-OutFile ${build_dir}\scummvm-${VERSION}-${ARCH}.exe
+OutFile ${staging_dir}\scummvm-${VERSION}-${ARCH}.exe
InstallDir $PROGRAMFILES\ScummVM ; Default installation folder
InstallDirRegKey HKCU "Software\ScummVM\ScummVM" "InstallPath" ; Get installation folder from registry if available
; The application name needs to be refered directly instead of through ${REGKEY}
@@ -220,17 +229,35 @@ Var StartMenuGroup
# Installer sections
#########################################################################################
Section "ScummVM" SecMain
+!ifdef _LOG_BUILD
+ LogSet on
+!endif
SetOutPath $INSTDIR
SetOverwrite on
# Text files
- File /oname=AUTHORS.txt "${text_dir}\AUTHORS"
- File /oname=COPYING.LGPL.txt "${text_dir}\COPYING.LGPL"
- File /oname=COPYING.txt "${text_dir}\COPYING"
- File /oname=COPYRIGHT.txt "${text_dir}\COPYRIGHT"
- File /oname=NEWS.txt "${text_dir}\NEWS"
- File /oname=README.txt "${text_dir}\README"
- File /oname=README-SDL.txt "${build_dir}\README-SDL"
+ File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS"
+ File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL"
+ File /oname=COPYING.txt "${top_srcdir}\COPYING"
+ File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT"
+ File /oname=NEWS.txt "${top_srcdir}\NEWS"
+ File /oname=README.txt "${top_srcdir}\README"
+
+!ifdef _CONVERT_TEXT
+ # Convert line endings
+ Push "$INSTDIR\AUTHORS.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.LGPL.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYRIGHT.txt"
+ Call unix2dos
+ Push "$INSTDIR\NEWS.txt"
+ Call unix2dos
+ Push "$INSTDIR\README.txt"
+ Call unix2dos
+!endif
!ifdef _INCLUDE_DATA_FILES
# Engine data
@@ -253,10 +280,27 @@ Section "ScummVM" SecMain
!endif
# Main exe and dlls
- File "${build_dir}\scummvm.exe"
- File "${build_dir}\SDL.dll"
+ File "${staging_dir}\scummvm.exe"
+ File "${staging_dir}\SDL.dll"
WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder
+
+ #Register with game explorer
+!ifdef _ENABLE_GAME_EXPLORER
+ Games::registerGame "$INSTDIR\scummvm.exe"
+ pop $0
+ # This is for Vista only, for 7 the tasks are defined in the gdf xml
+ ${If} $0 != "0"
+ ${AndIf} $0 != ""
+ ${AndIf} $0 != "$INSTDIR\scummvm.exe"
+ CreateDirectory "$0\PlayTasks\0"
+ CreateShortcut "$0\PlayTasks\0\Play.lnk" "$INSTDIR\scummvm.exe" "--no-console"
+ CreateDirectory "$0\PlayTasks\1"
+ CreateShortcut "$0\PlayTasks\1\Play (console).lnk" "$INSTDIR\scummvm.exe"
+ CreateDirectory "$0\SupportTasks\0"
+ CreateShortcut "$0\SupportTasks\0\Home Page.lnk" "${URL}"
+ ${EndIf}
+!endif
SectionEnd
# Write Start menu entries and uninstaller
@@ -266,7 +310,8 @@ Section -post SecMainPost
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetShellVarContext all ; Create shortcuts in the all-users folder
CreateDirectory "$SMPROGRAMS\$StartMenuGroup"
- CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon
+ CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon
+ CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name) (No console).lnk" $INSTDIR\$(^Name).exe "--no-console" "$INSTDIR\$(^Name).exe" 0
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Readme.lnk" $INSTDIR\README.txt
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END
@@ -320,6 +365,10 @@ Section -un.Main SecUninstall
Delete /REBOOTOK $INSTDIR\translations.dat
!endif
+!ifdef _ENABLE_GAME_EXPLORER
+ Games::unregisterGame "$INSTDIR\scummvm.exe"
+!endif
+
Delete /REBOOTOK $INSTDIR\scummvm.exe
Delete /REBOOTOK $INSTDIR\SDL.dll
SectionEnd
@@ -354,3 +403,63 @@ Function un.onInit
ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
FunctionEnd
+
+
+#########################################################################################
+# Helper functions
+#########################################################################################
+
+!ifdef _CONVERT_TEXT
+;-------------------------------------------------------------------------------
+; strips all CRs and then converts all LFs into CRLFs
+; (this is roughly equivalent to "cat file | dos2unix | unix2dos")
+;
+; Usage:
+; Push "infile"
+; Call unix2dos
+;
+; Note: this function destroys $0 $1 $2
+Function unix2dos
+ ClearErrors
+
+ Pop $2
+ Rename $2 $2.U2D
+ FileOpen $1 $2 w
+
+ FileOpen $0 $2.U2D r
+
+ Push $2 ; save name for deleting
+
+ IfErrors unix2dos_done
+
+ ; $0 = file input (opened for reading)
+ ; $1 = file output (opened for writing)
+
+unix2dos_loop:
+ ; read a byte (stored in $2)
+ FileReadByte $0 $2
+ IfErrors unix2dos_done ; EOL
+ ; skip CR
+ StrCmp $2 13 unix2dos_loop
+ ; if LF write an extra CR
+ StrCmp $2 10 unix2dos_cr unix2dos_write
+
+unix2dos_cr:
+ FileWriteByte $1 13
+
+unix2dos_write:
+ ; write byte
+ FileWriteByte $1 $2
+ ; read next byte
+ Goto unix2dos_loop
+
+unix2dos_done:
+ ; close files
+ FileClose $0
+ FileClose $1
+
+ ; delete original
+ Pop $0
+ Delete $0.U2D
+FunctionEnd
+!endif
diff --git a/dists/nsis/scummvm.nsi.in b/dists/win32/scummvm.nsi.in
index c94e5943f7..cba1e81e33 100644
--- a/dists/nsis/scummvm.nsi.in
+++ b/dists/win32/scummvm.nsi.in
@@ -20,19 +20,26 @@
#!define _DEBUG
#!define _INCLUDE_DATA_FILES
+!define _ENABLE_GAME_EXPLORER
+#!define _LOG_BUILD
+!define _CONVERT_TEXT
Name ScummVM
# Included files
!include MUI2.nsh
+# Plugins
+!ifdef _ENABLE_GAME_EXPLORER
+!AddPluginDir "./plugins"
+!endif
+
#########################################################################################
# Command line options
#########################################################################################
#!define top_srcdir ""
-#!define build_dir ""
-#!define text_dir ""
+#!define staging_dir ""
#!define ARCH "" ;(optional, defaults to win32)
# Check parameters
@@ -40,17 +47,19 @@ Name ScummVM
!error "Top source folder has not been passed to command line!"
!endif
-!ifndef build_dir
- !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
-!endif
-
-!ifndef text_dir
- !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!"
+!ifndef staging_dir
+ !error "Staging folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
!endif
!ifndef ARCH
!warning "ARCH has not been defined, defaulting to 'win32'"
!define ARCH "win32"
+!else
+ !if "${ARCH}" == ""
+ !warning "ARCH was empty, defaulting to 'win32'"
+ !undef ARCH
+ !define ARCH "win32"
+ !endif
!endif
#########################################################################################
@@ -72,7 +81,7 @@ Name ScummVM
#########################################################################################
# Installer configuration
#########################################################################################
-OutFile ${build_dir}\scummvm-${VERSION}-${ARCH}.exe
+OutFile ${staging_dir}\scummvm-${VERSION}-${ARCH}.exe
InstallDir $PROGRAMFILES\ScummVM ; Default installation folder
InstallDirRegKey HKCU "Software\ScummVM\ScummVM" "InstallPath" ; Get installation folder from registry if available
; The application name needs to be refered directly instead of through ${REGKEY}
@@ -220,17 +229,35 @@ Var StartMenuGroup
# Installer sections
#########################################################################################
Section "ScummVM" SecMain
+!ifdef _LOG_BUILD
+ LogSet on
+!endif
SetOutPath $INSTDIR
SetOverwrite on
# Text files
- File /oname=AUTHORS.txt "${text_dir}\AUTHORS"
- File /oname=COPYING.LGPL.txt "${text_dir}\COPYING.LGPL"
- File /oname=COPYING.txt "${text_dir}\COPYING"
- File /oname=COPYRIGHT.txt "${text_dir}\COPYRIGHT"
- File /oname=NEWS.txt "${text_dir}\NEWS"
- File /oname=README.txt "${text_dir}\README"
- File /oname=README-SDL.txt "${build_dir}\README-SDL"
+ File /oname=AUTHORS.txt "${top_srcdir}\AUTHORS"
+ File /oname=COPYING.LGPL.txt "${top_srcdir}\COPYING.LGPL"
+ File /oname=COPYING.txt "${top_srcdir}\COPYING"
+ File /oname=COPYRIGHT.txt "${top_srcdir}\COPYRIGHT"
+ File /oname=NEWS.txt "${top_srcdir}\NEWS"
+ File /oname=README.txt "${top_srcdir}\README"
+
+!ifdef _CONVERT_TEXT
+ # Convert line endings
+ Push "$INSTDIR\AUTHORS.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.LGPL.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYING.txt"
+ Call unix2dos
+ Push "$INSTDIR\COPYRIGHT.txt"
+ Call unix2dos
+ Push "$INSTDIR\NEWS.txt"
+ Call unix2dos
+ Push "$INSTDIR\README.txt"
+ Call unix2dos
+!endif
!ifdef _INCLUDE_DATA_FILES
# Engine data
@@ -253,10 +280,27 @@ Section "ScummVM" SecMain
!endif
# Main exe and dlls
- File "${build_dir}\scummvm.exe"
- File "${build_dir}\SDL.dll"
+ File "${staging_dir}\scummvm.exe"
+ File "${staging_dir}\SDL.dll"
WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder
+
+ #Register with game explorer
+!ifdef _ENABLE_GAME_EXPLORER
+ Games::registerGame "$INSTDIR\scummvm.exe"
+ pop $0
+ # This is for Vista only, for 7 the tasks are defined in the gdf xml
+ ${If} $0 != "0"
+ ${AndIf} $0 != ""
+ ${AndIf} $0 != "$INSTDIR\scummvm.exe"
+ CreateDirectory "$0\PlayTasks\0"
+ CreateShortcut "$0\PlayTasks\0\Play.lnk" "$INSTDIR\scummvm.exe" "--no-console"
+ CreateDirectory "$0\PlayTasks\1"
+ CreateShortcut "$0\PlayTasks\1\Play (console).lnk" "$INSTDIR\scummvm.exe"
+ CreateDirectory "$0\SupportTasks\0"
+ CreateShortcut "$0\SupportTasks\0\Home Page.lnk" "${URL}"
+ ${EndIf}
+!endif
SectionEnd
# Write Start menu entries and uninstaller
@@ -266,7 +310,8 @@ Section -post SecMainPost
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetShellVarContext all ; Create shortcuts in the all-users folder
CreateDirectory "$SMPROGRAMS\$StartMenuGroup"
- CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon
+ CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\$(^Name).exe "" "$INSTDIR\$(^Name).exe" 0 ; Create shortcut with icon
+ CreateShortCut "$SMPROGRAMS\$StartMenuGroup\$(^Name) (No console).lnk" $INSTDIR\$(^Name).exe "--no-console" "$INSTDIR\$(^Name).exe" 0
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Readme.lnk" $INSTDIR\README.txt
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
!insertmacro MUI_STARTMENU_WRITE_END
@@ -320,6 +365,10 @@ Section -un.Main SecUninstall
Delete /REBOOTOK $INSTDIR\translations.dat
!endif
+!ifdef _ENABLE_GAME_EXPLORER
+ Games::unregisterGame "$INSTDIR\scummvm.exe"
+!endif
+
Delete /REBOOTOK $INSTDIR\scummvm.exe
Delete /REBOOTOK $INSTDIR\SDL.dll
SectionEnd
@@ -354,3 +403,63 @@ Function un.onInit
ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
FunctionEnd
+
+
+#########################################################################################
+# Helper functions
+#########################################################################################
+
+!ifdef _CONVERT_TEXT
+;-------------------------------------------------------------------------------
+; strips all CRs and then converts all LFs into CRLFs
+; (this is roughly equivalent to "cat file | dos2unix | unix2dos")
+;
+; Usage:
+; Push "infile"
+; Call unix2dos
+;
+; Note: this function destroys $0 $1 $2
+Function unix2dos
+ ClearErrors
+
+ Pop $2
+ Rename $2 $2.U2D
+ FileOpen $1 $2 w
+
+ FileOpen $0 $2.U2D r
+
+ Push $2 ; save name for deleting
+
+ IfErrors unix2dos_done
+
+ ; $0 = file input (opened for reading)
+ ; $1 = file output (opened for writing)
+
+unix2dos_loop:
+ ; read a byte (stored in $2)
+ FileReadByte $0 $2
+ IfErrors unix2dos_done ; EOL
+ ; skip CR
+ StrCmp $2 13 unix2dos_loop
+ ; if LF write an extra CR
+ StrCmp $2 10 unix2dos_cr unix2dos_write
+
+unix2dos_cr:
+ FileWriteByte $1 13
+
+unix2dos_write:
+ ; write byte
+ FileWriteByte $1 $2
+ ; read next byte
+ Goto unix2dos_loop
+
+unix2dos_done:
+ ; close files
+ FileClose $0
+ FileClose $1
+
+ ; delete original
+ Pop $0
+ Delete $0.U2D
+FunctionEnd
+!endif
diff --git a/doc/translations/README-translation_template.txt b/doc/QuickStart
index ec43ebef60..ec43ebef60 100755..100644
--- a/doc/translations/README-translation_template.txt
+++ b/doc/QuickStart
diff --git a/doc/de/Liesmich b/doc/de/Liesmich
new file mode 100644
index 0000000000..b5f16f4a88
--- /dev/null
+++ b/doc/de/Liesmich
@@ -0,0 +1,770 @@
+ScummVM – Liesmich-Datei
+------------------------------------------------------------------------
+
+Dieses Dokument ist eine auszugsweise Übersetzung der englischen README-Datei.
+Das Original-Dokument enthält viel mehr Informationen. Sollten Sie hier also
+nicht das finden, was Sie benötigen und ein wenig Englisch können, sollten Sie
+sich die englische README-Datei ansehen.
+
+Für weitere Informationen, Kompatibilitätslisten, Einzelheiten zu Spenden, die
+neusten veröffentlichten Versionen, Fortschrittsberichte und mehr besuchen Sie
+bitte die ScummVM-Website unter der Adresse: http://www.scummvm.org/
+
+
+Inhaltsverzeichnis:
+-------------------
+1.0) Einführung
+ * 1.1 Über ScummVM
+ * 1.2 Schnellstart
+2.0) Kontakt
+ * 2.1 Fehler berichten
+3.0) Unterstützte Spiele
+ * 3.1 Kopierschutz
+ * 3.2 Hinweise zu Commodore64-Spielen
+ * 3.3 Hinweise zu Maniac Mansion NES
+ * 3.4 Hinweise zu Macintosh-Spielen
+ * 3.5 Hinweise zu Spielen auf mehren CDs
+ * 3.6 Hinweise zu The Curse of Monkey Island
+ * 3.7 Hinweise zu den Baphomets-Fluch-Spielen
+ * 3.8 Hinweise zu Beneath a Steel Sky
+ * 3.9 Hinweise zu Flight of the Amazon Queen
+ * 3.10 Hinweise zu Gobliiins
+ * 3.11 Hinweise zu Inherit the Earth: Quest for the Orb (Macintosh)
+ * 3.12 Hinweise zu Simon the Sorcerer 1 und 2
+ * 3.13 Hinweise zu Floyd – Es gibt noch Helden
+ * 3.14 Hinweise zu The Legend of Kyrandia
+ * 3.15 Hinweise zum vorhersagenden Eingabedialog bei Sierras AGI-Spielen
+
+
+1.0) Einführung:
+---- -----------
+
+1.1) Über ScummVM:
+---- -------------
+ScummVM ist ein Programm, welches es Ihnen ermöglicht, bestimmte klassische
+Grafik-Adventure (unter anderem aus dem Point-and-Click-Bereich) zu spielen,
+vorausgesetzt, Sie sind im Besitz der Dateien des Spiels. Der Trick dabei ist:
+ScummVM ersetzt lediglich die Funktion der ausführbaren Dateien, die mit den
+Spielen kamen, was ermöglicht, diese Spiele auf Systemen zu spielen, für welche
+sie nie erstellt wurden!
+
+Ursprünglich wurde dieses Programm dafür entwickelt, um SCUMM-Spiele von
+LucasArts auszuführen, wie beispielsweise Maniac Mansion, Monkey Island, Day of
+the Tentacle oder Sam & Max. SCUMM steht als Abkürzung für „Script Creation
+Utility for Maniac Mansion“ (deutsch etwa: Skripterstellungsdienstprogramm für
+Maniac Mansion), was das erste Spiel von LucasArts war, für welches LucasArts
+dieses System entworfen hatte. Und viel später verlieh es seinen Namen an
+ScummVM (wobei „VM“ für „Virtuelle Maschine“ steht).
+
+Mit der Zeit wurde Unterstützung für viele Nicht-SCUMM-Spiele hinzugefügt und
+ScummVM unterstützt nun auch viele AGI- und SCI-Spiele von Sierra (wie
+beispielsweise King's Quest 1-6, Space Quest 1-5, ...), Discworld 1 und 2, Simon
+the Sorcerer 1 und 2, Beneath A Steel Sky, Lure of the Temptress, Baphomets
+Fluch I und II, Flight of the Amazon Queen, Gobliiins 1-3, die Adventure-Reihe
+The Legend of Kyrandia, viele der SCUMM-Spiele für Kinder von Humongous
+Entertainment (einschließlich der Spiele von Fritzi Fisch und Töff-Töff) und
+viele mehr. Sie können eine vollständige Liste mit Einzelheiten einsehen, welche
+Auskunft darüber gibt, welche Spiele unterstützt werden und wie gut. Gehen Sie
+hierfür auf die Kompatibilitätsseite. ScummVM wird fortlaufend verbessert, also
+schauen Sie öfter einmal vorbei.
+
+Unter den Systemen, mit denen Sie diese Spiele spielen können, befinden sich
+normale Schreibtisch-Computer (mit den Betriebssystemen Windows, Linux,
+Mac OS X, ...), Spielekonsolen (Dreamcast, Nintendo DS & Wii, PS2, PSP, ...),
+Smartphones (Android, iPhone, PocketPC, Symbian ...) und einige weitere.
+
+Zurzeit befindet sich ScummVM immer noch stark in der Entwicklung. Seien Sie
+sich bewusst, dass wir zwar versuchen, dass viele Spiele mit wenigen erheblichen
+Fehlern durchgespielt werden können, aber es dennoch zu Abstürzen kommen kann
+und wir keine Gewähr übernehmen. Davon abgesehen: Einige Spiele werden seit
+längerer Zeit unterstützt und sollten in jeder neusten stabilen veröffentlichten
+Version ohne größere Probleme laufen. Sie können sich einen Eindruck davon
+verschaffen, wie gut jedes Spiel unter ScummVM läuft, indem Sie auf die
+Kompatibilitätsseite schauen. Wenn Sie sich ein wenig im Internet umsehen,
+können Sie feststellen, dass ScummVM sogar kommerziell genutzt wird, um einige
+der unterstützen Spiele für moderne Plattformen wiederzuveröffentlichen. Dies
+zeigt, dass mehrere Firmen mit der Qualität der Software zufrieden sind und wie
+gut einige der Spiele mit Hilfe des Programms laufen.
+
+Wenn Ihnen ScummVM gefällt, können Sie uns gerne Geld spenden, indem Sie auf die
+PayPal-Schaltfläche auf der ScummVM-Website klicken. Dies hilft uns dabei,
+notwendige Dienstprogramme zu kaufen, um ScummVM einfacher und schneller zu
+entwickeln. Wenn Sie nicht spenden können, dürfen Sie auch gerne einen Patch
+beisteuern.
+
+1.2) Schnellstart:
+---- -------------
+WICHTIG: In dieser kurzen Anleitung wird davon ausgegangen, dass Sie ScummVM auf
+Deutsch benutzen. Standardmäßig wird ScummVM die Sprache Ihres Betriebssystems
+verwenden. Wenn Sie ScummVM lieber auf Englisch verwenden möchten, benutzen Sie
+bitte die Anleitung in der englischen README-Datei.
+
+Für die ungeduldigen unter den Anwendern ist hier in fünf einfachen Schritten
+kurz beschrieben, wie man ScummVM lauffähig macht und das Programm verwendet.
+
+1. Laden Sie ScummVM unter der Adresse http://www.scummvm.org/downloads.php
+herunter und installieren Sie es.
+
+2. Erstellen Sie ein Verzeichnis auf Ihrer Festplatte und kopieren Sie die
+Dateien des Spiels vom Original-Datenträger in dieses Verzeichnis. Wiederholen
+Sie diesen Vorgang für jedes Spiel, das Sie spielen möchten (es ist besser, für
+jedes Spiel ein eigenes Verzeichnis zu verwenden).
+
+3. Starten Sie ScummVM.
+
+Sollte an diesem Punkt ScummVM auf Englisch statt auf Deutsch erscheinen, gehen
+Sie wie folgt vor, um die Spracheinstellung zu ändern:
+-Klicken Sie auf „Options“.
+-Klicken Sie auf den rechten Pfeil in der Reiterleiste und wählen den Reiter
+ „Misc“ aus.
+-Wählen Sie im Feld „GUI Language“ „Deutsch“ aus und klicken auf „OK“.
+-Bestätigen Sie die erscheinende Nachricht, klicken auf „Quit“, um ScummVM zu
+ beenden, und starten dann das Programm erneut.
+
+Nun klicken Sie auf „Spiel hinzufügen“, wählen das Verzeichnis mit den Dateien
+des Spiels aus (versuchen Sie nicht, die Dateien des Spiels selbst auszuwählen!)
+und klicken Sie auf „Auswählen“.
+
+4. Ein Dialog sollte erscheinen, der Ihnen ermöglicht, verschiedene
+Einstellungen vorzunehmen, sollten Sie dies wünschen (es sollte jedoch in
+Ordnung sein, alles voreingestellt zu belassen). Bestätigen Sie diesen Dialog.
+
+5. Wählen Sie das Spiel aus der Liste aus, welches Sie spielen möchten, und
+klicken Sie auf „Starten“.
+
+ScummVM behält die Spiele in der Liste, die Sie hinzufügen. Wenn Sie also
+ScummVM schließen, werden beim nächsten Start alle Spiele, die Sie zuvor
+hinzugefügt haben, in der Liste angezeigt. Sie können somit direkt zu Schritt 5
+übergehen, außer Sie wollen noch mehr Spiele hinzufügen.
+
+Tipp: Wenn Sie mehrere Spiele auf einmal hinzufügen möchten, drücken Sie die
+Umschalt-Taste (Shift), bevor Sie auf „Spiel hinzufügen“ klicken. Diese
+Schaltfläche wird somit ihren Text zu „Durchsuchen“ umändern und wenn Sie dann
+auf diese klicken, werden Sie auch dazu aufgefordert, ein Verzeichnis
+auszuwählen, nur dieses Mal wird ScummVM alle Unterverzeichnisse automatisch
+nach unterstützen Spielen durchsuchen.
+
+
+2.0) Kontakt:
+---- --------
+Der einfachste Weg, um mit dem ScummVM-Team in Verbindung zu treten, ist,
+Fehlerberichte einzusenden (siehe Abschnitt 2.1) oder durch Verwendung des
+Forums unter der Adresse http://forums.scummvm.org .
+Sie können ebenso der Mailing-Liste scummvm-devel beitreten und an diese E-Mails
+versenden oder mit uns im IRC chatten (#scummvm unter irc.freenode.net). Bitte
+fordern Sie uns nicht dazu auf, ein nicht unterstütztes Spiel zu unterstützen.
+Lesen Sie zuerst die Seite FAQ (Häufig gestellte Fragen) auf unserer Website.
+Bitte beachten Sie, dass die offizielle Sprache des Forums, der Mailing-Liste
+und des Chats Englisch ist und keine andere Sprache dort verwendet werden
+sollte.
+
+
+2.1) Fehler berichten:
+---- -----------------
+Um einen Fehler zu berichten, erstellen Sie bitte ein SourceForge-Konto und
+folgen Sie dem Link „Bug Tracker“ auf der ScummVM-Website. Bitte stellen Sie
+sicher, dass sich der Bug wiedererzeugen lässt und immer noch in der neusten
+Version von SVN oder des Daily Builds auftritt. Bitte sehen Sie auch auf der
+Kompatibilitätsliste der ScummVM-Website für dieses Spiel nach, um
+sicherzustellen, dass das Problem nicht bereits bekannt ist:
+
+ http://www.scummvm.org/compatibility_stable.php
+
+Bitte berichten Sie keine Fehler zu Spielen, die nicht als durchspielbar im
+Bereich „Supported Games“ oder der Kompatibilitätsliste aufgelistet sind.
+Wir -wissen-, dass diese Spiele Fehler aufweisen.
+
+Bitte liefern Sie folgende Informationen:
+ - ScummVM-Version (BITTE mit neuster Version von SVN oder des Daily Builds
+ testen)
+ - Einzelheiten zum Fehler, einschließlich Anweisungen, um den Fehler
+ hervorzurufen
+ - Sprache des Spiels (Deutsch, Englisch ...)
+ - Version des Spiels (Version mit Sprachausgabe [Talkie],
+ Diskettenversion, ...)
+ - Plattform und gegebenenfalls Compiler (Win32, Linux, FreeBSD, ...)
+ - Fügen Sie – wenn möglich - einen Speicherstand hinzu.
+ - Wenn dieser Fehler erst seit kurzem Auftritt, teilen Sie bitte die letzte
+ Version ohne den Fehler mit und die erste Version mit diesem Fehler.
+ Auf diese Weise können wir diesen schneller beseitigen, indem wir die
+ vorgenommen Veränderungen einsehen.
+
+Zum Schluss möchten wir Sie noch bitten, jeden Punkt einzeln zu berichten. Bitte
+senden Sie nicht mehrere Punkte mit demselben Ticket ein, ansonsten wird es
+schwierig, den Status jedes einzelnen Fehlers zu verfolgen. Denken Sie bitte
+auch daran, dass alle Fehlerberichte in Englisch verfasst sein müssen.
+
+
+3.0) Unterstützte Spiele:
+---- --------------------
+Im Moment gelten folgende Spiele als funktionsfähig gemeldet und sollten bis zum
+Ende spielbar sein:
+
+SCUMM-Spiele von LucasArts:
+ Maniac Mansion [maniac]
+ Zak McKracken and the Alien Mindbenders [zak]
+ Indiana Jones and the Last Crusade [indy3]
+ Loom [loom]
+ The Secret of Monkey Island [monkey]
+ Monkey Island 2: LeChuck's Revenge [monkey2]
+ Indiana Jones and the Fate of Atlantis [atlantis]
+ Day of the Tentacle [tentacle]
+ Sam & Max Hit the Road [samnmax]
+ Vollgas [ft]
+ The Dig [dig]
+ The Curse of Monkey Island [comi]
+
+AGI-Spiele von Sierra:
+ The Black Cauldron [bc]
+ Gold Rush! [goldrush]
+ King's Quest I [kq1]
+ King's Quest II [kq2]
+ King's Quest III [kq3]
+ King's Quest IV [kq4]
+ Leisure Suit Larry in the Land of the
+ Lounge Lizards [lsl1]
+ Mixed-Up Mother Goose [mixedup]
+ Manhunter 1: New York [mh1]
+ Manhunter 2: San Francisco [mh2]
+ Police Quest I: In Pursuit of the Death
+ Angel [pq1]
+ Space Quest I: The Sarien Encounter [sq1]
+ Space Quest II: Vohaul's Revenge [sq2]
+ Erstellte Spiele von Fans [agi-fanmade]
+
+AGOS-Spiele von Adventuresoft/Horrorsoft:
+ Elvira - Mistress of the Dark [elvira1]
+ Elvira II - The Jaws of Cerberus [elvira2]
+ Personal Nightmare [pn]
+ Waxworks [waxworks]
+ Simon the Sorcerer 1 [simon1]
+ Simon the Sorcerer 2 [simon2]
+ Simon the Sorcerer's Game Pack
+ - Dämonen in meinem PC [dimp]
+ Simon the Sorcerer's Game Pack
+ - Jumble [jumble]
+ Simon the Sorcerer's Game Pack
+ - NoPatience [puzzle]
+ Simon the Sorcerer's Game Pack
+ - Swampy Adventures [swampy]
+ Floyd - Es gibt noch Helden [feeble]
+
+GOB-Spiele von Coktel Vision:
+ Bargon Attack [bargon]
+ Gobliiins [gob1]
+ Gobliins 2 [gob2]
+ Goblins 3 [gob3]
+ Lost in Time [lostintime]
+ Woodruff and the Schnibble of Azimuth [woodruff]
+ Ween: The Prophecy [ween]
+
+MADE-Spiele von Activision:
+ Leather Goddesses of Phobos 2 [lgop2]
+ Return to Zork [rtz]
+ Rodney's Funscreen [rodney]
+ The Manhole [manhole]
+
+Andere Spiele:
+ Beneath a Steel Sky [sky]
+ Baphomets Fluch [sword1]
+ Baphomets Fluch II:
+ Die Spiegel der Finsternis [sword2]
+ Cruise for a Corpse [cruise]
+ Discworld [dw]
+ Discworld 2: Vermutlich vermisst [dw2]
+ Draci Historie [draci]
+ Drascula: The Vampire Strikes Back [drascula]
+ Flight of the Amazon Queen [queen]
+ Future Wars [fw]
+ Erben der Erde: Die große Suche [ite]
+ Nippon Safes Inc. [nippon]
+ The Legend of Kyrandia [kyra1]
+ The Legend of Kyrandia: The Hand of Fate [kyra2]
+ The Legend of Kyrandia: Malcolm's Revenge [kyra3]
+ Touché: Die Abenteuer des fünften
+ Musketiers [touche]
+
+SCUMM-Spiele von Humongous Entertainment:
+ Backyard Baseball [baseball]
+ Backyard Baseball 2001 [baseball2001]
+ Backyard Football [football]
+ Big Thinkers First Grade [thinker1]
+ Big Thinkers Kindergarten [thinkerk]
+ Blue's 123 Time Activities [Blues123Time]
+ Blue's ABC Time Activities [BluesABCTime]
+ Blue's Art Time Activities [arttime]
+ Blue's Reading Time Activities [readtime]
+ Fatty Bear's Birthday Surprise [fbear]
+ Fatty Bear's Fun Pack [fbpack]
+ Fritzi Fisch und der verschwundene Schatz [freddi]
+ Fritzi Fisch und das Flossengespenst [freddi2]
+ Fritzi Fisch und der Fall der gestohlenen
+ Trompetenschnecke [freddi3]
+ Freddi Fisch und das Geheimnis
+ der Salzwasserschlucht [freddi4]
+ Freddi Fisch und das Rätsel
+ der Korallenbucht [freddicove]
+ Freddi Fish and Luther's Maze Madness [maze]
+ Freddi Fish and Luther's Water Worries [water]
+ Let's Explore the Airport with Buzzy [airport]
+ Let's Explore the Farm with Buzzy [farm]
+ Let's Explore the Jungle with Buzzy [jungle]
+ Pyjama Pit: Keine Angst im Dunkeln [pajama]
+ Pyjama Sam: Donner und Blitz
+ machen mir nix [pajama2]
+ Pyjama Sam 3: Süßigkeiten kriegen Saures [pajama3]
+ Pajama Sam's Lost & Found [lost]
+ Pajama Sam's Sock Works [socks]
+ Putt-Putt Joins the Parade [puttputt]
+ Putt-Putt Goes to the Moon [puttmoon]
+ Töff-Töff rettet den Zoo [puttzoo]
+ Töff-Töff reist durch die Zeit [putttime]
+ Töff-Töff und das große Rennen [puttrace]
+ Töff-Töff geht zum Zirkus [puttcircus]
+ Putt-Putt and Pep's Balloon-O-Rama [balloon]
+ Putt-Putt and Pep's Dog on a Stick [dog]
+ Putt-Putt & Fatty Bear's Activity Pack [activity]
+ Putt-Putt's Fun Pack [funpack]
+ SPY Fox: Das Milchkartell [spyfox]
+ SPY Fox: Operation Robobund [spyfox2]
+ SPY Fox: Alarm im Weltall [spyozon]
+ SPY Fox in Cheese Chase [chase]
+ SPY Fox in Hold the Mustard [mustard]
+
+Spiele von Living Books:
+ Aesop's Fables: The Tortoise and the Hare [tortoise]
+ Arthur's Birthday [arthurbday]
+ Arthur's Teacher Trouble [arthur]
+ Dr. Seuss's ABC [seussabc]
+ Green Eggs and Ham [greeneggs]
+ Harry and the Haunted House [harryhh]
+ Just Grandma and Me [grandma]
+ Little Monster at School [lilmonster]
+ Ruff's Bone [ruff]
+ Sheila Rae, the Brave [sheila]
+ Stellaluna [stellaluna]
+ The Berenstain Bears Get in a Fight [bearfight]
+ The Berenstain Bears in the Dark [beardark]
+ The New Kid on the Block [newkid]
+
+Die folgenden Spiele sollten geladen werden, sind aber noch nicht vollständig
+spielbar. Spielen erfolgt auf eigenes Risiko. Bitte reichen Sie für diese Spiele
+keine Fehlerberichte ein.
+Wenn Sie über den neusten Stand bezüglich der Kompatibilität des Spiels erfahren
+möchten, besuchen Sie unsere Website und schauen Sie in der Kompatibilitätsliste
+nach.
+
+ Backyard Baseball 2003 [baseball2003]
+ Backyard Football 2002 [football2002]
+ Backyard Soccer [soccer]
+ Backyard Soccer MLS [soccermls]
+ Backyard Soccer 2004 [soccer2004]
+ Blue's Birthday Adventure [BluesBirthday]
+ Blue's Treasure Hunt [BluesTreasureHunt]
+ Pajama Sam: Games to Play on Any Day [pjgames]
+
+Die folgenden Spiele basieren auf der SCUMM-Engine, werden aber (noch) nicht von
+ScummVM unterstützt:
+
+ Andere Spiele von Humongous Entertainment
+
+Seien Sie sich bitte bewusst, dass die Engines („Motoren“ der Spiele) Fehler
+enthalten können und manche Funktionen möglicherweise fehlen, was es unmöglich
+macht, das Spiel zu Ende zu spielen. Speichern Sie oft und bitte schicken Sie
+englische Fehlerberichte ein (Anweisungen zum Senden von Fehlerberichten finden
+Sie oben), wenn Sie einen solchen Fehler in einem „unterstützten“ Spiel
+vorfinden.
+
+
+3.1) Kopierschutz:
+---- -------------
+Das ScummVM-Team duldet keine Spielepiraterie. Es gibt jedoch Fälle, in denen
+die Spielefirmen (wie beispielsweise LucasArts) selbst „gecrackte“
+Ausführdateien in ihre Spiele gepackt haben -- in diesen Fällen beinhalten die
+Dateien des Spiels immer noch die Kopierschutzskripte, aber der Interpreter
+umgeht sie (ähnlich wie illegale gecrackte Versionen es tun können, nur dass es
+hier der Spielehersteller getan hat). Es gibt für uns keinerlei Möglichkeit, den
+Unterschied zwischen einer legitimen und einer illegalen Spieldatei zu erkennen,
+also wird ScummVM bei Spielen, von denen wir wissen, dass eine gecrackte Version
+des Orginalinterpreters zu irgendeinem Zeitpunkt verkauft wurde, immer den
+Kopierschutz umgehen müssen.
+
+In einigen Fällen wird ScummVM immer noch den Kopierschutzbildschirm anzeigen.
+Versuchen Sie, irgendeine Antwort einzugeben. Die Chancen stehen gut, dass sie
+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.
+ * 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.
+ * 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.
+ * Waxworks
+
+3.2) Hinweise zu Commodore64-Spielen:
+---- --------------------------------
+Sowohl Maniac Mansion als auch Zak McKracken laufen, aber Maniac Mansion ist
+noch nicht spielbar. Benennen Sie einfach die D64-Datenträger um in
+„maniac1.d64“ und „maniac2.d64“ und entsprechend „zak1.d64“ und „zak2.d64“, dann
+sollte ScummVM in der Lage sein, das Spiel automatisch zu erkennen, wenn Sie auf
+das richtige Verzeichnis zeigen.
+
+Alternativ können Sie „extract_mm_c64“ aus dem Tools-Paket verwenden, um die
+Spieldateien zu extrahieren. Dann wird das Spiel jedoch nicht einwandfrei von
+ScummVM automatisch erkannt und Sie müssen sicherstellen, dass Commodore64 als
+Plattform eingestellt ist. Wir empfehlen, auf die viel einfachere Methode
+zurückzugreifen, die im vorherigen Absatz beschrieben ist.
+
+
+3.3) Hinweise zu Maniac Mansion NES:
+---- -------------------------------
+Unterstützte Versionen sind Deutsch (G) [G=German], Englisch GB (E), Französisch
+(F), Italienisch (I), Schwedisch (SW) und Englisch US (U). ScummVM benötigt nur
+den PRG-Bereich und nicht die gesamte ROM-Datei, um das Spiel laufen zu lassen.
+
+Damit das Spiel funktioniert, müssen Sie die ersten 16 Bytes aus der ROM-Datei
+entfernen, die Sie verwenden wollen. Das klappt mit jedem Hexeditor, solange Sie
+mit diesem kopieren und einfügen können. Nachdem Sie die ROM-Datei mit dem
+Hexeditor geöffnet haben, kopieren Sie alles von der zweiten Reihe (17. Byte)
+bis zum Ende. Danach fügen Sie den kopierten Inhalt in eine neue Hexdatei ein.
+Speichern Sie die neue Datei unter dem Namen „Maniac Mansion (XX).prg“, wobei XX
+für die Sprachversion steht, die Sie verwenden wollen (G, E, F, I, SW oder U).
+Die Größe der neuen Datei sollte genau 262144 Bytes betragen.
+
+Wenn Sie das Spiel manuell hinzufügen, stellen Sie sicher, dass die Plattform
+auf NES eingestellt ist.
+
+Die häufigsten Fehler, die verhindern, dass das Spiel läuft:
+
+ * Fehlerhafte Datei
+ * ROM extrahiert mit den Tools der Version 0.7.0
+ * Sie versuchen, in ScummVM die VOLLE ROM-DATEI zu laden und nicht nur den
+ PRG-Bereich.
+
+Es ist auch möglich, die einzelnen LFL-Dateien aus dem PRG-Bereich zu
+extrahieren. Um dies zu tun, verwenden Sie das Dienstprogramm „extract_mm_nes“
+aus dem Tools-Paket.
+
+
+3.4) Hinweise zu Macintosh-Spielen:
+---- ------------------------------
+Alle auf SCUMM basierenden Adventures von Lucasarts, mit Ausnahme von COMI,
+existieren auch als Versionen für den Macintosh. ScummVM kann die meisten
+(alle?) von diesen verwenden, jedoch ist in manchen Fällen zusätzliche Arbeit
+erforderlich. Zuallererst: Wenn Sie keinen Macintosh dafür verwenden, könnte es
+kompliziert werden, auf die CD- oder Diskettendaten zuzugreifen. Der Grund
+hierfür ist, dass der Mac ein spezielles Datenträgerformat nutzt, welches sich
+HFS nennt, und das andere Systeme normalerweise nicht unterstützen. Es gibt
+jedoch zahlreiche kostenlose Tools, die es ermöglichen, einen solchen HFS-
+Datenträger zu lesen. Z. B. „HFVExplorer“ für Windows und „hfsutils“ für Linux
+und andere Betriebssysteme, die Unix ähnlich sind.
+
+Die meisten neueren Spiele für den Macintosh wurden nur mit einer einzigen
+Spieldatei ausgeliefert (beachten Sie, dass in manchen Fällen diese Spieldatei
+unsichtbar gemacht wurde und Sie somit zusätzliche Tools benötigen, um diese zu
+kopieren). ScummVM ist in der Lage, eine solche Spieldatei direkt zu verwenden;
+verweisen Sie ScummVM einfach auf das Verzeichnis, welches diese enthält und es
+sollte klappen (so wie mit jedem anderen unterstützten Spiel).
+
+Wir stellen außerdem ein Tool mit dem Namen „extract_scumm_mac“ im Tools-Paket
+zur Verfügung, um die Daten aus diesen Spieldateien zu extrahieren, aber dies
+ist weder erforderlich noch wird es empfohlen.
+
+Für weitere Informationen dazu, wie Sie Macintosh-Spieldateien auf Ihre
+Festplatte kopieren können, lesen Sie:
+
+ http://wiki.scummvm.org/index.php/HOWTO-Mac_Games
+
+
+3.5) Hinweise zu Spielen auf mehren CDs:
+---- -----------------------------------
+Allgemein kann ScummVM nicht sehr gut mit Spielen auf mehreren CDs umgehen. Das
+liegt daran, dass ScummVM annimmt, alles von einem Spiel in einem Verzeichnis
+vorzufinden. Selbst wenn ScummVM einige Fälle berücksichtigt und den Anwender
+dazu auffordert, die CD zu wechseln, so installierten die ursprünglichen
+ausführbaren Dateien des Spiels normalerweise eine kleine Anzahl an Dateien auf
+die Festplatte. Sofern diese Dateien nicht auf allen CDs vorgefunden werden
+können, wird ScummVM Schwierigkeiten haben.
+
+Glücklicherweise hat ScummVM keine Probleme damit, die Spiele komplett von der
+Festplatte aus laufen zu lassen, wenn Sie ein Verzeichnis mit der richtigen
+Kombination der Dateien erstellen. Wenn eine Datei auf mehr als einer CD
+vorkommt, ist es normalerweise egal, welche sie in das Verzeichnis
+hineinkopieren.
+
+
+3.6) Hinweise zu The Curse of Monkey Island:
+---- ---------------------------------------
+Für dieses Spiel benötigen Sie die Dateien comi.la0, comi.la1 und comi.la2. Die
+Datei comi.la0 kann auf beiden CDs vorgefunden werden, ist aber auf beiden
+identisch, womit es egal ist, welche der beiden Sie verwenden.
+
+Zusätzlich müssen Sie ein Unterverzeichnis namens „resource“ erstellen, das alle
+Dateien des Unterverzeichnisses „resource“ auf –beiden- CDs beinhaltet. Einige
+dieser Dateien lassen sich auf beiden CDs vorfinden, jedoch sind sie auch in
+diesem Fall identisch.
+
+
+3.7) Hinweise zu den Baphomets-Fluch-Spielen:
+---- ----------------------------------------
+Die Anweisungen für die Baphomets-Fluch-Spiele sind für die ausverkauften
+Software-Versionen, bei welchen sich jedes Spiel auf je zwei CDs befindet, da
+diese am leichtesten erhältlich waren, als ScummVM Unterstützung für diese
+Spiele erlangte. Wir hoffen, dass sie allgemein ausreichend ausführlich sind, um
+für andere Ausgaben genauso hilfreich zu sein.
+
+
+3.7.1) Zwischensequenzen der Baphomets-Fluch-Spiele:
+------ ---------------------------------------------
+Die Zwischensequenzen für die Baphomets-Fluch-Spiele haben eine kleine
+Geschichte (schauen Sie im nächsten Abschnitt, wenn Sie interessiert sind), aber
+im Großen und Ganzen müssen Sie nur die .SMK-Dateien aus den „SMACKS“- oder
+„SMACKSHI“-Verzeichnissen auf den CDs in dasselbe Verzeichnis wie die anderen
+Spieldateien kopieren. (Baphomets Fluch hat ein „SMACKSLO“-Verzeichnis mit
+denselben Zwischensequenzen, aber diese sind von niedrigerer Qualität.) Sie
+können sie auch in einem Unterverzeichnis namens „video“ ablegen, wenn Ihnen das
+lieber ist.
+
+Einige Neuausgaben der Spiele, wie beispielsweise die PlayStation-Version, haben
+keine Smacker-Videos. Revolution Software hat uns freundlicherweise erlaubt, die
+Zwischensequenzen umgewandelt auf unserer Website als Download zur Verfügung zu
+stellen. Siehe hierfür:
+
+ http://www.scummvm.org/downloads.php
+
+Diese Zwischensequenzen werden im DXA-Format mit FLAC-Audio zur Verfügung
+gestellt. Ihre Qualität ist durch die Verwendung verlustfreier Kompression
+gleich wie im Originalspiel. Um diese Zwischensequenzen abspielen zu können, ist
+eine Version von ScummVM erforderlich, die sowohl mit Unterstützung von FLAC als
+auch zlib kompiliert wurde.
+
+Für Systeme, die zu langsam sind, um die Entschlüsselung von FLAC-Audio zu
+handhaben, wird die Tonspur für diese Zwischensequenzen gesondert auch mit Ogg-
+Vorbis-Audio angeboten. Um diese Zwischensequenzen mit Ogg-Vorbis-Audio
+abspielen zu können, ist eine Version von ScummVM erforderlich, die sowohl mit
+Unterstützung von libVorbis als auch zlib kompiliert wurde.
+
+Für Baphomets Fluch bieten wir auch ein Untertitel-Paket an. Entpacken Sie es
+einfach und folgen Sie den Anweisungen in der liesmich.txt. (Baphomets Fluch II
+hat bereits Untertitel; für diese ist keine zusätzliche Arbeit notwendig.)
+
+
+3.7.2) Zwischensequenzen der Baphomets-Fluch-Spiele im Rückblick
+------ ---------------------------------------------------------
+Die Originalausgaben der Baphomets-Fluch-Spiele verwendeten das Smackerâ„¢-Format
+der RAD Game Tools. Da RAD uns nicht die ältere Ur-Version dieses Formats
+offenlegen wollte und uns aufforderte, es nicht mittels Reverse Engineering zu
+rekonstruieren, musste eine alternative Lösung gefunden werden.
+
+In Baphomets Fluch II war es möglich, die Sprachausgabe ohne das Video
+wiederzugeben. Dies blieb bis ScummVM 1.0.0 eine Ausweichmöglichkeit, war aber
+nie die alleinige Lösung für eine stabile Veröffentlichung.
+
+In ScummVM 0.6.0 verwendeten wir MPEG, das einen zumutbaren Kompromiss zwischen
+Größe und Qualität bot. In ScummVM 0.10.0 wurde dies durch DXA abgelöst (das
+ursprünglich für Adventure Softs „Floyd – Es gibt noch Helden“ hinzugefügt
+wurde). Dies gab uns die Möglichkeit, die Zwischensequenzen mit genau derselben
+Qualität wie im Original anzubieten, zu dem Preis, dass die Dateien größer
+waren.
+
+Schließlich wurde Anfang 2006 das Smacker-Format für das FFmpeg-Projekt mittels
+Reverse Engineering rekonstruiert. Dank der harten Arbeit in diesem Projekt
+unterstützt ScummVM nun die originalen Zwischensequenzen. Zur selben Zeit wurde
+die MPEG-Unterstützung eingestellt. Vom technischen Standpunkt war das eine gute
+Sache, da das Entschlüsseln von MPEG-Filmen mit vielen Schwierigkeiten verbunden
+war und diese ohnehin nicht so gut aussahen wie Smacker- und DXA-Versionen.
+
+
+3.7.3) Baphomets Fluch:
+------ ----------------
+Für dieses Spiel benötigen Sie die Dateien aus dem Verzeichnis clusters von
+beiden CDs. Für die Windows- und Macintosh-Versionen benötigen Sie auch die
+Datei speech.clu aus dem Verzeichnis speech von beiden CDs. Da diese jedoch
+nicht identisch sind, müssen Sie diese in speech1.clu und speech2.clu für CD 1
+und 2 entsprechend umbenennen. Die PlayStation-Version erfordert die Dateien
+speech.tab, speech.dat, speech.lis, und speech.inf.
+
+Zusätzlich benötigen die Windows- und Macintosh-Versionen das Unterverzeichnis
+„music“ mit allen Dateien der „music“-Unterverzeichnisse auf beiden CDs. Einige
+dieser Dateien tauchen auf beiden CDs auf, aber in diesen Fällen sind sie
+entweder identisch oder in einem Fall nahezu so identisch, dass es wenig
+Unterschied macht. Die PlayStation-Version erfordert die Dateien tunes.dat und
+tunes.tab.
+
+
+3.7.4) Baphomets Fluch II:
+------ -------------------
+Für dieses Spiel benötigen Sie die Dateien aus dem Verzeichnis clusters von
+beiden CDs. (Ein paar von ihnen sind streng genommen eigentlich nicht notwendig,
+aber diejenigen, über die Unsicherheit besteht, sind alle ziemlich klein.)
+Sie müssen die Dateien speech.clu und music.clu umbenennen, und zwar in
+speech1.clu, speech2.clu, music1.clu und music2.clu, sodass ScummVM weiß, welche
+der Dateien von CD 1 und welche von CD 2 sind. Alle anderen Dateien, die in
+beiden „clusters“-Verzeichnissen auftauchen, sind identisch. Verwenden Sie in
+diesen Fällen die Datei, die Sie möchten.
+
+Zusätzlich brauchen Sie die Datei cd.inf und optional die Datei startup.inf aus
+dem Verzeichnis sword2 von CD 1.
+
+
+3.8) Hinweise zu Beneath a Steel Sky:
+---- --------------------------------
+Beginnend mit ScummVM 0.8.0 benötigen Sie die zusätzliche Datei „SKY.CPT“, um
+Beneath a Steel Sky laufen lassen.
+
+Diese Datei ist auf der Seite „Downloads“ der ScummVM-Website verfügbar. Sie
+können sie entweder im Verzeichnis mit den anderen Spieldateien (SKY.DNR,
+SKY.DSK) ablegen, in einem Extrapfad oder im Verzeichnis, in dem sich Ihre
+ausführbare ScummVM-Datei befindet.
+
+
+3.9) Hinweise zu Flight of the Amazon Queen:
+---- ---------------------------------------
+Um eine Nicht-Freeware-Version von Flight of the Amazon Queen zu verwenden (von
+einer Original-CD), müssen Sie die Datei „queen.tbl“ (erhältlich von der Seite
+„Downloads“ auf unserer Website) entweder im Verzeichnis mit der Spieldatei
+„queen.1“ ablegen, in einem Extrapfad oder im Verzeichnis, in dem sich Ihre
+ausführbare ScummVM-Datei befindet.
+
+Alternativ können Sie das Tool „compress_queen“ aus dem Tools-Paket verwenden,
+um Ihre FOTAQ-Spieldatei neu „zusammenzubauen“, um die Tabellendatei für diese
+spezielle Version miteinzubeziehen und somit die Laufzeit-Abhängigkeit von der
+Datei „queen.tbl“ zu lösen. Dieses Tool kann auch die Sprachausgabe und
+Soundeffekte mittels MP3, OGG oder FLAC komprimieren.
+
+
+3.10) Hinweise zu Gobliiins:
+----- ----------------------
+Die CD-Versionen der Gobliiins-Serie enthalten einen großen Audio-Titel, den Sie
+extrahieren müssen (siehe Abschnitt über die Verwendung komprimierter Audio-
+Dateien) sowie ins Spielverzeichnis kopieren, wenn Sie Musik im Spiel hören
+möchten, ohne die CD die ganze Zeit im Laufwerk haben zu müssen. Die
+Sprachausgabe ist auch in diesem Titel und ihre Lautstärke wird deshalb ebenso
+über die Musiklautstärke-Regelung geändert.
+
+
+3.11) Hinweise zu Inherit the Earth: Quest for the Orb (Macintosh):
+----- -------------------------------------------------------------
+Um die Neuausgabe des Spiels für Mac OS X von Wyrmkeep laufen zu lassen, müssen
+Sie die Daten von der CD auf die Festplatte kopieren. Wenn Sie an einem PC
+arbeiten, lesen Sie hierfür:
+
+ http://wiki.scummvm.org/index.php/HOWTO-Mac_Games
+
+Obwohl hier in erster Linie über SCUMM-Spiele gesprochen wird, findet das
+Dienstprogramm „HFVExplorer“ Erwähnung, welches Sie benötigen, um die Dateien zu
+extrahieren. Beachten Sie, dass Sie die Sprachausgabedaten aus „Inherit the
+Earth Voices“ im selben Verzeichnis ablegen müssen wie die Spieldaten, die sich
+an folgendem Ort befinden:
+
+ Inherit the Earth.app/Contents/Resources
+
+Bei der alten Ausgabe für Mac OS 9 müssen Sie die Dateien im MacBinary-Format
+kopieren, da sie sowohl Ressourcen- und Datenverzweigungen beinhalten sollten.
+Kopieren Sie alle „ITE *“-Dateien.
+
+
+3.12) Hinweise zu Simon the Sorcerer 1 und 2:
+----- ---------------------------------------
+Wenn Sie die Doppel-Version von Simon the Sorcerer 1 oder 2 auf CD haben, finden
+Sie die Windows-Version im Hauptverzeichnis der CD und die DOS-Version im
+DOS-Verzeichnis der CD.
+
+
+3.13) Hinweise zu Floyd – Es gibt noch Helden:
+----- ----------------------------------------
+Wenn Sie die Windows-Version von Floyd – Es gibt noch Helden haben, sind einige
+Dinge zu beachten.
+
+Viele notwendige Dateien für das Spiel sind in einer InstallShield-Datei namens
+data1.cab gespeichert, die ScummVM nicht entpacken kann. Sie müssen das
+Original-Installationsprogramm oder i5comp verwenden, um die Inhalte dieser
+Datei zu entpacken. Das Tool i5comp für die Dekompression kann durch Suchen im
+Internet gefunden werden.
+
+Um die Sprachdateien in ScummVM zu verwenden, müssen sie nach dem Kopiervorgang
+wie folgt umbenannt werden:
+voices.wav von CD1 in voices1.wav
+voices.wav von CD2 in voices2.wav
+voices.wav von CD3 in voices3.wav
+voices.wav von CD4 in voices4.wav
+
+
+3.14) Hinweise zu The Legend of Kyrandia:
+----- -----------------------------------
+Um The Legend of Kyrandia unter ScummVM laufen zu lassen, benötigen Sie die
+Datei „kyra.dat“, welche auf der Seite „Downloads“ der ScummVM-Website gefunden
+werden kann.
+
+
+3.15) Hinweise zum vorhersagenden Eingabedialog bei Sierras AGI-Spielen:
+----- ------------------------------------------------------------------
+Der vorhersagende Eingabedialog ist ein ScummVM-Hilfsmittel, um die englischen
+Spiele der AGI-Engine (die offensichtlich Kommandozeilen-Eingabe erfordern) auf
+Geräten laufen zu lassen, die eingeschränkte Tastatur-Unterstützung haben. Da es
+mühsam ist, mit emulierten Tastaturen zu tippen, können in solchen Fällen
+Befehle schnell und einfach über den vorhersagenden Eingabedialog eingegeben
+werden.
+
+Um die vorhersagende Eingabe in AGI-Spielen zu aktivieren, müssen Sie die Datei
+pred.dic in den Extrapfad von ScummVM oder in das Verzeichnis des Spiels
+kopieren, das Sie spielen möchten. Dieses Wörterbuch wurde erstellt, indem alle
+bekannten AGI-Spiele analysiert wurden, und enthält den maximalen Satz
+gebräuchlicher Wörter.
+
+Wenn das Wörterbuch erkannt wurde, wird der vorhersagende Eingabedialog entweder
+durch Klicken auf den Kommandozeilenbereich angezeigt (dort, wo auch immer eine
+Tastatureingabe erforderlich ist, auch in Dialogfeldern) oder in einigen Ports
+durch Drücken eines bestimmten Tastenkürzels.
+
+Der vorhersagende Eingabedialog funktioniert in drei Modi, zwischen denen mit
+der Schaltfläche (*)Pre/123/Abc gewechselt werden kann. Die primäre
+Eingabemethode ist der vorhersagende Modus (Pre), welcher der Worterkennung bei
+„schnellem Tippen“ auf Mobilfunktelefonen ähnelt. Das Alphabet ist in neun
+Gruppen unterteilt, die naturgemäß den neun Ziffern auf dem Ziffernblock
+zugeteilt sind (0 ist die Leertaste). Um ein Wort einzugeben, drücken Sie einmal
+die Ziffer der Gruppe, die den Buchstaben des Worts enthält, den Sie tippen
+möchten, dann gehen Sie zum nächsten Buchstaben über. Um z. B. den Befehl „look“
+einzugeben, sollten Sie 5665 drücken. Während Sie schrittweise die Ziffernfolge
+des beabsichtigten Wortes eingeben, wird auf das Wörterbuch zugegriffen, um
+bekannte Wörter, die mit Ihrer Eingabe bis zu diesem Punkt übereinstimmen, zu
+finden. Während Sie mehr und mehr Tasten drücken, läuft die Vorhersage auf das
+richtige Wort zu. Das ist der Grund, warum das angezeigte Wort sich zwischen
+einem Tastendruck drastisch verändern kann. Es gibt jedoch Fälle, in denen mehr
+als ein Wort dieselbe Zahlenkombination teilen. Z. B. haben die Worte „quit“ und
+„suit“ dieselbe Nummer, nämlich 7848. In diesen Fällen hilft die Schaltfläche
+(#)next weiter. Durch ihre Betätigung können Sie durch die Liste der Wörter
+schalten, welche denselben Zahlencode haben und schließlich das richtige Wort
+akzeptieren, indem Sie die (0) für Leertaste oder OK drücken.
+
+Die zweite Eingabemethode (123) ist die numerische Eingabe: Jede Taste, die Sie
+drücken, wird als tatsächliche Ziffer eingegeben.
+
+Die dritte Eingabemethode (Abc) ist die Multi-Tipp-Alpha-Eingabemthode. Dieser
+Modus ist dazu gedacht, um freien Text einzugeben, ohne die Hilfe des
+Wörterbuchschemas des vorhersagenden Modus (Pre). Der Text wird Buchstabe für
+Buchstabe eingegeben. Für jeden Buchstaben drücken Sie zuerst die Ziffer der
+Gruppe, die den Buchstaben beinhaltet, den Sie tippen wollen, dann verwenden Sie
+die Schaltfläche (#)next, um durch die Buchstaben zu schalten, bis der richtige
+erscheint, und wiederholen dies mit der nächsten Ziffer. Um z. B. das Wort
+„look“ einzugeben, müssen Sie folgendes Drücken: 5##6##6##5#
+
+Der Dialog kann vollständig mit der Maus verwendet werden, aber ein paar
+Maßnahmen wurden getroffen, um dessen Verwendung bei einigen ScummVM-Ports
+komfortabler zu gestalten, indem naturgemäß dessen Funktionsweise dem
+Ziffernblock zugewiesen wurde. Ebenso können die Schaltflächen mittels der
+Pfeiltasten und der Eingabetaste gesteuert werden.
+
+
+(Übersetzung basiert auf README mit SHA1 ID:
+eae06884b6c6da23b7932ceba65e435d9be6ef82)
diff --git a/doc/de/Schnellstart b/doc/de/Schnellstart
new file mode 100644
index 0000000000..dcefadb702
--- /dev/null
+++ b/doc/de/Schnellstart
@@ -0,0 +1,176 @@
+Dieses Dokument ist eine auszugsweise Übersetzung der englischen REAMDE-Datei.
+Das Original-Dokument enthält viel mehr Informationen. Sollten Sie hier also
+nicht das finden, was Sie benötigen und ein wenig Englisch können, sollten Sie
+sich die englische README-Datei ansehen.
+
+Für weitere Informationen, Kompatibilitätslisten, Einzelheiten zu Spenden, die
+neusten veröffentlichten Versionen, Fortschrittsberichte und mehr besuchen Sie
+bitte die ScummVM-Website unter der Adresse: http://www.scummvm.org/
+
+
+Inhaltsverzeichnis:
+------------------
+1.0) Einführung
+ * 1.1 Über ScummVM
+ * 1.2 Schnellstart
+2.0) Kontakt
+ * 2.1 Fehler berichten
+
+
+1.0) Einführung:
+---- -------------
+
+1.1) Über ScummVM:
+---- -------------
+ScummVM ist ein Programm, welches es Ihnen ermöglicht, bestimmte klassische
+Grafik-Adventure (unter anderem aus dem Point-and-Click-Bereich) zu spielen,
+vorausgesetzt, Sie sind im Besitz der Dateien des Spiels. Der Trick dabei ist:
+ScummVM ersetzt lediglich die Funktion der ausführbaren Dateien, die mit den
+Spielen kamen, was ermöglicht, diese Spiele auf Systemen zu spielen, für welche
+sie nie erstellt wurden!
+
+Ursprünglich wurde dieses Programm dafür entwickelt, um SCUMM-Spiele von
+LucasArts auszuführen, wie beispielsweise Maniac Mansion, Monkey Island, Day of
+the Tentacle oder Sam & Max. SCUMM steht als Abkürzung für „Script Creation
+Utility for Maniac Mansion“ (deutsch etwa: Skripterstellungsdienstprogramm für
+Maniac Mansion), was das erste Spiel von LucasArts war, für welches LucasArts
+dieses System entworfen hatte. Und viel später verlieh es seinen Namen an
+ScummVM (wobei „VM“ für „Virtuelle Maschine“ steht).
+
+Mit der Zeit wurde Unterstützung für viele Nicht-SCUMM-Spiele hinzugefügt und
+ScummVM unterstützt nun auch viele AGI- und SCI-Spiele von Sierra (wie
+beispielsweise King's Quest 1-6, Space Quest 1-5, ...), Discworld 1 und 2, Simon
+the Sorcerer 1 und 2, Beneath A Steel Sky, Lure of the Temptress, Baphomets
+Fluch I und II, Flight of the Amazon Queen, Gobliiins 1-3, die Adventure-Reihe
+The Legend of Kyrandia, viele der SCUMM-Spiele für Kinder von Humongous
+Entertainment (einschließlich der Spiele von Fritzi Fisch und Töff-Töff) und
+viele mehr. Sie können eine vollständige Liste mit Einzelheiten einsehen, welche
+Auskunft darüber gibt, welche Spiele unterstützt werden und wie gut. Gehen Sie
+hierfür auf die Kompatibilitätsseite. ScummVM wird fortlaufend verbessert, also
+schauen Sie öfter einmal vorbei.
+
+Unter den Systemen, mit denen Sie diese Spiele spielen können, befinden sich
+normale Schreibtisch-Computer (mit den Betriebssystemen Windows, Linux,
+Mac OS X, ...), Spielekonsolen (Dreamcast, Nintendo DS & Wii, PS2, PSP, ...),
+Smartphones (Android, iPhone, PocketPC, Symbian ...) und einige weitere.
+
+Zurzeit befindet sich ScummVM immer noch stark in der Entwicklung. Seien Sie
+sich bewusst, dass wir zwar versuchen, dass viele Spiele mit wenigen erheblichen
+Fehlern durchgespielt werden können, aber es dennoch zu Abstürzen kommen kann
+und wir keine Gewähr übernehmen. Davon abgesehen: Einige Spiele werden seit
+längerer Zeit unterstützt und sollten in jeder neusten stabilen veröffentlichten
+Version ohne größere Probleme laufen. Sie können sich einen Eindruck davon
+verschaffen, wie gut jedes Spiel unter ScummVM läuft, indem Sie auf die
+Kompatibilitätsseite schauen. Wenn Sie sich ein wenig im Internet umsehen,
+können Sie feststellen, dass ScummVM sogar kommerziell genutzt wird, um einige
+der unterstützen Spiele für moderne Plattformen wiederzuveröffentlichen. Dies
+zeigt, dass mehrere Firmen mit der Qualität der Software zufrieden sind und wie
+gut einige der Spiele mit Hilfe des Programms laufen.
+
+Wenn Ihnen ScummVM gefällt, können Sie uns gerne Geld spenden, indem Sie auf die
+PayPal-Schaltfläche auf der ScummVM-Website klicken. Dies hilft uns dabei,
+notwendige Dienstprogramme zu kaufen, um ScummVM einfacher und schneller zu
+entwickeln. Wenn Sie nicht spenden können, dürfen Sie auch gerne einen Patch
+beisteuern.
+
+1.2) Schnellstart:
+---- -------------
+WICHTIG: In dieser kurzen Anleitung wird davon ausgegangen, dass Sie ScummVM auf
+Deutsch benutzen. Standardmäßig wird ScummVM die Sprache Ihres Betriebssystems
+verwenden. Wenn Sie ScummVM lieber auf Englisch verwenden möchten, benutzen Sie
+bitte die Anleitung in der englischen README-Datei.
+
+Für die ungeduldigen unter den Anwendern ist hier in fünf einfachen Schritten
+kurz beschrieben, wie man ScummVM lauffähig macht und das Programm verwendet.
+
+1. Laden Sie ScummVM unter der Adresse http://www.scummvm.org/downloads.php
+herunter und installieren Sie es.
+
+2. Erstellen Sie ein Verzeichnis auf Ihrer Festplatte und kopieren Sie die
+Dateien des Spiels vom Original-Datenträger in dieses Verzeichnis. Wiederholen
+Sie diesen Vorgang für jedes Spiel, das Sie spielen möchten (es ist besser, für
+jedes Spiel ein eigenes Verzeichnis zu verwenden).
+
+3. Starten Sie ScummVM.
+
+Sollte an diesem Punkt ScummVM auf Englisch statt auf Deutsch erscheinen, gehen
+Sie wie folgt vor, um die Spracheinstellung zu ändern:
+-Klicken Sie auf „Options“.
+-Klicken Sie auf den rechten Pfeil in der Reiterleiste und wählen den Reiter
+ „Misc“ aus.
+-Wählen Sie im Feld „GUI Language“ „Deutsch“ aus und klicken auf „OK“.
+-Bestätigen Sie die erscheinende Nachricht, klicken auf „Quit“, um ScummVM zu
+ beenden, und starten dann das Programm erneut.
+
+Nun klicken Sie auf „Spiel hinzufügen“, wählen das Verzeichnis mit den Dateien
+des Spiels aus (versuchen Sie nicht, die Dateien des Spiels selbst auszuwählen!)
+und klicken Sie auf „Auswählen“.
+
+4. Ein Dialog sollte erscheinen, der Ihnen ermöglicht, verschiedene
+Einstellungen vorzunehmen, sollten Sie dies wünschen (es sollte jedoch in
+Ordnung sein, alles voreingestellt zu belassen). Bestätigen Sie diesen Dialog.
+
+5. Wählen Sie das Spiel aus der Liste aus, welches Sie spielen möchten, und
+klicken Sie auf „Starten“.
+
+ScummVM behält die Spiele in der Liste, die Sie hinzufügen. Wenn Sie also
+ScummVM schließen, werden beim nächsten Start alle Spiele, die Sie zuvor
+hinzugefügt haben, in der Liste angezeigt. Sie können somit direkt zu Schritt 5
+übergehen, außer Sie wollen noch mehr Spiele hinzufügen.
+
+Tipp: Wenn Sie mehrere Spiele auf einmal hinzufügen möchten, drücken Sie die
+Umschalt-Taste (Shift), bevor Sie auf „Spiel hinzufügen“ klicken. Diese
+Schaltfläche wird somit ihren Text zu „Durchsuchen“ umändern und wenn Sie dann
+auf diese klicken, werden Sie auch dazu aufgefordert, ein Verzeichnis
+auszuwählen, nur dieses Mal wird ScummVM alle Unterverzeichnisse automatisch
+nach unterstützen Spielen durchsuchen.
+
+
+2.0) Kontakt:
+---- --------
+Der einfachste Weg, um mit dem ScummVM-Team in Verbindung zu treten, ist,
+Fehlerberichte einzusenden (siehe Abschnitt 2.1) oder durch Verwendung des
+Forums unter der Adresse http://forums.scummvm.org .
+Sie können ebenso der Mailing-Liste scummvm-devel beitreten und an diese E-Mails
+versenden oder mit uns im IRC chatten (#scummvm unter irc.freenode.net). Bitte
+fordern Sie uns nicht dazu auf, ein nicht unterstütztes Spiel zu unterstützen.
+Lesen Sie zuerst die Seite FAQ (Häufig gestellte Fragen) auf unserer Website.
+Bitte beachten Sie, dass die offizielle Sprache des Forums, der Mailing-Liste
+und des Chats Englisch ist und keine andere Sprache dort verwendet werden
+sollte.
+
+
+2.1) Fehler berichten:
+---- -----------------
+Um einen Fehler zu berichten, erstellen Sie bitte ein SourceForge-Konto und
+folgen Sie dem Link „Bug Tracker“ auf der ScummVM-Website. Bitte stellen Sie
+sicher, dass sich der Bug wiedererzeugen lässt und immer noch in der neusten
+Version von SVN oder des Daily Builds auftritt. Bitte sehen Sie auch auf der
+Kompatibilitätsliste der ScummVM-Website für dieses Spiel nach, um
+sicherzustellen, dass das Problem nicht bereits bekannt ist:
+
+ http://www.scummvm.org/compatibility_stable.php
+
+Bitte berichten Sie keine Fehler zu Spielen, die nicht als durchspielbar im
+Bereich „Supported Games“ oder der Kompatibilitätsliste aufgelistet sind.
+Wir -wissen-, dass diese Spiele Fehler aufweisen.
+
+Bitte liefern Sie folgende Informationen:
+ - ScummVM-Version (BITTE mit neuster Version von SVN oder des Daily Builds
+ testen)
+ - Einzelheiten zum Fehler, einschließlich Anweisungen, um den Fehler
+ hervorzurufen
+ - Sprache des Spiels (Deutsch, Englisch ...)
+ - Version des Spiels (Version mit Sprachausgabe [Talkie],
+ Diskettenversion, ...)
+ - Plattform und gegebenenfalls Compiler (Win32, Linux, FreeBSD, ...)
+ - Fügen Sie – wenn möglich - einen Speicherstand hinzu.
+ - Wenn dieser Fehler erst seit kurzem Auftritt, teilen Sie bitte die letzte
+ Version ohne den Fehler mit und die erste Version mit diesem Fehler.
+ Auf diese Weise können wir diesen schneller beseitigen, indem wir die
+ vorgenommen Veränderungen einsehen.
+
+Zum Schluss möchten wir Sie noch bitten, jeden Punkt einzeln zu berichten. Bitte
+senden Sie nicht mehrere Punkte mit demselben Ticket ein, ansonsten wird es
+schwierig, den Status jedes einzelnen Fehlers zu verfolgen. Denken Sie bitte
+auch daran, dass alle Fehlerberichte in Englisch verfasst sein müssen.
diff --git a/doc/translations/README-fr.txt b/doc/fr/QuickStart_fr
index 186f0cd24d..186f0cd24d 100755..100644
--- a/doc/translations/README-fr.txt
+++ b/doc/fr/QuickStart_fr
diff --git a/doc/he/bink-md5s.txt b/doc/he/bink-md5s.txt
deleted file mode 100644
index 5cfcc1c4af..0000000000
--- a/doc/he/bink-md5s.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-(soccer2004 russian cd) // uses bink but just for external three files
-sev
-F:\HEdev\scummsys\SPUTM\Src\SrcPWin\*.cpp
-2808c81e388743998b3c7331501cc4dd Soccer2004.(a)
-7e358891079c9f366184211d14707a70 Soccer2004.(b)
-c4ffae9fac495475d6bc3343ccc8faf9 Soccer2004.HE0
-b6eae47432b9545d33d4d867cef0b4ae Soccer2004.he3
-c83971b2f2020bf68724df52c9ae70a8 soccer2004.he2
-212776c1a2dc3d44a393afc4611afbc3 soccer2004.he4
-8f70113f7c01f7bfe9f83f02749d449d soccer2004.he9
-5fba7c0899429399f944a0353307863c DATA/helogo.da2
-56ed9865373c4fe63e8986989ef75999 DATA/infogrames.da2
-678dc9831679dd3f09933d0e568f6d3c DATA/intro.da2
-
-(soccer2004 cd) // uses bink but just for external three files
-sev
-F:\HEdev\scummsys\SPUTM\Src\SrcPWin\*.cpp
-e10cb34c774852175134fe166a602012 Soccer2004.(a)
-8acec50e5cd48830121a3b22a8bfaa46 Soccer2004.(b)
-c4ffae9fac495475d6bc3343ccc8faf9 Soccer2004.HE0
-b6eae47432b9545d33d4d867cef0b4ae Soccer2004.he3
-c83971b2f2020bf68724df52c9ae70a8 soccer2004.he2
-212776c1a2dc3d44a393afc4611afbc3 soccer2004.he4
-8f70113f7c01f7bfe9f83f02749d449d soccer2004.he9
-5fba7c0899429399f944a0353307863c DATA/helogo.da2
-56ed9865373c4fe63e8986989ef75999 DATA/infogrames.da2
-678dc9831679dd3f09933d0e568f6d3c DATA/intro.da2
-
diff --git a/doc/he/md5s.txt b/doc/he/md5s.txt
deleted file mode 100644
index 5007298b26..0000000000
--- a/doc/he/md5s.txt
+++ /dev/null
@@ -1,2861 +0,0 @@
-$Id$
-
-TODO khalek
-* hfs data on puttputt
-* hfs data on spyfox
-* extract & md5sum from farm cd hfs
- - Fatty Bear Demo.sea
- - Putt-Putt Moon Demo.sea
- - Putt-Putt's Demo.sea
-* misc other bits
-
-TODO sev
-* hfs data on all CDs
-
-(baseball cd hfs)
-Joachim
-5494820d943b126282b31a7d00645400 BaseBall
-cf8d13446ec6cb6222287a925fd47c1d BaseBall (0)
-a37e1eb72b969d1461075b7f3d9dd323 BaseBall (1)
-c37abed5add924975fad0df9417a8885 BaseBall (2)
-cb029eb006c1758aa992e28af7e036db BaseBall (4)
-91b6158bc7ec68da700f90e0fabab4b8 BaseBall (9)
-d41d8cd98f00b204e9800998ecf8427e BaseBall (r)
-
-(baseball cd)
-sev, Joachim
-D:\Scummsys.90\sputm.90\*.c
-
-c0c0934580cde95879bef0b6a5a49c29 BASEBALL.D32
-58843bf6425883bbe143b96d11d56582 BASEBALL.EXE
-cf8d13446ec6cb6222287a925fd47c1d BASEBALL.HE0
-a37e1eb72b969d1461075b7f3d9dd323 BASEBALL.HE1
-c37abed5add924975fad0df9417a8885 BASEBALL.HE2
-cb029eb006c1758aa992e28af7e036db BASEBALL.HE4
-91b6158bc7ec68da700f90e0fabab4b8 BASEBALL.HE9
-7989c98adce2b84cd710818c950616ac BASEBALL.W32
-57a68828de21e1afa208d0a5ea2fdf92 BASEBALL.X32
-
-
-(baseball2001 cd hfs)
-kirben
-???
-
-(baseball2001 cd)
-kirben
-???
-
-(bb2demo cd hfs)
-khalek, sev
-???
-
-(humongous ftp)
-2000-05-01 16:09 bb2demo.W32
-khalek, sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-0b38fda342fdaa5e206b2a82c8ab6b9b bb2demo.(a)
-a194f15f51ee62badab74b9e7da97693 bb2demo.HE0
-04862d3b91c49585400f1021bdb9faa1 bb2demo.he2
-0b3a9ff634f2fabb695358aa591154b3 bb2demo.he4
-17255b19a57a1ba0c35802b1b01792f7 BB2demo.HE9
-04770d822d0e78cf13bbf1870de3528b bb2demo.W32
-
-(baseball2003 cd hfs)
-sev
-???
-
-(baseball2003 cd)
-sev
-c:\Build\SRC\SPUTM\Src\SrcPWin\*.cpp
-e0ea75ae94e527652ebd56b26140998c baseball2003.(a)
-324f57a63fd20746195810b61a82b711 baseball2003.(b)
-ba5635a315af707462b7681189287832 Baseball2003.exe
-efe0a04a703e765ebebe92b6c8aa6b86 baseball2003.HE0
-c47186351316e17552532e6c31bf951a baseball2003.he2
-63d581c9548045ee8bc90633f4d123da baseball2003.he3
-fe816c17a87ed5420f1440c85e34f72e baseball2003.he4
-7f06715731111bfe639cde435ec3b650 baseball2003.he9
-b2e1d0e25ed9dbe0ea47ef1a5204ac4a DATA/infogrames.da2
-755a5cf5515610e30370a0afb7d1bc7b DATA/intro.da2
-
-(football cd hfs)
-Joachim
-b1376bcd9c9addb7ffec43455f41f9db Football
-7fc6cdb46b4c9d384c52327f4bca6416 FootBall (0)
-6c33bde70c28c2eac78de8b9f3add1b4 FootBall (2)
-8d02e9002b8033c00bbaf3d71bb695cc FootBall (4)
-435ae8ebf6998b1ea395a5989457985f FootBall (a)
-7df3c5eb3575aef947729213d6c3a877 FootBall (b)
-7c44b542163266658a6110fd03973e6c Football (i)
-d41d8cd98f00b204e9800998ecf8427e FootBall (r)
-c9ca805103de1888a331a98f98bab22a football (u)
-
-(football cd)
-sev, Joachim
-C:\Dev\Project\SPUTM\Src\*.cpp
-
-435ae8ebf6998b1ea395a5989457985f FOOTBALL.(A)
-7df3c5eb3575aef947729213d6c3a877 FOOTBALL.(B)
-ccca9a823d117afb1a882fd707586bf0 FOOTBALL.D32
-b9e149d859b6b4ab1906ea670c4c7449 football.esk
-af00c36fe744362cb60349f61db78e16 Football.exe
-7fc6cdb46b4c9d384c52327f4bca6416 FOOTBALL.HE0
-6c33bde70c28c2eac78de8b9f3add1b4 FOOTBALL.HE2
-8d02e9002b8033c00bbaf3d71bb695cc football.he4
-a7e708342776af913fb70c842310379f football.mmz
-e03725ba7069e7a94c28168b70dc99c4 FOOTBALL.R32
-07656b959c7febb6359c8de5fd6b6f76 FOOTBALL.U32
-1671f9302d4eca3bfcccc7d68d75d42a FOOTBALL.W32
-
-
-(pajama3 hfs)
-Joachim
-51c909630d8ca434c6e1dfe070a15792 Football Demo
-425205754fa749f4f0b0dd9d09fa45fd FootBall Demo (0)
-bf65bf5fbfd26a63f7bd32437a960667 FootBall Demo (2)
-9e53fbcf1061636d3d192c786c4e3b7b FootBall Demo (4)
-b79809888128b1d31080664487c8fc5e FootBall Demo (a)
-d41d8cd98f00b204e9800998ecf8427e Football Demo (i)
-d41d8cd98f00b204e9800998ecf8427e FootBall Demo (r)
-c9ca805103de1888a331a98f98bab22a Football Demo (u)
-
-(pajama3 cd)
-Joachim
-b79809888128b1d31080664487c8fc5e footdemo.(a)
-ccca9a823d117afb1a882fd707586bf0 footdemo.d32
-afd8621bd60d686ebc97ef259a6f0fe0 footdemo.exe
-425205754fa749f4f0b0dd9d09fa45fd footdemo.HE0
-bf65bf5fbfd26a63f7bd32437a960667 footdemo.he2
-9e53fbcf1061636d3d192c786c4e3b7b footdemo.he4
-07656b959c7febb6359c8de5fd6b6f76 FOOTDEMO.U32
-
-(puttsfunshop hfs/samsfunshop hfs/freddisfunshop hfs/freddicove hfs)
-Joachim
-51c909630d8ca434c6e1dfe070a15792 Football Demo
-5bd335265a61caa3d78956ad9f88ba23 FootBall Demo (0)
-bf65bf5fbfd26a63f7bd32437a960667 FootBall Demo (2)
-9e53fbcf1061636d3d192c786c4e3b7b FootBall Demo (4)
-bb6ec9a3a2a016b239367c2b26d9ee3b FootBall Demo (a)
-d41d8cd98f00b204e9800998ecf8427e Football Demo (i)
-d41d8cd98f00b204e9800998ecf8427e FootBall Demo (r)
-c9ca805103de1888a331a98f98bab22a Football Demo (u)
-
-(putsfunshop cd/pajama3 cd/spyozon cd/freddicove cd/freddisfunshop cd/samsfunshop cd/pajama win cd)
-sev, Joachim (Comment by Joachim: this version is not on the pajama3 cd for me, see above)
-C:\Dev\Project\SPUTM\Src\*.cpp
-bb6ec9a3a2a016b239367c2b26d9ee3b FOOTDEMO.(A)
-ccca9a823d117afb1a882fd707586bf0 footdemo.d32
-afd8621bd60d686ebc97ef259a6f0fe0 footdemo.exe
-5bd335265a61caa3d78956ad9f88ba23 FOOTDEMO.HE0
-bf65bf5fbfd26a63f7bd32437a960667 footdemo.he2
-9e53fbcf1061636d3d192c786c4e3b7b footdemo.he4
-07656b959c7febb6359c8de5fd6b6f76 FOOTDEMO.U32
-
-(football demo hfs)
-khalek
-???
-
-(football demo)
-khalek
-???
-
-(football2002 cd hfs) // uses Bink as external files. 137 files
-Joachim
-4bfe515242f8ee4cc01b9fc4cf52b29a Football 2002
-d0549508a06bbb9f99ed19c9e97891f3 Football 2002 (0)
-7c6f5da8f9d223942ff387c3b3b1262a Football 2002 (2)
-eded7062b612284a62df6be9e37e8d9e Football 2002 (3)
-5f22d1edf87e08f151c93726684d47a5 Football 2002 (4)
-b81d20adb6371ed620fedcc0156c6fb7 Football 2002 (a)
-1e45c754359ca021d50cc6776f3240a6 Football 2002 (b)
-4017d76fa35c60e64011d333443dfa9c Football 2002 (i)
-932e34469fd78234fff755a22960114d football 2002 (u)
-
-(football2002 cd) // uses Bink as external files. 137 files
-c:\SRC_RELEASE\SPUTM\Src\SrcPWin\*.cpp
-Joachim
-b81d20adb6371ed620fedcc0156c6fb7 Football2002.(a)
-1e45c754359ca021d50cc6776f3240a6 Football2002.(b)
-7894dd82c874b535dc8acadef0950be4 Football2002.exe
-d0549508a06bbb9f99ed19c9e97891f3 Football2002.HE0
-7c6f5da8f9d223942ff387c3b3b1262a Football2002.HE2
-eded7062b612284a62df6be9e37e8d9e Football2002.HE3
-5f22d1edf87e08f151c93726684d47a5 Football2002.HE4
-
-(football2002 cd hfs)
-???
-
-(football2002 cd) // uses Bink as external files. 137 files
-2001-09-11 14:22 football2002.exe
-khalek (Comment by Joachim: I completed the deatils with details from above, I hope this is right)
-C:\SRC_RELEASE\SPUTM\Src\SrcPWin\*.cpp
-b81d20adb6371ed620fedcc0156c6fb7 Football2002.(a)
-20aca400df5f580e4d3c019c3386d361 Football2002.(b)
-2234bbc4d12a09fadf8540343eb1c00e football2002.exe
-2e85f7aa054930c692a5b1bed1dfc295 Football2002.HE0
-7c6f5da8f9d223942ff387c3b3b1262a Football2002.HE2
-eded7062b612284a62df6be9e37e8d9e Football2002.HE3
-5f22d1edf87e08f151c93726684d47a5 Football2002.HE4
-
-(soccer cd hfs)
-Joachim
-462a01a55236b1dc5aa3ea543bbfc904 Soccer
-701246819d1a70573f41bf33fc19214f Soccer (0)
-6b8840d83784dbceb44f9d8694fce9d4 Soccer (2)
-b50ac4df3a13b7ccc73e68dae5851d36 Soccer (4)
-6a89ce2925a36a1d9e0d9e9f7060c533 Soccer (9)
-a70431a271fd64eb958bab0a75b9db5b Soccer (A)
-d41d8cd98f00b204e9800998ecf8427e Soccer (r)
-8605a367b4d66e756ccc00c8b6a22e0b Soccer (u)
-
-(soccer cd)
-sev, Joachim
-D:\scummsys.98\sputm.98\*.c
-a70431a271fd64eb958bab0a75b9db5b SOCCER.(A)
-ccca9a823d117afb1a882fd707586bf0 soccer.d32
-431076c63ffa5b0caf66dbe03c1eef30 SOCCER.EXE
-701246819d1a70573f41bf33fc19214f SOCCER.HE0
-6b8840d83784dbceb44f9d8694fce9d4 SOCCER.HE2
-b50ac4df3a13b7ccc73e68dae5851d36 SOCCER.HE4
-6a89ce2925a36a1d9e0d9e9f7060c533 SOCCER.HE9
-ed64133f8cdfca57fb3cd09057def978 SOCCER.U32
-db16386ae24902866ec908c31f58dd6c Soccer.w32
-
-
-(soccerMLS cd hfs)
-???
-
-(soccerMLS cd)
-sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-bda62f35e0ce1f910d63f0713b3426cb SoccerMLS.(a)
-9705d481fd818835e68bb3ac3ddaf787 SoccerMLS.exe
-bfdf584b01503f0762baded581f6a0a2 SoccerMLS.he0
-b44275bf54bfa7e01548eec5b7101ed9 SoccerMLS.he2
-a8fa25dc67dee77f009fe5fb59b1961a SoccerMLS.he4
-6a89ce2925a36a1d9e0d9e9f7060c533 SoccerMLS.he9
-
-(soccer2004 cd) // uses bink but just for external three files
-sev
-F:\HEdev\scummsys\SPUTM\Src\SrcPWin\*.cpp
-e10cb34c774852175134fe166a602012 Soccer2004.(a)
-8acec50e5cd48830121a3b22a8bfaa46 Soccer2004.(b)
-c4ffae9fac495475d6bc3343ccc8faf9 Soccer2004.HE0
-b6eae47432b9545d33d4d867cef0b4ae Soccer2004.he3
-c83971b2f2020bf68724df52c9ae70a8 soccer2004.he2
-212776c1a2dc3d44a393afc4611afbc3 soccer2004.he4
-8f70113f7c01f7bfe9f83f02749d449d soccer2004.he9
-5fba7c0899429399f944a0353307863c DATA/helogo.da2
-56ed9865373c4fe63e8986989ef75999 DATA/infogrames.da2
-678dc9831679dd3f09933d0e568f6d3c DATA/intro.da2
-
-(soccer2004 cd russian) // uses bink but just for external three files
-sev
-F:\HEdev\scummsys\SPUTM\Src\SrcPWin\*.cpp
-2808c81e388743998b3c7331501cc4dd Soccer2004.(a)
-7e358891079c9f366184211d14707a70 Soccer2004.(b)
-c4ffae9fac495475d6bc3343ccc8faf9 Soccer2004.HE0
-b6eae47432b9545d33d4d867cef0b4ae Soccer2004.he3
-c83971b2f2020bf68724df52c9ae70a8 soccer2004.he2
-212776c1a2dc3d44a393afc4611afbc3 soccer2004.he4
-8f70113f7c01f7bfe9f83f02749d449d soccer2004.he9
-5fba7c0899429399f944a0353307863c DATA/helogo.da2
-56ed9865373c4fe63e8986989ef75999 DATA/infogrames.da2
-678dc9831679dd3f09933d0e568f6d3c DATA/intro.da2
-
-(thinkerk cd hfs)
-Joachim
-0c8f2ebce5116dc8a4fd7cd971cab19b ThinkerK
-92fc0073a4cf259ff36070ecb8628ba8 ThinkerK (0)
-2b06d67c5332c84d389fa681961920da ThinkerK (1)
-61b858cb5e97fc2960e74b18297be540 ThinkerK (2)
-06a5613cf59c7fdb5d5b888142d6d8b4 ThinkerK (4)
-d41d8cd98f00b204e9800998ecf8427e ThinkerK (r)
-
-(thinkerk cd)
-kirben, Joachim
-c0c0934580cde95879bef0b6a5a49c29 THINKERK.D32
-37b4a8ce5bc28bc958c2c2548a453d31 THINKERK.EXE
-92fc0073a4cf259ff36070ecb8628ba8 THINKERK.HE0
-2b06d67c5332c84d389fa681961920da THINKERK.HE1
-61b858cb5e97fc2960e74b18297be540 THINKERK.HE2
-06a5613cf59c7fdb5d5b888142d6d8b4 THINKERK.HE4
-b10981a0805c37cda1420f29745d6537 THINKERK.W32
-
-(freddi cd hfs)
-khalek
-1997-12-09 19:59 Kinddemo
-9c445edf28ee4a2a7b3ff36ea1f75c05 Kinddemo
-695fe0b3963333b7e15b37514db3c745 Kinddemo (0)
-d3af0fb2011b158a28c43480fb59c588 Kinddemo (1)
-e5da782a19575d12ff98feb74f7602e3 Kinddemo (2)
-ba7a9148040e2421c4129b1d32c40627 Kinddemo (4)
-d41d8cd98f00b204e9800998ecf8427e Kinddemo (r)
-
-(ftp/pajama2 cd/puttrace cd/freddi3 cd/soccer cd)
-1997-09-03 18:32 kinddemo.w32
-khalek, sev, Joachim
-D:\Scummsys.90\sputm.90\*.c
-c0c0934580cde95879bef0b6a5a49c29 KINDDEMO.D32
-37b4a8ce5bc28bc958c2c2548a453d31 KINDDEMO.EXE
-695fe0b3963333b7e15b37514db3c745 KINDDEMO.HE0
-d3af0fb2011b158a28c43480fb59c588 KINDDEMO.HE1
-e5da782a19575d12ff98feb74f7602e3 KINDDEMO.HE2
-ba7a9148040e2421c4129b1d32c40627 KINDDEMO.HE4
-b10981a0805c37cda1420f29745d6537 KINDDEMO.W32
-
-(thinker1 cd hfs)
-Joachim
-cd7d15788407e42cb2d25e91bcb5649f Thinker1
-5c21fc49aee8f46e58fef21579e614a1 Thinker1 (0)
-d208e601cbeda1082aae9959bc80d736 Thinker1 (1)
-2e3a3f3cf83a6125a9bc0637dcd3daec Thinker1 (2)
-70d4c5fcba615fca984a3cb4bc42fb6a Thinker1 (4)
-d41d8cd98f00b204e9800998ecf8427e Thinker1 (r)
-
-(thinker1 cd)
-Joachim
-c0c0934580cde95879bef0b6a5a49c29 THINKER1.D32
-ac403714308c2a6200bbffd4cd49c77c THINKER1.EXE
-5c21fc49aee8f46e58fef21579e614a1 THINKER1.HE0
-d208e601cbeda1082aae9959bc80d736 THINKER1.HE1
-2e3a3f3cf83a6125a9bc0637dcd3daec THINKER1.HE2
-70d4c5fcba615fca984a3cb4bc42fb6a THINKER1.HE4
-dafbd5699d72d4b985f1f6c46ae9a556 THINKER1.W32
-
-(1grademo hfs)
-???
-
-1997-09-03 14:21 1grademo.w32
-khalek
-D:\Scummsys.90\sputm.90\*.c
-0f5935bd5e88ba6f09e558d64459746d 1grademo.he0
-e41b3ba697f00251fdefd7d64a8cf125 1grademo.he1
-007961d43ada4cca6f15b2dcedcb695e 1grademo.he2
-ae77dc6ff68d6fdfb23e5f792f91ab2d 1grademo.he4
-5d4a7c36dee1a11ed50d260f8413c27a 1grademo.w32
-
-(puttsfunshop cd hfs/puttcircus cd hfs/freddisfunshop cd hfs/samsfunshop cd hfs)
-Joachim
-fcd508025e1963a619b2aec191907f22 BluesABCTimeDemo
-7ddeaf52c8b9a50551ce0aa2ac811d07 BluesABCTimeDemo (0)
-e4a7e95b00feb1a3e13b542c164c7ff3 BluesABCTimeDemo (2)
-de94e921f02e3b4c6e061aab0f4cc339 BluesABCTimeDemo (4)
-06fee308ab288ece9b2ab18f9c7b9f41 BluesABCTimeDemo (a)
-d41d8cd98f00b204e9800998ecf8427e BluesABCTimeDemo (r)
-
-
-(puttsfunshop cd/pajama3 cd/puttcircus cd/freddisfunshop cd/samsfunshop cd)
-1998-07-26 13:36 BLUESABCTIMEDEMO.W32
-khalek, sev, Joachim
-D:\scummsys.98\sputm.98\*.c
-06fee308ab288ece9b2ab18f9c7b9f41 BluesABCTimeDemo.(a)
-ccca9a823d117afb1a882fd707586bf0 BluesABCTimeDemo.d32
-f67221ca7890906f29ab38aedafb0802 BluesABCTimeDemo.exe
-7ddeaf52c8b9a50551ce0aa2ac811d07 BluesABCTimeDemo.HE0
-e4a7e95b00feb1a3e13b542c164c7ff3 BluesABCTimeDemo.he2
-de94e921f02e3b4c6e061aab0f4cc339 BluesABCTimeDemo.he4
-
-(puttrace cd hfs/freddi4 cd hfs/puttzoo cd hfs/pajama3 cd hfs)
-Joachim
-fcd508025e1963a619b2aec191907f22 BluesABCTimeDemo
-810a9da887aefa597b0cf3c77d262897 BluesABCTimeDemo (0)
-5800ab15c53341fa4b4470cd20c2affa BluesABCTimeDemo (2)
-de94e921f02e3b4c6e061aab0f4cc339 BluesABCTimeDemo (4)
-860eb5a38ce8edef04f614bb50489aab BluesABCTimeDemo (a)
-d41d8cd98f00b204e9800998ecf8427e BluesABCTimeDemo (r)
-
-(puttrace cd/freddi4 cd/puttzoo cd)
-sev, Joachim
-D:\scummsys.98\sputm.98\*.c
-860eb5a38ce8edef04f614bb50489aab BluesABCTimeDemo.(a)
-ccca9a823d117afb1a882fd707586bf0 BluesABCTimeDemo.d32
-f67221ca7890906f29ab38aedafb0802 BluesABCTimeDemo.exe
-810a9da887aefa597b0cf3c77d262897 BluesABCTimeDemo.HE0
-5800ab15c53341fa4b4470cd20c2affa BluesABCTimeDemo.he2
-de94e921f02e3b4c6e061aab0f4cc339 BluesABCTimeDemo.he4
-
-(freddi5 cd hfs) // uses smacker videos
-Joachim
-181b98beb756fe07650608b0357fa934 Blues-ArtTime Demo
-d00ffc8c32d17e575fd985d435d2eb88 Blues-ArtTime Demo (0)
-58c91c3f750b227b136e96b410b0e7cc Blues-ArtTime Demo (2)
-47f0573a8a629c6e7f8b9236112fe10e Blues-ArtTime Demo (4)
-548fcedaa9cee84443a5a9acfff4cb04 Blues-ArtTime Demo (a)
-5272e8074130bdcc431d6ce325e3f0ab Blues-ArtTime Demo (i)
-2f1a08df8aa13924959905fc5dc34a9b Data/intr_at_in_01.dat
-f7841f8a37394805fc0699999898bcca Data/intr_at_in_02.dat
-6a2f8c39d2ce07d422bae9f9bf416839 Data/intr_at_in_20_b.dat
-
-(freddi5 cd) // uses smacker videos
-sev, Joachim
-C:\Dev\Project\SPUTM\Src\SrcPWin\*.cpp
-548fcedaa9cee84443a5a9acfff4cb04 artdemo.(a)
-e856bf226130de0d84bcaaa7ecfb5a3a artdemo.D32
-840be04790ddb035725978e70f7c78f8 ARTDEMO.EXE
-d00ffc8c32d17e575fd985d435d2eb88 artdemo.HE0
-58c91c3f750b227b136e96b410b0e7cc artdemo.he2
-47f0573a8a629c6e7f8b9236112fe10e artdemo.he4
-7e98a8e45cbac83e65d98f3c133ae34d artdemo.w32
-2f1a08df8aa13924959905fc5dc34a9b Data/intr_at_in_01.dat
-f7841f8a37394805fc0699999898bcca Data/intr_at_in_02.dat
-6a2f8c39d2ce07d422bae9f9bf416839 Data/intr_at_in_20_b.dat
-
-(puttsfunshop cd hfs/freddisfunshop cd hfs/samsfunshop cd hfs/pajama3 cd hfs/puttcircus cd hfs) // uses smacker videos
-Joachim
-30ea41602894a180aac747198388bc5e BluesBirthdayDemo
-dbf4d59d70b826733f379f998354d350 BluesBirthdayDemo (0)
-60cc055b47b53cb53eaa89e1f974c888 BluesBirthdayDemo (2)
-0794110b085ee91c2aa4a5fc844ff2f4 BluesBirthdayDemo (4)
-44e5c3d256fe45c334ac772fa2dd23e2 BluesBirthdayDemo (+)
-6ddf8b026cfb9410b560f91f353dc0f4 BluesBirthdayDemo (a)
-409a570e46466aef89c3cd3a30992543 BluesBirthdayDemo (b)
-b46f3aa845f11020d8420d624c120120 BluesBirthdayDemo (i)
-d41d8cd98f00b204e9800998ecf8427e BluesBirthdayDemo (r)
-
-(puttsfunshop cd/freddisfunshop cd/samsfunshop cd/pajama3 cd/puttcircus cd) // uses smacker videos
-sev, Joachim
-D:\scummsys.98\sputm.98\*.c
-6ddf8b026cfb9410b560f91f353dc0f4 BluesBirthdayDemo.(a)
-409a570e46466aef89c3cd3a30992543 BluesBirthdayDemo.(b)
-e07a222d121f7e8b04266bf4d7809cb4 BluesBirthdayDemo.a32
-ccca9a823d117afb1a882fd707586bf0 BluesBirthdayDemo.d32
-6d283612076435baad21d5cc5f40fba3 BluesBirthdayDemo.exe
-dbf4d59d70b826733f379f998354d350 BluesBirthdayDemo.HE0
-60cc055b47b53cb53eaa89e1f974c888 BluesBirthdayDemo.he2
-0794110b085ee91c2aa4a5fc844ff2f4 BluesBirthdayDemo.he4
-
-(puttrace cd hfs) // uses smacker videos
-Joachim
-30ea41602894a180aac747198388bc5e BluesBirthdayDemo
-2d4acbdcfd8e374c9da8c2e7303a5cd0 BluesBirthdayDemo (0)
-dc5e63ecf2672d4a3a0458fe32902a4e BluesBirthdayDemo (2)
-0794110b085ee91c2aa4a5fc844ff2f4 BluesBirthdayDemo (4)
-44e5c3d256fe45c334ac772fa2dd23e2 BluesBirthdayDemo (+)
-18ee74255c93da057c92effbd39ebd9a BluesBirthdayDemo (a)
-409a570e46466aef89c3cd3a30992543 BluesBirthdayDemo (b)
-b46f3aa845f11020d8420d624c120120 BluesBirthdayDemo (i)
-d41d8cd98f00b204e9800998ecf8427e BluesBirthdayDemo (r)
-
-(puttrace cd) // uses smacker videos
-sev, Joachim
-D:\scummsys.98\sputm.98\*.c
-18ee74255c93da057c92effbd39ebd9a BluesBirthdayDemo.(a)
-409a570e46466aef89c3cd3a30992543 BluesBirthdayDemo.(b)
-e07a222d121f7e8b04266bf4d7809cb4 BluesBirthdayDemo.a32
-ccca9a823d117afb1a882fd707586bf0 BluesBirthdayDemo.d32
-e478bdc989beeeaec7e2528a11c88729 BluesBirthdayDemo.exe
-2d4acbdcfd8e374c9da8c2e7303a5cd0 BluesBirthdayDemo.HE0
-dc5e63ecf2672d4a3a0458fe32902a4e BluesBirthdayDemo.he2
-0794110b085ee91c2aa4a5fc844ff2f4 BluesBirthdayDemo.he4
-
-
-(freddi5 cd hfs) // uses smacker videos
-Joachim
-853c41736ce7e4c5d6b3431dd550ea3f Blues-ReadingTime Demo
-95818b178d473c989ac753574e8892aa Blues-ReadingTime Demo (0)
-7c64b87e454e642e36a83c79341007b0 Blues-ReadingTime Demo (2)
-4f307cf26e46f765298cc8f92f02db49 Blues-ReadingTime Demo (4)
-f536221cc5d8da02009278523eda6bd5 Blues-ReadingTime Demo (a)
-5272e8074130bdcc431d6ce325e3f0ab Blues-ReadingTime Demo (i)
-45a973a322b177ee4b36bea81981462d Data/INT_RT_IN_01.DAT
-9e0c144bf1b7f0cc8ba3edae6135e313 Data/INT_RT_IN_03.DAT
-8d150f9d9e12e485da50c4560135b4ef Data/INT_RT_IN_04.DAT
-8cde496829546daaaa28084c49f3f4f7 Data/INT_RT_IN_05.DAT
-c784fa970208b5bd49fff568ca0036ec Data/INT_RT_IN_06.DAT
-
-(freddi5 cd) // uses smacker videos
-sev, Joachim
-C:\Dev\Project\SPUTM\Src\SrcPWin\*.cpp
-f536221cc5d8da02009278523eda6bd5 readdemo.(a)
-e856bf226130de0d84bcaaa7ecfb5a3a readDemo.D32
-2be2b18bf04dcd9d9dc6b16e88b8f811 READDEMO.EXE
-95818b178d473c989ac753574e8892aa readdemo.HE0
-7c64b87e454e642e36a83c79341007b0 readDemo.he2
-4f307cf26e46f765298cc8f92f02db49 readdemo.he4
-eac7453b1dca87447974ef54137470f9 readDemo.w32
-45a973a322b177ee4b36bea81981462d Data/INT_RT_IN_01.DAT
-9e0c144bf1b7f0cc8ba3edae6135e313 Data/INT_RT_IN_03.DAT
-8d150f9d9e12e485da50c4560135b4ef Data/INT_RT_IN_04.DAT
-8cde496829546daaaa28084c49f3f4f7 Data/INT_RT_IN_05.DAT
-c784fa970208b5bd49fff568ca0036ec Data/INT_RT_IN_06.DAT
-
-(fbear cd 3do)
-???
-
-(he classics cd)
-khalek, sev
-6.1.1 (Jun 23 1993 15:31:14)
-9f5ada54fef54f1602bb1b642d0fe412 FBEAR.EXE
-3824e60cdf639d22f6df92a03dc4b131 FBEAR.HE0
-c75f511786a4e0c474660d074c9a421a FBEAR.HE1
-d05d89374e5e459067603cd075dd3134 FBEAR.SNG
-c542564fc561aca36626259455738126 FBEAR.TLK
-
-(fbear cd)
-Joachim
-9f5ada54fef54f1602bb1b642d0fe412 FBEAR.EXE
-3824e60cdf639d22f6df92a03dc4b131 FBEAR.HE0
-c75f511786a4e0c474660d074c9a421a FBEAR.HE1
-d05d89374e5e459067603cd075dd3134 FBEAR.SNG
-0f19cfc74cbeb0a255b289772acad687 FBEAR.TLK
-
-(fbear cd hebrew)
-???
-
-(he classics cd hfs)
-khalek
-3df6ead57930488bc61e6e41901d0e97 Fatty Bear 0
-93cdebdbf8f1ec8c3f05dff0c8fedc82 Fatty Bear 1
-fc3885128832fcb876ccd79124ba36fe Fatty Bear 2
-d05d89374e5e459067603cd075dd3134 Fatty Bear Songs
-
-(fbear cd hfs)
-Joachim
-d41d8cd98f00b204e9800998ecf8427e Fatty Bear
-3df6ead57930488bc61e6e41901d0e97 Fatty Bear 0
-93cdebdbf8f1ec8c3f05dff0c8fedc82 Fatty Bear 1
-110890cbcbbdacdd3a02159cbde20889 Fatty Bear 2
-d05d89374e5e459067603cd075dd3134 Fatty Bear Songs
-
-(he classics cd)
-khalek, sev
-7.0.0 (Feb 7 1995 13:27:40)
-179879b6e35c1ead0d93aab26db0951b FBEAR.HE0
-7f733155adcb049e887fef942e81602a FBEAR.HE1
-fc3885128832fcb876ccd79124ba36fe FBEAR.HE2
-58dfc09f344a9dec565bb914920800d3 FBEAR.HE3
-a6b0d9c55f747f906142ed60c7d780e8 FBEAR.HE4
-d05d89374e5e459067603cd075dd3134 FBEAR.SNG
-564d213162f0375b62a8fc5a3a9ef94d FBEAR.W32
-
-(fbear cd)
-Joachim
-333714828ec2e0bd97a189882bf4e49e FBEAR.EXE
-179879b6e35c1ead0d93aab26db0951b FBEAR.HE0
-7f733155adcb049e887fef942e81602a FBEAR.HE1
-110890cbcbbdacdd3a02159cbde20889 FBEAR.HE2
-58dfc09f344a9dec565bb914920800d3 FBEAR.HE3
-a6b0d9c55f747f906142ed60c7d780e8 FBEAR.HE4
-d05d89374e5e459067603cd075dd3134 FBEAR.SNG
-564d213162f0375b62a8fc5a3a9ef94d FBEAR.W32
-
-6.1.1 (Apr 6 1993 20:48:56)
-khalek
-59c820951585b7dfb0307992bbb275c7 fbdemo.exe
-47e75b1bdcb44c78cb94883d1731ccf8 fbdemo.he0
-7c61c90ec5ceb812698d40b29f356559 fbdemo.he1
-f054dd0158bafd59570794397727c882 fbdemo.tlk
-
-(puttmoon cd hfs/airport cd hfs/jungle cd hfs)
-Joachim
-d41d8cd98f00b204e9800998ecf8427e Fatty Bear Demo
-6df20c50c1ab19799de9be7ae7716881 Fatty Bear Demo 0
-d9e4a20226b6120d2a3d8d3a9a643a86 Fatty Bear Demo 1
-0d95ea172d9c94f4c90b9f542a824ced Fatty Bear Demo 2
-
-(puttputt cd/he classics cd/fbear cd/puttmoon cd)
-khalek, sev, Joachim
-7.0.0 (Feb 7 1995 13:27:40)
-9b44bf1f45abc809cf81fde9ff80e5a7 FBDEMO.EXE
-22c9eb04455440131ffc157aeb8d40a8 FBDEMO.HE0
-5293d81516126086766540ab12a9c499 FBDEMO.HE1
-f054dd0158bafd59570794397727c882 FBDEMO.HE2
-58dfc09f344a9dec565bb914920800d3 FBDEMO.HE3
-76954add1f2c5bd9d967746ab4137d3a FBDEMO.HE4
-564d213162f0375b62a8fc5a3a9ef94d FBDEMO.W32
-
-(freddi cd hfs)
-khalek
-1998-02-18 16:06 Freddi Fish
-560da18bc11f6cf7b068a96dd928ae7e Freddi Fish
-df047cc4792150f601290357566d36a6 Freddi Fish (0)
-d30fb13dd3baa94a4cabe4cc1a6228d1 Freddi Fish (1)
-f2f1e70bd9388c98c0ef38b1ef286ae2 Freddi Fish (2)
-cb0fb189e08144bbc713b8df739ba9fc Freddi Fish (4)
-d41d8cd98f00b204e9800998ecf8427e Freddi Fish (r)
-
-(freddi cd)
-khalek, Joachim
-1998-01-21 02:13 freddi.w32
-D:\Scummsys.90\sputm.90\*.c
-c0c0934580cde95879bef0b6a5a49c29 FREDDI.D32
-2e0253f624f34b56cf888e557d931a3b FREDDI.EXE
-df047cc4792150f601290357566d36a6 FREDDI.HE0
-d30fb13dd3baa94a4cabe4cc1a6228d1 FREDDI.HE1
-f2f1e70bd9388c98c0ef38b1ef286ae2 FREDDI.HE2
-cb0fb189e08144bbc713b8df739ba9fc FREDDI.HE4
-0d6f0f65403bd23afb78c143587d11a8 FREDDI.W32
-
-(freddi cd russian)
-sev
-7.0.0 (Jun 23 1995 09:58:48)
-d4cccb5af88f3e77f370896e9ba8c5f9 FREDDI.HE0
-1705aa5c12a2959f1b69abc1fd145f01 FREDDI.HE1
-199c5c38798ddacce5cfbfe7b31267cf FREDDI.HE2
-6daf76c1fe724ce6bf2e4c5175f39352 FREDDI.HE3
-a176fababbf7944a1d4b5d6521b20f4d FREDDI.HE4
-2085ef0c1d1cc64db1ec52901b4856b9 FREDDI.HE5
-8be6d657bcbda8b4926448e530528d6a FREDDI.W32
-
-(freddi cd dutch)
-adutchguy
-???
-
-(freddi cd german)
-oncer, Joachim
-fc00ad009697e2c9a50dd222f8f40c73 FREDDI.EXE
-cf8ef3a1fb483c5c4b1c584d1167b2c4 FREDDI.HE0
-e3b21adcc7ad12e0b8a0a8fa9bdd30a9 FREDDI.HE1
-1d10f0e80dc84a3dd8331c55f4146ed5 FREDDI.HE2
-6daf76c1fe724ce6bf2e4c5175f39352 FREDDI.HE3
-8e27aebf6d89f8576a08b58e216a6a90 FREDDI.HE4
-842badd1332ab8d6c8fd4e8277e0471c FREDDI.W32
-
-(freddi cd nb)
-Karl Ove Hufthammer
-???
-
-(freddi cd russian updated)
-sev
-D:\Scummsys.90\sputm.90\*.c
-746e88c172a5b7a1ae89ac0ee3ee681a Freddi.HE0
-02b964d6d7a3fcace1bc89ae2a2c9db7 FREDDI.HE1
-14a1058745c609eefa08f1591cc5d4df FREDDI.HE2
-2b219196f0cc74d626a3216932d3ea54 Freddi.he4
-58d117ae89707c7360f403186641e87f FREDDI.W32
-
-(freddi cd swedish)
-Sven Arvidsson
-???
-
-(farm cd hfs/airportcd hfs/jungle cd hfs/thinker1 cd hfs/thinkerk cd hfs/socks cd hfs/baseball cd hfs)
-khalek, Joachim
-1995-09-14 17:35 Freddi Demo
-42f4a55732734e3c54c0b198f2615970 Freddi Demo
-c8aac5e3e701874e2fa4117896f9e1b1 Freddi Demo (0)
-b4805ccd0841854d6b2f596f0efb5551 Freddi Demo (1)
-faca7509c38beabb37b2347b8b6bb1ea Freddi Demo (2)
-a8c3ced34ecb16ad1b0eed5b464ad61e Freddi Demo (4)
-
-(he classics cd hfs/pajama cd hfs/puttzoo cd hfs)
-khalek (comment: is this double entry really necessary?)
-1996-11-17 13:28 Freddi Demo
-42f4a55732734e3c54c0b198f2615970 Freddi Demo
-c8aac5e3e701874e2fa4117896f9e1b1 Freddi Demo (0)
-b4805ccd0841854d6b2f596f0efb5551 Freddi Demo (1)
-faca7509c38beabb37b2347b8b6bb1ea Freddi Demo (2)
-a8c3ced34ecb16ad1b0eed5b464ad61e Freddi Demo (4)
-
-(puttputt cd/puttmoon cd/fbear cd)
-khalek, sev, Joachim
-7.0.0 (Oct 20 1994 10:00:19)
-10f764e586228d090d66bdf43cc5a1ef FREDDEMO.EXE
-084ed0fa98a6d1e9368d67fe9cfbd417 FREDDEMO.HE0
-273e622b5fdf60859b549fee08384a33 FREDDEMO.HE1
-faca7509c38beabb37b2347b8b6bb1ea FREDDEMO.HE2
-6daf76c1fe724ce6bf2e4c5175f39352 FREDDEMO.HE3
-a8c3ced34ecb16ad1b0eed5b464ad61e FREDDEMO.HE4
-0ebc6a8cc24babc41dbfbfb07ee6456f FREDDEMO.W32
-
-(farm cd/airport cd/jungle cd/airport hfs/jungle hfs)
-khalek, Joachim
-7.0.0 (Jun 22 1995 14:06:25)
-e269b675a252296640430feab730e8b7 FREDDEMO.EXE
-0855496dde35356b1a9691e22ba84cdc FREDDEMO.HE0
-5374aef0d7c547a95dc779f4ea51e20f FREDDEMO.HE1
-faca7509c38beabb37b2347b8b6bb1ea FREDDEMO.HE2
-6daf76c1fe724ce6bf2e4c5175f39352 FREDDEMO.HE3
-a8c3ced34ecb16ad1b0eed5b464ad61e FREDDEMO.HE4
-3d43af3f3ecc18744dda721d951e2a2f FREDDEMO.W32
-
-(spyfox cd/pajama cd/puttzoo cd/he classics cd/freddi2 cd/baseball cd/socks cd/thinker1 cd/thinkerk cd)
-khalek, sev, Joachim (comment: all files uppercase on CD)
-7.0.0 (Jul 5 1995 14:46:05)
-e269b675a252296640430feab730e8b7 FREDDEMO.EXE
-566165a7338fa11029e7c14d94fa70d0 FREDDEMO.HE0
-649724a605cb66fef3fac73297ef4259 FREDDEMO.HE1
-faca7509c38beabb37b2347b8b6bb1ea FREDDEMO.HE2
-6daf76c1fe724ce6bf2e4c5175f39352 FREDDEMO.HE3
-a8c3ced34ecb16ad1b0eed5b464ad61e FREDDEMO.HE4
-25003798cd5f4b51bc1f4d02c6a2e218 FREDDEMO.W32
-
-(humongous ftp)
-7.0.0 (Jul 5 1995 14:46:05)
-khalek, sev
-566165a7338fa11029e7c14d94fa70d0 freddemo.he0
-649724a605cb66fef3fac73297ef4259 freddemo.he1
-faca7509c38beabb37b2347b8b6bb1ea freddemo.he2
-6daf76c1fe724ce6bf2e4c5175f39352 freddemo.he3
-a8c3ced34ecb16ad1b0eed5b464ad61e freddemo.he4
-a5459bfe36183cf1f4ced00fe325aa90 freddemo.w32
-
-(freddi2 cd german/freddi2 cd hfs german)
-Joachim
-fc00ad009697e2c9a50dd222f8f40c73 FREDDEMO.EXE
-cf4ef315214c7d8cdab6302cdb7e50db FREDDEMO.HE0
-c4671ee12bcb89be376a8432ac23ce77 FREDDEMO.HE1
-468e8c93b4831ff6e84ac69140f8b603 FREDDEMO.HE2
-6daf76c1fe724ce6bf2e4c5175f39352 FREDDEMO.HE3
-a8c3ced34ecb16ad1b0eed5b464ad61e FREDDEMO.HE4
-842badd1332ab8d6c8fd4e8277e0471c FREDDEMO.W32
-
-(freddi2 cd hfs)
-Kirben
-???
-
-(freddi2 hfs)
-Kirben
-???
-
-(freddi2 cd hfs)
-kirben, Joachim
-91a8077251d21b9a060792f50df91cbc Freddi Fish 2
-51305e929e330e24a75a0351c8f9975e Freddi Fish 2 (0)
-2f0f418ca29e298343a76e4a76ce5d96 Freddi Fish 2 (2)
-c87140d52e550ee923f18789517e61ab Freddi Fish 2 (4)
-722286b727e75a3e44f9333d6b604427 Freddi Fish 2 (a)
-d5920b5082d570d03500fe165bb75c0a Freddi Fish 2 (i)
-d41d8cd98f00b204e9800998ecf8427e Freddi Fish 2 (r)
-
-(freddi2 cd)
-kirben, Joachim
-722286b727e75a3e44f9333d6b604427 Freddi2.(a)
-ccca9a823d117afb1a882fd707586bf0 Freddi2.d32
-c45467455384a11c608530d371d6669e FREDDI2.EXE
-51305e929e330e24a75a0351c8f9975e Freddi2.HE0
-2f0f418ca29e298343a76e4a76ce5d96 Freddi2.he2
-c87140d52e550ee923f18789517e61ab Freddi2.he4
-15e826c4702e0c44018a6b6a31de76ef FREDDI2.w32
-
-(freddi2 cd hfs german)
-Joachim
-5d6f8f48c758f7ce07ace9141bd177d4 Fritzi Fisch 2
-fce4b8010704b103acfeea9413788f32 Fritzi Fisch 2 (0)
-d857b6f3ee3a2347faf589a823be6d6c Fritzi Fisch 2 (1)
-3e25355859e2fc97c88ebebfd63c5c14 Fritzi Fisch 2 (2)
-2b7114ad0e35ca65ec8de54b7acd352d Fritzi Fisch 2 (4)
-
-(freddi2 cd german)
-Joachim
-4c695f3d8015af4277fd284981e0d2c4 FREDDI2.D32
-9d4373de9fd1c25671de1500dbe358a2 FREDDI2.EXE
-fce4b8010704b103acfeea9413788f32 FREDDI2.HE0
-d857b6f3ee3a2347faf589a823be6d6c FREDDI2.HE1
-3e25355859e2fc97c88ebebfd63c5c14 FREDDI2.HE2
-2b7114ad0e35ca65ec8de54b7acd352d FREDDI2.HE4
-e24b9e887a04f66db3edcd5fc81767fd FREDDI2.W32
-
-(freddi2 cd)
-sev
-D:\Scummsrc.80\Sputm\*.c
-5057fb0e99e5aa29df1836329232f101 FREDDI2.HE0
-a586db95af3146aa7793c5e2d0ed9e83 FREDDI2.HE1
-9ff9a777a343e605278127c0bbdde58f FREDDI2.HE2
-d22f1b3bd41cb4901f89164043953bc8 FREDDI2.HE4
-d06066ae0ba8ffb338d6a00f556ae3ac FREDDI2.W32
-
-(freddi2 cd russian)
-sev
-D:\Scummsrc.80\Sputm\*.c
-5057fb0e99e5aa29df1836329232f101 FREDDI2.HE0
-1b6d479d15a7eb4a55c5e90711511b00 FREDDI2.HE1
-53f72ce417e28af51e3b8a60cd6ca5ef FREDDI2.HE2
-52494431dd3f658a8dc1d4348e677e48 FREDDI2.HE4
-a1a7f76f9de6b74031f4d6c9b8cbb130 FREDDI2.W32
-
-(freddi2 cd dutch)
-joostp
-???
-
-(freddi2 cd)
-vampir_raziel
-???
-
-(freddi2 cd russian updated)
-sev
-c:\Build\SRC\SPUTM\Src\SrcPWin\*.cpp
-c40f2b3cf5b82d34afc222779b3f0a7c FreddiCHSH.(a)
-b92b53d360319b1e0fa93d353503fbfd FreddiCHSH.exe
-e41de1c2a15abbcdbf9977e2d7e8a340 FreddiCHSH.he0
-83619bbe6b084ebf1ae53b5a56442719 FreddiCHSH.he2
-c366efa1e6b3d4406b5f3123c2247d8f FreddiCHSH.he4
-
-(freddi cd hfs/he classics hfs/pajama cd hfs/puttzoo cd hfs)
-khalek
-1997-10-28 17:16 Freddi Fish 2 Demo
-d7e1af5d819c98b2f0ec8150f54ad51f Freddi Fish 2 Demo
-fc8d197a22146e74766e9cb0cfcaf1da Freddi Fish 2 Demo (0)
-203cf83989f6410ec19edb9bd1455512 Freddi Fish 2 Demo (1)
-f96261232a8a7ae6bc7478d8c1c5a49c Freddi Fish 2 Demo (2)
-a97bf54bcae67fabb8d6e4a1e506efef Freddi Fish 2 Demo (4)
-
-(spyfox cd/pajama cd/puttzoo cd/he classics cd/pajama2 cd/freddi3 cd/baseball cd)
-khalek, sev, Joachim
-1996-10-17 03:54 ff2-demo.w32
-D:\Scummsrc.80\Sputm\*.c
-9d4373de9fd1c25671de1500dbe358a2 FF2-DEMO.EXE
-fc8d197a22146e74766e9cb0cfcaf1da FF2-DEMO.HE0
-203cf83989f6410ec19edb9bd1455512 FF2-DEMO.HE1
-f96261232a8a7ae6bc7478d8c1c5a49c FF2-DEMO.HE2
-a97bf54bcae67fabb8d6e4a1e506efef FF2-DEMO.HE4
-21935da87e116e29f558145b0c491770 FF2-DEMO.W32
-
-(freddi2 demo hfs)
-???
-
-(ftp)
-2002-06-05 15:23 ffhsdemo.exe
-khalek
-c:\Build\SRC\SPUTM\Src\*.cpp
-874613bc4b14dba444b43e31d843e622 ffhsdemo.exe
-d0a925e6d57938021ce5b1260731ec7d FFHSDemo.(a)
-d37c55388294b66e53e7ced3af88fa68 ffhsdemo.he0
-d0a925e6d57938021ce5b1260731ec7d ffhsdemo.he1
-7480dfa29b4df0002d23c72bb4932dde ffhsdemo.he2
-a97bf54bcae67fabb8d6e4a1e506efef ffhsdemo.he4
-
-(freddi3 cd hfs)
-Joachim
-560da18bc11f6cf7b068a96dd928ae7e Freddi Fish 3
-8368f552b1e3eba559f8d559bcc4cadb Freddi Fish 3 (0)
-89bba1d711672a8b52ac4a47ffcf442c Freddi Fish 3 (1)
-6e95640d43a66bdec5a9b9cd42921881 Freddi Fish 3 (2)
-47fed8094093a2d4d9f8d4f61d51e088 Freddi Fish 3 (4)
-d41d8cd98f00b204e9800998ecf8427e Freddi Fish 3 (r)
-
-(freddi3 cd)
-sev, Joachim
-D:\Scummsys.90\sputm.90\*.c
-c0c0934580cde95879bef0b6a5a49c29 FREDDI3.D32
-56e44f51bd02de77cb75737e45396987 FREDDI3.EXE
-8368f552b1e3eba559f8d559bcc4cadb FREDDI3.HE0
-89bba1d711672a8b52ac4a47ffcf442c FREDDI3.HE1
-6e95640d43a66bdec5a9b9cd42921881 FREDDI3.HE2
-47fed8094093a2d4d9f8d4f61d51e088 FREDDI3.HE4
-88d57485970d3e801364812c82dec001 FREDDI3.W32
-
-(freddi3 cd russian)
-sev
-D:\Scummsys.90\sputm.90\*.c
-8368f552b1e3eba559f8d559bcc4cadb FREDDI3.HE0
-28afc2494f8f5d45726409743c2763cc FREDDI3.HE1
-2be336eb6b1853c3493da984340dc80a FREDDI3.HE2
-211d598c446697f8203857d012d83d67 FREDDI3.HE4
-1f33f143fd76de496215eaa654a60f04 FREDDI3.W32
-
-(freddi3 cd hfs german)
-Joachim
-e228f3d94242920355d8ffc1f478ddb9 FreddiFGT
-83cedbe26aa8b58988e984e3d34cac8e FreddiFGT (0)
-a850841f6486fd5c8f1731f3092abfd0 FreddiFGT (2)
-3aab38ffaee61ada59211fa417231292 FreddiFGT (4)
-1c17cedc8593e0caebbae3ca61a8a78d FreddiFGT (a)
-01368f1a5c87746b09f50363696f5883 FreddiFGT (i)
-
-(freddi3 cd german)
-Joachim
-1c17cedc8593e0caebbae3ca61a8a78d FreddiFGT.(a)
-0fb226dcdd09aaa48dd77925c467d1cd FreddiFGT.D32
-045e9fab1078af432741aff53e6e438b FreddiFGT.exe
-83cedbe26aa8b58988e984e3d34cac8e FreddiFGT.HE0
-a850841f6486fd5c8f1731f3092abfd0 FreddiFGT.HE2
-3aab38ffaee61ada59211fa417231292 FreddiFGT.HE4
-d8fcf115eb08f1fbed13a61a23e37851 FreddiFGT.w32
-
-(freddi3 cd dutch)
-adutchguy
-???
-
-(freddi3 cd russian alt)
-sev
-D:\Scummsys.90\sputm.90\*.c
-898ce8eb1234a955ef75e87141902bb3 FREDDI3.HE0
-78f35e7aab370a3b4e828d317ecd7f27 FREDDI3.HE1
-ba7fe7de583c9b7a1e9173afc5d75b42 FREDDI3.HE2
-ef0df7bdc61977f783dbe1e37f6a15fe FREDDI3.HE4
-88d57485970d3e801364812c82dec001 FREDDI3.W32
-
-(freddi3 cd russian updated)
-sev
-d:\dev\SPUTM\Src\*.cpp
-b2b8622d2a1d954fedf526043fc185eb FreddiSCS.(a)
-75bff95816b84672b877d22a911ab811 FreddiSCS.he0
-39b5ea82513c799a6dba899b950c2977 FreddiSCS.he2
-fff20670a77450240918f8315fcfb33d FreddiSCS.HE4
-199a34d9dd51e79e2a5022c778321af8 freddiSCS.w32
-
-(freddi cd hfs/freddi3 cd hfs/pajama2 cd hfs)
-khalek, Joachim
-1997-12-04 18:25 F3-Mdemo
-e711a6fb0b7330782c6b5ae0e1283084 F3-Mdemo
-cb1559e8405d17a5a278a6b5ad9338d1 F3-Mdemo (0)
-a2fde75fcbd2376f057f4a40f9893cbe F3-Mdemo (1)
-30e3f97a2290f0683ccedf8b08a6ba55 F3-Mdemo (2)
-b90004518ba5bb4dc473170f5c975568 F3-Mdemo (4)
-d41d8cd98f00b204e9800998ecf8427e F3-Mdemo (r)
-
-(pajama2 cd/freddi3 cd/freddi cd)
-sev, Joachim
-D:\Scummsys.90\sputm.90\*.c
-c0c0934580cde95879bef0b6a5a49c29 F3-MDEMO.D32
-56e44f51bd02de77cb75737e45396987 F3-MDEMO.EXE
-cb1559e8405d17a5a278a6b5ad9338d1 F3-MDEMO.HE0
-a2fde75fcbd2376f057f4a40f9893cbe F3-MDEMO.HE1
-30e3f97a2290f0683ccedf8b08a6ba55 F3-MDEMO.HE2
-b90004518ba5bb4dc473170f5c975568 F3-MDEMO.HE4
-66ed086cf061ca023e5924147fc585be F3-MDEMO.W32
-
-(humongous ftp)
-1997-10-28 12:42 f3-mdemo.w32
-khalek, sev, Joachim
-D:\Scummsys.90\sputm.90\*.c
-c0c0934580cde95879bef0b6a5a49c29 F3-MDEMO.D32
-56e44f51bd02de77cb75737e45396987 F3-MDEMO.EXE
-cb1559e8405d17a5a278a6b5ad9338d1 F3-MDEMO.HE0
-a2fde75fcbd2376f057f4a40f9893cbe F3-MDEMO.HE1
-30e3f97a2290f0683ccedf8b08a6ba55 F3-MDEMO.HE2
-b90004518ba5bb4dc473170f5c975568 F3-MDEMO.HE4
-3ff95314abdeebe0b2d11f4417efa449 f3-mdemo.w32
-
-(puttrace cd/soccer cd)
-Joachim
-c0c0934580cde95879bef0b6a5a49c29 F3-MDEMO.D32
-3ff95314abdeebe0b2d11f4417efa449 F3-MDEMO.EXE
-cb1559e8405d17a5a278a6b5ad9338d1 F3-MDEMO.HE0
-a2fde75fcbd2376f057f4a40f9893cbe F3-MDEMO.HE1
-30e3f97a2290f0683ccedf8b08a6ba55 F3-MDEMO.HE2
-b90004518ba5bb4dc473170f5c975568 F3-MDEMO.HE4
-
-(freddi3 demo hfs french)
-kirben
-???
-
-(freddi3 demo french)
-kirben
-???
-
-(freddi3 demo dutch)
-adutchguy
-???
-
-(freddi4 cd hfs)
-Joachim
-382e75cc3252683c18ccb4b8a964b8bf Freddi 4
-4f580a021eee026f3b4589e17d130d78 Freddi 4 (0)
-944d9c81ce26f8820bbd2a6d2c2d987c Freddi 4 (2)
-d1c47dfa05160c783da89e6dc9894d3e Freddi 4 (4)
-d3cb0cbdd52b7684d321a3630bdf8abc Freddi 4 (a)
-d41d8cd98f00b204e9800998ecf8427e Freddi 4 (r)
-
-(freddi4 cd)
-Joachim
-d3cb0cbdd52b7684d321a3630bdf8abc FREDDI4.(A)
-ccca9a823d117afb1a882fd707586bf0 FREDDI4.D32
-dbde280a3b554db62f8f7920775cbed5 FREDDI4.EXE
-4f580a021eee026f3b4589e17d130d78 FREDDI4.HE0
-944d9c81ce26f8820bbd2a6d2c2d987c FREDDI4.HE2
-d1c47dfa05160c783da89e6dc9894d3e FREDDI4.HE4
-24b409ff575c52d385cdc6b7e91b5b79 FREDDI4.W32
-
-(freddi4 cd russian)
-sev
-D:\scummsys.98\sputm.98\*.c
-0fb24aa2d37a8a6cbf90066c2f792596 freddi4.(a)
-4f580a021eee026f3b4589e17d130d78 freddi4.he0
-02d4dba3fedc64e24c1baa9523035701 freddi4.he2
-a2e2010e75a1fd164ef6fc58eae7238d freddi4.he4
-24b409ff575c52d385cdc6b7e91b5b79 freddi4.w32
-
-(freddi4 cd dutch)
-adutchguy
-???
-
-(freddi4 cd german)
-Joachim
-25da2483b1d36a35c371393e907f57bf FreddiGS.(a)
-0fb226dcdd09aaa48dd77925c467d1cd FreddiGS.D32
-e9e4997d16bc12ec0d7048571c84023b FREDDIGS.EXE
-b5298a5c15ffbe8b381d51ea4e26d35c FreddiGS.HE0
-ee9720cc979cbad31193895c91e530f6 FreddiGS.HE2
-766c4f81601fe5fd69f6975c1dc51b98 FreddiGS.HE4
-25cb2425ded9b2e7557e8eb4dd7bb8d6 FreddiGS.w32
-
-
-(freddi4 cd russian updated}
-sev
-C:\HESystems\SPUTM\Src\*.cpp
-658d27fdb9219f5c62468314cf0007ff FreddiHRBG.(a)
-78bd5f036ea35a878b74e4f47941f784 FreddiHRBG.he0
-1d4023e93ffde7dae77426d293dab95b FreddiHRBG.he2
-ae8defe36ebe7d46f7b1796f3e95b139 FreddiHRBG.he4
-74b50dcbd98cd9bb3560be9a918c37db FreddiHRBG.w32
-
-(freddi4 russian alt)
-sev
-D:\scummsys.98\sputm.98\*.c
-41c340501caa1bf90cb0107679bf3e03 FREDDI4.(A)
-07b810e37be7489263f7bc7627d4765d FREDDI4.HE0
-b90be0993b688bfcdd361c55fd263ccc FREDDI4.HE2
-d1c47dfa05160c783da89e6dc9894d3e FREDDI4.HE4
-8da938ee682f5f83aa2d51789e9602f4 FREDDI4.W32
-
-(humongous ftp/pajama3 cd hfs/spyfox2 cd hfs/football cd hfs)
-Joachim
-8a61ffd683a01c2cddd9bb37e2fff119 Freddi 4 Demo
-7c2e76087027eeee9c8f8985f93a1cc5 Freddi 4 Demo (0)
-23632be3c8c4e77c3917148c5f8e56ef Freddi 4 Demo (2)
-0453fdf42a9aa750ed198bca1d9f8e91 Freddi 4 Demo (4)
-53b0e5c820bd264684df59231dbdc031 Freddi 4 Demo (a)
-d41d8cd98f00b204e9800998ecf8427e Freddi 4 Demo (r)
-
-(humongous ftp)
-1999-02-08 19:21 F4-demo.w32
-khalek, sev, Joachim
-D:\scummsys.98\sputm.98\*.c
-53b0e5c820bd264684df59231dbdc031 f4-demo.(a)
-ccca9a823d117afb1a882fd707586bf0 F4-demo.d32
-dbde280a3b554db62f8f7920775cbed5 F4-demo.exe
-7c2e76087027eeee9c8f8985f93a1cc5 f4-demo.HE0
-23632be3c8c4e77c3917148c5f8e56ef f4-demo.he2
-0453fdf42a9aa750ed198bca1d9f8e91 f4-demo.he4
-24b409ff575c52d385cdc6b7e91b5b79 F4-demo.w32
-
-(pajama3 cd/spyfox2 cd/football cd)
-Joachim
-53b0e5c820bd264684df59231dbdc031 f4-demo.(a)
-ccca9a823d117afb1a882fd707586bf0 F4-demo.d32
-24b409ff575c52d385cdc6b7e91b5b79 F4-demo.exe
-7c2e76087027eeee9c8f8985f93a1cc5 f4-demo.HE0
-23632be3c8c4e77c3917148c5f8e56ef f4-demo.he2
-0453fdf42a9aa750ed198bca1d9f8e91 f4-demo.he4
-
-(puttsfunshop cd hfs/puttcircus cd hfs/putttime cd hfs/spyozon cd hfs/freddicove cd hfs)
-Joachim
-7b08032b5e6ad870170e0d82d5786909 Freddi 4 Demo
-ebd324dcf06a4c49e1ba5c231eee1060 Freddi 4 Demo (0)
-23632be3c8c4e77c3917148c5f8e56ef Freddi 4 Demo (2)
-0453fdf42a9aa750ed198bca1d9f8e91 Freddi 4 Demo (4)
-0a5e8a6eb824c9e006dea982adf72d1e Freddi 4 Demo (a)
-d41d8cd98f00b204e9800998ecf8427e Freddi 4 Demo (i)
-
-
-(puttsfunshop cd/puttcircus cd/putttime cd/spyozon cd/freddicove cd/soccerMLS cd)
-sev, Joachim
-C:\Documents and Settings\stevej\My Documents\HECode\SPUTM\Src\*.cpp
-0a5e8a6eb824c9e006dea982adf72d1e f4-demo.(a)
-ccca9a823d117afb1a882fd707586bf0 f4-demo.D32
-20f57c3bf3f9fae1f88df9434bfd78e0 f4-demo.exe
-ebd324dcf06a4c49e1ba5c231eee1060 f4-demo.HE0
-23632be3c8c4e77c3917148c5f8e56ef f4-demo.he2
-0453fdf42a9aa750ed198bca1d9f8e91 f4-demo.he4
-
-(freddi4 demo hfs)
-???
-
-(dog cd)
-sev
-D:\scummsys.98\sputm.98\*.c
-bd6a0ac7c15562250349dd5b64709e92 F4-DEMO.(A)
-ccca9a823d117afb1a882fd707586bf0 F4-demo.d32
-24b409ff575c52d385cdc6b7e91b5b79 F4-demo.exe
-c25755b08a8d0d47695e05f1e2111bfc F4-DEMO.HE0
-23632be3c8c4e77c3917148c5f8e56ef F4-DEMO.HE2
-0453fdf42a9aa750ed198bca1d9f8e91 F4-DEMO.HE4
-
-(freddi4 demo hfs german)
-Joachim
-c089c75f6bc0f4a60c621a957043d279 Ff4demo
-688328c5bdc4c8ec4145688dfa077bf2 Ff4demo (0)
-3ad28b05239e4480644bea99d3804622 Ff4demo (2)
-0453fdf42a9aa750ed198bca1d9f8e91 Ff4demo (4)
-0eef3e0fca1f1ab0204982234be943a0 Ff4demo (a)
-d41d8cd98f00b204e9800998ecf8427e Ff4demo (i)
-
-(freddi4 demo german)
-Joachim
-0eef3e0fca1f1ab0204982234be943a0 Ff4demo.(a)
-2188b22aa1534b5248a8aa7dfa9c7861 Ff4demo.d32
-e179e35382bdc90601e01612c7a52ce8 FF4DEMO.EXE
-688328c5bdc4c8ec4145688dfa077bf2 Ff4demo.HE0
-3ad28b05239e4480644bea99d3804622 Ff4demo.HE2
-0453fdf42a9aa750ed198bca1d9f8e91 Ff4demo.he4
-
-(freddi4 demo dutch)
-joostp
-???
-
-(freddi4 demo dutch)
-adutchguy
-???
-
-(PuttTime CD UK release)
-eriktorbjorn
-d:\dev\SPUTM\Src\*.cpp
-a2bb4dbf44dbf26587c2c213064853a8 FF4DEMO.(A)
-cb52cbabfa8e91b76a0c6d76ded339c6 ff4demo.exe
-e03ed1474ec14de78359970e0457a820 FF4DEMO.HE0
-15c9746d2d612d2693ec7e509c4e9fb5 FF4DEMO.HE2
-9470cd17e5e301f33876477f14992f29 ff4demo.he4
-
-(Kellogg cereals pack)
-bc20db254834452db602728f90e9a6d4 FreddiMini.(a)
-d1286487c342ac81b28f3e1b90a2b7f3 FreddiMini.D32
-03d3b18ee3fd68114e2a687c871e38d5 FreddiMini.HE0
-cb52cbabfa8e91b76a0c6d76ded339c6 FreddiMini.exe
-38189191a5824dd54377f0dbd4779046 FreddiMini.he2
-9470cd17e5e301f33876477f14992f29 FreddiMini.he4
-
-
-(freddicove hfs cd)
-Joachim
-b8ae37c647509afe5a406cab82e8f789 FreddiCove
-590e6546aacd0d374b7f3a4f53013ab1 FreddiCove (0)
-52b33175cf8abfbadcafbd4702275e0d FreddiCove (2)
-a9f9f4a7ad25a3efda4626d4b6c80ffb FreddiCove (3)
-dfbd9adb0d406184383dd069a64c8757 FreddiCove (4)
-04ad937605bffa28fdf47693e61620cc FreddiCove (a)
-63082e55aefcec01986fdfda9c57e55a FreddiCove (i)
-
-(freddicove cd)
-Joachim
-C:\Spyfox3Sputm\Src\SrcPWin\*.cpp
-04ad937605bffa28fdf47693e61620cc freddicove.(a)
-b4c292854d70ff6cf89e20030630c5e0 freddicove.EXE
-590e6546aacd0d374b7f3a4f53013ab1 freddicove.HE0
-52b33175cf8abfbadcafbd4702275e0d freddicove.he2
-a9f9f4a7ad25a3efda4626d4b6c80ffb FreddiCove.he3
-dfbd9adb0d406184383dd069a64c8757 freddicove.he4
-213f75f25b1c92c1b401203440e2720e freddicove.w32
-
-(freddicove cd)
-sev
-C:\Spyfox3Sputm\Src\SrcPWin\*.cpp
-04ad937605bffa28fdf47693e61620cc FREDDICOVE.(A)
-b4c292854d70ff6cf89e20030630c5e0 FREDDICOVE.EXE
-590e6546aacd0d374b7f3a4f53013ab1 FREDDICOVE.HE0
-52b33175cf8abfbadcafbd4702275e0d FREDDICOVE.HE2
-a9f9f4a7ad25a3efda4626d4b6c80ffb FREDDICOVE.HE3
-dfbd9adb0d406184383dd069a64c8757 FREDDICOVE.HE4
-
-(freddicove cd russian)
-sev
-C:\Spyfox3Sputm\Src\SrcPWin\*.cpp
-04ad937605bffa28fdf47693e61620cc FREDDICOVE.(A)
-b4c292854d70ff6cf89e20030630c5e0 FREDDICOVE.EXE
-590e6546aacd0d374b7f3a4f53013ab1 FREDDICOVE.HE0
-62c6daba6da11b26e259e49c092cb08f FREDDICOVE.HE2
-a9f9f4a7ad25a3efda4626d4b6c80ffb FREDDICOVE.HE3
-dfbd9adb0d406184383dd069a64c8757 FREDDICOVE.HE4
-
-(freddicove cd dutch)
-adutchguy
-???
-
-(freddicove cd russian alt)
-sev
-C:\Spyfox3Sputm\Src\SrcPWin\*.cpp
-2cac27c79aebf9db05ed516783d950a6 freddicove.(a)
-21abe302e1b1e2b66d6f5c12e241ebfd freddicove.HE0
-52b33175cf8abfbadcafbd4702275e0d freddicove.he2
-a9f9f4a7ad25a3efda4626d4b6c80ffb FreddiCove.he3
-dfbd9adb0d406184383dd069a64c8757 freddicove.he4
-ca263c140b091bff2b31b1570e47aebe freddicove.w32
-
-(freddicove cd russian updated)
-sev
-C:\HE_dev\SPUTM\Src\*.cpp
-50211d918df60b69d78c03962a5b09ed FreddiCCC.(a)
-b3d5a75a35d165c5750ab84fdc6fd638 FreddiCCC.EXE
-4ce2d5b355964bbcb5e5ce73236ef868 FreddiCCC.HE0
-2890b42997816aae1bcaa618e77444bf FreddiCCC.he2
-2f238b51cfad1b8b5c179468a19aa29b FreddiCCC.he3
-29ef3472e3675c4a0e6ea440e0df4ffd FreddiCCC.he4
-
-(freddicove demo dutch)
-kirben, sev
-???
-
-(freddicove demo hfs)
-???
-
-(pajama4 cd)
-sev
-c:\SRC_RELEASE\SPUTM\Src\SrcPWin\*.cpp
-f1b5cd6bceb50f8296d7a8db6efb69ec FFCoveDemo.(a)
-e856bf226130de0d84bcaaa7ecfb5a3a FFCoveDemo.d32
-554762d1e011ade6cc29ab8024124017 FFCoveDemo.exe
-45082a5c9f42ba14dacfe1fdeeba819d FFCoveDemo.HE0
-0c8f5b94bee7ddcbe5d41abce1daf9e3 ffCoveDemo.he2
-af9375aa14e4d967801938ee355e1486 ffCoveDemo.he4
-912c159f4a0232ceaff2b6759b18fd2f ffCoveDemo.w32
-
-(super duper arcade 1 cd hfs)
-Joachim
-20b697227835007b68aaf078d19e239d Water Worries
-4ba37f835be11a59d969f90f272f575b Water Worries (0)
-e577863ba03c4c1001052e6c809bf66a Water Worries (1)
-9d4a6d9c383ab9b1d0a486a5bb6bfb34 Water Worries (2)
-3d5f7153500339e05815cfa9c3e9369e Water Worries (4)
-2856fa0e0e74484f9c55dc58b2e9203c Water Worries (7)
-
-(super duper arcade 1 cd)
-Joachim
-7a266bd72dc8ae9a4d1c209e49502c00 Water.a32
-9a8e77ece8ed9cfcadd214ad0efabcee water.exe
-4ba37f835be11a59d969f90f272f575b WATER.HE0
-e577863ba03c4c1001052e6c809bf66a WATER.HE1
-9d4a6d9c383ab9b1d0a486a5bb6bfb34 water.He2
-3d5f7153500339e05815cfa9c3e9369e water.he4
-2856fa0e0e74484f9c55dc58b2e9203c WATER.HE7
-
-
-(water cd hfs)
-Joachim
-2856fa0e0e74484f9c55dc58b2e9203c Water (7)
-91a8077251d21b9a060792f50df91cbc Water Worries
-f1b0e0d587b85052de5534a3847e68fe Water Worries (0)
-162e516eaea7f6635e0d09923ed819d2 Water Worries (2)
-3d5f7153500339e05815cfa9c3e9369e Water Worries (4)
-bc97954ab2fd772d67ed91d21cd67cfd Water Worries (A)
-e39e1837ed467d2e26fb57d9f14624ed Water Worries (i)
-d41d8cd98f00b204e9800998ecf8427e Water Worries (r)
-
-(water cd)
-Joachim
-bc97954ab2fd772d67ed91d21cd67cfd Water.(a)
-ccca9a823d117afb1a882fd707586bf0 Water.d32
-20902148fe2cdaaf73ad7fdf3663c01d Water.exe
-f1b0e0d587b85052de5534a3847e68fe Water.he0
-162e516eaea7f6635e0d09923ed819d2 Water.he2
-3d5f7153500339e05815cfa9c3e9369e Water.he4
-2856fa0e0e74484f9c55dc58b2e9203c Water.he7
-2eacfb93a578132a2194937dc4be7c85 WATER.w32
-
-
-(water cd russian)
-sev
-D:\scummsys\sputm80\*.c
-214d0ece69f444cc2ced3fd7bc0738dc Water.a32
-2012f854d83d9cc6f73b2b544cd8bbf8 WATER.HE0
-967f8921b88bebc81dc08cef276cdb3f WATER.HE1
-243bedd4215ec0640df55a35394b6778 water.He2
-3d5f7153500339e05815cfa9c3e9369e WATER.HE4
-2856fa0e0e74484f9c55dc58b2e9203c WATER.HE7
-
-(water cd russian updated)
-sev
-D:\scummsys\sputm80\*.c
-c2e40b953f90ed35926a958cc8cb6a52 WATER.HE2
-3d5f7153500339e05815cfa9c3e9369e WATER.HE4
-2856fa0e0e74484f9c55dc58b2e9203c WATER.HE7
-0be4193477036d3b1c57b5aaa0f4a709 WATER.W32
-6271130f440066830eca9056c1d7926f water.he0
-96a30e55cb95fc0611e4353637d6e5a7 water.he1
-
-(maze cd hfs)
-Kirben
-???
-
-(maze cd)
-Kirben
-???
-
-(super duper arcade 2 cd hfs)
-Kirben, Joachim
-20d2fe8f124bd4224c52f4a545995895 Maze Madness
-4f04b321a95d4315ce6d65f8e1dd0368 Maze Madness (0)
-4efc960a9e16764ad3cdaa64ee79f4f7 Maze Madness (1)
-86e4d05f086ab253e41eea36f9953b7b Maze Madness (2)
-818620a54fe0232fa17d6df1c3e547aa Maze Madness (4)
-40175d873ed23efa26dd49e3e108e943 Maze Madness (8)
-
-
-(super duper arcade 2 cd)
-Kirben, Joachim
-6b201406803dfce87682febb6d99c155 maze.a32
-0c80dbb40c4edb8c9c93f7cebc34f4ab MAZE.EXE
-4f04b321a95d4315ce6d65f8e1dd0368 maze.HE0
-4efc960a9e16764ad3cdaa64ee79f4f7 maze.HE1
-86e4d05f086ab253e41eea36f9953b7b maze.he2
-818620a54fe0232fa17d6df1c3e547aa maze.he4
-40175d873ed23efa26dd49e3e108e943 maze.he8
-
-(freddisfunshop cd hfs)
-Joachim
-430d3ede85344fe8ca75f8b446be8a53 Freddi's FunShop
-16542a7342a918bfe4ba512007d36c47 Freddi's FunShop (0)
-ac8faff875fd9e47328c0ad6dacc1326 Freddi's FunShop (2)
-db2ef7f3fdce0c5aa8932138636ab63b Freddi's FunShop (4)
-895b6746ab176b3ba3e70afa3ce6588b Freddi's FunShop (a)
-7a7b1e2d7b17c616c300ea736276f8e4 Freddi's FunShop (b)
-de6b13747c34a629162dd257cc4f0866 Freddi's FunShop (i)
-2d4bcfe0a03f44876182664b303f2bf7 Freddi's FunShop (u)
-
-(freddisfunshop cd)
-Joachim
-895b6746ab176b3ba3e70afa3ce6588b FreddisFunShop.(a)
-7a7b1e2d7b17c616c300ea736276f8e4 FreddisFunShop.(b)
-ccca9a823d117afb1a882fd707586bf0 FreddisFunShop.d32
-4bb50266471b1955d423d40fc716ecbf FreddisFunShop.exe
-16542a7342a918bfe4ba512007d36c47 FreddisFunShop.HE0
-ac8faff875fd9e47328c0ad6dacc1326 FreddisFunShop.he2
-db2ef7f3fdce0c5aa8932138636ab63b FreddisFunShop.he4
-d82da74cd5b040fdbee2330c85006810 FreddisFunShop.map
-39c468587c4bdad304be49e8d4041a22 FreddisFunShop.u32
-1f102a306b108951c86d0ea9f849935c FreddisFunShop.w32
-a38b59ccd74792e348b57e6f07ce2ccc FreddisFunShop.x32
-
-(puttputt cd/puttmoon cd/fbear cd)
-khalek, sev, Joachim
-7.0.0 (Feb 8 1995 16:33:26)
-d4d3dd3b039a5c0ecfae502064b5b2de CATALOG.EXE
-11e6e244078ff09b0f3832e35420e0a7 CATALOG.HE0
-0cb65eb736529221b9269b15a7fd1914 CATALOG.HE1
-c0e6ea1d47493cca09fc674c3d097836 CATALOG.HE2
-c0e6ea1d47493cca09fc674c3d097836 CATALOG.HE3
-1978944e3e597362d3f4f13606ab2264 CATALOG.W32
-
-(farm cd/airport cd/jungle cd/airport hfs/jungle hfs)
-khalek, sev, Joachim
-7.0.0 (Jun 22 1995 14:01:50)
-698d32c4dd2cca76918710665a8c3e6c CATALOG2.EXE
-037385a953789190298494d92b89b3d0 CATALOG2.HE0
-d43e75c3e71f3668727f436b4c777334 CATALOG2.HE1
-c0e6ea1d47493cca09fc674c3d097836 CATALOG2.HE2
-c0e6ea1d47493cca09fc674c3d097836 CATALOG2.HE3
-d33843ac942167d564ae5682e2b381c3 CATALOG2.W32
-
-(airport cd hfs)
-Joachim
-df6c3ad8f24c73b153e1d1fe1f011f5b The AirPort
-d6334a5a9b61afe18c368540fdf522ca The AirPort (0)
-e51ba2794c8fbe267b3cc9cf5f511ea9 The AirPort (1)
-0d20f6a921a35ed907a875e26e050b9c The AirPort (2)
-45348231d5da1aaa87e65ca170956eee The AirPort (4)
-cb6ef7b42f7804834a731826567d4212 The AirPort (7)
-765492059d83bc0ae8c30a4feef50a6a The AirPort (9)
-
-(trips collection cd/airport cd/airport cd hfs)
-sev, Joachim
-7.0.0 (Jul 1 1995 21:55:39)
-d031299fa80f81b7348ed57665aea617 AIRPORT.EXE
-07433205acdca3bc553d0e731588b35f AIRPORT.HE0
-1a40631092357a0a2fb63ed881a83730 AIRPORT.HE1
-0d20f6a921a35ed907a875e26e050b9c AIRPORT.HE2
-c0e6ea1d47493cca09fc674c3d097836 AIRPORT.HE3
-45348231d5da1aaa87e65ca170956eee AIRPORT.HE4
-cb6ef7b42f7804834a731826567d4212 AIRPORT.HE7
-765492059d83bc0ae8c30a4feef50a6a AIRPORT.HE9
-3c45181f2f31b7d67932295d0f2bafcb AIRPORT.W32
-
-(farm cd hfs/freddi cd hfs/he classics hfs/chase hfs/baseball hfs/pajama2 hfs/freddi3 hfs/socks hfs/thinker1 hfs/thinkerk hfs/jungle hfs)
-khalek, Joachim (comment: checked all MD5s, there is only 1 Mac-Demo-Version for sure)
-1995-09-14 17:20 Airport Demo
-af4f7ee28b83c0ba471459a779a34043 Airport Demo
-7ea2da67ebabea4ac20cee9f4f9d2934 Airport Demo (0)
-608f6b919b663642be7104c14440434f Airport Demo (1)
-858db51aa87dd51df99c00c0bab31d65 Airport Demo (2)
-42161ad979949daf67924b5227b94f2d Airport Demo (4)
-765492059d83bc0ae8c30a4feef50a6a Airport Demo (9)
-
-(puttputt cd/fbear cd/puttmoon cd/)
-khalek, sev, Joachim
-7.0.0 (Feb 8 1995 16:33:47)
-009e6924ae0913e7728e9a7f70f5a9db AIRDEMO.EXE
-86c9902b7bec1a17926d4dae85beaa45 AIRDEMO.HE0
-e5ce3f8cddd5d54aaf2b040c831dcc96 AIRDEMO.HE1
-858db51aa87dd51df99c00c0bab31d65 AIRDEMO.HE2
-c0e6ea1d47493cca09fc674c3d097836 AIRDEMO.HE3
-42161ad979949daf67924b5227b94f2d AIRDEMO.HE4
-765492059d83bc0ae8c30a4feef50a6a AIRDEMO.HE9
-a16fc5d8c29efffb65f84f3a42b154f1 AIRDEMO.W32
-
-(spyfox cd/pajama cd/puttzoo cd/he classics cd/freddi2 cd/baseball cd/thinker1 cd/thinkerk cd/socks cd/)
-khalek, sev, Joachim
-7.0.0 (Jul 5 1995 14:46:05)
-371f3abc95359eff033e6ef47c27190b AIRDEMO.EXE
-e144f5f49d9241d2a9dee2576b3d09cb AIRDEMO.HE0
-855ecd2da58317064d2e01263d6ca493 AIRDEMO.HE1
-858db51aa87dd51df99c00c0bab31d65 AIRDEMO.HE2
-c0e6ea1d47493cca09fc674c3d097836 AIRDEMO.HE3
-42161ad979949daf67924b5227b94f2d AIRDEMO.HE4
-765492059d83bc0ae8c30a4feef50a6a AIRDEMO.HE9
-a5459bfe36183cf1f4ced00fe325aa90 AIRDEMO.W32
-
-(farm cd/airport cd/airport hfs/jungle cd/jungle hfs/)
-khalek, sev, Joachim
-7.0.0 (Jun 22 1995 14:06:25)
-371f3abc95359eff033e6ef47c27190b AIRDEMO.EXE
-8ffd618a776a4c0d8922bb28b09f8ce8 AIRDEMO.HE0
-64fb30a7c26d119216cdadaff1b4e1bd AIRDEMO.HE1
-858db51aa87dd51df99c00c0bab31d65 AIRDEMO.HE2
-c0e6ea1d47493cca09fc674c3d097836 AIRDEMO.HE3
-42161ad979949daf67924b5227b94f2d AIRDEMO.HE4
-765492059d83bc0ae8c30a4feef50a6a AIRDEMO.HE9
-3d43af3f3ecc18744dda721d951e2a2f AIRDEMO.W32
-
-(freddi cd/pajama2 cd/freddi3 cd/chase cd)
-khalek, sev, Joachim
-7.0.0 (Jul 5 1995 14:46:05)
-371f3abc95359eff033e6ef47c27190b AIRDEMO.EXE
-8ffd618a776a4c0d8922bb28b09f8ce8 AIRDEMO.HE0
-64fb30a7c26d119216cdadaff1b4e1bd AIRDEMO.HE1
-858db51aa87dd51df99c00c0bab31d65 AIRDEMO.HE2
-c0e6ea1d47493cca09fc674c3d097836 AIRDEMO.HE3
-42161ad979949daf67924b5227b94f2d AIRDEMO.HE4
-765492059d83bc0ae8c30a4feef50a6a AIRDEMO.HE9
-a5459bfe36183cf1f4ced00fe325aa90 AIRDEMO.W32
-
-(farm cd hfs)
-khalek
-1995-09-16 14:11 The Farm
-f4f88abc0635e80a4fc8c605ce9d0db3 The Farm
-fbbbb38a81fc9d6a61d509278390a290 The Farm (0)
-3941f75ccb280e7c73890833f2a09514 The Farm (1)
-e778f5f5bbc457966f6ac90ec8f3d9ee The Farm (2)
-449029f90e778a4504de146ca9d0963b The Farm (4)
-3d29c1d665dcb4e4b036dfc7752b990b The Farm (9)
-
-(farm cd/trips collection cd)
-khalek, sev
-7.0.0 (Jun 11 1996 19:12:56)
-a85856675429fe88051744f755b72f93 farm.he0
-3e1111db20b879a482814b4a06122672 farm.he1
-e778f5f5bbc457966f6ac90ec8f3d9ee farm.he2
-c0e6ea1d47493cca09fc674c3d097836 farm.he3
-449029f90e778a4504de146ca9d0963b farm.he4
-3d29c1d665dcb4e4b036dfc7752b990b farm.he9
-fa49452f871e506a6930cc8697db6181 farm.w32
-
-(airport hfs)
-Joachim
-19a57595f7d2367286058a41241e574a Farm Demo
-39fd6db10d0222d817025c4d3346e3b4 Farm Demo (0)
-ba3cb50770848a91216565b91edf8579 Farm Demo (1)
-706d44b32f7c74e98ff4fe88d625826d Farm Demo (2)
-ad6a4dea7b696a28b99d40ea1d685788 Farm Demo (4)
-
-(farm demo dutch)
-adutchguy
-???
-
-(farm cd/pajama cd/airport cd/jungle cd/airport hfs/jungle hfs)
-khalek, sev, Joachim
-7.0.0 (Jun 22 1995 14:05:27)
-2e698fdcf17be7de5c70e9a66d6e8fc0 FARMDEMO.EXE
-8d479e36f35e80257dfc102cf4b8a912 FARMDEMO.HE0
-4d4cb9fdb5a0f3b651bbf0f80735cbe2 FARMDEMO.HE1
-706d44b32f7c74e98ff4fe88d625826d FARMDEMO.HE2
-c0e6ea1d47493cca09fc674c3d097836 FARMDEMO.HE3
-ad6a4dea7b696a28b99d40ea1d685788 FARMDEMO.HE4
-daca65342b60a86a8ba5fbbd5d8b71d4 FARMDEMO.W32
-
-(puttputt cd/puttmoon cd/fbear cd)
-khalek, sev, Joachim
-7.0.0 (Oct 13 1994 19:15:16)
-1b6b66d63a7e80edde33a9b2f57011ba FARMDEMO.EXE
-bf8b52fdd9a69c67f34e8e9fec72661c FARMDEMO.HE0
-6f5d57f1fdc449424792d840a9c85acc FARMDEMO.HE1
-706d44b32f7c74e98ff4fe88d625826d FARMDEMO.HE2
-1c26d0c926e9c31d1b77c0611a643dc9 FARMDEMO.HE3
-cdadbf8daf9c8f811dac28d348ff8825 FARMDEMO.W32
-
-(jungle hfs)
-Joachim
-0e896300a0af8bd43f82d57a9da6a525 The Jungle
-659942b9a6b519f123a13cca3c333a13 The Jungle (0)
-0212155e5de27230b4ce5e36fb910945 The Jungle (1)
-9a5bf899124f45288749d81a0918907a The Jungle (2)
-222ad352670c1d94366a8511af846f49 The Jungle (4)
-f80c48c622ba21d46fc518630f324cf7 The Jungle (9)
-
-
-(trips collection cd/jungle cd)
-sev, joachim
-7.0.0 (Oct 5 1995 08:20:42)
-11994b691574b2ecea7043a80a908647 JUNGLE.EXE
-8801fb4a1200b347f7a38523339526dd JUNGLE.HE0
-1b39261e8d7e7384cf47fe9a6fa808d8 JUNGLE.HE1
-9a5bf899124f45288749d81a0918907a JUNGLE.HE2
-c0e6ea1d47493cca09fc674c3d097836 JUNGLE.HE3
-222ad352670c1d94366a8511af846f49 JUNGLE.HE4
-f80c48c622ba21d46fc518630f324cf7 JUNGLE.HE9
-d8561c70fe52082eace566fe038995f7 JUNGLE.W32
-
-(pajama cd hfs)
-Kirben
-???
-
-(pajama cd)
-Kirben
-???
-
-(pajama cd hfs)
-khalek
-1996-09-12 20:55 Pajama Sam
-57fab7dc46bb7d9450970d95cf14e8fc Pajama Sam
-672dec94b82f7f0877ebb5b5cf7f4bc1 Pajama Sam (0)
-2e83592ae635f53d1cc94c3d98da6335 Pajama Sam (1)
-048a2cb8baad19ca90a4510783ab032b Pajama Sam (2)
-147be86929b5969224c72edac30896fd Pajama Sam (4)
-2546d42491fa61ac8e2d20d68d264fce Pajama Sam (7)
-
-(pajama cd)
-khalek, sev
-1996-09-14 00:28 pajama.w32
-D:\Scummsrc.80\Sputm\*.c
-672dec94b82f7f0877ebb5b5cf7f4bc1 pajama.he0
-2e83592ae635f53d1cc94c3d98da6335 pajama.he1
-048a2cb8baad19ca90a4510783ab032b pajama.he2
-4417ea03a6d1b0b7522526f41d1097f6 pajama.he3
-147be86929b5969224c72edac30896fd pajama.he4
-2546d42491fa61ac8e2d20d68d264fce pajama.he7
-8e0e6d39728cc6a87b32f5e71f602b20 pajama.w32
-
-(pajama cd dutch)
-joostp
-???
-
-(pajama cd)
-Joachim
-1e5baa49222b0f6a6cb671bf6cb208d8 Pajama.(a)
-ccca9a823d117afb1a882fd707586bf0 pajama.d32
-8f18bc14ff62d55d20cb3a9dc2ac1451 Pajama.exe
-898eaa21f79cf8d4f08db856244689ff Pajama.HE0
-4dc07befa5e311abd787a2580c91a12d Pajama.he2
-f81b518a579d83c8d4d1911a365ea982 Pajama.he3
-147be86929b5969224c72edac30896fd Pajama.he4
-2546d42491fa61ac8e2d20d68d264fce Pajama.he7
-2c0273605aecaf223287da677679e42a pajama.w32
-
-(freddi cd hfs/he classics hfs/puttzoo cd hfs)
-khalek
-1997-10-28 17:16 Pajama Sam Demo
-3b032e02ccbc5d65c7397cfb32f65f1d Pajama Sam Demo
-f237bf8a5ef9af78b2a6a4f3901da341 Pajama Sam Demo (0)
-5c12305ff68ed053daba74a700a56ad2 Pajama Sam Demo (1)
-4ccd03ca710a9053c42292cae09a6471 Pajama Sam Demo (2)
-6e0fdfcf13e37b659b7155cf5969965f Pajama Sam Demo (4)
-
-(spyfox cd/puttzoo cd/he classics cd/pajama2 cd/freddi cd/freddi2 cd/freddi3 cd/baseball cd)
-khalek, sev, Joachim
-1996-10-31 22:34 pjs-demo.w32
-D:\Scummsrc.80\Sputm\*.c
-11875252dea74302ea77f8adeaf9c2e9 PJS-DEMO.EXE
-f237bf8a5ef9af78b2a6a4f3901da341 PJS-DEMO.HE0
-5c12305ff68ed053daba74a700a56ad2 PJS-DEMO.HE1
-4ccd03ca710a9053c42292cae09a6471 PJS-DEMO.HE2
-6e0fdfcf13e37b659b7155cf5969965f PJS-DEMO.HE4
-0c7e0d0ef005f289e9ca06bbbf5e8839 PJS-DEMO.W32
-
-(pajama demo hfs)
-khalek
-???
-
-(ftp)
-2002-05-20 15:11 PjSamDemo.exe
-khalek, sev
-c:\Build\SRC\SPUTM\Src\SrcPWin\*.cpp
-1f5564cba5d070703c85fe8eda1f6236 PjSamDemo.(a)
-2c380ca1224d0c83a9de178546028cb5 PjSamDemo.exe
-d7ab7cd6105546016e6a0d46fb36b964 PjSamDemo.he0
-5207295bb0b0e0b3f71b7593dd7c3a81 PjSamDemo.he2
-6e0fdfcf13e37b659b7155cf5969965f PjSamDemo.he4
-
-(pajama demo hfs french)
-Kirben
-???
-
-(pajama demo french)
-Kirben
-???
-
-(pajama demo dutch)
-adutchguy
-???
-
-(pajama2 cd hfs)
-Joachim
-b921d8279b5a3aa567c669b83d89e489 Pajama Sam 2
-d4e79c3d8645b8266cd78c325bc35154 Pajama Sam 2 (0)
-cf1e7394ae00c0c65fa5af486e752e5c Pajama Sam 2 (1)
-53f95adc8f6727d26e3248fb1bad8180 Pajama Sam 2 (2)
-297787a960f2b591bb98add9b0689e9f Pajama Sam 2 (4)
-d41d8cd98f00b204e9800998ecf8427e Pajama Sam 2 (r)
-
-(pajama2 cd)
-sev, Joachim
-D:\scummsys.95\sputm.95\*.cpp
-ccca9a823d117afb1a882fd707586bf0 PAJAMA2.D32
-1830278a7bef7d5800ba02f816dbe373 PAJAMA2.EXE
-d4e79c3d8645b8266cd78c325bc35154 PAJAMA2.HE0
-cf1e7394ae00c0c65fa5af486e752e5c PAJAMA2.HE1
-53f95adc8f6727d26e3248fb1bad8180 PAJAMA2.HE2
-297787a960f2b591bb98add9b0689e9f PAJAMA2.HE4
-44a282944b6392ad883a48fc03f37146 PAJAMA2.W32
-58dfc09f344a9dec565bb914920800d3 PAJAMA2.X32
-
-(pajama2 cd hfs german)
-Joachim
-7ba80800b1302376b3a3d4d26d42aa50 PyjamaDBMN
-c6907d44f1166941d982864cd42cdc89 PyjamaDBMN (0)
-b4ecb33716598531823dc2a971a762f1 PyjamaDBMN (2)
-297787a960f2b591bb98add9b0689e9f PyjamaDBMN (4)
-55f4e9402bec2bded383843123f37c5c PyjamaDBMN (a)
-01368f1a5c87746b09f50363696f5883 PyjamaDBMN (i)
-
-(pajama2 cd german)
-Joachim
-55f4e9402bec2bded383843123f37c5c PyjamaDBMN.(a)
-b27cc88bc13451e9334fbf1d5f3c9c52 PyjamaDBMN.D32
-cecafac67b1f299b6f1c326bc58ba50f PyjamaDBMN.EXE
-c6907d44f1166941d982864cd42cdc89 PyjamaDBMN.HE0
-b4ecb33716598531823dc2a971a762f1 PyjamaDBMN.HE2
-297787a960f2b591bb98add9b0689e9f PyjamaDBMN.HE4
-b27bf7501668c7244baf779a947b585c PyjamaDBMN.w32
-
-(pajama2 cd russian updated)
-sev
-d:\dev\SPUTM\Src\*.cpp
-486b48e4ae421cdbecfcc1431c7e801f PajamaTAL.(a)
-738be524db140dc1c7fd6ddfab647c0b PajamaTAL.exe
-32709cbeeb3044b34129950860a83f14 PajamaTAL.he0
-f71fe00306d8246bd5f7ee99703aaaff PajamaTAL.he2
-297787a960f2b591bb98add9b0689e9f PajamaTAL.he4
-
-(pajama2 demo dutch hfs)
-Kirben
-???
-
-(pajama2 demo dutch)
-Kirben
-???
-
-(freddi2 cd hfs/freddi4 cd hfs/pajama3 cd hfs/puttrace cd hfs/putttime cd hfs/puttzoo cd hfs/spyfox cd hfs/superarcade1 cd hfs/superarcade2 cd hfs/water cd hfs/football cd hfs/soccer cd hfs)
-sev, Joachim
-01bae6f21e5c42b6a776efd57f363eb1 PJ2Demo
-36a6750e03fb505fc19fc2bf3e4dbe91 PJ2Demo (0)
-6b1f2b0359d146fda362f1b81892fc76 PJ2Demo (1)
-0c8b86610f358f9a6b45cdd45cb70a58 PJ2Demo (2)
-0f28e36711b55cc139921ddaaff6b341 PJ2Demo (4)
-d41d8cd98f00b204e9800998ecf8427e PJ2Demo (r)
-
-(freddi2 cd/freddi4 cd/pajama3 cd/puttrace cd/putttime cd/puttzoo cd/spyfox cd/superarcade1 cd/superarcade2 cd/water cd/football cd/soccer cd )
-Joachim
-ccca9a823d117afb1a882fd707586bf0 PJ2DEMO.D32
-44a282944b6392ad883a48fc03f37146 PJ2DEMO.EXE
-36a6750e03fb505fc19fc2bf3e4dbe91 PJ2DEMO.HE0
-6b1f2b0359d146fda362f1b81892fc76 PJ2DEMO.HE1
-0c8b86610f358f9a6b45cdd45cb70a58 PJ2DEMO.HE2
-0f28e36711b55cc139921ddaaff6b341 PJ2DEMO.HE4
-58dfc09f344a9dec565bb914920800d3 PJ2DEMO.X32
-
-
-(ftp/puttrace cd/dog cd/spyfox2 cd/putttime cd/football cd/soccer cd)
-1998-05-09 20:27 PJ2DEMO.W32
-khalek
-D:\scummsys.95\sputm.95\*.c
-36a6750e03fb505fc19fc2bf3e4dbe91 PJ2DEMO.HE0
-6b1f2b0359d146fda362f1b81892fc76 PJ2DEMO.HE1
-0c8b86610f358f9a6b45cdd45cb70a58 PJ2DEMO.HE2
-0f28e36711b55cc139921ddaaff6b341 PJ2DEMO.HE4
-44a282944b6392ad883a48fc03f37146 PJ2DEMO.W32
-
-(pajama3 cd hfs)
-Joachim
-0b642feb91da52a174e192a082fcc70f Pajama Sam 3
-f7711f9264d4d43c2a1518ec7c10a607 Pajama Sam 3 (0)
-978c86a8313b66d3b254c3b43e034460 Pajama Sam 3 (2)
-87938c64ef72195231d58fec4f5add88 Pajama Sam 3 (4)
-f7b0ad01b6a78bcd3854edd0ee9694df Pajama Sam 3 (a)
-5a40804b409c888525b04361a907dd39 Pajama Sam 3 (i)
-
-(pajama3 cd)
-sev, Joachim
-C:\Dev\Project\SPUTM\Src\*.cpp
-f7b0ad01b6a78bcd3854edd0ee9694df PAJAMA3.(A)
-ccca9a823d117afb1a882fd707586bf0 Pajama3.d32
-aaf2001f4d7120fccac9123278cb0db2 Pajama3.exe
-f7711f9264d4d43c2a1518ec7c10a607 PAJAMA3.HE0
-978c86a8313b66d3b254c3b43e034460 PAJAMA3.HE2
-87938c64ef72195231d58fec4f5add88 PAJAMA3.HE4
-7c4127882d847866cafd474b914da595 Pajama3.w32
-
-(pajama3 cd hfs german)
-Joachim
-d47b3fa7fbb331d83b4cdcf6effc88d6 PyjamaSkS
-2e8a1f76ea33bc5e04347646feee173d PyjamaSKS (0)
-2d9d0e25c050cc1d30d78d5d2c475178 PyjamaSKS (2)
-435437659b3c647c5a223e143e219846 PyjamaSKS (4)
-3694b1ef70da192f3c19cd24638ec79b PyjamaSKS (a)
-d41d8cd98f00b204e9800998ecf8427e PyjamaSkS (i)
-
-
-(pajama3 cd german)
-Joachim
-3694b1ef70da192f3c19cd24638ec79b PyjamaSKS.(a)
-c8538fa7fbb9c1b09bc4b833e04ce0dd PyjamaSKS.d32
-24efc2c233d1dfcf32e75c877e7640c0 PyjamaSKS.exe
-2e8a1f76ea33bc5e04347646feee173d PyjamaSKS.HE0
-2d9d0e25c050cc1d30d78d5d2c475178 PyjamaSKS.he2
-435437659b3c647c5a223e143e219846 PyjamaSKS.he4
-88084b7b68f19dc5ded4dc5a5a8c3c76 PyjamaSKS.w32
-
-(pajama3 cd russian)
-sev
-C:\HESystems\SPUTM\Src\SrcPWin\*.cpp
-20176076d708bf14407bcc9bdcd7a418 UKPajamaEAT.he0
-6c0b2725387fe0b0bc7bfe043714492b UKPajamaEAT.(a)
-eea6df70b4930c0d9e2ea69a1a193fc5 UKpajamaEAT.he2
-a7f5e841f72a72c0dec10d7d9fd74a51 UKpajamaEAT.HE4
-
-(pajama3 demo hfs dutch)
-joostp
-???
-
-(pajama3 demo dutch)
-joostp
-???
-
-(puttcircus cd hfs/spyozon cd hfsfreddicove cd hfs)
-Joachim
-e221e2a53e9726ecb9bc422ed7650d42 Pajama Sam 3-Demo
-a9f2f04b1ecaab9495b59befffe9bf88 Pajama Sam 3-Demo (0)
-057190fd8706c51c6e6657a8eb8f6898 Pajama Sam 3-Demo (2)
-d5b1d81d25d3d4850184fdb0ab627bea Pajama Sam 3-Demo (4)
-e305c20b5d26d7084f035be22617d8a8 Pajama Sam 3-Demo (a)
-d41d8cd98f00b204e9800998ecf8427e Pajama Sam 3-Demo (i)
-
-(puttcircus cd/spyozon cd/freddicove cd/soccerMLS cd)
-sev, Joachim
-e305c20b5d26d7084f035be22617d8a8 pj3-demo.(a)
-ccca9a823d117afb1a882fd707586bf0 pj3-demo.D32
-7c4127882d847866cafd474b914da595 pj3-demo.exe
-a9f2f04b1ecaab9495b59befffe9bf88 pj3-demo.HE0
-057190fd8706c51c6e6657a8eb8f6898 pj3-demo.he2
-d5b1d81d25d3d4850184fdb0ab627bea pj3-demo.he4
-
-(freddi3 cd hfs german/pajama2 cd hfs german/putttime cd hfs german/spyfox cd hfs german)
-Joachim
-37c439a53e3b0426f8e1a57e56e1f9eb PJ3Demo
-0c45eb4baff0c12c3d9dfa889c8070ab PJ3Demo (0)
-5989dc5d4fecf651db4d5f497ee36d0d PJ3Demo (2)
-44cef52dfec87a2dcccda97f3ac6b2cd PJ3Demo (4)
-e04352df925c102041c6e954bc86d71c PJ3Demo (a)
-d41d8cd98f00b204e9800998ecf8427e PJ3Demo (i)
-
-(freddi3 cd german/pajama2 cd german/putttime cd german/spyfox cd german)
-Joachim
-e04352df925c102041c6e954bc86d71c Gpj3demo.(a)
-2188b22aa1534b5248a8aa7dfa9c7861 GPJ3Demo.d32
-45d9f75902265d1ecbfbf5ff37a7bc70 GPJ3Demo.exe
-0c45eb4baff0c12c3d9dfa889c8070ab Gpj3demo.HE0
-5989dc5d4fecf651db4d5f497ee36d0d GPJ3Demo.HE2
-44cef52dfec87a2dcccda97f3ac6b2cd GPJ3Demo.HE4
-
-(puttsfunshop cd hfs/freddisfunshop cd hfs/samsfunshop cd hfs)
-Joachim
-e221e2a53e9726ecb9bc422ed7650d42 Pajama Sam 3-Demo
-a654fb60c3b67d6317a7894ffd9f25c5 Pajama Sam 3-Demo (0)
-057190fd8706c51c6e6657a8eb8f6898 Pajama Sam 3-Demo (2)
-d5b1d81d25d3d4850184fdb0ab627bea Pajama Sam 3-Demo (4)
-795bb07d00d8628631e767d2c23fba56 Pajama Sam 3-Demo (a)
-d41d8cd98f00b204e9800998ecf8427e Pajama Sam 3-Demo (i)
-
-(puttsfunshop cd/freddisfunshop cd/samsfunshop cd)
-sev, Joachim
-C:\Dev\Project\SPUTM\Src\*.cpp
-795bb07d00d8628631e767d2c23fba56 pj3-demo.(a)
-ccca9a823d117afb1a882fd707586bf0 pj3-demo.D32
-7c4127882d847866cafd474b914da595 pj3-demo.exe
-a654fb60c3b67d6317a7894ffd9f25c5 pj3-demo.HE0
-057190fd8706c51c6e6657a8eb8f6898 pj3-demo.he2
-d5b1d81d25d3d4850184fdb0ab627bea pj3-demo.he4
-
-2002-10-19 11:37 pj3-demo.w32
-khalek
-C:\Dev\Project\SPUTM\Src\*.cpp
-a2fe82b76e0e3db5d8e2f44ec9772548 pj3-demo.(a)
-cf90b4db5486ef798db78fe6fbf897e5 pj3-demo.he0
-e923a8f282ad6900b24beb562894661f pj3-demo.he2
-d5b1d81d25d3d4850184fdb0ab627bea pj3-demo.he4
-7c4127882d847866cafd474b914da595 pj3-demo.w32
-
-(PuttPutt CD UK release)
-eriktorbjorn
-d:\dev\SPUTM\Src\*.cpp
-5b0f71b2503688d8783f4cc37c302666 PJ3DEMO.(A)
-2702b7fad34607adea8e8a7b6adb1202 pj3demo.exe
-3e48298920fab9b7aec5a971e1bd1fab PJ3DEMO.HE0
-22df1316d6594bc5c70442874079c46d Pj3Demo.he2
-0794110b085ee91c2aa4a5fc844ff2f4 Pj3Demo.he4
-
-(pjgames cd hfs)
-Kirben
-???
-
-(pjgames cd)
-Kirben
-???
-
-(lost cd hfs)
-Kirben
-???
-
-(lost cd)
-Kirben
-???
-
-(superarcade2 cd hfs)
-Kirben, Joachim
-deb9d0989a2ffa00f77c06360b4e4794 Lost and Found
-ed361270102e355afe5236954216aba2 Lost and Found (0)
-2f1636bf18a437092f7e3de9614c7c49 Lost and Found (2)
-e0499c7a9aad75122c902934aaa98b62 Lost and Found (a)
-d41d8cd98f00b204e9800998ecf8427e Lost and Found (r)
-
-
-(superarcade2 cd)
-Kirben, Joachim
-e0499c7a9aad75122c902934aaa98b62 lost.(a)
-4a4564b8bdd8b3c004f2f84bf5e7fc85 lost.a32
-ccca9a823d117afb1a882fd707586bf0 lost.d32
-9d01495e4f8b34e4aefb1e29adcdd37f LOST.EXE
-ed361270102e355afe5236954216aba2 lost.HE0
-2f1636bf18a437092f7e3de9614c7c49 lost.he2
-
-(lost demo)
-1999-07-08 08:46 SMALLER.EXE
-khalek
-D:\(vss)scummsys.99\SPUTM\Src\SrcPWin\*.cpp
-070702d4a191580455acee3d38d5ca9e smaller.(a)
-7d2b945c2afb05a370da690c36b22bdd SMALLER.EXE
-a2bb6aa0537402c1b3c2ea899ccef64b SMALLER.HE0
-7fe73db8981467a6d0abdd92105f8618 data/world-1/levels/level-10.ot1
-b988a3d95f638bb342135d9bd04e0137 data/world-1/levels/level-10.ot2
-ce60d91581be1cde2d0619a85647b1a9 data/world-1/levels/level-11.ot1
-8cd6dea0b18593c8d1aaa12daff10cc7 data/world-1/levels/level-11.ot2
-7bfa53f7aa0b06372472b7fa475254cb data/world-1/levels/level-12.ot1
-ad2e8c62013a1aee64e3af638d7fac3a data/world-1/levels/level-12.ot2
-0dda1de323c63baa645863259937cfaa data/world-1/levels/level-13.ot1
-0832514ef1b2206b119054e838003241 data/world-1/levels/level-13.ot2
-08b28bfae2169083bdaf2635faf75213 data/world-1/levels/level-14.ot1
-510121696a26e6410766d3d414a4a1ed data/world-1/levels/level-14.ot2
-459027319d6db400bbb60acd37dd31a0 data/world-1/levels/level-15.ot1
-7c73fcd8abcb837bbcb72457eb71da44 data/world-1/levels/level-15.ot2
-ec75f20929d3ab9ad7b68b650e55b713 data/world-1/levels/level-16.ot1
-f90cd5c12b9dc3777b3371460bb6da1f data/world-1/levels/level-16.ot2
-085feba2672c7dc41570726e098d0d02 data/world-1/levels/level-17.ot1
-4a85080de411c54dcfd42b9929e1c0c3 data/world-1/levels/level-17.ot2
-37dacba43a2407c31d8a69dd302991a7 data/world-1/levels/level-18.ot1
-0dbc99bedd086e11dcf78794e1a21d50 data/world-1/levels/level-18.ot2
-67d9d144436e57215212bf65c6665395 data/world-1/levels/level-19.ot1
-679c0c4cdb9781ca9fe73d1f4314fc50 data/world-1/levels/level-19.ot2
-c60abc377414f72a16341901c4895b41 data/world-1/levels/level-1.ot1
-b69f642322a618c2c122e40f9533dd86 data/world-1/levels/level-1.ot2
-93de8918e2d6d35d04f21f067203b8f7 data/world-1/levels/level-20.ot1
-f5da057f3408613b5b8ed0bcd876833f data/world-1/levels/level-20.ot2
-8b175a1cb5722fccd2c649ff15e85e39 data/world-1/levels/level-2.ot1
-f958fbf2de135bcfdffd9e8d0cbfcaa4 data/world-1/levels/level-2.ot2
-453569e6100e194b2e40e52ea13a1747 data/world-1/levels/level-3.ot1
-388bb8ae5805a87ec6a9af5ffef67b65 data/world-1/levels/level-3.ot2
-a6719d4797937bc1501015d8ba02faf3 data/world-1/levels/level-4.ot1
-69946a0c1fded7a1cd1fd7e5da5bc716 data/world-1/levels/level-4.ot2
-170121ca31f889039771cf76a01fd60b data/world-1/levels/level-5.ot1
-9cd61c833f3342b881c280dd7c746db8 data/world-1/levels/level-5.ot2
-cfe953b525b530f144ba322f8969e9b8 data/world-1/levels/level-6.ot1
-650563fd608cc5f6418a20bdb3e3f6eb data/world-1/levels/level-6.ot2
-dd1d60970ff90ffe00f6a201b125ddd1 data/world-1/levels/level-7.ot1
-e5598a32e874f7451581c2fcc8118e8a data/world-1/levels/level-7.ot2
-8d9b7d1e209aa6103b5440d098e005ee data/world-1/levels/level-8.ot1
-f69c2ce78a6f2a70bf43f0cf665ac075 data/world-1/levels/level-8.ot2
-049b95a44520347dabf1d14b1cd9b9f4 data/world-1/levels/level-9.ot1
-b6087413d0aac4078203a1ef5fd88cb8 data/world-1/levels/level-9.ot2
-
-(samsfunshop cd hfs)
-Joachim
-b4673b59ed60b26fda077c43993102ab Sam's FunShop
-68155a6bf082221525f431c2cbdac8ab Sam's FunShop (0)
-2e44235ef224b25ce766eab34ecc0ab5 Sam's FunShop (2)
-c13b823a4f12d20a22f01acdc89102dc Sam's FunShop (4)
-35202bb9a0fa8fa23bbc3c9b606ad6b6 Sam's FunShop (a)
-eebac1d5bf74832aae8031c47c699197 Sam's FunShop (b)
-78d5350b0d208be368e1169c6f53728b Sam's FunShop (i)
-2d4bcfe0a03f44876182664b303f2bf7 Sam's FunShop (u)
-
-(samsfunshop cd)
-Joachim
-35202bb9a0fa8fa23bbc3c9b606ad6b6 SamsFunShop.(a)
-eebac1d5bf74832aae8031c47c699197 SamsFunShop.(b)
-ccca9a823d117afb1a882fd707586bf0 SamsFunShop.d32
-486422eba1f7ca37c6314ad13e00a041 SamsFunShop.exe
-68155a6bf082221525f431c2cbdac8ab SamsFunShop.HE0
-2e44235ef224b25ce766eab34ecc0ab5 SamsFunShop.he2
-c13b823a4f12d20a22f01acdc89102dc SAMSFUNSHOP.HE4
-e03725ba7069e7a94c28168b70dc99c4 SamsFunShop.r32
-39c468587c4bdad304be49e8d4041a22 SamsFunShop.u32
-591674119a23295aede9ced62642498a SamsFunShop.w32
-a38b59ccd74792e348b57e6f07ce2ccc SamsFunShop.x32
-
-(sock cd hfs/superarcade1 cd hfs)
-Joachim
-8351724df7b6141c57596a70f71261d1 SockWorks
-5e8fb66971a60e523e5afbc4c129c0e8 SockWorks (0)
-a8ae3fedb8ff53e798d22e495929812f SockWorks (1)
-70c23a4651349e957ac8996275fe66f3 SockWorks (2)
-14a5574aeae3187bbb71ce7f4a1b803b SockWorks (4)
-c137e6e5d636c13df8ccb108523640cc SockWorks (7)
-
-(sock cd)
-Joachim
-6e076d748dd4726d1d7a230cfdb13dec SOCKS.D32
-be18099a608458fb63bc996a86195a73 SOCKS.DLL
-d82c48a90176dafb1f344f13a0cefb60 SOCKS.EXE
-5e8fb66971a60e523e5afbc4c129c0e8 SOCKS.HE0
-a8ae3fedb8ff53e798d22e495929812f SOCKS.HE1
-70c23a4651349e957ac8996275fe66f3 SOCKS.HE2
-14a5574aeae3187bbb71ce7f4a1b803b SOCKS.HE4
-c137e6e5d636c13df8ccb108523640cc SOCKS.HE7
-619755f82f852d94f252add9bbc73a61 SOCKS.W32
-
-(superarcade1 cd)
-Joachim
-619755f82f852d94f252add9bbc73a61 Socks.a32
-6e076d748dd4726d1d7a230cfdb13dec socks.d32
-be18099a608458fb63bc996a86195a73 SOCKS.DLL
-aa2b672c687c4cda492e3d9ceb7486eb socks.exe
-5e8fb66971a60e523e5afbc4c129c0e8 SOCKS.HE0
-a8ae3fedb8ff53e798d22e495929812f SOCKS.HE1
-70c23a4651349e957ac8996275fe66f3 SOCKS.HE2
-14a5574aeae3187bbb71ce7f4a1b803b SOCKS.HE4
-c137e6e5d636c13df8ccb108523640cc SOCKS.HE7
-
-(socks cd russian)
-sev
-D:\scummsys.80\sputm80\*.c
-19263586f749a560c1adf8b3393a9593 SOCKS.HE0
-d4bc7dd56e22720c96ecf96bd68fbecd SOCKS.HE1
-5b1e928ecb604dba17e41fb739218a49 SOCKS.HE2
-14a5574aeae3187bbb71ce7f4a1b803b SOCKS.HE4
-c137e6e5d636c13df8ccb108523640cc SOCKS.HE7
-65b08876afc8c55b8dbb2022fb1b6a95 Socks.a32
-
-
-<----END OF WORK TODAY---->
-
-(puttrace cd hfs)
-Joachim
-???
-
-(puttrace cd)
-sev
-D:\scummsys.98\sputm.98\*.c
-ef68d6670cce33d4300468d0b76b3894 puttrace.(a)
-e56b14495c0075850c900ca0999f90f4 puttrace.(b)
-7ded875e14d324f610a4fde12de2d407 PUTTRACE.A32
-981e1e1891f2be7e25a01f50ae55a5af PUTTRACE.HE0
-1bb81a151d72f56b81b43b55b1de63e4 PUTTRACE.HE2
-3f368bd19438204b34db7d7ff8e5395d PUTTRACE.HE4
-
-(puttrace cd russian)
-sev
-C:\HESystems\SPUTM\Src\*.cpp
-cde08c76ce62dcb6081a3fb7dfd2bc89 UKPuttRace.(a)
-e348fe80ca1a40a30bd57ff9d08812c0 UKPuttRace.(b)
-62050da376483d8edcbd98cd26b6cb57 UKPuttRace.he0
-fdd32528084cd48078bb073ead02d2a9 UKPuttRace.he2
-4dfdf4303fa6769535eba7fed539002e UKPuttRace.he4
-91c0bc455b81e7e556646db1dacd461f UKPuttRace.w32
-
-(puttrace cd russian alt) ALL IN MD5
-sev
-D:\scummsys.98\sputm.98\*.c
-fe0cbe12588be2c8e509603821566a87 Puttrace.(a)
-e56b14495c0075850c900ca0999f90f4 Puttrace.(b)
-86821f1e71e2a2d679da7827485fdab1 PUTTRACE.A32
-981e1e1891f2be7e25a01f50ae55a5af PUTTRACE.HE0
-544b59d0b904a745033e1850c07a8b5f Puttrace.he2
-5d930459fd1827eaa9df846a20757932 Puttrace.he4
-
-(puttrace cd hfs german)
-Joachim
-???
-
-(puttrace cd german)
-Joachim
-???
-
-(puttrace demo hfs dutch)
-Kirben
-???
-
-(puttrace demo dutch)
-Kirben
-???
-
-(puttrace demo hfs dutch)
-joostp
-???
-
-(puttrace demo dutch)
-joostp
-???
-
-(puttrace demo hfs)
-sev
-???
-
-(pajama3 cd/putt dog cd/spyfox2 cd/puttcircus cd/putttime cd/football cd)
-sev
-D:\scummsys.98\sputm.98\*.c
-36590dcf019a0fa78de77354cf4db342 RACEDEMO.(A)
-7ded875e14d324f610a4fde12de2d407 RACEDEMO.A32
-8e1d77b06c92662ef5128b087f84f229 racedemo.exe
-0ac41e2e3d2174e5a042a6b565328dba RACEDEMO.HE0
-07e92dfae14eb6ef3afc6d40ba98fcd2 RACEDEMO.HE2
-e80168dc9bfca4577b4e2bbdd70db60b RACEDEMO.HE4
-
-2002-05-07 02:53 RACEDEMO.W32
-khalek
-D:\scummsys.98\sputm.98\*.c
-36590dcf019a0fa78de77354cf4db342 RACEDEMO.(A)
-0ac41e2e3d2174e5a042a6b565328dba RACEDEMO.HE0
-07e92dfae14eb6ef3afc6d40ba98fcd2 RACEDEMO.HE2
-e80168dc9bfca4577b4e2bbdd70db60b RACEDEMO.HE4
-a030210d465ed001953df89e3df1e558 RACEDEMO.W32
-
-(puttrace demo hfs german)
-Joachim
-???
-
-(puttrace demo german)
-Joachim
-???
-
-(PuttPutt CD UK release)
-eriktorbjorn
-d:\dev\SPUTM\Src\*.cpp
-cb6041f10fbaaa5e491aa8d14fc26dc0 RACEDEMO.(A)
-3616b3bf5877b2fb50ce33c705f15413 racedemo.exe
-7c8100e360e8ef05f88069d4cfa0afd1 RACEDEMO.HE0
-095795832ad8a4323bbfa6c137b691bb RACEDEMO.HE4
-177f4e5579e0279700c2b6b7f4f4ba71 RaceDemo.he2
-
-(puttmoon 3do)
-sev
-???
-
-(he classics cd)
-khalek, sev
-6.1.1 (Nov 4 1993 11:12:57)
-19113cc2ecc1dc24c70c46ae015abd78 PUTTMOON.BRS
-c6adfe1876ac936ff19546f0cd1e2b5b PUTTMOON.EXE
-780e4a0ae2ff17dc296f4a79543b44f8 PUTTMOON.HE0
-f02f36270d684e0c245d0fd0519b5e7b PUTTMOON.HE1
-bfecc91f0bf7b86acd7f82a3dfb53ca5 PUTTMOON.TLK
-
-(puttmoon cd russian)
-sev
-6.1.1 (Nov 4 1993 11:12:57)
-c6adfe1876ac936ff19546f0cd1e2b5b PUTTMOON.EXE
-780e4a0ae2ff17dc296f4a79543b44f8 PUTTMOON.HE0
-6a9457c786a8dcf8d2da8a2ec0123343 PUTTMOON.HE1
-c57a7faf7416d9da11919d0957332574 PUTTMOON.SG0
-3d6deb9406a3357764d11623ed6e48ee PUTTMOON.SG1
-1927fb2e7954326152630cb0f56158f8 PUTTMOON.TLK
-
-(puttmoon cd russian alt)
-sev
-6.1.1 (Nov 4 1993 11:12:57)
-c6adfe1876ac936ff19546f0cd1e2b5b PUTTMOON.EXE
-780e4a0ae2ff17dc296f4a79543b44f8 PUTTMOON.HE0
-2de9f712c62fab29507298c9f69591ec PUTTMOON.HE1
-c57a7faf7416d9da11919d0957332574 PUTTMOON.SG0
-3d6deb9406a3357764d11623ed6e48ee PUTTMOON.SG1
-3a35a45c5634203c72b9f2083e0d5717 PUTTMOON.TLK
-
-(puttmoon cd hebrew)
-sev
-???
-
-(he classics cd hfs)
-khalek
-9dc02577bf50d4cfaf3de3fbac06fbe2 Putt-Putt Moon 0
-e4e07a2763824a7646e11b6d9ad795c8 Putt-Putt Moon 1
-bfecc91f0bf7b86acd7f82a3dfb53ca5 Putt-Putt Moon 2
-19113cc2ecc1dc24c70c46ae015abd78 PUTTMOON.BRS
-
-(he classics cd)
-khalek, sev
-7.0.0 (Feb 7 1995 13:27:20)
-19113cc2ecc1dc24c70c46ae015abd78 PUTTMOON.BRS
-9c92eeaf517a31b7221ec2546ab669fd PUTTMOON.HE0
-cfe6d4059c4c5edb9f9f2351efb32a7b PUTTMOON.HE1
-965c113b3978682530e121ba8af7419b PUTTMOON.HE2
-58dfc09f344a9dec565bb914920800d3 PUTTMOON.HE3
-05d387396aabba20e7e3b8778bc0cf09 PUTTMOON.HE4
-56c8455570af6106931818e19344b46a PUTTMOON.W32
-
-6.1.1 (Sep 29 1993 17:18:45)
-khalek
-ef2d93dd02bcdabc7a1a59101e31f8be MOONDEMO.EXE
-aa6a91b7f6f119d1b7b1f2a4c9e24d59 MOONDEMO.HE0
-086b6835bbb924109a31e50f0b5c9e9a MOONDEMO.HE1
-0d06e43d5b5460375575a74d15d6bf07 MOONDEMO.TLK
-
-(puttmoon demo hfs)
-khalek
-???
-
-(puttputt cd/he classics cd)
-khalek, sev
-7.0.0 (Feb 7 1995 13:27:20)
-9c143c5905055d5df7a0f014ab379aee moondemo.he0
-ec82bd61eff3218216fb145004d2b005 moondemo.he1
-0d06e43d5b5460375575a74d15d6bf07 moondemo.he2
-7cf09a515cb499890e3faeab3a2aa491 moondemo.he3
-c182763838b5d06581cc9fb1c1bb1cfd moondemo.he4
-56c8455570af6106931818e19344b46a moondemo.w32
-
-(puttcircus cd hfs)
-sev
-???
-
-(puttcircus cd)
-sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-2efc1faef85c78dbfe91d46fcc26a3ec puttcircus.(a)
-ab0693e9324cfcf498fdcbb12acf8bb4 puttcircus.HE0
-320a3bca28c8c30ad7aeff74f24ced2e puttcircus.he2
-9c01311b009b0b1b65735beb51eb526a puttcircus.HE4
-d0552089e0c2bbf75969643e8dc30ef1 PUTTCIRCUS.w32
-
-(puttcircus cd hfs russian)
-sev
-???
-
-(puttcircus cd russian)
-sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-0deaf09aff8db115b7da47272955f206 puttcircus.(a)
-7bad72e332a59f9fcc1d437f4edad32a puttcircus.he0
-9ef7154db4ba00b89b5424ffd5cfce26 puttcircus.he2
-e902d67046bfb7cb09c9148b4462f297 puttcircus.he4
-f22635a81cf4abb712704990b7d9d597 PUTTCIRCUS.w32
-
-(puttcircus demo hfs)
-sev
-???
-
-(puttsfunshop cd/freddicove cd/soccerMLS cd)
-sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-d78d1eff392096c83687231fe2e78c6b circdemo.(a)
-ccca9a823d117afb1a882fd707586bf0 circdemo.D32
-79c9cf9572d32b2c587226f32b1ab946 circdemo.exe
-a7cacad9c40c4dc9e1812abf6c8af9d5 circdemo.HE0
-14b7f2b5180be87991338ea1017421be circdemo.he2
-860b38ff47ba90e910025ac8c6e9a823 circdemo.he4
-
-(puttputt 3do cd)
-khalek
-c817613033ceb12eb4c31ea6c336808f BREEZY.DMU
-fa14bc146cc6086ab44c906a320699c9 CALLIOPE.DMU
-67f93260bf6519d9a47fe987f46d286b CARWASH.DMU
-60fe949efb311eb660c1516fcc20edd2 CONGA.DMU
-667d5c394b63381f309d8c85085748d8 GASTASHN.DMU
-ed39e74166eb60b6d93ab5a26790dcac GROCER2.DMU
-a06560553d188e1dc5886c7633ee602a HAPPY.DMU
-01fd3afbc1b0f8b6e01a18232181cc39 HONEYBEE.DMU
-6bedd1f644ff35d55f2dd4e818f662ed MARSEILL.DMU
-ba59b9918a11a3f366719bb6dbb02426 MICE.DMU
-3031ecf1f94e9712ec9e2d192af5adaa MISCHIEF.DMU
-5b45f41c5e02ea737f64b8fb306346fa MONKEYS.DMU
-6beb885fb7fae9a4dc0a7b66b8e31e27 PAINTING.DMU
-725518498492603428a4b481a74f0ecd PARADE.DMU
-9d166dc6e1e55f78bfac5ede2e9c2daa PAUSE.CEL
-1748c190e7df232fabe70130f6636c9f PERFORM.CEL
-cbcf447cb91de76b6d034d41601bd148 PLAYFUL.DMU
-d8051a79de027921c27d08a67fb5fc09 POPWEASL.DMU
-8296845e881ba14f6c3e76e51220896c PUPPY.DMU
-7e151c17adf624f1966c8fc5827c95e9 PUTTPUTT.HE0
-3c985277e56fda01c1ef3d6da6817fd2 PUTTPUTT.HE1
-46f5aae1faea566f0e21b34572563e40 PUTTPUTT.TLK
-e4978c237ab8b7eb7820048a90a3161e PUTTSONG.DMU
-79e68c29627a5ba3514b87edacb57232 SHORTOCK.DMU
-87ffadb9e4d62e60fa2f8b16b672677a STARTUP.CEL
-d9b9d645a4f7949f127b32eb152e343b SUNNYDAY.DMU
-66d7b0f5c5b9bf0cf57a96b7fa457569 TICKTOCK.DMU
-b274a80fde5aaf92123972a4f3aabaa9 TOYSHOP.DMU
-cefbc7824935e5377bf25b3e461effdd WADDLE.DMU
-8f4c6d28938fb3a532d6038ebaadf234 WAITING.DMU
-a7914691959037a5a4f25fc5a6a138d2 WALTZ.DMU
-3caac70fd907c450ad8f4cd2d75ab576 WANDRING.DMU
-cf7150acba9df96c16a9e20d2345941d WHISTLIN.DMU
-
-(puttputt patch)
-khalek
-6.1.1 (Nov 20 1993 12:42:10)
-868b739deaf9319825137e5e55d4aee1 PUTTPUTT.EXE
-
-(puttputt cd/he classics cd)
-khalek, sev
-6.1.1 (Jan 18 1994 09:32:55)
-7564ee82886b8c75b3b1bd895c98fcb4 puttputt.exe
-9708cf716ed8bcc9ff3fcfc69413b746 puttputt.he0
-d109f3215ca2d5cd38c2efd83da5a51c puttputt.he1
-5f5a783f29c3da080d3bddbef0e2f01d puttputt.tlk
-
-(puttputt cd hebrew)
-sev
-???
-
-(puttputt cd russian)
-sev
-6.1.1 (Nov 19 1992 17:56:19)
-0b3222aaa7efcf283eb621e0cefd26cc PUTTPUTT.HE0
-64b5aee54f2b1453100b2040e1d778ef PUTTPUTT.HE1
-a4e799011c8320dffef43db7869b839a PUTTPUTT.TLK
-
-(puttputt cd russian alt)
-sev
-6.1.1 (Nov 19 1992 17:56:19)
-68ca57feaa198976c87f4a69f1e9a958 PUTTPUTT.EXE
-0b3222aaa7efcf283eb621e0cefd26cc PUTTPUTT.HE0
-64b5aee54f2b1453100b2040e1d778ef PUTTPUTT.HE1
-32453797af20693a00ccbe4dfa6db54f PUTTPUTT.TLK
-
-(he classics cd hfs)
-khalek
-684732efb5799c0f78804c99d8de9aba Putt-Putt Parade 0
-dc086db2e995aff8b2336147ccbd75d6 Putt-Putt Parade 1
-5f5a783f29c3da080d3bddbef0e2f01d Putt-Putt Parade 2
-
-(puttputt cd/he classics cd)
-khalek, sev
-7.0.0 (Feb 7 1995 13:26:59)
-6a30a07f353a75cdc602db27d73e1b42 puttputt.he0
-ce76be89bcace9527f457cab9d8231a6 puttputt.he1
-328b11537db07809864d8b2f536d07ae puttputt.he2
-58dfc09f344a9dec565bb914920800d3 puttputt.he3
-6cb903fb3d4d726fe0229affb1d22525 puttputt.he4
-71e615a8493f357e4de824a1e4632a80 puttputt.w32
-
-6.1.1 (Mar 9 1993 21:19:14)
-khalek
-57cbe80e524afa5330a77d04316d2bf6 puttdemo.exe
-31aa57f460a3d12429f0552a46a90b39 puttdemo.he0
-282a5503b45ddc15c7fb83c8e911b091 puttdemo.he1
-a49e0880f7c0638fbf7adf88894da3df puttdemo.tlk
-
-(puttputt demo hfs)
-khalek
-???
-
-(puttputt cd/he classics cd)
-khalek, sev
-7.0.0 (Feb 7 1995 13:26:59)
-37ff1b308999c4cca7319edfcc1280a0 puttdemo.he0
-9be0197fa0dac01ca3d72cf060826045 puttdemo.he1
-a49e0880f7c0638fbf7adf88894da3df puttdemo.he2
-58dfc09f344a9dec565bb914920800d3 puttdemo.he3
-cd26452706d7e66a3f4ba13975fe5c68 puttdemo.he4
-71e615a8493f357e4de824a1e4632a80 puttdemo.w32
-
-(puttzoo cd hfs)
-cyx
-???
-
-(puttzoo cd)
-cyx
-???
-
-(puttzoo cd hfs)
-khalek
-1995-09-14 17:11 Putt-Putt Saves the Zoo
-2f328b89b4404eaefb9bd18045dddd06 Putt-Putt Saves the Zoo
-58fdf4c7ad13540a734e18f8584cad89 Putt-Putt Saves the Zoo (0)
-8cffc74555fed521cc2008ed6a119118 Putt-Putt Saves the Zoo (1)
-225991e6f8d3d6ac5e519413392c34f3 Putt-Putt Saves the Zoo (2)
-d3235443d88751acd3412c1b0c6cec35 Putt-Putt Saves the Zoo (4)
-
-(puttzoo cd dutch)
-joostp
-???
-
-########## There is 9.8 version of puttzoo, Kirben has it
-(puttzoo cd)
-khalek
-7.0.0 (Jul 13 1995 18:45:07)
-1005456bfe351c1b679e1ff2dc2849e9 puttzoo.he0
-1399aaabdfc340203ac63aff57abf8a0 puttzoo.he1
-225991e6f8d3d6ac5e519413392c34f3 puttzoo.he2
-4417ea03a6d1b0b7522526f41d1097f6 puttzoo.he3
-d3235443d88751acd3412c1b0c6cec35 puttzoo.he4
-f6cc3beae345e71055efb143a342983c puttzoo.w32
-
-(puttzoo russian) (Comment: ALL LANGUAGES)
-sev
-7.0.0 (Jul 13 1995 18:45:07)
-1005456bfe351c1b679e1ff2dc2849e9 PUTTZOO.HE0
-1399aaabdfc340203ac63aff57abf8a0 PUTTZOO.HE1
-d03846ce20bab80288af295bb66870a3 PUTTZOO.HE2
-4417ea03a6d1b0b7522526f41d1097f6 PUTTZOO.HE3
-d3235443d88751acd3412c1b0c6cec35 PUTTZOO.HE4
-91903ca0f67564d78d229afa479b0b02 PUTTZOO.W32
-
-(he classics hfs/pajama cd hfs/farm cd hfs)
-khalek
-1996-11-17 13:28 Puttzoo Demo
-34727db5bde5a2f78a1ec84f75d0810c Puttzoo Demo
-3486ede0f904789267d4bcc5537a46d4 Puttzoo Demo (0)
-e0cde64b0c37a188c97a0bc93225cce9 Puttzoo Demo (1)
-a0cd041eb6c1a289a23549ef8740ff17 Puttzoo Demo (2)
-86dc7e6f520dbabe79b324ae64456686 Puttzoo Demo (4)
-
-(puttzoo demo hfs)
-Joachim
-???
-
-(ftp)
-sev
-7.0.0 (Jul 5 1995 14:45:19)
-f3d55aea441e260e9e9c7d2a187097e0 zoodemo.he0
-92722a557c952ff5178eb32964a12061 zoodemo.he1
-a0cd041eb6c1a289a23549ef8740ff17 zoodemo.he2
-47539950e6e6f656db4c1cc963bf9a8f zoodemo.he3
-86dc7e6f520dbabe79b324ae64456686 zoodemo.he4
-d30c3ce43992a116be1a28a4edccf597 zoodemo.w32
-
-(spyfox cd/pajama cd/he classics cd/freddi2 cd/baseball cd)
-khalek
-7.0.0 (Jun 4 1995 15:47:12)
-de4efb910210736813c9a1185384bace zoodemo.he0
-8ad56037c37b1c84efc2fa00bf4c59d5 zoodemo.he1
-c9b8363220ea094d2da8cc24635d8d48 zoodemo.he2
-47539950e6e6f656db4c1cc963bf9a8f zoodemo.he3
-86dc7e6f520dbabe79b324ae64456686 zoodemo.he4
-f3324cfe3dec0288fd38197cf88962af zoodemo.w32
-
-(farm cd/pajama cd)
-khalek, sev
-7.0.0 (Jun 22 1995 14:03:05)
-de4efb910210736813c9a1185384bace zoodemo.he0
-8ad56037c37b1c84efc2fa00bf4c59d5 zoodemo.he1
-c9b8363220ea094d2da8cc24635d8d48 zoodemo.he2
-47539950e6e6f656db4c1cc963bf9a8f zoodemo.he3
-86dc7e6f520dbabe79b324ae64456686 zoodemo.he4
-37e4b9463ead881fd53bf401aa62d0bf zoodemo.w32
-
-(puttzoo demo hfs german)
-Joachim
-???
-
-(putttime cd hfs)
-Kirben
-???
-
-(putttime cd)
-Kirben
-???
-
-(putttime cd hfs)
-sev
-???
-
-(putttime cd)
-sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-833cb49dd6767dc7722d671a4067ab5a PuttTime.(a)
-2108d83dcf09f8adb4bc524669c8cf51 PuttTime.he0
-802147789449535e375c7c4f2e666b96 PuttTime.he2
-15d5f719ebc6bcd4fe674587a8fa8596 PuttTime.he4
-a30dd1cd2b58b2c5c6eb1aa970f5a3c2 PuttTime.w32
-
-(putttime cd hfs german)
-Joachim
-???
-
-(putttime cd german)
-Joachim
-???
-
-(putttime cd dutch)
-adutchguy
-???
-
-(putttime cd)
-iziku
-???
-
-(putttime cd UK Release)
-eriktorbjorn
-d:\dev\SPUTM\Src\*.cpp
-6ea0c0e68384e588ece7e3e110c62b09 puttputtTTT.(a)
-d4aac997e2f4e15341f0bfbf905419bd puttputtTTT.HE0
-79e5273f8626f6b1448788bc0a279049 PuttPuttTTT.HE2
-7a0d96204f8874e4eda4918f63ca7b4e PuttPuttTTT.HE4
-a75403b5e853d7cc65cde2ec358ca5ba puttputtTTT.w32
-
-(putttime cd german)
-oncer
-???
-
-(putttime cd russian)
-sev
-d:\dev\SPUTM\Src\SAVELOAD.cpp
-4a7452aabc69cdaf897ccc099ff0bafa puttputtTTT.(a)
-defb8cb9ec4b0f91acfb6b61c6129ad9 puttputtTTT.he0
-5247f60e3913296860a74eef4bdfad2a PuttPuttTTT.he2
-a4816cbb60fa01f16295ab46868e7c41 PuttPuttTTT.he4
-947ce44f2336f8467ceadb184dbaa3e9 puttputtTTT.w32
-
-(freddi cd hfs)
-khalek
-1997-12-09 19:59 TimeDemo
-f2ece54cc9ca9621217c71cfd1ea594e TimeDemo
-4e5867848ee61bc30d157e2c94eee9b4 TimeDemo (0)
-5c58da43055710e93cfedd45bb14b03c TimeDemo (1)
-42df84a2b73a3d2ee461b89474ee2f57 TimeDemo (2)
-72339e5cf3f2902ad78e58c05bfcf7bb TimeDemo (4)
-d41d8cd98f00b204e9800998ecf8427e TimeDemo (r)
-
-(pajama2 cd/puttrace cd/soccer cd)
-sev
-D:\Scummsys.90\sputm.90\*.c
-c0c0934580cde95879bef0b6a5a49c29 timedemo.d32
-4e5867848ee61bc30d157e2c94eee9b4 timedemo.he0
-5c58da43055710e93cfedd45bb14b03c timedemo.he1
-42df84a2b73a3d2ee461b89474ee2f57 timedemo.he2
-72339e5cf3f2902ad78e58c05bfcf7bb timedemo.he4
-4c33312418b27bfe8ad307a6e14604e9 timedemo.w32
-
-(ftp/freddi3 cd)
-sev
-D:\Scummsys.90\sputm.90\*.c
-c0c0934580cde95879bef0b6a5a49c29 TIMEDEMO.D32
-4e5867848ee61bc30d157e2c94eee9b4 TIMEDEMO.HE0
-5c58da43055710e93cfedd45bb14b03c TIMEDEMO.HE1
-42df84a2b73a3d2ee461b89474ee2f57 TIMEDEMO.HE2
-72339e5cf3f2902ad78e58c05bfcf7bb TIMEDEMO.HE4
-a43540b44806b8311c7fd04c12cbf46a TIMEDEMO.W32
-
-(putttime demo hfs)
-sev
-???
-
-(web)
-2002-06-10 20:14 TimeDemo.exe
-khalek, sev
-c:\Build\SRC\SPUTM\Src\SrcPWin\*.cpp
-a64bde414f464ef8522fa0ffeea36d9c TimeDemo.exe
-0ab19be9e2a3f6938226638b2a3744fe TimeDemo.HE0
-1691e37409d7f0593c1aa1449f882058 TimeDemo.(a)
-63adb23ead513d5fcf657ed555e525ee TimeDemo.he2
-72339e5cf3f2902ad78e58c05bfcf7bb TimeDemo.he4
-
-(putttime demo hfs french)
-Kirben
-???
-
-(putttime demo french)
-Kirben
-???
-
-(putttime demo dutch)
-adutchguy
-???
-
-(Kellogg cereals pack)
-a6d982141c88f167cf4ec5dc684e2684 PuttMini.(a)
-d1286487c342ac81b28f3e1b90a2b7f3 PuttMini.D32
-0a6d7b81b850ed4a77811c60c9b5c555 PuttMini.HE0
-a75403b5e853d7cc65cde2ec358ca5ba PuttMini.exe
-ddcb5d9f71edc07982db401776c2d79e PuttMini.he2
-72339e5cf3f2902ad78e58c05bfcf7bb PuttMini.he4
-
-(balloon cd hfs)
-Kirben
-???
-
-(balloon cd)
-Kirben
-???
-
-(balloon cd hfs)
-Kirben
-???
-
-(balloon cd)
-Kirben
-???
-
-(balloon cd)
-iziku
-???
-
-(russian balloon)
-sev
-D:\Scummsrc.80\Sputm\*.c
-ad2d6ffbae12d46a2d50ccbbd2a15a83 Balloon.a32
-145bd3373574feb668cc2eea2ec6cf86 BALLOON.HE0
-86282ac950041a1a9723d2c86098939a BALLOON.HE1
-1dabd9eea9fa31c751ac52cfc2048c9c BALLOON.HE2
-4417ea03a6d1b0b7522526f41d1097f6 BALLOON.HE3
-6770978a98ae08e208c188d6c844ab69 BALLOON.HE4
-c2eb18b88529dc5cf79f868c73925f14 BALLOON.HE8
-cbe95e475b634087dc92d23596ad995f BALLOON.HE9
-
-(dog cd hfs)
-Kirben
-???
-
-(dog cd)
-Kirben
-???
-
-(dog cd)
-sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-ed126ee70102f94b8c725b3b90576f1e DOG.w32
-d4b8ee426b1afd3e53bc0cf020418cf6 dog.HE0
-43821dcacadd3340396dc9bdcf9fe455 dog.(a)
-8cbaaef96c0def188a98794f7e8826d6 dog.he2
-fc47c58d925148b1c1cce784d1f9fec1 dog.he4
-880f0f5e1acc4eb19c889c4d7c7492ef dog.he7
-50438756f002a90fbe7d6a4be184dccb dog.he8
-ccca9a823d117afb1a882fd707586bf0 dog.d32
-
-(activity cd)
-???
-
-(funpack cd 3do)
-sev
-???
-
-(funpack cd)
-iziku
-???
-
-(funpack patch)
-khalek
-6.1.1 (Nov 20 1993 12:20:32)
-091d066c93e751504e4b18c6748b97e0 FUNPACK.EXE
-
-(funpack cd)
-6.1.1 (Feb 15 1993 20:31:55)
-khalek
-f90f40b9702cfd3e2f6c9af76c743e41 funpack.exe
-46b53fd430adcfbed791b48a0d4b079f funpack.he0
-af6283c82fb6a867f91f28039b716036 funpack.he1
-7d6dec34833328722665c1e5a64e735f funpack.tlk
-
-(funpack cd hebrew)
-???
-
-(puttsfunshop cd hfs)
-sev
-???
-
-(puttsfunshop cd)
-sev
-C:\Dev\Project\SPUTM\Src\SrcPWin\*.cpp
-b525ccb6634db6c7f2762864f627f17a PuttsFunShop.(a)
-4504676bd50cb7b0e28b1b2026dce1b3 PuttsFunShop.(b)
-ccca9a823d117afb1a882fd707586bf0 PuttsFunShop.d32
-5262a27afcaee04e5c4900220bd463e7 PuttsFunShop.HE0
-5543c6d936bbec16be896902a473d2a4 PuttsFunShop.he2
-e93a12735e1a95559c755d7193676085 PUTTSFUNSHOP.HE4
-970f3883eefc562bc3949d1b1f88673e PuttsFunShop.map
-39c468587c4bdad304be49e8d4041a22 PuttsFunShop.u32
-7ea658395895f10ba7dfc4a7d147f615 PuttsFunShop.w32
-a38b59ccd74792e348b57e6f07ce2ccc PuttsFunShop.x32
-
-(spyfox cd hfs)
-Kirben
-???
-
-(spyfox cd)
-Kirben
-???
-
-(spyfox cd hfs)
-Joachim
-???
-
-(spyfox cd)
-Joachim
-???
-
-(spyfox cd hfs german)
-Joachim
-???
-
-(spyfox cd german updated)
-Joachim
-???
-
-(spyfox cd german)
-nachbarnebenan
-a28135a7ade38cc0208b04507c46efd1 spyfox.he0
-96da98152ccc2f0d9002c834f34d5cd0 spyfox.he1
-75bd69c4fc660695691844a68110a337 spyfox.he2
-f8029f33e2bc3da6fe38f6bda58c1f31 spyfox.he4
-
-(spyfox cd dutch)
-joostp
-???
-
-(spyfox cd) (COMMENT: ALL LANG)
-khalek
-1997-08-10 03:41 spyfox.w32
-D:\Scummsys.90\sputm.90\*.c
-6bf70eee5de3d24d2403e0dd3d267e8a spyfox.he0
-e01f959bdd49d5b0c8660fd8a14d4799 spyfox.he1
-0a7f78543f30138effbe593d9d09e720 spyfox.he2
-9fbab8bb60448f30ce7508dbf277ab05 spyfox.he4
-b7aa3c76d463137a8a09c68d9a1045d1 spyfox.w32
-
-(spyfox cd russian)
-sev
-D:\Scummsys.90\sputm.90\*.c
-6bf70eee5de3d24d2403e0dd3d267e8a SPYFOX.HE0
-f1b79e1dcb5f57b8d91aac8487a284d7 SPYFOX.HE1
-506a333aad3af2ca8abf5b862ceeb365 SPYFOX.HE2
-9fbab8bb60448f30ce7508dbf277ab05 SPYFOX.HE4
-1355eb775fa71d6df9d506fb906a51db SPYFOX.HLP
-b7aa3c76d463137a8a09c68d9a1045d1 SPYFOX.W32
-
-(spyfox cd russian updated)
-sev
-d:\dev\SPUTM\Src\*.cpp
-51ac439f04951d0910bc423e2825dab8 SPYFoxDC.(a)
-72ac6bc980d5101c2142189d746bd62f SPYFoxDC.he0
-10b638ee633558d528d7be0376175065 SPYFoxDC.he2
-f8029f33e2bc3da6fe38f6bda58c1f31 SPYFoxDC.he4
-b185cdec4ea6bc218afe08325af787a4 spyfoxdc.w32
-
-(farm cd hfs)
-khalek
-1997-12-09 19:59 FoxDemo
-09507650b60e891e9c1ed5e0a7aa0152 FoxDemo
-53e94115b55dd51d4b8ff0871aa1df1e FoxDemo (0)
-81fef80fadf4cd3ad0e04ac619f6eaed FoxDemo (1)
-1229ed0135d97aac8b50224a74ee4f34 FoxDemo (2)
-6f7993e15da433b58ea63e59e3666cea FoxDemo (4)
-d41d8cd98f00b204e9800998ecf8427e FoxDemo (r)
-
-(ftp/pajama2 demo/freddi3 cd)
-sev
-53e94115b55dd51d4b8ff0871aa1df1e foxdemo.he0
-81fef80fadf4cd3ad0e04ac619f6eaed foxdemo.he1
-1229ed0135d97aac8b50224a74ee4f34 foxdemo.he2
-6f7993e15da433b58ea63e59e3666cea foxdemo.he4
-b7aa3c76d463137a8a09c68d9a1045d1 foxdemo.w32
-
-(spyfox demo hfs)
-khalek
-???
-
-(ftp/putt dog cd/spyfox2 cd/putttime cd/football cd)
-1999-05-17 12:21 spydemo.w32
-khalek
-D:\Scummsys.90\sputm.90\*.c
-fbdd947d21e8f5bac6d6f7a316af1c5a spydemo.he0
-820bceab2a1ab02254c33e6e3fc81628 spydemo.he1
-bc8ed64e6a101f6646b80aa294fa5bdc spydemo.he2
-88867a804055334db8485d7da5d2c51f spydemo.he4
-b7aa3c76d463137a8a09c68d9a1045d1 spydemo.w32
-
-(spyfox demo hfs)
-khalek
-???
-
-2002-05-21 13:29 Spydemo.exe
-khalek
-c:\Build\SRC\SPUTM\Src\SrcPWin\*.cpp
-f5207b882c9015a4e4a9599460be6294 Spydemo.(a)
-4d34bf8f8ec20f2e653b19aa283da352 Spydemo.exe
-9d4ab3e0e1d1ebc6ba8a6a4c470ed184 Spydemo.HE0
-b34d614a23a7dac2be1407bbb51c6b24 Spydemo.he2
-88867a804055334db8485d7da5d2c51f Spydemo.he4
-
-(spyfox demo hfs french)
-Kirben
-???
-
-(spyfox demo french)
-Kirben
-???
-
-(spyfox demo dutch)
-Kirben
-???
-
-(spyfox2 cd hfs)
-sev
-???
-
-(spyfox2 cd)
-sev
-D:\(vss)scummsys.99\SPUTM\Src\*.cpp
-5f7ece9a7aefc709f11b6f4216c8764e spyfox2.(a)
-f79e60c17cca601e411f1f75e8ee9b5a SPYFOX2.HE0
-c8f3ab5d05e09360dc88c00243db0c2a SPYFOX2.HE2
-d601630d0dcf6b3084ecd42b6c8c5a33 SPYFOX2.HE4
-0b381fa8531972edca34f9b631638148 spyfox2.he9
-26ef6933e4a560f40bbb3dc0525a783c spy2arc.hst
-77179b054447bb7080aff0ec343588c6 Spyfox2.w32
-
-(spyfox2 cd russian) (COMMENT: ALL LANGUAGES)
-sev
-d68c11a69a955b66ee1a6b8f5a2ee9e0 spyfox2.(a)
-f79e60c17cca601e411f1f75e8ee9b5a SPYFOX2.HE0
-0a718eae78a467f5e664a34b601471e3 SPYFOX2.HE2
-d601630d0dcf6b3084ecd42b6c8c5a33 SPYFOX2.HE4
-0b381fa8531972edca34f9b631638148 spyfox2.he9
-010b18d51f6bf84c69333d03a4cc3c9b SPYFOX2.HLP
-77179b054447bb7080aff0ec343588c6 Spyfox2.w32
-
-(spyfox2 cd hfs russian updated)
-sev
-???
-
-(spyfox2 cd russian updated)
-sev
-C:\HESystems\SPUTM\Src\*.cpp
-4ecc3a54d961a23b80239e191309bb2a spyfoxsr.(a)
-cea91e3dd47f2518ea418e41611aa77f spyfoxsr.he0
-2e73380e32fb1960de5e9871042c6b2e spyfoxsr.he2
-42e883fdae113021eaa30bca3a7bfd2c spyfoxsr.he4
-0b381fa8531972edca34f9b631638148 spyfoxsr.he9
-dda8932e4ddd10c538086df4eaa965d2 SPYFOXSR.w32
-
-(spyfox2 cd dutch)
-adutchguy
-???
-
-(spyfox2 demo hfs dutch)
-joostp
-???
-
-(spyfox2 demo dutch)
-joostp
-???
-
-(putsfunshop cd/pajama3 cd/puttcircus cd/spyozon cd/soccerMLS cd)
-sev
-C:\Dev\Project\SPUTM\Src\*.cpp
-2ee6a9c1c8352d4aca638aeab38a194e sf2-demo.(a)
-f378c570abf42d4875d26674a35acd83 SF2-DEMO.EXE
-7222f260253f325c21fcfa68b5bfab67 sf2-demo.HE0
-8634f4ad2f224842364a86ddc57bb072 sf2-demo.he2
-c23f18777b5ad558826493f69749c4c6 SF2-DEMO.HE4
-
-(humongous ftp)
-sev
-D:\(vss)scummsys.99\SPUTM\Src\*.cpp
-2ee6a9c1c8352d4aca638aeab38a194e sf2-demo.(a)
-ccca9a823d117afb1a882fd707586bf0 sf2-demo.d32
-77179b054447bb7080aff0ec343588c6 sf2-demo.exe
-7222f260253f325c21fcfa68b5bfab67 sf2-demo.he0
-8634f4ad2f224842364a86ddc57bb072 sf2-demo.he2
-c23f18777b5ad558826493f69749c4c6 sf2-demo.he4
-
-(spyfox2 demo hfs german)
-Joachim
-???
-
-(spyfox2 demo german)
-Joachim
-???
-
-(PuttPutt CD UK release)
-eriktorbjorn
-d:\dev\SPUTM\Src\*.cpp
-e79b9525fd1e38c140424f48c609e642 SF2DEMO.(A)
-6dbe2db93323010de257bcb55d99c3fa sf2demo.exe
-19bf6938a94698296bcb0c99c31c91a7 SF2DEMO.HE0
-2577b0029ecfcb9e764e20a9b2a4be6a Sf2Demo.he2
-c23f18777b5ad558826493f69749c4c6 Sf2Demo.he4
-
-(spyozon cd hfs)
-sev
-???
-
-(spyozon cd)
-sev
-C:\Spyfox3Sputm\Src\*.cpp
-845312206b245156183ffa0ee79fcede SPYOZON.(A)
-600abd3e9f47e63e670188b7e4e86ac7 SPYOZON.HE0
-eec7f697ba008211d12be2108f9e6b56 SPYOZON.HE2
-2f238b51cfad1b8b5c179468a19aa29b SPYOZON.HE3
-6654406759193503d618405b075322e4 SPYOZON.HE4
-a76f985eb0fe5b9600dd8563cd5ac7d8 spyozon.w32
-
-(spyozon cd hfs russian updated)
-sev
-???
-
-(spyozon cd russian updated)
-sev
-C:\Spyfox3Sputm\Src\SrcPWin\*.cpp
-eb03a8bd9e7654d5d06635d934f2059b SPYFoxOzu.(a)
-194af4195ddb1f3a6017fbd6b27a92aa spyfoxozu.exe
-96a3069a3c63caa7329588ce1fef41ee SPYFoxOzu.he0
-efab08f94696fc1a7404ba366c6629d3 SPYFoxOZU.he2
-2f238b51cfad1b8b5c179468a19aa29b SPYFoxOZU.he3
-64531d4b40f2b932c8434b5c2c0f3547 SPYFoxOzu.he4
-
-(spyozon cd)
-???
-
-(spyozon demo hfs)
-???
-
-(freddicove cd/pajama4 cd)
-sev
-d:\dev\SPUTM\Src\SrcPWin\*.cpp
-0b3dac19ac1107f3fcfa9b38c47b2dfb SF3-DEMO.(A)
-ad443efafb53aa0c05749b7d523019cf SF3-DEMO.EXE
-ebd0b2c8a387f18887282afe6cad894a SF3-DEMO.HE0
-46dd1febbcad9683be77f23b666cdbbe SF3-DEMO.HE2
-145feca064ba53c0002c56a199bdc719 SF3-DEMO.HE3
-24f341ed410a69e052f90f9b3cb5ecf4 SF3-DEMO.HE4
-
-(chase cd hfs)
-Kirben
-???
-
-(chase hfs)
-Kirben
-???
-
-(chase cd hfs)
-Kirben
-???
-
-(chase hfs)
-Kirben
-???
-
-(chase cd russian)
-sev
-D:\scummsys.95\sputm.95\*.c
-dab6994bacb768b75a7085c01a473c94 Chase.a32
-9cdd327c1034c046cb595d251c44da2f CHASE.HE0
-d61f7c0fa645c0cead10e93b5223197c CHASE.HE1
-79fbaace4a08b14772aeea0250e95330 CHASE.HE2
-fe9666d561a54a101c92086d2ef77448 CHASE.HE4
-5201bee3111b5335fac48ecf30b27830 CHASE.HE8
-6d12e727e12365a23270269ca4c7e538 CHASE.HE9
-
-(mustard cd hfs)
-Kirben
-???
-
-(mustard cd)
-Kirben
-???
-
diff --git a/doc/he/smacker-md5s.txt b/doc/he/smacker-md5s.txt
deleted file mode 100644
index 39233c402b..0000000000
--- a/doc/he/smacker-md5s.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-(puttsfunshop cd/pj3 cd/puttcircus cd)
-sev
-D:\scummsys.98\sputm.98\*.c
-e07a222d121f7e8b04266bf4d7809cb4 BluesBirthdayDemo.a32
-dbf4d59d70b826733f379f998354d350 BluesBirthdayDemo.HE0
-6ddf8b026cfb9410b560f91f353dc0f4 BluesBirthdayDemo.(a)
-409a570e46466aef89c3cd3a30992543 BluesBirthdayDemo.(b)
-60cc055b47b53cb53eaa89e1f974c888 BluesBirthdayDemo.he2
-0794110b085ee91c2aa4a5fc844ff2f4 BluesBirthdayDemo.he4
-
-(puttrace cd)
-sev
-D:\scummsys.98\sputm.98\*.c
-e07a222d121f7e8b04266bf4d7809cb4 BluesBirthdayDemo.a32
-2d4acbdcfd8e374c9da8c2e7303a5cd0 BluesBirthdayDemo.HE0
-18ee74255c93da057c92effbd39ebd9a BluesBirthdayDemo.(a)
-409a570e46466aef89c3cd3a30992543 BluesBirthdayDemo.(b)
-dc5e63ecf2672d4a3a0458fe32902a4e BluesBirthdayDemo.he2
-0794110b085ee91c2aa4a5fc844ff2f4 BluesBirthdayDemo.he4
-ccca9a823d117afb1a882fd707586bf0 BluesBirthdayDemo.d32
-
-(freddi5 cd)
-sev
-C:\Dev\Project\SPUTM\Src\SrcPWin\*.cpp
-548fcedaa9cee84443a5a9acfff4cb04 ARTDEMO.(A)
-d00ffc8c32d17e575fd985d435d2eb88 ARTDEMO.HE0
-58c91c3f750b227b136e96b410b0e7cc ARTDEMO.HE2
-47f0573a8a629c6e7f8b9236112fe10e ARTDEMO.HE4
-7e98a8e45cbac83e65d98f3c133ae34d ARTDEMO.W32
-2f1a08df8aa13924959905fc5dc34a9b DATA/INTR_AT_IN_01.DAT
-f7841f8a37394805fc0699999898bcca DATA/INTR_AT_IN_02.DAT
-6a2f8c39d2ce07d422bae9f9bf416839 DATA/INTR_AT_IN_20_B.DAT
-
-(freddi5 cd)
-sev
-C:\Dev\Project\SPUTM\Src\SrcPWin\*.cpp
-f536221cc5d8da02009278523eda6bd5 READDEMO.(A)
-95818b178d473c989ac753574e8892aa READDEMO.HE0
-7c64b87e454e642e36a83c79341007b0 READDEMO.HE2
-4f307cf26e46f765298cc8f92f02db49 READDEMO.HE4
-eac7453b1dca87447974ef54137470f9 READDEMO.W32
-45a973a322b177ee4b36bea81981462d DATA/INT_RT_IN_01.DAT
-9e0c144bf1b7f0cc8ba3edae6135e313 DATA/INT_RT_IN_03.DAT
-8d150f9d9e12e485da50c4560135b4ef DATA/INT_RT_IN_04.DAT
-8cde496829546daaaa28084c49f3f4f7 DATA/INT_RT_IN_05.DAT
-c784fa970208b5bd49fff568ca0036ec DATA/INT_RT_IN_06.DAT
diff --git a/doc/he/u32.txt b/doc/he/u32.txt
deleted file mode 100644
index e4735cac71..0000000000
--- a/doc/he/u32.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-500demo, puttrace, racedemo [55808]
-39F6C16743D2AA4E0D92C2E6C4993311 500DEMO.U32
-39F6C16743D2AA4E0D92C2E6C4993311 PUTTRACE.U32
-39F6C16743D2AA4E0D92C2E6C4993311 RACEDEMO.U32
-
-basketball [282690]
-6e8c11a5294981e58032e9f2c8fcdb74 BASKETBALL.U32
-
-baseball2001, bb2demo [180224]
-23843A93F55BF0B4D7D22E80E0EEFD0A bb2demo.u32
-
-chase (he100) [118784]
-CC119A63F923076C300DC52575CB47C5 uberedit.u32
-
-football, footdemo [155648]
-07656b959c7febb6359c8de5fd6b6f76 FOOTBALL.U32
-
-football2002 [90156]
-2d027f461187ebadad44801c366b892c Football2002.u32
-
-moonbase 1.0 [458827]
-4c18f01f3020678d2ce9d5312057cb9d Moonbase.u32
-
-moondemo [458827]
-0C645CDF171CC79DAB28BF8962D6904B moondemo.u32
-
-FreddisFunShop, PuttsFunShop, SamsFunShop [40960]
-39C468587C4BDAD304BE49E8D4041A22 PuttsFunShop.u32
-39C468587C4BDAD304BE49E8D4041A22 SamsFunShop.u32
-39C468587C4BDAD304BE49E8D4041A22 FreddisFunShop.u32
-
-soccer [123904]
-ed64133f8cdfca57fb3cd09057def978 SOCCER.U32
-
-soccer2004 [90186]
-C7B6AB1B4408C4F6EB66ADD731A0DF1A SOCCER2004.U32
-
-soccerMLS [135168]
-86cb9583ca987446d12a4f36dd8d631b SoccerMLS.u32
diff --git a/doc/he/versions.html b/doc/he/versions.html
deleted file mode 100644
index 3ab604c128..0000000000
--- a/doc/he/versions.html
+++ /dev/null
@@ -1,754 +0,0 @@
-<html>
-<!-- $Id$ -->
-<p>
-Games below are believed to be SCUMM based games... most haven't been proven however.
-Every title Humongous Entertainment released before Backyard Hockey (early 2002) should be SCUMM based.
-Mac versions not listed in the interest of space, they seem to be the same as pc ones after you rename
-certain files anyway. Besides anyone who has a mac version has a PC version as the games are on hybrid
-HFS/ISO9660 CDs.
-
-<table border=1>
-
-<tr>
-<td>Game
-<td>Year
-<td>Plat
-<td>SPU Ver
-<td>Source dir
-
-
-<tr>
-<td>Putt-Putt Joins the Parade
-<td>1992
-<td>dos
-<td>6.1.1&nbsp;(Jan&nbsp;18&nbsp;1994&nbsp;09:32:55)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Joins the Parade (patch)
-<td>1992
-<td>dos
-<td>6.1.1 (Nov 20 1993 12:42:10)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Joins the Parade
-<td>1992
-<td>win
-<td>7.0.0 (Feb 7 1995 13:26:59)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Joins the Parade
-<td>1992
-<td>3do
-<td>6.5.1 (3DO)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Joins the Parade (demo)
-<td>1993
-<td>dos
-<td>6.1.1 (Mar 9 1993 21:19:14)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Joins the Parade (demo)
-<td>1993
-<td>win
-<td>7.0.0 (Feb 7 1995 13:26:59)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Goes to the Moon
-<td>1993
-<td>dos
-<td>6.1.1 (Nov 4 1993 11:12:57)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Goes to the Moon
-<td>1993
-<td>win
-<td>7.0.0 (Feb 7 1995 13:27:20)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Goes to the Moon
-<td>1993
-<td>3do
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Goes to the Moon (demo)
-<td>1993
-<td>dos
-<td>6.1.1 (Sep 29 1993 17:18:45)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Goes to the Moon (demo)
-<td>1993
-<td>win
-<td>7.0.0 (Feb 7 1995 13:27:20)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt's Fun Pack
-<td>1993
-<td>dos
-<td>6.1.1 (Feb 15 1993 20:31:55)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt's Fun Pack (patch)
-<td>1993
-<td>dos
-<td>6.1.1 (Nov 20 1993 12:20:32)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt's Fun Pack
-<td>1993
-<td>3do
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Saves the Zoo
-<td>1995
-<td>win
-<td>7.0.0 (Jul 13 1995 18:45:07)
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Putt-Putt Saves the Zoo (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Jun 4 1995 15:47:12)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Saves the Zoo (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Jun 22 1995 14:03:05)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Saves the Zoo (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Jul 5 1995 14:45:19)
-<td>&nbsp;
-
-<tr>
-<td>Putt-Putt Travels Through Time
-<td>1997
-<td>win
-<td>&nbsp;
-<td>C:\Dev\Project\SPUTM\Src\*.cpp
-
-<tr>
-<td>Putt-Putt Travels Through Time (demo)
-<td>1997
-<td>win
-<td>7.?.?
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Putt-Putt Travels Through Time (demo)
-<td>1997
-<td>win
-<td>7.?.?
-<td>c:\Build\SRC\SPUTM\Src\*.cpp
-
-<tr>
-<td>Putt-Putt Enters the Race
-<td>1998
-<td>win
-<td>7.?.?
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Putt-Putt Enters the Race (demo)
-<td>1998
-<td>win
-<td>7.?.?
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Putt-Putt Joins the Circus
-<td>&nbsp;
-<td>&nbsp;
-<td>&nbsp;
-<td>C:\Documents and Settings\stevej.BOT\My Documents\HECode\Libs\Wtoolkit\Rawbitm.cpp
-
-<tr>
-<td>Putt-Putt One-Stop Fun Shop
-<td>2000
-<td>win
-<td>7.?.?
-<td>C:\Dev\Project\SPUTM\Src\*.cpp
-
-<tr>
-<td>Putt-Putt and Pep's Balloon-O-Rama? (arcade)?
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>D:\Scummsrc.80\Sputm\*.c
-
-<tr>
-<td>Putt-Putt and Pep's Dog on a Stick? (arcade)
-<td>1999
-<td>win
-<td>7.?.?
-<td>C:\Dev\Project\SPUTM\Src\*.cpp
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Pajama Sam 1: No Need To Hide When Its Dark
-<td>1996
-<td>win
-<td>7.?.?
-<td>D:\Scummsrc.80\Sputm\*.c
-
-<tr>
-<td>Pajama Sam 1: No Need To Hide When Its Dark (demo)
-<td>1996
-<td>win
-<td>&nbsp;
-<td>D:\Scummsrc.80\Sputm\*.c
-
-<tr>
-<td>Pajama Sam 1: No Need to Hide When Its Dark (demo)
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>c:\Build\SRC\SPUTM\Src\*.cpp
-
-<tr>
-<td>Pajama Sam 2: Thunder and Lightning
-<td>1998
-<td>win
-<td>7.?.?
-<td>D:\scummsys.95\sputm.95\*.c
-
-<tr>
-<td>Pajama Sam 2: Thunder and Lightning (demo)
-<td>1998
-<td>win
-<td>&nbsp;
-<td>D:\scummsys.95\sputm.95\*.c
-
-<tr>
-<td>Pajama Sam 3: You Are What You Eat From Your
-<td>2000
-<td>win
-<td>7.?.?
-<td>C:\Dev\Project\SPUTM\Src\*.cpp
-
-<tr>
-<td>Pajama Sam 3: You Are What You Eat From (demo)
-<td>2000
-<td>win
-<td>7.?.?
-<td>C:\Dev\Project\SPUTM\Src\*.cpp
-
-<tr>
-<td>Pajama Sam One-Stop Fun Shop
-<td>2000
-<td>win
-<td>&nbsp;
-<td>C:\Documents and Settings\stevej\My Documents\HECode\SPUTM\Src\SrcPWin\*.cpp
-
-<tr>
-<td>Pajama Sam's Sock Works (arcade)
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\scummsys.80\sputm80\*.c
-
-<tr>
-<td>Pajama Sam's Lost & Found (arcade)
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Pajama Sam's Lost & Found (demo)
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\(vss)scummsys.99\SPUTM\Src\SrcPWin\*.cpp
-
-<tr>
-<td colspan=5>&nbsp;
-
-<tr>
-<td>Freddi Fish 1: The Case of the Missing Kelp
-<td>1995
-<td>?
-<td>7.0.0 (Jun 23 1995 09:58:48)
-<td>&nbsp;
-
-<tr>
-<td>Freddi Fish 1: The Case of the Missing Kelp
-<td>1998
-<td>?
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Freddi Fish 1: The Case of the Missing Kelp (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Oct 20 1994 10:00:19)
-<td>&nbsp;
-
-<tr>
-<td>Freddi Fish 1: The Case of the Missing Kelp (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Jun 22 1995 14:06:25)
-<td>&nbsp;
-
-<tr>
-<td>Freddi Fish 1: The Case of the Missing Kelp (demo)
-<td>1995
-<td>?
-<td>7.0.0 (Jul 5 1995 14:46:05)
-<td>&nbsp;
-
-<tr>
-<td>Freddi Fish 2: The Case of the Haunted Schoolhouse
-<td>1998
-<td>win
-<td>&nbsp;
-<td>D:\Scummsrc.80\Sputm\*.c
-
-<tr>
-<td>Freddi Fish 2: The Case of the Haunted (demo)
-<td>1996
-<td>win
-<td>7.?.?
-<td>D:\Scummsrc.80\Sputm\*.c
-
-<tr>
-<td>Freddi Fish 2: The Case of the Haunted (demo)
-<td>1998
-<td>win
-<td>7.?.?
-<td>c:\Build\SRC\SPUTM\Src\*.cpp
-
-<tr>
-<td>Freddi Fish 3: The Case of the Stolen Conch
-<td>1998
-<td>win
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Freddi Fish 3: The Case of the Stolen (demo)
-<td>1997
-<td>win
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Freddi Fish 4: The Case of the Hogfish Rustlers
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Freddi Fish 4: The Case of the Hogfish (demo)
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Freddi Fish 5: The Case of the Creature of Coral
-<td>2001
-<td>win
-<td>&nbsp;
-<td>C:\Spyfox3Sputm\Src\*.cpp
-
-<tr>
-<td>Freddi Fish One Stop Fun Shop
-<td>2000
-<td>win
-<td>&nbsp;
-<td>C:\Documents and Settings\stevej\My Documents\HECode\SPUTM\Src\*.cpp<br>
-
-<tr>
-<td>Freddi Fish and Luther's Maze Madness
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\scummsys\sputm80\*.c
-
-<tr>
-<td>Freddi Fish and Luther's Water Worries
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\scummsys\sputm80\*.c
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Spy Fox 1: Dry Cereal
-<td>1997
-<td>win
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Spy Fox 1: Dry Cereal (demo)
-<td>&nbsp;
-<td>&nbsp;
-<td>7.?.?
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Spy Fox 1: Dry Cereal (demo)
-<td>&nbsp;
-<td>&nbsp;
-<td>7.?.?
-<td>c:\Build\SRC\SPUTM\Src\*.cpp
-
-<tr>
-<td>Spy Fox 2: Some Assembly Required
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\(vss)scummsys.99\SPUTM\Src\*.cpp
-
-<tr>
-<td>Spy Fox 2: Some Assembly Required (Demo)
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>D:\(vss)scummsys.99\SPUTM\Src\*.cpp
-
-<tr>
-<td>Spy Fox 3: Operation Ozone
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>C:\Spyfox3Sputm\Src\SrcPWin\*.cpp
-
-<tr>
-<td>Spy Fox In Cheese Chase
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\scummsys.95\sputm.95\*.c
-
-<tr>
-<td>Spy Fox in Hold the Mustard
-<td>1999
-<td>win
-<td>&nbsp;
-<td>D:\(vss)scummsys.99\SPUTM\Src\*.cpp
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Fatty's Birthday Surprise
-<td>1993
-<td>dos
-<td>6.1.1 (Jun 23 1993 15:31:14)
-<td>&nbsp;
-
-<tr>
-<td>Fatty's Birthday Surprise
-<td>1993
-<td>win
-<td>7.0.0 (Feb 7 1995 13:27:40)
-<td>&nbsp;
-
-<tr>
-<td>Fatty's Birthday Surprise
-<td>1993
-<td>3do
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Fatty's Birthday Surprise (demo)
-<td>1993
-<td>dos
-<td>6.1.1 (Apr 6 1993 20:48:56)
-<td>&nbsp;
-
-<tr>
-<td>Fatty's Birthday Surprise (demo)
-<td>1993
-<td>win
-<td>7.0.0 (Feb 7 1995 13:27:40)
-<td>&nbsp;
-
-<tr>
-<td>Fatty Bear's Fun Pack
-<td>1993
-<td>dos
-<td>6.1.1 (Nov 11 1993 09:17:08)
-<td>&nbsp;
-
-<tr>
-<td>Fatty Bear's Fun Pack
-<td>1993
-<td>3do
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Blue's ABC Time Activities
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Blue's ABC Time Activities (demo)
-<td>&nbsp;
-<td>win
-<td>7.?.?
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Blue's 123 Time Activities
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Blue's Art Time Activities
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Blue's Birthday Adventure
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Blue's Learning Time
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Blue's Play Time
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Blue's Reading Time Activities
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Blue's Treasure Hunt
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Let's Explore the Airport with Buzzy
-<td>&nbsp;
-<td>win
-<td>7.0.0 (Jul 1 1995 21:55:39)
-<td>&nbsp;
-
-<tr>
-<td>Let's Explore the Airport with Buzzy (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Feb 8 1995 16:33:47)
-<td>&nbsp;
-
-<tr>
-<td>Let's Explore the Airport with Buzzy (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Jun 22 1995 14:06:25)
-<td>&nbsp;
-
-<tr>
-<td>Let's Explore the Airport with Buzzy (demo)
-<td>1995
-<td>win
-<td>7.0.0 (Jul 5 1995 14:46:05)
-<td>&nbsp;
-
-<tr>
-<td>Let's Explore the Jungle with Buzzy
-<td>&nbsp;
-<td>win
-<td>7.0.0 (Jul 1 1995 21:55:39)<br>7.0.0 (Oct 5 1995 08:20:42)
-<td>&nbsp;
-
-<tr>
-<td>Let's Explore the Farm with Buzzy
-<td>1996
-<td>win
-<td>7.0.0 (Jun 11 1996 19:12:56)
-<td>&nbsp;
-
-<tr>
-<td>Let's Explore the Farm with Buzzy (demo)
-<td>1994
-<td>win
-<td>7.0.0 (Oct 13 1994 19:15:16)
-<td>&nbsp;
-
-<tr>
-<td>Let's Explore the Farm with Buzzy (demo) (farm cd)
-<td>1995
-<td>win
-<td>7.0.0 (Jun 22 1995 14:05:27)
-<td>&nbsp;
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Big Thinkers First Grade
-<td>&nbsp;
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Big Thinkers First Grade (demo)
-<td>1997
-<td>win
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Big Thinkers Kindergarten
-<td>1997
-<td>win
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Big Thinkers Kindergarten (demo)
-<td>1997
-<td>win
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Humongous demo launcher "catalog"
-<td>1995
-<td>win
-<td>7.0.0 (Feb 8 1995 16:33:26)
-<td>&nbsp;
-
-<tr>
-<td>Humongous demo launcher "catalog2"
-<td>1995
-<td>win
-<td>7.0.0 (Jun 22 1995 14:01:50)
-<td>&nbsp;
-
-<tr>
-<td colspan=5>&nbsp;
-
-
-<tr>
-<td>Backyard Basketball
-<td>2001
-<td>win
-<td>&nbsp;
-<td>c:\Build\SRC\SPUTM\Src\*.cpp
-
-<tr>
-<td>Backyard Soccer
-<td>1998
-<td>win
-<td>&nbsp;
-<td>D:\scummsys.98\sputm.98\*.c
-
-<tr>
-<td>Backyard Soccer 2004
-<td>2003
-<td>win
-<td>&nbsp;
-<td>F:\HEdev\scummsys\SPUTM\Src\*.cpp
-
-<tr>
-<td>Backyard Football
-<td>1999
-<td>win
-<td>&nbsp;
-<td>&nbsp;
-
-<tr>
-<td>Backyard Football 2002
-<td>?
-<td>win
-<td>&nbsp;
-<td>C:\SRC_RELEASE\SPUTM\Src\*.cpp
-
-<tr>
-<td>Backyard Baseball
-<td>1997
-<td>win
-<td>&nbsp;
-<td>D:\Scummsys.90\sputm.90\*.c
-
-<tr>
-<td>Backyard Baseball 2001
-<td>2000
-<td>win
-<td>&nbsp;
-<td>C:\Dev\Project\SPUTM\Src\*.cpp
-
-<tr>
-<td>Backyard Baseball 2001 (demo)
-<td>2000
-<td>win
-<td>&nbsp;
-<td>C:\Dev\Project\SPUTM\Src\*.cpp
-</table>
-</html>
diff --git a/doc/translations/README-de.txt b/doc/translations/README-de.txt
deleted file mode 100755
index a1d7d6eb5f..0000000000
--- a/doc/translations/README-de.txt
+++ /dev/null
@@ -1,178 +0,0 @@
-Dieses Dokument ist eine auszugsweise Übersetzung der englischen
-REAMDE-Datei. Das Original-Dokument enthält viel mehr Informationen.
-Sollten Sie hier also nicht das finden, was Sie benötigen und ein wenig
-Englisch können, sollten Sie sich die englische README-Datei ansehen.
-
-Für weitere Informationen, Kompatiblitätslisten, Einzelheiten zu Spenden,
-die neusten veröffentlichten Versionen, Fortschrittberichte und mehr
-besuchen Sie bitte die ScummVM-Website unter der Adresse:
-http://www.scummvm.org/
-
-Inhaltsverzeichnis:
-------------------
-1.0) Einführung
- * 1.1 Über ScummVM
- * 1.2 Schnellstart
-2.0) Kontakt
- * 2.1 Fehler berichten
-
-1.0) Einführung:
----- -------------
-
-1.1) Über ScummVM:
----- --------------
-ScummVM ist ein Programm, welches es Ihnen ermöglicht, bestimmte klassische
-Grafik-Adventure (unter anderem aus dem Point-and-Click-Bereich) zu spielen,
-vorausgesetzt, Sie sind im Besitz der Dateien des Spiels. Das Schlaue daran
-ist: ScummVM ersetzt lediglich die Funktion der ausführbaren Dateien,
-die mit den Spielen kamen, was ermöglicht, diese Spiele auf Systemen zu spielen,
-für welche sie nie erstellt wurden!
-
-Ursprünglich wurde dieses Programm dafür entwickelt, um SCUMM-Spiele von
-LucasArts auszuführen, wie beispielsweise Maniac Mansion, Monkey Island,
-Day of the Tentacle oder Sam and Max. SCUMM steht als Abkürzung für
-„Script Creation Utility for Maniac Mansion“ (deutsch etwa:
-Skripterstellungsdienstprogramm für Maniac Mansion), was das erste
-Spiel von LucasArts war, für welches LucasArts dieses System entworfen hatte.
-Und viel später verlieh es seinen Namen an ScummVM (wobei „VM“ für
-„Virtuelle Maschine“ steht).
-
-Mit der Zeit wurde Unterstützung für viele Nicht-SCUMM-Spiele hinzugefügt.
-Einige Adventures, die ScummVM unterstützt, sind unter anderem Simon the
-Sorcerer 1 und 2 von Adventure Soft, Beneath A Steel Sky und
-Baphomets Fluch 1 und 2 von Revolution, Flight of the Amazon Queen,
-Erben der Erde (Wyrmkeep), Gobliiins von Coktel Vision sowie
-The Legend of Kyrandia von Westwood Studios.
-Sie können eine genaue Liste mit Einzelheiten einsehen, welche Auskunft
-darüber gibt, welche Spiele unterstützt werden und wie gut. Gehen Sie
-hierfür auf die Kompatiblitätsseite. ScummVM wird kontinuierlich
-verbessert, also schauen Sie oft vorbei.
-
-Unter den Systemen, mit denen Sie diese Spiele spielen können, befinden
-sich Windows, Linux, Mac OS X, Dreamcast, PocketPC, PalmOS, iPhone,
-AmigaOS, BeOS, OS/2, PSP, PS2, SymbianOS/EPOC und viele mehr.
-
-Zurzeit befindet sich ScummVM immer noch stark in der Entwicklung.
-Seien Sie sich bewusst, dass wir zwar versuchen, dass viele Spiele
-mit wenigen erheblichen Fehlern durchgespielt werden können, aber es
-dennoch zu Abstürzen kommen kann und wir keine Gewähr übernehmen.
-Davon abgesehen: Einige Spiele werden seit längerer Zeit unterstützt
-und sollten in jeder stabilen veröffentlichten Version gut laufen.
-Sie können sich einen Eindruck davon verschaffen, wie gut jedes Spiel
-unter ScummVM läuft, indem Sie auf die Kompatiblitätsseite schauen.
-
-Wenn Sie sich ein wenig umsehen, können Sie herausfinden, dass
-ScummVM sogar kommerziell genutzt wird, um einige der unterstützen Spiele
-auf modernen Plattformen wiederzuveröffentlichen. Dies zeigt, dass
-verschiedene Firmen mit der Qualität der Software zufrieden sind und wie gut
-einige der Spiele mit ihrer Hilfe laufen.
-
-Wenn Ihnen ScummVM gefällt, können Sie uns gerne etwas Geld spenden,
-um uns finanziell zu unterstützen. Dies hilft uns dabei, notwendige
-Dienstprogramme zu kaufen, um ScummVM einfacher und schneller zu entwickeln.
-Wenn Sie nicht spenden können, dürfen Sie auch gerne einen Patch beisteuern.
-
-1.2) Schnellstart:
----- ------------
-WICHTIG: In der unteren kurzen Anleitung wird davon ausgegangen, dass Sie
-ScummVM auf Deutsch benutzen. Standardmäßig wird ScummVM die Sprache
-Ihres Betriebssystems verwenden. Falls ScummVM auf Englisch statt auf
-Deutsch erscheint, sollten Sie folgende Schritte ausführen, wenn Sie bei
-Schritt 3 angelangt sind und ScummVM gestartet haben:
--Klicken Sie auf "Options".
--Klicken Sie auf den rechten Pfeil in der Reiterleiste und wählen den
- Reiter "Misc" aus.
--Wählen Sie im Feld "GUI Language" "Deutsch" aus und klicken auf "OK".
--Bestätigen Sie die erscheinende Nachricht, klicken auf "Quit", um
- ScummVM zu beenden und starten dann das Programm erneut.
-
-Wenn Sie ScummVM lieber in Englisch verwenden möchten, benutzen Sie bitte
-die Anleitung in der englischen README-Datei.
-
-
-Für die ungelduldigen unter den Benutzern ist hier in fünf einfachen
-Schritten kurz beschrieben, wie man ScummVM lauffähig macht und das
-Programm verwendet.
-
-1. Laden Sie ScummVM unter der Adresse
-<http://www.scummvm.org/downloads.php> herunter und installieren Sie es.
-
-2. Erstellen Sie ein Verzeichnis auf Ihrer Festplatte und kopieren Sie
-die Dateien des Spiels vom Original-Datenträger in dieses Verzeichnis.
-Wiederholen Sie diesen Vorgang für jedes Spiel, das Sie spielen möchten.
-
-3. Starten Sie ScummVM, wählen Sie "Spiel hinzufügen" aus, wählen Sie das
-Verzeichnis mit den Dateien des Spiels aus (versuchen Sie nicht, die
-Dateien des Spiels selbst auszuwählen!) und klicken Sie auf "Auswählen".
-
-4. Ein Dialog sollte erscheinen, der Ihnen ermöglicht, verschiedene
-Einstellungen vorzunehmn, sollten Sie dies wünschen (es sollte jedoch in
-Ordnung sein, alles voreingestellt zu belassen). Bestätigen Sie diesen
-Dialog.
-
-5. Wählen Sie das Spiel aus der Liste aus, welches Sie spielen möchten
-und klicken Sie auf "Starten".
-
-In Zukunft sollte es nun möglich sein, direkt zu Schritt 5 überzugehen,
-außer Sie wollen noch mehr Spiele hinzufügen.
-
-Tipp: Wenn Sie mehrere Spiele auf einmal hinzufügen möchten, drücken Sie
-die Umschalt-Taste (Shift), bevor Sie auf "Spiel hinzufügen" klicken.
-Diese Schaltfläche wird somit ihren Text zu "Durchsuchen" umändern und
-wenn Sie dann auf diese klicken, werden Sie auch dazu aufgefordert, ein
-Verzeichnis auszuwählen, nur dieses Mal wird ScummVM alle
-Unterverzeichnisse automatisch nach unterstützen Spielen durchsuchen.
-
-
-2.0) Kontakt:
----- --------
-Der einfachste Weg, um mit dem ScummVM-Team in Verbindung zu treten, ist,
-Fehlerberichte einzusenden (siehe Abschnitt 2.1) oder durch Verwendung
-des Forums unter der Adresse http://forums.scummvm.org .
-Sie können ebenso der Mailing-Liste scummvm-devel betreiten und an diese
-E-Mails versenden oder mit uns im IRC chatten (#scummvm unter
-irc.freenode.net). Bitte fordern Sie uns nicht dazu auf, ein nicht
-unterstütztes Spiel zu unterstützen. Lesen Sie zuerst die Seite FAQ
-(Häufig gestellte Fragen) auf unserer Website.
-Bitte beachten Sie Kenntnis, dass die offizielle Sprache des Forums,
-der Mailing-Liste und des Chats Englisch ist und keine andere Sprache
-dort verwendet werden sollte.
-
-
-2.1) Fehler berichten:
----- ---------------
-Um einen Fehler zu berichten, erstellen Sie bitte ein SourceForge-Konto
-und folgen Sie dem Link "Bug Tracker" auf der ScummVM-Website. Bitte
-stellen Sie sicher, dass sich der Bug wiedererzeugen lässt und immer noch
-in der neusten Version von SVN oder des Daily builds auftritt. Bitte
-sehen Sie auch auf der Problemliste unten und der Kompatiblitätsliste auf
-der ScummVM-Website für dieses Spiel nach, um sicherzustellen, dass das
-Problem nicht bereits bekannt ist:
-
- http://www.scummvm.org/compatibility_stable.php
-
-Bitte berichten Sie keine Fehler zu Spielen, die nicht als durchspielbar
-im Bereich "Supported Games" oder der Kompatiblitätsliste aufgelistet
-sind. Wir -wissen-, dass diese Spiele Fehler aufweisen.
-
-Bitte liefern Sie folgende Informationen:
- - ScummVM-Version (BITTE mit neuster Version von SVN oder
- des Daily builds testen)
- - Einzelheiten zum Fehler, einschließlich Anweisungen, um den Fehler
- hervorzurufen
- - Sprache des Spiels (Englisch, Deutsch, ...)
- - Version des Spiels (Version mit Sprachausgabe [Talkie],
- Disketten-Version, ...)
- - Plattform und gegebenenfalls Compiler (Win32, Linux, FreeBSD, ...)
- - Fügen Sie einen Speicherstand hinzu, wenn es möglich ist.
- - Wenn dieser Fehler erst seit kurzem Auftritt, teilen Sie bitte die
- letzte Version ohne den Fehler mit und die erste Version mit diesem
- Fehler. Auf diese Weise können wir diesen schneller beseitigen,
- indem wir die vorgenommen Veränderungen einsehen.
-
-Zum Schluss möchten wir Sie noch bitten, jeden Punkt einzeln zu
-berichten; bitte senden Sie nicht mehrere Punkte mit dem selben Ticket
-ein, ansonsten wird es schwierig, den Status jedes einzelnen Fehlers
-zu verfolgen. Denken Sie bitte auch daran, dass alle Fehlerberichte in
-Englisch verfasst sein müssen.
-
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 7ae4d7718a..d864fe8b52 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -51,7 +51,13 @@ static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGa
extra = g.extra;
}
- GameDescriptor gd(g.gameid, title, g.language, g.platform);
+ GameSupportLevel gsl = kStableGame;
+ if (g.flags & ADGF_UNSTABLE)
+ gsl = kUnstableGame;
+ else if (g.flags & ADGF_TESTING)
+ gsl = kTestingGame;
+
+ GameDescriptor gd(g.gameid, title, g.language, g.platform, 0, gsl);
gd.updateDesc(extra);
return gd;
}
@@ -253,8 +259,21 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine)
Common::updateGameGUIOptions(agdDesc->guioptions | _guioptions, lang);
+ GameDescriptor gameDescriptor = toGameDescriptor(*agdDesc, _gameids);
+
+ bool showTestingWarning = false;
+
+#ifdef RELEASE_BUILD
+ showTestingWarning = true;
+#endif
+
+ if (((gameDescriptor.getSupportLevel() == kUnstableGame
+ || (gameDescriptor.getSupportLevel() == kTestingGame
+ && showTestingWarning)))
+ && !Engine::warnUserAboutUnsupportedGame())
+ return Common::kUserCanceled;
- debug(2, "Running %s", toGameDescriptor(*agdDesc, _gameids).description().c_str());
+ debug(2, "Running %s", gameDescriptor.description().c_str());
if (!createInstance(syst, engine, agdDesc))
return Common::kNoGameDataFoundError;
else
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 5360d23ac1..cbdfdf39d8 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -24,6 +24,7 @@
#define ENGINES_ADVANCED_DETECTOR_H
#include "engines/metaengine.h"
+#include "engines/engine.h"
namespace Common {
class Error;
@@ -62,6 +63,8 @@ struct ADGameFileDescription {
enum ADGameFlags {
ADGF_NO_FLAGS = 0,
+ ADGF_UNSTABLE = (1 << 21), // flag to designate not yet officially-supported games that are not fit for public testing
+ ADGF_TESTING = (1 << 22), // flag to designate not yet officially-supported games that are fit for public testing
ADGF_PIRATED = (1 << 23), ///< flag to designate well known pirated versions with cracks
ADGF_ADDENGLISH = (1 << 24), ///< always add English as language option
ADGF_MACRESFORK = (1 << 25), ///< the md5 for this entry will be calculated from the resource fork
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 811a58f45d..0eefbab04d 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -188,7 +188,7 @@ void AgiEngine::processEvents() {
case Common::KEYCODE_KP5:
if (_predictiveDialogRunning)
key = event.kbd.ascii;
- else
+ else
key = KEY_STATIONARY;
break;
case Common::KEYCODE_PLUS:
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 21ff5deb2c..a0736d0cc3 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -473,7 +473,7 @@ bool AgiBase::canLoadGameStateCurrently() {
bool AgiBase::canSaveGameStateCurrently() {
if (getGameID() == GID_BC) // Technically in Black Cauldron we may save anytime
return true;
-
+
return (!(getGameType() == GType_PreAGI) && getflag(fMenusWork) && !_noSaveLoadAllowed && _game.inputEnabled);
}
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index 1df31ff72a..af26fe62d0 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -86,27 +86,30 @@ void Winnie::parseObjHeader(WTP_OBJ_HDR *objHdr, byte *buffer, int len) {
}
uint32 Winnie::readRoom(int iRoom, uint8 *buffer, WTP_ROOM_HDR &roomHdr) {
- char szFile[256] = {0};
+ Common::String fileName;
if (_vm->getPlatform() == Common::kPlatformPC)
- sprintf(szFile, IDS_WTP_ROOM_DOS, iRoom);
+ fileName = Common::String::format(IDS_WTP_ROOM_DOS, iRoom);
else if (_vm->getPlatform() == Common::kPlatformAmiga)
- sprintf(szFile, IDS_WTP_ROOM_AMIGA, iRoom);
+ fileName = Common::String::format(IDS_WTP_ROOM_AMIGA, iRoom);
else if (_vm->getPlatform() == Common::kPlatformC64)
- sprintf(szFile, IDS_WTP_ROOM_C64, iRoom);
+ fileName = Common::String::format(IDS_WTP_ROOM_C64, iRoom);
else if (_vm->getPlatform() == Common::kPlatformApple2GS)
- sprintf(szFile, IDS_WTP_ROOM_APPLE, iRoom);
+ fileName = Common::String::format(IDS_WTP_ROOM_APPLE, iRoom);
+
Common::File file;
- if (!file.open(szFile)) {
- warning ("Could not open file \'%s\'", szFile);
+ if (!file.open(fileName)) {
+ warning("Could not open file \'%s\'", fileName.c_str());
return 0;
}
+
uint32 filelen = file.size();
- if (_vm->getPlatform() == Common::kPlatformC64) { //Skip the loading address
+ if (_vm->getPlatform() == Common::kPlatformC64) { // Skip the loading address
filelen -= 2;
file.seek(2, SEEK_CUR);
}
- memset(buffer, 0, sizeof(buffer));
+
+ memset(buffer, 0, 4096);
file.read(buffer, filelen);
file.close();
@@ -116,26 +119,30 @@ uint32 Winnie::readRoom(int iRoom, uint8 *buffer, WTP_ROOM_HDR &roomHdr) {
}
uint32 Winnie::readObj(int iObj, uint8 *buffer) {
- char szFile[256] = {0};
+ Common::String fileName;
+
if (_vm->getPlatform() == Common::kPlatformPC)
- sprintf(szFile, IDS_WTP_OBJ_DOS, iObj);
+ fileName = Common::String::format(IDS_WTP_OBJ_DOS, iObj);
else if (_vm->getPlatform() == Common::kPlatformAmiga)
- sprintf(szFile, IDS_WTP_OBJ_AMIGA, iObj);
+ fileName = Common::String::format(IDS_WTP_OBJ_AMIGA, iObj);
else if (_vm->getPlatform() == Common::kPlatformC64)
- sprintf(szFile, IDS_WTP_OBJ_C64, iObj);
+ fileName = Common::String::format(IDS_WTP_OBJ_C64, iObj);
else if (_vm->getPlatform() == Common::kPlatformApple2GS)
- sprintf(szFile, IDS_WTP_OBJ_APPLE, iObj);
+ fileName = Common::String::format(IDS_WTP_OBJ_APPLE, iObj);
+
Common::File file;
- if (!file.open(szFile)) {
- warning ("Could not open file \'%s\'", szFile);
+ if (!file.open(fileName)) {
+ warning ("Could not open file \'%s\'", fileName.c_str());
return 0;
}
+
uint32 filelen = file.size();
- if (_vm->getPlatform() == Common::kPlatformC64) { //Skip the loading address
+ if (_vm->getPlatform() == Common::kPlatformC64) { // Skip the loading address
filelen -= 2;
file.seek(2, SEEK_CUR);
}
- memset(buffer, 0, sizeof(buffer));
+
+ memset(buffer, 0, 2048);
file.read(buffer, filelen);
file.close();
return filelen;
@@ -461,8 +468,6 @@ void Winnie::keyHelp() {
}
void Winnie::inventory() {
- char szMissing[41] = {0};
-
if (_game.iObjHave)
printObjStr(_game.iObjHave, IDI_WTP_OBJ_TAKE);
else {
@@ -470,8 +475,9 @@ void Winnie::inventory() {
_vm->drawStr(IDI_WTP_ROW_MENU, IDI_WTP_COL_MENU, IDA_DEFAULT, IDS_WTP_INVENTORY_0);
}
- sprintf(szMissing, IDS_WTP_INVENTORY_1, _game.nObjMiss);
- _vm->drawStr(IDI_WTP_ROW_OPTION_4, IDI_WTP_COL_MENU, IDA_DEFAULT, szMissing);
+ Common::String missing = Common::String::format(IDS_WTP_INVENTORY_1, _game.nObjMiss);
+
+ _vm->drawStr(IDI_WTP_ROW_OPTION_4, IDI_WTP_COL_MENU, IDA_DEFAULT, missing.c_str());
_vm->_gfx->doUpdate();
_vm->_system->updateScreen(); //TODO: Move to game's main loop
_vm->getSelection(kSelAnyKey);
@@ -1042,16 +1048,15 @@ phase2:
}
void Winnie::drawPic(const char *szName) {
- char szFile[256] = {0};
- Common::File file;
+ Common::String fileName = szName;
- // construct filename
if (_vm->getPlatform() != Common::kPlatformAmiga)
- sprintf(szFile, "%s.pic", szName);
- else
- strcpy(szFile, szName);
- if (!file.open(szFile)) {
- warning ("Could not open file \'%s\'", szFile);
+ fileName += ".pic";
+
+ Common::File file;
+
+ if (!file.open(fileName)) {
+ warning ("Could not open file \'%s\'", fileName.c_str());
return;
}
@@ -1142,12 +1147,11 @@ void Winnie::gameOver() {
}
void Winnie::saveGame() {
- Common::OutSaveFile* outfile;
- char szFile[256] = {0};
int i = 0;
- sprintf(szFile, IDS_WTP_FILE_SAVEGAME);
- if (!(outfile = _vm->getSaveFileMan()->openForSaving(szFile)))
+ Common::OutSaveFile *outfile = _vm->getSaveFileMan()->openForSaving(IDS_WTP_FILE_SAVEGAME);
+
+ if (!outfile)
return;
outfile->writeUint32BE(MKTAG('W','I','N','N')); // header
@@ -1171,19 +1175,18 @@ void Winnie::saveGame() {
outfile->finalize();
if (outfile->err())
- warning("Can't write file '%s'. (Disk full?)", szFile);
+ warning("Can't write file '%s'. (Disk full?)", IDS_WTP_FILE_SAVEGAME);
delete outfile;
}
void Winnie::loadGame() {
- Common::InSaveFile* infile;
- char szFile[256] = {0};
int saveVersion = 0;
int i = 0;
- sprintf(szFile, IDS_WTP_FILE_SAVEGAME);
- if (!(infile = _vm->getSaveFileMan()->openForLoading(szFile)))
+ Common::InSaveFile *infile = _vm->getSaveFileMan()->openForLoading(IDS_WTP_FILE_SAVEGAME);
+
+ if (!infile)
return;
if (infile->readUint32BE() == MKTAG('W','I','N','N')) {
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index aa338db0f2..f2d7af32da 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -144,7 +144,7 @@ void SoundMgr::stopSound() {
// not be any harm doing it, so do it anyway.
if (_endflag != -1)
_vm->setflag(_endflag, true);
-
+
_endflag = -1;
}
diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp
index 3c8a3dfc8d..38e256aa4b 100644
--- a/engines/agi/sound_2gs.cpp
+++ b/engines/agi/sound_2gs.cpp
@@ -167,12 +167,12 @@ uint SoundGen2GS::generateOutput() {
g->seg++;
}
}
-
+
// TODO: Advance vibrato here. The Apple IIGS uses a LFO with
// triangle wave to modulate the frequency of both oscillators.
// In Apple IIGS the vibrato and the envelope are updated at the
// same time, so the vibrato speed depends on ENVELOPE_COEF.
-
+
// Advance oscillators
int s0 = 0;
int s1 = 0;
@@ -202,12 +202,12 @@ uint SoundGen2GS::generateOutput() {
}
}
}
-
+
// Take envelope and MIDI volume information into account.
// Also amplify.
s0 *= vol * g->vel / 127 * 80 / 256;
s1 *= vol * g->vel / 127 * 80 / 256;
-
+
// Select output channel.
if (g->osc[0].chn)
outl += s0;
@@ -375,7 +375,7 @@ void SoundGen2GS::midiNoteOn(int channel, int note, int velocity) {
IIgsGenerator* g = allocateGenerator();
g->ins = _channels[channel].getInstrument();
const IIgsInstrumentHeader* i = g->ins;
-
+
// Pass information from the MIDI channel to the generator. Take
// velocity into account, although simplistically.
velocity *= 5 / 3;
@@ -385,7 +385,7 @@ void SoundGen2GS::midiNoteOn(int channel, int note, int velocity) {
g->key = note;
g->vel = velocity * _channels[channel].getVolume() / 127;
g->chn = channel;
-
+
// Instruments can define different samples to be used based on
// what the key is. Find the correct samples for our key.
int wa = 0;
diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h
index 1a225300ae..9123e18415 100644
--- a/engines/agi/sound_2gs.h
+++ b/engines/agi/sound_2gs.h
@@ -33,7 +33,7 @@ namespace Agi {
// Apple IIGS to halt the corresponding oscillator immediately. We preprocess
// the sample data by converting it to signed values and the instruments by
// detecting prematurely stopping samples beforehand.
-//
+//
// Note: None of the tested SIERRASTANDARD files have zeroes in them. So in
// practice there is no need to check for them. However, they still do exist
// in the sample resources.
@@ -263,7 +263,7 @@ private:
uint _ticks; ///< MIDI ticks (60Hz)
int16 *_out; ///< Output buffer
uint _outSize; ///< Output buffer size
-
+
static const int kSfxMidiChannel = 15; ///< MIDI channel used for playing sample resources
};
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index d2c99171e2..0cbaa4af86 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -33,7 +33,7 @@
// Timing is not perfect, yet. It plays correct, when I use the
// Gravis-Midiplayer, but the songs are too fast when I use playmidi on
// Linux.
-//
+//
// Original program developed by Jens. Christian Restemeier
//
@@ -114,7 +114,7 @@ void SoundGenMIDI::endOfTrack() {
void SoundGenMIDI::play(int resnum) {
MIDISound *track;
-
+
stop();
_isGM = true;
@@ -153,7 +153,7 @@ unsigned char instr[] = {50, 51, 19};
static void writeDelta(Common::MemoryWriteStreamDynamic *st, int32 delta) {
int32 i;
- i = delta >> 21; if (i > 0) st->writeByte((i & 127) | 128);
+ i = delta >> 21; if (i > 0) st->writeByte((i & 127) | 128);
i = delta >> 14; if (i > 0) st->writeByte((i & 127) | 128);
i = delta >> 7; if (i > 0) st->writeByte((i & 127) | 128);
st->writeByte(delta & 127);
@@ -196,7 +196,7 @@ static uint32 convertSND2MIDI(byte *snddata, byte **data) {
int note;
/* I don't know, what frequency equals midi note 0 ... */
/* This moves the song 4 octaves down: */
- fr = (log10(111860.0 / (double)freq) / ll) - 48;
+ fr = (log10(111860.0 / (double)freq) / ll) - 48;
note = (int)floor(fr + 0.5);
if (note < 0) note = 0;
if (note > 127) note = 127;
@@ -222,7 +222,7 @@ static uint32 convertSND2MIDI(byte *snddata, byte **data) {
st.writeByte(0);
st.writeByte(0);
}
- }
+ }
writeDelta(&st, 0);
st.writeByte(0xff);
st.writeByte(0x2f);
diff --git a/engines/agi/sound_pcjr.h b/engines/agi/sound_pcjr.h
index f50fd0aa82..4317e86516 100644
--- a/engines/agi/sound_pcjr.h
+++ b/engines/agi/sound_pcjr.h
@@ -45,9 +45,9 @@ struct SndGenChan {
uint16 dissolveCount;
byte attenuation;
byte attenuationCopy;
-
+
GenType genType;
-
+
// for the sample mixer
int freqCount;
};
diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp
index fc9a57791c..9ea8569b81 100644
--- a/engines/agi/sound_sarien.cpp
+++ b/engines/agi/sound_sarien.cpp
@@ -105,7 +105,7 @@ SoundGenSarien::~SoundGenSarien() {
int SoundGenSarien::readBuffer(int16 *buffer, const int numSamples) {
fillAudio(buffer, numSamples / 2);
-
+
return numSamples;
}
@@ -124,7 +124,7 @@ void SoundGenSarien::play(int resnum) {
for (int i = 0; i < NUM_CHANNELS; i++) {
_chn[i].type = type;
_chn[i].flags = AGI_SOUND_LOOP;
-
+
if (_env) {
_chn[i].flags |= AGI_SOUND_ENVELOPE;
_chn[i].adsr = AGI_SOUND_ENV_ATTACK;
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index fedfd29362..82a2340ad6 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -504,17 +504,16 @@ int AgiEngine::print(const char *p, int lin, int col, int len) {
*
*/
void AgiEngine::printStatus(const char *message, ...) {
- char x[42];
va_list args;
va_start(args, message);
- vsprintf(x, message, args);
+ Common::String x = Common::String::vformat(message, args);
va_end(args);
debugC(4, kDebugLevelText, "fg=%d, bg=%d", STATUS_FG, STATUS_BG);
- printText(x, 0, 0, _game.lineStatus, 40, STATUS_FG, STATUS_BG);
+ printText(x.c_str(), 0, 0, _game.lineStatus, 40, STATUS_FG, STATUS_BG);
}
static void safeStrcat(Common::String &p, const char *t) {
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index 14159c0147..39f9e0dd92 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -112,11 +112,11 @@ WagFileParser::~WagFileParser() {
bool WagFileParser::checkAgiVersionProperty(const WagProperty &version) const {
if (version.getCode() == WagProperty::PC_INTVERSION && // Must be AGI interpreter version property
version.getSize() >= 3 && // Need at least three characters for a version number like "X.Y"
- isdigit(version.getData()[0]) && // And the first character must be a digit
+ isdigit(static_cast<unsigned char>(version.getData()[0])) && // And the first character must be a digit
(version.getData()[1] == ',' || version.getData()[1] == '.')) { // And the second a comma or a period
for (int i = 2; i < version.getSize(); i++) // And the rest must all be digits
- if (!isdigit(version.getData()[i]))
+ if (!isdigit(static_cast<unsigned char>(version.getData()[i])))
return false; // Bail out if found a non-digit after the decimal point
return true;
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index bde59b71b8..3bd8ce19a3 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -465,8 +465,8 @@ void AGOSEngine_PN::opn_opcode35() {
void AGOSEngine_PN::opn_opcode36() {
for (int i = 0; i < _dataBase[57] + 1; ++i)
_wordcp[i] = 0;
- if (isspace(*_inpp))
- while ((*_inpp) && (isspace(*_inpp)))
+ if (isspace(static_cast<unsigned char>(*_inpp)))
+ while ((*_inpp) && (isspace(static_cast<unsigned char>(*_inpp))))
_inpp++;
if (*_inpp == 0) {
setScriptReturn(false);
@@ -480,7 +480,7 @@ void AGOSEngine_PN::opn_opcode36() {
}
int ct = 1;
- while ((*_inpp != '.') && (*_inpp != ',') && (!isspace(*_inpp)) && (*_inpp != '\0') &&
+ while ((*_inpp != '.') && (*_inpp != ',') && (!isspace(static_cast<unsigned char>(*_inpp))) && (*_inpp != '\0') &&
(*_inpp!='"')) {
if (ct < _dataBase[57])
_wordcp[ct++] = *_inpp;
@@ -580,7 +580,7 @@ void AGOSEngine_PN::opn_opcode46() {
return;
}
x++;
- while ((*x != '.') && (*x != ',') && (*x != '"') && (!isspace(*x)) && (*x != '\0'))
+ while ((*x != '.') && (*x != ',') && (*x != '"') && (!isspace(static_cast<unsigned char>(*x))) && (*x != '\0'))
pcf(*x++);
setScriptReturn(true);
}
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 1cdd7f6d81..410fd5a1ce 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -517,8 +517,7 @@ void AGOSEngine::printScreenText(uint vgaSpriteId, uint color, const char *strin
y -= textHeight;
} else
pos = stringLength;
- padding = (lettersPerRow - pos) % 2 ?
- (lettersPerRow - pos) / 2 + 1 : (lettersPerRow - pos) / 2;
+ padding = ((lettersPerRow - pos) % 2) ? (lettersPerRow - pos) / 2 + 1 : (lettersPerRow - pos) / 2;
while (padding--)
*convertedString2++ = ' ';
stringLength -= pos;
@@ -621,7 +620,7 @@ void AGOSEngine_PuzzlePack::printInfoText(const char *itemText) {
itemName = " Gem: ";
}
break;
-
+
case 82:
if (_variableArray[flag]) {
if (_variableArray[flag] == 201 || _variableArray[flag] == 211)
@@ -723,11 +722,9 @@ void AGOSEngine_Feeble::printScreenText(uint vgaSpriteId, uint color, const char
const char *string2 = string;
int16 height, talkDelay;
int stringLength = strlen(string);
- int lettersPerRow;
const int textHeight = 15;
height = textHeight;
- lettersPerRow = width / 6;
talkDelay = (stringLength + 3) / 3;
if (_variableArray[86] == 0)
@@ -840,13 +837,12 @@ void AGOSEngine_Feeble::printInteractText(uint16 num, const char *string) {
void AGOSEngine_Feeble::sendInteractText(uint16 num, const char *fmt, ...) {
va_list arglist;
- char string[256];
va_start(arglist, fmt);
- vsprintf(string, fmt, arglist);
+ Common::String string = Common::String::vformat(fmt, arglist);
va_end(arglist);
- printInteractText(num, string);
+ printInteractText(num, string.c_str());
}
#endif
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index cffeb29418..ba0251520b 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -141,7 +141,7 @@ SaveStateList CineMetaEngine::listSaves(const char *target) const {
for (file = filenames.begin(); file != filenames.end(); ++file) {
// Jump over savegame files that don't end with a digit (e.g. "fw.3" is ok, "fw.a" is not).
- if (!isdigit(file->lastChar()))
+ if (!isdigit(static_cast<unsigned char>(file->lastChar())))
continue;
// Obtain the last digit of the filename, since they correspond to the save slot
diff --git a/engines/cine/prc.cpp b/engines/cine/prc.cpp
index d86107a8f8..ba9ba70110 100644
--- a/engines/cine/prc.cpp
+++ b/engines/cine/prc.cpp
@@ -98,10 +98,10 @@ bool loadPrc(const char *pPrcName) {
char buffer[256];
for (s = 0; s < numScripts; s++) {
- if (scriptTable[s]->_size) {
+ if (g_cine->_scriptTable[s]->_size) {
sprintf(buffer, "%s_%03d.txt", pPrcName, s);
- decompileScript((const byte *)scriptTable[s]->getString(0), scriptTable[s]->_size, s);
+ decompileScript((const byte *)g_cine->_scriptTable[s]->getString(0), g_cine->_scriptTable[s]->_size, s);
dumpScript(buffer);
}
}
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 81e72d6905..2f0c13740f 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -55,7 +55,7 @@ int16 canUseOnObject = 0;
void waitPlayerInput() {
uint16 button;
-
+
do {
manageEvents();
getMouseData(mouseUpdateStatus, &button, &dummyU16, &dummyU16);
@@ -688,8 +688,6 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X,
int16 di;
uint16 j;
int16 mouseX, mouseY;
- int16 var_16;
- int16 var_14;
int16 currentSelection, oldSelection;
int16 var_4;
SelectionMenu *menu;
@@ -731,9 +729,6 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X,
manageEvents();
getMouseData(mouseUpdateStatus, &button, (uint16 *)&mouseX, (uint16 *)&mouseY);
- var_16 = mouseX;
- var_14 = mouseY;
-
menuVar = 0;
do {
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp
index 1e7e87cf38..4d1284a802 100644
--- a/engines/cruise/background.cpp
+++ b/engines/cruise/background.cpp
@@ -212,7 +212,7 @@ int loadBackground(const char *name, int idx) {
// NOTE: the following is really meant to compare pointers and not the actual
// strings. See r48092 and r48094.
if (name != backgroundTable[idx].name) {
- if (strlen(name) >= sizeof(backgroundTable[idx].name))
+ if (strlen(name) >= sizeof(backgroundTable[idx].name))
warning("background name length exceeded allowable maximum");
Common::strlcpy(backgroundTable[idx].name, name, sizeof(backgroundTable[idx].name));
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 3f13c6cbff..031c53b96a 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -902,18 +902,8 @@ bool createDialog(int objOvl, int objIdx, int x, int y) {
if (!obj2Ovl) obj2Ovl = j;
char verbe_name[80];
- char obj1_name[80];
- char obj2_name[80];
- char r_verbe_name[80];
- char r_obj1_name[80];
- char r_obj2_name[80];
verbe_name[0] = 0;
- obj1_name[0] = 0;
- obj2_name[0] = 0;
- r_verbe_name[0] = 0;
- r_obj1_name[0] = 0;
- r_obj2_name[0] = 0;
ovlDataStruct *ovl2 = NULL;
ovlDataStruct *ovl3 = NULL;
@@ -1882,7 +1872,7 @@ void CruiseEngine::mainLoop() {
while (numIterations-- > 0) {
bgChanged = backgroundChanged[masterScreen];
-
+
manageScripts(&relHead);
manageScripts(&procHead);
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 814d0aa9e9..14b6daf4bb 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -440,7 +440,6 @@ void buildSegment() {
// is segment on screen ?
if (!((tempAX > 199) || (tempDX < 0))) {
- int dx = Y1;
int cx = X2 - X1;
if (cx == 0) {
// vertical line
@@ -473,7 +472,6 @@ void buildSegment() {
} else {
if (cx < 0) {
cx = -cx;
- dx = Y2;
SWAP(X1, X2);
SWAP(Y1, Y2);
@@ -1490,9 +1488,6 @@ void mainDraw(int16 param) {
if (currentObjPtr->animLoop > 0)
currentObjPtr->animLoop--;
} else {
- int16 data2;
- data2 = currentObjPtr->animStart;
-
change = false;
currentObjPtr->animStep = 0;
@@ -1512,9 +1507,6 @@ void mainDraw(int16 param) {
if (currentObjPtr->animLoop > 0)
currentObjPtr->animLoop--;
} else {
- int16 data2;
- data2 = currentObjPtr->animStart;
-
change = false;
currentObjPtr->animStep = 0;
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp
index 4e76194a45..cf28548e7d 100644
--- a/engines/cruise/script.cpp
+++ b/engines/cruise/script.cpp
@@ -231,9 +231,7 @@ int32 opcodeType2() {
int type = getByteFromScript();
int overlay = getByteFromScript();
- int firstOffset;
- int offset;
- firstOffset = offset = getShortFromScript();
+ int offset = getShortFromScript();
offset += index;
int typ7 = type & 7;
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 531cf32dbc..1a077e5bf7 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -173,7 +173,7 @@ void MainMenuDialog::reflowLayout() {
_loadButton->setEnabled(_engine->canLoadGameStateCurrently());
if (_engine->hasFeature(Engine::kSupportsSavingDuringRuntime))
_saveButton->setEnabled(_engine->canSaveGameStateCurrently());
-
+
// Overlay size might have changed since the construction of the dialog.
// Update labels when it might be needed
// FIXME: it might be better to declare GUI::StaticTextWidget::setLabel() virtual
@@ -246,14 +246,10 @@ void MainMenuDialog::load() {
int slot = _loadDialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
- if (slot >= 0) {
- // FIXME: For now we just ignore the return
- // value, which is quite bad since it could
- // be a fatal loading error, which renders
- // the engine unusable.
- _engine->loadGameState(slot);
+ _engine->setGameToLoadSlot(slot);
+
+ if (slot >= 0)
close();
- }
}
enum {
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index c4df9d9dde..8ff60033ed 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -1160,9 +1160,7 @@ void Script::run(const GPL2Program &program, uint16 offset) {
}
}
} else {
- debugC(1, kDraciBytecodeDebugLevel, "Unknown opcode %d, %d",
- num, subnum);
- abort();
+ error("Unknown opcode %d, %d", num, subnum);
}
GPLHandler handler = cmd->_handler;
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index 106167ef8a..d534f46a6e 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -67,8 +67,12 @@ void LegacySoundArchive::openArchive(const char *path) {
debugC(1, kDraciArchiverDebugLevel, "Loading header");
uint totalLength = _f->readUint32LE();
+
const uint kMaxSamples = 4095; // The no-sound file is exactly 16K bytes long, so don't fail on short reads
- uint sampleStarts[kMaxSamples];
+ uint *sampleStarts = (uint *)malloc(kMaxSamples * sizeof(uint));
+ if (!sampleStarts)
+ error("[LegacySoundArchive::openArchive] Cannot allocate buffer for no-sound file");
+
for (uint i = 0; i < kMaxSamples; ++i) {
sampleStarts[i] = _f->readUint32LE();
}
@@ -90,17 +94,22 @@ void LegacySoundArchive::openArchive(const char *path) {
}
if (_samples[_sampleCount-1]._offset + _samples[_sampleCount-1]._length != totalLength &&
_samples[_sampleCount-1]._offset + _samples[_sampleCount-1]._length - _samples[0]._offset != totalLength) {
- // WORKAROUND: the stored length is stored with the header for sounds and without the hader for dubbing. Crazy.
+ // WORKAROUND: the stored length is stored with the header for sounds and without the header for dubbing. Crazy.
debugC(1, kDraciArchiverDebugLevel, "Broken sound archive: %d != %d",
_samples[_sampleCount-1]._offset + _samples[_sampleCount-1]._length,
totalLength);
closeArchive();
+
+ free(sampleStarts);
+
return;
}
} else {
debugC(1, kDraciArchiverDebugLevel, "Archive info: empty");
}
+ free(sampleStarts);
+
// Indicate that the archive has been successfully opened
_opened = true;
}
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 2249a49e4d..6ba5597e8a 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -243,7 +243,7 @@ static const DrasculaGameDescription gameDescriptions[] = {
GUIO_NONE
},
},
-
+
{
// Drascula French version (ScummVM repacked files)
{
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index d133b3609d..9ea20e3e12 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -204,7 +204,7 @@ void DrasculaEngine::copyRect(int xorg, int yorg, int xdes, int ydes, int width,
}
ptr += 320 - width;
}
-
+
}
void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer) {
@@ -354,7 +354,7 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) {
print_abc(msg, x, y);
return;
}
-
+
// Message doesn't fit on screen, split it
// Get a word from the message
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index eb36baed18..e3a97087c0 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -159,7 +159,7 @@ void DrasculaEngine::enterName() {
key = getScan();
if (key != 0) {
- if (key >= 0 && key <= 0xFF && isalpha(key))
+ if (key >= 0 && key <= 0xFF && isalpha(static_cast<unsigned char>(key)))
select2[v] = tolower(key);
else if ((key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) || key == Common::KEYCODE_SPACE)
select2[v] = key;
diff --git a/engines/drascula/resource.cpp b/engines/drascula/resource.cpp
index bda25113b7..6da43e7cba 100644
--- a/engines/drascula/resource.cpp
+++ b/engines/drascula/resource.cpp
@@ -45,7 +45,7 @@ TextResourceParser::TextResourceParser(Common::SeekableReadStream *stream, Dispo
_stream(stream), _dispose(dispose) {
// NOTE: strangely enough, the code before this refactoring used the size of
- // the stream as a fixed maximum length for the parser. Using an updated
+ // the stream as a fixed maximum length for the parser. Using an updated
// (size-pos) would make more sense to me, but let's see what the experts say.
_maxLen = _stream->size();
}
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 50d44bab79..9f725b6d76 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -1675,7 +1675,7 @@ void DrasculaEngine::enterRoom(int roomIndex) {
if (!stream) {
error("missing data file %s", fileName);
}
-
+
TextResourceParser p(stream, DisposeAfterUse::YES);
p.parseInt(roomNumber);
diff --git a/engines/dreamweb/README b/engines/dreamweb/README
new file mode 100644
index 0000000000..d184613249
--- /dev/null
+++ b/engines/dreamweb/README
@@ -0,0 +1,12 @@
+
+WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
+Some files(dreamgen.*) in this directory is auto-generated. This means
+(at least for some time) any changes to them will be lost.
+
+Please look into /devtools/tasmrecover directory, patch assembler source
+or translator and run ./tasm-recover script.
+
+Then copy dreamgen.cpp/dreamgen.h to engine/dreamweb and check the diffs.
+
+If you'd like to reimplement something, blacklist it, then run script.
diff --git a/engines/dreamweb/console.cpp b/engines/dreamweb/console.cpp
new file mode 100644
index 0000000000..d415089a48
--- /dev/null
+++ b/engines/dreamweb/console.cpp
@@ -0,0 +1,33 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "dreamweb/console.h"
+
+namespace DreamWeb {
+
+DreamWebConsole::DreamWebConsole(DreamWebEngine *vm) : GUI::Debugger(), _vm(vm) {
+}
+
+DreamWebConsole::~DreamWebConsole() {
+}
+
+} // End of namespace DreamWeb
diff --git a/engines/dreamweb/console.h b/engines/dreamweb/console.h
new file mode 100644
index 0000000000..a90794e94e
--- /dev/null
+++ b/engines/dreamweb/console.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 DREAMWEB_CONSOLE_H
+#define DREAMWEB_CONSOLE_H
+
+#include "gui/debugger.h"
+
+namespace DreamWeb {
+
+class DreamWebEngine;
+
+class DreamWebConsole : public GUI::Debugger {
+public:
+ DreamWebConsole(DreamWebEngine *vm);
+ virtual ~DreamWebConsole(void);
+
+private:
+ DreamWebEngine *_vm;
+};
+
+} // End of namespace DreamWeb
+
+#endif
diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp
new file mode 100644
index 0000000000..81a209de25
--- /dev/null
+++ b/engines/dreamweb/detection.cpp
@@ -0,0 +1,144 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "common/algorithm.h"
+#include "common/system.h"
+
+#include "dreamweb/dreamweb.h"
+
+static const PlainGameDescriptor dreamWebGames[] = {
+ { "dreamweb", "DreamWeb" },
+ { 0, 0 }
+};
+
+#include "dreamweb/detection_tables.h"
+
+class DreamWebMetaEngine : public AdvancedMetaEngine {
+public:
+ DreamWebMetaEngine():
+ AdvancedMetaEngine(DreamWeb::gameDescriptions,
+ sizeof(DreamWeb::DreamWebGameDescription), dreamWebGames) {
+ _singleid = "dreamweb";
+ _guioptions = Common::GUIO_NOMIDI | Common::GUIO_NOLAUNCHLOAD;
+ }
+
+ virtual const char *getName() const {
+ return "DreamWeb engine";
+ }
+
+ virtual const char *getOriginalCopyright() const {
+ return "DreamWeb (C) Creative Reality";
+ }
+
+ virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
+ virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
+ virtual void removeSaveState(const char *target, int slot) const;
+};
+
+bool DreamWebMetaEngine::hasFeature(MetaEngineFeature f) const {
+ switch(f) {
+ case kSupportsListSaves:
+ //case kSupportsLoadingDuringStartup:
+ //case kSupportsDeleteSave:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool DreamWeb::DreamWebEngine::hasFeature(EngineFeature f) const {
+ switch(f) {
+ case kSupportsRTL:
+ return true;
+ case kSupportsSubtitleOptions:
+ return _gameDescription->desc.flags & ADGF_CD;
+ default:
+ return false;
+ }
+ return false;
+}
+
+bool DreamWebMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
+ const DreamWeb::DreamWebGameDescription *gd = (const DreamWeb::DreamWebGameDescription *)desc;
+ if (gd) {
+ *engine = new DreamWeb::DreamWebEngine(syst, gd);
+ }
+ return gd != 0;
+}
+
+SaveStateList DreamWebMetaEngine::listSaves(const char *target) const {
+ Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
+ Common::StringArray files = saveFileMan->listSavefiles("DREAMWEB.D??");
+ Common::sort(files.begin(), files.end());
+
+ SaveStateList saveList;
+ for(uint i = 0; i < files.size(); ++i) {
+ const Common::String &file = files[i];
+ Common::InSaveFile *stream = saveFileMan->openForLoading(file);
+ if (!stream)
+ error("cannot open save file %s", file.c_str());
+ char name[17] = {};
+ stream->seek(0x61);
+ stream->read(name, sizeof(name) - 1);
+ delete stream;
+
+ SaveStateDescriptor sd(i, name);
+ saveList.push_back(sd);
+ }
+
+ return saveList;
+}
+
+int DreamWebMetaEngine::getMaximumSaveSlot() const { return 6; }
+
+void DreamWebMetaEngine::removeSaveState(const char *target, int slot) const {
+}
+
+#if PLUGIN_ENABLED_DYNAMIC(DREAMWEB)
+ REGISTER_PLUGIN_DYNAMIC(DREAMWEB, PLUGIN_TYPE_ENGINE, DreamWebMetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(DREAMWEB, PLUGIN_TYPE_ENGINE, DreamWebMetaEngine);
+#endif
+
+namespace DreamWeb {
+
+Common::Error DreamWebEngine::loadGameState(int slot) {
+ return Common::kNoError;
+}
+
+Common::Error DreamWebEngine::saveGameState(int slot, const Common::String &desc) {
+ return Common::kNoError;
+}
+
+bool DreamWebEngine::canLoadGameStateCurrently() {
+ return false;
+}
+
+bool DreamWebEngine::canSaveGameStateCurrently() {
+ return false;
+}
+
+} // End of namespace DreamWeb
diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h
new file mode 100644
index 0000000000..82fb6102e4
--- /dev/null
+++ b/engines/dreamweb/detection_tables.h
@@ -0,0 +1,189 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 DREAMWEB_DETECTION_TABLES_H
+#define DREAMWEB_DETECTION_TABLES_H
+
+namespace DreamWeb {
+
+using Common::GUIO_NONE;
+
+static const DreamWebGameDescription gameDescriptions[] = {
+ // International floppy release
+ {
+ {
+ "dreamweb",
+ "",
+ {
+ {"dreamweb.r00", 0, "3b5c87717fc40cc5a5ae19c155662ee3", 152918},
+ {"dreamweb.r02", 0, "28458718167a040d7e988cf7d2298eae", 210466},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ // International CD release
+ {
+ {
+ "dreamweb",
+ "CD",
+ {
+ {"dreamweb.r00", 0, "3b5c87717fc40cc5a5ae19c155662ee3", 152918},
+ {"dreamweb.r02", 0, "d6fe5e3590ec1eea42ff65c10b023e0f", 198681},
+ AD_LISTEND
+ },
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_CD | ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ // US CD release
+ {
+ {
+ "dreamweb",
+ "CD",
+ {
+ {"dreamweb.r00", 0, "8acafd7f4418d08d0e16b65b8b10bc50", 152983},
+ {"dreamweb.r02", 0, "c0c363715ddf14ab54f2379906a3aa01", 198707},
+ AD_LISTEND
+ },
+ Common::EN_USA,
+ Common::kPlatformPC,
+ ADGF_CD,
+ GUIO_NONE
+ },
+ },
+
+ // French CD release
+ {
+ {
+ "dreamweb",
+ "CD",
+ {
+ {"dreamwfr.r00", 0, "e354582a8564faf5c515df92f207e8d1", 154657},
+ {"dreamwfr.r02", 0, "57f3f08d5aefd04184eac76927eced80", 200575},
+ AD_LISTEND
+ },
+ Common::FR_FRA,
+ Common::kPlatformPC,
+ ADGF_CD | ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ // German floppy release
+ {
+ {
+ "dreamweb",
+ "",
+ {
+ {"dreamweb.r00", 0, "9960dc3baddabc6ad2a6fd75292b149c", 155886},
+ {"dreamweb.r02", 0, "48e1f42a53402f963ca2d1ed969f4084", 212823},
+ AD_LISTEND
+ },
+ Common::DE_DEU,
+ Common::kPlatformPC,
+ ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ // German CD release
+ {
+ {
+ "dreamweb",
+ "CD",
+ {
+ {"dreamweb.r00", 0, "9960dc3baddabc6ad2a6fd75292b149c", 155886},
+ {"dreamweb.r02", 0, "076ca7cd326cb2abfb2091c6cf46ae08", 201038},
+ AD_LISTEND
+ },
+ Common::DE_DEU,
+ Common::kPlatformPC,
+ ADGF_CD | ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ // Spanish floppy release
+ {
+ {
+ "dreamweb",
+ "",
+ {
+ {"dreamweb.r00", 0, "2df07174321de39c4f17c9ff654b268a", 153608},
+ {"dreamweb.r02", 0, "f97d435ad5da08fb1bcf6ea3dd6e0b9e", 199499},
+ AD_LISTEND
+ },
+ Common::ES_ESP,
+ Common::kPlatformPC,
+ ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ // Spanish CD release
+ {
+ {
+ "dreamweb",
+ "CD",
+ {
+ {"dreamwsp.r00", 0, "2df07174321de39c4f17c9ff654b268a", 153608},
+ {"dreamwsp.r02", 0, "577d435ad5da08fb1bcf6ea3dd6e0b9e", 199499},
+ AD_LISTEND
+ },
+ Common::ES_ESP,
+ Common::kPlatformPC,
+ ADGF_CD | ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ // Italian floppy release
+ {
+ {
+ "dreamweb",
+ "",
+ {
+ {"dreamweb.r00", 0, "66dcab08354232f423c590156335f819", 155448},
+ {"dreamweb.r02", 0, "87a026e9f80ed4f94169381f871ee305", 199676},
+ AD_LISTEND
+ },
+ Common::IT_ITA,
+ Common::kPlatformPC,
+ ADGF_UNSTABLE,
+ GUIO_NONE
+ },
+ },
+
+ { AD_TABLE_END_MARKER }
+};
+
+} // End of namespace DreamWeb
+
+#endif
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
new file mode 100644
index 0000000000..3c10ea69d1
--- /dev/null
+++ b/engines/dreamweb/dreamgen.cpp
@@ -0,0 +1,22108 @@
+/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */
+
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "dreamgen.h"
+
+namespace DreamGen {
+
+void DreamGenContext::alleybarksound() {
+ STACK_CHECK;
+ ax = es.word(bx+3);
+ _dec(ax);
+ _cmp(ax, 0);
+ if (!flags.z())
+ goto nobark;
+ push(bx);
+ push(es);
+ al = 14;
+ playchannel1();
+ es = pop();
+ bx = pop();
+ ax = 1000;
+nobark:
+ es.word(bx+3) = ax;
+}
+
+void DreamGenContext::intromusic() {
+ STACK_CHECK;
+}
+
+void DreamGenContext::foghornsound() {
+ STACK_CHECK;
+ randomnumber();
+ _cmp(al, 198);
+ if (!flags.z())
+ return /* (nofog) */;
+ al = 13;
+ playchannel1();
+}
+
+void DreamGenContext::receptionist() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto gotrecep;
+ _cmp(data.byte(kCardpassflag), 1);
+ if (!flags.z())
+ goto notsetcard;
+ _inc(data.byte(kCardpassflag));
+ es.byte(bx+7) = 1;
+ es.word(bx+3) = 64;
+notsetcard:
+ _cmp(es.word(bx+3), 58);
+ if (!flags.z())
+ goto notdes1;
+ randomnumber();
+ _cmp(al, 30);
+ if (flags.c())
+ goto notdes2;
+ es.word(bx+3) = 55;
+ goto gotrecep;
+notdes1:
+ _cmp(es.word(bx+3), 60);
+ if (!flags.z())
+ goto notdes2;
+ randomnumber();
+ _cmp(al, 240);
+ if (flags.c())
+ goto gotrecep;
+ es.word(bx+3) = 53;
+ goto gotrecep;
+notdes2:
+ _cmp(es.word(bx+3), 88);
+ if (!flags.z())
+ goto notendcard;
+ es.word(bx+3) = 53;
+ goto gotrecep;
+notendcard:
+ _inc(es.word(bx+3));
+gotrecep:
+ showgamereel();
+ addtopeoplelist();
+ al = es.byte(bx+7);
+ _and(al, 128);
+ if (flags.z())
+ return /* (nottalkedrecep) */;
+ data.byte(kTalkedtorecep) = 1;
+}
+
+void DreamGenContext::smokebloke() {
+ STACK_CHECK;
+ _cmp(data.byte(kRockstardead), 0);
+ if (!flags.z())
+ goto notspokento;
+ al = es.byte(bx+7);
+ _and(al, 128);
+ if (flags.z())
+ goto notspokento;
+ push(es);
+ push(bx);
+ al = 5;
+ setlocation();
+ bx = pop();
+ es = pop();
+notspokento:
+ checkspeed();
+ if (!flags.z())
+ goto gotsmokeb;
+ _cmp(es.word(bx+3), 100);
+ if (!flags.z())
+ goto notsmokeb1;
+ randomnumber();
+ _cmp(al, 30);
+ if (flags.c())
+ goto notsmokeb2;
+ es.word(bx+3) = 96;
+ goto gotsmokeb;
+notsmokeb1:
+ _cmp(es.word(bx+3), 117);
+ if (!flags.z())
+ goto notsmokeb2;
+ es.word(bx+3) = 96;
+ goto gotsmokeb;
+notsmokeb2:
+ _inc(es.word(bx+3));
+gotsmokeb:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::attendant() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+ al = es.byte(bx+7);
+ _and(al, 128);
+ if (flags.z())
+ return /* (nottalked) */;
+ data.byte(kTalkedtoattendant) = 1;
+}
+
+void DreamGenContext::manasleep() {
+ STACK_CHECK;
+ al = es.byte(bx+7);
+ _and(al, 127);
+ es.byte(bx+7) = al;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::eden() {
+ STACK_CHECK;
+ _cmp(data.byte(kGeneraldead), 0);
+ if (!flags.z())
+ return /* (notinbed) */;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::edeninbath() {
+ STACK_CHECK;
+ _cmp(data.byte(kGeneraldead), 0);
+ if (flags.z())
+ return /* (notinbath) */;
+ _cmp(data.byte(kSartaindead), 0);
+ if (!flags.z())
+ return /* (notinbath) */;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::malefan() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::femalefan() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::louis() {
+ STACK_CHECK;
+ _cmp(data.byte(kRockstardead), 0);
+ if (!flags.z())
+ return /* (notlouis1) */;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::louischair() {
+ STACK_CHECK;
+ _cmp(data.byte(kRockstardead), 0);
+ if (flags.z())
+ return /* (notlouis2) */;
+ checkspeed();
+ if (!flags.z())
+ goto notlouisanim;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 191);
+ if (flags.z())
+ goto restartlouis;
+ _cmp(ax, 185);
+ if (flags.z())
+ goto randomlouis;
+ es.word(bx+3) = ax;
+ goto notlouisanim;
+randomlouis:
+ es.word(bx+3) = ax;
+ randomnumber();
+ _cmp(al, 245);
+ if (!flags.c())
+ goto notlouisanim;
+restartlouis:
+ ax = 182;
+ es.word(bx+3) = ax;
+notlouisanim:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::manasleep2() {
+ STACK_CHECK;
+ al = es.byte(bx+7);
+ _and(al, 127);
+ es.byte(bx+7) = al;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::mansatstill() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::tattooman() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::drinker() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto gotdrinker;
+ _inc(es.word(bx+3));
+ _cmp(es.word(bx+3), 115);
+ if (!flags.z())
+ goto notdrinker1;
+ es.word(bx+3) = 105;
+ goto gotdrinker;
+notdrinker1:
+ _cmp(es.word(bx+3), 106);
+ if (!flags.z())
+ goto gotdrinker;
+ randomnumber();
+ _cmp(al, 3);
+ if (flags.c())
+ goto gotdrinker;
+ es.word(bx+3) = 105;
+gotdrinker:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::bartender() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto gotsmoket;
+ _cmp(es.word(bx+3), 86);
+ if (!flags.z())
+ goto notsmoket1;
+ randomnumber();
+ _cmp(al, 18);
+ if (flags.c())
+ goto notsmoket2;
+ es.word(bx+3) = 81;
+ goto gotsmoket;
+notsmoket1:
+ _cmp(es.word(bx+3), 103);
+ if (!flags.z())
+ goto notsmoket2;
+ es.word(bx+3) = 81;
+ goto gotsmoket;
+notsmoket2:
+ _inc(es.word(bx+3));
+gotsmoket:
+ showgamereel();
+ _cmp(data.byte(kGunpassflag), 1);
+ if (!flags.z())
+ goto notgotgun;
+ es.byte(bx+7) = 9;
+notgotgun:
+ addtopeoplelist();
+}
+
+void DreamGenContext::othersmoker() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::barwoman() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::interviewer() {
+ STACK_CHECK;
+ _cmp(data.word(kReeltowatch), 68);
+ if (!flags.z())
+ goto notgeneralstart;
+ _inc(es.word(bx+3));
+notgeneralstart:
+ _cmp(es.word(bx+3), 250);
+ if (flags.z())
+ goto talking;
+ checkspeed();
+ if (!flags.z())
+ goto talking;
+ _cmp(es.word(bx+3), 259);
+ if (flags.z())
+ goto talking;
+ _inc(es.word(bx+3));
+talking:
+ showgamereel();
+}
+
+void DreamGenContext::soldier1() {
+ STACK_CHECK;
+ _cmp(es.word(bx+3), 0);
+ if (flags.z())
+ goto soldierwait;
+ data.word(kWatchingtime) = 10;
+ _cmp(es.word(bx+3), 30);
+ if (!flags.z())
+ goto notaftersshot;
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 40);
+ if (!flags.z())
+ goto gotsoldframe;
+ data.byte(kMandead) = 2;
+ goto gotsoldframe;
+notaftersshot:
+ checkspeed();
+ if (!flags.z())
+ goto gotsoldframe;
+ _inc(es.word(bx+3));
+ goto gotsoldframe;
+soldierwait:
+ _cmp(data.byte(kLastweapon), 1);
+ if (!flags.z())
+ goto gotsoldframe;
+ data.word(kWatchingtime) = 10;
+ _cmp(data.byte(kManspath), 2);
+ if (!flags.z())
+ goto gotsoldframe;
+ _cmp(data.byte(kFacing), 4);
+ if (!flags.z())
+ goto gotsoldframe;
+ _inc(es.word(bx+3));
+ data.byte(kLastweapon) = -1;
+ data.byte(kCombatcount) = 0;
+gotsoldframe:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::rockstar() {
+ STACK_CHECK;
+ ax = es.word(bx+3);
+ _cmp(ax, 303);
+ if (flags.z())
+ goto rockcombatend;
+ _cmp(ax, 118);
+ if (flags.z())
+ goto rockcombatend;
+ checkspeed();
+ if (!flags.z())
+ goto rockspeed;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 118);
+ if (!flags.z())
+ goto notbeforedead;
+ data.byte(kMandead) = 2;
+ goto gotrockframe;
+notbeforedead:
+ _cmp(ax, 79);
+ if (!flags.z())
+ goto gotrockframe;
+ _dec(ax);
+ _cmp(data.byte(kLastweapon), 1);
+ if (!flags.z())
+ goto notgunonrock;
+ data.byte(kLastweapon) = -1;
+ ax = 123;
+ goto gotrockframe;
+notgunonrock:
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 40);
+ if (!flags.z())
+ goto gotrockframe;
+ data.byte(kCombatcount) = 0;
+ ax = 79;
+gotrockframe:
+ es.word(bx+3) = ax;
+rockspeed:
+ showgamereel();
+ _cmp(es.word(bx+3), 78);
+ if (!flags.z())
+ goto notalkrock;
+ addtopeoplelist();
+ data.byte(kPointermode) = 2;
+ data.word(kWatchingtime) = 0;
+ return;
+notalkrock:
+ data.word(kWatchingtime) = 2;
+ data.byte(kPointermode) = 0;
+ al = data.byte(kMapy);
+ es.byte(bx+2) = al;
+ return;
+rockcombatend:
+ data.byte(kNewlocation) = 45;
+ showgamereel();
+}
+
+void DreamGenContext::helicopter() {
+ STACK_CHECK;
+ ax = es.word(bx+3);
+ _cmp(ax, 203);
+ if (flags.z())
+ goto heliwon;
+ checkspeed();
+ if (!flags.z())
+ goto helispeed;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 53);
+ if (!flags.z())
+ goto notbeforehdead;
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 8);
+ if (flags.c())
+ goto waitabit;
+ data.byte(kMandead) = 2;
+waitabit:
+ ax = 49;
+ goto gotheliframe;
+notbeforehdead:
+ _cmp(ax, 9);
+ if (!flags.z())
+ goto gotheliframe;
+ _dec(ax);
+ _cmp(data.byte(kLastweapon), 1);
+ if (!flags.z())
+ goto notgunonheli;
+ data.byte(kLastweapon) = -1;
+ ax = 55;
+ goto gotheliframe;
+notgunonheli:
+ ax = 5;
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 20);
+ if (!flags.z())
+ goto gotheliframe;
+ data.byte(kCombatcount) = 0;
+ ax = 9;
+gotheliframe:
+ es.word(bx+3) = ax;
+helispeed:
+ showgamereel();
+ al = data.byte(kMapx);
+ es.byte(bx+1) = al;
+ ax = es.word(bx+3);
+ _cmp(ax, 9);
+ if (!flags.c())
+ goto notwaitingheli;
+ _cmp(data.byte(kCombatcount), 7);
+ if (flags.c())
+ goto notwaitingheli;
+ data.byte(kPointermode) = 2;
+ data.word(kWatchingtime) = 0;
+ return;
+notwaitingheli:
+ data.byte(kPointermode) = 0;
+ data.word(kWatchingtime) = 2;
+ return;
+heliwon:
+ data.byte(kPointermode) = 0;
+}
+
+void DreamGenContext::mugger() {
+ STACK_CHECK;
+ ax = es.word(bx+3);
+ _cmp(ax, 138);
+ if (flags.z())
+ goto endmugger1;
+ _cmp(ax, 176);
+ if (flags.z())
+ return /* (endmugger2) */;
+ _cmp(ax, 2);
+ if (!flags.z())
+ goto havesetwatch;
+ data.word(kWatchingtime) = 175*2;
+havesetwatch:
+ checkspeed();
+ if (!flags.z())
+ goto notmugger;
+ _inc(es.word(bx+3));
+notmugger:
+ showgamereel();
+ al = data.byte(kMapx);
+ es.byte(bx+1) = al;
+ return;
+endmugger1:
+ push(es);
+ push(bx);
+ createpanel2();
+ showicon();
+ al = 41;
+ findpuztext();
+ di = 33+20;
+ bx = 104;
+ dl = 241;
+ ah = 0;
+ printdirect();
+ worktoscreen();
+ cx = 300;
+ hangon();
+ bx = pop();
+ es = pop();
+ push(es);
+ push(bx);
+ es.word(bx+3) = 140;
+ data.byte(kManspath) = 2;
+ data.byte(kFinaldest) = 2;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ al = 'W';
+ ah = 'E';
+ cl = 'T';
+ ch = 'A';
+ findexobject();
+ data.byte(kCommand) = al;
+ data.byte(kObjecttype) = 4;
+ removeobfrominv();
+ al = 'W';
+ ah = 'E';
+ cl = 'T';
+ ch = 'B';
+ findexobject();
+ data.byte(kCommand) = al;
+ data.byte(kObjecttype) = 4;
+ removeobfrominv();
+ makemainscreen();
+ al = 48;
+ bl = 68-32;
+ bh = 54+64;
+ cx = 70;
+ dx = 10;
+ setuptimeduse();
+ data.byte(kBeenmugged) = 1;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::aide() {
+ STACK_CHECK;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::businessman() {
+ STACK_CHECK;
+ data.byte(kPointermode) = 0;
+ data.word(kWatchingtime) = 2;
+ ax = es.word(bx+3);
+ _cmp(ax, 2);
+ if (!flags.z())
+ goto notfirstbiz;
+ push(ax);
+ push(bx);
+ push(es);
+ al = 49;
+ cx = 30;
+ dx = 1;
+ bl = 68;
+ bh = 174;
+ setuptimeduse();
+ es = pop();
+ bx = pop();
+ ax = pop();
+notfirstbiz:
+ _cmp(ax, 95);
+ if (flags.z())
+ goto buscombatwonend;
+ _cmp(ax, 49);
+ if (flags.z())
+ return /* (buscombatend) */;
+ checkspeed();
+ if (!flags.z())
+ goto busspeed;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 48);
+ if (!flags.z())
+ goto notbeforedeadb;
+ data.byte(kMandead) = 2;
+ goto gotbusframe;
+notbeforedeadb:
+ _cmp(ax, 15);
+ if (!flags.z())
+ goto buscombatwon;
+ _dec(ax);
+ _cmp(data.byte(kLastweapon), 3);
+ if (!flags.z())
+ goto notshieldonbus;
+ data.byte(kLastweapon) = -1;
+ data.byte(kCombatcount) = 0;
+ ax = 51;
+ goto gotbusframe;
+notshieldonbus:
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 20);
+ if (!flags.z())
+ goto gotbusframe;
+ data.byte(kCombatcount) = 0;
+ ax = 15;
+ goto gotbusframe;
+buscombatwon:
+ _cmp(ax, 91);
+ if (!flags.z())
+ goto gotbusframe;
+ push(bx);
+ push(es);
+ al = 0;
+ turnpathon();
+ al = 1;
+ turnpathon();
+ al = 2;
+ turnpathon();
+ al = 3;
+ turnpathoff();
+ data.byte(kManspath) = 5;
+ data.byte(kFinaldest) = 5;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ es = pop();
+ bx = pop();
+ ax = 92;
+ goto gotbusframe;
+gotbusframe:
+ es.word(bx+3) = ax;
+busspeed:
+ showgamereel();
+ al = data.byte(kMapy);
+ es.byte(bx+2) = al;
+ ax = es.word(bx+3);
+ _cmp(ax, 14);
+ if (!flags.z())
+ return /* (buscombatend) */;
+ data.word(kWatchingtime) = 0;
+ data.byte(kPointermode) = 2;
+ return;
+buscombatwonend:
+ data.byte(kPointermode) = 0;
+ data.word(kWatchingtime) = 0;
+}
+
+void DreamGenContext::poolguard() {
+ STACK_CHECK;
+ ax = es.word(bx+3);
+ _cmp(ax, 214);
+ if (flags.z())
+ goto combatover2;
+ _cmp(ax, 258);
+ if (flags.z())
+ goto combatover2;
+ _cmp(ax, 185);
+ if (flags.z())
+ goto combatover1;
+ _cmp(ax, 0);
+ if (!flags.z())
+ goto notfirstpool;
+ al = 0;
+ turnpathon();
+notfirstpool:
+ checkspeed();
+ if (!flags.z())
+ goto guardspeed;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 122);
+ if (!flags.z())
+ goto notendguard1;
+ _dec(ax);
+ _cmp(data.byte(kLastweapon), 2);
+ if (!flags.z())
+ goto notaxeonpool;
+ data.byte(kLastweapon) = -1;
+ ax = 122;
+ goto gotguardframe;
+notaxeonpool:
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 40);
+ if (!flags.z())
+ goto gotguardframe;
+ data.byte(kCombatcount) = 0;
+ ax = 195;
+ goto gotguardframe;
+notendguard1:
+ _cmp(ax, 147);
+ if (!flags.z())
+ goto gotguardframe;
+ _dec(ax);
+ _cmp(data.byte(kLastweapon), 1);
+ if (!flags.z())
+ goto notgunonpool;
+ data.byte(kLastweapon) = -1;
+ ax = 147;
+ goto gotguardframe;
+notgunonpool:
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 40);
+ if (!flags.z())
+ goto gotguardframe;
+ data.byte(kCombatcount) = 0;
+ ax = 220;
+gotguardframe:
+ es.word(bx+3) = ax;
+guardspeed:
+ showgamereel();
+ ax = es.word(bx+3);
+ _cmp(ax, 121);
+ if (flags.z())
+ goto iswaitingpool;
+ _cmp(ax, 146);
+ if (flags.z())
+ goto iswaitingpool;
+ data.byte(kPointermode) = 0;
+ data.word(kWatchingtime) = 2;
+ return;
+iswaitingpool:
+ data.byte(kPointermode) = 2;
+ data.word(kWatchingtime) = 0;
+ return;
+combatover1:
+ data.word(kWatchingtime) = 0;
+ data.byte(kPointermode) = 0;
+ al = 0;
+ turnpathon();
+ al = 1;
+ turnpathoff();
+ return;
+combatover2:
+ showgamereel();
+ data.word(kWatchingtime) = 2;
+ data.byte(kPointermode) = 0;
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 100);
+ if (flags.c())
+ return /* (doneover2) */;
+ data.word(kWatchingtime) = 0;
+ data.byte(kMandead) = 2;
+}
+
+void DreamGenContext::security() {
+ STACK_CHECK;
+ _cmp(es.word(bx+3), 32);
+ if (flags.z())
+ goto securwait;
+ _cmp(es.word(bx+3), 69);
+ if (!flags.z())
+ goto notaftersec;
+ return;
+notaftersec:
+ data.word(kWatchingtime) = 10;
+ checkspeed();
+ if (!flags.z())
+ goto gotsecurframe;
+ _inc(es.word(bx+3));
+ goto gotsecurframe;
+securwait:
+ _cmp(data.byte(kLastweapon), 1);
+ if (!flags.z())
+ goto gotsecurframe;
+ data.word(kWatchingtime) = 10;
+ _cmp(data.byte(kManspath), 9);
+ if (!flags.z())
+ goto gotsecurframe;
+ _cmp(data.byte(kFacing), 0);
+ if (!flags.z())
+ goto gotsecurframe;
+ data.byte(kLastweapon) = -1;
+ _inc(es.word(bx+3));
+gotsecurframe:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::heavy() {
+ STACK_CHECK;
+ al = es.byte(bx+7);
+ _and(al, 127);
+ es.byte(bx+7) = al;
+ _cmp(es.word(bx+3), 43);
+ if (flags.z())
+ goto heavywait;
+ data.word(kWatchingtime) = 10;
+ _cmp(es.word(bx+3), 70);
+ if (!flags.z())
+ goto notafterhshot;
+ _inc(data.byte(kCombatcount));
+ _cmp(data.byte(kCombatcount), 80);
+ if (!flags.z())
+ goto gotheavyframe;
+ data.byte(kMandead) = 2;
+ goto gotheavyframe;
+notafterhshot:
+ checkspeed();
+ if (!flags.z())
+ goto gotheavyframe;
+ _inc(es.word(bx+3));
+ goto gotheavyframe;
+heavywait:
+ _cmp(data.byte(kLastweapon), 1);
+ if (!flags.z())
+ goto gotheavyframe;
+ _cmp(data.byte(kManspath), 5);
+ if (!flags.z())
+ goto gotheavyframe;
+ _cmp(data.byte(kFacing), 4);
+ if (!flags.z())
+ goto gotheavyframe;
+ data.byte(kLastweapon) = -1;
+ _inc(es.word(bx+3));
+ data.byte(kCombatcount) = 0;
+gotheavyframe:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::bossman() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto notboss;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 4);
+ if (flags.z())
+ goto firstdes;
+ _cmp(ax, 20);
+ if (flags.z())
+ goto secdes;
+ _cmp(ax, 41);
+ if (!flags.z())
+ goto gotallboss;
+ ax = 0;
+ _inc(data.byte(kGunpassflag));
+ es.byte(bx+7) = 10;
+ goto gotallboss;
+firstdes:
+ _cmp(data.byte(kGunpassflag), 1);
+ if (flags.z())
+ goto gotallboss;
+ push(ax);
+ randomnumber();
+ cl = al;
+ ax = pop();
+ _cmp(cl, 10);
+ if (flags.c())
+ goto gotallboss;
+ ax = 0;
+ goto gotallboss;
+secdes:
+ _cmp(data.byte(kGunpassflag), 1);
+ if (flags.z())
+ goto gotallboss;
+ ax = 0;
+gotallboss:
+ es.word(bx+3) = ax;
+notboss:
+ showgamereel();
+ addtopeoplelist();
+ al = es.byte(bx+7);
+ _and(al, 128);
+ if (flags.z())
+ return /* (nottalkedboss) */;
+ data.byte(kTalkedtoboss) = 1;
+}
+
+void DreamGenContext::gamer() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto gamerfin;
+gameragain:
+ randomnum1();
+ _and(al, 7);
+ _cmp(al, 5);
+ if (!flags.c())
+ goto gameragain;
+ _add(al, 20);
+ _cmp(al, es.byte(bx+3));
+ if (flags.z())
+ goto gameragain;
+ ah = 0;
+ es.word(bx+3) = ax;
+gamerfin:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::sparkydrip() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ return /* (cantdrip) */;
+ al = 14;
+ ah = 0;
+ playchannel0();
+}
+
+void DreamGenContext::carparkdrip() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ return /* (cantdrip2) */;
+ al = 14;
+ playchannel1();
+}
+
+void DreamGenContext::keeper() {
+ STACK_CHECK;
+ _cmp(data.byte(kKeeperflag), 0);
+ if (!flags.z())
+ goto notwaiting;
+ _cmp(data.word(kReeltowatch), 190);
+ if (flags.c())
+ return /* (waiting) */;
+ _inc(data.byte(kKeeperflag));
+ ah = es.byte(bx+7);
+ _and(ah, 127);
+ _cmp(ah, data.byte(kDreamnumber));
+ if (flags.z())
+ return /* (notdiff) */;
+ al = data.byte(kDreamnumber);
+ es.byte(bx+7) = al;
+ return;
+notwaiting:
+ addtopeoplelist();
+ showgamereel();
+}
+
+void DreamGenContext::candles1() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto candle1;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 44);
+ if (!flags.z())
+ goto notendcandle1;
+ ax = 39;
+notendcandle1:
+ es.word(bx+3) = ax;
+candle1:
+ showgamereel();
+}
+
+void DreamGenContext::smallcandle() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto smallcandlef;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 37);
+ if (!flags.z())
+ goto notendsmallcandle;
+ ax = 25;
+notendsmallcandle:
+ es.word(bx+3) = ax;
+smallcandlef:
+ showgamereel();
+}
+
+void DreamGenContext::intromagic1() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto introm1fin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 145);
+ if (!flags.z())
+ goto gotintrom1;
+ ax = 121;
+gotintrom1:
+ es.word(bx+3) = ax;
+ _cmp(ax, 121);
+ if (!flags.z())
+ goto introm1fin;
+ _inc(data.byte(kIntrocount));
+ push(es);
+ push(bx);
+ intro1text();
+ bx = pop();
+ es = pop();
+ _cmp(data.byte(kIntrocount), 8);
+ if (!flags.z())
+ goto introm1fin;
+ _add(data.byte(kMapy), 10);
+ data.byte(kNowinnewroom) = 1;
+introm1fin:
+ showgamereel();
+}
+
+void DreamGenContext::candles() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto candlesfin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 167);
+ if (!flags.z())
+ goto gotcandles;
+ ax = 162;
+gotcandles:
+ es.word(bx+3) = ax;
+candlesfin:
+ showgamereel();
+}
+
+void DreamGenContext::candles2() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto candles2fin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 238);
+ if (!flags.z())
+ goto gotcandles2;
+ ax = 233;
+gotcandles2:
+ es.word(bx+3) = ax;
+candles2fin:
+ showgamereel();
+}
+
+void DreamGenContext::gates() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto gatesfin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 116);
+ if (!flags.z())
+ goto notbang;
+ push(ax);
+ push(bx);
+ push(es);
+ al = 17;
+ playchannel1();
+ es = pop();
+ bx = pop();
+ ax = pop();
+notbang:
+ _cmp(ax, 110);
+ if (flags.c())
+ goto slowgates;
+ es.byte(bx+5) = 2;
+slowgates:
+ _cmp(ax, 120);
+ if (!flags.z())
+ goto gotgates;
+ data.byte(kGetback) = 1;
+ ax = 119;
+gotgates:
+ es.word(bx+3) = ax;
+ push(es);
+ push(bx);
+ intro3text();
+ bx = pop();
+ es = pop();
+gatesfin:
+ showgamereel();
+}
+
+void DreamGenContext::intromagic2() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto introm2fin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 216);
+ if (!flags.z())
+ goto gotintrom2;
+ ax = 192;
+gotintrom2:
+ es.word(bx+3) = ax;
+introm2fin:
+ showgamereel();
+}
+
+void DreamGenContext::intromagic3() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto introm3fin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 218);
+ if (!flags.z())
+ goto gotintrom3;
+ data.byte(kGetback) = 1;
+gotintrom3:
+ es.word(bx+3) = ax;
+introm3fin:
+ showgamereel();
+ al = data.byte(kMapx);
+ es.byte(bx+1) = al;
+}
+
+void DreamGenContext::intromonks1() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto intromonk1fin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 80);
+ if (!flags.z())
+ goto notendmonk1;
+ _add(data.byte(kMapy), 10);
+ data.byte(kNowinnewroom) = 1;
+ showgamereel();
+ return;
+notendmonk1:
+ _cmp(ax, 30);
+ if (!flags.z())
+ goto gotintromonk1;
+ _sub(data.byte(kMapy), 10);
+ data.byte(kNowinnewroom) = 1;
+ ax = 51;
+gotintromonk1:
+ es.word(bx+3) = ax;
+ _cmp(ax, 5);
+ if (flags.z())
+ goto waitstep;
+ _cmp(ax, 15);
+ if (flags.z())
+ goto waitstep;
+ _cmp(ax, 25);
+ if (flags.z())
+ goto waitstep;
+ _cmp(ax, 61);
+ if (flags.z())
+ goto waitstep;
+ _cmp(ax, 71);
+ if (flags.z())
+ goto waitstep;
+ goto intromonk1fin;
+waitstep:
+ push(es);
+ push(bx);
+ intro2text();
+ bx = pop();
+ es = pop();
+ es.byte(bx+6) = -20;
+intromonk1fin:
+ showgamereel();
+ al = data.byte(kMapy);
+ es.byte(bx+2) = al;
+}
+
+void DreamGenContext::intromonks2() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto intromonk2fin;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 87);
+ if (!flags.z())
+ goto nottalk1;
+ _inc(data.byte(kIntrocount));
+ push(es);
+ push(bx);
+ monks2text();
+ bx = pop();
+ es = pop();
+ _cmp(data.byte(kIntrocount), 19);
+ if (!flags.z())
+ goto notlasttalk1;
+ ax = 87;
+ goto gotintromonk2;
+notlasttalk1:
+ ax = 74;
+ goto gotintromonk2;
+nottalk1:
+ _cmp(ax, 110);
+ if (!flags.z())
+ goto notraisearm;
+ _inc(data.byte(kIntrocount));
+ push(es);
+ push(bx);
+ monks2text();
+ bx = pop();
+ es = pop();
+ _cmp(data.byte(kIntrocount), 35);
+ if (!flags.z())
+ goto notlastraise;
+ ax = 111;
+ goto gotintromonk2;
+notlastraise:
+ ax = 98;
+ goto gotintromonk2;
+notraisearm:
+ _cmp(ax, 176);
+ if (!flags.z())
+ goto notendmonk2;
+ data.byte(kGetback) = 1;
+ goto gotintromonk2;
+notendmonk2:
+ _cmp(ax, 125);
+ if (!flags.z())
+ goto gotintromonk2;
+ ax = 140;
+gotintromonk2:
+ es.word(bx+3) = ax;
+intromonk2fin:
+ showgamereel();
+}
+
+void DreamGenContext::handclap() {
+ STACK_CHECK;
+}
+
+void DreamGenContext::monks2text() {
+ STACK_CHECK;
+ _cmp(data.byte(kIntrocount), 1);
+ if (!flags.z())
+ goto notmonk2text1;
+ al = 8;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text1:
+ _cmp(data.byte(kIntrocount), 4);
+ if (!flags.z())
+ goto notmonk2text2;
+ al = 9;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text2:
+ _cmp(data.byte(kIntrocount), 7);
+ if (!flags.z())
+ goto notmonk2text3;
+ al = 10;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text3:
+ _cmp(data.byte(kIntrocount), 10);
+ if (!flags.z())
+ goto notmonk2text4;
+ data.byte(kIntrocount) = 12;
+ al = 11;
+ bl = 0;
+ bh = 105;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text4:
+ _cmp(data.byte(kIntrocount), 13);
+ if (!flags.z())
+ goto notmonk2text5;
+ data.byte(kIntrocount) = 17;
+ return;
+ al = 12;
+ bl = 0;
+ bh = 120;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text5:
+ _cmp(data.byte(kIntrocount), 16);
+ if (!flags.z())
+ goto notmonk2text6;
+ al = 13;
+ bl = 0;
+ bh = 135;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text6:
+ _cmp(data.byte(kIntrocount), 19);
+ if (!flags.z())
+ goto notmonk2text7;
+ al = 14;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ dx = 1;
+ ah = 82;
+ { setuptimedtemp(); return; };
+notmonk2text7:
+ _cmp(data.byte(kIntrocount), 22);
+ if (!flags.z())
+ goto notmonk2text8;
+ al = 15;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text8:
+ _cmp(data.byte(kIntrocount), 25);
+ if (!flags.z())
+ goto notmonk2text9;
+ al = 16;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text9:
+ _cmp(data.byte(kIntrocount), 27);
+ if (!flags.z())
+ goto notmonk2text10;
+ al = 17;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ goto gotmonks2text;
+notmonk2text10:
+ _cmp(data.byte(kIntrocount), 31);
+ if (!flags.z())
+ return /* (notmonk2text11) */;
+ al = 18;
+ bl = 36;
+ bh = 160;
+ cx = 100;
+ goto gotmonks2text;
+ return;
+gotmonks2text:
+ dx = 1;
+ cx = 120;
+ ah = 82;
+ setuptimedtemp();
+}
+
+void DreamGenContext::intro1text() {
+ STACK_CHECK;
+ _cmp(data.byte(kIntrocount), 2);
+ if (!flags.z())
+ goto notintro1text1;
+ al = 40;
+ bl = 34;
+ bh = 130;
+ cx = 90;
+ goto gotintro1text;
+notintro1text1:
+ _cmp(data.byte(kIntrocount), 4);
+ if (!flags.z())
+ goto notintro1text2;
+ al = 41;
+ bl = 34;
+ bh = 130;
+ cx = 90;
+ goto gotintro1text;
+notintro1text2:
+ _cmp(data.byte(kIntrocount), 6);
+ if (!flags.z())
+ return /* (notintro1text3) */;
+ al = 42;
+ bl = 34;
+ bh = 130;
+ cx = 90;
+ goto gotintro1text;
+ return;
+gotintro1text:
+ dx = 1;
+ ah = 82;
+ _cmp(data.byte(kCh1playing), 255);
+ if (flags.z())
+ goto oktalk2;
+ _dec(data.byte(kIntrocount));
+ return;
+oktalk2:
+ setuptimedtemp();
+}
+
+void DreamGenContext::intro2text() {
+ STACK_CHECK;
+ _cmp(ax, 5);
+ if (!flags.z())
+ goto notintro2text1;
+ al = 43;
+ bl = 34;
+ bh = 40;
+ cx = 90;
+ goto gotintro2text;
+notintro2text1:
+ _cmp(ax, 15);
+ if (!flags.z())
+ return /* (notintro2text2) */;
+ al = 44;
+ bl = 34;
+ bh = 40;
+ cx = 90;
+ goto gotintro2text;
+ return;
+gotintro2text:
+ dx = 1;
+ ah = 82;
+ setuptimedtemp();
+}
+
+void DreamGenContext::intro3text() {
+ STACK_CHECK;
+ _cmp(ax, 107);
+ if (!flags.z())
+ goto notintro3text1;
+ al = 45;
+ bl = 36;
+ bh = 56;
+ cx = 100;
+ goto gotintro3text;
+notintro3text1:
+ _cmp(ax, 108);
+ if (!flags.z())
+ return /* (notintro3text2) */;
+ al = 46;
+ bl = 36;
+ bh = 56;
+ cx = 100;
+ goto gotintro3text;
+ return;
+gotintro3text:
+ dx = 1;
+ ah = 82;
+ setuptimedtemp();
+}
+
+void DreamGenContext::monkandryan() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto notmonkryan;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 83);
+ if (!flags.z())
+ goto gotmonkryan;
+ _inc(data.byte(kIntrocount));
+ push(es);
+ push(bx);
+ textformonk();
+ bx = pop();
+ es = pop();
+ ax = 77;
+ _cmp(data.byte(kIntrocount), 57);
+ if (!flags.z())
+ goto gotmonkryan;
+ data.byte(kGetback) = 1;
+ return;
+gotmonkryan:
+ es.word(bx+3) = ax;
+notmonkryan:
+ showgamereel();
+}
+
+void DreamGenContext::endgameseq() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto notendseq;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 51);
+ if (!flags.z())
+ goto gotendseq;
+ _cmp(data.byte(kIntrocount), 140);
+ if (flags.z())
+ goto gotendseq;
+ _inc(data.byte(kIntrocount));
+ push(es);
+ push(bx);
+ textforend();
+ bx = pop();
+ es = pop();
+ ax = 50;
+gotendseq:
+ es.word(bx+3) = ax;
+ _cmp(ax, 134);
+ if (!flags.z())
+ goto notfadedown;
+ push(es);
+ push(bx);
+ push(ax);
+ fadescreendownhalf();
+ ax = pop();
+ bx = pop();
+ es = pop();
+ goto notendseq;
+notfadedown:
+ _cmp(ax, 324);
+ if (!flags.z())
+ goto notfadeend;
+ push(es);
+ push(bx);
+ push(ax);
+ fadescreendowns();
+ data.byte(kVolumeto) = 7;
+ data.byte(kVolumedirection) = 1;
+ ax = pop();
+ bx = pop();
+ es = pop();
+notfadeend:
+ _cmp(ax, 340);
+ if (!flags.z())
+ goto notendseq;
+ data.byte(kGetback) = 1;
+notendseq:
+ showgamereel();
+ al = data.byte(kMapy);
+ es.byte(bx+2) = al;
+ ax = es.word(bx+3);
+ _cmp(ax, 145);
+ if (!flags.z())
+ return /* (notendcreds) */;
+ es.word(bx+3) = 146;
+ rollendcredits();
+}
+
+void DreamGenContext::rollendcredits() {
+ STACK_CHECK;
+ al = 16;
+ ah = 255;
+ playchannel0();
+ data.byte(kVolume) = 7;
+ data.byte(kVolumeto) = 0;
+ data.byte(kVolumedirection) = -1;
+ cl = 160;
+ ch = 160;
+ di = 75;
+ bx = 20;
+ ds = data.word(kMapstore);
+ si = 0;
+ multiget();
+ es = data.word(kTextfile1);
+ si = 3*2;
+ ax = es.word(si);
+ si = ax;
+ _add(si, (66*2));
+ cx = 254;
+endcredits1:
+ push(cx);
+ bx = 10;
+ cx = data.word(kLinespacing);
+endcredits2:
+ push(cx);
+ push(si);
+ push(di);
+ push(es);
+ push(bx);
+ vsync();
+ cl = 160;
+ ch = 160;
+ di = 75;
+ bx = 20;
+ ds = data.word(kMapstore);
+ si = 0;
+ multiput();
+ vsync();
+ bx = pop();
+ es = pop();
+ di = pop();
+ si = pop();
+ push(si);
+ push(di);
+ push(es);
+ push(bx);
+ cx = 18;
+onelot:
+ push(cx);
+ di = 75;
+ dx = 161;
+ ax = 0;
+ printdirect();
+ _add(bx, data.word(kLinespacing));
+ cx = pop();
+ if (--cx)
+ goto onelot;
+ vsync();
+ cl = 160;
+ ch = 160;
+ di = 75;
+ bx = 20;
+ multidump();
+ bx = pop();
+ es = pop();
+ di = pop();
+ si = pop();
+ cx = pop();
+ _dec(bx);
+ if (--cx)
+ goto endcredits2;
+ cx = pop();
+looknext:
+ al = es.byte(si);
+ _inc(si);
+ _cmp(al, ':');
+ if (flags.z())
+ goto gotnext;
+ _cmp(al, 0);
+ if (flags.z())
+ goto gotnext;
+ goto looknext;
+gotnext:
+ if (--cx)
+ goto endcredits1;
+ cx = 100;
+ hangon();
+ paneltomap();
+ fadescreenuphalf();
+}
+
+void DreamGenContext::priest() {
+ STACK_CHECK;
+ _cmp(es.word(bx+3), 8);
+ if (flags.z())
+ return /* (priestspoken) */;
+ data.byte(kPointermode) = 0;
+ data.word(kWatchingtime) = 2;
+ checkspeed();
+ if (!flags.z())
+ return /* (priestwait) */;
+ _inc(es.word(bx+3));
+ push(es);
+ push(bx);
+ priesttext();
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::madmanstelly() {
+ STACK_CHECK;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 307);
+ if (!flags.z())
+ goto notendtelly;
+ ax = 300;
+notendtelly:
+ es.word(bx+3) = ax;
+ showgamereel();
+}
+
+void DreamGenContext::madman() {
+ STACK_CHECK;
+ data.word(kWatchingtime) = 2;
+ checkspeed();
+ if (!flags.z())
+ goto nomadspeed;
+ ax = es.word(bx+3);
+ _cmp(ax, 364);
+ if (!flags.c())
+ goto ryansded;
+ _cmp(ax, 10);
+ if (!flags.z())
+ goto notfirstmad;
+ push(es);
+ push(bx);
+ push(ax);
+ dx = 2247;
+ loadtemptext();
+ ax = pop();
+ bx = pop();
+ es = pop();
+ data.byte(kCombatcount) = -1;
+ data.byte(kSpeechcount) = 0;
+notfirstmad:
+ _inc(ax);
+ _cmp(ax, 294);
+ if (flags.z())
+ goto madmanspoken;
+ _cmp(ax, 66);
+ if (!flags.z())
+ goto nomadspeak;
+ _inc(data.byte(kCombatcount));
+ push(es);
+ push(bx);
+ madmantext();
+ bx = pop();
+ es = pop();
+ ax = 53;
+ _cmp(data.byte(kCombatcount), 64);
+ if (flags.c())
+ goto nomadspeak;
+ _cmp(data.byte(kCombatcount), 70);
+ if (flags.z())
+ goto killryan;
+ _cmp(data.byte(kLastweapon), 8);
+ if (!flags.z())
+ goto nomadspeak;
+ data.byte(kCombatcount) = 72;
+ data.byte(kLastweapon) = -1;
+ data.byte(kMadmanflag) = 1;
+ ax = 67;
+ goto nomadspeak;
+killryan:
+ ax = 310;
+nomadspeak:
+ es.word(bx+3) = ax;
+nomadspeed:
+ showgamereel();
+ al = data.byte(kMapx);
+ es.byte(bx+1) = al;
+ madmode();
+ return;
+madmanspoken:
+ _cmp(data.byte(kWongame), 1);
+ if (flags.z())
+ return /* (alreadywon) */;
+ data.byte(kWongame) = 1;
+ push(es);
+ push(bx);
+ getridoftemptext();
+ bx = pop();
+ es = pop();
+ return;
+ryansded:
+ data.byte(kMandead) = 2;
+ showgamereel();
+}
+
+void DreamGenContext::madmantext() {
+ STACK_CHECK;
+ _cmp(data.byte(kSpeechcount), 63);
+ if (!flags.c())
+ return /* (nomadtext) */;
+ _cmp(data.byte(kCh1playing), 255);
+ if (!flags.z())
+ return /* (nomadtext) */;
+ al = data.byte(kSpeechcount);
+ _inc(data.byte(kSpeechcount));
+ _add(al, 47);
+ bl = 72;
+ bh = 80;
+ cx = 90;
+ dx = 1;
+ ah = 82;
+ setuptimedtemp();
+}
+
+void DreamGenContext::madmode() {
+ STACK_CHECK;
+ data.word(kWatchingtime) = 2;
+ data.byte(kPointermode) = 0;
+ _cmp(data.byte(kCombatcount), 65);
+ if (flags.c())
+ return /* (iswatchmad) */;
+ _cmp(data.byte(kCombatcount), 70);
+ if (!flags.c())
+ return /* (iswatchmad) */;
+ data.byte(kPointermode) = 2;
+}
+
+void DreamGenContext::priesttext() {
+ STACK_CHECK;
+ _cmp(es.word(bx+3), 2);
+ if (flags.c())
+ return /* (nopriesttext) */;
+ _cmp(es.word(bx+3), 7);
+ if (!flags.c())
+ return /* (nopriesttext) */;
+ al = es.byte(bx+3);
+ _and(al, 1);
+ if (!flags.z())
+ return /* (nopriesttext) */;
+ al = es.byte(bx+3);
+ _shr(al, 1);
+ _add(al, 50);
+ bl = 72;
+ bh = 80;
+ cx = 54;
+ dx = 1;
+ setuptimeduse();
+}
+
+void DreamGenContext::textforend() {
+ STACK_CHECK;
+ _cmp(data.byte(kIntrocount), 20);
+ if (!flags.z())
+ goto notendtext1;
+ al = 0;
+ bl = 34;
+ bh = 20;
+ cx = 60;
+ goto gotendtext;
+notendtext1:
+ _cmp(data.byte(kIntrocount), 50);
+ if (!flags.z())
+ goto notendtext2;
+ al = 1;
+ bl = 34;
+ bh = 20;
+ cx = 60;
+ goto gotendtext;
+notendtext2:
+ _cmp(data.byte(kIntrocount), 85);
+ if (!flags.z())
+ return /* (notendtext3) */;
+ al = 2;
+ bl = 34;
+ bh = 20;
+ cx = 60;
+ goto gotendtext;
+ return;
+gotendtext:
+ dx = 1;
+ ah = 83;
+ setuptimedtemp();
+}
+
+void DreamGenContext::textformonk() {
+ STACK_CHECK;
+ _cmp(data.byte(kIntrocount), 1);
+ if (!flags.z())
+ goto notmonktext1;
+ al = 19;
+ bl = 68;
+ bh = 154;
+ cx = 120;
+ goto gotmonktext;
+notmonktext1:
+ _cmp(data.byte(kIntrocount), 5);
+ if (!flags.z())
+ goto notmonktext2;
+ al = 20;
+ bl = 68;
+ bh = 38;
+ cx = 120;
+ goto gotmonktext;
+notmonktext2:
+ _cmp(data.byte(kIntrocount), 9);
+ if (!flags.z())
+ goto notmonktext3;
+ al = 21;
+ bl = 48;
+ bh = 154;
+ cx = 120;
+ goto gotmonktext;
+notmonktext3:
+ _cmp(data.byte(kIntrocount), 13);
+ if (!flags.z())
+ goto notmonktext4;
+ al = 22;
+ bl = 68;
+ bh = 38;
+ cx = 120;
+ goto gotmonktext;
+notmonktext4:
+ _cmp(data.byte(kIntrocount), 15);
+ if (!flags.z())
+ goto notmonktext5;
+ al = 23;
+ bl = 68;
+ bh = 154;
+ cx = 120;
+ goto gotmonktext;
+notmonktext5:
+ _cmp(data.byte(kIntrocount), 21);
+ if (!flags.z())
+ goto notmonktext6;
+ al = 24;
+ bl = 68;
+ bh = 38;
+ cx = 120;
+ goto gotmonktext;
+notmonktext6:
+ _cmp(data.byte(kIntrocount), 25);
+ if (!flags.z())
+ goto notmonktext7;
+ al = 25;
+ bl = 68;
+ bh = 154;
+ cx = 120;
+ goto gotmonktext;
+notmonktext7:
+ _cmp(data.byte(kIntrocount), 29);
+ if (!flags.z())
+ goto notmonktext8;
+ al = 26;
+ bl = 68;
+ bh = 38;
+ cx = 120;
+ goto gotmonktext;
+notmonktext8:
+ _cmp(data.byte(kIntrocount), 33);
+ if (!flags.z())
+ goto notmonktext9;
+ al = 27;
+ bl = 68;
+ bh = 154;
+ cx = 120;
+ goto gotmonktext;
+notmonktext9:
+ _cmp(data.byte(kIntrocount), 37);
+ if (!flags.z())
+ goto notmonktext10;
+ al = 28;
+ bl = 68;
+ bh = 154;
+ cx = 120;
+ goto gotmonktext;
+notmonktext10:
+ _cmp(data.byte(kIntrocount), 41);
+ if (!flags.z())
+ goto notmonktext11;
+ al = 29;
+ bl = 68;
+ bh = 38;
+ cx = 120;
+ goto gotmonktext;
+notmonktext11:
+ _cmp(data.byte(kIntrocount), 45);
+ if (!flags.z())
+ goto notmonktext12;
+ al = 30;
+ bl = 68;
+ bh = 154;
+ cx = 120;
+ goto gotmonktext;
+notmonktext12:
+ _cmp(data.byte(kIntrocount), 52);
+ if (!flags.z())
+ goto notmonktext13;
+ al = 31;
+ bl = 68;
+ bh = 154;
+ cx = 220;
+ goto gotmonktext;
+notmonktext13:
+ _cmp(data.byte(kIntrocount), 53);
+ if (!flags.z())
+ return /* (notendtitles) */;
+ fadescreendowns();
+ data.byte(kVolumeto) = 7;
+ data.byte(kVolumedirection) = 1;
+ return;
+gotmonktext:
+ dx = 1;
+ ah = 82;
+ _cmp(data.byte(kCh1playing), 255);
+ if (flags.z())
+ goto oktalk;
+ _dec(data.byte(kIntrocount));
+ return;
+oktalk:
+ setuptimedtemp();
+}
+
+void DreamGenContext::drunk() {
+ STACK_CHECK;
+ _cmp(data.byte(kGeneraldead), 0);
+ if (!flags.z())
+ return /* (trampgone) */;
+ al = es.byte(bx+7);
+ _and(al, 127);
+ es.byte(bx+7) = al;
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::advisor() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto noadvisor;
+ goto noadvisor;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 123);
+ if (!flags.z())
+ goto notendadvis;
+ ax = 106;
+ goto gotadvframe;
+notendadvis:
+ _cmp(ax, 108);
+ if (!flags.z())
+ goto gotadvframe;
+ push(ax);
+ randomnumber();
+ cl = al;
+ ax = pop();
+ _cmp(cl, 3);
+ if (flags.c())
+ goto gotadvframe;
+ ax = 106;
+gotadvframe:
+ es.word(bx+3) = ax;
+noadvisor:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::copper() {
+ STACK_CHECK;
+ checkspeed();
+ if (!flags.z())
+ goto nocopper;
+ ax = es.word(bx+3);
+ _inc(ax);
+ _cmp(ax, 94);
+ if (!flags.z())
+ goto notendcopper;
+ ax = 64;
+ goto gotcopframe;
+notendcopper:
+ _cmp(ax, 81);
+ if (flags.z())
+ goto mightwait;
+ _cmp(ax, 66);
+ if (!flags.z())
+ goto gotcopframe;
+mightwait:
+ push(ax);
+ randomnumber();
+ cl = al;
+ ax = pop();
+ _cmp(cl, 7);
+ if (flags.c())
+ goto gotcopframe;
+ _dec(ax);
+gotcopframe:
+ es.word(bx+3) = ax;
+nocopper:
+ showgamereel();
+ addtopeoplelist();
+}
+
+void DreamGenContext::sparky() {
+ STACK_CHECK;
+ _cmp(data.word(kCard1money), 0);
+ if (flags.z())
+ goto animsparky;
+ es.byte(bx+7) = 3;
+ goto animsparky;
+animsparky:
+ checkspeed();
+ if (!flags.z())
+ goto finishsparky;
+ _cmp(es.word(bx+3), 34);
+ if (!flags.z())
+ goto notsparky1;
+ randomnumber();
+ _cmp(al, 30);
+ if (flags.c())
+ goto dosparky;
+ es.word(bx+3) = 27;
+ goto finishsparky;
+notsparky1:
+ _cmp(es.word(bx+3), 48);
+ if (!flags.z())
+ goto dosparky;
+ es.word(bx+3) = 27;
+ goto finishsparky;
+dosparky:
+ _inc(es.word(bx+3));
+finishsparky:
+ showgamereel();
+ addtopeoplelist();
+ al = es.byte(bx+7);
+ _and(al, 128);
+ if (flags.z())
+ return /* (nottalkedsparky) */;
+ data.byte(kTalkedtosparky) = 1;
+}
+
+void DreamGenContext::train() {
+ STACK_CHECK;
+ return;
+ ax = es.word(bx+3);
+ _cmp(ax, 21);
+ if (!flags.c())
+ goto notrainyet;
+ _inc(ax);
+ goto gottrainframe;
+notrainyet:
+ randomnumber();
+ _cmp(al, 253);
+ if (flags.c())
+ return /* (notrainatall) */;
+ _cmp(data.byte(kManspath), 5);
+ if (!flags.z())
+ return /* (notrainatall) */;
+ _cmp(data.byte(kFinaldest), 5);
+ if (!flags.z())
+ return /* (notrainatall) */;
+ ax = 5;
+gottrainframe:
+ es.word(bx+3) = ax;
+ showgamereel();
+}
+
+void DreamGenContext::addtopeoplelist() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ push(bx);
+ cl = es.byte(bx+7);
+ ax = es.word(bx+3);
+ bx = data.word(kListpos);
+ es = data.word(kBuffers);
+ es.word(bx) = ax;
+ ax = pop();
+ es.word(bx+2) = ax;
+ es.byte(bx+4) = cl;
+ bx = pop();
+ es = pop();
+ _add(data.word(kListpos), 5);
+}
+
+void DreamGenContext::showgamereel() {
+ STACK_CHECK;
+ ax = es.word(bx+3);
+ _cmp(ax, 512);
+ if (!flags.c())
+ return /* (noshow) */;
+ data.word(kReelpointer) = ax;
+ push(es);
+ push(bx);
+ plotreel();
+ bx = pop();
+ es = pop();
+ ax = data.word(kReelpointer);
+ es.word(bx+3) = ax;
+}
+
+void DreamGenContext::checkspeed() {
+ STACK_CHECK;
+ _cmp(data.byte(kLastweapon), -1);
+ if (!flags.z())
+ goto forcenext;
+ _inc(es.byte(bx+6));
+ al = es.byte(bx+6);
+ _cmp(al, es.byte(bx+5));
+ if (!flags.z())
+ return /* (notspeed) */;
+ al = 0;
+ es.byte(bx+6) = al;
+ _cmp(al, al);
+ return;
+forcenext:
+ _cmp(al, al);
+}
+
+void DreamGenContext::delsprite() {
+ STACK_CHECK;
+ di = bx;
+ cx = (32);
+ al = 255;
+ _stosb(cx, true);
+}
+
+void DreamGenContext::checkone() {
+ STACK_CHECK;
+ push(cx);
+ al = ch;
+ ah = 0;
+ cl = 4;
+ _shr(ax, cl);
+ dl = al;
+ cx = pop();
+ al = cl;
+ ah = 0;
+ cl = 4;
+ _shr(ax, cl);
+ ah = dl;
+ push(ax);
+ ch = 0;
+ cl = al;
+ push(cx);
+ al = ah;
+ ah = 0;
+ cx = 11;
+ _mul(cx);
+ cx = pop();
+ _add(ax, cx);
+ cx = 3;
+ _mul(cx);
+ si = ax;
+ ds = data.word(kBuffers);
+ _add(si, (0+(228*13)+32+60+(32*32)));
+ _lodsw();
+ cx = ax;
+ _lodsb();
+ dx = pop();
+}
+
+void DreamGenContext::findsource() {
+ STACK_CHECK;
+ ax = data.word(kCurrentframe);
+ _cmp(ax, 160);
+ if (!flags.c())
+ goto over1000;
+ ds = data.word(kReel1);
+ data.word(kTakeoff) = 0;
+ return;
+over1000:
+ _cmp(ax, 320);
+ if (!flags.c())
+ goto over1001;
+ ds = data.word(kReel2);
+ data.word(kTakeoff) = 160;
+ return;
+over1001:
+ ds = data.word(kReel3);
+ data.word(kTakeoff) = 320;
+}
+
+void DreamGenContext::mainman() {
+ STACK_CHECK;
+ _cmp(data.byte(kResetmanxy), 1);
+ if (!flags.z())
+ goto notinnewroom;
+ data.byte(kResetmanxy) = 0;
+ al = data.byte(kRyanx);
+ ah = data.byte(kRyany);
+ es.word(bx+10) = ax;
+ es.byte(bx+29) = 0;
+ goto executewalk;
+notinnewroom:
+ _dec(es.byte(bx+22));
+ _cmp(es.byte(bx+22), -1);
+ if (flags.z())
+ goto executewalk;
+ return;
+executewalk:
+ es.byte(bx+22) = 0;
+ al = data.byte(kTurntoface);
+ _cmp(al, data.byte(kFacing));
+ if (flags.z())
+ goto facingok;
+ aboutturn();
+ goto notwalk;
+facingok:
+ _cmp(data.byte(kTurndirection), 0);
+ if (flags.z())
+ goto alreadyturned;
+ _cmp(data.byte(kLinepointer), 254);
+ if (!flags.z())
+ goto alreadyturned;
+ data.byte(kReasseschanges) = 1;
+ al = data.byte(kFacing);
+ _cmp(al, data.byte(kLeavedirection));
+ if (!flags.z())
+ goto alreadyturned;
+ checkforexit();
+alreadyturned:
+ data.byte(kTurndirection) = 0;
+ _cmp(data.byte(kLinepointer), 254);
+ if (!flags.z())
+ goto walkman;
+ es.byte(bx+29) = 0;
+ goto notwalk;
+walkman:
+ al = es.byte(bx+29);
+ _inc(al);
+ _cmp(al, 11);
+ if (!flags.z())
+ goto notanimend1;
+ al = 1;
+notanimend1:
+ es.byte(bx+29) = al;
+ walking();
+ _cmp(data.byte(kLinepointer), 254);
+ if (flags.z())
+ goto afterwalk;
+ al = data.byte(kFacing);
+ _and(al, 1);
+ if (flags.z())
+ goto isdouble;
+ al = es.byte(bx+29);
+ _cmp(al, 2);
+ if (flags.z())
+ goto afterwalk;
+ _cmp(al, 7);
+ if (flags.z())
+ goto afterwalk;
+isdouble:
+ walking();
+afterwalk:
+ _cmp(data.byte(kLinepointer), 254);
+ if (!flags.z())
+ goto notwalk;
+ al = data.byte(kTurntoface);
+ _cmp(al, data.byte(kFacing));
+ if (!flags.z())
+ goto notwalk;
+ data.byte(kReasseschanges) = 1;
+ al = data.byte(kFacing);
+ _cmp(al, data.byte(kLeavedirection));
+ if (!flags.z())
+ goto notwalk;
+ checkforexit();
+notwalk:
+ al = data.byte(kFacing);
+ ah = 0;
+ di = 1105;
+ _add(di, ax);
+ al = cs.byte(di);
+ _add(al, es.byte(bx+29));
+ es.byte(bx+15) = al;
+ ax = es.word(bx+10);
+ data.byte(kRyanx) = al;
+ data.byte(kRyany) = ah;
+}
+
+void DreamGenContext::aboutturn() {
+ STACK_CHECK;
+ _cmp(data.byte(kTurndirection), 1);
+ if (flags.z())
+ goto incdir;
+ _cmp(data.byte(kTurndirection), -1);
+ if (flags.z())
+ goto decdir;
+ al = data.byte(kFacing);
+ _sub(al, data.byte(kTurntoface));
+ if (!flags.c())
+ goto higher;
+ _neg(al);
+ _cmp(al, 4);
+ if (!flags.c())
+ goto decdir;
+ goto incdir;
+higher:
+ _cmp(al, 4);
+ if (!flags.c())
+ goto incdir;
+ goto decdir;
+incdir:
+ data.byte(kTurndirection) = 1;
+ al = data.byte(kFacing);
+ _inc(al);
+ _and(al, 7);
+ data.byte(kFacing) = al;
+ es.byte(bx+29) = 0;
+ return;
+decdir:
+ data.byte(kTurndirection) = -1;
+ al = data.byte(kFacing);
+ _dec(al);
+ _and(al, 7);
+ data.byte(kFacing) = al;
+ es.byte(bx+29) = 0;
+}
+
+void DreamGenContext::facerightway() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ getroomspaths();
+ al = data.byte(kManspath);
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = es.byte(bx+7);
+ data.byte(kTurntoface) = al;
+ data.byte(kLeavedirection) = al;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::checkforexit() {
+ STACK_CHECK;
+ cl = data.byte(kRyanx);
+ _add(cl, 12);
+ ch = data.byte(kRyany);
+ _add(ch, 12);
+ checkone();
+ data.byte(kLastflag) = cl;
+ data.byte(kLastflagex) = ch;
+ data.byte(kFlagx) = dl;
+ data.byte(kFlagy) = dh;
+ al = data.byte(kLastflag);
+ _test(al, 64);
+ if (flags.z())
+ goto notnewdirect;
+ al = data.byte(kLastflagex);
+ data.byte(kAutolocation) = al;
+ return;
+notnewdirect:
+ _test(al, 32);
+ if (flags.z())
+ goto notleave;
+ push(es);
+ push(bx);
+ _cmp(data.byte(kReallocation), 2);
+ if (!flags.z())
+ goto notlouis;
+ bl = 0;
+ push(bx);
+ al = 'W';
+ ah = 'E';
+ cl = 'T';
+ ch = 'A';
+ isryanholding();
+ bx = pop();
+ if (flags.z())
+ goto noshoe1;
+ _inc(bl);
+noshoe1:
+ push(bx);
+ al = 'W';
+ ah = 'E';
+ cl = 'T';
+ ch = 'B';
+ isryanholding();
+ bx = pop();
+ if (flags.z())
+ goto noshoe2;
+ _inc(bl);
+noshoe2:
+ _cmp(bl, 2);
+ if (flags.z())
+ goto notlouis;
+ al = 42;
+ _cmp(bl, 0);
+ if (flags.z())
+ goto notravmessage;
+ _inc(al);
+notravmessage:
+ cx = 80;
+ dx = 10;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+ al = data.byte(kFacing);
+ _add(al, 4);
+ _and(al, 7);
+ data.byte(kTurntoface) = al;
+ bx = pop();
+ es = pop();
+ return;
+notlouis:
+ bx = pop();
+ es = pop();
+ data.byte(kNeedtotravel) = 1;
+ return;
+notleave:
+ _test(al, 4);
+ if (flags.z())
+ goto notaleft;
+ adjustleft();
+ return;
+notaleft:
+ _test(al, 2);
+ if (flags.z())
+ goto notaright;
+ adjustright();
+ return;
+notaright:
+ _test(al, 8);
+ if (flags.z())
+ goto notadown;
+ adjustdown();
+ return;
+notadown:
+ _test(al, 16);
+ if (flags.z())
+ return /* (notanup) */;
+ adjustup();
+}
+
+void DreamGenContext::adjustdown() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ _add(data.byte(kMapy), 10);
+ al = data.byte(kLastflagex);
+ cl = 16;
+ _mul(cl);
+ es.byte(bx+11) = al;
+ data.byte(kNowinnewroom) = 1;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::adjustup() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ _sub(data.byte(kMapy), 10);
+ al = data.byte(kLastflagex);
+ cl = 16;
+ _mul(cl);
+ es.byte(bx+11) = al;
+ data.byte(kNowinnewroom) = 1;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::adjustleft() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ data.byte(kLastflag) = 0;
+ _sub(data.byte(kMapx), 11);
+ al = data.byte(kLastflagex);
+ cl = 16;
+ _mul(cl);
+ es.byte(bx+10) = al;
+ data.byte(kNowinnewroom) = 1;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::adjustright() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ _add(data.byte(kMapx), 11);
+ al = data.byte(kLastflagex);
+ cl = 16;
+ _mul(cl);
+ _sub(al, 2);
+ es.byte(bx+10) = al;
+ data.byte(kNowinnewroom) = 1;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::reminders() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 24);
+ if (!flags.z())
+ return /* (notinedenslift) */;
+ _cmp(data.byte(kMapx), 44);
+ if (!flags.z())
+ return /* (notinedenslift) */;
+ _cmp(data.byte(kProgresspoints), 0);
+ if (!flags.z())
+ return /* (notfirst) */;
+ al = 'D';
+ ah = 'K';
+ cl = 'E';
+ ch = 'Y';
+ isryanholding();
+ if (flags.z())
+ goto forgotone;
+ al = 'C';
+ ah = 'S';
+ cl = 'H';
+ ch = 'R';
+ findexobject();
+ _cmp(al, (114));
+ if (flags.z())
+ goto forgotone;
+ ax = es.word(bx+2);
+ _cmp(al, 4);
+ if (!flags.z())
+ goto forgotone;
+ _cmp(ah, 255);
+ if (flags.z())
+ goto havegotcard;
+ cl = 'P';
+ ch = 'U';
+ dl = 'R';
+ dh = 'S';
+ _xchg(al, ah);
+ compare();
+ if (!flags.z())
+ goto forgotone;
+havegotcard:
+ _inc(data.byte(kProgresspoints));
+ return;
+forgotone:
+ al = 50;
+ bl = 54;
+ bh = 70;
+ cx = 48;
+ dx = 8;
+ setuptimeduse();
+}
+
+void DreamGenContext::initrain() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30));
+ bx = 1113;
+checkmorerain:
+ al = cs.byte(bx);
+ _cmp(al, 255);
+ if (flags.z())
+ goto finishinitrain;
+ _cmp(al, data.byte(kReallocation));
+ if (!flags.z())
+ goto checkrain;
+ al = cs.byte(bx+1);
+ _cmp(al, data.byte(kMapx));
+ if (!flags.z())
+ goto checkrain;
+ al = cs.byte(bx+2);
+ _cmp(al, data.byte(kMapy));
+ if (!flags.z())
+ goto checkrain;
+ al = cs.byte(bx+3);
+ data.byte(kRainspace) = al;
+ goto dorain;
+checkrain:
+ _add(bx, 4);
+ goto checkmorerain;
+dorain:
+ cx = 4;
+initraintop:
+ randomnumber();
+ _and(al, 31);
+ _add(al, 3);
+ _cmp(al, data.byte(kRainspace));
+ if (!flags.c())
+ goto initraintop;
+ _add(cl, al);
+ _cmp(cl, data.byte(kMapxsize));
+ if (!flags.c())
+ goto initrainside;
+ push(cx);
+ splitintolines();
+ cx = pop();
+ goto initraintop;
+initrainside:
+ cl = data.byte(kMapxsize);
+ _dec(cl);
+initrainside2:
+ randomnumber();
+ _and(al, 31);
+ _add(al, 3);
+ _cmp(al, data.byte(kRainspace));
+ if (!flags.c())
+ goto initrainside2;
+ _add(ch, al);
+ _cmp(ch, data.byte(kMapysize));
+ if (!flags.c())
+ goto finishinitrain;
+ push(cx);
+ splitintolines();
+ cx = pop();
+ goto initrainside2;
+finishinitrain:
+ al = 255;
+ _stosb();
+}
+
+void DreamGenContext::splitintolines() {
+ STACK_CHECK;
+lookforlinestart:
+ getblockofpixel();
+ _cmp(al, 0);
+ if (!flags.z())
+ goto foundlinestart;
+ _dec(cl);
+ _inc(ch);
+ _cmp(cl, 0);
+ if (flags.z())
+ return /* (endofthisline) */;
+ _cmp(ch, data.byte(kMapysize));
+ if (!flags.c())
+ return /* (endofthisline) */;
+ goto lookforlinestart;
+foundlinestart:
+ es.word(di) = cx;
+ bh = 1;
+lookforlineend:
+ getblockofpixel();
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundlineend;
+ _dec(cl);
+ _inc(ch);
+ _cmp(cl, 0);
+ if (flags.z())
+ goto foundlineend;
+ _cmp(ch, data.byte(kMapysize));
+ if (!flags.c())
+ goto foundlineend;
+ _inc(bh);
+ goto lookforlineend;
+foundlineend:
+ push(cx);
+ es.byte(di+2) = bh;
+ randomnumber();
+ es.byte(di+3) = al;
+ randomnumber();
+ es.byte(di+4) = al;
+ randomnumber();
+ _and(al, 3);
+ _add(al, 4);
+ es.byte(di+5) = al;
+ _add(di, 6);
+ cx = pop();
+ _cmp(cl, 0);
+ if (flags.z())
+ return /* (endofthisline) */;
+ _cmp(ch, data.byte(kMapysize));
+ if (!flags.c())
+ return /* (endofthisline) */;
+ goto lookforlinestart;
+}
+
+void DreamGenContext::getblockofpixel() {
+ STACK_CHECK;
+ push(cx);
+ push(es);
+ push(di);
+ ax = data.word(kMapxstart);
+ _add(cl, al);
+ ax = data.word(kMapystart);
+ _add(ch, al);
+ checkone();
+ _and(cl, 1);
+ if (!flags.z())
+ goto failrain;
+ di = pop();
+ es = pop();
+ cx = pop();
+ return;
+failrain:
+ di = pop();
+ es = pop();
+ cx = pop();
+ al = 0;
+}
+
+void DreamGenContext::showrain() {
+ STACK_CHECK;
+ ds = data.word(kMainsprites);
+ si = 6*58;
+ ax = ds.word(si+2);
+ si = ax;
+ _add(si, 2080);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30));
+ es = data.word(kBuffers);
+ _cmp(es.byte(bx), 255);
+ if (flags.z())
+ return /* (nothunder) */;
+morerain:
+ es = data.word(kBuffers);
+ _cmp(es.byte(bx), 255);
+ if (flags.z())
+ goto finishrain;
+ al = es.byte(bx+1);
+ ah = 0;
+ _add(ax, data.word(kMapady));
+ _add(ax, data.word(kMapystart));
+ cx = 320;
+ _mul(cx);
+ cl = es.byte(bx);
+ ch = 0;
+ _add(ax, cx);
+ _add(ax, data.word(kMapadx));
+ _add(ax, data.word(kMapxstart));
+ di = ax;
+ cl = es.byte(bx+2);
+ ch = 0;
+ ax = es.word(bx+3);
+ dl = es.byte(bx+5);
+ dh = 0;
+ _sub(ax, dx);
+ _and(ax, 511);
+ es.word(bx+3) = ax;
+ _add(bx, 6);
+ push(si);
+ _add(si, ax);
+ es = data.word(kWorkspace);
+ ah = 0;
+ dx = 320-2;
+rainloop:
+ _lodsb();
+ _cmp(al, ah);
+ if (flags.z())
+ goto noplot;
+ _stosb();
+ _add(di, dx);
+ if (--cx)
+ goto rainloop;
+ si = pop();
+ goto morerain;
+noplot:
+ _add(di, 320-1);
+ if (--cx)
+ goto rainloop;
+ si = pop();
+ goto morerain;
+finishrain:
+ _cmp(data.word(kCh1blockstocopy), 0);
+ if (!flags.z())
+ return /* (nothunder) */;
+ _cmp(data.byte(kReallocation), 2);
+ if (!flags.z())
+ goto notlouisthund;
+ _cmp(data.byte(kBeenmugged), 1);
+ if (!flags.z())
+ return /* (nothunder) */;
+notlouisthund:
+ _cmp(data.byte(kReallocation), 55);
+ if (flags.z())
+ return /* (nothunder) */;
+ randomnum1();
+ _cmp(al, 1);
+ if (!flags.c())
+ return /* (nothunder) */;
+ al = 7;
+ _cmp(data.byte(kCh0playing), 6);
+ if (flags.z())
+ goto isthunder1;
+ al = 4;
+isthunder1:
+ playchannel1();
+}
+
+void DreamGenContext::backobject() {
+ STACK_CHECK;
+ ds = data.word(kSetdat);
+ di = es.word(bx+20);
+ al = es.byte(bx+18);
+ _cmp(al, 0);
+ if (flags.z())
+ goto _tmp48z;
+ _dec(al);
+ es.byte(bx+18) = al;
+ return /* (finishback) */;
+_tmp48z:
+ al = ds.byte(di+7);
+ es.byte(bx+18) = al;
+ al = ds.byte(di+8);
+ _cmp(al, 6);
+ if (!flags.z())
+ goto notwidedoor;
+ widedoor();
+ return /* (finishback) */;
+notwidedoor:
+ _cmp(al, 5);
+ if (!flags.z())
+ goto notrandom;
+ random();
+ return /* (finishback) */;
+notrandom:
+ _cmp(al, 4);
+ if (!flags.z())
+ goto notlockdoor;
+ lockeddoorway();
+ return /* (finishback) */;
+notlockdoor:
+ _cmp(al, 3);
+ if (!flags.z())
+ goto notlift;
+ liftsprite();
+ return /* (finishback) */;
+notlift:
+ _cmp(al, 2);
+ if (!flags.z())
+ goto notdoor;
+ doorway();
+ return /* (finishback) */;
+notdoor:
+ _cmp(al, 1);
+ if (!flags.z())
+ goto steadyob;
+ constant();
+ return /* (finishback) */;
+steadyob:
+ steady();
+}
+
+void DreamGenContext::liftnoise() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 5);
+ if (flags.z())
+ goto hissnoise;
+ _cmp(data.byte(kReallocation), 21);
+ if (flags.z())
+ goto hissnoise;
+ playchannel1();
+ return;
+hissnoise:
+ al = 13;
+ playchannel1();
+}
+
+void DreamGenContext::random() {
+ STACK_CHECK;
+ randomnum1();
+ push(di);
+ _and(ax, 7);
+ _add(di, 18);
+ _add(di, ax);
+ al = ds.byte(di);
+ di = pop();
+ es.byte(bx+15) = al;
+}
+
+void DreamGenContext::steady() {
+ STACK_CHECK;
+ al = ds.byte(di+18);
+ ds.byte(di+17) = al;
+ es.byte(bx+15) = al;
+}
+
+void DreamGenContext::constant() {
+ STACK_CHECK;
+ _inc(es.byte(bx+19));
+ cl = es.byte(bx+19);
+ ch = 0;
+ _add(di, cx);
+ _cmp(ds.byte(di+18), 255);
+ if (!flags.z())
+ goto gotconst;
+ _sub(di, cx);
+ cx = 0;
+ es.byte(bx+19) = cl;
+gotconst:
+ al = ds.byte(di+18);
+ _sub(di, cx);
+ es.byte(bx+15) = al;
+ ds.byte(di+17) = al;
+}
+
+void DreamGenContext::doorway() {
+ STACK_CHECK;
+ data.byte(kDoorcheck1) = -24;
+ data.byte(kDoorcheck2) = 10;
+ data.byte(kDoorcheck3) = -30;
+ data.byte(kDoorcheck4) = 10;
+ dodoor();
+}
+
+void DreamGenContext::widedoor() {
+ STACK_CHECK;
+ data.byte(kDoorcheck1) = -24;
+ data.byte(kDoorcheck2) = 24;
+ data.byte(kDoorcheck3) = -30;
+ data.byte(kDoorcheck4) = 24;
+ dodoor();
+}
+
+void DreamGenContext::lockeddoorway() {
+ STACK_CHECK;
+ al = data.byte(kRyanx);
+ ah = data.byte(kRyany);
+ cl = es.byte(bx+10);
+ ch = es.byte(bx+11);
+ _cmp(al, cl);
+ if (!flags.c())
+ goto rtofdoor2;
+ _sub(al, cl);
+ _cmp(al, -24);
+ if (!flags.c())
+ goto upordown2;
+ goto shutdoor2;
+rtofdoor2:
+ _sub(al, cl);
+ _cmp(al, 10);
+ if (!flags.c())
+ goto shutdoor2;
+upordown2:
+ _cmp(ah, ch);
+ if (!flags.c())
+ goto botofdoor2;
+ _sub(ah, ch);
+ _cmp(ah, -30);
+ if (flags.c())
+ goto shutdoor2;
+ goto opendoor2;
+botofdoor2:
+ _sub(ah, ch);
+ _cmp(ah, 12);
+ if (!flags.c())
+ goto shutdoor2;
+opendoor2:
+ _cmp(data.byte(kThroughdoor), 1);
+ if (flags.z())
+ goto mustbeopen;
+ _cmp(data.byte(kLockstatus), 1);
+ if (flags.z())
+ goto shutdoor;
+mustbeopen:
+ cl = es.byte(bx+19);
+ _cmp(cl, 1);
+ if (!flags.z())
+ goto notdoorsound4;
+ al = 0;
+ playchannel1();
+notdoorsound4:
+ _cmp(cl, 6);
+ if (!flags.z())
+ goto noturnonyet;
+ al = data.byte(kDoorpath);
+ push(es);
+ push(bx);
+ turnpathon();
+ bx = pop();
+ es = pop();
+noturnonyet:
+ cl = es.byte(bx+19);
+ _cmp(data.byte(kThroughdoor), 1);
+ if (!flags.z())
+ goto notthrough2;
+ _cmp(cl, 0);
+ if (!flags.z())
+ goto notthrough2;
+ cl = 6;
+notthrough2:
+ _inc(cl);
+ ch = 0;
+ push(di);
+ _add(di, cx);
+ al = ds.byte(di+18);
+ _cmp(al, 255);
+ if (!flags.z())
+ goto atlast3;
+ _dec(di);
+ _dec(cl);
+atlast3:
+ es.byte(bx+19) = cl;
+ al = ds.byte(di+18);
+ di = pop();
+ es.byte(bx+15) = al;
+ ds.byte(di+17) = al;
+ _cmp(cl, 5);
+ if (!flags.z())
+ return /* (justshutting) */;
+ data.byte(kThroughdoor) = 1;
+ return;
+shutdoor2:
+ cl = es.byte(bx+19);
+ _cmp(cl, 5);
+ if (!flags.z())
+ goto notdoorsound3;
+ al = 1;
+ playchannel1();
+notdoorsound3:
+ _cmp(cl, 0);
+ if (flags.z())
+ goto atlast4;
+ _dec(cl);
+ es.byte(bx+19) = cl;
+atlast4:
+ ch = 0;
+ data.byte(kThroughdoor) = 0;
+ push(di);
+ _add(di, cx);
+ al = ds.byte(di+18);
+ di = pop();
+ es.byte(bx+15) = al;
+ ds.byte(di+17) = al;
+ _cmp(cl, 0);
+ if (!flags.z())
+ return /* (notlocky) */;
+ al = data.byte(kDoorpath);
+ push(es);
+ push(bx);
+ turnpathoff();
+ bx = pop();
+ es = pop();
+ data.byte(kLockstatus) = 1;
+ return;
+/*continuing to unbounded code: shutdoor from dodoor:60-87*/
+shutdoor:
+ cl = es.byte(bx+19);
+ _cmp(cl, 5);
+ if (!flags.z())
+ goto notdoorsound1;
+ al = 1;
+ _cmp(data.byte(kReallocation), 5);
+ if (!flags.z())
+ goto nothoteldoor1;
+ al = 13;
+nothoteldoor1:
+ playchannel1();
+notdoorsound1:
+ _cmp(cl, 0);
+ if (flags.z())
+ goto atlast2;
+ _dec(cl);
+ es.byte(bx+19) = cl;
+atlast2:
+ ch = 0;
+ push(di);
+ _add(di, cx);
+ al = ds.byte(di+18);
+ di = pop();
+ es.byte(bx+15) = al;
+ ds.byte(di+17) = al;
+ _cmp(cl, 5);
+ if (!flags.z())
+ return /* (notnearly) */;
+ data.byte(kThroughdoor) = 0;
+}
+
+void DreamGenContext::updatepeople() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
+ data.word(kListpos) = di;
+ cx = 12*5;
+ al = 255;
+ _stosb(cx, true);
+ _inc(data.word(kMaintimer));
+ es = cs;
+ bx = 534;
+ di = 991;
+updateloop:
+ al = es.byte(bx);
+ _cmp(al, 255);
+ if (flags.z())
+ return /* (endupdate) */;
+ _cmp(al, data.byte(kReallocation));
+ if (!flags.z())
+ goto notinthisroom;
+ cx = es.word(bx+1);
+ _cmp(cl, data.byte(kMapx));
+ if (!flags.z())
+ goto notinthisroom;
+ _cmp(ch, data.byte(kMapy));
+ if (!flags.z())
+ goto notinthisroom;
+ push(di);
+ ax = cs.word(di);
+ __dispatch_call(ax);
+ di = pop();
+notinthisroom:
+ _add(bx, 8);
+ _add(di, 2);
+ goto updateloop;
+}
+
+void DreamGenContext::getreelframeax() {
+ STACK_CHECK;
+ push(ds);
+ data.word(kCurrentframe) = ax;
+ findsource();
+ es = ds;
+ ds = pop();
+ ax = data.word(kCurrentframe);
+ _sub(ax, data.word(kTakeoff));
+ _add(ax, ax);
+ cx = ax;
+ _add(ax, ax);
+ _add(ax, cx);
+ bx = ax;
+}
+
+void DreamGenContext::reelsonscreen() {
+ STACK_CHECK;
+ reconstruct();
+ updatepeople();
+ watchreel();
+ showrain();
+ usetimedtext();
+}
+
+void DreamGenContext::plotreel() {
+ STACK_CHECK;
+ getreelstart();
+retryreel:
+ push(es);
+ push(si);
+ ax = es.word(si+2);
+ _cmp(al, 220);
+ if (flags.c())
+ goto normalreel;
+ _cmp(al, 255);
+ if (flags.z())
+ goto normalreel;
+ dealwithspecial();
+ _inc(data.word(kReelpointer));
+ si = pop();
+ es = pop();
+ _add(si, 40);
+ goto retryreel;
+normalreel:
+ cx = 8;
+plotloop:
+ push(cx);
+ push(es);
+ push(si);
+ ax = es.word(si);
+ _cmp(ax, 0x0ffff);
+ if (flags.z())
+ goto notplot;
+ showreelframe();
+notplot:
+ si = pop();
+ es = pop();
+ cx = pop();
+ _add(si, 5);
+ if (--cx)
+ goto plotloop;
+ soundonreels();
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::soundonreels() {
+ STACK_CHECK;
+ bl = data.byte(kReallocation);
+ _add(bl, bl);
+ _xor(bh, bh);
+ _add(bx, 1214);
+ si = cs.word(bx);
+reelsoundloop:
+ al = cs.byte(si);
+ _cmp(al, 255);
+ if (flags.z())
+ goto endreelsound;
+ ax = cs.word(si+1);
+ _cmp(ax, data.word(kReelpointer));
+ if (!flags.z())
+ goto skipreelsound;
+ _cmp(ax, data.word(kLastsoundreel));
+ if (flags.z())
+ goto skipreelsound;
+ data.word(kLastsoundreel) = ax;
+ al = cs.byte(si);
+ _cmp(al, 64);
+ if (flags.c())
+ { playchannel1(); return; };
+ _cmp(al, 128);
+ if (flags.c())
+ goto channel0once;
+ _and(al, 63);
+ ah = 255;
+ { playchannel0(); return; };
+channel0once:
+ _and(al, 63);
+ ah = 0;
+ { playchannel0(); return; };
+skipreelsound:
+ _add(si, 3);
+ goto reelsoundloop;
+endreelsound:
+ ax = data.word(kLastsoundreel);
+ _cmp(ax, data.word(kReelpointer));
+ if (flags.z())
+ return /* (nochange2) */;
+ data.word(kLastsoundreel) = -1;
+}
+
+void DreamGenContext::reconstruct() {
+ STACK_CHECK;
+ _cmp(data.byte(kHavedoneobs), 0);
+ if (flags.z())
+ return /* (noneedtorecon) */;
+ data.byte(kNewobs) = 1;
+ drawfloor();
+ spriteupdate();
+ printsprites();
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto notfudge;
+ _cmp(data.byte(kReallocation), 20);
+ if (!flags.z())
+ goto notfudge;
+ undertextline();
+notfudge:
+ data.byte(kHavedoneobs) = 0;
+}
+
+void DreamGenContext::dealwithspecial() {
+ STACK_CHECK;
+ _sub(al, 220);
+ _cmp(al, 0);
+ if (!flags.z())
+ goto notplset;
+ al = ah;
+ placesetobject();
+ data.byte(kHavedoneobs) = 1;
+ return;
+notplset:
+ _cmp(al, 1);
+ if (!flags.z())
+ goto notremset;
+ al = ah;
+ removesetobject();
+ data.byte(kHavedoneobs) = 1;
+ return;
+notremset:
+ _cmp(al, 2);
+ if (!flags.z())
+ goto notplfree;
+ al = ah;
+ placefreeobject();
+ data.byte(kHavedoneobs) = 1;
+ return;
+notplfree:
+ _cmp(al, 3);
+ if (!flags.z())
+ goto notremfree;
+ al = ah;
+ removefreeobject();
+ data.byte(kHavedoneobs) = 1;
+ return;
+notremfree:
+ _cmp(al, 4);
+ if (!flags.z())
+ goto notryanoff;
+ switchryanoff();
+ return;
+notryanoff:
+ _cmp(al, 5);
+ if (!flags.z())
+ goto notryanon;
+ data.byte(kTurntoface) = ah;
+ data.byte(kFacing) = ah;
+ switchryanon();
+ return;
+notryanon:
+ _cmp(al, 6);
+ if (!flags.z())
+ goto notchangeloc;
+ data.byte(kNewlocation) = ah;
+ return;
+notchangeloc:
+ movemap();
+}
+
+void DreamGenContext::movemap() {
+ STACK_CHECK;
+ _cmp(ah, 32);
+ if (!flags.z())
+ goto notmapup2;
+ _sub(data.byte(kMapy), 20);
+ data.byte(kNowinnewroom) = 1;
+ return;
+notmapup2:
+ _cmp(ah, 16);
+ if (!flags.z())
+ goto notmapupspec;
+ _sub(data.byte(kMapy), 10);
+ data.byte(kNowinnewroom) = 1;
+ return;
+notmapupspec:
+ _cmp(ah, 8);
+ if (!flags.z())
+ goto notmapdownspec;
+ _add(data.byte(kMapy), 10);
+ data.byte(kNowinnewroom) = 1;
+ return;
+notmapdownspec:
+ _cmp(ah, 2);
+ if (!flags.z())
+ goto notmaprightspec;
+ _add(data.byte(kMapx), 11);
+ data.byte(kNowinnewroom) = 1;
+ return;
+notmaprightspec:
+ _sub(data.byte(kMapx), 11);
+ data.byte(kNowinnewroom) = 1;
+}
+
+void DreamGenContext::getreelstart() {
+ STACK_CHECK;
+ ax = data.word(kReelpointer);
+ cx = 40;
+ _mul(cx);
+ es = data.word(kReels);
+ si = ax;
+ _add(si, (0+(36*144)));
+}
+
+void DreamGenContext::showreelframe() {
+ STACK_CHECK;
+ al = es.byte(si+2);
+ ah = 0;
+ di = ax;
+ _add(di, data.word(kMapadx));
+ al = es.byte(si+3);
+ bx = ax;
+ _add(bx, data.word(kMapady));
+ ax = es.word(si);
+ data.word(kCurrentframe) = ax;
+ findsource();
+ ax = data.word(kCurrentframe);
+ _sub(ax, data.word(kTakeoff));
+ ah = 8;
+ showframe();
+}
+
+void DreamGenContext::deleverything() {
+ STACK_CHECK;
+ al = data.byte(kMapysize);
+ ah = 0;
+ _add(ax, data.word(kMapoffsety));
+ _cmp(ax, 182);
+ if (!flags.c())
+ goto bigroom;
+ maptopanel();
+ return;
+bigroom:
+ _sub(data.byte(kMapysize), 8);
+ maptopanel();
+ _add(data.byte(kMapysize), 8);
+}
+
+void DreamGenContext::dumpeverything() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40));
+dumpevery1:
+ ax = es.word(bx);
+ cx = es.word(bx+2);
+ _cmp(ax, 0x0ffff);
+ if (flags.z())
+ goto finishevery1;
+ _cmp(ax, es.word(bx+(40*5)));
+ if (!flags.z())
+ goto notskip1;
+ _cmp(cx, es.word(bx+(40*5)+2));
+ if (flags.z())
+ goto skip1;
+notskip1:
+ push(bx);
+ push(es);
+ push(ds);
+ bl = ah;
+ bh = 0;
+ ah = 0;
+ di = ax;
+ _add(di, data.word(kMapadx));
+ _add(bx, data.word(kMapady));
+ multidump();
+ ds = pop();
+ es = pop();
+ bx = pop();
+skip1:
+ _add(bx, 5);
+ goto dumpevery1;
+finishevery1:
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40))+(40*5);
+dumpevery2:
+ ax = es.word(bx);
+ cx = es.word(bx+2);
+ _cmp(ax, 0x0ffff);
+ if (flags.z())
+ return /* (finishevery2) */;
+ push(bx);
+ push(es);
+ push(ds);
+ bl = ah;
+ bh = 0;
+ ah = 0;
+ di = ax;
+ _add(di, data.word(kMapadx));
+ _add(bx, data.word(kMapady));
+ multidump();
+ ds = pop();
+ es = pop();
+ bx = pop();
+ _add(bx, 5);
+ goto dumpevery2;
+}
+
+void DreamGenContext::allocatework() {
+ STACK_CHECK;
+ bx = 0x1000;
+ allocatemem();
+ data.word(kWorkspace) = ax;
+}
+
+void DreamGenContext::loadpalfromiff() {
+ STACK_CHECK;
+ dx = 2481;
+ openfile();
+ cx = 2000;
+ ds = data.word(kMapstore);
+ dx = 0;
+ readfromfile();
+ closefile();
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ ds = data.word(kMapstore);
+ si = 0x30;
+ cx = 768;
+palloop:
+ _lodsb();
+ _shr(al, 1);
+ _shr(al, 1);
+ _cmp(data.byte(kBrightness), 1);
+ if (!flags.z())
+ goto nought;
+ _cmp(al, 0);
+ if (flags.z())
+ goto nought;
+ ah = al;
+ _shr(ah, 1);
+ _add(al, ah);
+ _shr(ah, 1);
+ _add(al, ah);
+ _cmp(al, 64);
+ if (flags.c())
+ goto nought;
+ al = 63;
+nought:
+ _stosb();
+ if (--cx)
+ goto palloop;
+}
+
+void DreamGenContext::paneltomap() {
+ STACK_CHECK;
+ di = data.word(kMapxstart);
+ _add(di, data.word(kMapadx));
+ bx = data.word(kMapystart);
+ _add(bx, data.word(kMapady));
+ ds = data.word(kMapstore);
+ si = 0;
+ cl = data.byte(kMapxsize);
+ ch = data.byte(kMapysize);
+ multiget();
+}
+
+void DreamGenContext::maptopanel() {
+ STACK_CHECK;
+ di = data.word(kMapxstart);
+ _add(di, data.word(kMapadx));
+ bx = data.word(kMapystart);
+ _add(bx, data.word(kMapady));
+ ds = data.word(kMapstore);
+ si = 0;
+ cl = data.byte(kMapxsize);
+ ch = data.byte(kMapysize);
+ multiput();
+}
+
+void DreamGenContext::dumpmap() {
+ STACK_CHECK;
+ di = data.word(kMapxstart);
+ _add(di, data.word(kMapadx));
+ bx = data.word(kMapystart);
+ _add(bx, data.word(kMapady));
+ cl = data.byte(kMapxsize);
+ ch = data.byte(kMapysize);
+ multidump();
+}
+
+void DreamGenContext::pixelcheckset() {
+ STACK_CHECK;
+ push(ax);
+ _sub(al, es.byte(bx));
+ _sub(ah, es.byte(bx+1));
+ push(es);
+ push(bx);
+ push(cx);
+ push(ax);
+ al = es.byte(bx+4);
+ getsetad();
+ al = es.byte(bx+17);
+ es = data.word(kSetframes);
+ bx = (0);
+ ah = 0;
+ cx = 6;
+ _mul(cx);
+ _add(bx, ax);
+ ax = pop();
+ push(ax);
+ al = ah;
+ ah = 0;
+ cl = es.byte(bx);
+ ch = 0;
+ _mul(cx);
+ cx = pop();
+ ch = 0;
+ _add(ax, cx);
+ _add(ax, es.word(bx+2));
+ bx = ax;
+ _add(bx, (0+2080));
+ al = es.byte(bx);
+ dl = al;
+ cx = pop();
+ bx = pop();
+ es = pop();
+ ax = pop();
+ _cmp(dl, 0);
+}
+
+void DreamGenContext::createpanel() {
+ STACK_CHECK;
+ di = 0;
+ bx = 8;
+ ds = data.word(kIcons2);
+ al = 0;
+ ah = 2;
+ showframe();
+ di = 160;
+ bx = 8;
+ ds = data.word(kIcons2);
+ al = 0;
+ ah = 2;
+ showframe();
+ di = 0;
+ bx = 104;
+ ds = data.word(kIcons2);
+ al = 0;
+ ah = 2;
+ showframe();
+ di = 160;
+ bx = 104;
+ ds = data.word(kIcons2);
+ al = 0;
+ ah = 2;
+ showframe();
+}
+
+void DreamGenContext::createpanel2() {
+ STACK_CHECK;
+ createpanel();
+ di = 0;
+ bx = 0;
+ ds = data.word(kIcons2);
+ al = 5;
+ ah = 2;
+ showframe();
+ di = 160;
+ bx = 0;
+ ds = data.word(kIcons2);
+ al = 5;
+ ah = 2;
+ showframe();
+}
+
+void DreamGenContext::clearwork() {
+ STACK_CHECK;
+ ax = 0x0;
+ es = data.word(kWorkspace);
+ di = 0;
+ cx = (200*320)/64;
+clearloop:
+ _stosw(32);
+ if (--cx)
+ goto clearloop;
+}
+
+void DreamGenContext::zoom() {
+ STACK_CHECK;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ return /* (inwatching) */;
+ _cmp(data.byte(kZoomon), 1);
+ if (flags.z())
+ goto zoomswitch;
+ return;
+zoomswitch:
+ _cmp(data.byte(kCommandtype), 199);
+ if (flags.c())
+ goto zoomit;
+ putunderzoom();
+ return;
+zoomit:
+ ax = data.word(kOldpointery);
+ _sub(ax, 9);
+ cx = (320);
+ _mul(cx);
+ _add(ax, data.word(kOldpointerx));
+ _sub(ax, 11);
+ si = ax;
+ ax = (132)+4;
+ cx = (320);
+ _mul(cx);
+ _add(ax, (8)+5);
+ di = ax;
+ es = data.word(kWorkspace);
+ ds = data.word(kWorkspace);
+ cx = 20;
+zoomloop:
+ push(cx);
+ cx = 23;
+zoomloop2:
+ _lodsb();
+ ah = al;
+ _stosw();
+ es.word(di+(320)-2) = ax;
+ if (--cx)
+ goto zoomloop2;
+ _add(si, (320)-23);
+ _add(di, (320)-46+(320));
+ cx = pop();
+ if (--cx)
+ goto zoomloop;
+ crosshair();
+ data.byte(kDidzoom) = 1;
+}
+
+void DreamGenContext::delthisone() {
+ STACK_CHECK;
+ push(ax);
+ push(ax);
+ al = ah;
+ ah = 0;
+ _add(ax, data.word(kMapady));
+ bx = (320);
+ _mul(bx);
+ bx = pop();
+ bh = 0;
+ _add(bx, data.word(kMapadx));
+ _add(ax, bx);
+ di = ax;
+ ax = pop();
+ push(ax);
+ al = ah;
+ ah = 0;
+ bx = 22*8;
+ _mul(bx);
+ bx = pop();
+ bh = 0;
+ _add(ax, bx);
+ si = ax;
+ es = data.word(kWorkspace);
+ ds = data.word(kMapstore);
+ dl = cl;
+ dh = 0;
+ ax = (320);
+ _sub(ax, dx);
+ _neg(dx);
+ _add(dx, 22*8);
+deloneloop:
+ push(cx);
+ ch = 0;
+ _movsb(cx, true);
+ cx = pop();
+ _add(di, ax);
+ _add(si, dx);
+ _dec(ch);
+ if (!flags.z())
+ goto deloneloop;
+}
+
+void DreamGenContext::doblocks() {
+ STACK_CHECK;
+ es = data.word(kWorkspace);
+ ax = data.word(kMapady);
+ cx = (320);
+ _mul(cx);
+ di = data.word(kMapadx);
+ _add(di, ax);
+ al = data.byte(kMapy);
+ ah = 0;
+ bx = (66);
+ _mul(bx);
+ bl = data.byte(kMapx);
+ bh = 0;
+ _add(ax, bx);
+ si = (0);
+ _add(si, ax);
+ cx = 10;
+loop120:
+ push(di);
+ push(cx);
+ cx = 11;
+loop124:
+ push(cx);
+ push(di);
+ ds = data.word(kMapdata);
+ _lodsb();
+ ds = data.word(kBackdrop);
+ push(si);
+ _cmp(al, 0);
+ if (flags.z())
+ goto zeroblock;
+ ah = al;
+ al = 0;
+ si = (0+192);
+ _add(si, ax);
+ bh = 14;
+ bh = 4;
+firstbitofblock:
+ _movsw(8);
+ _add(di, (320)-16);
+ _dec(bh);
+ if (!flags.z())
+ goto firstbitofblock;
+ bh = 12;
+loop125:
+ _movsw(8);
+ ax = 0x0dfdf;
+ _stosw(2);
+ _add(di, (320)-20);
+ _dec(bh);
+ if (!flags.z())
+ goto loop125;
+ _add(di, 4);
+ ax = 0x0dfdf;
+ _stosw(8);
+ _add(di, (320)-16);
+ _stosw(8);
+ _add(di, (320)-16);
+ _stosw(8);
+ _add(di, (320)-16);
+ _stosw(8);
+zeroblock:
+ si = pop();
+ di = pop();
+ cx = pop();
+ _add(di, 16);
+ if (--cx)
+ goto loop124;
+ _add(si, (66)-11);
+ cx = pop();
+ di = pop();
+ _add(di, (320)*16);
+ if (--cx)
+ goto loop120;
+}
+
+void DreamGenContext::transferinv() {
+ STACK_CHECK;
+ di = data.word(kExframepos);
+ push(di);
+ al = data.byte(kExpos);
+ ah = 0;
+ bx = ax;
+ _add(ax, ax);
+ _add(ax, bx);
+ _inc(ax);
+ cx = 6;
+ _mul(cx);
+ es = data.word(kExtras);
+ bx = (0);
+ _add(bx, ax);
+ _add(di, (0+2080));
+ push(bx);
+ al = data.byte(kItemtotran);
+ ah = 0;
+ bx = ax;
+ _add(ax, ax);
+ _add(ax, bx);
+ _inc(ax);
+ cx = 6;
+ _mul(cx);
+ ds = data.word(kFreeframes);
+ bx = (0);
+ _add(bx, ax);
+ si = (0+2080);
+ al = ds.byte(bx);
+ ah = 0;
+ cl = ds.byte(bx+1);
+ ch = 0;
+ _add(si, ds.word(bx+2));
+ dx = ds.word(bx+4);
+ bx = pop();
+ es.byte(bx+0) = al;
+ es.byte(bx+1) = cl;
+ es.word(bx+4) = dx;
+ _mul(cx);
+ cx = ax;
+ push(cx);
+ _movsb(cx, true);
+ cx = pop();
+ ax = pop();
+ es.word(bx+2) = ax;
+ _add(data.word(kExframepos), cx);
+}
+
+void DreamGenContext::transfermap() {
+ STACK_CHECK;
+ di = data.word(kExframepos);
+ push(di);
+ al = data.byte(kExpos);
+ ah = 0;
+ bx = ax;
+ _add(ax, ax);
+ _add(ax, bx);
+ cx = 6;
+ _mul(cx);
+ es = data.word(kExtras);
+ bx = (0);
+ _add(bx, ax);
+ _add(di, (0+2080));
+ push(bx);
+ al = data.byte(kItemtotran);
+ ah = 0;
+ bx = ax;
+ _add(ax, ax);
+ _add(ax, bx);
+ cx = 6;
+ _mul(cx);
+ ds = data.word(kFreeframes);
+ bx = (0);
+ _add(bx, ax);
+ si = (0+2080);
+ al = ds.byte(bx);
+ ah = 0;
+ cl = ds.byte(bx+1);
+ ch = 0;
+ _add(si, ds.word(bx+2));
+ dx = ds.word(bx+4);
+ bx = pop();
+ es.byte(bx+0) = al;
+ es.byte(bx+1) = cl;
+ es.word(bx+4) = dx;
+ _mul(cx);
+ cx = ax;
+ push(cx);
+ _movsb(cx, true);
+ cx = pop();
+ ax = pop();
+ es.word(bx+2) = ax;
+ _add(data.word(kExframepos), cx);
+}
+
+void DreamGenContext::dofade() {
+ STACK_CHECK;
+ _cmp(data.byte(kFadedirection), 0);
+ if (flags.z())
+ return /* (finishfade) */;
+ cl = data.byte(kNumtofade);
+ ch = 0;
+ al = data.byte(kColourpos);
+ ah = 0;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ _add(si, ax);
+ _add(si, ax);
+ _add(si, ax);
+ showgroup();
+ al = data.byte(kNumtofade);
+ _add(al, data.byte(kColourpos));
+ data.byte(kColourpos) = al;
+ _cmp(al, 0);
+ if (!flags.z())
+ return /* (finishfade) */;
+ fadecalculation();
+}
+
+void DreamGenContext::clearendpal() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ cx = 768;
+ al = 0;
+ _stosb(cx, true);
+}
+
+void DreamGenContext::clearpalette() {
+ STACK_CHECK;
+ data.byte(kFadedirection) = 0;
+ clearstartpal();
+ dumpcurrent();
+}
+
+void DreamGenContext::fadescreenup() {
+ STACK_CHECK;
+ clearstartpal();
+ paltoendpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+}
+
+void DreamGenContext::fadetowhite() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ cx = 768;
+ al = 63;
+ _stosb(cx, true);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ al = 0;
+ _stosb(3);
+ paltostartpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+}
+
+void DreamGenContext::fadefromwhite() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ cx = 768;
+ al = 63;
+ _stosb(cx, true);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ al = 0;
+ _stosb(3);
+ paltoendpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+}
+
+void DreamGenContext::fadescreenups() {
+ STACK_CHECK;
+ clearstartpal();
+ paltoendpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 64;
+}
+
+void DreamGenContext::fadescreendownhalf() {
+ STACK_CHECK;
+ paltostartpal();
+ paltoendpal();
+ cx = 768;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+halfend:
+ al = es.byte(bx);
+ _shr(al, 1);
+ es.byte(bx) = al;
+ _inc(bx);
+ if (--cx)
+ goto halfend;
+ ds = data.word(kBuffers);
+ es = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(56*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(56*3);
+ cx = 3*5;
+ _movsb(cx, true);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(77*3);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(77*3);
+ cx = 3*2;
+ _movsb(cx, true);
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 31;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 32;
+}
+
+void DreamGenContext::fadescreenuphalf() {
+ STACK_CHECK;
+ endpaltostart();
+ paltoendpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 31;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 32;
+}
+
+void DreamGenContext::fadescreendown() {
+ STACK_CHECK;
+ paltostartpal();
+ clearendpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+}
+
+void DreamGenContext::fadescreendowns() {
+ STACK_CHECK;
+ paltostartpal();
+ clearendpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 64;
+}
+
+void DreamGenContext::clearstartpal() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ cx = 256;
+wholeloop1:
+ ax = 0;
+ _stosw();
+ al = 0;
+ _stosb();
+ if (--cx)
+ goto wholeloop1;
+}
+
+void DreamGenContext::showgun() {
+ STACK_CHECK;
+ data.byte(kAddtored) = 0;
+ data.byte(kAddtogreen) = 0;
+ data.byte(kAddtoblue) = 0;
+ paltostartpal();
+ paltoendpal();
+ greyscalesum();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ cx = 130;
+ hangon();
+ endpaltostart();
+ clearendpal();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ cx = 200;
+ hangon();
+ data.byte(kRoomssample) = 34;
+ loadroomssample();
+ data.byte(kVolume) = 0;
+ dx = 2351;
+ loadintotemp();
+ createpanel2();
+ ds = data.word(kTempgraphics);
+ al = 0;
+ ah = 0;
+ di = 100;
+ bx = 4;
+ showframe();
+ ds = data.word(kTempgraphics);
+ al = 1;
+ ah = 0;
+ di = 158;
+ bx = 106;
+ showframe();
+ worktoscreen();
+ getridoftemp();
+ fadescreenup();
+ cx = 160;
+ hangon();
+ al = 12;
+ ah = 0;
+ playchannel0();
+ dx = 2260;
+ loadtemptext();
+ rollendcredits2();
+ getridoftemptext();
+}
+
+void DreamGenContext::rollendcredits2() {
+ STACK_CHECK;
+ rollem();
+}
+
+void DreamGenContext::rollem() {
+ STACK_CHECK;
+ cl = 160;
+ ch = 160;
+ di = 25;
+ bx = 20;
+ ds = data.word(kMapstore);
+ si = 0;
+ multiget();
+ es = data.word(kTextfile1);
+ si = 49*2;
+ ax = es.word(si);
+ si = ax;
+ _add(si, (66*2));
+ cx = 80;
+endcredits21:
+ push(cx);
+ bx = 10;
+ cx = data.word(kLinespacing);
+endcredits22:
+ push(cx);
+ push(si);
+ push(di);
+ push(es);
+ push(bx);
+ vsync();
+ cl = 160;
+ ch = 160;
+ di = 25;
+ bx = 20;
+ ds = data.word(kMapstore);
+ si = 0;
+ multiput();
+ vsync();
+ bx = pop();
+ es = pop();
+ di = pop();
+ si = pop();
+ push(si);
+ push(di);
+ push(es);
+ push(bx);
+ cx = 18;
+onelot2:
+ push(cx);
+ di = 25;
+ dx = 161;
+ ax = 0;
+ printdirect();
+ _add(bx, data.word(kLinespacing));
+ cx = pop();
+ if (--cx)
+ goto onelot2;
+ vsync();
+ cl = 160;
+ ch = 160;
+ di = 25;
+ bx = 20;
+ multidump();
+ bx = pop();
+ es = pop();
+ di = pop();
+ si = pop();
+ cx = pop();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto endearly2;
+ _dec(bx);
+ if (--cx)
+ goto endcredits22;
+ cx = pop();
+looknext2:
+ al = es.byte(si);
+ _inc(si);
+ _cmp(al, ':');
+ if (flags.z())
+ goto gotnext2;
+ _cmp(al, 0);
+ if (flags.z())
+ goto gotnext2;
+ goto looknext2;
+gotnext2:
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ return /* (endearly) */;
+ if (--cx)
+ goto endcredits21;
+ cx = 120;
+ hangone();
+ return;
+endearly2:
+ cx = pop();
+}
+
+void DreamGenContext::fadecalculation() {
+ STACK_CHECK;
+ _cmp(data.byte(kFadecount), 0);
+ if (flags.z())
+ goto nomorefading;
+ bl = data.byte(kFadecount);
+ es = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ cx = 768;
+fadecolloop:
+ al = es.byte(si);
+ ah = es.byte(di);
+ _cmp(al, ah);
+ if (flags.z())
+ goto gotthere;
+ if (flags.c())
+ goto lesscolour;
+ _dec(es.byte(si));
+ goto gotthere;
+lesscolour:
+ _cmp(bl, ah);
+ if (flags.z())
+ goto withit;
+ if (!flags.c())
+ goto gotthere;
+withit:
+ _inc(es.byte(si));
+gotthere:
+ _inc(si);
+ _inc(di);
+ if (--cx)
+ goto fadecolloop;
+ _dec(data.byte(kFadecount));
+ return;
+nomorefading:
+ data.byte(kFadedirection) = 0;
+}
+
+void DreamGenContext::greyscalesum() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ cx = 256;
+greysumloop1:
+ push(cx);
+ bx = 0;
+ al = es.byte(si);
+ ah = 0;
+ cx = 20;
+ _mul(cx);
+ _add(bx, ax);
+ al = es.byte(si+1);
+ ah = 0;
+ cx = 59;
+ _mul(cx);
+ _add(bx, ax);
+ al = es.byte(si+2);
+ ah = 0;
+ cx = 11;
+ _mul(cx);
+ _add(bx, ax);
+ al = -1;
+greysumloop2:
+ _inc(al);
+ _sub(bx, 100);
+ if (!flags.c())
+ goto greysumloop2;
+ bl = al;
+ al = bl;
+ ah = data.byte(kAddtored);
+ _cmp(al, 0);
+ _add(al, ah);
+ _stosb();
+ ah = data.byte(kAddtogreen);
+ al = bl;
+ _cmp(al, 0);
+ if (flags.z())
+ goto noaddg;
+ _add(al, ah);
+noaddg:
+ _stosb();
+ ah = data.byte(kAddtoblue);
+ al = bl;
+ _cmp(al, 0);
+ if (flags.z())
+ goto noaddb;
+ _add(al, ah);
+noaddb:
+ _stosb();
+ _add(si, 3);
+ cx = pop();
+ if (--cx)
+ goto greysumloop1;
+}
+
+void DreamGenContext::paltostartpal() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ cx = 768/2;
+ _movsw(cx, true);
+}
+
+void DreamGenContext::endpaltostart() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ cx = 768/2;
+ _movsw(cx, true);
+}
+
+void DreamGenContext::startpaltoend() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ ds = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ cx = 768/2;
+ _movsw(cx, true);
+}
+
+void DreamGenContext::paltoendpal() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ ds = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ cx = 768/2;
+ _movsw(cx, true);
+}
+
+void DreamGenContext::allpalette() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ ds = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ cx = 768/2;
+ _movsw(cx, true);
+ dumpcurrent();
+}
+
+void DreamGenContext::dumpcurrent() {
+ STACK_CHECK;
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ ds = data.word(kBuffers);
+ vsync();
+ al = 0;
+ cx = 128;
+ showgroup();
+ vsync();
+ al = 128;
+ cx = 128;
+ showgroup();
+}
+
+void DreamGenContext::fadedownmon() {
+ STACK_CHECK;
+ paltostartpal();
+ paltoendpal();
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
+ cx = 3*8;
+ ax = 0;
+ _stosb(cx, true);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
+ _stosb();
+ _stosw();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ cx = 64;
+ hangon();
+}
+
+void DreamGenContext::fadeupmon() {
+ STACK_CHECK;
+ paltostartpal();
+ paltoendpal();
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(231*3);
+ cx = 3*8;
+ ax = 0;
+ _stosb(cx, true);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
+ _stosb();
+ _stosw();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ cx = 128;
+ hangon();
+}
+
+void DreamGenContext::fadeupmonfirst() {
+ STACK_CHECK;
+ paltostartpal();
+ paltoendpal();
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(231*3);
+ cx = 3*8;
+ ax = 0;
+ _stosb(cx, true);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
+ _stosb();
+ _stosw();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ cx = 64;
+ hangon();
+ al = 26;
+ playchannel1();
+ cx = 64;
+ hangon();
+}
+
+void DreamGenContext::fadeupyellows() {
+ STACK_CHECK;
+ paltoendpal();
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(231*3);
+ cx = 3*8;
+ ax = 0;
+ _stosb(cx, true);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(246*3);
+ _stosb();
+ _stosw();
+ data.byte(kFadedirection) = 1;
+ data.byte(kFadecount) = 63;
+ data.byte(kColourpos) = 0;
+ data.byte(kNumtofade) = 128;
+ cx = 128;
+ hangon();
+}
+
+void DreamGenContext::initialmoncols() {
+ STACK_CHECK;
+ paltostartpal();
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
+ cx = 3*9;
+ ax = 0;
+ _stosb(cx, true);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3))+(246*3);
+ _stosb();
+ _stosw();
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(230*3);
+ al = 230;
+ cx = 18;
+ showgroup();
+}
+
+void DreamGenContext::titles() {
+ STACK_CHECK;
+ clearpalette();
+ biblequote();
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (titlesearly) */;
+ intro();
+}
+
+void DreamGenContext::endgame() {
+ STACK_CHECK;
+ dx = 2260;
+ loadtemptext();
+ monkspeaking();
+ gettingshot();
+ getridoftemptext();
+ data.byte(kVolumeto) = 7;
+ data.byte(kVolumedirection) = 1;
+ cx = 200;
+ hangon();
+}
+
+void DreamGenContext::monkspeaking() {
+ STACK_CHECK;
+ data.byte(kRoomssample) = 35;
+ loadroomssample();
+ dx = 2364;
+ loadintotemp();
+ clearwork();
+ showmonk();
+ worktoscreen();
+ data.byte(kVolume) = 7;
+ data.byte(kVolumedirection) = -1;
+ data.byte(kVolumeto) = 5;
+ al = 12;
+ ah = 255;
+ playchannel0();
+ fadescreenups();
+ cx = 300;
+ hangon();
+ al = 40;
+loadspeech2:
+ push(ax);
+ dl = 'T';
+ dh = 83;
+ cl = 'T';
+ ah = 0;
+ loadspeech();
+ al = 50+12;
+ playchannel1();
+notloadspeech2:
+ vsync();
+ _cmp(data.byte(kCh1playing), 255);
+ if (!flags.z())
+ goto notloadspeech2;
+ ax = pop();
+ _inc(al);
+ _cmp(al, 48);
+ if (!flags.z())
+ goto loadspeech2;
+ data.byte(kVolumedirection) = 1;
+ data.byte(kVolumeto) = 7;
+ fadescreendowns();
+ cx = 300;
+ hangon();
+ getridoftemp();
+}
+
+void DreamGenContext::showmonk() {
+ STACK_CHECK;
+ al = 0;
+ ah = 128;
+ di = 160;
+ bx = 72;
+ ds = data.word(kTempgraphics);
+ showframe();
+}
+
+void DreamGenContext::gettingshot() {
+ STACK_CHECK;
+ data.byte(kNewlocation) = 55;
+ clearpalette();
+ loadintroroom();
+ fadescreenups();
+ data.byte(kVolumeto) = 0;
+ data.byte(kVolumedirection) = -1;
+ runendseq();
+ clearbeforeload();
+}
+
+void DreamGenContext::credits() {
+ STACK_CHECK;
+ clearpalette();
+ realcredits();
+}
+
+void DreamGenContext::biblequote() {
+ STACK_CHECK;
+ mode640x480();
+ dx = 2377;
+ showpcx();
+ fadescreenups();
+ cx = 80;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto biblequotearly;
+ cx = 560;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto biblequotearly;
+ fadescreendowns();
+ cx = 200;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto biblequotearly;
+ cancelch0();
+biblequotearly:
+ data.byte(kLasthardkey) = 0;
+}
+
+void DreamGenContext::hangone() {
+ STACK_CHECK;
+hangonloope:
+ push(cx);
+ vsync();
+ cx = pop();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ return /* (hangonearly) */;
+ if (--cx)
+ goto hangonloope;
+}
+
+void DreamGenContext::intro() {
+ STACK_CHECK;
+ dx = 2247;
+ loadtemptext();
+ loadpalfromiff();
+ setmode();
+ data.byte(kNewlocation) = 50;
+ clearpalette();
+ loadintroroom();
+ data.byte(kVolume) = 7;
+ data.byte(kVolumedirection) = -1;
+ data.byte(kVolumeto) = 4;
+ al = 12;
+ ah = 255;
+ playchannel0();
+ fadescreenups();
+ runintroseq();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto introearly;
+ clearbeforeload();
+ data.byte(kNewlocation) = 52;
+ loadintroroom();
+ runintroseq();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto introearly;
+ clearbeforeload();
+ data.byte(kNewlocation) = 53;
+ loadintroroom();
+ runintroseq();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto introearly;
+ clearbeforeload();
+ allpalette();
+ data.byte(kNewlocation) = 54;
+ loadintroroom();
+ runintroseq();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto introearly;
+ getridoftemptext();
+ clearbeforeload();
+introearly:
+ data.byte(kLasthardkey) = 0;
+}
+
+void DreamGenContext::runintroseq() {
+ STACK_CHECK;
+ data.byte(kGetback) = 0;
+moreintroseq:
+ vsync();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto earlyendrun;
+ spriteupdate();
+ vsync();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto earlyendrun;
+ deleverything();
+ printsprites();
+ reelsonscreen();
+ afterintroroom();
+ usetimedtext();
+ vsync();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto earlyendrun;
+ dumpmap();
+ dumptimedtext();
+ vsync();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto earlyendrun;
+ _cmp(data.byte(kGetback), 1);
+ if (!flags.z())
+ goto moreintroseq;
+ return;
+earlyendrun:
+ getridoftemptext();
+ clearbeforeload();
+}
+
+void DreamGenContext::runendseq() {
+ STACK_CHECK;
+ atmospheres();
+ data.byte(kGetback) = 0;
+moreendseq:
+ vsync();
+ spriteupdate();
+ vsync();
+ deleverything();
+ printsprites();
+ reelsonscreen();
+ afterintroroom();
+ usetimedtext();
+ vsync();
+ dumpmap();
+ dumptimedtext();
+ vsync();
+ _cmp(data.byte(kGetback), 1);
+ if (!flags.z())
+ goto moreendseq;
+}
+
+void DreamGenContext::loadintroroom() {
+ STACK_CHECK;
+ data.byte(kIntrocount) = 0;
+ data.byte(kLocation) = 255;
+ loadroom();
+ data.word(kMapoffsetx) = 72;
+ data.word(kMapoffsety) = 16;
+ clearsprites();
+ data.byte(kThroughdoor) = 0;
+ data.byte(kCurrentkey) = '0';
+ data.byte(kMainmode) = 0;
+ clearwork();
+ data.byte(kNewobs) = 1;
+ drawfloor();
+ reelsonscreen();
+ spriteupdate();
+ printsprites();
+ worktoscreen();
+}
+
+void DreamGenContext::realcredits() {
+ STACK_CHECK;
+ data.byte(kRoomssample) = 33;
+ loadroomssample();
+ data.byte(kVolume) = 0;
+ mode640x480();
+ cx = 35;
+ hangon();
+ dx = 2390;
+ showpcx();
+ al = 12;
+ ah = 0;
+ playchannel0();
+ cx = 2;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ allpalette();
+ cx = 80;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ fadescreendowns();
+ cx = 256;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ dx = 2403;
+ showpcx();
+ al = 12;
+ ah = 0;
+ playchannel0();
+ cx = 2;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ allpalette();
+ cx = 80;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ fadescreendowns();
+ cx = 256;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ dx = 2416;
+ showpcx();
+ al = 12;
+ ah = 0;
+ playchannel0();
+ cx = 2;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ allpalette();
+ cx = 80;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ fadescreendowns();
+ cx = 256;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ dx = 2429;
+ showpcx();
+ al = 12;
+ ah = 0;
+ playchannel0();
+ cx = 2;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ allpalette();
+ cx = 80;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ fadescreendowns();
+ cx = 256;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ dx = 2442;
+ showpcx();
+ al = 12;
+ ah = 0;
+ playchannel0();
+ cx = 2;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ allpalette();
+ cx = 80;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ fadescreendowns();
+ cx = 256;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ dx = 2455;
+ showpcx();
+ fadescreenups();
+ cx = 60;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ al = 13;
+ ah = 0;
+ playchannel0();
+ cx = 350;
+ hangone();
+ _cmp(data.byte(kLasthardkey), 1);
+ if (flags.z())
+ goto realcreditsearly;
+ fadescreendowns();
+ cx = 256;
+ hangone();
+realcreditsearly:
+ data.byte(kLasthardkey) = 0;
+}
+
+void DreamGenContext::printchar() {
+ STACK_CHECK;
+ _cmp(al, 255);
+ if (flags.z())
+ return /* (ignoreit) */;
+ push(si);
+ push(bx);
+ push(di);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
+ push(ax);
+ _sub(al, 32);
+ ah = 0;
+ _add(ax, data.word(kCharshift));
+ showframe();
+ ax = pop();
+ di = pop();
+ bx = pop();
+ si = pop();
+ _cmp(data.byte(kKerning), 0);
+ if (!flags.z())
+ goto nokern;
+ kernchars();
+nokern:
+ push(cx);
+ ch = 0;
+ _add(di, cx);
+ cx = pop();
+}
+
+void DreamGenContext::printslow() {
+ STACK_CHECK;
+ data.byte(kPointerframe) = 1;
+ data.byte(kPointermode) = 3;
+ ds = data.word(kCharset1);
+printloopslow6:
+ push(bx);
+ push(di);
+ push(dx);
+ getnumber();
+ ch = 0;
+printloopslow5:
+ push(cx);
+ push(si);
+ push(es);
+ ax = es.word(si);
+ push(bx);
+ push(cx);
+ push(es);
+ push(si);
+ push(ds);
+ modifychar();
+ printboth();
+ ds = pop();
+ si = pop();
+ es = pop();
+ cx = pop();
+ bx = pop();
+ ax = es.word(si+1);
+ _inc(si);
+ _cmp(al, 0);
+ if (flags.z())
+ goto finishslow;
+ _cmp(al, ':');
+ if (flags.z())
+ goto finishslow;
+ _cmp(cl, 1);
+ if (flags.z())
+ goto afterslow;
+ push(di);
+ push(ds);
+ push(bx);
+ push(cx);
+ push(es);
+ push(si);
+ modifychar();
+ data.word(kCharshift) = 91;
+ printboth();
+ data.word(kCharshift) = 0;
+ si = pop();
+ es = pop();
+ cx = pop();
+ bx = pop();
+ ds = pop();
+ di = pop();
+ waitframes();
+ _cmp(ax, 0);
+ if (flags.z())
+ goto keepgoing;
+ _cmp(ax, data.word(kOldbutton));
+ if (!flags.z())
+ goto finishslow2;
+keepgoing:
+ waitframes();
+ _cmp(ax, 0);
+ if (flags.z())
+ goto afterslow;
+ _cmp(ax, data.word(kOldbutton));
+ if (!flags.z())
+ goto finishslow2;
+afterslow:
+ es = pop();
+ si = pop();
+ cx = pop();
+ _inc(si);
+ if (--cx)
+ goto printloopslow5;
+ dx = pop();
+ di = pop();
+ bx = pop();
+ _add(bx, 10);
+ goto printloopslow6;
+finishslow:
+ es = pop();
+ si = pop();
+ cx = pop();
+ dx = pop();
+ di = pop();
+ bx = pop();
+ al = 0;
+ return;
+finishslow2:
+ es = pop();
+ si = pop();
+ cx = pop();
+ dx = pop();
+ di = pop();
+ bx = pop();
+ al = 1;
+}
+
+void DreamGenContext::waitframes() {
+ STACK_CHECK;
+ push(di);
+ push(bx);
+ push(es);
+ push(si);
+ push(ds);
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ delpointer();
+ ax = data.word(kMousebutton);
+ ds = pop();
+ si = pop();
+ es = pop();
+ bx = pop();
+ di = pop();
+}
+
+void DreamGenContext::printboth() {
+ STACK_CHECK;
+ push(ax);
+ push(cx);
+ push(bx);
+ push(di);
+ printchar();
+ ax = pop();
+ push(di);
+ di = ax;
+ multidump();
+ di = pop();
+ bx = pop();
+ cx = pop();
+ ax = pop();
+}
+
+void DreamGenContext::printdirect() {
+ STACK_CHECK;
+ data.word(kLastxpos) = di;
+ ds = data.word(kCurrentset);
+printloop6:
+ push(bx);
+ push(di);
+ push(dx);
+ getnumber();
+ ch = 0;
+printloop5:
+ ax = es.word(si);
+ _inc(si);
+ _cmp(al, 0);
+ if (flags.z())
+ goto finishdirct;
+ _cmp(al, ':');
+ if (flags.z())
+ goto finishdirct;
+ push(cx);
+ push(es);
+ modifychar();
+ printchar();
+ data.word(kLastxpos) = di;
+ es = pop();
+ cx = pop();
+ if (--cx)
+ goto printloop5;
+ dx = pop();
+ di = pop();
+ bx = pop();
+ _add(bx, data.word(kLinespacing));
+ goto printloop6;
+finishdirct:
+ dx = pop();
+ di = pop();
+ bx = pop();
+}
+
+void DreamGenContext::monprint() {
+ STACK_CHECK;
+ data.byte(kKerning) = 1;
+ si = bx;
+ dl = 166;
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ ds = data.word(kTempcharset);
+printloop8:
+ push(bx);
+ push(di);
+ push(dx);
+ getnumber();
+ ch = 0;
+printloop7:
+ al = es.byte(si);
+ _inc(si);
+ _cmp(al, ':');
+ if (flags.z())
+ goto finishmon2;
+ _cmp(al, 0);
+ if (flags.z())
+ goto finishmon;
+ _cmp(al, 34);
+ if (flags.z())
+ goto finishmon;
+ _cmp(al, '=');
+ if (flags.z())
+ goto finishmon;
+ _cmp(al, '%');
+ if (!flags.z())
+ goto nottrigger;
+ ah = es.byte(si);
+ _inc(si);
+ _inc(si);
+ goto finishmon;
+nottrigger:
+ push(cx);
+ push(es);
+ modifychar();
+ printchar();
+ data.word(kCurslocx) = di;
+ data.word(kCurslocy) = bx;
+ data.word(kMaintimer) = 1;
+ printcurs();
+ vsync();
+ push(si);
+ push(dx);
+ push(ds);
+ push(es);
+ push(bx);
+ push(di);
+ lockmon();
+ di = pop();
+ bx = pop();
+ es = pop();
+ ds = pop();
+ dx = pop();
+ si = pop();
+ delcurs();
+ es = pop();
+ cx = pop();
+ if (--cx)
+ goto printloop7;
+finishmon2:
+ dx = pop();
+ di = pop();
+ bx = pop();
+ scrollmonitor();
+ data.word(kCurslocx) = di;
+ goto printloop8;
+finishmon:
+ dx = pop();
+ di = pop();
+ bx = pop();
+ _cmp(al, '%');
+ if (!flags.z())
+ goto nottrigger2;
+ data.byte(kLasttrigger) = ah;
+nottrigger2:
+ data.word(kCurslocx) = di;
+ scrollmonitor();
+ bx = si;
+ data.byte(kKerning) = 0;
+}
+
+void DreamGenContext::getnumber() {
+ STACK_CHECK;
+ cx = 0;
+ push(si);
+ push(bx);
+ push(di);
+ push(ds);
+ push(es);
+ di = si;
+wordloop:
+ push(cx);
+ push(dx);
+ getnextword();
+ dx = pop();
+ cx = pop();
+ _cmp(al, 1);
+ if (flags.z())
+ goto endoftext;
+ al = cl;
+ ah = 0;
+ push(bx);
+ bh = 0;
+ _add(ax, bx);
+ bx = pop();
+ _sub(ax, 10);
+ dh = 0;
+ _cmp(ax, dx);
+ if (!flags.c())
+ goto gotoverend;
+ _add(cl, bl);
+ _add(ch, bh);
+ goto wordloop;
+gotoverend:
+ al = dl;
+ _and(al, 1);
+ if (flags.z())
+ goto notcentre;
+ push(cx);
+ al = dl;
+ _and(al, 0xfe);
+ ah = 0;
+ ch = 0;
+ _sub(ax, cx);
+ _add(ax, 20);
+ _shr(ax, 1);
+ cx = pop();
+ es = pop();
+ ds = pop();
+ di = pop();
+ bx = pop();
+ si = pop();
+ _add(di, ax);
+ cl = ch;
+ return;
+notcentre:
+ es = pop();
+ ds = pop();
+ di = pop();
+ bx = pop();
+ si = pop();
+ cl = ch;
+ return;
+endoftext:
+ al = cl;
+ ah = 0;
+ push(bx);
+ bh = 0;
+ _add(ax, bx);
+ bx = pop();
+ _sub(ax, 10);
+ dh = 0;
+ _cmp(ax, dx);
+ if (!flags.c())
+ goto gotoverend2;
+ _add(cl, bl);
+ _add(ch, bh);
+gotoverend2:
+ al = dl;
+ _and(al, 1);
+ if (flags.z())
+ goto notcent2;
+ push(cx);
+ al = dl;
+ _and(al, 0xfe);
+ _add(al, 2);
+ ah = 0;
+ ch = 0;
+ _add(ax, 20);
+ _sub(ax, cx);
+ _shr(ax, 1);
+ cx = pop();
+ es = pop();
+ ds = pop();
+ di = pop();
+ bx = pop();
+ si = pop();
+ _add(di, ax);
+ cl = ch;
+ return;
+notcent2:
+ es = pop();
+ ds = pop();
+ di = pop();
+ bx = pop();
+ si = pop();
+ cl = ch;
+}
+
+void DreamGenContext::fillryan() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32);
+ findallryan();
+ si = (0+(228*13)+32);
+ al = data.byte(kRyanpage);
+ ah = 0;
+ cx = 20;
+ _mul(cx);
+ _add(si, ax);
+ di = (80);
+ bx = (58);
+ cx = 2;
+ryanloop2:
+ push(cx);
+ push(di);
+ push(bx);
+ cx = 5;
+ryanloop1:
+ push(cx);
+ push(di);
+ push(bx);
+ ax = es.word(si);
+ _add(si, 2);
+ push(si);
+ push(es);
+ obtoinv();
+ es = pop();
+ si = pop();
+ bx = pop();
+ di = pop();
+ cx = pop();
+ _add(di, (44));
+ if (--cx)
+ goto ryanloop1;
+ bx = pop();
+ di = pop();
+ cx = pop();
+ _add(bx, (44));
+ if (--cx)
+ goto ryanloop2;
+ showryanpage();
+}
+
+void DreamGenContext::fillopen() {
+ STACK_CHECK;
+ deltextline();
+ getopenedsize();
+ _cmp(ah, 4);
+ if (flags.c())
+ goto lessthanapage;
+ ah = 4;
+lessthanapage:
+ al = 1;
+ push(ax);
+ es = data.word(kBuffers);
+ di = (0+(228*13));
+ findallopen();
+ si = (0+(228*13));
+ di = (80);
+ bx = (58)+96;
+ cx = pop();
+openloop1:
+ push(cx);
+ push(di);
+ push(bx);
+ ax = es.word(si);
+ _add(si, 2);
+ push(si);
+ push(es);
+ _cmp(ch, cl);
+ if (flags.c())
+ goto nextopenslot;
+ obtoinv();
+nextopenslot:
+ es = pop();
+ si = pop();
+ bx = pop();
+ di = pop();
+ cx = pop();
+ _add(di, (44));
+ _inc(cl);
+ _cmp(cl, 5);
+ if (!flags.z())
+ goto openloop1;
+ undertextline();
+}
+
+void DreamGenContext::findallryan() {
+ STACK_CHECK;
+ push(di);
+ cx = 30;
+ ax = 0x0ffff;
+ _stosw(cx, true);
+ di = pop();
+ cl = 4;
+ ds = data.word(kExtras);
+ bx = (0+2080+30000);
+ ch = 0;
+findryanloop:
+ _cmp(ds.byte(bx+2), cl);
+ if (!flags.z())
+ goto notinryaninv;
+ _cmp(ds.byte(bx+3), 255);
+ if (!flags.z())
+ goto notinryaninv;
+ al = ds.byte(bx+4);
+ ah = 0;
+ push(di);
+ _add(di, ax);
+ _add(di, ax);
+ al = ch;
+ ah = 4;
+ _stosw();
+ di = pop();
+notinryaninv:
+ _add(bx, 16);
+ _inc(ch);
+ _cmp(ch, (114));
+ if (!flags.z())
+ goto findryanloop;
+}
+
+void DreamGenContext::findallopen() {
+ STACK_CHECK;
+ push(di);
+ cx = 16;
+ ax = 0x0ffff;
+ _stosw(cx, true);
+ di = pop();
+ cl = data.byte(kOpenedob);
+ dl = data.byte(kOpenedtype);
+ ds = data.word(kExtras);
+ bx = (0+2080+30000);
+ ch = 0;
+findopen1:
+ _cmp(ds.byte(bx+3), cl);
+ if (!flags.z())
+ goto findopen2;
+ _cmp(ds.byte(bx+2), dl);
+ if (!flags.z())
+ goto findopen2;
+ _cmp(data.byte(kOpenedtype), 4);
+ if (flags.z())
+ goto noloccheck;
+ al = ds.byte(bx+5);
+ _cmp(al, data.byte(kReallocation));
+ if (!flags.z())
+ goto findopen2;
+noloccheck:
+ al = ds.byte(bx+4);
+ ah = 0;
+ push(di);
+ _add(di, ax);
+ _add(di, ax);
+ al = ch;
+ ah = 4;
+ _stosw();
+ di = pop();
+findopen2:
+ _add(bx, 16);
+ _inc(ch);
+ _cmp(ch, (114));
+ if (!flags.z())
+ goto findopen1;
+ cl = data.byte(kOpenedob);
+ dl = data.byte(kOpenedtype);
+ push(dx);
+ ds = data.word(kFreedat);
+ dx = pop();
+ bx = 0;
+ ch = 0;
+findopen1a:
+ _cmp(ds.byte(bx+3), cl);
+ if (!flags.z())
+ goto findopen2a;
+ _cmp(ds.byte(bx+2), dl);
+ if (!flags.z())
+ goto findopen2a;
+ al = ds.byte(bx+4);
+ ah = 0;
+ push(di);
+ _add(di, ax);
+ _add(di, ax);
+ al = ch;
+ ah = 2;
+ _stosw();
+ di = pop();
+findopen2a:
+ _add(bx, 16);
+ _inc(ch);
+ _cmp(ch, 80);
+ if (!flags.z())
+ goto findopen1a;
+}
+
+void DreamGenContext::obtoinv() {
+ STACK_CHECK;
+ push(bx);
+ push(es);
+ push(si);
+ push(ax);
+ push(ax);
+ push(di);
+ push(bx);
+ ds = data.word(kIcons1);
+ _sub(di, 2);
+ _sub(bx, 1);
+ al = 10;
+ ah = 0;
+ showframe();
+ bx = pop();
+ di = pop();
+ ax = pop();
+ _cmp(al, 255);
+ if (flags.z())
+ goto finishfill;
+ push(bx);
+ push(di);
+ push(ax);
+ ds = data.word(kExtras);
+ _cmp(ah, 4);
+ if (flags.z())
+ goto isanextra;
+ ds = data.word(kFreeframes);
+isanextra:
+ cl = al;
+ _add(al, al);
+ _add(al, cl);
+ _inc(al);
+ ah = 128;
+ _add(bx, 19);
+ _add(di, 18);
+ showframe();
+ ax = pop();
+ di = pop();
+ bx = pop();
+ push(bx);
+ getanyaddir();
+ isitworn();
+ bx = pop();
+ if (!flags.z())
+ goto finishfill;
+ ds = data.word(kIcons1);
+ _sub(di, 3);
+ _sub(bx, 2);
+ al = 7;
+ ah = 0;
+ showframe();
+finishfill:
+ ax = pop();
+ si = pop();
+ es = pop();
+ bx = pop();
+}
+
+void DreamGenContext::isitworn() {
+ STACK_CHECK;
+ al = es.byte(bx+12);
+ _cmp(al, 'W'-'A');
+ if (!flags.z())
+ return /* (notworn) */;
+ al = es.byte(bx+13);
+ _cmp(al, 'E'-'A');
+}
+
+void DreamGenContext::makeworn() {
+ STACK_CHECK;
+ es.byte(bx+12) = 'W'-'A';
+ es.byte(bx+13) = 'E'-'A';
+}
+
+void DreamGenContext::examineob() {
+ STACK_CHECK;
+ data.byte(kPointermode) = 0;
+ data.word(kTimecount) = 0;
+examineagain:
+ data.byte(kInmaparea) = 0;
+ data.byte(kExamagain) = 0;
+ data.byte(kOpenedob) = 255;
+ data.byte(kOpenedtype) = 255;
+ data.byte(kInvopen) = 0;
+ al = data.byte(kCommandtype);
+ data.byte(kObjecttype) = al;
+ data.byte(kItemframe) = 0;
+ data.byte(kPointerframe) = 0;
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ obicons();
+ obpicture();
+ describeob();
+ undertextline();
+ data.byte(kCommandtype) = 255;
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+waitexam:
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ delpointer();
+ data.byte(kGetback) = 0;
+ bx = 2494;
+ _cmp(data.byte(kInvopen), 0);
+ if (flags.z())
+ goto notuseinv;
+ bx = 2556;
+ _cmp(data.byte(kInvopen), 1);
+ if (flags.z())
+ goto notuseinv;
+ bx = 2618;
+notuseinv:
+ checkcoords();
+ _cmp(data.byte(kExamagain), 0);
+ if (flags.z())
+ goto norex;
+ goto examineagain;
+norex:
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto waitexam;
+ data.byte(kPickup) = 0;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ goto iswatching;
+ _cmp(data.byte(kNewlocation), 255);
+ if (!flags.z())
+ goto justgetback;
+iswatching:
+ makemainscreen();
+ data.byte(kInvopen) = 0;
+ data.byte(kOpenedob) = 255;
+ return;
+justgetback:
+ data.byte(kInvopen) = 0;
+ data.byte(kOpenedob) = 255;
+}
+
+void DreamGenContext::makemainscreen() {
+ STACK_CHECK;
+ createpanel();
+ data.byte(kNewobs) = 1;
+ drawfloor();
+ spriteupdate();
+ printsprites();
+ reelsonscreen();
+ showicon();
+ getunderzoom();
+ undertextline();
+ data.byte(kCommandtype) = 255;
+ animpointer();
+ worktoscreenm();
+ data.byte(kCommandtype) = 200;
+ data.byte(kManisoffscreen) = 0;
+}
+
+void DreamGenContext::getbackfromob() {
+ STACK_CHECK;
+ _cmp(data.byte(kPickup), 1);
+ if (!flags.z())
+ goto notheldob;
+ blank();
+ return;
+notheldob:
+ getback1();
+}
+
+void DreamGenContext::incryanpage() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 222);
+ if (flags.z())
+ goto alreadyincryan;
+ data.byte(kCommandtype) = 222;
+ al = 31;
+ commandonly();
+alreadyincryan:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (noincryan) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doincryan;
+ return;
+doincryan:
+ ax = data.word(kMousex);
+ _sub(ax, (80)+167);
+ data.byte(kRyanpage) = -1;
+findnewpage:
+ _inc(data.byte(kRyanpage));
+ _sub(ax, 18);
+ if (!flags.c())
+ goto findnewpage;
+ delpointer();
+ fillryan();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::openinv() {
+ STACK_CHECK;
+ data.byte(kInvopen) = 1;
+ al = 61;
+ di = (80);
+ bx = (58)-10;
+ dl = 240;
+ printmessage();
+ fillryan();
+ data.byte(kCommandtype) = 255;
+}
+
+void DreamGenContext::showryanpage() {
+ STACK_CHECK;
+ ds = data.word(kIcons1);
+ di = (80)+167;
+ bx = (58)-12;
+ al = 12;
+ ah = 0;
+ showframe();
+ al = 13;
+ _add(al, data.byte(kRyanpage));
+ push(ax);
+ al = data.byte(kRyanpage);
+ ah = 0;
+ cx = 18;
+ _mul(cx);
+ ds = data.word(kIcons1);
+ di = (80)+167;
+ _add(di, ax);
+ bx = (58)-12;
+ ax = pop();
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::openob() {
+ STACK_CHECK;
+ al = data.byte(kOpenedob);
+ ah = data.byte(kOpenedtype);
+ di = 5847;
+ copyname();
+ di = (80);
+ bx = (58)+86;
+ al = 62;
+ dl = 240;
+ printmessage();
+ di = data.word(kLastxpos);
+ _add(di, 5);
+ bx = (58)+86;
+ es = cs;
+ si = 5847;
+ dl = 220;
+ al = 0;
+ ah = 0;
+ printdirect();
+ fillopen();
+ getopenedsize();
+ al = ah;
+ ah = 0;
+ cx = (44);
+ _mul(cx);
+ _add(ax, (80));
+ bx = 2588;
+ cs.word(bx) = ax;
+}
+
+void DreamGenContext::obicons() {
+ STACK_CHECK;
+ al = data.byte(kCommand);
+ getanyad();
+ _cmp(al, 255);
+ if (flags.z())
+ goto cantopenit;
+ ds = data.word(kIcons2);
+ di = 210;
+ bx = 1;
+ al = 4;
+ ah = 0;
+ showframe();
+cantopenit:
+ ds = data.word(kIcons2);
+ di = 260;
+ bx = 1;
+ al = 1;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::examicon() {
+ STACK_CHECK;
+ ds = data.word(kIcons2);
+ di = 254;
+ bx = 5;
+ al = 3;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::obpicture() {
+ STACK_CHECK;
+ al = data.byte(kCommand);
+ ah = data.byte(kObjecttype);
+ _cmp(ah, 1);
+ if (flags.z())
+ return /* (setframe) */;
+ _cmp(ah, 4);
+ if (flags.z())
+ goto exframe;
+ ds = data.word(kFreeframes);
+ di = 160;
+ bx = 68;
+ cl = al;
+ _add(al, al);
+ _add(al, cl);
+ _inc(al);
+ ah = 128;
+ showframe();
+ return;
+exframe:
+ ds = data.word(kExtras);
+ di = 160;
+ bx = 68;
+ cl = al;
+ _add(al, al);
+ _add(al, cl);
+ _inc(al);
+ ah = 128;
+ showframe();
+}
+
+void DreamGenContext::describeob() {
+ STACK_CHECK;
+ getobtextstart();
+ di = 33;
+ bx = 92;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto notsetd;
+ _cmp(data.byte(kObjecttype), 1);
+ if (!flags.z())
+ goto notsetd;
+ bx = 82;
+notsetd:
+ dl = 241;
+ ah = 16;
+ data.word(kCharshift) = 91+91;
+ printdirect();
+ data.word(kCharshift) = 0;
+ di = 36;
+ bx = 104;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto notsetd2;
+ _cmp(data.byte(kObjecttype), 1);
+ if (!flags.z())
+ goto notsetd2;
+ bx = 94;
+notsetd2:
+ dl = 241;
+ ah = 0;
+ printdirect();
+ push(bx);
+ obsthatdothings();
+ bx = pop();
+ additionaltext();
+}
+
+void DreamGenContext::additionaltext() {
+ STACK_CHECK;
+ _add(bx, 10);
+ push(bx);
+ al = data.byte(kCommand);
+ ah = data.byte(kObjecttype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto emptycup;
+ al = data.byte(kCommand);
+ ah = data.byte(kObjecttype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'F';
+ compare();
+ if (flags.z())
+ goto fullcup;
+ bx = pop();
+ return;
+emptycup:
+ al = 40;
+ findpuztext();
+ bx = pop();
+ di = 36;
+ dl = 241;
+ ah = 0;
+ printdirect();
+ return;
+fullcup:
+ al = 39;
+ findpuztext();
+ bx = pop();
+ di = 36;
+ dl = 241;
+ ah = 0;
+ printdirect();
+}
+
+void DreamGenContext::obsthatdothings() {
+ STACK_CHECK;
+ al = data.byte(kCommand);
+ ah = data.byte(kObjecttype);
+ cl = 'M';
+ ch = 'E';
+ dl = 'M';
+ dh = 'B';
+ compare();
+ if (!flags.z())
+ return /* (notlouiscard) */;
+ al = 4;
+ getlocation();
+ _cmp(al, 1);
+ if (flags.z())
+ return /* (seencard) */;
+ al = 4;
+ setlocation();
+ lookatcard();
+}
+
+void DreamGenContext::getobtextstart() {
+ STACK_CHECK;
+ es = data.word(kFreedesc);
+ si = (0);
+ cx = (0+(82*2));
+ _cmp(data.byte(kObjecttype), 2);
+ if (flags.z())
+ goto describe;
+ es = data.word(kSetdesc);
+ si = (0);
+ cx = (0+(130*2));
+ _cmp(data.byte(kObjecttype), 1);
+ if (flags.z())
+ goto describe;
+ es = data.word(kExtras);
+ si = (0+2080+30000+(16*114));
+ cx = (0+2080+30000+(16*114)+((114+2)*2));
+describe:
+ al = data.byte(kCommand);
+ ah = 0;
+ _add(ax, ax);
+ _add(si, ax);
+ ax = es.word(si);
+ _add(ax, cx);
+ si = ax;
+ bx = ax;
+tryagain:
+ push(si);
+ findnextcolon();
+ al = es.byte(si);
+ cx = si;
+ si = pop();
+ _cmp(data.byte(kObjecttype), 1);
+ if (!flags.z())
+ return /* (cantmakeoneup) */;
+ _cmp(al, 0);
+ if (flags.z())
+ goto findsometext;
+ _cmp(al, ':');
+ if (flags.z())
+ goto findsometext;
+ return;
+findsometext:
+ searchforsame();
+ goto tryagain;
+}
+
+void DreamGenContext::searchforsame() {
+ STACK_CHECK;
+ si = cx;
+searchagain:
+ _inc(si);
+ al = es.byte(bx);
+search:
+ _cmp(es.byte(si), al);
+ if (flags.z())
+ goto gotstartletter;
+ _inc(cx);
+ _inc(si);
+ _cmp(si, 8000);
+ if (flags.c())
+ goto search;
+ si = bx;
+ ax = pop();
+ return;
+gotstartletter:
+ push(bx);
+ push(si);
+keepchecking:
+ _inc(si);
+ _inc(bx);
+ al = es.byte(bx);
+ ah = es.byte(si);
+ _cmp(al, ':');
+ if (flags.z())
+ goto foundmatch;
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundmatch;
+ _cmp(al, ah);
+ if (flags.z())
+ goto keepchecking;
+ si = pop();
+ bx = pop();
+ goto searchagain;
+foundmatch:
+ si = pop();
+ bx = pop();
+}
+
+void DreamGenContext::findnextcolon() {
+ STACK_CHECK;
+isntcolon:
+ al = es.byte(si);
+ _inc(si);
+ _cmp(al, 0);
+ if (flags.z())
+ return /* (endofcolon) */;
+ _cmp(al, ':');
+ if (!flags.z())
+ goto isntcolon;
+}
+
+void DreamGenContext::inventory() {
+ STACK_CHECK;
+ _cmp(data.byte(kMandead), 1);
+ if (flags.z())
+ goto iswatchinv;
+ _cmp(data.word(kWatchingtime), 0);
+ if (flags.z())
+ goto notwatchinv;
+iswatchinv:
+ blank();
+ return;
+notwatchinv:
+ _cmp(data.byte(kCommandtype), 239);
+ if (flags.z())
+ goto alreadyopinv;
+ data.byte(kCommandtype) = 239;
+ al = 32;
+ commandonly();
+alreadyopinv:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (cantopinv) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doopeninv;
+ return;
+doopeninv:
+ data.word(kTimecount) = 0;
+ data.byte(kPointermode) = 0;
+ data.byte(kInmaparea) = 0;
+ animpointer();
+ createpanel();
+ showpanel();
+ examicon();
+ showman();
+ showexit();
+ undertextline();
+ data.byte(kPickup) = 0;
+ data.byte(kInvopen) = 2;
+ openinv();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+ data.byte(kOpenedob) = 255;
+ goto waitexam;
+ return;
+/*continuing to unbounded code: examineagain from examineob:3-66*/
+examineagain:
+ data.byte(kInmaparea) = 0;
+ data.byte(kExamagain) = 0;
+ data.byte(kOpenedob) = 255;
+ data.byte(kOpenedtype) = 255;
+ data.byte(kInvopen) = 0;
+ al = data.byte(kCommandtype);
+ data.byte(kObjecttype) = al;
+ data.byte(kItemframe) = 0;
+ data.byte(kPointerframe) = 0;
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ obicons();
+ obpicture();
+ describeob();
+ undertextline();
+ data.byte(kCommandtype) = 255;
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+waitexam:
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ delpointer();
+ data.byte(kGetback) = 0;
+ bx = 2494;
+ _cmp(data.byte(kInvopen), 0);
+ if (flags.z())
+ goto notuseinv;
+ bx = 2556;
+ _cmp(data.byte(kInvopen), 1);
+ if (flags.z())
+ goto notuseinv;
+ bx = 2618;
+notuseinv:
+ checkcoords();
+ _cmp(data.byte(kExamagain), 0);
+ if (flags.z())
+ goto norex;
+ goto examineagain;
+norex:
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto waitexam;
+ data.byte(kPickup) = 0;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ goto iswatching;
+ _cmp(data.byte(kNewlocation), 255);
+ if (!flags.z())
+ goto justgetback;
+iswatching:
+ makemainscreen();
+ data.byte(kInvopen) = 0;
+ data.byte(kOpenedob) = 255;
+ return;
+justgetback:
+ data.byte(kInvopen) = 0;
+ data.byte(kOpenedob) = 255;
+}
+
+void DreamGenContext::setpickup() {
+ STACK_CHECK;
+ _cmp(data.byte(kObjecttype), 1);
+ if (flags.z())
+ goto cantpick;
+ _cmp(data.byte(kObjecttype), 3);
+ if (flags.z())
+ goto cantpick;
+ getanyad();
+ al = es.byte(bx+2);
+ _cmp(al, 4);
+ if (!flags.z())
+ goto canpick;
+cantpick:
+ blank();
+ return;
+canpick:
+ _cmp(data.byte(kCommandtype), 209);
+ if (flags.z())
+ goto alreadysp;
+ data.byte(kCommandtype) = 209;
+ bl = data.byte(kCommand);
+ bh = data.byte(kObjecttype);
+ al = 33;
+ commandwithob();
+alreadysp:
+ ax = data.word(kMousebutton);
+ _cmp(ax, 1);
+ if (!flags.z())
+ return /* (nosetpick) */;
+ _cmp(ax, data.word(kOldbutton));
+ if (!flags.z())
+ goto dosetpick;
+ return;
+dosetpick:
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ examicon();
+ data.byte(kPickup) = 1;
+ data.byte(kInvopen) = 2;
+ _cmp(data.byte(kObjecttype), 4);
+ if (flags.z())
+ goto pickupexob;
+ al = data.byte(kCommand);
+ data.byte(kItemframe) = al;
+ data.byte(kOpenedob) = 255;
+ transfertoex();
+ data.byte(kItemframe) = al;
+ data.byte(kObjecttype) = 4;
+ geteitherad();
+ es.byte(bx+2) = 20;
+ es.byte(bx+3) = 255;
+ openinv();
+ worktoscreenm();
+ return;
+pickupexob:
+ al = data.byte(kCommand);
+ data.byte(kItemframe) = al;
+ data.byte(kOpenedob) = 255;
+ openinv();
+ worktoscreenm();
+}
+
+void DreamGenContext::examinventory() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 249);
+ if (flags.z())
+ goto alreadyexinv;
+ data.byte(kCommandtype) = 249;
+ al = 32;
+ commandonly();
+alreadyexinv:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (!flags.z())
+ goto doexinv;
+ return;
+doexinv:
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ examicon();
+ data.byte(kPickup) = 0;
+ data.byte(kInvopen) = 2;
+ openinv();
+ worktoscreenm();
+}
+
+void DreamGenContext::reexfrominv() {
+ STACK_CHECK;
+ findinvpos();
+ ax = es.word(bx);
+ data.byte(kCommandtype) = ah;
+ data.byte(kCommand) = al;
+ data.byte(kExamagain) = 1;
+ data.byte(kPointermode) = 0;
+}
+
+void DreamGenContext::reexfromopen() {
+ STACK_CHECK;
+ return;
+ findopenpos();
+ ax = es.word(bx);
+ data.byte(kCommandtype) = ah;
+ data.byte(kCommand) = al;
+ data.byte(kExamagain) = 1;
+ data.byte(kPointermode) = 0;
+}
+
+void DreamGenContext::swapwithinv() {
+ STACK_CHECK;
+ al = data.byte(kItemframe);
+ ah = data.byte(kObjecttype);
+ _cmp(ax, data.word(kOldsubject));
+ if (!flags.z())
+ goto difsub7;
+ _cmp(data.byte(kCommandtype), 243);
+ if (flags.z())
+ goto alreadyswap1;
+ data.byte(kCommandtype) = 243;
+difsub7:
+ data.word(kOldsubject) = ax;
+ bx = ax;
+ al = 34;
+ commandwithob();
+alreadyswap1:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (cantswap1) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doswap1;
+ return;
+doswap1:
+ ah = data.byte(kObjecttype);
+ al = data.byte(kItemframe);
+ push(ax);
+ findinvpos();
+ ax = es.word(bx);
+ data.byte(kItemframe) = al;
+ data.byte(kObjecttype) = ah;
+ geteitherad();
+ es.byte(bx+2) = 20;
+ es.byte(bx+3) = 255;
+ bl = data.byte(kItemframe);
+ bh = data.byte(kObjecttype);
+ ax = pop();
+ data.byte(kObjecttype) = ah;
+ data.byte(kItemframe) = al;
+ push(bx);
+ findinvpos();
+ delpointer();
+ al = data.byte(kItemframe);
+ geteitherad();
+ es.byte(bx+2) = 4;
+ es.byte(bx+3) = 255;
+ al = data.byte(kLastinvpos);
+ es.byte(bx+4) = al;
+ ax = pop();
+ data.byte(kObjecttype) = ah;
+ data.byte(kItemframe) = al;
+ fillryan();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::swapwithopen() {
+ STACK_CHECK;
+ al = data.byte(kItemframe);
+ ah = data.byte(kObjecttype);
+ _cmp(ax, data.word(kOldsubject));
+ if (!flags.z())
+ goto difsub8;
+ _cmp(data.byte(kCommandtype), 242);
+ if (flags.z())
+ goto alreadyswap2;
+ data.byte(kCommandtype) = 242;
+difsub8:
+ data.word(kOldsubject) = ax;
+ bx = ax;
+ al = 34;
+ commandwithob();
+alreadyswap2:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (cantswap2) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doswap2;
+ return;
+doswap2:
+ geteitherad();
+ isitworn();
+ if (!flags.z())
+ goto notwornswap;
+ wornerror();
+ return;
+notwornswap:
+ delpointer();
+ al = data.byte(kItemframe);
+ _cmp(al, data.byte(kOpenedob));
+ if (!flags.z())
+ goto isntsame2;
+ al = data.byte(kObjecttype);
+ _cmp(al, data.byte(kOpenedtype));
+ if (!flags.z())
+ goto isntsame2;
+ errormessage1();
+ return;
+isntsame2:
+ checkobjectsize();
+ _cmp(al, 0);
+ if (flags.z())
+ goto sizeok2;
+ return;
+sizeok2:
+ ah = data.byte(kObjecttype);
+ al = data.byte(kItemframe);
+ push(ax);
+ findopenpos();
+ ax = es.word(bx);
+ data.byte(kItemframe) = al;
+ data.byte(kObjecttype) = ah;
+ _cmp(ah, 4);
+ if (!flags.z())
+ goto makeswapex;
+ geteitherad();
+ es.byte(bx+2) = 20;
+ es.byte(bx+3) = 255;
+ goto actuallyswap;
+makeswapex:
+ transfertoex();
+ data.byte(kItemframe) = al;
+ data.byte(kObjecttype) = 4;
+ geteitherad();
+ es.byte(bx+2) = 20;
+ es.byte(bx+3) = 255;
+actuallyswap:
+ bl = data.byte(kItemframe);
+ bh = data.byte(kObjecttype);
+ ax = pop();
+ data.byte(kObjecttype) = ah;
+ data.byte(kItemframe) = al;
+ push(bx);
+ findopenpos();
+ geteitherad();
+ al = data.byte(kOpenedtype);
+ es.byte(bx+2) = al;
+ al = data.byte(kOpenedob);
+ es.byte(bx+3) = al;
+ al = data.byte(kLastinvpos);
+ es.byte(bx+4) = al;
+ al = data.byte(kReallocation);
+ es.byte(bx+5) = al;
+ ax = pop();
+ data.byte(kObjecttype) = ah;
+ data.byte(kItemframe) = al;
+ fillopen();
+ fillryan();
+ undertextline();
+ readmouse();
+ useopened();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::intoinv() {
+ STACK_CHECK;
+ _cmp(data.byte(kPickup), 0);
+ if (!flags.z())
+ goto notout;
+ outofinv();
+ return;
+notout:
+ findinvpos();
+ ax = es.word(bx);
+ _cmp(al, 255);
+ if (flags.z())
+ goto canplace1;
+ swapwithinv();
+ return;
+canplace1:
+ al = data.byte(kItemframe);
+ ah = data.byte(kObjecttype);
+ _cmp(ax, data.word(kOldsubject));
+ if (!flags.z())
+ goto difsub1;
+ _cmp(data.byte(kCommandtype), 220);
+ if (flags.z())
+ goto alreadyplce;
+ data.byte(kCommandtype) = 220;
+difsub1:
+ data.word(kOldsubject) = ax;
+ bx = ax;
+ al = 35;
+ commandwithob();
+alreadyplce:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notletgo2) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doplace;
+ return;
+doplace:
+ delpointer();
+ al = data.byte(kItemframe);
+ getexad();
+ es.byte(bx+2) = 4;
+ es.byte(bx+3) = 255;
+ al = data.byte(kLastinvpos);
+ es.byte(bx+4) = al;
+ data.byte(kPickup) = 0;
+ fillryan();
+ readmouse();
+ showpointer();
+ outofinv();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::deletetaken() {
+ STACK_CHECK;
+ es = data.word(kFreedat);
+ ah = data.byte(kReallocation);
+ ds = data.word(kExtras);
+ si = (0+2080+30000);
+ cx = (114);
+takenloop:
+ al = ds.byte(si+11);
+ _cmp(al, ah);
+ if (!flags.z())
+ goto notinhere;
+ bl = ds.byte(si+1);
+ bh = 0;
+ _add(bx, bx);
+ _add(bx, bx);
+ _add(bx, bx);
+ _add(bx, bx);
+ es.byte(bx+2) = 254;
+notinhere:
+ _add(si, 16);
+ if (--cx)
+ goto takenloop;
+}
+
+void DreamGenContext::outofinv() {
+ STACK_CHECK;
+ findinvpos();
+ ax = es.word(bx);
+ _cmp(al, 255);
+ if (!flags.z())
+ goto canpick2;
+ blank();
+ return;
+canpick2:
+ bx = data.word(kMousebutton);
+ _cmp(bx, 2);
+ if (!flags.z())
+ goto canpick2a;
+ reexfrominv();
+ return;
+canpick2a:
+ _cmp(ax, data.word(kOldsubject));
+ if (!flags.z())
+ goto difsub3;
+ _cmp(data.byte(kCommandtype), 221);
+ if (flags.z())
+ goto alreadygrab;
+ data.byte(kCommandtype) = 221;
+difsub3:
+ data.word(kOldsubject) = ax;
+ bx = ax;
+ al = 36;
+ commandwithob();
+alreadygrab:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notletgo) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto dograb;
+ return;
+dograb:
+ delpointer();
+ data.byte(kPickup) = 1;
+ findinvpos();
+ ax = es.word(bx);
+ data.byte(kItemframe) = al;
+ data.byte(kObjecttype) = ah;
+ getexad();
+ es.byte(bx+2) = 20;
+ es.byte(bx+3) = 255;
+ fillryan();
+ readmouse();
+ showpointer();
+ intoinv();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::getfreead() {
+ STACK_CHECK;
+ ah = 0;
+ cl = 4;
+ _shl(ax, cl);
+ bx = ax;
+ es = data.word(kFreedat);
+}
+
+void DreamGenContext::getexad() {
+ STACK_CHECK;
+ ah = 0;
+ bx = 16;
+ _mul(bx);
+ bx = ax;
+ es = data.word(kExtras);
+ _add(bx, (0+2080+30000));
+}
+
+void DreamGenContext::geteitherad() {
+ STACK_CHECK;
+ _cmp(data.byte(kObjecttype), 4);
+ if (flags.z())
+ goto isinexlist;
+ al = data.byte(kItemframe);
+ getfreead();
+ return;
+isinexlist:
+ al = data.byte(kItemframe);
+ getexad();
+}
+
+void DreamGenContext::getanyad() {
+ STACK_CHECK;
+ _cmp(data.byte(kObjecttype), 4);
+ if (flags.z())
+ goto isex;
+ _cmp(data.byte(kObjecttype), 2);
+ if (flags.z())
+ goto isfree;
+ al = data.byte(kCommand);
+ getsetad();
+ ax = es.word(bx+4);
+ return;
+isfree:
+ al = data.byte(kCommand);
+ getfreead();
+ ax = es.word(bx+7);
+ return;
+isex:
+ al = data.byte(kCommand);
+ getexad();
+ ax = es.word(bx+7);
+}
+
+void DreamGenContext::getanyaddir() {
+ STACK_CHECK;
+ _cmp(ah, 4);
+ if (flags.z())
+ goto isex3;
+ _cmp(ah, 2);
+ if (flags.z())
+ goto isfree3;
+ getsetad();
+ return;
+isfree3:
+ getfreead();
+ return;
+isex3:
+ getexad();
+}
+
+void DreamGenContext::getopenedsize() {
+ STACK_CHECK;
+ _cmp(data.byte(kOpenedtype), 4);
+ if (flags.z())
+ goto isex2;
+ _cmp(data.byte(kOpenedtype), 2);
+ if (flags.z())
+ goto isfree2;
+ al = data.byte(kOpenedob);
+ getsetad();
+ ax = es.word(bx+3);
+ return;
+isfree2:
+ al = data.byte(kOpenedob);
+ getfreead();
+ ax = es.word(bx+7);
+ return;
+isex2:
+ al = data.byte(kOpenedob);
+ getexad();
+ ax = es.word(bx+7);
+}
+
+void DreamGenContext::getsetad() {
+ STACK_CHECK;
+ ah = 0;
+ bx = 64;
+ _mul(bx);
+ bx = ax;
+ es = data.word(kSetdat);
+}
+
+void DreamGenContext::findinvpos() {
+ STACK_CHECK;
+ cx = data.word(kMousex);
+ _sub(cx, (80));
+ bx = -1;
+findinv1:
+ _inc(bx);
+ _sub(cx, (44));
+ if (!flags.c())
+ goto findinv1;
+ cx = data.word(kMousey);
+ _sub(cx, (58));
+ _sub(bx, 5);
+findinv2:
+ _add(bx, 5);
+ _sub(cx, (44));
+ if (!flags.c())
+ goto findinv2;
+ al = data.byte(kRyanpage);
+ ah = 0;
+ cx = 10;
+ _mul(cx);
+ _add(bx, ax);
+ al = bl;
+ data.byte(kLastinvpos) = al;
+ _add(bx, bx);
+ es = data.word(kBuffers);
+ _add(bx, (0+(228*13)+32));
+}
+
+void DreamGenContext::findopenpos() {
+ STACK_CHECK;
+ cx = data.word(kMousex);
+ _sub(cx, (80));
+ bx = -1;
+findopenp1:
+ _inc(bx);
+ _sub(cx, (44));
+ if (!flags.c())
+ goto findopenp1;
+ al = bl;
+ data.byte(kLastinvpos) = al;
+ _add(bx, bx);
+ es = data.word(kBuffers);
+ _add(bx, (0+(228*13)));
+}
+
+void DreamGenContext::dropobject() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 223);
+ if (flags.z())
+ goto alreadydrop;
+ data.byte(kCommandtype) = 223;
+ _cmp(data.byte(kPickup), 0);
+ if (flags.z())
+ { blank(); return; };
+ bl = data.byte(kItemframe);
+ bh = data.byte(kObjecttype);
+ al = 37;
+ commandwithob();
+alreadydrop:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nodrop) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto dodrop;
+ return;
+dodrop:
+ geteitherad();
+ isitworn();
+ if (!flags.z())
+ goto nowornerror;
+ wornerror();
+ return;
+nowornerror:
+ _cmp(data.byte(kReallocation), 47);
+ if (flags.z())
+ goto nodrop2;
+ cl = data.byte(kRyanx);
+ _add(cl, 12);
+ ch = data.byte(kRyany);
+ _add(ch, 12);
+ checkone();
+ _cmp(cl, 2);
+ if (flags.c())
+ goto nodroperror;
+nodrop2:
+ droperror();
+ return;
+nodroperror:
+ _cmp(data.byte(kMapxsize), 64);
+ if (!flags.z())
+ goto notinlift;
+ _cmp(data.byte(kMapysize), 64);
+ if (!flags.z())
+ goto notinlift;
+ droperror();
+ return;
+notinlift:
+ al = data.byte(kItemframe);
+ ah = 4;
+ cl = 'G';
+ ch = 'U';
+ dl = 'N';
+ dh = 'A';
+ compare();
+ if (flags.z())
+ { cantdrop(); return; };
+ al = data.byte(kItemframe);
+ ah = 4;
+ cl = 'S';
+ ch = 'H';
+ dl = 'L';
+ dh = 'D';
+ compare();
+ if (flags.z())
+ { cantdrop(); return; };
+ data.byte(kObjecttype) = 4;
+ al = data.byte(kItemframe);
+ getexad();
+ es.byte(bx+2) = 0;
+ al = data.byte(kRyanx);
+ _add(al, 4);
+ cl = 4;
+ _shr(al, cl);
+ _add(al, data.byte(kMapx));
+ ah = data.byte(kRyany);
+ _add(ah, 8);
+ cl = 4;
+ _shr(ah, cl);
+ _add(ah, data.byte(kMapy));
+ es.byte(bx+3) = al;
+ es.byte(bx+5) = ah;
+ al = data.byte(kRyanx);
+ _add(al, 4);
+ _and(al, 15);
+ ah = data.byte(kRyany);
+ _add(ah, 8);
+ _and(ah, 15);
+ es.byte(bx+4) = al;
+ es.byte(bx+6) = ah;
+ data.byte(kPickup) = 0;
+ al = data.byte(kReallocation);
+ es.byte(bx) = al;
+}
+
+void DreamGenContext::droperror() {
+ STACK_CHECK;
+ data.byte(kCommandtype) = 255;
+ delpointer();
+ di = 76;
+ bx = 21;
+ al = 56;
+ dl = 240;
+ printmessage();
+ worktoscreenm();
+ cx = 50;
+ hangonp();
+ showpanel();
+ showman();
+ examicon();
+ data.byte(kCommandtype) = 255;
+ worktoscreenm();
+}
+
+void DreamGenContext::cantdrop() {
+ STACK_CHECK;
+ data.byte(kCommandtype) = 255;
+ delpointer();
+ di = 76;
+ bx = 21;
+ al = 24;
+ dl = 240;
+ printmessage();
+ worktoscreenm();
+ cx = 50;
+ hangonp();
+ showpanel();
+ showman();
+ examicon();
+ data.byte(kCommandtype) = 255;
+ worktoscreenm();
+}
+
+void DreamGenContext::wornerror() {
+ STACK_CHECK;
+ data.byte(kCommandtype) = 255;
+ delpointer();
+ di = 76;
+ bx = 21;
+ al = 57;
+ dl = 240;
+ printmessage();
+ worktoscreenm();
+ cx = 50;
+ hangonp();
+ showpanel();
+ showman();
+ examicon();
+ data.byte(kCommandtype) = 255;
+ worktoscreenm();
+}
+
+void DreamGenContext::removeobfrominv() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommand), 100);
+ if (flags.z())
+ return /* (obnotexist) */;
+ getanyad();
+ di = bx;
+ cl = data.byte(kCommand);
+ ch = 0;
+ deleteexobject();
+}
+
+void DreamGenContext::selectopenob() {
+ STACK_CHECK;
+ al = data.byte(kCommand);
+ getanyad();
+ _cmp(al, 255);
+ if (!flags.z())
+ goto canopenit1;
+ blank();
+ return;
+canopenit1:
+ _cmp(data.byte(kCommandtype), 224);
+ if (flags.z())
+ goto alreadyopob;
+ data.byte(kCommandtype) = 224;
+ bl = data.byte(kCommand);
+ bh = data.byte(kObjecttype);
+ al = 38;
+ commandwithob();
+alreadyopob:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (noopenob) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doopenob;
+ return;
+doopenob:
+ al = data.byte(kCommand);
+ data.byte(kOpenedob) = al;
+ al = data.byte(kObjecttype);
+ data.byte(kOpenedtype) = al;
+ createpanel();
+ showpanel();
+ showman();
+ examicon();
+ showexit();
+ openinv();
+ openob();
+ undertextline();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::useopened() {
+ STACK_CHECK;
+ _cmp(data.byte(kOpenedob), 255);
+ if (flags.z())
+ return /* (cannotuseopen) */;
+ _cmp(data.byte(kPickup), 0);
+ if (!flags.z())
+ goto notout2;
+ outofopen();
+ return;
+notout2:
+ findopenpos();
+ ax = es.word(bx);
+ _cmp(al, 255);
+ if (flags.z())
+ goto canplace3;
+ swapwithopen();
+ return;
+canplace3:
+ _cmp(data.byte(kPickup), 1);
+ if (flags.z())
+ goto intoopen;
+ blank();
+ return;
+intoopen:
+ al = data.byte(kItemframe);
+ ah = data.byte(kObjecttype);
+ _cmp(ax, data.word(kOldsubject));
+ if (!flags.z())
+ goto difsub2;
+ _cmp(data.byte(kCommandtype), 227);
+ if (flags.z())
+ goto alreadyplc2;
+ data.byte(kCommandtype) = 227;
+difsub2:
+ data.word(kOldsubject) = ax;
+ bx = ax;
+ al = 35;
+ commandwithob();
+alreadyplc2:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notletgo3) */;
+ _cmp(ax, 1);
+ if (flags.z())
+ goto doplace2;
+ return;
+doplace2:
+ geteitherad();
+ isitworn();
+ if (!flags.z())
+ goto notworntoopen;
+ wornerror();
+ return;
+notworntoopen:
+ delpointer();
+ al = data.byte(kItemframe);
+ _cmp(al, data.byte(kOpenedob));
+ if (!flags.z())
+ goto isntsame;
+ al = data.byte(kObjecttype);
+ _cmp(al, data.byte(kOpenedtype));
+ if (!flags.z())
+ goto isntsame;
+ errormessage1();
+ return;
+isntsame:
+ checkobjectsize();
+ _cmp(al, 0);
+ if (flags.z())
+ goto sizeok1;
+ return;
+sizeok1:
+ data.byte(kPickup) = 0;
+ al = data.byte(kItemframe);
+ geteitherad();
+ al = data.byte(kOpenedtype);
+ es.byte(bx+2) = al;
+ al = data.byte(kOpenedob);
+ es.byte(bx+3) = al;
+ al = data.byte(kLastinvpos);
+ es.byte(bx+4) = al;
+ al = data.byte(kReallocation);
+ es.byte(bx+5) = al;
+ fillopen();
+ undertextline();
+ readmouse();
+ useopened();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::errormessage1() {
+ STACK_CHECK;
+ delpointer();
+ di = 76;
+ bx = 21;
+ al = 58;
+ dl = 240;
+ printmessage();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+ cx = 50;
+ hangonp();
+ showpanel();
+ showman();
+ examicon();
+ readmouse();
+ useopened();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::errormessage2() {
+ STACK_CHECK;
+ data.byte(kCommandtype) = 255;
+ delpointer();
+ di = 76;
+ bx = 21;
+ al = 59;
+ dl = 240;
+ printmessage();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+ cx = 50;
+ hangonp();
+ showpanel();
+ showman();
+ examicon();
+ readmouse();
+ useopened();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::errormessage3() {
+ STACK_CHECK;
+ delpointer();
+ di = 76;
+ bx = 21;
+ al = 60;
+ dl = 240;
+ printmessage();
+ worktoscreenm();
+ cx = 50;
+ hangonp();
+ showpanel();
+ showman();
+ examicon();
+ readmouse();
+ useopened();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::checkobjectsize() {
+ STACK_CHECK;
+ getopenedsize();
+ push(ax);
+ al = data.byte(kItemframe);
+ geteitherad();
+ al = es.byte(bx+9);
+ cx = pop();
+ _cmp(al, 255);
+ if (!flags.z())
+ goto notunsized;
+ al = 6;
+notunsized:
+ _cmp(al, 100);
+ if (!flags.c())
+ goto specialcase;
+ _cmp(cl, 100);
+ if (flags.c())
+ goto isntspecial;
+ errormessage3();
+ goto sizewrong;
+isntspecial:
+ _cmp(cl, al);
+ if (!flags.c())
+ goto sizeok;
+specialcase:
+ _sub(al, 100);
+ _cmp(cl, 100);
+ if (!flags.c())
+ goto bothspecial;
+ _cmp(cl, al);
+ if (!flags.c())
+ goto sizeok;
+ errormessage2();
+ goto sizewrong;
+bothspecial:
+ _sub(cl, 100);
+ _cmp(al, cl);
+ if (flags.z())
+ goto sizeok;
+ errormessage3();
+sizewrong:
+ al = 1;
+ return;
+sizeok:
+ al = 0;
+}
+
+void DreamGenContext::outofopen() {
+ STACK_CHECK;
+ _cmp(data.byte(kOpenedob), 255);
+ if (flags.z())
+ goto cantuseopen;
+ findopenpos();
+ ax = es.word(bx);
+ _cmp(al, 255);
+ if (!flags.z())
+ goto canpick4;
+cantuseopen:
+ blank();
+ return;
+canpick4:
+ _cmp(ax, data.word(kOldsubject));
+ if (!flags.z())
+ goto difsub4;
+ _cmp(data.byte(kCommandtype), 228);
+ if (flags.z())
+ goto alreadygrb;
+ data.byte(kCommandtype) = 228;
+difsub4:
+ data.word(kOldsubject) = ax;
+ bx = ax;
+ al = 36;
+ commandwithob();
+alreadygrb:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notletgo4) */;
+ _cmp(ax, 1);
+ if (flags.z())
+ goto dogrb;
+ _cmp(ax, 2);
+ if (!flags.z())
+ return /* (notletgo4) */;
+ reexfromopen();
+ return;
+dogrb:
+ delpointer();
+ data.byte(kPickup) = 1;
+ findopenpos();
+ ax = es.word(bx);
+ data.byte(kItemframe) = al;
+ data.byte(kObjecttype) = ah;
+ _cmp(ah, 4);
+ if (!flags.z())
+ goto makeintoex;
+ geteitherad();
+ es.byte(bx+2) = 20;
+ es.byte(bx+3) = 255;
+ goto actuallyout;
+makeintoex:
+ transfertoex();
+ data.byte(kItemframe) = al;
+ data.byte(kObjecttype) = 4;
+ geteitherad();
+ es.byte(bx+2) = 20;
+ es.byte(bx+3) = 255;
+actuallyout:
+ fillopen();
+ undertextline();
+ readmouse();
+ useopened();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::transfertoex() {
+ STACK_CHECK;
+ emergencypurge();
+ getexpos();
+ al = data.byte(kExpos);
+ push(ax);
+ push(di);
+ al = data.byte(kItemframe);
+ ah = 0;
+ bx = 16;
+ _mul(bx);
+ ds = data.word(kFreedat);
+ si = ax;
+ cx = 8;
+ _movsw(cx, true);
+ di = pop();
+ al = data.byte(kReallocation);
+ es.byte(di) = al;
+ es.byte(di+11) = al;
+ al = data.byte(kItemframe);
+ es.byte(di+1) = al;
+ es.byte(di+2) = 4;
+ es.byte(di+3) = 255;
+ al = data.byte(kLastinvpos);
+ es.byte(di+4) = al;
+ al = data.byte(kItemframe);
+ data.byte(kItemtotran) = al;
+ transfermap();
+ transferinv();
+ transfertext();
+ al = data.byte(kItemframe);
+ ah = 0;
+ bx = 16;
+ _mul(bx);
+ ds = data.word(kFreedat);
+ si = ax;
+ ds.byte(si+2) = 254;
+ pickupconts();
+ ax = pop();
+}
+
+void DreamGenContext::pickupconts() {
+ STACK_CHECK;
+ al = ds.byte(si+7);
+ _cmp(al, 255);
+ if (flags.z())
+ return /* (notopenable) */;
+ al = data.byte(kItemframe);
+ ah = data.byte(kObjecttype);
+ dl = data.byte(kExpos);
+ es = data.word(kFreedat);
+ bx = 0;
+ cx = 0;
+pickupcontloop:
+ push(cx);
+ push(es);
+ push(bx);
+ push(dx);
+ push(ax);
+ _cmp(es.byte(bx+2), ah);
+ if (!flags.z())
+ goto notinsidethis;
+ _cmp(es.byte(bx+3), al);
+ if (!flags.z())
+ goto notinsidethis;
+ data.byte(kItemtotran) = cl;
+ transfercontoex();
+notinsidethis:
+ ax = pop();
+ dx = pop();
+ bx = pop();
+ es = pop();
+ cx = pop();
+ _add(bx, 16);
+ _inc(cx);
+ _cmp(cx, 80);
+ if (!flags.z())
+ goto pickupcontloop;
+}
+
+void DreamGenContext::transfercontoex() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ push(dx);
+ push(es);
+ push(bx);
+ getexpos();
+ si = pop();
+ ds = pop();
+ push(di);
+ cx = 8;
+ _movsw(cx, true);
+ di = pop();
+ dx = pop();
+ al = data.byte(kReallocation);
+ es.byte(di) = al;
+ es.byte(di+11) = al;
+ al = data.byte(kItemtotran);
+ es.byte(di+1) = al;
+ es.byte(di+3) = dl;
+ es.byte(di+2) = 4;
+ transfermap();
+ transferinv();
+ transfertext();
+ si = pop();
+ ds = pop();
+ ds.byte(si+2) = 255;
+}
+
+void DreamGenContext::transfertext() {
+ STACK_CHECK;
+ es = data.word(kExtras);
+ al = data.byte(kExpos);
+ ah = 0;
+ _add(ax, ax);
+ bx = (0+2080+30000+(16*114));
+ _add(bx, ax);
+ di = data.word(kExtextpos);
+ es.word(bx) = di;
+ _add(di, (0+2080+30000+(16*114)+((114+2)*2)));
+ al = data.byte(kItemtotran);
+ ah = 0;
+ _add(ax, ax);
+ ds = data.word(kFreedesc);
+ bx = (0);
+ _add(bx, ax);
+ si = (0+(82*2));
+ ax = ds.word(bx);
+ _add(si, ax);
+moretext:
+ _lodsb();
+ _stosb();
+ _inc(data.word(kExtextpos));
+ _cmp(al, 0);
+ if (!flags.z())
+ goto moretext;
+}
+
+void DreamGenContext::getexpos() {
+ STACK_CHECK;
+ es = data.word(kExtras);
+ al = 0;
+ di = (0+2080+30000);
+tryanotherex:
+ _cmp(es.byte(di+2), 255);
+ if (flags.z())
+ goto foundnewex;
+ _add(di, 16);
+ _inc(al);
+ _cmp(al, (114));
+ if (!flags.z())
+ goto tryanotherex;
+foundnewex:
+ data.byte(kExpos) = al;
+}
+
+void DreamGenContext::purgealocation() {
+ STACK_CHECK;
+ push(ax);
+ es = data.word(kExtras);
+ di = (0+2080+30000);
+ bx = pop();
+ cx = 0;
+purgeloc:
+ _cmp(bl, es.byte(di+0));
+ if (!flags.z())
+ goto dontpurge;
+ _cmp(es.byte(di+2), 0);
+ if (!flags.z())
+ goto dontpurge;
+ push(di);
+ push(es);
+ push(bx);
+ push(cx);
+ deleteexobject();
+ cx = pop();
+ bx = pop();
+ es = pop();
+ di = pop();
+dontpurge:
+ _add(di, 16);
+ _inc(cx);
+ _cmp(cx, (114));
+ if (!flags.z())
+ goto purgeloc;
+}
+
+void DreamGenContext::emergencypurge() {
+ STACK_CHECK;
+checkpurgeagain:
+ ax = data.word(kExframepos);
+ _add(ax, 4000);
+ _cmp(ax, (30000));
+ if (flags.c())
+ goto notnearframeend;
+ purgeanitem();
+ goto checkpurgeagain;
+notnearframeend:
+ ax = data.word(kExtextpos);
+ _add(ax, 400);
+ _cmp(ax, (18000));
+ if (flags.c())
+ return /* (notneartextend) */;
+ purgeanitem();
+ goto checkpurgeagain;
+}
+
+void DreamGenContext::purgeanitem() {
+ STACK_CHECK;
+ es = data.word(kExtras);
+ di = (0+2080+30000);
+ bl = data.byte(kReallocation);
+ cx = 0;
+lookforpurge:
+ al = es.byte(di+2);
+ _cmp(al, 0);
+ if (!flags.z())
+ goto cantpurge;
+ _cmp(es.byte(di+12), 2);
+ if (flags.z())
+ goto iscup;
+ _cmp(es.byte(di+12), 255);
+ if (!flags.z())
+ goto cantpurge;
+iscup:
+ _cmp(es.byte(di+11), bl);
+ if (flags.z())
+ goto cantpurge;
+ deleteexobject();
+ return;
+cantpurge:
+ _add(di, 16);
+ _inc(cx);
+ _cmp(cx, (114));
+ if (!flags.z())
+ goto lookforpurge;
+ di = (0+2080+30000);
+ bl = data.byte(kReallocation);
+ cx = 0;
+lookforpurge2:
+ al = es.byte(di+2);
+ _cmp(al, 0);
+ if (!flags.z())
+ goto cantpurge2;
+ _cmp(es.byte(di+12), 255);
+ if (!flags.z())
+ goto cantpurge2;
+ deleteexobject();
+ return;
+cantpurge2:
+ _add(di, 16);
+ _inc(cx);
+ _cmp(cx, (114));
+ if (!flags.z())
+ goto lookforpurge2;
+}
+
+void DreamGenContext::deleteexobject() {
+ STACK_CHECK;
+ push(cx);
+ push(cx);
+ push(cx);
+ push(cx);
+ al = 255;
+ cx = 16;
+ _stosb(cx, true);
+ ax = pop();
+ cl = al;
+ _add(al, al);
+ _add(al, cl);
+ deleteexframe();
+ ax = pop();
+ cl = al;
+ _add(al, al);
+ _add(al, cl);
+ _inc(al);
+ deleteexframe();
+ ax = pop();
+ deleteextext();
+ bx = pop();
+ bh = bl;
+ bl = 4;
+ di = (0+2080+30000);
+ cx = 0;
+deleteconts:
+ _cmp(es.word(di+2), bx);
+ if (!flags.z())
+ goto notinsideex;
+ push(bx);
+ push(cx);
+ push(di);
+ deleteexobject();
+ di = pop();
+ cx = pop();
+ bx = pop();
+notinsideex:
+ _add(di, 16);
+ _inc(cx);
+ _cmp(cx, (114));
+ if (!flags.z())
+ goto deleteconts;
+}
+
+void DreamGenContext::deleteexframe() {
+ STACK_CHECK;
+ di = (0);
+ ah = 0;
+ _add(ax, ax);
+ _add(di, ax);
+ _add(ax, ax);
+ _add(di, ax);
+ al = es.byte(di);
+ ah = 0;
+ cl = es.byte(di+1);
+ ch = 0;
+ _mul(cx);
+ si = es.word(di+2);
+ push(si);
+ _add(si, (0+2080));
+ cx = (30000);
+ _sub(cx, es.word(di+2));
+ di = si;
+ _add(si, ax);
+ push(ax);
+ ds = es;
+ _movsb(cx, true);
+ bx = pop();
+ _sub(data.word(kExframepos), bx);
+ si = pop();
+ cx = (114)*3;
+ di = (0);
+shuffleadsdown:
+ ax = es.word(di+2);
+ _cmp(ax, si);
+ if (flags.c())
+ goto beforethisone;
+ _sub(ax, bx);
+beforethisone:
+ es.word(di+2) = ax;
+ _add(di, 6);
+ if (--cx)
+ goto shuffleadsdown;
+}
+
+void DreamGenContext::deleteextext() {
+ STACK_CHECK;
+ di = (0+2080+30000+(16*114));
+ ah = 0;
+ _add(ax, ax);
+ _add(di, ax);
+ ax = es.word(di);
+ si = ax;
+ di = ax;
+ _add(si, (0+2080+30000+(16*114)+((114+2)*2)));
+ _add(di, (0+2080+30000+(16*114)+((114+2)*2)));
+ ax = 0;
+findlenextext:
+ cl = es.byte(si);
+ _inc(ax);
+ _inc(si);
+ _cmp(cl, 0);
+ if (!flags.z())
+ goto findlenextext;
+ cx = (18000);
+ bx = si;
+ _sub(bx, (0+2080+30000+(16*114)+((114+2)*2)));
+ push(bx);
+ push(ax);
+ _sub(cx, bx);
+ _movsb(cx, true);
+ bx = pop();
+ _sub(data.word(kExtextpos), bx);
+ si = pop();
+ cx = (114);
+ di = (0+2080+30000+(16*114));
+shuffletextads:
+ ax = es.word(di);
+ _cmp(ax, si);
+ if (flags.c())
+ goto beforethistext;
+ _sub(ax, bx);
+beforethistext:
+ es.word(di) = ax;
+ _add(di, 2);
+ if (--cx)
+ goto shuffletextads;
+}
+
+void DreamGenContext::blockget() {
+ STACK_CHECK;
+ ah = al;
+ al = 0;
+ ds = data.word(kBackdrop);
+ si = (0+192);
+ _add(si, ax);
+}
+
+void DreamGenContext::drawfloor() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ eraseoldobs();
+ drawflags();
+ calcmapad();
+ doblocks();
+ showallobs();
+ showallfree();
+ showallex();
+ paneltomap();
+ initrain();
+ data.byte(kNewobs) = 0;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::calcmapad() {
+ STACK_CHECK;
+ getdimension();
+ push(cx);
+ push(dx);
+ al = 11;
+ _sub(al, dl);
+ _sub(al, cl);
+ _sub(al, cl);
+ ax.cbw();
+ bx = 8;
+ _mul(bx);
+ _add(ax, data.word(kMapoffsetx));
+ data.word(kMapadx) = ax;
+ dx = pop();
+ cx = pop();
+ al = 10;
+ _sub(al, dh);
+ _sub(al, ch);
+ _sub(al, ch);
+ ax.cbw();
+ bx = 8;
+ _mul(bx);
+ _add(ax, data.word(kMapoffsety));
+ data.word(kMapady) = ax;
+}
+
+void DreamGenContext::getdimension() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32));
+ ch = 0;
+dimloop1:
+ addalong();
+ _cmp(al, 0);
+ if (!flags.z())
+ goto finishdim1;
+ _inc(ch);
+ goto dimloop1;
+finishdim1:
+ bx = (0+(228*13)+32+60+(32*32));
+ cl = 0;
+dimloop2:
+ push(bx);
+ addlength();
+ bx = pop();
+ _cmp(al, 0);
+ if (!flags.z())
+ goto finishdim2;
+ _inc(cl);
+ _add(bx, 3);
+ goto dimloop2;
+finishdim2:
+ bx = (0+(228*13)+32+60+(32*32))+(11*3*9);
+ dh = 10;
+dimloop3:
+ push(bx);
+ addalong();
+ bx = pop();
+ _cmp(al, 0);
+ if (!flags.z())
+ goto finishdim3;
+ _dec(dh);
+ _sub(bx, 11*3);
+ goto dimloop3;
+finishdim3:
+ bx = (0+(228*13)+32+60+(32*32))+(3*10);
+ dl = 11;
+dimloop4:
+ push(bx);
+ addlength();
+ bx = pop();
+ _cmp(al, 0);
+ if (!flags.z())
+ goto finishdim4;
+ _dec(dl);
+ _sub(bx, 3);
+ goto dimloop4;
+finishdim4:
+ al = cl;
+ ah = 0;
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ data.word(kMapxstart) = ax;
+ al = ch;
+ ah = 0;
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ data.word(kMapystart) = ax;
+ _sub(dl, cl);
+ _sub(dh, ch);
+ al = dl;
+ ah = 0;
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ data.byte(kMapxsize) = al;
+ al = dh;
+ ah = 0;
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ _shl(ax, 1);
+ data.byte(kMapysize) = al;
+}
+
+void DreamGenContext::addalong() {
+ STACK_CHECK;
+ ah = 11;
+addloop:
+ _cmp(es.byte(bx), 0);
+ if (!flags.z())
+ goto gotalong;
+ _add(bx, 3);
+ _dec(ah);
+ if (!flags.z())
+ goto addloop;
+ al = 0;
+ return;
+gotalong:
+ al = 1;
+}
+
+void DreamGenContext::addlength() {
+ STACK_CHECK;
+ ah = 10;
+addloop2:
+ _cmp(es.byte(bx), 0);
+ if (!flags.z())
+ goto gotlength;
+ _add(bx, 3*11);
+ _dec(ah);
+ if (!flags.z())
+ goto addloop2;
+ al = 0;
+ return;
+gotlength:
+ al = 1;
+}
+
+void DreamGenContext::drawflags() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32));
+ al = data.byte(kMapy);
+ ah = 0;
+ cx = (66);
+ _mul(cx);
+ bl = data.byte(kMapx);
+ bh = 0;
+ _add(ax, bx);
+ si = (0);
+ _add(si, ax);
+ cx = 10;
+_tmp28:
+ push(cx);
+ cx = 11;
+_tmp28a:
+ ds = data.word(kMapdata);
+ _lodsb();
+ ds = data.word(kBackdrop);
+ push(si);
+ push(ax);
+ ah = 0;
+ _add(ax, ax);
+ si = (0);
+ _add(si, ax);
+ _movsw();
+ ax = pop();
+ _stosb();
+ si = pop();
+ if (--cx)
+ goto _tmp28a;
+ _add(si, (66)-11);
+ cx = pop();
+ if (--cx)
+ goto _tmp28;
+}
+
+void DreamGenContext::showallobs() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32));
+ data.word(kListpos) = bx;
+ di = bx;
+ cx = 128*5;
+ al = 255;
+ _stosb(cx, true);
+ es = data.word(kSetframes);
+ data.word(kFrsegment) = es;
+ ax = (0);
+ data.word(kDataad) = ax;
+ ax = (0+2080);
+ data.word(kFramesad) = ax;
+ data.byte(kCurrentob) = 0;
+ ds = data.word(kSetdat);
+ si = 0;
+ cx = 128;
+showobsloop:
+ push(cx);
+ push(si);
+ push(si);
+ _add(si, 58);
+ es = data.word(kSetdat);
+ getmapad();
+ si = pop();
+ _cmp(ch, 0);
+ if (flags.z())
+ goto blankframe;
+ al = es.byte(si+18);
+ ah = 0;
+ data.word(kCurrentframe) = ax;
+ _cmp(al, 255);
+ if (flags.z())
+ goto blankframe;
+ push(es);
+ push(si);
+ calcfrframe();
+ finalframe();
+ si = pop();
+ es = pop();
+ al = es.byte(si+18);
+ es.byte(si+17) = al;
+ _cmp(es.byte(si+8), 0);
+ if (!flags.z())
+ goto animating;
+ _cmp(es.byte(si+5), 5);
+ if (flags.z())
+ goto animating;
+ _cmp(es.byte(si+5), 6);
+ if (flags.z())
+ goto animating;
+ ax = data.word(kCurrentframe);
+ ah = 0;
+ _add(di, data.word(kMapadx));
+ _add(bx, data.word(kMapady));
+ showframe();
+ goto drawnsetob;
+animating:
+ makebackob();
+drawnsetob:
+ si = data.word(kListpos);
+ es = data.word(kBuffers);
+ al = data.byte(kSavex);
+ ah = data.byte(kSavey);
+ es.word(si) = ax;
+ cx = ax;
+ ax = data.word(kSavesize);
+ _add(al, cl);
+ _add(ah, ch);
+ es.word(si+2) = ax;
+ al = data.byte(kCurrentob);
+ es.byte(si+4) = al;
+ _add(si, 5);
+ data.word(kListpos) = si;
+blankframe:
+ _inc(data.byte(kCurrentob));
+ si = pop();
+ cx = pop();
+ _add(si, 64);
+ _dec(cx);
+ if (flags.z())
+ return /* (finishedsetobs) */;
+ goto showobsloop;
+}
+
+void DreamGenContext::makebackob() {
+ STACK_CHECK;
+ _cmp(data.byte(kNewobs), 0);
+ if (flags.z())
+ return /* (nomake) */;
+ al = es.byte(si+5);
+ ah = es.byte(si+8);
+ push(si);
+ push(ax);
+ push(si);
+ ax = data.word(kObjectx);
+ bx = data.word(kObjecty);
+ ah = bl;
+ si = ax;
+ cx = 49520;
+ dx = data.word(kSetframes);
+ di = (0);
+ makesprite();
+ ax = pop();
+ es.word(bx+20) = ax;
+ ax = pop();
+ _cmp(al, 255);
+ if (!flags.z())
+ goto usedpriority;
+ al = 0;
+usedpriority:
+ es.byte(bx+23) = al;
+ es.byte(bx+30) = ah;
+ es.byte(bx+16) = 0;
+ es.byte(bx+18) = 0;
+ es.byte(bx+19) = 0;
+ si = pop();
+}
+
+void DreamGenContext::showallfree() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
+ data.word(kListpos) = bx;
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
+ cx = 80*5;
+ al = 255;
+ _stosb(cx, true);
+ es = data.word(kFreeframes);
+ data.word(kFrsegment) = es;
+ ax = (0);
+ data.word(kDataad) = ax;
+ ax = (0+2080);
+ data.word(kFramesad) = ax;
+ al = 0;
+ data.byte(kCurrentfree) = al;
+ ds = data.word(kFreedat);
+ si = 2;
+ cx = 0;
+loop127:
+ push(cx);
+ push(si);
+ push(si);
+ es = data.word(kFreedat);
+ getmapad();
+ si = pop();
+ _cmp(ch, 0);
+ if (flags.z())
+ goto over138;
+ al = data.byte(kCurrentfree);
+ ah = 0;
+ dx = ax;
+ _add(ax, ax);
+ _add(ax, dx);
+ data.word(kCurrentframe) = ax;
+ push(es);
+ push(si);
+ calcfrframe();
+ es = data.word(kMapstore);
+ ds = data.word(kFrsegment);
+ finalframe();
+ si = pop();
+ es = pop();
+ _cmp(cx, 0);
+ if (flags.z())
+ goto over138;
+ ax = data.word(kCurrentframe);
+ ah = 0;
+ _add(di, data.word(kMapadx));
+ _add(bx, data.word(kMapady));
+ showframe();
+ si = data.word(kListpos);
+ es = data.word(kBuffers);
+ al = data.byte(kSavex);
+ ah = data.byte(kSavey);
+ es.word(si) = ax;
+ cx = ax;
+ ax = data.word(kSavesize);
+ _add(al, cl);
+ _add(ah, ch);
+ es.word(si+2) = ax;
+ ax = pop();
+ cx = pop();
+ push(cx);
+ push(ax);
+ es.byte(si+4) = cl;
+ _add(si, 5);
+ data.word(kListpos) = si;
+over138:
+ _inc(data.byte(kCurrentfree));
+ si = pop();
+ cx = pop();
+ _add(si, 16);
+ _inc(cx);
+ _cmp(cx, 80);
+ if (flags.z())
+ return /* (finfree) */;
+ goto loop127;
+}
+
+void DreamGenContext::showallex() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
+ data.word(kListpos) = bx;
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
+ cx = 100*5;
+ al = 255;
+ _stosb(cx, true);
+ es = data.word(kExtras);
+ data.word(kFrsegment) = es;
+ ax = (0);
+ data.word(kDataad) = ax;
+ ax = (0+2080);
+ data.word(kFramesad) = ax;
+ data.byte(kCurrentex) = 0;
+ si = (0+2080+30000)+2;
+ cx = 0;
+exloop:
+ push(cx);
+ push(si);
+ es = data.word(kExtras);
+ push(si);
+ ch = 0;
+ _cmp(es.byte(si), 255);
+ if (flags.z())
+ goto notinroom;
+ al = es.byte(si-2);
+ _cmp(al, data.byte(kReallocation));
+ if (!flags.z())
+ goto notinroom;
+ getmapad();
+notinroom:
+ si = pop();
+ _cmp(ch, 0);
+ if (flags.z())
+ goto blankex;
+ al = data.byte(kCurrentex);
+ ah = 0;
+ dx = ax;
+ _add(ax, ax);
+ _add(ax, dx);
+ data.word(kCurrentframe) = ax;
+ push(es);
+ push(si);
+ calcfrframe();
+ es = data.word(kMapstore);
+ ds = data.word(kFrsegment);
+ finalframe();
+ si = pop();
+ es = pop();
+ _cmp(cx, 0);
+ if (flags.z())
+ goto blankex;
+ ax = data.word(kCurrentframe);
+ ah = 0;
+ _add(di, data.word(kMapadx));
+ _add(bx, data.word(kMapady));
+ showframe();
+ si = data.word(kListpos);
+ es = data.word(kBuffers);
+ al = data.byte(kSavex);
+ ah = data.byte(kSavey);
+ es.word(si) = ax;
+ cx = ax;
+ ax = data.word(kSavesize);
+ _add(al, cl);
+ _add(ah, ch);
+ es.word(si+2) = ax;
+ ax = pop();
+ cx = pop();
+ push(cx);
+ push(ax);
+ es.byte(si+4) = cl;
+ _add(si, 5);
+ data.word(kListpos) = si;
+blankex:
+ _inc(data.byte(kCurrentex));
+ si = pop();
+ cx = pop();
+ _add(si, 16);
+ _inc(cx);
+ _cmp(cx, 100);
+ if (flags.z())
+ return /* (finex) */;
+ goto exloop;
+}
+
+void DreamGenContext::calcfrframe() {
+ STACK_CHECK;
+ dx = data.word(kFrsegment);
+ ax = data.word(kFramesad);
+ push(ax);
+ cx = data.word(kDataad);
+ ax = data.word(kCurrentframe);
+ ds = dx;
+ bx = 6;
+ _mul(bx);
+ _add(ax, cx);
+ bx = ax;
+ cx = ds.word(bx);
+ ax = ds.word(bx+2);
+ dx = ds.word(bx+4);
+ bx = pop();
+ push(dx);
+ _add(ax, bx);
+ data.word(kSavesource) = ax;
+ data.word(kSavesize) = cx;
+ ax = pop();
+ push(ax);
+ ah = 0;
+ data.word(kOffsetx) = ax;
+ ax = pop();
+ al = ah;
+ ah = 0;
+ data.word(kOffsety) = ax;
+ return;
+ ax = pop();
+ cx = 0;
+ data.word(kSavesize) = cx;
+}
+
+void DreamGenContext::finalframe() {
+ STACK_CHECK;
+ ax = data.word(kObjecty);
+ _add(ax, data.word(kOffsety));
+ bx = data.word(kObjectx);
+ _add(bx, data.word(kOffsetx));
+ data.byte(kSavex) = bl;
+ data.byte(kSavey) = al;
+ di = data.word(kObjectx);
+ bx = data.word(kObjecty);
+}
+
+void DreamGenContext::adjustlen() {
+ STACK_CHECK;
+ ah = al;
+ _add(al, ch);
+ _cmp(al, 100);
+ if (flags.c())
+ return /* (over242) */;
+ al = 224;
+ _sub(al, ch);
+ ch = al;
+}
+
+void DreamGenContext::getmapad() {
+ STACK_CHECK;
+ getxad();
+ _cmp(ch, 0);
+ if (flags.z())
+ return /* (over146) */;
+ data.word(kObjectx) = ax;
+ getyad();
+ _cmp(ch, 0);
+ if (flags.z())
+ return /* (over146) */;
+ data.word(kObjecty) = ax;
+ ch = 1;
+}
+
+void DreamGenContext::getxad() {
+ STACK_CHECK;
+ cl = es.byte(si);
+ _inc(si);
+ al = es.byte(si);
+ _inc(si);
+ ah = es.byte(si);
+ _inc(si);
+ _cmp(cl, 0);
+ if (!flags.z())
+ goto over148;
+ _sub(al, data.byte(kMapx));
+ if (flags.c())
+ goto over148;
+ _cmp(al, 11);
+ if (!flags.c())
+ goto over148;
+ cl = 4;
+ _shl(al, cl);
+ _or(al, ah);
+ ah = 0;
+ ch = 1;
+ return;
+over148:
+ ch = 0;
+}
+
+void DreamGenContext::getyad() {
+ STACK_CHECK;
+ al = es.byte(si);
+ _inc(si);
+ ah = es.byte(si);
+ _inc(si);
+ _sub(al, data.byte(kMapy));
+ if (flags.c())
+ goto over147;
+ _cmp(al, 10);
+ if (!flags.c())
+ goto over147;
+ cl = 4;
+ _shl(al, cl);
+ _or(al, ah);
+ ah = 0;
+ ch = 1;
+ return;
+over147:
+ ch = 0;
+}
+
+void DreamGenContext::autolook() {
+ STACK_CHECK;
+ ax = data.word(kMousex);
+ _cmp(ax, data.word(kOldx));
+ if (!flags.z())
+ goto diffmouse;
+ ax = data.word(kMousey);
+ _cmp(ax, data.word(kOldy));
+ if (!flags.z())
+ goto diffmouse;
+ _dec(data.word(kLookcounter));
+ _cmp(data.word(kLookcounter), 0);
+ if (!flags.z())
+ return /* (noautolook) */;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ return /* (noautolook) */;
+ dolook();
+ return;
+diffmouse:
+ data.word(kLookcounter) = 1000;
+}
+
+void DreamGenContext::look() {
+ STACK_CHECK;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kPointermode), 2);
+ if (flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 241);
+ if (flags.z())
+ goto alreadylook;
+ data.byte(kCommandtype) = 241;
+ al = 25;
+ commandonly();
+alreadylook:
+ _cmp(data.word(kMousebutton), 1);
+ if (!flags.z())
+ return /* (nolook) */;
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nolook) */;
+ dolook();
+}
+
+void DreamGenContext::dolook() {
+ STACK_CHECK;
+ createpanel();
+ showicon();
+ undertextline();
+ worktoscreenm();
+ data.byte(kCommandtype) = 255;
+ dumptextline();
+ bl = data.byte(kRoomnum);
+ _and(bl, 31);
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kRoomdesc);
+ _add(bx, (0));
+ si = es.word(bx);
+ _add(si, (0+(38*2)));
+ findnextcolon();
+ di = 66;
+ _cmp(data.byte(kReallocation), 50);
+ if (flags.c())
+ goto notdream3;
+ di = 40;
+notdream3:
+ bx = 80;
+ dl = 241;
+ printslow();
+ _cmp(al, 1);
+ if (flags.z())
+ goto afterlook;
+ cx = 400;
+ hangonp();
+afterlook:
+ data.byte(kPointermode) = 0;
+ data.byte(kCommandtype) = 0;
+ redrawmainscrn();
+ worktoscreenm();
+}
+
+void DreamGenContext::redrawmainscrn() {
+ STACK_CHECK;
+ data.word(kTimecount) = 0;
+ createpanel();
+ data.byte(kNewobs) = 0;
+ drawfloor();
+ printsprites();
+ reelsonscreen();
+ showicon();
+ getunderzoom();
+ undertextline();
+ readmouse();
+ data.byte(kCommandtype) = 255;
+}
+
+void DreamGenContext::getback1() {
+ STACK_CHECK;
+ _cmp(data.byte(kPickup), 0);
+ if (flags.z())
+ goto notgotobject;
+ blank();
+ return;
+notgotobject:
+ _cmp(data.byte(kCommandtype), 202);
+ if (flags.z())
+ goto alreadyget;
+ data.byte(kCommandtype) = 202;
+ al = 26;
+ commandonly();
+alreadyget:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nogetback) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto dogetback;
+ return;
+dogetback:
+ data.byte(kGetback) = 1;
+ data.byte(kPickup) = 0;
+}
+
+void DreamGenContext::talk() {
+ STACK_CHECK;
+ data.byte(kTalkpos) = 0;
+ data.byte(kInmaparea) = 0;
+ al = data.byte(kCommand);
+ data.byte(kCharacter) = al;
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ undertextline();
+ convicons();
+ starttalk();
+ data.byte(kCommandtype) = 255;
+ readmouse();
+ showpointer();
+ worktoscreen();
+waittalk:
+ delpointer();
+ readmouse();
+ animpointer();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ data.byte(kGetback) = 0;
+ bx = 2660;
+ checkcoords();
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ goto finishtalk;
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto waittalk;
+finishtalk:
+ bx = data.word(kPersondata);
+ es = cs;
+ _cmp(data.byte(kTalkpos), 4);
+ if (flags.c())
+ goto notnexttalk;
+ al = es.byte(bx+7);
+ _or(al, 128);
+ es.byte(bx+7) = al;
+notnexttalk:
+ redrawmainscrn();
+ worktoscreenm();
+ _cmp(data.byte(kSpeechloaded), 1);
+ if (!flags.z())
+ return /* (nospeech) */;
+ cancelch1();
+ data.byte(kVolumedirection) = -1;
+ data.byte(kVolumeto) = 0;
+}
+
+void DreamGenContext::convicons() {
+ STACK_CHECK;
+ al = data.byte(kCharacter);
+ _and(al, 127);
+ getpersframe();
+ di = 234;
+ bx = 2;
+ data.word(kCurrentframe) = ax;
+ findsource();
+ ax = data.word(kCurrentframe);
+ _sub(ax, data.word(kTakeoff));
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::getpersframe() {
+ STACK_CHECK;
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ es = data.word(kPeople);
+ _add(bx, (0));
+ ax = es.word(bx);
+}
+
+void DreamGenContext::starttalk() {
+ STACK_CHECK;
+ data.byte(kTalkmode) = 0;
+ al = data.byte(kCharacter);
+ _and(al, 127);
+ getpersontext();
+ data.word(kCharshift) = 91+91;
+ di = 66;
+ bx = 64;
+ dl = 241;
+ al = 0;
+ ah = 79;
+ printdirect();
+ data.word(kCharshift) = 0;
+ di = 66;
+ bx = 80;
+ dl = 241;
+ al = 0;
+ ah = 0;
+ printdirect();
+ data.byte(kSpeechloaded) = 0;
+ al = data.byte(kCharacter);
+ _and(al, 127);
+ ah = 0;
+ cx = 64;
+ _mul(cx);
+ cl = 'C';
+ dl = 'R';
+ dh = data.byte(kReallocation);
+ loadspeech();
+ _cmp(data.byte(kSpeechloaded), 1);
+ if (!flags.z())
+ return /* (nospeech1) */;
+ data.byte(kVolumedirection) = 1;
+ data.byte(kVolumeto) = 6;
+ al = 50+12;
+ playchannel1();
+}
+
+void DreamGenContext::getpersontext() {
+ STACK_CHECK;
+ ah = 0;
+ cx = 64*2;
+ _mul(cx);
+ si = ax;
+ es = data.word(kPeople);
+ _add(si, (0+24));
+ cx = (0+24+(1026*2));
+ ax = es.word(si);
+ _add(ax, cx);
+ si = ax;
+}
+
+void DreamGenContext::moretalk() {
+ STACK_CHECK;
+ _cmp(data.byte(kTalkmode), 0);
+ if (flags.z())
+ goto canmore;
+ redes();
+ return;
+canmore:
+ _cmp(data.byte(kCommandtype), 215);
+ if (flags.z())
+ goto alreadymore;
+ data.byte(kCommandtype) = 215;
+ al = 49;
+ commandonly();
+alreadymore:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nomore) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto domoretalk;
+ return;
+domoretalk:
+ data.byte(kTalkmode) = 2;
+ data.byte(kTalkpos) = 4;
+ _cmp(data.byte(kCharacter), 100);
+ if (flags.c())
+ goto notsecondpart;
+ data.byte(kTalkpos) = 48;
+notsecondpart:
+ dosometalk();
+}
+
+void DreamGenContext::dosometalk() {
+ STACK_CHECK;
+dospeech:
+ al = data.byte(kTalkpos);
+ al = data.byte(kCharacter);
+ _and(al, 127);
+ ah = 0;
+ cx = 64;
+ _mul(cx);
+ cx = ax;
+ al = data.byte(kTalkpos);
+ ah = 0;
+ _add(ax, cx);
+ _add(ax, ax);
+ si = ax;
+ es = data.word(kPeople);
+ _add(si, (0+24));
+ cx = (0+24+(1026*2));
+ ax = es.word(si);
+ _add(ax, cx);
+ si = ax;
+ _cmp(es.byte(si), 0);
+ if (flags.z())
+ goto endheartalk;
+ push(es);
+ push(si);
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ convicons();
+ si = pop();
+ es = pop();
+ di = 164;
+ bx = 64;
+ dl = 144;
+ al = 0;
+ ah = 0;
+ printdirect();
+ al = data.byte(kCharacter);
+ _and(al, 127);
+ ah = 0;
+ cx = 64;
+ _mul(cx);
+ cl = data.byte(kTalkpos);
+ ch = 0;
+ _add(ax, cx);
+ cl = 'C';
+ dl = 'R';
+ dh = data.byte(kReallocation);
+ loadspeech();
+ _cmp(data.byte(kSpeechloaded), 0);
+ if (flags.z())
+ goto noplay1;
+ al = 62;
+ playchannel1();
+noplay1:
+ data.byte(kPointermode) = 3;
+ worktoscreenm();
+ cx = 180;
+ hangonpq();
+ if (!flags.c())
+ goto _tmp1;
+ return;
+_tmp1:
+ _inc(data.byte(kTalkpos));
+ al = data.byte(kTalkpos);
+ al = data.byte(kCharacter);
+ _and(al, 127);
+ ah = 0;
+ cx = 64;
+ _mul(cx);
+ cx = ax;
+ al = data.byte(kTalkpos);
+ ah = 0;
+ _add(ax, cx);
+ _add(ax, ax);
+ si = ax;
+ es = data.word(kPeople);
+ _add(si, (0+24));
+ cx = (0+24+(1026*2));
+ ax = es.word(si);
+ _add(ax, cx);
+ si = ax;
+ _cmp(es.byte(si), 0);
+ if (flags.z())
+ goto endheartalk;
+ _cmp(es.byte(si), ':');
+ if (flags.z())
+ goto skiptalk2;
+ _cmp(es.byte(si), 32);
+ if (flags.z())
+ goto skiptalk2;
+ push(es);
+ push(si);
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ convicons();
+ si = pop();
+ es = pop();
+ di = 48;
+ bx = 128;
+ dl = 144;
+ al = 0;
+ ah = 0;
+ printdirect();
+ al = data.byte(kCharacter);
+ _and(al, 127);
+ ah = 0;
+ cx = 64;
+ _mul(cx);
+ cl = data.byte(kTalkpos);
+ ch = 0;
+ _add(ax, cx);
+ cl = 'C';
+ dl = 'R';
+ dh = data.byte(kReallocation);
+ loadspeech();
+ _cmp(data.byte(kSpeechloaded), 0);
+ if (flags.z())
+ goto noplay2;
+ al = 62;
+ playchannel1();
+noplay2:
+ data.byte(kPointermode) = 3;
+ worktoscreenm();
+ cx = 180;
+ hangonpq();
+ if (!flags.c())
+ goto skiptalk2;
+ return;
+skiptalk2:
+ _inc(data.byte(kTalkpos));
+ goto dospeech;
+endheartalk:
+ data.byte(kPointermode) = 0;
+}
+
+void DreamGenContext::hangonpq() {
+ STACK_CHECK;
+ data.byte(kGetback) = 0;
+ bx = 0;
+hangloopq:
+ push(cx);
+ push(bx);
+ delpointer();
+ readmouse();
+ animpointer();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ bx = 2692;
+ checkcoords();
+ bx = pop();
+ cx = pop();
+ _cmp(data.byte(kGetback), 1);
+ if (flags.z())
+ goto quitconv;
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ goto quitconv;
+ _cmp(data.byte(kSpeechloaded), 1);
+ if (!flags.z())
+ goto notspeaking;
+ _cmp(data.byte(kCh1playing), 255);
+ if (!flags.z())
+ goto notspeaking;
+ _inc(bx);
+ _cmp(bx, 40);
+ if (flags.z())
+ goto finishconv;
+notspeaking:
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ goto hangloopq;
+ _cmp(data.word(kOldbutton), 0);
+ if (!flags.z())
+ goto hangloopq;
+finishconv:
+ delpointer();
+ data.byte(kPointermode) = 0;
+ flags._c = false;
+ return;
+quitconv:
+ delpointer();
+ data.byte(kPointermode) = 0;
+ cancelch1();
+ flags._c = true;
+ }
+
+void DreamGenContext::redes() {
+ STACK_CHECK;
+ _cmp(data.byte(kCh1playing), 255);
+ if (!flags.z())
+ goto cantredes;
+ _cmp(data.byte(kTalkmode), 2);
+ if (flags.z())
+ goto canredes;
+cantredes:
+ blank();
+ return;
+canredes:
+ _cmp(data.byte(kCommandtype), 217);
+ if (flags.z())
+ goto alreadyreds;
+ data.byte(kCommandtype) = 217;
+ al = 50;
+ commandonly();
+alreadyreds:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (!flags.z())
+ goto doredes;
+ return;
+doredes:
+ delpointer();
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ convicons();
+ starttalk();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::newplace() {
+ STACK_CHECK;
+ _cmp(data.byte(kNeedtotravel), 1);
+ if (flags.z())
+ goto istravel;
+ _cmp(data.byte(kAutolocation), -1);
+ if (!flags.z())
+ goto isautoloc;
+ return;
+isautoloc:
+ al = data.byte(kAutolocation);
+ data.byte(kNewlocation) = al;
+ data.byte(kAutolocation) = -1;
+ return;
+istravel:
+ data.byte(kNeedtotravel) = 0;
+ selectlocation();
+}
+
+void DreamGenContext::selectlocation() {
+ STACK_CHECK;
+ data.byte(kInmaparea) = 0;
+ clearbeforeload();
+ data.byte(kGetback) = 0;
+ data.byte(kPointerframe) = 22;
+ readcitypic();
+ showcity();
+ getridoftemp();
+ readdesticon();
+ loadtraveltext();
+ showpanel();
+ showman();
+ showarrows();
+ showexit();
+ locationpic();
+ undertextline();
+ data.byte(kCommandtype) = 255;
+ readmouse();
+ data.byte(kPointerframe) = 0;
+ showpointer();
+ worktoscreen();
+ al = 9;
+ ah = 255;
+ playchannel0();
+ data.byte(kNewlocation) = 255;
+select:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ goto quittravel;
+ delpointer();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ _cmp(data.byte(kGetback), 1);
+ if (flags.z())
+ goto quittravel;
+ bx = 2714;
+ checkcoords();
+ _cmp(data.byte(kNewlocation), 255);
+ if (flags.z())
+ goto select;
+ al = data.byte(kNewlocation);
+ _cmp(al, data.byte(kLocation));
+ if (flags.z())
+ goto quittravel;
+ getridoftemp();
+ getridoftemp2();
+ getridoftemp3();
+ es = data.word(kTraveltext);
+ deallocatemem();
+ return;
+quittravel:
+ al = data.byte(kReallocation);
+ data.byte(kNewlocation) = al;
+ data.byte(kGetback) = 0;
+ getridoftemp();
+ getridoftemp2();
+ getridoftemp3();
+ es = data.word(kTraveltext);
+ deallocatemem();
+}
+
+void DreamGenContext::showcity() {
+ STACK_CHECK;
+ clearwork();
+ ds = data.word(kTempgraphics);
+ di = 57;
+ bx = 32;
+ al = 0;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = 120+57;
+ bx = 32;
+ al = 1;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::lookatplace() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 224);
+ if (flags.z())
+ goto alreadyinfo;
+ data.byte(kCommandtype) = 224;
+ al = 27;
+ commandonly();
+alreadyinfo:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return /* (noinfo) */;
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (noinfo) */;
+ bl = data.byte(kDestpos);
+ _cmp(bl, 15);
+ if (!flags.c())
+ return /* (noinfo) */;
+ push(bx);
+ delpointer();
+ deltextline();
+ getundercentre();
+ ds = data.word(kTempgraphics3);
+ al = 0;
+ ah = 0;
+ di = 60;
+ bx = 72;
+ showframe();
+ al = 4;
+ ah = 0;
+ di = 60;
+ bx = 72+55;
+ showframe();
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ al = 4;
+ ah = 0;
+ di = 60;
+ bx = 72+55+21;
+ showframe();
+_tmp1:
+ bx = pop();
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kTraveltext);
+ si = es.word(bx);
+ _add(si, (66*2));
+ findnextcolon();
+ di = 63;
+ bx = 84;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp2;
+ bx = 84+4;
+_tmp2:
+ dl = 191;
+ al = 0;
+ ah = 0;
+ printdirect();
+ worktoscreenm();
+ cx = 500;
+ hangonp();
+ data.byte(kPointermode) = 0;
+ data.byte(kPointerframe) = 0;
+ putundercentre();
+ worktoscreenm();
+}
+
+void DreamGenContext::getundercentre() {
+ STACK_CHECK;
+ di = 58;
+ bx = 72;
+ ds = data.word(kMapstore);
+ si = 0;
+ cl = 254;
+ ch = 110;
+ multiget();
+}
+
+void DreamGenContext::putundercentre() {
+ STACK_CHECK;
+ di = 58;
+ bx = 72;
+ ds = data.word(kMapstore);
+ si = 0;
+ cl = 254;
+ ch = 110;
+ multiput();
+}
+
+void DreamGenContext::locationpic() {
+ STACK_CHECK;
+ getdestinfo();
+ al = es.byte(si);
+ push(es);
+ push(si);
+ di = 0;
+ _cmp(al, 6);
+ if (!flags.c())
+ goto secondlot;
+ ds = data.word(kTempgraphics);
+ _add(al, 4);
+ goto gotgraphic;
+secondlot:
+ _sub(al, 6);
+ ds = data.word(kTempgraphics2);
+gotgraphic:
+ _add(di, 104);
+ bx = 138+14;
+ ah = 0;
+ showframe();
+ si = pop();
+ es = pop();
+ al = data.byte(kDestpos);
+ _cmp(al, data.byte(kReallocation));
+ if (!flags.z())
+ goto notinthisone;
+ al = 3;
+ di = 104;
+ bx = 140+14;
+ ds = data.word(kTempgraphics);
+ ah = 0;
+ showframe();
+notinthisone:
+ bl = data.byte(kDestpos);
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kTraveltext);
+ si = es.word(bx);
+ _add(si, (66*2));
+ di = 50;
+ bx = 20;
+ dl = 241;
+ al = 0;
+ ah = 0;
+ printdirect();
+}
+
+void DreamGenContext::getdestinfo() {
+ STACK_CHECK;
+ al = data.byte(kDestpos);
+ ah = 0;
+ push(ax);
+ dx = data;
+ es = dx;
+ si = 8011;
+ _add(si, ax);
+ cl = es.byte(si);
+ ax = pop();
+ push(cx);
+ dx = data;
+ es = dx;
+ si = 8027;
+ _add(si, ax);
+ ax = pop();
+}
+
+void DreamGenContext::showarrows() {
+ STACK_CHECK;
+ di = 116-12;
+ bx = 16;
+ ds = data.word(kTempgraphics);
+ al = 0;
+ ah = 0;
+ showframe();
+ di = 226+12;
+ bx = 16;
+ ds = data.word(kTempgraphics);
+ al = 1;
+ ah = 0;
+ showframe();
+ di = 280;
+ bx = 14;
+ ds = data.word(kTempgraphics);
+ al = 2;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::nextdest() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 218);
+ if (flags.z())
+ goto alreadydu;
+ data.byte(kCommandtype) = 218;
+ al = 28;
+ commandonly();
+alreadydu:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return /* (nodu) */;
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nodu) */;
+searchdestup:
+ _inc(data.byte(kDestpos));
+ _cmp(data.byte(kDestpos), 15);
+ if (!flags.z())
+ goto notlastdest;
+ data.byte(kDestpos) = 0;
+notlastdest:
+ getdestinfo();
+ _cmp(al, 0);
+ if (flags.z())
+ goto searchdestup;
+ data.byte(kNewtextline) = 1;
+ deltextline();
+ delpointer();
+ showpanel();
+ showman();
+ showarrows();
+ locationpic();
+ undertextline();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::lastdest() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 219);
+ if (flags.z())
+ goto alreadydd;
+ data.byte(kCommandtype) = 219;
+ al = 29;
+ commandonly();
+alreadydd:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return /* (nodd) */;
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nodd) */;
+searchdestdown:
+ _dec(data.byte(kDestpos));
+ _cmp(data.byte(kDestpos), -1);
+ if (!flags.z())
+ goto notfirstdest;
+ data.byte(kDestpos) = 15;
+notfirstdest:
+ getdestinfo();
+ _cmp(al, 0);
+ if (flags.z())
+ goto searchdestdown;
+ data.byte(kNewtextline) = 1;
+ deltextline();
+ delpointer();
+ showpanel();
+ showman();
+ showarrows();
+ locationpic();
+ undertextline();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::destselect() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 222);
+ if (flags.z())
+ goto alreadytrav;
+ data.byte(kCommandtype) = 222;
+ al = 30;
+ commandonly();
+alreadytrav:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return /* (notrav) */;
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notrav) */;
+ getdestinfo();
+ al = data.byte(kDestpos);
+ data.byte(kNewlocation) = al;
+}
+
+void DreamGenContext::getlocation() {
+ STACK_CHECK;
+ ah = 0;
+ bx = ax;
+ dx = data;
+ es = dx;
+ _add(bx, 8011);
+ al = es.byte(bx);
+}
+
+void DreamGenContext::setlocation() {
+ STACK_CHECK;
+ ah = 0;
+ bx = ax;
+ dx = data;
+ es = dx;
+ _add(bx, 8011);
+ es.byte(bx) = 1;
+}
+
+void DreamGenContext::resetlocation() {
+ STACK_CHECK;
+ push(ax);
+ _cmp(al, 5);
+ if (!flags.z())
+ goto notdelhotel;
+ purgealocation();
+ al = 21;
+ purgealocation();
+ al = 22;
+ purgealocation();
+ al = 27;
+ purgealocation();
+ goto clearedlocations;
+notdelhotel:
+ _cmp(al, 8);
+ if (!flags.z())
+ goto notdeltvstud;
+ purgealocation();
+ al = 28;
+ purgealocation();
+ goto clearedlocations;
+notdeltvstud:
+ _cmp(al, 6);
+ if (!flags.z())
+ goto notdelsarters;
+ purgealocation();
+ al = 20;
+ purgealocation();
+ al = 25;
+ purgealocation();
+ goto clearedlocations;
+notdelsarters:
+ _cmp(al, 13);
+ if (!flags.z())
+ goto notdelboathouse;
+ purgealocation();
+ al = 29;
+ purgealocation();
+ goto clearedlocations;
+notdelboathouse:
+clearedlocations:
+ ax = pop();
+ ah = 0;
+ bx = ax;
+ dx = data;
+ es = dx;
+ _add(bx, 8011);
+ es.byte(bx) = 0;
+}
+
+void DreamGenContext::readdesticon() {
+ STACK_CHECK;
+ dx = 2013;
+ loadintotemp();
+ dx = 2026;
+ loadintotemp2();
+ dx = 1961;
+ loadintotemp3();
+}
+
+void DreamGenContext::readcitypic() {
+ STACK_CHECK;
+ dx = 2000;
+ loadintotemp();
+}
+
+void DreamGenContext::usemon() {
+ STACK_CHECK;
+ data.byte(kLasttrigger) = 0;
+ es = cs;
+ di = 2970+1;
+ cx = 12;
+ al = 32;
+ _stosb(cx, true);
+ es = cs;
+ di = 2942+1;
+ cx = 12;
+ al = 32;
+ _stosb(cx, true);
+ es = cs;
+ di = 2836;
+ es.byte(di) = 1;
+ _add(di, 26);
+ cx = 3;
+keyloop:
+ es.byte(di) = 0;
+ _add(di, 26);
+ if (--cx)
+ goto keyloop;
+ createpanel();
+ showpanel();
+ showicon();
+ drawfloor();
+ getridofall();
+ dx = 1974;
+ loadintotemp();
+ loadpersonal();
+ loadnews();
+ loadcart();
+ dx = 1870;
+ loadtempcharset();
+ printoutermon();
+ initialmoncols();
+ printlogo();
+ worktoscreen();
+ turnonpower();
+ fadeupyellows();
+ fadeupmonfirst();
+ data.word(kMonadx) = 76;
+ data.word(kMonady) = 141;
+ al = 1;
+ monmessage();
+ cx = 120;
+ hangoncurs();
+ al = 2;
+ monmessage();
+ cx = 60;
+ randomaccess();
+ al = 3;
+ monmessage();
+ cx = 100;
+ hangoncurs();
+ printlogo();
+ scrollmonitor();
+ data.word(kBufferin) = 0;
+ data.word(kBufferout) = 0;
+moreinput:
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ push(di);
+ push(bx);
+ input();
+ bx = pop();
+ di = pop();
+ data.word(kMonadx) = di;
+ data.word(kMonady) = bx;
+ execcommand();
+ _cmp(al, 0);
+ if (flags.z())
+ goto moreinput;
+ getridoftemp();
+ getridoftempcharset();
+ es = data.word(kTextfile1);
+ deallocatemem();
+ es = data.word(kTextfile2);
+ deallocatemem();
+ es = data.word(kTextfile3);
+ deallocatemem();
+ data.byte(kGetback) = 1;
+ al = 26;
+ playchannel1();
+ data.byte(kManisoffscreen) = 0;
+ restoreall();
+ redrawmainscrn();
+ worktoscreenm();
+}
+
+void DreamGenContext::printoutermon() {
+ STACK_CHECK;
+ di = 40;
+ bx = 32;
+ ds = data.word(kTempgraphics);
+ al = 1;
+ ah = 0;
+ showframe();
+ di = 264;
+ bx = 32;
+ ds = data.word(kTempgraphics);
+ al = 2;
+ ah = 0;
+ showframe();
+ di = 40;
+ bx = 12;
+ ds = data.word(kTempgraphics);
+ al = 3;
+ ah = 0;
+ showframe();
+ di = 40;
+ bx = 164;
+ ds = data.word(kTempgraphics);
+ al = 4;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::loadpersonal() {
+ STACK_CHECK;
+ al = data.byte(kLocation);
+ dx = 2052;
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundpersonal;
+ _cmp(al, 42);
+ if (flags.z())
+ goto foundpersonal;
+ dx = 2065;
+ _cmp(al, 2);
+ if (flags.z())
+ goto foundpersonal;
+foundpersonal:
+ openfile();
+ readheader();
+ bx = es.word(di);
+ push(bx);
+ cl = 4;
+ _shr(bx, cl);
+ allocatemem();
+ data.word(kTextfile1) = ax;
+ ds = ax;
+ cx = pop();
+ dx = 0;
+ readfromfile();
+ closefile();
+}
+
+void DreamGenContext::loadnews() {
+ STACK_CHECK;
+ al = data.byte(kNewsitem);
+ dx = 2078;
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundnews;
+ dx = 2091;
+ _cmp(al, 1);
+ if (flags.z())
+ goto foundnews;
+ dx = 2104;
+ _cmp(al, 2);
+ if (flags.z())
+ goto foundnews;
+ dx = 2117;
+foundnews:
+ openfile();
+ readheader();
+ bx = es.word(di);
+ push(bx);
+ cl = 4;
+ _shr(bx, cl);
+ allocatemem();
+ data.word(kTextfile2) = ax;
+ ds = ax;
+ cx = pop();
+ dx = 0;
+ readfromfile();
+ closefile();
+}
+
+void DreamGenContext::loadcart() {
+ STACK_CHECK;
+ lookininterface();
+ dx = 2130;
+ _cmp(al, 0);
+ if (flags.z())
+ goto gotcart;
+ dx = 2143;
+ _cmp(al, 1);
+ if (flags.z())
+ goto gotcart;
+ dx = 2156;
+ _cmp(al, 2);
+ if (flags.z())
+ goto gotcart;
+ dx = 2169;
+ _cmp(al, 3);
+ if (flags.z())
+ goto gotcart;
+ dx = 2182;
+gotcart:
+ openfile();
+ readheader();
+ bx = es.word(di);
+ push(bx);
+ cl = 4;
+ _shr(bx, cl);
+ allocatemem();
+ data.word(kTextfile3) = ax;
+ ds = ax;
+ cx = pop();
+ dx = 0;
+ readfromfile();
+ closefile();
+}
+
+void DreamGenContext::lookininterface() {
+ STACK_CHECK;
+ al = 'I';
+ ah = 'N';
+ cl = 'T';
+ ch = 'F';
+ findsetobject();
+ ah = 1;
+ checkinside();
+ _cmp(cl, (114));
+ if (flags.z())
+ goto emptyinterface;
+ al = es.byte(bx+15);
+ _inc(al);
+ return;
+emptyinterface:
+ al = 0;
+}
+
+void DreamGenContext::turnonpower() {
+ STACK_CHECK;
+ cx = 3;
+powerloop:
+ push(cx);
+ powerlighton();
+ cx = 30;
+ hangon();
+ powerlightoff();
+ cx = 30;
+ hangon();
+ cx = pop();
+ if (--cx)
+ goto powerloop;
+ powerlighton();
+}
+
+void DreamGenContext::randomaccess() {
+ STACK_CHECK;
+accessloop:
+ push(cx);
+ vsync();
+ vsync();
+ randomnum1();
+ _and(al, 15);
+ _cmp(al, 10);
+ if (flags.c())
+ goto off;
+ accesslighton();
+ goto chosenaccess;
+off:
+ accesslightoff();
+chosenaccess:
+ cx = pop();
+ if (--cx)
+ goto accessloop;
+ accesslightoff();
+}
+
+void DreamGenContext::powerlighton() {
+ STACK_CHECK;
+ di = 257+4;
+ bx = 182;
+ ds = data.word(kTempgraphics);
+ al = 6;
+ ah = 0;
+ push(di);
+ push(bx);
+ showframe();
+ bx = pop();
+ di = pop();
+ cl = 12;
+ ch = 8;
+ multidump();
+}
+
+void DreamGenContext::powerlightoff() {
+ STACK_CHECK;
+ di = 257+4;
+ bx = 182;
+ ds = data.word(kTempgraphics);
+ al = 5;
+ ah = 0;
+ push(di);
+ push(bx);
+ showframe();
+ bx = pop();
+ di = pop();
+ cl = 12;
+ ch = 8;
+ multidump();
+}
+
+void DreamGenContext::accesslighton() {
+ STACK_CHECK;
+ di = 74;
+ bx = 182;
+ ds = data.word(kTempgraphics);
+ al = 8;
+ ah = 0;
+ push(di);
+ push(bx);
+ showframe();
+ bx = pop();
+ di = pop();
+ cl = 12;
+ ch = 8;
+ multidump();
+}
+
+void DreamGenContext::accesslightoff() {
+ STACK_CHECK;
+ di = 74;
+ bx = 182;
+ ds = data.word(kTempgraphics);
+ al = 7;
+ ah = 0;
+ push(di);
+ push(bx);
+ showframe();
+ bx = pop();
+ di = pop();
+ cl = 12;
+ ch = 8;
+ multidump();
+}
+
+void DreamGenContext::locklighton() {
+ STACK_CHECK;
+ di = 56;
+ bx = 182;
+ ds = data.word(kTempgraphics);
+ al = 10;
+ ah = 0;
+ push(di);
+ push(bx);
+ showframe();
+ bx = pop();
+ di = pop();
+ cl = 12;
+ ch = 8;
+ multidump();
+}
+
+void DreamGenContext::locklightoff() {
+ STACK_CHECK;
+ di = 56;
+ bx = 182;
+ ds = data.word(kTempgraphics);
+ al = 9;
+ ah = 0;
+ push(di);
+ push(bx);
+ showframe();
+ bx = pop();
+ di = pop();
+ cl = 12;
+ ch = 8;
+ multidump();
+}
+
+void DreamGenContext::input() {
+ STACK_CHECK;
+ es = cs;
+ di = 8045;
+ cx = 64;
+ al = 0;
+ _stosb(cx, true);
+ data.word(kCurpos) = 0;
+ al = '>';
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ ds = data.word(kTempcharset);
+ ah = 0;
+ printchar();
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ cl = 6;
+ ch = 8;
+ multidump();
+ _add(data.word(kMonadx), 6);
+ ax = data.word(kMonadx);
+ data.word(kCurslocx) = ax;
+ ax = data.word(kMonady);
+ data.word(kCurslocy) = ax;
+waitkey:
+ printcurs();
+ vsync();
+ delcurs();
+ readkey();
+ al = data.byte(kCurrentkey);
+ _cmp(al, 0);
+ if (flags.z())
+ goto waitkey;
+ _cmp(al, 13);
+ if (flags.z())
+ return /* (endofinput) */;
+ _cmp(al, 8);
+ if (!flags.z())
+ goto notdel;
+ _cmp(data.word(kCurpos), 0);
+ if (flags.z())
+ goto waitkey;
+ delchar();
+ goto waitkey;
+notdel:
+ _cmp(data.word(kCurpos), 28);
+ if (flags.z())
+ goto waitkey;
+ _cmp(data.byte(kCurrentkey), 32);
+ if (!flags.z())
+ goto notleadingspace;
+ _cmp(data.word(kCurpos), 0);
+ if (flags.z())
+ goto waitkey;
+notleadingspace:
+ makecaps();
+ es = cs;
+ si = data.word(kCurpos);
+ _add(si, si);
+ _add(si, 8045);
+ es.byte(si) = al;
+ _cmp(al, 'Z'+1);
+ if (!flags.c())
+ goto waitkey;
+ push(ax);
+ push(es);
+ push(si);
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ ds = data.word(kMapstore);
+ ax = data.word(kCurpos);
+ _xchg(al, ah);
+ si = ax;
+ cl = 8;
+ ch = 8;
+ multiget();
+ si = pop();
+ es = pop();
+ ax = pop();
+ push(es);
+ push(si);
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ ds = data.word(kTempcharset);
+ ah = 0;
+ printchar();
+ si = pop();
+ es = pop();
+ es.byte(si+1) = cl;
+ ch = 0;
+ _add(data.word(kMonadx), cx);
+ _inc(data.word(kCurpos));
+ _add(data.word(kCurslocx), cx);
+ goto waitkey;
+}
+
+void DreamGenContext::makecaps() {
+ STACK_CHECK;
+ _cmp(al, 'a');
+ if (flags.c())
+ return /* (notupperc) */;
+ _sub(al, 32);
+}
+
+void DreamGenContext::delchar() {
+ STACK_CHECK;
+ _dec(data.word(kCurpos));
+ si = data.word(kCurpos);
+ _add(si, si);
+ es = cs;
+ _add(si, 8045);
+ es.byte(si) = 0;
+ al = es.byte(si+1);
+ ah = 0;
+ _sub(data.word(kMonadx), ax);
+ _sub(data.word(kCurslocx), ax);
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ ds = data.word(kMapstore);
+ ax = data.word(kCurpos);
+ _xchg(al, ah);
+ si = ax;
+ cl = 8;
+ ch = 8;
+ multiput();
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ cl = al;
+ ch = 8;
+ multidump();
+}
+
+void DreamGenContext::execcommand() {
+ STACK_CHECK;
+ es = cs;
+ bx = 2776;
+ ds = cs;
+ si = 8045;
+ al = ds.byte(si);
+ _cmp(al, 0);
+ if (!flags.z())
+ goto notblankinp;
+ scrollmonitor();
+ return;
+notblankinp:
+ cl = 0;
+comloop:
+ push(bx);
+ push(si);
+comloop2:
+ al = ds.byte(si);
+ _add(si, 2);
+ ah = es.byte(bx);
+ _inc(bx);
+ _cmp(ah, 32);
+ if (flags.z())
+ goto foundcom;
+ _cmp(al, ah);
+ if (flags.z())
+ goto comloop2;
+ si = pop();
+ bx = pop();
+ _add(bx, 10);
+ _inc(cl);
+ _cmp(cl, 6);
+ if (!flags.z())
+ goto comloop;
+ neterror();
+ al = 0;
+ return;
+foundcom:
+ si = pop();
+ bx = pop();
+ _cmp(cl, 1);
+ if (flags.z())
+ goto testcom;
+ _cmp(cl, 2);
+ if (flags.z())
+ goto directory;
+ _cmp(cl, 3);
+ if (flags.z())
+ goto accesscom;
+ _cmp(cl, 4);
+ if (flags.z())
+ goto signoncom;
+ _cmp(cl, 5);
+ if (flags.z())
+ goto keyscom;
+ goto quitcom;
+directory:
+ dircom();
+ al = 0;
+ return;
+signoncom:
+ signon();
+ al = 0;
+ return;
+accesscom:
+ read();
+ al = 0;
+ return;
+keyscom:
+ showkeys();
+ al = 0;
+ return;
+testcom:
+ al = 6;
+ monmessage();
+ al = 0;
+ return;
+quitcom:
+ al = 1;
+}
+
+void DreamGenContext::neterror() {
+ STACK_CHECK;
+ al = 5;
+ monmessage();
+ scrollmonitor();
+}
+
+void DreamGenContext::dircom() {
+ STACK_CHECK;
+ cx = 30;
+ randomaccess();
+ parser();
+ _cmp(es.byte(di+1), 0);
+ if (flags.z())
+ goto dirroot;
+ dirfile();
+ return;
+dirroot:
+ data.byte(kLogonum) = 0;
+ ds = cs;
+ si = 2956;
+ _inc(si);
+ es = cs;
+ di = 2970;
+ _inc(di);
+ cx = 12;
+ _movsb(cx, true);
+ monitorlogo();
+ scrollmonitor();
+ al = 9;
+ monmessage();
+ es = data.word(kTextfile1);
+ searchforfiles();
+ es = data.word(kTextfile2);
+ searchforfiles();
+ es = data.word(kTextfile3);
+ searchforfiles();
+ scrollmonitor();
+}
+
+void DreamGenContext::searchforfiles() {
+ STACK_CHECK;
+ bx = (66*2);
+directloop1:
+ al = es.byte(bx);
+ _inc(bx);
+ _cmp(al, '*');
+ if (flags.z())
+ return /* (endofdir) */;
+ _cmp(al, 34);
+ if (!flags.z())
+ goto directloop1;
+ monprint();
+ goto directloop1;
+}
+
+void DreamGenContext::signon() {
+ STACK_CHECK;
+ parser();
+ _inc(di);
+ ds = cs;
+ si = 2836;
+ cx = 4;
+signonloop:
+ push(cx);
+ push(si);
+ push(di);
+ _add(si, 14);
+ cx = 11;
+signonloop2:
+ _lodsb();
+ _cmp(al, 32);
+ if (flags.z())
+ goto foundsign;
+ makecaps();
+ ah = es.byte(di);
+ _inc(di);
+ _cmp(al, ah);
+ if (!flags.z())
+ goto nomatch;
+ if (--cx)
+ goto signonloop2;
+nomatch:
+ di = pop();
+ si = pop();
+ cx = pop();
+ _add(si, 26);
+ if (--cx)
+ goto signonloop;
+ al = 13;
+ monmessage();
+ return;
+foundsign:
+ di = pop();
+ si = pop();
+ cx = pop();
+ bx = si;
+ es = ds;
+ _cmp(es.byte(bx), 0);
+ if (flags.z())
+ goto notyetassigned;
+ al = 17;
+ monmessage();
+ return;
+notyetassigned:
+ push(es);
+ push(bx);
+ scrollmonitor();
+ al = 15;
+ monmessage();
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ push(di);
+ push(bx);
+ input();
+ bx = pop();
+ di = pop();
+ data.word(kMonadx) = di;
+ data.word(kMonady) = bx;
+ bx = pop();
+ es = pop();
+ push(es);
+ push(bx);
+ _add(bx, 2);
+ ds = cs;
+ si = 8045;
+checkpass:
+ _lodsw();
+ ah = es.byte(bx);
+ _inc(bx);
+ _cmp(ah, 32);
+ if (flags.z())
+ goto passpassed;
+ _cmp(al, ah);
+ if (flags.z())
+ goto checkpass;
+ bx = pop();
+ es = pop();
+ scrollmonitor();
+ al = 16;
+ monmessage();
+ return;
+passpassed:
+ al = 14;
+ monmessage();
+ bx = pop();
+ es = pop();
+ push(es);
+ push(bx);
+ _add(bx, 14);
+ monprint();
+ scrollmonitor();
+ bx = pop();
+ es = pop();
+ es.byte(bx) = 1;
+}
+
+void DreamGenContext::showkeys() {
+ STACK_CHECK;
+ cx = 10;
+ randomaccess();
+ scrollmonitor();
+ al = 18;
+ monmessage();
+ es = cs;
+ bx = 2836;
+ cx = 4;
+keysloop:
+ push(cx);
+ push(bx);
+ _cmp(es.byte(bx), 0);
+ if (flags.z())
+ goto notheld;
+ _add(bx, 14);
+ monprint();
+notheld:
+ bx = pop();
+ cx = pop();
+ _add(bx, 26);
+ if (--cx)
+ goto keysloop;
+ scrollmonitor();
+}
+
+void DreamGenContext::read() {
+ STACK_CHECK;
+ cx = 40;
+ randomaccess();
+ parser();
+ _cmp(es.byte(di+1), 0);
+ if (!flags.z())
+ goto okcom;
+ neterror();
+ return;
+okcom:
+ es = cs;
+ di = 2970;
+ ax = data.word(kTextfile1);
+ data.word(kMonsource) = ax;
+ ds = ax;
+ si = (66*2);
+ searchforstring();
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundfile2;
+ ax = data.word(kTextfile2);
+ data.word(kMonsource) = ax;
+ ds = ax;
+ si = (66*2);
+ searchforstring();
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundfile2;
+ ax = data.word(kTextfile3);
+ data.word(kMonsource) = ax;
+ ds = ax;
+ si = (66*2);
+ searchforstring();
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundfile2;
+ al = 7;
+ monmessage();
+ return;
+foundfile2:
+ getkeyandlogo();
+ _cmp(al, 0);
+ if (flags.z())
+ goto keyok1;
+ return;
+keyok1:
+ es = cs;
+ di = 2942;
+ ds = data.word(kMonsource);
+ searchforstring();
+ _cmp(al, 0);
+ if (flags.z())
+ goto findtopictext;
+ al = data.byte(kOldlogonum);
+ data.byte(kLogonum) = al;
+ al = 11;
+ monmessage();
+ return;
+findtopictext:
+ _inc(bx);
+ push(es);
+ push(bx);
+ monitorlogo();
+ scrollmonitor();
+ bx = pop();
+ es = pop();
+moretopic:
+ monprint();
+ al = es.byte(bx);
+ _cmp(al, 34);
+ if (flags.z())
+ goto endoftopic;
+ _cmp(al, '=');
+ if (flags.z())
+ goto endoftopic;
+ _cmp(al, '*');
+ if (flags.z())
+ goto endoftopic;
+ push(es);
+ push(bx);
+ processtrigger();
+ cx = 24;
+ randomaccess();
+ bx = pop();
+ es = pop();
+ goto moretopic;
+endoftopic:
+ scrollmonitor();
+}
+
+void DreamGenContext::dirfile() {
+ STACK_CHECK;
+ al = 34;
+ es.byte(di) = al;
+ push(es);
+ push(di);
+ ds = data.word(kTextfile1);
+ si = (66*2);
+ searchforstring();
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundfile;
+ di = pop();
+ es = pop();
+ push(es);
+ push(di);
+ ds = data.word(kTextfile2);
+ si = (66*2);
+ searchforstring();
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundfile;
+ di = pop();
+ es = pop();
+ push(es);
+ push(di);
+ ds = data.word(kTextfile3);
+ si = (66*2);
+ searchforstring();
+ _cmp(al, 0);
+ if (flags.z())
+ goto foundfile;
+ di = pop();
+ es = pop();
+ al = 7;
+ monmessage();
+ return;
+foundfile:
+ ax = pop();
+ ax = pop();
+ getkeyandlogo();
+ _cmp(al, 0);
+ if (flags.z())
+ goto keyok2;
+ return;
+keyok2:
+ push(es);
+ push(bx);
+ ds = cs;
+ si = 2942+1;
+ es = cs;
+ di = 2970+1;
+ cx = 12;
+ _movsb(cx, true);
+ monitorlogo();
+ scrollmonitor();
+ al = 10;
+ monmessage();
+ bx = pop();
+ es = pop();
+directloop2:
+ al = es.byte(bx);
+ _inc(bx);
+ _cmp(al, 34);
+ if (flags.z())
+ goto endofdir2;
+ _cmp(al, '*');
+ if (flags.z())
+ goto endofdir2;
+ _cmp(al, '=');
+ if (!flags.z())
+ goto directloop2;
+ monprint();
+ goto directloop2;
+endofdir2:
+ scrollmonitor();
+}
+
+void DreamGenContext::getkeyandlogo() {
+ STACK_CHECK;
+ _inc(bx);
+ al = es.byte(bx);
+ _sub(al, 48);
+ data.byte(kNewlogonum) = al;
+ _add(bx, 2);
+ al = es.byte(bx);
+ _sub(al, 48);
+ data.byte(kKeynum) = al;
+ _inc(bx);
+ push(es);
+ push(bx);
+ al = data.byte(kKeynum);
+ ah = 0;
+ cx = 26;
+ _mul(cx);
+ es = cs;
+ bx = 2836;
+ _add(bx, ax);
+ al = es.byte(bx);
+ _cmp(al, 1);
+ if (flags.z())
+ goto keyok;
+ push(bx);
+ push(es);
+ al = 12;
+ monmessage();
+ es = pop();
+ bx = pop();
+ _add(bx, 14);
+ monprint();
+ scrollmonitor();
+ bx = pop();
+ es = pop();
+ al = 1;
+ return;
+keyok:
+ bx = pop();
+ es = pop();
+ al = data.byte(kNewlogonum);
+ data.byte(kLogonum) = al;
+ al = 0;
+}
+
+void DreamGenContext::searchforstring() {
+ STACK_CHECK;
+ dl = es.byte(di);
+ cx = di;
+restartlook:
+ di = cx;
+ bx = si;
+ dh = 0;
+keeplooking:
+ _lodsb();
+ makecaps();
+ _cmp(al, '*');
+ if (flags.z())
+ goto notfound;
+ _cmp(dl, '=');
+ if (!flags.z())
+ goto nofindingtopic;
+ _cmp(al, 34);
+ if (flags.z())
+ goto notfound;
+nofindingtopic:
+ ah = es.byte(di);
+ _cmp(al, dl);
+ if (!flags.z())
+ goto notbracket;
+ _inc(dh);
+ _cmp(dh, 2);
+ if (flags.z())
+ goto complete;
+notbracket:
+ _cmp(al, ah);
+ if (!flags.z())
+ goto restartlook;
+ _inc(di);
+ goto keeplooking;
+complete:
+ es = ds;
+ al = 0;
+ bx = si;
+ return;
+notfound:
+ al = 1;
+}
+
+void DreamGenContext::parser() {
+ STACK_CHECK;
+ es = cs;
+ di = 2942;
+ cx = 13;
+ al = 0;
+ _stosb(cx, true);
+ di = 2942;
+ al = '=';
+ _stosb();
+ ds = cs;
+ si = 8045;
+notspace1:
+ _lodsw();
+ _cmp(al, 32);
+ if (flags.z())
+ goto stillspace1;
+ _cmp(al, 0);
+ if (!flags.z())
+ goto notspace1;
+ goto finishpars;
+stillspace1:
+ _lodsw();
+ _cmp(al, 32);
+ if (flags.z())
+ goto stillspace1;
+copyin1:
+ _stosb();
+ _lodsw();
+ _cmp(al, 0);
+ if (flags.z())
+ goto finishpars;
+ _cmp(al, 32);
+ if (!flags.z())
+ goto copyin1;
+finishpars:
+ di = 2942;
+}
+
+void DreamGenContext::scrollmonitor() {
+ STACK_CHECK;
+ push(ax);
+ push(bx);
+ push(cx);
+ push(dx);
+ push(di);
+ push(si);
+ push(es);
+ push(ds);
+ printlogo();
+ di = data.word(kMonadx);
+ bx = data.word(kMonady);
+ printundermon();
+ ax = data.word(kMonady);
+ worktoscreen();
+ al = 25;
+ playchannel1();
+ ds = pop();
+ es = pop();
+ si = pop();
+ di = pop();
+ dx = pop();
+ cx = pop();
+ bx = pop();
+ ax = pop();
+}
+
+void DreamGenContext::monitorlogo() {
+ STACK_CHECK;
+ al = data.byte(kLogonum);
+ _cmp(al, data.byte(kOldlogonum));
+ if (flags.z())
+ goto notnewlogo;
+ data.byte(kOldlogonum) = al;
+ printlogo();
+ printundermon();
+ worktoscreen();
+ printlogo();
+ printlogo();
+ al = 26;
+ playchannel1();
+ cx = 20;
+ randomaccess();
+ return;
+notnewlogo:
+ printlogo();
+}
+
+void DreamGenContext::printlogo() {
+ STACK_CHECK;
+ di = 56;
+ bx = 32;
+ ds = data.word(kTempgraphics);
+ al = 0;
+ ah = 0;
+ showframe();
+ showcurrentfile();
+}
+
+void DreamGenContext::showcurrentfile() {
+ STACK_CHECK;
+ di = 178;
+ bx = 37;
+ si = 2970+1;
+curfileloop:
+ al = cs.byte(si);
+ _cmp(al, 0);
+ if (flags.z())
+ return /* (finishfile) */;
+ _inc(si);
+ push(si);
+ modifychar();
+ ds = data.word(kTempcharset);
+ ah = 0;
+ printchar();
+ si = pop();
+ goto curfileloop;
+}
+
+void DreamGenContext::monmessage() {
+ STACK_CHECK;
+ es = data.word(kTextfile1);
+ bx = (66*2);
+ cl = al;
+ ch = 0;
+monmessageloop:
+ al = es.byte(bx);
+ _inc(bx);
+ _cmp(al, '+');
+ if (!flags.z())
+ goto monmessageloop;
+ if (--cx)
+ goto monmessageloop;
+ monprint();
+}
+
+void DreamGenContext::processtrigger() {
+ STACK_CHECK;
+ _cmp(data.byte(kLasttrigger), '1');
+ if (!flags.z())
+ goto notfirsttrigger;
+ al = 8;
+ setlocation();
+ al = 45;
+ triggermessage();
+ return;
+notfirsttrigger:
+ _cmp(data.byte(kLasttrigger), '2');
+ if (!flags.z())
+ goto notsecondtrigger;
+ al = 9;
+ setlocation();
+ al = 55;
+ triggermessage();
+ return;
+notsecondtrigger:
+ _cmp(data.byte(kLasttrigger), '3');
+ if (!flags.z())
+ return /* (notthirdtrigger) */;
+ al = 2;
+ setlocation();
+ al = 59;
+ triggermessage();
+}
+
+void DreamGenContext::triggermessage() {
+ STACK_CHECK;
+ push(ax);
+ di = 174;
+ bx = 153;
+ cl = 200;
+ ch = 63;
+ ds = data.word(kMapstore);
+ si = 0;
+ multiget();
+ ax = pop();
+ findpuztext();
+ di = 174;
+ bx = 156;
+ dl = 141;
+ ah = 16;
+ printdirect();
+ cx = 140;
+ hangon();
+ worktoscreen();
+ cx = 340;
+ hangon();
+ di = 174;
+ bx = 153;
+ cl = 200;
+ ch = 63;
+ ds = data.word(kMapstore);
+ si = 0;
+ multiput();
+ worktoscreen();
+ data.byte(kLasttrigger) = 0;
+}
+
+void DreamGenContext::printcurs() {
+ STACK_CHECK;
+ push(si);
+ push(di);
+ push(ds);
+ push(dx);
+ push(bx);
+ push(es);
+ di = data.word(kCurslocx);
+ bx = data.word(kCurslocy);
+ cl = 6;
+ ch = 8;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+ ch = 11;
+_tmp1:
+ ds = data.word(kBuffers);
+ si = (0);
+ push(di);
+ push(bx);
+ multiget();
+ bx = pop();
+ di = pop();
+ push(bx);
+ push(di);
+ _inc(data.word(kMaintimer));
+ ax = data.word(kMaintimer);
+ _and(al, 16);
+ if (!flags.z())
+ goto flashcurs;
+ al = '/';
+ _sub(al, 32);
+ ah = 0;
+ ds = data.word(kTempcharset);
+ showframe();
+flashcurs:
+ di = pop();
+ bx = pop();
+ _sub(di, 6);
+ cl = 12;
+ ch = 8;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp2;
+ ch = 11;
+_tmp2:
+ multidump();
+ es = pop();
+ bx = pop();
+ dx = pop();
+ ds = pop();
+ di = pop();
+ si = pop();
+}
+
+void DreamGenContext::delcurs() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ push(di);
+ push(ds);
+ push(dx);
+ push(si);
+ di = data.word(kCurslocx);
+ bx = data.word(kCurslocy);
+ cl = 6;
+ ch = 8;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+ ch = 11;
+_tmp1:
+ push(di);
+ push(bx);
+ push(cx);
+ ds = data.word(kBuffers);
+ si = (0);
+ multiput();
+ cx = pop();
+ bx = pop();
+ di = pop();
+ multidump();
+ si = pop();
+ dx = pop();
+ ds = pop();
+ di = pop();
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::useobject() {
+ STACK_CHECK;
+ data.byte(kWithobject) = 255;
+ _cmp(data.byte(kCommandtype), 229);
+ if (flags.z())
+ goto alreadyuse;
+ data.byte(kCommandtype) = 229;
+ bl = data.byte(kCommand);
+ bh = data.byte(kObjecttype);
+ al = 51;
+ commandwithob();
+alreadyuse:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nouse) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto douse;
+ return;
+douse:
+ useroutine();
+}
+
+void DreamGenContext::useroutine() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 50);
+ if (flags.c())
+ goto nodream7;
+ _cmp(data.byte(kPointerpower), 0);
+ if (!flags.z())
+ goto powerok;
+ return;
+powerok:
+ data.byte(kPointerpower) = 0;
+nodream7:
+ getanyad();
+ dx = data;
+ ds = dx;
+ si = 2984;
+checkuselist:
+ push(si);
+ _lodsb();
+ _sub(al, 'A');
+ _cmp(al, es.byte(bx+12));
+ if (!flags.z())
+ goto failed;
+ _lodsb();
+ _sub(al, 'A');
+ _cmp(al, es.byte(bx+13));
+ if (!flags.z())
+ goto failed;
+ _lodsb();
+ _sub(al, 'A');
+ _cmp(al, es.byte(bx+14));
+ if (!flags.z())
+ goto failed;
+ _lodsb();
+ _sub(al, 'A');
+ _cmp(al, es.byte(bx+15));
+ if (!flags.z())
+ goto failed;
+ _lodsw();
+ si = pop();
+ __dispatch_call(ax);
+ return;
+failed:
+ si = pop();
+ _add(si, 6);
+ _cmp(ds.byte(si), 140);
+ if (!flags.z())
+ goto checkuselist;
+ delpointer();
+ getobtextstart();
+ findnextcolon();
+ _cmp(al, 0);
+ if (flags.z())
+ goto cantuse2;
+ findnextcolon();
+ _cmp(al, 0);
+ if (flags.z())
+ goto cantuse2;
+ al = es.byte(si);
+ _cmp(al, 0);
+ if (flags.z())
+ goto cantuse2;
+ usetext();
+ cx = 400;
+ hangonp();
+ putbackobstuff();
+ return;
+cantuse2:
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ obicons();
+ di = 33;
+ bx = 100;
+ al = 63;
+ dl = 241;
+ printmessage();
+ worktoscreenm();
+ cx = 50;
+ hangonp();
+ putbackobstuff();
+ data.byte(kCommandtype) = 255;
+}
+
+void DreamGenContext::wheelsound() {
+ STACK_CHECK;
+ al = 17;
+ playchannel1();
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::runtap() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto tapwith;
+ withwhat();
+ return;
+tapwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto fillcupfromtap;
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'F';
+ compare();
+ if (flags.z())
+ goto cupfromtapfull;
+ cx = 300;
+ al = 56;
+ showpuztext();
+ putbackobstuff();
+ return;
+fillcupfromtap:
+ al = data.byte(kWithobject);
+ getexad();
+ es.byte(bx+15) = 'F'-'A';
+ al = 8;
+ playchannel1();
+ cx = 300;
+ al = 57;
+ showpuztext();
+ putbackobstuff();
+ return;
+cupfromtapfull:
+ cx = 300;
+ al = 58;
+ showpuztext();
+ putbackobstuff();
+}
+
+void DreamGenContext::playguitar() {
+ STACK_CHECK;
+ al = 14;
+ playchannel1();
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::hotelcontrol() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 21);
+ if (!flags.z())
+ goto notrightcont;
+ _cmp(data.byte(kMapx), 33);
+ if (!flags.z())
+ goto notrightcont;
+ showfirstuse();
+ putbackobstuff();
+ return;
+notrightcont:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::hotelbell() {
+ STACK_CHECK;
+ al = 12;
+ playchannel1();
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::opentomb() {
+ STACK_CHECK;
+ _inc(data.byte(kProgresspoints));
+ showfirstuse();
+ data.word(kWatchingtime) = 35*2;
+ data.word(kReeltowatch) = 1;
+ data.word(kEndwatchreel) = 33;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usetrainer() {
+ STACK_CHECK;
+ getanyad();
+ _cmp(es.byte(bx+2), 4);
+ if (!flags.z())
+ goto notheldtrainer;
+ _inc(data.byte(kProgresspoints));
+ makeworn();
+ showseconduse();
+ putbackobstuff();
+ return;
+notheldtrainer:
+ nothelderror();
+}
+
+void DreamGenContext::nothelderror() {
+ STACK_CHECK;
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ obicons();
+ di = 64;
+ bx = 100;
+ al = 63;
+ ah = 1;
+ dl = 201;
+ printmessage2();
+ worktoscreenm();
+ cx = 50;
+ hangonp();
+ putbackobstuff();
+}
+
+void DreamGenContext::usepipe() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto pipewith;
+ withwhat();
+ return;
+pipewith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto fillcup;
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'F';
+ compare();
+ if (flags.z())
+ goto alreadyfull;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+fillcup:
+ cx = 300;
+ al = 36;
+ showpuztext();
+ putbackobstuff();
+ al = data.byte(kWithobject);
+ getexad();
+ es.byte(bx+15) = 'F'-'A';
+ return;
+alreadyfull:
+ cx = 300;
+ al = 35;
+ showpuztext();
+ putbackobstuff();
+}
+
+void DreamGenContext::usefullcart() {
+ STACK_CHECK;
+ _inc(data.byte(kProgresspoints));
+ al = 2;
+ ah = data.byte(kRoomnum);
+ _add(ah, 6);
+ turnanypathon();
+ data.byte(kManspath) = 4;
+ data.byte(kFacing) = 4;
+ data.byte(kTurntoface) = 4;
+ data.byte(kFinaldest) = 4;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ showfirstuse();
+ data.word(kWatchingtime) = 72*2;
+ data.word(kReeltowatch) = 58;
+ data.word(kEndwatchreel) = 142;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useplinth() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto plinthwith;
+ withwhat();
+ return;
+plinthwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'D';
+ ch = 'K';
+ dl = 'E';
+ dh = 'Y';
+ compare();
+ if (flags.z())
+ goto isrightkey;
+ showfirstuse();
+ putbackobstuff();
+ return;
+isrightkey:
+ _inc(data.byte(kProgresspoints));
+ showseconduse();
+ data.word(kWatchingtime) = 220;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 104;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ al = data.byte(kRoomafterdream);
+ data.byte(kNewlocation) = al;
+}
+
+void DreamGenContext::chewy() {
+ STACK_CHECK;
+ showfirstuse();
+ getanyad();
+ es.byte(bx+2) = 255;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useladder() {
+ STACK_CHECK;
+ showfirstuse();
+ _sub(data.byte(kMapx), 11);
+ findroominloc();
+ data.byte(kFacing) = 6;
+ data.byte(kTurntoface) = 6;
+ data.byte(kManspath) = 0;
+ data.byte(kDestination) = 0;
+ data.byte(kFinaldest) = 0;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useladderb() {
+ STACK_CHECK;
+ showfirstuse();
+ _add(data.byte(kMapx), 11);
+ findroominloc();
+ data.byte(kFacing) = 2;
+ data.byte(kTurntoface) = 2;
+ data.byte(kManspath) = 1;
+ data.byte(kDestination) = 1;
+ data.byte(kFinaldest) = 1;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::slabdoora() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kReeltowatch) = 13;
+ _cmp(data.byte(kDreamnumber), 3);
+ if (!flags.z())
+ goto slabawrong;
+ _inc(data.byte(kProgresspoints));
+ data.word(kWatchingtime) = 60;
+ data.word(kEndwatchreel) = 42;
+ data.byte(kNewlocation) = 47;
+ return;
+slabawrong:
+ data.word(kWatchingtime) = 40;
+ data.word(kEndwatchreel) = 34;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+}
+
+void DreamGenContext::slabdoorb() {
+ STACK_CHECK;
+ _cmp(data.byte(kDreamnumber), 1);
+ if (!flags.z())
+ goto slabbwrong;
+ al = 'S';
+ ah = 'H';
+ cl = 'L';
+ ch = 'D';
+ isryanholding();
+ if (!flags.z())
+ goto gotcrystal;
+ al = 44;
+ cx = 200;
+ showpuztext();
+ putbackobstuff();
+ return;
+gotcrystal:
+ showfirstuse();
+ _inc(data.byte(kProgresspoints));
+ data.byte(kGetback) = 1;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kReeltowatch) = 44;
+ data.word(kWatchingtime) = 60;
+ data.word(kEndwatchreel) = 71;
+ data.byte(kNewlocation) = 47;
+ return;
+slabbwrong:
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kReeltowatch) = 44;
+ data.word(kWatchingtime) = 40;
+ data.word(kEndwatchreel) = 63;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+}
+
+void DreamGenContext::slabdoord() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kReeltowatch) = 75;
+ _cmp(data.byte(kDreamnumber), 0);
+ if (!flags.z())
+ goto slabcwrong;
+ _inc(data.byte(kProgresspoints));
+ data.word(kWatchingtime) = 60;
+ data.word(kEndwatchreel) = 102;
+ data.byte(kNewlocation) = 47;
+ return;
+slabcwrong:
+ data.word(kWatchingtime) = 40;
+ data.word(kEndwatchreel) = 94;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+}
+
+void DreamGenContext::slabdoorc() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kReeltowatch) = 108;
+ _cmp(data.byte(kDreamnumber), 4);
+ if (!flags.z())
+ goto slabdwrong;
+ _inc(data.byte(kProgresspoints));
+ data.word(kWatchingtime) = 60;
+ data.word(kEndwatchreel) = 135;
+ data.byte(kNewlocation) = 47;
+ return;
+slabdwrong:
+ data.word(kWatchingtime) = 40;
+ data.word(kEndwatchreel) = 127;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+}
+
+void DreamGenContext::slabdoore() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kReeltowatch) = 141;
+ _cmp(data.byte(kDreamnumber), 5);
+ if (!flags.z())
+ goto slabewrong;
+ _inc(data.byte(kProgresspoints));
+ data.word(kWatchingtime) = 60;
+ data.word(kEndwatchreel) = 168;
+ data.byte(kNewlocation) = 47;
+ return;
+slabewrong:
+ data.word(kWatchingtime) = 40;
+ data.word(kEndwatchreel) = 160;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+}
+
+void DreamGenContext::slabdoorf() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kReeltowatch) = 171;
+ _cmp(data.byte(kDreamnumber), 2);
+ if (!flags.z())
+ goto slabfwrong;
+ _inc(data.byte(kProgresspoints));
+ data.word(kWatchingtime) = 60;
+ data.word(kEndwatchreel) = 197;
+ data.byte(kNewlocation) = 47;
+ return;
+slabfwrong:
+ data.word(kWatchingtime) = 40;
+ data.word(kEndwatchreel) = 189;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+}
+
+void DreamGenContext::useslab() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto slabwith;
+ withwhat();
+ return;
+slabwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'J';
+ ch = 'E';
+ dl = 'W';
+ dh = 'L';
+ compare();
+ if (flags.z())
+ goto nextslab;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+nextslab:
+ al = data.byte(kWithobject);
+ getexad();
+ es.byte(bx+2) = 0;
+ al = data.byte(kCommand);
+ push(ax);
+ removesetobject();
+ ax = pop();
+ _inc(al);
+ push(ax);
+ placesetobject();
+ ax = pop();
+ _cmp(al, 54);
+ if (!flags.z())
+ goto notlastslab;
+ al = 0;
+ turnpathon();
+ data.word(kWatchingtime) = 22;
+ data.word(kReeltowatch) = 35;
+ data.word(kEndwatchreel) = 48;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+notlastslab:
+ _inc(data.byte(kProgresspoints));
+ showfirstuse();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usecart() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto cartwith;
+ withwhat();
+ return;
+cartwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'R';
+ ch = 'O';
+ dl = 'C';
+ dh = 'K';
+ compare();
+ if (flags.z())
+ goto nextcart;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+nextcart:
+ al = data.byte(kWithobject);
+ getexad();
+ es.byte(bx+2) = 0;
+ al = data.byte(kCommand);
+ push(ax);
+ removesetobject();
+ ax = pop();
+ _inc(al);
+ placesetobject();
+ _inc(data.byte(kProgresspoints));
+ al = 17;
+ playchannel1();
+ showfirstuse();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useclearbox() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto clearboxwith;
+ withwhat();
+ return;
+clearboxwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'R';
+ ch = 'A';
+ dl = 'I';
+ dh = 'L';
+ compare();
+ if (flags.z())
+ goto openbox;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+openbox:
+ _inc(data.byte(kProgresspoints));
+ showfirstuse();
+ data.word(kWatchingtime) = 80;
+ data.word(kReeltowatch) = 67;
+ data.word(kEndwatchreel) = 105;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usecoveredbox() {
+ STACK_CHECK;
+ _inc(data.byte(kProgresspoints));
+ showfirstuse();
+ data.word(kWatchingtime) = 50;
+ data.word(kReeltowatch) = 41;
+ data.word(kEndwatchreel) = 66;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::userailing() {
+ STACK_CHECK;
+ showfirstuse();
+ data.word(kWatchingtime) = 80;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 30;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ data.byte(kMandead) = 4;
+}
+
+void DreamGenContext::useopenbox() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto openboxwith;
+ withwhat();
+ return;
+openboxwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'F';
+ compare();
+ if (flags.z())
+ goto destoryopenbox;
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'P';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto openboxwrong;
+ showfirstuse();
+ return;
+destoryopenbox:
+ _inc(data.byte(kProgresspoints));
+ cx = 300;
+ al = 37;
+ showpuztext();
+ al = data.byte(kWithobject);
+ getexad();
+ es.byte(bx+15) = 'E'-'A';
+ data.word(kWatchingtime) = 140;
+ data.word(kReeltowatch) = 105;
+ data.word(kEndwatchreel) = 181;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ al = 4;
+ turnpathon();
+ data.byte(kGetback) = 1;
+ return;
+openboxwrong:
+ cx = 300;
+ al = 38;
+ showpuztext();
+ putbackobstuff();
+}
+
+void DreamGenContext::wearwatch() {
+ STACK_CHECK;
+ _cmp(data.byte(kWatchon), 1);
+ if (flags.z())
+ goto wearingwatch;
+ showfirstuse();
+ data.byte(kWatchon) = 1;
+ data.byte(kGetback) = 1;
+ getanyad();
+ makeworn();
+ return;
+wearingwatch:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::wearshades() {
+ STACK_CHECK;
+ _cmp(data.byte(kShadeson), 1);
+ if (flags.z())
+ goto wearingshades;
+ data.byte(kShadeson) = 1;
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ getanyad();
+ makeworn();
+ return;
+wearingshades:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::sitdowninbar() {
+ STACK_CHECK;
+ _cmp(data.byte(kWatchmode), -1);
+ if (!flags.z())
+ goto satdown;
+ showfirstuse();
+ data.word(kWatchingtime) = 50;
+ data.word(kReeltowatch) = 55;
+ data.word(kEndwatchreel) = 71;
+ data.word(kReeltohold) = 73;
+ data.word(kEndofholdreel) = 83;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ return;
+satdown:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::usechurchhole() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kGetback) = 1;
+ data.word(kWatchingtime) = 28;
+ data.word(kReeltowatch) = 13;
+ data.word(kEndwatchreel) = 26;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+}
+
+void DreamGenContext::usehole() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto holewith;
+ withwhat();
+ return;
+holewith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'H';
+ ch = 'N';
+ dl = 'D';
+ dh = 'A';
+ compare();
+ if (flags.z())
+ goto righthand;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+righthand:
+ showfirstuse();
+ al = 86;
+ removesetobject();
+ al = data.byte(kWithobject);
+ getexad();
+ es.byte(bx+2) = 255;
+ data.byte(kCanmovealtar) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usealtar() {
+ STACK_CHECK;
+ al = 'C';
+ ah = 'N';
+ cl = 'D';
+ ch = 'A';
+ findexobject();
+ _cmp(al, (114));
+ if (flags.z())
+ goto thingsonaltar;
+ al = 'C';
+ ah = 'N';
+ cl = 'D';
+ ch = 'B';
+ findexobject();
+ _cmp(al, (114));
+ if (flags.z())
+ goto thingsonaltar;
+ _cmp(data.byte(kCanmovealtar), 1);
+ if (flags.z())
+ goto movealtar;
+ cx = 300;
+ al = 23;
+ showpuztext();
+ data.byte(kGetback) = 1;
+ return;
+movealtar:
+ _inc(data.byte(kProgresspoints));
+ showseconduse();
+ data.word(kWatchingtime) = 160;
+ data.word(kReeltowatch) = 81;
+ data.word(kEndwatchreel) = 174;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ al = 47;
+ bl = 52;
+ bh = 76;
+ cx = 32;
+ dx = 98;
+ setuptimeduse();
+ data.byte(kGetback) = 1;
+ return;
+thingsonaltar:
+ showfirstuse();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::opentvdoor() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto tvdoorwith;
+ withwhat();
+ return;
+tvdoorwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'U';
+ ch = 'L';
+ dl = 'O';
+ dh = 'K';
+ compare();
+ if (flags.z())
+ goto keyontv;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+keyontv:
+ showfirstuse();
+ data.byte(kLockstatus) = 0;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usedryer() {
+ STACK_CHECK;
+ al = 12;
+ playchannel1();
+ showfirstuse();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::openlouis() {
+ STACK_CHECK;
+ al = 5;
+ ah = 2;
+ cl = 3;
+ ch = 8;
+ entercode();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::nextcolon() {
+ STACK_CHECK;
+lookcolon:
+ al = es.byte(si);
+ _inc(si);
+ _cmp(al, ':');
+ if (!flags.z())
+ goto lookcolon;
+}
+
+void DreamGenContext::openyourneighbour() {
+ STACK_CHECK;
+ al = 255;
+ ah = 255;
+ cl = 255;
+ ch = 255;
+ entercode();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usewindow() {
+ STACK_CHECK;
+ _cmp(data.byte(kManspath), 6);
+ if (!flags.z())
+ goto notonbalc;
+ _inc(data.byte(kProgresspoints));
+ showfirstuse();
+ data.byte(kNewlocation) = 29;
+ data.byte(kGetback) = 1;
+ return;
+notonbalc:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::usebalcony() {
+ STACK_CHECK;
+ showfirstuse();
+ al = 6;
+ turnpathon();
+ al = 0;
+ turnpathoff();
+ al = 1;
+ turnpathoff();
+ al = 2;
+ turnpathoff();
+ al = 3;
+ turnpathoff();
+ al = 4;
+ turnpathoff();
+ al = 5;
+ turnpathoff();
+ _inc(data.byte(kProgresspoints));
+ data.byte(kManspath) = 6;
+ data.byte(kDestination) = 6;
+ data.byte(kFinaldest) = 6;
+ findxyfrompath();
+ switchryanoff();
+ data.byte(kResetmanxy) = 1;
+ data.word(kWatchingtime) = 30*2;
+ data.word(kReeltowatch) = 183;
+ data.word(kEndwatchreel) = 212;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::openryan() {
+ STACK_CHECK;
+ al = 5;
+ ah = 1;
+ cl = 0;
+ ch = 6;
+ entercode();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::openpoolboss() {
+ STACK_CHECK;
+ al = 5;
+ ah = 2;
+ cl = 2;
+ ch = 2;
+ entercode();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::openeden() {
+ STACK_CHECK;
+ al = 2;
+ ah = 8;
+ cl = 6;
+ ch = 5;
+ entercode();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::opensarters() {
+ STACK_CHECK;
+ al = 7;
+ ah = 8;
+ cl = 3;
+ ch = 3;
+ entercode();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::isitright() {
+ STACK_CHECK;
+ bx = data;
+ es = bx;
+ bx = 8573;
+ _cmp(es.byte(bx+0), al);
+ if (!flags.z())
+ return /* (notright) */;
+ _cmp(es.byte(bx+1), ah);
+ if (!flags.z())
+ return /* (notright) */;
+ _cmp(es.byte(bx+2), cl);
+ if (!flags.z())
+ return /* (notright) */;
+ _cmp(es.byte(bx+3), ch);
+}
+
+void DreamGenContext::drawitall() {
+ STACK_CHECK;
+ createpanel();
+ drawfloor();
+ printsprites();
+ showicon();
+}
+
+void DreamGenContext::openhoteldoor() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto hoteldoorwith;
+ withwhat();
+ return;
+hoteldoorwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'K';
+ ch = 'E';
+ dl = 'Y';
+ dh = 'A';
+ compare();
+ if (flags.z())
+ goto keyonhotel1;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+keyonhotel1:
+ al = 16;
+ playchannel1();
+ showfirstuse();
+ data.byte(kLockstatus) = 0;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::openhoteldoor2() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto hoteldoorwith2;
+ withwhat();
+ return;
+hoteldoorwith2:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'K';
+ ch = 'E';
+ dl = 'Y';
+ dh = 'A';
+ compare();
+ if (flags.z())
+ goto keyonhotel2;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+keyonhotel2:
+ al = 16;
+ playchannel1();
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::grafittidoor() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto grafwith;
+ withwhat();
+ return;
+grafwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'A';
+ ch = 'P';
+ dl = 'E';
+ dh = 'N';
+ compare();
+ if (flags.z())
+ goto dograf;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+dograf:
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::trapdoor() {
+ STACK_CHECK;
+ _inc(data.byte(kProgresspoints));
+ showfirstuse();
+ switchryanoff();
+ data.word(kWatchingtime) = 20*2;
+ data.word(kReeltowatch) = 181;
+ data.word(kEndwatchreel) = 197;
+ data.byte(kNewlocation) = 26;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::callhotellift() {
+ STACK_CHECK;
+ al = 12;
+ playchannel1();
+ showfirstuse();
+ data.byte(kCounttoopen) = 8;
+ data.byte(kGetback) = 1;
+ data.byte(kDestination) = 5;
+ data.byte(kFinaldest) = 5;
+ autosetwalk();
+ al = 4;
+ turnpathon();
+}
+
+void DreamGenContext::calledenslift() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kCounttoopen) = 8;
+ data.byte(kGetback) = 1;
+ al = 2;
+ turnpathon();
+}
+
+void DreamGenContext::calledensdlift() {
+ STACK_CHECK;
+ _cmp(data.byte(kLiftflag), 1);
+ if (flags.z())
+ goto edensdhere;
+ showfirstuse();
+ data.byte(kCounttoopen) = 8;
+ data.byte(kGetback) = 1;
+ al = 2;
+ turnpathon();
+ return;
+edensdhere:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::usepoolreader() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto poolwith;
+ withwhat();
+ return;
+poolwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'M';
+ ch = 'E';
+ dl = 'M';
+ dh = 'B';
+ compare();
+ if (flags.z())
+ goto openpool;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+openpool:
+ _cmp(data.byte(kTalkedtoattendant), 1);
+ if (flags.z())
+ goto canopenpool;
+ showseconduse();
+ putbackobstuff();
+ return;
+canopenpool:
+ al = 17;
+ playchannel1();
+ showfirstuse();
+ data.byte(kCounttoopen) = 6;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::uselighter() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gotlighterwith;
+ withwhat();
+ return;
+gotlighterwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'S';
+ ch = 'M';
+ dl = 'K';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto cigarette;
+ showfirstuse();
+ putbackobstuff();
+ return;
+cigarette:
+ cx = 300;
+ al = 9;
+ showpuztext();
+ al = data.byte(kWithobject);
+ getexad();
+ es.byte(bx+2) = 255;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::showseconduse() {
+ STACK_CHECK;
+ getobtextstart();
+ nextcolon();
+ nextcolon();
+ nextcolon();
+ usetext();
+ cx = 400;
+ hangonp();
+}
+
+void DreamGenContext::usecardreader1() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gotreader1with;
+ withwhat();
+ return;
+gotreader1with:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'S';
+ dl = 'H';
+ dh = 'R';
+ compare();
+ if (flags.z())
+ goto correctcard;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+correctcard:
+ _cmp(data.byte(kTalkedtosparky), 0);
+ if (flags.z())
+ goto notyet;
+ _cmp(data.word(kCard1money), 0);
+ if (flags.z())
+ goto getscash;
+ cx = 300;
+ al = 17;
+ showpuztext();
+ putbackobstuff();
+ return;
+getscash:
+ al = 16;
+ playchannel1();
+ cx = 300;
+ al = 18;
+ showpuztext();
+ _inc(data.byte(kProgresspoints));
+ data.word(kCard1money) = 12432;
+ data.byte(kGetback) = 1;
+ return;
+notyet:
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::usecardreader2() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gotreader2with;
+ withwhat();
+ return;
+gotreader2with:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'S';
+ dl = 'H';
+ dh = 'R';
+ compare();
+ if (flags.z())
+ goto correctcard2;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+correctcard2:
+ _cmp(data.byte(kTalkedtoboss), 0);
+ if (flags.z())
+ goto notyetboss;
+ _cmp(data.word(kCard1money), 0);
+ if (flags.z())
+ goto nocash;
+ _cmp(data.byte(kGunpassflag), 2);
+ if (flags.z())
+ goto alreadygotnew;
+ al = 18;
+ playchannel1();
+ cx = 300;
+ al = 19;
+ showpuztext();
+ al = 94;
+ placesetobject();
+ data.byte(kGunpassflag) = 1;
+ _sub(data.word(kCard1money), 2000);
+ _inc(data.byte(kProgresspoints));
+ data.byte(kGetback) = 1;
+ return;
+nocash:
+ cx = 300;
+ al = 20;
+ showpuztext();
+ putbackobstuff();
+ return;
+alreadygotnew:
+ cx = 300;
+ al = 22;
+ showpuztext();
+ putbackobstuff();
+ return;
+notyetboss:
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::usecardreader3() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gotreader3with;
+ withwhat();
+ return;
+gotreader3with:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'S';
+ dl = 'H';
+ dh = 'R';
+ compare();
+ if (flags.z())
+ goto rightcard;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+rightcard:
+ _cmp(data.byte(kTalkedtorecep), 0);
+ if (flags.z())
+ goto notyetrecep;
+ _cmp(data.byte(kCardpassflag), 0);
+ if (!flags.z())
+ goto alreadyusedit;
+ al = 16;
+ playchannel1();
+ cx = 300;
+ al = 25;
+ showpuztext();
+ _inc(data.byte(kProgresspoints));
+ _sub(data.word(kCard1money), 8300);
+ data.byte(kCardpassflag) = 1;
+ data.byte(kGetback) = 1;
+ return;
+alreadyusedit:
+ cx = 300;
+ al = 26;
+ showpuztext();
+ putbackobstuff();
+ return;
+notyetrecep:
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::usecashcard() {
+ STACK_CHECK;
+ getridofreels();
+ loadkeypad();
+ createpanel();
+ showpanel();
+ showexit();
+ showman();
+ di = 114;
+ bx = 120;
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ bx = 120-3;
+_tmp1:
+ ds = data.word(kTempgraphics);
+ al = 39;
+ ah = 0;
+ showframe();
+ ax = data.word(kCard1money);
+ moneypoke();
+ getobtextstart();
+ nextcolon();
+ nextcolon();
+ di = 36;
+ bx = 98;
+ dl = 241;
+ al = 0;
+ ah = 0;
+ printdirect();
+ di = 160;
+ bx = 155;
+ es = cs;
+ si = 3474;
+ data.word(kCharshift) = 91*2+75;
+ al = 0;
+ ah = 0;
+ dl = 240;
+ printdirect();
+ di = 187;
+ bx = 155;
+ es = cs;
+ si = 3479;
+ data.word(kCharshift) = 91*2+85;
+ al = 0;
+ ah = 0;
+ dl = 240;
+ printdirect();
+ data.word(kCharshift) = 0;
+ worktoscreenm();
+ cx = 400;
+ hangonp();
+ getridoftemp();
+ restorereels();
+ putbackobstuff();
+}
+
+void DreamGenContext::lookatcard() {
+ STACK_CHECK;
+ data.byte(kManisoffscreen) = 1;
+ getridofreels();
+ loadkeypad();
+ createpanel2();
+ di = 160;
+ bx = 80;
+ ds = data.word(kTempgraphics);
+ al = 42;
+ ah = 128;
+ showframe();
+ getobtextstart();
+ findnextcolon();
+ findnextcolon();
+ findnextcolon();
+ di = 36;
+ bx = 124;
+ dl = 241;
+ al = 0;
+ ah = 0;
+ printdirect();
+ push(es);
+ push(si);
+ worktoscreenm();
+ cx = 280;
+ hangonw();
+ createpanel2();
+ di = 160;
+ bx = 80;
+ ds = data.word(kTempgraphics);
+ al = 42;
+ ah = 128;
+ showframe();
+ si = pop();
+ es = pop();
+ di = 36;
+ bx = 130;
+ dl = 241;
+ al = 0;
+ ah = 0;
+ printdirect();
+ worktoscreenm();
+ cx = 200;
+ hangonw();
+ data.byte(kManisoffscreen) = 0;
+ getridoftemp();
+ restorereels();
+ putbackobstuff();
+}
+
+void DreamGenContext::moneypoke() {
+ STACK_CHECK;
+ bx = 3474;
+ cl = 48-1;
+numberpoke0:
+ _inc(cl);
+ _sub(ax, 10000);
+ if (!flags.c())
+ goto numberpoke0;
+ _add(ax, 10000);
+ cs.byte(bx) = cl;
+ _inc(bx);
+ cl = 48-1;
+numberpoke1:
+ _inc(cl);
+ _sub(ax, 1000);
+ if (!flags.c())
+ goto numberpoke1;
+ _add(ax, 1000);
+ cs.byte(bx) = cl;
+ _inc(bx);
+ cl = 48-1;
+numberpoke2:
+ _inc(cl);
+ _sub(ax, 100);
+ if (!flags.c())
+ goto numberpoke2;
+ _add(ax, 100);
+ cs.byte(bx) = cl;
+ _inc(bx);
+ cl = 48-1;
+numberpoke3:
+ _inc(cl);
+ _sub(ax, 10);
+ if (!flags.c())
+ goto numberpoke3;
+ _add(ax, 10);
+ cs.byte(bx) = cl;
+ bx = 3479;
+ _add(al, 48);
+ cs.byte(bx) = al;
+}
+
+void DreamGenContext::usecontrol() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gotcontrolwith;
+ withwhat();
+ return;
+gotcontrolwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'K';
+ ch = 'E';
+ dl = 'Y';
+ dh = 'A';
+ compare();
+ if (flags.z())
+ goto rightkey;
+ _cmp(data.byte(kReallocation), 21);
+ if (!flags.z())
+ goto balls;
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'K';
+ ch = 'N';
+ dl = 'F';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto jimmycontrols;
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'A';
+ ch = 'X';
+ dl = 'E';
+ dh = 'D';
+ compare();
+ if (flags.z())
+ goto axeoncontrols;
+balls:
+ showfirstuse();
+ putbackobstuff();
+ return;
+rightkey:
+ al = 16;
+ playchannel1();
+ _cmp(data.byte(kLocation), 21);
+ if (flags.z())
+ goto goingdown;
+ cx = 300;
+ al = 0;
+ showpuztext();
+ data.byte(kNewlocation) = 21;
+ data.byte(kCounttoclose) = 8;
+ data.byte(kCounttoopen) = 0;
+ data.word(kWatchingtime) = 80;
+ data.byte(kGetback) = 1;
+ return;
+goingdown:
+ cx = 300;
+ al = 3;
+ showpuztext();
+ data.byte(kNewlocation) = 30;
+ data.byte(kCounttoclose) = 8;
+ data.byte(kCounttoopen) = 0;
+ data.word(kWatchingtime) = 80;
+ data.byte(kGetback) = 1;
+ return;
+jimmycontrols:
+ al = 50;
+ placesetobject();
+ al = 51;
+ placesetobject();
+ al = 26;
+ placesetobject();
+ al = 30;
+ placesetobject();
+ al = 16;
+ removesetobject();
+ al = 17;
+ removesetobject();
+ al = 14;
+ playchannel1();
+ cx = 300;
+ al = 10;
+ showpuztext();
+ _inc(data.byte(kProgresspoints));
+ data.byte(kGetback) = 1;
+ return;
+axeoncontrols:
+ cx = 300;
+ al = 16;
+ showpuztext();
+ _inc(data.byte(kProgresspoints));
+ putbackobstuff();
+}
+
+void DreamGenContext::usehatch() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kNewlocation) = 40;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usewire() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gotwirewith;
+ withwhat();
+ return;
+gotwirewith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'K';
+ ch = 'N';
+ dl = 'F';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto wireknife;
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'A';
+ ch = 'X';
+ dl = 'E';
+ dh = 'D';
+ compare();
+ if (flags.z())
+ goto wireaxe;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+wireaxe:
+ cx = 300;
+ al = 16;
+ showpuztext();
+ putbackobstuff();
+ return;
+wireknife:
+ al = 51;
+ removesetobject();
+ al = 52;
+ placesetobject();
+ cx = 300;
+ al = 11;
+ showpuztext();
+ _inc(data.byte(kProgresspoints));
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usehandle() {
+ STACK_CHECK;
+ al = 'C';
+ ah = 'U';
+ cl = 'T';
+ ch = 'W';
+ findsetobject();
+ al = es.byte(bx+58);
+ _cmp(al, 255);
+ if (!flags.z())
+ goto havecutwire;
+ cx = 300;
+ al = 12;
+ showpuztext();
+ data.byte(kGetback) = 1;
+ return;
+havecutwire:
+ cx = 300;
+ al = 13;
+ showpuztext();
+ data.byte(kNewlocation) = 22;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useelevator1() {
+ STACK_CHECK;
+ showfirstuse();
+ selectlocation();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::showfirstuse() {
+ STACK_CHECK;
+ getobtextstart();
+ findnextcolon();
+ findnextcolon();
+ usetext();
+ cx = 400;
+ hangonp();
+}
+
+void DreamGenContext::useelevator3() {
+ STACK_CHECK;
+ showfirstuse();
+ data.byte(kCounttoclose) = 20;
+ data.byte(kNewlocation) = 34;
+ data.word(kReeltowatch) = 46;
+ data.word(kEndwatchreel) = 63;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.word(kWatchingtime) = 80;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useelevator4() {
+ STACK_CHECK;
+ showfirstuse();
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 11;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kCounttoclose) = 20;
+ data.word(kWatchingtime) = 80;
+ data.byte(kGetback) = 1;
+ data.byte(kNewlocation) = 24;
+}
+
+void DreamGenContext::useelevator2() {
+ STACK_CHECK;
+ _cmp(data.byte(kLocation), 23);
+ if (flags.z())
+ goto inpoolhall;
+ showfirstuse();
+ data.byte(kNewlocation) = 23;
+ data.byte(kCounttoclose) = 20;
+ data.byte(kCounttoopen) = 0;
+ data.word(kWatchingtime) = 80;
+ data.byte(kGetback) = 1;
+ return;
+inpoolhall:
+ showfirstuse();
+ data.byte(kNewlocation) = 31;
+ data.byte(kCounttoclose) = 20;
+ data.byte(kCounttoopen) = 0;
+ data.word(kWatchingtime) = 80;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useelevator5() {
+ STACK_CHECK;
+ al = 4;
+ placesetobject();
+ al = 0;
+ removesetobject();
+ data.byte(kNewlocation) = 20;
+ data.word(kWatchingtime) = 80;
+ data.byte(kLiftflag) = 1;
+ data.byte(kCounttoclose) = 8;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usekey() {
+ STACK_CHECK;
+ _cmp(data.byte(kLocation), 5);
+ if (flags.z())
+ goto usekey1;
+ _cmp(data.byte(kLocation), 30);
+ if (flags.z())
+ goto usekey1;
+ _cmp(data.byte(kLocation), 21);
+ if (flags.z())
+ goto usekey2;
+ cx = 200;
+ al = 1;
+ showpuztext();
+ putbackobstuff();
+ return;
+usekey1:
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ goto wrongroom1;
+ _cmp(data.byte(kMapy), 10);
+ if (!flags.z())
+ goto wrongroom1;
+ cx = 300;
+ al = 0;
+ showpuztext();
+ data.byte(kCounttoclose) = 100;
+ data.byte(kGetback) = 1;
+ return;
+usekey2:
+ _cmp(data.byte(kMapx), 11);
+ if (!flags.z())
+ goto wrongroom1;
+ _cmp(data.byte(kMapy), 10);
+ if (!flags.z())
+ goto wrongroom1;
+ cx = 300;
+ al = 3;
+ showpuztext();
+ data.byte(kNewlocation) = 30;
+ al = 2;
+ fadescreendown();
+ showfirstuse();
+ putbackobstuff();
+ return;
+wrongroom1:
+ cx = 200;
+ al = 2;
+ showpuztext();
+ putbackobstuff();
+}
+
+void DreamGenContext::usestereo() {
+ STACK_CHECK;
+ _cmp(data.byte(kLocation), 0);
+ if (flags.z())
+ goto stereook;
+ cx = 400;
+ al = 4;
+ showpuztext();
+ putbackobstuff();
+ return;
+stereook:
+ _cmp(data.byte(kMapx), 11);
+ if (!flags.z())
+ goto stereonotok;
+ _cmp(data.byte(kMapy), 0);
+ if (flags.z())
+ goto stereook2;
+stereonotok:
+ cx = 400;
+ al = 5;
+ showpuztext();
+ putbackobstuff();
+ return;
+stereook2:
+ al = 'C';
+ ah = 'D';
+ cl = 'P';
+ ch = 'L';
+ findsetobject();
+ ah = 1;
+ checkinside();
+ _cmp(cl, (114));
+ if (!flags.z())
+ goto cdinside;
+ al = 6;
+ cx = 400;
+ showpuztext();
+ putbackobstuff();
+ getanyad();
+ al = 255;
+ es.byte(bx+10) = al;
+ return;
+cdinside:
+ getanyad();
+ al = es.byte(bx+10);
+ _xor(al, 1);
+ es.byte(bx+10) = al;
+ _cmp(al, 255);
+ if (flags.z())
+ goto stereoon;
+ al = 7;
+ cx = 400;
+ showpuztext();
+ putbackobstuff();
+ return;
+stereoon:
+ al = 8;
+ cx = 400;
+ showpuztext();
+ putbackobstuff();
+}
+
+void DreamGenContext::usecooker() {
+ STACK_CHECK;
+ al = data.byte(kCommand);
+ ah = data.byte(kObjecttype);
+ checkinside();
+ _cmp(cl, (114));
+ if (!flags.z())
+ goto foodinside;
+ showfirstuse();
+ putbackobstuff();
+ return;
+foodinside:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::useaxe() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 22);
+ if (!flags.z())
+ goto notinpool;
+ _cmp(data.byte(kMapy), 10);
+ if (flags.z())
+ goto axeondoor;
+ showseconduse();
+ _inc(data.byte(kProgresspoints));
+ data.byte(kLastweapon) = 2;
+ data.byte(kGetback) = 1;
+ removeobfrominv();
+ return;
+notinpool:
+ showfirstuse();
+ return;
+/*continuing to unbounded code: axeondoor from useelvdoor:19-30*/
+axeondoor:
+ al = 15;
+ cx = 300;
+ showpuztext();
+ _inc(data.byte(kProgresspoints));
+ data.word(kWatchingtime) = 46*2;
+ data.word(kReeltowatch) = 31;
+ data.word(kEndwatchreel) = 77;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::useelvdoor() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gotdoorwith;
+ withwhat();
+ return;
+gotdoorwith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'A';
+ ch = 'X';
+ dl = 'E';
+ dh = 'D';
+ compare();
+ if (flags.z())
+ goto axeondoor;
+ al = 14;
+ cx = 300;
+ showpuztext();
+ putbackobstuff();
+ return;
+axeondoor:
+ al = 15;
+ cx = 300;
+ showpuztext();
+ _inc(data.byte(kProgresspoints));
+ data.word(kWatchingtime) = 46*2;
+ data.word(kReeltowatch) = 31;
+ data.word(kEndwatchreel) = 77;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::withwhat() {
+ STACK_CHECK;
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ al = data.byte(kCommand);
+ ah = data.byte(kObjecttype);
+ es = cs;
+ di = 5847;
+ copyname();
+ di = 100;
+ bx = 21;
+ dl = 200;
+ al = 63;
+ ah = 2;
+ printmessage2();
+ di = data.word(kLastxpos);
+ _add(di, 5);
+ bx = 21;
+ es = cs;
+ si = 5847;
+ dl = 220;
+ al = 0;
+ ah = 0;
+ printdirect();
+ di = data.word(kLastxpos);
+ _add(di, 5);
+ bx = 21;
+ dl = 200;
+ al = 63;
+ ah = 3;
+ printmessage2();
+ fillryan();
+ data.byte(kCommandtype) = 255;
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+ data.byte(kInvopen) = 2;
+}
+
+void DreamGenContext::selectob() {
+ STACK_CHECK;
+ findinvpos();
+ ax = es.word(bx);
+ _cmp(al, 255);
+ if (!flags.z())
+ goto canselectob;
+ blank();
+ return;
+canselectob:
+ data.byte(kWithobject) = al;
+ data.byte(kWithtype) = ah;
+ _cmp(ax, data.word(kOldsubject));
+ if (!flags.z())
+ goto diffsub3;
+ _cmp(data.byte(kCommandtype), 221);
+ if (flags.z())
+ goto alreadyselob;
+ data.byte(kCommandtype) = 221;
+diffsub3:
+ data.word(kOldsubject) = ax;
+ bx = ax;
+ al = 0;
+ commandwithob();
+alreadyselob:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notselob) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doselob;
+ return;
+doselob:
+ delpointer();
+ data.byte(kInvopen) = 0;
+ useroutine();
+}
+
+void DreamGenContext::compare() {
+ STACK_CHECK;
+ _sub(dl, 'A');
+ _sub(dh, 'A');
+ _sub(cl, 'A');
+ _sub(ch, 'A');
+ push(cx);
+ push(dx);
+ getanyaddir();
+ dx = pop();
+ cx = pop();
+ _cmp(es.word(bx+12), cx);
+ if (!flags.z())
+ return /* (comparefin) */;
+ _cmp(es.word(bx+14), dx);
+}
+
+void DreamGenContext::findsetobject() {
+ STACK_CHECK;
+ _sub(al, 'A');
+ _sub(ah, 'A');
+ _sub(cl, 'A');
+ _sub(ch, 'A');
+ es = data.word(kSetdat);
+ bx = 0;
+ dl = 0;
+findsetloop:
+ _cmp(al, es.byte(bx+12));
+ if (!flags.z())
+ goto nofind;
+ _cmp(ah, es.byte(bx+13));
+ if (!flags.z())
+ goto nofind;
+ _cmp(cl, es.byte(bx+14));
+ if (!flags.z())
+ goto nofind;
+ _cmp(ch, es.byte(bx+15));
+ if (!flags.z())
+ goto nofind;
+ al = dl;
+ return;
+nofind:
+ _add(bx, 64);
+ _inc(dl);
+ _cmp(dl, 128);
+ if (!flags.z())
+ goto findsetloop;
+ al = dl;
+}
+
+void DreamGenContext::findexobject() {
+ STACK_CHECK;
+ _sub(al, 'A');
+ _sub(ah, 'A');
+ _sub(cl, 'A');
+ _sub(ch, 'A');
+ es = data.word(kExtras);
+ bx = (0+2080+30000);
+ dl = 0;
+findexloop:
+ _cmp(al, es.byte(bx+12));
+ if (!flags.z())
+ goto nofindex;
+ _cmp(ah, es.byte(bx+13));
+ if (!flags.z())
+ goto nofindex;
+ _cmp(cl, es.byte(bx+14));
+ if (!flags.z())
+ goto nofindex;
+ _cmp(ch, es.byte(bx+15));
+ if (!flags.z())
+ goto nofindex;
+ al = dl;
+ return;
+nofindex:
+ _add(bx, 16);
+ _inc(dl);
+ _cmp(dl, (114));
+ if (!flags.z())
+ goto findexloop;
+ al = dl;
+}
+
+void DreamGenContext::isryanholding() {
+ STACK_CHECK;
+ _sub(al, 'A');
+ _sub(ah, 'A');
+ _sub(cl, 'A');
+ _sub(ch, 'A');
+ es = data.word(kExtras);
+ bx = (0+2080+30000);
+ dl = 0;
+searchinv:
+ _cmp(es.byte(bx+2), 4);
+ if (!flags.z())
+ goto nofindininv;
+ _cmp(al, es.byte(bx+12));
+ if (!flags.z())
+ goto nofindininv;
+ _cmp(ah, es.byte(bx+13));
+ if (!flags.z())
+ goto nofindininv;
+ _cmp(cl, es.byte(bx+14));
+ if (!flags.z())
+ goto nofindininv;
+ _cmp(ch, es.byte(bx+15));
+ if (!flags.z())
+ goto nofindininv;
+ al = dl;
+ _cmp(al, (114));
+ return;
+nofindininv:
+ _add(bx, 16);
+ _inc(dl);
+ _cmp(dl, (114));
+ if (!flags.z())
+ goto searchinv;
+ al = dl;
+ _cmp(al, (114));
+}
+
+void DreamGenContext::checkinside() {
+ STACK_CHECK;
+ es = data.word(kExtras);
+ bx = (0+2080+30000);
+ cl = 0;
+insideloop:
+ _cmp(al, es.byte(bx+3));
+ if (!flags.z())
+ goto notfoundinside;
+ _cmp(ah, es.byte(bx+2));
+ if (!flags.z())
+ goto notfoundinside;
+ return;
+notfoundinside:
+ _add(bx, 16);
+ _inc(cl);
+ _cmp(cl, (114));
+ if (!flags.z())
+ goto insideloop;
+}
+
+void DreamGenContext::usetext() {
+ STACK_CHECK;
+ push(es);
+ push(si);
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ obicons();
+ si = pop();
+ es = pop();
+ di = 36;
+ bx = 104;
+ dl = 241;
+ al = 0;
+ ah = 0;
+ printdirect();
+ worktoscreenm();
+}
+
+void DreamGenContext::putbackobstuff() {
+ STACK_CHECK;
+ createpanel();
+ showpanel();
+ showman();
+ obicons();
+ showexit();
+ obpicture();
+ describeob();
+ undertextline();
+ data.byte(kCommandtype) = 255;
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::showpuztext() {
+ STACK_CHECK;
+ push(cx);
+ findpuztext();
+ push(es);
+ push(si);
+ createpanel();
+ showpanel();
+ showman();
+ showexit();
+ obicons();
+ si = pop();
+ es = pop();
+ di = 36;
+ bx = 104;
+ dl = 241;
+ ah = 0;
+ printdirect();
+ worktoscreenm();
+ cx = pop();
+ hangonp();
+}
+
+void DreamGenContext::findpuztext() {
+ STACK_CHECK;
+ ah = 0;
+ si = ax;
+ _add(si, si);
+ es = data.word(kPuzzletext);
+ ax = es.word(si);
+ _add(ax, (66*2));
+ si = ax;
+}
+
+void DreamGenContext::placesetobject() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ cl = 0;
+ ch = 0;
+ findormake();
+ getsetad();
+ es.byte(bx+58) = 0;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::removesetobject() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ cl = 255;
+ ch = 0;
+ findormake();
+ getsetad();
+ es.byte(bx+58) = 255;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::issetobonmap() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ getsetad();
+ al = es.byte(bx+58);
+ bx = pop();
+ es = pop();
+ _cmp(al, 0);
+}
+
+void DreamGenContext::placefreeobject() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ cl = 0;
+ ch = 1;
+ findormake();
+ getfreead();
+ es.byte(bx+2) = 0;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::removefreeobject() {
+ STACK_CHECK;
+ push(es);
+ push(bx);
+ getfreead();
+ es.byte(bx+2) = 255;
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::findormake() {
+ STACK_CHECK;
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ push(ax);
+ es = data.word(kBuffers);
+ ah = data.byte(kReallocation);
+changeloop:
+ _cmp(es.byte(bx), 255);
+ if (flags.z())
+ goto haventfound;
+ _cmp(ax, es.word(bx));
+ if (!flags.z())
+ goto nofoundchange;
+ _cmp(ch, es.byte(bx+3));
+ if (flags.z())
+ goto foundchange;
+nofoundchange:
+ _add(bx, 4);
+ goto changeloop;
+foundchange:
+ ax = pop();
+ es.byte(bx+2) = cl;
+ return;
+haventfound:
+ es.word(bx) = ax;
+ es.word(bx+2) = cx;
+ ax = pop();
+}
+
+void DreamGenContext::switchryanon() {
+ STACK_CHECK;
+ data.byte(kRyanon) = 255;
+}
+
+void DreamGenContext::switchryanoff() {
+ STACK_CHECK;
+ data.byte(kRyanon) = 1;
+}
+
+void DreamGenContext::setallchanges() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+setallloop:
+ ax = es.word(bx);
+ _cmp(al, 255);
+ if (flags.z())
+ return /* (endsetloop) */;
+ cx = es.word(bx+2);
+ _add(bx, 4);
+ _cmp(ah, data.byte(kReallocation));
+ if (!flags.z())
+ goto setallloop;
+ push(es);
+ push(bx);
+ dochange();
+ bx = pop();
+ es = pop();
+ goto setallloop;
+}
+
+void DreamGenContext::dochange() {
+ STACK_CHECK;
+ _cmp(ch, 0);
+ if (flags.z())
+ goto object;
+ _cmp(ch, 1);
+ if (flags.z())
+ goto freeobject;
+ push(cx);
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ push(ax);
+ al = ch;
+ _sub(al, 100);
+ ah = 0;
+ cx = 144;
+ _mul(cx);
+ bx = pop();
+ _add(bx, ax);
+ _add(bx, (0));
+ es = data.word(kReels);
+ cx = pop();
+ es.byte(bx+6) = cl;
+ return;
+object:
+ push(cx);
+ getsetad();
+ cx = pop();
+ es.byte(bx+58) = cl;
+ return;
+freeobject:
+ push(cx);
+ getfreead();
+ cx = pop();
+ _cmp(es.byte(bx+2), 255);
+ if (!flags.z())
+ return /* (beenpickedup) */;
+ es.byte(bx+2) = cl;
+}
+
+void DreamGenContext::autoappear() {
+ STACK_CHECK;
+ _cmp(data.byte(kLocation), 32);
+ if (!flags.z())
+ goto notinalley;
+ al = 5;
+ resetlocation();
+ al = 10;
+ setlocation();
+ data.byte(kDestpos) = 10;
+ return;
+notinalley:
+ _cmp(data.byte(kReallocation), 24);
+ if (!flags.z())
+ goto notinedens;
+ _cmp(data.byte(kGeneraldead), 1);
+ if (!flags.z())
+ goto edenspart2;
+ _inc(data.byte(kGeneraldead));
+ al = 44;
+ placesetobject();
+ al = 18;
+ placesetobject();
+ al = 93;
+ placesetobject();
+ al = 92;
+ removesetobject();
+ al = 55;
+ removesetobject();
+ al = 75;
+ removesetobject();
+ al = 84;
+ removesetobject();
+ al = 85;
+ removesetobject();
+ return;
+edenspart2:
+ _cmp(data.byte(kSartaindead), 1);
+ if (!flags.z())
+ return /* (notedens2) */;
+ al = 44;
+ removesetobject();
+ al = 93;
+ removesetobject();
+ al = 55;
+ placesetobject();
+ _inc(data.byte(kSartaindead));
+ return;
+notinedens:
+ _cmp(data.byte(kReallocation), 25);
+ if (!flags.z())
+ goto notonsartroof;
+ data.byte(kNewsitem) = 3;
+ al = 6;
+ resetlocation();
+ al = 11;
+ setlocation();
+ data.byte(kDestpos) = 11;
+ return;
+notonsartroof:
+ _cmp(data.byte(kReallocation), 2);
+ if (!flags.z())
+ return /* (notinlouiss) */;
+ _cmp(data.byte(kRockstardead), 0);
+ if (flags.z())
+ return /* (notinlouiss) */;
+ al = 23;
+ placesetobject();
+}
+
+void DreamGenContext::getundertimed() {
+ STACK_CHECK;
+ al = data.byte(kTimedy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(al, 3);
+_tmp1:
+ ah = 0;
+ bx = ax;
+ al = data.byte(kTimedx);
+ ah = 0;
+ di = ax;
+ ch = (30);
+ cl = 240;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
+ multiget();
+}
+
+void DreamGenContext::putundertimed() {
+ STACK_CHECK;
+ al = data.byte(kTimedy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(al, 3);
+_tmp1:
+ ah = 0;
+ bx = ax;
+ al = data.byte(kTimedx);
+ ah = 0;
+ di = ax;
+ ch = (30);
+ cl = 240;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
+ multiput();
+}
+
+void DreamGenContext::dumptimedtext() {
+ STACK_CHECK;
+ _cmp(data.byte(kNeedtodumptimed), 1);
+ if (!flags.z())
+ return /* (nodumptimed) */;
+ al = data.byte(kTimedy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(al, 3);
+_tmp1:
+ ah = 0;
+ bx = ax;
+ al = data.byte(kTimedx);
+ ah = 0;
+ di = ax;
+ cl = 240;
+ ch = (30);
+ multidump();
+ data.byte(kNeedtodumptimed) = 0;
+}
+
+void DreamGenContext::setuptimeduse() {
+ STACK_CHECK;
+ _cmp(data.word(kTimecount), 0);
+ if (!flags.z())
+ return /* (cantsetup) */;
+ data.byte(kTimedy) = bh;
+ data.byte(kTimedx) = bl;
+ data.word(kCounttotimed) = cx;
+ _add(dx, cx);
+ data.word(kTimecount) = dx;
+ bl = al;
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kPuzzletext);
+ cx = (66*2);
+ ax = es.word(bx);
+ _add(ax, cx);
+ bx = ax;
+ data.word(kTimedseg) = es;
+ data.word(kTimedoffset) = bx;
+}
+
+void DreamGenContext::setuptimedtemp() {
+ STACK_CHECK;
+ _cmp(ah, 0);
+ if (flags.z())
+ goto notloadspeech3;
+ push(ax);
+ push(bx);
+ push(cx);
+ push(dx);
+ dl = 'T';
+ dh = ah;
+ cl = 'T';
+ ah = 0;
+ loadspeech();
+ _cmp(data.byte(kSpeechloaded), 1);
+ if (!flags.z())
+ goto _tmp1;
+ al = 50+12;
+ playchannel1();
+_tmp1:
+ dx = pop();
+ cx = pop();
+ bx = pop();
+ ax = pop();
+ _cmp(data.byte(kSpeechloaded), 1);
+ if (!flags.z())
+ goto notloadspeech3;
+ _cmp(data.byte(kSubtitles), 1);
+ if (flags.z())
+ goto notloadspeech3;
+ return;
+notloadspeech3:
+ _cmp(data.word(kTimecount), 0);
+ if (!flags.z())
+ return /* (cantsetup2) */;
+ data.byte(kTimedy) = bh;
+ data.byte(kTimedx) = bl;
+ data.word(kCounttotimed) = cx;
+ _add(dx, cx);
+ data.word(kTimecount) = dx;
+ bl = al;
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kTextfile1);
+ cx = (66*2);
+ ax = es.word(bx);
+ _add(ax, cx);
+ bx = ax;
+ data.word(kTimedseg) = es;
+ data.word(kTimedoffset) = bx;
+}
+
+void DreamGenContext::usetimedtext() {
+ STACK_CHECK;
+ _cmp(data.word(kTimecount), 0);
+ if (flags.z())
+ return /* (notext) */;
+ _dec(data.word(kTimecount));
+ _cmp(data.word(kTimecount), 0);
+ if (flags.z())
+ goto deltimedtext;
+ ax = data.word(kTimecount);
+ _cmp(ax, data.word(kCounttotimed));
+ if (flags.z())
+ goto firsttimed;
+ if (!flags.c())
+ return /* (notext) */;
+ goto notfirsttimed;
+firsttimed:
+ getundertimed();
+notfirsttimed:
+ bl = data.byte(kTimedy);
+ bh = 0;
+ al = data.byte(kTimedx);
+ ah = 0;
+ di = ax;
+ es = data.word(kTimedseg);
+ si = data.word(kTimedoffset);
+ dl = 237;
+ ah = 0;
+ printdirect();
+ data.byte(kNeedtodumptimed) = 1;
+ return;
+deltimedtext:
+ putundertimed();
+ data.byte(kNeedtodumptimed) = 1;
+}
+
+void DreamGenContext::edenscdplayer() {
+ STACK_CHECK;
+ showfirstuse();
+ data.word(kWatchingtime) = 18*2;
+ data.word(kReeltowatch) = 25;
+ data.word(kEndwatchreel) = 42;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::usewall() {
+ STACK_CHECK;
+ showfirstuse();
+ _cmp(data.byte(kManspath), 3);
+ if (flags.z())
+ goto gobackover;
+ data.word(kWatchingtime) = 30*2;
+ data.word(kReeltowatch) = 2;
+ data.word(kEndwatchreel) = 31;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ al = 3;
+ turnpathon();
+ al = 4;
+ turnpathon();
+ al = 0;
+ turnpathoff();
+ al = 1;
+ turnpathoff();
+ al = 2;
+ turnpathoff();
+ al = 5;
+ turnpathoff();
+ data.byte(kManspath) = 3;
+ data.byte(kFinaldest) = 3;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ switchryanoff();
+ return;
+gobackover:
+ data.word(kWatchingtime) = 30*2;
+ data.word(kReeltowatch) = 34;
+ data.word(kEndwatchreel) = 60;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ al = 3;
+ turnpathoff();
+ al = 4;
+ turnpathoff();
+ al = 0;
+ turnpathon();
+ al = 1;
+ turnpathon();
+ al = 2;
+ turnpathon();
+ al = 5;
+ turnpathon();
+ data.byte(kManspath) = 5;
+ data.byte(kFinaldest) = 5;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ switchryanoff();
+}
+
+void DreamGenContext::usechurchgate() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto gatewith;
+ withwhat();
+ return;
+gatewith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'C';
+ ch = 'U';
+ dl = 'T';
+ dh = 'T';
+ compare();
+ if (flags.z())
+ goto cutgate;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+cutgate:
+ showfirstuse();
+ data.word(kWatchingtime) = 64*2;
+ data.word(kReeltowatch) = 4;
+ data.word(kEndwatchreel) = 70;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ _inc(data.byte(kProgresspoints));
+ al = 3;
+ turnpathon();
+ _cmp(data.byte(kAidedead), 0);
+ if (flags.z())
+ return /* (notopenchurch) */;
+ al = 2;
+ turnpathon();
+}
+
+void DreamGenContext::usegun() {
+ STACK_CHECK;
+ _cmp(data.byte(kObjecttype), 4);
+ if (flags.z())
+ goto istakengun;
+ showseconduse();
+ putbackobstuff();
+ return;
+istakengun:
+ _cmp(data.byte(kReallocation), 22);
+ if (!flags.z())
+ goto notinpoolroom;
+ cx = 300;
+ al = 34;
+ showpuztext();
+ data.byte(kLastweapon) = 1;
+ data.byte(kCombatcount) = 39;
+ data.byte(kGetback) = 1;
+ _inc(data.byte(kProgresspoints));
+ return;
+notinpoolroom:
+ _cmp(data.byte(kReallocation), 25);
+ if (!flags.z())
+ goto nothelicopter;
+ cx = 300;
+ al = 34;
+ showpuztext();
+ data.byte(kLastweapon) = 1;
+ data.byte(kCombatcount) = 19;
+ data.byte(kGetback) = 1;
+ data.byte(kDreamnumber) = 2;
+ data.byte(kRoomafterdream) = 38;
+ data.byte(kSartaindead) = 1;
+ _inc(data.byte(kProgresspoints));
+ return;
+nothelicopter:
+ _cmp(data.byte(kReallocation), 27);
+ if (!flags.z())
+ goto notinrockroom;
+ cx = 300;
+ al = 46;
+ showpuztext();
+ data.byte(kPointermode) = 2;
+ data.byte(kRockstardead) = 1;
+ data.byte(kLastweapon) = 1;
+ data.byte(kNewsitem) = 1;
+ data.byte(kGetback) = 1;
+ data.byte(kRoomafterdream) = 32;
+ data.byte(kDreamnumber) = 0;
+ _inc(data.byte(kProgresspoints));
+ return;
+notinrockroom:
+ _cmp(data.byte(kReallocation), 8);
+ if (!flags.z())
+ goto notbystudio;
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ goto notbystudio;
+ _cmp(data.byte(kMapy), 40);
+ if (!flags.z())
+ goto notbystudio;
+ al = 92;
+ issetobonmap();
+ if (flags.z())
+ goto notbystudio;
+ _cmp(data.byte(kManspath), 9);
+ if (flags.z())
+ goto notbystudio;
+ data.byte(kDestination) = 9;
+ data.byte(kFinaldest) = 9;
+ autosetwalk();
+ data.byte(kLastweapon) = 1;
+ data.byte(kGetback) = 1;
+ _inc(data.byte(kProgresspoints));
+ return;
+notbystudio:
+ _cmp(data.byte(kReallocation), 6);
+ if (!flags.z())
+ goto notsarters;
+ _cmp(data.byte(kMapx), 11);
+ if (!flags.z())
+ goto notsarters;
+ _cmp(data.byte(kMapy), 20);
+ if (!flags.z())
+ goto notsarters;
+ al = 5;
+ issetobonmap();
+ if (!flags.z())
+ goto notsarters;
+ data.byte(kDestination) = 1;
+ data.byte(kFinaldest) = 1;
+ autosetwalk();
+ al = 5;
+ removesetobject();
+ al = 6;
+ placesetobject();
+ al = 1;
+ ah = data.byte(kRoomnum);
+ _dec(ah);
+ turnanypathon();
+ data.byte(kLiftflag) = 1;
+ data.word(kWatchingtime) = 40*2;
+ data.word(kReeltowatch) = 4;
+ data.word(kEndwatchreel) = 43;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ _inc(data.byte(kProgresspoints));
+ return;
+notsarters:
+ _cmp(data.byte(kReallocation), 29);
+ if (!flags.z())
+ goto notaide;
+ data.byte(kGetback) = 1;
+ al = 13;
+ resetlocation();
+ al = 12;
+ setlocation();
+ data.byte(kDestpos) = 12;
+ data.byte(kDestination) = 2;
+ data.byte(kFinaldest) = 2;
+ autosetwalk();
+ data.word(kWatchingtime) = 164*2;
+ data.word(kReeltowatch) = 3;
+ data.word(kEndwatchreel) = 164;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kAidedead) = 1;
+ data.byte(kDreamnumber) = 3;
+ data.byte(kRoomafterdream) = 33;
+ _inc(data.byte(kProgresspoints));
+ return;
+notaide:
+ _cmp(data.byte(kReallocation), 23);
+ if (!flags.z())
+ goto notwithboss;
+ _cmp(data.byte(kMapx), 0);
+ if (!flags.z())
+ goto notwithboss;
+ _cmp(data.byte(kMapy), 50);
+ if (!flags.z())
+ goto notwithboss;
+ _cmp(data.byte(kManspath), 5);
+ if (flags.z())
+ goto pathokboss;
+ data.byte(kDestination) = 5;
+ data.byte(kFinaldest) = 5;
+ autosetwalk();
+pathokboss:
+ data.byte(kLastweapon) = 1;
+ data.byte(kGetback) = 1;
+ return;
+notwithboss:
+ _cmp(data.byte(kReallocation), 8);
+ if (!flags.z())
+ goto nottvsoldier;
+ _cmp(data.byte(kMapx), 11);
+ if (!flags.z())
+ goto nottvsoldier;
+ _cmp(data.byte(kMapy), 10);
+ if (!flags.z())
+ goto nottvsoldier;
+ _cmp(data.byte(kManspath), 2);
+ if (flags.z())
+ goto pathoktv;
+ data.byte(kDestination) = 2;
+ data.byte(kFinaldest) = 2;
+ autosetwalk();
+pathoktv:
+ data.byte(kLastweapon) = 1;
+ data.byte(kGetback) = 1;
+ return;
+nottvsoldier:
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::useshield() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 20);
+ if (!flags.z())
+ goto notinsartroom;
+ _cmp(data.byte(kCombatcount), 0);
+ if (flags.z())
+ goto notinsartroom;
+ data.byte(kLastweapon) = 3;
+ showseconduse();
+ data.byte(kGetback) = 1;
+ _inc(data.byte(kProgresspoints));
+ removeobfrominv();
+ return;
+notinsartroom:
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::usebuttona() {
+ STACK_CHECK;
+ al = 95;
+ issetobonmap();
+ if (flags.z())
+ goto donethisbit;
+ showfirstuse();
+ al = 0;
+ ah = data.byte(kRoomnum);
+ _dec(ah);
+ turnanypathon();
+ al = 9;
+ removesetobject();
+ al = 95;
+ placesetobject();
+ data.word(kWatchingtime) = 15*2;
+ data.word(kReeltowatch) = 71;
+ data.word(kEndwatchreel) = 85;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ _inc(data.byte(kProgresspoints));
+ return;
+donethisbit:
+ showseconduse();
+ putbackobstuff();
+}
+
+void DreamGenContext::useplate() {
+ STACK_CHECK;
+ _cmp(data.byte(kWithobject), 255);
+ if (!flags.z())
+ goto platewith;
+ withwhat();
+ return;
+platewith:
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'S';
+ ch = 'C';
+ dl = 'R';
+ dh = 'W';
+ compare();
+ if (flags.z())
+ goto unscrewplate;
+ al = data.byte(kWithobject);
+ ah = data.byte(kWithtype);
+ cl = 'K';
+ ch = 'N';
+ dl = 'F';
+ dh = 'E';
+ compare();
+ if (flags.z())
+ goto triedknife;
+ cx = 300;
+ al = 14;
+ showpuztext();
+ putbackobstuff();
+ return;
+unscrewplate:
+ al = 20;
+ playchannel1();
+ showfirstuse();
+ al = 28;
+ placesetobject();
+ al = 24;
+ placesetobject();
+ al = 25;
+ removesetobject();
+ al = 0;
+ placefreeobject();
+ _inc(data.byte(kProgresspoints));
+ data.byte(kGetback) = 1;
+ return;
+triedknife:
+ cx = 300;
+ al = 54;
+ showpuztext();
+ putbackobstuff();
+}
+
+void DreamGenContext::usewinch() {
+ STACK_CHECK;
+ al = 40;
+ ah = 1;
+ checkinside();
+ _cmp(cl, (114));
+ if (flags.z())
+ goto nowinch;
+ al = cl;
+ ah = 4;
+ cl = 'F';
+ ch = 'U';
+ dl = 'S';
+ dh = 'E';
+ compare();
+ if (!flags.z())
+ goto nowinch;
+ data.word(kWatchingtime) = 217*2;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 217;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kDestpos) = 1;
+ data.byte(kNewlocation) = 45;
+ data.byte(kDreamnumber) = 1;
+ data.byte(kRoomafterdream) = 44;
+ data.byte(kGeneraldead) = 1;
+ data.byte(kNewsitem) = 2;
+ data.byte(kGetback) = 1;
+ _inc(data.byte(kProgresspoints));
+ return;
+nowinch:
+ showfirstuse();
+ putbackobstuff();
+}
+
+void DreamGenContext::entercode() {
+ STACK_CHECK;
+ data.word(kKeypadax) = ax;
+ data.word(kKeypadcx) = cx;
+ getridofreels();
+ loadkeypad();
+ createpanel();
+ showicon();
+ showouterpad();
+ showkeypad();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+ data.word(kPresspointer) = 0;
+ data.byte(kGetback) = 0;
+keypadloop:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ goto numberright;
+ delpointer();
+ readmouse();
+ showkeypad();
+ showpointer();
+ vsync();
+ _cmp(data.byte(kPresscount), 0);
+ if (flags.z())
+ goto nopresses;
+ _dec(data.byte(kPresscount));
+ goto afterpress;
+nopresses:
+ data.byte(kPressed) = 255;
+ data.byte(kGraphicpress) = 255;
+ vsync();
+afterpress:
+ dumppointer();
+ dumpkeypad();
+ dumptextline();
+ bx = 3482;
+ checkcoords();
+ _cmp(data.byte(kGetback), 1);
+ if (flags.z())
+ goto numberright;
+ _cmp(data.byte(kLightcount), 1);
+ if (!flags.z())
+ goto notendkey;
+ _cmp(data.byte(kLockstatus), 0);
+ if (flags.z())
+ goto numberright;
+ goto keypadloop;
+notendkey:
+ _cmp(data.byte(kPresscount), 40);
+ if (!flags.z())
+ goto keypadloop;
+ addtopresslist();
+ _cmp(data.byte(kPressed), 11);
+ if (!flags.z())
+ goto keypadloop;
+ ax = data.word(kKeypadax);
+ cx = data.word(kKeypadcx);
+ isitright();
+ if (!flags.z())
+ goto incorrect;
+ data.byte(kLockstatus) = 0;
+ al = 11;
+ playchannel1();
+ data.byte(kLightcount) = 120;
+ data.word(kPresspointer) = 0;
+ goto keypadloop;
+incorrect:
+ al = 11;
+ playchannel1();
+ data.byte(kLightcount) = 120;
+ data.word(kPresspointer) = 0;
+ goto keypadloop;
+numberright:
+ data.byte(kManisoffscreen) = 0;
+ getridoftemp();
+ restorereels();
+ redrawmainscrn();
+ worktoscreenm();
+}
+
+void DreamGenContext::loadkeypad() {
+ STACK_CHECK;
+ dx = 1948;
+ loadintotemp();
+}
+
+void DreamGenContext::quitkey() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 222);
+ if (flags.z())
+ goto alreadyqk;
+ data.byte(kCommandtype) = 222;
+ al = 4;
+ commandonly();
+alreadyqk:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notqk) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doqk;
+ return;
+doqk:
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::addtopresslist() {
+ STACK_CHECK;
+ _cmp(data.word(kPresspointer), 5);
+ if (flags.z())
+ return /* (nomorekeys) */;
+ al = data.byte(kPressed);
+ _cmp(al, 10);
+ if (!flags.z())
+ goto not10;
+ al = 0;
+not10:
+ bx = data.word(kPresspointer);
+ dx = data;
+ es = dx;
+ _add(bx, 8573);
+ es.byte(bx) = al;
+ _inc(data.word(kPresspointer));
+}
+
+void DreamGenContext::buttonone() {
+ STACK_CHECK;
+ cl = 1;
+ buttonpress();
+}
+
+void DreamGenContext::buttontwo() {
+ STACK_CHECK;
+ cl = 2;
+ buttonpress();
+}
+
+void DreamGenContext::buttonthree() {
+ STACK_CHECK;
+ cl = 3;
+ buttonpress();
+}
+
+void DreamGenContext::buttonfour() {
+ STACK_CHECK;
+ cl = 4;
+ buttonpress();
+}
+
+void DreamGenContext::buttonfive() {
+ STACK_CHECK;
+ cl = 5;
+ buttonpress();
+}
+
+void DreamGenContext::buttonsix() {
+ STACK_CHECK;
+ cl = 6;
+ buttonpress();
+}
+
+void DreamGenContext::buttonseven() {
+ STACK_CHECK;
+ cl = 7;
+ buttonpress();
+}
+
+void DreamGenContext::buttoneight() {
+ STACK_CHECK;
+ cl = 8;
+ buttonpress();
+}
+
+void DreamGenContext::buttonnine() {
+ STACK_CHECK;
+ cl = 9;
+ buttonpress();
+}
+
+void DreamGenContext::buttonnought() {
+ STACK_CHECK;
+ cl = 10;
+ buttonpress();
+}
+
+void DreamGenContext::buttonenter() {
+ STACK_CHECK;
+ cl = 11;
+ buttonpress();
+}
+
+void DreamGenContext::buttonpress() {
+ STACK_CHECK;
+ ch = cl;
+ _add(ch, 100);
+ _cmp(data.byte(kCommandtype), ch);
+ if (flags.z())
+ goto alreadyb;
+ data.byte(kCommandtype) = ch;
+ al = cl;
+ _add(al, 4);
+ push(cx);
+ commandonly();
+ cx = pop();
+alreadyb:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notb) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto dob;
+ return;
+dob:
+ data.byte(kPressed) = cl;
+ _add(cl, 21);
+ data.byte(kGraphicpress) = cl;
+ data.byte(kPresscount) = 40;
+ _cmp(cl, 32);
+ if (flags.z())
+ return /* (nonoise) */;
+ al = 10;
+ playchannel1();
+}
+
+void DreamGenContext::showouterpad() {
+ STACK_CHECK;
+ di = (36+112)-3;
+ bx = (72)-4;
+ ds = data.word(kTempgraphics);
+ al = 1;
+ ah = 0;
+ showframe();
+ di = (36+112)+74;
+ bx = (72)+76;
+ ds = data.word(kTempgraphics);
+ al = 37;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::showkeypad() {
+ STACK_CHECK;
+ al = 22;
+ di = (36+112)+9;
+ bx = (72)+5;
+ singlekey();
+ al = 23;
+ di = (36+112)+31;
+ bx = (72)+5;
+ singlekey();
+ al = 24;
+ di = (36+112)+53;
+ bx = (72)+5;
+ singlekey();
+ al = 25;
+ di = (36+112)+9;
+ bx = (72)+23;
+ singlekey();
+ al = 26;
+ di = (36+112)+31;
+ bx = (72)+23;
+ singlekey();
+ al = 27;
+ di = (36+112)+53;
+ bx = (72)+23;
+ singlekey();
+ al = 28;
+ di = (36+112)+9;
+ bx = (72)+41;
+ singlekey();
+ al = 29;
+ di = (36+112)+31;
+ bx = (72)+41;
+ singlekey();
+ al = 30;
+ di = (36+112)+53;
+ bx = (72)+41;
+ singlekey();
+ al = 31;
+ di = (36+112)+9;
+ bx = (72)+59;
+ singlekey();
+ al = 32;
+ di = (36+112)+31;
+ bx = (72)+59;
+ singlekey();
+ _cmp(data.byte(kLightcount), 0);
+ if (flags.z())
+ return /* (notenter) */;
+ _dec(data.byte(kLightcount));
+ al = 36;
+ bx = (72)-1+63;
+ _cmp(data.byte(kLockstatus), 0);
+ if (!flags.z())
+ goto changelight;
+ al = 41;
+ bx = (72)+4+63;
+changelight:
+ _cmp(data.byte(kLightcount), 60);
+ if (flags.c())
+ goto gotlight;
+ _cmp(data.byte(kLightcount), 100);
+ if (!flags.c())
+ goto gotlight;
+ _dec(al);
+gotlight:
+ ds = data.word(kTempgraphics);
+ ah = 0;
+ di = (36+112)+60;
+ showframe();
+}
+
+void DreamGenContext::singlekey() {
+ STACK_CHECK;
+ _cmp(data.byte(kGraphicpress), al);
+ if (!flags.z())
+ goto gotkey;
+ _add(al, 11);
+ _cmp(data.byte(kPresscount), 8);
+ if (!flags.c())
+ goto gotkey;
+ _sub(al, 11);
+gotkey:
+ ds = data.word(kTempgraphics);
+ _sub(al, 20);
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::dumpkeypad() {
+ STACK_CHECK;
+ di = (36+112)-3;
+ bx = (72)-4;
+ cl = 120;
+ ch = 90;
+ multidump();
+}
+
+void DreamGenContext::usemenu() {
+ STACK_CHECK;
+ getridofreels();
+ loadmenu();
+ createpanel();
+ showpanel();
+ showicon();
+ data.byte(kNewobs) = 0;
+ drawfloor();
+ printsprites();
+ al = 4;
+ ah = 0;
+ di = (80+40)-48;
+ bx = (60)-4;
+ ds = data.word(kTempgraphics2);
+ showframe();
+ getundermenu();
+ al = 5;
+ ah = 0;
+ di = (80+40)+54;
+ bx = (60)+72;
+ ds = data.word(kTempgraphics2);
+ showframe();
+ worktoscreenm();
+ data.byte(kGetback) = 0;
+menuloop:
+ delpointer();
+ putundermenu();
+ showmenu();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumpmenu();
+ dumptextline();
+ bx = 3614;
+ checkcoords();
+ _cmp(data.byte(kGetback), 1);
+ if (!flags.z())
+ goto menuloop;
+ data.byte(kManisoffscreen) = 0;
+ redrawmainscrn();
+ getridoftemp();
+ getridoftemp2();
+ restorereels();
+ worktoscreenm();
+}
+
+void DreamGenContext::dumpmenu() {
+ STACK_CHECK;
+ di = (80+40);
+ bx = (60);
+ cl = 48;
+ ch = 48;
+ multidump();
+}
+
+void DreamGenContext::getundermenu() {
+ STACK_CHECK;
+ di = (80+40);
+ bx = (60);
+ cl = 48;
+ ch = 48;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
+ multiget();
+}
+
+void DreamGenContext::putundermenu() {
+ STACK_CHECK;
+ di = (80+40);
+ bx = (60);
+ cl = 48;
+ ch = 48;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
+ multiput();
+}
+
+void DreamGenContext::showoutermenu() {
+ STACK_CHECK;
+ al = 40;
+ ah = 0;
+ di = (80+40)-34;
+ bx = (60)-40;
+ ds = data.word(kTempgraphics);
+ showframe();
+ al = 41;
+ ah = 0;
+ di = (80+40)+64-34;
+ bx = (60)-40;
+ ds = data.word(kTempgraphics);
+ showframe();
+ al = 42;
+ ah = 0;
+ di = (80+40)-26;
+ bx = (60)+57-40;
+ ds = data.word(kTempgraphics);
+ showframe();
+ al = 43;
+ ah = 0;
+ di = (80+40)+64-26;
+ bx = (60)+57-40;
+ ds = data.word(kTempgraphics);
+ showframe();
+}
+
+void DreamGenContext::showmenu() {
+ STACK_CHECK;
+ _inc(data.byte(kMenucount));
+ _cmp(data.byte(kMenucount), 37*2);
+ if (!flags.z())
+ goto menuframeok;
+ data.byte(kMenucount) = 0;
+menuframeok:
+ al = data.byte(kMenucount);
+ _shr(al, 1);
+ ah = 0;
+ di = (80+40);
+ bx = (60);
+ ds = data.word(kTempgraphics);
+ showframe();
+}
+
+void DreamGenContext::loadmenu() {
+ STACK_CHECK;
+ dx = 1832;
+ loadintotemp();
+ dx = 1987;
+ loadintotemp2();
+}
+
+void DreamGenContext::viewfolder() {
+ STACK_CHECK;
+ data.byte(kManisoffscreen) = 1;
+ getridofall();
+ loadfolder();
+ data.byte(kFolderpage) = 0;
+ showfolder();
+ worktoscreenm();
+ data.byte(kGetback) = 0;
+folderloop:
+ delpointer();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ bx = 3636;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto folderloop;
+ data.byte(kManisoffscreen) = 0;
+ getridoftemp();
+ getridoftemp2();
+ getridoftemp3();
+ getridoftempcharset();
+ restoreall();
+ redrawmainscrn();
+ worktoscreenm();
+}
+
+void DreamGenContext::nextfolder() {
+ STACK_CHECK;
+ _cmp(data.byte(kFolderpage), 12);
+ if (!flags.z())
+ goto cannextf;
+ blank();
+ return;
+cannextf:
+ _cmp(data.byte(kCommandtype), 201);
+ if (flags.z())
+ goto alreadynextf;
+ data.byte(kCommandtype) = 201;
+ al = 16;
+ commandonly();
+alreadynextf:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notnextf) */;
+ _cmp(ax, 1);
+ if (flags.z())
+ goto donextf;
+ return;
+donextf:
+ _inc(data.byte(kFolderpage));
+ folderhints();
+ delpointer();
+ showfolder();
+ data.word(kMousebutton) = 0;
+ bx = 3636;
+ checkcoords();
+ worktoscreenm();
+}
+
+void DreamGenContext::folderhints() {
+ STACK_CHECK;
+ _cmp(data.byte(kFolderpage), 5);
+ if (!flags.z())
+ goto notaideadd;
+ _cmp(data.byte(kAidedead), 1);
+ if (flags.z())
+ goto notaideadd;
+ al = 13;
+ getlocation();
+ _cmp(al, 1);
+ if (flags.z())
+ goto notaideadd;
+ al = 13;
+ setlocation();
+ showfolder();
+ al = 30;
+ findtext1();
+ di = 0;
+ bx = 86;
+ dl = 141;
+ ah = 16;
+ printdirect();
+ worktoscreenm();
+ cx = 200;
+ hangonp();
+ return;
+notaideadd:
+ _cmp(data.byte(kFolderpage), 9);
+ if (!flags.z())
+ return /* (notaristoadd) */;
+ al = 7;
+ getlocation();
+ _cmp(al, 1);
+ if (flags.z())
+ return /* (notaristoadd) */;
+ al = 7;
+ setlocation();
+ showfolder();
+ al = 31;
+ findtext1();
+ di = 0;
+ bx = 86;
+ dl = 141;
+ ah = 16;
+ printdirect();
+ worktoscreenm();
+ cx = 200;
+ hangonp();
+}
+
+void DreamGenContext::lastfolder() {
+ STACK_CHECK;
+ _cmp(data.byte(kFolderpage), 0);
+ if (!flags.z())
+ goto canlastf;
+ blank();
+ return;
+canlastf:
+ _cmp(data.byte(kCommandtype), 202);
+ if (flags.z())
+ goto alreadylastf;
+ data.byte(kCommandtype) = 202;
+ al = 17;
+ commandonly();
+alreadylastf:
+ _cmp(data.byte(kFolderpage), 0);
+ if (flags.z())
+ return /* (notlastf) */;
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notlastf) */;
+ _cmp(ax, 1);
+ if (flags.z())
+ goto dolastf;
+ return;
+dolastf:
+ _dec(data.byte(kFolderpage));
+ delpointer();
+ showfolder();
+ data.word(kMousebutton) = 0;
+ bx = 3636;
+ checkcoords();
+ worktoscreenm();
+}
+
+void DreamGenContext::loadfolder() {
+ STACK_CHECK;
+ dx = 2299;
+ loadintotemp();
+ dx = 2312;
+ loadintotemp2();
+ dx = 2325;
+ loadintotemp3();
+ dx = 1883;
+ loadtempcharset();
+ dx = 2195;
+ loadtemptext();
+}
+
+void DreamGenContext::showfolder() {
+ STACK_CHECK;
+ data.byte(kCommandtype) = 255;
+ _cmp(data.byte(kFolderpage), 0);
+ if (flags.z())
+ goto closedfolder;
+ usetempcharset();
+ createpanel2();
+ ds = data.word(kTempgraphics);
+ di = 0;
+ bx = 0;
+ al = 0;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = 143;
+ bx = 0;
+ al = 1;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = 0;
+ bx = 92;
+ al = 2;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = 143;
+ bx = 92;
+ al = 3;
+ ah = 0;
+ showframe();
+ folderexit();
+ _cmp(data.byte(kFolderpage), 1);
+ if (flags.z())
+ goto noleftpage;
+ showleftpage();
+noleftpage:
+ _cmp(data.byte(kFolderpage), 12);
+ if (flags.z())
+ goto norightpage;
+ showrightpage();
+norightpage:
+ usecharset1();
+ undertextline();
+ return;
+closedfolder:
+ createpanel2();
+ ds = data.word(kTempgraphics3);
+ di = 143-28;
+ bx = 0;
+ al = 0;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics3);
+ di = 143-28;
+ bx = 92;
+ al = 1;
+ ah = 0;
+ showframe();
+ folderexit();
+ undertextline();
+}
+
+void DreamGenContext::folderexit() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics2);
+ di = 296;
+ bx = 178;
+ al = 6;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::showleftpage() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics2);
+ di = 0;
+ bx = 12;
+ al = 3;
+ ah = 0;
+ showframe();
+ bx = 12+5;
+ cx = 9;
+leftpageloop:
+ push(cx);
+ push(bx);
+ ds = data.word(kTempgraphics2);
+ di = 0;
+ al = 4;
+ ah = 0;
+ showframe();
+ bx = pop();
+ cx = pop();
+ _add(bx, 16);
+ if (--cx)
+ goto leftpageloop;
+ ds = data.word(kTempgraphics2);
+ di = 0;
+ al = 5;
+ ah = 0;
+ showframe();
+ data.word(kLinespacing) = 8;
+ data.word(kCharshift) = 91;
+ data.byte(kKerning) = 1;
+ bl = data.byte(kFolderpage);
+ _dec(bl);
+ _dec(bl);
+ _add(bl, bl);
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kTextfile1);
+ si = es.word(bx);
+ _add(si, 66*2);
+ di = 2;
+ bx = 48;
+ dl = 140;
+ cx = 2;
+twolotsleft:
+ push(cx);
+contleftpage:
+ printdirect();
+ _add(bx, data.word(kLinespacing));
+ _cmp(al, 0);
+ if (!flags.z())
+ goto contleftpage;
+ cx = pop();
+ if (--cx)
+ goto twolotsleft;
+ data.byte(kKerning) = 0;
+ data.word(kCharshift) = 0;
+ data.word(kLinespacing) = 10;
+ es = data.word(kWorkspace);
+ ds = data.word(kWorkspace);
+ di = (48*320)+2;
+ si = (48*320)+2+130;
+ cx = 120;
+flipfolder:
+ push(cx);
+ push(di);
+ push(si);
+ cx = 65;
+flipfolderline:
+ al = es.byte(di);
+ ah = es.byte(si);
+ es.byte(di) = ah;
+ es.byte(si) = al;
+ _dec(si);
+ _inc(di);
+ if (--cx)
+ goto flipfolderline;
+ si = pop();
+ di = pop();
+ cx = pop();
+ _add(si, 320);
+ _add(di, 320);
+ if (--cx)
+ goto flipfolder;
+}
+
+void DreamGenContext::showrightpage() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics2);
+ di = 143;
+ bx = 12;
+ al = 0;
+ ah = 0;
+ showframe();
+ bx = 12+37;
+ cx = 7;
+rightpageloop:
+ push(cx);
+ push(bx);
+ ds = data.word(kTempgraphics2);
+ di = 143;
+ al = 1;
+ ah = 0;
+ showframe();
+ bx = pop();
+ cx = pop();
+ _add(bx, 16);
+ if (--cx)
+ goto rightpageloop;
+ ds = data.word(kTempgraphics2);
+ di = 143;
+ al = 2;
+ ah = 0;
+ showframe();
+ data.word(kLinespacing) = 8;
+ data.byte(kKerning) = 1;
+ bl = data.byte(kFolderpage);
+ _dec(bl);
+ _add(bl, bl);
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kTextfile1);
+ si = es.word(bx);
+ _add(si, 66*2);
+ di = 152;
+ bx = 48;
+ dl = 140;
+ cx = 2;
+twolotsright:
+ push(cx);
+contrightpage:
+ printdirect();
+ _add(bx, data.word(kLinespacing));
+ _cmp(al, 0);
+ if (!flags.z())
+ goto contrightpage;
+ cx = pop();
+ if (--cx)
+ goto twolotsright;
+ data.byte(kKerning) = 0;
+ data.word(kLinespacing) = 10;
+}
+
+void DreamGenContext::entersymbol() {
+ STACK_CHECK;
+ data.byte(kManisoffscreen) = 1;
+ getridofreels();
+ dx = 2338;
+ loadintotemp();
+ data.byte(kSymboltopx) = 24;
+ data.byte(kSymboltopdir) = 0;
+ data.byte(kSymbolbotx) = 24;
+ data.byte(kSymbolbotdir) = 0;
+ redrawmainscrn();
+ showsymbol();
+ undertextline();
+ worktoscreenm();
+ data.byte(kGetback) = 0;
+symbolloop:
+ delpointer();
+ updatesymboltop();
+ updatesymbolbot();
+ showsymbol();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ dumpsymbol();
+ bx = 3678;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto symbolloop;
+ _cmp(data.byte(kSymbolbotnum), 3);
+ if (!flags.z())
+ goto symbolwrong;
+ _cmp(data.byte(kSymboltopnum), 5);
+ if (!flags.z())
+ goto symbolwrong;
+ al = 43;
+ removesetobject();
+ al = 46;
+ placesetobject();
+ ah = data.byte(kRoomnum);
+ _add(ah, 12);
+ al = 0;
+ turnanypathon();
+ data.byte(kManisoffscreen) = 0;
+ redrawmainscrn();
+ getridoftemp();
+ restorereels();
+ worktoscreenm();
+ al = 13;
+ playchannel1();
+ return;
+symbolwrong:
+ al = 46;
+ removesetobject();
+ al = 43;
+ placesetobject();
+ ah = data.byte(kRoomnum);
+ _add(ah, 12);
+ al = 0;
+ turnanypathoff();
+ data.byte(kManisoffscreen) = 0;
+ redrawmainscrn();
+ getridoftemp();
+ restorereels();
+ worktoscreenm();
+}
+
+void DreamGenContext::quitsymbol() {
+ STACK_CHECK;
+ _cmp(data.byte(kSymboltopx), 24);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kSymbolbotx), 24);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 222);
+ if (flags.z())
+ goto alreadyqs;
+ data.byte(kCommandtype) = 222;
+ al = 18;
+ commandonly();
+alreadyqs:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notqs) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto doqs;
+ return;
+doqs:
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::settopleft() {
+ STACK_CHECK;
+ _cmp(data.byte(kSymboltopdir), 0);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 210);
+ if (flags.z())
+ goto alreadytopl;
+ data.byte(kCommandtype) = 210;
+ al = 19;
+ commandonly();
+alreadytopl:
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ return /* (notopleft) */;
+ data.byte(kSymboltopdir) = -1;
+}
+
+void DreamGenContext::settopright() {
+ STACK_CHECK;
+ _cmp(data.byte(kSymboltopdir), 0);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 211);
+ if (flags.z())
+ goto alreadytopr;
+ data.byte(kCommandtype) = 211;
+ al = 20;
+ commandonly();
+alreadytopr:
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ return /* (notopright) */;
+ data.byte(kSymboltopdir) = 1;
+}
+
+void DreamGenContext::setbotleft() {
+ STACK_CHECK;
+ _cmp(data.byte(kSymbolbotdir), 0);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 212);
+ if (flags.z())
+ goto alreadybotl;
+ data.byte(kCommandtype) = 212;
+ al = 21;
+ commandonly();
+alreadybotl:
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ return /* (nobotleft) */;
+ data.byte(kSymbolbotdir) = -1;
+}
+
+void DreamGenContext::setbotright() {
+ STACK_CHECK;
+ _cmp(data.byte(kSymbolbotdir), 0);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 213);
+ if (flags.z())
+ goto alreadybotr;
+ data.byte(kCommandtype) = 213;
+ al = 22;
+ commandonly();
+alreadybotr:
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ return /* (nobotright) */;
+ data.byte(kSymbolbotdir) = 1;
+}
+
+void DreamGenContext::dumpsymbol() {
+ STACK_CHECK;
+ data.byte(kNewtextline) = 0;
+ di = (64);
+ bx = (56)+20;
+ cl = 104;
+ ch = 60;
+ multidump();
+}
+
+void DreamGenContext::showsymbol() {
+ STACK_CHECK;
+ al = 12;
+ ah = 0;
+ di = (64);
+ bx = (56);
+ ds = data.word(kTempgraphics);
+ showframe();
+ al = data.byte(kSymboltopx);
+ ah = 0;
+ di = ax;
+ _add(di, (64)-44);
+ al = data.byte(kSymboltopnum);
+ bx = (56)+20;
+ ds = data.word(kTempgraphics);
+ ah = 32;
+ push(ax);
+ push(di);
+ push(bx);
+ push(ds);
+ showframe();
+ ds = pop();
+ bx = pop();
+ di = pop();
+ ax = pop();
+ nextsymbol();
+ _add(di, 49);
+ push(ax);
+ push(di);
+ push(bx);
+ push(ds);
+ showframe();
+ ds = pop();
+ bx = pop();
+ di = pop();
+ ax = pop();
+ nextsymbol();
+ _add(di, 49);
+ showframe();
+ al = data.byte(kSymbolbotx);
+ ah = 0;
+ di = ax;
+ _add(di, (64)-44);
+ al = data.byte(kSymbolbotnum);
+ _add(al, 6);
+ bx = (56)+49;
+ ds = data.word(kTempgraphics);
+ ah = 32;
+ push(ax);
+ push(di);
+ push(bx);
+ push(ds);
+ showframe();
+ ds = pop();
+ bx = pop();
+ di = pop();
+ ax = pop();
+ nextsymbol();
+ _add(di, 49);
+ push(ax);
+ push(di);
+ push(bx);
+ push(ds);
+ showframe();
+ ds = pop();
+ bx = pop();
+ di = pop();
+ ax = pop();
+ nextsymbol();
+ _add(di, 49);
+ showframe();
+}
+
+void DreamGenContext::nextsymbol() {
+ STACK_CHECK;
+ _inc(al);
+ _cmp(al, 6);
+ if (flags.z())
+ goto topwrap;
+ _cmp(al, 12);
+ if (flags.z())
+ goto botwrap;
+ return;
+topwrap:
+ al = 0;
+ return;
+botwrap:
+ al = 6;
+}
+
+void DreamGenContext::updatesymboltop() {
+ STACK_CHECK;
+ _cmp(data.byte(kSymboltopdir), 0);
+ if (flags.z())
+ return /* (topfinished) */;
+ _cmp(data.byte(kSymboltopdir), -1);
+ if (flags.z())
+ goto backwards;
+ _inc(data.byte(kSymboltopx));
+ _cmp(data.byte(kSymboltopx), 49);
+ if (!flags.z())
+ goto notwrapfor;
+ data.byte(kSymboltopx) = 0;
+ _dec(data.byte(kSymboltopnum));
+ _cmp(data.byte(kSymboltopnum), -1);
+ if (!flags.z())
+ return /* (topfinished) */;
+ data.byte(kSymboltopnum) = 5;
+ return;
+notwrapfor:
+ _cmp(data.byte(kSymboltopx), 24);
+ if (!flags.z())
+ return /* (topfinished) */;
+ data.byte(kSymboltopdir) = 0;
+ return;
+backwards:
+ _dec(data.byte(kSymboltopx));
+ _cmp(data.byte(kSymboltopx), -1);
+ if (!flags.z())
+ goto notwrapback;
+ data.byte(kSymboltopx) = 48;
+ _inc(data.byte(kSymboltopnum));
+ _cmp(data.byte(kSymboltopnum), 6);
+ if (!flags.z())
+ return /* (topfinished) */;
+ data.byte(kSymboltopnum) = 0;
+ return;
+notwrapback:
+ _cmp(data.byte(kSymboltopx), 24);
+ if (!flags.z())
+ return /* (topfinished) */;
+ data.byte(kSymboltopdir) = 0;
+}
+
+void DreamGenContext::updatesymbolbot() {
+ STACK_CHECK;
+ _cmp(data.byte(kSymbolbotdir), 0);
+ if (flags.z())
+ return /* (botfinished) */;
+ _cmp(data.byte(kSymbolbotdir), -1);
+ if (flags.z())
+ goto backwardsbot;
+ _inc(data.byte(kSymbolbotx));
+ _cmp(data.byte(kSymbolbotx), 49);
+ if (!flags.z())
+ goto notwrapforb;
+ data.byte(kSymbolbotx) = 0;
+ _dec(data.byte(kSymbolbotnum));
+ _cmp(data.byte(kSymbolbotnum), -1);
+ if (!flags.z())
+ return /* (botfinished) */;
+ data.byte(kSymbolbotnum) = 5;
+ return;
+notwrapforb:
+ _cmp(data.byte(kSymbolbotx), 24);
+ if (!flags.z())
+ return /* (botfinished) */;
+ data.byte(kSymbolbotdir) = 0;
+ return;
+backwardsbot:
+ _dec(data.byte(kSymbolbotx));
+ _cmp(data.byte(kSymbolbotx), -1);
+ if (!flags.z())
+ goto notwrapbackb;
+ data.byte(kSymbolbotx) = 48;
+ _inc(data.byte(kSymbolbotnum));
+ _cmp(data.byte(kSymbolbotnum), 6);
+ if (!flags.z())
+ return /* (botfinished) */;
+ data.byte(kSymbolbotnum) = 0;
+ return;
+notwrapbackb:
+ _cmp(data.byte(kSymbolbotx), 24);
+ if (!flags.z())
+ return /* (botfinished) */;
+ data.byte(kSymbolbotdir) = 0;
+}
+
+void DreamGenContext::dumpsymbox() {
+ STACK_CHECK;
+ _cmp(data.word(kDumpx), -1);
+ if (flags.z())
+ return /* (nodumpsym) */;
+ di = data.word(kDumpx);
+ bx = data.word(kDumpy);
+ cl = 30;
+ ch = 77;
+ multidump();
+ data.word(kDumpx) = -1;
+}
+
+void DreamGenContext::usediary() {
+ STACK_CHECK;
+ getridofreels();
+ dx = 2039;
+ loadintotemp();
+ dx = 2208;
+ loadtemptext();
+ dx = 1883;
+ loadtempcharset();
+ createpanel();
+ showicon();
+ showdiary();
+ undertextline();
+ showdiarypage();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+ data.byte(kGetback) = 0;
+diaryloop:
+ delpointer();
+ readmouse();
+ showdiarykeys();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumpdiarykeys();
+ dumptextline();
+ bx = 3740;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto diaryloop;
+ getridoftemp();
+ getridoftemptext();
+ getridoftempcharset();
+ restorereels();
+ data.byte(kManisoffscreen) = 0;
+ redrawmainscrn();
+ worktoscreenm();
+}
+
+void DreamGenContext::showdiary() {
+ STACK_CHECK;
+ al = 1;
+ ah = 0;
+ di = (68+24);
+ bx = (48+12)+37;
+ ds = data.word(kTempgraphics);
+ showframe();
+ al = 2;
+ ah = 0;
+ di = (68+24)+176;
+ bx = (48+12)+108;
+ ds = data.word(kTempgraphics);
+ showframe();
+}
+
+void DreamGenContext::showdiarykeys() {
+ STACK_CHECK;
+ _cmp(data.byte(kPresscount), 0);
+ if (flags.z())
+ return /* (nokeyatall) */;
+ _dec(data.byte(kPresscount));
+ _cmp(data.byte(kPresscount), 0);
+ if (flags.z())
+ return /* (nokeyatall) */;
+ _cmp(data.byte(kPressed), 'N');
+ if (!flags.z())
+ goto nokeyn;
+ al = 3;
+ _cmp(data.byte(kPresscount), 1);
+ if (flags.z())
+ goto gotkeyn;
+ al = 4;
+gotkeyn:
+ ah = 0;
+ di = (68+24)+94;
+ bx = (48+12)+97;
+ ds = data.word(kTempgraphics);
+ showframe();
+ _cmp(data.byte(kPresscount), 1);
+ if (!flags.z())
+ return /* (notshown) */;
+ showdiarypage();
+ return;
+nokeyn:
+ al = 5;
+ _cmp(data.byte(kPresscount), 1);
+ if (flags.z())
+ goto gotkeyp;
+ al = 6;
+gotkeyp:
+ ah = 0;
+ di = (68+24)+151;
+ bx = (48+12)+71;
+ ds = data.word(kTempgraphics);
+ showframe();
+ _cmp(data.byte(kPresscount), 1);
+ if (!flags.z())
+ return /* (notshowp) */;
+ showdiarypage();
+}
+
+void DreamGenContext::dumpdiarykeys() {
+ STACK_CHECK;
+ _cmp(data.byte(kPresscount), 1);
+ if (!flags.z())
+ goto notdumpdiary;
+ _cmp(data.byte(kSartaindead), 1);
+ if (flags.z())
+ goto notsartadd;
+ _cmp(data.byte(kDiarypage), 5);
+ if (!flags.z())
+ goto notsartadd;
+ _cmp(data.byte(kDiarypage), 5);
+ if (!flags.z())
+ goto notsartadd;
+ al = 6;
+ getlocation();
+ _cmp(al, 1);
+ if (flags.z())
+ goto notsartadd;
+ al = 6;
+ setlocation();
+ delpointer();
+ al = 12;
+ findtext1();
+ di = 70;
+ bx = 106;
+ dl = 241;
+ ah = 16;
+ printdirect();
+ worktoscreenm();
+ cx = 200;
+ hangonp();
+ createpanel();
+ showicon();
+ showdiary();
+ showdiarypage();
+ worktoscreenm();
+ showpointer();
+ return;
+notsartadd:
+ di = (68+24)+48;
+ bx = (48+12)+15;
+ cl = 200;
+ ch = 16;
+ multidump();
+notdumpdiary:
+ di = (68+24)+94;
+ bx = (48+12)+97;
+ cl = 16;
+ ch = 16;
+ multidump();
+ di = (68+24)+151;
+ bx = (48+12)+71;
+ cl = 16;
+ ch = 16;
+ multidump();
+}
+
+void DreamGenContext::diarykeyp() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 214);
+ if (flags.z())
+ goto alreadykeyp;
+ data.byte(kCommandtype) = 214;
+ al = 23;
+ commandonly();
+alreadykeyp:
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ return /* (notkeyp) */;
+ ax = data.word(kOldbutton);
+ _cmp(ax, data.word(kMousebutton));
+ if (flags.z())
+ return /* (notkeyp) */;
+ _cmp(data.byte(kPresscount), 0);
+ if (!flags.z())
+ return /* (notkeyp) */;
+ al = 16;
+ playchannel1();
+ data.byte(kPresscount) = 12;
+ data.byte(kPressed) = 'P';
+ _dec(data.byte(kDiarypage));
+ _cmp(data.byte(kDiarypage), -1);
+ if (!flags.z())
+ return /* (notkeyp) */;
+ data.byte(kDiarypage) = 11;
+}
+
+void DreamGenContext::diarykeyn() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 213);
+ if (flags.z())
+ goto alreadykeyn;
+ data.byte(kCommandtype) = 213;
+ al = 23;
+ commandonly();
+alreadykeyn:
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ return /* (notkeyn) */;
+ ax = data.word(kOldbutton);
+ _cmp(ax, data.word(kMousebutton));
+ if (flags.z())
+ return /* (notkeyn) */;
+ _cmp(data.byte(kPresscount), 0);
+ if (!flags.z())
+ return /* (notkeyn) */;
+ al = 16;
+ playchannel1();
+ data.byte(kPresscount) = 12;
+ data.byte(kPressed) = 'N';
+ _inc(data.byte(kDiarypage));
+ _cmp(data.byte(kDiarypage), 12);
+ if (!flags.z())
+ return /* (notkeyn) */;
+ data.byte(kDiarypage) = 0;
+}
+
+void DreamGenContext::showdiarypage() {
+ STACK_CHECK;
+ al = 0;
+ ah = 0;
+ di = (68+24);
+ bx = (48+12);
+ ds = data.word(kTempgraphics);
+ showframe();
+ al = data.byte(kDiarypage);
+ findtext1();
+ data.byte(kKerning) = 1;
+ usetempcharset();
+ di = (68+24)+48;
+ bx = (48+12)+16;
+ dl = 240;
+ ah = 16;
+ data.word(kCharshift) = 91+91;
+ printdirect();
+ di = (68+24)+129;
+ bx = (48+12)+16;
+ dl = 240;
+ ah = 16;
+ printdirect();
+ di = (68+24)+48;
+ bx = (48+12)+23;
+ dl = 240;
+ ah = 16;
+ printdirect();
+ data.byte(kKerning) = 0;
+ data.word(kCharshift) = 0;
+ usecharset1();
+}
+
+void DreamGenContext::findtext1() {
+ STACK_CHECK;
+ ah = 0;
+ si = ax;
+ _add(si, si);
+ es = data.word(kTextfile1);
+ ax = es.word(si);
+ _add(ax, (66*2));
+ si = ax;
+}
+
+void DreamGenContext::zoomonoff() {
+ STACK_CHECK;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kPointermode), 2);
+ if (flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 222);
+ if (flags.z())
+ goto alreadyonoff;
+ data.byte(kCommandtype) = 222;
+ al = 39;
+ commandonly();
+alreadyonoff:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nozoomonoff) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto dozoomonoff;
+ return;
+dozoomonoff:
+ al = data.byte(kZoomon);
+ _xor(al, 1);
+ data.byte(kZoomon) = al;
+ createpanel();
+ data.byte(kNewobs) = 0;
+ drawfloor();
+ printsprites();
+ reelsonscreen();
+ showicon();
+ getunderzoom();
+ undertextline();
+ al = 39;
+ commandonly();
+ readmouse();
+ worktoscreenm();
+}
+
+void DreamGenContext::saveload() {
+ STACK_CHECK;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kPointermode), 2);
+ if (flags.z())
+ { blank(); return; };
+ _cmp(data.byte(kCommandtype), 253);
+ if (flags.z())
+ goto alreadyops;
+ data.byte(kCommandtype) = 253;
+ al = 43;
+ commandonly();
+alreadyops:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (noops) */;
+ _and(ax, 1);
+ if (flags.z())
+ return /* (noops) */;
+ dosaveload();
+}
+
+void DreamGenContext::dosaveload() {
+ STACK_CHECK;
+ data.byte(kPointerframe) = 0;
+ data.word(kTextaddressx) = 70;
+ data.word(kTextaddressy) = 182-8;
+ data.byte(kTextlen) = 181;
+ data.byte(kManisoffscreen) = 1;
+ clearwork();
+ createpanel2();
+ undertextline();
+ getridofall();
+ loadsavebox();
+ showopbox();
+ showmainops();
+ worktoscreen();
+ goto donefirstops;
+restartops:
+ showopbox();
+ showmainops();
+ worktoscreenm();
+donefirstops:
+ data.byte(kGetback) = 0;
+waitops:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ goto justret;
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ delpointer();
+ bx = 3782;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto waitops;
+ _cmp(data.byte(kGetback), 2);
+ if (flags.z())
+ goto restartops;
+ data.word(kTextaddressx) = 13;
+ data.word(kTextaddressy) = 182;
+ data.byte(kTextlen) = 240;
+ _cmp(data.byte(kGetback), 4);
+ if (flags.z())
+ goto justret;
+ getridoftemp();
+ restoreall();
+ redrawmainscrn();
+ worktoscreenm();
+ data.byte(kCommandtype) = 200;
+justret:
+ data.byte(kManisoffscreen) = 0;
+}
+
+void DreamGenContext::getbackfromops() {
+ STACK_CHECK;
+ _cmp(data.byte(kMandead), 2);
+ if (flags.z())
+ goto opsblock1;
+ getback1();
+ return;
+opsblock1:
+ blank();
+}
+
+void DreamGenContext::showmainops() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics);
+ di = (60)+10;
+ bx = (52)+10;
+ al = 8;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60)+59;
+ bx = (52)+30;
+ al = 7;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60)+128+4;
+ bx = (52)+12;
+ al = 1;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::showdiscops() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics);
+ di = (60)+128+4;
+ bx = (52)+12;
+ al = 1;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60)+10;
+ bx = (52)+10;
+ al = 9;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60)+59;
+ bx = (52)+30;
+ al = 10;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60)+176+2;
+ bx = (52)+60-4;
+ al = 5;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::loadsavebox() {
+ STACK_CHECK;
+ dx = 1961;
+ loadintotemp();
+}
+
+void DreamGenContext::loadgame() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 246);
+ if (flags.z())
+ goto alreadyload;
+ data.byte(kCommandtype) = 246;
+ al = 41;
+ commandonly();
+alreadyload:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (noload) */;
+ _cmp(ax, 1);
+ if (flags.z())
+ goto doload;
+ return;
+doload:
+ data.byte(kLoadingorsave) = 1;
+ showopbox();
+ showloadops();
+ data.byte(kCurrentslot) = 0;
+ showslots();
+ shownames();
+ data.byte(kPointerframe) = 0;
+ worktoscreenm();
+ namestoold();
+ data.byte(kGetback) = 0;
+loadops:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (quitloaded) */;
+ delpointer();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ bx = 3824;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto loadops;
+ _cmp(data.byte(kGetback), 2);
+ if (flags.z())
+ return /* (quitloaded) */;
+ getridoftemp();
+ dx = data;
+ es = dx;
+ bx = 7979;
+ startloading();
+ loadroomssample();
+ data.byte(kRoomloaded) = 1;
+ data.byte(kNewlocation) = 255;
+ clearsprites();
+ initman();
+ initrain();
+ data.word(kTextaddressx) = 13;
+ data.word(kTextaddressy) = 182;
+ data.byte(kTextlen) = 240;
+ startup();
+ worktoscreen();
+ data.byte(kGetback) = 4;
+}
+
+void DreamGenContext::getbacktoops() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 201);
+ if (flags.z())
+ goto alreadygetops;
+ data.byte(kCommandtype) = 201;
+ al = 42;
+ commandonly();
+alreadygetops:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nogetbackops) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto dogetbackops;
+ return;
+dogetbackops:
+ oldtonames();
+ data.byte(kGetback) = 2;
+}
+
+void DreamGenContext::discops() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 249);
+ if (flags.z())
+ goto alreadydiscops;
+ data.byte(kCommandtype) = 249;
+ al = 43;
+ commandonly();
+alreadydiscops:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (nodiscops) */;
+ _and(ax, 1);
+ if (!flags.z())
+ goto dodiscops;
+ return;
+dodiscops:
+ scanfornames();
+ data.byte(kLoadingorsave) = 2;
+ showopbox();
+ showdiscops();
+ data.byte(kCurrentslot) = 0;
+ worktoscreenm();
+ data.byte(kGetback) = 0;
+discopsloop:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (quitdiscops) */;
+ delpointer();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ bx = 3866;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto discopsloop;
+}
+
+void DreamGenContext::savegame() {
+ STACK_CHECK;
+ _cmp(data.byte(kMandead), 2);
+ if (!flags.z())
+ goto cansaveok;
+ blank();
+ return;
+cansaveok:
+ _cmp(data.byte(kCommandtype), 247);
+ if (flags.z())
+ goto alreadysave;
+ data.byte(kCommandtype) = 247;
+ al = 44;
+ commandonly();
+alreadysave:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (!flags.z())
+ goto dosave;
+ return;
+dosave:
+ data.byte(kLoadingorsave) = 2;
+ showopbox();
+ showsaveops();
+ data.byte(kCurrentslot) = 0;
+ showslots();
+ shownames();
+ worktoscreenm();
+ namestoold();
+ data.word(kBufferin) = 0;
+ data.word(kBufferout) = 0;
+ data.byte(kGetback) = 0;
+saveops:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (quitsavegame) */;
+ delpointer();
+ checkinput();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ bx = 3908;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto saveops;
+}
+
+void DreamGenContext::actualsave() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 222);
+ if (flags.z())
+ goto alreadyactsave;
+ data.byte(kCommandtype) = 222;
+ al = 44;
+ commandonly();
+alreadyactsave:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return /* (noactsave) */;
+ dx = data;
+ ds = dx;
+ si = 8579;
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ cx = 17;
+ _mul(cx);
+ _add(si, ax);
+ _inc(si);
+ _cmp(ds.byte(si), 0);
+ if (flags.z())
+ return /* (noactsave) */;
+ al = data.byte(kLocation);
+ ah = 0;
+ cx = 32;
+ _mul(cx);
+ ds = cs;
+ si = 6187;
+ _add(si, ax);
+ di = 7979;
+ bx = di;
+ es = cs;
+ cx = 16;
+ _movsw(cx, true);
+ al = data.byte(kRoomssample);
+ es.byte(bx+13) = al;
+ al = data.byte(kMapx);
+ es.byte(bx+15) = al;
+ al = data.byte(kMapy);
+ es.byte(bx+16) = al;
+ al = data.byte(kLiftflag);
+ es.byte(bx+20) = al;
+ al = data.byte(kManspath);
+ es.byte(bx+21) = al;
+ al = data.byte(kFacing);
+ es.byte(bx+22) = al;
+ al = 255;
+ es.byte(bx+27) = al;
+ saveposition();
+ getridoftemp();
+ restoreall();
+ data.word(kTextaddressx) = 13;
+ data.word(kTextaddressy) = 182;
+ data.byte(kTextlen) = 240;
+ redrawmainscrn();
+ worktoscreenm();
+ data.byte(kGetback) = 4;
+}
+
+void DreamGenContext::actualload() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 221);
+ if (flags.z())
+ goto alreadyactload;
+ data.byte(kCommandtype) = 221;
+ al = 41;
+ commandonly();
+alreadyactload:
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (notactload) */;
+ _cmp(ax, 1);
+ if (!flags.z())
+ return /* (notactload) */;
+ dx = data;
+ ds = dx;
+ si = 8579;
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ cx = 17;
+ _mul(cx);
+ _add(si, ax);
+ _inc(si);
+ _cmp(ds.byte(si), 0);
+ if (flags.z())
+ return /* (notactload) */;
+ loadposition();
+ data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::selectslot2() {
+ STACK_CHECK;
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ goto noselslot2;
+ data.byte(kLoadingorsave) = 2;
+noselslot2:
+ selectslot();
+}
+
+void DreamGenContext::checkinput() {
+ STACK_CHECK;
+ _cmp(data.byte(kLoadingorsave), 3);
+ if (flags.z())
+ return /* (nokeypress) */;
+ readkey();
+ al = data.byte(kCurrentkey);
+ _cmp(al, 0);
+ if (flags.z())
+ return /* (nokeypress) */;
+ _cmp(al, 13);
+ if (!flags.z())
+ goto notret;
+ data.byte(kLoadingorsave) = 3;
+ goto afterkey;
+notret:
+ _cmp(al, 8);
+ if (!flags.z())
+ goto nodel2;
+ _cmp(data.byte(kCursorpos), 0);
+ if (flags.z())
+ return /* (nokeypress) */;
+ getnamepos();
+ _dec(data.byte(kCursorpos));
+ es.byte(bx) = 0;
+ es.byte(bx+1) = 1;
+ goto afterkey;
+nodel2:
+ _cmp(data.byte(kCursorpos), 14);
+ if (flags.z())
+ return /* (nokeypress) */;
+ getnamepos();
+ _inc(data.byte(kCursorpos));
+ al = data.byte(kCurrentkey);
+ es.byte(bx+1) = al;
+ es.byte(bx+2) = 0;
+ es.byte(bx+3) = 1;
+ goto afterkey;
+ return;
+afterkey:
+ showopbox();
+ shownames();
+ showslots();
+ showsaveops();
+ worktoscreenm();
+}
+
+void DreamGenContext::getnamepos() {
+ STACK_CHECK;
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ cx = 17;
+ _mul(cx);
+ dx = data;
+ es = dx;
+ bx = 8579;
+ _add(bx, ax);
+ al = data.byte(kCursorpos);
+ ah = 0;
+ _add(bx, ax);
+}
+
+void DreamGenContext::showopbox() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics);
+ di = (60);
+ bx = (52);
+ al = 0;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60);
+ bx = (52)+55;
+ al = 4;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::showloadops() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics);
+ di = (60)+128+4;
+ bx = (52)+12;
+ al = 1;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60)+176+2;
+ bx = (52)+60-4;
+ al = 5;
+ ah = 0;
+ showframe();
+ di = (60)+104;
+ bx = (52)+14;
+ al = 55;
+ dl = 101;
+ printmessage();
+}
+
+void DreamGenContext::showsaveops() {
+ STACK_CHECK;
+ ds = data.word(kTempgraphics);
+ di = (60)+128+4;
+ bx = (52)+12;
+ al = 1;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempgraphics);
+ di = (60)+176+2;
+ bx = (52)+60-4;
+ al = 5;
+ ah = 0;
+ showframe();
+ di = (60)+104;
+ bx = (52)+14;
+ al = 54;
+ dl = 101;
+ printmessage();
+}
+
+void DreamGenContext::selectslot() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 244);
+ if (flags.z())
+ goto alreadysel;
+ data.byte(kCommandtype) = 244;
+ al = 45;
+ commandonly();
+alreadysel:
+ ax = data.word(kMousebutton);
+ _cmp(ax, 1);
+ if (!flags.z())
+ return /* (noselslot) */;
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (noselslot) */;
+ _cmp(data.byte(kLoadingorsave), 3);
+ if (!flags.z())
+ goto notnocurs;
+ _dec(data.byte(kLoadingorsave));
+notnocurs:
+ oldtonames();
+ ax = data.word(kMousey);
+ _sub(ax, (52)+4);
+ cl = -1;
+getslotnum:
+ _inc(cl);
+ _sub(ax, 11);
+ if (!flags.c())
+ goto getslotnum;
+ data.byte(kCurrentslot) = cl;
+ delpointer();
+ showopbox();
+ showslots();
+ shownames();
+ _cmp(data.byte(kLoadingorsave), 1);
+ if (flags.z())
+ goto isloadmode;
+ showsaveops();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+ return;
+isloadmode:
+ showloadops();
+ readmouse();
+ showpointer();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::showslots() {
+ STACK_CHECK;
+ di = (60)+7;
+ bx = (52)+8;
+ al = 2;
+ ds = data.word(kTempgraphics);
+ ah = 0;
+ showframe();
+ di = (60)+10;
+ bx = (52)+11;
+ cl = 0;
+slotloop:
+ push(cx);
+ push(di);
+ push(bx);
+ _cmp(cl, data.byte(kCurrentslot));
+ if (!flags.z())
+ goto nomatchslot;
+ al = 3;
+ ds = data.word(kTempgraphics);
+ ah = 0;
+ showframe();
+nomatchslot:
+ bx = pop();
+ di = pop();
+ cx = pop();
+ _add(bx, 10);
+ _inc(cl);
+ _cmp(cl, 7);
+ if (!flags.z())
+ goto slotloop;
+}
+
+void DreamGenContext::shownames() {
+ STACK_CHECK;
+ dx = data;
+ es = dx;
+ si = 8579+1;
+ di = (60)+21;
+ bx = (52)+10;
+ cl = 0;
+shownameloop:
+ push(cx);
+ push(di);
+ push(es);
+ push(bx);
+ push(si);
+ al = 4;
+ _cmp(cl, data.byte(kCurrentslot));
+ if (!flags.z())
+ goto nomatchslot2;
+ _cmp(data.byte(kLoadingorsave), 2);
+ if (!flags.z())
+ goto loadmode;
+ dx = si;
+ cx = 15;
+ _add(si, 15);
+zerostill:
+ _dec(si);
+ _dec(cl);
+ _cmp(es.byte(si), 1);
+ if (!flags.z())
+ goto foundcharacter;
+ goto zerostill;
+foundcharacter:
+ data.byte(kCursorpos) = cl;
+ es.byte(si) = '/';
+ es.byte(si+1) = 0;
+ push(si);
+ si = dx;
+ dl = 200;
+ ah = 0;
+ printdirect();
+ si = pop();
+ es.byte(si) = 0;
+ es.byte(si+1) = 1;
+ goto afterprintname;
+loadmode:
+ al = 0;
+ dl = 200;
+ ah = 0;
+ data.word(kCharshift) = 91;
+ printdirect();
+ data.word(kCharshift) = 0;
+ goto afterprintname;
+nomatchslot2:
+ dl = 200;
+ ah = 0;
+ printdirect();
+afterprintname:
+ si = pop();
+ bx = pop();
+ es = pop();
+ di = pop();
+ cx = pop();
+ _add(si, 17);
+ _add(bx, 10);
+ _inc(cl);
+ _cmp(cl, 7);
+ if (!flags.z())
+ goto shownameloop;
+}
+
+void DreamGenContext::namestoold() {
+ STACK_CHECK;
+ ds = cs;
+ si = 8579;
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ es = data.word(kBuffers);
+ cx = 17*4;
+ _movsb(cx, true);
+}
+
+void DreamGenContext::oldtonames() {
+ STACK_CHECK;
+ es = cs;
+ di = 8579;
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ ds = data.word(kBuffers);
+ cx = 17*4;
+ _movsb(cx, true);
+}
+
+void DreamGenContext::saveposition() {
+ STACK_CHECK;
+ makeheader();
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ push(ax);
+ cx = 13;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8698;
+ _add(dx, ax);
+ openforsave();
+ dx = data;
+ ds = dx;
+ dx = 6091;
+ cx = (6187-6091);
+ savefilewrite();
+ dx = data;
+ es = dx;
+ di = 6141;
+ ax = pop();
+ cx = 17;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8579;
+ _add(dx, ax);
+ saveseg();
+ dx = data;
+ ds = dx;
+ dx = 0;
+ saveseg();
+ ds = data.word(kExtras);
+ dx = (0);
+ saveseg();
+ ds = data.word(kBuffers);
+ dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ saveseg();
+ dx = data;
+ ds = dx;
+ dx = 7979;
+ saveseg();
+ dx = data;
+ ds = dx;
+ dx = 534;
+ saveseg();
+ closefile();
+}
+
+void DreamGenContext::loadposition() {
+ STACK_CHECK;
+ data.word(kTimecount) = 0;
+ clearchanges();
+ al = data.byte(kCurrentslot);
+ ah = 0;
+ push(ax);
+ cx = 13;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8698;
+ _add(dx, ax);
+ openfilefromc();
+ ds = cs;
+ dx = 6091;
+ cx = (6187-6091);
+ savefileread();
+ es = cs;
+ di = 6141;
+ ax = pop();
+ cx = 17;
+ _mul(cx);
+ dx = data;
+ ds = dx;
+ dx = 8579;
+ _add(dx, ax);
+ loadseg();
+ dx = data;
+ ds = dx;
+ dx = 0;
+ loadseg();
+ ds = data.word(kExtras);
+ dx = (0);
+ loadseg();
+ ds = data.word(kBuffers);
+ dx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ loadseg();
+ dx = data;
+ ds = dx;
+ dx = 7979;
+ loadseg();
+ ds = cs;
+ dx = 534;
+ loadseg();
+ closefile();
+}
+
+void DreamGenContext::makeheader() {
+ STACK_CHECK;
+ dx = data;
+ es = dx;
+ di = 6141;
+ ax = 17;
+ storeit();
+ ax = (68-0);
+ storeit();
+ ax = (0+2080+30000+(16*114)+((114+2)*2)+18000);
+ storeit();
+ ax = (250)*4;
+ storeit();
+ ax = 48;
+ storeit();
+ ax = (991-534);
+ storeit();
+}
+
+void DreamGenContext::storeit() {
+ STACK_CHECK;
+ _cmp(ax, 0);
+ if (!flags.z())
+ goto isntblank;
+ _inc(ax);
+isntblank:
+ _stosw();
+}
+
+void DreamGenContext::findlen() {
+ STACK_CHECK;
+ _dec(bx);
+ _add(bx, ax);
+nextone:
+ _cmp(cl, ds.byte(bx));
+ if (!flags.z())
+ return /* (foundlen) */;
+ _dec(bx);
+ _dec(ax);
+ _cmp(ax, 0);
+ if (!flags.z())
+ goto nextone;
+}
+
+void DreamGenContext::scanfornames() {
+ STACK_CHECK;
+ dx = data;
+ es = dx;
+ di = 8579;
+ dx = data;
+ ds = dx;
+ dx = 8698;
+ cx = 7;
+scanloop:
+ push(es);
+ push(ds);
+ push(di);
+ push(dx);
+ push(cx);
+ openfilefromc();
+ if (flags.c())
+ goto notexist;
+ cx = pop();
+ _inc(ch);
+ push(cx);
+ push(di);
+ push(es);
+ dx = data;
+ ds = dx;
+ dx = 6091;
+ cx = (6187-6091);
+ savefileread();
+ dx = data;
+ es = dx;
+ di = 6141;
+ ds = pop();
+ dx = pop();
+ loadseg();
+ bx = data.word(kHandle);
+ closefile();
+notexist:
+ cx = pop();
+ dx = pop();
+ di = pop();
+ ds = pop();
+ es = pop();
+ _add(dx, 13);
+ _add(di, 17);
+ _dec(cl);
+ if (!flags.z())
+ goto scanloop;
+ al = ch;
+}
+
+void DreamGenContext::decide() {
+ STACK_CHECK;
+ setmode();
+ loadpalfromiff();
+ clearpalette();
+ data.byte(kPointermode) = 0;
+ data.word(kWatchingtime) = 0;
+ data.byte(kPointerframe) = 0;
+ data.word(kTextaddressx) = 70;
+ data.word(kTextaddressy) = 182-8;
+ data.byte(kTextlen) = 181;
+ data.byte(kManisoffscreen) = 1;
+ loadsavebox();
+ showdecisions();
+ worktoscreen();
+ fadescreenup();
+ data.byte(kGetback) = 0;
+waitdecide:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (flags.z())
+ goto _tmp1;
+ return;
+_tmp1:
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ delpointer();
+ bx = 5057;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto waitdecide;
+ _cmp(data.byte(kGetback), 4);
+ if (flags.z())
+ goto hasloadedroom;
+ getridoftemp();
+hasloadedroom:
+ data.word(kTextaddressx) = 13;
+ data.word(kTextaddressy) = 182;
+ data.byte(kTextlen) = 240;
+}
+
+void DreamGenContext::showdecisions() {
+ STACK_CHECK;
+ createpanel2();
+ showopbox();
+ ds = data.word(kTempgraphics);
+ di = (60)+17;
+ bx = (52)+13;
+ al = 6;
+ ah = 0;
+ showframe();
+ undertextline();
+}
+
+void DreamGenContext::newgame() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 251);
+ if (flags.z())
+ goto alreadynewgame;
+ data.byte(kCommandtype) = 251;
+ al = 47;
+ commandonly();
+alreadynewgame:
+ ax = data.word(kMousebutton);
+ _cmp(ax, 1);
+ if (!flags.z())
+ return /* (nonewgame) */;
+ data.byte(kGetback) = 3;
+}
+
+void DreamGenContext::doload() {
+ STACK_CHECK;
+ data.byte(kLoadingorsave) = 1;
+ showopbox();
+ showloadops();
+ data.byte(kCurrentslot) = 0;
+ showslots();
+ shownames();
+ data.byte(kPointerframe) = 0;
+ worktoscreenm();
+ namestoold();
+ data.byte(kGetback) = 0;
+loadops:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (quitloaded) */;
+ delpointer();
+ readmouse();
+ showpointer();
+ vsync();
+ dumppointer();
+ dumptextline();
+ bx = 3824;
+ checkcoords();
+ _cmp(data.byte(kGetback), 0);
+ if (flags.z())
+ goto loadops;
+ _cmp(data.byte(kGetback), 2);
+ if (flags.z())
+ return /* (quitloaded) */;
+ getridoftemp();
+ dx = data;
+ es = dx;
+ bx = 7979;
+ startloading();
+ loadroomssample();
+ data.byte(kRoomloaded) = 1;
+ data.byte(kNewlocation) = 255;
+ clearsprites();
+ initman();
+ initrain();
+ data.word(kTextaddressx) = 13;
+ data.word(kTextaddressy) = 182;
+ data.byte(kTextlen) = 240;
+ startup();
+ worktoscreen();
+ data.byte(kGetback) = 4;
+}
+
+void DreamGenContext::loadold() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 252);
+ if (flags.z())
+ goto alreadyloadold;
+ data.byte(kCommandtype) = 252;
+ al = 48;
+ commandonly();
+alreadyloadold:
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return /* (noloadold) */;
+ doload();
+ _cmp(data.byte(kGetback), 4);
+ if (flags.z())
+ return /* (noloadold) */;
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (noloadold) */;
+ showdecisions();
+ worktoscreenm();
+ data.byte(kGetback) = 0;
+}
+
+void DreamGenContext::createname() {
+ STACK_CHECK;
+ push(ax);
+ di = 5105;
+ cs.byte(di+0) = dl;
+ cs.byte(di+3) = cl;
+ al = dh;
+ ah = '0'-1;
+findten:
+ _inc(ah);
+ _sub(al, 10);
+ if (!flags.c())
+ goto findten;
+ cs.byte(di+1) = ah;
+ _add(al, 10+'0');
+ cs.byte(di+2) = al;
+ ax = pop();
+ cl = '0'-1;
+thousandsc:
+ _inc(cl);
+ _sub(ax, 1000);
+ if (!flags.c())
+ goto thousandsc;
+ _add(ax, 1000);
+ cs.byte(di+4) = cl;
+ cl = '0'-1;
+hundredsc:
+ _inc(cl);
+ _sub(ax, 100);
+ if (!flags.c())
+ goto hundredsc;
+ _add(ax, 100);
+ cs.byte(di+5) = cl;
+ cl = '0'-1;
+tensc:
+ _inc(cl);
+ _sub(ax, 10);
+ if (!flags.c())
+ goto tensc;
+ _add(ax, 10);
+ cs.byte(di+6) = cl;
+ _add(al, '0');
+ cs.byte(di+7) = al;
+}
+
+void DreamGenContext::trysoundalloc() {
+ STACK_CHECK;
+ _cmp(data.byte(kNeedsoundbuff), 1);
+ if (flags.z())
+ return /* (gotsoundbuff) */;
+ _inc(data.byte(kSoundtimes));
+ bx = (16384+2048)/16;
+ allocatemem();
+ data.word(kSoundbuffer) = ax;
+ push(ax);
+ al = ah;
+ cl = 4;
+ _shr(al, cl);
+ data.byte(kSoundbufferpage) = al;
+ ax = pop();
+ cl = 4;
+ _shl(ax, cl);
+ data.word(kSoundbufferad) = ax;
+ _cmp(ax, 0x0b7ff);
+ if (!flags.c())
+ goto soundfail;
+ es = data.word(kSoundbuffer);
+ di = 0;
+ cx = 16384/2;
+ ax = 0x7f7f;
+ _stosw(cx, true);
+ data.byte(kNeedsoundbuff) = 1;
+ return;
+soundfail:
+ es = data.word(kSoundbuffer);
+ deallocatemem();
+}
+
+void DreamGenContext::playchannel0() {
+ STACK_CHECK;
+ _cmp(data.byte(kSoundint), 255);
+ if (flags.z())
+ return /* (dontbother4) */;
+ push(es);
+ push(ds);
+ push(bx);
+ push(cx);
+ push(di);
+ push(si);
+ data.byte(kCh0playing) = al;
+ es = data.word(kSounddata);
+ _cmp(al, 12);
+ if (flags.c())
+ goto notsecondbank;
+ es = data.word(kSounddata2);
+ _sub(al, 12);
+notsecondbank:
+ data.byte(kCh0repeat) = ah;
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ _add(ax, ax);
+ _add(bx, ax);
+ al = es.byte(bx);
+ ah = 0;
+ data.word(kCh0emmpage) = ax;
+ ax = es.word(bx+1);
+ data.word(kCh0offset) = ax;
+ ax = es.word(bx+3);
+ data.word(kCh0blockstocopy) = ax;
+ _cmp(data.byte(kCh0repeat), 0);
+ if (flags.z())
+ goto nosetloop;
+ ax = data.word(kCh0emmpage);
+ data.word(kCh0oldemmpage) = ax;
+ ax = data.word(kCh0offset);
+ data.word(kCh0oldoffset) = ax;
+ ax = data.word(kCh0blockstocopy);
+ data.word(kCh0oldblockstocopy) = ax;
+nosetloop:
+ si = pop();
+ di = pop();
+ cx = pop();
+ bx = pop();
+ ds = pop();
+ es = pop();
+}
+
+void DreamGenContext::playchannel1() {
+ STACK_CHECK;
+ _cmp(data.byte(kSoundint), 255);
+ if (flags.z())
+ return /* (dontbother5) */;
+ _cmp(data.byte(kCh1playing), 7);
+ if (flags.z())
+ return /* (dontbother5) */;
+ push(es);
+ push(ds);
+ push(bx);
+ push(cx);
+ push(di);
+ push(si);
+ data.byte(kCh1playing) = al;
+ es = data.word(kSounddata);
+ _cmp(al, 12);
+ if (flags.c())
+ goto notsecondbank1;
+ es = data.word(kSounddata2);
+ _sub(al, 12);
+notsecondbank1:
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ _add(ax, ax);
+ _add(bx, ax);
+ al = es.byte(bx);
+ ah = 0;
+ data.word(kCh1emmpage) = ax;
+ ax = es.word(bx+1);
+ data.word(kCh1offset) = ax;
+ ax = es.word(bx+3);
+ data.word(kCh1blockstocopy) = ax;
+ si = pop();
+ di = pop();
+ cx = pop();
+ bx = pop();
+ ds = pop();
+ es = pop();
+}
+
+void DreamGenContext::makenextblock() {
+ STACK_CHECK;
+ volumeadjust();
+ loopchannel0();
+ _cmp(data.word(kCh1blockstocopy), 0);
+ if (flags.z())
+ goto mightbeonlych0;
+ _cmp(data.word(kCh0blockstocopy), 0);
+ if (flags.z())
+ goto mightbeonlych1;
+ _dec(data.word(kCh0blockstocopy));
+ _dec(data.word(kCh1blockstocopy));
+ bothchannels();
+ return;
+mightbeonlych1:
+ data.byte(kCh0playing) = 255;
+ _cmp(data.word(kCh1blockstocopy), 0);
+ if (flags.z())
+ return /* (notch1only) */;
+ _dec(data.word(kCh1blockstocopy));
+ channel1only();
+ return;
+mightbeonlych0:
+ data.byte(kCh1playing) = 255;
+ _cmp(data.word(kCh0blockstocopy), 0);
+ if (flags.z())
+ goto notch0only;
+ _dec(data.word(kCh0blockstocopy));
+ channel0only();
+ return;
+notch0only:
+ es = data.word(kSoundbuffer);
+ di = data.word(kSoundbufferwrite);
+ cx = 1024;
+ ax = 0x7f7f;
+ _stosw(cx, true);
+ _and(di, 16384-1);
+ data.word(kSoundbufferwrite) = di;
+}
+
+void DreamGenContext::volumeadjust() {
+ STACK_CHECK;
+ al = data.byte(kVolumedirection);
+ _cmp(al, 0);
+ if (flags.z())
+ return /* (volok) */;
+ al = data.byte(kVolume);
+ _cmp(al, data.byte(kVolumeto));
+ if (flags.z())
+ goto volfinish;
+ _add(data.byte(kVolumecount), 64);
+ if (!flags.z())
+ return /* (volok) */;
+ al = data.byte(kVolume);
+ _add(al, data.byte(kVolumedirection));
+ data.byte(kVolume) = al;
+ return;
+volfinish:
+ data.byte(kVolumedirection) = 0;
+}
+
+void DreamGenContext::loopchannel0() {
+ STACK_CHECK;
+ _cmp(data.word(kCh0blockstocopy), 0);
+ if (!flags.z())
+ return /* (notloop) */;
+ _cmp(data.byte(kCh0repeat), 0);
+ if (flags.z())
+ return /* (notloop) */;
+ _cmp(data.byte(kCh0repeat), 255);
+ if (flags.z())
+ goto endlessloop;
+ _dec(data.byte(kCh0repeat));
+endlessloop:
+ ax = data.word(kCh0oldemmpage);
+ data.word(kCh0emmpage) = ax;
+ ax = data.word(kCh0oldoffset);
+ data.word(kCh0offset) = ax;
+ ax = data.word(kCh0blockstocopy);
+ _add(ax, data.word(kCh0oldblockstocopy));
+ data.word(kCh0blockstocopy) = ax;
+}
+
+void DreamGenContext::channel0tran() {
+ STACK_CHECK;
+ _cmp(data.byte(kVolume), 0);
+ if (!flags.z())
+ goto lowvolumetran;
+ cx = 1024;
+ _movsw(cx, true);
+ return;
+lowvolumetran:
+ cx = 1024;
+ bh = data.byte(kVolume);
+ bl = 0;
+ _add(bx, 16384-256);
+volloop:
+ _lodsw();
+ bl = al;
+ al = es.byte(bx);
+ bl = ah;
+ ah = es.byte(bx);
+ _stosw();
+ if (--cx)
+ goto volloop;
+}
+
+void DreamGenContext::domix() {
+ STACK_CHECK;
+ _cmp(data.byte(kVolume), 0);
+ if (!flags.z())
+ goto lowvolumemix;
+slow:
+ _lodsb();
+ ah = ds.byte(bx);
+ _inc(bx);
+ _cmp(al, dh);
+ if (!flags.c())
+ goto toplot;
+ _cmp(ah, dh);
+ if (!flags.c())
+ goto nodistort;
+ _add(al, ah);
+ if (flags.s())
+ goto botok;
+ _xor(al, al);
+ _stosb();
+ if (--cx)
+ goto slow;
+ return /* (doneit) */;
+botok:
+ _xor(al, dh);
+ _stosb();
+ if (--cx)
+ goto slow;
+ return /* (doneit) */;
+toplot:
+ _cmp(ah, dh);
+ if (flags.c())
+ goto nodistort;
+ _add(al, ah);
+ if (!flags.s())
+ goto topok;
+ al = dl;
+ _stosb();
+ if (--cx)
+ goto slow;
+ return /* (doneit) */;
+topok:
+ _xor(al, dh);
+ _stosb();
+ if (--cx)
+ goto slow;
+ return /* (doneit) */;
+nodistort:
+ _add(al, ah);
+ _xor(al, dh);
+ _stosb();
+ if (--cx)
+ goto slow;
+ return /* (doneit) */;
+lowvolumemix:
+ _lodsb();
+ push(bx);
+ bh = data.byte(kVolume);
+ _add(bh, 63);
+ bl = al;
+ al = es.byte(bx);
+ bx = pop();
+ ah = ds.byte(bx);
+ _inc(bx);
+ _cmp(al, dh);
+ if (!flags.c())
+ goto toplotv;
+ _cmp(ah, dh);
+ if (!flags.c())
+ goto nodistortv;
+ _add(al, ah);
+ if (flags.s())
+ goto botokv;
+ _xor(al, al);
+ _stosb();
+ if (--cx)
+ goto lowvolumemix;
+ return /* (doneit) */;
+botokv:
+ _xor(al, dh);
+ _stosb();
+ if (--cx)
+ goto lowvolumemix;
+ return /* (doneit) */;
+toplotv:
+ _cmp(ah, dh);
+ if (flags.c())
+ goto nodistortv;
+ _add(al, ah);
+ if (!flags.s())
+ goto topokv;
+ al = dl;
+ _stosb();
+ if (--cx)
+ goto lowvolumemix;
+ return /* (doneit) */;
+topokv:
+ _xor(al, dh);
+ _stosb();
+ if (--cx)
+ goto lowvolumemix;
+ return /* (doneit) */;
+nodistortv:
+ _add(al, ah);
+ _xor(al, dh);
+ _stosb();
+ if (--cx)
+ goto lowvolumemix;
+}
+
+void DreamGenContext::entrytexts() {
+ STACK_CHECK;
+ _cmp(data.byte(kLocation), 21);
+ if (!flags.z())
+ goto notloc15;
+ al = 28;
+ cx = 60;
+ dx = 11;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+ return;
+notloc15:
+ _cmp(data.byte(kLocation), 30);
+ if (!flags.z())
+ goto notloc43;
+ al = 27;
+ cx = 60;
+ dx = 11;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+ return;
+notloc43:
+ _cmp(data.byte(kLocation), 23);
+ if (!flags.z())
+ goto notloc23;
+ al = 29;
+ cx = 60;
+ dx = 11;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+ return;
+notloc23:
+ _cmp(data.byte(kLocation), 31);
+ if (!flags.z())
+ goto notloc44;
+ al = 30;
+ cx = 60;
+ dx = 11;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+ return;
+notloc44:
+ _cmp(data.byte(kLocation), 20);
+ if (!flags.z())
+ goto notsarters2;
+ al = 31;
+ cx = 60;
+ dx = 11;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+ return;
+notsarters2:
+ _cmp(data.byte(kLocation), 24);
+ if (!flags.z())
+ goto notedenlob;
+ al = 32;
+ cx = 60;
+ dx = 3;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+ return;
+notedenlob:
+ _cmp(data.byte(kLocation), 34);
+ if (!flags.z())
+ return /* (noteden2) */;
+ al = 33;
+ cx = 60;
+ dx = 3;
+ bl = 68;
+ bh = 64;
+ setuptimeduse();
+}
+
+void DreamGenContext::entryanims() {
+ STACK_CHECK;
+ data.word(kReeltowatch) = -1;
+ data.byte(kWatchmode) = -1;
+ _cmp(data.byte(kLocation), 33);
+ if (!flags.z())
+ goto notinthebeach;
+ switchryanoff();
+ data.word(kWatchingtime) = 76*2;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 76;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ return;
+notinthebeach:
+ _cmp(data.byte(kLocation), 44);
+ if (!flags.z())
+ goto notsparkys;
+ al = 8;
+ resetlocation();
+ data.word(kWatchingtime) = 50*2;
+ data.word(kReeltowatch) = 247;
+ data.word(kEndwatchreel) = 297;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchryanoff();
+ return;
+notsparkys:
+ _cmp(data.byte(kLocation), 22);
+ if (!flags.z())
+ goto notinthelift;
+ data.word(kWatchingtime) = 31*2;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 30;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchryanoff();
+ return;
+notinthelift:
+ _cmp(data.byte(kLocation), 26);
+ if (!flags.z())
+ goto notunderchurch;
+ data.byte(kSymboltopnum) = 2;
+ data.byte(kSymbolbotnum) = 1;
+ return;
+notunderchurch:
+ _cmp(data.byte(kLocation), 45);
+ if (!flags.z())
+ goto notenterdream;
+ data.byte(kKeeperflag) = 0;
+ data.word(kWatchingtime) = 296;
+ data.word(kReeltowatch) = 45;
+ data.word(kEndwatchreel) = 198;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchryanoff();
+ return;
+notenterdream:
+ _cmp(data.byte(kReallocation), 46);
+ if (!flags.z())
+ goto notcrystal;
+ _cmp(data.byte(kSartaindead), 1);
+ if (!flags.z())
+ goto notcrystal;
+ al = 0;
+ removefreeobject();
+ return;
+notcrystal:
+ _cmp(data.byte(kLocation), 9);
+ if (!flags.z())
+ goto nottopchurch;
+ al = 2;
+ checkifpathison();
+ if (flags.z())
+ goto nottopchurch;
+ _cmp(data.byte(kAidedead), 0);
+ if (flags.z())
+ goto nottopchurch;
+ al = 3;
+ checkifpathison();
+ if (!flags.z())
+ goto makedoorsopen;
+ al = 2;
+ turnpathon();
+makedoorsopen:
+ al = 4;
+ removesetobject();
+ al = 5;
+ placesetobject();
+ return;
+nottopchurch:
+ _cmp(data.byte(kLocation), 47);
+ if (!flags.z())
+ goto notdreamcentre;
+ al = 4;
+ placesetobject();
+ al = 5;
+ placesetobject();
+ return;
+notdreamcentre:
+ _cmp(data.byte(kLocation), 38);
+ if (!flags.z())
+ goto notcarpark;
+ data.word(kWatchingtime) = 57*2;
+ data.word(kReeltowatch) = 4;
+ data.word(kEndwatchreel) = 57;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchryanoff();
+ return;
+notcarpark:
+ _cmp(data.byte(kLocation), 32);
+ if (!flags.z())
+ goto notalley;
+ data.word(kWatchingtime) = 66*2;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 66;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchryanoff();
+ return;
+notalley:
+ _cmp(data.byte(kLocation), 24);
+ if (!flags.z())
+ return /* (notedensagain) */;
+ al = 2;
+ ah = data.byte(kRoomnum);
+ _dec(ah);
+ turnanypathon();
+}
+
+void DreamGenContext::initialinv() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 24);
+ if (flags.z())
+ goto isedens;
+ return;
+isedens:
+ al = 11;
+ ah = 5;
+ pickupob();
+ al = 12;
+ ah = 6;
+ pickupob();
+ al = 13;
+ ah = 7;
+ pickupob();
+ al = 14;
+ ah = 8;
+ pickupob();
+ al = 18;
+ al = 18;
+ ah = 0;
+ pickupob();
+ al = 19;
+ ah = 1;
+ pickupob();
+ al = 20;
+ ah = 9;
+ pickupob();
+ al = 16;
+ ah = 2;
+ pickupob();
+ data.byte(kWatchmode) = 1;
+ data.word(kReeltohold) = 0;
+ data.word(kEndofholdreel) = 6;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchryanoff();
+}
+
+void DreamGenContext::pickupob() {
+ STACK_CHECK;
+ data.byte(kLastinvpos) = ah;
+ data.byte(kObjecttype) = 2;
+ data.byte(kItemframe) = al;
+ data.byte(kCommand) = al;
+ getanyad();
+ transfertoex();
+}
+
+void DreamGenContext::checkforemm() {
+ STACK_CHECK;
+}
+
+void DreamGenContext::checkbasemem() {
+ STACK_CHECK;
+ bx = data.word(kHowmuchalloc);
+ _cmp(bx, 0x9360);
+ if (!flags.c())
+ return /* (enoughmem) */;
+ data.byte(kGameerror) = 5;
+ { quickquit(); return; };
+}
+
+void DreamGenContext::allocatebuffers() {
+ STACK_CHECK;
+ bx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/16;
+ allocatemem();
+ data.word(kExtras) = ax;
+ trysoundalloc();
+ bx = (0+(66*60))/16;
+ allocatemem();
+ data.word(kMapdata) = ax;
+ trysoundalloc();
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534+68-0)/16;
+ allocatemem();
+ data.word(kBuffers) = ax;
+ trysoundalloc();
+ bx = (16*80)/16;
+ allocatemem();
+ data.word(kFreedat) = ax;
+ trysoundalloc();
+ bx = (64*128)/16;
+ allocatemem();
+ data.word(kSetdat) = ax;
+ trysoundalloc();
+ bx = (22*8*20*8)/16;
+ allocatemem();
+ data.word(kMapstore) = ax;
+ allocatework();
+ bx = 2048/16;
+ allocatemem();
+ data.word(kSounddata) = ax;
+ bx = 2048/16;
+ allocatemem();
+ data.word(kSounddata2) = ax;
+}
+
+void DreamGenContext::clearbuffers() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ cx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534+68-0)/2;
+ ax = 0;
+ di = 0;
+ _stosw(cx, true);
+ es = data.word(kExtras);
+ cx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/2;
+ ax = 0x0ffff;
+ di = 0;
+ _stosw(cx, true);
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
+ ds = cs;
+ si = 534;
+ cx = (991-534);
+ _movsb(cx, true);
+ es = data.word(kBuffers);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534);
+ ds = cs;
+ si = 0;
+ cx = (68-0);
+ _movsb(cx, true);
+ clearchanges();
+}
+
+void DreamGenContext::clearchanges() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ cx = (250)*2;
+ ax = 0x0ffff;
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ _stosw(cx, true);
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
+ es = cs;
+ di = 534;
+ cx = (991-534);
+ _movsb(cx, true);
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534);
+ es = cs;
+ di = 0;
+ cx = (68-0);
+ _movsb(cx, true);
+ data.byte(kExpos) = 0;
+ data.word(kExframepos) = 0;
+ data.word(kExtextpos) = 0;
+ es = data.word(kExtras);
+ cx = (0+2080+30000+(16*114)+((114+2)*2)+18000)/2;
+ ax = 0x0ffff;
+ di = 0;
+ _stosw(cx, true);
+ es = cs;
+ di = 8011;
+ al = 1;
+ _stosb(2);
+ al = 0;
+ _stosb();
+ al = 1;
+ _stosb();
+ ax = 0;
+ cx = 6;
+ _stosw(cx, true);
+}
+
+void DreamGenContext::clearbeforeload() {
+ STACK_CHECK;
+ _cmp(data.byte(kRoomloaded), 1);
+ if (!flags.z())
+ return /* (noclear) */;
+ clearreels();
+ clearrest();
+ data.byte(kRoomloaded) = 0;
+}
+
+void DreamGenContext::clearreels() {
+ STACK_CHECK;
+ es = data.word(kReel1);
+ deallocatemem();
+ es = data.word(kReel2);
+ deallocatemem();
+ es = data.word(kReel3);
+ deallocatemem();
+}
+
+void DreamGenContext::clearrest() {
+ STACK_CHECK;
+ es = data.word(kMapdata);
+ cx = (66*60)/2;
+ ax = 0;
+ di = (0);
+ _stosw(cx, true);
+ es = data.word(kBackdrop);
+ deallocatemem();
+ es = data.word(kSetframes);
+ deallocatemem();
+ es = data.word(kReels);
+ deallocatemem();
+ es = data.word(kPeople);
+ deallocatemem();
+ es = data.word(kSetdesc);
+ deallocatemem();
+ es = data.word(kBlockdesc);
+ deallocatemem();
+ es = data.word(kRoomdesc);
+ deallocatemem();
+ es = data.word(kFreeframes);
+ deallocatemem();
+ es = data.word(kFreedesc);
+ deallocatemem();
+}
+
+void DreamGenContext::parseblaster() {
+ STACK_CHECK;
+lookattail:
+ al = es.byte(bx);
+ _cmp(al, 0);
+ if (flags.z())
+ return /* (endtail) */;
+ _cmp(al, 13);
+ if (flags.z())
+ return /* (endtail) */;
+ _cmp(al, 'i');
+ if (flags.z())
+ goto issoundint;
+ _cmp(al, 'I');
+ if (flags.z())
+ goto issoundint;
+ _cmp(al, 'b');
+ if (flags.z())
+ goto isbright;
+ _cmp(al, 'B');
+ if (flags.z())
+ goto isbright;
+ _cmp(al, 'a');
+ if (flags.z())
+ goto isbaseadd;
+ _cmp(al, 'A');
+ if (flags.z())
+ goto isbaseadd;
+ _cmp(al, 'n');
+ if (flags.z())
+ goto isnosound;
+ _cmp(al, 'N');
+ if (flags.z())
+ goto isnosound;
+ _cmp(al, 'd');
+ if (flags.z())
+ goto isdma;
+ _cmp(al, 'D');
+ if (flags.z())
+ goto isdma;
+ _inc(bx);
+ if (--cx)
+ goto lookattail;
+ return;
+issoundint:
+ al = es.byte(bx+1);
+ _sub(al, '0');
+ data.byte(kSoundint) = al;
+ _inc(bx);
+ goto lookattail;
+isdma:
+ al = es.byte(bx+1);
+ _sub(al, '0');
+ data.byte(kSounddmachannel) = al;
+ _inc(bx);
+ goto lookattail;
+isbaseadd:
+ push(cx);
+ al = es.byte(bx+2);
+ _sub(al, '0');
+ ah = 0;
+ cl = 4;
+ _shl(ax, cl);
+ _add(ax, 0x200);
+ data.word(kSoundbaseadd) = ax;
+ cx = pop();
+ _inc(bx);
+ goto lookattail;
+isbright:
+ data.byte(kBrightness) = 1;
+ _inc(bx);
+ goto lookattail;
+isnosound:
+ data.byte(kSoundint) = 255;
+ _inc(bx);
+ goto lookattail;
+}
+
+void DreamGenContext::startup() {
+ STACK_CHECK;
+ data.byte(kCurrentkey) = 0;
+ data.byte(kMainmode) = 0;
+ createpanel();
+ data.byte(kNewobs) = 1;
+ drawfloor();
+ showicon();
+ getunderzoom();
+ spriteupdate();
+ printsprites();
+ undertextline();
+ reelsonscreen();
+ atmospheres();
+}
+
+void DreamGenContext::startup1() {
+ STACK_CHECK;
+ clearpalette();
+ data.byte(kThroughdoor) = 0;
+ data.byte(kCurrentkey) = '0';
+ data.byte(kMainmode) = 0;
+ createpanel();
+ data.byte(kNewobs) = 1;
+ drawfloor();
+ showicon();
+ getunderzoom();
+ spriteupdate();
+ printsprites();
+ undertextline();
+ reelsonscreen();
+ atmospheres();
+ worktoscreen();
+ fadescreenup();
+}
+
+void DreamGenContext::screenupdate() {
+ STACK_CHECK;
+ newplace();
+ mainscreen();
+ animpointer();
+ showpointer();
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ goto iswatchingmode;
+ _cmp(data.byte(kNewlocation), 255);
+ if (!flags.z())
+ return /* (finishearly) */;
+iswatchingmode:
+ vsync();
+ readmouse1();
+ dumppointer();
+ dumptextline();
+ delpointer();
+ autolook();
+ spriteupdate();
+ watchcount();
+ zoom();
+ showpointer();
+ _cmp(data.byte(kWongame), 0);
+ if (!flags.z())
+ return /* (finishearly) */;
+ vsync();
+ readmouse2();
+ dumppointer();
+ dumpzoom();
+ delpointer();
+ deleverything();
+ printsprites();
+ reelsonscreen();
+ afternewroom();
+ showpointer();
+ vsync();
+ readmouse3();
+ dumppointer();
+ dumpmap();
+ dumptimedtext();
+ delpointer();
+ showpointer();
+ vsync();
+ readmouse4();
+ dumppointer();
+ dumpwatch();
+ delpointer();
+}
+
+void DreamGenContext::watchreel() {
+ STACK_CHECK;
+ _cmp(data.word(kReeltowatch), -1);
+ if (flags.z())
+ goto notplayingreel;
+ al = data.byte(kManspath);
+ _cmp(al, data.byte(kFinaldest));
+ if (!flags.z())
+ return /* (waitstopwalk) */;
+ al = data.byte(kTurntoface);
+ _cmp(al, data.byte(kFacing));
+ if (flags.z())
+ goto notwatchpath;
+ return;
+notwatchpath:
+ _dec(data.byte(kSpeedcount));
+ _cmp(data.byte(kSpeedcount), -1);
+ if (!flags.z())
+ goto showwatchreel;
+ al = data.byte(kWatchspeed);
+ data.byte(kSpeedcount) = al;
+ ax = data.word(kReeltowatch);
+ _cmp(ax, data.word(kEndwatchreel));
+ if (!flags.z())
+ goto ismorereel;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ goto showwatchreel;
+ data.word(kReeltowatch) = -1;
+ data.byte(kWatchmode) = -1;
+ _cmp(data.word(kReeltohold), -1);
+ if (flags.z())
+ return /* (nomorereel) */;
+ data.byte(kWatchmode) = 1;
+ goto notplayingreel;
+ismorereel:
+ _inc(data.word(kReeltowatch));
+showwatchreel:
+ ax = data.word(kReeltowatch);
+ data.word(kReelpointer) = ax;
+ plotreel();
+ ax = data.word(kReelpointer);
+ data.word(kReeltowatch) = ax;
+ checkforshake();
+ return;
+notplayingreel:
+ _cmp(data.byte(kWatchmode), 1);
+ if (!flags.z())
+ goto notholdingreel;
+ ax = data.word(kReeltohold);
+ data.word(kReelpointer) = ax;
+ plotreel();
+ return;
+notholdingreel:
+ _cmp(data.byte(kWatchmode), 2);
+ if (!flags.z())
+ return /* (notreleasehold) */;
+ _dec(data.byte(kSpeedcount));
+ _cmp(data.byte(kSpeedcount), -1);
+ if (!flags.z())
+ goto notlastspeed2;
+ al = data.byte(kWatchspeed);
+ data.byte(kSpeedcount) = al;
+ _inc(data.word(kReeltohold));
+notlastspeed2:
+ ax = data.word(kReeltohold);
+ _cmp(ax, data.word(kEndofholdreel));
+ if (!flags.z())
+ goto ismorereel2;
+ data.word(kReeltohold) = -1;
+ data.byte(kWatchmode) = -1;
+ al = data.byte(kDestafterhold);
+ data.byte(kDestination) = al;
+ data.byte(kFinaldest) = al;
+ autosetwalk();
+ return;
+ismorereel2:
+ ax = data.word(kReeltohold);
+ data.word(kReelpointer) = ax;
+ plotreel();
+}
+
+void DreamGenContext::checkforshake() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 26);
+ if (!flags.z())
+ return /* (notstartshake) */;
+ _cmp(ax, 104);
+ if (!flags.z())
+ return /* (notstartshake) */;
+ data.byte(kShakecounter) = -1;
+}
+
+void DreamGenContext::watchcount() {
+ STACK_CHECK;
+ _cmp(data.byte(kWatchon), 0);
+ if (flags.z())
+ return /* (nowatchworn) */;
+ _inc(data.byte(kTimercount));
+ _cmp(data.byte(kTimercount), 9);
+ if (flags.z())
+ goto flashdots;
+ _cmp(data.byte(kTimercount), 18);
+ if (flags.z())
+ goto uptime;
+ return;
+flashdots:
+ ax = 91*3+21;
+ di = 268+4;
+ bx = 21;
+ ds = data.word(kCharset1);
+ showframe();
+ goto finishwatch;
+uptime:
+ data.byte(kTimercount) = 0;
+ _add(data.byte(kSecondcount), 1);
+ _cmp(data.byte(kSecondcount), 60);
+ if (!flags.z())
+ goto finishtime;
+ data.byte(kSecondcount) = 0;
+ _inc(data.byte(kMinutecount));
+ _cmp(data.byte(kMinutecount), 60);
+ if (!flags.z())
+ goto finishtime;
+ data.byte(kMinutecount) = 0;
+ _inc(data.byte(kHourcount));
+ _cmp(data.byte(kHourcount), 24);
+ if (!flags.z())
+ goto finishtime;
+ data.byte(kHourcount) = 0;
+finishtime:
+ showtime();
+finishwatch:
+ data.byte(kWatchdump) = 1;
+}
+
+void DreamGenContext::showtime() {
+ STACK_CHECK;
+ _cmp(data.byte(kWatchon), 0);
+ if (flags.z())
+ return /* (nowatch) */;
+ al = data.byte(kSecondcount);
+ cl = 0;
+ twodigitnum();
+ push(ax);
+ al = ah;
+ ah = 0;
+ _add(ax, 91*3+10);
+ ds = data.word(kCharset1);
+ di = 282+5;
+ bx = 21;
+ showframe();
+ ax = pop();
+ ah = 0;
+ _add(ax, 91*3+10);
+ ds = data.word(kCharset1);
+ di = 282+9;
+ bx = 21;
+ showframe();
+ al = data.byte(kMinutecount);
+ cl = 0;
+ twodigitnum();
+ push(ax);
+ al = ah;
+ ah = 0;
+ _add(ax, 91*3);
+ ds = data.word(kCharset1);
+ di = 270+5;
+ bx = 21;
+ showframe();
+ ax = pop();
+ ah = 0;
+ _add(ax, 91*3);
+ ds = data.word(kCharset1);
+ di = 270+11;
+ bx = 21;
+ showframe();
+ al = data.byte(kHourcount);
+ cl = 0;
+ twodigitnum();
+ push(ax);
+ al = ah;
+ ah = 0;
+ _add(ax, 91*3);
+ ds = data.word(kCharset1);
+ di = 256+5;
+ bx = 21;
+ showframe();
+ ax = pop();
+ ah = 0;
+ _add(ax, 91*3);
+ ds = data.word(kCharset1);
+ di = 256+11;
+ bx = 21;
+ showframe();
+ ax = 91*3+20;
+ ds = data.word(kCharset1);
+ di = 267+5;
+ bx = 21;
+ showframe();
+}
+
+void DreamGenContext::dumpwatch() {
+ STACK_CHECK;
+ _cmp(data.byte(kWatchdump), 1);
+ if (!flags.z())
+ return /* (nodumpwatch) */;
+ di = 256;
+ bx = 21;
+ cl = 40;
+ ch = 12;
+ multidump();
+ data.byte(kWatchdump) = 0;
+}
+
+void DreamGenContext::showbyte() {
+ STACK_CHECK;
+ dl = al;
+ _shr(dl, 1);
+ _shr(dl, 1);
+ _shr(dl, 1);
+ _shr(dl, 1);
+ onedigit();
+ es.byte(di) = dl;
+ dl = al;
+ _and(dl, 15);
+ onedigit();
+ es.byte(di+1) = dl;
+ _add(di, 3);
+}
+
+void DreamGenContext::onedigit() {
+ STACK_CHECK;
+ _cmp(dl, 10);
+ if (!flags.c())
+ goto morethan10;
+ _add(dl, '0');
+ return;
+morethan10:
+ _sub(dl, 10);
+ _add(dl, 'A');
+}
+
+void DreamGenContext::twodigitnum() {
+ STACK_CHECK;
+ ah = cl;
+ _dec(ah);
+numloop1:
+ _inc(ah);
+ _sub(al, 10);
+ if (!flags.c())
+ goto numloop1;
+ _add(al, 10);
+ _add(al, cl);
+}
+
+void DreamGenContext::showword() {
+ STACK_CHECK;
+ ch = 0;
+ bx = 10000;
+ cl = 47;
+word1:
+ _inc(cl);
+ _sub(ax, bx);
+ if (!flags.c())
+ goto word1;
+ _add(ax, bx);
+ convnum();
+ cs.byte(di) = cl;
+ bx = 1000;
+ cl = 47;
+word2:
+ _inc(cl);
+ _sub(ax, bx);
+ if (!flags.c())
+ goto word2;
+ _add(ax, bx);
+ convnum();
+ cs.byte(di+1) = cl;
+ bx = 100;
+ cl = 47;
+word3:
+ _inc(cl);
+ _sub(ax, bx);
+ if (!flags.c())
+ goto word3;
+ _add(ax, bx);
+ convnum();
+ cs.byte(di+2) = cl;
+ bx = 10;
+ cl = 47;
+word4:
+ _inc(cl);
+ _sub(ax, bx);
+ if (!flags.c())
+ goto word4;
+ _add(ax, bx);
+ convnum();
+ cs.byte(di+3) = cl;
+ _add(al, 48);
+ cl = al;
+ convnum();
+ cs.byte(di+4) = cl;
+}
+
+void DreamGenContext::convnum() {
+ STACK_CHECK;
+ _cmp(ch, 0);
+ if (!flags.z())
+ return /* (noconvnum) */;
+ _cmp(cl, '0');
+ if (!flags.z())
+ goto notzeronum;
+ cl = 32;
+ return /* (noconvnum) */;
+notzeronum:
+ ch = 1;
+}
+
+void DreamGenContext::walkandexamine() {
+ STACK_CHECK;
+ finishedwalking();
+ if (!flags.z())
+ return /* (noobselect) */;
+ al = data.byte(kWalkexamtype);
+ data.byte(kCommandtype) = al;
+ al = data.byte(kWalkexamnum);
+ data.byte(kCommand) = al;
+ data.byte(kWalkandexam) = 0;
+ _cmp(data.byte(kCommandtype), 5);
+ if (flags.z())
+ return /* (noobselect) */;
+ examineob();
+ return;
+wantstowalk:
+ setwalk();
+ data.byte(kReasseschanges) = 1;
+ return;
+diff:
+ data.byte(kCommand) = al;
+ data.byte(kCommandtype) = ah;
+ _cmp(data.byte(kLinepointer), 254);
+ if (!flags.z())
+ goto middleofwalk;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ goto middleofwalk;
+ al = data.byte(kFacing);
+ _cmp(al, data.byte(kTurntoface));
+ if (!flags.z())
+ goto middleofwalk;
+ _cmp(data.byte(kCommandtype), 3);
+ if (!flags.z())
+ goto notblock;
+ bl = data.byte(kManspath);
+ _cmp(bl, data.byte(kPointerspath));
+ if (!flags.z())
+ goto dontcheck;
+ cl = data.byte(kRyanx);
+ _add(cl, 12);
+ ch = data.byte(kRyany);
+ _add(ch, 12);
+ checkone();
+ _cmp(cl, 2);
+ if (flags.c())
+ goto isblock;
+dontcheck:
+ getflagunderp();
+ _cmp(data.byte(kLastflag), 2);
+ if (flags.c())
+ goto isblock;
+ _cmp(data.byte(kLastflag), 128);
+ if (!flags.c())
+ goto isblock;
+ goto toofaraway;
+notblock:
+ bl = data.byte(kManspath);
+ _cmp(bl, data.byte(kPointerspath));
+ if (!flags.z())
+ goto toofaraway;
+ _cmp(data.byte(kCommandtype), 3);
+ if (flags.z())
+ goto isblock;
+ _cmp(data.byte(kCommandtype), 5);
+ if (flags.z())
+ goto isaperson;
+ examineobtext();
+ return;
+middleofwalk:
+ blocknametext();
+ return;
+isblock:
+ blocknametext();
+ return;
+isaperson:
+ personnametext();
+ return;
+toofaraway:
+ walktotext();
+}
+
+void DreamGenContext::mainscreen() {
+ STACK_CHECK;
+ data.byte(kInmaparea) = 0;
+ bx = 5122;
+ _cmp(data.byte(kWatchon), 1);
+ if (flags.z())
+ goto checkmain;
+ bx = 5184;
+checkmain:
+ checkcoords();
+ _cmp(data.byte(kWalkandexam), 0);
+ if (flags.z())
+ return /* (finishmain) */;
+ walkandexamine();
+}
+
+void DreamGenContext::madmanrun() {
+ STACK_CHECK;
+ _cmp(data.byte(kLocation), 14);
+ if (!flags.z())
+ { identifyob(); return; };
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ { identifyob(); return; };
+ _cmp(data.byte(kPointermode), 2);
+ if (!flags.z())
+ { identifyob(); return; };
+ _cmp(data.byte(kMadmanflag), 0);
+ if (!flags.z())
+ { identifyob(); return; };
+ _cmp(data.byte(kCommandtype), 211);
+ if (flags.z())
+ goto alreadyrun;
+ data.byte(kCommandtype) = 211;
+ al = 52;
+ commandonly();
+alreadyrun:
+ _cmp(data.word(kMousebutton), 1);
+ if (!flags.z())
+ return /* (norun) */;
+ ax = data.word(kMousebutton);
+ _cmp(ax, data.word(kOldbutton));
+ if (flags.z())
+ return /* (norun) */;
+ data.byte(kLastweapon) = 8;
+}
+
+void DreamGenContext::checkcoords() {
+ STACK_CHECK;
+ _cmp(data.byte(kNewlocation), 255);
+ if (flags.z())
+ goto loop048;
+ return;
+loop048:
+ ax = cs.word(bx);
+ _cmp(ax, 0x0ffff);
+ if (flags.z())
+ return /* (nonefound) */;
+ push(bx);
+ _cmp(data.word(kMousex), ax);
+ if (flags.l())
+ goto over045;
+ ax = cs.word(bx+2);
+ _cmp(data.word(kMousex), ax);
+ if (!flags.l())
+ goto over045;
+ ax = cs.word(bx+4);
+ _cmp(data.word(kMousey), ax);
+ if (flags.l())
+ goto over045;
+ ax = cs.word(bx+6);
+ _cmp(data.word(kMousey), ax);
+ if (!flags.l())
+ goto over045;
+ ax = cs.word(bx+8);
+ __dispatch_call(ax);
+ ax = pop();
+ return;
+over045:
+ bx = pop();
+ _add(bx, 10);
+ goto loop048;
+}
+
+void DreamGenContext::identifyob() {
+ STACK_CHECK;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ { blank(); return; };
+ ax = data.word(kMousex);
+ _sub(ax, data.word(kMapadx));
+ _cmp(ax, 22*8);
+ if (flags.c())
+ goto notover1;
+ blank();
+ return;
+notover1:
+ bx = data.word(kMousey);
+ _sub(bx, data.word(kMapady));
+ _cmp(bx, 20*8);
+ if (flags.c())
+ goto notover2;
+ blank();
+ return;
+notover2:
+ data.byte(kInmaparea) = 1;
+ ah = bl;
+ push(ax);
+ findpathofpoint();
+ data.byte(kPointerspath) = dl;
+ ax = pop();
+ push(ax);
+ findfirstpath();
+ data.byte(kPointerfirstpath) = al;
+ ax = pop();
+ checkifex();
+ if (!flags.z())
+ return /* (finishidentify) */;
+ checkiffree();
+ if (!flags.z())
+ return /* (finishidentify) */;
+ checkifperson();
+ if (!flags.z())
+ return /* (finishidentify) */;
+ checkifset();
+ if (!flags.z())
+ return /* (finishidentify) */;
+ ax = data.word(kMousex);
+ _sub(ax, data.word(kMapadx));
+ cl = al;
+ ax = data.word(kMousey);
+ _sub(ax, data.word(kMapady));
+ ch = al;
+ checkone();
+ _cmp(al, 0);
+ if (flags.z())
+ goto nothingund;
+ _cmp(data.byte(kMandead), 1);
+ if (flags.z())
+ goto nothingund;
+ ah = 3;
+ obname();
+ return;
+nothingund:
+ blank();
+}
+
+void DreamGenContext::checkifperson() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
+ cx = 12;
+identifyreel:
+ push(cx);
+ _cmp(es.byte(bx+4), 255);
+ if (flags.z())
+ goto notareelid;
+ push(es);
+ push(bx);
+ push(ax);
+ ax = es.word(bx+0);
+ data.word(kReelpointer) = ax;
+ getreelstart();
+ _cmp(es.word(si+2), 0x0ffff);
+ if (!flags.z())
+ goto notblankpers;
+ _add(si, 5);
+notblankpers:
+ cx = es.word(si+2);
+ ax = es.word(si+0);
+ push(cx);
+ getreelframeax();
+ cx = pop();
+ _add(cl, es.byte(bx+4));
+ _add(ch, es.byte(bx+5));
+ dx = cx;
+ _add(dl, es.byte(bx+0));
+ _add(dh, es.byte(bx+1));
+ ax = pop();
+ bx = pop();
+ es = pop();
+ _cmp(al, cl);
+ if (flags.c())
+ goto notareelid;
+ _cmp(ah, ch);
+ if (flags.c())
+ goto notareelid;
+ _cmp(al, dl);
+ if (!flags.c())
+ goto notareelid;
+ _cmp(ah, dh);
+ if (!flags.c())
+ goto notareelid;
+ cx = pop();
+ ax = es.word(bx+2);
+ data.word(kPersondata) = ax;
+ al = es.byte(bx+4);
+ ah = 5;
+ obname();
+ al = 0;
+ _cmp(al, 1);
+ return;
+notareelid:
+ cx = pop();
+ _add(bx, 5);
+ _dec(cx);
+ if (!flags.z())
+ goto identifyreel;
+}
+
+void DreamGenContext::checkifset() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32))+(127*5);
+ cx = 127;
+identifyset:
+ _cmp(es.byte(bx+4), 255);
+ if (flags.z())
+ goto notasetid;
+ _cmp(al, es.byte(bx));
+ if (flags.c())
+ goto notasetid;
+ _cmp(al, es.byte(bx+2));
+ if (!flags.c())
+ goto notasetid;
+ _cmp(ah, es.byte(bx+1));
+ if (flags.c())
+ goto notasetid;
+ _cmp(ah, es.byte(bx+3));
+ if (!flags.c())
+ goto notasetid;
+ pixelcheckset();
+ if (flags.z())
+ goto notasetid;
+ isitdescribed();
+ if (flags.z())
+ goto notasetid;
+ al = es.byte(bx+4);
+ ah = 1;
+ obname();
+ al = 0;
+ _cmp(al, 1);
+ return;
+notasetid:
+ _sub(bx, 5);
+ _dec(cx);
+ _cmp(cx, -1);
+ if (!flags.z())
+ goto identifyset;
+}
+
+void DreamGenContext::checkifex() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5))+(99*5);
+ cx = 99;
+identifyex:
+ _cmp(es.byte(bx+4), 255);
+ if (flags.z())
+ goto notanexid;
+ _cmp(al, es.byte(bx));
+ if (flags.c())
+ goto notanexid;
+ _cmp(al, es.byte(bx+2));
+ if (!flags.c())
+ goto notanexid;
+ _cmp(ah, es.byte(bx+1));
+ if (flags.c())
+ goto notanexid;
+ _cmp(ah, es.byte(bx+3));
+ if (!flags.c())
+ goto notanexid;
+ al = es.byte(bx+4);
+ ah = 4;
+ obname();
+ al = 1;
+ _cmp(al, 0);
+ return;
+notanexid:
+ _sub(bx, 5);
+ _dec(cx);
+ _cmp(cx, -1);
+ if (!flags.z())
+ goto identifyex;
+}
+
+void DreamGenContext::checkiffree() {
+ STACK_CHECK;
+ es = data.word(kBuffers);
+ bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5))+(79*5);
+ cx = 79;
+identifyfree:
+ _cmp(es.byte(bx+4), 255);
+ if (flags.z())
+ goto notafreeid;
+ _cmp(al, es.byte(bx));
+ if (flags.c())
+ goto notafreeid;
+ _cmp(al, es.byte(bx+2));
+ if (!flags.c())
+ goto notafreeid;
+ _cmp(ah, es.byte(bx+1));
+ if (flags.c())
+ goto notafreeid;
+ _cmp(ah, es.byte(bx+3));
+ if (!flags.c())
+ goto notafreeid;
+ al = es.byte(bx+4);
+ ah = 2;
+ obname();
+ al = 0;
+ _cmp(al, 1);
+ return;
+notafreeid:
+ _sub(bx, 5);
+ _dec(cx);
+ _cmp(cx, -1);
+ if (!flags.z())
+ goto identifyfree;
+}
+
+void DreamGenContext::isitdescribed() {
+ STACK_CHECK;
+ push(ax);
+ push(cx);
+ push(es);
+ push(bx);
+ al = es.byte(bx+4);
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ es = data.word(kSetdesc);
+ _add(bx, (0));
+ ax = es.word(bx);
+ _add(ax, (0+(130*2)));
+ bx = ax;
+ dl = es.byte(bx);
+ bx = pop();
+ es = pop();
+ cx = pop();
+ ax = pop();
+ _cmp(dl, 0);
+}
+
+void DreamGenContext::findpathofpoint() {
+ STACK_CHECK;
+ push(ax);
+ bx = (0);
+ es = data.word(kReels);
+ al = data.byte(kRoomnum);
+ ah = 0;
+ cx = 144;
+ _mul(cx);
+ _add(bx, ax);
+ cx = pop();
+ dl = 0;
+pathloop:
+ al = es.byte(bx+6);
+ _cmp(al, 255);
+ if (!flags.z())
+ goto flunkedit;
+ ax = es.word(bx+2);
+ _cmp(ax, 0x0ffff);
+ if (flags.z())
+ goto flunkedit;
+ _cmp(cl, al);
+ if (flags.c())
+ goto flunkedit;
+ _cmp(ch, ah);
+ if (flags.c())
+ goto flunkedit;
+ ax = es.word(bx+4);
+ _cmp(cl, al);
+ if (!flags.c())
+ goto flunkedit;
+ _cmp(ch, ah);
+ if (!flags.c())
+ goto flunkedit;
+ return /* (gotvalidpath) */;
+flunkedit:
+ _add(bx, 8);
+ _inc(dl);
+ _cmp(dl, 12);
+ if (!flags.z())
+ goto pathloop;
+ dl = 255;
+}
+
+void DreamGenContext::findfirstpath() {
+ STACK_CHECK;
+ push(ax);
+ bx = (0);
+ es = data.word(kReels);
+ al = data.byte(kRoomnum);
+ ah = 0;
+ cx = 144;
+ _mul(cx);
+ _add(bx, ax);
+ cx = pop();
+ dl = 0;
+fpathloop:
+ ax = es.word(bx+2);
+ _cmp(ax, 0x0ffff);
+ if (flags.z())
+ goto nofirst;
+ _cmp(cl, al);
+ if (flags.c())
+ goto nofirst;
+ _cmp(ch, ah);
+ if (flags.c())
+ goto nofirst;
+ ax = es.word(bx+4);
+ _cmp(cl, al);
+ if (!flags.c())
+ goto nofirst;
+ _cmp(ch, ah);
+ if (!flags.c())
+ goto nofirst;
+ goto gotfirst;
+nofirst:
+ _add(bx, 8);
+ _inc(dl);
+ _cmp(dl, 12);
+ if (!flags.z())
+ goto fpathloop;
+ al = 0;
+ return;
+gotfirst:
+ al = es.byte(bx+6);
+}
+
+void DreamGenContext::turnpathon() {
+ STACK_CHECK;
+ push(ax);
+ push(ax);
+ cl = 255;
+ ch = data.byte(kRoomnum);
+ _add(ch, 100);
+ findormake();
+ ax = pop();
+ getroomspaths();
+ ax = pop();
+ _cmp(al, 255);
+ if (flags.z())
+ return /* (nopathon) */;
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = 255;
+ es.byte(bx+6) = al;
+}
+
+void DreamGenContext::turnpathoff() {
+ STACK_CHECK;
+ push(ax);
+ push(ax);
+ cl = 0;
+ ch = data.byte(kRoomnum);
+ _add(ch, 100);
+ findormake();
+ ax = pop();
+ getroomspaths();
+ ax = pop();
+ _cmp(al, 255);
+ if (flags.z())
+ return /* (nopathoff) */;
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = 0;
+ es.byte(bx+6) = al;
+}
+
+void DreamGenContext::turnanypathon() {
+ STACK_CHECK;
+ push(ax);
+ push(ax);
+ cl = 255;
+ ch = ah;
+ _add(ch, 100);
+ findormake();
+ ax = pop();
+ al = ah;
+ ah = 0;
+ cx = 144;
+ _mul(cx);
+ es = data.word(kReels);
+ bx = (0);
+ _add(bx, ax);
+ ax = pop();
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = 255;
+ es.byte(bx+6) = al;
+}
+
+void DreamGenContext::turnanypathoff() {
+ STACK_CHECK;
+ push(ax);
+ push(ax);
+ cl = 0;
+ ch = ah;
+ _add(ch, 100);
+ findormake();
+ ax = pop();
+ al = ah;
+ ah = 0;
+ cx = 144;
+ _mul(cx);
+ es = data.word(kReels);
+ bx = (0);
+ _add(bx, ax);
+ ax = pop();
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = 0;
+ es.byte(bx+6) = al;
+}
+
+void DreamGenContext::checkifpathison() {
+ STACK_CHECK;
+ push(ax);
+ getroomspaths();
+ ax = pop();
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = es.byte(bx+6);
+ _cmp(al, 255);
+}
+
+void DreamGenContext::afternewroom() {
+ STACK_CHECK;
+ _cmp(data.byte(kNowinnewroom), 0);
+ if (flags.z())
+ return /* (notnew) */;
+ data.word(kTimecount) = 0;
+ createpanel();
+ data.byte(kCommandtype) = 0;
+ findroominloc();
+ _cmp(data.byte(kRyanon), 1);
+ if (flags.z())
+ goto ryansoff;
+ al = data.byte(kRyanx);
+ _add(al, 12);
+ ah = data.byte(kRyany);
+ _add(ah, 12);
+ findpathofpoint();
+ data.byte(kManspath) = dl;
+ findxyfrompath();
+ data.byte(kResetmanxy) = 1;
+ryansoff:
+ data.byte(kNewobs) = 1;
+ drawfloor();
+ data.word(kLookcounter) = 160;
+ data.byte(kNowinnewroom) = 0;
+ showicon();
+ spriteupdate();
+ printsprites();
+ undertextline();
+ reelsonscreen();
+ mainscreen();
+ getunderzoom();
+ zoom();
+ worktoscreenm();
+ walkintoroom();
+ reminders();
+ atmospheres();
+}
+
+void DreamGenContext::atmospheres() {
+ STACK_CHECK;
+ cl = data.byte(kMapx);
+ ch = data.byte(kMapy);
+ bx = 5246;
+nextatmos:
+ al = cs.byte(bx);
+ _cmp(al, 255);
+ if (flags.z())
+ goto nomoreatmos;
+ _cmp(al, data.byte(kReallocation));
+ if (!flags.z())
+ goto wrongatmos;
+ ax = cs.word(bx+1);
+ _cmp(ax, cx);
+ if (!flags.z())
+ goto wrongatmos;
+ ax = cs.word(bx+3);
+ _cmp(al, data.byte(kCh0playing));
+ if (flags.z())
+ goto playingalready;
+ _cmp(data.byte(kLocation), 45);
+ if (!flags.z())
+ goto notweb;
+ _cmp(data.word(kReeltowatch), 45);
+ if (flags.z())
+ goto wrongatmos;
+notweb:
+ playchannel0();
+ _cmp(data.byte(kReallocation), 2);
+ _cmp(data.byte(kMapy), 0);
+ if (flags.z())
+ goto fullvol;
+ if (!flags.z())
+ goto notlouisvol;
+ _cmp(data.byte(kMapy), 10);
+ if (!flags.z())
+ goto notlouisvol;
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ goto notlouisvol;
+ data.byte(kVolume) = 5;
+notlouisvol:
+ _cmp(data.byte(kReallocation), 14);
+ if (!flags.z())
+ goto notmad1;
+ _cmp(data.byte(kMapx), 33);
+ if (flags.z())
+ goto ismad2;
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ goto notmad1;
+ data.byte(kVolume) = 5;
+ return;
+ismad2:
+ data.byte(kVolume) = 0;
+ return;
+notmad1:
+playingalready:
+ _cmp(data.byte(kReallocation), 2);
+ if (!flags.z())
+ return /* (notlouisvol2) */;
+ _cmp(data.byte(kMapx), 22);
+ if (flags.z())
+ goto louisvol;
+ _cmp(data.byte(kMapx), 11);
+ if (!flags.z())
+ return /* (notlouisvol2) */;
+fullvol:
+ data.byte(kVolume) = 0;
+ return;
+louisvol:
+ data.byte(kVolume) = 5;
+ return;
+wrongatmos:
+ _add(bx, 5);
+ goto nextatmos;
+nomoreatmos:
+ cancelch0();
+}
+
+void DreamGenContext::walkintoroom() {
+ STACK_CHECK;
+ _cmp(data.byte(kLocation), 14);
+ if (!flags.z())
+ return /* (notlair) */;
+ _cmp(data.byte(kMapx), 22);
+ if (!flags.z())
+ return /* (notlair) */;
+ data.byte(kDestination) = 1;
+ data.byte(kFinaldest) = 1;
+ autosetwalk();
+}
+
+void DreamGenContext::afterintroroom() {
+ STACK_CHECK;
+ _cmp(data.byte(kNowinnewroom), 0);
+ if (flags.z())
+ return /* (notnewintro) */;
+ clearwork();
+ findroominloc();
+ data.byte(kNewobs) = 1;
+ drawfloor();
+ reelsonscreen();
+ spriteupdate();
+ printsprites();
+ worktoscreen();
+ data.byte(kNowinnewroom) = 0;
+}
+
+void DreamGenContext::obname() {
+ STACK_CHECK;
+ _cmp(data.byte(kReasseschanges), 0);
+ if (flags.z())
+ goto notnewpath;
+ data.byte(kReasseschanges) = 0;
+ goto diff;
+notnewpath:
+ _cmp(ah, data.byte(kCommandtype));
+ if (flags.z())
+ goto notdiffob;
+ goto diff;
+notdiffob:
+ _cmp(al, data.byte(kCommand));
+ if (!flags.z())
+ goto diff;
+ _cmp(data.byte(kWalkandexam), 1);
+ if (flags.z())
+ goto walkandexamine;
+ _cmp(data.word(kMousebutton), 0);
+ if (flags.z())
+ return /* (noobselect) */;
+ _cmp(data.byte(kCommandtype), 3);
+ if (!flags.z())
+ goto isntblock;
+ _cmp(data.byte(kLastflag), 2);
+ if (flags.c())
+ return /* (noobselect) */;
+isntblock:
+ bl = data.byte(kManspath);
+ _cmp(bl, data.byte(kPointerspath));
+ if (!flags.z())
+ goto wantstowalk;
+ _cmp(data.byte(kCommandtype), 3);
+ if (flags.z())
+ goto wantstowalk;
+ finishedwalking();
+ if (!flags.z())
+ return /* (noobselect) */;
+ _cmp(data.byte(kCommandtype), 5);
+ if (flags.z())
+ goto wantstotalk;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ return /* (noobselect) */;
+ examineob();
+ return;
+wantstotalk:
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ return /* (noobselect) */;
+ talk();
+ return;
+walkandexamine:
+ finishedwalking();
+ if (!flags.z())
+ return /* (noobselect) */;
+ al = data.byte(kWalkexamtype);
+ data.byte(kCommandtype) = al;
+ al = data.byte(kWalkexamnum);
+ data.byte(kCommand) = al;
+ data.byte(kWalkandexam) = 0;
+ _cmp(data.byte(kCommandtype), 5);
+ if (flags.z())
+ return /* (noobselect) */;
+ examineob();
+ return;
+wantstowalk:
+ setwalk();
+ data.byte(kReasseschanges) = 1;
+ return;
+diff:
+ data.byte(kCommand) = al;
+ data.byte(kCommandtype) = ah;
+ _cmp(data.byte(kLinepointer), 254);
+ if (!flags.z())
+ goto middleofwalk;
+ _cmp(data.word(kWatchingtime), 0);
+ if (!flags.z())
+ goto middleofwalk;
+ al = data.byte(kFacing);
+ _cmp(al, data.byte(kTurntoface));
+ if (!flags.z())
+ goto middleofwalk;
+ _cmp(data.byte(kCommandtype), 3);
+ if (!flags.z())
+ goto notblock;
+ bl = data.byte(kManspath);
+ _cmp(bl, data.byte(kPointerspath));
+ if (!flags.z())
+ goto dontcheck;
+ cl = data.byte(kRyanx);
+ _add(cl, 12);
+ ch = data.byte(kRyany);
+ _add(ch, 12);
+ checkone();
+ _cmp(cl, 2);
+ if (flags.c())
+ goto isblock;
+dontcheck:
+ getflagunderp();
+ _cmp(data.byte(kLastflag), 2);
+ if (flags.c())
+ goto isblock;
+ _cmp(data.byte(kLastflag), 128);
+ if (!flags.c())
+ goto isblock;
+ goto toofaraway;
+notblock:
+ bl = data.byte(kManspath);
+ _cmp(bl, data.byte(kPointerspath));
+ if (!flags.z())
+ goto toofaraway;
+ _cmp(data.byte(kCommandtype), 3);
+ if (flags.z())
+ goto isblock;
+ _cmp(data.byte(kCommandtype), 5);
+ if (flags.z())
+ goto isaperson;
+ examineobtext();
+ return;
+middleofwalk:
+ blocknametext();
+ return;
+isblock:
+ blocknametext();
+ return;
+isaperson:
+ personnametext();
+ return;
+toofaraway:
+ walktotext();
+}
+
+void DreamGenContext::finishedwalking() {
+ STACK_CHECK;
+ _cmp(data.byte(kLinepointer), 254);
+ if (!flags.z())
+ return /* (iswalking) */;
+ al = data.byte(kFacing);
+ _cmp(al, data.byte(kTurntoface));
+}
+
+void DreamGenContext::examineobtext() {
+ STACK_CHECK;
+ bl = data.byte(kCommand);
+ bh = data.byte(kCommandtype);
+ al = 1;
+ commandwithob();
+}
+
+void DreamGenContext::commandwithob() {
+ STACK_CHECK;
+ push(ax);
+ push(ax);
+ push(bx);
+ push(cx);
+ push(dx);
+ push(es);
+ push(ds);
+ push(si);
+ push(di);
+ deltextline();
+ di = pop();
+ si = pop();
+ ds = pop();
+ es = pop();
+ dx = pop();
+ cx = pop();
+ bx = pop();
+ ax = pop();
+ push(bx);
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ es = data.word(kCommandtext);
+ ax = es.word(bx);
+ _add(ax, (66*2));
+ si = ax;
+ di = data.word(kTextaddressx);
+ bx = data.word(kTextaddressy);
+ dl = data.byte(kTextlen);
+ al = 0;
+ ah = 0;
+ printdirect();
+ ax = pop();
+ di = 5847;
+ copyname();
+ ax = pop();
+ di = data.word(kLastxpos);
+ _cmp(al, 0);
+ if (flags.z())
+ goto noadd;
+ _add(di, 5);
+noadd:
+ bx = data.word(kTextaddressy);
+ es = cs;
+ si = 5847;
+ dl = data.byte(kTextlen);
+ al = 0;
+ ah = 0;
+ printdirect();
+ data.byte(kNewtextline) = 1;
+}
+
+void DreamGenContext::commandonly() {
+ STACK_CHECK;
+ push(ax);
+ push(bx);
+ push(cx);
+ push(dx);
+ push(es);
+ push(ds);
+ push(si);
+ push(di);
+ deltextline();
+ di = pop();
+ si = pop();
+ ds = pop();
+ es = pop();
+ dx = pop();
+ cx = pop();
+ bx = pop();
+ ax = pop();
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ es = data.word(kCommandtext);
+ ax = es.word(bx);
+ _add(ax, (66*2));
+ si = ax;
+ di = data.word(kTextaddressx);
+ bx = data.word(kTextaddressy);
+ dl = data.byte(kTextlen);
+ al = 0;
+ ah = 0;
+ printdirect();
+ data.byte(kNewtextline) = 1;
+}
+
+void DreamGenContext::printmessage() {
+ STACK_CHECK;
+ push(dx);
+ push(bx);
+ push(di);
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ es = data.word(kCommandtext);
+ ax = es.word(bx);
+ _add(ax, (66*2));
+ si = ax;
+ di = pop();
+ bx = pop();
+ dx = pop();
+ al = 0;
+ ah = 0;
+ printdirect();
+}
+
+void DreamGenContext::printmessage2() {
+ STACK_CHECK;
+ push(dx);
+ push(bx);
+ push(di);
+ push(ax);
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ es = data.word(kCommandtext);
+ ax = es.word(bx);
+ _add(ax, (66*2));
+ si = ax;
+ ax = pop();
+searchmess:
+ push(ax);
+ findnextcolon();
+ ax = pop();
+ _dec(ah);
+ if (!flags.z())
+ goto searchmess;
+ di = pop();
+ bx = pop();
+ dx = pop();
+ al = 0;
+ ah = 0;
+ printdirect();
+}
+
+void DreamGenContext::blocknametext() {
+ STACK_CHECK;
+ bl = data.byte(kCommand);
+ bh = data.byte(kCommandtype);
+ al = 0;
+ commandwithob();
+}
+
+void DreamGenContext::personnametext() {
+ STACK_CHECK;
+ bl = data.byte(kCommand);
+ _and(bl, 127);
+ bh = data.byte(kCommandtype);
+ al = 2;
+ commandwithob();
+}
+
+void DreamGenContext::walktotext() {
+ STACK_CHECK;
+ bl = data.byte(kCommand);
+ bh = data.byte(kCommandtype);
+ al = 3;
+ commandwithob();
+}
+
+void DreamGenContext::getflagunderp() {
+ STACK_CHECK;
+ cx = data.word(kMousex);
+ _sub(cx, data.word(kMapadx));
+ ax = data.word(kMousey);
+ _sub(ax, data.word(kMapady));
+ ch = al;
+ checkone();
+ data.byte(kLastflag) = cl;
+ data.byte(kLastflagex) = ch;
+}
+
+void DreamGenContext::setwalk() {
+ STACK_CHECK;
+ _cmp(data.byte(kLinepointer), 254);
+ if (!flags.z())
+ goto alreadywalking;
+ al = data.byte(kPointerspath);
+ _cmp(al, data.byte(kManspath));
+ if (flags.z())
+ goto cantwalk2;
+ _cmp(data.byte(kWatchmode), 1);
+ if (flags.z())
+ goto holdingreel;
+ _cmp(data.byte(kWatchmode), 2);
+ if (flags.z())
+ return /* (cantwalk) */;
+ data.byte(kDestination) = al;
+ data.byte(kFinaldest) = al;
+ _cmp(data.word(kMousebutton), 2);
+ if (!flags.z())
+ goto notwalkandexam;
+ _cmp(data.byte(kCommandtype), 3);
+ if (flags.z())
+ goto notwalkandexam;
+ data.byte(kWalkandexam) = 1;
+ al = data.byte(kCommandtype);
+ data.byte(kWalkexamtype) = al;
+ al = data.byte(kCommand);
+ data.byte(kWalkexamnum) = al;
+notwalkandexam:
+ autosetwalk();
+ return;
+cantwalk2:
+ facerightway();
+ return;
+alreadywalking:
+ al = data.byte(kPointerspath);
+ data.byte(kFinaldest) = al;
+ return;
+holdingreel:
+ data.byte(kDestafterhold) = al;
+ data.byte(kWatchmode) = 2;
+}
+
+void DreamGenContext::autosetwalk() {
+ STACK_CHECK;
+ al = data.byte(kManspath);
+ _cmp(data.byte(kFinaldest), al);
+ if (!flags.z())
+ goto notsamealready;
+ return;
+notsamealready:
+ getroomspaths();
+ checkdest();
+ push(bx);
+ al = data.byte(kManspath);
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = es.byte(bx);
+ ah = 0;
+ _sub(ax, 12);
+ data.word(kLinestartx) = ax;
+ al = es.byte(bx+1);
+ ah = 0;
+ _sub(ax, 12);
+ data.word(kLinestarty) = ax;
+ bx = pop();
+ al = data.byte(kDestination);
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = es.byte(bx);
+ ah = 0;
+ _sub(ax, 12);
+ data.word(kLineendx) = ax;
+ al = es.byte(bx+1);
+ ah = 0;
+ _sub(ax, 12);
+ data.word(kLineendy) = ax;
+ bresenhams();
+ _cmp(data.byte(kLinedirection), 0);
+ if (flags.z())
+ goto normalline;
+ al = data.byte(kLinelength);
+ _dec(al);
+ data.byte(kLinepointer) = al;
+ data.byte(kLinedirection) = 1;
+ return;
+normalline:
+ data.byte(kLinepointer) = 0;
+}
+
+void DreamGenContext::checkdest() {
+ STACK_CHECK;
+ push(bx);
+ _add(bx, 12*8);
+ ah = data.byte(kManspath);
+ cl = 4;
+ _shl(ah, cl);
+ al = data.byte(kDestination);
+ cl = 24;
+ ch = data.byte(kDestination);
+checkdestloop:
+ dh = es.byte(bx);
+ _and(dh, 0xf0);
+ dl = es.byte(bx);
+ _and(dl, 0xf);
+ _cmp(ax, dx);
+ if (!flags.z())
+ goto nextcheck;
+ al = es.byte(bx+1);
+ _and(al, 15);
+ data.byte(kDestination) = al;
+ bx = pop();
+ return;
+nextcheck:
+ dl = es.byte(bx);
+ _and(dl, 0xf0);
+ _shr(dl, 1);
+ _shr(dl, 1);
+ _shr(dl, 1);
+ _shr(dl, 1);
+ dh = es.byte(bx);
+ _and(dh, 0xf);
+ _shl(dh, 1);
+ _shl(dh, 1);
+ _shl(dh, 1);
+ _shl(dh, 1);
+ _cmp(ax, dx);
+ if (!flags.z())
+ goto nextcheck2;
+ ch = es.byte(bx+1);
+ _and(ch, 15);
+nextcheck2:
+ _add(bx, 2);
+ _dec(cl);
+ if (!flags.z())
+ goto checkdestloop;
+ data.byte(kDestination) = ch;
+ bx = pop();
+}
+
+void DreamGenContext::bresenhams() {
+ STACK_CHECK;
+ workoutframes();
+ dx = data;
+ es = dx;
+ di = 8173;
+ si = 1;
+ data.byte(kLinedirection) = 0;
+ cx = data.word(kLineendx);
+ _sub(cx, data.word(kLinestartx));
+ if (flags.z())
+ goto vertline;
+ if (!flags.s())
+ goto line1;
+ _neg(cx);
+ bx = data.word(kLineendx);
+ _xchg(bx, data.word(kLinestartx));
+ data.word(kLineendx) = bx;
+ bx = data.word(kLineendy);
+ _xchg(bx, data.word(kLinestarty));
+ data.word(kLineendy) = bx;
+ data.byte(kLinedirection) = 1;
+line1:
+ bx = data.word(kLineendy);
+ _sub(bx, data.word(kLinestarty));
+ if (flags.z())
+ goto horizline;
+ if (!flags.s())
+ goto line3;
+ _neg(bx);
+ _neg(si);
+line3:
+ push(si);
+ data.byte(kLineroutine) = 0;
+ _cmp(bx, cx);
+ if (flags.le())
+ goto line4;
+ data.byte(kLineroutine) = 1;
+ _xchg(bx, cx);
+line4:
+ _shl(bx, 1);
+ data.word(kIncrement1) = bx;
+ _sub(bx, cx);
+ si = bx;
+ _sub(bx, cx);
+ data.word(kIncrement2) = bx;
+ ax = data.word(kLinestartx);
+ bx = data.word(kLinestarty);
+ ah = bl;
+ _inc(cx);
+ bx = pop();
+ _cmp(data.byte(kLineroutine), 1);
+ if (flags.z())
+ goto hislope;
+ goto loslope;
+vertline:
+ ax = data.word(kLinestarty);
+ bx = data.word(kLineendy);
+ cx = bx;
+ _sub(cx, ax);
+ if (!flags.l())
+ goto line31;
+ _neg(cx);
+ ax = bx;
+ data.byte(kLinedirection) = 1;
+line31:
+ _inc(cx);
+ bx = data.word(kLinestartx);
+ _xchg(ax, bx);
+ ah = bl;
+ bx = si;
+line32:
+ _stosw();
+ _add(ah, bl);
+ if (--cx)
+ goto line32;
+ goto lineexit;
+horizline:
+ ax = data.word(kLinestartx);
+ bx = data.word(kLinestarty);
+ ah = bl;
+ _inc(cx);
+horizloop:
+ _stosw();
+ _inc(al);
+ if (--cx)
+ goto horizloop;
+ goto lineexit;
+loslope:
+loloop:
+ _stosw();
+ _inc(al);
+ _or(si, si);
+ if (!flags.s())
+ goto line12;
+ _add(si, data.word(kIncrement1));
+ if (--cx)
+ goto loloop;
+ goto lineexit;
+line12:
+ _add(si, data.word(kIncrement2));
+ _add(ah, bl);
+ if (--cx)
+ goto loloop;
+ goto lineexit;
+hislope:
+hiloop:
+ _stosw();
+ _add(ah, bl);
+ _or(si, si);
+ if (!flags.s())
+ goto line23;
+ _add(si, data.word(kIncrement1));
+ if (--cx)
+ goto hiloop;
+ goto lineexit;
+line23:
+ _add(si, data.word(kIncrement2));
+ _inc(al);
+ if (--cx)
+ goto hiloop;
+lineexit:
+ _sub(di, 8173);
+ ax = di;
+ _shr(ax, 1);
+ data.byte(kLinelength) = al;
+}
+
+void DreamGenContext::workoutframes() {
+ STACK_CHECK;
+ bx = data.word(kLinestartx);
+ _add(bx, 32);
+ ax = data.word(kLineendx);
+ _add(ax, 32);
+ _sub(bx, ax);
+ if (!flags.c())
+ goto notneg1;
+ _neg(bx);
+notneg1:
+ cx = data.word(kLinestarty);
+ _add(cx, 32);
+ ax = data.word(kLineendy);
+ _add(ax, 32);
+ _sub(cx, ax);
+ if (!flags.c())
+ goto notneg2;
+ _neg(cx);
+notneg2:
+ _cmp(bx, cx);
+ if (!flags.c())
+ goto tendstohoriz;
+ dl = 2;
+ ax = cx;
+ _shr(ax, 1);
+ _cmp(bx, ax);
+ if (flags.c())
+ goto gotquad;
+ dl = 1;
+ goto gotquad;
+tendstohoriz:
+ dl = 0;
+ ax = bx;
+ _shr(ax, 1);
+ _cmp(cx, ax);
+ if (flags.c())
+ goto gotquad;
+ dl = 1;
+ goto gotquad;
+gotquad:
+ bx = data.word(kLinestartx);
+ _add(bx, 32);
+ ax = data.word(kLineendx);
+ _add(ax, 32);
+ _sub(bx, ax);
+ if (flags.c())
+ goto isinright;
+ cx = data.word(kLinestarty);
+ _add(cx, 32);
+ ax = data.word(kLineendy);
+ _add(ax, 32);
+ _sub(cx, ax);
+ if (!flags.c())
+ goto topleft;
+ _cmp(dl, 1);
+ if (flags.z())
+ goto noswap1;
+ _xor(dl, 2);
+noswap1:
+ _add(dl, 4);
+ goto success;
+topleft:
+ _add(dl, 6);
+ goto success;
+isinright:
+ cx = data.word(kLinestarty);
+ _add(cx, 32);
+ ax = data.word(kLineendy);
+ _add(ax, 32);
+ _sub(cx, ax);
+ if (!flags.c())
+ goto botright;
+ _add(dl, 2);
+ goto success;
+botright:
+ _cmp(dl, 1);
+ if (flags.z())
+ goto noswap2;
+ _xor(dl, 2);
+noswap2:
+success:
+ _and(dl, 7);
+ data.byte(kTurntoface) = dl;
+ data.byte(kTurndirection) = 0;
+}
+
+void DreamGenContext::getroomspaths() {
+ STACK_CHECK;
+ al = data.byte(kRoomnum);
+ ah = 0;
+ cx = 144;
+ _mul(cx);
+ es = data.word(kReels);
+ bx = (0);
+ _add(bx, ax);
+}
+
+void DreamGenContext::copyname() {
+ STACK_CHECK;
+ push(di);
+ findobname();
+ di = pop();
+ es = cs;
+ cx = 28;
+make:
+ _lodsb();
+ _cmp(al, ':');
+ if (flags.z())
+ goto finishmakename;
+ _cmp(al, 0);
+ if (flags.z())
+ goto finishmakename;
+ _stosb();
+ if (--cx)
+ goto make;
+finishmakename:
+ _inc(cx);
+ al = 0;
+ _stosb();
+ return;
+ al = 255;
+ _stosb(cx, true);
+}
+
+void DreamGenContext::findobname() {
+ STACK_CHECK;
+ push(ax);
+ ah = 0;
+ _add(ax, ax);
+ bx = ax;
+ ax = pop();
+ _cmp(ah, 5);
+ if (!flags.z())
+ goto notpersonname;
+ push(ax);
+ _and(al, 127);
+ ah = 0;
+ bx = 64*2;
+ _mul(bx);
+ si = ax;
+ ds = data.word(kPeople);
+ _add(si, (0+24));
+ cx = (0+24+(1026*2));
+ ax = ds.word(si);
+ _add(ax, cx);
+ si = ax;
+ ax = pop();
+ return;
+notpersonname:
+ _cmp(ah, 4);
+ if (!flags.z())
+ goto notextraname;
+ ds = data.word(kExtras);
+ _add(bx, (0+2080+30000+(16*114)));
+ ax = ds.word(bx);
+ _add(ax, (0+2080+30000+(16*114)+((114+2)*2)));
+ si = ax;
+ return;
+notextraname:
+ _cmp(ah, 2);
+ if (!flags.z())
+ goto notfreename;
+ ds = data.word(kFreedesc);
+ _add(bx, (0));
+ ax = ds.word(bx);
+ _add(ax, (0+(82*2)));
+ si = ax;
+ return;
+notfreename:
+ _cmp(ah, 1);
+ if (!flags.z())
+ goto notsetname;
+ ds = data.word(kSetdesc);
+ _add(bx, (0));
+ ax = ds.word(bx);
+ _add(ax, (0+(130*2)));
+ si = ax;
+ return;
+notsetname:
+ ds = data.word(kBlockdesc);
+ _add(bx, (0));
+ ax = ds.word(bx);
+ _add(ax, (0+(98*2)));
+ si = ax;
+}
+
+void DreamGenContext::showicon() {
+ STACK_CHECK;
+ _cmp(data.byte(kReallocation), 50);
+ if (!flags.c())
+ goto isdream1;
+ showpanel();
+ showman();
+ roomname();
+ panelicons1();
+ zoomicon();
+ return;
+isdream1:
+ ds = data.word(kTempsprites);
+ di = 72;
+ bx = 2;
+ al = 45;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 72+47;
+ bx = 2;
+ al = 46;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 69-10;
+ bx = 21;
+ al = 49;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 160+88;
+ bx = 2;
+ al = 45;
+ ah = 4;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 160+43;
+ bx = 2;
+ al = 46;
+ ah = 4;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 160+101;
+ bx = 21;
+ al = 49;
+ ah = 4;
+ showframe();
+ middlepanel();
+}
+
+void DreamGenContext::middlepanel() {
+ STACK_CHECK;
+ ds = data.word(kTempsprites);
+ di = 72+47+20;
+ bx = 0;
+ al = 48;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 72+19;
+ bx = 21;
+ al = 47;
+ ah = 0;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 160+23;
+ bx = 0;
+ al = 48;
+ ah = 4;
+ showframe();
+ ds = data.word(kTempsprites);
+ di = 160+71;
+ bx = 21;
+ al = 47;
+ ah = 4;
+ showframe();
+}
+
+void DreamGenContext::showman() {
+ STACK_CHECK;
+ ds = data.word(kIcons1);
+ di = 0;
+ bx = 0;
+ al = 0;
+ ah = 0;
+ showframe();
+ ds = data.word(kIcons1);
+ di = 0;
+ bx = 114;
+ al = 1;
+ ah = 0;
+ showframe();
+ _cmp(data.byte(kShadeson), 0);
+ if (flags.z())
+ return /* (notverycool) */;
+ ds = data.word(kIcons1);
+ di = 28;
+ bx = 25;
+ al = 2;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::showpanel() {
+ STACK_CHECK;
+ ds = data.word(kIcons1);
+ di = 72;
+ bx = 0;
+ al = 19;
+ ah = 0;
+ showframe();
+ ds = data.word(kIcons1);
+ di = 192;
+ bx = 0;
+ al = 19;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::roomname() {
+ STACK_CHECK;
+ di = 88;
+ bx = 18;
+ al = 53;
+ dl = 240;
+ printmessage();
+ bl = data.byte(kRoomnum);
+ _cmp(bl, 32);
+ if (flags.c())
+ goto notover32;
+ _sub(bl, 32);
+notover32:
+ bh = 0;
+ _add(bx, bx);
+ es = data.word(kRoomdesc);
+ _add(bx, (0));
+ ax = es.word(bx);
+ _add(ax, (0+(38*2)));
+ si = ax;
+ data.word(kLinespacing) = 7;
+ di = 88;
+ bx = 25;
+ dl = 120;
+ _cmp(data.byte(kWatchon), 1);
+ if (flags.z())
+ goto gotpl;
+ dl = 160;
+gotpl:
+ al = 0;
+ ah = 0;
+ printdirect();
+ data.word(kLinespacing) = 10;
+ usecharset1();
+}
+
+void DreamGenContext::usecharset1() {
+ STACK_CHECK;
+ ax = data.word(kCharset1);
+ data.word(kCurrentset) = ax;
+}
+
+void DreamGenContext::usetempcharset() {
+ STACK_CHECK;
+ ax = data.word(kTempcharset);
+ data.word(kCurrentset) = ax;
+}
+
+void DreamGenContext::showexit() {
+ STACK_CHECK;
+ ds = data.word(kIcons1);
+ di = 274;
+ bx = 154;
+ al = 11;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::panelicons1() {
+ STACK_CHECK;
+ di = 0;
+ _cmp(data.byte(kWatchon), 1);
+ if (flags.z())
+ goto watchison;
+ di = 48;
+watchison:
+ push(di);
+ ds = data.word(kIcons2);
+ _add(di, 204);
+ bx = 4;
+ al = 2;
+ ah = 0;
+ showframe();
+ di = pop();
+ push(di);
+ _cmp(data.byte(kZoomon), 1);
+ if (flags.z())
+ goto zoomisoff;
+ ds = data.word(kIcons1);
+ _add(di, 228);
+ bx = 8;
+ al = 5;
+ ah = 0;
+ showframe();
+zoomisoff:
+ di = pop();
+ showwatch();
+}
+
+void DreamGenContext::showwatch() {
+ STACK_CHECK;
+ _cmp(data.byte(kWatchon), 0);
+ if (flags.z())
+ return /* (nowristwatch) */;
+ ds = data.word(kIcons1);
+ di = 250;
+ bx = 1;
+ al = 6;
+ ah = 0;
+ showframe();
+ showtime();
+}
+
+void DreamGenContext::zoomicon() {
+ STACK_CHECK;
+ _cmp(data.byte(kZoomon), 0);
+ if (flags.z())
+ return /* (nozoom1) */;
+ ds = data.word(kIcons1);
+ di = (8);
+ bx = (132)-1;
+ al = 8;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::showblink() {
+ STACK_CHECK;
+ _cmp(data.byte(kManisoffscreen), 1);
+ if (flags.z())
+ return /* (finblink1) */;
+ _inc(data.byte(kBlinkcount));
+ _cmp(data.byte(kShadeson), 0);
+ if (!flags.z())
+ return /* (finblink1) */;
+ _cmp(data.byte(kReallocation), 50);
+ if (!flags.c())
+ return /* (eyesshut) */;
+ al = data.byte(kBlinkcount);
+ _cmp(al, 3);
+ if (!flags.z())
+ return /* (finblink1) */;
+ data.byte(kBlinkcount) = 0;
+ al = data.byte(kBlinkframe);
+ _inc(al);
+ data.byte(kBlinkframe) = al;
+ _cmp(al, 6);
+ if (flags.c())
+ goto nomorethan6;
+ al = 6;
+nomorethan6:
+ ah = 0;
+ bx = 5888;
+ _add(bx, ax);
+ al = cs.byte(bx);
+ ds = data.word(kIcons1);
+ di = 44;
+ bx = 32;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::dumpblink() {
+ STACK_CHECK;
+ _cmp(data.byte(kShadeson), 0);
+ if (!flags.z())
+ return /* (nodumpeye) */;
+ _cmp(data.byte(kBlinkcount), 0);
+ if (!flags.z())
+ return /* (nodumpeye) */;
+ al = data.byte(kBlinkframe);
+ _cmp(al, 6);
+ if (!flags.c())
+ return /* (nodumpeye) */;
+ push(ds);
+ di = 44;
+ bx = 32;
+ cl = 16;
+ ch = 12;
+ multidump();
+ ds = pop();
+}
+
+void DreamGenContext::worktoscreenm() {
+ STACK_CHECK;
+ animpointer();
+ readmouse();
+ showpointer();
+ vsync();
+ worktoscreen();
+ delpointer();
+}
+
+void DreamGenContext::blank() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 199);
+ if (flags.z())
+ return /* (alreadyblnk) */;
+ data.byte(kCommandtype) = 199;
+ al = 0;
+ commandonly();
+}
+
+void DreamGenContext::allpointer() {
+ STACK_CHECK;
+ readmouse();
+ showpointer();
+ dumppointer();
+}
+
+void DreamGenContext::hangonp() {
+ STACK_CHECK;
+ push(cx);
+ _add(cx, cx);
+ ax = pop();
+ _add(cx, ax);
+ data.word(kMaintimer) = 0;
+ al = data.byte(kPointerframe);
+ ah = data.byte(kPickup);
+ push(ax);
+ data.byte(kPointermode) = 3;
+ data.byte(kPickup) = 0;
+ push(cx);
+ data.byte(kCommandtype) = 255;
+ readmouse();
+ animpointer();
+ showpointer();
+ vsync();
+ dumppointer();
+ cx = pop();
+hangloop:
+ push(cx);
+ delpointer();
+ readmouse();
+ animpointer();
+ showpointer();
+ vsync();
+ dumppointer();
+ cx = pop();
+ ax = data.word(kMousebutton);
+ _cmp(ax, 0);
+ if (flags.z())
+ goto notpressed;
+ _cmp(ax, data.word(kOldbutton));
+ if (!flags.z())
+ goto getoutofit;
+notpressed:
+ if (--cx)
+ goto hangloop;
+getoutofit:
+ delpointer();
+ ax = pop();
+ data.byte(kPointerframe) = al;
+ data.byte(kPickup) = ah;
+ data.byte(kPointermode) = 0;
+}
+
+void DreamGenContext::hangonw() {
+ STACK_CHECK;
+hangloopw:
+ push(cx);
+ delpointer();
+ readmouse();
+ animpointer();
+ showpointer();
+ vsync();
+ dumppointer();
+ cx = pop();
+ if (--cx)
+ goto hangloopw;
+}
+
+void DreamGenContext::hangoncurs() {
+ STACK_CHECK;
+monloop1:
+ push(cx);
+ printcurs();
+ vsync();
+ delcurs();
+ cx = pop();
+ if (--cx)
+ goto monloop1;
+}
+
+void DreamGenContext::getunderzoom() {
+ STACK_CHECK;
+ di = (8)+5;
+ bx = (132)+4;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ cl = 46;
+ ch = 40;
+ multiget();
+}
+
+void DreamGenContext::dumpzoom() {
+ STACK_CHECK;
+ _cmp(data.byte(kZoomon), 1);
+ if (!flags.z())
+ return /* (notzoomon) */;
+ di = (8)+5;
+ bx = (132)+4;
+ cl = 46;
+ ch = 40;
+ multidump();
+}
+
+void DreamGenContext::putunderzoom() {
+ STACK_CHECK;
+ di = (8)+5;
+ bx = (132)+4;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ cl = 46;
+ ch = 40;
+ multiput();
+}
+
+void DreamGenContext::crosshair() {
+ STACK_CHECK;
+ _cmp(data.byte(kCommandtype), 3);
+ if (flags.z())
+ goto nocross;
+ _cmp(data.byte(kCommandtype), 10);
+ if (!flags.c())
+ goto nocross;
+ es = data.word(kWorkspace);
+ ds = data.word(kIcons1);
+ di = (8)+24;
+ bx = (132)+19;
+ al = 9;
+ ah = 0;
+ showframe();
+ return;
+nocross:
+ es = data.word(kWorkspace);
+ ds = data.word(kIcons1);
+ di = (8)+24;
+ bx = (132)+19;
+ al = 29;
+ ah = 0;
+ showframe();
+}
+
+void DreamGenContext::showpointer() {
+ STACK_CHECK;
+ showblink();
+ di = data.word(kMousex);
+ data.word(kOldpointerx) = di;
+ bx = data.word(kMousey);
+ data.word(kOldpointery) = bx;
+ _cmp(data.byte(kPickup), 1);
+ if (flags.z())
+ goto itsanobject;
+ push(bx);
+ push(di);
+ ds = data.word(kIcons1);
+ al = data.byte(kPointerframe);
+ _add(al, 20);
+ ah = 0;
+ _add(ax, ax);
+ si = ax;
+ _add(ax, ax);
+ _add(si, ax);
+ cx = ds.word(si);
+ _cmp(cl, 12);
+ if (!flags.c())
+ goto notsmallx;
+ cl = 12;
+notsmallx:
+ _cmp(ch, 12);
+ if (!flags.c())
+ goto notsmally;
+ ch = 12;
+notsmally:
+ data.byte(kPointerxs) = cl;
+ data.byte(kPointerys) = ch;
+ push(ds);
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60);
+ multiget();
+ ds = pop();
+ di = pop();
+ bx = pop();
+ push(di);
+ push(bx);
+ al = data.byte(kPointerframe);
+ _add(al, 20);
+ ah = 0;
+ showframe();
+ bx = pop();
+ di = pop();
+ return;
+itsanobject:
+ al = data.byte(kItemframe);
+ ds = data.word(kExtras);
+ _cmp(data.byte(kObjecttype), 4);
+ if (flags.z())
+ goto itsfrominv;
+ ds = data.word(kFreeframes);
+itsfrominv:
+ cl = al;
+ _add(al, al);
+ _add(al, cl);
+ _inc(al);
+ ah = 0;
+ push(ax);
+ _add(ax, ax);
+ si = ax;
+ _add(ax, ax);
+ _add(si, ax);
+ ax = 2080;
+ cx = ds.word(si);
+ _cmp(cl, 12);
+ if (!flags.c())
+ goto notsmallx2;
+ cl = 12;
+notsmallx2:
+ _cmp(ch, 12);
+ if (!flags.c())
+ goto notsmally2;
+ ch = 12;
+notsmally2:
+ data.byte(kPointerxs) = cl;
+ data.byte(kPointerys) = ch;
+ ax = pop();
+ push(di);
+ push(bx);
+ push(ax);
+ push(bx);
+ push(di);
+ push(ds);
+ al = cl;
+ ah = 0;
+ _shr(ax, 1);
+ _sub(data.word(kOldpointerx), ax);
+ _sub(di, ax);
+ al = ch;
+ _shr(ax, 1);
+ _sub(data.word(kOldpointery), ax);
+ _sub(bx, ax);
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60);
+ multiget();
+ ds = pop();
+ di = pop();
+ bx = pop();
+ ax = pop();
+ ah = 128;
+ showframe();
+ bx = pop();
+ di = pop();
+ ds = data.word(kIcons1);
+ al = 3;
+ ah = 128;
+ showframe();
+}
+
+void DreamGenContext::delpointer() {
+ STACK_CHECK;
+ ax = data.word(kOldpointerx);
+ _cmp(ax, 0x0ffff);
+ if (flags.z())
+ return /* (nevershown) */;
+ data.word(kDelherex) = ax;
+ ax = data.word(kOldpointery);
+ data.word(kDelherey) = ax;
+ cl = data.byte(kPointerxs);
+ data.byte(kDelxs) = cl;
+ ch = data.byte(kPointerys);
+ data.byte(kDelys) = ch;
+ ds = data.word(kBuffers);
+ si = (0+(228*13)+32+60);
+ di = data.word(kDelherex);
+ bx = data.word(kDelherey);
+ multiput();
+}
+
+void DreamGenContext::dumppointer() {
+ STACK_CHECK;
+ dumpblink();
+ cl = data.byte(kDelxs);
+ ch = data.byte(kDelys);
+ di = data.word(kDelherex);
+ bx = data.word(kDelherey);
+ multidump();
+ bx = data.word(kOldpointery);
+ di = data.word(kOldpointerx);
+ _cmp(di, data.word(kDelherex));
+ if (!flags.z())
+ goto difffound;
+ _cmp(bx, data.word(kDelherey));
+ if (flags.z())
+ return /* (notboth) */;
+difffound:
+ cl = data.byte(kPointerxs);
+ ch = data.byte(kPointerys);
+ multidump();
+}
+
+void DreamGenContext::undertextline() {
+ STACK_CHECK;
+ di = data.word(kTextaddressx);
+ bx = data.word(kTextaddressy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
+ ds = data.word(kBuffers);
+ si = (0);
+ cl = (228);
+ ch = (13);
+ multiget();
+}
+
+void DreamGenContext::deltextline() {
+ STACK_CHECK;
+ di = data.word(kTextaddressx);
+ bx = data.word(kTextaddressy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
+ ds = data.word(kBuffers);
+ si = (0);
+ cl = (228);
+ ch = (13);
+ multiput();
+}
+
+void DreamGenContext::dumptextline() {
+ STACK_CHECK;
+ _cmp(data.byte(kNewtextline), 1);
+ if (!flags.z())
+ return /* (nodumptextline) */;
+ data.byte(kNewtextline) = 0;
+ di = data.word(kTextaddressx);
+ bx = data.word(kTextaddressy);
+ _cmp(data.byte(kForeignrelease), 0);
+ if (flags.z())
+ goto _tmp1;
+ _sub(bx, 3);
+_tmp1:
+ cl = (228);
+ ch = (13);
+ multidump();
+}
+
+void DreamGenContext::animpointer() {
+ STACK_CHECK;
+ _cmp(data.byte(kPointermode), 2);
+ if (flags.z())
+ goto combathand;
+ _cmp(data.byte(kPointermode), 3);
+ if (flags.z())
+ goto mousehand;
+ _cmp(data.word(kWatchingtime), 0);
+ if (flags.z())
+ goto notwatchpoint;
+ data.byte(kPointerframe) = 11;
+ return;
+notwatchpoint:
+ data.byte(kPointerframe) = 0;
+ _cmp(data.byte(kInmaparea), 0);
+ if (flags.z())
+ return /* (gothand) */;
+ _cmp(data.byte(kPointerfirstpath), 0);
+ if (flags.z())
+ return /* (gothand) */;
+ getflagunderp();
+ _cmp(cl, 2);
+ if (flags.c())
+ return /* (gothand) */;
+ _cmp(cl, 128);
+ if (!flags.c())
+ return /* (gothand) */;
+ data.byte(kPointerframe) = 3;
+ _test(cl, 4);
+ if (!flags.z())
+ return /* (gothand) */;
+ data.byte(kPointerframe) = 4;
+ _test(cl, 16);
+ if (!flags.z())
+ return /* (gothand) */;
+ data.byte(kPointerframe) = 5;
+ _test(cl, 2);
+ if (!flags.z())
+ return /* (gothand) */;
+ data.byte(kPointerframe) = 6;
+ _test(cl, 8);
+ if (!flags.z())
+ return /* (gothand) */;
+ data.byte(kPointerframe) = 8;
+ return;
+mousehand:
+ _cmp(data.byte(kPointerspeed), 0);
+ if (flags.z())
+ goto rightspeed3;
+ _dec(data.byte(kPointerspeed));
+ goto finflashmouse;
+rightspeed3:
+ data.byte(kPointerspeed) = 5;
+ _inc(data.byte(kPointercount));
+ _cmp(data.byte(kPointercount), 16);
+ if (!flags.z())
+ goto finflashmouse;
+ data.byte(kPointercount) = 0;
+finflashmouse:
+ al = data.byte(kPointercount);
+ ah = 0;
+ bx = 5895;
+ _add(bx, ax);
+ al = cs.byte(bx);
+ data.byte(kPointerframe) = al;
+ return;
+combathand:
+ data.byte(kPointerframe) = 0;
+ _cmp(data.byte(kReallocation), 14);
+ if (!flags.z())
+ return /* (notarrow) */;
+ _cmp(data.byte(kCommandtype), 211);
+ if (!flags.z())
+ return /* (notarrow) */;
+ data.byte(kPointerframe) = 5;
+}
+
+void DreamGenContext::readmouse() {
+ STACK_CHECK;
+ ax = data.word(kMousebutton);
+ data.word(kOldbutton) = ax;
+ ax = data.word(kMousex);
+ data.word(kOldx) = ax;
+ ax = data.word(kMousey);
+ data.word(kOldy) = ax;
+ mousecall();
+ data.word(kMousex) = cx;
+ data.word(kMousey) = dx;
+ data.word(kMousebutton) = bx;
+}
+
+void DreamGenContext::readmouse1() {
+ STACK_CHECK;
+ ax = data.word(kMousex);
+ data.word(kOldx) = ax;
+ ax = data.word(kMousey);
+ data.word(kOldy) = ax;
+ mousecall();
+ data.word(kMousex) = cx;
+ data.word(kMousey) = dx;
+ data.word(kMousebutton1) = bx;
+}
+
+void DreamGenContext::readmouse2() {
+ STACK_CHECK;
+ ax = data.word(kMousex);
+ data.word(kOldx) = ax;
+ ax = data.word(kMousey);
+ data.word(kOldy) = ax;
+ mousecall();
+ data.word(kMousex) = cx;
+ data.word(kMousey) = dx;
+ data.word(kMousebutton2) = bx;
+}
+
+void DreamGenContext::readmouse3() {
+ STACK_CHECK;
+ ax = data.word(kMousex);
+ data.word(kOldx) = ax;
+ ax = data.word(kMousey);
+ data.word(kOldy) = ax;
+ mousecall();
+ data.word(kMousex) = cx;
+ data.word(kMousey) = dx;
+ data.word(kMousebutton3) = bx;
+}
+
+void DreamGenContext::readmouse4() {
+ STACK_CHECK;
+ ax = data.word(kMousebutton);
+ data.word(kOldbutton) = ax;
+ ax = data.word(kMousex);
+ data.word(kOldx) = ax;
+ ax = data.word(kMousey);
+ data.word(kOldy) = ax;
+ mousecall();
+ data.word(kMousex) = cx;
+ data.word(kMousey) = dx;
+ ax = data.word(kMousebutton1);
+ _or(ax, data.word(kMousebutton2));
+ _or(ax, data.word(kMousebutton3));
+ _or(bx, ax);
+ data.word(kMousebutton) = bx;
+}
+
+void DreamGenContext::readkey() {
+ STACK_CHECK;
+ bx = data.word(kBufferout);
+ _cmp(bx, data.word(kBufferin));
+ if (flags.z())
+ goto nokey;
+ _inc(bx);
+ _and(bx, 15);
+ data.word(kBufferout) = bx;
+ di = 5912;
+ _add(di, bx);
+ al = cs.byte(di);
+ data.byte(kCurrentkey) = al;
+ return;
+nokey:
+ data.byte(kCurrentkey) = 0;
+}
+
+void DreamGenContext::randomnum1() {
+ STACK_CHECK;
+ push(ds);
+ push(es);
+ push(di);
+ push(bx);
+ push(cx);
+ randomnumber();
+ cx = pop();
+ bx = pop();
+ di = pop();
+ es = pop();
+ ds = pop();
+}
+
+void DreamGenContext::randomnum2() {
+ STACK_CHECK;
+ push(ds);
+ push(es);
+ push(di);
+ push(bx);
+ push(ax);
+ randomnumber();
+ cl = al;
+ ax = pop();
+ bx = pop();
+ di = pop();
+ es = pop();
+ ds = pop();
+}
+
+void DreamGenContext::hangon() {
+ STACK_CHECK;
+hangonloop:
+ push(cx);
+ vsync();
+ cx = pop();
+ if (--cx)
+ goto hangonloop;
+}
+
+void DreamGenContext::loadtraveltext() {
+ STACK_CHECK;
+ dx = 2234;
+ standardload();
+ data.word(kTraveltext) = ax;
+}
+
+void DreamGenContext::loadintotemp() {
+ STACK_CHECK;
+ ds = cs;
+ standardload();
+ data.word(kTempgraphics) = ax;
+}
+
+void DreamGenContext::loadintotemp2() {
+ STACK_CHECK;
+ ds = cs;
+ standardload();
+ data.word(kTempgraphics2) = ax;
+}
+
+void DreamGenContext::loadintotemp3() {
+ STACK_CHECK;
+ ds = cs;
+ standardload();
+ data.word(kTempgraphics3) = ax;
+}
+
+void DreamGenContext::loadtempcharset() {
+ STACK_CHECK;
+ standardload();
+ data.word(kTempcharset) = ax;
+}
+
+void DreamGenContext::standardload() {
+ STACK_CHECK;
+ openfile();
+ readheader();
+ bx = es.word(di);
+ push(bx);
+ cl = 4;
+ _shr(bx, cl);
+ allocatemem();
+ ds = ax;
+ cx = pop();
+ push(ax);
+ dx = 0;
+ readfromfile();
+ closefile();
+ ax = pop();
+}
+
+void DreamGenContext::loadtemptext() {
+ STACK_CHECK;
+ standardload();
+ data.word(kTextfile1) = ax;
+}
+
+void DreamGenContext::loadroom() {
+ STACK_CHECK;
+ data.byte(kRoomloaded) = 1;
+ data.word(kTimecount) = 0;
+ data.word(kMaintimer) = 0;
+ data.word(kMapoffsetx) = 104;
+ data.word(kMapoffsety) = 38;
+ data.word(kTextaddressx) = 13;
+ data.word(kTextaddressy) = 182;
+ data.byte(kTextlen) = 240;
+ al = data.byte(kNewlocation);
+ data.byte(kLocation) = al;
+ getroomdata();
+ startloading();
+ loadroomssample();
+ switchryanon();
+ drawflags();
+ getdimension();
+}
+
+void DreamGenContext::loadroomssample() {
+ STACK_CHECK;
+ al = data.byte(kRoomssample);
+ _cmp(al, 255);
+ if (flags.z())
+ return /* (loadedalready) */;
+ _cmp(al, data.byte(kCurrentsample));
+ if (flags.z())
+ return /* (loadedalready) */;
+ data.byte(kCurrentsample) = al;
+ al = data.byte(kCurrentsample);
+ cl = '0';
+ twodigitnum();
+ di = 1896;
+ _xchg(al, ah);
+ cs.word(di+10) = ax;
+ dx = di;
+ loadsecondsample();
+}
+
+void DreamGenContext::getridofreels() {
+ STACK_CHECK;
+ _cmp(data.byte(kRoomloaded), 0);
+ if (flags.z())
+ return /* (dontgetrid) */;
+ es = data.word(kReel1);
+ deallocatemem();
+ es = data.word(kReel2);
+ deallocatemem();
+ es = data.word(kReel3);
+ deallocatemem();
+}
+
+void DreamGenContext::getridofall() {
+ STACK_CHECK;
+ es = data.word(kBackdrop);
+ deallocatemem();
+ es = data.word(kSetframes);
+ deallocatemem();
+ es = data.word(kReel1);
+ deallocatemem();
+ es = data.word(kReel2);
+ deallocatemem();
+ es = data.word(kReel3);
+ deallocatemem();
+ es = data.word(kReels);
+ deallocatemem();
+ es = data.word(kPeople);
+ deallocatemem();
+ es = data.word(kSetdesc);
+ deallocatemem();
+ es = data.word(kBlockdesc);
+ deallocatemem();
+ es = data.word(kRoomdesc);
+ deallocatemem();
+ es = data.word(kFreeframes);
+ deallocatemem();
+ es = data.word(kFreedesc);
+ deallocatemem();
+}
+
+void DreamGenContext::restorereels() {
+ STACK_CHECK;
+ _cmp(data.byte(kRoomloaded), 0);
+ if (flags.z())
+ return /* (dontrestore) */;
+ al = data.byte(kReallocation);
+ getroomdata();
+ dx = bx;
+ openfile();
+ readheader();
+ dontloadseg();
+ dontloadseg();
+ dontloadseg();
+ dontloadseg();
+ allocateload();
+ data.word(kReel1) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReel2) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReel3) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ closefile();
+}
+
+void DreamGenContext::restoreall() {
+ STACK_CHECK;
+ al = data.byte(kLocation);
+ getroomdata();
+ dx = bx;
+ openfile();
+ readheader();
+ allocateload();
+ ds = ax;
+ data.word(kBackdrop) = ax;
+ dx = (0);
+ loadseg();
+ ds = data.word(kWorkspace);
+ dx = (0);
+ cx = 132*66;
+ al = 0;
+ fillspace();
+ loadseg();
+ sortoutmap();
+ allocateload();
+ data.word(kSetframes) = ax;
+ ds = ax;
+ dx = (0);
+ loadseg();
+ dontloadseg();
+ allocateload();
+ data.word(kReel1) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReel2) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReel3) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReels) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kPeople) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kSetdesc) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kBlockdesc) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kRoomdesc) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kFreeframes) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ dontloadseg();
+ allocateload();
+ data.word(kFreedesc) = ax;
+ ds = ax;
+ dx = (0);
+ loadseg();
+ closefile();
+ setallchanges();
+}
+
+void DreamGenContext::sortoutmap() {
+ STACK_CHECK;
+ push(es);
+ push(di);
+ ds = data.word(kWorkspace);
+ si = 0;
+ es = data.word(kMapdata);
+ di = 0;
+ cx = (60);
+blimey:
+ push(cx);
+ push(si);
+ cx = (66);
+ _movsb(cx, true);
+ si = pop();
+ cx = pop();
+ _add(si, 132);
+ if (--cx)
+ goto blimey;
+ di = pop();
+ es = pop();
+}
+
+void DreamGenContext::startloading() {
+ STACK_CHECK;
+ data.byte(kCombatcount) = 0;
+ al = cs.byte(bx+13);
+ data.byte(kRoomssample) = al;
+ al = cs.byte(bx+15);
+ data.byte(kMapx) = al;
+ al = cs.byte(bx+16);
+ data.byte(kMapy) = al;
+ al = cs.byte(bx+20);
+ data.byte(kLiftflag) = al;
+ al = cs.byte(bx+21);
+ data.byte(kManspath) = al;
+ data.byte(kDestination) = al;
+ data.byte(kFinaldest) = al;
+ al = cs.byte(bx+22);
+ data.byte(kFacing) = al;
+ data.byte(kTurntoface) = al;
+ al = cs.byte(bx+23);
+ data.byte(kCounttoopen) = al;
+ al = cs.byte(bx+24);
+ data.byte(kLiftpath) = al;
+ al = cs.byte(bx+25);
+ data.byte(kDoorpath) = al;
+ data.byte(kLastweapon) = -1;
+ al = cs.byte(bx+27);
+ push(ax);
+ al = cs.byte(bx+31);
+ ah = data.byte(kReallocation);
+ data.byte(kReallocation) = al;
+ dx = bx;
+ openfile();
+ readheader();
+ allocateload();
+ ds = ax;
+ data.word(kBackdrop) = ax;
+ dx = (0);
+ loadseg();
+ ds = data.word(kWorkspace);
+ dx = (0);
+ cx = 132*66;
+ al = 0;
+ fillspace();
+ loadseg();
+ sortoutmap();
+ allocateload();
+ data.word(kSetframes) = ax;
+ ds = ax;
+ dx = (0);
+ loadseg();
+ ds = data.word(kSetdat);
+ dx = 0;
+ cx = (64*128);
+ al = 255;
+ fillspace();
+ loadseg();
+ allocateload();
+ data.word(kReel1) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReel2) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReel3) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kReels) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kPeople) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kSetdesc) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kBlockdesc) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kRoomdesc) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ allocateload();
+ data.word(kFreeframes) = ax;
+ ds = ax;
+ dx = 0;
+ loadseg();
+ ds = data.word(kFreedat);
+ dx = 0;
+ cx = (16*80);
+ al = 255;
+ fillspace();
+ loadseg();
+ allocateload();
+ data.word(kFreedesc) = ax;
+ ds = ax;
+ dx = (0);
+ loadseg();
+ closefile();
+ findroominloc();
+ deletetaken();
+ setallchanges();
+ autoappear();
+ al = data.byte(kNewlocation);
+ getroomdata();
+ data.byte(kLastweapon) = -1;
+ data.byte(kMandead) = 0;
+ data.word(kLookcounter) = 160;
+ data.byte(kNewlocation) = 255;
+ data.byte(kLinepointer) = 254;
+ ax = pop();
+ _cmp(al, 255);
+ if (flags.z())
+ goto dontwalkin;
+ data.byte(kManspath) = al;
+ push(bx);
+ autosetwalk();
+ bx = pop();
+dontwalkin:
+ findxyfrompath();
+}
+
+void DreamGenContext::disablepath() {
+ STACK_CHECK;
+ push(cx);
+ _xchg(al, ah);
+ cx = -6;
+looky2:
+ _add(cx, 6);
+ _sub(al, 10);
+ if (!flags.c())
+ goto looky2;
+ al = ah;
+ _dec(cx);
+lookx2:
+ _inc(cx);
+ _sub(al, 11);
+ if (!flags.c())
+ goto lookx2;
+ al = cl;
+ ah = 0;
+ cx = 144;
+ _mul(cx);
+ es = data.word(kReels);
+ bx = (0);
+ _add(bx, ax);
+ ax = pop();
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ al = 0;
+ es.byte(bx+6) = al;
+}
+
+void DreamGenContext::findxyfrompath() {
+ STACK_CHECK;
+ getroomspaths();
+ al = data.byte(kManspath);
+ ah = 0;
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(ax, ax);
+ _add(bx, ax);
+ ax = es.word(bx);
+ _sub(al, 12);
+ _sub(ah, 12);
+ data.byte(kRyanx) = al;
+ data.byte(kRyany) = ah;
+}
+
+void DreamGenContext::findroominloc() {
+ STACK_CHECK;
+ al = data.byte(kMapy);
+ cx = -6;
+looky:
+ _add(cx, 6);
+ _sub(al, 10);
+ if (!flags.c())
+ goto looky;
+ al = data.byte(kMapx);
+ _dec(cx);
+lookx:
+ _inc(cx);
+ _sub(al, 11);
+ if (!flags.c())
+ goto lookx;
+ data.byte(kRoomnum) = cl;
+}
+
+void DreamGenContext::getroomdata() {
+ STACK_CHECK;
+ ah = 0;
+ cx = 32;
+ _mul(cx);
+ bx = 6187;
+ _add(bx, ax);
+}
+
+void DreamGenContext::readheader() {
+ STACK_CHECK;
+ ds = cs;
+ dx = 6091;
+ cx = (6187-6091);
+ readfromfile();
+ es = cs;
+ di = 6141;
+}
+
+void DreamGenContext::allocateload() {
+ STACK_CHECK;
+ push(es);
+ push(di);
+ bx = es.word(di);
+ cl = 4;
+ _shr(bx, cl);
+ allocatemem();
+ di = pop();
+ es = pop();
+}
+
+void DreamGenContext::fillspace() {
+ STACK_CHECK;
+ push(es);
+ push(ds);
+ push(dx);
+ push(di);
+ push(bx);
+ di = dx;
+ es = ds;
+ _stosb(cx, true);
+ bx = pop();
+ di = pop();
+ dx = pop();
+ ds = pop();
+ es = pop();
+}
+
+void DreamGenContext::getridoftemp() {
+ STACK_CHECK;
+ es = data.word(kTempgraphics);
+ deallocatemem();
+}
+
+void DreamGenContext::getridoftemptext() {
+ STACK_CHECK;
+ es = data.word(kTextfile1);
+ deallocatemem();
+}
+
+void DreamGenContext::getridoftemp2() {
+ STACK_CHECK;
+ es = data.word(kTempgraphics2);
+ deallocatemem();
+}
+
+void DreamGenContext::getridoftemp3() {
+ STACK_CHECK;
+ es = data.word(kTempgraphics3);
+ deallocatemem();
+}
+
+void DreamGenContext::getridoftempcharset() {
+ STACK_CHECK;
+ es = data.word(kTempcharset);
+ deallocatemem();
+}
+
+void DreamGenContext::getridoftempsp() {
+ STACK_CHECK;
+ es = data.word(kTempsprites);
+ deallocatemem();
+}
+
+void DreamGenContext::readsetdata() {
+ STACK_CHECK;
+ dx = 1857;
+ standardload();
+ data.word(kCharset1) = ax;
+ dx = 1922;
+ standardload();
+ data.word(kIcons1) = ax;
+ dx = 1935;
+ standardload();
+ data.word(kIcons2) = ax;
+ dx = 1819;
+ standardload();
+ data.word(kMainsprites) = ax;
+ dx = 2221;
+ standardload();
+ data.word(kPuzzletext) = ax;
+ dx = 2273;
+ standardload();
+ data.word(kCommandtext) = ax;
+ ax = data.word(kCharset1);
+ data.word(kCurrentset) = ax;
+ _cmp(data.byte(kSoundint), 255);
+ if (flags.z())
+ return /* (novolumeload) */;
+ dx = 2286;
+ openfile();
+ cx = 2048-256;
+ ds = data.word(kSoundbuffer);
+ dx = 16384;
+ readfromfile();
+ closefile();
+}
+
+void DreamGenContext::makename() {
+ STACK_CHECK;
+ si = dx;
+ di = 6061;
+transfer:
+ al = cs.byte(si);
+ cs.byte(di) = al;
+ _inc(si);
+ _inc(di);
+ _cmp(al, 0);
+ if (!flags.z())
+ goto transfer;
+ dx = 6059;
+}
+
+void DreamGenContext::dreamweb() {
+ STACK_CHECK;
+ seecommandtail();
+ checkbasemem();
+ soundstartup();
+ setkeyboardint();
+ setupemm();
+ allocatebuffers();
+ setmouse();
+ fadedos();
+ gettime();
+ clearbuffers();
+ clearpalette();
+ set16colpalette();
+ readsetdata();
+ data.byte(kWongame) = 0;
+ dx = 1909;
+ loadsample();
+ setsoundoff();
+ scanfornames();
+ _cmp(al, 0);
+ if (!flags.z())
+ goto dodecisions;
+ setmode();
+ loadpalfromiff();
+ titles();
+ credits();
+ goto playgame;
+dodecisions:
+ cls();
+ setmode();
+ decide();
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (exitgame) */;
+ _cmp(data.byte(kGetback), 4);
+ if (flags.z())
+ goto mainloop;
+ titles();
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (exitgame) */;
+ credits();
+playgame:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (exitgame) */;
+ clearchanges();
+ setmode();
+ loadpalfromiff();
+ data.byte(kLocation) = 255;
+ data.byte(kRoomafterdream) = 1;
+ data.byte(kNewlocation) = 35;
+ data.byte(kVolume) = 7;
+ loadroom();
+ clearsprites();
+ initman();
+ entrytexts();
+ entryanims();
+ data.byte(kDestpos) = 3;
+ initialinv();
+ data.byte(kLastflag) = 32;
+ startup1();
+ data.byte(kVolumeto) = 0;
+ data.byte(kVolumedirection) = -1;
+ data.byte(kCommandtype) = 255;
+ goto mainloop;
+loadnew:
+ clearbeforeload();
+ loadroom();
+ clearsprites();
+ initman();
+ entrytexts();
+ entryanims();
+ data.byte(kNewlocation) = 255;
+ startup();
+ data.byte(kCommandtype) = 255;
+ worktoscreenm();
+ goto mainloop;
+ data.byte(kNewlocation) = 255;
+ clearsprites();
+ initman();
+ startup();
+ data.byte(kCommandtype) = 255;
+mainloop:
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (exitgame) */;
+ screenupdate();
+ _cmp(data.byte(kWongame), 0);
+ if (!flags.z())
+ goto endofgame;
+ _cmp(data.byte(kMandead), 1);
+ if (flags.z())
+ goto gameover;
+ _cmp(data.byte(kMandead), 2);
+ if (flags.z())
+ goto gameover;
+ _cmp(data.word(kWatchingtime), 0);
+ if (flags.z())
+ goto notwatching;
+ al = data.byte(kFinaldest);
+ _cmp(al, data.byte(kManspath));
+ if (!flags.z())
+ goto mainloop;
+ _dec(data.word(kWatchingtime));
+ if (!flags.z())
+ goto mainloop;
+notwatching:
+ _cmp(data.byte(kMandead), 4);
+ if (flags.z())
+ goto gameover;
+ _cmp(data.byte(kNewlocation), 255);
+ if (!flags.z())
+ goto loadnew;
+ goto mainloop;
+gameover:
+ clearbeforeload();
+ showgun();
+ fadescreendown();
+ cx = 100;
+ hangon();
+ goto dodecisions;
+endofgame:
+ clearbeforeload();
+ fadescreendowns();
+ cx = 200;
+ hangon();
+ endgame();
+ { quickquit2(); return; };
+}
+
+
+
+void DreamGenContext::__start() {
+ static const uint8 src[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0xff, 0x00,
+ 0xff, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0xb6,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 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, 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, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2c, 0x00, 0x14, 0x00, 0x02, 0x00, 0x01, 0x01, 0x37,
+ 0x00, 0x00, 0x00, 0x32, 0x14, 0x00, 0x18, 0x16, 0x00, 0x4a, 0x00, 0x01, 0x00, 0x00, 0x18, 0x21,
+ 0x0a, 0x4b, 0x00, 0x01, 0x00, 0x01, 0x01, 0x2c, 0x00, 0x1b, 0x00, 0x02, 0x00, 0x02, 0x01, 0x2c,
+ 0x00, 0x60, 0x00, 0x03, 0x00, 0x04, 0x01, 0x2c, 0x00, 0x76, 0x00, 0x02, 0x00, 0x05, 0x01, 0x2c,
+ 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x16, 0x14, 0x35, 0x00, 0x03, 0x00, 0x00, 0x05, 0x16,
+ 0x14, 0x28, 0x00, 0x01, 0x00, 0x02, 0x05, 0x16, 0x14, 0x32, 0x00, 0x01, 0x00, 0x03, 0x02, 0x0b,
+ 0x0a, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x02, 0x0b, 0x0a, 0xb6, 0x00, 0x02, 0x00, 0x01, 0x08, 0x0b,
+ 0x0a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x17, 0x00, 0x32, 0x00, 0x00, 0x03, 0x00, 0x00, 0x1c, 0x0b,
+ 0x14, 0xfa, 0x00, 0x04, 0x00, 0x00, 0x17, 0x00, 0x32, 0x2b, 0x00, 0x02, 0x00, 0x08, 0x17, 0x0b,
+ 0x28, 0x82, 0x00, 0x02, 0x00, 0x01, 0x17, 0x16, 0x28, 0x7a, 0x00, 0x02, 0x00, 0x02, 0x17, 0x16,
+ 0x28, 0x69, 0x00, 0x02, 0x00, 0x03, 0x17, 0x16, 0x28, 0x51, 0x00, 0x02, 0x00, 0x04, 0x17, 0x0b,
+ 0x28, 0x87, 0x00, 0x02, 0x00, 0x05, 0x17, 0x16, 0x28, 0x91, 0x00, 0x02, 0x00, 0x06, 0x04, 0x16,
+ 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0xc8, 0x00, 0x00, 0x00, 0x14, 0x2d, 0x16,
+ 0x1e, 0x27, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0x19, 0x00, 0x02, 0x00, 0x00, 0x08, 0x16,
+ 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x07, 0x0b, 0x14, 0x40, 0x00, 0x02, 0x00, 0x00, 0x16, 0x16,
+ 0x14, 0x52, 0x00, 0x02, 0x00, 0x00, 0x1b, 0x0b, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x14, 0x00,
+ 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x21, 0x28, 0x15, 0x00, 0x01, 0x00, 0x00, 0x1d, 0x0b,
+ 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00,
+ 0x32, 0x04, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x1e, 0x79, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16,
+ 0x1e, 0x00, 0x00, 0x14, 0x00, 0x00, 0x34, 0x16, 0x1e, 0xc0, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16,
+ 0x1e, 0xe9, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x68, 0x00, 0x37, 0x00, 0x00, 0x35, 0x21,
+ 0x00, 0x63, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x00, 0x00, 0x03, 0x00, 0x00, 0x32, 0x16,
+ 0x1e, 0xa2, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0x39, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16,
+ 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x36, 0x00, 0x00, 0x48, 0x00, 0x03, 0x00, 0x00, 0x37, 0x2c,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0e, 0x16,
+ 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x16, 0x00, 0x2c, 0x01, 0x01, 0x00, 0x00, 0x0a, 0x16,
+ 0x1e, 0xae, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x16, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x0b,
+ 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x0b, 0x1e, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x16,
+ 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0e, 0x21, 0x28, 0x00, 0x00, 0x32, 0x14, 0x00, 0xff, 0x7c,
+ 0xc0, 0x80, 0xc0, 0x1c, 0xc0, 0x20, 0xc0, 0x00, 0xc1, 0x10, 0xc0, 0x18, 0xc0, 0xf4, 0xc0, 0x0c,
+ 0xc0, 0x24, 0xc0, 0x28, 0xc0, 0x2c, 0xc0, 0x30, 0xc0, 0x54, 0xc0, 0x78, 0xc0, 0x50, 0xc0, 0x74,
+ 0xc0, 0x34, 0xc0, 0x38, 0xc0, 0x40, 0xc0, 0x44, 0xc0, 0x48, 0xc0, 0x3c, 0xc0, 0x14, 0xc0, 0x88,
+ 0xc0, 0x8c, 0xc0, 0x90, 0xc0, 0x70, 0xc0, 0xfc, 0xc0, 0x6c, 0xc0, 0x58, 0xc0, 0x68, 0xc0, 0x04,
+ 0xc1, 0x64, 0xc0, 0x60, 0xc0, 0x5c, 0xc0, 0x94, 0xc0, 0x04, 0xc0, 0xa4, 0xc0, 0x9c, 0xc0, 0xa0,
+ 0xc0, 0xa8, 0xc0, 0xac, 0xc0, 0x98, 0xc0, 0xb0, 0xc0, 0xb4, 0xc0, 0xc8, 0xc0, 0xcc, 0xc0, 0xd4,
+ 0xc0, 0xdc, 0xc0, 0xd8, 0xc0, 0x00, 0xc0, 0x08, 0xc0, 0x84, 0xc0, 0x84, 0xc0, 0x84, 0xc0, 0x84,
+ 0xc0, 0x00, 0x3c, 0x21, 0x47, 0x0b, 0x52, 0x16, 0x5d, 0x01, 0x2c, 0x0a, 0x10, 0x04, 0x0b, 0x1e,
+ 0x0e, 0x04, 0x16, 0x1e, 0x0e, 0x03, 0x21, 0x0a, 0x0e, 0x0a, 0x21, 0x1e, 0x0e, 0x0a, 0x16, 0x1e,
+ 0x18, 0x09, 0x16, 0x0a, 0x0e, 0x02, 0x21, 0x00, 0x0e, 0x02, 0x16, 0x00, 0x0e, 0x06, 0x0b, 0x1e,
+ 0x0e, 0x07, 0x0b, 0x14, 0x12, 0x07, 0x00, 0x14, 0x12, 0x07, 0x00, 0x1e, 0x12, 0x37, 0x2c, 0x00,
+ 0x0e, 0x05, 0x16, 0x1e, 0x0e, 0x08, 0x00, 0x0a, 0x12, 0x08, 0x0b, 0x0a, 0x12, 0x08, 0x16, 0x0a,
+ 0x12, 0x08, 0x21, 0x0a, 0x12, 0x08, 0x21, 0x14, 0x12, 0x08, 0x21, 0x1e, 0x12, 0x08, 0x21, 0x28,
+ 0x12, 0x08, 0x16, 0x28, 0x12, 0x08, 0x0b, 0x28, 0x12, 0x15, 0x2c, 0x14, 0x12, 0xff, 0x2e, 0x05,
+ 0x2f, 0x05, 0x33, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x46, 0x05, 0x2e, 0x05, 0x4d, 0x05,
+ 0x5d, 0x05, 0x64, 0x05, 0x68, 0x05, 0x6c, 0x05, 0x70, 0x05, 0x7d, 0x05, 0x2e, 0x05, 0x2e, 0x05,
+ 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x9f, 0x05, 0x2e, 0x05, 0xb5, 0x05, 0xd4, 0x05, 0x2e, 0x05,
+ 0xe1, 0x05, 0xf7, 0x05, 0x0d, 0x06, 0x26, 0x06, 0x39, 0x06, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05,
+ 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05,
+ 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x49, 0x06, 0x50, 0x06, 0x75, 0x06, 0x2e, 0x05,
+ 0x2e, 0x05, 0x2e, 0x05, 0x2e, 0x05, 0x82, 0x06, 0x86, 0x06, 0x2e, 0x05, 0x8d, 0x06, 0xff, 0x0f,
+ 0x01, 0x01, 0xff, 0x0c, 0x05, 0x00, 0x0d, 0x15, 0x00, 0x0f, 0x23, 0x00, 0x11, 0x32, 0x00, 0x12,
+ 0x67, 0x00, 0x13, 0x6c, 0x00, 0xff, 0x12, 0x13, 0x00, 0x13, 0x17, 0x00, 0xff, 0x0c, 0x33, 0x00,
+ 0x0d, 0x35, 0x00, 0x0e, 0x0e, 0x00, 0x0f, 0x14, 0x00, 0x00, 0x4e, 0x00, 0xff, 0x0c, 0x77, 0x00,
+ 0x0c, 0x91, 0x00, 0xff, 0x0d, 0x10, 0x00, 0xff, 0x0d, 0x14, 0x00, 0xff, 0x0e, 0x10, 0x00, 0xff,
+ 0x0f, 0x04, 0x00, 0x10, 0x08, 0x00, 0x11, 0x86, 0x00, 0x12, 0x99, 0x00, 0xff, 0x0d, 0x6c, 0x00,
+ 0x0f, 0x46, 0x01, 0x0f, 0x4b, 0x01, 0x0f, 0x50, 0x01, 0x0f, 0x56, 0x01, 0x0f, 0x5c, 0x01, 0x0f,
+ 0x62, 0x01, 0x12, 0x9f, 0x00, 0x12, 0xb2, 0x00, 0x93, 0xd9, 0x00, 0x54, 0xe4, 0x00, 0xff, 0x0d,
+ 0x14, 0x00, 0x0d, 0x15, 0x00, 0x0f, 0x22, 0x00, 0x0d, 0x34, 0x00, 0x0d, 0x37, 0x00, 0x19, 0x39,
+ 0x00, 0x15, 0x49, 0x00, 0xff, 0x0d, 0xc4, 0x00, 0x0d, 0xea, 0x00, 0x0d, 0x9c, 0x00, 0x0e, 0x81,
+ 0x00, 0x0d, 0x7c, 0x00, 0x0f, 0xa2, 0x00, 0x0f, 0xc8, 0x00, 0x0f, 0xef, 0x00, 0x11, 0x63, 0x00,
+ 0x0c, 0x34, 0x00, 0xff, 0x0f, 0x38, 0x00, 0x10, 0x40, 0x00, 0x13, 0x16, 0x00, 0x14, 0x21, 0x00,
+ 0xff, 0x14, 0x0b, 0x00, 0x14, 0x0f, 0x00, 0x0f, 0x1c, 0x00, 0x0d, 0x50, 0x00, 0x15, 0x52, 0x00,
+ 0x93, 0x57, 0x00, 0x57, 0x80, 0x00, 0xff, 0x0c, 0x0d, 0x00, 0x0e, 0x27, 0x00, 0x0c, 0x43, 0x00,
+ 0x0c, 0x4b, 0x00, 0x0c, 0x53, 0x00, 0x0c, 0x5b, 0x00, 0x0f, 0x66, 0x00, 0xff, 0x16, 0x24, 0x00,
+ 0x0d, 0x7d, 0x00, 0x12, 0x58, 0x00, 0x0f, 0x6b, 0x00, 0x0e, 0x7f, 0x00, 0x0e, 0x9a, 0x00, 0x93,
+ 0xaa, 0x00, 0x57, 0xe8, 0x00, 0xff, 0x15, 0x10, 0x00, 0x15, 0x48, 0x00, 0x15, 0xcd, 0x00, 0x16,
+ 0x3f, 0x00, 0x97, 0x63, 0x00, 0x58, 0x9e, 0x00, 0xff, 0x0d, 0x15, 0x00, 0x0e, 0x18, 0x00, 0x93,
+ 0x32, 0x00, 0x57, 0x4b, 0x00, 0x18, 0x80, 0x00, 0xff, 0x53, 0x2e, 0x00, 0x10, 0xa7, 0x00, 0xff,
+ 0x10, 0x13, 0x00, 0x0e, 0x24, 0x00, 0x10, 0x32, 0x00, 0x0e, 0x41, 0x00, 0x10, 0x51, 0x00, 0x0e,
+ 0x60, 0x00, 0x10, 0x72, 0x00, 0x0e, 0x81, 0x00, 0x10, 0x93, 0x00, 0x0e, 0xa2, 0x00, 0x10, 0xb1,
+ 0x00, 0x0e, 0xbf, 0x00, 0xff, 0x0d, 0x30, 0x00, 0x0e, 0x29, 0x00, 0x0f, 0x4e, 0x00, 0x10, 0x5c,
+ 0x00, 0xff, 0x10, 0x73, 0x00, 0xff, 0x15, 0x67, 0x00, 0x14, 0xc7, 0x00, 0xff, 0x11, 0x35, 0x00,
+ 0x11, 0x36, 0x00, 0x11, 0x37, 0x00, 0x11, 0x38, 0x00, 0x11, 0x39, 0x00, 0x11, 0x3a, 0x00, 0x11,
+ 0x3b, 0x00, 0x11, 0x3d, 0x00, 0x11, 0x3f, 0x00, 0x11, 0x40, 0x00, 0x11, 0x41, 0x00, 0xff, 0x9c,
+ 0x9a, 0x9f, 0x9a, 0x9c, 0x9e, 0xa0, 0x9b, 0x9d, 0x99, 0x9f, 0x9e, 0x9c, 0x9a, 0x9f, 0x9a, 0x9c,
+ 0x9e, 0xa0, 0x9b, 0x9d, 0x99, 0x9f, 0x9e, 0x9c, 0x9a, 0x9f, 0x9a, 0x9c, 0x9e, 0xa0, 0x9b, 0x9d,
+ 0x99, 0x9f, 0x9e, 0x9c, 0x9a, 0x9f, 0x9a, 0x9c, 0x9e, 0xa0, 0x9b, 0x9d, 0x99, 0x9f, 0x9e, 0x9c,
+ 0x9a, 0x9f, 0x9a, 0x9c, 0x9e, 0xa0, 0x9b, 0x9d, 0x99, 0x9f, 0x9e, 0x9c, 0x9a, 0x9f, 0x9a, 0x9c,
+ 0x9e, 0xa0, 0x9b, 0x9d, 0x99, 0x9f, 0x9e, 0x9c, 0x9a, 0x9f, 0x9a, 0x9c, 0x9e, 0xa0, 0x9b, 0x9d,
+ 0x99, 0x9f, 0x9e, 0x9c, 0x9a, 0x9f, 0x9a, 0x9c, 0x9e, 0xa0, 0x9b, 0x9d, 0x99, 0x9f, 0x9e, 0x9c,
+ 0x9a, 0x9f, 0x9a, 0x9c, 0x9e, 0xa0, 0x9b, 0x9d, 0x99, 0x9f, 0x9c, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x53, 0x30, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
+ 0x2e, 0x53, 0x30, 0x32, 0x00, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x2e, 0x44, 0x41, 0x54,
+ 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x43, 0x30, 0x30, 0x00, 0x44, 0x52,
+ 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x43, 0x30, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x43, 0x30, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
+ 0x2e, 0x56, 0x30, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39,
+ 0x39, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x30, 0x30, 0x00, 0x44,
+ 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x30, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41,
+ 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x30, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45,
+ 0x42, 0x2e, 0x47, 0x30, 0x38, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47,
+ 0x30, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x30, 0x37, 0x00,
+ 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x30, 0x34, 0x00, 0x44, 0x52, 0x45,
+ 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x30, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57,
+ 0x45, 0x42, 0x2e, 0x47, 0x30, 0x36, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e,
+ 0x47, 0x31, 0x34, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x30, 0x31,
+ 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x30, 0x32, 0x00, 0x44, 0x52,
+ 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x31, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x54, 0x31, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
+ 0x2e, 0x54, 0x31, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x31,
+ 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x32, 0x30, 0x00, 0x44,
+ 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x32, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41,
+ 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x32, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45,
+ 0x42, 0x2e, 0x54, 0x32, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54,
+ 0x32, 0x34, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x35, 0x30, 0x00,
+ 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x35, 0x31, 0x00, 0x44, 0x52, 0x45,
+ 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x38, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57,
+ 0x45, 0x42, 0x2e, 0x54, 0x38, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e,
+ 0x54, 0x38, 0x32, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x38, 0x33,
+ 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x54, 0x38, 0x34, 0x00, 0x44, 0x52,
+ 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x4f, 0x4c, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x47, 0x30, 0x39, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
+ 0x2e, 0x47, 0x31, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31,
+ 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x32, 0x00, 0x44,
+ 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x33, 0x00, 0x44, 0x52, 0x45, 0x41,
+ 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45,
+ 0x42, 0x2e, 0x49, 0x30, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49,
+ 0x30, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x32, 0x00,
+ 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x33, 0x00, 0x44, 0x52, 0x45,
+ 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x34, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57,
+ 0x45, 0x42, 0x2e, 0x49, 0x30, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e,
+ 0x49, 0x30, 0x36, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x49, 0x30, 0x37,
+ 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x50, 0x41, 0x4c, 0x00, 0x11, 0x01,
+ 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x44, 0xc3, 0x04, 0x01, 0x2c, 0x01, 0x00, 0x00, 0x2c, 0x00,
+ 0x80, 0xc5, 0xd2, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x2c, 0x00, 0xdc, 0xc3, 0x90, 0x00, 0xb0, 0x00,
+ 0x40, 0x00, 0x60, 0x00, 0x80, 0xc3, 0x00, 0x00, 0x32, 0x00, 0x32, 0x00, 0xc8, 0x00, 0x84, 0xc3,
+ 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 0x40, 0x01,
+ 0x9d, 0x00, 0xc6, 0x00, 0x44, 0xc3, 0xff, 0x00, 0x26, 0x01, 0x00, 0x00, 0x18, 0x00, 0xc8, 0xc3,
+ 0xf7, 0x00, 0x2d, 0x01, 0x28, 0x00, 0x38, 0x00, 0x48, 0xc3, 0x50, 0x00, 0x00, 0x01, 0x9e, 0x00,
+ 0xca, 0x00, 0xe0, 0xc3, 0x50, 0x00, 0x2c, 0x01, 0x3a, 0x00, 0x92, 0x00, 0x98, 0xc3, 0x00, 0x00,
+ 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00,
+ 0xc6, 0x00, 0x44, 0xc3, 0xf7, 0x00, 0x2d, 0x01, 0x28, 0x00, 0x38, 0x00, 0x48, 0xc3, 0x50, 0x00,
+ 0x2c, 0x01, 0x3a, 0x00, 0x92, 0x00, 0xbc, 0xc6, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
+ 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0xf0, 0x00,
+ 0x22, 0x01, 0x02, 0x00, 0x2c, 0x00, 0x94, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
+ 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00,
+ 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0xee, 0x00, 0x02, 0x01, 0x04, 0x00,
+ 0x2c, 0x00, 0xc8, 0xc4, 0x68, 0x00, 0x7c, 0x00, 0x04, 0x00, 0x2c, 0x00, 0xcc, 0xc4, 0x18, 0x01,
+ 0x34, 0x01, 0x04, 0x00, 0x2c, 0x00, 0xb0, 0xc4, 0x68, 0x00, 0xd8, 0x00, 0x8a, 0x00, 0xc0, 0x00,
+ 0xd0, 0xc4, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01,
+ 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00,
+ 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49,
+ 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20,
+ 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f,
+ 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x4e, 0x45, 0x54, 0x57, 0xe8, 0xc4, 0x45, 0x4c,
+ 0x56, 0x41, 0x8c, 0xc6, 0x45, 0x4c, 0x56, 0x42, 0x9c, 0xc6, 0x45, 0x4c, 0x56, 0x43, 0x94, 0xc6,
+ 0x45, 0x4c, 0x56, 0x45, 0x98, 0xc6, 0x45, 0x4c, 0x56, 0x46, 0xa0, 0xc6, 0x43, 0x47, 0x41, 0x54,
+ 0x30, 0xc7, 0x52, 0x45, 0x4d, 0x4f, 0xa8, 0xc6, 0x42, 0x55, 0x54, 0x41, 0x3c, 0xc7, 0x43, 0x42,
+ 0x4f, 0x58, 0x44, 0xc7, 0x4c, 0x49, 0x54, 0x45, 0x5c, 0xc6, 0x50, 0x4c, 0x41, 0x54, 0x40, 0xc7,
+ 0x4c, 0x49, 0x46, 0x54, 0x7c, 0xc6, 0x57, 0x49, 0x52, 0x45, 0x84, 0xc6, 0x48, 0x4e, 0x44, 0x4c,
+ 0x88, 0xc6, 0x48, 0x41, 0x43, 0x48, 0x80, 0xc6, 0x44, 0x4f, 0x4f, 0x52, 0xb4, 0xc6, 0x43, 0x53,
+ 0x48, 0x52, 0x70, 0xc6, 0x47, 0x55, 0x4e, 0x41, 0x34, 0xc7, 0x43, 0x52, 0x41, 0x41, 0x64, 0xc6,
+ 0x43, 0x52, 0x42, 0x42, 0x68, 0xc6, 0x43, 0x52, 0x43, 0x43, 0x6c, 0xc6, 0x53, 0x45, 0x41, 0x54,
+ 0xf8, 0xc5, 0x4d, 0x45, 0x4e, 0x55, 0x98, 0xc7, 0x43, 0x4f, 0x4f, 0x4b, 0xac, 0xc6, 0x45, 0x4c,
+ 0x43, 0x41, 0x4c, 0xc6, 0x45, 0x44, 0x43, 0x41, 0x50, 0xc6, 0x44, 0x44, 0x43, 0x41, 0x54, 0xc6,
+ 0x41, 0x4c, 0x54, 0x52, 0x04, 0xc6, 0x4c, 0x4f, 0x4b, 0x41, 0x3c, 0xc6, 0x4c, 0x4f, 0x4b, 0x42,
+ 0x40, 0xc6, 0x45, 0x4e, 0x54, 0x41, 0x10, 0xc6, 0x45, 0x4e, 0x54, 0x42, 0x24, 0xc6, 0x45, 0x4e,
+ 0x54, 0x45, 0x28, 0xc6, 0x45, 0x4e, 0x54, 0x43, 0x18, 0xc6, 0x45, 0x4e, 0x54, 0x44, 0x2c, 0xc6,
+ 0x45, 0x4e, 0x54, 0x48, 0x30, 0xc6, 0x57, 0x57, 0x41, 0x54, 0xf0, 0xc5, 0x50, 0x4f, 0x4f, 0x4c,
+ 0x58, 0xc6, 0x57, 0x53, 0x48, 0x44, 0xf4, 0xc5, 0x47, 0x52, 0x41, 0x46, 0x44, 0xc6, 0x54, 0x52,
+ 0x41, 0x50, 0x48, 0xc6, 0x43, 0x44, 0x50, 0x45, 0x28, 0xc7, 0x44, 0x4c, 0x4f, 0x4b, 0x08, 0xc6,
+ 0x48, 0x4f, 0x4c, 0x45, 0x00, 0xc6, 0x44, 0x52, 0x59, 0x52, 0x0c, 0xc6, 0x48, 0x4f, 0x4c, 0x59,
+ 0xfc, 0xc5, 0x57, 0x41, 0x4c, 0x4c, 0x2c, 0xc7, 0x42, 0x4f, 0x4f, 0x4b, 0x08, 0xc8, 0x41, 0x58,
+ 0x45, 0x44, 0xb0, 0xc6, 0x53, 0x48, 0x4c, 0x44, 0x38, 0xc7, 0x42, 0x43, 0x4e, 0x59, 0xe8, 0xc5,
+ 0x4c, 0x49, 0x44, 0x43, 0xe4, 0xc5, 0x4c, 0x49, 0x44, 0x55, 0xe0, 0xc5, 0x4c, 0x49, 0x44, 0x4f,
+ 0xec, 0xc5, 0x50, 0x49, 0x50, 0x45, 0xa8, 0xc5, 0x42, 0x41, 0x4c, 0x43, 0x20, 0xc6, 0x57, 0x49,
+ 0x4e, 0x44, 0x1c, 0xc6, 0x50, 0x41, 0x50, 0x52, 0xb4, 0xc7, 0x55, 0x57, 0x54, 0x41, 0xa0, 0xc5,
+ 0x55, 0x57, 0x54, 0x42, 0xa0, 0xc5, 0x53, 0x54, 0x41, 0x54, 0xd8, 0xc7, 0x54, 0x4c, 0x49, 0x44,
+ 0x9c, 0xc5, 0x53, 0x4c, 0x41, 0x42, 0xd8, 0xc5, 0x43, 0x41, 0x52, 0x54, 0xdc, 0xc5, 0x46, 0x43,
+ 0x41, 0x52, 0xac, 0xc5, 0x53, 0x4c, 0x42, 0x41, 0xc0, 0xc5, 0x53, 0x4c, 0x42, 0x42, 0xc4, 0xc5,
+ 0x53, 0x4c, 0x42, 0x43, 0xcc, 0xc5, 0x53, 0x4c, 0x42, 0x44, 0xc8, 0xc5, 0x53, 0x4c, 0x42, 0x45,
+ 0xd0, 0xc5, 0x53, 0x4c, 0x42, 0x46, 0xd4, 0xc5, 0x50, 0x4c, 0x49, 0x4e, 0xb0, 0xc5, 0x4c, 0x41,
+ 0x44, 0x44, 0xb8, 0xc5, 0x4c, 0x41, 0x44, 0x42, 0xbc, 0xc5, 0x47, 0x55, 0x4d, 0x41, 0xb4, 0xc5,
+ 0x53, 0x51, 0x45, 0x45, 0x88, 0xc5, 0x54, 0x41, 0x50, 0x50, 0x8c, 0xc5, 0x47, 0x55, 0x49, 0x54,
+ 0x90, 0xc5, 0x43, 0x4f, 0x4e, 0x54, 0x94, 0xc5, 0x42, 0x45, 0x4c, 0x4c, 0x98, 0xc5, 0x8c, 0x8c,
+ 0x8c, 0x8c, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0x9d, 0x00, 0xb2, 0x00, 0x51, 0x00,
+ 0x5e, 0x00, 0x58, 0xc7, 0xb3, 0x00, 0xc8, 0x00, 0x51, 0x00, 0x5e, 0x00, 0x5c, 0xc7, 0xc9, 0x00,
+ 0xde, 0x00, 0x51, 0x00, 0x5e, 0x00, 0x60, 0xc7, 0x9d, 0x00, 0xb2, 0x00, 0x5f, 0x00, 0x70, 0x00,
+ 0x64, 0xc7, 0xb3, 0x00, 0xc8, 0x00, 0x5f, 0x00, 0x70, 0x00, 0x68, 0xc7, 0xc9, 0x00, 0xde, 0x00,
+ 0x5f, 0x00, 0x70, 0x00, 0x6c, 0xc7, 0x9d, 0x00, 0xb2, 0x00, 0x71, 0x00, 0x82, 0x00, 0x70, 0xc7,
+ 0xb3, 0x00, 0xc8, 0x00, 0x71, 0x00, 0x82, 0x00, 0x74, 0xc7, 0xc9, 0x00, 0xde, 0x00, 0x71, 0x00,
+ 0x82, 0x00, 0x78, 0xc7, 0x9d, 0x00, 0xb2, 0x00, 0x83, 0x00, 0x91, 0x00, 0x7c, 0xc7, 0xb3, 0x00,
+ 0xde, 0x00, 0x83, 0x00, 0x91, 0x00, 0x80, 0xc7, 0xdc, 0x00, 0xea, 0x00, 0x98, 0x00, 0xa6, 0x00,
+ 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0xae, 0x00,
+ 0xbc, 0x00, 0x84, 0x00, 0x94, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
+ 0xa0, 0xca, 0xff, 0xff, 0x18, 0x01, 0x40, 0x01, 0xa0, 0x00, 0xc8, 0x00, 0x50, 0xc7, 0x8f, 0x00,
+ 0x2c, 0x01, 0x06, 0x00, 0xc2, 0x00, 0xb8, 0xc7, 0x00, 0x00, 0x8f, 0x00, 0x06, 0x00, 0xc2, 0x00,
+ 0xc0, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x68, 0x00,
+ 0x80, 0x00, 0x3a, 0x00, 0x48, 0x00, 0xdc, 0xc7, 0x40, 0x00, 0x74, 0x00, 0x4c, 0x00, 0x6a, 0x00,
+ 0xe0, 0xc7, 0x74, 0x00, 0xa8, 0x00, 0x4c, 0x00, 0x6a, 0x00, 0xe4, 0xc7, 0x40, 0x00, 0x74, 0x00,
+ 0x6a, 0x00, 0x88, 0x00, 0xe8, 0xc7, 0x74, 0x00, 0xa8, 0x00, 0x6a, 0x00, 0x88, 0x00, 0xec, 0xc7,
+ 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0xba, 0x00, 0xca, 0x00,
+ 0x9d, 0x00, 0xad, 0x00, 0x1c, 0xc8, 0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8,
+ 0x0c, 0x01, 0x1c, 0x01, 0xa8, 0x00, 0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00,
+ 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8,
+ 0x46, 0x00, 0x89, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00,
+ 0x98, 0x00, 0x4c, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff,
+ 0xec, 0x00, 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x40, 0x00,
+ 0x98, 0x00, 0x58, 0xc8, 0x3e, 0x00, 0x98, 0x00, 0x38, 0x00, 0x85, 0x00, 0x74, 0xc8, 0x00, 0x00,
+ 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00,
+ 0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x50, 0xc8, 0xec, 0x00,
+ 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
+ 0xa0, 0xca, 0xff, 0xff, 0xec, 0x00, 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0xbc, 0x00,
+ 0xfa, 0x00, 0x40, 0x00, 0x98, 0x00, 0x54, 0xc8, 0x3e, 0x00, 0x98, 0x00, 0x38, 0x00, 0x85, 0x00,
+ 0x74, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a,
+ 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61,
+ 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x0d, 0x0a, 0x55, 0x6e, 0x61, 0x62, 0x6c, 0x65,
+ 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x20, 0x45, 0x78, 0x70,
+ 0x61, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x2e, 0x0d, 0x0a, 0x0d,
+ 0x0a, 0x24, 0x0d, 0x0a, 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62, 0x20, 0x68,
+ 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x0d, 0x0a, 0x53, 0x6f,
+ 0x75, 0x6e, 0x64, 0x20, 0x42, 0x6c, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x63, 0x61, 0x72, 0x64,
+ 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x61, 0x74, 0x20, 0x61, 0x64,
+ 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x32, 0x32, 0x30, 0x20, 0x48, 0x65, 0x78, 0x2e, 0x0d, 0x0a,
+ 0x0d, 0x0a, 0x24, 0x0d, 0x0a, 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62, 0x20,
+ 0x68, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x0d, 0x0a, 0x4f,
+ 0x75, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x42, 0x61, 0x73, 0x65, 0x20, 0x4d, 0x65, 0x6d, 0x6f, 0x72,
+ 0x79, 0x2e, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x0d, 0x0a, 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d,
+ 0x77, 0x65, 0x62, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72,
+ 0x3a, 0x0d, 0x0a, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x20, 0x44, 0x65, 0x61, 0x6c, 0x6c, 0x6f,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x2e, 0x0d,
+ 0x0a, 0x0d, 0x0a, 0x24, 0x0d, 0x0a, 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62,
+ 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x0d, 0x0a,
+ 0x41, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x35, 0x39, 0x30, 0x4b, 0x20, 0x6f, 0x66,
+ 0x20, 0x62, 0x61, 0x73, 0x65, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x20, 0x69, 0x73, 0x20,
+ 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x2e, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x0d, 0x0a,
+ 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61,
+ 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x0d, 0x0a, 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x20,
+ 0x42, 0x6c, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e,
+ 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x75, 0x70, 0x74, 0x20, 0x30, 0x0d,
+ 0x0a, 0x0d, 0x0a, 0x24, 0x0d, 0x0a, 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62,
+ 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x0d, 0x0a,
+ 0x55, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74,
+ 0x20, 0x45, 0x4d, 0x4d, 0x20, 0x70, 0x61, 0x67, 0x65, 0x2e, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x0d,
+ 0x0a, 0x0d, 0x0a, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62, 0x20, 0x68, 0x61, 0x73, 0x20,
+ 0x61, 0x6e, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x0d, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x20,
+ 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x63, 0x0d, 0x0a, 0x0d, 0x0a, 0x24,
+ 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x66,
+ 0x6f, 0x72, 0x20, 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x42, 0x6c, 0x61, 0x73, 0x74, 0x65, 0x72,
+ 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x0d,
+ 0x0a, 0x74, 0x68, 0x65, 0x20, 0x42, 0x4c, 0x41, 0x53, 0x54, 0x45, 0x52, 0x20, 0x65, 0x6e, 0x76,
+ 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
+ 0x65, 0x20, 0x28, 0x69, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x41, 0x55, 0x54, 0x4f, 0x45,
+ 0x58, 0x45, 0x43, 0x2e, 0x42, 0x41, 0x54, 0x29, 0x0d, 0x0a, 0x0d, 0x0a, 0x49, 0x66, 0x20, 0x74,
+ 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64,
+ 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x49, 0x52, 0x51, 0x20, 0x37, 0x2c, 0x20, 0x44, 0x4d, 0x41,
+ 0x20, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x20, 0x31, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62,
+ 0x61, 0x73, 0x65, 0x0d, 0x0a, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x32, 0x32, 0x30,
+ 0x68, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x2e, 0x0d, 0x0a,
+ 0x0d, 0x0a, 0x54, 0x6f, 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f,
+ 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x73,
+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20,
+ 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x0d, 0x0a, 0x6f, 0x6e,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x69, 0x6e,
+ 0x65, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x0d,
+ 0x0a, 0x0d, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x20, 0x20, 0x20, 0x20, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x20, 0x49, 0x37, 0x20, 0x41, 0x32, 0x32, 0x30, 0x20, 0x44, 0x31, 0x20, 0x20,
+ 0x20, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65,
+ 0x62, 0x20, 0x6f, 0x6e, 0x20, 0x49, 0x52, 0x51, 0x20, 0x37, 0x2c, 0x20, 0x44, 0x4d, 0x41, 0x0d,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x20, 0x31, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x61,
+ 0x73, 0x65, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x32, 0x32, 0x30, 0x68, 0x0d,
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45,
+ 0x42, 0x20, 0x49, 0x35, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x74, 0x6f, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x77, 0x65, 0x62, 0x20,
+ 0x6f, 0x6e, 0x20, 0x49, 0x52, 0x51, 0x20, 0x35, 0x20, 0x61, 0x6e, 0x64, 0x0d, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20,
+ 0x32, 0x32, 0x30, 0x68, 0x2c, 0x20, 0x44, 0x4d, 0x41, 0x20, 0x31, 0x0d, 0x0a, 0x0d, 0x0a, 0x24,
+ 0x0d, 0x0a, 0x0d, 0x0a, 0x54, 0x72, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x44, 0x72, 0x65, 0x61,
+ 0x6d, 0x77, 0x65, 0x62, 0x20, 0x43, 0x44, 0x20, 0x69, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20,
+ 0x73, 0x74, 0x65, 0x72, 0x65, 0x6f, 0x2e, 0x2e, 0x2e, 0x2e, 0x0d, 0x0a, 0x0d, 0x0a, 0x0d, 0x0a,
+ 0x24, 0x81, 0x00, 0xb8, 0x00, 0x52, 0x00, 0x80, 0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e,
+ 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xb7, 0x00, 0xfa, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00,
+ 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43,
+ 0x48, 0x52, 0x32, 0x34, 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x87, 0x83,
+ 0x81, 0x82, 0x2c, 0x00, 0x46, 0x00, 0x20, 0x00, 0x2e, 0x00, 0x70, 0xc4, 0x00, 0x00, 0x32, 0x00,
+ 0x00, 0x00, 0xb4, 0x00, 0x7c, 0xc3, 0xe2, 0x00, 0xf4, 0x00, 0x0a, 0x00, 0x1a, 0x00, 0x28, 0xc8,
+ 0xe2, 0x00, 0xf4, 0x00, 0x1a, 0x00, 0x28, 0x00, 0x2c, 0xc8, 0xf0, 0x00, 0x04, 0x01, 0x64, 0x00,
+ 0x7c, 0x00, 0xcc, 0xc9, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xd4, 0xc9, 0xff, 0xff,
+ 0x2c, 0x00, 0x46, 0x00, 0x20, 0x00, 0x2e, 0x00, 0x70, 0xc4, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
+ 0xb4, 0x00, 0x7c, 0xc3, 0x12, 0x01, 0x24, 0x01, 0x0a, 0x00, 0x1a, 0x00, 0x28, 0xc8, 0x12, 0x01,
+ 0x24, 0x01, 0x1a, 0x00, 0x28, 0x00, 0x2c, 0xc8, 0xf0, 0x00, 0x04, 0x01, 0x64, 0x00, 0x7c, 0x00,
+ 0xcc, 0xc9, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xd4, 0xc9, 0xff, 0xff, 0x00, 0x21,
+ 0x0a, 0x0f, 0xff, 0x00, 0x16, 0x0a, 0x0f, 0xff, 0x00, 0x16, 0x00, 0x0f, 0xff, 0x00, 0x0b, 0x00,
+ 0x0f, 0xff, 0x00, 0x0b, 0x0a, 0x0f, 0xff, 0x00, 0x00, 0x0a, 0x0f, 0xff, 0x01, 0x2c, 0x0a, 0x06,
+ 0xff, 0x01, 0x2c, 0x00, 0x0d, 0xff, 0x02, 0x21, 0x00, 0x06, 0xff, 0x02, 0x16, 0x00, 0x05, 0xff,
+ 0x02, 0x16, 0x0a, 0x10, 0xff, 0x02, 0x0b, 0x0a, 0x10, 0xff, 0x03, 0x2c, 0x00, 0x0f, 0xff, 0x03,
+ 0x21, 0x0a, 0x06, 0xff, 0x03, 0x21, 0x00, 0x05, 0xff, 0x04, 0x0b, 0x1e, 0x06, 0xff, 0x04, 0x16,
+ 0x1e, 0x05, 0xff, 0x04, 0x16, 0x14, 0x0d, 0xff, 0x0a, 0x21, 0x1e, 0x06, 0xff, 0x0a, 0x16, 0x1e,
+ 0x06, 0xff, 0x09, 0x16, 0x0a, 0x06, 0xff, 0x09, 0x16, 0x14, 0x10, 0xff, 0x09, 0x16, 0x1e, 0x10,
+ 0xff, 0x09, 0x16, 0x28, 0x10, 0xff, 0x09, 0x16, 0x32, 0x10, 0xff, 0x06, 0x0b, 0x1e, 0x06, 0xff,
+ 0x06, 0x00, 0x0a, 0x0f, 0xff, 0x06, 0x00, 0x14, 0x0f, 0xff, 0x06, 0x0b, 0x14, 0x0f, 0xff, 0x06,
+ 0x16, 0x14, 0x0f, 0xff, 0x07, 0x0b, 0x14, 0x06, 0xff, 0x07, 0x00, 0x14, 0x06, 0xff, 0x07, 0x00,
+ 0x1e, 0x06, 0xff, 0x37, 0x2c, 0x00, 0x05, 0xff, 0x37, 0x2c, 0x0a, 0x05, 0xff, 0x05, 0x16, 0x1e,
+ 0x06, 0xff, 0x05, 0x16, 0x14, 0x0f, 0xff, 0x05, 0x16, 0x0a, 0x0f, 0xff, 0x18, 0x16, 0x00, 0x0f,
+ 0xff, 0x18, 0x21, 0x00, 0x0f, 0xff, 0x18, 0x2c, 0x00, 0x0f, 0xff, 0x18, 0x21, 0x0a, 0x0f, 0xff,
+ 0x08, 0x00, 0x0a, 0x06, 0xff, 0x08, 0x0b, 0x0a, 0x06, 0xff, 0x08, 0x16, 0x0a, 0x06, 0xff, 0x08,
+ 0x21, 0x0a, 0x06, 0xff, 0x08, 0x21, 0x14, 0x06, 0xff, 0x08, 0x21, 0x1e, 0x06, 0xff, 0x08, 0x21,
+ 0x28, 0x06, 0xff, 0x08, 0x16, 0x28, 0x06, 0xff, 0x08, 0x0b, 0x28, 0x06, 0xff, 0x0b, 0x0b, 0x14,
+ 0x0c, 0xff, 0x0b, 0x0b, 0x1e, 0x0c, 0xff, 0x0b, 0x16, 0x14, 0x0c, 0xff, 0x0b, 0x16, 0x1e, 0x0c,
+ 0xff, 0x0c, 0x16, 0x14, 0x0c, 0xff, 0x0d, 0x16, 0x14, 0x0c, 0xff, 0x0d, 0x21, 0x14, 0x0c, 0xff,
+ 0x0e, 0x2c, 0x14, 0x0c, 0xff, 0x0e, 0x21, 0x00, 0x0c, 0xff, 0x0e, 0x21, 0x0a, 0x0c, 0xff, 0x0e,
+ 0x21, 0x14, 0x0c, 0xff, 0x0e, 0x21, 0x1e, 0x0c, 0xff, 0x0e, 0x21, 0x28, 0x0c, 0xff, 0x0e, 0x16,
+ 0x00, 0x10, 0xff, 0x13, 0x00, 0x00, 0x0c, 0xff, 0x14, 0x00, 0x14, 0x10, 0xff, 0x14, 0x00, 0x1e,
+ 0x10, 0xff, 0x14, 0x0b, 0x1e, 0x10, 0xff, 0x14, 0x00, 0x28, 0x10, 0xff, 0x14, 0x0b, 0x28, 0x10,
+ 0xff, 0x15, 0x0b, 0x0a, 0x0f, 0xff, 0x15, 0x0b, 0x14, 0x0f, 0xff, 0x15, 0x00, 0x14, 0x0f, 0xff,
+ 0x15, 0x16, 0x14, 0x0f, 0xff, 0x15, 0x21, 0x14, 0x0f, 0xff, 0x15, 0x2c, 0x14, 0x0f, 0xff, 0x15,
+ 0x2c, 0x0a, 0x0f, 0xff, 0x16, 0x16, 0x0a, 0x10, 0xff, 0x16, 0x16, 0x14, 0x10, 0xff, 0x17, 0x16,
+ 0x1e, 0x0d, 0xff, 0x17, 0x16, 0x28, 0x0d, 0xff, 0x17, 0x21, 0x28, 0x0d, 0xff, 0x17, 0x0b, 0x28,
+ 0x0d, 0xff, 0x17, 0x00, 0x28, 0x0d, 0xff, 0x17, 0x00, 0x32, 0x0d, 0xff, 0x19, 0x0b, 0x28, 0x10,
+ 0xff, 0x19, 0x0b, 0x32, 0x10, 0xff, 0x19, 0x00, 0x32, 0x10, 0xff, 0x1b, 0x0b, 0x14, 0x10, 0xff,
+ 0x1b, 0x0b, 0x1e, 0x10, 0xff, 0x1d, 0x0b, 0x0a, 0x10, 0xff, 0x2d, 0x16, 0x1e, 0x0c, 0xff, 0x2d,
+ 0x16, 0x28, 0x0c, 0xff, 0x2d, 0x16, 0x32, 0x0c, 0xff, 0x2e, 0x16, 0x28, 0x0c, 0xff, 0x2e, 0x0b,
+ 0x32, 0x0c, 0xff, 0x2e, 0x16, 0x32, 0x0c, 0xff, 0x2e, 0x21, 0x32, 0x0c, 0xff, 0x2f, 0x00, 0x00,
+ 0x0c, 0xff, 0x1a, 0x16, 0x14, 0x10, 0xff, 0x1a, 0x21, 0x0a, 0x10, 0xff, 0x1a, 0x21, 0x14, 0x10,
+ 0xff, 0x1a, 0x21, 0x1e, 0x10, 0xff, 0x1a, 0x2c, 0x1e, 0x10, 0xff, 0x1a, 0x16, 0x1e, 0x10, 0xff,
+ 0x1a, 0x0b, 0x1e, 0x10, 0xff, 0x1a, 0x0b, 0x14, 0x10, 0xff, 0x1a, 0x00, 0x14, 0x10, 0xff, 0x1a,
+ 0x0b, 0x28, 0x10, 0xff, 0x1a, 0x00, 0x28, 0x10, 0xff, 0x1a, 0x16, 0x28, 0x10, 0xff, 0x1a, 0x0b,
+ 0x32, 0x10, 0xff, 0x1c, 0x00, 0x1e, 0x0f, 0xff, 0x1c, 0x00, 0x14, 0x0f, 0xff, 0x1c, 0x00, 0x28,
+ 0x0f, 0xff, 0x1c, 0x0b, 0x1e, 0x0f, 0xff, 0x1c, 0x0b, 0x14, 0x0f, 0xff, 0x1c, 0x16, 0x1e, 0x0f,
+ 0xff, 0x1c, 0x16, 0x14, 0x0f, 0xff, 0xff, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 0x41,
+ 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
+ 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36,
+ 0x37, 0x38, 0x39, 0x30, 0x2d, 0x00, 0x08, 0x00, 0x51, 0x57, 0x45, 0x52, 0x54, 0x59, 0x55, 0x49,
+ 0x4f, 0x50, 0x00, 0x00, 0x0d, 0x00, 0x41, 0x53, 0x44, 0x46, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x5a, 0x58, 0x43, 0x56, 0x42, 0x4e, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x3a, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x20, 0x44, 0x41, 0x54, 0x41, 0x20, 0x46, 0x49, 0x4c, 0x45, 0x20, 0x43, 0x4f,
+ 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x31, 0x39, 0x39, 0x32, 0x20, 0x43, 0x52, 0x45,
+ 0x41, 0x54, 0x49, 0x56, 0x45, 0x20, 0x52, 0x45, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x30, 0x00, 0x05, 0xff, 0x21, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x06, 0x02, 0xff, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x31, 0x00, 0x01, 0xff, 0x2c, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x07, 0x02, 0xff, 0xff, 0xff, 0xff, 0x06, 0xff, 0xff, 0xff, 0x01, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x32, 0x00, 0x02, 0xff, 0x21, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x00, 0xff, 0xff, 0x01, 0xff, 0x03, 0xff, 0xff, 0xff, 0x02, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x33, 0x00, 0x05, 0xff, 0x21, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x02, 0x02, 0x00, 0x02, 0x04, 0xff, 0x00, 0xff, 0xff, 0xff, 0x03, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x34, 0x00, 0x17, 0xff, 0x0b, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0x00, 0x05, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0x04, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x35, 0x00, 0x05, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x02, 0x00, 0x04, 0xff, 0xff, 0x03, 0xff, 0xff, 0xff, 0x05, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x36, 0x00, 0x05, 0xff, 0x0b, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x00, 0x00, 0x01, 0x02, 0xff, 0x00, 0xff, 0xff, 0xff, 0x06, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x37, 0x00, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x02, 0x02, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x07, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x38, 0x00, 0x08, 0xff, 0x00, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x02, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0b, 0x28, 0x00, 0x08, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x39, 0x00, 0x09, 0xff, 0x16, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x04, 0x06, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x09, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x30, 0x00, 0x0a, 0xff, 0x21, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x02, 0x00, 0xff, 0xff, 0x02, 0x02, 0x04, 0x16, 0x1e, 0xff, 0x0a, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x31, 0x00, 0x0b, 0xff, 0x0b, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x32, 0x00, 0x0c, 0xff, 0x16, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0c, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x33, 0x00, 0x0c, 0xff, 0x16, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0d, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x34, 0x00, 0x0e, 0xff, 0x2c, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x39, 0x00, 0x13, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x30, 0x00, 0x16, 0xff, 0x00, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0x02, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x14, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x31, 0x00, 0x05, 0xff, 0x0b, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0x02, 0x0f, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x15, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x32, 0x00, 0x16, 0xff, 0x16, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x04, 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x16, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x33, 0x00, 0x17, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0x02, 0x0f, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x34, 0x00, 0x05, 0xff, 0x2c, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x06, 0x02, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x18, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x35, 0x00, 0x16, 0xff, 0x0b, 0x28, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x19, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x36, 0x00, 0x09, 0xff, 0x16, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x04, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1a, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x37, 0x00, 0x16, 0xff, 0x0b, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1b, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x38, 0x00, 0x05, 0xff, 0x0b, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x39, 0x00, 0x16, 0xff, 0x0b, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1d, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x35, 0x00, 0x05, 0xff, 0x16, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0x01, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x05, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x34, 0x00, 0x17, 0xff, 0x16, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0x02, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x04, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x30, 0x00, 0x0a, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x03, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x32, 0x00, 0x0c, 0xff, 0x16, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0c, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x33, 0x00, 0x05, 0xff, 0x2c, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x06, 0x02, 0xff, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x34, 0x00, 0x05, 0xff, 0x16, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x03, 0x06, 0x00, 0xff, 0xff, 0xff, 0xff, 0x21, 0x00, 0x03, 0x18, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x32, 0x00, 0x16, 0xff, 0x16, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x16, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x32, 0x00, 0x16, 0xff, 0x16, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x16, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x31, 0x00, 0x0b, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x38, 0x00, 0x05, 0xff, 0x0b, 0x14, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x06, 0xff, 0xff, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1c, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x31, 0x00, 0x05, 0xff, 0x0b, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x01, 0x04, 0x02, 0x0f, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0x15, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x32, 0x36, 0x00, 0x09, 0xff, 0x00, 0x28, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1a, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x31, 0x39, 0x00, 0x13, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x02, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x13, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x38, 0x00, 0x08, 0xff, 0x0b, 0x28, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x30, 0x31, 0x00, 0x01, 0xff, 0x2c, 0x0a, 0xff, 0xff, 0xff, 0x00,
+ 0x03, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x34, 0x35, 0x00, 0x23, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2d, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x34, 0x36, 0x00, 0x23, 0xff, 0x16, 0x28, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2e, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x34, 0x37, 0x00, 0x23, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2f, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x34, 0x35, 0x00, 0x23, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x04, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2d, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x34, 0x36, 0x00, 0x23, 0xff, 0x16, 0x32, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x2e, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x35, 0x30, 0x00, 0x23, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x32, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x35, 0x31, 0x00, 0x23, 0xff, 0x0b, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x33, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x35, 0x32, 0x00, 0x23, 0xff, 0x16, 0x1e, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x34, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x35, 0x33, 0x00, 0x23, 0xff, 0x21, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x35, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x35, 0x34, 0x00, 0x23, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x36, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x52, 0x35, 0x35, 0x00, 0x0e, 0xff, 0x2c, 0x00, 0xff, 0xff, 0xff, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 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, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04,
+ 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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,
+ 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57,
+ 0x45, 0x42, 0x2e, 0x44, 0x30, 0x30, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e,
+ 0x44, 0x30, 0x31, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x32,
+ 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x33, 0x00, 0x44, 0x52,
+ 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x34, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d,
+ 0x57, 0x45, 0x42, 0x2e, 0x44, 0x30, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42,
+ 0x2e, 0x44, 0x30, 0x36, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x44, 0x45,
+ 0x4d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, };
+ ds.assign(src, src + sizeof(src));
+dreamweb();
+}
+
+void DreamGenContext::__dispatch_call(uint16 addr) {
+ switch(addr) {
+ case addr_alleybarksound: alleybarksound(); break;
+ case addr_intromusic: intromusic(); break;
+ case addr_foghornsound: foghornsound(); break;
+ case addr_receptionist: receptionist(); break;
+ case addr_smokebloke: smokebloke(); break;
+ case addr_attendant: attendant(); break;
+ case addr_manasleep: manasleep(); break;
+ case addr_eden: eden(); break;
+ case addr_edeninbath: edeninbath(); break;
+ case addr_malefan: malefan(); break;
+ case addr_femalefan: femalefan(); break;
+ case addr_louis: louis(); break;
+ case addr_louischair: louischair(); break;
+ case addr_manasleep2: manasleep2(); break;
+ case addr_mansatstill: mansatstill(); break;
+ case addr_tattooman: tattooman(); break;
+ case addr_drinker: drinker(); break;
+ case addr_bartender: bartender(); break;
+ case addr_othersmoker: othersmoker(); break;
+ case addr_barwoman: barwoman(); break;
+ case addr_interviewer: interviewer(); break;
+ case addr_soldier1: soldier1(); break;
+ case addr_rockstar: rockstar(); break;
+ case addr_helicopter: helicopter(); break;
+ case addr_mugger: mugger(); break;
+ case addr_aide: aide(); break;
+ case addr_businessman: businessman(); break;
+ case addr_poolguard: poolguard(); break;
+ case addr_security: security(); break;
+ case addr_heavy: heavy(); break;
+ case addr_bossman: bossman(); break;
+ case addr_gamer: gamer(); break;
+ case addr_sparkydrip: sparkydrip(); break;
+ case addr_carparkdrip: carparkdrip(); break;
+ case addr_keeper: keeper(); break;
+ case addr_candles1: candles1(); break;
+ case addr_smallcandle: smallcandle(); break;
+ case addr_intromagic1: intromagic1(); break;
+ case addr_candles: candles(); break;
+ case addr_candles2: candles2(); break;
+ case addr_gates: gates(); break;
+ case addr_intromagic2: intromagic2(); break;
+ case addr_intromagic3: intromagic3(); break;
+ case addr_intromonks1: intromonks1(); break;
+ case addr_intromonks2: intromonks2(); break;
+ case addr_handclap: handclap(); break;
+ case addr_monks2text: monks2text(); break;
+ case addr_intro1text: intro1text(); break;
+ case addr_intro2text: intro2text(); break;
+ case addr_intro3text: intro3text(); break;
+ case addr_monkandryan: monkandryan(); break;
+ case addr_endgameseq: endgameseq(); break;
+ case addr_rollendcredits: rollendcredits(); break;
+ case addr_priest: priest(); break;
+ case addr_madmanstelly: madmanstelly(); break;
+ case addr_madman: madman(); break;
+ case addr_madmantext: madmantext(); break;
+ case addr_madmode: madmode(); break;
+ case addr_priesttext: priesttext(); break;
+ case addr_textforend: textforend(); break;
+ case addr_textformonk: textformonk(); break;
+ case addr_drunk: drunk(); break;
+ case addr_advisor: advisor(); break;
+ case addr_copper: copper(); break;
+ case addr_sparky: sparky(); break;
+ case addr_train: train(); break;
+ case addr_addtopeoplelist: addtopeoplelist(); break;
+ case addr_showgamereel: showgamereel(); break;
+ case addr_checkspeed: checkspeed(); break;
+ case addr_delsprite: delsprite(); break;
+ case addr_checkone: checkone(); break;
+ case addr_findsource: findsource(); break;
+ case addr_mainman: mainman(); break;
+ case addr_aboutturn: aboutturn(); break;
+ case addr_facerightway: facerightway(); break;
+ case addr_checkforexit: checkforexit(); break;
+ case addr_adjustdown: adjustdown(); break;
+ case addr_adjustup: adjustup(); break;
+ case addr_adjustleft: adjustleft(); break;
+ case addr_adjustright: adjustright(); break;
+ case addr_reminders: reminders(); break;
+ case addr_initrain: initrain(); break;
+ case addr_splitintolines: splitintolines(); break;
+ case addr_getblockofpixel: getblockofpixel(); break;
+ case addr_showrain: showrain(); break;
+ case addr_backobject: backobject(); break;
+ case addr_liftnoise: liftnoise(); break;
+ case addr_random: random(); break;
+ case addr_steady: steady(); break;
+ case addr_constant: constant(); break;
+ case addr_doorway: doorway(); break;
+ case addr_widedoor: widedoor(); break;
+ case addr_lockeddoorway: lockeddoorway(); break;
+ case addr_updatepeople: updatepeople(); break;
+ case addr_getreelframeax: getreelframeax(); break;
+ case addr_reelsonscreen: reelsonscreen(); break;
+ case addr_plotreel: plotreel(); break;
+ case addr_soundonreels: soundonreels(); break;
+ case addr_reconstruct: reconstruct(); break;
+ case addr_dealwithspecial: dealwithspecial(); break;
+ case addr_movemap: movemap(); break;
+ case addr_getreelstart: getreelstart(); break;
+ case addr_showreelframe: showreelframe(); break;
+ case addr_deleverything: deleverything(); break;
+ case addr_dumpeverything: dumpeverything(); break;
+ case addr_allocatework: allocatework(); break;
+ case addr_showpcx: showpcx(); break;
+ case addr_loadpalfromiff: loadpalfromiff(); break;
+ case addr_setmode: setmode(); break;
+ case addr_paneltomap: paneltomap(); break;
+ case addr_maptopanel: maptopanel(); break;
+ case addr_dumpmap: dumpmap(); break;
+ case addr_pixelcheckset: pixelcheckset(); break;
+ case addr_createpanel: createpanel(); break;
+ case addr_createpanel2: createpanel2(); break;
+ case addr_clearwork: clearwork(); break;
+ case addr_vsync: vsync(); break;
+ case addr_doshake: doshake(); break;
+ case addr_zoom: zoom(); break;
+ case addr_delthisone: delthisone(); break;
+ case addr_doblocks: doblocks(); break;
+ case addr_transferinv: transferinv(); break;
+ case addr_transfermap: transfermap(); break;
+ case addr_fadedos: fadedos(); break;
+ case addr_dofade: dofade(); break;
+ case addr_clearendpal: clearendpal(); break;
+ case addr_clearpalette: clearpalette(); break;
+ case addr_fadescreenup: fadescreenup(); break;
+ case addr_fadetowhite: fadetowhite(); break;
+ case addr_fadefromwhite: fadefromwhite(); break;
+ case addr_fadescreenups: fadescreenups(); break;
+ case addr_fadescreendownhalf: fadescreendownhalf(); break;
+ case addr_fadescreenuphalf: fadescreenuphalf(); break;
+ case addr_fadescreendown: fadescreendown(); break;
+ case addr_fadescreendowns: fadescreendowns(); break;
+ case addr_clearstartpal: clearstartpal(); break;
+ case addr_showgun: showgun(); break;
+ case addr_rollendcredits2: rollendcredits2(); break;
+ case addr_rollem: rollem(); break;
+ case addr_fadecalculation: fadecalculation(); break;
+ case addr_greyscalesum: greyscalesum(); break;
+ case addr_showgroup: showgroup(); break;
+ case addr_paltostartpal: paltostartpal(); break;
+ case addr_endpaltostart: endpaltostart(); break;
+ case addr_startpaltoend: startpaltoend(); break;
+ case addr_paltoendpal: paltoendpal(); break;
+ case addr_allpalette: allpalette(); break;
+ case addr_dumpcurrent: dumpcurrent(); break;
+ case addr_fadedownmon: fadedownmon(); break;
+ case addr_fadeupmon: fadeupmon(); break;
+ case addr_fadeupmonfirst: fadeupmonfirst(); break;
+ case addr_fadeupyellows: fadeupyellows(); break;
+ case addr_initialmoncols: initialmoncols(); break;
+ case addr_titles: titles(); break;
+ case addr_endgame: endgame(); break;
+ case addr_monkspeaking: monkspeaking(); break;
+ case addr_showmonk: showmonk(); break;
+ case addr_gettingshot: gettingshot(); break;
+ case addr_credits: credits(); break;
+ case addr_biblequote: biblequote(); break;
+ case addr_hangone: hangone(); break;
+ case addr_intro: intro(); break;
+ case addr_runintroseq: runintroseq(); break;
+ case addr_runendseq: runendseq(); break;
+ case addr_loadintroroom: loadintroroom(); break;
+ case addr_mode640x480: mode640x480(); break;
+ case addr_set16colpalette: set16colpalette(); break;
+ case addr_realcredits: realcredits(); break;
+ case addr_printchar: printchar(); break;
+ case addr_printslow: printslow(); break;
+ case addr_waitframes: waitframes(); break;
+ case addr_printboth: printboth(); break;
+ case addr_printdirect: printdirect(); break;
+ case addr_monprint: monprint(); break;
+ case addr_getnumber: getnumber(); break;
+ case addr_fillryan: fillryan(); break;
+ case addr_fillopen: fillopen(); break;
+ case addr_findallryan: findallryan(); break;
+ case addr_findallopen: findallopen(); break;
+ case addr_obtoinv: obtoinv(); break;
+ case addr_isitworn: isitworn(); break;
+ case addr_makeworn: makeworn(); break;
+ case addr_examineob: examineob(); break;
+ case addr_makemainscreen: makemainscreen(); break;
+ case addr_getbackfromob: getbackfromob(); break;
+ case addr_incryanpage: incryanpage(); break;
+ case addr_openinv: openinv(); break;
+ case addr_showryanpage: showryanpage(); break;
+ case addr_openob: openob(); break;
+ case addr_obicons: obicons(); break;
+ case addr_examicon: examicon(); break;
+ case addr_obpicture: obpicture(); break;
+ case addr_describeob: describeob(); break;
+ case addr_additionaltext: additionaltext(); break;
+ case addr_obsthatdothings: obsthatdothings(); break;
+ case addr_getobtextstart: getobtextstart(); break;
+ case addr_searchforsame: searchforsame(); break;
+ case addr_findnextcolon: findnextcolon(); break;
+ case addr_inventory: inventory(); break;
+ case addr_setpickup: setpickup(); break;
+ case addr_examinventory: examinventory(); break;
+ case addr_reexfrominv: reexfrominv(); break;
+ case addr_reexfromopen: reexfromopen(); break;
+ case addr_swapwithinv: swapwithinv(); break;
+ case addr_swapwithopen: swapwithopen(); break;
+ case addr_intoinv: intoinv(); break;
+ case addr_deletetaken: deletetaken(); break;
+ case addr_outofinv: outofinv(); break;
+ case addr_getfreead: getfreead(); break;
+ case addr_getexad: getexad(); break;
+ case addr_geteitherad: geteitherad(); break;
+ case addr_getanyad: getanyad(); break;
+ case addr_getanyaddir: getanyaddir(); break;
+ case addr_getopenedsize: getopenedsize(); break;
+ case addr_getsetad: getsetad(); break;
+ case addr_findinvpos: findinvpos(); break;
+ case addr_findopenpos: findopenpos(); break;
+ case addr_dropobject: dropobject(); break;
+ case addr_droperror: droperror(); break;
+ case addr_cantdrop: cantdrop(); break;
+ case addr_wornerror: wornerror(); break;
+ case addr_removeobfrominv: removeobfrominv(); break;
+ case addr_selectopenob: selectopenob(); break;
+ case addr_useopened: useopened(); break;
+ case addr_errormessage1: errormessage1(); break;
+ case addr_errormessage2: errormessage2(); break;
+ case addr_errormessage3: errormessage3(); break;
+ case addr_checkobjectsize: checkobjectsize(); break;
+ case addr_outofopen: outofopen(); break;
+ case addr_transfertoex: transfertoex(); break;
+ case addr_pickupconts: pickupconts(); break;
+ case addr_transfercontoex: transfercontoex(); break;
+ case addr_transfertext: transfertext(); break;
+ case addr_getexpos: getexpos(); break;
+ case addr_purgealocation: purgealocation(); break;
+ case addr_emergencypurge: emergencypurge(); break;
+ case addr_purgeanitem: purgeanitem(); break;
+ case addr_deleteexobject: deleteexobject(); break;
+ case addr_deleteexframe: deleteexframe(); break;
+ case addr_deleteextext: deleteextext(); break;
+ case addr_blockget: blockget(); break;
+ case addr_drawfloor: drawfloor(); break;
+ case addr_calcmapad: calcmapad(); break;
+ case addr_getdimension: getdimension(); break;
+ case addr_addalong: addalong(); break;
+ case addr_addlength: addlength(); break;
+ case addr_drawflags: drawflags(); break;
+ case addr_showallobs: showallobs(); break;
+ case addr_makebackob: makebackob(); break;
+ case addr_showallfree: showallfree(); break;
+ case addr_showallex: showallex(); break;
+ case addr_calcfrframe: calcfrframe(); break;
+ case addr_finalframe: finalframe(); break;
+ case addr_adjustlen: adjustlen(); break;
+ case addr_getmapad: getmapad(); break;
+ case addr_getxad: getxad(); break;
+ case addr_getyad: getyad(); break;
+ case addr_autolook: autolook(); break;
+ case addr_look: look(); break;
+ case addr_dolook: dolook(); break;
+ case addr_redrawmainscrn: redrawmainscrn(); break;
+ case addr_getback1: getback1(); break;
+ case addr_talk: talk(); break;
+ case addr_convicons: convicons(); break;
+ case addr_getpersframe: getpersframe(); break;
+ case addr_starttalk: starttalk(); break;
+ case addr_getpersontext: getpersontext(); break;
+ case addr_moretalk: moretalk(); break;
+ case addr_dosometalk: dosometalk(); break;
+ case addr_hangonpq: hangonpq(); break;
+ case addr_redes: redes(); break;
+ case addr_newplace: newplace(); break;
+ case addr_selectlocation: selectlocation(); break;
+ case addr_showcity: showcity(); break;
+ case addr_lookatplace: lookatplace(); break;
+ case addr_getundercentre: getundercentre(); break;
+ case addr_putundercentre: putundercentre(); break;
+ case addr_locationpic: locationpic(); break;
+ case addr_getdestinfo: getdestinfo(); break;
+ case addr_showarrows: showarrows(); break;
+ case addr_nextdest: nextdest(); break;
+ case addr_lastdest: lastdest(); break;
+ case addr_destselect: destselect(); break;
+ case addr_getlocation: getlocation(); break;
+ case addr_setlocation: setlocation(); break;
+ case addr_resetlocation: resetlocation(); break;
+ case addr_readdesticon: readdesticon(); break;
+ case addr_readcitypic: readcitypic(); break;
+ case addr_usemon: usemon(); break;
+ case addr_printoutermon: printoutermon(); break;
+ case addr_loadpersonal: loadpersonal(); break;
+ case addr_loadnews: loadnews(); break;
+ case addr_loadcart: loadcart(); break;
+ case addr_lookininterface: lookininterface(); break;
+ case addr_turnonpower: turnonpower(); break;
+ case addr_randomaccess: randomaccess(); break;
+ case addr_powerlighton: powerlighton(); break;
+ case addr_powerlightoff: powerlightoff(); break;
+ case addr_accesslighton: accesslighton(); break;
+ case addr_accesslightoff: accesslightoff(); break;
+ case addr_locklighton: locklighton(); break;
+ case addr_locklightoff: locklightoff(); break;
+ case addr_input: input(); break;
+ case addr_makecaps: makecaps(); break;
+ case addr_delchar: delchar(); break;
+ case addr_execcommand: execcommand(); break;
+ case addr_neterror: neterror(); break;
+ case addr_dircom: dircom(); break;
+ case addr_searchforfiles: searchforfiles(); break;
+ case addr_signon: signon(); break;
+ case addr_showkeys: showkeys(); break;
+ case addr_read: read(); break;
+ case addr_dirfile: dirfile(); break;
+ case addr_getkeyandlogo: getkeyandlogo(); break;
+ case addr_searchforstring: searchforstring(); break;
+ case addr_parser: parser(); break;
+ case addr_scrollmonitor: scrollmonitor(); break;
+ case addr_monitorlogo: monitorlogo(); break;
+ case addr_printlogo: printlogo(); break;
+ case addr_showcurrentfile: showcurrentfile(); break;
+ case addr_monmessage: monmessage(); break;
+ case addr_processtrigger: processtrigger(); break;
+ case addr_triggermessage: triggermessage(); break;
+ case addr_printcurs: printcurs(); break;
+ case addr_delcurs: delcurs(); break;
+ case addr_useobject: useobject(); break;
+ case addr_useroutine: useroutine(); break;
+ case addr_wheelsound: wheelsound(); break;
+ case addr_runtap: runtap(); break;
+ case addr_playguitar: playguitar(); break;
+ case addr_hotelcontrol: hotelcontrol(); break;
+ case addr_hotelbell: hotelbell(); break;
+ case addr_opentomb: opentomb(); break;
+ case addr_usetrainer: usetrainer(); break;
+ case addr_nothelderror: nothelderror(); break;
+ case addr_usepipe: usepipe(); break;
+ case addr_usefullcart: usefullcart(); break;
+ case addr_useplinth: useplinth(); break;
+ case addr_chewy: chewy(); break;
+ case addr_useladder: useladder(); break;
+ case addr_useladderb: useladderb(); break;
+ case addr_slabdoora: slabdoora(); break;
+ case addr_slabdoorb: slabdoorb(); break;
+ case addr_slabdoord: slabdoord(); break;
+ case addr_slabdoorc: slabdoorc(); break;
+ case addr_slabdoore: slabdoore(); break;
+ case addr_slabdoorf: slabdoorf(); break;
+ case addr_useslab: useslab(); break;
+ case addr_usecart: usecart(); break;
+ case addr_useclearbox: useclearbox(); break;
+ case addr_usecoveredbox: usecoveredbox(); break;
+ case addr_userailing: userailing(); break;
+ case addr_useopenbox: useopenbox(); break;
+ case addr_wearwatch: wearwatch(); break;
+ case addr_wearshades: wearshades(); break;
+ case addr_sitdowninbar: sitdowninbar(); break;
+ case addr_usechurchhole: usechurchhole(); break;
+ case addr_usehole: usehole(); break;
+ case addr_usealtar: usealtar(); break;
+ case addr_opentvdoor: opentvdoor(); break;
+ case addr_usedryer: usedryer(); break;
+ case addr_openlouis: openlouis(); break;
+ case addr_nextcolon: nextcolon(); break;
+ case addr_openyourneighbour: openyourneighbour(); break;
+ case addr_usewindow: usewindow(); break;
+ case addr_usebalcony: usebalcony(); break;
+ case addr_openryan: openryan(); break;
+ case addr_openpoolboss: openpoolboss(); break;
+ case addr_openeden: openeden(); break;
+ case addr_opensarters: opensarters(); break;
+ case addr_isitright: isitright(); break;
+ case addr_drawitall: drawitall(); break;
+ case addr_openhoteldoor: openhoteldoor(); break;
+ case addr_openhoteldoor2: openhoteldoor2(); break;
+ case addr_grafittidoor: grafittidoor(); break;
+ case addr_trapdoor: trapdoor(); break;
+ case addr_callhotellift: callhotellift(); break;
+ case addr_calledenslift: calledenslift(); break;
+ case addr_calledensdlift: calledensdlift(); break;
+ case addr_usepoolreader: usepoolreader(); break;
+ case addr_uselighter: uselighter(); break;
+ case addr_showseconduse: showseconduse(); break;
+ case addr_usecardreader1: usecardreader1(); break;
+ case addr_usecardreader2: usecardreader2(); break;
+ case addr_usecardreader3: usecardreader3(); break;
+ case addr_usecashcard: usecashcard(); break;
+ case addr_lookatcard: lookatcard(); break;
+ case addr_moneypoke: moneypoke(); break;
+ case addr_usecontrol: usecontrol(); break;
+ case addr_usehatch: usehatch(); break;
+ case addr_usewire: usewire(); break;
+ case addr_usehandle: usehandle(); break;
+ case addr_useelevator1: useelevator1(); break;
+ case addr_showfirstuse: showfirstuse(); break;
+ case addr_useelevator3: useelevator3(); break;
+ case addr_useelevator4: useelevator4(); break;
+ case addr_useelevator2: useelevator2(); break;
+ case addr_useelevator5: useelevator5(); break;
+ case addr_usekey: usekey(); break;
+ case addr_usestereo: usestereo(); break;
+ case addr_usecooker: usecooker(); break;
+ case addr_useaxe: useaxe(); break;
+ case addr_useelvdoor: useelvdoor(); break;
+ case addr_withwhat: withwhat(); break;
+ case addr_selectob: selectob(); break;
+ case addr_compare: compare(); break;
+ case addr_findsetobject: findsetobject(); break;
+ case addr_findexobject: findexobject(); break;
+ case addr_isryanholding: isryanholding(); break;
+ case addr_checkinside: checkinside(); break;
+ case addr_usetext: usetext(); break;
+ case addr_putbackobstuff: putbackobstuff(); break;
+ case addr_showpuztext: showpuztext(); break;
+ case addr_findpuztext: findpuztext(); break;
+ case addr_placesetobject: placesetobject(); break;
+ case addr_removesetobject: removesetobject(); break;
+ case addr_issetobonmap: issetobonmap(); break;
+ case addr_placefreeobject: placefreeobject(); break;
+ case addr_removefreeobject: removefreeobject(); break;
+ case addr_findormake: findormake(); break;
+ case addr_switchryanon: switchryanon(); break;
+ case addr_switchryanoff: switchryanoff(); break;
+ case addr_setallchanges: setallchanges(); break;
+ case addr_dochange: dochange(); break;
+ case addr_autoappear: autoappear(); break;
+ case addr_getundertimed: getundertimed(); break;
+ case addr_putundertimed: putundertimed(); break;
+ case addr_dumptimedtext: dumptimedtext(); break;
+ case addr_setuptimeduse: setuptimeduse(); break;
+ case addr_setuptimedtemp: setuptimedtemp(); break;
+ case addr_usetimedtext: usetimedtext(); break;
+ case addr_edenscdplayer: edenscdplayer(); break;
+ case addr_usewall: usewall(); break;
+ case addr_usechurchgate: usechurchgate(); break;
+ case addr_usegun: usegun(); break;
+ case addr_useshield: useshield(); break;
+ case addr_usebuttona: usebuttona(); break;
+ case addr_useplate: useplate(); break;
+ case addr_usewinch: usewinch(); break;
+ case addr_entercode: entercode(); break;
+ case addr_loadkeypad: loadkeypad(); break;
+ case addr_quitkey: quitkey(); break;
+ case addr_addtopresslist: addtopresslist(); break;
+ case addr_buttonone: buttonone(); break;
+ case addr_buttontwo: buttontwo(); break;
+ case addr_buttonthree: buttonthree(); break;
+ case addr_buttonfour: buttonfour(); break;
+ case addr_buttonfive: buttonfive(); break;
+ case addr_buttonsix: buttonsix(); break;
+ case addr_buttonseven: buttonseven(); break;
+ case addr_buttoneight: buttoneight(); break;
+ case addr_buttonnine: buttonnine(); break;
+ case addr_buttonnought: buttonnought(); break;
+ case addr_buttonenter: buttonenter(); break;
+ case addr_buttonpress: buttonpress(); break;
+ case addr_showouterpad: showouterpad(); break;
+ case addr_showkeypad: showkeypad(); break;
+ case addr_singlekey: singlekey(); break;
+ case addr_dumpkeypad: dumpkeypad(); break;
+ case addr_usemenu: usemenu(); break;
+ case addr_dumpmenu: dumpmenu(); break;
+ case addr_getundermenu: getundermenu(); break;
+ case addr_putundermenu: putundermenu(); break;
+ case addr_showoutermenu: showoutermenu(); break;
+ case addr_showmenu: showmenu(); break;
+ case addr_loadmenu: loadmenu(); break;
+ case addr_viewfolder: viewfolder(); break;
+ case addr_nextfolder: nextfolder(); break;
+ case addr_folderhints: folderhints(); break;
+ case addr_lastfolder: lastfolder(); break;
+ case addr_loadfolder: loadfolder(); break;
+ case addr_showfolder: showfolder(); break;
+ case addr_folderexit: folderexit(); break;
+ case addr_showleftpage: showleftpage(); break;
+ case addr_showrightpage: showrightpage(); break;
+ case addr_entersymbol: entersymbol(); break;
+ case addr_quitsymbol: quitsymbol(); break;
+ case addr_settopleft: settopleft(); break;
+ case addr_settopright: settopright(); break;
+ case addr_setbotleft: setbotleft(); break;
+ case addr_setbotright: setbotright(); break;
+ case addr_dumpsymbol: dumpsymbol(); break;
+ case addr_showsymbol: showsymbol(); break;
+ case addr_nextsymbol: nextsymbol(); break;
+ case addr_updatesymboltop: updatesymboltop(); break;
+ case addr_updatesymbolbot: updatesymbolbot(); break;
+ case addr_dumpsymbox: dumpsymbox(); break;
+ case addr_usediary: usediary(); break;
+ case addr_showdiary: showdiary(); break;
+ case addr_showdiarykeys: showdiarykeys(); break;
+ case addr_dumpdiarykeys: dumpdiarykeys(); break;
+ case addr_diarykeyp: diarykeyp(); break;
+ case addr_diarykeyn: diarykeyn(); break;
+ case addr_showdiarypage: showdiarypage(); break;
+ case addr_findtext1: findtext1(); break;
+ case addr_zoomonoff: zoomonoff(); break;
+ case addr_saveload: saveload(); break;
+ case addr_dosaveload: dosaveload(); break;
+ case addr_getbackfromops: getbackfromops(); break;
+ case addr_showmainops: showmainops(); break;
+ case addr_showdiscops: showdiscops(); break;
+ case addr_loadsavebox: loadsavebox(); break;
+ case addr_loadgame: loadgame(); break;
+ case addr_getbacktoops: getbacktoops(); break;
+ case addr_discops: discops(); break;
+ case addr_savegame: savegame(); break;
+ case addr_actualsave: actualsave(); break;
+ case addr_actualload: actualload(); break;
+ case addr_selectslot2: selectslot2(); break;
+ case addr_checkinput: checkinput(); break;
+ case addr_getnamepos: getnamepos(); break;
+ case addr_showopbox: showopbox(); break;
+ case addr_showloadops: showloadops(); break;
+ case addr_showsaveops: showsaveops(); break;
+ case addr_selectslot: selectslot(); break;
+ case addr_showslots: showslots(); break;
+ case addr_shownames: shownames(); break;
+ case addr_dosreturn: dosreturn(); break;
+ case addr_error: error(); break;
+ case addr_namestoold: namestoold(); break;
+ case addr_oldtonames: oldtonames(); break;
+ case addr_savefilewrite: savefilewrite(); break;
+ case addr_savefileread: savefileread(); break;
+ case addr_saveposition: saveposition(); break;
+ case addr_loadposition: loadposition(); break;
+ case addr_loadseg: loadseg(); break;
+ case addr_makeheader: makeheader(); break;
+ case addr_storeit: storeit(); break;
+ case addr_saveseg: saveseg(); break;
+ case addr_findlen: findlen(); break;
+ case addr_scanfornames: scanfornames(); break;
+ case addr_decide: decide(); break;
+ case addr_showdecisions: showdecisions(); break;
+ case addr_newgame: newgame(); break;
+ case addr_loadold: loadold(); break;
+ case addr_loadspeech: loadspeech(); break;
+ case addr_createname: createname(); break;
+ case addr_loadsample: loadsample(); break;
+ case addr_loadsecondsample: loadsecondsample(); break;
+ case addr_soundstartup: soundstartup(); break;
+ case addr_trysoundalloc: trysoundalloc(); break;
+ case addr_setsoundoff: setsoundoff(); break;
+ case addr_checksoundint: checksoundint(); break;
+ case addr_enablesoundint: enablesoundint(); break;
+ case addr_disablesoundint: disablesoundint(); break;
+ case addr_interupttest: interupttest(); break;
+ case addr_soundend: soundend(); break;
+ case addr_out22c: out22c(); break;
+ case addr_playchannel0: playchannel0(); break;
+ case addr_playchannel1: playchannel1(); break;
+ case addr_makenextblock: makenextblock(); break;
+ case addr_volumeadjust: volumeadjust(); break;
+ case addr_loopchannel0: loopchannel0(); break;
+ case addr_channel0only: channel0only(); break;
+ case addr_channel1only: channel1only(); break;
+ case addr_channel0tran: channel0tran(); break;
+ case addr_bothchannels: bothchannels(); break;
+ case addr_saveems: saveems(); break;
+ case addr_restoreems: restoreems(); break;
+ case addr_domix: domix(); break;
+ case addr_dmaend: dmaend(); break;
+ case addr_startdmablock: startdmablock(); break;
+ case addr_setuppit: setuppit(); break;
+ case addr_getridofpit: getridofpit(); break;
+ case addr_pitinterupt: pitinterupt(); break;
+ case addr_dreamweb: dreamweb(); break;
+ case addr_entrytexts: entrytexts(); break;
+ case addr_entryanims: entryanims(); break;
+ case addr_initialinv: initialinv(); break;
+ case addr_pickupob: pickupob(); break;
+ case addr_setupemm: setupemm(); break;
+ case addr_removeemm: removeemm(); break;
+ case addr_checkforemm: checkforemm(); break;
+ case addr_checkbasemem: checkbasemem(); break;
+ case addr_allocatebuffers: allocatebuffers(); break;
+ case addr_clearbuffers: clearbuffers(); break;
+ case addr_clearchanges: clearchanges(); break;
+ case addr_clearbeforeload: clearbeforeload(); break;
+ case addr_clearreels: clearreels(); break;
+ case addr_clearrest: clearrest(); break;
+ case addr_deallocatemem: deallocatemem(); break;
+ case addr_allocatemem: allocatemem(); break;
+ case addr_parseblaster: parseblaster(); break;
+ case addr_startup: startup(); break;
+ case addr_startup1: startup1(); break;
+ case addr_screenupdate: screenupdate(); break;
+ case addr_watchreel: watchreel(); break;
+ case addr_checkforshake: checkforshake(); break;
+ case addr_watchcount: watchcount(); break;
+ case addr_showtime: showtime(); break;
+ case addr_dumpwatch: dumpwatch(); break;
+ case addr_showbyte: showbyte(); break;
+ case addr_onedigit: onedigit(); break;
+ case addr_twodigitnum: twodigitnum(); break;
+ case addr_showword: showword(); break;
+ case addr_convnum: convnum(); break;
+ case addr_mainscreen: mainscreen(); break;
+ case addr_madmanrun: madmanrun(); break;
+ case addr_checkcoords: checkcoords(); break;
+ case addr_identifyob: identifyob(); break;
+ case addr_checkifperson: checkifperson(); break;
+ case addr_checkifset: checkifset(); break;
+ case addr_checkifex: checkifex(); break;
+ case addr_checkiffree: checkiffree(); break;
+ case addr_isitdescribed: isitdescribed(); break;
+ case addr_findpathofpoint: findpathofpoint(); break;
+ case addr_findfirstpath: findfirstpath(); break;
+ case addr_turnpathon: turnpathon(); break;
+ case addr_turnpathoff: turnpathoff(); break;
+ case addr_turnanypathon: turnanypathon(); break;
+ case addr_turnanypathoff: turnanypathoff(); break;
+ case addr_checkifpathison: checkifpathison(); break;
+ case addr_afternewroom: afternewroom(); break;
+ case addr_atmospheres: atmospheres(); break;
+ case addr_walkintoroom: walkintoroom(); break;
+ case addr_afterintroroom: afterintroroom(); break;
+ case addr_obname: obname(); break;
+ case addr_finishedwalking: finishedwalking(); break;
+ case addr_examineobtext: examineobtext(); break;
+ case addr_commandwithob: commandwithob(); break;
+ case addr_commandonly: commandonly(); break;
+ case addr_printmessage: printmessage(); break;
+ case addr_printmessage2: printmessage2(); break;
+ case addr_blocknametext: blocknametext(); break;
+ case addr_personnametext: personnametext(); break;
+ case addr_walktotext: walktotext(); break;
+ case addr_getflagunderp: getflagunderp(); break;
+ case addr_setwalk: setwalk(); break;
+ case addr_autosetwalk: autosetwalk(); break;
+ case addr_checkdest: checkdest(); break;
+ case addr_bresenhams: bresenhams(); break;
+ case addr_workoutframes: workoutframes(); break;
+ case addr_getroomspaths: getroomspaths(); break;
+ case addr_copyname: copyname(); break;
+ case addr_findobname: findobname(); break;
+ case addr_showicon: showicon(); break;
+ case addr_middlepanel: middlepanel(); break;
+ case addr_showman: showman(); break;
+ case addr_showpanel: showpanel(); break;
+ case addr_roomname: roomname(); break;
+ case addr_usecharset1: usecharset1(); break;
+ case addr_usetempcharset: usetempcharset(); break;
+ case addr_showexit: showexit(); break;
+ case addr_panelicons1: panelicons1(); break;
+ case addr_showwatch: showwatch(); break;
+ case addr_gettime: gettime(); break;
+ case addr_zoomicon: zoomicon(); break;
+ case addr_showblink: showblink(); break;
+ case addr_dumpblink: dumpblink(); break;
+ case addr_worktoscreenm: worktoscreenm(); break;
+ case addr_blank: blank(); break;
+ case addr_allpointer: allpointer(); break;
+ case addr_hangonp: hangonp(); break;
+ case addr_hangonw: hangonw(); break;
+ case addr_hangoncurs: hangoncurs(); break;
+ case addr_getunderzoom: getunderzoom(); break;
+ case addr_dumpzoom: dumpzoom(); break;
+ case addr_putunderzoom: putunderzoom(); break;
+ case addr_crosshair: crosshair(); break;
+ case addr_showpointer: showpointer(); break;
+ case addr_delpointer: delpointer(); break;
+ case addr_dumppointer: dumppointer(); break;
+ case addr_undertextline: undertextline(); break;
+ case addr_deltextline: deltextline(); break;
+ case addr_dumptextline: dumptextline(); break;
+ case addr_animpointer: animpointer(); break;
+ case addr_setmouse: setmouse(); break;
+ case addr_readmouse: readmouse(); break;
+ case addr_mousecall: mousecall(); break;
+ case addr_readmouse1: readmouse1(); break;
+ case addr_readmouse2: readmouse2(); break;
+ case addr_readmouse3: readmouse3(); break;
+ case addr_readmouse4: readmouse4(); break;
+ case addr_readkey: readkey(); break;
+ case addr_randomnum1: randomnum1(); break;
+ case addr_randomnum2: randomnum2(); break;
+ case addr_hangon: hangon(); break;
+ case addr_loadtraveltext: loadtraveltext(); break;
+ case addr_loadintotemp: loadintotemp(); break;
+ case addr_loadintotemp2: loadintotemp2(); break;
+ case addr_loadintotemp3: loadintotemp3(); break;
+ case addr_loadtempcharset: loadtempcharset(); break;
+ case addr_standardload: standardload(); break;
+ case addr_loadtemptext: loadtemptext(); break;
+ case addr_loadroom: loadroom(); break;
+ case addr_loadroomssample: loadroomssample(); break;
+ case addr_getridofreels: getridofreels(); break;
+ case addr_getridofall: getridofall(); break;
+ case addr_restorereels: restorereels(); break;
+ case addr_restoreall: restoreall(); break;
+ case addr_sortoutmap: sortoutmap(); break;
+ case addr_startloading: startloading(); break;
+ case addr_disablepath: disablepath(); break;
+ case addr_findxyfrompath: findxyfrompath(); break;
+ case addr_findroominloc: findroominloc(); break;
+ case addr_getroomdata: getroomdata(); break;
+ case addr_readheader: readheader(); break;
+ case addr_dontloadseg: dontloadseg(); break;
+ case addr_allocateload: allocateload(); break;
+ case addr_fillspace: fillspace(); break;
+ case addr_getridoftemp: getridoftemp(); break;
+ case addr_getridoftemptext: getridoftemptext(); break;
+ case addr_getridoftemp2: getridoftemp2(); break;
+ case addr_getridoftemp3: getridoftemp3(); break;
+ case addr_getridoftempcharset: getridoftempcharset(); break;
+ case addr_getridoftempsp: getridoftempsp(); break;
+ case addr_readsetdata: readsetdata(); break;
+ case addr_createfile: createfile(); break;
+ case addr_openfile: openfile(); break;
+ case addr_openfilefromc: openfilefromc(); break;
+ case addr_makename: makename(); break;
+ case addr_openfilenocheck: openfilenocheck(); break;
+ case addr_openforsave: openforsave(); break;
+ case addr_closefile: closefile(); break;
+ case addr_readfromfile: readfromfile(); break;
+ case addr_setkeyboardint: setkeyboardint(); break;
+ case addr_resetkeyboard: resetkeyboard(); break;
+ case addr_keyboardread: keyboardread(); break;
+ case addr_walkandexamine: walkandexamine(); break;
+ case addr_doload: doload(); break;
+ case addr_generalerror: generalerror(); break;
+ default: ::error("invalid call to %04x dispatched", (uint16)ax);
+ }
+}
+
+} /*namespace*/
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
new file mode 100644
index 0000000000..88ecfd53d4
--- /dev/null
+++ b/engines/dreamweb/dreamgen.h
@@ -0,0 +1,2091 @@
+#ifndef TASMRECOVER_DREAMGEN_STUBS_H__
+#define TASMRECOVER_DREAMGEN_STUBS_H__
+
+/* PLEASE DO NOT MODIFY THIS FILE. ALL CHANGES WILL BE LOST! LOOK FOR README FOR DETAILS */
+
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "dreamweb/runtime.h"
+
+namespace DreamGen {
+#include "structs.h"
+class DreamGenContext : public Context {
+public:
+ void __start();
+ void __dispatch_call(uint16 addr);
+#include "stubs.h" // Allow hand-reversed functions to have a signature different than void f()
+
+ static const uint16 addr_dreamweb = 0xc948;
+ static const uint16 addr_keyboardread = 0xcbb4;
+ static const uint16 addr_resetkeyboard = 0xcbb0;
+ static const uint16 addr_setkeyboardint = 0xcbac;
+ static const uint16 addr_readfromfile = 0xcba8;
+ static const uint16 addr_closefile = 0xcba4;
+ static const uint16 addr_openforsave = 0xcba0;
+ static const uint16 addr_openfilenocheck = 0xcb9c;
+ static const uint16 addr_makename = 0xcb98;
+ static const uint16 addr_openfilefromc = 0xcb94;
+ static const uint16 addr_openfile = 0xcb90;
+ static const uint16 addr_createfile = 0xcb8c;
+ static const uint16 addr_readsetdata = 0xcb88;
+ static const uint16 addr_getridoftempsp = 0xcb84;
+ static const uint16 addr_getridoftempcharset = 0xcb80;
+ static const uint16 addr_getridoftemp3 = 0xcb7c;
+ static const uint16 addr_getridoftemp2 = 0xcb78;
+ static const uint16 addr_getridoftemptext = 0xcb74;
+ static const uint16 addr_getridoftemp = 0xcb70;
+ static const uint16 addr_fillspace = 0xcb6c;
+ static const uint16 addr_allocateload = 0xcb68;
+ static const uint16 addr_dontloadseg = 0xcb64;
+ static const uint16 addr_readheader = 0xcb60;
+ static const uint16 addr_getroomdata = 0xcb5c;
+ static const uint16 addr_findroominloc = 0xcb58;
+ static const uint16 addr_findxyfrompath = 0xcb54;
+ static const uint16 addr_disablepath = 0xcb50;
+ static const uint16 addr_startloading = 0xcb4c;
+ static const uint16 addr_sortoutmap = 0xcb48;
+ static const uint16 addr_restoreall = 0xcb44;
+ static const uint16 addr_restorereels = 0xcb40;
+ static const uint16 addr_getridofall = 0xcb3c;
+ static const uint16 addr_getridofreels = 0xcb38;
+ static const uint16 addr_loadroomssample = 0xcb34;
+ static const uint16 addr_loadroom = 0xcb30;
+ static const uint16 addr_loadtemptext = 0xcb2c;
+ static const uint16 addr_standardload = 0xcb28;
+ static const uint16 addr_loadtempcharset = 0xcb24;
+ static const uint16 addr_loadintotemp3 = 0xcb20;
+ static const uint16 addr_loadintotemp2 = 0xcb1c;
+ static const uint16 addr_loadintotemp = 0xcb18;
+ static const uint16 addr_loadtraveltext = 0xcb14;
+ static const uint16 addr_hangon = 0xcb10;
+ static const uint16 addr_randomnum2 = 0xcb08;
+ static const uint16 addr_randomnum1 = 0xcb04;
+ static const uint16 addr_readkey = 0xcafc;
+ static const uint16 addr_readmouse4 = 0xcaf8;
+ static const uint16 addr_readmouse3 = 0xcaf4;
+ static const uint16 addr_readmouse2 = 0xcaf0;
+ static const uint16 addr_readmouse1 = 0xcaec;
+ static const uint16 addr_mousecall = 0xcae8;
+ static const uint16 addr_readmouse = 0xcae4;
+ static const uint16 addr_setmouse = 0xcae0;
+ static const uint16 addr_animpointer = 0xcadc;
+ static const uint16 addr_dumptextline = 0xcad8;
+ static const uint16 addr_deltextline = 0xcad4;
+ static const uint16 addr_undertextline = 0xcad0;
+ static const uint16 addr_dumppointer = 0xcacc;
+ static const uint16 addr_delpointer = 0xcac8;
+ static const uint16 addr_showpointer = 0xcac4;
+ static const uint16 addr_crosshair = 0xcac0;
+ static const uint16 addr_putunderzoom = 0xcabc;
+ static const uint16 addr_dumpzoom = 0xcab8;
+ static const uint16 addr_getunderzoom = 0xcab4;
+ static const uint16 addr_hangoncurs = 0xcab0;
+ static const uint16 addr_hangonw = 0xcaac;
+ static const uint16 addr_hangonp = 0xcaa8;
+ static const uint16 addr_allpointer = 0xcaa4;
+ static const uint16 addr_blank = 0xcaa0;
+ static const uint16 addr_worktoscreenm = 0xca9c;
+ static const uint16 addr_dumpblink = 0xca98;
+ static const uint16 addr_showblink = 0xca94;
+ static const uint16 addr_zoomicon = 0xca90;
+ static const uint16 addr_gettime = 0xca8c;
+ static const uint16 addr_showwatch = 0xca88;
+ static const uint16 addr_panelicons1 = 0xca84;
+ static const uint16 addr_showexit = 0xca80;
+ static const uint16 addr_usetempcharset = 0xca7c;
+ static const uint16 addr_usecharset1 = 0xca78;
+ static const uint16 addr_roomname = 0xca74;
+ static const uint16 addr_showpanel = 0xca70;
+ static const uint16 addr_showman = 0xca6c;
+ static const uint16 addr_middlepanel = 0xca68;
+ static const uint16 addr_showicon = 0xca64;
+ static const uint16 addr_findobname = 0xca60;
+ static const uint16 addr_copyname = 0xca5c;
+ static const uint16 addr_getroomspaths = 0xca58;
+ static const uint16 addr_workoutframes = 0xca54;
+ static const uint16 addr_bresenhams = 0xca50;
+ static const uint16 addr_checkdest = 0xca4c;
+ static const uint16 addr_autosetwalk = 0xca48;
+ static const uint16 addr_setwalk = 0xca44;
+ static const uint16 addr_getflagunderp = 0xca40;
+ static const uint16 addr_walktotext = 0xca3c;
+ static const uint16 addr_personnametext = 0xca38;
+ static const uint16 addr_blocknametext = 0xca34;
+ static const uint16 addr_printmessage2 = 0xca30;
+ static const uint16 addr_printmessage = 0xca2c;
+ static const uint16 addr_commandonly = 0xca28;
+ static const uint16 addr_commandwithob = 0xca24;
+ static const uint16 addr_examineobtext = 0xca20;
+ static const uint16 addr_finishedwalking = 0xca1c;
+ static const uint16 addr_obname = 0xca18;
+ static const uint16 addr_afterintroroom = 0xca14;
+ static const uint16 addr_walkintoroom = 0xca10;
+ static const uint16 addr_atmospheres = 0xca0c;
+ static const uint16 addr_afternewroom = 0xca08;
+ static const uint16 addr_checkifpathison = 0xca04;
+ static const uint16 addr_turnanypathoff = 0xca00;
+ static const uint16 addr_turnanypathon = 0xc9fc;
+ static const uint16 addr_turnpathoff = 0xc9f8;
+ static const uint16 addr_turnpathon = 0xc9f4;
+ static const uint16 addr_findfirstpath = 0xc9f0;
+ static const uint16 addr_findpathofpoint = 0xc9ec;
+ static const uint16 addr_isitdescribed = 0xc9e8;
+ static const uint16 addr_checkiffree = 0xc9e4;
+ static const uint16 addr_checkifex = 0xc9e0;
+ static const uint16 addr_checkifset = 0xc9dc;
+ static const uint16 addr_checkifperson = 0xc9d8;
+ static const uint16 addr_identifyob = 0xc9d4;
+ static const uint16 addr_checkcoords = 0xc9d0;
+ static const uint16 addr_madmanrun = 0xc9cc;
+ static const uint16 addr_mainscreen = 0xc9c8;
+ static const uint16 addr_walkandexamine = 0xcbb8;
+ static const uint16 addr_convnum = 0xc9c4;
+ static const uint16 addr_showword = 0xc9c0;
+ static const uint16 addr_twodigitnum = 0xc9bc;
+ static const uint16 addr_onedigit = 0xc9b8;
+ static const uint16 addr_showbyte = 0xc9b4;
+ static const uint16 addr_dumpwatch = 0xc9b0;
+ static const uint16 addr_showtime = 0xc9ac;
+ static const uint16 addr_watchcount = 0xc9a8;
+ static const uint16 addr_checkforshake = 0xc9a4;
+ static const uint16 addr_watchreel = 0xc9a0;
+ static const uint16 addr_screenupdate = 0xc99c;
+ static const uint16 addr_startup1 = 0xc998;
+ static const uint16 addr_startup = 0xc994;
+ static const uint16 addr_parseblaster = 0xc990;
+ static const uint16 addr_allocatemem = 0xc988;
+ static const uint16 addr_deallocatemem = 0xc984;
+ static const uint16 addr_clearrest = 0xc980;
+ static const uint16 addr_clearreels = 0xc97c;
+ static const uint16 addr_clearbeforeload = 0xc978;
+ static const uint16 addr_clearchanges = 0xc974;
+ static const uint16 addr_clearbuffers = 0xc970;
+ static const uint16 addr_allocatebuffers = 0xc96c;
+ static const uint16 addr_checkbasemem = 0xc968;
+ static const uint16 addr_checkforemm = 0xc964;
+ static const uint16 addr_removeemm = 0xc960;
+ static const uint16 addr_setupemm = 0xc95c;
+ static const uint16 addr_pickupob = 0xc958;
+ static const uint16 addr_initialinv = 0xc954;
+ static const uint16 addr_entryanims = 0xc950;
+ static const uint16 addr_entrytexts = 0xc94c;
+ static const uint16 addr_pitinterupt = 0xc944;
+ static const uint16 addr_getridofpit = 0xc940;
+ static const uint16 addr_setuppit = 0xc93c;
+ static const uint16 addr_startdmablock = 0xc938;
+ static const uint16 addr_dmaend = 0xc934;
+ static const uint16 addr_domix = 0xc930;
+ static const uint16 addr_restoreems = 0xc92c;
+ static const uint16 addr_saveems = 0xc928;
+ static const uint16 addr_bothchannels = 0xc924;
+ static const uint16 addr_channel0tran = 0xc920;
+ static const uint16 addr_channel1only = 0xc91c;
+ static const uint16 addr_channel0only = 0xc918;
+ static const uint16 addr_loopchannel0 = 0xc90c;
+ static const uint16 addr_volumeadjust = 0xc908;
+ static const uint16 addr_makenextblock = 0xc904;
+ static const uint16 addr_playchannel1 = 0xc900;
+ static const uint16 addr_playchannel0 = 0xc8fc;
+ static const uint16 addr_out22c = 0xc8f8;
+ static const uint16 addr_soundend = 0xc8f4;
+ static const uint16 addr_interupttest = 0xc8f0;
+ static const uint16 addr_disablesoundint = 0xc8ec;
+ static const uint16 addr_enablesoundint = 0xc8e8;
+ static const uint16 addr_checksoundint = 0xc8e4;
+ static const uint16 addr_setsoundoff = 0xc8e0;
+ static const uint16 addr_trysoundalloc = 0xc8dc;
+ static const uint16 addr_soundstartup = 0xc8d8;
+ static const uint16 addr_loadsecondsample = 0xc8d4;
+ static const uint16 addr_loadsample = 0xc8d0;
+ static const uint16 addr_createname = 0xc8cc;
+ static const uint16 addr_loadspeech = 0xc8c8;
+ static const uint16 addr_loadold = 0xc8c4;
+ static const uint16 addr_doload = 0xcbbc;
+ static const uint16 addr_newgame = 0xc8c0;
+ static const uint16 addr_showdecisions = 0xc8bc;
+ static const uint16 addr_decide = 0xc8b8;
+ static const uint16 addr_scanfornames = 0xc8b4;
+ static const uint16 addr_findlen = 0xc8b0;
+ static const uint16 addr_saveseg = 0xc8ac;
+ static const uint16 addr_storeit = 0xc8a8;
+ static const uint16 addr_makeheader = 0xc8a4;
+ static const uint16 addr_loadseg = 0xc8a0;
+ static const uint16 addr_loadposition = 0xc89c;
+ static const uint16 addr_saveposition = 0xc898;
+ static const uint16 addr_savefileread = 0xc894;
+ static const uint16 addr_savefilewrite = 0xc890;
+ static const uint16 addr_oldtonames = 0xc88c;
+ static const uint16 addr_namestoold = 0xc888;
+ static const uint16 addr_error = 0xc884;
+ static const uint16 addr_generalerror = 0xcbc0;
+ static const uint16 addr_dosreturn = 0xc880;
+ static const uint16 addr_shownames = 0xc87c;
+ static const uint16 addr_showslots = 0xc878;
+ static const uint16 addr_selectslot = 0xc874;
+ static const uint16 addr_showsaveops = 0xc870;
+ static const uint16 addr_showloadops = 0xc86c;
+ static const uint16 addr_showopbox = 0xc868;
+ static const uint16 addr_getnamepos = 0xc864;
+ static const uint16 addr_checkinput = 0xc860;
+ static const uint16 addr_selectslot2 = 0xc85c;
+ static const uint16 addr_actualload = 0xc858;
+ static const uint16 addr_actualsave = 0xc854;
+ static const uint16 addr_savegame = 0xc850;
+ static const uint16 addr_discops = 0xc84c;
+ static const uint16 addr_getbacktoops = 0xc848;
+ static const uint16 addr_loadgame = 0xc844;
+ static const uint16 addr_loadsavebox = 0xc840;
+ static const uint16 addr_showdiscops = 0xc83c;
+ static const uint16 addr_showmainops = 0xc838;
+ static const uint16 addr_getbackfromops = 0xc834;
+ static const uint16 addr_dosaveload = 0xc830;
+ static const uint16 addr_saveload = 0xc82c;
+ static const uint16 addr_zoomonoff = 0xc828;
+ static const uint16 addr_findtext1 = 0xc824;
+ static const uint16 addr_showdiarypage = 0xc820;
+ static const uint16 addr_diarykeyn = 0xc81c;
+ static const uint16 addr_diarykeyp = 0xc818;
+ static const uint16 addr_dumpdiarykeys = 0xc814;
+ static const uint16 addr_showdiarykeys = 0xc810;
+ static const uint16 addr_showdiary = 0xc80c;
+ static const uint16 addr_usediary = 0xc808;
+ static const uint16 addr_dumpsymbox = 0xc804;
+ static const uint16 addr_updatesymbolbot = 0xc800;
+ static const uint16 addr_updatesymboltop = 0xc7fc;
+ static const uint16 addr_nextsymbol = 0xc7f8;
+ static const uint16 addr_showsymbol = 0xc7f4;
+ static const uint16 addr_dumpsymbol = 0xc7f0;
+ static const uint16 addr_setbotright = 0xc7ec;
+ static const uint16 addr_setbotleft = 0xc7e8;
+ static const uint16 addr_settopright = 0xc7e4;
+ static const uint16 addr_settopleft = 0xc7e0;
+ static const uint16 addr_quitsymbol = 0xc7dc;
+ static const uint16 addr_entersymbol = 0xc7d8;
+ static const uint16 addr_showrightpage = 0xc7d4;
+ static const uint16 addr_showleftpage = 0xc7d0;
+ static const uint16 addr_folderexit = 0xc7cc;
+ static const uint16 addr_showfolder = 0xc7c8;
+ static const uint16 addr_loadfolder = 0xc7c4;
+ static const uint16 addr_lastfolder = 0xc7c0;
+ static const uint16 addr_folderhints = 0xc7bc;
+ static const uint16 addr_nextfolder = 0xc7b8;
+ static const uint16 addr_viewfolder = 0xc7b4;
+ static const uint16 addr_loadmenu = 0xc7b0;
+ static const uint16 addr_showmenu = 0xc7ac;
+ static const uint16 addr_showoutermenu = 0xc7a8;
+ static const uint16 addr_putundermenu = 0xc7a4;
+ static const uint16 addr_getundermenu = 0xc7a0;
+ static const uint16 addr_dumpmenu = 0xc79c;
+ static const uint16 addr_usemenu = 0xc798;
+ static const uint16 addr_dumpkeypad = 0xc794;
+ static const uint16 addr_singlekey = 0xc790;
+ static const uint16 addr_showkeypad = 0xc78c;
+ static const uint16 addr_showouterpad = 0xc788;
+ static const uint16 addr_buttonpress = 0xc784;
+ static const uint16 addr_buttonenter = 0xc780;
+ static const uint16 addr_buttonnought = 0xc77c;
+ static const uint16 addr_buttonnine = 0xc778;
+ static const uint16 addr_buttoneight = 0xc774;
+ static const uint16 addr_buttonseven = 0xc770;
+ static const uint16 addr_buttonsix = 0xc76c;
+ static const uint16 addr_buttonfive = 0xc768;
+ static const uint16 addr_buttonfour = 0xc764;
+ static const uint16 addr_buttonthree = 0xc760;
+ static const uint16 addr_buttontwo = 0xc75c;
+ static const uint16 addr_buttonone = 0xc758;
+ static const uint16 addr_addtopresslist = 0xc754;
+ static const uint16 addr_quitkey = 0xc750;
+ static const uint16 addr_loadkeypad = 0xc74c;
+ static const uint16 addr_entercode = 0xc748;
+ static const uint16 addr_usewinch = 0xc744;
+ static const uint16 addr_useplate = 0xc740;
+ static const uint16 addr_usebuttona = 0xc73c;
+ static const uint16 addr_useshield = 0xc738;
+ static const uint16 addr_usegun = 0xc734;
+ static const uint16 addr_usechurchgate = 0xc730;
+ static const uint16 addr_usewall = 0xc72c;
+ static const uint16 addr_edenscdplayer = 0xc728;
+ static const uint16 addr_usetimedtext = 0xc724;
+ static const uint16 addr_setuptimedtemp = 0xc720;
+ static const uint16 addr_setuptimeduse = 0xc71c;
+ static const uint16 addr_dumptimedtext = 0xc718;
+ static const uint16 addr_putundertimed = 0xc714;
+ static const uint16 addr_getundertimed = 0xc710;
+ static const uint16 addr_autoappear = 0xc70c;
+ static const uint16 addr_dochange = 0xc708;
+ static const uint16 addr_setallchanges = 0xc704;
+ static const uint16 addr_switchryanoff = 0xc700;
+ static const uint16 addr_switchryanon = 0xc6fc;
+ static const uint16 addr_findormake = 0xc6f8;
+ static const uint16 addr_removefreeobject = 0xc6f4;
+ static const uint16 addr_placefreeobject = 0xc6f0;
+ static const uint16 addr_issetobonmap = 0xc6ec;
+ static const uint16 addr_removesetobject = 0xc6e8;
+ static const uint16 addr_placesetobject = 0xc6e4;
+ static const uint16 addr_findpuztext = 0xc6e0;
+ static const uint16 addr_showpuztext = 0xc6dc;
+ static const uint16 addr_putbackobstuff = 0xc6d8;
+ static const uint16 addr_usetext = 0xc6d4;
+ static const uint16 addr_checkinside = 0xc6d0;
+ static const uint16 addr_isryanholding = 0xc6cc;
+ static const uint16 addr_findexobject = 0xc6c8;
+ static const uint16 addr_findsetobject = 0xc6c4;
+ static const uint16 addr_compare = 0xc6c0;
+ static const uint16 addr_selectob = 0xc6bc;
+ static const uint16 addr_withwhat = 0xc6b8;
+ static const uint16 addr_useelvdoor = 0xc6b4;
+ static const uint16 addr_useaxe = 0xc6b0;
+ static const uint16 addr_usecooker = 0xc6ac;
+ static const uint16 addr_usestereo = 0xc6a8;
+ static const uint16 addr_usekey = 0xc6a4;
+ static const uint16 addr_useelevator5 = 0xc6a0;
+ static const uint16 addr_useelevator2 = 0xc69c;
+ static const uint16 addr_useelevator4 = 0xc698;
+ static const uint16 addr_useelevator3 = 0xc694;
+ static const uint16 addr_showfirstuse = 0xc690;
+ static const uint16 addr_useelevator1 = 0xc68c;
+ static const uint16 addr_usehandle = 0xc688;
+ static const uint16 addr_usewire = 0xc684;
+ static const uint16 addr_usehatch = 0xc680;
+ static const uint16 addr_usecontrol = 0xc67c;
+ static const uint16 addr_moneypoke = 0xc678;
+ static const uint16 addr_lookatcard = 0xc674;
+ static const uint16 addr_usecashcard = 0xc670;
+ static const uint16 addr_usecardreader3 = 0xc66c;
+ static const uint16 addr_usecardreader2 = 0xc668;
+ static const uint16 addr_usecardreader1 = 0xc664;
+ static const uint16 addr_showseconduse = 0xc660;
+ static const uint16 addr_uselighter = 0xc65c;
+ static const uint16 addr_usepoolreader = 0xc658;
+ static const uint16 addr_calledensdlift = 0xc654;
+ static const uint16 addr_calledenslift = 0xc650;
+ static const uint16 addr_callhotellift = 0xc64c;
+ static const uint16 addr_trapdoor = 0xc648;
+ static const uint16 addr_grafittidoor = 0xc644;
+ static const uint16 addr_openhoteldoor2 = 0xc640;
+ static const uint16 addr_openhoteldoor = 0xc63c;
+ static const uint16 addr_drawitall = 0xc638;
+ static const uint16 addr_isitright = 0xc634;
+ static const uint16 addr_opensarters = 0xc630;
+ static const uint16 addr_openeden = 0xc62c;
+ static const uint16 addr_openpoolboss = 0xc628;
+ static const uint16 addr_openryan = 0xc624;
+ static const uint16 addr_usebalcony = 0xc620;
+ static const uint16 addr_usewindow = 0xc61c;
+ static const uint16 addr_openyourneighbour = 0xc618;
+ static const uint16 addr_nextcolon = 0xc614;
+ static const uint16 addr_openlouis = 0xc610;
+ static const uint16 addr_usedryer = 0xc60c;
+ static const uint16 addr_opentvdoor = 0xc608;
+ static const uint16 addr_usealtar = 0xc604;
+ static const uint16 addr_usehole = 0xc600;
+ static const uint16 addr_usechurchhole = 0xc5fc;
+ static const uint16 addr_sitdowninbar = 0xc5f8;
+ static const uint16 addr_wearshades = 0xc5f4;
+ static const uint16 addr_wearwatch = 0xc5f0;
+ static const uint16 addr_useopenbox = 0xc5ec;
+ static const uint16 addr_userailing = 0xc5e8;
+ static const uint16 addr_usecoveredbox = 0xc5e4;
+ static const uint16 addr_useclearbox = 0xc5e0;
+ static const uint16 addr_usecart = 0xc5dc;
+ static const uint16 addr_useslab = 0xc5d8;
+ static const uint16 addr_slabdoorf = 0xc5d4;
+ static const uint16 addr_slabdoore = 0xc5d0;
+ static const uint16 addr_slabdoorc = 0xc5cc;
+ static const uint16 addr_slabdoord = 0xc5c8;
+ static const uint16 addr_slabdoorb = 0xc5c4;
+ static const uint16 addr_slabdoora = 0xc5c0;
+ static const uint16 addr_useladderb = 0xc5bc;
+ static const uint16 addr_useladder = 0xc5b8;
+ static const uint16 addr_chewy = 0xc5b4;
+ static const uint16 addr_useplinth = 0xc5b0;
+ static const uint16 addr_usefullcart = 0xc5ac;
+ static const uint16 addr_usepipe = 0xc5a8;
+ static const uint16 addr_nothelderror = 0xc5a4;
+ static const uint16 addr_usetrainer = 0xc5a0;
+ static const uint16 addr_opentomb = 0xc59c;
+ static const uint16 addr_hotelbell = 0xc598;
+ static const uint16 addr_hotelcontrol = 0xc594;
+ static const uint16 addr_playguitar = 0xc590;
+ static const uint16 addr_runtap = 0xc58c;
+ static const uint16 addr_wheelsound = 0xc588;
+ static const uint16 addr_useroutine = 0xc584;
+ static const uint16 addr_useobject = 0xc580;
+ static const uint16 addr_delcurs = 0xc57c;
+ static const uint16 addr_printcurs = 0xc578;
+ static const uint16 addr_triggermessage = 0xc574;
+ static const uint16 addr_processtrigger = 0xc570;
+ static const uint16 addr_monmessage = 0xc56c;
+ static const uint16 addr_showcurrentfile = 0xc568;
+ static const uint16 addr_printlogo = 0xc564;
+ static const uint16 addr_monitorlogo = 0xc560;
+ static const uint16 addr_scrollmonitor = 0xc558;
+ static const uint16 addr_parser = 0xc554;
+ static const uint16 addr_searchforstring = 0xc550;
+ static const uint16 addr_getkeyandlogo = 0xc54c;
+ static const uint16 addr_dirfile = 0xc548;
+ static const uint16 addr_read = 0xc544;
+ static const uint16 addr_showkeys = 0xc540;
+ static const uint16 addr_signon = 0xc53c;
+ static const uint16 addr_searchforfiles = 0xc538;
+ static const uint16 addr_dircom = 0xc534;
+ static const uint16 addr_neterror = 0xc530;
+ static const uint16 addr_execcommand = 0xc52c;
+ static const uint16 addr_delchar = 0xc528;
+ static const uint16 addr_makecaps = 0xc524;
+ static const uint16 addr_input = 0xc520;
+ static const uint16 addr_locklightoff = 0xc51c;
+ static const uint16 addr_locklighton = 0xc518;
+ static const uint16 addr_accesslightoff = 0xc514;
+ static const uint16 addr_accesslighton = 0xc510;
+ static const uint16 addr_powerlightoff = 0xc50c;
+ static const uint16 addr_powerlighton = 0xc508;
+ static const uint16 addr_randomaccess = 0xc504;
+ static const uint16 addr_turnonpower = 0xc500;
+ static const uint16 addr_lookininterface = 0xc4fc;
+ static const uint16 addr_loadcart = 0xc4f8;
+ static const uint16 addr_loadnews = 0xc4f4;
+ static const uint16 addr_loadpersonal = 0xc4f0;
+ static const uint16 addr_printoutermon = 0xc4ec;
+ static const uint16 addr_usemon = 0xc4e8;
+ static const uint16 addr_readcitypic = 0xc4e4;
+ static const uint16 addr_readdesticon = 0xc4e0;
+ static const uint16 addr_resetlocation = 0xc4dc;
+ static const uint16 addr_setlocation = 0xc4d8;
+ static const uint16 addr_getlocation = 0xc4d4;
+ static const uint16 addr_destselect = 0xc4d0;
+ static const uint16 addr_lastdest = 0xc4cc;
+ static const uint16 addr_nextdest = 0xc4c8;
+ static const uint16 addr_showarrows = 0xc4c4;
+ static const uint16 addr_getdestinfo = 0xc4c0;
+ static const uint16 addr_locationpic = 0xc4bc;
+ static const uint16 addr_putundercentre = 0xc4b8;
+ static const uint16 addr_getundercentre = 0xc4b4;
+ static const uint16 addr_lookatplace = 0xc4b0;
+ static const uint16 addr_showcity = 0xc4ac;
+ static const uint16 addr_selectlocation = 0xc4a8;
+ static const uint16 addr_newplace = 0xc4a4;
+ static const uint16 addr_redes = 0xc4a0;
+ static const uint16 addr_hangonpq = 0xc49c;
+ static const uint16 addr_dosometalk = 0xc498;
+ static const uint16 addr_moretalk = 0xc494;
+ static const uint16 addr_getpersontext = 0xc490;
+ static const uint16 addr_starttalk = 0xc48c;
+ static const uint16 addr_getpersframe = 0xc488;
+ static const uint16 addr_convicons = 0xc484;
+ static const uint16 addr_talk = 0xc480;
+ static const uint16 addr_getback1 = 0xc47c;
+ static const uint16 addr_redrawmainscrn = 0xc478;
+ static const uint16 addr_dolook = 0xc474;
+ static const uint16 addr_look = 0xc470;
+ static const uint16 addr_autolook = 0xc46c;
+ static const uint16 addr_getyad = 0xc468;
+ static const uint16 addr_getxad = 0xc464;
+ static const uint16 addr_getmapad = 0xc460;
+ static const uint16 addr_adjustlen = 0xc45c;
+ static const uint16 addr_finalframe = 0xc458;
+ static const uint16 addr_calcfrframe = 0xc454;
+ static const uint16 addr_showallex = 0xc450;
+ static const uint16 addr_showallfree = 0xc44c;
+ static const uint16 addr_makebackob = 0xc448;
+ static const uint16 addr_showallobs = 0xc444;
+ static const uint16 addr_drawflags = 0xc43c;
+ static const uint16 addr_addlength = 0xc438;
+ static const uint16 addr_addalong = 0xc434;
+ static const uint16 addr_getdimension = 0xc430;
+ static const uint16 addr_calcmapad = 0xc42c;
+ static const uint16 addr_drawfloor = 0xc428;
+ static const uint16 addr_blockget = 0xc424;
+ static const uint16 addr_deleteextext = 0xc420;
+ static const uint16 addr_deleteexframe = 0xc41c;
+ static const uint16 addr_deleteexobject = 0xc418;
+ static const uint16 addr_purgeanitem = 0xc414;
+ static const uint16 addr_emergencypurge = 0xc410;
+ static const uint16 addr_purgealocation = 0xc40c;
+ static const uint16 addr_getexpos = 0xc408;
+ static const uint16 addr_transfertext = 0xc404;
+ static const uint16 addr_transfercontoex = 0xc400;
+ static const uint16 addr_pickupconts = 0xc3fc;
+ static const uint16 addr_transfertoex = 0xc3f8;
+ static const uint16 addr_outofopen = 0xc3f4;
+ static const uint16 addr_checkobjectsize = 0xc3f0;
+ static const uint16 addr_errormessage3 = 0xc3ec;
+ static const uint16 addr_errormessage2 = 0xc3e8;
+ static const uint16 addr_errormessage1 = 0xc3e4;
+ static const uint16 addr_useopened = 0xc3e0;
+ static const uint16 addr_selectopenob = 0xc3dc;
+ static const uint16 addr_removeobfrominv = 0xc3d8;
+ static const uint16 addr_wornerror = 0xc3d4;
+ static const uint16 addr_cantdrop = 0xc3d0;
+ static const uint16 addr_droperror = 0xc3cc;
+ static const uint16 addr_dropobject = 0xc3c8;
+ static const uint16 addr_findopenpos = 0xc3c4;
+ static const uint16 addr_findinvpos = 0xc3c0;
+ static const uint16 addr_getsetad = 0xc3bc;
+ static const uint16 addr_getopenedsize = 0xc3b8;
+ static const uint16 addr_getanyaddir = 0xc3b4;
+ static const uint16 addr_getanyad = 0xc3b0;
+ static const uint16 addr_geteitherad = 0xc3ac;
+ static const uint16 addr_getexad = 0xc3a8;
+ static const uint16 addr_getfreead = 0xc3a4;
+ static const uint16 addr_outofinv = 0xc3a0;
+ static const uint16 addr_deletetaken = 0xc39c;
+ static const uint16 addr_intoinv = 0xc398;
+ static const uint16 addr_swapwithopen = 0xc394;
+ static const uint16 addr_swapwithinv = 0xc390;
+ static const uint16 addr_reexfromopen = 0xc38c;
+ static const uint16 addr_reexfrominv = 0xc388;
+ static const uint16 addr_examinventory = 0xc384;
+ static const uint16 addr_setpickup = 0xc380;
+ static const uint16 addr_inventory = 0xc37c;
+ static const uint16 addr_findnextcolon = 0xc378;
+ static const uint16 addr_searchforsame = 0xc374;
+ static const uint16 addr_getobtextstart = 0xc370;
+ static const uint16 addr_obsthatdothings = 0xc36c;
+ static const uint16 addr_additionaltext = 0xc368;
+ static const uint16 addr_describeob = 0xc364;
+ static const uint16 addr_obpicture = 0xc360;
+ static const uint16 addr_examicon = 0xc35c;
+ static const uint16 addr_obicons = 0xc358;
+ static const uint16 addr_openob = 0xc354;
+ static const uint16 addr_showryanpage = 0xc350;
+ static const uint16 addr_openinv = 0xc34c;
+ static const uint16 addr_incryanpage = 0xc348;
+ static const uint16 addr_getbackfromob = 0xc344;
+ static const uint16 addr_makemainscreen = 0xc340;
+ static const uint16 addr_examineob = 0xc33c;
+ static const uint16 addr_makeworn = 0xc338;
+ static const uint16 addr_isitworn = 0xc334;
+ static const uint16 addr_obtoinv = 0xc330;
+ static const uint16 addr_findallopen = 0xc32c;
+ static const uint16 addr_findallryan = 0xc328;
+ static const uint16 addr_fillopen = 0xc324;
+ static const uint16 addr_fillryan = 0xc320;
+ static const uint16 addr_getnumber = 0xc318;
+ static const uint16 addr_monprint = 0xc314;
+ static const uint16 addr_printdirect = 0xc310;
+ static const uint16 addr_printboth = 0xc30c;
+ static const uint16 addr_waitframes = 0xc308;
+ static const uint16 addr_printslow = 0xc304;
+ static const uint16 addr_printchar = 0xc2fc;
+ static const uint16 addr_realcredits = 0xc2f8;
+ static const uint16 addr_set16colpalette = 0xc2f4;
+ static const uint16 addr_mode640x480 = 0xc2f0;
+ static const uint16 addr_loadintroroom = 0xc2ec;
+ static const uint16 addr_runendseq = 0xc2e8;
+ static const uint16 addr_runintroseq = 0xc2e4;
+ static const uint16 addr_intro = 0xc2e0;
+ static const uint16 addr_hangone = 0xc2dc;
+ static const uint16 addr_biblequote = 0xc2d8;
+ static const uint16 addr_credits = 0xc2d4;
+ static const uint16 addr_gettingshot = 0xc2d0;
+ static const uint16 addr_showmonk = 0xc2cc;
+ static const uint16 addr_monkspeaking = 0xc2c8;
+ static const uint16 addr_endgame = 0xc2c4;
+ static const uint16 addr_titles = 0xc2c0;
+ static const uint16 addr_initialmoncols = 0xc2bc;
+ static const uint16 addr_fadeupyellows = 0xc2b8;
+ static const uint16 addr_fadeupmonfirst = 0xc2b4;
+ static const uint16 addr_fadeupmon = 0xc2b0;
+ static const uint16 addr_fadedownmon = 0xc2ac;
+ static const uint16 addr_dumpcurrent = 0xc2a8;
+ static const uint16 addr_allpalette = 0xc2a4;
+ static const uint16 addr_paltoendpal = 0xc2a0;
+ static const uint16 addr_startpaltoend = 0xc29c;
+ static const uint16 addr_endpaltostart = 0xc298;
+ static const uint16 addr_paltostartpal = 0xc294;
+ static const uint16 addr_showgroup = 0xc290;
+ static const uint16 addr_greyscalesum = 0xc28c;
+ static const uint16 addr_fadecalculation = 0xc288;
+ static const uint16 addr_rollem = 0xc284;
+ static const uint16 addr_rollendcredits2 = 0xc280;
+ static const uint16 addr_showgun = 0xc27c;
+ static const uint16 addr_clearstartpal = 0xc278;
+ static const uint16 addr_fadescreendowns = 0xc274;
+ static const uint16 addr_fadescreendown = 0xc270;
+ static const uint16 addr_fadescreenuphalf = 0xc26c;
+ static const uint16 addr_fadescreendownhalf = 0xc268;
+ static const uint16 addr_fadescreenups = 0xc264;
+ static const uint16 addr_fadefromwhite = 0xc260;
+ static const uint16 addr_fadetowhite = 0xc25c;
+ static const uint16 addr_fadescreenup = 0xc258;
+ static const uint16 addr_clearpalette = 0xc254;
+ static const uint16 addr_clearendpal = 0xc250;
+ static const uint16 addr_dofade = 0xc24c;
+ static const uint16 addr_fadedos = 0xc248;
+ static const uint16 addr_transfermap = 0xc244;
+ static const uint16 addr_transferinv = 0xc240;
+ static const uint16 addr_doblocks = 0xc228;
+ static const uint16 addr_delthisone = 0xc214;
+ static const uint16 addr_zoom = 0xc210;
+ static const uint16 addr_doshake = 0xc20c;
+ static const uint16 addr_vsync = 0xc208;
+ static const uint16 addr_clearwork = 0xc204;
+ static const uint16 addr_createpanel2 = 0xc200;
+ static const uint16 addr_createpanel = 0xc1fc;
+ static const uint16 addr_pixelcheckset = 0xc1f8;
+ static const uint16 addr_dumpmap = 0xc1f4;
+ static const uint16 addr_maptopanel = 0xc1f0;
+ static const uint16 addr_paneltomap = 0xc1ec;
+ static const uint16 addr_setmode = 0xc1dc;
+ static const uint16 addr_loadpalfromiff = 0xc1d8;
+ static const uint16 addr_showpcx = 0xc1cc;
+ static const uint16 addr_allocatework = 0xc1c8;
+ static const uint16 addr_dumpeverything = 0xc1c4;
+ static const uint16 addr_deleverything = 0xc1c0;
+ static const uint16 addr_showreelframe = 0xc1bc;
+ static const uint16 addr_getreelstart = 0xc1b8;
+ static const uint16 addr_movemap = 0xc1b4;
+ static const uint16 addr_dealwithspecial = 0xc1b0;
+ static const uint16 addr_reconstruct = 0xc1ac;
+ static const uint16 addr_soundonreels = 0xc1a8;
+ static const uint16 addr_plotreel = 0xc1a4;
+ static const uint16 addr_reelsonscreen = 0xc1a0;
+ static const uint16 addr_getreelframeax = 0xc19c;
+ static const uint16 addr_updatepeople = 0xc198;
+ static const uint16 addr_lockeddoorway = 0xc194;
+ static const uint16 addr_widedoor = 0xc18c;
+ static const uint16 addr_doorway = 0xc188;
+ static const uint16 addr_constant = 0xc184;
+ static const uint16 addr_steady = 0xc180;
+ static const uint16 addr_random = 0xc17c;
+ static const uint16 addr_liftnoise = 0xc178;
+ static const uint16 addr_backobject = 0xc170;
+ static const uint16 addr_showrain = 0xc16c;
+ static const uint16 addr_getblockofpixel = 0xc168;
+ static const uint16 addr_splitintolines = 0xc164;
+ static const uint16 addr_initrain = 0xc160;
+ static const uint16 addr_reminders = 0xc15c;
+ static const uint16 addr_adjustright = 0xc158;
+ static const uint16 addr_adjustleft = 0xc154;
+ static const uint16 addr_adjustup = 0xc150;
+ static const uint16 addr_adjustdown = 0xc14c;
+ static const uint16 addr_checkforexit = 0xc148;
+ static const uint16 addr_facerightway = 0xc144;
+ static const uint16 addr_aboutturn = 0xc13c;
+ static const uint16 addr_mainman = 0xc138;
+ static const uint16 addr_findsource = 0xc130;
+ static const uint16 addr_checkone = 0xc12c;
+ static const uint16 addr_delsprite = 0xc11c;
+ static const uint16 addr_checkspeed = 0xc110;
+ static const uint16 addr_showgamereel = 0xc10c;
+ static const uint16 addr_addtopeoplelist = 0xc108;
+ static const uint16 addr_train = 0xc104;
+ static const uint16 addr_sparky = 0xc100;
+ static const uint16 addr_copper = 0xc0fc;
+ static const uint16 addr_advisor = 0xc0f8;
+ static const uint16 addr_drunk = 0xc0f4;
+ static const uint16 addr_textformonk = 0xc0f0;
+ static const uint16 addr_textforend = 0xc0ec;
+ static const uint16 addr_priesttext = 0xc0e8;
+ static const uint16 addr_madmode = 0xc0e4;
+ static const uint16 addr_madmantext = 0xc0e0;
+ static const uint16 addr_madman = 0xc0dc;
+ static const uint16 addr_madmanstelly = 0xc0d8;
+ static const uint16 addr_priest = 0xc0d4;
+ static const uint16 addr_rollendcredits = 0xc0d0;
+ static const uint16 addr_endgameseq = 0xc0cc;
+ static const uint16 addr_monkandryan = 0xc0c8;
+ static const uint16 addr_intro3text = 0xc0c4;
+ static const uint16 addr_intro2text = 0xc0c0;
+ static const uint16 addr_intro1text = 0xc0bc;
+ static const uint16 addr_monks2text = 0xc0b8;
+ static const uint16 addr_handclap = 0xc0b4;
+ static const uint16 addr_intromonks2 = 0xc0b0;
+ static const uint16 addr_intromonks1 = 0xc0ac;
+ static const uint16 addr_intromagic3 = 0xc0a8;
+ static const uint16 addr_intromagic2 = 0xc0a4;
+ static const uint16 addr_gates = 0xc0a0;
+ static const uint16 addr_candles2 = 0xc09c;
+ static const uint16 addr_candles = 0xc098;
+ static const uint16 addr_intromagic1 = 0xc094;
+ static const uint16 addr_smallcandle = 0xc090;
+ static const uint16 addr_candles1 = 0xc08c;
+ static const uint16 addr_keeper = 0xc088;
+ static const uint16 addr_carparkdrip = 0xc084;
+ static const uint16 addr_sparkydrip = 0xc080;
+ static const uint16 addr_gamer = 0xc07c;
+ static const uint16 addr_bossman = 0xc078;
+ static const uint16 addr_heavy = 0xc074;
+ static const uint16 addr_security = 0xc070;
+ static const uint16 addr_poolguard = 0xc06c;
+ static const uint16 addr_businessman = 0xc068;
+ static const uint16 addr_aide = 0xc064;
+ static const uint16 addr_mugger = 0xc060;
+ static const uint16 addr_helicopter = 0xc05c;
+ static const uint16 addr_rockstar = 0xc058;
+ static const uint16 addr_soldier1 = 0xc054;
+ static const uint16 addr_interviewer = 0xc050;
+ static const uint16 addr_barwoman = 0xc04c;
+ static const uint16 addr_othersmoker = 0xc048;
+ static const uint16 addr_bartender = 0xc044;
+ static const uint16 addr_drinker = 0xc040;
+ static const uint16 addr_tattooman = 0xc03c;
+ static const uint16 addr_mansatstill = 0xc038;
+ static const uint16 addr_manasleep2 = 0xc034;
+ static const uint16 addr_louischair = 0xc030;
+ static const uint16 addr_louis = 0xc02c;
+ static const uint16 addr_femalefan = 0xc028;
+ static const uint16 addr_malefan = 0xc024;
+ static const uint16 addr_edeninbath = 0xc020;
+ static const uint16 addr_eden = 0xc01c;
+ static const uint16 addr_manasleep = 0xc018;
+ static const uint16 addr_attendant = 0xc014;
+ static const uint16 addr_smokebloke = 0xc010;
+ static const uint16 addr_receptionist = 0xc00c;
+ static const uint16 addr_foghornsound = 0xc008;
+ static const uint16 addr_intromusic = 0xc004;
+ static const uint16 addr_alleybarksound = 0xc000;
+ const static uint16 kStartvars = 0;
+ const static uint16 kProgresspoints = 1;
+ const static uint16 kWatchon = 2;
+ const static uint16 kShadeson = 3;
+ const static uint16 kSecondcount = 4;
+ const static uint16 kMinutecount = 5;
+ const static uint16 kHourcount = 6;
+ const static uint16 kZoomon = 7;
+ const static uint16 kLocation = 8;
+ const static uint16 kExpos = 9;
+ const static uint16 kExframepos = 10;
+ const static uint16 kExtextpos = 12;
+ const static uint16 kCard1money = 14;
+ const static uint16 kListpos = 16;
+ const static uint16 kRyanpage = 18;
+ const static uint16 kWatchingtime = 19;
+ const static uint16 kReeltowatch = 21;
+ const static uint16 kEndwatchreel = 23;
+ const static uint16 kSpeedcount = 25;
+ const static uint16 kWatchspeed = 26;
+ const static uint16 kReeltohold = 27;
+ const static uint16 kEndofholdreel = 29;
+ const static uint16 kWatchmode = 31;
+ const static uint16 kDestafterhold = 32;
+ const static uint16 kNewsitem = 33;
+ const static uint16 kLiftflag = 34;
+ const static uint16 kLiftpath = 35;
+ const static uint16 kLockstatus = 36;
+ const static uint16 kDoorpath = 37;
+ const static uint16 kCounttoopen = 38;
+ const static uint16 kCounttoclose = 39;
+ const static uint16 kRockstardead = 40;
+ const static uint16 kGeneraldead = 41;
+ const static uint16 kSartaindead = 42;
+ const static uint16 kAidedead = 43;
+ const static uint16 kBeenmugged = 44;
+ const static uint16 kGunpassflag = 45;
+ const static uint16 kCanmovealtar = 46;
+ const static uint16 kTalkedtoattendant = 47;
+ const static uint16 kTalkedtosparky = 48;
+ const static uint16 kTalkedtoboss = 49;
+ const static uint16 kTalkedtorecep = 50;
+ const static uint16 kCardpassflag = 51;
+ const static uint16 kMadmanflag = 52;
+ const static uint16 kKeeperflag = 53;
+ const static uint16 kLasttrigger = 54;
+ const static uint16 kMandead = 55;
+ const static uint16 kSeed = 56;
+ const static uint16 kNeedtotravel = 59;
+ const static uint16 kThroughdoor = 60;
+ const static uint16 kNewobs = 61;
+ const static uint16 kRyanon = 62;
+ const static uint16 kCombatcount = 63;
+ const static uint16 kLastweapon = 64;
+ const static uint16 kDreamnumber = 65;
+ const static uint16 kRoomafterdream = 66;
+ const static uint16 kShakecounter = 67;
+ const static uint16 kSpeechcount = 68;
+ const static uint16 kCharshift = 69;
+ const static uint16 kKerning = 71;
+ const static uint16 kBrightness = 72;
+ const static uint16 kRoomloaded = 73;
+ const static uint16 kDidzoom = 74;
+ const static uint16 kLinespacing = 75;
+ const static uint16 kTextaddressx = 77;
+ const static uint16 kTextaddressy = 79;
+ const static uint16 kTextlen = 81;
+ const static uint16 kLastxpos = 82;
+ const static uint16 kIcontop = 84;
+ const static uint16 kIconleft = 86;
+ const static uint16 kItemframe = 88;
+ const static uint16 kItemtotran = 89;
+ const static uint16 kRoomad = 90;
+ const static uint16 kOldsubject = 92;
+ const static uint16 kWithobject = 94;
+ const static uint16 kWithtype = 95;
+ const static uint16 kLookcounter = 96;
+ const static uint16 kCommand = 98;
+ const static uint16 kCommandtype = 99;
+ const static uint16 kOldcommandtype = 100;
+ const static uint16 kObjecttype = 101;
+ const static uint16 kGetback = 102;
+ const static uint16 kInvopen = 103;
+ const static uint16 kMainmode = 104;
+ const static uint16 kPickup = 105;
+ const static uint16 kLastinvpos = 106;
+ const static uint16 kExamagain = 107;
+ const static uint16 kNewtextline = 108;
+ const static uint16 kOpenedob = 109;
+ const static uint16 kOpenedtype = 110;
+ const static uint16 kOldmapadx = 111;
+ const static uint16 kOldmapady = 113;
+ const static uint16 kMapadx = 115;
+ const static uint16 kMapady = 117;
+ const static uint16 kMapoffsetx = 119;
+ const static uint16 kMapoffsety = 121;
+ const static uint16 kMapxstart = 123;
+ const static uint16 kMapystart = 125;
+ const static uint16 kMapxsize = 127;
+ const static uint16 kMapysize = 128;
+ const static uint16 kHavedoneobs = 129;
+ const static uint16 kManisoffscreen = 130;
+ const static uint16 kRainspace = 131;
+ const static uint16 kFacing = 132;
+ const static uint16 kLeavedirection = 133;
+ const static uint16 kTurntoface = 134;
+ const static uint16 kTurndirection = 135;
+ const static uint16 kMaintimer = 136;
+ const static uint16 kIntrocount = 138;
+ const static uint16 kArrowad = 139;
+ const static uint16 kCurrentkey = 141;
+ const static uint16 kOldkey = 142;
+ const static uint16 kUseddirection = 143;
+ const static uint16 kCurrentkey2 = 144;
+ const static uint16 kTimercount = 145;
+ const static uint16 kOldtimercount = 146;
+ const static uint16 kMapx = 147;
+ const static uint16 kMapy = 148;
+ const static uint16 kNewscreen = 149;
+ const static uint16 kRyanx = 150;
+ const static uint16 kRyany = 151;
+ const static uint16 kLastflag = 152;
+ const static uint16 kLastflagex = 153;
+ const static uint16 kFlagx = 154;
+ const static uint16 kFlagy = 155;
+ const static uint16 kCurrentex = 156;
+ const static uint16 kCurrentfree = 157;
+ const static uint16 kCurrentframe = 158;
+ const static uint16 kFramesad = 160;
+ const static uint16 kDataad = 162;
+ const static uint16 kFrsegment = 164;
+ const static uint16 kObjectx = 166;
+ const static uint16 kObjecty = 168;
+ const static uint16 kOffsetx = 170;
+ const static uint16 kOffsety = 172;
+ const static uint16 kSavesize = 174;
+ const static uint16 kSavesource = 176;
+ const static uint16 kSavex = 178;
+ const static uint16 kSavey = 179;
+ const static uint16 kCurrentob = 180;
+ const static uint16 kPrioritydep = 181;
+ const static uint16 kDestpos = 182;
+ const static uint16 kReallocation = 183;
+ const static uint16 kRoomnum = 184;
+ const static uint16 kNowinnewroom = 185;
+ const static uint16 kResetmanxy = 186;
+ const static uint16 kNewlocation = 187;
+ const static uint16 kAutolocation = 188;
+ const static uint16 kMustload = 189;
+ const static uint16 kAnswered = 190;
+ const static uint16 kSaidno = 191;
+ const static uint16 kDoorcheck1 = 192;
+ const static uint16 kDoorcheck2 = 193;
+ const static uint16 kDoorcheck3 = 194;
+ const static uint16 kDoorcheck4 = 195;
+ const static uint16 kMousex = 196;
+ const static uint16 kMousey = 198;
+ const static uint16 kMousebutton = 200;
+ const static uint16 kMousebutton1 = 202;
+ const static uint16 kMousebutton2 = 204;
+ const static uint16 kMousebutton3 = 206;
+ const static uint16 kMousebutton4 = 208;
+ const static uint16 kOldbutton = 210;
+ const static uint16 kOldx = 212;
+ const static uint16 kOldy = 214;
+ const static uint16 kLastbutton = 216;
+ const static uint16 kOldpointerx = 218;
+ const static uint16 kOldpointery = 220;
+ const static uint16 kDelherex = 222;
+ const static uint16 kDelherey = 224;
+ const static uint16 kPointerxs = 226;
+ const static uint16 kPointerys = 227;
+ const static uint16 kDelxs = 228;
+ const static uint16 kDelys = 229;
+ const static uint16 kPointerframe = 230;
+ const static uint16 kPointerpower = 231;
+ const static uint16 kAuxpointerframe = 232;
+ const static uint16 kPointermode = 233;
+ const static uint16 kPointerspeed = 234;
+ const static uint16 kPointercount = 235;
+ const static uint16 kInmaparea = 236;
+ const static uint16 kReelpointer = 237;
+ const static uint16 kSlotdata = 239;
+ const static uint16 kThisslot = 240;
+ const static uint16 kSlotflags = 241;
+ const static uint16 kTakeoff = 242;
+ const static uint16 kTalkmode = 244;
+ const static uint16 kTalkpos = 245;
+ const static uint16 kCharacter = 246;
+ const static uint16 kPersondata = 247;
+ const static uint16 kTalknum = 249;
+ const static uint16 kNumberinroom = 250;
+ const static uint16 kCurrentcel = 251;
+ const static uint16 kOldselection = 252;
+ const static uint16 kStopwalking = 253;
+ const static uint16 kMouseon = 254;
+ const static uint16 kPlayed = 255;
+ const static uint16 kTimer1 = 257;
+ const static uint16 kTimer2 = 258;
+ const static uint16 kTimer3 = 259;
+ const static uint16 kWholetimer = 260;
+ const static uint16 kTimer1to = 262;
+ const static uint16 kTimer2to = 263;
+ const static uint16 kTimer3to = 264;
+ const static uint16 kWatchdump = 265;
+ const static uint16 kCurrentset = 266;
+ const static uint16 kLogonum = 268;
+ const static uint16 kOldlogonum = 269;
+ const static uint16 kNewlogonum = 270;
+ const static uint16 kNetseg = 271;
+ const static uint16 kNetpoint = 273;
+ const static uint16 kKeynum = 275;
+ const static uint16 kCursorstate = 276;
+ const static uint16 kPressed = 277;
+ const static uint16 kPresspointer = 278;
+ const static uint16 kGraphicpress = 280;
+ const static uint16 kPresscount = 281;
+ const static uint16 kKeypadax = 282;
+ const static uint16 kKeypadcx = 284;
+ const static uint16 kLightcount = 286;
+ const static uint16 kFolderpage = 287;
+ const static uint16 kDiarypage = 288;
+ const static uint16 kMenucount = 289;
+ const static uint16 kSymboltopx = 290;
+ const static uint16 kSymboltopnum = 291;
+ const static uint16 kSymboltopdir = 292;
+ const static uint16 kSymbolbotx = 293;
+ const static uint16 kSymbolbotnum = 294;
+ const static uint16 kSymbolbotdir = 295;
+ const static uint16 kSymboltolight = 296;
+ const static uint16 kSymbol1 = 297;
+ const static uint16 kSymbol2 = 298;
+ const static uint16 kSymbol3 = 299;
+ const static uint16 kSymbolnum = 300;
+ const static uint16 kDumpx = 301;
+ const static uint16 kDumpy = 303;
+ const static uint16 kWalkandexam = 305;
+ const static uint16 kWalkexamtype = 306;
+ const static uint16 kWalkexamnum = 307;
+ const static uint16 kCursloc = 308;
+ const static uint16 kCurslocx = 310;
+ const static uint16 kCurslocy = 312;
+ const static uint16 kCurpos = 314;
+ const static uint16 kMonadx = 316;
+ const static uint16 kMonady = 318;
+ const static uint16 kGotfrom = 320;
+ const static uint16 kMonsource = 322;
+ const static uint16 kNumtodo = 324;
+ const static uint16 kTimecount = 326;
+ const static uint16 kCounttotimed = 328;
+ const static uint16 kTimedseg = 330;
+ const static uint16 kTimedoffset = 332;
+ const static uint16 kTimedy = 334;
+ const static uint16 kTimedx = 335;
+ const static uint16 kNeedtodumptimed = 336;
+ const static uint16 kHandle = 337;
+ const static uint16 kLoadingorsave = 339;
+ const static uint16 kCurrentslot = 340;
+ const static uint16 kCursorpos = 341;
+ const static uint16 kColourpos = 342;
+ const static uint16 kFadedirection = 343;
+ const static uint16 kNumtofade = 344;
+ const static uint16 kFadecount = 345;
+ const static uint16 kAddtogreen = 346;
+ const static uint16 kAddtored = 347;
+ const static uint16 kAddtoblue = 348;
+ const static uint16 kLastsoundreel = 349;
+ const static uint16 kSoundbuffer = 351;
+ const static uint16 kSoundbufferad = 353;
+ const static uint16 kSoundbufferpage = 355;
+ const static uint16 kSoundtimes = 356;
+ const static uint16 kNeedsoundbuff = 357;
+ const static uint16 kOldint9seg = 358;
+ const static uint16 kOldint9add = 360;
+ const static uint16 kOldint8seg = 362;
+ const static uint16 kOldint8add = 364;
+ const static uint16 kOldsoundintseg = 366;
+ const static uint16 kOldsoundintadd = 368;
+ const static uint16 kSoundbaseadd = 370;
+ const static uint16 kDsp_status = 372;
+ const static uint16 kDsp_write = 374;
+ const static uint16 kDmaaddress = 376;
+ const static uint16 kSoundint = 377;
+ const static uint16 kSounddmachannel = 378;
+ const static uint16 kSampleplaying = 379;
+ const static uint16 kTestresult = 380;
+ const static uint16 kCurrentirq = 381;
+ const static uint16 kSpeechloaded = 382;
+ const static uint16 kSpeechlength = 383;
+ const static uint16 kVolume = 385;
+ const static uint16 kVolumeto = 386;
+ const static uint16 kVolumedirection = 387;
+ const static uint16 kVolumecount = 388;
+ const static uint16 kPlayblock = 389;
+ const static uint16 kWongame = 390;
+ const static uint16 kLasthardkey = 391;
+ const static uint16 kBufferin = 392;
+ const static uint16 kBufferout = 394;
+ const static uint16 kExtras = 396;
+ const static uint16 kWorkspace = 398;
+ const static uint16 kMapstore = 400;
+ const static uint16 kCharset1 = 402;
+ const static uint16 kTempcharset = 404;
+ const static uint16 kIcons1 = 406;
+ const static uint16 kIcons2 = 408;
+ const static uint16 kBuffers = 410;
+ const static uint16 kMainsprites = 412;
+ const static uint16 kBackdrop = 414;
+ const static uint16 kMapdata = 416;
+ const static uint16 kSounddata = 418;
+ const static uint16 kSounddata2 = 420;
+ const static uint16 kRecordspace = 422;
+ const static uint16 kFreedat = 424;
+ const static uint16 kSetdat = 426;
+ const static uint16 kReel1 = 428;
+ const static uint16 kReel2 = 430;
+ const static uint16 kReel3 = 432;
+ const static uint16 kRoomdesc = 434;
+ const static uint16 kFreedesc = 436;
+ const static uint16 kSetdesc = 438;
+ const static uint16 kBlockdesc = 440;
+ const static uint16 kSetframes = 442;
+ const static uint16 kFreeframes = 444;
+ const static uint16 kPeople = 446;
+ const static uint16 kReels = 448;
+ const static uint16 kCommandtext = 450;
+ const static uint16 kPuzzletext = 452;
+ const static uint16 kTraveltext = 454;
+ const static uint16 kTempgraphics = 456;
+ const static uint16 kTempgraphics2 = 458;
+ const static uint16 kTempgraphics3 = 460;
+ const static uint16 kTempsprites = 462;
+ const static uint16 kTextfile1 = 464;
+ const static uint16 kTextfile2 = 466;
+ const static uint16 kTextfile3 = 468;
+ const static uint16 kBlinkframe = 470;
+ const static uint16 kBlinkcount = 471;
+ const static uint16 kReasseschanges = 472;
+ const static uint16 kPointerspath = 473;
+ const static uint16 kManspath = 474;
+ const static uint16 kPointerfirstpath = 475;
+ const static uint16 kFinaldest = 476;
+ const static uint16 kDestination = 477;
+ const static uint16 kLinestartx = 478;
+ const static uint16 kLinestarty = 480;
+ const static uint16 kLineendx = 482;
+ const static uint16 kLineendy = 484;
+ const static uint16 kIncrement1 = 486;
+ const static uint16 kIncrement2 = 488;
+ const static uint16 kLineroutine = 490;
+ const static uint16 kLinepointer = 491;
+ const static uint16 kLinedirection = 492;
+ const static uint16 kLinelength = 493;
+ const static uint16 kLiftsoundcount = 494;
+ const static uint16 kEmmhandle = 495;
+ const static uint16 kEmmpageframe = 497;
+ const static uint16 kEmmhardwarepage = 499;
+ const static uint16 kCh0emmpage = 500;
+ const static uint16 kCh0offset = 502;
+ const static uint16 kCh0blockstocopy = 504;
+ const static uint16 kCh0playing = 506;
+ const static uint16 kCh0repeat = 507;
+ const static uint16 kCh0oldemmpage = 508;
+ const static uint16 kCh0oldoffset = 510;
+ const static uint16 kCh0oldblockstocopy = 512;
+ const static uint16 kCh1playing = 514;
+ const static uint16 kCh1emmpage = 515;
+ const static uint16 kCh1offset = 517;
+ const static uint16 kCh1blockstocopy = 519;
+ const static uint16 kCh1blocksplayed = 521;
+ const static uint16 kSoundbufferwrite = 523;
+ const static uint16 kSoundemmpage = 525;
+ const static uint16 kSpeechemmpage = 527;
+ const static uint16 kCurrentsample = 529;
+ const static uint16 kRoomssample = 530;
+ const static uint16 kGameerror = 531;
+ const static uint16 kHowmuchalloc = 532;
+ const static uint16 kReelroutines = 534;
+ const static uint16 kReelcalls = 991;
+ const static uint16 kRoombyroom = 1214;
+ const static uint16 kR0 = 1326;
+ const static uint16 kR1 = 1327;
+ const static uint16 kR2 = 1331;
+ const static uint16 kR6 = 1350;
+ const static uint16 kR8 = 1357;
+ const static uint16 kR9 = 1373;
+ const static uint16 kR10 = 1380;
+ const static uint16 kR11 = 1384;
+ const static uint16 kR12 = 1388;
+ const static uint16 kR13 = 1392;
+ const static uint16 kR14 = 1405;
+ const static uint16 kR20 = 1439;
+ const static uint16 kR22 = 1461;
+ const static uint16 kR23 = 1492;
+ const static uint16 kR25 = 1505;
+ const static uint16 kR26 = 1527;
+ const static uint16 kR27 = 1549;
+ const static uint16 kR28 = 1574;
+ const static uint16 kR29 = 1593;
+ const static uint16 kR45 = 1609;
+ const static uint16 kR46 = 1616;
+ const static uint16 kR47 = 1653;
+ const static uint16 kR52 = 1666;
+ const static uint16 kR53 = 1670;
+ const static uint16 kR55 = 1677;
+ const static uint16 kSpritename1 = 1819;
+ const static uint16 kSpritename3 = 1832;
+ const static uint16 kIdname = 1845;
+ const static uint16 kCharacterset1 = 1857;
+ const static uint16 kCharacterset2 = 1870;
+ const static uint16 kCharacterset3 = 1883;
+ const static uint16 kSamplename = 1896;
+ const static uint16 kBasicsample = 1909;
+ const static uint16 kIcongraphics0 = 1922;
+ const static uint16 kIcongraphics1 = 1935;
+ const static uint16 kExtragraphics1 = 1948;
+ const static uint16 kIcongraphics8 = 1961;
+ const static uint16 kMongraphicname = 1974;
+ const static uint16 kMongraphics2 = 1987;
+ const static uint16 kCityname = 2000;
+ const static uint16 kTravelgraphic1 = 2013;
+ const static uint16 kTravelgraphic2 = 2026;
+ const static uint16 kDiarygraphic = 2039;
+ const static uint16 kMonitorfile1 = 2052;
+ const static uint16 kMonitorfile2 = 2065;
+ const static uint16 kMonitorfile10 = 2078;
+ const static uint16 kMonitorfile11 = 2091;
+ const static uint16 kMonitorfile12 = 2104;
+ const static uint16 kMonitorfile13 = 2117;
+ const static uint16 kMonitorfile20 = 2130;
+ const static uint16 kMonitorfile21 = 2143;
+ const static uint16 kMonitorfile22 = 2156;
+ const static uint16 kMonitorfile23 = 2169;
+ const static uint16 kMonitorfile24 = 2182;
+ const static uint16 kFoldertext = 2195;
+ const static uint16 kDiarytext = 2208;
+ const static uint16 kPuzzletextname = 2221;
+ const static uint16 kTraveltextname = 2234;
+ const static uint16 kIntrotextname = 2247;
+ const static uint16 kEndtextname = 2260;
+ const static uint16 kCommandtextname = 2273;
+ const static uint16 kVolumetabname = 2286;
+ const static uint16 kFoldergraphic1 = 2299;
+ const static uint16 kFoldergraphic2 = 2312;
+ const static uint16 kFoldergraphic3 = 2325;
+ const static uint16 kSymbolgraphic = 2338;
+ const static uint16 kGungraphic = 2351;
+ const static uint16 kMonkface = 2364;
+ const static uint16 kTitle0graphics = 2377;
+ const static uint16 kTitle1graphics = 2390;
+ const static uint16 kTitle2graphics = 2403;
+ const static uint16 kTitle3graphics = 2416;
+ const static uint16 kTitle4graphics = 2429;
+ const static uint16 kTitle5graphics = 2442;
+ const static uint16 kTitle6graphics = 2455;
+ const static uint16 kTitle7graphics = 2468;
+ const static uint16 kPalettescreen = 2481;
+ const static uint16 kCurrentfile = 2970;
+ const static uint16 kDmaaddresses = 5118;
+ const static uint16 kFileheader = 6091;
+ const static uint16 kFiledata = 6141;
+ const static uint16 kExtradata = 6181;
+ const static uint16 kRoomdata = 6187;
+ const static uint16 kMadeuproomdat = 7979;
+ const static uint16 kRoomscango = 8011;
+ const static uint16 kRoompics = 8027;
+ const static uint16 kOplist = 8042;
+ const static uint16 kInputline = 8045;
+ const static uint16 kLinedata = 8173;
+ const static uint16 kPresslist = 8573;
+ const static uint16 kSavenames = 8579;
+ const static uint16 kSavefiles = 8698;
+ const static uint16 kRecname = 8789;
+ const static uint16 kQuitrequested = 8802;
+ const static uint16 kSubtitles = 8803;
+ const static uint16 kForeignrelease = 8804;
+ const static uint16 kStak = 8805;
+ const static uint16 kBlocktextdat = (0);
+ const static uint16 kPersonframes = (0);
+ const static uint16 kDebuglevel1 = (0);
+ const static uint16 kDebuglevel2 = (0);
+ const static uint16 kPlayback = (0);
+ const static uint16 kMap = (0);
+ const static uint16 kSettextdat = (0);
+ const static uint16 kSpanish = (0);
+ const static uint16 kFramedata = (0);
+ const static uint16 kRecording = (0);
+ const static uint16 kFlags = (0);
+ const static uint16 kGerman = (0);
+ const static uint16 kTextunder = (0);
+ const static uint16 kPathdata = (0);
+ const static uint16 kDemo = (0);
+ const static uint16 kExframedata = (0);
+ const static uint16 kIntextdat = (0);
+ const static uint16 kFreetextdat = (0);
+ const static uint16 kFrframedata = (0);
+ const static uint16 kSettext = (0+(130*2));
+ const static uint16 kOpeninvlist = (0+(228*13));
+ const static uint16 kRyaninvlist = (0+(228*13)+32);
+ const static uint16 kPointerback = (0+(228*13)+32+60);
+ const static uint16 kMapflags = (0+(228*13)+32+60+(32*32));
+ const static uint16 kStartpal = (0+(228*13)+32+60+(32*32)+(11*10*3));
+ const static uint16 kEndpal = (0+(228*13)+32+60+(32*32)+(11*10*3)+768);
+ const static uint16 kMaingamepal = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768);
+ const static uint16 kSpritetable = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768);
+ const static uint16 kSetlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32));
+ const static uint16 kFreelist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5));
+ const static uint16 kExlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5));
+ const static uint16 kPeoplelist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
+ const static uint16 kZoomspace = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5));
+ const static uint16 kPrintedlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40));
+ const static uint16 kListofchanges = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80));
+ const static uint16 kUndertimedtext = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
+ const static uint16 kRainlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30));
+ const static uint16 kInitialreelrouts = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
+ const static uint16 kInitialvars = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534);
+ const static uint16 kLengthofbuffer = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+991-534+68-0);
+ const static uint16 kReellist = (0+(36*144));
+ const static uint16 kIntext = (0+(38*2));
+ const static uint16 kLengthofmap = (0+(66*60));
+ const static uint16 kFreetext = (0+(82*2));
+ const static uint16 kBlocktext = (0+(98*2));
+ const static uint16 kBlocks = (0+192);
+ const static uint16 kFrframes = (0+2080);
+ const static uint16 kExframes = (0+2080);
+ const static uint16 kFrames = (0+2080);
+ const static uint16 kExdata = (0+2080+30000);
+ const static uint16 kExtextdat = (0+2080+30000+(16*114));
+ const static uint16 kExtext = (0+2080+30000+(16*114)+((114+2)*2));
+ const static uint16 kLengthofextra = (0+2080+30000+(16*114)+((114+2)*2)+18000);
+ const static uint16 kPersontxtdat = (0+24);
+ const static uint16 kPersontext = (0+24+(1026*2));
+ const static uint16 kInputport = (0x63);
+ const static uint16 kForeign = (1);
+ const static uint16 kCd = (1);
+ const static uint16 kNumexobjects = (114);
+ const static uint16 kUndertextsizey = (13);
+ const static uint16 kZoomy = (132);
+ const static uint16 kFreedatlen = (16*80);
+ const static uint16 kExtextlen = (18000);
+ const static uint16 kLenofmapstore = (22*8*20*8);
+ const static uint16 kUndertextsizex = (228);
+ const static uint16 kNumchanges = (250);
+ const static uint16 kUndertimedysize = (30);
+ const static uint16 kExframeslen = (30000);
+ const static uint16 kTablesize = (32);
+ const static uint16 kScreenwidth = (320);
+ const static uint16 kKeypadx = (36+112);
+ const static uint16 kItempicsize = (44);
+ const static uint16 kDiaryy = (48+12);
+ const static uint16 kOpsy = (52);
+ const static uint16 kSymboly = (56);
+ const static uint16 kInventy = (58);
+ const static uint16 kMenuy = (60);
+ const static uint16 kOpsx = (60);
+ const static uint16 kMaplength = (60);
+ const static uint16 kHeaderlen = (6187-6091);
+ const static uint16 kSymbolx = (64);
+ const static uint16 kSetdatlen = (64*128);
+ const static uint16 kMapwidth = (66);
+ const static uint16 kTextstart = (66*2);
+ const static uint16 kMaplen = (66*60);
+ const static uint16 kDiaryx = (68+24);
+ const static uint16 kLengthofvars = (68-0);
+ const static uint16 kKeypady = (72);
+ const static uint16 kZoomx = (8);
+ const static uint16 kInventx = (80);
+ const static uint16 kMenux = (80+40);
+ const static uint16 kLenofreelrouts = (991-534);
+
+ void bothchannels();
+ void usewire();
+ void getnamepos();
+ void drawitall();
+ void clearstartpal();
+ void femalefan();
+ void showgamereel();
+ void identifyob();
+ void trysoundalloc();
+ void uselighter();
+ void showmenu();
+ void usepoolreader();
+ void showgroup();
+ void startdmablock();
+ void useopenbox();
+ void clearbuffers();
+ void neterror();
+ void storeit();
+ void isitworn();
+ void putundertimed();
+ void dumpmap();
+ //void multidump();
+ void channel0only();
+ void worktoscreenm();
+ void removeemm();
+ //void frameoutbh();
+ void getobtextstart();
+ void loadfolder();
+ void decide();
+ void dumppointer();
+ void reelsonscreen();
+ void getridofreels();
+ void readkey();
+ void louis();
+ void entrytexts();
+ void getreelstart();
+ void buttonenter();
+ void checkinput();
+ void crosshair();
+ void bresenhams();
+ void getbackfromops();
+ //void frameoutv();
+ void restoreall();
+ void screenupdate();
+ void addlength();
+ void usetimedtext();
+ void putundercentre();
+ void checkobjectsize();
+ void commandonly();
+ void adjustlen();
+ void deallocatemem();
+ void mainscreen();
+ void watchreel();
+ void showfolder();
+ void turnanypathoff();
+ void openfilefromc();
+ void gettime();
+ void clearwork();
+ void loadtraveltext();
+ //void worktoscreen();
+ void getexpos();
+ void fadedos();
+ //void multiget();
+ void fadeupmonfirst();
+ void drawfloor();
+ void loadkeypad();
+ void findsource();
+ void clearendpal();
+ void findtext1();
+ void isryanholding();
+ void interupttest();
+ void usecashcard();
+ void usewall();
+ void opentomb();
+ void buttonfour();
+ void animpointer();
+ //void lockmon();
+ void dochange();
+ void getanyaddir();
+ void showsaveops();
+ void intromonks1();
+ void resetlocation();
+ void oldtonames();
+ void showdiscops();
+ void advisor();
+ void additionaltext();
+ //void kernchars();
+ void othersmoker();
+ void autosetwalk();
+ void setuptimedtemp();
+ void blocknametext();
+ void useelevator5();
+ void useelevator4();
+ void useelevator1();
+ void attendant();
+ void useelevator3();
+ void useelevator2();
+ void buttonone();
+ void keyboardread();
+ void deltextline();
+ void entercode();
+ void getopenedsize();
+ void getpersframe();
+ void doshake();
+ void resetkeyboard();
+ void showpanel();
+ void soundstartup();
+ void slabdoora();
+ void fadeupyellows();
+ void slabdoorc();
+ void slabdoorb();
+ void slabdoore();
+ void slabdoord();
+ void adjustup();
+ void readsetdata();
+ void loadintotemp();
+ void loadintroroom();
+ void saveseg();
+ void showblink();
+ void mousecall();
+ void train();
+ void watchcount();
+ void fadedownmon();
+ void loadcart();
+ void splitintolines();
+ void bartender();
+ void eden();
+ void showdiary();
+ void purgealocation();
+ void updatepeople();
+ void slabdoorf();
+ void addtopeoplelist();
+ void hangoncurs();
+ void sparkydrip();
+ //void modifychar();
+ void compare();
+ void printcurs();
+ //void convertkey();
+ void outofopen();
+ void dealwithspecial();
+ //void eraseoldobs();
+ void dircom();
+ //void liftsprite();
+ void dumpkeypad();
+ void dumpzoom();
+ void endgameseq();
+ //void cancelch0();
+ void setbotleft();
+ void findfirstpath();
+ void fadescreenup();
+ void loadold();
+ void loadtempcharset();
+ void useslab();
+ void aboutturn();
+ void usealtar();
+ void createpanel2();
+ void turnonpower();
+ void manasleep2();
+ void moretalk();
+ void printslow();
+ void loadroom();
+ void starttalk();
+ void delchar();
+ void getanyad();
+ void endgame();
+ void monprint();
+ void usepipe();
+ void startloading();
+ void getunderzoom();
+ void candles();
+ void backobject();
+ void rollendcredits2();
+ void reminders();
+ void selectslot2();
+ void runtap();
+ void domix();
+ void priesttext();
+ void paneltomap();
+ void obname();
+ void getridoftemp3();
+ void getridoftemp2();
+ void usebalcony();
+ void runendseq();
+ void dumpdiarykeys();
+ void disablesoundint();
+ void checkifset();
+ void showallex();
+ void showrain();
+ void openpoolboss();
+ void buttontwo();
+ void fillopen();
+ void delsprite();
+ void getroomspaths();
+ void dumptextline();
+ void fadescreendownhalf();
+ void useplate();
+ void candles1();
+ void lookininterface();
+ void manasleep();
+ void isitdescribed();
+ void hotelbell();
+ void loadspeech();
+ //void cls();
+ //void printsprites();
+ void checkifperson();
+ void showallobs();
+ void getnumber();
+ void adjustleft();
+ void calledenslift();
+ void useclearbox();
+ void entryanims();
+ void nextfolder();
+ void getfreead();
+ void showarrows();
+ void walkintoroom();
+ void getridoftemptext();
+ void printoutermon();
+ void setuppit();
+ void showpcx();
+ void showdecisions();
+ void checkspeed();
+ void printchar();
+ void showkeypad();
+ void obtoinv();
+ void removeobfrominv();
+ void usecoveredbox();
+ void openyourneighbour();
+ void fadescreenuphalf();
+ void getridoftempcharset();
+ void heavy();
+ void endpaltostart();
+ void showkeys();
+ void usekey();
+ void locklighton();
+ void useladderb();
+ //void spriteupdate();
+ void usetempcharset();
+ void discops();
+ void printdirect();
+ void delthisone();
+ void makebackob();
+ void middlepanel();
+ void dumpwatch();
+ void saveload();
+ void monitorlogo();
+ void loadposition();
+ void wornerror();
+ void entersymbol();
+ void showword();
+ void dirfile();
+ void setmode();
+ void walktotext();
+ void pickupconts();
+ void locklightoff();
+ void wearwatch();
+ void runintroseq();
+ void doblocks();
+ void showbyte();
+ void allpalette();
+ void findormake();
+ void nextsymbol();
+ void monks2text();
+ void poolguard();
+ void clearpalette();
+ void cantdrop();
+ void maptopanel();
+ void calcmapad();
+ void getridofall();
+ void copper();
+ void folderhints();
+ void openhoteldoor();
+ void removesetobject();
+ void dumptimedtext();
+ //void frameoutfx();
+ void blank();
+ void drinker();
+ void nextcolon();
+ void placefreeobject();
+ void delpointer();
+ void loopchannel0();
+ void initrain();
+ void showleftpage();
+ void rockstar();
+ void adjustright();
+ void putunderzoom();
+ void vsync();
+ void turnpathoff();
+ void findinvpos();
+ void usetext();
+ void hangonpq();
+ void liftnoise();
+ void workoutframes();
+ void getbackfromob();
+ void dumpsymbox();
+ void loadgame();
+ void getridoftemp();
+ void showcity();
+ void dumpsymbol();
+ void disablepath();
+ void buttonsix();
+ void intro2text();
+ void showouterpad();
+ void getkeyandlogo();
+ void selectob();
+ void checkcoords();
+ void dumpmenu();
+ void chewy();
+ void accesslighton();
+ void dosreturn();
+ void titles();
+ //void quickquit();
+ void showpointer();
+ void usecooker();
+ void loadmenu();
+ void checkforemm();
+ void checkifpathison();
+ void smallcandle();
+ void receptionist();
+ void selectslot();
+ void edenscdplayer();
+ //void readoneblock();
+ void fadeupmon();
+ void paltoendpal();
+ void fadetowhite();
+ void textformonk();
+ void loadsavebox();
+ void soundend();
+ void redes();
+ void errormessage1();
+ void clearchanges();
+ void errormessage3();
+ void deletetaken();
+ void putundermenu();
+ void checkifex();
+ void intromagic2();
+ void findobname();
+ void edeninbath();
+ void intromagic1();
+ void showdiarypage();
+ void useshield();
+ void getbacktoops();
+ void rollendcredits();
+ void intro1text();
+ void getmapad();
+ void playchannel1();
+ void playchannel0();
+ void usemon();
+ void steady();
+ void pixelcheckset();
+ void reexfrominv();
+ void fillspace();
+ void talk();
+ void usedryer();
+ void dumpeverything();
+ void usehatch();
+ void zoom();
+ void outofinv();
+ void viewfolder();
+ //void walking();
+ void diarykeyp();
+ //void readabyte();
+ //void showframe();
+ void random();
+ void obicons();
+ void mansatstill();
+ void channel1only();
+ void playguitar();
+ void lastfolder();
+ void transfermap();
+ void showreelframe();
+ void showmonk();
+ void diarykeyn();
+ void set16colpalette();
+ void sparky();
+ void interviewer();
+ void purgeanitem();
+ void madman();
+ void createpanel();
+ void turnpathon();
+ void showmainops();
+ void madmanstelly();
+ void constant();
+ void loadroomssample();
+ void getblockofpixel();
+ void paltostartpal();
+ void bossman();
+ void getridofpit();
+ void convnum();
+ void nothelderror();
+ void readheader();
+ void getsetad();
+ void getyad();
+ void reconstruct();
+ void soldier1();
+ void getundercentre();
+ void checkforexit();
+ void loadseg();
+ void makeheader();
+ void setkeyboardint();
+ void priest();
+ void readmouse();
+ void powerlighton();
+ void savefilewrite();
+ void printmessage2();
+ void loadnews();
+ void rollem();
+ void makeworn();
+ void examineobtext();
+ void startup();
+ void savegame();
+ void startpaltoend();
+ void showicon();
+ void findopenpos();
+ void describeob();
+ void deleteexframe();
+ void folderexit();
+ void useplinth();
+ void wheelsound();
+ void actualsave();
+ void autolook();
+ void checkbasemem();
+ void transfertext();
+ void searchforsame();
+ void enablesoundint();
+ void getback1();
+ void setlocation();
+ void fadefromwhite();
+ void checksoundint();
+ void usewindow();
+ void wearshades();
+ void onedigit();
+ void pitinterupt();
+ void deleverything();
+ void fadescreendown();
+ void findxyfrompath();
+ void namestoold();
+ void getxad();
+ void openinv();
+ void lookatplace();
+ void useaxe();
+ void examineob();
+ void buttonnought();
+ void useelvdoor();
+ void putbackobstuff();
+ void useladder();
+ void realcredits();
+ void handclap();
+ void smokebloke();
+ void showexit();
+ //void printundermon();
+ void buttonnine();
+ void findallopen();
+ void loadintotemp3();
+ void loadintotemp2();
+ void gamer();
+ void personnametext();
+ void quitsymbol();
+ void readfromfile();
+ void initialinv();
+ void showslots();
+ void dofade();
+ void hangon();
+ void settopright();
+ void findsetobject();
+ void singlekey();
+ //void seecommandtail();
+ void getundertimed();
+ void hangone();
+ void carparkdrip();
+ void usediary();
+ void deleteexobject();
+ //void frameoutnm();
+ void moneypoke();
+ void destselect();
+ void restoreems();
+ void lastdest();
+ void removefreeobject();
+ void trapdoor();
+ void openlouis();
+ void buttonthree();
+ void getundermenu();
+ //void randomnumber();
+ void lookatcard();
+ void helicopter();
+ void scrollmonitor();
+ void setsoundoff();
+ void setpickup();
+ void dropobject();
+ void printmessage();
+ void reexfromopen();
+ void fillryan();
+ void loadtemptext();
+ void usestereo();
+ void showcurrentfile();
+ void copyname();
+ void look();
+ void setmouse();
+ void checkone();
+ void transferinv();
+ void candles2();
+ void pickupob();
+ void error();
+ void showopbox();
+ //void cancelch1();
+ void clearbeforeload();
+ void biblequote();
+ void doload();
+ void afterintroroom();
+ void blockget();
+ void usetrainer();
+ void allocatework();
+ void addtopresslist();
+ void walkandexamine();
+ void dmaend();
+ //void quickquit2();
+ void twodigitnum();
+ void madmantext();
+ void dumpcurrent();
+ void textforend();
+ void showdiarykeys();
+ void dontloadseg();
+ void madmode();
+ void intro3text();
+ void allocatemem();
+ void sortoutmap();
+ void doorway();
+ void useopened();
+ void inventory();
+ void powerlightoff();
+ void getroomdata();
+ void showoutermenu();
+ void signon();
+ void deleteextext();
+ void foghornsound();
+ void showrightpage();
+ void openhoteldoor2();
+ void examicon();
+ void showgun();
+ void switchryanon();
+ void louischair();
+ void saveems();
+ void locationpic();
+ void getflagunderp();
+ void dolook();
+ void opentvdoor();
+ void triggermessage();
+ void finalframe();
+ void plotreel();
+ void swapwithopen();
+ //void makesprite();
+ void dreamweb();
+ void droperror();
+ void openfilenocheck();
+ void calledensdlift();
+ void checkinside();
+ void gates();
+ void selectlocation();
+ void showwatch();
+ void turnanypathon();
+ void restorereels();
+ void setwalk();
+ void printboth();
+ void useroutine();
+ void zoomicon();
+ void hotelcontrol();
+ void findpathofpoint();
+ void issetobonmap();
+ void getdestinfo();
+ void drunk();
+ void dumpblink();
+ void setuptimeduse();
+ void grafittidoor();
+ void input();
+ void nextdest();
+ void getdimension();
+ void makecaps();
+ void read();
+ void fadescreenups();
+ void checkdest();
+ //void initman();
+ void loadpalfromiff();
+ void facerightway();
+ void startup1();
+ void findlen();
+ void showsymbol();
+ void mugger();
+ void atmospheres();
+ void out22c();
+ void loadpersonal();
+ void gettingshot();
+ void settopleft();
+ void searchforstring();
+ //void clearsprites();
+ void obpicture();
+ void selectopenob();
+ void widedoor();
+ void security();
+ //void printasprite();
+ void buttonfive();
+ void soundonreels();
+ void usegun();
+ void autoappear();
+ void findnextcolon();
+ void readmouse4();
+ void openryan();
+ void readmouse1();
+ void showman();
+ void readmouse2();
+ void newplace();
+ void movemap();
+ void loadsample();
+ void usecardreader1();
+ void usecardreader2();
+ void usecardreader3();
+ void tattooman();
+ void usehandle();
+ void quitkey();
+ void openfile();
+ void usecharset1();
+ void makenextblock();
+ void showpuztext();
+ void addalong();
+ //void width160();
+ void incryanpage();
+ //void dodoor();
+ void greyscalesum();
+ void buttoneight();
+ void opensarters();
+ void findexobject();
+ void errormessage2();
+ void usechurchhole();
+ void searchforfiles();
+ void monkspeaking();
+ void fadecalculation();
+ void waitframes();
+ void clearrest();
+ void getreelframeax();
+ void barwoman();
+ void roomname();
+ void credits();
+ void madmanrun();
+ void randomnum1();
+ void keeper();
+ void afternewroom();
+ void getexad();
+ void aide();
+ void openforsave();
+ void closefile();
+ void delcurs();
+ void randomaccess();
+ void calcfrframe();
+ void intromagic3();
+ void initialmoncols();
+ void checkforshake();
+ void usebuttona();
+ void showallfree();
+ //void getnextword();
+ void generalerror();
+ void actualload();
+ void allocateload();
+ void saveposition();
+ void mode640x480();
+ void openeden();
+ void execcommand();
+ void obsthatdothings();
+ void updatesymbolbot();
+ void findpuztext();
+ void usechurchgate();
+ void monkandryan();
+ void allocatebuffers();
+ void convicons();
+ void swapwithinv();
+ void usecontrol();
+ void buttonseven();
+ void redrawmainscrn();
+ void finishedwalking();
+ void findallryan();
+ void lockeddoorway();
+ void channel0tran();
+ void buttonpress();
+ void parseblaster();
+ void callhotellift();
+ void makemainscreen();
+ void intromonks2();
+ void usewinch();
+ void setbotright();
+ void readmouse3();
+ void showfirstuse();
+ void setupemm();
+ void usefullcart();
+ void transfertoex();
+ void getlocation();
+ void geteitherad();
+ void placesetobject();
+ void drawflags();
+ void zoomonoff();
+ void updatesymboltop();
+ void showryanpage();
+ void printlogo();
+ void allpointer();
+ void showseconduse();
+ void clearreels();
+ void malefan();
+ void dosaveload();
+ void createname();
+ void readcitypic();
+ void getpersontext();
+ void intoinv();
+ void showtime();
+ void parser();
+ void hangonw();
+ void intro();
+ void hangonp();
+ void fadescreendowns();
+ void showloadops();
+ void getridoftempsp();
+ void scanfornames();
+ void setallchanges();
+ void newgame();
+ void examinventory();
+ void standardload();
+ void undertextline();
+ void findroominloc();
+ void sitdowninbar();
+ void shownames();
+ void savefileread();
+ void emergencypurge();
+ void usemenu();
+ void alleybarksound();
+ void dosometalk();
+ void usecart();
+ void intromusic();
+ void makename();
+ void processtrigger();
+ void monmessage();
+ void readdesticon();
+ void randomnum2();
+ void loadsecondsample();
+ void transfercontoex();
+ //void multiput();
+ void isitright();
+ void businessman();
+ void switchryanoff();
+ void commandwithob();
+ void panelicons1();
+ void adjustdown();
+ void withwhat();
+ void openob();
+ void createfile();
+ void userailing();
+ void accesslightoff();
+ void usehole();
+ void useobject();
+ void mainman();
+ void volumeadjust();
+ void checkiffree();
+};
+}
+
+#endif
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
new file mode 100644
index 0000000000..caf3a987c4
--- /dev/null
+++ b/engines/dreamweb/dreamweb.cpp
@@ -0,0 +1,648 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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/config-manager.h"
+#include "common/debug-channels.h"
+#include "common/events.h"
+#include "common/EventRecorder.h"
+#include "common/file.h"
+#include "common/func.h"
+#include "common/system.h"
+#include "common/timer.h"
+#include "common/util.h"
+
+#include "audio/mixer.h"
+#include "audio/decoders/raw.h"
+
+#include "graphics/palette.h"
+#include "graphics/surface.h"
+
+#include "dreamweb/dreamweb.h"
+#include "dreamweb/dreamgen.h"
+
+namespace DreamWeb {
+
+DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gameDesc) :
+ Engine(syst), _gameDescription(gameDesc), _rnd("dreamweb") {
+
+ _context.engine = this;
+ // Setup mixer
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
+
+ _vSyncInterrupt = false;
+
+ _console = 0;
+ DebugMan.addDebugChannel(kDebugAnimation, "Animation", "Animation Debug Flag");
+ DebugMan.addDebugChannel(kDebugSaveLoad, "SaveLoad", "Track Save/Load Function");
+ _outSaveFile = 0;
+ _inSaveFile = 0;
+ _speed = 1;
+ _turbo = false;
+ _oldMouseState = 0;
+ _channel0 = 0;
+ _channel1 = 0;
+
+ _language = gameDesc->desc.language;
+}
+
+DreamWebEngine::~DreamWebEngine() {
+ DebugMan.clearAllDebugChannels();
+ delete _console;
+}
+
+static void vSyncInterrupt(void *refCon) {
+ DreamWebEngine *vm = (DreamWebEngine *)refCon;
+
+ if (!vm->isPaused()) {
+ vm->setVSyncInterrupt(true);
+ }
+}
+
+void DreamWebEngine::setVSyncInterrupt(bool flag) {
+ _vSyncInterrupt = flag;
+}
+
+void DreamWebEngine::waitForVSync() {
+ processEvents();
+
+ if (!_turbo) {
+ while (!_vSyncInterrupt) {
+ _system->delayMillis(10);
+ }
+ setVSyncInterrupt(false);
+ }
+
+ _context.doshake();
+ _context.dofade();
+ _system->updateScreen();
+}
+
+void DreamWebEngine::quit() {
+ _context.data.byte(DreamGen::DreamGenContext::kQuitrequested) = 1;
+ _context.data.byte(DreamGen::DreamGenContext::kLasthardkey) = 1;
+}
+
+void DreamWebEngine::processEvents() {
+ Common::EventManager *event_manager = _system->getEventManager();
+ if (event_manager->shouldQuit()) {
+ quit();
+ return;
+ }
+
+ if (_enableSavingOrLoading && _loadSavefile >= 0 && _loadSavefile <= 6) {
+ debug(1, "loading save state %d", _loadSavefile);
+ _context.data.byte(_context.kCurrentslot) = _loadSavefile;
+ _loadSavefile = -1;
+ _context.loadposition();
+ _context.data.byte(_context.kGetback) = 1;
+ }
+
+ soundHandler();
+ Common::Event event;
+ int softKey, hardKey;
+ while (event_manager->pollEvent(event)) {
+ switch(event.type) {
+ case Common::EVENT_RTL:
+ quit();
+ break;
+ case Common::EVENT_KEYDOWN:
+ if (event.kbd.flags & Common::KBD_CTRL) {
+ switch (event.kbd.keycode) {
+
+ case Common::KEYCODE_d:
+ _console->attach();
+ _console->onFrame();
+ break;
+
+ case Common::KEYCODE_f:
+ setSpeed(_speed != 20? 20: 1);
+ break;
+
+ case Common::KEYCODE_g:
+ _turbo = !_turbo;
+ break;
+
+ case Common::KEYCODE_c: //skip statue puzzle
+ _context.data.byte(DreamGen::DreamGenContext::kSymbolbotnum) = 3;
+ _context.data.byte(DreamGen::DreamGenContext::kSymboltopnum) = 5;
+ break;
+
+ default:
+ break;
+ }
+
+ 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;
+
+ switch (event.kbd.keycode) {
+ case Common::KEYCODE_ESCAPE:
+ hardKey = 1;
+ break;
+ case Common::KEYCODE_SPACE:
+ hardKey = 57;
+ break;
+ default:
+ hardKey = 0;
+ break;
+ }
+
+ _context.data.byte(DreamGen::DreamGenContext::kLasthardkey) = 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
+ // keep weird glyphs out of savegame names.
+
+ 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)) {
+ 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';
+ } else if (event.kbd.keycode == Common::KEYCODE_KP_MINUS) {
+ softKey = '-';
+ } else if (event.kbd.keycode == Common::KEYCODE_BACKSPACE ||
+ event.kbd.keycode == Common::KEYCODE_DELETE) {
+ softKey = 8;
+ } else if (event.kbd.keycode == Common::KEYCODE_RETURN
+ || event.kbd.keycode == Common::KEYCODE_KP_ENTER) {
+ softKey = 13;
+ }
+
+ if (softKey)
+ keyPressed(softKey);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+
+Common::Error DreamWebEngine::run() {
+ syncSoundSettings();
+ _console = new DreamWebConsole(this);
+
+ if (ConfMan.hasKey("save_slot")) {
+ _enableSavingOrLoading = true;
+ _loadSavefile = ConfMan.getInt("save_slot");
+ } else {
+ _enableSavingOrLoading = false;
+ _loadSavefile = -1;
+ }
+
+ getTimerManager()->installTimerProc(vSyncInterrupt, 1000000 / 70, this);
+ _context.__start();
+ _context.data.byte(DreamGen::DreamGenContext::kQuitrequested) = 0;
+
+ getTimerManager()->removeTimerProc(vSyncInterrupt);
+
+ return Common::kNoError;
+}
+
+void DreamWebEngine::setSpeed(uint speed) {
+ debug(0, "setting speed %u", speed);
+ _speed = speed;
+ getTimerManager()->removeTimerProc(vSyncInterrupt);
+ getTimerManager()->installTimerProc(vSyncInterrupt, 1000000 / 70 / speed, this);
+}
+
+void DreamWebEngine::openFile(const Common::String &name) {
+ processEvents();
+ closeFile();
+ if (_file.open(name))
+ return;
+ _inSaveFile = _system->getSavefileManager()->openForLoading(name);
+ if (_inSaveFile)
+ return;
+ error("cannot open file %s", name.c_str());
+}
+
+uint32 DreamWebEngine::skipBytes(uint32 bytes) {
+ if (!_file.seek(bytes, SEEK_CUR))
+ error("seek failed");
+ return _file.pos();
+}
+
+uint32 DreamWebEngine::readFromFile(uint8 *dst, unsigned size) {
+ processEvents();
+ if (_file.isOpen())
+ return _file.read(dst, size);
+ if (_inSaveFile)
+ return _inSaveFile->read(dst, size);
+ error("file was not opened (read before open)");
+}
+
+void DreamWebEngine::closeFile() {
+ processEvents();
+ if (_file.isOpen())
+ _file.close();
+ delete _inSaveFile;
+ _inSaveFile = 0;
+ delete _outSaveFile;
+ _outSaveFile = 0;
+}
+
+void DreamWebEngine::openSaveFileForWriting(const Common::String &name) {
+ processEvents();
+ delete _outSaveFile;
+ _outSaveFile = _system->getSavefileManager()->openForSaving(name);
+}
+
+bool DreamWebEngine::openSaveFileForReading(const Common::String &name) {
+ processEvents();
+ delete _inSaveFile;
+ _inSaveFile = _system->getSavefileManager()->openForLoading(name);
+ return _inSaveFile != 0;
+}
+
+uint DreamWebEngine::writeToSaveFile(const uint8 *data, uint size) {
+ processEvents();
+ if (!_outSaveFile)
+ error("save file was not opened for writing");
+ return _outSaveFile->write(data, size);
+}
+
+uint DreamWebEngine::readFromSaveFile(uint8 *data, uint size) {
+ processEvents();
+ if (!_inSaveFile)
+ error("save file was not opened for reading");
+ return _inSaveFile->read(data, size);
+}
+
+
+void DreamWebEngine::keyPressed(uint16 ascii) {
+ debug(2, "key pressed = %04x", ascii);
+ uint8* keybuf = _context.data.ptr(5912, 16); //fixme: some hardcoded offsets are not added as consts
+ uint16 in = (_context.data.word(DreamGen::DreamGenContext::kBufferin) + 1) & 0x0f;
+ uint16 out = _context.data.word(DreamGen::DreamGenContext::kBufferout);
+ if (in == out) {
+ warning("keyboard buffer is full");
+ return;
+ }
+ _context.data.word(DreamGen::DreamGenContext::kBufferin) = in;
+ keybuf[in] = ascii;
+}
+
+void DreamWebEngine::mouseCall() {
+ processEvents();
+ Common::EventManager *eventMan = _system->getEventManager();
+ Common::Point pos = eventMan->getMousePos();
+ if (pos.x > 298)
+ pos.x = 298;
+ if (pos.x < 15)
+ pos.x = 15;
+ if (pos.y < 15)
+ pos.y = 15;
+ if (pos.y > 184)
+ pos.y = 184;
+ _context.cx = pos.x;
+ _context.dx = pos.y;
+
+ unsigned state = eventMan->getButtonState();
+ _context.bx = state == _oldMouseState? 0: state;
+ _oldMouseState = state;
+ _context.flags._c = false;
+}
+
+void DreamWebEngine::fadeDos() {
+ _context.ds = _context.es = _context.data.word(DreamGen::DreamGenContext::kBuffers);
+ return; //fixme later
+ waitForVSync();
+ //processEvents will be called from vsync
+ uint8 *dst = _context.es.ptr(DreamGen::DreamGenContext::kStartpal, 768);
+ 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
+ if (dst[c]) {
+ --dst[c];
+ }
+ }
+ setPalette(dst, 0, 64);
+ waitForVSync();
+ }
+}
+
+void DreamWebEngine::setPalette() {
+ processEvents();
+ unsigned n = (uint16)_context.cx;
+ uint8 *src = _context.ds.ptr(_context.si, n * 3);
+ setPalette(src, _context.al, n);
+ _context.si += n * 3;
+ _context.cx = 0;
+}
+
+void DreamWebEngine::getPalette(uint8 *data, uint start, uint count) {
+ _system->getPaletteManager()->grabPalette(data, start, count);
+ while(count--)
+ *data++ >>= 2;
+}
+
+void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) {
+ assert(start + count <= 256);
+ uint8 fixed[768];
+ for(uint i = 0; i < count * 3; ++i) {
+ fixed[i] = data[i] << 2;
+ }
+ _system->getPaletteManager()->setPalette(fixed, start, 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 (h <= 0 || w <= 0)
+ return;
+ _system->copyRectToScreen(src, pitch, x, y, w, h);
+}
+
+void DreamWebEngine::printUnderMonitor() {
+ _context.es = _context.data.word(DreamGen::DreamGenContext::kWorkspace);
+ _context.di = DreamGen::DreamGenContext::kScreenwidth * 43 + 76;
+ _context.si = _context.di + 8 * DreamGen::DreamGenContext::kScreenwidth;
+
+ Graphics::Surface *s = _system->lockScreen();
+ if (!s)
+ error("lockScreen failed");
+
+ for(uint y = 0; y < 104; ++y) {
+ uint8 *src = (uint8 *)s->getBasePtr(76, 43 + 8 + y);
+ uint8 *dst = _context.es.ptr(_context.di, 170);
+ for(uint x = 0; x < 170; ++x) {
+ if (*src < 231)
+ *dst++ = *src++;
+ else {
+ ++dst; ++src;
+ }
+ }
+ _context._add(_context.di, DreamGen::DreamGenContext::kScreenwidth);
+ _context._add(_context.si, DreamGen::DreamGenContext::kScreenwidth);
+ }
+ _context.cx = 0;
+ _system->unlockScreen();
+}
+
+void DreamWebEngine::cls() {
+ _system->fillScreen(0);
+}
+
+void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) {
+ debug(1, "playSound(%u, %u, %u)", channel, id, loops);
+
+ int bank = 0;
+ bool speech = false;
+ Audio::Mixer::SoundType type = channel == 0?
+ Audio::Mixer::kMusicSoundType: Audio::Mixer::kSFXSoundType;
+
+ if (id >= 12) {
+ id -= 12;
+ bank = 1;
+ if (id == 50) {
+ speech = true;
+ type = Audio::Mixer::kSpeechSoundType;
+ }
+ }
+ const SoundData &data = _soundData[bank];
+
+ Audio::SeekableAudioStream *raw;
+ if (!speech) {
+ if (id >= data.samples.size() || data.samples[id].size == 0) {
+ warning("invalid sample #%u played", id);
+ return;
+ }
+
+ const Sample &sample = data.samples[id];
+ uint8 *buffer = (uint8 *)malloc(sample.size);
+ if (!buffer)
+ error("out of memory: cannot allocate memory for sound(%u bytes)", sample.size);
+ memcpy(buffer, data.data.begin() + sample.offset, sample.size);
+
+ raw = Audio::makeRawStream(
+ buffer,
+ sample.size, 22050, Audio::FLAG_UNSIGNED);
+ } else {
+ uint8 *buffer = (uint8 *)malloc(_speechData.size());
+ memcpy(buffer, _speechData.begin(), _speechData.size());
+ if (!buffer)
+ error("out of memory: cannot allocate memory for sound(%u bytes)", _speechData.size());
+ raw = Audio::makeRawStream(
+ buffer,
+ _speechData.size(), 22050, Audio::FLAG_UNSIGNED);
+
+ }
+
+ Audio::AudioStream *stream;
+ if (loops > 1) {
+ stream = new Audio::LoopingAudioStream(raw, loops < 255? loops: 0);
+ } else
+ stream = raw;
+
+ if (_mixer->isSoundHandleActive(_channelHandle[channel]))
+ _mixer->stopHandle(_channelHandle[channel]);
+ _mixer->playStream(type, &_channelHandle[channel], stream);
+}
+
+void DreamWebEngine::stopSound(uint8 channel) {
+ debug(1, "stopSound(%u)", channel);
+ assert(channel == 0 || channel == 1);
+ _mixer->stopHandle(_channelHandle[channel]);
+ if (channel == 0)
+ _channel0 = 0;
+ else
+ _channel1 = 0;
+}
+
+bool DreamWebEngine::loadSpeech(const Common::String &filename) {
+ if (ConfMan.getBool("speech_mute"))
+ return false;
+
+ Common::File file;
+ if (!file.open("speech/" + filename))
+ return false;
+
+ debug(1, "loadSpeech(%s)", filename.c_str());
+
+ uint size = file.size();
+ _speechData.resize(size);
+ file.read(_speechData.begin(), size);
+ file.close();
+ return true;
+}
+
+
+void DreamWebEngine::soundHandler() {
+ _context.data.byte(_context.kSubtitles) = ConfMan.getBool("subtitles");
+ _context.push(_context.ax);
+ _context.volumeadjust();
+ _context.ax = _context.pop();
+
+ uint volume = _context.data.byte(DreamGen::DreamGenContext::kVolume);
+ //.vol file loaded into soundbuf:0x4000
+ //volume table at (volume * 0x100 + 0x3f00)
+ //volume value could be from 1 to 7
+ //1 - 0x10-0xff
+ //2 - 0x1f-0xdf
+ //3 - 0x2f-0xd0
+ //4 - 0x3e-0xc1
+ //5 - 0x4d-0xb2
+ //6 - 0x5d-0xa2
+ //7 - 0x6f-0x91
+ if (volume >= 8)
+ volume = 7;
+ volume = (8 - volume) * Audio::Mixer::kMaxChannelVolume / 8;
+ _mixer->setChannelVolume(_channelHandle[0], volume);
+
+ uint8 ch0 = _context.data.byte(DreamGen::DreamGenContext::kCh0playing);
+ if (ch0 == 255)
+ ch0 = 0;
+ uint8 ch1 = _context.data.byte(DreamGen::DreamGenContext::kCh1playing);
+ if (ch1 == 255)
+ ch1 = 0;
+ uint8 ch0loop = _context.data.byte(DreamGen::DreamGenContext::kCh0repeat);
+
+ if (_channel0 != ch0) {
+ _channel0 = ch0;
+ if (ch0) {
+ playSound(0, ch0, ch0loop);
+ }
+ }
+ if (_channel1 != ch1) {
+ _channel1 = ch1;
+ if (ch1) {
+ playSound(1, ch1, 1);
+ }
+ }
+ if (!_mixer->isSoundHandleActive(_channelHandle[0])) {
+ _context.data.byte(DreamGen::DreamGenContext::kCh0playing) = 255;
+ _channel0 = 0;
+ }
+ if (!_mixer->isSoundHandleActive(_channelHandle[1])) {
+ _context.data.byte(DreamGen::DreamGenContext::kCh1playing) = 255;
+ _channel1 = 0;
+ }
+
+}
+
+void DreamWebEngine::loadSounds(uint bank, const Common::String &filename) {
+ debug(1, "loadSounds(%u, %s)", bank, filename.c_str());
+ Common::File file;
+ if (!file.open(filename)) {
+ warning("cannot open %s", filename.c_str());
+ return;
+ }
+
+ uint8 header[0x60];
+ file.read(header, sizeof(header));
+ uint tablesize = READ_LE_UINT16(header + 0x32);
+ debug(1, "table size = %u", tablesize);
+
+ SoundData &soundData = _soundData[bank];
+ soundData.samples.resize(tablesize / 6);
+ uint total = 0;
+ for(uint i = 0; i < tablesize / 6; ++i) {
+ uint8 entry[6];
+ Sample &sample = soundData.samples[i];
+ file.read(entry, sizeof(entry));
+ sample.offset = entry[0] * 0x4000 + READ_LE_UINT16(entry + 1);
+ sample.size = READ_LE_UINT16(entry + 3) * 0x800;
+ total += sample.size;
+ debug(1, "offset: %08x, size: %u", sample.offset, sample.size);
+ }
+ soundData.data.resize(total);
+ file.read(soundData.data.begin(), total);
+ file.close();
+}
+
+uint8 DreamWebEngine::modifyChar(uint8 c) const {
+ if (c < 128)
+ return c;
+
+ switch(_language) {
+ case Common::DE_DEU:
+ switch(c)
+ {
+ case 129:
+ return 'Z' + 3;
+ case 132:
+ return 'Z' + 1;
+ case 142:
+ return 'Z' + 4;
+ case 154:
+ return 'Z' + 6;
+ case 225:
+ return 'A' - 1;
+ case 153:
+ return 'Z' + 5;
+ case 148:
+ return 'Z' + 2;
+ default:
+ return c;
+ }
+ case Common::ES_ESP:
+ switch(c) {
+ case 160:
+ return 'Z' + 1;
+ case 130:
+ return 'Z' + 2;
+ case 161:
+ return 'Z' + 3;
+ case 162:
+ return 'Z' + 4;
+ case 163:
+ return 'Z' + 5;
+ case 164:
+ return 'Z' + 6;
+ case 165:
+ return ',' - 1;
+ case 168:
+ return 'A' - 1;
+ case 173:
+ return 'A' - 4;
+ case 129:
+ return 'A' - 5;
+ default:
+ return c;
+ }
+ default:
+ return c;
+ }
+}
+
+} // End of namespace DreamWeb
+
+
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
new file mode 100644
index 0000000000..6ada207496
--- /dev/null
+++ b/engines/dreamweb/dreamweb.h
@@ -0,0 +1,157 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 DREAMWEB_H
+#define DREAMWEB_H
+
+#include "common/error.h"
+#include "common/file.h"
+#include "common/random.h"
+#include "common/rect.h"
+#include "common/savefile.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
+
+#include "engines/advancedDetector.h"
+#include "engines/engine.h"
+
+#include "dreamweb/dreamgen.h"
+#include "dreamweb/console.h"
+
+namespace DreamWeb {
+
+// Engine Debug Flags
+enum {
+ kDebugAnimation = (1 << 0),
+ kDebugSaveLoad = (1 << 1)
+};
+
+struct DreamWebGameDescription {
+ ADGameDescription desc;
+};
+
+class DreamWebEngine : public Engine {
+private:
+ DreamWebConsole *_console;
+ bool _vSyncInterrupt;
+
+protected:
+ // Engine APIs
+ virtual Common::Error run();
+ virtual bool hasFeature(EngineFeature f) const;
+
+public:
+ DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gameDesc);
+ virtual ~DreamWebEngine();
+
+ void setVSyncInterrupt(bool flag);
+ void waitForVSync();
+
+ Common::Error loadGameState(int slot);
+ Common::Error saveGameState(int slot, const Common::String &desc);
+
+ bool canLoadGameStateCurrently();
+ bool canSaveGameStateCurrently();
+
+ uint8 randomNumber() { return _rnd.getRandomNumber(255); }
+
+ void openFile(const Common::String &name);
+ uint32 readFromFile(uint8 *data, unsigned size);
+ uint32 skipBytes(uint32 bytes);
+ void closeFile();
+
+ void mouseCall(); //fill mouse pos and button state
+ void processEvents();
+ void setPalette();
+ void fadeDos();
+ void blit(const uint8 *src, int pitch, int x, int y, int w, int h);
+ void cls();
+
+ void getPalette(uint8 *data, uint start, uint count);
+ void setPalette(const uint8 *data, uint start, uint count);
+
+ void openSaveFileForWriting(const Common::String &name);
+ uint writeToSaveFile(const uint8 *data, uint size);
+
+ bool openSaveFileForReading(const Common::String &name);
+ uint readFromSaveFile(uint8 *data, uint size);
+
+ void setShakePos(int pos) { _system->setShakePos(pos); }
+ void printUnderMonitor();
+
+ void quit();
+
+ void loadSounds(uint bank, const Common::String &file);
+ bool loadSpeech(const Common::String &filename);
+
+ void enableSavingOrLoading(bool enable = true) { _enableSavingOrLoading = enable; }
+
+ Common::Language getLanguage() const { return _language; }
+ uint8 modifyChar(uint8 c) const;
+
+ void stopSound(uint8 channel);
+
+private:
+ void keyPressed(uint16 ascii);
+ void setSpeed(uint speed);
+ void soundHandler();
+ void playSound(uint8 channel, uint8 id, uint8 loops);
+
+ const DreamWebGameDescription *_gameDescription;
+ Common::RandomSource _rnd;
+
+ Common::File _file;
+ Common::OutSaveFile *_outSaveFile;
+ Common::InSaveFile *_inSaveFile;
+
+ uint _speed;
+ bool _turbo;
+ uint _oldMouseState;
+ int _loadSavefile;
+ bool _enableSavingOrLoading;
+ Common::Language _language;
+
+ struct Sample {
+ uint offset;
+ uint size;
+ Sample(): offset(), size() {}
+ };
+
+ struct SoundData {
+ Common::Array<Sample> samples;
+ Common::Array<uint8> data;
+ };
+ SoundData _soundData[2];
+ Common::Array<uint8> _speechData;
+
+ Audio::SoundHandle _channelHandle[2];
+ uint8 _channel0, _channel1;
+
+ DreamGen::DreamGenContext _context;
+};
+
+} // End of namespace DreamWeb
+
+#endif
diff --git a/engines/dreamweb/module.mk b/engines/dreamweb/module.mk
new file mode 100644
index 0000000000..3b0c7f3325
--- /dev/null
+++ b/engines/dreamweb/module.mk
@@ -0,0 +1,16 @@
+MODULE := engines/dreamweb
+
+MODULE_OBJS := \
+ console.o \
+ detection.o \
+ dreamweb.o \
+ dreamgen.o \
+ stubs.o
+
+# This module can be built as a plugin
+ifeq ($(ENABLE_DREAMWEB), DYNAMIC_PLUGIN)
+PLUGIN := 1
+endif
+
+# Include common rules
+include $(srcdir)/rules.mk
diff --git a/engines/dreamweb/runtime.h b/engines/dreamweb/runtime.h
new file mode 100644
index 0000000000..decd1cddd8
--- /dev/null
+++ b/engines/dreamweb/runtime.h
@@ -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.
+ *
+ */
+
+#ifndef DREAMGEN_RUNTIME_H__
+#define DREAMGEN_RUNTIME_H__
+
+#include <assert.h>
+#include "common/scummsys.h"
+#include "common/array.h"
+#include "common/debug.h"
+#include "common/hashmap.h"
+#include "common/list.h"
+#include "common/ptr.h"
+
+namespace DreamWeb {
+ class DreamWebEngine;
+}
+
+namespace DreamGen {
+
+//fixme: name clash
+#undef random
+
+struct Register {
+ union {
+ uint16 _value;
+ uint8 _part[2];
+ };
+ inline Register(): _value() {}
+ inline Register& operator=(uint16 v) { _value = v; return *this; }
+ inline operator uint16&() { return _value; }
+ inline void cbw() {
+ if (_value & 0x80)
+ _value |= 0xff00;
+ else
+ _value &= 0x7f;
+ }
+};
+
+template<int kIndex> //from low to high
+struct RegisterPart {
+ uint8 &_value;
+
+ explicit inline RegisterPart(Register &reg) : _value(reg._part[kIndex]) {}
+
+ inline operator uint8&() {
+ return _value;
+ }
+
+ inline RegisterPart& operator=(const RegisterPart& o) {
+ _value = o._value;
+ return *this;
+ }
+
+ inline RegisterPart& operator=(uint8 v) {
+ _value = v;
+ return *this;
+ }
+};
+
+#ifdef SCUMM_LITTLE_ENDIAN
+ typedef RegisterPart<0> LowPartOfRegister;
+ typedef RegisterPart<1> HighPartOfRegister;
+#else
+ typedef RegisterPart<1> LowPartOfRegister;
+ typedef RegisterPart<0> HighPartOfRegister;
+#endif
+
+class WordRef {
+ uint8 *_data;
+ unsigned _index;
+ uint16 _value;
+
+public:
+ inline WordRef(Common::Array<uint8> &data, unsigned index) : _data(data.begin() + index), _index(index) {
+ assert(index + 1 < data.size());
+ _value = _data[0] | (_data[1] << 8);
+ }
+
+ inline WordRef& operator=(const WordRef &ref) {
+ _value = ref._value;
+ return *this;
+ }
+
+ inline WordRef& operator=(uint16 v) {
+ _value = v;
+ return *this;
+ }
+
+ inline operator uint16&() {
+ return _value;
+ }
+
+ inline ~WordRef() {
+ _data[0] = _value & 0xff;
+ _data[1] = _value >> 8;
+ _value = _data[0] | (_data[1] << 8);
+ }
+};
+
+struct Segment {
+ Common::Array<uint8> data;
+
+ inline void assign(const uint8 *b, const uint8 *e) {
+ data.assign(b, e);
+ }
+
+ inline uint8 &byte(unsigned index) {
+ assert(index < data.size());
+ return data[index];
+ }
+
+ inline WordRef word(unsigned index) {
+ return WordRef(data, index);
+ }
+
+ inline uint8* ptr(unsigned index, unsigned size) {
+ assert(index + size <= data.size());
+ return data.begin() + index;
+ }
+};
+
+typedef Common::SharedPtr<Segment> SegmentPtr;
+
+class Context;
+
+class SegmentRef {
+ Context *_context;
+ uint16 _value;
+ SegmentPtr _segment;
+
+public:
+ SegmentRef(Context *ctx, uint16 value = 0, SegmentPtr segment = SegmentPtr()): _context(ctx), _value(value), _segment(segment) {
+ }
+
+ inline void reset(uint16 value);
+
+ inline SegmentRef& operator=(const uint16 id) {
+ reset(id);
+ return *this;
+ }
+
+ inline SegmentRef& operator=(const SegmentRef &ref) {
+ _context = ref._context;
+ _value = ref._value;
+ _segment = ref._segment;
+ return *this;
+ }
+
+ inline uint8 &byte(unsigned index) {
+ assert(_segment != 0);
+ return _segment->byte(index);
+ }
+
+ inline operator uint16() const {
+ return _value;
+ }
+
+ inline WordRef word(unsigned index) {
+ //debug(1, "getting word ref for %04x:%d", _value, index);
+ assert(_segment != 0);
+ return _segment->word(index);
+ }
+
+ inline void assign(const uint8 *b, const uint8 *e) {
+ assert(_segment != 0);
+ _segment->assign(b, e);
+ }
+
+ inline uint8* ptr(unsigned index, unsigned size) {
+ assert(_segment != 0);
+ return _segment->ptr(index, size);
+ }
+};
+
+struct Flags {
+ bool _z, _c, _s, _o;
+ inline Flags(): _z(true), _c(false), _s(false), _o(false) {}
+
+ inline bool z() const { return _z; }
+ inline bool c() const { return _c; }
+ inline bool s() const { return _s; }
+
+ inline bool l() const { return _o != _s; }
+ inline bool le() const { return _o != _s|| _z; }
+
+ inline void update_zs(uint8 v) {
+ _s = v & 0x80;
+ _z = v == 0;
+ }
+
+ inline void update_zs(uint16 v) {
+ _s = v & 0x8000;
+ _z = v == 0;
+ }
+
+ inline void update_o(uint8 v, uint8 a, uint8 b) {
+ uint8 s1 = a & 0x80, s2 = b & 0x80;
+ _o = (s1 == s2) && (v & 0x80) != s1;
+ }
+
+ inline void update_o(uint16 v, uint16 a, uint16 b) {
+ uint16 s1 = a & 0x8000, s2 = b & 0x8000;
+ _o = (s1 == s2) && (v & 0x8000) != s1;
+ }
+};
+
+class Context {
+ typedef Common::HashMap<uint16, SegmentPtr> SegmentMap;
+ SegmentMap _segments;
+
+ typedef Common::List<uint16> FreeSegmentList;
+ FreeSegmentList _freeSegments;
+
+public:
+ DreamWeb::DreamWebEngine *engine;
+
+ enum { kDefaultDataSegment = 0x1000 };
+
+ Register ax, dx, bx, cx, si, di;
+ LowPartOfRegister al;
+ HighPartOfRegister ah;
+ LowPartOfRegister bl;
+ HighPartOfRegister bh;
+ LowPartOfRegister cl;
+ HighPartOfRegister ch;
+ LowPartOfRegister dl;
+ HighPartOfRegister dh;
+
+ SegmentRef cs, ds, es, data;
+ //data == fake segment register always pointing to data segment
+ Flags flags;
+
+ inline Context(): engine(0), al(ax), ah(ax), bl(bx), bh(bx), cl(cx), ch(cx), dl(dx), dh(dx),
+ cs(this), ds(this), es(this), data(this) {
+ _segments[kDefaultDataSegment] = SegmentPtr(new Segment());
+ cs.reset(kDefaultDataSegment);
+ ds.reset(kDefaultDataSegment);
+ es.reset(kDefaultDataSegment);
+ data.reset(kDefaultDataSegment);
+ }
+
+ SegmentRef getSegment(uint16 value) {
+ SegmentMap::iterator i = _segments.find(value);
+ assert(i != _segments.end());
+ return SegmentRef(this, value, i->_value);
+ }
+
+ SegmentRef allocateSegment(uint size) {
+ unsigned id;
+ if (_freeSegments.empty())
+ id = kDefaultDataSegment + _segments.size();
+ else {
+ id = _freeSegments.front();
+ _freeSegments.pop_front();
+ }
+ assert(!_segments.contains(id));
+ SegmentPtr seg(new Segment());
+ seg->data.resize(size);
+ _segments[id] = seg;
+ return SegmentRef(this, id, seg);
+ }
+
+ void deallocateSegment(uint16 id) {
+ SegmentMap::iterator i = _segments.find(id);
+ assert(i != _segments.end());
+ _segments.erase(i);
+ _freeSegments.push_back(id);
+ }
+
+ inline void _cmp(uint8 a, uint8 b) {
+ _sub(a, b);
+ }
+
+ inline void _cmp(uint16 a, uint16 b) {
+ _sub(a, b);
+ }
+
+ inline void _test(uint8 a, uint8 b) {
+ _and(a, b);
+ }
+
+ inline void _test(uint16 a, uint16 b) {
+ _and(a, b);
+ }
+
+ inline void _add(uint8 &dst, uint8 src) {
+ unsigned r = (unsigned)dst + src;
+ flags.update_o((uint8)r, dst, src);
+ flags._c = r >= 0x100;
+ dst = r;
+ flags.update_zs(dst);
+ }
+
+ inline void _add(uint16 &dst, uint16 src) {
+ unsigned r = (unsigned)dst + src;
+ flags.update_o((uint16)r, dst, src);
+ flags._c = r >= 0x10000;
+ dst = r;
+ flags.update_zs(dst);
+ }
+
+ inline void _sub(uint8 &dst, uint8 src) {
+ flags.update_o(uint8(dst - src), dst, (uint8)-src);
+ flags._c = dst < src;
+ dst -= src;
+ flags.update_zs(dst);
+ }
+
+ inline void _sub(uint16 &dst, uint16 src) {
+ flags.update_o(uint16(dst - src), dst, (uint16)-src);
+ flags._c = dst < src;
+ dst -= src;
+ flags.update_zs(dst);
+ }
+
+ inline void _inc(uint8 &dst) {
+ flags.update_o((uint8)(dst + 1), dst, 1);
+ ++dst;
+ flags.update_zs(dst);
+ }
+
+ inline void _inc(uint16 &dst) {
+ flags.update_o((uint16)(dst + 1), dst, 1);
+ ++dst;
+ flags.update_zs(dst);
+ }
+
+ inline void _dec(uint8 &dst) {
+ flags.update_o(uint8(dst - 1), dst, 1);
+ --dst;
+ flags.update_zs(dst);
+ }
+
+ inline void _dec(uint16 &dst) {
+ flags.update_o(uint16(dst - 1), dst, 1);
+ --dst;
+ flags.update_zs(dst);
+ }
+
+ inline void _and(uint8 &dst, uint8 src) {
+ dst &= src;
+ flags.update_zs(dst);
+ flags._c = flags._o = false;
+ }
+
+ inline void _and(uint16 &dst, uint16 src) {
+ dst &= src;
+ flags.update_zs(dst);
+ flags._c = flags._o = false;
+ }
+
+ inline void _or(uint8 &dst, uint8 src) {
+ dst |= src;
+ flags.update_zs(dst);
+ flags._c = flags._o = false;
+ }
+
+ inline void _or(uint16 &dst, uint16 src) {
+ dst |= src;
+ flags.update_zs(dst);
+ flags._c = flags._o = false;
+ }
+
+ inline void _xor(uint8 &dst, uint8 src) {
+ dst ^= src;
+ flags.update_zs(dst);
+ flags._c = flags._o = false;
+ }
+
+ inline void _xor(uint16 &dst, uint16 src) {
+ dst ^= src;
+ flags.update_zs(dst);
+ flags._c = flags._o = false;
+ }
+
+ inline void _shr(uint8 &dst, uint8 src) {
+ src &= 0x1f;
+ if (src > 0) {
+ dst >>= (src - 1);
+ flags._c = dst & 1;
+ dst >>= 1;
+ flags.update_zs(dst);
+ }
+ if (src == 1)
+ flags._o = dst & 0x80;
+ }
+
+ inline void _shr(uint16 &dst, uint8 src) {
+ src &= 0x1f;
+ if (src > 0) {
+ dst >>= (src - 1);
+ flags._c = dst & 1;
+ dst >>= 1;
+ flags.update_zs(dst);
+ }
+ if (src == 1)
+ flags._o = dst & 0x8000;
+ }
+
+ inline void _shl(uint8 &dst, uint8 src) {
+ src &= 0x1f;
+ if (src > 0) {
+ dst <<= (src - 1);
+ flags._c = dst & 0x80;
+ dst <<= 1;
+ flags.update_zs(dst);
+ }
+ if (src == 1)
+ flags._o = ((dst & 0x80) != 0) == flags._c;
+ }
+ inline void _shl(uint16 &dst, uint8 src) {
+ src &= 0x1f;
+ if (src > 0) {
+ dst <<= (src - 1);
+ flags._c = dst & 0x8000;
+ dst <<= 1;
+ flags.update_zs(dst);
+ }
+ if (src == 1)
+ flags._o = ((dst & 0x8000) != 0) == flags._c;
+ }
+
+ inline void _mul(uint8 src) {
+ unsigned r = unsigned(al) * src;
+ ax = (uint16)r;
+ flags._c = r >= 0x10000;
+ flags._z = r == 0;
+ flags._s = r & 0x8000;
+ flags._o = ah != 0;
+ }
+
+ inline void _mul(uint16 src) {
+ unsigned r = unsigned(ax) * src; //assuming here that we have at least 32 bits
+ dx = (r >> 16) & 0xffff;
+ ax = r & 0xffff;
+ flags._c = false;
+ flags._z = r == 0;
+ flags._s = r & 0x80000000;
+ flags._o = dx != 0;
+ }
+
+ inline void _neg(uint8 &src) {
+ uint8 r = 0;
+ _sub(r, src);
+ src = r;
+ }
+
+ inline void _neg(uint16 &src) {
+ uint16 r = 0;
+ _sub(r, src);
+ src = r;
+ }
+
+ inline void _lodsb() {
+ al = ds.byte(si++);
+ }
+
+ inline void _lodsw() {
+ ax = ds.word(si);
+ si += 2;
+ }
+
+ inline void _movsb() {
+ es.byte(di++) = ds.byte(si++);
+ }
+
+ inline void _movsb(uint size, bool clear_cx = false) {
+ assert(size != 0xffff);
+ //fixme: add overlap and segment boundary check and rewrite
+ while(size--)
+ _movsb();
+ if (clear_cx)
+ cx = 0;
+ }
+
+ inline void _movsw() {
+ _movsb();
+ _movsb();
+ }
+
+ inline void _movsw(uint size, bool clear_cx = false) {
+ assert(size != 0xffff);
+ _movsb(size * 2, clear_cx);
+ }
+
+ inline void _stosb() {
+ es.byte(di++) = al;
+ }
+
+ inline void _stosb(uint size, bool clear_cx = false) {
+ assert(size != 0xffff);
+ uint8 *dst = es.ptr(di, size);
+ memset(dst, al, size);
+ di += size;
+ if (clear_cx)
+ cx = 0;
+ }
+
+ inline void _stosw() {
+ es.byte(di++) = al;
+ es.byte(di++) = ah;
+ }
+
+ inline void _stosw(uint size, bool clear_cx = false) {
+ assert(size != 0xffff);
+ uint8 *dst = es.ptr(di, size * 2);
+ di += 2 * size;
+ while(size--) {
+ *dst++ = al;
+ *dst++ = ah;
+ }
+ if (clear_cx)
+ cx = 0;
+ }
+
+ inline void _xchg(uint16 &a, uint16 &b) {
+ uint16 x = a;
+ a = b;
+ b = x;
+ }
+
+ inline void _xchg(uint8 &a, uint8 &b) {
+ uint8 t = a;
+ a = b;
+ b = t;
+ }
+
+ Common::Array<uint16> stack;
+ inline void push(uint16 v) {
+ stack.push_back(v);
+ }
+
+ inline uint16 pop() {
+ assert(!stack.empty());
+ uint16 v = stack.back();
+ stack.pop_back();
+ return v;
+ }
+};
+
+inline void SegmentRef::reset(uint16 value) {
+ *this = _context->getSegment(value);
+}
+
+class StackChecker {
+ const Context &_context;
+ const uint _stackDepth;
+
+public:
+ StackChecker(const Context &context): _context(context), _stackDepth(context.stack.size()) {}
+ ~StackChecker() { assert(_context.stack.size() == _stackDepth); }
+};
+
+#ifndef NDEBUG
+# define STACK_CHECK StackChecker checker(*this)
+#else
+# define STACK_CHECK do {} while (0)
+#endif
+
+}
+
+#endif
+
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
new file mode 100644
index 0000000000..e274375cf4
--- /dev/null
+++ b/engines/dreamweb/structs.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.
+ *
+ */
+
+struct Sprite {
+ uint16 updateCallback;
+ uint16 w2;
+ uint16 w4;
+ uint16 w6;
+ uint16 w8;
+ uint8 x;
+ uint8 y;
+ uint16 w12;
+ uint8 b14;
+ uint8 b15;
+ uint16 w16;
+ uint8 delay;
+ uint8 frame;
+ uint16 obj_data;
+ uint8 b22;
+ uint8 priority;
+ uint16 w24;
+ uint16 w26;
+ uint8 b28;
+ uint8 b29;
+ uint8 type;
+ uint8 hidden;
+};
+
+struct ObjData {
+ uint8 b0;
+ uint8 b1;
+ uint8 b2;
+ uint8 b3;
+ uint8 b4;
+ uint8 b5;
+ uint8 b6;
+ uint8 delay;
+ uint8 type;
+ uint8 b9;
+ uint8 b10;
+ uint8 b11;
+ uint8 b12;
+ uint8 b13;
+ uint8 b14;
+ uint8 b15;
+ uint8 b16;
+ uint8 b17;
+ uint8 b18[256]; // NB: Don't know the size yet
+};
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
new file mode 100644
index 0000000000..54685a018a
--- /dev/null
+++ b/engines/dreamweb/stubs.cpp
@@ -0,0 +1,1258 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "dreamweb/dreamweb.h"
+#include "engines/util.h"
+#include "graphics/surface.h"
+
+namespace DreamGen {
+
+Common::String getFilename(Context &context) {
+ uint16 name_ptr = context.dx;
+ Common::String name;
+ uint8 c;
+ while((c = context.cs.byte(name_ptr++)) != 0)
+ name += (char)c;
+ return name;
+}
+
+void DreamGenContext::multiget() {
+ unsigned w = (uint8)cl, h = (uint8)ch;
+ unsigned x = (uint16)di, y = (uint16)bx;
+ unsigned src = x + y * kScreenwidth;
+ unsigned dst = (uint16)si;
+ es = ds;
+ ds = data.word(kWorkspace);
+ 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);
+ for(unsigned l = 0; l < h; ++l) {
+ uint8 *src_p = ds.ptr(src + kScreenwidth * l, w);
+ uint8 *dst_p = es.ptr(dst + w * l, w);
+ memcpy(dst_p, src_p, w);
+ }
+ si += w * h;
+ di = src + kScreenwidth * h;
+ cx = 0;
+}
+
+void DreamGenContext::multiput() {
+ unsigned w = (uint8)cl, h = (uint8)ch;
+ unsigned x = (uint16)di, y = (uint16)bx;
+ unsigned src = (uint16)si;
+ unsigned dst = x + y * kScreenwidth;
+ es = data.word(kWorkspace);
+ 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);
+ for(unsigned l = 0; l < h; ++l) {
+ uint8 *src_p = ds.ptr(src + w * l, w);
+ uint8 *dst_p = es.ptr(dst + kScreenwidth * l, w);
+ memcpy(dst_p, src_p, w);
+ }
+ si += w * h;
+ di = dst + kScreenwidth * h;
+ cx = 0;
+}
+
+void DreamGenContext::multidump() {
+ ds = data.word(kWorkspace);
+ int w = (uint8)cl, h = (uint8)ch;
+ int x = (int16)di, y = (int16)bx;
+ unsigned offset = x + y * kScreenwidth;
+ //debug(1, "multidump %ux%u(segment: %04x) -> %d,%d(address: %d)", w, h, (uint16)ds, x, y, offset);
+ engine->blit(ds.ptr(offset, w * h), kScreenwidth, x, y, w, h);
+ si = di = offset + h * kScreenwidth;
+ cx = 0;
+}
+
+void DreamGenContext::worktoscreen() {
+ ds = data.word(kWorkspace);
+ uint size = 320 * 200;
+ engine->blit(ds.ptr(0, size), 320, 0, 0, 320, 200);
+ di = si = size;
+ cx = 0;
+}
+
+void DreamGenContext::printundermon() {
+ engine->printUnderMonitor();
+}
+
+void DreamGenContext::cls() {
+ engine->cls();
+}
+
+void DreamGenContext::frameoutnm(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
+ dst += pitch * y + x;
+
+ for (uint16 j = 0; j < height; ++j) {
+ memcpy(dst, src, width);
+ dst += pitch;
+ src += width;
+ }
+}
+
+void DreamGenContext::frameoutbh(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
+ uint16 stride = pitch - width;
+ dst += y * pitch + x;
+
+ for (uint16 i = 0; i < height; ++i) {
+ for (uint16 j = 0; j < width; ++j) {
+ if (*dst == 0xff) {
+ *dst = *src;
+ }
+ ++src;
+ ++dst;
+ }
+ dst += stride;
+ }
+}
+
+void DreamGenContext::frameoutfx(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {
+ uint16 stride = pitch - width;
+ dst += y * pitch + x;
+ dst -= width;
+
+ for (uint16 j = 0; j < height; ++j) {
+ for (uint16 i = 0; i < width; ++i) {
+ uint8 pixel = src[width - i - 1];
+ if (pixel)
+ *dst = pixel;
+ ++dst;
+ }
+ src += width;
+ dst += stride;
+ }
+}
+
+void DreamGenContext::seecommandtail() {
+ data.word(kSoundbaseadd) = 0x220;
+ data.byte(kSoundint) = 5;
+ data.byte(kSounddmachannel) = 1;
+ data.byte(kBrightness) = 1;
+ data.word(kHowmuchalloc) = 0x9360;
+}
+
+void DreamGenContext::randomnumber() {
+ al = engine->randomNumber();
+}
+
+void DreamGenContext::quickquit() {
+ engine->quit();
+}
+
+void DreamGenContext::quickquit2() {
+ engine->quit();
+}
+
+void DreamGenContext::keyboardread() {
+ ::error("keyboardread"); //this keyboard int handler, must never be called
+}
+
+void DreamGenContext::resetkeyboard() {
+}
+
+void DreamGenContext::setkeyboardint() {
+}
+
+void DreamGenContext::readfromfile() {
+ uint16 dst_offset = dx;
+ uint16 size = cx;
+ debug(1, "readfromfile(%04x:%u, %u)", (uint16)ds, dst_offset, size);
+ ax = engine->readFromFile(ds.ptr(dst_offset, size), size);
+ flags._c = false;
+}
+
+void DreamGenContext::closefile() {
+ engine->closeFile();
+ data.byte(kHandle) = 0;
+}
+
+void DreamGenContext::openforsave() {
+ const char *name = (const char *)ds.ptr(dx, 13);
+ debug(1, "openforsave(%s)", name);
+ engine->openSaveFileForWriting(name);
+}
+
+void DreamGenContext::openfilenocheck() {
+ const char *name = (const char *)ds.ptr(dx, 13);
+ debug(1, "checksavefile(%s)", name);
+ bool ok = engine->openSaveFileForReading(name);
+ flags._c = !ok;
+}
+
+void DreamGenContext::openfilefromc() {
+ openfilenocheck();
+}
+
+void DreamGenContext::openfile() {
+ Common::String name = getFilename(*this);
+ debug(1, "opening file: %s", name.c_str());
+ engine->openFile(name);
+ cs.word(kHandle) = 1; //only one handle
+ flags._c = false;
+}
+
+void DreamGenContext::createfile() {
+ ::error("createfile");
+}
+
+void DreamGenContext::dontloadseg() {
+ ax = es.word(di);
+ _add(di, 2);
+ dx = ax;
+ cx = 0;
+ unsigned pos = engine->skipBytes(dx);
+ dx = pos >> 16;
+ ax = pos & 0xffff;
+ flags._c = false;
+}
+
+void DreamGenContext::mousecall() {
+ engine->mouseCall();
+}
+
+void DreamGenContext::setmouse() {
+ data.word(kOldpointerx) = 0xffff;
+}
+
+uint8 DreamGenContext::getnextword(uint8 *totalWidth, uint8 *charCount) {
+ *totalWidth = 0;
+ *charCount = 0;
+ while(true) {
+ uint8 firstChar = es.byte(di);
+ ++di;
+ ++*charCount;
+ if ((firstChar == ':') || (firstChar == 0)) { //endall
+ *totalWidth += 6;
+ return 1;
+ }
+ if (firstChar == 32) { //endword
+ *totalWidth += 6;
+ return 0;
+ }
+ firstChar = engine->modifyChar(firstChar);
+ if (firstChar != 255) {
+ uint8 secondChar = es.byte(di);
+ uint8 width = ds.byte(6*(firstChar - 32 + data.word(kCharshift)));
+ width = kernchars(firstChar, secondChar, width);
+ *totalWidth += width;
+ }
+ }
+}
+
+void DreamGenContext::getnextword() {
+ uint8 totalWidth, charCount;
+ al = getnextword(&totalWidth, &charCount);
+ bl = totalWidth;
+ bh = charCount;
+}
+
+uint8 DreamGenContext::kernchars(uint8 firstChar, uint8 secondChar, uint8 width) {
+ if ((firstChar == 'a') || (al == 'u')) {
+ if ((secondChar == 'n') || (secondChar == 't') || (secondChar == 'r') || (secondChar == 'i') || (secondChar == 'l'))
+ return width-1;
+ }
+ return width;
+}
+
+void DreamGenContext::kernchars() {
+ cl = kernchars(al, ah, cl);
+}
+
+void DreamGenContext::gettime() {
+ TimeDate t;
+ g_system->getTimeAndDate(t);
+ debug(1, "\tgettime: %02d:%02d:%02d", t.tm_hour, t.tm_min, t.tm_sec);
+ ch = t.tm_hour;
+ cl = t.tm_min;
+ dh = t.tm_sec;
+ data.byte(kSecondcount) = dh;
+ data.byte(kMinutecount) = cl;
+ data.byte(kHourcount) = ch;
+}
+
+void DreamGenContext::allocatemem() {
+ uint size = (bx + 2) * 16;
+ debug(1, "allocate mem, %u bytes", size);
+ flags._c = false;
+ SegmentRef seg = allocateSegment(size);
+ ax = (uint16)seg;
+ debug(1, "\tsegment address -> %04x", (uint16)ax);
+}
+
+void DreamGenContext::deallocatemem() {
+ uint16 id = (uint16)es;
+ debug(1, "deallocating segment %04x", id);
+ deallocateSegment(id);
+
+ //fixing invalid entries in the sprite table
+ es = data;
+ uint tsize = 16 * 32;
+ uint16 bseg = data.word(kBuffers);
+ if (!bseg)
+ return;
+ SegmentRef buffers(this);
+ buffers = bseg;
+ uint8 *ptr = buffers.ptr(kSpritetable, tsize);
+ for(uint i = 0; i < tsize; i += 32) {
+ uint16 seg = READ_LE_UINT16(ptr + i + 6);
+ //debug(1, "sprite segment = %04x", seg);
+ if (seg == id)
+ memset(ptr + i, 0xff, 32);
+ }
+}
+
+void DreamGenContext::removeemm() {
+ ::error("removeemm");
+}
+
+void DreamGenContext::setupemm() {
+ //good place for early initialization
+ switch(engine->getLanguage()) {
+ case Common::EN_ANY:
+ case Common::EN_GRB:
+ case Common::EN_USA:
+ return;
+ default:
+ data.byte(kForeignrelease) = 1;
+ }
+}
+
+void DreamGenContext::pitinterupt() {
+ ::error("pitinterupt");
+}
+
+void DreamGenContext::getridofpit() {
+ ::error("getridofpit");
+}
+
+void DreamGenContext::setuppit() {
+ ::error("setuppit");
+}
+
+void DreamGenContext::startdmablock() {
+ ::error("startdmablock");
+}
+
+void DreamGenContext::dmaend() {
+ ::error("dmaend");
+}
+
+void DreamGenContext::restoreems() {
+ ::error("restoreems");
+}
+
+void DreamGenContext::saveems() {
+ ::error("saveems");
+}
+
+void DreamGenContext::bothchannels() {
+ ::error("bothchannels");
+}
+
+void DreamGenContext::channel1only() {
+ ::error("channel1only");
+}
+
+void DreamGenContext::channel0only() {
+ ::error("channel0only");
+}
+
+void DreamGenContext::out22c() {
+ ::error("out22c");
+}
+
+void DreamGenContext::soundstartup() {}
+void DreamGenContext::soundend() {}
+void DreamGenContext::interupttest() {}
+void DreamGenContext::disablesoundint() {}
+void DreamGenContext::enablesoundint() {}
+void DreamGenContext::checksoundint() {
+ data.byte(kTestresult) = 1;
+}
+
+void DreamGenContext::setsoundoff() {
+ warning("setsoundoff: STUB");
+}
+
+void DreamGenContext::loadsample() {
+ engine->loadSounds(0, (const char *)data.ptr(dx, 13));
+}
+
+void DreamGenContext::loadsecondsample() {
+ uint8 ch0 = data.byte(kCh0playing);
+ if (ch0 >= 12 && ch0 != 255)
+ cancelch0();
+ uint8 ch1 = data.byte(kCh1playing);
+ if (ch1 >= 12)
+ cancelch1();
+ engine->loadSounds(1, (const char *)data.ptr(dx, 13));
+}
+
+void DreamGenContext::loadspeech() {
+ cancelch1();
+ data.byte(kSpeechloaded) = 0;
+ createname();
+ const char *name = (const char *)data.ptr(di, 13);
+ //warning("name = %s", name);
+ if (engine->loadSpeech(name))
+ data.byte(kSpeechloaded) = 1;
+}
+
+void DreamGenContext::saveseg() {
+ cx = es.word(di);
+ _add(di, 2);
+ savefilewrite();
+}
+
+void DreamGenContext::savefilewrite() {
+ ax = engine->writeToSaveFile(ds.ptr(dx, cx), cx);
+}
+
+void DreamGenContext::savefileread() {
+ ax = engine->readFromSaveFile(ds.ptr(dx, cx), cx);
+}
+
+void DreamGenContext::loadseg() {
+ ax = es.word(di);
+ di += 2;
+
+ uint16 dst_offset = dx;
+ uint16 size = ax;
+
+ debug(1, "loadseg(%04x:%u, %u)", (uint16)ds, dst_offset, size);
+ ax = engine->readFromFile(ds.ptr(dst_offset, size), size);
+ flags._c = false;
+}
+
+void DreamGenContext::error() {
+ ::error("error");
+}
+
+void DreamGenContext::generalerror() {
+ ::error("generalerror");
+}
+
+void DreamGenContext::dosreturn() {
+
+ _cmp(data.byte(kCommandtype), 250);
+ if (!flags.z()) {
+ data.byte(kCommandtype) = 250;
+ al = 46;
+ commandonly();
+ }
+
+ ax = data.word(kMousebutton);
+ _and(ax, 1);
+ if (flags.z())
+ return;
+
+ data.word(kMousebutton) = 0;
+ engine->quit();
+}
+
+void DreamGenContext::set16colpalette() {
+ //fixme: this is a bit hackish, set16colpalette called after initialization and nearly before main loop.
+ engine->enableSavingOrLoading();
+}
+
+void DreamGenContext::mode640x480() {
+ // Video mode 12h: 640x480 pixels, 16 colors, I believe
+ al = 0x12 + 128;
+ ah = 0;
+ initGraphics(640, 480, true);
+}
+
+void DreamGenContext::showgroup() {
+ engine->setPalette();
+}
+
+void DreamGenContext::fadedos() {
+ engine->fadeDos();
+}
+
+void DreamGenContext::doshake() {
+ uint8 &counter = data.byte(kShakecounter);
+ _cmp(counter, 48);
+ if (flags.z())
+ return;
+
+ _add(counter, 1);
+ static const int shakeTable[] = {
+ 0, -2, 3, -2, 0, 2, 4, -1,
+ 1, -3, 3, 2, 0, -2, 3, -2,
+ 0, 2, 4, -1, 1, -3, 3, 2,
+ 0, -2, 3, -2, 0, 2, 4, -1,
+
+ 1, -3, 3, 2, 0, -2, 3, -2,
+ 0, 2, 4, -1, 1, -3, 3, 2,
+ 0, -2, 3, -2, 0, 2, 4, -1,
+ 1, -3, 3, 2, 0, -2, 3, -2,
+
+ 0, 2, 4, -1, 1, -3, 3, 2,
+ 0, -2, 3, -2, 0, 2, 4, -1,
+ 1, -3, 3, 2, 0, -2, 3, -2,
+ 0, 2, 4, -1, 1, -3, 3, 2,
+
+ 0, -2, 3, -2, 0, 2, 4, -1,
+ 1, -3, 3, 0,
+ };
+ int offset = shakeTable[counter];
+ engine->setShakePos(offset >= 0? offset: -offset);
+}
+
+void DreamGenContext::vsync() {
+ push(ax);
+ push(bx);
+ push(cx);
+ push(dx);
+ push(si);
+ push(di);
+ push(es);
+ push(ds);
+ engine->waitForVSync();
+ ds = pop();
+ es = pop();
+ di = pop();
+ si = pop();
+ dx = pop();
+ cx = pop();
+ bx = pop();
+ ax = pop();
+}
+
+void DreamGenContext::setmode() {
+ vsync();
+ initGraphics(320, 200, false);
+}
+
+void DreamGenContext::showpcx() {
+ Common::String name = getFilename(*this);
+ Common::File pcxFile;
+
+ if (!pcxFile.open(name)) {
+ warning("showpcx: Could not open '%s'", name.c_str());
+ return;
+ }
+
+ uint8 *maingamepal;
+ int i, j;
+
+ // Read the 16-color palette into the 'maingamepal' buffer. Note that
+ // the color components have to be adjusted from 8 to 6 bits.
+
+ pcxFile.seek(16, SEEK_SET);
+ es = data.word(kBuffers);
+ maingamepal = es.ptr(kMaingamepal, 768);
+ pcxFile.read(maingamepal, 48);
+
+ memset(maingamepal + 48, 0xff, 720);
+ for (i = 0; i < 48; i++) {
+ maingamepal[i] >>= 2;
+ }
+
+ // Decode the image data.
+
+ Graphics::Surface *s = g_system->lockScreen();
+ Common::Rect rect(640, 480);
+
+ s->fillRect(rect, 0);
+ pcxFile.seek(128, SEEK_SET);
+
+ for (int y = 0; y < 480; y++) {
+ byte *dst = (byte *)s->getBasePtr(0, y);
+ int decoded = 0;
+
+ while (decoded < 320) {
+ byte col = pcxFile.readByte();
+ byte len;
+
+ if ((col & 0xc0) == 0xc0) {
+ len = col & 0x3f;
+ col = pcxFile.readByte();
+ } else {
+ len = 1;
+ }
+
+ // The image uses 16 colors and is stored as four bit
+ // planes, one for each bit of the color, least
+ // significant bit plane first.
+
+ for (i = 0; i < len; i++) {
+ int plane = decoded / 80;
+ int pos = decoded % 80;
+
+ for (j = 0; j < 8; j++) {
+ byte bit = (col >> (7 - j)) & 1;
+ dst[8 * pos + j] |= (bit << plane);
+ }
+
+ decoded++;
+ }
+ }
+ }
+
+ g_system->unlockScreen();
+ pcxFile.close();
+}
+
+/*
+void DreamGenContext::frameoutv() {
+ uint16 pitch = dx;
+ uint16 width = cx & 0xff;
+ uint16 height = cx >> 8;
+
+ const uint8* src = ds.ptr(si, width * height);
+ uint8* dst = es.ptr(0, pitch * height);
+
+ frameoutv(dst, src, pitch, width, height, di, bx);
+}
+*/
+
+void DreamGenContext::frameoutv(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 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);
+
+ if(x >= 320)
+ return;
+ if(y >= 200)
+ return;
+ if(x + width > 320) {
+ width = 320 - x;
+ }
+ if(y + height > 200) {
+ height = 200 - y;
+ }
+
+ uint16 stride = pitch - width;
+ dst += pitch * y + x;
+
+ for (uint16 j = 0; j < height; ++j) {
+ for (uint16 i = 0; i < width; ++i) {
+ uint8 pixel = *src++;
+ if (pixel)
+ *dst = pixel;
+ ++dst;
+ }
+ dst += stride;
+ }
+}
+
+Sprite* DreamGenContext::spritetable() {
+ push(es);
+ push(bx);
+
+ es = data.word(kBuffers);
+ bx = kSpritetable;
+ Sprite *sprite = (Sprite*)es.ptr(bx, 16*sizeof(Sprite));
+
+ bx = pop();
+ es = pop();
+
+ return sprite;
+}
+
+uint16 DreamGenContext::showframeCPP(uint16 dst, uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag) {
+ es = dst;
+ ds = src;
+ di = x;
+ bx = y;
+ al = frameNumber;
+ ah = effectsFlag;
+
+ si = (ax & 0x1ff) * 6;
+ if (ds.word(si) == 0) {
+ return 0;
+ }
+
+//notblankshow:
+ if ((effectsFlag & 128) == 0) {
+ di += ds.byte(si+4);
+ bx += ds.byte(si+5);
+ }
+//skipoffsets:
+ cx = ds.word(si+0);
+ uint8 width = cl;
+ uint8 height = ch;
+ uint16 written = cx;
+ si = ds.word(si+2) + 2080;
+
+ if (effectsFlag) {
+ if (effectsFlag & 128) { //centred
+ di -= width / 2;
+ bx -= height / 2;
+ }
+ if (effectsFlag & 64) { //diffdest
+ frameoutfx(es.ptr(0, dx * height), ds.ptr(si, width * height), dx, width, height, di, bx);
+ return written;
+ }
+ if (effectsFlag & 8) { //printlist
+ push(ax);
+ ax = di - data.word(kMapadx);
+ push(bx);
+ bx -= data.word(kMapady);
+ ah = bl;
+ bx = pop();
+ //addtoprintlist(); // NB: Commented in the original asm
+ ax = pop();
+ }
+ if (effectsFlag & 4) { //flippedx
+ es = data.word(kWorkspace);
+ frameoutfx(es.ptr(0, 320 * height), ds.ptr(si, width * height), 320, width, height, di, bx);
+ return written;
+ }
+ if (effectsFlag & 2) { //nomask
+ es = data.word(kWorkspace);
+ frameoutnm(es.ptr(0, 320 * height), ds.ptr(si, width * height), 320, width, height, di, bx);
+ return written;
+ }
+ if (effectsFlag & 32) {
+ es = data.word(kWorkspace);
+ frameoutbh(es.ptr(0, 320 * height), ds.ptr(si, width * height), 320, width, height, di, bx);
+ return written;
+ }
+ }
+//noeffects:
+ es = data.word(kWorkspace);
+ frameoutv(es.ptr(0, 65536), ds.ptr(si, width * height), 320, width, height, di, bx);
+ return written;
+}
+
+void DreamGenContext::showframe() {
+ cx = showframeCPP(es, ds, di, bx, al, ah);
+}
+
+void DreamGenContext::printsprites() {
+ for (size_t priority = 0; priority < 7; ++priority) {
+ Sprite *sprites = spritetable();
+ for (size_t j = 0; j < 16; ++j) {
+ const Sprite &sprite = sprites[j];
+ if (READ_LE_UINT16(&sprite.updateCallback) == 0x0ffff)
+ continue;
+ if (priority != sprite.priority)
+ continue;
+ if (sprite.hidden == 1)
+ continue;
+ printasprite(&sprite);
+ }
+ }
+}
+
+void DreamGenContext::printasprite(const Sprite* sprite) {
+ push(es);
+ push(bx);
+ ds = READ_LE_UINT16(&sprite->w6);
+ ax = sprite->y;
+ if (al >= 220) {
+ bx = data.word(kMapady) - (256 - al);
+ } else {
+ bx = ax + data.word(kMapady);
+ }
+
+ ax = sprite->x;
+ if (al >= 220) {
+ di = data.word(kMapadx) - (256 - al);
+ } else {
+ di = ax + data.word(kMapadx);
+ }
+
+ ax = sprite->b15;
+ if (sprite->b29 != 0)
+ ah = 8;
+ showframe();
+
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::eraseoldobs() {
+ if (data.byte(kNewobs) == 0)
+ return;
+
+ Sprite *sprites = spritetable();
+ for (size_t i=0; i<16; ++i) {
+ Sprite &sprite = sprites[i];
+ if (READ_LE_UINT16(&sprite.obj_data) != 0xffff) {
+ memset(&sprite, 0xff, sizeof(Sprite));
+ }
+ }
+}
+
+void DreamGenContext::clearsprites() {
+ memset(spritetable(), 0xff, sizeof(Sprite)*16);
+}
+
+Sprite* DreamGenContext::makesprite(uint8 x, uint8 y, uint16 updateCallback, uint16 somethingInDx, uint16 somethingInDi) {
+ Sprite *sprite = spritetable();
+ while (sprite->b15 != 0xff) { // NB: No boundchecking in the original code either
+ ++sprite;
+ }
+
+ WRITE_LE_UINT16(&sprite->updateCallback, updateCallback);
+ sprite->x = x;
+ sprite->y = y;
+ WRITE_LE_UINT16(&sprite->w6, somethingInDx);
+ WRITE_LE_UINT16(&sprite->w8, somethingInDi);
+ sprite->w2 = 0xffff;
+ sprite->b15 = 0;
+ sprite->delay = 0;
+ return sprite;
+}
+
+void DreamGenContext::makesprite() { // NB: returns new sprite in es:bx
+ Sprite *sprite = makesprite(si & 0xff, si >> 8, cx, dx, di);
+
+ // Recover es:bx from sprite
+ es = data.word(kBuffers);
+ bx = kSpritetable;
+ Sprite *sprites = (Sprite*)es.ptr(bx, sizeof(Sprite)*16);
+ bx += sizeof(Sprite)*(sprite-sprites);
+ //
+}
+
+void DreamGenContext::spriteupdate() {
+ Sprite *sprites = spritetable();
+ sprites[0].hidden = data.byte(kRyanon);
+
+ Sprite *sprite = sprites;
+ for (size_t i=0; i<16; ++i) {
+ uint16 updateCallback = READ_LE_UINT16(&sprite->updateCallback);
+ if (updateCallback != 0xffff) {
+ sprite->w24 = sprite->w2;
+ if (updateCallback == addr_mainman) // NB : Let's consider the callback as an enum while more code is not ported to C++
+ mainmanCPP(sprite);
+ else {
+ assert(updateCallback == addr_backobject);
+ backobject(sprite);
+ }
+ }
+
+ if (data.byte(kNowinnewroom) == 1)
+ break;
+ ++sprite;
+ }
+}
+
+void DreamGenContext::initman() {
+ Sprite *sprite = makesprite(data.byte(kRyanx), data.byte(kRyany), addr_mainman, data.word(kMainsprites), 0);
+ sprite->priority = 4;
+ sprite->b22 = 0;
+ sprite->b29 = 0;
+
+ // Recover es:bx from sprite
+ es = data.word(kBuffers);
+ bx = kSpritetable;
+ Sprite *sprites = (Sprite*)es.ptr(bx, sizeof(Sprite)*16);
+ bx += 32*(sprite-sprites);
+ //
+}
+
+void DreamGenContext::mainmanCPP(Sprite* sprite) {
+ push(es);
+ push(ds);
+
+ // Recover es:bx from sprite
+ es = data.word(kBuffers);
+ bx = kSpritetable;
+ Sprite *sprites = (Sprite*)es.ptr(bx, sizeof(Sprite)*16);
+ bx += 32*(sprite-sprites);
+ //
+
+ if (data.byte(kResetmanxy) == 1) {
+ data.byte(kResetmanxy) = 0;
+ sprite->x = data.byte(kRyanx);
+ sprite->y = data.byte(kRyany);
+ sprite->b29 = 0;
+ }
+ --sprite->b22;
+ if (sprite->b22 != 0xff) {
+ ds = pop();
+ es = pop();
+ return;
+ }
+ sprite->b22 = 0;
+ if (data.byte(kTurntoface) != data.byte(kFacing)) {
+ aboutturn(sprite);
+ } else {
+ if ((data.byte(kTurndirection) != 0) && (data.byte(kLinepointer) == 254)) {
+ data.byte(kReasseschanges) = 1;
+ if (data.byte(kFacing) == data.byte(kLeavedirection))
+ checkforexit();
+ }
+ data.byte(kTurndirection) = 0;
+ if (data.byte(kLinepointer) == 254) {
+ sprite->b29 = 0;
+ } else {
+ ++sprite->b29;
+ if (sprite->b29 == 11)
+ sprite->b29 = 1;
+ walking();
+ if (data.byte(kLinepointer) != 254) {
+ if ((data.byte(kFacing) & 1) == 0)
+ walking();
+ else if ((sprite->b29 != 2) && (sprite->b29 != 7))
+ walking();
+ }
+ if (data.byte(kLinepointer) == 254) {
+ if (data.byte(kTurntoface) == data.byte(kFacing)) {
+ data.byte(kReasseschanges) = 1;
+ if (data.byte(kFacing) == data.byte(kLeavedirection))
+ checkforexit();
+ }
+ }
+ }
+ }
+ static const uint8 facelist[] = { 0,60,33,71,11,82,22,93 };
+ sprite->b15 = sprite->b29 + facelist[data.byte(kFacing)];
+ data.byte(kRyanx) = sprite->x;
+ data.byte(kRyany) = sprite->y;
+
+ ds = pop();
+ es = pop();
+}
+
+void DreamGenContext::walking() {
+ Sprite *sprite = (Sprite*)es.ptr(bx, sizeof(Sprite));
+
+ uint8 comp;
+ if (data.byte(kLinedirection) != 0) {
+ --data.byte(kLinepointer);
+ comp = 200;
+ } else {
+ ++data.byte(kLinepointer);
+ comp = data.byte(kLinelength);
+ }
+ if (data.byte(kLinepointer) < comp) {
+ sprite->x = data.byte(kLinedata + data.byte(kLinepointer) * 2 + 0);
+ sprite->y = data.byte(kLinedata + data.byte(kLinepointer) * 2 + 1);
+ return;
+ }
+
+ data.byte(kLinepointer) = 254;
+ data.byte(kManspath) = data.byte(kDestination);
+ if (data.byte(kDestination) == data.byte(kFinaldest)) {
+ facerightway();
+ return;
+ }
+ data.byte(kDestination) = data.byte(kFinaldest);
+ push(es);
+ push(bx);
+ autosetwalk();
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::aboutturn(Sprite* sprite) {
+ if (data.byte(kTurndirection) == 1)
+ goto incdir;
+ else if ((int8)data.byte(kTurndirection) == -1)
+ goto decdir;
+ else {
+ if (data.byte(kFacing) < data.byte(kTurntoface)) {
+ uint8 delta = data.byte(kTurntoface) - data.byte(kFacing);
+ if (delta >= 4)
+ goto decdir;
+ else
+ goto incdir;
+ } else {
+ uint8 delta = data.byte(kFacing) - data.byte(kTurntoface);
+ if (delta >= 4)
+ goto incdir;
+ else
+ goto decdir;
+ }
+ }
+incdir:
+ data.byte(kTurndirection) = 1;
+ data.byte(kFacing) = (data.byte(kFacing) + 1) & 7;
+ sprite->b29 = 0;
+ return;
+decdir:
+ data.byte(kTurndirection) = -1;
+ data.byte(kFacing) = (data.byte(kFacing) - 1) & 7;
+ sprite->b29 = 0;
+}
+
+void DreamGenContext::backobject(Sprite* sprite) {
+ push(es);
+ push(ds);
+
+ // Recover es:bx from sprite
+ es = data.word(kBuffers);
+ bx = kSpritetable;
+ Sprite *sprites = (Sprite*)es.ptr(bx, sizeof(Sprite)*16);
+ bx += 32*(sprite-sprites);
+ //
+
+ ds = data.word(kSetdat);
+ di = READ_LE_UINT16(&sprite->obj_data);
+ ObjData* objData = (ObjData*)ds.ptr(di, 0);
+
+ if (sprite->delay != 0) {
+ --sprite->delay;
+ ds = pop();
+ es = pop();
+ return;
+ }
+
+ sprite->delay = objData->delay;
+ if (objData->type == 6)
+ widedoor(sprite, objData);
+ else if (objData->type == 5)
+ random(sprite, objData);
+ else if (objData->type == 4)
+ lockeddoorway();
+ else if (objData->type == 3)
+ liftsprite(sprite, objData);
+ else if (objData->type == 2)
+ doorway(sprite, objData);
+ else if (objData->type == 1)
+ constant(sprite, objData);
+ else
+ steady(sprite, objData);
+
+ ds = pop();
+ es = pop();
+}
+
+void DreamGenContext::constant(Sprite* sprite, ObjData* objData) {
+ ++sprite->frame;
+ if (objData->b18[sprite->frame] == 255) {
+ sprite->frame = 0;
+ }
+ uint8 b18 = objData->b18[sprite->frame];
+ objData->b17 = b18;
+ sprite->b15 = b18;
+}
+
+void DreamGenContext::random(Sprite* sprite, ObjData* objData) {
+ randomnum1();
+ uint16 r = ax;
+ sprite->b15 = objData->b18[r&7];
+}
+
+void DreamGenContext::doorway(Sprite* sprite, ObjData* objData) {
+ data.byte(kDoorcheck1) = -24;
+ data.byte(kDoorcheck2) = 10;
+ data.byte(kDoorcheck3) = -30;
+ data.byte(kDoorcheck4) = 10;
+ dodoor(sprite, objData);
+}
+
+void DreamGenContext::widedoor(Sprite* sprite, ObjData* objData) {
+ data.byte(kDoorcheck1) = -24;
+ data.byte(kDoorcheck2) = 24;
+ data.byte(kDoorcheck3) = -30;
+ data.byte(kDoorcheck4) = 24;
+ dodoor(sprite, objData);
+}
+
+void DreamGenContext::dodoor() {
+ Sprite *sprite = (Sprite*)es.ptr(bx, sizeof(Sprite));
+ ObjData *objData = (ObjData*)ds.ptr(di, 0);
+ dodoor(sprite, objData);
+}
+
+void DreamGenContext::dodoor(Sprite* sprite, ObjData* objData) {
+ uint8 ryanx = data.byte(kRyanx);
+ uint8 ryany = data.byte(kRyany);
+ int8 deltax = ryanx - sprite->x;
+ int8 deltay = ryany - sprite->y;
+ if (ryanx < sprite->x) {
+ if (deltax < (int8)data.byte(kDoorcheck1))
+ goto shutdoor;
+ } else {
+ if (deltax >= data.byte(kDoorcheck2))
+ goto shutdoor;
+ }
+ if (ryany < sprite->y) {
+ if (deltay < (int8)data.byte(kDoorcheck3))
+ goto shutdoor;
+ } else {
+ if (deltay >= data.byte(kDoorcheck4))
+ goto shutdoor;
+ }
+//opendoor:
+ if ((data.byte(kThroughdoor) == 1) && (sprite->frame == 0))
+ sprite->frame = 6;
+
+ ++sprite->frame;
+ if (sprite->frame == 1) { //doorsound2
+ if (data.byte(kReallocation) == 5) //hoteldoor2
+ al = 13;
+ else
+ al = 0;
+ playchannel1();
+ }
+ if (objData->b18[sprite->frame] == 255) {
+ --sprite->frame;
+ }
+ sprite->b15 = objData->b17 = objData->b18[sprite->frame];
+ data.byte(kThroughdoor) = 1;
+ return;
+shutdoor:
+ if (sprite->frame == 5) { //doorsound1;
+ if (data.byte(kReallocation) == 5) //hoteldoor1
+ al = 13;
+ else
+ al = 1;
+ playchannel1();
+ }
+ if (sprite->frame != 0) {
+ --sprite->frame;
+ }
+ sprite->b15 = objData->b17 = objData->b18[sprite->frame];
+ if (sprite->frame == 5) //nearly
+ data.byte(kThroughdoor) = 0;
+}
+
+void DreamGenContext::steady(Sprite* sprite, ObjData* objData) {
+ uint8 b18 = objData->b18[0];
+ objData->b17 = b18;
+ sprite->b15 = b18;
+}
+
+void DreamGenContext::turnpathonCPP(uint8 param) {
+ al = param;
+ push(es);
+ push(bx);
+ turnpathon();
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::turnpathoffCPP(uint8 param) {
+ al = param;
+ push(es);
+ push(bx);
+ turnpathoff();
+ bx = pop();
+ es = pop();
+}
+
+void DreamGenContext::liftsprite() {
+ Sprite *sprite = (Sprite*)es.ptr(bx, sizeof(Sprite));
+ ObjData *objData = (ObjData*)ds.ptr(di, 0);
+ liftsprite(sprite, objData);
+}
+
+void DreamGenContext::liftsprite(Sprite* sprite, ObjData* objData) {
+ uint8 liftFlag = data.byte(kLiftflag);
+ if (liftFlag == 0) { //liftclosed
+ turnpathoffCPP(data.byte(kLiftpath));
+
+ if (data.byte(kCounttoopen) != 0) {
+ _dec(data.byte(kCounttoopen));
+ if (data.byte(kCounttoopen) == 0)
+ data.byte(kLiftflag) = 3;
+ }
+ sprite->frame = 0;
+ sprite->b15 = objData->b17 = objData->b18[sprite->frame];
+ }
+ else if (liftFlag == 1) { //liftopen
+ turnpathonCPP(data.byte(kLiftpath));
+
+ if (data.byte(kCounttoclose) != 0) {
+ _dec(data.byte(kCounttoclose));
+ if (data.byte(kCounttoclose) == 0)
+ data.byte(kLiftflag) = 2;
+ }
+ sprite->frame = 12;
+ sprite->b15 = objData->b17 = objData->b18[sprite->frame];
+ }
+ else if (liftFlag == 3) { //openlift
+ if (sprite->frame == 12) {
+ data.byte(kLiftflag) = 1;
+ return;
+ }
+ ++sprite->frame;
+ if (sprite->frame == 1) {
+ al = 2;
+ liftnoise();
+ }
+ sprite->b15 = objData->b17 = objData->b18[sprite->frame];
+ } else { //closeLift
+ assert(liftFlag == 2);
+ if (sprite->frame == 0) {
+ data.byte(kLiftflag) = 0;
+ return;
+ }
+ --sprite->frame;
+ if (sprite->frame == 11) {
+ al = 3;
+ liftnoise();
+ }
+ sprite->b15 = objData->b17 = objData->b18[sprite->frame];
+ }
+}
+
+void DreamGenContext::modifychar() {
+ al = engine->modifyChar(al);
+}
+
+void DreamGenContext::lockmon() {
+ // Pressing space pauses text output in the monitor. We use the "hard"
+ // 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 (data.byte(kLasthardkey) == 57) {
+ // Clear the keyboard buffer. Otherwise the space that caused
+ // the pause will be read immediately unpause the game.
+ do {
+ readkey();
+ } while (data.byte(kCurrentkey) != 0);
+
+ locklighton();
+ while (!engine->shouldQuit()) {
+ engine->waitForVSync();
+ readkey();
+ if (data.byte(kCurrentkey) == ' ')
+ break;
+ }
+ // Forget the last "hard" key, otherwise the space that caused
+ // the unpausing will immediately re-pause the game.
+ data.byte(kLasthardkey) = 0;
+ locklightoff();
+ }
+}
+
+void DreamGenContext::cancelch0() {
+ data.byte(kCh0repeat) = 0;
+ data.word(kCh0blockstocopy) = 0;
+ data.byte(kCh0playing) = 255;
+ engine->stopSound(0);
+}
+
+void DreamGenContext::cancelch1() {
+ data.word(kCh1blockstocopy) = 0;
+ data.byte(kCh1playing) = 255;
+ engine->stopSound(1);
+}
+
+} /*namespace dreamgen */
+
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
new file mode 100644
index 0000000000..a3cb680cca
--- /dev/null
+++ b/engines/dreamweb/stubs.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.
+ *
+ */
+
+ void multidump();
+ void frameoutv(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
+ void frameoutnm(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
+ void frameoutbh(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
+ void frameoutfx(uint8* dst, const uint8* src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y);
+ void worktoscreen();
+ void multiget();
+ void convertkey();
+ void cls();
+ void printsprites();
+ void quickquit();
+ void readoneblock();
+ void printundermon();
+ void seecommandtail();
+ void randomnumber();
+ void quickquit2();
+ void getnextword();
+ uint8 getnextword(uint8 *totalWidth, uint8 *charCount);
+ void kernchars();
+ uint8 kernchars(uint8 firstChar, uint8 secondChar, uint8 width);
+ Sprite* spritetable();
+ void showframe();
+ uint16 showframeCPP(uint16 dst, uint16 src, uint16 x, uint16 y, uint8 frameNumber, uint8 effectsFlag);
+ void printasprite(const Sprite* sprite);
+ void width160();
+ void multiput();
+ void eraseoldobs();
+ void clearsprites();
+ void makesprite();
+ Sprite* makesprite(uint8 x, uint8 y, uint16 updateCallback, uint16 somethingInDx, uint16 somethingInDi);
+ void spriteupdate();
+ void initman();
+ void mainmanCPP(Sprite* sprite);
+ void walking();
+ void aboutturn(Sprite* sprite);
+ void backobject(Sprite* sprite);
+ void constant(Sprite* sprite, ObjData* objData);
+ void steady(Sprite* sprite, ObjData* objData);
+ void random(Sprite* sprite, ObjData* objData);
+ void dodoor();
+ void dodoor(Sprite* sprite, ObjData* objData);
+ void doorway(Sprite* sprite, ObjData* objData);
+ void widedoor(Sprite* sprite, ObjData* objData);
+ void liftsprite();
+ void liftsprite(Sprite* sprite, ObjData* objData);
+ void turnpathonCPP(uint8 param);
+ void turnpathoffCPP(uint8 param);
+ void modifychar();
+ void lockmon();
+ void cancelch0();
+ void cancelch1();
diff --git a/engines/engine.cpp b/engines/engine.cpp
index dc30b4bd0d..b19daa2611 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -96,6 +96,7 @@ Engine::Engine(OSystem *syst)
_targetName(ConfMan.getActiveDomainName()),
_pauseLevel(0),
_pauseStartTime(0),
+ _saveSlotToLoad(-1),
_engineStartTime(_system->getMillis()),
_mainMenuDialog(NULL) {
@@ -396,10 +397,36 @@ void Engine::pauseEngineIntern(bool pause) {
void Engine::openMainMenuDialog() {
if (!_mainMenuDialog)
_mainMenuDialog = new MainMenuDialog(this);
+
+ setGameToLoadSlot(-1);
+
runDialog(*_mainMenuDialog);
+
+ // Load savegame after main menu execution
+ // (not from inside the menu loop to avoid
+ // mouse cursor glitches and simliar bugs,
+ // e.g. #2822778).
+ // FIXME: For now we just ignore the return
+ // value, which is quite bad since it could
+ // be a fatal loading error, which renders
+ // the engine unusable.
+ if (_saveSlotToLoad >= 0)
+ loadGameState(_saveSlotToLoad);
+
syncSoundSettings();
}
+bool Engine::warnUserAboutUnsupportedGame() {
+ if (ConfMan.getBool("enable_unsupported_game_warning")) {
+ GUI::MessageDialog alert(_("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."), _("Start anyway"), _("Cancel"));
+ return alert.runModal() == GUI::kMessageOK;
+ }
+ return true;
+}
+
uint32 Engine::getTotalPlayTime() const {
if (!_pauseLevel)
return _system->getMillis() - _engineStartTime;
@@ -426,6 +453,10 @@ int Engine::runDialog(GUI::Dialog &dialog) {
return result;
}
+void Engine::setGameToLoadSlot(int slot) {
+ _saveSlotToLoad = slot;
+}
+
void Engine::syncSoundSettings() {
// Sync the engine with the config manager
int soundVolumeMusic = ConfMan.getInt("music_volume");
diff --git a/engines/engine.h b/engines/engine.h
index d7d971ad97..2796df5c4f 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -82,6 +82,13 @@ private:
*/
int32 _engineStartTime;
+ /**
+ * Save slot selected via global main menu.
+ * This slot will be loaded after main menu execution (not from inside
+ * the menu loop, to avoid bugs like #2822778).
+ */
+ int _saveSlotToLoad;
+
public:
@@ -186,6 +193,15 @@ public:
virtual Common::Error loadGameState(int slot);
/**
+ * Sets the game slot for a savegame to be loaded after global
+ * main menu execution. This is to avoid loading a savegame from
+ * inside the menu loop which causes bugs like #2822778.
+ *
+ * @param slot the slot from which a savestate should be loaded.
+ */
+ void setGameToLoadSlot(int slot);
+
+ /**
* Indicates whether a game state can be loaded.
*/
virtual bool canLoadGameStateCurrently();
@@ -252,6 +268,13 @@ public:
void openMainMenuDialog();
/**
+ * Display a warning to the user that the game is not fully supported.
+ *
+ * @return true if the user chose to start anyway, false otherwise
+ */
+ static bool warnUserAboutUnsupportedGame();
+
+ /**
* Get the total play time.
*
* @return How long the player has been playing in ms.
diff --git a/engines/engines.mk b/engines/engines.mk
index 860ea7abb3..7a94288538 100644
--- a/engines/engines.mk
+++ b/engines/engines.mk
@@ -46,6 +46,11 @@ DEFINES += -DENABLE_DRASCULA=$(ENABLE_DRASCULA)
MODULES += engines/drascula
endif
+ifdef ENABLE_DREAMWEB
+DEFINES += -DENABLE_DREAMWEB=$(ENABLE_DREAMWEB)
+MODULES += engines/dreamweb
+endif
+
ifdef ENABLE_GOB
DEFINES += -DENABLE_GOB=$(ENABLE_GOB)
MODULES += engines/gob
diff --git a/engines/game.cpp b/engines/game.cpp
index c6d9905b52..8ea68bb681 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -46,7 +46,7 @@ GameDescriptor::GameDescriptor(const PlainGameDescriptor &pgd, uint32 guioptions
setVal("guioptions", Common::getGameGUIOptionsDescription(guioptions));
}
-GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l, Common::Platform p, uint32 guioptions) {
+GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l, Common::Platform p, uint32 guioptions, GameSupportLevel gsl) {
setVal("gameid", g);
setVal("description", d);
if (l != Common::UNK_LANG)
@@ -55,6 +55,8 @@ GameDescriptor::GameDescriptor(const Common::String &g, const Common::String &d,
setVal("platform", Common::getPlatformCode(p));
if (guioptions != 0)
setVal("guioptions", Common::getGameGUIOptionsDescription(guioptions));
+
+ setSupportLevel(gsl);
}
void GameDescriptor::setGUIOptions(uint32 guioptions) {
@@ -69,9 +71,6 @@ void GameDescriptor::appendGUIOptions(const Common::String &str) {
}
void GameDescriptor::updateDesc(const char *extra) {
- // TODO: The format used here (LANG/PLATFORM/EXTRA) is not set in stone.
- // We may want to change the order (PLATFORM/EXTRA/LANG, anybody?), or
- // the seperator (instead of '/' use ', ' or ' ').
const bool hasCustomLanguage = (language() != Common::UNK_LANG);
const bool hasCustomPlatform = (platform() != Common::kPlatformUnknown);
const bool hasExtraDesc = (extra && extra[0]);
@@ -97,3 +96,30 @@ void GameDescriptor::updateDesc(const char *extra) {
setVal("description", descr);
}
}
+
+GameSupportLevel GameDescriptor::getSupportLevel() {
+ GameSupportLevel gsl = kStableGame;
+ if (contains("gsl")) {
+ Common::String gslString = getVal("gsl");
+ if (gslString.equals("unstable"))
+ gsl = kUnstableGame;
+ else if (gslString.equals("testing"))
+ gsl = kTestingGame;
+ }
+ return gsl;
+}
+
+void GameDescriptor::setSupportLevel(GameSupportLevel gsl) {
+ switch (gsl) {
+ case kUnstableGame:
+ setVal("gsl", "unstable");
+ break;
+ case kTestingGame:
+ setVal("gsl", "testing");
+ break;
+ case kStableGame:
+ // Fall Through intended
+ default:
+ erase("gsl");
+ }
+}
diff --git a/engines/game.h b/engines/game.h
index 3216cfb628..9082d93793 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -47,6 +47,15 @@ struct PlainGameDescriptor {
const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list);
/**
+ * Ths is an enum to describe how done a game is. This also indicates what level of support is expected.
+ */
+enum GameSupportLevel {
+ kStableGame = 0, // the game is fully supported
+ kTestingGame, // the game is not supposed to end up in releases yet but is ready for public testing
+ kUnstableGame // the game is not even ready for public testing yet
+};
+
+/**
* A hashmap describing details about a given game. In a sense this is a refined
* version of PlainGameDescriptor, as it also contains a gameid and a description string.
* But in addition, platform and language settings, as well as arbitrary other settings,
@@ -61,16 +70,25 @@ public:
const Common::String &description,
Common::Language language = Common::UNK_LANG,
Common::Platform platform = Common::kPlatformUnknown,
- uint32 guioptions = 0);
+ uint32 guioptions = 0,
+ GameSupportLevel gsl = kStableGame);
/**
- * Update the description string by appending (LANG/PLATFORM/EXTRA) to it.
+ * Update the description string by appending (EXTRA/PLATFORM/LANG) to it.
+ * Values that are missing are omitted, so e.g. (EXTRA/LANG) would be
+ * added if no platform has been specified but a language and an extra string.
*/
void updateDesc(const char *extra = 0);
void setGUIOptions(uint32 options);
void appendGUIOptions(const Common::String &str);
+ /**
+ * What level of support is expected of this game
+ */
+ GameSupportLevel getSupportLevel();
+ void setSupportLevel(GameSupportLevel gsl);
+
Common::String &gameid() { return getVal("gameid"); }
Common::String &description() { return getVal("description"); }
const Common::String &gameid() const { return getVal("gameid"); }
diff --git a/engines/gob/inter_fascin.cpp b/engines/gob/inter_fascin.cpp
index bab1975abc..081b48fbad 100644
--- a/engines/gob/inter_fascin.cpp
+++ b/engines/gob/inter_fascin.cpp
@@ -174,7 +174,7 @@ void Inter_Fascination::oFascin_assign(OpFuncParams &params) {
case TYPE_VAR_INT32_AS_INT16:
case TYPE_ARRAY_INT16:
- WRITE_VARO_UINT16(dest + i * 2, _vm->_game->_script->getResultInt());
+ WRITE_VARO_UINT16(dest + i * 2, _vm->_game->_script->getResultInt());
break;
case TYPE_VAR_INT32:
diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp
index e2c952952d..7fb3104162 100644
--- a/engines/gob/video_v6.cpp
+++ b/engines/gob/video_v6.cpp
@@ -124,7 +124,7 @@ void Video_v6::drawYUV(Surface &destDesc, int16 x, int16 y,
Pixel dstRow = dst;
int nextChromaLine = (i < ((height - 1) & ~3) ) ? dataWidth : 0;
-
+
for (int j = 0; j < width; j++, dstRow++) {
int nextChromaColumn = (j < ((width - 1) & ~3)) ? 1 : 0;
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index 2065307ca9..62887bac1e 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -131,7 +131,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"11h", "",
AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227),
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS,
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE,
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM
},
kGroovieV2, 1
@@ -142,7 +142,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"11h", "Demo",
AD_ENTRY1s("disk.1", "aacb32ce07e0df2894bd83a3dee40c12", 70),
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, Common::GUIO_NOLAUNCHLOAD |
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, Common::GUIO_NOLAUNCHLOAD |
Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM
},
kGroovieV2, 1
@@ -153,7 +153,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"11h", "Making Of",
AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227),
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NOMIDI | Common::GUIO_NOLAUNCHLOAD
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI | Common::GUIO_NOLAUNCHLOAD
},
kGroovieV2, 2
},
@@ -163,7 +163,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"clandestiny", "Trailer",
AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227),
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NOMIDI | Common::GUIO_NOLAUNCHLOAD
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI | Common::GUIO_NOLAUNCHLOAD
},
kGroovieV2, 3
},
@@ -173,7 +173,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"clandestiny", "",
AD_ENTRY1s("disk.1", "f79fc1515174540fef6a34132efc4c53", 76),
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NOMIDI
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI
},
kGroovieV2, 1
},
@@ -183,7 +183,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"unclehenry", "",
AD_ENTRY1s("disk.1", "0e1b1d3cecc4fc7efa62a968844d1f7a", 72),
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NOMIDI
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI
},
kGroovieV2, 1
},
@@ -193,7 +193,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{
"tlc", "",
AD_ENTRY1s("disk.1", "32a1afa68478f1f9d2b25eeea427f2e3", 84),
- Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NOMIDI
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, Common::GUIO_NOMIDI
},
kGroovieV2, 1
},
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index 33fc986193..c6e990dfcf 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -801,17 +801,17 @@ bool MusicPlayerIOS::load(uint32 fileref, bool loop) {
19468 ambient (but not 69, amb b. odd)
19470 puzzle
19471
- 19473
+ 19473
19475 coffins or blood pump
19476 blood pump or coffins
19493
19499 chapel
19509 downstair ambient
19510 bedroom 'skip 3 and 5' puzzle (should loop from partway?)
- 19514
+ 19514
19515 bathroom drain teeth
*/
- if ((fileref >= 19462 && fileref <= 19468) ||
+ if ((fileref >= 19462 && fileref <= 19468) ||
fileref == 19470 || fileref == 19471 ||
fileref == 19473 || fileref == 19475 ||
fileref == 19476 || fileref == 19493 ||
@@ -849,7 +849,7 @@ bool MusicPlayerIOS::load(uint32 fileref, bool loop) {
updateVolume();
// Play!
- _vm->_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_handle, audStream);
+ _vm->_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_handle, audStream);
return true;
}
diff --git a/engines/groovie/player.h b/engines/groovie/player.h
index d8135a99b2..c9258ffdbd 100644
--- a/engines/groovie/player.h
+++ b/engines/groovie/player.h
@@ -53,8 +53,8 @@ protected:
Common::SeekableReadStream *_file;
uint16 _flags;
Audio::QueuingAudioStream *_audioStream;
-
-
+
+
private:
// Synchronization stuff
bool _begunPlaying;
diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp
index a0463db0be..14e7a09cb2 100644
--- a/engines/groovie/saveload.cpp
+++ b/engines/groovie/saveload.cpp
@@ -102,7 +102,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s
// Fill the SaveStateDescriptor if it was provided
if (descriptor) {
// Initialize the SaveStateDescriptor
- descriptor->setVal("save_slot", Common::String('0' + slot));
+ descriptor->setSaveSlot(slot);
descriptor->setDeletableFlag(true);
descriptor->setWriteProtectedFlag(false);
@@ -132,7 +132,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s
description += c;
}
}
- descriptor->setVal("description", description);
+ descriptor->setDescription(description);
}
// Return a substream, skipping the metadata
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index f87e6bb91b..5a24559e8b 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -1350,15 +1350,15 @@ void Script::o_checkvalidsaves() {
uint count = 0;
SaveStateList::iterator it = list.begin();
while (it != list.end()) {
- int8 slot = it->getVal("save_slot").lastChar() - '0';
+ int8 slot = it->getSaveSlot();
if (SaveLoad::isSlotValid(slot)) {
- debugScript(2, true, " Found valid savegame: %s", it->getVal("description").c_str());
+ debugScript(2, true, " Found valid savegame: %s", it->getDescription().c_str());
// Mark this slot as used
setVariable(slot, 1);
// Cache this slot's description
- _saveNames[slot] = it->getVal("description");
+ _saveNames[slot] = it->getDescription();
count++;
}
it++;
diff --git a/engines/hugo/console.cpp b/engines/hugo/console.cpp
index 0a67b5cd0a..19fd91e3fa 100644
--- a/engines/hugo/console.cpp
+++ b/engines/hugo/console.cpp
@@ -64,8 +64,8 @@ bool HugoConsole::Cmd_gotoScreen(int argc, const char **argv) {
if ((argc != 2) || (strToInt(argv[1]) > _vm->_numScreens)){
DebugPrintf("Usage: %s <screen number>\n", argv[0]);
return true;
- }
-
+ }
+
_vm->_scheduler->newScreen(strToInt(argv[1]));
return false;
}
@@ -78,7 +78,7 @@ bool HugoConsole::Cmd_listScreens(int argc, const char **argv) {
DebugPrintf("Usage: %s\n", argv[0]);
return true;
}
-
+
DebugPrintf("Available screens for this game are:\n");
for (int i = 0; i < _vm->_numScreens; i++)
DebugPrintf("%2d - %s\n", i, _vm->_text->getScreenNames(i));
@@ -93,7 +93,7 @@ bool HugoConsole::Cmd_listObjects(int argc, const char **argv) {
DebugPrintf("Usage: %s\n", argv[0]);
return true;
}
-
+
DebugPrintf("Available objects for this game are:\n");
for (int i = 0; i < _vm->_object->_numObj; i++) {
if (_vm->_object->_objects[i].genericCmd & TAKE)
@@ -110,7 +110,7 @@ bool HugoConsole::Cmd_getObject(int argc, const char **argv) {
DebugPrintf("Usage: %s <object number>\n", argv[0]);
return true;
}
-
+
if (_vm->_object->_objects[strToInt(argv[1])].genericCmd & TAKE)
_vm->_parser->takeObject(&_vm->_object->_objects[strToInt(argv[1])]);
else
@@ -127,7 +127,7 @@ bool HugoConsole::Cmd_getAllObjects(int argc, const char **argv) {
DebugPrintf("Usage: %s\n", argv[0]);
return true;
}
-
+
for (int i = 0; i < _vm->_object->_numObj; i++) {
if (_vm->_object->_objects[i].genericCmd & TAKE)
_vm->_parser->takeObject(&_vm->_object->_objects[i]);
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index 6c816141f7..c43cdd7b46 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -95,15 +95,15 @@ void TopMenu::reflowLayout() {
_recallButton->resize(x * scale, y * scale, kButtonWidth * scale, kButtonHeight * scale);
x += kButtonWidth + kButtonPad;
-
+
_turboButton->resize(x * scale, y * scale, kButtonWidth * scale, kButtonHeight * scale);
x += kButtonWidth + kButtonPad;
x += kButtonSpace;
-
+
_lookButton->resize(x * scale, y * scale, kButtonWidth * scale, kButtonHeight * scale);
x += kButtonWidth + kButtonPad;
-
+
_inventButton->resize(x * scale, y * scale, kButtonWidth * scale, kButtonHeight * scale);
x += kButtonWidth + kButtonPad;
@@ -133,7 +133,7 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) {
arrayBmp[i * 2 + 1]->create(arrayBmp[i * 2]->w * 2, arrayBmp[i * 2]->h * 2, g_system->getOverlayFormat());
byte *src = (byte *)arrayBmp[i * 2]->pixels;
byte *dst = (byte *)arrayBmp[i * 2 + 1]->pixels;
-
+
for (int j = 0; j < arrayBmp[i * 2]->h; j++) {
src = (byte *)arrayBmp[i * 2]->getBasePtr(0, j);
dst = (byte *)arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2);
@@ -153,7 +153,7 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) {
*dst++ = *src++;
}
}
-
+
in.skip(bmpSize);
}
}
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index c716e80d87..2d35bb0448 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -736,7 +736,7 @@ overlayState_t Screen_v1d::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) {
uint16 index = (uint16)(dst_p - _frontBuffer) >> 3;
for (int i = 0; i < seq_p->lines-y; i++) { // Each line in object
- if (_vm->_object->getBaseBoundary(index)) // If any overlay base byte is non-zero then the object is foreground, else back.
+ if (_vm->_object->getBaseBoundary(index)) // If any overlay base byte is non-zero then the object is foreground, else back.
return kOvlForeground;
index += kCompLineSize;
}
diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp
index 9ebd9d284c..0795923536 100644
--- a/engines/hugo/file_v1d.cpp
+++ b/engines/hugo/file_v1d.cpp
@@ -62,7 +62,7 @@ void FileManager_v1d::readOverlay(const int screenNum, image_pt image, const ovl
Common::String buf = Common::String(_vm->_text->getScreenNames(screenNum)) + Common::String(ovl_ext[overlayType]);
if (!Common::File::exists(buf)) {
- memset(image, 0, sizeof(image));
+ memset(image, 0, kOvlSize);
warning("File not found: %s", buf.c_str());
return;
}
diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp
index eb2226f18a..162019dd2e 100644
--- a/engines/hugo/file_v1w.cpp
+++ b/engines/hugo/file_v1w.cpp
@@ -80,7 +80,7 @@ void FileManager_v1w::readOverlay(const int screenNum, image_pt image, ovl_t ove
break;
}
if (i == 0) {
- memset(image, 0, sizeof(image));
+ memset(image, 0, kOvlSize);
return;
}
_sceneryArchive1.read(tmpImage, kOvlSize);
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index 2a663edcfa..7e44e756d5 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -136,7 +136,7 @@ void FileManager_v2d::readOverlay(const int screenNum, image_pt image, ovl_t ove
break;
}
if (i == 0) {
- memset(image, 0, sizeof(image));
+ memset(image, 0, kOvlSize);
return;
}
diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp
index 7ac0ffc48a..69371bb030 100644
--- a/engines/hugo/file_v3d.cpp
+++ b/engines/hugo/file_v3d.cpp
@@ -143,7 +143,7 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove
break;
}
if (i == 0) {
- memset(image, 0, sizeof(image));
+ memset(image, 0, kOvlSize);
return;
}
@@ -182,7 +182,7 @@ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t ove
break;
}
if (i == 0) {
- memset(image, 0, sizeof(image));
+ memset(image, 0, kOvlSize);
return;
}
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 10d61f25a2..df8abf32eb 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -299,7 +299,7 @@ Common::Error HugoEngine::run() {
_status.helpFl = false;
_file->instructions();
}
-
+
_mouse->mouseHandler(); // Mouse activity - adds to display list
_screen->displayList(kDisplayDisplay); // Blit the display list to screen
_status.doQuitFl |= shouldQuit(); // update game quit flag
@@ -315,7 +315,7 @@ void HugoEngine::initMachine() {
_object->readObjectImages(); // Read all object images
if (_platform == Common::kPlatformWindows)
_file->readUIFImages(); // Read all uif images (only in Win versions)
-
+
_sound->initPcspkrPlayer();
}
@@ -463,7 +463,7 @@ bool HugoEngine::loadHugoDat() {
if (varnt == _gameVariant) {
_numStates = numElem;
_screenStates = (byte *)malloc(sizeof(byte) * numElem);
- memset(_screenStates, 0, sizeof(_screenStates));
+ memset(_screenStates, 0, sizeof(byte) * numElem);
}
}
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 81d194f1d6..125819a39b 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -177,7 +177,7 @@ struct status_t { // Game status (not saved)
bool recallFl; // Toolbar "recall" button pressed
bool newScreenFl; // New screen just loaded in dib_a
bool godModeFl; // Allow DEBUG features in live version
- bool showBoundariesFl; // Flag used to show and hide boundaries,
+ bool showBoundariesFl; // Flag used to show and hide boundaries,
// used by the console
bool doQuitFl;
bool skipIntroFl;
diff --git a/engines/hugo/inventory.h b/engines/hugo/inventory.h
index de9e4cd1f0..666cc37b51 100644
--- a/engines/hugo/inventory.h
+++ b/engines/hugo/inventory.h
@@ -56,7 +56,7 @@ private:
HugoEngine *_vm;
static const int kStepDy = 8; // Pixels per step movement
-
+
int16 _firstIconId; // Index of first icon to display
int16 *_invent;
istate_t _inventoryState; // Inventory icon bar state
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index e888a1d998..e5c7b4bf90 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -157,7 +157,7 @@ void ObjectHandler::useObject(int16 objId) {
if (inventObjId == use->objId) {
// Look for secondary object, if found use matching verb
bool foundFl = false;
-
+
for (target_t *target = use->targets; target->nounIndex != 0; target++)
if (target->nounIndex == obj->nounIndex) {
foundFl = true;
@@ -425,7 +425,7 @@ void ObjectHandler::loadObjectUses(Common::ReadStream &in) {
}
for (int i = 0; i < numElem; i++) {
- if (varnt == _vm->_gameVariant)
+ if (varnt == _vm->_gameVariant)
readUse(in, _uses[i]);
else {
readUse(in, tmpUse);
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 4a53d67377..38a8e4e3ff 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -60,7 +60,7 @@ Parser::~Parser() {
uint16 Parser::getCmdDefaultVerbIdx(const uint16 index) const {
return _cmdList[index][0].verbIndex;
}
-
+
/**
* Read a cmd structure from Hugo.dat
*/
@@ -235,7 +235,7 @@ void Parser::charHandler() {
if (_cmdLineIndex >= kMaxLineSize) {
//MessageBeep(MB_ICONASTERISK);
warning("STUB: MessageBeep() - Command line too long");
- } else if (isprint(c)) {
+ } else if (isprint(static_cast<unsigned char>(c))) {
_cmdLine[_cmdLineIndex++] = c;
_cmdLine[_cmdLineIndex] = '\0';
}
@@ -391,6 +391,8 @@ void Parser::command(const char *format, ...) {
va_list marker;
va_start(marker, format);
+// TODO:
+// _vm->_line = Common::String::vformat(format, marker);
vsprintf(_vm->_line, format, marker);
va_end(marker);
diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h
index faa6dc2303..f8b9d9f13b 100644
--- a/engines/hugo/parser.h
+++ b/engines/hugo/parser.h
@@ -81,9 +81,9 @@ public:
virtual ~Parser();
bool isWordPresent(char **wordArr) const;
-
+
uint16 getCmdDefaultVerbIdx(const uint16 index) const;
-
+
void charHandler();
void command(const char *format, ...);
void freeParser();
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index a099bec21c..d1b4aa6a9c 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -1040,7 +1040,7 @@ void Scheduler::saveActions(Common::WriteStream *f) const {
* Find the index in the action list to be able to serialize the action to save game
*/
void Scheduler::findAction(const act* action, int16* index, int16* subElem) {
-
+
assert(index && subElem);
if (!action) {
*index = -1;
@@ -1106,7 +1106,7 @@ void Scheduler::restoreEvents(Common::ReadStream *f) {
else
_events[i].action = (act*)&_actListArr[index][subElem];
- _events[i].localActionFl = (f->readByte() == 1) ? true : false;
+ _events[i].localActionFl = (f->readByte() == 1) ? true : false;
_events[i].time = f->readUint32BE();
int16 prevIndex = f->readSint16BE();
diff --git a/engines/hugo/schedule.h b/engines/hugo/schedule.h
index e3107809cf..60d51f0673 100644
--- a/engines/hugo/schedule.h
+++ b/engines/hugo/schedule.h
@@ -616,7 +616,7 @@ public:
protected:
virtual const char *getCypher() const;
-
+
void promptAction(act *action);
};
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index 9473536a47..1fea1f4343 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -127,7 +127,7 @@ SoundHandler::SoundHandler(HugoEngine *vm) : _vm(vm) {
curPriority = 0;
pcspkrTimer = 0;
pcspkrOctave = 3;
- pcspkrNoteDuration = 2;
+ pcspkrNoteDuration = 2;
}
SoundHandler::~SoundHandler() {
@@ -290,7 +290,7 @@ void SoundHandler::pcspkr_player() {
} else if (pcspkrTimer >= 0) { // Note still going
return;
}
-
+
// Time to play next note
do {
cmd_note = true;
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp
index a936a23de1..6dc9890c3a 100644
--- a/engines/hugo/util.cpp
+++ b/engines/hugo/util.cpp
@@ -119,7 +119,7 @@ char *strlwr(char *buffer) {
char *result = buffer;
while (*buffer != '\0') {
- if (isupper(*buffer))
+ if (isupper(static_cast<unsigned char>(*buffer)))
*buffer = tolower(*buffer);
buffer++;
}
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index d0baf8a133..4a48ac0674 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -71,11 +71,18 @@ bool Debugger::cmd_loadPalette(int argc, const char **argv) {
}
if (_vm->game() != GI_KYRA1 && _vm->resource()->getFileSize(argv[1]) != 768) {
- uint8 buffer[320*200];
+ uint8 *buffer = new uint8[320 * 200 * sizeof(uint8)];
+ if (!buffer) {
+ DebugPrintf("ERROR: Cannot allocate buffer for screen region!\n");
+ return true;
+ }
+
_vm->screen()->copyRegionToBuffer(5, 0, 0, 320, 200, buffer);
_vm->screen()->loadBitmap(argv[1], 5, 5, 0);
palette.copy(_vm->screen()->getCPagePtr(5), 0, 256);
_vm->screen()->copyBlockToPage(5, 0, 0, 320, 200, buffer);
+
+ delete[] buffer;
} else if (!_vm->screen()->loadPalette(argv[1], palette)) {
DebugPrintf("ERROR: Palette '%s' not found!\n", argv[1]);
return true;
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 47a3c4362a..165eddf599 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -99,6 +99,18 @@ const KYRAGameDescription adGameDescs[] = {
{
"kyra1",
"Extracted",
+ AD_ENTRY1("GEMCUT.EMC", "689b62b7519215c1b2571d466c95624c"),
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NOSPEECH | Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIPCSPK
+ },
+ KYRA1_FLOPPY_FLAGS
+ },
+ {
+ {
+ "kyra1",
+ "Extracted",
AD_ENTRY1("GEMCUT.EMC", "796e44863dd22fa635b042df1bf16673"),
Common::EN_ANY,
Common::kPlatformPC,
@@ -977,6 +989,24 @@ const KYRAGameDescription adGameDescs[] = {
"lol",
"CD",
{
+ { "GENERAL.PAK", 0, "19354b0f464295c38c801d30588df062", -1 },
+ { "L01.PAK", 0, "174d37f21e0336c5d91020f8c58717ef", -1 },
+ { "VOC.PAK", 0, "eb398f09ba3321d872b6174a68a987d9", -1 },
+ { 0, 0, 0, 0 }
+ },
+ Common::RU_RUS,
+ Common::kPlatformPC,
+ ADGF_DROPLANGUAGE | ADGF_CD,
+ Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM | Common::GUIO_MIDIPCSPK
+ },
+ LOL_CD_FLAGS
+ },
+
+ {
+ {
+ "lol",
+ "CD",
+ {
{ "GENERAL.PAK", 0, "05a4f588fb81dc9c0ef1f2ec20d89e24", -1 },
{ "L01.PAK", 0, "759a0ac26808d77ea968bd392355ba1d", -1 },
{ 0, 0, 0, 0 }
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index b9477c950a..29cbe20b23 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -375,7 +375,7 @@ void GUI::updateSaveList(bool excludeQuickSaves) {
s1 = (*i)[i->size()-3];
s2 = (*i)[i->size()-2];
s3 = (*i)[i->size()-1];
- if (!isdigit(s1) || !isdigit(s2) || !isdigit(s3))
+ if (!isdigit(static_cast<unsigned char>(s1)) || !isdigit(static_cast<unsigned char>(s2)) || !isdigit(static_cast<unsigned char>(s3)))
continue;
s1 -= '0';
s2 -= '0';
@@ -643,32 +643,31 @@ void MainMenu::printString(const char *format, int x, int y, int col1, int col2,
if (!format)
return;
- char string[512];
va_list vaList;
va_start(vaList, flags);
- vsprintf(string, format, vaList);
+ Common::String string = Common::String::vformat(format, vaList);
va_end(vaList);
if (flags & 1)
- x -= _screen->getTextWidth(string) >> 1;
+ x -= _screen->getTextWidth(string.c_str()) >> 1;
if (flags & 2)
- x -= _screen->getTextWidth(string);
+ x -= _screen->getTextWidth(string.c_str());
if (_vm->gameFlags().use16ColorMode)
flags &= 3;
if (flags & 4) {
- _screen->printText(string, x - 1, y, _static.altColor, col2);
- _screen->printText(string, x, y + 1, _static.altColor, col2);
+ _screen->printText(string.c_str(), x - 1, y, _static.altColor, col2);
+ _screen->printText(string.c_str(), x, y + 1, _static.altColor, col2);
}
if (flags & 8) {
- _screen->printText(string, x - 1, y, 227, col2);
- _screen->printText(string, x, y + 1, 227, col2);
+ _screen->printText(string.c_str(), x - 1, y, 227, col2);
+ _screen->printText(string.c_str(), x, y + 1, 227, col2);
}
- _screen->printText(string, x, y, col1, col2);
+ _screen->printText(string.c_str(), x, y, col1, col2);
}
} // End of namespace Kyra
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index eac82ec2c5..eba2f8f279 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -576,6 +576,15 @@ void GUI_LoK::setupSavegames(Menu &menu, int num) {
if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i + _savegameOffset]), header))) {
Common::strlcpy(_savegameNames[i], header.description.c_str(), ARRAYSIZE(_savegameNames[0]));
+ // Trim long GMM save descriptions to fit our save slots
+ _screen->_charWidth = -2;
+ int fC = _screen->getTextWidth(_savegameNames[i]);
+ while (_savegameNames[i][0] && (fC > 240 )) {
+ _savegameNames[i][strlen(_savegameNames[i]) - 1] = 0;
+ fC = _screen->getTextWidth(_savegameNames[i]);
+ }
+ _screen->_charWidth = 0;
+
Util::convertISOToDOS(_savegameNames[i]);
menu.item[i].itemString = _savegameNames[i];
@@ -693,12 +702,15 @@ void GUI_LoK::updateSavegameString() {
if (_keyPressed.keycode) {
length = strlen(_savegameName);
+ _screen->_charWidth = -2;
+ int width = _screen->getTextWidth(_savegameName) + 7;
+ _screen->_charWidth = 0;
char inputKey = _keyPressed.ascii;
Util::convertISOToDOS(inputKey);
if ((uint8)inputKey > 31 && (uint8)inputKey < (_vm->gameFlags().lang == Common::JA_JPN ? 128 : 226)) {
- if (length < ARRAYSIZE(_savegameName)-1) {
+ if ((length < ARRAYSIZE(_savegameName)-1) && (width <= 240)) {
_savegameName[length] = inputKey;
_savegameName[length+1] = 0;
redrawTextfield();
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index fb11040168..c64d3e7723 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -2572,9 +2572,19 @@ void GUI_LoL::setupSaveMenuSlots(Menu &menu, int num) {
slotOffs = 1;
}
+ int saveSlotMaxLen = ((_screen->getScreenDim(8))->w << 3) - _screen->getCharWidth('W');
+
for (int i = startSlot; i < num && _savegameOffset + i - slotOffs < _savegameListSize; ++i) {
if (_savegameList[_saveSlots[i + _savegameOffset - slotOffs]]) {
Common::strlcpy(s, _savegameList[_saveSlots[i + _savegameOffset - slotOffs]], 80);
+
+ // Trim long GMM save descriptions to fit our save slots
+ int fC = _screen->getTextWidth(s);
+ while (s[0] && fC >= saveSlotMaxLen) {
+ s[strlen(s) - 1] = 0;
+ fC = _screen->getTextWidth(s);
+ }
+
menu.item[i].itemString = s;
s += (strlen(s) + 1);
menu.item[i].saveSlot = _saveSlots[i + _savegameOffset - slotOffs];
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 0b82df8cd5..dcc53b7c9e 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -457,6 +457,15 @@ void GUI_v2::setupSavegameNames(Menu &menu, int num) {
Common::strlcpy(s, header.description.c_str(), 80);
Util::convertISOToDOS(s);
+ // Trim long GMM save descriptions to fit our save slots
+ _screen->_charWidth = -2;
+ int fC = _screen->getTextWidth(s);
+ while (s[0] && fC > 240) {
+ s[strlen(s) - 1] = 0;
+ fC = _screen->getTextWidth(s);
+ }
+ _screen->_charWidth = 0;
+
menu.item[i].saveSlot = _saveSlots[i + _savegameOffset];
menu.item[i].enabled = true;
delete in;
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 9a4f7bc42e..5c58e6e3ed 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -503,14 +503,6 @@ void KyraEngine_HoF::runLoop() {
int inputFlag = checkInput(_buttonList, true);
removeInputTop();
- if (_updateHandItemCursor) {
- // This works around an issue which would occur when setHandItem(_itemInHand)
- // was called from inside loadGameState(). When loading via GMM the
- // mouse cursor would not be set correctly.
- _updateHandItemCursor = false;
- setHandItem(_itemInHand);
- }
-
update();
if (inputFlag == 198 || inputFlag == 199) {
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index ee67062cdd..7f356f34c1 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -821,14 +821,6 @@ void KyraEngine_LoK::updateMousePointer(bool forceUpdate) {
newY = 4;
}
- if (_updateHandItemCursor) {
- // This works around an issue which would occur when setHandItem(_itemInHand)
- // was called from inside loadGameState(). When loading via GMM the
- // mouse cursor would not be set correctly.
- _updateHandItemCursor = false;
- setHandItem(_itemInHand);
- }
-
if ((newMouseState && _mouseState != newMouseState) || (newMouseState && forceUpdate)) {
_mouseState = newMouseState;
_screen->hideMouse();
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 973ab25088..f5bcd04ea0 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -908,14 +908,6 @@ void KyraEngine_MR::runLoop() {
int inputFlag = checkInput(_mainButtonList, true);
removeInputTop();
- if (_updateHandItemCursor) {
- // This works around an issue which would occur when setHandItem(_itemInHand)
- // was called from inside loadGameState(). When loading via GMM the
- // mouse cursor would not be set correctly.
- _updateHandItemCursor = false;
- setHandItem(_itemInHand);
- }
-
update();
_timer->update();
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index f79fabf9eb..3b2c9b67eb 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -56,7 +56,6 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
_gameToLoad = -1;
_mouseState = -1;
- _updateHandItemCursor = false;
_deathHandler = -1;
memset(_flagsTable, 0, sizeof(_flagsTable));
@@ -84,7 +83,9 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
}
void KyraEngine_v1::pauseEngineIntern(bool pause) {
- _sound->pause(pause);
+ Engine::pauseEngineIntern(pause);
+ if (_sound)
+ _sound->pause(pause);
_timer->pause(pause);
}
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 5b4f3385a4..83455f3922 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -73,27 +73,21 @@ class KyraMetaEngine;
* Kyrandia 2 Russian (no feature request)
* Kyrandia 3 Russian (feature request #2812792 "Kyrandia3 Russian")
*
- * The primary maintainer for the engine is LordHoto, although some parts are maintained by _athrxx.
- * If you have questions about parts of the code, the following rough description might help in
- * determining who you should ask:
- * _athrxx is the maintainer for the Lands of Lore subengine, he also maintains most of the FM-TOWNS
- * and PC98 specific code (especially the sound code, also some ingame code) and the Kyrandia 2
- * sequence player code.
- * LordHoto is responsible for the rest of the codebase, he also worked on the graphics output for 16
- * color PC98 games.
+ * The engine is maintained by _athrxx.
*
* Other people who worked on this engine include cyx, who initially started to work on Kyrandia 1
* support, vinterstum, who did various things for Kyrandia 1 and started to work on the Kyrandia 2
* sequence player code and also on the TIM script code, and eriktorbjorn, who helped out naming
* our AdLib player code and also contributed a work around for a music bug in the "Pool of Sorrow"
- * scene of Kyrandia 1, which is also present in the original. All three mentioned developers are
- * not actively working on KYRA anymore.
+ * scene of Kyrandia 1, which is also present in the original. LordHoto worked on Kyrandia 1 to 3
+ * support and graphics output for 16 color PC98 games and was a maintainer of the Kyrandia part.
+ * All mentioned developers are not actively working on KYRA anymore.
*
* The engine is mostly finished code wise. A possible remaining task is proper refactoring,
* which might help in reducing binary size and along with it runtime memory use, but of course
* might lead to regressions (since the current code makes no problems on our low end ports, it
* is pretty minor priority though, since the benefit would be mostly nicer code). The biggest
- * task left is the kyra.dat handling, which is currently being revised by LordHoto.
+ * task left is the kyra.dat handling.
*
* Games using this engine:
* - The Legend of Kyrandia (fully supported, except for Macintosh port, which lacks sound)
@@ -343,9 +337,6 @@ protected:
virtual void setHandItem(Item item) = 0;
virtual void removeHandItem() = 0;
- void setDelayedCursorUpdate() { _updateHandItemCursor = true; }
- bool _updateHandItemCursor;
-
// game flags
uint8 _flagsTable[100]; // TODO: check this value
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index c567cbb037..2cca4fd4e3 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -935,14 +935,6 @@ void LoLEngine::runLoop() {
checkFloatingPointerRegions();
gui_updateInput();
- if (_updateHandItemCursor) {
- // This works around an issue which would occur when setHandItem(_itemInHand)
- // was called from inside loadGameState(). When loading via GMM the
- // mouse cursor would not be set correctly.
- _updateHandItemCursor = false;
- setHandItem(_itemInHand);
- }
-
update();
if (_sceneUpdateRequired)
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index 943bb7f8d5..06a4f29f63 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -717,7 +717,7 @@ private:
int olol_setScriptTimer(EMCState *script);
int olol_createHandItem(EMCState *script);
int olol_playAttackSound(EMCState *script);
- int olol_characterJoinsParty(EMCState *script);
+ int olol_addRemoveCharacter(EMCState *script);
int olol_giveItem(EMCState *script);
int olol_loadTimScript(EMCState *script);
int olol_runTimScript(EMCState *script);
diff --git a/engines/kyra/saveload_hof.cpp b/engines/kyra/saveload_hof.cpp
index b395a38acd..645bd2903f 100644
--- a/engines/kyra/saveload_hof.cpp
+++ b/engines/kyra/saveload_hof.cpp
@@ -306,7 +306,7 @@ Common::Error KyraEngine_HoF::loadGameState(int slot) {
_mainCharacter.facing = 4;
enterNewScene(_mainCharacter.sceneId, _mainCharacter.facing, 0, 0, 1);
- setDelayedCursorUpdate();
+ setHandItem(_itemInHand);
if (_lastMusicCommand >= 0 && !_unkSceneScreenFlag1)
snd_playWanderScoreViaMap(_lastMusicCommand, 1);
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index 7689a904b0..34762d4c92 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -170,7 +170,7 @@ Common::Error KyraEngine_LoK::loadGameState(int slot) {
_screen->copyRegion(8, 8, 8, 8, 304, 212, 10, 0);
}
- setDelayedCursorUpdate();
+ setHandItem(_itemInHand);
// Will-O-Wisp uses a different shape size than Brandon's usual
// shape, thus we need to setup the correct size depending on
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index c81ace26f0..07842ea358 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -257,7 +257,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
int t = _credits;
_credits = 0;
giveCredits(t, 0);
- setDelayedCursorUpdate();
+ setHandItem(_itemInHand);
loadLevel(_currentLevel);
gui_drawPlayField();
timerSpecialCharacterUpdate(0);
diff --git a/engines/kyra/saveload_mr.cpp b/engines/kyra/saveload_mr.cpp
index 0fd3e520f9..139375264f 100644
--- a/engines/kyra/saveload_mr.cpp
+++ b/engines/kyra/saveload_mr.cpp
@@ -305,7 +305,7 @@ Common::Error KyraEngine_MR::loadGameState(int slot) {
_goodConsciencePosition = false;
enterNewScene(_mainCharacter.sceneId, _mainCharacter.facing, 0, 0, 1);
- setDelayedCursorUpdate();
+ setHandItem(_itemInHand);
if (_lastMusicCommand >= 0 && !_unkSceneScreenFlag1)
snd_playWanderScoreViaMap(_lastMusicCommand, 1);
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index b4304a6de0..8f008a58b6 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -3359,7 +3359,7 @@ void SJISFont::drawChar(uint16 c, byte *dst, int pitch) const {
color2 = _colorMap[0];
}
- _font->drawChar(dst, c, 640, 1, color1, color2);
+ _font->drawChar(dst, c, 640, 1, color1, color2, 640, 400);
}
#pragma mark -
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 695528b8d1..1afefcffa4 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -1088,33 +1088,27 @@ int LoLEngine::olol_playAttackSound(EMCState *script) {
return 1;
}
-int LoLEngine::olol_characterJoinsParty(EMCState *script) {
- debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_characterJoinsParty(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2));
+int LoLEngine::olol_addRemoveCharacter(EMCState *script) {
+ debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_addRemoveCharacter(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2));
int16 id = stackPos(0);
- if (id < 0)
+ if (id < 0) {
id = -id;
+ for (int i = 0; i < 4; i++) {
+ if (!(_characters[i].flags & 1) || _characters[i].id != id)
+ continue;
- for (int i = 0; i < 4; i++) {
- if (!(_characters[i].flags & 1) || _characters[i].id != id)
- continue;
-
- _characters[i].flags &= 0xfffe;
- calcCharPortraitXpos();
+ _characters[i].flags &= 0xfffe;
+ calcCharPortraitXpos();
- if (!_updateFlags) {
- gui_enableDefaultPlayfieldButtons();
- gui_drawPlayField();
+ if (_selectedCharacter == i)
+ _selectedCharacter = 0;
+ break;
}
-
- if (_selectedCharacter == i)
- _selectedCharacter = 0;
-
- return 1;
+ } else {
+ addCharacter(id);
}
- addCharacter(id);
-
if (!_updateFlags) {
gui_enableDefaultPlayfieldButtons();
gui_drawPlayField();
@@ -2823,7 +2817,7 @@ void LoLEngine::setupOpcodeTable() {
Opcode(olol_setScriptTimer);
Opcode(olol_createHandItem);
Opcode(olol_playAttackSound);
- Opcode(olol_characterJoinsParty);
+ Opcode(olol_addRemoveCharacter);
// 0x4C
Opcode(olol_giveItem);
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 01bf3c5e26..27f3951faf 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -202,7 +202,7 @@ void LoLEngine::setupPrologueData(bool load) {
void LoLEngine::showIntro() {
_tim = new TIMInterpreter(this, _screen, _system);
assert(_tim);
-
+
if (_flags.platform == Common::kPlatformPC98)
showStarcraftLogo();
@@ -1115,7 +1115,7 @@ void LoLEngine::showOutro(int character, bool maxDifficulty) {
showCredits();
_eventList.clear();
-
+
if (!shouldQuit()) {
switch (character) {
case 0:
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 3713537afd..4da35cc28b 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -43,10 +43,6 @@ Sound::Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer)
Sound::~Sound() {
}
-void Sound::pause(bool paused) {
- _mixer->pauseAll(paused);
-}
-
bool Sound::voiceFileIsPresent(const char *file) {
for (int i = 0; _supportedCodecs[i].fileext; ++i) {
Common::String f = file;
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index 566b37ff43..c3c32331be 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -156,7 +156,7 @@ public:
/**
* Stops all audio playback when paused. Continues after end of pause.
*/
- virtual void pause(bool paused);
+ virtual void pause(bool paused) {}
void enableMusic(int enable) { _musicEnabled = enable; }
int musicEnabled() const { return _musicEnabled; }
diff --git a/engines/kyra/sound_intern.h b/engines/kyra/sound_intern.h
index 2ba0890789..be3c09de96 100644
--- a/engines/kyra/sound_intern.h
+++ b/engines/kyra/sound_intern.h
@@ -140,7 +140,7 @@ private:
uint8 _sfxChannel;
TownsEuphonyDriver *_driver;
-
+
bool _cdaPlaying;
const uint8 *_musicFadeTable;
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index dc0f8c11ec..26b6b31d0a 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -716,9 +716,6 @@ void SoundMidiPC::beginFadeOut() {
}
void SoundMidiPC::pause(bool paused) {
- // Stop all mixer related sounds
- Sound::pause(paused);
-
Common::StackLock lock(_mutex);
if (paused) {
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 73d435f3e5..012f1f5d7d 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -107,11 +107,11 @@ void SoundTowns::haltTrack() {
g_system->getAudioCDManager()->stop();
g_system->getAudioCDManager()->updateCD();
_cdaPlaying = false;
-
+
for (int i = 0; i < 6; i++)
_driver->chanVolume(i, 0);
for (int i = 0x40; i < 0x46; i++)
- _driver->chanVolume(i, 0);
+ _driver->chanVolume(i, 0);
for (int i = 0; i < 32; i++)
_driver->configChan_enable(i, 0);
_driver->stopParser();
@@ -128,7 +128,7 @@ void SoundTowns::loadSoundFile(uint file) {
void SoundTowns::playSoundEffect(uint8 track) {
if (!_sfxEnabled || !_sfxFileData)
return;
-
+
if (track == 0 || track == 10) {
stopAllSoundEffects();
return;
@@ -258,13 +258,13 @@ void SoundTowns::beginFadeOut() {
uint16 fadeVolCur[12];
uint16 fadeVolStep[12];
-
+
for (int i = 0; i < 6; i++) {
fadeVolCur[i] = READ_LE_UINT16(&_musicFadeTable[(_lastTrack * 12 + i) * 2]);
fadeVolStep[i] = fadeVolCur[i] / 50;
fadeVolCur[i + 6] = READ_LE_UINT16(&_musicFadeTable[(_lastTrack * 12 + 6 + i) * 2]);
fadeVolStep[i + 6] = fadeVolCur[i + 6] / 30;
- }
+ }
for (int i = 0; i < 12; i++) {
for (int ii = 0; ii < 6; ii++)
@@ -344,7 +344,7 @@ void SoundTowns::playEuphonyTrack(uint32 offset, int loop) {
uint32 trackSize = READ_LE_UINT32(_musicTrackData + 2048);
uint8 startTick = _musicTrackData[2052];
-
+
_driver->setMusicTempo(_musicTrackData[2053]);
src = _musicTrackData + 2054;
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index 1cbf7672d1..28d30ec7d1 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -77,7 +77,7 @@ bool Animation::load(Common::SeekableReadStream *stream, int flag) {
// Check if there is enough data
if (_stream->size() - _stream->pos() < (signed)(numChunks * sizeof(Chunk))) {
- debugC(2, kLastExpressDebugGraphics, "NIS file seems to be corrupted!");
+ debugC(2, kLastExpressDebugGraphics, "NIS file seems to be corrupted");
return false;
}
@@ -101,10 +101,10 @@ bool Animation::load(Common::SeekableReadStream *stream, int flag) {
bool Animation::process() {
if (!_currentChunk)
- error("Animation::process - internal error: the current chunk iterator is invalid!");
+ error("[Animation::process] Current chunk iterator is invalid");
if (_stream == NULL || _chunks.size() == 0)
- error("Trying to show an animation before loading data");
+ error("[Animation::process] Trying to show an animation before loading data");
// TODO: - subtract the time paused by the GUI
// - Re-implement to be closer to the original engine
@@ -191,7 +191,7 @@ bool Animation::process() {
break;
default:
- error(" UNKNOWN chunk type=%x frame=%d size=%d", _currentChunk->type, _currentChunk->frame, _currentChunk->size);
+ error("[Animation::process] UNKNOWN chunk type=%x frame=%d size=%d", _currentChunk->type, _currentChunk->frame, _currentChunk->size);
break;
}
_currentChunk++;
@@ -206,7 +206,7 @@ bool Animation::hasEnded() {
Common::Rect Animation::draw(Graphics::Surface *surface) {
if (!_overlay)
- error("Animation::draw - internal error: the current overlay animation frame is invalid!");
+ error("[Animation::draw] Current overlay animation frame is invalid");
// Paint the background
if (_backgroundCurrent == 1 && _background1)
@@ -242,7 +242,7 @@ AnimFrame *Animation::processChunkFrame(Common::SeekableReadStream *in, const Ch
void Animation::processChunkAudio(Common::SeekableReadStream *in, const Chunk &c) {
if (!_audio)
- error("Animation::processChunkAudio - internal error: the audio stream is invalid!");
+ error("[Animation::processChunkAudio] Audio stream is invalid");
// Skip the Snd header, to queue just the audio blocks
uint32 size = c.size;
diff --git a/engines/lastexpress/data/background.cpp b/engines/lastexpress/data/background.cpp
index de6fd7eeae..3d866c26f9 100644
--- a/engines/lastexpress/data/background.cpp
+++ b/engines/lastexpress/data/background.cpp
@@ -85,7 +85,7 @@ bool Background::load(Common::SeekableReadStream *stream) {
Common::Rect Background::draw(Graphics::Surface *surface) {
if (!_data) {
- debugC(2, kLastExpressDebugGraphics, "Trying to show a background before loading data!");
+ debugC(2, kLastExpressDebugGraphics, "Trying to show a background before loading data");
return Common::Rect();
}
diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp
index 9a60b88a25..79cf64e617 100644
--- a/engines/lastexpress/data/font.cpp
+++ b/engines/lastexpress/data/font.cpp
@@ -89,17 +89,17 @@ bool Font::load(Common::SeekableReadStream *stream) {
uint16 Font::getCharGlyph(uint16 c) const {
//warning("%c", c);
if (c >= 0x200)
- error("Express::Font: Invalid character %d", c);
+ error("[Font::getCharGlyph] Invalid character %d", c);
return _charMap[c];
}
byte *Font::getGlyphImg(uint16 g) {
if (!_glyphs)
- error("Express::getGlyphImg: Invalid glyphs!");
+ error("[Font::getGlyphImg] Invalid glyphs");
if (g >= _numGlyphs)
- error("Express::getGlyphImg: Invalid glyph %d (%d available)", g, _numGlyphs);
+ error("[Font::getGlyphImg] Invalid glyph %d (%d available)", g, _numGlyphs);
return _glyphs + g * 18 * 8;
}
@@ -140,7 +140,7 @@ uint8 Font::getCharWidth(uint16 c) const{
return 10;
} else {
if (!_glyphWidths)
- error("Express::getCharWidth: Invalid glyphs widths!");
+ error("[Font::getCharWidth] Invalid glyphs widths");
return _glyphWidths[getCharGlyph(c)];
}
diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp
index 2ec8e6935d..8f279ffbb3 100644
--- a/engines/lastexpress/data/scene.cpp
+++ b/engines/lastexpress/data/scene.cpp
@@ -187,10 +187,10 @@ bool Scene::checkHotSpot(const Common::Point &coord, SceneHotspot **hotspot) {
SceneHotspot *Scene::getHotspot(uint index) {
if (_hotspots.empty())
- error("Scene::getHotspot: scene does not have any hotspots!");
+ error("[Scene::getHotspot] Scene does not have any hotspots");
if (index >= _hotspots.size())
- error("Scene::getHotspot: invalid index (was: %d, max: %d)", index, _hotspots.size() - 1);
+ error("[Scene::getHotspot] Invalid index (was: %d, max: %d)", index, _hotspots.size() - 1);
return _hotspots[index];
}
@@ -202,7 +202,7 @@ Common::Rect Scene::draw(Graphics::Surface *surface) {
Common::String sceneName(_name);
sceneName.trim();
if (sceneName.empty())
- error("Scene::draw: This scene is not a valid drawing scene!");
+ error("[Scene::draw] This scene is not a valid drawing scene");
// Load background
Background *background = ((LastExpressEngine *)g_engine)->getResourceManager()->loadBackground(sceneName);
@@ -260,7 +260,7 @@ bool SceneLoader::load(Common::SeekableReadStream *stream) {
// Read the default scene to get the total number of scenes
Scene *header = Scene::load(_stream);
if (!header)
- error("SceneLoader::load: Invalid data file!");
+ error("[SceneLoader::load] Invalid data file");
debugC(2, kLastExpressDebugScenes, " found %d entries", header->entityPosition); /* Header entityPosition is the scene count */
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index a27c27de2e..a62348f6c0 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -115,7 +115,7 @@ AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f) : _pale
decompFF(in, f);
break;
default:
- error("Unknown frame compression: %d", f.compressionType);
+ error("[AnimFrame::AnimFrame] Unknown frame compression: %d", f.compressionType);
}
readPalette(in, f);
@@ -379,11 +379,11 @@ bool Sequence::load(Common::SeekableReadStream *stream, byte field30) {
// Move stream to start of frame
_stream->seek((int32)(_sequenceHeaderSize + i * _sequenceFrameSize), SEEK_SET);
if (_stream->eos())
- error("Couldn't seek to the current frame data");
+ error("[Sequence::load] Couldn't seek to the current frame data");
// Check if there is enough data
if ((unsigned)(_stream->size() - _stream->pos()) < _sequenceFrameSize)
- error("The sequence frame does not have a valid header");
+ error("[Sequence::load] The sequence frame does not have a valid header");
FrameInfo info;
info.read(_stream, true);
@@ -397,10 +397,10 @@ bool Sequence::load(Common::SeekableReadStream *stream, byte field30) {
FrameInfo *Sequence::getFrameInfo(uint16 index) {
if (_frames.size() == 0)
- error("Trying to decode a sequence before loading its data");
+ error("[Sequence::getFrameInfo] Trying to decode a sequence before loading its data");
if (index > _frames.size() - 1)
- error("Invalid sequence frame requested: %d, max %d", index, _frames.size() - 1);
+ error("[Sequence::getFrameInfo] Invalid sequence frame requested: %d, max %d", index, _frames.size() - 1);
return &_frames[index];
}
@@ -463,14 +463,14 @@ bool SequenceFrame::nextFrame() {
FrameInfo *SequenceFrame::getInfo() {
if (!_sequence)
- error("SequenceFrame::getFrameInfo: Invalid sequence!");
+ error("[SequenceFrame::getInfo] Invalid sequence");
return _sequence->getFrameInfo(_frame);
}
Common::String SequenceFrame::getName() {
if (!_sequence)
- error("SequenceFrame::getName: Invalid sequence!");
+ error("[SequenceFrame::getName] Invalid sequence");
return _sequence->getName();
}
diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp
index 3ffe3ca14b..6845be8808 100644
--- a/engines/lastexpress/data/snd.cpp
+++ b/engines/lastexpress/data/snd.cpp
@@ -36,16 +36,336 @@
namespace LastExpress {
+#pragma region Sound filters tables
+
+static const int stepTable[1424] = {
+ 0, 0, 0, 0, 128, 256, 384, 512, 0, 0, 0, 0, 128, 256,
+ 384, 512, 0, 0, 0, 0, 192, 320, 448, 576, 0, 0, 0, 0,
+ 192, 320, 448, 576, 64, 64, 64, 64, 256, 384, 512, 640,
+ 64, 64, 64, 64, 256, 384, 512, 640, 128, 128, 128, 128,
+ 320, 448, 576, 704, 128, 128, 128, 128, 320, 448, 576,
+ 704, 192, 192, 192, 192, 384, 512, 640, 768, 192, 192,
+ 192, 192, 384, 512, 640, 768, 256, 256, 256, 256, 448,
+ 576, 704, 832, 256, 256, 256, 256, 448, 576, 704, 832,
+ 320, 320, 320, 320, 512, 640, 768, 896, 320, 320, 320,
+ 320, 512, 640, 768, 896, 384, 384, 384, 384, 576, 704,
+ 832, 960, 384, 384, 384, 384, 576, 704, 832, 960, 448,
+ 448, 448, 448, 640, 768, 896, 1024, 448, 448, 448, 448,
+ 640, 768, 896, 1024, 512, 512, 512, 512, 704, 832, 960,
+ 1088, 512, 512, 512, 512, 704, 832, 960, 1088, 576,
+ 576, 576, 576, 768, 896, 1024, 1152, 576, 576, 576,
+ 576, 768, 896, 1024, 1152, 640, 640, 640, 640, 832,
+ 960, 1088, 1216, 640, 640, 640, 640, 832, 960, 1088,
+ 1216, 704, 704, 704, 704, 896, 1024, 1152, 1280, 704,
+ 704, 704, 704, 896, 1024, 1152, 1280, 768, 768, 768,
+ 768, 960, 1088, 1216, 1344, 768, 768, 768, 768, 960,
+ 1088, 1216, 1344, 832, 832, 832, 832, 1024, 1152, 1280,
+ 1408, 832, 832, 832, 832, 1024, 1152, 1280, 1408, 896,
+ 896, 896, 896, 1088, 1216, 1344, 1472, 896, 896, 896,
+ 896, 1088, 1216, 1344, 1472, 960, 960, 960, 960, 1152,
+ 1280, 1408, 1536, 960, 960, 960, 960, 1152, 1280, 1408,
+ 1536, 1024, 1024, 1024, 1024, 1216, 1344, 1472, 1600,
+ 1024, 1024, 1024, 1024, 1216, 1344, 1472, 1600, 1088,
+ 1088, 1088, 1088, 1280, 1408, 1536, 1664, 1088, 1088,
+ 1088, 1088, 1280, 1408, 1536, 1664, 1152, 1152, 1152,
+ 1152, 1344, 1472, 1600, 1728, 1152, 1152, 1152, 1152,
+ 1344, 1472, 1600, 1728, 1216, 1216, 1216, 1216, 1408,
+ 1536, 1664, 1792, 1216, 1216, 1216, 1216, 1408, 1536,
+ 1664, 1792, 1280, 1280, 1280, 1280, 1472, 1600, 1728,
+ 1856, 1280, 1280, 1280, 1280, 1472, 1600, 1728, 1856,
+ 1344, 1344, 1344, 1344, 1536, 1664, 1792, 1920, 1344,
+ 1344, 1344, 1344, 1536, 1664, 1792, 1920, 1408, 1408,
+ 1408, 1408, 1600, 1728, 1856, 1984, 1408, 1408, 1408,
+ 1408, 1600, 1728, 1856, 1984, 1472, 1472, 1472, 1472,
+ 1664, 1792, 1920, 2048, 1472, 1472, 1472, 1472, 1664,
+ 1792, 1920, 2048, 1536, 1536, 1536, 1536, 1728, 1856,
+ 1984, 2112, 1536, 1536, 1536, 1536, 1728, 1856, 1984,
+ 2112, 1600, 1600, 1600, 1600, 1792, 1920, 2048, 2176,
+ 1600, 1600, 1600, 1600, 1792, 1920, 2048, 2176, 1664,
+ 1664, 1664, 1664, 1856, 1984, 2112, 2240, 1664, 1664,
+ 1664, 1664, 1856, 1984, 2112, 2240, 1728, 1728, 1728,
+ 1728, 1920, 2048, 2176, 2304, 1728, 1728, 1728, 1728,
+ 1920, 2048, 2176, 2304, 1792, 1792, 1792, 1792, 1984,
+ 2112, 2240, 2368, 1792, 1792, 1792, 1792, 1984, 2112,
+ 2240, 2368, 1856, 1856, 1856, 1856, 2048, 2176, 2304,
+ 2432, 1856, 1856, 1856, 1856, 2048, 2176, 2304, 2432,
+ 1920, 1920, 1920, 1920, 2112, 2240, 2368, 2496, 1920,
+ 1920, 1920, 1920, 2112, 2240, 2368, 2496, 1984, 1984,
+ 1984, 1984, 2176, 2304, 2432, 2560, 1984, 1984, 1984,
+ 1984, 2176, 2304, 2432, 2560, 2048, 2048, 2048, 2048,
+ 2240, 2368, 2496, 2624, 2048, 2048, 2048, 2048, 2240,
+ 2368, 2496, 2624, 2112, 2112, 2112, 2112, 2304, 2432,
+ 2560, 2688, 2112, 2112, 2112, 2112, 2304, 2432, 2560,
+ 2688, 2176, 2176, 2176, 2176, 2368, 2496, 2624, 2752,
+ 2176, 2176, 2176, 2176, 2368, 2496, 2624, 2752, 2240,
+ 2240, 2240, 2240, 2432, 2560, 2688, 2816, 2240, 2240,
+ 2240, 2240, 2432, 2560, 2688, 2816, 2304, 2304, 2304,
+ 2304, 2496, 2624, 2752, 2880, 2304, 2304, 2304, 2304,
+ 2496, 2624, 2752, 2880, 2368, 2368, 2368, 2368, 2560,
+ 2688, 2816, 2944, 2368, 2368, 2368, 2368, 2560, 2688,
+ 2816, 2944, 2432, 2432, 2432, 2432, 2624, 2752, 2880,
+ 3008, 2432, 2432, 2432, 2432, 2624, 2752, 2880, 3008,
+ 2496, 2496, 2496, 2496, 2688, 2816, 2944, 3072, 2496,
+ 2496, 2496, 2496, 2688, 2816, 2944, 3072, 2560, 2560,
+ 2560, 2560, 2752, 2880, 3008, 3136, 2560, 2560, 2560,
+ 2560, 2752, 2880, 3008, 3136, 2624, 2624, 2624, 2624,
+ 2816, 2944, 3072, 3200, 2624, 2624, 2624, 2624, 2816,
+ 2944, 3072, 3200, 2688, 2688, 2688, 2688, 2880, 3008,
+ 3136, 3264, 2688, 2688, 2688, 2688, 2880, 3008, 3136,
+ 3264, 2752, 2752, 2752, 2752, 2944, 3072, 3200, 3328,
+ 2752, 2752, 2752, 2752, 2944, 3072, 3200, 3328, 2816,
+ 2816, 2816, 2816, 3008, 3136, 3264, 3392, 2816, 2816,
+ 2816, 2816, 3008, 3136, 3264, 3392, 2880, 2880, 2880,
+ 2880, 3072, 3200, 3328, 3456, 2880, 2880, 2880, 2880,
+ 3072, 3200, 3328, 3456, 2944, 2944, 2944, 2944, 3136,
+ 3264, 3392, 3520, 2944, 2944, 2944, 2944, 3136, 3264,
+ 3392, 3520, 3008, 3008, 3008, 3008, 3200, 3328, 3456,
+ 3584, 3008, 3008, 3008, 3008, 3200, 3328, 3456, 3584,
+ 3072, 3072, 3072, 3072, 3264, 3392, 3520, 3648, 3072,
+ 3072, 3072, 3072, 3264, 3392, 3520, 3648, 3136, 3136,
+ 3136, 3136, 3328, 3456, 3584, 3712, 3136, 3136, 3136,
+ 3136, 3328, 3456, 3584, 3712, 3200, 3200, 3200, 3200,
+ 3392, 3520, 3648, 3776, 3200, 3200, 3200, 3200, 3392,
+ 3520, 3648, 3776, 3264, 3264, 3264, 3264, 3456, 3584,
+ 3712, 3840, 3264, 3264, 3264, 3264, 3456, 3584, 3712,
+ 3840, 3328, 3328, 3328, 3328, 3520, 3648, 3776, 3904,
+ 3328, 3328, 3328, 3328, 3520, 3648, 3776, 3904, 3392,
+ 3392, 3392, 3392, 3584, 3712, 3840, 3968, 3392, 3392,
+ 3392, 3392, 3584, 3712, 3840, 3968, 3456, 3456, 3456,
+ 3456, 3648, 3776, 3904, 4032, 3456, 3456, 3456, 3456,
+ 3648, 3776, 3904, 4032, 3520, 3520, 3520, 3520, 3712,
+ 3840, 3968, 4096, 3520, 3520, 3520, 3520, 3712, 3840,
+ 3968, 4096, 3584, 3584, 3584, 3584, 3776, 3904, 4032,
+ 4160, 3584, 3584, 3584, 3584, 3776, 3904, 4032, 4160,
+ 3648, 3648, 3648, 3648, 3840, 3968, 4096, 4224, 3648,
+ 3648, 3648, 3648, 3840, 3968, 4096, 4224, 3712, 3712,
+ 3712, 3712, 3904, 4032, 4160, 4288, 3712, 3712, 3712,
+ 3712, 3904, 4032, 4160, 4288, 3776, 3776, 3776, 3776,
+ 3968, 4096, 4224, 4352, 3776, 3776, 3776, 3776, 3968,
+ 4096, 4224, 4352, 3840, 3840, 3840, 3840, 4032, 4160,
+ 4288, 4416, 3840, 3840, 3840, 3840, 4032, 4160, 4288,
+ 4416, 3904, 3904, 3904, 3904, 4096, 4224, 4352, 4480,
+ 3904, 3904, 3904, 3904, 4096, 4224, 4352, 4480, 3968,
+ 3968, 3968, 3968, 4160, 4288, 4416, 4544, 3968, 3968,
+ 3968, 3968, 4160, 4288, 4416, 4544, 4032, 4032, 4032,
+ 4032, 4224, 4352, 4480, 4608, 4032, 4032, 4032, 4032,
+ 4224, 4352, 4480, 4608, 4096, 4096, 4096, 4096, 4288,
+ 4416, 4544, 4672, 4096, 4096, 4096, 4096, 4288, 4416,
+ 4544, 4672, 4160, 4160, 4160, 4160, 4352, 4480, 4608,
+ 4736, 4160, 4160, 4160, 4160, 4352, 4480, 4608, 4736,
+ 4224, 4224, 4224, 4224, 4416, 4544, 4672, 4800, 4224,
+ 4224, 4224, 4224, 4416, 4544, 4672, 4800, 4288, 4288,
+ 4288, 4288, 4480, 4608, 4736, 4864, 4288, 4288, 4288,
+ 4288, 4480, 4608, 4736, 4864, 4352, 4352, 4352, 4352,
+ 4544, 4672, 4800, 4928, 4352, 4352, 4352, 4352, 4544,
+ 4672, 4800, 4928, 4416, 4416, 4416, 4416, 4608, 4736,
+ 4864, 4992, 4416, 4416, 4416, 4416, 4608, 4736, 4864,
+ 4992, 4480, 4480, 4480, 4480, 4672, 4800, 4928, 5056,
+ 4480, 4480, 4480, 4480, 4672, 4800, 4928, 5056, 4544,
+ 4544, 4544, 4544, 4736, 4864, 4992, 5120, 4544, 4544,
+ 4544, 4544, 4736, 4864, 4992, 5120, 4608, 4608, 4608,
+ 4608, 4800, 4928, 5056, 5184, 4608, 4608, 4608, 4608,
+ 4800, 4928, 5056, 5184, 4672, 4672, 4672, 4672, 4864,
+ 4992, 5120, 5248, 4672, 4672, 4672, 4672, 4864, 4992,
+ 5120, 5248, 4736, 4736, 4736, 4736, 4928, 5056, 5184,
+ 5312, 4736, 4736, 4736, 4736, 4928, 5056, 5184, 5312,
+ 4800, 4800, 4800, 4800, 4992, 5120, 5248, 5376, 4800,
+ 4800, 4800, 4800, 4992, 5120, 5248, 5376, 4864, 4864,
+ 4864, 4864, 5056, 5184, 5312, 5440, 4864, 4864, 4864,
+ 4864, 5056, 5184, 5312, 5440, 4928, 4928, 4928, 4928,
+ 5120, 5248, 5376, 5504, 4928, 4928, 4928, 4928, 5120,
+ 5248, 5376, 5504, 4992, 4992, 4992, 4992, 5184, 5312,
+ 5440, 5568, 4992, 4992, 4992, 4992, 5184, 5312, 5440,
+ 5568, 5056, 5056, 5056, 5056, 5248, 5376, 5504, 5632,
+ 5056, 5056, 5056, 5056, 5248, 5376, 5504, 5632, 5120,
+ 5120, 5120, 5120, 5312, 5440, 5568, 5632, 5120, 5120,
+ 5120, 5120, 5312, 5440, 5568, 5632, 5184, 5184, 5184,
+ 5184, 5376, 5504, 5632, 5632, 5184, 5184, 5184, 5184,
+ 5376, 5504, 5632, 5632, 5248, 5248, 5248, 5248, 5440,
+ 5568, 5632, 5632, 5248, 5248, 5248, 5248, 5440, 5568,
+ 5632, 5632, 5312, 5312, 5312, 5312, 5504, 5632, 5632,
+ 5632, 5312, 5312, 5312, 5312, 5504, 5632, 5632, 5632,
+ 5376, 5376, 5376, 5376, 5568, 5632, 5632, 5632, 5376,
+ 5376, 5376, 5376, 5568, 5632, 5632, 5632, 5440, 5440,
+ 5440, 5440, 5632, 5632, 5632, 5632, 5440, 5440, 5440,
+ 5440, 5632, 5632, 5632, 5632, 5504, 5504, 5504, 5504,
+ 5632, 5632, 5632, 5632, 5504, 5504, 5504, 5504, 5632,
+ 5632, 5632, 5632, 5568, 5568, 5568, 5568, 5632, 5632,
+ 5632, 5632, 5568, 5568, 5568, 5568, 5632, 5632, 5632,
+ 5632
+};
+
+static const int imaTable[1424] = {
+ 0, 2, 4, 6, 7, 9, 11, 13, 0, -2, -4, -6, -7, -9, -11,
+ -13, 1, 3, 5, 7, 9, 11, 13, 15, -1, -3, -5, -7, -9,
+ -11, -13, -15, 1, 3, 5, 7, 10, 12, 14, 16, -1, -3, -5,
+ -7, -10, -12, -14, -16, 1, 3, 6, 8, 11, 13, 16, 18,
+ -1, -3, -6, -8, -11, -13, -16, -18, 1, 4, 6, 9, 12,
+ 15, 17, 20, -1, -4, -6, -9, -12, -15, -17, -20, 1, 4,
+ 7, 10, 13, 16, 19, 22, -1, -4, -7, -10, -13, -16, -19,
+ -22, 1, 4, 8, 11, 14, 17, 21, 24, -1, -4, -8, -11, -14,
+ -17, -21, -24, 1, 5, 8, 12, 15, 19, 22, 26, -1, -5,
+ -8, -12, -15, -19, -22, -26, 2, 6, 10, 14, 18, 22, 26,
+ 30, -2, -6, -10, -14, -18, -22, -26, -30, 2, 6, 10,
+ 14, 19, 23, 27, 31, -2, -6, -10, -14, -19, -23, -27,
+ -31, 2, 7, 11, 16, 21, 26, 30, 35, -2, -7, -11, -16,
+ -21, -26, -30, -35, 2, 7, 13, 18, 23, 28, 34, 39, -2,
+ -7, -13, -18, -23, -28, -34, -39, 2, 8, 14, 20, 25,
+ 31, 37, 43, -2, -8, -14, -20, -25, -31, -37, -43, 3,
+ 9, 15, 21, 28, 34, 40, 46, -3, -9, -15, -21, -28, -34,
+ -40, -46, 3, 10, 17, 24, 31, 38, 45, 52, -3, -10, -17,
+ -24, -31, -38, -45, -52, 3, 11, 19, 27, 34, 42, 50,
+ 58, -3, -11, -19, -27, -34, -42, -50, -58, 4, 12, 21,
+ 29, 38, 46, 55, 63, -4, -12, -21, -29, -38, -46, -55,
+ -63, 4, 13, 23, 32, 41, 50, 60, 69, -4, -13, -23, -32,
+ -41, -50, -60, -69, 5, 15, 25, 35, 46, 56, 66, 76, -5,
+ -15, -25, -35, -46, -56, -66, -76, 5, 16, 28, 39, 50,
+ 61, 73, 84, -5, -16, -28, -39, -50, -61, -73, -84, 6,
+ 18, 31, 43, 56, 68, 81, 93, -6, -18, -31, -43, -56,
+ -68, -81, -93, 6, 20, 34, 48, 61, 75, 89, 103, -6, -20,
+ -34, -48, -61, -75, -89, -103, 7, 22, 37, 52, 67, 82,
+ 97, 112, -7, -22, -37, -52, -67, -82, -97, -112, 8,
+ 24, 41, 57, 74, 90, 107, 123, -8, -24, -41, -57, -74,
+ -90, -107, -123, 9, 27, 45, 63, 82, 100, 118, 136, -9,
+ -27, -45, -63, -82, -100, -118, -136, 10, 30, 50, 70,
+ 90, 110, 130, 150, -10, -30, -50, -70, -90, -110, -130,
+ -150, 11, 33, 55, 77, 99, 121, 143, 165, -11, -33, -55,
+ -77, -99, -121, -143, -165, 12, 36, 60, 84, 109, 133,
+ 157, 181, -12, -36, -60, -84, -109, -133, -157, -181,
+ 13, 40, 66, 93, 120, 147, 173, 200, -13, -40, -66, -93,
+ -120, -147, -173, -200, 14, 44, 73, 103, 132, 162, 191,
+ 221, -14, -44, -73, -103, -132, -162, -191, -221, 16,
+ 48, 81, 113, 146, 178, 211, 243, -16, -48, -81, -113,
+ -146, -178, -211, -243, 17, 53, 89, 125, 160, 196, 232,
+ 268, -17, -53, -89, -125, -160, -196, -232, -268, 19,
+ 58, 98, 137, 176, 215, 255, 294, -19, -58, -98, -137,
+ -176, -215, -255, -294, 21, 64, 108, 151, 194, 237,
+ 281, 324, -21, -64, -108, -151, -194, -237, -281, -324,
+ 23, 71, 118, 166, 213, 261, 308, 356, -23, -71, -118,
+ -166, -213, -261, -308, -356, 26, 78, 130, 182, 235,
+ 287, 339, 391, -26, -78, -130, -182, -235, -287, -339,
+ -391, 28, 86, 143, 201, 258, 316, 373, 431, -28, -86,
+ -143, -201, -258, -316, -373, -431, 31, 94, 158, 221,
+ 284, 347, 411, 474, -31, -94, -158, -221, -284, -347,
+ -411, -474, 34, 104, 174, 244, 313, 383, 453, 523, -34,
+ -104, -174, -244, -313, -383, -453, -523, 38, 115, 191,
+ 268, 345, 422, 498, 575, -38, -115, -191, -268, -345,
+ -422, -498, -575, 42, 126, 210, 294, 379, 463, 547,
+ 631, -42, -126, -210, -294, -379, -463, -547, -631,
+ 46, 139, 231, 324, 417, 510, 602, 695, -46, -139, -231,
+ -324, -417, -510, -602, -695, 51, 153, 255, 357, 459,
+ 561, 663, 765, -51, -153, -255, -357, -459, -561, -663,
+ -765, 56, 168, 280, 392, 505, 617, 729, 841, -56, -168,
+ -280, -392, -505, -617, -729, -841, 61, 185, 308, 432,
+ 555, 679, 802, 926, -61, -185, -308, -432, -555, -679,
+ -802, -926, 68, 204, 340, 476, 612, 748, 884, 1020,
+ -68, -204, -340, -476, -612, -748, -884, -1020, 74,
+ 224, 373, 523, 672, 822, 971, 1121, -74, -224, -373,
+ -523, -672, -822, -971, -1121, 82, 246, 411, 575, 740,
+ 904, 1069, 1233, -82, -246, -411, -575, -740, -904,
+ -1069, -1233, 90, 271, 452, 633, 814, 995, 1176, 1357,
+ -90, -271, -452, -633, -814, -995, -1176, -1357, 99,
+ 298, 497, 696, 895, 1094, 1293, 1492, -99, -298, -497,
+ -696, -895, -1094, -1293, -1492, 109, 328, 547, 766,
+ 985, 1204, 1423, 1642, -109, -328, -547, -766, -985,
+ -1204, -1423, -1642, 120, 361, 601, 842, 1083, 1324,
+ 1564, 1805, -120, -361, -601, -842, -1083, -1324, -1564,
+ -1805, 132, 397, 662, 927, 1192, 1457, 1722, 1987, -132,
+ -397, -662, -927, -1192, -1457, -1722, -1987, 145, 437,
+ 728, 1020, 1311, 1603, 1894, 2186, -145, -437, -728,
+ -1020, -1311, -1603, -1894, -2186, 160, 480, 801, 1121,
+ 1442, 1762, 2083, 2403, -160, -480, -801, -1121, -1442,
+ -1762, -2083, -2403, 176, 529, 881, 1234, 1587, 1940,
+ 2292, 2645, -176, -529, -881, -1234, -1587, -1940, -2292,
+ -2645, 194, 582, 970, 1358, 1746, 2134, 2522, 2910,
+ -194, -582, -970, -1358, -1746, -2134, -2522, -2910,
+ 213, 640, 1066, 1493, 1920, 2347, 2773, 3200, -213,
+ -640, -1066, -1493, -1920, -2347, -2773, -3200, 234,
+ 704, 1173, 1643, 2112, 2582, 3051, 3521, -234, -704,
+ -1173, -1643, -2112, -2582, -3051, -3521, 258, 774,
+ 1291, 1807, 2324, 2840, 3357, 3873, -258, -774, -1291,
+ -1807, -2324, -2840, -3357, -3873, 284, 852, 1420, 1988,
+ 2556, 3124, 3692, 4260, -284, -852, -1420, -1988, -2556,
+ -3124, -3692, -4260, 312, 937, 1561, 2186, 2811, 3436,
+ 4060, 4685, -312, -937, -1561, -2186, -2811, -3436,
+ -4060, -4685, 343, 1030, 1718, 2405, 3092, 3779, 4467,
+ 5154, -343, -1030, -1718, -2405, -3092, -3779, -4467,
+ -5154, 378, 1134, 1890, 2646, 3402, 4158, 4914, 5670,
+ -378, -1134, -1890, -2646, -3402, -4158, -4914, -5670,
+ 415, 1247, 2079, 2911, 3742, 4574, 5406, 6238, -415,
+ -1247, -2079, -2911, -3742, -4574, -5406, -6238, 457,
+ 1372, 2287, 3202, 4117, 5032, 5947, 6862, -457, -1372,
+ -2287, -3202, -4117, -5032, -5947, -6862, 503, 1509,
+ 2516, 3522, 4529, 5535, 6542, 7548, -503, -1509, -2516,
+ -3522, -4529, -5535, -6542, -7548, 553, 1660, 2767,
+ 3874, 4981, 6088, 7195, 8302, -553, -1660, -2767, -3874,
+ -4981, -6088, -7195, -8302, 608, 1826, 3044, 4262, 5479,
+ 6697, 7915, 9133, -608, -1826, -3044, -4262, -5479,
+ -6697, -7915, -9133, 669, 2009, 3348, 4688, 6027, 7367,
+ 8706, 10046, -669, -2009, -3348, -4688, -6027, -7367,
+ -8706, -10046, 736, 2210, 3683, 5157, 6630, 8104, 9577,
+ 11051, -736, -2210, -3683, -5157, -6630, -8104, -9577,
+ -11051, 810, 2431, 4052, 5673, 7294, 8915, 10536, 12157,
+ -810, -2431, -4052, -5673, -7294, -8915, -10536, -12157,
+ 891, 2674, 4457, 6240, 8023, 9806, 11589, 13372, -891,
+ -2674, -4457, -6240, -8023, -9806, -11589, -13372, 980,
+ 2941, 4903, 6864, 8825, 10786, 12748, 14709, -980, -2941,
+ -4903, -6864, -8825, -10786, -12748, -14709, 1078, 3236,
+ 5393, 7551, 9708, 11866, 14023, 16181, -1078, -3236,
+ -5393, -7551, -9708, -11866, -14023, -16181, 1186, 3559,
+ 5933, 8306, 10679, 13052, 15426, 17799, -1186, -3559,
+ -5933, -8306, -10679, -13052, -15426, -17799, 1305,
+ 3915, 6526, 9136, 11747, 14357, 16968, 19578, -1305,
+ -3915, -6526, -9136, -11747, -14357, -16968, -19578,
+ 1435, 4307, 7179, 10051, 12922, 15794, 18666, 21538,
+ -1435, -4307, -7179, -10051, -12922, -15794, -18666,
+ -21538, 1579, 4738, 7896, 11055, 14214, 17373, 20531,
+ 23690, -1579, -4738, -7896, -11055, -14214, -17373,
+ -20531, -23690, 1737, 5212, 8686, 12161, 15636, 19111,
+ 22585, 26060, -1737, -5212, -8686, -12161, -15636, -19111,
+ -22585, -26060, 1911, 5733, 9555, 13377, 17200, 21022,
+ 24844, 28666, -1911, -5733, -9555, -13377, -17200, -21022,
+ -24844, -28666, 2102, 6306, 10511, 14715, 18920, 23124,
+ 27329, 31533, -2102, -6306, -10511, -14715, -18920,
+ -23124, -27329, -31533, 2312, 6937, 11562, 16187, 20812,
+ 25437, 30062, 32767, -2312, -6937, -11562, -16187, -20812,
+ -25437, -30062, -32767, 2543, 7631, 12718, 17806, 22893,
+ 27981, 32767, 32767, -2543, -7631, -12718, -17806, -22893,
+ -27981, -32767, -32767, 2798, 8394, 13990, 19586, 25183,
+ 30779, 32767, 32767, -2798, -8394, -13990, -19586, -25183,
+ -30779, -32767, -32767, 3077, 9233, 15389, 21545, 27700,
+ 32767, 32767, 32767, -3077, -9233, -15389, -21545, -27700,
+ -32767, -32767, -32767, 3385, 10157, 16928, 23700, 30471,
+ 32767, 32767, 32767, -3385, -10157, -16928, -23700,
+ -30471, -32767, -32767, -32767, 3724, 11172, 18621,
+ 26069, 32767, 32767, 32767, 32767, -3724, -11172, -18621,
+ -26069, -32767, -32767, -32767, -32767, 4095, 12287,
+ 20479, 28671, 32767, 32767, 32767, 32767, -4095, -12287,
+ -20479, -28671, -32767, -32767, -32767, -32767
+};
+
+static const int p1s[17] = { 0, 4, 3, 4, 2, 4, 3, 4, 1, 4, 3, 4, 2, 4, 3, 4, 0 };
+static const int p2s[17] = { 0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1 };
+
+#pragma endregion
+
// Last Express ADPCM is similar to MS IMA mono, but inverts its nibbles
// and does not have the 4 byte per channel requirement
-class LastExpress_ADPCMStream : public Audio::Ima_ADPCMStream {
+class LastExpress_ADPCMStream : public Audio::ADPCMStream {
public:
- LastExpress_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, uint32 blockSize) :
- Audio::Ima_ADPCMStream(stream, disposeAfterUse, size, 44100, 1, blockSize) {}
+ LastExpress_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, uint32 blockSize, int32 filterId) :
+ Audio::ADPCMStream(stream, disposeAfterUse, size, 44100, 1, blockSize) {
+ _currentFilterId = -1;
+ _nextFilterId = filterId;
+ }
int readBuffer(int16 *buffer, const int numSamples) {
int samples = 0;
+ // Temporary data
+ int step = 0;
+ int sample = 0;
+ byte idx = 0;
assert(numSamples % 2 == 0);
@@ -53,20 +373,50 @@ public:
if (_blockPos[0] == _blockAlign) {
// read block header
_status.ima_ch[0].last = _stream->readSint16LE();
- _status.ima_ch[0].stepIndex = _stream->readSint16LE();
+ _status.ima_ch[0].stepIndex = _stream->readSint16LE() << 6;
_blockPos[0] = 4;
+
+ // Get current filter
+ _currentFilterId = _nextFilterId;
+ _nextFilterId = -1;
+
+ // No filter: skip decoding
+ if (_currentFilterId == -1)
+ break;
+
+ // Compute step adjustment
+ _stepAdjust1 = p1s[_currentFilterId];
+ _stepAdjust2 = p2s[_currentFilterId];
}
for (; samples < numSamples && _blockPos[0] < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
byte data = _stream->readByte();
_blockPos[0]++;
- buffer[samples] = decodeIMA((data >> 4) & 0x0f);
- buffer[samples + 1] = decodeIMA(data & 0x0f);
+
+ // First nibble
+ idx = data >> 4;
+ step = stepTable[idx + _status.ima_ch[0].stepIndex / 4];
+ sample = CLIP(imaTable[idx + _status.ima_ch[0].stepIndex / 4] + _status.ima_ch[0].last, -32767, 32767);
+ buffer[samples] = (_stepAdjust2 * sample) >> _stepAdjust1;
+
+ // Second nibble
+ idx = data & 0xF;
+ _status.ima_ch[0].stepIndex = stepTable[idx + step / 4];
+ _status.ima_ch[0].last = CLIP(imaTable[idx + step / 4] + sample, -32767, 32767);
+ buffer[samples + 1] = (_stepAdjust2 * _status.ima_ch[0].last) >> _stepAdjust1;
}
}
return samples;
}
+
+ void setFilterId(int32 filterId) { _nextFilterId = filterId; }
+
+private:
+ int32 _currentFilterId;
+ int32 _nextFilterId; // the sound filter id, -1 for none
+ int32 _stepAdjust1;
+ int32 _stepAdjust2;
};
//////////////////////////////////////////////////////////////////////////
@@ -92,8 +442,8 @@ void SimpleSound::loadHeader(Common::SeekableReadStream *in) {
_blockSize = _size / _blocks;
}
-Audio::AudioStream *SimpleSound::makeDecoder(Common::SeekableReadStream *in, uint32 size) const {
- return new LastExpress_ADPCMStream(in, DisposeAfterUse::YES, size, _blockSize);
+Audio::AudioStream *SimpleSound::makeDecoder(Common::SeekableReadStream *in, uint32 size, int32 filterId) const {
+ return new LastExpress_ADPCMStream(in, DisposeAfterUse::YES, size, _blockSize, filterId);
}
void SimpleSound::play(Audio::AudioStream *as) {
@@ -103,10 +453,11 @@ void SimpleSound::play(Audio::AudioStream *as) {
//////////////////////////////////////////////////////////////////////////
// StreamedSound
//////////////////////////////////////////////////////////////////////////
-StreamedSound::StreamedSound() {}
+StreamedSound::StreamedSound() : _as(NULL), _loaded(false) {}
+
StreamedSound::~StreamedSound() {}
-bool StreamedSound::load(Common::SeekableReadStream *stream) {
+bool StreamedSound::load(Common::SeekableReadStream *stream, int32 filterId) {
if (!stream)
return false;
@@ -115,14 +466,27 @@ bool StreamedSound::load(Common::SeekableReadStream *stream) {
loadHeader(stream);
// Start decoding the input stream
- Audio::AudioStream *as = makeDecoder(stream, _size);
+ _as = makeDecoder(stream, _size, filterId);
// Start playing the decoded audio stream
- play(as);
+ play(_as);
+
+ _loaded = true;
return true;
}
+bool StreamedSound::isFinished() {
+ if (!_loaded)
+ return false;
+
+ return !g_system->getMixer()->isSoundHandleActive(_handle);
+}
+
+void StreamedSound::setFilterId(int32 filterId) {
+ ((LastExpress_ADPCMStream *)_as)->setFilterId(filterId);
+}
+
//////////////////////////////////////////////////////////////////////////
// StreamedSound
//////////////////////////////////////////////////////////////////////////
@@ -152,7 +516,7 @@ void AppendableSound::queueBuffer(const byte *data, uint32 size) {
void AppendableSound::queueBuffer(Common::SeekableReadStream *bufferIn) {
if (!_as)
- error("AppendableSound::queueBuffer - internal error: the audio stream is invalid!");
+ error("[AppendableSound::queueBuffer] Audio stream is invalid");
// Setup the ADPCM decoder
uint32 sizeIn = (uint32)bufferIn->size();
@@ -164,7 +528,7 @@ void AppendableSound::queueBuffer(Common::SeekableReadStream *bufferIn) {
void AppendableSound::finish() {
if (!_as)
- error("AppendableSound::queueBuffer - internal error: the audio stream is invalid!");
+ error("[AppendableSound::finish] Audio stream is invalid");
if (!_finished)
_as->finish();
@@ -172,4 +536,8 @@ void AppendableSound::finish() {
_finished = true;
}
+bool AppendableSound::isFinished() {
+ return _as->endOfStream();
+}
+
} // End of namespace LastExpress
diff --git a/engines/lastexpress/data/snd.h b/engines/lastexpress/data/snd.h
index 95a136ee1c..7111d939e7 100644
--- a/engines/lastexpress/data/snd.h
+++ b/engines/lastexpress/data/snd.h
@@ -55,10 +55,11 @@ public:
virtual ~SimpleSound();
void stop() const;
+ virtual bool isFinished() = 0;
protected:
void loadHeader(Common::SeekableReadStream *in);
- Audio::AudioStream *makeDecoder(Common::SeekableReadStream *in, uint32 size) const;
+ Audio::AudioStream *makeDecoder(Common::SeekableReadStream *in, uint32 size, int32 filterId = -1) const;
void play(Audio::AudioStream *as);
uint32 _size; ///< data size
@@ -75,7 +76,14 @@ public:
StreamedSound();
~StreamedSound();
- bool load(Common::SeekableReadStream *stream);
+ bool load(Common::SeekableReadStream *stream, int32 filterId = -1);
+ virtual bool isFinished();
+
+ void setFilterId(int32 filterId);
+
+private:
+ Audio::AudioStream *_as;
+ bool _loaded;
};
class AppendableSound : public SimpleSound {
@@ -87,6 +95,8 @@ public:
void queueBuffer(Common::SeekableReadStream *bufferIn);
void finish();
+ virtual bool isFinished();
+
private:
Audio::QueuingAudioStream *_as;
bool _finished;
diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp
index c3a7397b66..0be832cbdd 100644
--- a/engines/lastexpress/data/subtitle.cpp
+++ b/engines/lastexpress/data/subtitle.cpp
@@ -168,13 +168,13 @@ bool SubtitleManager::load(Common::SeekableReadStream *stream) {
// Read header to get the number of subtitles
uint32 numSubtitles = stream->readUint16LE();
if (stream->eos())
- error("Cannot read from subtitle file");
+ error("[SubtitleManager::load] Cannot read from subtitle file");
debugC(3, kLastExpressDebugSubtitle, "Number of subtitles in file: %d", numSubtitles);
// TODO: Check that stream contain enough data
//if (stream->size() < (signed)(numSubtitles * sizeof(SubtitleData))) {
- //debugC(2, kLastExpressDebugSubtitle, "Subtitle file does not contain valid data!");
+ //debugC(2, kLastExpressDebugSubtitle, "Subtitle file does not contain valid data");
//return false;
//}
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 4b7c5f6a9a..dc2807db63 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -31,18 +31,21 @@
#include "lastexpress/data/snd.h"
#include "lastexpress/data/subtitle.h"
+#include "lastexpress/fight/fight.h"
+
#include "lastexpress/game/action.h"
#include "lastexpress/game/beetle.h"
-#include "lastexpress/game/fight.h"
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savegame.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/graphics.h"
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -792,7 +795,7 @@ bool Debugger::cmdFight(int argc, const char **argv) {
restoreArchive();
// Stop audio and restore scene
- getSound()->stopAllSound();
+ getSoundQueue()->stopAllSound();
clearBg(GraphicsManager::kBackgroundAll);
@@ -924,7 +927,7 @@ bool Debugger::cmdBeetle(int argc, const char **argv) {
restoreArchive();
// Stop audio and restore scene
- getSound()->stopAllSound();
+ getSoundQueue()->stopAllSound();
clearBg(GraphicsManager::kBackgroundAll);
diff --git a/engines/lastexpress/detection.cpp b/engines/lastexpress/detection.cpp
index 369d815543..0a177809dd 100644
--- a/engines/lastexpress/detection.cpp
+++ b/engines/lastexpress/detection.cpp
@@ -47,7 +47,7 @@ static const ADGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -65,7 +65,7 @@ static const ADGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -83,7 +83,7 @@ static const ADGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -98,7 +98,7 @@ static const ADGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformUnknown,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -116,7 +116,7 @@ static const ADGameDescription gameDescriptions[] = {
},
Common::FR_FRA,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -127,14 +127,14 @@ static const ADGameDescription gameDescriptions[] = {
"lastexpress",
"",
{
- {"HD.HPF", 0, "7cdd70fc0b1555785f1e9e8d371ea85c", 31301632}, // 1997-04-08 14:33:42
+ {"HD.HPF", 0, "7cdd70fc0b1555785f1e9e8d371ea85c", 31301632}, // 1997-04-08 14:33:42
{"CD1.HPF", 0, "6d74cc861d172466bc745ff8bf0e59c5", 522971136}, // 1997-04-08 13:05:56
{"CD2.HPF", 0, "b71ac9391de415807c74ff078f4fab22", 655702016}, // 1997-04-08 15:26:14
{"CD3.HPF", 0, "ee55d4310546dd2a38560b096d1c2771", 641144832}, // 1997-04-05 18:35:50
},
Common::DE_DEU,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -152,7 +152,7 @@ static const ADGameDescription gameDescriptions[] = {
},
Common::ES_ESP,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -163,14 +163,32 @@ static const ADGameDescription gameDescriptions[] = {
"lastexpress",
"",
{
- {"HD.HPF", 0, "5539e78fd7eecb70bc858e86b5709fe9", 29562880}, // 1997-12-11 14:11:52
+ {"HD.HPF", 0, "5539e78fd7eecb70bc858e86b5709fe9", 29562880}, // 1997-12-11 14:11:52
{"CD1.HPF", 0, "3c1c80b41f2c454b7b89dcb32648796c", 522328064}, // 1997-12-11 14:39:46
{"CD2.HPF", 0, "ea6414d5a718501cfd55de3884f4431d", 665411584}, // 1997-12-11 15:20:26
{"CD3.HPF", 0, "a5bd5b58acddbd951d4551f68de22025", 637718528}, // 1997-12-11 15:58:44
},
Common::IT_ITA,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
+ Common::GUIO_NONE
+ },
+
+ // The Last Express (Russian)
+ // expressw.exe 1999-04-05 15:33:56
+ // express.exe ???
+ {
+ "lastexpress",
+ "",
+ {
+ {"HD.HPF", 0, "a9e915c20f3231c5a1ac4455286971bb", 29908992}, // 1999-04-08 12:43:56
+ {"CD1.HPF", 0, "80fbb95c9228353436b7b38e4b5bb64d", 525805568}, // 1999-04-07 13:30:14
+ {"CD2.HPF", 0, "a1c8c344754e03eaa86eaabc6024709e", 677289984}, // 1999-04-07 16:19:56
+ {"CD3.HPF", 0, "ea5adac447e59ea6d4a1737abad46480", 642584576}, // 1999-04-07 17:26:18
+ },
+ Common::RU_RUS,
+ Common::kPlatformUnknown,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
diff --git a/engines/lastexpress/entities/abbot.cpp b/engines/lastexpress/entities/abbot.cpp
index 29bb31b248..c5c6f2a44d 100644
--- a/engines/lastexpress/entities/abbot.cpp
+++ b/engines/lastexpress/entities/abbot.cpp
@@ -31,9 +31,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -1112,7 +1114,7 @@ IMPLEMENT_FUNCTION(35, Abbot, function35)
case 2:
getData()->location = kLocationOutsideCompartment;
- getSound()->playSound(kEntityAbbot, "Abb3040", SoundManager::kFlagInvalid, 45);
+ getSound()->playSound(kEntityAbbot, "Abb3040", kFlagInvalid, 45);
getEntities()->updatePositionEnter(kEntityAbbot, kCarRestaurant, 57);
setCallback(3);
@@ -1409,7 +1411,7 @@ IMPLEMENT_FUNCTION(43, Abbot, function43)
setup_playSound("Abb4002");
break;
} else {
- if (!getEntities()->isDistanceBetweenEntities(kEntityAbbot, kEntityPlayer, 1000) || getSound()->isBuffered(kEntityBoutarel) || !params->param4)
+ if (!getEntities()->isDistanceBetweenEntities(kEntityAbbot, kEntityPlayer, 1000) || getSoundQueue()->isBuffered(kEntityBoutarel) || !params->param4)
params->param4 = (uint)getState()->time + 450;
if (params->param4 < getState()->time) {
@@ -1754,7 +1756,7 @@ IMPLEMENT_FUNCTION(49, Abbot, pickBomb)
break;
case kActionKnock:
- if (!getSound()->isBuffered("LIB012", true))
+ if (!getSoundQueue()->isBuffered("LIB012", true))
getSound()->playSound(kEntityPlayer, "LIB012");
break;
diff --git a/engines/lastexpress/entities/alexei.cpp b/engines/lastexpress/entities/alexei.cpp
index d723a5607c..073ca3f175 100644
--- a/engines/lastexpress/entities/alexei.cpp
+++ b/engines/lastexpress/entities/alexei.cpp
@@ -29,9 +29,10 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
diff --git a/engines/lastexpress/entities/alouan.cpp b/engines/lastexpress/entities/alouan.cpp
index 715622aaab..cd79870559 100644
--- a/engines/lastexpress/entities/alouan.cpp
+++ b/engines/lastexpress/entities/alouan.cpp
@@ -26,9 +26,10 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
diff --git a/engines/lastexpress/entities/anna.cpp b/engines/lastexpress/entities/anna.cpp
index 0bedda41e8..b13aa21f6d 100644
--- a/engines/lastexpress/entities/anna.cpp
+++ b/engines/lastexpress/entities/anna.cpp
@@ -22,17 +22,20 @@
#include "lastexpress/entities/anna.h"
+#include "lastexpress/fight/fight.h"
+
#include "lastexpress/game/action.h"
#include "lastexpress/game/entities.h"
-#include "lastexpress/game/fight.h"
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -311,7 +314,7 @@ IMPLEMENT_FUNCTION(12, Anna, function12)
params->param4 = 0;
params->param5 = 0;
} else {
- getSound()->removeFromQueue(kEntityAnna);
+ getSoundQueue()->removeFromQueue(kEntityAnna);
getObjects()->update(kObjectCompartmentF, kEntityAnna, kObjectLocation1, kCursorNormal, kCursorNormal);
getObjects()->update(kObject53, kEntityAnna, kObjectLocation1, kCursorNormal, kCursorNormal);
@@ -322,7 +325,7 @@ IMPLEMENT_FUNCTION(12, Anna, function12)
break;
case kActionOpenDoor:
- getSound()->removeFromQueue(kEntityAnna);
+ getSoundQueue()->removeFromQueue(kEntityAnna);
setCallback(3);
setup_playSound("LIB013");
break;
@@ -338,8 +341,8 @@ IMPLEMENT_FUNCTION(12, Anna, function12)
getEntities()->drawSequenceLeft(kEntityAnna, "418C");
- if (getSound()->isBuffered(kEntityAnna))
- getSound()->processEntry(kEntityAnna);
+ if (getSoundQueue()->isBuffered(kEntityAnna))
+ getSoundQueue()->processEntry(kEntityAnna);
getSound()->playSound(kEntityAnna, "ANN2135A");
break;
@@ -378,7 +381,7 @@ IMPLEMENT_FUNCTION(12, Anna, function12)
break;
case 3:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
setCallback(4);
setup_playSound("MAX1120");
break;
@@ -502,7 +505,7 @@ IMPLEMENT_FUNCTION_IS(15, Anna, function15, TimeValue)
break;
case 1:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
setCallback(2);
setup_playSound("MAX1120");
break;
@@ -1455,7 +1458,7 @@ label_callback_1:
case 2:
case 3:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
setCallback(4);
setup_playSound("MAX1120");
break;
@@ -1520,8 +1523,8 @@ IMPLEMENT_FUNCTION(35, Anna, function35)
case kActionKnock:
case kActionOpenDoor:
- if (getSound()->isBuffered(kEntityAnna))
- getSound()->processEntry(kEntityAnna);
+ if (getSoundQueue()->isBuffered(kEntityAnna))
+ getSoundQueue()->processEntry(kEntityAnna);
if (savepoint.action == kActionKnock)
getSound()->playSound(kEntityPlayer, "LIB012");
@@ -1563,8 +1566,8 @@ IMPLEMENT_FUNCTION(35, Anna, function35)
break;
case kAction226031488:
- if (getSound()->isBuffered(kEntityAnna))
- getSound()->processEntry(kEntityAnna);
+ if (getSoundQueue()->isBuffered(kEntityAnna))
+ getSoundQueue()->processEntry(kEntityAnna);
getSavePoints()->push(kEntityAnna, kEntityMax, kAction71277948);
break;
@@ -1843,7 +1846,7 @@ IMPLEMENT_FUNCTION(41, Anna, function41)
case 1:
case 2:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
setCallback(3);
setup_playSound("MAX1120");
break;
@@ -2062,7 +2065,7 @@ IMPLEMENT_FUNCTION(47, Anna, function47)
break;
case 4:
- getSound()->playSound(kEntityAnna, getEvent(kEventAugustLunch) ? "Ann3136" : "Ann3136A", SoundManager::kFlagInvalid, 30);
+ getSound()->playSound(kEntityAnna, getEvent(kEventAugustLunch) ? "Ann3136" : "Ann3136A", kFlagInvalid, 30);
getSavePoints()->push(kEntityAnna, kEntityAugust, kAction122358304);
setCallback(5);
@@ -2089,7 +2092,7 @@ IMPLEMENT_FUNCTION(48, Anna, function48)
break;
if (params->param3 != kTimeInvalid && getState()->time > kTime1969200) {
- UPDATE_PARAM_PROC_TIME(kTime1983600, (!getEntities()->isInRestaurant(kEntityPlayer) || getSound()->isBuffered(kEntityBoutarel)), params->param3, 150)
+ UPDATE_PARAM_PROC_TIME(kTime1983600, (!getEntities()->isInRestaurant(kEntityPlayer) || getSoundQueue()->isBuffered(kEntityBoutarel)), params->param3, 150)
setCallback(3);
setup_playSound("Aug3007A");
break;
@@ -2257,7 +2260,7 @@ IMPLEMENT_FUNCTION(51, Anna, function51)
break;
case kActionDefault:
- getSound()->playSound(kEntityAnna, "Aug3142", SoundManager::kFlagInvalid, 30);
+ getSound()->playSound(kEntityAnna, "Aug3142", kFlagInvalid, 30);
getEntities()->updatePositionEnter(kEntityAnna, kCarRestaurant, 57);
getEntities()->drawSequenceRight(kEntityAnna, "112A");
if (getEntities()->isInRestaurant(kEntityPlayer))
@@ -2480,7 +2483,7 @@ IMPLEMENT_FUNCTION(53, Anna, function53)
break;
case 1:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
setCallback(2);
setup_playSound("MAX1120");
break;
@@ -2619,7 +2622,7 @@ IMPLEMENT_FUNCTION(54, Anna, function54)
break;
case 1:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
setCallback(2);
setup_playSound("MAX1120");
break;
@@ -2788,7 +2791,7 @@ IMPLEMENT_FUNCTION(57, Anna, function57)
break;
case 4:
- if (getSound()->isBuffered(kEntityAugust)) {
+ if (getSoundQueue()->isBuffered(kEntityAugust)) {
setCallback(4);
setup_updateFromTime(75);
} else {
@@ -2816,7 +2819,7 @@ IMPLEMENT_FUNCTION(57, Anna, function57)
case kAction123712592:
getEntities()->drawSequenceLeft(kEntityAnna, "628Af");
- if (getSound()->isBuffered(kEntityAugust)) {
+ if (getSoundQueue()->isBuffered(kEntityAugust)) {
setCallback(4);
setup_updateFromTime(75);
} else {
@@ -3157,8 +3160,8 @@ IMPLEMENT_FUNCTION(63, Anna, function63)
// Anna will get killed...
case kAction272177921:
- if (getSound()->isBuffered("MUS012"))
- getSound()->processEntry("MUS012");
+ if (getSoundQueue()->isBuffered("MUS012"))
+ getSoundQueue()->processEntry("MUS012");
setCallback(1);
setup_savegame(kSavegameTypeEvent, kEventAnnaKilled);
@@ -3840,7 +3843,7 @@ IMPLEMENT_FUNCTION(78, Anna, function78)
case 2:
getAction()->playAnimation(kEventKronosHostageAnna);
getScenes()->loadSceneFromPosition(kCarRestaurant, 61);
- getSound()->playSound(kEntityAnna, "Mus024", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityAnna, "Mus024", kFlagDefault);
setup_function79();
break;
}
@@ -3910,11 +3913,11 @@ IMPLEMENT_FUNCTION(80, Anna, function80)
case kActionNone:
UPDATE_PARAM(params->param1, getState()->timeTicks, 450);
- getSound()->playSound(kEntityPlayer, "Kro5001", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityPlayer, "Kro5001", kFlagDefault);
break;
case kActionEndSound:
- getSound()->playSound(kEntityPlayer, "Kro5002", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityPlayer, "Kro5002", kFlagDefault);
getState()->time = kTime4923000;
setCallback(1);
@@ -3934,12 +3937,12 @@ IMPLEMENT_FUNCTION(80, Anna, function80)
break;
case 1:
- if (getSound()->isBuffered(kEntityAnna))
- getSound()->processEntry(kEntityAnna);
+ if (getSoundQueue()->isBuffered(kEntityAnna))
+ getSoundQueue()->processEntry(kEntityAnna);
getAction()->playAnimation(kEventKronosBringFirebird);
getScenes()->loadSceneFromItem(kItemFirebird);
- getSound()->playSound(kEntityAnna, "Mus025", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityAnna, "Mus025", kFlagDefault);
break;
case 2:
@@ -3950,8 +3953,8 @@ IMPLEMENT_FUNCTION(80, Anna, function80)
case 3:
getProgress().isEggOpen = true;
- if (getSound()->isBuffered(kEntityAnna))
- getSound()->processEntry(kEntityAnna);
+ if (getSoundQueue()->isBuffered(kEntityAnna))
+ getSoundQueue()->processEntry(kEntityAnna);
getAction()->playAnimation(kEventKronosOpenFirebird);
getScenes()->loadSceneFromPosition(kCarRestaurant, 3);
diff --git a/engines/lastexpress/entities/august.cpp b/engines/lastexpress/entities/august.cpp
index f7e7390b90..eb3b09af59 100644
--- a/engines/lastexpress/entities/august.cpp
+++ b/engines/lastexpress/entities/august.cpp
@@ -33,9 +33,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -199,7 +201,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION_S(13, August, playSound16)
- Entity::playSound(savepoint, false, SoundManager::kFlagDefault);
+ Entity::playSound(savepoint, false, kFlagDefault);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
@@ -338,7 +340,7 @@ IMPLEMENT_FUNCTION_II(19, August, function19, bool, bool)
case kAction1:
getData()->inventoryItem = kItemNone;
getSound()->playSound(kEntityPlayer, "CAT1002");
- getSound()->playSound(kEntityAugust, "AUG3101", SoundManager::kFlagInvalid, 15);
+ getSound()->playSound(kEntityAugust, "AUG3101", kFlagInvalid, 15);
break;
case kActionDefault:
@@ -1427,7 +1429,7 @@ IMPLEMENT_FUNCTION(29, August, function29)
if (getState()->time < kTime1134000) {
if (!getEntities()->isInRestaurant(kEntityPlayer)
- || getSound()->isBuffered("MRB1076") || getSound()->isBuffered("MRB1078") || getSound()->isBuffered("MRB1078A"))
+ || getSoundQueue()->isBuffered("MRB1076") || getSoundQueue()->isBuffered("MRB1078") || getSoundQueue()->isBuffered("MRB1078A"))
params->param3 = (uint)getState()->time + 225;
if (params->param3 > getState()->time)
@@ -1762,7 +1764,7 @@ IMPLEMENT_FUNCTION(34, August, function34)
break;
case kActionNone:
- if (!getSound()->isBuffered(kEntityAugust) && getProgress().field_18 != 4)
+ if (!getSoundQueue()->isBuffered(kEntityAugust) && getProgress().field_18 != 4)
getSound()->playSound(kEntityAugust, "AUG1057"); // August snoring
break;
@@ -2179,11 +2181,11 @@ IMPLEMENT_FUNCTION_III(42, August, function42, CarIndex, EntityPosition, bool)
getData()->inventoryItem = kItemNone;
getSound()->playSound(kEntityPlayer, "CAT1002");
- getSound()->playSound(kEntityAugust, getEvent(kEventAugustBringBriefcase) ? "AUG3103" : "AUG3100", SoundManager::kFlagInvalid, 15);
+ getSound()->playSound(kEntityAugust, getEvent(kEventAugustBringBriefcase) ? "AUG3103" : "AUG3100", kFlagInvalid, 15);
break;
case kActionExcuseMe:
- if (!getSound()->isBuffered(kEntityAugust))
+ if (!getSoundQueue()->isBuffered(kEntityAugust))
getSound()->excuseMe(kEntityAugust);
break;
@@ -2385,7 +2387,7 @@ IMPLEMENT_FUNCTION(45, August, function45)
case kAction1:
getData()->inventoryItem = kItemNone;
getSound()->playSound(kEntityPlayer, "CAT1002");
- getSound()->playSound(kEntityAugust, "AUG3102", SoundManager::kFlagInvalid, 15);
+ getSound()->playSound(kEntityAugust, "AUG3102", kFlagInvalid, 15);
break;
case kActionDefault:
@@ -3343,7 +3345,7 @@ IMPLEMENT_FUNCTION(65, August, function65)
getObjects()->update(kObjectCompartment3, kEntityPlayer, kObjectLocation1, kCursorHandKnock, kCursorHand);
- if (!getSound()->isBuffered(kEntityAugust))
+ if (!getSoundQueue()->isBuffered(kEntityAugust))
getSound()->playSound(kEntityAugust, "AUG1057"); // August snoring
break;
}
@@ -3504,9 +3506,9 @@ IMPLEMENT_FUNCTION(69, August, unhookCars)
break;
case kActionDefault:
- getSound()->processEntries();
- if (getSound()->isBuffered("ARRIVE"))
- getSound()->removeFromQueue("ARRIVE");
+ getSoundQueue()->processEntries();
+ if (getSoundQueue()->isBuffered("ARRIVE"))
+ getSoundQueue()->removeFromQueue("ARRIVE");
setCallback(1);
setup_savegame(kSavegameTypeEvent, kEventAugustUnhookCarsBetrayal);
@@ -3516,7 +3518,7 @@ IMPLEMENT_FUNCTION(69, August, unhookCars)
if (getCallback() == 1) {
getAction()->playAnimation(getProgress().field_C ? kEventAugustUnhookCarsBetrayal : kEventAugustUnhookCars);
getEntities()->clearSequences(kEntityAugust);
- getSound()->resetState();
+ getSoundQueue()->resetState();
getSound()->playSound(kEntityPlayer, "MUS050");
getScenes()->loadSceneFromPosition(kCarRestaurant, 85, 1);
getSavePoints()->pushAll(kEntityAugust, kActionProceedChapter5);
diff --git a/engines/lastexpress/entities/boutarel.cpp b/engines/lastexpress/entities/boutarel.cpp
index 0b2040897c..315b12a69e 100644
--- a/engines/lastexpress/entities/boutarel.cpp
+++ b/engines/lastexpress/entities/boutarel.cpp
@@ -29,9 +29,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/scenes.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -214,7 +216,7 @@ IMPLEMENT_FUNCTION_I(11, Boutarel, function11, bool)
break;
case kChapter1:
- getSound()->playSound(kEntityBoutarel, "MRB1075", SoundManager::kFlagInvalid, 60);
+ getSound()->playSound(kEntityBoutarel, "MRB1075", kFlagInvalid, 60);
break;
case kChapter3:
@@ -941,7 +943,7 @@ IMPLEMENT_FUNCTION(29, Boutarel, function29)
if (getEntities()->isInRestaurant(kEntityAnna)
&& getEntities()->isInRestaurant(kEntityAugust)
- && !getSound()->isBuffered(kEntityBoutarel)
+ && !getSoundQueue()->isBuffered(kEntityBoutarel)
&& params->param3 != kTimeInvalid) {
if (getState()->time <= kTime1998000)
diff --git a/engines/lastexpress/entities/chapters.cpp b/engines/lastexpress/entities/chapters.cpp
index 1252a62d8d..96e08ba808 100644
--- a/engines/lastexpress/entities/chapters.cpp
+++ b/engines/lastexpress/entities/chapters.cpp
@@ -57,13 +57,16 @@
#include "lastexpress/game/entities.h"
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
-#include "lastexpress/game/menu.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/menu/menu.h"
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/sound/queue.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
@@ -159,20 +162,20 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
break;
case kActionEndSound:
- getSound()->playSound(kEntityChapters, "MUS0009", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityChapters, "MUS0009", kFlagDefault);
break;
case kActionKnock:
- if (!getSound()->isBuffered("LIB012", true))
+ if (!getSoundQueue()->isBuffered("LIB012", true))
getSound()->playSound(kEntityPlayer, "LIB012");
break;
case kActionOpenDoor:
if (params->param1) {
getEntities()->clearSequences(kEntityChapters);
- getSound()->processEntry(kEntityChapters);
+ getSoundQueue()->processEntry(kEntityChapters);
getSound()->playSound(kEntityPlayer, "LIB014");
- getSound()->resetState();
+ getSoundQueue()->resetState();
ENTITY_PARAM(0, 4) = 7;
@@ -191,10 +194,10 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
CALLBACK_ACTION();
} else {
getSound()->playSound(kEntityPlayer, "LIB014");
- getSound()->playSound(kEntityPlayer, "LIB015", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityPlayer, "LIB015", kFlagDefault, 15);
- if (!getSound()->isBuffered(kEntityChapters))
- getSound()->playSound(kEntityChapters, "MUS009", SoundManager::kFlagDefault);
+ if (!getSoundQueue()->isBuffered(kEntityChapters))
+ getSound()->playSound(kEntityChapters, "MUS009", kFlagDefault);
getScenes()->loadSceneFromPosition(kCarLocomotive, 38);
@@ -240,42 +243,42 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
RESET_ENTITY_STATE(kEntityHadija, Alouan, setup_function12);
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
ENTITY_PARAM(0, 2) = 0;
ENTITY_PARAM(0, 3) = 0;
}
- getSound()->processEntries();
+ getSoundQueue()->processEntries();
- if (getSound()->isBuffered("CON1505"))
- getSound()->processEntry("CON1505");
+ if (getSoundQueue()->isBuffered("CON1505"))
+ getSoundQueue()->processEntry("CON1505");
- if (getSound()->isBuffered("AUG1057"))
- getSound()->processEntry("AUG1057");
+ if (getSoundQueue()->isBuffered("AUG1057"))
+ getSoundQueue()->processEntry("AUG1057");
- if (getSound()->isBuffered("ZFX1005"))
- getSound()->processEntry("ZFX1005");
+ if (getSoundQueue()->isBuffered("ZFX1005"))
+ getSoundQueue()->processEntry("ZFX1005");
- if (getSound()->isBuffered("ZFX1006"))
- getSound()->processEntry("ZFX1006");
+ if (getSoundQueue()->isBuffered("ZFX1006"))
+ getSoundQueue()->processEntry("ZFX1006");
- if (getSound()->isBuffered("ZFX1007"))
- getSound()->processEntry("ZFX1007");
+ if (getSoundQueue()->isBuffered("ZFX1007"))
+ getSoundQueue()->processEntry("ZFX1007");
- if (getSound()->isBuffered("ZFX1007A"))
- getSound()->processEntry("ZFX1007A");
+ if (getSoundQueue()->isBuffered("ZFX1007A"))
+ getSoundQueue()->processEntry("ZFX1007A");
- if (getSound()->isBuffered("ZFX1007B"))
- getSound()->processEntry("ZFX1007B");
+ if (getSoundQueue()->isBuffered("ZFX1007B"))
+ getSoundQueue()->processEntry("ZFX1007B");
- getSound()->playSound(kEntityPlayer, "MUS008", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault);
getInventory()->unselectItem();
// FIXME add event pump ?
- while (getSound()->isBuffered("MUS008"))
- getSound()->updateQueue();
+ while (getSoundQueue()->isBuffered("MUS008"))
+ getSoundQueue()->updateQueue();
getProgress().field_84 = true;
@@ -300,7 +303,7 @@ IMPLEMENT_FUNCTION(6, Chapters, chapter1End)
if (params->param2 >= 3) {
- if (!getSound()->isBuffered("LIB031", true))
+ if (!getSoundQueue()->isBuffered("LIB031", true))
getSound()->playSound(kEntityPlayer, "LIB031");
if (params->param2 == 3) {
@@ -318,7 +321,7 @@ IMPLEMENT_FUNCTION(7, Chapters, chapter1Init)
return;
getProgress().chapter = kChapter1;
- getSound()->resetState();
+ getSoundQueue()->resetState();
getState()->time = kTimeChapter1;
getState()->timeDelta = 0;
@@ -384,7 +387,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
#define PLAY_STEAM() { \
- getSound()->resetState(); \
+ getSoundQueue()->resetState(); \
getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4)); \
ENTITY_PARAM(0, 2) = 0; \
}
@@ -562,7 +565,7 @@ label_chapter1_next:
}
if (ENTITY_PARAM(0, 3)) {
- getSound()->resetState();
+ getSoundQueue()->resetState();
ENTITY_PARAM(0, 3) = 0;
if (params->param4) {
@@ -693,16 +696,16 @@ IMPLEMENT_FUNCTION(9, Chapters, chapter1Next)
if (savepoint.action == kActionDefault) {
// Reset sound cache
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
ENTITY_PARAM(0, 2) = 0;
ENTITY_PARAM(0, 3) = 0;
}
- getSound()->playSound(kEntityPlayer, "MUS008", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault);
getInventory()->unselectItem();
- while (getSound()->isBuffered("MUS008"))
- getSound()->updateQueue();
+ while (getSoundQueue()->isBuffered("MUS008"))
+ getSoundQueue()->updateQueue();
setup_chapter2();
}
@@ -789,7 +792,7 @@ IMPLEMENT_FUNCTION(11, Chapters, chapter2Init)
// Reset sound cache
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
ENTITY_PARAM(0, 2) = 0;
ENTITY_PARAM(0, 3) = 0;
}
@@ -873,7 +876,7 @@ IMPLEMENT_FUNCTION(14, Chapters, chapter3Init)
getObjects()->update(kObject107, kEntityPlayer, kObjectLocation3, kCursorKeepValue, kCursorKeepValue);
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
ENTITY_PARAM(0, 2) = 0;
ENTITY_PARAM(0, 3) = 0;
}
@@ -914,11 +917,11 @@ IMPLEMENT_FUNCTION(15, Chapters, chapter3Handler)
break;
case 0:
- getSound()->playSound(kEntityPlayer, "ZFX1008", (SoundManager::FlagType)(rnd(15) + 2));
+ getSound()->playSound(kEntityPlayer, "ZFX1008", (SoundFlag)(rnd(15) + 2));
break;
case 1:
- getSound()->playSound(kEntityPlayer, "ZFX1009", (SoundManager::FlagType)(rnd(15) + 2));
+ getSound()->playSound(kEntityPlayer, "ZFX1009", (SoundFlag)(rnd(15) + 2));
break;
}
@@ -986,7 +989,7 @@ label_callback_8:
}
}
- getSound()->resetState();
+ getSoundQueue()->resetState();
getSound()->playSteam((CityIndex)ENTITY_PARAM(0, 4));
ENTITY_PARAM(0, 2) = 0;
@@ -997,7 +1000,7 @@ label_callback_8:
}
if (ENTITY_PARAM(0, 3)) {
- getSound()->resetState();
+ getSoundQueue()->resetState();
ENTITY_PARAM(0, 3) = 0;
}
break;
@@ -1149,8 +1152,8 @@ IMPLEMENT_FUNCTION(18, Chapters, chapter4Init)
if (savepoint.action != kActionDefault)
return;
- getSound()->processEntries();
- getSound()->resetState();
+ getSoundQueue()->processEntries();
+ getSoundQueue()->resetState();
getProgress().isTrainRunning = true;
@@ -1176,7 +1179,7 @@ IMPLEMENT_FUNCTION(18, Chapters, chapter4Init)
getObjects()->update(kObject107, kEntityPlayer, kObjectLocation3, kCursorKeepValue, kCursorKeepValue);
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
ENTITY_PARAM(0, 2) = 0;
ENTITY_PARAM(0, 3) = 0;
}
@@ -1213,11 +1216,11 @@ IMPLEMENT_FUNCTION(19, Chapters, chapter4Handler)
break;
case 0:
- getSound()->playSound(kEntityPlayer, "ZFX1008", (SoundManager::FlagType)(rnd(15) + 2));
+ getSound()->playSound(kEntityPlayer, "ZFX1008", (SoundFlag)(rnd(15) + 2));
break;
case 1:
- getSound()->playSound(kEntityPlayer, "ZFX1009", (SoundManager::FlagType)(rnd(15) + 2));
+ getSound()->playSound(kEntityPlayer, "ZFX1009", (SoundFlag)(rnd(15) + 2));
break;
}
@@ -1318,7 +1321,7 @@ label_callback_4:
}
if (ENTITY_PARAM(0, 3)) {
- getSound()->resetState();
+ getSoundQueue()->resetState();
ENTITY_PARAM(0, 3) = 0;
} else if (!params->param2 && !params->param3) {
getSound()->playSound(kEntityChapters, "ZFX1001");
@@ -1355,17 +1358,17 @@ label_callback_4:
goto label_callback_4;
case 5:
- if (getSound()->isBuffered(kEntityChapters))
- getSound()->removeFromQueue(kEntityChapters);
+ if (getSoundQueue()->isBuffered(kEntityChapters))
+ getSoundQueue()->removeFromQueue(kEntityChapters);
getAction()->playAnimation(kEventTrainExplosionBridge);
getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneNone, true);
break;
case 6:
- getSound()->processEntries();
+ getSoundQueue()->processEntries();
getAction()->playAnimation(kEventTylerCastleDream);
- getSound()->resetState();
+ getSoundQueue()->resetState();
getProgress().field_18 = 1;
@@ -1417,7 +1420,7 @@ label_callback_4:
case 11:
getScenes()->loadSceneFromPosition(kCarRedSleeping, 74);
- getSound()->playSound(kEntityTrain, "ZFX4001", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityTrain, "ZFX4001", kFlagDefault);
getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneNone, true);
break;
}
@@ -1464,17 +1467,17 @@ label_callback_4:
params->param1 = 1;
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
ENTITY_PARAM(0, 2) = 0;
ENTITY_PARAM(0, 3) = 0;
}
- getSound()->playSound(kEntityPlayer, "MUS008", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityPlayer, "MUS008", kFlagDefault);
getInventory()->unselectItem();
- while (getSound()->isBuffered("MUS008"))
- getSound()->updateQueue();
+ while (getSoundQueue()->isBuffered("MUS008"))
+ getSoundQueue()->updateQueue();
if (getInventory()->hasItem(kItemBomb)) {
RESET_ENTITY_STATE(kEntityAlexei, Alexei, setup_function47);
@@ -1521,8 +1524,8 @@ label_callback_4:
case kAction191001984:
getState()->time = kTime2520000;
- if (getSound()->isBuffered(kEntityChapters))
- getSound()->removeFromQueue(kEntityChapters);
+ if (getSoundQueue()->isBuffered(kEntityChapters))
+ getSoundQueue()->removeFromQueue(kEntityChapters);
getEntities()->clearSequences(kEntityChapters);
getInventory()->removeItem(kItemTelegram);
@@ -1534,10 +1537,10 @@ label_callback_4:
break;
case kAction201959744:
- if (getSound()->isBuffered(kEntityChapters))
- getSound()->removeFromQueue(kEntityChapters);
+ if (getSoundQueue()->isBuffered(kEntityChapters))
+ getSoundQueue()->removeFromQueue(kEntityChapters);
- getSound()->playSound(kEntityTrain, "ZFX4001", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityTrain, "ZFX4001", kFlagDefault);
getLogic()->gameOver(kSavegameTypeIndex, 0, kSceneNone, true);
break;
@@ -1643,7 +1646,7 @@ IMPLEMENT_FUNCTION(21, Chapters, chapter5Init)
getObjects()->updateLocation2(kObjectRestaurantCar, kObjectLocation2);
if (ENTITY_PARAM(0, 2) || ENTITY_PARAM(0, 3)) {
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
ENTITY_PARAM(0, 2) = 0;
ENTITY_PARAM(0, 3) = 0;
}
@@ -1673,8 +1676,8 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler)
params->param2 = 1;
if (!getProgress().isNightTime) {
- getSound()->playSound(kEntityChapters, "ARRIVE", SoundManager::kFlag8);
- getSound()->processEntries();
+ getSound()->playSound(kEntityChapters, "ARRIVE", kFlag8);
+ getSoundQueue()->processEntries();
}
}
@@ -1682,8 +1685,8 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler)
params->param3 = 1;
if (!getEvent(kEventLocomotiveMilosDay) && !getEvent(kEventLocomotiveMilosNight)) {
- getSound()->playSound(kEntityChapters, "ARRIVE", SoundManager::kFlag8);
- getSound()->processEntries();
+ getSound()->playSound(kEntityChapters, "ARRIVE", kFlag8);
+ getSoundQueue()->processEntries();
}
}
break;
@@ -1712,8 +1715,8 @@ IMPLEMENT_FUNCTION(22, Chapters, chapter5Handler)
getProgress().isNightTime = true;
getState()->time = kTime2916000;
- if (getSound()->isBuffered(kEntityChapters))
- getSound()->removeFromQueue(kEntityChapters);
+ if (getSoundQueue()->isBuffered(kEntityChapters))
+ getSoundQueue()->removeFromQueue(kEntityChapters);
break;
}
IMPLEMENT_FUNCTION_END
@@ -1729,7 +1732,7 @@ void Chapters::enterExitStation(const SavePoint &savepoint, bool isEnteringStati
return;
}
- getSound()->removeFromQueue(kEntityChapters);
+ getSoundQueue()->removeFromQueue(kEntityChapters);
if (!ENTITY_PARAM(0, 2)) {
if (ENTITY_PARAM(0, 3))
@@ -1796,8 +1799,8 @@ void Chapters::enterExitStation(const SavePoint &savepoint, bool isEnteringStati
void Chapters::enterExitHelper(bool isEnteringStation) {
EXPOSE_PARAMS(EntityData::EntityParametersSIIS);
- getSound()->playSound(kEntityChapters, isEnteringStation ? "ARRIVE" : "DEPART", SoundManager::kFlag8);
- getSound()->processEntries();
+ getSound()->playSound(kEntityChapters, isEnteringStation ? "ARRIVE" : "DEPART", kFlag8);
+ getSoundQueue()->processEntries();
getObjects()->update(kObjectHandleOutsideLeft, kEntityPlayer, kObjectLocation1, kCursorNormal, isEnteringStation ? kCursorNormal : kCursorHand);
getObjects()->update(kObjectHandleOutsideRight, kEntityPlayer, kObjectLocation1, kCursorNormal, isEnteringStation ? kCursorNormal : kCursorHand);
diff --git a/engines/lastexpress/entities/cooks.cpp b/engines/lastexpress/entities/cooks.cpp
index 336f911800..42e888cc7c 100644
--- a/engines/lastexpress/entities/cooks.cpp
+++ b/engines/lastexpress/entities/cooks.cpp
@@ -26,9 +26,11 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -101,7 +103,7 @@ IMPLEMENT_FUNCTION(3, Cooks, function3)
if (getEntities()->isPlayerPosition(kCarRestaurant, 46)) {
getEntities()->drawSequenceLeft(kEntityCooks, "308D");
- if (!getSound()->isBuffered(kEntityCooks)) {
+ if (!getSoundQueue()->isBuffered(kEntityCooks)) {
if (params->param1) {
if (!getEntities()->hasValidFrame(kEntityCooks)) {
getSound()->playSound(kEntityCooks, "LIB015");
@@ -187,7 +189,7 @@ IMPLEMENT_FUNCTION(4, Cooks, function4)
if (getEntities()->isPlayerPosition(kCarRestaurant, 80)) {
getEntities()->drawSequenceLeft(kEntityCooks, "308D");
- if (!getSound()->isBuffered(kEntityCooks)) {
+ if (!getSoundQueue()->isBuffered(kEntityCooks)) {
if (params->param1) {
if (!getEntities()->hasValidFrame(kEntityCooks)) {
getSound()->playSound(kEntityCooks, "LIB015");
diff --git a/engines/lastexpress/entities/coudert.cpp b/engines/lastexpress/entities/coudert.cpp
index e74471ebca..c3e7e37b88 100644
--- a/engines/lastexpress/entities/coudert.cpp
+++ b/engines/lastexpress/entities/coudert.cpp
@@ -29,9 +29,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -258,7 +260,7 @@ IMPLEMENT_FUNCTION_NOSETUP(7, Coudert, playSound16)
break;
case kActionDefault:
- getSound()->playSound(kEntityCoudert, (char *)&params->seq1, SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityCoudert, (char *)&params->seq1, kFlagDefault);
break;
case kActionCallback:
@@ -314,7 +316,7 @@ IMPLEMENT_FUNCTION_II(9, Coudert, updateEntity, CarIndex, EntityPosition)
case kActionExcuseMeCath:
if (getData()->clothes == kClothes1)
getSound()->playSound(kEntityPlayer, "ZFX1003", getSound()->getSoundFlag(kEntityCoudert));
- else if (!getSound()->isBuffered(kEntityCoudert))
+ else if (!getSoundQueue()->isBuffered(kEntityCoudert))
getSound()->playSound(kEntityPlayer, "JAC1112", getSound()->getSoundFlag(kEntityCoudert));
break;
@@ -409,7 +411,7 @@ IMPLEMENT_FUNCTION_I(12, Coudert, excuseMe, EntityIndex)
if (savepoint.action != kActionDefault)
return;
- if (getSound()->isBuffered(kEntityCoudert)) {
+ if (getSoundQueue()->isBuffered(kEntityCoudert)) {
CALLBACK_ACTION();
return;
}
@@ -823,7 +825,7 @@ IMPLEMENT_FUNCTION(18, Coudert, function18)
getScenes()->loadSceneFromItemPosition(kItem5);
if (getEntities()->isPlayerPosition(kCarRedSleeping, 68)) {
- if (!getSound()->isBuffered(kEntityCoudert))
+ if (!getSoundQueue()->isBuffered(kEntityCoudert))
getSound()->playSound(kEntityCoudert, "JAC1111");
getScenes()->loadSceneFromPosition(kCarRedSleeping, 25);
@@ -1642,7 +1644,7 @@ IMPLEMENT_FUNCTION_I(31, Coudert, function31, uint32)
break;
case 1:
- if (getSound()->isBuffered(kEntityCoudert)) {
+ if (getSoundQueue()->isBuffered(kEntityCoudert)) {
getEntities()->drawSequenceLeft(kEntityCoudert, "627K");
} else {
setCallback(2);
@@ -1929,7 +1931,7 @@ IMPLEMENT_FUNCTION_I(35, Coudert, function35, bool)
break;
case 1:
- if (!getSound()->isBuffered(kEntityCoudert))
+ if (!getSoundQueue()->isBuffered(kEntityCoudert))
getSound()->playSound(kEntityCoudert, "Ann3124");
if (params->param1)
@@ -2008,8 +2010,8 @@ IMPLEMENT_FUNCTION(37, Coudert, function37)
break;
case kActionDefault:
- if (getSound()->isBuffered(kEntityCoudert))
- getSound()->processEntry(kEntityCoudert);
+ if (getSoundQueue()->isBuffered(kEntityCoudert))
+ getSoundQueue()->processEntry(kEntityCoudert);
if (ENTITY_PARAM(0, 7)) {
getData()->entityPosition = kPosition_8200;
@@ -2268,7 +2270,7 @@ label_callback_8:
}
label_callback_9:
- if (ENTITY_PARAM(0, 1) && !getSound()->isBuffered(kEntityCoudert))
+ if (ENTITY_PARAM(0, 1) && !getSoundQueue()->isBuffered(kEntityCoudert))
getSound()->playSound(kEntityCoudert, rnd(2) ? "JAC1065" : "JAC1065A");
if (getState()->time > kTime1107000 && !ENTITY_PARAM(0, 1) && !getEvent(kEventVassiliSeizure)) {
@@ -3019,7 +3021,7 @@ IMPLEMENT_FUNCTION(46, Coudert, function46)
// Fallback to next case
case 7:
- if (getSound()->isBuffered(kEntityCoudert)) {
+ if (getSoundQueue()->isBuffered(kEntityCoudert)) {
setCallback(7);
setup_updateFromTime(75);
} else {
@@ -3088,7 +3090,7 @@ IMPLEMENT_FUNCTION_I(47, Coudert, function47, bool)
// Fallback to next case
case 4:
- if (getSound()->isBuffered(kEntityCoudert)) {
+ if (getSoundQueue()->isBuffered(kEntityCoudert)) {
setCallback(4);
setup_updateFromTime(225);
} else {
diff --git a/engines/lastexpress/entities/entity.cpp b/engines/lastexpress/entities/entity.cpp
index 22750989fb..e136ca4776 100644
--- a/engines/lastexpress/entities/entity.cpp
+++ b/engines/lastexpress/entities/entity.cpp
@@ -33,9 +33,10 @@
#include "lastexpress/game/state.h"
#include "lastexpress/game/savegame.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -104,24 +105,24 @@ void EntityData::EntityCallData::saveLoadWithSerializer(Common::Serializer &s) {
//////////////////////////////////////////////////////////////////////////
EntityData::EntityParameters *EntityData::getParameters(uint callback, byte index) const {
if (callback >= 9)
- error("EntityData::getParameters: invalid callback value (was: %d, max: 9)", callback);
+ error("[EntityData::getParameters] Invalid callback value (was: %d, max: 9)", callback);
if (index >= 4)
- error("EntityData::getParameters: invalid index value (was: %d, max: 4)", index);
+ error("[EntityData::getParameters] Invalid index value (was: %d, max: 4)", index);
return _parameters[callback].parameters[index];
}
int EntityData::getCallback(uint callback) const {
if (callback >= 16)
- error("EntityData::getParameters: invalid callback value (was: %d, max: 16)", callback);
+ error("[EntityData::getCallback] Invalid callback value (was: %d, max: 16)", callback);
return _data.callbacks[callback];
}
void EntityData::setCallback(uint callback, byte index) {
if (callback >= 16)
- error("EntityData::getParameters: invalid callback value (was: %d, max: 16)", callback);
+ error("[EntityData::setCallback] Invalid callback value (was: %d, max: 16)", callback);
_data.callbacks[callback] = index;
}
@@ -136,7 +137,7 @@ void EntityData::updateParameters(uint32 index) const {
else if (index < 32)
getParameters(8, 3)->update(index - 24);
else
- error("EntityData::updateParameters: invalid param index to update (was:%d, max:32)!", index);
+ error("[EntityData::updateParameters] Invalid param index to update (was:%d, max:32)", index);
}
void EntityData::saveLoadWithSerializer(Common::Serializer &s) {
@@ -255,7 +256,7 @@ void Entity::savegame(const SavePoint &savepoint) {
}
}
-void Entity::playSound(const SavePoint &savepoint, bool resetItem, SoundManager::FlagType flag) {
+void Entity::playSound(const SavePoint &savepoint, bool resetItem, SoundFlag flag) {
EXPOSE_PARAMS(EntityData::EntityParametersSIIS)
switch (savepoint.action) {
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index 01cf17f791..039f461c7b 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -25,7 +25,7 @@
#include "lastexpress/shared.h"
-#include "lastexpress/game/sound.h"
+#include "lastexpress/sound/sound.h"
#include "lastexpress/helpers.h"
@@ -85,7 +85,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersIIII::update: invalid index (was: %d)", index);
+ error("[EntityParametersIIII::update] Invalid index (was: %d)", index);
case 0: param1 = 1; break;
case 1: param2 = 1; break;
@@ -134,7 +134,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersSIII::update: invalid index (was: %d)", index);
+ error("[EntityParametersSIII::update] Invalid index (was: %d)", index);
case 3: param4 = 1; break;
case 4: param5 = 1; break;
@@ -174,7 +174,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersSIIS::update: invalid index (was: %d)", index);
+ error("[EntityParametersSIIS::update] Invalid index (was: %d)", index);
case 3: param4 = 1; break;
case 4: param5 = 1; break;
@@ -209,7 +209,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersISSI::update: invalid index (was: %d)", index);
+ error("[EntityParametersISSI::update] Invalid index (was: %d)", index);
case 0: param1 = 1; break;
case 7: param8 = 1; break;
@@ -248,7 +248,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersISII::update: invalid index (was: %d)", index);
+ error("[EntityParametersISII::update] Invalid index (was: %d)", index);
case 0: param1 = 1; break;
case 4: param5 = 1; break;
@@ -288,7 +288,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersSSII::update: invalid index (was: %d)", index);
+ error("[EntityParametersSSII::update] Invalid index (was: %d)", index);
case 6: param7 = 1; break;
case 7: param8 = 1; break;
@@ -319,7 +319,7 @@ public:
}
void update(uint32) {
- error("EntityParametersSSS::update: cannot update this type of parameters");
+ error("[EntityParametersSSS::update] Cannot update this type of parameters");
}
void saveLoadWithSerializer(Common::Serializer &s) {
@@ -349,7 +349,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersIISS::update: invalid index (was: %d)", index);
+ error("[EntityParametersIISS::update] Invalid index (was: %d)", index);
case 0: param1 = 1; break;
case 1: param2 = 1; break;
@@ -388,7 +388,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersIISI::update: invalid index (was: %d)", index);
+ error("[EntityParametersIISI::update] Invalid index (was: %d)", index);
case 0: param1 = 1; break;
case 1: param2 = 1; break;
@@ -432,7 +432,7 @@ public:
void update(uint32 index) {
switch (index) {
default:
- error("EntityParametersIIIS::update: invalid index (was: %d)", index);
+ error("[EntityParametersIIIS::update] Invalid index (was: %d)", index);
case 0: param1 = 1; break;
case 1: param2 = 1; break;
@@ -686,7 +686,7 @@ protected:
* @param resetItem true to reset item.
* @param flag sound flag
*/
- void playSound(const SavePoint &savepoint, bool resetItem = false, SoundManager::FlagType flag = SoundManager::kFlagInvalid);
+ void playSound(const SavePoint &savepoint, bool resetItem = false, SoundFlag flag = kFlagInvalid);
/**
* Draws the entity
diff --git a/engines/lastexpress/entities/entity_intern.h b/engines/lastexpress/entities/entity_intern.h
index 43d7f702c9..bf75e022de 100644
--- a/engines/lastexpress/entities/entity_intern.h
+++ b/engines/lastexpress/entities/entity_intern.h
@@ -96,7 +96,7 @@ void class::setup_##name() { \
#define EXPOSE_PARAMS(type) \
type *params = (type*)_data->getCurrentParameters(); \
if (!params) \
- error("Trying to call an entity function with invalid parameters!"); \
+ error("[EXPOSE_PARAMS] Trying to call an entity function with invalid parameters"); \
// function signature without setup (we keep the index for consistency but never use it)
@@ -413,7 +413,7 @@ void class::setup_##name() { \
//////////////////////////////////////////////////////////////////////////
#define CALLBACK_ACTION() { \
if (getData()->currentCall == 0) \
- error("CALLBACK_ACTION: currentCall is already 0, cannot proceed!"); \
+ error("[CALLBACK_ACTION] currentCall is already 0, cannot proceed"); \
getData()->currentCall--; \
getSavePoints()->setCallback(_entityIndex, _callbacks[_data->getCurrentCallback()]); \
getSavePoints()->call(_entityIndex, _entityIndex, kActionCallback); \
diff --git a/engines/lastexpress/entities/francois.cpp b/engines/lastexpress/entities/francois.cpp
index 86b6820499..6bbe740730 100644
--- a/engines/lastexpress/entities/francois.cpp
+++ b/engines/lastexpress/entities/francois.cpp
@@ -30,6 +30,8 @@
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -275,7 +277,7 @@ IMPLEMENT_FUNCTION_I(11, Francois, function11, TimeValue)
break;
case kActionNone:
- if (!getSound()->isBuffered(kEntityFrancois)) {
+ if (!getSoundQueue()->isBuffered(kEntityFrancois)) {
UPDATE_PARAM_PROC(CURRENT_PARAM(1, 1), getState()->timeTicks, params->param6)
switch (rnd(7)) {
@@ -370,8 +372,8 @@ label_callback:
getData()->field_4A3 = 30;
getData()->inventoryItem = kItemNone;
- if (getSound()->isBuffered(kEntityFrancois))
- getSound()->processEntry(kEntityFrancois);
+ if (getSoundQueue()->isBuffered(kEntityFrancois))
+ getSoundQueue()->processEntry(kEntityFrancois);
setCallback(4);
setup_updateEntity(kCarRedSleeping, kPosition_5790);
@@ -381,8 +383,8 @@ label_callback:
case kAction1:
getData()->inventoryItem = kItemNone;
- if (getSound()->isBuffered(kEntityFrancois))
- getSound()->processEntry(kEntityFrancois);
+ if (getSoundQueue()->isBuffered(kEntityFrancois))
+ getSoundQueue()->processEntry(kEntityFrancois);
setCallback(6);
setup_savegame(kSavegameTypeEvent, kEventFrancoisWhistle);
diff --git a/engines/lastexpress/entities/gendarmes.cpp b/engines/lastexpress/entities/gendarmes.cpp
index f5ae191f9d..daa50956d3 100644
--- a/engines/lastexpress/entities/gendarmes.cpp
+++ b/engines/lastexpress/entities/gendarmes.cpp
@@ -88,12 +88,12 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION_S(5, Gendarmes, arrestPlaysound16)
- arrest(savepoint, true, SoundManager::kFlagDefault);
+ arrest(savepoint, true, kFlagDefault);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION_I(6, Gendarmes, arrestCallback, uint32)
- arrest(savepoint, true, SoundManager::kFlagInvalid, true);
+ arrest(savepoint, true, kFlagInvalid, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
@@ -103,7 +103,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION_II(8, Gendarmes, arrestUpdateEntity, CarIndex, EntityPosition)
- arrest(savepoint, true, SoundManager::kFlagInvalid, false, true);
+ arrest(savepoint, true, kFlagInvalid, false, true);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
@@ -221,7 +221,7 @@ IMPLEMENT_FUNCTION_IISS(9, Gendarmes, function9, CarIndex, EntityPosition)
strcpy(arrestSound, "POL1043");
strcat(arrestSound, (char *)&params->seq2);
- getSound()->playSound(kEntityGendarmes, arrestSound, SoundManager::kFlagInvalid, 30);
+ getSound()->playSound(kEntityGendarmes, arrestSound, kFlagInvalid, 30);
}
getData()->location = kLocationInsideCompartment;
@@ -264,7 +264,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
if (params->param6 == 0 || getState()->timeTicks > (uint32)params->param6) {
params->param6 = kTimeInvalid;
- getSound()->playSound(kEntityGendarmes, "POL1046A", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityGendarmes, "POL1046A", kFlagDefault);
}
UPDATE_PARAM(params->param7, getState()->timeTicks, 300);
@@ -276,7 +276,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
if (getEntities()->isOutsideAlexeiWindow())
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 49);
- getSound()->playSound(kEntityGendarmes, "LIB017", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityGendarmes, "LIB017", kFlagDefault);
setCallback(getProgress().jacket == kJacketBlood ? 3 : 4);
setup_savegame(kSavegameTypeEvent, getProgress().jacket == kJacketBlood ? kEventMertensBloodJacket : kEventGendarmesArrestation);
@@ -312,7 +312,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
break;
case 2:
- getSound()->playSound(kEntityGendarmes, "LIB014", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityGendarmes, "LIB014", kFlagDefault);
getAction()->playAnimation(kEventGendarmesArrestation);
getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverPolice1, true);
break;
@@ -338,7 +338,7 @@ IMPLEMENT_FUNCTION_III(10, Gendarmes, function10, CarIndex, EntityPosition, Obje
break;
case 6:
- getSound()->playSound(kEntityGendarmes, "LIB014", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityGendarmes, "LIB014", kFlagDefault);
getAction()->playAnimation(kEventGendarmesArrestation);
getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverPolice1, true);
break;
@@ -544,7 +544,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
// Private functions
//////////////////////////////////////////////////////////////////////////
-void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundManager::FlagType flag, bool checkCallback, bool shouldUpdateEntity) {
+void Gendarmes::arrest(const SavePoint &savepoint, bool shouldPlaySound, SoundFlag flag, bool checkCallback, bool shouldUpdateEntity) {
switch (savepoint.action) {
default:
break;
diff --git a/engines/lastexpress/entities/gendarmes.h b/engines/lastexpress/entities/gendarmes.h
index e8f9cb2c38..d999cfc1fd 100644
--- a/engines/lastexpress/entities/gendarmes.h
+++ b/engines/lastexpress/entities/gendarmes.h
@@ -26,7 +26,7 @@
#include "lastexpress/entities/entity.h"
#include "lastexpress/entities/entity_intern.h"
-#include "lastexpress/game/sound.h"
+#include "lastexpress/sound/sound.h"
namespace LastExpress {
@@ -88,7 +88,7 @@ public:
DECLARE_FUNCTION(chapter5)
private:
- void arrest(const SavePoint &savepoint, bool playSound = false, SoundManager::FlagType flag = SoundManager::kFlagInvalid, bool checkCallback = false, bool shouldUpdateEntity = false);
+ void arrest(const SavePoint &savepoint, bool playSound = false, SoundFlag flag = kFlagInvalid, bool checkCallback = false, bool shouldUpdateEntity = false);
};
} // End of namespace LastExpress
diff --git a/engines/lastexpress/entities/hadija.cpp b/engines/lastexpress/entities/hadija.cpp
index ce2c9718db..8ec972b939 100644
--- a/engines/lastexpress/entities/hadija.cpp
+++ b/engines/lastexpress/entities/hadija.cpp
@@ -26,9 +26,10 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
diff --git a/engines/lastexpress/entities/ivo.cpp b/engines/lastexpress/entities/ivo.cpp
index 35f4ccfb8c..f2261b438c 100644
--- a/engines/lastexpress/entities/ivo.cpp
+++ b/engines/lastexpress/entities/ivo.cpp
@@ -22,16 +22,18 @@
#include "lastexpress/entities/ivo.h"
+#include "lastexpress/fight/fight.h"
+
#include "lastexpress/game/action.h"
#include "lastexpress/game/entities.h"
-#include "lastexpress/game/fight.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
diff --git a/engines/lastexpress/entities/kahina.cpp b/engines/lastexpress/entities/kahina.cpp
index 6472ce0533..2918b1e8bd 100644
--- a/engines/lastexpress/entities/kahina.cpp
+++ b/engines/lastexpress/entities/kahina.cpp
@@ -29,9 +29,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -607,8 +609,8 @@ label_callback_3:
break;
if (getEvent(kEventKahinaAskSpeakFirebird)) {
- if (getSound()->isBuffered(kEntityKahina))
- getSound()->processEntry(kEntityKahina);
+ if (getSoundQueue()->isBuffered(kEntityKahina))
+ getSoundQueue()->processEntry(kEntityKahina);
if (savepoint.action == kActionKnock)
getSound()->playSound(kEntityPlayer, "LIB012");
@@ -1163,8 +1165,8 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
case 1:
if (ENTITY_PARAM(0, 2)) {
getEntities()->clearSequences(kEntityKahina);
- if (getSound()->isBuffered(kEntityKahina))
- getSound()->processEntry(kEntityKahina);
+ if (getSoundQueue()->isBuffered(kEntityKahina))
+ getSoundQueue()->processEntry(kEntityKahina);
getProgress().field_44 = 0;
@@ -1186,7 +1188,7 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
getEntities()->updateEntity(kEntityKahina, kCarKronos, kPosition_9270);
getEntities()->loadSceneFromEntityPosition(getData()->car, (EntityPosition)(getData()->entityPosition + 750));
getSavePoints()->push(kEntityKahina, kEntityKronos, kAction235599361);
- getSound()->playSound(kEntityKahina, "MUS016", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityKahina, "MUS016", kFlagDefault);
getProgress().field_44 = 1;
params->param1 = true;
@@ -1198,8 +1200,8 @@ IMPLEMENT_FUNCTION(24, Kahina, function24)
case kAction137503360:
getEntities()->clearSequences(kEntityKahina);
- if (getSound()->isBuffered(kEntityKahina))
- getSound()->processEntry(kEntityKahina);
+ if (getSoundQueue()->isBuffered(kEntityKahina))
+ getSoundQueue()->processEntry(kEntityKahina);
getProgress().field_44 = 0;
diff --git a/engines/lastexpress/entities/kronos.cpp b/engines/lastexpress/entities/kronos.cpp
index 925b0967b7..134dce9c81 100644
--- a/engines/lastexpress/entities/kronos.cpp
+++ b/engines/lastexpress/entities/kronos.cpp
@@ -36,9 +36,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -216,7 +218,7 @@ IMPLEMENT_FUNCTION(11, Kronos, function11)
case kActionDefault:
getData()->entityPosition = kPosition_7000;
- if (!getSound()->isBuffered(kEntityKronos))
+ if (!getSoundQueue()->isBuffered(kEntityKronos))
getSound()->playSound(kEntityKronos, "KRO1001");
break;
}
@@ -457,7 +459,7 @@ IMPLEMENT_FUNCTION(19, Kronos, function19)
case 2:
getAction()->playAnimation(kEventConcertStart);
- getSound()->setupEntry(SoundManager::kSoundType7, kEntityKronos);
+ getSoundQueue()->setupEntry(kSoundType7, kEntityKronos);
getScenes()->loadSceneFromPosition(kCarKronos, 83);
RESET_ENTITY_STATE(kEntityRebecca, Rebecca, setup_function39);
@@ -480,7 +482,7 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
break;
case kActionNone:
- params->param5 = getSound()->getEntryTime(kEntityKronos)* 2;
+ params->param5 = getSoundQueue()->getEntryTime(kEntityKronos)* 2;
if (params->param6 < ARRAYSIZE(concertData) && params->param5 > concertData[params->param6].time) {
@@ -560,8 +562,8 @@ IMPLEMENT_FUNCTION(20, Kronos, function20)
case 3:
getAction()->playAnimation(kEventCathFallingAsleep);
- while (getSound()->isBuffered("1919.LNK"))
- getSound()->updateQueue();
+ while (getSoundQueue()->isBuffered("1919.LNK"))
+ getSoundQueue()->updateQueue();
getAction()->playAnimation(kEventCathWakingUp);
getScenes()->processScene();
@@ -746,7 +748,7 @@ IMPLEMENT_FUNCTION(22, Kronos, function22)
case kActionKnock:
case kActionOpenDoor:
- if (!getSound()->isBuffered(savepoint.action == kActionKnock ? "LIB012" : "LIB013", true))
+ if (!getSoundQueue()->isBuffered(savepoint.action == kActionKnock ? "LIB012" : "LIB013", true))
getSound()->playSound(kEntityPlayer, savepoint.action == kActionKnock ? "LIB012" : "LIB013");
if (getEvent(kEventConcertLeaveWithBriefcase))
diff --git a/engines/lastexpress/entities/mahmud.cpp b/engines/lastexpress/entities/mahmud.cpp
index 7d30d31a84..0e67b45cd2 100644
--- a/engines/lastexpress/entities/mahmud.cpp
+++ b/engines/lastexpress/entities/mahmud.cpp
@@ -31,9 +31,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -157,7 +159,7 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool)
case kActionEndSound:
case kActionDrawScene:
- if (!getSound()->isBuffered(kEntityMahmud)) {
+ if (!getSoundQueue()->isBuffered(kEntityMahmud)) {
EntityPosition position = getEntityData(kEntityPlayer)->entityPosition;
if (position < kPosition_1500 || position >= kPosition_5790 || (position > kPosition_4455 && params->param5 != 5)) {
getObjects()->update(kObjectCompartment5, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand);
@@ -173,12 +175,12 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool)
case kActionKnock:
case kActionOpenDoor:
- if (!getSound()->isBuffered((savepoint.action == kActionKnock) ? "LIB012" : "LIB013", true))
+ if (!getSoundQueue()->isBuffered((savepoint.action == kActionKnock) ? "LIB012" : "LIB013", true))
getSound()->playSound(kEntityPlayer, (savepoint.action == kActionKnock) ? "LIB012" : "LIB013");
params->param5 = savepoint.param.intValue;
- if (!getSound()->isBuffered(kEntityMahmud)) {
+ if (!getSoundQueue()->isBuffered(kEntityMahmud)) {
params->param3++;
switch(params->param3) {
@@ -204,7 +206,7 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool)
if (getState()->time >= kTimeCityGalanta) {
params->param3 = 0;
} else {
- getSound()->playSound(kEntityTrain, "LIB050", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityTrain, "LIB050", kFlagDefault);
getLogic()->gameOver(kSavegameTypeIndex, 0, (getProgress().chapter == kChapter1) ? kSceneGameOverPolice1 : kSceneGameOverPolice2, true);
}
break;
@@ -235,7 +237,7 @@ IMPLEMENT_FUNCTION_II(10, Mahmud, function10, ObjectIndex, bool)
break;
case kActionDefault:
- getSound()->playSound(kEntityMahmud, params->param2 ? "MAH1170A" : "MAH1173", SoundManager::kFlagInvalid, 45);
+ getSound()->playSound(kEntityMahmud, params->param2 ? "MAH1170A" : "MAH1173", kFlagInvalid, 45);
getProgress().field_C4 = 1;
setCallback(1);
@@ -282,7 +284,7 @@ IMPLEMENT_FUNCTION(11, Mahmud, function11)
case kActionOpenDoor: {
getSound()->playSound(kEntityPlayer, (savepoint.action == kActionKnock ? "LIB012" : "LIB013"));
- if (!getSound()->isBuffered(kEntityMahmud)) {
+ if (!getSoundQueue()->isBuffered(kEntityMahmud)) {
params->param1++;
getSound()->playSound(kEntityMahmud, (params->param1 == 1 ? "MAH1170E" : (params->param1 == 2 ? "MAH1173B" : "MAH1174")));
@@ -396,8 +398,8 @@ IMPLEMENT_FUNCTION(11, Mahmud, function11)
break;
case kAction123852928:
- if (getSound()->isBuffered(kEntityMahmud))
- getSound()->processEntry(kEntityMahmud);
+ if (getSoundQueue()->isBuffered(kEntityMahmud))
+ getSoundQueue()->processEntry(kEntityMahmud);
getObjects()->update(kObjectCompartment5, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectCompartment6, kEntityTrain, kObjectLocation3, kCursorHandKnock, kCursorHand);
@@ -560,7 +562,7 @@ IMPLEMENT_FUNCTION(14, Mahmud, chaptersHandler)
TIME_CHECK_CALLBACK(kTime1098000, params->param6, 1, setup_function13);
- if (!getSound()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) {
+ if (!getSoundQueue()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) {
params->param7 = 1;
setCallback(2);
@@ -636,7 +638,7 @@ IMPLEMENT_FUNCTION(14, Mahmud, chaptersHandler)
params->param4 = 0;
params->param5 = 0;
- if (!getSound()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) {
+ if (!getSoundQueue()->isBuffered("HAR1104") && getState()->time > kTime1167300 && !params->param7) {
params->param7 = 1;
setCallback(2);
setup_function12();
diff --git a/engines/lastexpress/entities/max.cpp b/engines/lastexpress/entities/max.cpp
index 7e5931322d..eacc38bf60 100644
--- a/engines/lastexpress/entities/max.cpp
+++ b/engines/lastexpress/entities/max.cpp
@@ -28,9 +28,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -91,7 +93,7 @@ IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
case kActionNone:
UPDATE_PARAM(params->param2, getState()->time, params->param1);
- if (!getSound()->isBuffered(kEntityMax))
+ if (!getSoundQueue()->isBuffered(kEntityMax))
getSound()->playSound(kEntityMax, "Max1122");
params->param1 = 255 * (4 * rnd(20) + 40);
@@ -108,7 +110,7 @@ IMPLEMENT_FUNCTION(6, Max, chapter12_handler)
break;
case kAction158007856:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
getSound()->playSound(kEntityMax, "Max1122");
params->param1 = 255 * (4 * rnd(20) + 40);
}
@@ -125,7 +127,7 @@ IMPLEMENT_FUNCTION(7, Max, function7)
case kActionNone:
UPDATE_PARAM(params->param2, getState()->time, params->param1)
- if (!getSound()->isBuffered(kEntityMax))
+ if (!getSoundQueue()->isBuffered(kEntityMax))
getSound()->playSound(kEntityMax, "Max1122");
params->param1 = 255 * (4 * rnd(20) + 40);
@@ -137,8 +139,8 @@ IMPLEMENT_FUNCTION(7, Max, function7)
getObjects()->update(kObjectCompartmentF, kEntityMax, kObjectLocation1, kCursorNormal, kCursorNormal);
getObjects()->update(kObject53, kEntityMax, kObjectLocation1, kCursorNormal, kCursorNormal);
- if (getSound()->isBuffered(kEntityMax))
- getSound()->processEntry(kEntityMax);
+ if (getSoundQueue()->isBuffered(kEntityMax))
+ getSoundQueue()->processEntry(kEntityMax);
setCallback((savepoint.action == kActionKnock) ? 1 : 2);
setup_playSound((savepoint.action == kActionKnock) ? "LIB012" : "LIB013");
@@ -156,7 +158,7 @@ IMPLEMENT_FUNCTION(7, Max, function7)
break;
case kActionDrawScene:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
if (getEntities()->isPlayerPosition(kCarRedSleeping, 56) || getEntities()->isPlayerPosition(kCarRedSleeping, 78))
getSound()->playSound(kEntityMax, "Max1120");
}
@@ -197,7 +199,7 @@ IMPLEMENT_FUNCTION(7, Max, function7)
break;
case kAction158007856:
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
getSound()->playSound(kEntityMax, "Max1122");
params->param1 = 255 * (4 * rnd(20) + 40);
}
@@ -214,7 +216,7 @@ IMPLEMENT_FUNCTION(8, Max, chapter4Handler)
case kActionNone:
UPDATE_PARAM(params->param3, getState()->time, params->param2);
- if (!getSound()->isBuffered(kEntityMax))
+ if (!getSoundQueue()->isBuffered(kEntityMax))
getSound()->playSound(kEntityMax, "Max3101");
params->param2 = 255 * (4 * rnd(20) + 40);
@@ -228,8 +230,8 @@ IMPLEMENT_FUNCTION(8, Max, chapter4Handler)
break;
}
- if (getSound()->isBuffered(kEntityMax))
- getSound()->processEntry(kEntityMax);
+ if (getSoundQueue()->isBuffered(kEntityMax))
+ getSoundQueue()->processEntry(kEntityMax);
getAction()->playAnimation(kEventCathMaxLickHand);
getScenes()->processScene();
@@ -247,7 +249,7 @@ IMPLEMENT_FUNCTION(8, Max, chapter4Handler)
getData()->location = kLocationInsideCompartment;
getData()->car = kCarBaggage;
- if (!getSound()->isBuffered(kEntityMax))
+ if (!getSoundQueue()->isBuffered(kEntityMax))
getSound()->playSound(kEntityMax, "Max3101");
break;
@@ -255,8 +257,8 @@ IMPLEMENT_FUNCTION(8, Max, chapter4Handler)
if (getCallback() != 1)
break;
- if (getSound()->isBuffered(kEntityMax))
- getSound()->processEntry(kEntityMax);
+ if (getSoundQueue()->isBuffered(kEntityMax))
+ getSoundQueue()->processEntry(kEntityMax);
getSound()->playSound(kEntityPlayer, "LIB026");
getAction()->playAnimation(kEventCathMaxFree);
@@ -392,7 +394,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
UPDATE_PARAM(params->param3, getState()->time, params->param1);
- if (!getSound()->isBuffered(kEntityMax))
+ if (!getSoundQueue()->isBuffered(kEntityMax))
getSound()->playSound(kEntityMax, "Max1122");
params->param1 = 255 * (4 * rnd(20) + 40);
@@ -424,7 +426,7 @@ IMPLEMENT_FUNCTION(13, Max, chapter3Handler)
if (params->param2)
break;
- if (!getSound()->isBuffered(kEntityMax)) {
+ if (!getSoundQueue()->isBuffered(kEntityMax)) {
getSound()->playSound(kEntityMax, "Max1122");
params->param1 = 255 * (4 * rnd(20) + 40);
}
@@ -464,7 +466,7 @@ IMPLEMENT_FUNCTION(14, Max, freeFromCage)
getData()->location = kLocationInsideCompartment;
getData()->car = kCarBaggage;
- if (!getSound()->isBuffered(kEntityMax))
+ if (!getSoundQueue()->isBuffered(kEntityMax))
getSound()->playSound(kEntityMax, "Max1122");
break;
@@ -476,17 +478,17 @@ IMPLEMENT_FUNCTION(14, Max, freeFromCage)
break;
case 1:
- if (getSound()->isBuffered(kEntityMax))
- getSound()->removeFromQueue(kEntityMax);
+ if (getSoundQueue()->isBuffered(kEntityMax))
+ getSoundQueue()->removeFromQueue(kEntityMax);
getAction()->playAnimation(kEventCathMaxCage);
- getSound()->setupEntry(SoundManager::kSoundType7, kEntityMax);
+ getSoundQueue()->setupEntry(kSoundType7, kEntityMax);
getScenes()->processScene();
break;
case 2:
- if (getSound()->isBuffered(kEntityMax))
- getSound()->processEntry(kEntityMax);
+ if (getSoundQueue()->isBuffered(kEntityMax))
+ getSoundQueue()->processEntry(kEntityMax);
getSound()->playSound(kEntityPlayer, "LIB026");
getAction()->playAnimation(kEventCathMaxFree);
@@ -523,7 +525,7 @@ IMPLEMENT_FUNCTION(15, Max, function15)
getData()->location = kLocationOutsideCompartment;
getData()->car = kCarRedSleeping;
- if (!getSound()->isBuffered(kEntityMax))
+ if (!getSoundQueue()->isBuffered(kEntityMax))
getSound()->playSound(kEntityMax, "Max3010");
setCallback(1);
diff --git a/engines/lastexpress/entities/mertens.cpp b/engines/lastexpress/entities/mertens.cpp
index 91082f487e..e222af4805 100644
--- a/engines/lastexpress/entities/mertens.cpp
+++ b/engines/lastexpress/entities/mertens.cpp
@@ -30,7 +30,9 @@
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
#include "lastexpress/game/state.h"
-#include "lastexpress/game/sound.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -289,7 +291,7 @@ IMPLEMENT_FUNCTION_S(8, Mertens, playSound16)
break;
case kActionDefault:
- getSound()->playSound(kEntityMertens, (char *)&params->seq1, SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityMertens, (char *)&params->seq1, kFlagDefault);
break;
case kActionCallback:
@@ -503,7 +505,7 @@ IMPLEMENT_FUNCTION_I(12, Mertens, bonsoir, EntityIndex)
if (savepoint.action == kActionDefault)
return;
- if (getSound()->isBuffered(kEntityMertens)) {
+ if (getSoundQueue()->isBuffered(kEntityMertens)) {
CALLBACK_ACTION();
return;
}
@@ -589,7 +591,7 @@ IMPLEMENT_FUNCTION_II(13, Mertens, function13, bool, bool)
if (params->param2)
params->param3 = 1;
- if (!getSound()->isBuffered(kEntityMertens)) {
+ if (!getSoundQueue()->isBuffered(kEntityMertens)) {
}
@@ -896,7 +898,7 @@ IMPLEMENT_FUNCTION(17, Mertens, function17)
} else {
// Got the passenger list, Mertens is looking for it before sitting
ENTITY_PARAM(0, 2) = 1;
- getSound()->playSound(kEntityMertens, "CON1058", SoundManager::kFlagInvalid, 75);
+ getSound()->playSound(kEntityMertens, "CON1058", kFlagInvalid, 75);
getEntities()->drawSequenceRight(kEntityMertens, "601D");
}
@@ -984,7 +986,7 @@ IMPLEMENT_FUNCTION(18, Mertens, function18)
getEntities()->drawSequenceRight(kEntityMertens, "601A");
} else {
ENTITY_PARAM(0, 2) = 1;
- getSound()->playSound(kEntityMertens, "CON1058", SoundManager::kFlagInvalid, 75);
+ getSound()->playSound(kEntityMertens, "CON1058", kFlagInvalid, 75);
getEntities()->drawSequenceRight(kEntityMertens, "601D");
}
@@ -1188,7 +1190,7 @@ IMPLEMENT_FUNCTION(22, Mertens, function22)
break;
case 5:
- if (!getSound()->isBuffered(kEntityMertens))
+ if (!getSoundQueue()->isBuffered(kEntityMertens))
getSound()->playSound(kEntityMertens, "MAH1170I");
setCallback(6);
@@ -1198,8 +1200,8 @@ IMPLEMENT_FUNCTION(22, Mertens, function22)
case 6:
getData()->location = kLocationInsideCompartment;
getEntities()->clearSequences(kEntityMertens);
- if (!getSound()->isBuffered(kEntityMertens))
- getSound()->playSound(kEntityMertens, "MAH1172", SoundManager::kFlagInvalid, 225);
+ if (!getSoundQueue()->isBuffered(kEntityMertens))
+ getSound()->playSound(kEntityMertens, "MAH1172", kFlagInvalid, 225);
setCallback(7);
setup_function21(kObjectCompartment4, kObject20);
@@ -2300,7 +2302,7 @@ IMPLEMENT_FUNCTION_I(31, Mertens, function31, MertensActionType)
break;
case 1:
- if (getSound()->isBuffered(kEntityMertens)) {
+ if (getSoundQueue()->isBuffered(kEntityMertens)) {
getEntities()->drawSequenceLeft(kEntityMertens, "601J");
} else {
setCallback(2);
@@ -3017,7 +3019,7 @@ IMPLEMENT_FUNCTION(42, Mertens, function42)
if (getState()->time <= kTime1188000) {
if ((!getEntities()->isPlayerInCar(kCarGreenSleeping) && !getEntities()->isPlayerInCar(kCarRedSleeping))
- || getSound()->isBuffered("REB1205")
+ || getSoundQueue()->isBuffered("REB1205")
|| !getEntities()->isInsideCompartment(kEntityMmeBoutarel, kCarRedSleeping, kPosition_5790)
|| !params->param4) {
params->param4 = (uint)getState()->time;
@@ -3138,7 +3140,7 @@ label_callback_18:
}
label_callback_19:
- if (ENTITY_PARAM(0, 1) && !getSound()->isBuffered(kEntityMertens)) {
+ if (ENTITY_PARAM(0, 1) && !getSoundQueue()->isBuffered(kEntityMertens)) {
if (getProgress().field_18 != 4)
getSound()->playSound(kEntityMertens, "CON1505");
}
diff --git a/engines/lastexpress/entities/milos.cpp b/engines/lastexpress/entities/milos.cpp
index 587c43cade..ff3d2b6744 100644
--- a/engines/lastexpress/entities/milos.cpp
+++ b/engines/lastexpress/entities/milos.cpp
@@ -24,17 +24,20 @@
#include "lastexpress/entities/vesna.h"
+#include "lastexpress/fight/fight.h"
+
#include "lastexpress/game/action.h"
#include "lastexpress/game/entities.h"
-#include "lastexpress/game/fight.h"
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -110,7 +113,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION_S(7, Milos, playSound16)
- Entity::playSound(savepoint, false, SoundManager::kFlagDefault);
+ Entity::playSound(savepoint, false, kFlagDefault);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
@@ -1576,8 +1579,8 @@ IMPLEMENT_FUNCTION(29, Milos, chapter4Handler)
break;
case kAction221683008:
- if (getSound()->isBuffered(kEntityMilos))
- getSound()->processEntry(kEntityMilos);
+ if (getSoundQueue()->isBuffered(kEntityMilos))
+ getSoundQueue()->processEntry(kEntityMilos);
params->param1 = 1;
getSavePoints()->push(kEntityMilos, kEntityCoudert, kAction123199584);
@@ -1719,15 +1722,15 @@ IMPLEMENT_FUNCTION(34, Milos, chapter5Handler)
break;
case 2:
- if (getSound()->isBuffered("MUS050"))
- getSound()->processEntry("MUS050");
+ if (getSoundQueue()->isBuffered("MUS050"))
+ getSoundQueue()->processEntry("MUS050");
- if (getSound()->isBuffered("ARRIVE"))
- getSound()->removeFromQueue("ARRIVE");
+ if (getSoundQueue()->isBuffered("ARRIVE"))
+ getSoundQueue()->removeFromQueue("ARRIVE");
- getSound()->processEntries();
+ getSoundQueue()->processEntries();
getAction()->playAnimation(isNight() ? kEventLocomotiveMilosNight : kEventLocomotiveMilosDay);
- getSound()->setupEntry(SoundManager::kSoundType7, kEntityMilos);
+ getSoundQueue()->setupEntry(kSoundType7, kEntityMilos);
getScenes()->loadSceneFromPosition(kCarCoalTender, 1);
break;
@@ -1739,7 +1742,7 @@ IMPLEMENT_FUNCTION(34, Milos, chapter5Handler)
case 4:
getAction()->playAnimation(kEventLocomotiveRestartTrain);
getAction()->playAnimation(kEventLocomotiveOldBridge);
- getSound()->resetState();
+ getSoundQueue()->resetState();
getState()->time = kTime2983500;
setCallback(5);
@@ -1782,7 +1785,7 @@ IMPLEMENT_FUNCTION(34, Milos, chapter5Handler)
setup_savegame(kSavegameTypeEvent, kEventLocomotiveAnnaStopsTrain);
}
- getSound()->processEntry(kEntityMilos);
+ getSoundQueue()->processEntry(kEntityMilos);
if (getState()->time < kTimeTrainStopped2)
getState()->time = kTimeTrainStopped2;
diff --git a/engines/lastexpress/entities/mmeboutarel.cpp b/engines/lastexpress/entities/mmeboutarel.cpp
index 78f2d2fb4b..9ca10ca374 100644
--- a/engines/lastexpress/entities/mmeboutarel.cpp
+++ b/engines/lastexpress/entities/mmeboutarel.cpp
@@ -28,9 +28,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -399,7 +401,7 @@ IMPLEMENT_FUNCTION(13, MmeBoutarel, function13)
break;
case kActionNone:
- if (!getSound()->isBuffered(kEntityMmeBoutarel) && params->param6 != kTimeInvalid) {
+ if (!getSoundQueue()->isBuffered(kEntityMmeBoutarel) && params->param6 != kTimeInvalid) {
UPDATE_PARAM_PROC_TIME(params->param1, !getEntities()->isDistanceBetweenEntities(kEntityMmeBoutarel, kEntityPlayer, 2000), params->param6, 0)
getObjects()->update(kObjectCompartmentD, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorNormal);
getObjects()->update(kObject51, kEntityPlayer, kObjectLocation1, kCursorNormal, kCursorNormal);
@@ -883,8 +885,8 @@ IMPLEMENT_FUNCTION(21, MmeBoutarel, chapter3Handler)
if (getState()->time <= kTime2038500) {
if (!getEntities()->isPlayerInCar(kCarRedSleeping)
|| !params->param1
- || getSound()->isBuffered("FRA2012")
- || getSound()->isBuffered("FRA2010")
+ || getSoundQueue()->isBuffered("FRA2012")
+ || getSoundQueue()->isBuffered("FRA2010")
||!params->param2)
params->param2 = (uint)getState()->time;
diff --git a/engines/lastexpress/entities/pascale.cpp b/engines/lastexpress/entities/pascale.cpp
index 7cf7f7766e..a191273702 100644
--- a/engines/lastexpress/entities/pascale.cpp
+++ b/engines/lastexpress/entities/pascale.cpp
@@ -27,9 +27,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -141,15 +143,15 @@ IMPLEMENT_FUNCTION(8, Pascale, welcomeSophieAndRebecca)
break;
case kChapter1:
- getSound()->playSound(kEntityPascale, "REB1198", SoundManager::kFlagInvalid, 30);
+ getSound()->playSound(kEntityPascale, "REB1198", kFlagInvalid, 30);
break;
case kChapter3:
- getSound()->playSound(kEntityPascale, "REB3001", SoundManager::kFlagInvalid, 30);
+ getSound()->playSound(kEntityPascale, "REB3001", kFlagInvalid, 30);
break;
case kChapter4:
- getSound()->playSound(kEntityPascale, "REB4001", SoundManager::kFlagInvalid, 30);
+ getSound()->playSound(kEntityPascale, "REB4001", kFlagInvalid, 30);
break;
}
@@ -201,7 +203,7 @@ IMPLEMENT_FUNCTION(10, Pascale, welcomeCath)
break;
case kActionNone:
- if (params->param1 && !getSound()->isBuffered(kEntityPascale))
+ if (params->param1 && !getSoundQueue()->isBuffered(kEntityPascale))
getEntities()->updatePositionExit(kEntityPascale, kCarRestaurant, 64);
break;
@@ -462,10 +464,10 @@ IMPLEMENT_FUNCTION(16, Pascale, serveTatianaVassili)
getEntities()->drawSequenceLeft(kEntityPascale, "014B");
getEntities()->updatePositionEnter(kEntityPascale, kCarRestaurant, 67);
- if (getSound()->isBuffered("TAT1069A"))
- getSound()->processEntry("TAT1069A");
- else if (getSound()->isBuffered("TAT1069B"))
- getSound()->processEntry("TAT1069B");
+ if (getSoundQueue()->isBuffered("TAT1069A"))
+ getSoundQueue()->processEntry("TAT1069A");
+ else if (getSoundQueue()->isBuffered("TAT1069B"))
+ getSoundQueue()->processEntry("TAT1069B");
setCallback(2);
setup_playSound("TAT1066");
@@ -754,7 +756,7 @@ IMPLEMENT_FUNCTION(24, Pascale, welcomeAbbot)
break;
case kActionDefault:
- getSound()->playSound(kEntityPascale, "ABB3015", SoundManager::kFlagInvalid, 105);
+ getSound()->playSound(kEntityPascale, "ABB3015", kFlagInvalid, 105);
getEntities()->drawSequenceRight(kEntityPascale, "029A1");
getEntities()->drawSequenceRight(kEntityAbbot, "029A2");
break;
@@ -1213,7 +1215,7 @@ label_callback1:
break;
case kAction169750080:
- if (getSound()->isBuffered(kEntityPascale)) {
+ if (getSoundQueue()->isBuffered(kEntityPascale)) {
params->param4 = 1;
} else {
setCallback(7);
diff --git a/engines/lastexpress/entities/rebecca.cpp b/engines/lastexpress/entities/rebecca.cpp
index 1cb895d8d6..b1a176b47e 100644
--- a/engines/lastexpress/entities/rebecca.cpp
+++ b/engines/lastexpress/entities/rebecca.cpp
@@ -27,9 +27,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -316,7 +318,7 @@ IMPLEMENT_FUNCTION_I(17, Rebecca, function17, bool)
getData()->location = kLocationOutsideCompartment;
if (getProgress().chapter == kChapter3)
- getSound()->playSound(kEntityRebecca, "Reb3005", SoundManager::kFlagInvalid, 75);
+ getSound()->playSound(kEntityRebecca, "Reb3005", kFlagInvalid, 75);
if (params->param1) {
setCallback(5);
@@ -511,7 +513,7 @@ IMPLEMENT_FUNCTION_I(20, Rebecca, function20, TimeValue)
if (getProgress().chapter == kChapter1 && !ENTITY_PARAM(0, 3)) {
if (params->param7 != kTimeInvalid && getState()->time > kTime1174500) {
if (getState()->time <= kTime1183500) {
- if (!getEntities()->isDistanceBetweenEntities(kEntityRebecca, kEntityPlayer, 2000) || getSound()->isBuffered("CON1210") || !params->param7)
+ if (!getEntities()->isDistanceBetweenEntities(kEntityRebecca, kEntityPlayer, 2000) || getSoundQueue()->isBuffered("CON1210") || !params->param7)
params->param7 = (uint)(getState()->time);
if (params->param7 >= getState()->time)
@@ -1357,7 +1359,7 @@ label_callback_3:
params->param5 = kTimeInvalid;
getData()->inventoryItem = kItemNone;
- getSound()->playSound(kEntityRebecca, "Reb3008", SoundManager::kFlagInvalid, 60);
+ getSound()->playSound(kEntityRebecca, "Reb3008", kFlagInvalid, 60);
getEntities()->updatePositionEnter(kEntityRebecca, kCarRestaurant, 52);
setCallback(3);
diff --git a/engines/lastexpress/entities/salko.cpp b/engines/lastexpress/entities/salko.cpp
index 4d510bb9bf..63d995dc42 100644
--- a/engines/lastexpress/entities/salko.cpp
+++ b/engines/lastexpress/entities/salko.cpp
@@ -22,16 +22,19 @@
#include "lastexpress/entities/salko.h"
+#include "lastexpress/fight/fight.h"
+
#include "lastexpress/game/action.h"
#include "lastexpress/game/entities.h"
-#include "lastexpress/game/fight.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -595,8 +598,8 @@ IMPLEMENT_FUNCTION(24, Salko, chapter5Handler)
break;
case 1:
- if (getSound()->isBuffered("MUS050"))
- getSound()->processEntry("MUS050");
+ if (getSoundQueue()->isBuffered("MUS050"))
+ getSoundQueue()->processEntry("MUS050");
getAction()->playAnimation(kEventCathSalkoTrainTopFight);
diff --git a/engines/lastexpress/entities/servers0.cpp b/engines/lastexpress/entities/servers0.cpp
index 1fec775659..989bddd662 100644
--- a/engines/lastexpress/entities/servers0.cpp
+++ b/engines/lastexpress/entities/servers0.cpp
@@ -26,9 +26,10 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
diff --git a/engines/lastexpress/entities/servers1.cpp b/engines/lastexpress/entities/servers1.cpp
index cd0a162755..995fbbc01b 100644
--- a/engines/lastexpress/entities/servers1.cpp
+++ b/engines/lastexpress/entities/servers1.cpp
@@ -26,9 +26,10 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
diff --git a/engines/lastexpress/entities/sophie.cpp b/engines/lastexpress/entities/sophie.cpp
index e0c63f7297..57bd491949 100644
--- a/engines/lastexpress/entities/sophie.cpp
+++ b/engines/lastexpress/entities/sophie.cpp
@@ -25,9 +25,10 @@
#include "lastexpress/game/entities.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
diff --git a/engines/lastexpress/entities/tables.cpp b/engines/lastexpress/entities/tables.cpp
index c372663c40..06ea4c597c 100644
--- a/engines/lastexpress/entities/tables.cpp
+++ b/engines/lastexpress/entities/tables.cpp
@@ -26,9 +26,11 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -49,7 +51,7 @@ Tables::Tables(LastExpressEngine *engine, EntityIndex id) : Entity(engine, id) {
IMPLEMENT_FUNCTION(1, Tables, chapter1)
if (savepoint.action == kActionDefault) {
if (_id == kEntityTables2)
- getSound()->playSoundWithSubtitles("LOOP8A.SND", SoundManager::kFlagLoop, kEntityTables2);
+ getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2);
setup_draw();
}
@@ -59,7 +61,7 @@ IMPLEMENT_FUNCTION_END
IMPLEMENT_FUNCTION(2, Tables, chapter2)
if (savepoint.action == kActionDefault) {
if (_id == kEntityTables2)
- getSound()->playSoundWithSubtitles("LOOP8A.SND", SoundManager::kFlagLoop, kEntityTables2);
+ getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2);
setup_draw();
}
@@ -69,7 +71,7 @@ IMPLEMENT_FUNCTION_END
IMPLEMENT_FUNCTION(3, Tables, chapter3)
if (savepoint.action == kActionDefault) {
if (_id == kEntityTables2)
- getSound()->playSoundWithSubtitles("LOOP8A.SND", SoundManager::kFlagLoop, kEntityTables2);
+ getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2);
setup_draw();
}
@@ -79,7 +81,7 @@ IMPLEMENT_FUNCTION_END
IMPLEMENT_FUNCTION(4, Tables, chapter4)
if (savepoint.action == kActionDefault) {
if (_id == kEntityTables2)
- getSound()->playSoundWithSubtitles("LOOP8A.SND", SoundManager::kFlagLoop, kEntityTables2);
+ getSound()->playSoundWithSubtitles("LOOP8A.SND", kFlagLoop, kEntityTables2);
setup_draw();
}
@@ -88,8 +90,8 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION(5, Tables, chapter5)
if (savepoint.action == kActionDefault) {
- if (_id == kEntityTables2 && getSound()->isBuffered(kEntityTables2))
- getSound()->processEntry(kEntityTables2);
+ if (_id == kEntityTables2 && getSoundQueue()->isBuffered(kEntityTables2))
+ getSoundQueue()->processEntry(kEntityTables2);
setup_draw();
}
@@ -113,21 +115,21 @@ IMPLEMENT_FUNCTION(6, Tables, draw)
case kChapter1:
if (getState()->time > kTime1165500 && !params->param1) {
params->param1 = 1;
- getSound()->processEntry(kEntityTables2);
+ getSoundQueue()->processEntry(kEntityTables2);
}
break;
case kChapter3:
if (getState()->time > kTime2052000 && !params->param2) {
params->param2 = 1;
- getSound()->processEntry(kEntityTables2);
+ getSoundQueue()->processEntry(kEntityTables2);
}
break;
case kChapter4:
if (getState()->time > kTime2488500 && !params->param3) {
params->param3 = 1;
- getSound()->processEntry(kEntityTables2);
+ getSoundQueue()->processEntry(kEntityTables2);
}
break;
diff --git a/engines/lastexpress/entities/tatiana.cpp b/engines/lastexpress/entities/tatiana.cpp
index 6e25d8c5c7..c8901b3e30 100644
--- a/engines/lastexpress/entities/tatiana.cpp
+++ b/engines/lastexpress/entities/tatiana.cpp
@@ -32,9 +32,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -420,7 +422,7 @@ IMPLEMENT_FUNCTION(19, Tatiana, chapter1Handler)
break;
case kActionNone:
- if (getSound()->isBuffered(kEntityTatiana) || !params->param4 || params->param3 == 2 || getSound()->isBuffered("TAT1066"))
+ if (getSoundQueue()->isBuffered(kEntityTatiana) || !params->param4 || params->param3 == 2 || getSoundQueue()->isBuffered("TAT1066"))
goto label_tatiana_chapter1_2;
UPDATE_PARAM_PROC(params->param5, getState()->timeTicks, 450)
@@ -568,7 +570,7 @@ IMPLEMENT_FUNCTION(21, Tatiana, function21)
// Fallback to next case
case 3:
- if (getSound()->isBuffered(kEntityTatiana)) {
+ if (getSoundQueue()->isBuffered(kEntityTatiana)) {
setCallback(3);
setup_updateFromTime(75);
} else {
@@ -1858,7 +1860,7 @@ IMPLEMENT_FUNCTION(46, Tatiana, function46)
parameters->param3 = 1;
if (parameters->param2) {
- getSound()->removeFromQueue(kEntityTatiana);
+ getSoundQueue()->removeFromQueue(kEntityTatiana);
getSavePoints()->call(kEntityTatiana, kEntityTatiana, kActionEndSound);
}
} else {
@@ -1947,12 +1949,12 @@ IMPLEMENT_FUNCTION(48, Tatiana, function48)
params->param1 = 0;
}
- if (!params->param1 || getSound()->isBuffered(kEntityTatiana))
+ if (!params->param1 || getSoundQueue()->isBuffered(kEntityTatiana))
goto label_end;
UPDATE_PARAM_GOTO(params->param2, getState()->timeTicks, 5 * (3 * rnd(5) + 30), label_end);
- getSound()->playSound(kEntityTatiana, "LIB012", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityTatiana, "LIB012", kFlagDefault);
params->param2 = 0;
label_end:
@@ -2086,7 +2088,7 @@ IMPLEMENT_FUNCTION(50, Tatiana, function50)
break;
case kActionKnock:
- if (!getSound()->isBuffered("LIB012", true))
+ if (!getSoundQueue()->isBuffered("LIB012", true))
getSound()->playSound(kEntityPlayer, "LIB012");
break;
@@ -2107,14 +2109,14 @@ IMPLEMENT_FUNCTION(50, Tatiana, function50)
getObjects()->update(kObject48, kEntityTatiana, kObjectLocationNone, kCursorHandKnock, kCursorHand);
getObjects()->update(kObjectCompartmentA, kEntityTatiana, kObjectLocationNone, kCursorHandKnock, kCursorHand);
- if (!getSound()->isBuffered(kEntityTatiana))
+ if (!getSoundQueue()->isBuffered(kEntityTatiana))
getSound()->playSound(kEntityTatiana, "Tat4166");
break;
case kActionCallback:
if (getCallback() == 1) {
- if (getSound()->isBuffered("MUS013"))
- getSound()->processEntry("MUS013");
+ if (getSoundQueue()->isBuffered("MUS013"))
+ getSoundQueue()->processEntry("MUS013");
getAction()->playAnimation(kEventVassiliDeadAlexei);
getSavePoints()->push(kEntityTatiana, kEntityAbbot, kAction104060776);
@@ -2223,11 +2225,11 @@ IMPLEMENT_FUNCTION(54, Tatiana, function54)
case kActionCallback:
if (getCallback() == 1) {
- if (getSound()->isBuffered("MUS050"))
- getSound()->processEntry("MUS050");
+ if (getSoundQueue()->isBuffered("MUS050"))
+ getSoundQueue()->processEntry("MUS050");
- if (getSound()->isBuffered(kEntityTatiana))
- getSound()->processEntry(kEntityTatiana);
+ if (getSoundQueue()->isBuffered(kEntityTatiana))
+ getSoundQueue()->processEntry(kEntityTatiana);
getAction()->playAnimation(isNight() ? kEventTatianaVassiliTalkNight : kEventTatianaVassiliTalk);
getScenes()->processScene();
diff --git a/engines/lastexpress/entities/train.cpp b/engines/lastexpress/entities/train.cpp
index 19c6fe279c..bced1da62b 100644
--- a/engines/lastexpress/entities/train.cpp
+++ b/engines/lastexpress/entities/train.cpp
@@ -30,7 +30,9 @@
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
#include "lastexpress/game/state.h"
-#include "lastexpress/game/sound.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -90,7 +92,7 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
switch (params->param1) {
default:
- error("Train::harem: Invalid value for parameter 1: %d", params->param1);
+ error("[Train::harem] Invalid value for parameter 1: %d", params->param1);
break;
case kObjectCompartment5:
@@ -118,7 +120,7 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
getObjects()->update((ObjectIndex)params->param1, kEntityTrain, kObjectLocation3, kCursorNormal, kCursorNormal);
// Knock / closed door sound
- getSound()->playSound(kEntityTables5, (params->param2 == 8) ? "LIB012" : "LIB013", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityTables5, (params->param2 == 8) ? "LIB012" : "LIB013", kFlagDefault);
if (params->param4 && params->param5) {
@@ -130,17 +132,17 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
break;
case 1:
- getSound()->playSound(kEntityTables5, "Har1014", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1014", kFlagDefault, 15);
break;
case 2:
- getSound()->playSound(kEntityTables5, "Har1013", SoundManager::kFlagDefault, 15);
- getSound()->playSound(kEntityTables5, "Har1016", SoundManager::kFlagDefault, 150);
+ getSound()->playSound(kEntityTables5, "Har1013", kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1016", kFlagDefault, 150);
break;
case 3:
- getSound()->playSound(kEntityTables5, "Har1015A", SoundManager::kFlagDefault, 15);
- getSound()->playSound(kEntityTables5, "Har1015", SoundManager::kFlagDefault, 150);
+ getSound()->playSound(kEntityTables5, "Har1015A", kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1015", kFlagDefault, 150);
break;
}
@@ -164,15 +166,15 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
break;
case 1:
- getSound()->playSound(kEntityTables5, "Har1014", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1014", kFlagDefault, 15);
break;
case 2:
- getSound()->playSound(kEntityTables5, "Har1013", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1013", kFlagDefault, 15);
break;
case 3:
- getSound()->playSound(kEntityTables5, "Har1013A", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1013A", kFlagDefault, 15);
break;
}
@@ -191,11 +193,11 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
break;
case 1:
- getSound()->playSound(kEntityTables5, "Har1012", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1012", kFlagDefault, 15);
break;
case 2:
- getSound()->playSound(kEntityTables5, "Har1012A", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1012A", kFlagDefault, 15);
break;
}
@@ -207,7 +209,7 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
ENTITY_PARAM(0, 1)++;
if (ENTITY_PARAM(0, 1) <= 1)
- getSound()->playSound(kEntityTables5, "Har1014", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1014", kFlagDefault, 15);
else
params->param8 = 1;
@@ -221,7 +223,7 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
ENTITY_PARAM(0, 4)++;
if (ENTITY_PARAM(0, 4) <= 1) {
- getSound()->playSound(kEntityTables5, "Har1011", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1011", kFlagDefault, 15);
handleCompartmentAction();
return;
}
@@ -241,11 +243,11 @@ IMPLEMENT_FUNCTION_II(7, Train, harem, ObjectIndex, uint32)
break;
case 1:
- getSound()->playSound(kEntityTables5, "Har1013", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1013", kFlagDefault, 15);
break;
case 2:
- getSound()->playSound(kEntityTables5, "Har1013A", SoundManager::kFlagDefault, 15);
+ getSound()->playSound(kEntityTables5, "Har1013A", kFlagDefault, 15);
break;
}
@@ -300,13 +302,13 @@ label_process:
}
// Update object
- if (ENTITY_PARAM(0, 8) && !getSound()->isBuffered(kEntityTables5)) {
+ if (ENTITY_PARAM(0, 8) && !getSoundQueue()->isBuffered(kEntityTables5)) {
getObjects()->update((ObjectIndex)ENTITY_PARAM(0, 8), getObjects()->get((ObjectIndex)ENTITY_PARAM(0, 8)).entity, kObjectLocation3, kCursorHandKnock, kCursorHand);
ENTITY_PARAM(0, 8) = 0;
}
// Play clock sound
- if (params->param6 && !getSound()->isBuffered("ZFX1001", true))
+ if (params->param6 && !getSoundQueue()->isBuffered("ZFX1001", true))
getSound()->playSound(kEntityPlayer, "ZFX1001");
break;
@@ -339,12 +341,12 @@ label_process:
// Play clock sound
if (getEntities()->isPlayerPosition(kCarRestaurant, 81)) {
params->param6 = 1;
- if (!getSound()->isBuffered("ZFX1001"))
+ if (!getSoundQueue()->isBuffered("ZFX1001"))
getSound()->playSound(kEntityPlayer, "ZFX1001");
} else {
params->param6 = 0;
- if (getSound()->isBuffered("ZFX1001", true))
- getSound()->removeFromQueue("ZFX1001");
+ if (getSoundQueue()->isBuffered("ZFX1001", true))
+ getSoundQueue()->removeFromQueue("ZFX1001");
}
// Draw moving background behind windows
@@ -562,8 +564,8 @@ void Train::resetParam8() {
&& !getEntities()->isInsideCompartment(kEntityPlayer, (CarIndex)params1->param1, (EntityPosition)params1->param2)
&& !getEntities()->isInsideCompartment(kEntityPlayer, (CarIndex)params1->param1, (EntityPosition)params1->param3)) {
- if (getSound()->isBuffered((const char *)&params1->seq))
- getSound()->processEntry((const char *)&params1->seq);
+ if (getSoundQueue()->isBuffered((const char *)&params1->seq))
+ getSoundQueue()->processEntry((const char *)&params1->seq);
params->param8 = 0;
}
diff --git a/engines/lastexpress/entities/vassili.cpp b/engines/lastexpress/entities/vassili.cpp
index 09fb5b1223..22f41afa92 100644
--- a/engines/lastexpress/entities/vassili.cpp
+++ b/engines/lastexpress/entities/vassili.cpp
@@ -32,9 +32,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -268,7 +270,7 @@ IMPLEMENT_FUNCTION(8, Vassili, function8)
getSavePoints()->push(kEntityVassili, kEntityAnna, kAction226031488);
getSavePoints()->push(kEntityVassili, kEntityVerges, kAction226031488);
getSavePoints()->push(kEntityVassili, kEntityCoudert, kAction226031488);
- getSound()->playSound(kEntityVassili, "VAS1027", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityVassili, "VAS1027", kFlagDefault);
break;
}
IMPLEMENT_FUNCTION_END
@@ -295,12 +297,12 @@ IMPLEMENT_FUNCTION(9, Vassili, function9)
|| getEntities()->isPlayerPosition(kCarRedSleeping, 41)) {
if (savepoint.action == kActionDrawScene)
- getSound()->processEntry(kEntityVassili);
+ getSoundQueue()->processEntry(kEntityVassili);
setup_seizure();
} else {
if (savepoint.action == kActionDefault)
- getSound()->playSound(kEntityVassili, "VAS1028", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityVassili, "VAS1028", kFlagDefault);
}
break;
}
diff --git a/engines/lastexpress/entities/verges.cpp b/engines/lastexpress/entities/verges.cpp
index bc35a105b1..8246f85145 100644
--- a/engines/lastexpress/entities/verges.cpp
+++ b/engines/lastexpress/entities/verges.cpp
@@ -29,9 +29,11 @@
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -123,7 +125,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION_NOSETUP(5, Verges, playSound16)
- Entity::playSound(savepoint, false, SoundManager::kFlagDefault);
+ Entity::playSound(savepoint, false, kFlagDefault);
IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
@@ -139,7 +141,7 @@ IMPLEMENT_FUNCTION_END
//////////////////////////////////////////////////////////////////////////
IMPLEMENT_FUNCTION_II(8, Verges, updateEntity, CarIndex, EntityPosition)
if (savepoint.action == kActionExcuseMeCath) {
- if (!getSound()->isBuffered(kEntityVerges))
+ if (!getSoundQueue()->isBuffered(kEntityVerges))
getSound()->playSound(kEntityPlayer, "TRA1113", getSound()->getSoundFlag(kEntityVerges));
return;
@@ -187,7 +189,7 @@ switch (savepoint.action) {
break;
case 2:
- if (!getSound()->isBuffered(kEntityVerges))
+ if (!getSoundQueue()->isBuffered(kEntityVerges))
getSound()->playSound(kEntityVerges, (char *)&params->seq1);
getEntities()->drawSequenceRight(kEntityVerges, "813DS");
@@ -232,7 +234,7 @@ IMPLEMENT_FUNCTION_IIS(10, Verges, function10, CarIndex, EntityPosition)
case kActionNone:
if (!params->param7) {
- if (!getSound()->isBuffered(kEntityVerges)) {
+ if (!getSoundQueue()->isBuffered(kEntityVerges)) {
getSound()->playSound(kEntityVerges, (char *)&params->seq);
params->param7 = 1;
}
@@ -258,7 +260,7 @@ IMPLEMENT_FUNCTION_IIS(10, Verges, function10, CarIndex, EntityPosition)
break;
case kActionDefault:
- if (!getSound()->isBuffered(kEntityVerges)) {
+ if (!getSoundQueue()->isBuffered(kEntityVerges)) {
getSound()->playSound(kEntityVerges, (char *)&params->seq);
params->param7 = 1;
}
@@ -699,12 +701,12 @@ IMPLEMENT_FUNCTION(24, Verges, policeGettingOffTrain)
break;
case kActionDefault:
- getSound()->playSound(kEntityVerges, "POL1101", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityVerges, "POL1101", kFlagDefault);
break;
case kActionCallback:
if (getCallback() == 1) {
- getSound()->processEntry(kEntityVerges);
+ getSoundQueue()->processEntry(kEntityVerges);
getAction()->playAnimation(kEventGendarmesArrestation);
getLogic()->gameOver(kSavegameTypeIndex, 1, kSceneGameOverPolice1, true);
}
@@ -1314,7 +1316,7 @@ IMPLEMENT_FUNCTION(32, Verges, function32)
break;
case 2:
- if (!getSound()->isBuffered(kEntityVerges))
+ if (!getSoundQueue()->isBuffered(kEntityVerges))
getSound()->playSound(kEntityVerges, "TRA3004");
getEntities()->drawSequenceRight(kEntityVerges, "813DS");
@@ -1752,16 +1754,16 @@ IMPLEMENT_FUNCTION(40, Verges, chapter5Handler)
break;
case kActionNone:
- if (getEntities()->isInSalon(kEntityPlayer) && !getSound()->isBuffered(kEntityVerges))
+ if (getEntities()->isInSalon(kEntityPlayer) && !getSoundQueue()->isBuffered(kEntityVerges))
getSound()->playSound(kEntityVerges, "WAT5000");
break;
case kActionOpenDoor:
- if (getSound()->isBuffered(kEntityVerges))
- getSound()->processEntry(kEntityVerges);
+ if (getSoundQueue()->isBuffered(kEntityVerges))
+ getSoundQueue()->processEntry(kEntityVerges);
- if (getSound()->isBuffered("MUS050"))
- getSound()->processEntry("MUS050");
+ if (getSoundQueue()->isBuffered("MUS050"))
+ getSoundQueue()->processEntry("MUS050");
getObjects()->update(kObject65, kEntityPlayer, kObjectLocationNone, kCursorNormal, kCursorForward);
@@ -1811,7 +1813,7 @@ IMPLEMENT_FUNCTION(41, Verges, function41)
// Fallback to next case
case 2:
- if (getSound()->isBuffered(kEntityVerges)) {
+ if (getSoundQueue()->isBuffered(kEntityVerges)) {
setCallback(2);
setup_updateFromTime(225);
} else {
diff --git a/engines/lastexpress/entities/vesna.cpp b/engines/lastexpress/entities/vesna.cpp
index 8e09dbf7b0..7a1f1d3195 100644
--- a/engines/lastexpress/entities/vesna.cpp
+++ b/engines/lastexpress/entities/vesna.cpp
@@ -22,16 +22,18 @@
#include "lastexpress/entities/vesna.h"
+#include "lastexpress/fight/fight.h"
+
#include "lastexpress/game/action.h"
#include "lastexpress/game/entities.h"
-#include "lastexpress/game/fight.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -1082,7 +1084,7 @@ IMPLEMENT_FUNCTION(30, Vesna, function30)
case kActionNone:
if (!params->param1) {
UPDATE_PARAM_PROC(params->param3, getState()->timeTicks, 120)
- getSound()->playSound(kEntityVesna, "Ves50001", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityVesna, "Ves50001", kFlagDefault);
params->param1 = 1;
UPDATE_PARAM_PROC_END
}
@@ -1145,7 +1147,7 @@ IMPLEMENT_FUNCTION(30, Vesna, function30)
setCallback(2);
setup_savegame(kSavegameTypeEvent, kEventCathVesnaTrainTopKilled);
} else {
- getSound()->playSound(kEntityVesna, "Ves5001", SoundManager::kFlagDefault);
+ getSound()->playSound(kEntityVesna, "Ves5001", kFlagDefault);
params->param1 = 1;
}
break;
diff --git a/engines/lastexpress/entities/yasmin.cpp b/engines/lastexpress/entities/yasmin.cpp
index 7e8b2f7348..45e5e11568 100644
--- a/engines/lastexpress/entities/yasmin.cpp
+++ b/engines/lastexpress/entities/yasmin.cpp
@@ -26,9 +26,10 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp
new file mode 100644
index 0000000000..b832d46a60
--- /dev/null
+++ b/engines/lastexpress/fight/fight.cpp
@@ -0,0 +1,409 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "lastexpress/fight/fight.h"
+
+#include "lastexpress/fight/fighter_anna.h"
+#include "lastexpress/fight/fighter_ivo.h"
+#include "lastexpress/fight/fighter_milos.h"
+#include "lastexpress/fight/fighter_salko.h"
+#include "lastexpress/fight/fighter_vesna.h"
+
+#include "lastexpress/data/cursor.h"
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/game/inventory.h"
+#include "lastexpress/game/logic.h"
+#include "lastexpress/game/object.h"
+#include "lastexpress/game/scenes.h"
+#include "lastexpress/game/state.h"
+
+#include "lastexpress/sound/queue.h"
+
+#include "lastexpress/graphics.h"
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+Fight::FightData::FightData() {
+ player = NULL;
+ opponent = NULL;
+
+ index = 0;
+
+ isFightRunning = false;
+}
+
+Fight::FightData::~FightData() {
+ SAFE_DELETE(player);
+ SAFE_DELETE(opponent);
+}
+
+Fight::Fight(LastExpressEngine *engine) : _engine(engine), _data(NULL), _endType(kFightEndLost), _state(0), _handleTimer(false) {
+}
+
+Fight::~Fight() {
+ clearData();
+ _data = NULL;
+
+ // Zero passed pointers
+ _engine = NULL;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Events
+//////////////////////////////////////////////////////////////////////////
+void Fight::eventMouse(const Common::Event &ev) {
+ if (!_data || _data->index)
+ return;
+
+ // TODO move all the egg handling to inventory functions
+
+ getFlags()->mouseLeftClick = false;
+ getFlags()->shouldRedraw = false;
+ getFlags()->mouseRightClick = false;
+
+ if (ev.mouse.x < 608 || ev.mouse.y < 448 || ev.mouse.x >= 640 || ev.mouse.x >= 480) {
+
+ // Handle right button click
+ if (ev.type == Common::EVENT_RBUTTONUP) {
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ setStopped();
+
+ getGlobalTimer() ? _state = 0 : ++_state;
+
+ getFlags()->mouseRightClick = true;
+ }
+
+ if (_handleTimer) {
+ // Timer expired => show with full brightness
+ if (!getGlobalTimer())
+ getInventory()->drawBlinkingEgg();
+
+ _handleTimer = false;
+ }
+
+ // Check hotspots
+ Scene *scene = getScenes()->get(getState()->scene);
+ SceneHotspot *hotspot = NULL;
+
+ if (!scene->checkHotSpot(ev.mouse, &hotspot)) {
+ _engine->getCursor()->setStyle(kCursorNormal);
+ } else {
+ _engine->getCursor()->setStyle((CursorStyle)hotspot->cursor);
+
+ // Call player function
+ if (_data->player->canInteract((Fighter::FightAction)hotspot->action)) {
+ if (ev.type == Common::EVENT_LBUTTONUP)
+ _data->player->handleAction((Fighter::FightAction)hotspot->action);
+ } else {
+ _engine->getCursor()->setStyle(kCursorNormal);
+ }
+ }
+ } else {
+ // Handle clicks on menu icon
+
+ if (!_handleTimer) {
+ // Timer expired => show with full brightness
+ if (!getGlobalTimer())
+ getInventory()->drawBlinkingEgg();
+
+ _handleTimer = true;
+ }
+
+ // Stop fight if clicked
+ if (ev.type == Common::EVENT_LBUTTONUP) {
+ _handleTimer = false;
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ bailout(kFightEndExit);
+ }
+
+ // Reset timer on right click
+ if (ev.type == Common::EVENT_RBUTTONUP) {
+ if (getGlobalTimer()) {
+ if (getSoundQueue()->isBuffered("TIMER"))
+ getSoundQueue()->removeFromQueue("TIMER");
+
+ setGlobalTimer(900);
+ }
+ }
+ }
+
+ getFlags()->shouldRedraw = true;
+}
+
+void Fight::eventTick(const Common::Event &ev) {
+ handleTick(ev, true);
+}
+
+void Fight::handleTick(const Common::Event &ev, bool isProcessing) {
+ // TODO move all the egg handling to inventory functions
+
+ // Blink egg
+ if (getGlobalTimer()) {
+ warning("[Fight::handleTick] Egg blinking not implemented");
+ }
+
+ if (!_data || _data->index)
+ return;
+
+ SceneHotspot *hotspot = NULL;
+ if (!getScenes()->get(getState()->scene)->checkHotSpot(ev.mouse, &hotspot) || !_data->player->canInteract((Fighter::FightAction)hotspot->action)) {
+ _engine->getCursor()->setStyle(kCursorNormal);
+ } else {
+ _engine->getCursor()->setStyle((CursorStyle)hotspot->cursor);
+ }
+
+ _data->player->update();
+ _data->opponent->update();
+
+ // Draw sequences
+ if (!_data->isFightRunning)
+ return;
+
+ if (isProcessing)
+ getScenes()->drawFrames(true);
+
+ if (_data->index) {
+ // Set next sequence name index
+ _data->index--;
+ _data->sequences[_data->index] = loadSequence(_data->names[_data->index]);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Setup
+//////////////////////////////////////////////////////////////////////////
+Fight::FightEndType Fight::setup(FightType type) {
+ if (_data)
+ error("[Fight::setup] Calling fight setup again while a fight is already in progress");
+
+ //////////////////////////////////////////////////////////////////////////
+ // Prepare UI & state
+ if (_state >= 5 && (type == kFightSalko || type == kFightVesna)) {
+ _state = 0;
+ return kFightEndWin;
+ }
+
+ getInventory()->showHourGlass();
+ // TODO events function
+ getFlags()->flag_0 = false;
+ getFlags()->mouseRightClick = false;
+ getEntities()->reset();
+
+ // Compute scene to use
+ SceneIndex sceneIndex;
+ switch(type) {
+ default:
+ sceneIndex = kSceneFightDefault;
+ break;
+
+ case kFightMilos:
+ sceneIndex = (getObjects()->get(kObjectCompartment1).location2 < kObjectLocation3) ? kSceneFightMilos : kSceneFightMilosBedOpened;
+ break;
+
+ case kFightAnna:
+ sceneIndex = kSceneFightAnna;
+ break;
+
+ case kFightIvo:
+ sceneIndex = kSceneFightIvo;
+ break;
+
+ case kFightSalko:
+ sceneIndex = kSceneFightSalko;
+ break;
+
+ case kFightVesna:
+ sceneIndex = kSceneFightVesna;
+ break;
+ }
+
+ if (getFlags()->shouldRedraw) {
+ getFlags()->shouldRedraw = false;
+ askForRedraw();
+ //redrawScreen();
+ }
+
+ // Load the scene object
+ Scene *scene = getScenes()->get(sceneIndex);
+
+ // Update game entities and state
+ getEntityData(kEntityPlayer)->entityPosition = scene->entityPosition;
+ getEntityData(kEntityPlayer)->location = scene->location;
+
+ getState()->scene = sceneIndex;
+
+ getFlags()->flag_3 = true;
+
+ // Draw the scene
+ _engine->getGraphicsManager()->draw(scene, GraphicsManager::kBackgroundC);
+ // FIXME move to start of fight?
+ askForRedraw();
+ redrawScreen();
+
+ //////////////////////////////////////////////////////////////////////////
+ // Setup the fight
+ _data = new FightData;
+ loadData(type);
+
+ // Show opponents & egg button
+ Common::Event emptyEvent;
+ handleTick(emptyEvent, false);
+ getInventory()->drawEgg();
+
+ // Start fight
+ _endType = kFightEndLost;
+ while (_data->isFightRunning) {
+ if (_engine->handleEvents())
+ continue;
+
+ getSoundQueue()->updateQueue();
+ }
+
+ // Cleanup after fight is over
+ clearData();
+
+ return _endType;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Status
+//////////////////////////////////////////////////////////////////////////
+void Fight::setStopped() {
+ if (_data)
+ _data->isFightRunning = false;
+}
+
+void Fight::bailout(FightEndType type) {
+ _state = 0;
+ _endType = type;
+ setStopped();
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Cleanup
+//////////////////////////////////////////////////////////////////////////
+void Fight::clearData() {
+ if (!_data)
+ return;
+
+ // Clear data
+ SAFE_DELETE(_data);
+
+ _engine->restoreEventHandlers();
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Loading
+//////////////////////////////////////////////////////////////////////////
+void Fight::loadData(FightType type) {
+ if (!_data)
+ error("[Fight::loadData] Data not initialized");
+
+ switch (type) {
+ default:
+ break;
+
+ case kFightMilos:
+ _data->player = new FighterPlayerMilos(_engine);
+ _data->opponent = new FighterOpponentMilos(_engine);
+ break;
+
+ case kFightAnna:
+ _data->player = new FighterPlayerAnna(_engine);
+ _data->opponent = new FighterOpponentAnna(_engine);
+ break;
+
+ case kFightIvo:
+ _data->player = new FighterPlayerIvo(_engine);
+ _data->opponent = new FighterOpponentIvo(_engine);
+ break;
+
+ case kFightSalko:
+ _data->player = new FighterPlayerSalko(_engine);
+ _data->opponent = new FighterOpponentSalko(_engine);
+ break;
+
+ case kFightVesna:
+ _data->player = new FighterPlayerVesna(_engine);
+ _data->opponent = new FighterOpponentVesna(_engine);
+ break;
+ }
+
+ if (!_data->player || !_data->opponent)
+ error("[Fight::loadData] Error loading fight data (type=%d)", type);
+
+ // Setup opponent pointers
+ setOpponents();
+
+ //////////////////////////////////////////////////////////////////////////
+ // Start running the fight
+ _data->isFightRunning = true;
+
+ if (_state < 5) {
+ _data->player->setSequenceAndDraw(0, Fighter::kFightSequenceType0);
+ _data->opponent->setSequenceAndDraw(0, Fighter::kFightSequenceType0);
+ goto end_load;
+ }
+
+ switch(type) {
+ default:
+ break;
+
+ case kFightMilos:
+ _data->opponent->setCountdown(1);
+ _data->player->setSequenceAndDraw(4, Fighter::kFightSequenceType0);
+ _data->opponent->setSequenceAndDraw(0, Fighter::kFightSequenceType0);
+ break;
+
+ case kFightIvo:
+ _data->opponent->setCountdown(1);
+ _data->player->setSequenceAndDraw(3, Fighter::kFightSequenceType0);
+ _data->opponent->setSequenceAndDraw(6, Fighter::kFightSequenceType0);
+ break;
+
+ case kFightVesna:
+ _data->opponent->setCountdown(1);
+ _data->player->setSequenceAndDraw(0, Fighter::kFightSequenceType0);
+ _data->player->setSequenceAndDraw(3, Fighter::kFightSequenceType2);
+ _data->opponent->setSequenceAndDraw(5, Fighter::kFightSequenceType0);
+ break;
+ }
+
+end_load:
+ // Setup event handlers
+ _engine->backupEventHandlers();
+ SET_EVENT_HANDLERS(Fight, this);
+}
+
+void Fight::setOpponents() {
+ _data->player->setOpponent(_data->opponent);
+ _data->opponent->setOpponent(_data->player);
+
+ _data->player->setFight(this);
+ _data->opponent->setFight(this);
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/fight/fight.h b/engines/lastexpress/fight/fight.h
new file mode 100644
index 0000000000..fffb520789
--- /dev/null
+++ b/engines/lastexpress/fight/fight.h
@@ -0,0 +1,125 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_FIGHT_H
+#define LASTEXPRESS_FIGHT_H
+
+/*
+ Fight structure
+ ---------------
+ uint32 {4} - player struct
+ uint32 {4} - opponent struct
+ uint32 {4} - hasLost flag
+
+ byte {1} - isRunning
+
+ Fight participant structure
+ ---------------------------
+ uint32 {4} - function pointer
+ uint32 {4} - pointer to fight structure
+ uint32 {4} - pointer to opponent (fight participant structure)
+ uint32 {4} - array of sequences
+ uint32 {4} - number of sequences
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint16 {2} - ??
+ uint16 {2} - ?? - only for opponent structure
+ uint32 {4} - ?? - only for opponent structure
+
+*/
+
+#include "lastexpress/shared.h"
+
+#include "lastexpress/eventhandler.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+class Sequence;
+
+class Fighter;
+class Opponent;
+
+class Fight : public EventHandler {
+public:
+ enum FightEndType {
+ kFightEndWin = 0,
+ kFightEndLost = 1,
+ kFightEndExit = 2
+ };
+
+ Fight(LastExpressEngine *engine);
+ ~Fight();
+
+ FightEndType setup(FightType type);
+
+ void eventMouse(const Common::Event &ev);
+ void eventTick(const Common::Event &ev);
+
+ // State
+ bool isRunning() { return _data->isFightRunning; }
+ void setRunningState(bool state) { _data->isFightRunning = state; }
+ void bailout(FightEndType type);
+ void setStopped();
+ void resetState() { _state = 0; }
+ void setEndType(FightEndType endType) { _endType = endType; }
+
+private:
+ struct FightData {
+ Fighter *player;
+ Opponent *opponent;
+ int32 index;
+
+ Sequence *sequences[20];
+ Common::String names[20];
+
+ bool isFightRunning;
+
+ FightData();
+ ~FightData();
+ };
+
+ LastExpressEngine *_engine;
+ FightData *_data;
+ FightEndType _endType;
+ int _state;
+
+ bool _handleTimer;
+
+ // Events
+ void handleTick(const Common::Event &ev, bool unknown);
+
+ // Data
+ void loadData(FightType type);
+ void clearData();
+ void setOpponents();
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_FIGHT_H
diff --git a/engines/lastexpress/fight/fighter.cpp b/engines/lastexpress/fight/fighter.cpp
new file mode 100644
index 0000000000..bae7728a2b
--- /dev/null
+++ b/engines/lastexpress/fight/fighter.cpp
@@ -0,0 +1,249 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "lastexpress/fight/fighter.h"
+
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/game/scenes.h"
+
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+
+namespace LastExpress {
+
+Fighter::Fighter(LastExpressEngine *engine) : _engine(engine) {
+ _opponent = NULL;
+ _fight = NULL;
+
+ _sequenceIndex = 0;
+ _sequence = NULL;
+ _frame = NULL;
+ _frameIndex = 0;
+
+ _field_24 = 0;
+
+ _action = kFightAction101;
+ _sequenceIndex2 = 0;
+
+ _countdown = 1;
+
+ _field_34 = 0;
+}
+
+Fighter::~Fighter() {
+ clearSequences();
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Cleanup
+//////////////////////////////////////////////////////////////////////////
+void Fighter::clearSequences() {
+ // The original game resets the function pointers to default values, just before deleting the struct
+
+ getScenes()->removeAndRedraw(&_frame, false);
+
+ // Free sequences
+ for (int i = 0; i < (int)_sequences.size(); i++)
+ SAFE_DELETE(_sequences[i]);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Drawing
+//////////////////////////////////////////////////////////////////////////
+void Fighter::setSequenceAndDraw(uint32 sequenceIndex, FightSequenceType type) {
+ if (_sequences.size() < sequenceIndex)
+ return;
+
+ switch (type) {
+ default:
+ break;
+
+ case kFightSequenceType0:
+ if (_sequenceIndex)
+ return;
+
+ _sequence = _sequences[sequenceIndex];
+ _sequenceIndex = sequenceIndex;
+ draw();
+ break;
+
+ case kFightSequenceType1:
+ _sequence = _sequences[sequenceIndex];
+ _sequenceIndex = sequenceIndex;
+ _sequenceIndex2 = 0;
+ draw();
+ break;
+
+ case kFightSequenceType2:
+ _sequenceIndex2 = sequenceIndex;
+ break;
+ }
+}
+
+void Fighter::draw() {
+ getScenes()->removeAndRedraw(&_frame, false);
+
+ _frameIndex = 0;
+ _field_24 = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Processing
+//////////////////////////////////////////////////////////////////////////
+void Fighter::process() {
+ if (!_sequence) {
+ if (_frame) {
+ getScenes()->removeFromQueue(_frame);
+ getScenes()->setCoordinates(_frame);
+ }
+ SAFE_DELETE(_frame);
+ return;
+ }
+
+ if (_sequence->count() <= _frameIndex) {
+ switch(_action) {
+ default:
+ break;
+
+ case kFightAction101:
+ setSequenceAndDraw(_sequenceIndex2, kFightSequenceType1);
+ _sequenceIndex2 = 0;
+ break;
+
+ case kFightActionResetFrame:
+ _frameIndex = 0;
+ break;
+
+ case kFightAction103:
+ setSequenceAndDraw(0, kFightSequenceType1);
+ handleAction(kFightAction101);
+ _opponent->setSequenceAndDraw(0, kFightSequenceType1);
+ _opponent->handleAction(kFightAction101);
+ _opponent->update();
+ break;
+
+ case kFightActionWin:
+ _fight->bailout(Fight::kFightEndWin);
+ break;
+
+ case kFightActionLost:
+ _fight->bailout(Fight::kFightEndLost);
+ break;
+ }
+ }
+
+ if (_fight->isRunning()) {
+
+ // Get the current sequence frame
+ SequenceFrame *frame = new SequenceFrame(_sequence, (uint16)_frameIndex);
+ frame->getInfo()->location = 1;
+
+ if (_frame == frame) {
+ delete frame;
+ return;
+ }
+
+ getSound()->playFightSound(frame->getInfo()->soundAction, frame->getInfo()->field_31);
+
+ // Add current frame to queue and advance
+ getScenes()->addToQueue(frame);
+ _frameIndex++;
+
+ if (_frame) {
+ getScenes()->removeFromQueue(_frame);
+
+ if (!frame->getInfo()->field_2E)
+ getScenes()->setCoordinates(_frame);
+ }
+
+ // Replace by new frame
+ delete _frame;
+ _frame = frame;
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Default actions
+//////////////////////////////////////////////////////////////////////////
+void Fighter::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ return;
+
+ case kFightAction101:
+ break;
+
+ case kFightActionResetFrame:
+ _countdown--;
+ break;
+
+ case kFightAction103:
+ _opponent->handleAction(kFightActionResetFrame);
+ break;
+
+ case kFightActionWin:
+ _fight->setEndType(Fight::kFightEndWin);
+ _opponent->handleAction(kFightActionResetFrame);
+ break;
+
+ case kFightActionLost:
+ _fight->setEndType(Fight::kFightEndLost);
+ _opponent->handleAction(kFightActionResetFrame);
+ break;
+ }
+
+ // Update action
+ _action = action;
+}
+
+bool Fighter::canInteract(FightAction /*action = kFightActionNone*/ ) {
+ return (_action == kFightAction101 && !_sequenceIndex);
+}
+
+void Fighter::update() {
+ process();
+
+ if (_frame)
+ _frame->getInfo()->location = (_action == kFightActionResetFrame ? 2 : 0);
+}
+
+void Opponent::update() {
+ process();
+
+ if (_field_38 && !_sequenceIndex)
+ _field_38--;
+
+ if (_frame)
+ _frame->getInfo()->location = 1;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Helpers
+//////////////////////////////////////////////////////////////////////////
+bool Fighter::checkFrame(uint32 val) {
+ return (_frame->getInfo()->field_33 & val);
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/fight/fighter.h b/engines/lastexpress/fight/fighter.h
new file mode 100644
index 0000000000..e37fe49d86
--- /dev/null
+++ b/engines/lastexpress/fight/fighter.h
@@ -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.
+ *
+ */
+
+#ifndef LASTEXPRESS_FIGHTER_H
+#define LASTEXPRESS_FIGHTER_H
+
+#include "lastexpress/fight/fight.h"
+
+#include "common/array.h"
+
+namespace LastExpress {
+
+class Fight;
+class Sequence;
+class SequenceFrame;
+
+class Fighter {
+public:
+ enum FightAction {
+ kFightActionNone = 0,
+ kFightAction1 = 1,
+ kFightAction2 = 2,
+ kFightAction3 = 3,
+ kFightAction4 = 4,
+ kFightAction5 = 5,
+ kFightAction101 = 101,
+ kFightActionResetFrame = 102,
+ kFightAction103 = 103,
+ kFightActionWin = 104,
+ kFightActionLost = 105,
+ kFightAction128 = 128,
+ kFightAction129 = 129,
+ kFightAction130 = 130,
+ kFightAction131 = 131,
+ kFightAction132 = 132
+ };
+
+ enum FightSequenceType {
+ kFightSequenceType0 = 0,
+ kFightSequenceType1 = 1,
+ kFightSequenceType2 = 2
+ };
+
+ Fighter(LastExpressEngine *engine);
+ virtual ~Fighter();
+
+ // Default functions
+ virtual void handleAction(FightAction action);
+ virtual void update();
+ virtual bool canInteract(FightAction action = kFightActionNone);
+
+ // Drawing
+ void setSequenceAndDraw(uint32 sequenceIndex, FightSequenceType type);
+
+ // Accessors
+ void setOpponent(Fighter *opponent) { _opponent = opponent; }
+ void setCountdown(int32 countdown) { _countdown = countdown; }
+ void setFight(Fight *fight) { _fight = fight; }
+
+ int getCountdown() { return _countdown; }
+ uint32 getSequenceIndex() { return _sequenceIndex; }
+ uint32 getField34() { return _field_34; }
+
+protected:
+ LastExpressEngine *_engine;
+ Fight *_fight;
+ Fighter *_opponent;
+ Sequence *_sequence;
+ SequenceFrame *_frame;
+ uint32 _sequenceIndex;
+ Common::Array<Sequence *> _sequences;
+ uint32 _frameIndex;
+ uint32 _field_24;
+ FightAction _action;
+ uint32 _sequenceIndex2;
+ int32 _countdown; // countdown before loosing ?
+ uint32 _field_34;
+
+ // Drawing and processing
+ void draw();
+ void process();
+
+ // Cleanup
+ void clearSequences();
+
+ // Helpers
+ bool checkFrame(uint32 val);
+};
+
+class Opponent : public Fighter {
+public:
+ Opponent(LastExpressEngine *engine) : Fighter(engine) {
+ _field_38 = 0;
+ }
+
+ virtual void update();
+
+protected:
+ int32 _field_38;
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_FIGHTER_H
diff --git a/engines/lastexpress/fight/fighter_anna.cpp b/engines/lastexpress/fight/fighter_anna.cpp
new file mode 100644
index 0000000000..c7660cab1a
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_anna.cpp
@@ -0,0 +1,187 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "lastexpress/fight/fighter_anna.h"
+
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+//////////////////////////////////////////////////////////////////////////
+// Player
+//////////////////////////////////////////////////////////////////////////
+FighterPlayerAnna::FighterPlayerAnna(LastExpressEngine *engine) : Fighter(engine) {
+ _sequences.push_back(loadSequence("2002cr.seq"));
+ _sequences.push_back(loadSequence("2002cdl.seq"));
+ _sequences.push_back(loadSequence("2002cdr.seq"));
+ _sequences.push_back(loadSequence("2002cdm.seq"));
+ _sequences.push_back(loadSequence("2002lbk.seq"));
+}
+
+void FighterPlayerAnna::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ Fighter::handleAction(action);
+ return;
+
+ case kFightAction1:
+ if ((_sequenceIndex != 1 && _sequenceIndex != 3) || checkFrame(4)) {
+ setSequenceAndDraw(4, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(4, kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction2:
+ if ((_sequenceIndex != 2 && _sequenceIndex != 3) || checkFrame(4)) {
+ setSequenceAndDraw(4, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(5, kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction3:
+ if ((_sequenceIndex != 2 && _sequenceIndex != 1) || checkFrame(4)) {
+ setSequenceAndDraw(4, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(6, kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction128:
+ switch (_opponent->getSequenceIndex()) {
+ default:
+ setSequenceAndDraw(3, kFightSequenceType0);
+ break;
+
+ case 1:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 2:
+ setSequenceAndDraw(3, kFightSequenceType0);
+ break;
+
+ case 3:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+ }
+ break;
+ }
+
+ if (_field_34 > 4) {
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ _fight->bailout(Fight::kFightEndWin);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Opponent
+//////////////////////////////////////////////////////////////////////////
+FighterOpponentAnna::FighterOpponentAnna(LastExpressEngine *engine) : Opponent(engine) {
+ _sequences.push_back(loadSequence("2002or.seq"));
+ _sequences.push_back(loadSequence("2002oal.seq"));
+ _sequences.push_back(loadSequence("2002oam.seq"));
+ _sequences.push_back(loadSequence("2002oar.seq"));
+ _sequences.push_back(loadSequence("2002okr.seq"));
+ _sequences.push_back(loadSequence("2002okml.seq"));
+ _sequences.push_back(loadSequence("2002okm.seq"));
+
+ getSound()->playSound(kEntityTables0, "MUS030", kFlagDefault);
+
+ _field_38 = 30;
+}
+
+void FighterOpponentAnna::update() {
+ if (!_field_38 && canInteract(kFightAction1) && !_sequenceIndex2) {
+
+ if (_opponent->getField34() >= 2) {
+ switch (rnd(6)) {
+ default:
+ break;
+
+ case 0:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 1:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+
+ case 2:
+ setSequenceAndDraw(3, kFightSequenceType0);
+ break;
+
+ case 3:
+ setSequenceAndDraw(3, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+
+ case 4:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+
+ case 5:
+ setSequenceAndDraw(3, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+ }
+ }
+
+ // Update field_38
+ _field_38 = (int32)rnd(15);
+ }
+
+ if (_frame && checkFrame(2)) {
+ if (_sequenceIndex == 1 || _sequenceIndex == 2 || _sequenceIndex == 3)
+ _opponent->handleAction((FightAction)_sequenceIndex);
+
+ if (_opponent->getCountdown() <= 0) {
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ handleAction(kFightActionLost);
+ }
+ }
+
+ Fighter::update();
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/fight/fighter_anna.h b/engines/lastexpress/fight/fighter_anna.h
new file mode 100644
index 0000000000..abb6f9dc64
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_anna.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 LASTEXPRESS_FIGHTER_ANNA_H
+#define LASTEXPRESS_FIGHTER_ANNA_H
+
+#include "lastexpress/fight/fighter.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+
+class FighterPlayerAnna : public Fighter {
+public:
+ FighterPlayerAnna(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+};
+
+class FighterOpponentAnna : public Opponent {
+public:
+ FighterOpponentAnna(LastExpressEngine *engine);
+
+ virtual void update();
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_FIGHTER_ANNA_H
diff --git a/engines/lastexpress/fight/fighter_ivo.cpp b/engines/lastexpress/fight/fighter_ivo.cpp
new file mode 100644
index 0000000000..87a52c6be4
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_ivo.cpp
@@ -0,0 +1,245 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "lastexpress/fight/fighter_ivo.h"
+
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+//////////////////////////////////////////////////////////////////////////
+// Player
+//////////////////////////////////////////////////////////////////////////
+FighterPlayerIvo::FighterPlayerIvo(LastExpressEngine *engine) : Fighter(engine) {
+ _sequences.push_back(loadSequence("2003cr.seq"));
+ _sequences.push_back(loadSequence("2003car.seq"));
+ _sequences.push_back(loadSequence("2003cal.seq"));
+ _sequences.push_back(loadSequence("2003cdr.seq"));
+ _sequences.push_back(loadSequence("2003cdm.seq"));
+ _sequences.push_back(loadSequence("2003chr.seq"));
+ _sequences.push_back(loadSequence("2003chl.seq"));
+ _sequences.push_back(loadSequence("2003ckr.seq"));
+ _sequences.push_back(loadSequence("2003lbk.seq"));
+ _sequences.push_back(loadSequence("2003fbk.seq"));
+
+ _countdown = 5;
+}
+
+void FighterPlayerIvo::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ Fighter::handleAction(action);
+ return;
+
+ case kFightAction1:
+ if (_sequenceIndex != 1 || checkFrame(4)) {
+ setSequenceAndDraw(7, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(4, kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+ update();
+ }
+ break;
+
+ case kFightAction2:
+ if ((_sequenceIndex != 2 && _sequenceIndex != 3) || checkFrame(4)) {
+ setSequenceAndDraw(7, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(5, kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+ update();
+ }
+ break;
+
+ case kFightAction128:
+ switch (_opponent->getSequenceIndex()) {
+ default:
+ case 1:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 2:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+ }
+ break;
+
+ case kFightAction129:
+ setSequenceAndDraw((_opponent->getCountdown() > 1) ? 4 : 3, _sequenceIndex ? kFightSequenceType2 : kFightSequenceType0);
+ break;
+
+ case kFightAction130:
+ setSequenceAndDraw(3, _sequenceIndex ? kFightSequenceType2 : kFightSequenceType0);
+ break;
+ }
+}
+
+void FighterPlayerIvo::update() {
+
+ if ((_sequenceIndex == 3 || _sequenceIndex == 4) && !_frameIndex)
+ _opponent->handleAction(kFightAction131);
+
+ if (_frame && checkFrame(2)) {
+
+ // Draw sequences
+ if (_opponent->getCountdown() <= 0) {
+ setSequenceAndDraw(9, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(8, kFightSequenceType1);
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+
+ handleAction(kFightActionWin);
+ return;
+ }
+
+ if (_sequenceIndex == 3 || _sequenceIndex == 4)
+ _opponent->handleAction((FightAction)_sequenceIndex);
+ }
+
+ Fighter::update();
+}
+
+bool FighterPlayerIvo::canInteract(FightAction action) {
+ if (action == kFightAction129 || action == kFightAction130)
+ return (_sequenceIndex >= 8);
+
+ return Fighter::canInteract();
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Opponent
+//////////////////////////////////////////////////////////////////////////
+FighterOpponentIvo::FighterOpponentIvo(LastExpressEngine *engine) : Opponent(engine) {
+ _sequences.push_back(loadSequence("2003or.seq"));
+ _sequences.push_back(loadSequence("2003oal.seq"));
+ _sequences.push_back(loadSequence("2003oar.seq"));
+ _sequences.push_back(loadSequence("2003odm.seq"));
+ _sequences.push_back(loadSequence("2003okl.seq"));
+ _sequences.push_back(loadSequence("2003okj.seq"));
+ _sequences.push_back(loadSequence("blank.seq"));
+ _sequences.push_back(loadSequence("csdr.seq"));
+ _sequences.push_back(loadSequence("2003l.seq"));
+
+ getSound()->playSound(kEntityTables0, "MUS032", kFlagDefault);
+
+ _countdown = 5;
+ _field_38 = 15;
+}
+
+void FighterOpponentIvo::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ Fighter::handleAction(action);
+ break;
+
+ case kFightAction3:
+ if ((_sequenceIndex != 1 && _sequenceIndex != 3) || checkFrame(4)) {
+ setSequenceAndDraw(6, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(6, kFightSequenceType1);
+ _opponent->handleAction(kFightAction103);
+ }
+ break;
+
+ case kFightAction4:
+ if ((_sequenceIndex != 2 && _sequenceIndex != 3) || checkFrame(4)) {
+ setSequenceAndDraw(6, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(5, kFightSequenceType1);
+ _opponent->handleAction(kFightAction103);
+ }
+ break;
+
+ case kFightAction131:
+ if (_sequenceIndex)
+ break;
+
+ if (rnd(100) <= (unsigned int)(_countdown > 2 ? 60 : 75)) {
+ setSequenceAndDraw(3 , kFightSequenceType1);
+ if (_opponent->getSequenceIndex() == 4)
+ setSequenceAndDraw(2, kFightSequenceType2);
+ }
+ break;
+ }
+}
+
+void FighterOpponentIvo::update() {
+ if (!_field_38 && canInteract(kFightAction1) && !_sequenceIndex2) {
+
+ if (_opponent->getField34() >= 2) {
+ switch (rnd(5)) {
+ default:
+ break;
+
+ case 0:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 1:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+
+ case 2:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+
+ case 3:
+ setSequenceAndDraw(0, kFightSequenceType2);
+ setSequenceAndDraw(1, kFightSequenceType2);
+ break;
+
+ case 4:
+ setSequenceAndDraw(0, kFightSequenceType1);
+ setSequenceAndDraw(1, kFightSequenceType2);
+ break;
+ }
+ }
+
+ // Update field_38
+ _field_38 = 3 * _countdown + (int32)rnd(10);
+ }
+
+ if (_frame && checkFrame(2)) {
+
+ if (_opponent->getCountdown() <= 0) {
+ setSequenceAndDraw(7, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(8, kFightSequenceType1);
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+
+ _opponent->handleAction(kFightActionWin);
+
+ return;
+ }
+
+ if (_sequenceIndex == 1 || _sequenceIndex == 2)
+ _opponent->handleAction((FightAction)_sequenceIndex);
+ }
+
+ Fighter::update();
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/fight/fighter_ivo.h b/engines/lastexpress/fight/fighter_ivo.h
new file mode 100644
index 0000000000..ca54fea904
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_ivo.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_FIGHTER_IVO_H
+#define LASTEXPRESS_FIGHTER_IVO_H
+
+#include "lastexpress/fight/fighter.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+
+class FighterPlayerIvo : public Fighter {
+public:
+ FighterPlayerIvo(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+ virtual bool canInteract(FightAction action = kFightActionNone);
+};
+
+class FighterOpponentIvo : public Opponent {
+public:
+ FighterOpponentIvo(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_FIGHTER_IVO_H
diff --git a/engines/lastexpress/fight/fighter_milos.cpp b/engines/lastexpress/fight/fighter_milos.cpp
new file mode 100644
index 0000000000..9f8e726165
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_milos.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.
+ *
+ */
+
+#include "lastexpress/fight/fighter_milos.h"
+
+#include "lastexpress/data/cursor.h"
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+//////////////////////////////////////////////////////////////////////////
+// Player
+//////////////////////////////////////////////////////////////////////////
+FighterPlayerMilos::FighterPlayerMilos(LastExpressEngine *engine) : Fighter(engine) {
+ _sequences.push_back(loadSequence("2001cr.seq"));
+ _sequences.push_back(loadSequence("2001cdl.seq"));
+ _sequences.push_back(loadSequence("2001cdr.seq"));
+ _sequences.push_back(loadSequence("2001cdm.seq"));
+ _sequences.push_back(loadSequence("2001csgr.seq"));
+ _sequences.push_back(loadSequence("2001csgl.seq"));
+ _sequences.push_back(loadSequence("2001dbk.seq"));
+}
+
+void FighterPlayerMilos::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ Fighter::handleAction(action);
+ return;
+
+ case kFightAction1:
+ if (_sequenceIndex != 1 || checkFrame(4)) {
+ setSequenceAndDraw(6, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(3, kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction2:
+ if ((_sequenceIndex != 2 && _sequenceIndex != 3) || checkFrame(4)) {
+ setSequenceAndDraw(6, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(4, kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction128:
+ if (_sequenceIndex != 1 || checkFrame(4) || _opponent->getSequenceIndex() != 1) {
+ switch (_opponent->getSequenceIndex()) {
+ default:
+ setSequenceAndDraw(rnd(3) + 1, kFightSequenceType0);
+ break;
+
+ case 1:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 2:
+ setSequenceAndDraw(3, kFightSequenceType0);
+ break;
+ }
+ } else {
+ setSequenceAndDraw(4, kFightSequenceType1);
+ update();
+ }
+ break;
+ }
+}
+
+void FighterPlayerMilos::update() {
+ if (_frame && checkFrame(2)) {
+
+ // Draw sequences
+ if (_opponent->getCountdown() <= 0) {
+ setSequenceAndDraw(5, kFightSequenceType1);
+ _opponent->setSequenceAndDraw(6, kFightSequenceType1);
+
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ getSound()->playSound(kEntityTrain, "MUS029", kFlagDefault);
+
+ handleAction(kFightActionWin);
+ }
+
+ if (_sequenceIndex == 4) {
+ _opponent->handleAction(kFightAction4);
+ _fight->setEndType(Fight::kFightEndLost);
+ }
+ }
+
+ Fighter::update();
+}
+
+bool FighterPlayerMilos::canInteract(FightAction action) {
+ if (action != kFightAction128
+ || _sequenceIndex != 1
+ || !_frame
+ || checkFrame(4)
+ || _opponent->getSequenceIndex() != 1) {
+ return Fighter::canInteract();
+ }
+
+ _engine->getCursor()->setStyle(kCursorHand);
+
+ return true;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Opponent
+//////////////////////////////////////////////////////////////////////////
+FighterOpponentMilos::FighterOpponentMilos(LastExpressEngine *engine) : Opponent(engine) {
+ _sequences.push_back(loadSequence("2001or.seq"));
+ _sequences.push_back(loadSequence("2001oal.seq"));
+ _sequences.push_back(loadSequence("2001oam.seq"));
+ _sequences.push_back(loadSequence("2001okl.seq"));
+ _sequences.push_back(loadSequence("2001okm.seq"));
+ _sequences.push_back(loadSequence("2001dbk.seq"));
+ _sequences.push_back(loadSequence("2001wbk.seq"));
+
+ getSound()->playSound(kEntityTables0, "MUS027", kFlagDefault);
+
+ _field_38 = 35;
+}
+
+void FighterOpponentMilos::handleAction(FightAction action) {
+ if (action == kFightAction4) {
+ setSequenceAndDraw(5, kFightSequenceType1);
+ _opponent->handleAction(kFightAction103);
+ } else {
+ if (action != kFightAction131)
+ Fighter::handleAction(action);
+ }
+}
+
+void FighterOpponentMilos::update() {
+ if (!_field_38 && canInteract(kFightAction1) && !_sequenceIndex2) {
+
+ if (_opponent->getField34() >= 2) {
+ switch (rnd(5)) {
+ default:
+ break;
+
+ case 0:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 1:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+
+ case 2:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType1);
+ break;
+
+ case 3:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+
+ case 4:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(1, kFightSequenceType2);
+ break;
+ }
+ } else {
+ setSequenceAndDraw(2, kFightSequenceType0);
+ }
+
+ // Update field_38
+ if (_opponent->getField34() < 5)
+ _field_38 = 6 * (5 - _opponent->getField34());
+ else
+ _field_38 = 0;
+ }
+
+ if (_frame && checkFrame(2)) {
+ if (_sequenceIndex == 1 || _sequenceIndex == 2)
+ _opponent->handleAction((FightAction)_sequenceIndex);
+
+ if (_opponent->getCountdown() <= 0) {
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ handleAction(kFightActionLost);
+ }
+ }
+
+ Fighter::update();
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/fight/fighter_milos.h b/engines/lastexpress/fight/fighter_milos.h
new file mode 100644
index 0000000000..2126dd1838
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_milos.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_FIGHTER_MILOS_H
+#define LASTEXPRESS_FIGHTER_MILOS_H
+
+#include "lastexpress/fight/fighter.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+
+class FighterPlayerMilos : public Fighter {
+public:
+ FighterPlayerMilos(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+ virtual bool canInteract(FightAction action = kFightActionNone);
+};
+
+class FighterOpponentMilos : public Opponent {
+public:
+ FighterOpponentMilos(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_FIGHTER_MILOS_H
diff --git a/engines/lastexpress/fight/fighter_salko.cpp b/engines/lastexpress/fight/fighter_salko.cpp
new file mode 100644
index 0000000000..1082674235
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_salko.cpp
@@ -0,0 +1,202 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "lastexpress/fight/fighter_salko.h"
+
+#include "lastexpress/data/cursor.h"
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+//////////////////////////////////////////////////////////////////////////
+// Player
+//////////////////////////////////////////////////////////////////////////
+FighterPlayerSalko::FighterPlayerSalko(LastExpressEngine *engine) : Fighter(engine) {
+ _sequences.push_back(loadSequence("2004cr.seq"));
+ _sequences.push_back(loadSequence("2004cdr.seq"));
+ _sequences.push_back(loadSequence("2004chj.seq"));
+ _sequences.push_back(loadSequence("2004bk.seq"));
+
+ _countdown = 2;
+}
+
+void FighterPlayerSalko::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ Fighter::handleAction(action);
+ return;
+
+ case kFightAction1:
+ case kFightAction2:
+ if (_sequenceIndex != 1 && checkFrame(4)) {
+ _field_34 = 0;
+
+ setSequenceAndDraw(3, kFightSequenceType1);
+ _opponent->setSequenceAndDraw((action == kFightAction1 ? 3 : 4), kFightSequenceType1);
+
+ _opponent->handleAction(kFightAction103);
+
+ if (action == kFightAction2)
+ _countdown= 0;
+
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction5:
+ if (_sequenceIndex != 3) {
+ _opponent->handleAction(kFightAction103);
+ update();
+ }
+ break;
+
+ case kFightAction128:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ _field_34 = 0;
+ break;
+
+ case kFightAction131:
+ setSequenceAndDraw(2, (_sequenceIndex ? kFightSequenceType2 : kFightSequenceType0));
+ break;
+ }
+}
+
+void FighterPlayerSalko::update() {
+ Fighter::update();
+
+ // The original doesn't check for currentSequence2 != NULL (might not happen when everything is working properly, but crashes with our current implementation)
+ if (_frame && checkFrame(2)) {
+
+ if (_opponent->getCountdown() <= 0) {
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ _fight->bailout(Fight::kFightEndWin);
+
+ return;
+ }
+
+ if (_sequenceIndex == 2)
+ _opponent->handleAction(kFightAction2);
+ }
+}
+
+bool FighterPlayerSalko::canInteract(FightAction action) {
+ if (action == kFightAction131) {
+ if (_sequenceIndex == 1) {
+ if (_opponent->getCountdown() <= 0)
+ _engine->getCursor()->setStyle(kCursorHand);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ return Fighter::canInteract();
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Opponent
+//////////////////////////////////////////////////////////////////////////
+FighterOpponentSalko::FighterOpponentSalko(LastExpressEngine *engine) : Opponent(engine) {
+ _sequences.push_back(loadSequence("2004or.seq"));
+ _sequences.push_back(loadSequence("2004oam.seq"));
+ _sequences.push_back(loadSequence("2004oar.seq"));
+ _sequences.push_back(loadSequence("2004okr.seq"));
+ _sequences.push_back(loadSequence("2004ohm.seq"));
+ _sequences.push_back(loadSequence("blank.seq"));
+
+ getSound()->playSound(kEntityTables0, "MUS035", kFlagDefault);
+
+ _countdown = 3;
+ _field_38 = 30;
+}
+
+void FighterOpponentSalko::handleAction(FightAction action) {
+ if (action == kFightAction2) {
+ setSequenceAndDraw(5, kFightSequenceType1);
+ _opponent->handleAction(kFightAction103);
+ } else {
+ Fighter::handleAction(action);
+ }
+}
+
+void FighterOpponentSalko::update() {
+ if (!_field_38 && canInteract(kFightAction1) && !_sequenceIndex2) {
+
+ switch (rnd(5)) {
+ default:
+ break;
+
+ case 0:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 1:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+
+ case 2:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+
+ case 3:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ setSequenceAndDraw(1, kFightSequenceType2);
+ break;
+
+ case 4:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(1, kFightSequenceType2);
+ break;
+ }
+
+ // Update field_38
+ _field_38 = 4 * _countdown;
+ }
+
+ if (_frame && checkFrame(2)) {
+ if (_opponent->getCountdown() <= 0) {
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ _fight->bailout(Fight::kFightEndLost);
+
+ // Stop processing
+ return;
+ }
+
+ if (_sequenceIndex == 1 || _sequenceIndex == 2)
+ _opponent->handleAction((FightAction)_sequenceIndex);
+ }
+
+ Fighter::update();
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/fight/fighter_salko.h b/engines/lastexpress/fight/fighter_salko.h
new file mode 100644
index 0000000000..0a2a615867
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_salko.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_FIGHTER_SALKO_H
+#define LASTEXPRESS_FIGHTER_SALKO_H
+
+#include "lastexpress/fight/fighter.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+
+class FighterPlayerSalko : public Fighter {
+public:
+ FighterPlayerSalko(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+ virtual bool canInteract(FightAction action = kFightActionNone);
+};
+
+class FighterOpponentSalko : public Opponent {
+public:
+ FighterOpponentSalko(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_FIGHTER_SALKO_H
diff --git a/engines/lastexpress/fight/fighter_vesna.cpp b/engines/lastexpress/fight/fighter_vesna.cpp
new file mode 100644
index 0000000000..02aaa1c16c
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_vesna.cpp
@@ -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.
+ *
+ */
+
+#include "lastexpress/fight/fighter_vesna.h"
+
+#include "lastexpress/data/cursor.h"
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+//////////////////////////////////////////////////////////////////////////
+// Player
+//////////////////////////////////////////////////////////////////////////
+FighterPlayerVesna::FighterPlayerVesna(LastExpressEngine *engine) : Fighter(engine) {
+ _sequences.push_back(loadSequence("2005cr.seq"));
+ _sequences.push_back(loadSequence("2005cdr.seq"));
+ _sequences.push_back(loadSequence("2005cbr.seq"));
+ _sequences.push_back(loadSequence("2005bk.seq"));
+ _sequences.push_back(loadSequence("2005cdm1.seq"));
+ _sequences.push_back(loadSequence("2005chl.seq"));
+}
+
+void FighterPlayerVesna::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ Fighter::handleAction(action);
+ return;
+
+ case kFightAction1:
+ if (_sequenceIndex != 1) {
+ _opponent->handleAction(kFightAction103);
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction2:
+ if (_sequenceIndex != 2) {
+ _opponent->handleAction(kFightAction103);
+ update();
+ } else {
+ _field_34++;
+ }
+ break;
+
+ case kFightAction5:
+ if (_sequenceIndex != 3) {
+ _opponent->handleAction(kFightAction103);
+ update();
+ }
+ break;
+
+ case kFightAction128:
+ if (_sequenceIndex == 1 && _opponent->getSequenceIndex() == 1 && checkFrame(4)) {
+ setSequenceAndDraw(5, kFightSequenceType1);
+ } else {
+ setSequenceAndDraw((_opponent->getSequenceIndex() == 5) ? 3 : 1, kFightSequenceType0);
+ }
+ break;
+
+ case kFightAction132:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+ }
+
+ if (_field_34 > 10) {
+ _opponent->setSequenceAndDraw(5, kFightSequenceType2);
+ _opponent->setCountdown(1);
+ _field_34 = 0;
+ }
+}
+
+void FighterPlayerVesna::update() {
+ if (_frame && checkFrame(2)) {
+
+ if (_sequenceIndex == 3)
+ _opponent->handleAction(kFightAction3);
+
+ if (_opponent->getCountdown() <= 0) {
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+ _fight->bailout(Fight::kFightEndWin);
+ return;
+ }
+
+ if (_sequenceIndex == 5)
+ _opponent->handleAction(kFightAction5);
+ }
+
+ Fighter::update();
+}
+
+bool FighterPlayerVesna::canInteract(FightAction action) {
+ if (action != kFightAction128)
+ return Fighter::canInteract();
+
+ if (_sequenceIndex != 1) {
+
+ if (_opponent->getSequenceIndex() == 5) {
+ _engine->getCursor()->setStyle(kCursorDown);
+ return true;
+ }
+
+ return Fighter::canInteract();
+ }
+
+ if (_opponent->getSequenceIndex() == 1 && checkFrame(4)) {
+ _engine->getCursor()->setStyle(kCursorPunchLeft);
+ return true;
+ }
+
+ return false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Opponent
+//////////////////////////////////////////////////////////////////////////
+FighterOpponentVesna::FighterOpponentVesna(LastExpressEngine *engine) : Opponent(engine) {
+ _sequences.push_back(loadSequence("2005or.seq"));
+ _sequences.push_back(loadSequence("2005oam.seq"));
+ _sequences.push_back(loadSequence("2005oar.seq"));
+ _sequences.push_back(loadSequence("2005okml.seq"));
+ _sequences.push_back(loadSequence("2005okr.seq"));
+ _sequences.push_back(loadSequence("2005odm1.seq"));
+ _sequences.push_back(loadSequence("2005csbm.seq"));
+ _sequences.push_back(loadSequence("2005oam4.seq"));
+
+ getSound()->playSound(kEntityTables0, "MUS038", kFlagDefault);
+
+ _countdown = 4;
+ _field_38 = 30;
+}
+
+void FighterOpponentVesna::handleAction(FightAction action) {
+ switch (action) {
+ default:
+ Fighter::handleAction(action);
+ break;
+
+ case kFightAction3:
+ _opponent->handleAction(kFightAction103);
+ break;
+
+ case kFightAction5:
+ setSequenceAndDraw(7, kFightSequenceType1);
+ _opponent->handleAction(kFightAction103);
+ if (_countdown <= 1)
+ _countdown = 1;
+ break;
+
+ case kFightAction131:
+ break;
+ }
+}
+
+void FighterOpponentVesna::update() {
+ if (!_field_38 && canInteract(kFightAction1) && !_sequenceIndex2) {
+
+ if (_opponent->getField34() == 1) {
+ setSequenceAndDraw(2, kFightSequenceType0);
+ } else {
+ switch (rnd(6)) {
+ default:
+ break;
+
+ case 0:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ break;
+
+ case 1:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(1, kFightSequenceType2);
+ break;
+
+ case 2:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ break;
+
+ case 3:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+
+ case 4:
+ setSequenceAndDraw(1, kFightSequenceType0);
+ setSequenceAndDraw(2, kFightSequenceType2);
+ break;
+
+ case 5:
+ setSequenceAndDraw(2, kFightSequenceType0);
+ setSequenceAndDraw(1, kFightSequenceType2);
+ break;
+ }
+ }
+
+ // Update field_38
+ _field_38 = 4 * _countdown;
+ }
+
+ if (_frame && checkFrame(2)) {
+ if (_sequenceIndex == 1 || _sequenceIndex == 2 || _sequenceIndex == 5)
+ _opponent->handleAction((FightAction)_sequenceIndex);
+
+ if (_opponent->getCountdown() <= 0) {
+
+ switch (_sequenceIndex) {
+ default:
+ break;
+
+ case 1:
+ setSequenceAndDraw(3, kFightSequenceType1);
+ break;
+
+ case 2:
+ setSequenceAndDraw(4, kFightSequenceType1);
+ break;
+
+ case 5:
+ setSequenceAndDraw(6, kFightSequenceType1);
+ break;
+ }
+
+ _opponent->setSequenceAndDraw(4, kFightSequenceType1);
+
+ handleAction(kFightActionLost);
+ _opponent->update();
+ Fighter::update();
+
+ getSoundQueue()->removeFromQueue(kEntityTables0);
+
+ // Stop processing
+ return;
+ }
+ }
+
+ Fighter::update();
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/fight/fighter_vesna.h b/engines/lastexpress/fight/fighter_vesna.h
new file mode 100644
index 0000000000..5c8ec855ae
--- /dev/null
+++ b/engines/lastexpress/fight/fighter_vesna.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_FIGHTER_VESNA_H
+#define LASTEXPRESS_FIGHTER_VESNA_H
+
+#include "lastexpress/fight/fighter.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+
+class FighterPlayerVesna : public Fighter {
+public:
+ FighterPlayerVesna(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+ virtual bool canInteract(FightAction action = kFightActionNone);
+};
+
+class FighterOpponentVesna : public Opponent {
+public:
+ FighterOpponentVesna(LastExpressEngine *engine);
+
+ virtual void handleAction(FightAction action);
+ virtual void update();
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_FIGHTER_VESNA_H
diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp
index 7540d18ed8..2ef4c20d70 100644
--- a/engines/lastexpress/game/action.cpp
+++ b/engines/lastexpress/game/action.cpp
@@ -39,9 +39,11 @@
#include "lastexpress/game/savegame.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
@@ -405,7 +407,7 @@ SceneIndex Action::processHotspot(const SceneHotspot &hotspot) {
//////////////////////////////////////////////////////////////////////////
// Action 0
IMPLEMENT_ACTION(dummy)
- warning("Action::action_dummy: Dummy action function called (hotspot action: %d)!", hotspot.action);
+ warning("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action);
return kSceneInvalid;
}
@@ -453,7 +455,7 @@ IMPLEMENT_ACTION(savePoint)
IMPLEMENT_ACTION(playSound)
// Check that the file is not already buffered
- if (hotspot.param2 || !getSound()->isBuffered(Common::String::format("LIB%03d", hotspot.param1), true))
+ if (hotspot.param2 || !getSoundQueue()->isBuffered(Common::String::format("LIB%03d", hotspot.param1), true))
getSound()->playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2);
return kSceneInvalid;
@@ -465,8 +467,8 @@ IMPLEMENT_ACTION(playMusic)
// Check that the file is not already buffered
Common::String filename = Common::String::format("MUS%03d", hotspot.param1);
- if (!getSound()->isBuffered(filename) && (hotspot.param1 != 50 || getProgress().chapter == kChapter5))
- getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault, hotspot.param2);
+ if (!getSoundQueue()->isBuffered(filename) && (hotspot.param1 != 50 || getProgress().chapter == kChapter5))
+ getSound()->playSound(kEntityPlayer, filename, kFlagDefault, hotspot.param2);
return kSceneInvalid;
}
@@ -481,7 +483,7 @@ IMPLEMENT_ACTION(knock)
if (getObjects()->get(object).entity) {
getSavePoints()->push(kEntityPlayer, getObjects()->get(object).entity, kActionKnock, object);
} else {
- if (!getSound()->isBuffered("LIB012", true))
+ if (!getSoundQueue()->isBuffered("LIB012", true))
getSound()->playSoundEvent(kEntityPlayer, 12);
}
@@ -516,7 +518,7 @@ IMPLEMENT_ACTION(compartment)
&& (compartment != kObjectCompartment1
|| !getInventory()->hasItem(kItemKey)
|| (getInventory()->getSelectedItem() != kItemFirebird && getInventory()->getSelectedItem() != kItemBriefcase)))) {
- if (!getSound()->isBuffered("LIB13"))
+ if (!getSoundQueue()->isBuffered("LIB13"))
getSound()->playSoundEvent(kEntityPlayer, 13);
// Stop processing further
@@ -621,7 +623,7 @@ IMPLEMENT_ACTION(updateObjetLocation2)
getObjects()->updateLocation2(object, location);
- if (object != kObject112 || getSound()->isBuffered("LIB096")) {
+ if (object != kObject112 || getSoundQueue()->isBuffered("LIB096")) {
if (object == 1)
getSound()->playSoundEvent(kEntityPlayer, 73);
} else {
@@ -805,8 +807,8 @@ IMPLEMENT_ACTION(enterCompartment)
getSound()->playSoundEvent(kEntityPlayer, 14);
getSound()->playSoundEvent(kEntityPlayer, 15, 22);
- if (getProgress().field_78 && !getSound()->isBuffered("MUS003")) {
- getSound()->playSound(kEntityPlayer, "MUS003", SoundManager::kFlagDefault);
+ if (getProgress().field_78 && !getSoundQueue()->isBuffered("MUS003")) {
+ getSound()->playSound(kEntityPlayer, "MUS003", kFlagDefault);
getProgress().field_78 = 0;
}
@@ -1083,8 +1085,8 @@ IMPLEMENT_ACTION(25)
break;
case 2:
- if (!getSound()->isBuffered("MUS021"))
- getSound()->playSound(kEntityPlayer, "MUS021", SoundManager::kFlagDefault);
+ if (!getSoundQueue()->isBuffered("MUS021"))
+ getSound()->playSound(kEntityPlayer, "MUS021", kFlagDefault);
break;
case 3:
@@ -1134,7 +1136,7 @@ IMPLEMENT_ACTION(26)
//////////////////////////////////////////////////////////////////////////
// Action 27
IMPLEMENT_ACTION(27)
- if (!getSound()->isBuffered("LIB031", true))
+ if (!getSoundQueue()->isBuffered("LIB031", true))
getSound()->playSoundEvent(kEntityPlayer, 31);
switch (getEntityData(kEntityPlayer)->car) {
@@ -1182,8 +1184,8 @@ IMPLEMENT_ACTION(29)
getSound()->playSoundEvent(kEntityPlayer, hotspot.param1, hotspot.param2);
Common::String filename = Common::String::format("MUS%03d", hotspot.param3);
- if (!getSound()->isBuffered(filename))
- getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault);
+ if (!getSoundQueue()->isBuffered(filename))
+ getSound()->playSound(kEntityPlayer, filename, kFlagDefault);
return kSceneInvalid;
}
@@ -1345,7 +1347,7 @@ IMPLEMENT_ACTION(openBed)
//////////////////////////////////////////////////////////////////////////
// Action 37
IMPLEMENT_ACTION(dialog)
- getSound()->playDialog(kEntityTables4, (EntityIndex)hotspot.param1, SoundManager::kFlagDefault, 0);
+ getSound()->playDialog(kEntityTables4, (EntityIndex)hotspot.param1, kFlagDefault, 0);
return kSceneInvalid;
}
@@ -1354,8 +1356,8 @@ IMPLEMENT_ACTION(dialog)
// Action 38
IMPLEMENT_ACTION(eggBox)
getSound()->playSoundEvent(kEntityPlayer, 43);
- if (getProgress().field_7C && !getSound()->isBuffered("MUS003")) {
- getSound()->playSound(kEntityPlayer, "MUS003", SoundManager::kFlagDefault);
+ if (getProgress().field_7C && !getSoundQueue()->isBuffered("MUS003")) {
+ getSound()->playSound(kEntityPlayer, "MUS003", kFlagDefault);
getProgress().field_7C = 0;
}
@@ -1366,8 +1368,8 @@ IMPLEMENT_ACTION(eggBox)
// Action 39
IMPLEMENT_ACTION(39)
getSound()->playSoundEvent(kEntityPlayer, 24);
- if (getProgress().field_80 && !getSound()->isBuffered("MUS003")) {
- getSound()->playSound(kEntityPlayer, "MUS003", SoundManager::kFlagDefault);
+ if (getProgress().field_80 && !getSoundQueue()->isBuffered("MUS003")) {
+ getSound()->playSound(kEntityPlayer, "MUS003", kFlagDefault);
getProgress().field_80 = 0;
}
@@ -1408,8 +1410,8 @@ IMPLEMENT_ACTION(playMusicChapter)
if (id) {
Common::String filename = Common::String::format("MUS%03d", id);
- if (!getSound()->isBuffered(filename))
- getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault);
+ if (!getSoundQueue()->isBuffered(filename))
+ getSound()->playSound(kEntityPlayer, filename, kFlagDefault);
}
return kSceneInvalid;
@@ -1440,8 +1442,8 @@ IMPLEMENT_ACTION(playMusicChapterSetupTrain)
Common::String filename = Common::String::format("MUS%03d", hotspot.param1);
- if (!getSound()->isBuffered(filename) && hotspot.param3 & id) {
- getSound()->playSound(kEntityPlayer, filename, SoundManager::kFlagDefault);
+ if (!getSoundQueue()->isBuffered(filename) && hotspot.param3 & id) {
+ getSound()->playSound(kEntityPlayer, filename, kFlagDefault);
getSavePoints()->call(kEntityPlayer, kEntityTrain, kAction203863200, filename.c_str());
getSavePoints()->push(kEntityPlayer, kEntityTrain, kAction222746496, hotspot.param2);
@@ -1612,7 +1614,7 @@ bool Action::handleOtherCompartment(ObjectIndex object, bool doPlaySound, bool d
if (doPlaySound)
playCompartmentSoundEvents(object);
- if (!getSound()->isBuffered(kEntityMertens))
+ if (!getSoundQueue()->isBuffered(kEntityMertens))
getSound()->playWarningCompartment(kEntityMertens, object);
getSavePoints()->push(kEntityPlayer, kEntityMertens, kAction305159806);
@@ -1628,7 +1630,7 @@ bool Action::handleOtherCompartment(ObjectIndex object, bool doPlaySound, bool d
if (doPlaySound)
playCompartmentSoundEvents(object);
- if (!getSound()->isBuffered(kEntityMertens))
+ if (!getSoundQueue()->isBuffered(kEntityMertens))
getSound()->playSound(kEntityMertens, (rnd(2)) ? "JAC1000" : "JAC1000A");
if (doLoadScene)
@@ -1640,7 +1642,7 @@ bool Action::handleOtherCompartment(ObjectIndex object, bool doPlaySound, bool d
if (doPlaySound)
playCompartmentSoundEvents(object);
- if (!getSound()->isBuffered(kEntityMertens))
+ if (!getSoundQueue()->isBuffered(kEntityMertens))
getSound()->playSound(kEntityMertens, (rnd(2)) ? "JAC1000" : "JAC1000A");
if (doLoadScene)
@@ -1667,7 +1669,7 @@ bool Action::handleOtherCompartment(ObjectIndex object, bool doPlaySound, bool d
if (doPlaySound)
playCompartmentSoundEvents(object);
- if (!getSound()->isBuffered(kEntityCoudert))
+ if (!getSoundQueue()->isBuffered(kEntityCoudert))
getSound()->playWarningCompartment(kEntityCoudert, object);
getSavePoints()->push(kEntityPlayer, kEntityCoudert, kAction305159806);
@@ -1684,7 +1686,7 @@ bool Action::handleOtherCompartment(ObjectIndex object, bool doPlaySound, bool d
if (doPlaySound)
playCompartmentSoundEvents(object);
- if (!getSound()->isBuffered(kEntityCoudert))
+ if (!getSoundQueue()->isBuffered(kEntityCoudert))
getSound()->playSound(kEntityCoudert, (rnd(2)) ? "JAC1000" : "JAC1000A");
if (doLoadScene)
@@ -1699,7 +1701,7 @@ bool Action::handleOtherCompartment(ObjectIndex object, bool doPlaySound, bool d
if (doPlaySound)
playCompartmentSoundEvents(object);
- if (!getSound()->isBuffered(kEntityCoudert))
+ if (!getSoundQueue()->isBuffered(kEntityCoudert))
getSound()->playSound(kEntityCoudert, (rnd(2)) ? "JAC1000" : "JAC1000A");
if (doLoadScene)
@@ -1908,7 +1910,7 @@ LABEL_KEY:
// Play an animation and add delta time to global game time
void Action::playAnimation(EventIndex index, bool debugMode) const {
if (index >= _animationListSize)
- error("Action::playAnimation: invalid event index (value=%i, max=%i)", index, _animationListSize);
+ error("[Action::playAnimation] Invalid event index (value=%i, max=%i)", index, _animationListSize);
// In debug mode, just show the animation
if (debugMode) {
@@ -1930,8 +1932,8 @@ void Action::playAnimation(EventIndex index, bool debugMode) const {
if (!getFlags()->mouseRightClick) {
if (getGlobalTimer()) {
- if (getSound()->isBuffered("TIMER")) {
- getSound()->processEntry("TIMER");
+ if (getSoundQueue()->isBuffered("TIMER")) {
+ getSoundQueue()->processEntry("TIMER");
setGlobalTimer(105);
}
}
@@ -1948,8 +1950,8 @@ void Action::playAnimation(EventIndex index, bool debugMode) const {
if (animation.load(getArchive(Common::String(_animationList[index].filename) + ".nis") , processSound ? Animation::kFlagDefault : Animation::kFlagProcess))
animation.play();
- if (getSound()->isBuffered("TIMER"))
- getSound()->removeFromQueue("TIMER");
+ if (getSoundQueue()->isBuffered("TIMER"))
+ getSoundQueue()->removeFromQueue("TIMER");
}
// Show cursor
diff --git a/engines/lastexpress/game/beetle.cpp b/engines/lastexpress/game/beetle.cpp
index cb6f0a3306..ab707ddae9 100644
--- a/engines/lastexpress/game/beetle.cpp
+++ b/engines/lastexpress/game/beetle.cpp
@@ -131,7 +131,7 @@ bool Beetle::isLoaded() const {
bool Beetle::catchBeetle() {
if (!_data)
- error("Beetle::catchBeetle: sequences have not been loaded!");
+ error("[Beetle::catchBeetle] Sequences have not been loaded");
if (getInventory()->getSelectedItem() == kItemMatchBox
&& getInventory()->hasItem(kItemMatch)
@@ -148,14 +148,14 @@ bool Beetle::catchBeetle() {
bool Beetle::isCatchable() const {
if (!_data)
- error("Beetle::isCatchable: sequences have not been loaded!");
+ error("[Beetle::isCatchable] Sequences have not been loaded");
return (_data->indexes[_data->offset] >= 30);
}
void Beetle::update() {
if (!_data)
- error("Beetle::update: sequences have not been loaded!");
+ error("[Beetle::update] Sequences have not been loaded");
if (!_data->isLoaded)
return;
@@ -194,7 +194,7 @@ void Beetle::update() {
void Beetle::drawUpdate() {
if (!_data)
- error("Beetle::drawUpdate: sequences have not been loaded!");
+ error("[Beetle::drawUpdate] Sequences have not been loaded");
if (_data->frame != NULL) {
getScenes()->setCoordinates(_data->frame);
@@ -366,7 +366,7 @@ void Beetle::drawUpdate() {
void Beetle::move() {
if (!_data)
- error("Beetle::move: sequences have not been loaded!");
+ error("[Beetle::move] Sequences have not been loaded");
if (_data->indexes[_data->offset] >= 24 && _data->indexes[_data->offset] <= 29)
return;
@@ -444,7 +444,7 @@ update_data:
// Update the beetle sequence to show the correct frames in the correct place
void Beetle::updateFrame(SequenceFrame *frame) const {
if (!_data)
- error("Beetle::updateSequence: sequences have not been loaded!");
+ error("[Beetle::updateFrame] Sequences have not been loaded");
if (!frame)
return;
@@ -459,7 +459,7 @@ void Beetle::updateFrame(SequenceFrame *frame) const {
void Beetle::updateData(uint32 index) {
if (!_data)
- error("Beetle::updateData: sequences have not been loaded!");
+ error("[Beetle::updateData] Sequences have not been loaded");
if (!_data->isLoaded)
return;
diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp
index 513ad114b0..f6bb2030f0 100644
--- a/engines/lastexpress/game/entities.cpp
+++ b/engines/lastexpress/game/entities.cpp
@@ -68,9 +68,11 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/graphics.h"
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -200,7 +202,7 @@ Entity *Entities::get(EntityIndex entity) {
assert((uint)entity < _entities.size());
if (entity == kEntityPlayer)
- error("Cannot get entity for index == 0!");
+ error("[Entities::get] Cannot get entity for kEntityPlayer");
return _entities[entity];
}
@@ -218,24 +220,24 @@ int Entities::getPosition(CarIndex car, Position position) const {
int index = 100 * car + position;
if (car > 10)
- error("Entities::getPosition: trying to access an invalid car (was: %d, valid:0-9)", car);
+ error("[Entities::getPosition] Trying to access an invalid car (was: %d, valid:0-9)", car);
if (position > 100)
- error("Entities::getPosition: trying to access an invalid position (was: %d, valid:0-100)", position);
+ error("[Entities::getPosition] Trying to access an invalid position (was: %d, valid:0-100)", position);
return _positions[index];
}
int Entities::getCompartments(int index) const {
if (index >= _compartmentsCount)
- error("Entities::getCompartments: trying to access an invalid compartment (was: %d, valid:0-15)", index);
+ error("[Entities::getCompartments] Trying to access an invalid compartment (was: %d, valid:0-15)", index);
return _compartments[index];
}
int Entities::getCompartments1(int index) const {
if (index >= _compartmentsCount)
- error("Entities::getCompartments: trying to access an invalid compartment (was: %d, valid:0-15)", index);
+ error("[Entities::getCompartments] Trying to access an invalid compartment (was: %d, valid:0-15)", index);
return _compartments1[index];
}
@@ -299,7 +301,7 @@ void Entities::setupChapter(ChapterIndex chapter) {
memset(&_compartments1, 0, sizeof(_compartments1));
memset(&_positions, 0, sizeof(_positions));
- getSound()->resetQueue(SoundManager::kSoundType13);
+ getSoundQueue()->resetQueue(kSoundType13);
}
// we skip the header when doing entity setup
@@ -369,8 +371,8 @@ void Entities::resetState(EntityIndex entityIndex) {
getData(entityIndex)->currentCall = 0;
getData(entityIndex)->inventoryItem = kItemNone;
- if (getSound()->isBuffered(entityIndex))
- getSound()->removeFromQueue(entityIndex);
+ if (getSoundQueue()->isBuffered(entityIndex))
+ getSoundQueue()->removeFromQueue(entityIndex);
clearSequences(entityIndex);
@@ -1780,7 +1782,7 @@ void Entities::enterCompartment(EntityIndex entity, ObjectIndex compartment, boo
// Update compartments
int index = (compartment < 32 ? compartment - 1 : compartment - 24);
if (index >= 16)
- error("Entities::exitCompartment: invalid compartment index!");
+ error("[Entities::enterCompartment] Invalid compartment index");
if (useCompartment1)
_compartments1[index] |= STORE_VALUE(entity);
@@ -1866,7 +1868,7 @@ void Entities::exitCompartment(EntityIndex entity, ObjectIndex compartment, bool
// Update compartments
int index = (compartment < 32 ? compartment - 1 : compartment - 24);
if (index >= 16)
- error("Entities::exitCompartment: invalid compartment index!");
+ error("[Entities::exitCompartment] Invalid compartment index");
if (useCompartment1)
_compartments1[index] &= ~STORE_VALUE(entity);
@@ -2355,7 +2357,7 @@ bool Entities::changeCar(EntityData::EntityCallData *data, EntityIndex entity, C
if (data->car == newCar) {
if (isInGreenCarEntrance(kEntityPlayer)) {
getSound()->playSoundEvent(kEntityPlayer, 14);
- getSound()->excuseMe(entity, kEntityPlayer, SoundManager::kFlagDefault);
+ getSound()->excuseMe(entity, kEntityPlayer, kFlagDefault);
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 1);
getSound()->playSound(kEntityPlayer, "CAT1127A");
getSound()->playSoundEvent(kEntityPlayer, 15);
@@ -2374,7 +2376,7 @@ bool Entities::changeCar(EntityData::EntityCallData *data, EntityIndex entity, C
if (data->car == newCar) {
if (isInKronosCarEntrance(kEntityPlayer)) {
getSound()->playSoundEvent(kEntityPlayer, 14);
- getSound()->excuseMe(entity, kEntityPlayer, SoundManager::kFlagDefault);
+ getSound()->excuseMe(entity, kEntityPlayer, kFlagDefault);
getScenes()->loadSceneFromPosition(kCarGreenSleeping, 62);
getSound()->playSound(kEntityPlayer, "CAT1127A");
getSound()->playSoundEvent(kEntityPlayer, 15);
diff --git a/engines/lastexpress/game/fight.cpp b/engines/lastexpress/game/fight.cpp
deleted file mode 100644
index ecc43bed2b..0000000000
--- a/engines/lastexpress/game/fight.cpp
+++ /dev/null
@@ -1,1583 +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 "lastexpress/game/fight.h"
-
-#include "lastexpress/data/cursor.h"
-#include "lastexpress/data/scene.h"
-#include "lastexpress/data/sequence.h"
-
-#include "lastexpress/game/entities.h"
-#include "lastexpress/game/inventory.h"
-#include "lastexpress/game/logic.h"
-#include "lastexpress/game/object.h"
-#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
-#include "lastexpress/game/state.h"
-
-#include "lastexpress/graphics.h"
-#include "lastexpress/helpers.h"
-#include "lastexpress/lastexpress.h"
-#include "lastexpress/resource.h"
-
-#include "common/func.h"
-
-namespace LastExpress {
-
-#define CALL_FUNCTION0(fighter, name) \
- (*fighter->name)(fighter)
-
-#define CALL_FUNCTION1(fighter, name, a) \
- (*fighter->name)(fighter, a)
-
-#define REGISTER_PLAYER_FUNCTIONS(name) \
- if (!_data) \
- error("Fight::load##namePlayer - invalid data!"); \
- _data->player->handleAction = new Common::Functor2Mem<Fighter *, FightAction, void, Fight>(this, &Fight::handleAction##name); \
- _data->player->update = new Common::Functor1Mem<Fighter *, void, Fight>(this, &Fight::update##name); \
- _data->player->canInteract = new Common::Functor2Mem<Fighter const *, FightAction, bool, Fight>(this, &Fight::canInteract##name);
-
-#define REGISTER_OPPONENT_FUNCTIONS(name) \
- if (!_data) \
- error("Fight::load##nameOpponent - invalid data!"); \
- _data->opponent->handleAction = new Common::Functor2Mem<Fighter *, FightAction, void, Fight>(this, &Fight::handleOpponentAction##name); \
- _data->opponent->update = new Common::Functor1Mem<Fighter *, void, Fight>(this, &Fight::updateOpponent##name); \
- _data->opponent->canInteract = new Common::Functor2Mem<Fighter const *, FightAction, bool, Fight>(this, &Fight::canInteract);
-
-#define CHECK_SEQUENCE2(fighter, value) \
- (fighter->frame->getInfo()->field_33 & value)
-
-Fight::Fight(LastExpressEngine *engine) : _engine(engine), _data(NULL), _endType(kFightEndLost), _state(0), _handleTimer(false) {}
-
-Fight::~Fight() {
- clearData();
- _data = NULL;
-
- // Zero passed pointers
- _engine = NULL;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Events
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::eventMouse(const Common::Event &ev) {
- if (!_data || _data->index)
- return;
-
- // TODO move all the egg handling to inventory functions
-
- getFlags()->mouseLeftClick = false;
- getFlags()->shouldRedraw = false;
- getFlags()->mouseRightClick = false;
-
- if (ev.mouse.x < 608 || ev.mouse.y < 448 || ev.mouse.x >= 640 || ev.mouse.x >= 480) {
-
- // Handle right button click
- if (ev.type == Common::EVENT_RBUTTONUP) {
- getSound()->removeFromQueue(kEntityTables0);
- setStopped();
-
- getGlobalTimer() ? _state = 0 : ++_state;
-
- getFlags()->mouseRightClick = true;
- }
-
- if (_handleTimer) {
- // Timer expired => show with full brightness
- if (!getGlobalTimer())
- getInventory()->drawBlinkingEgg();
-
- _handleTimer = false;
- }
-
- // Check hotspots
- Scene *scene = getScenes()->get(getState()->scene);
- SceneHotspot *hotspot = NULL;
-
- if (!scene->checkHotSpot(ev.mouse, &hotspot)) {
- _engine->getCursor()->setStyle(kCursorNormal);
- } else {
- _engine->getCursor()->setStyle((CursorStyle)hotspot->cursor);
-
- // Call player function
- if (CALL_FUNCTION1(_data->player, canInteract, (FightAction)hotspot->action)) {
- if (ev.type == Common::EVENT_LBUTTONUP)
- CALL_FUNCTION1(_data->player, handleAction, (FightAction)hotspot->action);
- } else {
- _engine->getCursor()->setStyle(kCursorNormal);
- }
- }
- } else {
- // Handle clicks on menu icon
-
- if (!_handleTimer) {
- // Timer expired => show with full brightness
- if (!getGlobalTimer())
- getInventory()->drawBlinkingEgg();
-
- _handleTimer = true;
- }
-
- // Stop fight if clicked
- if (ev.type == Common::EVENT_LBUTTONUP) {
- _handleTimer = false;
- getSound()->removeFromQueue(kEntityTables0);
- bailout(kFightEndExit);
- }
-
- // Reset timer on right click
- if (ev.type == Common::EVENT_RBUTTONUP) {
- if (getGlobalTimer()) {
- if (getSound()->isBuffered("TIMER"))
- getSound()->removeFromQueue("TIMER");
-
- setGlobalTimer(900);
- }
- }
- }
-
- getFlags()->shouldRedraw = true;
-}
-
-void Fight::eventTick(const Common::Event &ev) {
- handleTick(ev, true);
-}
-
-void Fight::handleTick(const Common::Event &ev, bool isProcessing) {
- // TODO move all the egg handling to inventory functions
-
- // Blink egg
- if (getGlobalTimer()) {
- warning("Fight::handleMouseMove - egg blinking not implemented!");
- }
-
- if (!_data || _data->index)
- return;
-
- SceneHotspot *hotspot = NULL;
- if (!getScenes()->get(getState()->scene)->checkHotSpot(ev.mouse, &hotspot) || !CALL_FUNCTION1(_data->player, canInteract, (FightAction)hotspot->action)) {
- _engine->getCursor()->setStyle(kCursorNormal);
- } else {
- _engine->getCursor()->setStyle((CursorStyle)hotspot->cursor);
- }
-
- CALL_FUNCTION0(_data->player, update);
- CALL_FUNCTION0(_data->opponent, update);
-
- // Draw sequences
- if (!_data->isRunning)
- return;
-
- if (isProcessing)
- getScenes()->drawFrames(true);
-
- if (_data->index) {
- // Set next sequence name index
- _data->index--;
- _data->sequences[_data->index] = loadSequence(_data->names[_data->index]);
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Setup
-//////////////////////////////////////////////////////////////////////////
-
-Fight::FightEndType Fight::setup(FightType type) {
- if (_data)
- error("Fight::setup - calling fight setup again while a fight is already in progress!");
-
- //////////////////////////////////////////////////////////////////////////
- // Prepare UI & state
- if (_state >= 5 && (type == kFightSalko || type == kFightVesna)) {
- _state = 0;
- return kFightEndWin;
- }
-
- getInventory()->showHourGlass();
- // TODO events function
- getFlags()->flag_0 = false;
- getFlags()->mouseRightClick = false;
- getEntities()->reset();
-
- // Compute scene to use
- SceneIndex sceneIndex;
- switch(type) {
- default:
- sceneIndex = kSceneFightDefault;
- break;
-
- case kFightMilos:
- sceneIndex = (getObjects()->get(kObjectCompartment1).location2 < kObjectLocation3) ? kSceneFightMilos : kSceneFightMilosBedOpened;
- break;
-
- case kFightAnna:
- sceneIndex = kSceneFightAnna;
- break;
-
- case kFightIvo:
- sceneIndex = kSceneFightIvo;
- break;
-
- case kFightSalko:
- sceneIndex = kSceneFightSalko;
- break;
-
- case kFightVesna:
- sceneIndex = kSceneFightVesna;
- break;
- }
-
- if (getFlags()->shouldRedraw) {
- getFlags()->shouldRedraw = false;
- askForRedraw();
- //redrawScreen();
- }
-
- // Load the scene object
- Scene *scene = getScenes()->get(sceneIndex);
-
- // Update game entities and state
- getEntityData(kEntityPlayer)->entityPosition = scene->entityPosition;
- getEntityData(kEntityPlayer)->location = scene->location;
-
- getState()->scene = sceneIndex;
-
- getFlags()->flag_3 = true;
-
- // Draw the scene
- _engine->getGraphicsManager()->draw(scene, GraphicsManager::kBackgroundC);
- // FIXME move to start of fight?
- askForRedraw();
- redrawScreen();
-
- //////////////////////////////////////////////////////////////////////////
- // Setup the fight
- _data = new FightData;
- loadData(type);
-
- // Show opponents & egg button
- Common::Event emptyEvent;
- handleTick(emptyEvent, false);
- getInventory()->drawEgg();
-
- // Start fight
- _endType = kFightEndLost;
- while (_data->isRunning) {
- if (_engine->handleEvents())
- continue;
-
- getSound()->updateQueue();
- }
-
- // Cleanup after fight is over
- clearData();
-
- return _endType;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Status
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::setStopped() {
- if (_data)
- _data->isRunning = false;
-}
-
-void Fight::bailout(FightEndType type) {
- _state = 0;
- _endType = type;
- setStopped();
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Cleanup
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::clearData() {
- if (!_data)
- return;
-
- // Clear data
- clearSequences(_data->player);
- clearSequences(_data->opponent);
-
- SAFE_DELETE(_data->player);
- SAFE_DELETE(_data->opponent);
-
- SAFE_DELETE(_data);
-
- _engine->restoreEventHandlers();
-}
-
-void Fight::clearSequences(Fighter *combatant) const {
- if (!combatant)
- return;
-
- // The original game resets the function pointers to default values, just before deleting the struct
- getScenes()->removeAndRedraw(&combatant->frame, false);
-
- // Free sequences
- for (int i = 0; i < (int)combatant->sequences.size(); i++)
- SAFE_DELETE(combatant->sequences[i]);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Drawing
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::setSequenceAndDraw(Fighter *combatant, uint32 sequenceIndex, FightSequenceType type) const {
- if (combatant->sequences.size() < sequenceIndex)
- return;
-
- switch (type) {
- default:
- break;
-
- case kFightSequenceType0:
- if (combatant->sequenceIndex)
- return;
-
- combatant->sequence = combatant->sequences[sequenceIndex];
- combatant->sequenceIndex = sequenceIndex;
- draw(combatant);
- break;
-
- case kFightSequenceType1:
- combatant->sequence = combatant->sequences[sequenceIndex];
- combatant->sequenceIndex = sequenceIndex;
- combatant->sequenceIndex2 = 0;
- draw(combatant);
- break;
-
- case kFightSequenceType2:
- combatant->sequenceIndex2 = sequenceIndex;
- break;
- }
-}
-
-void Fight::draw(Fighter *combatant) const {
- getScenes()->removeAndRedraw(&combatant->frame, false);
-
- combatant->frameIndex = 0;
- combatant->field_24 = 0;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Loading
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::loadData(FightType type) {
- if (!_data)
- error("Fight::loadData - invalid data!");
-
- switch (type) {
- default:
- break;
-
- case kFightMilos:
- loadMilosPlayer();
- loadMilosOpponent();
- break;
-
- case kFightAnna:
- loadAnnaPlayer();
- loadAnnaOpponent();
- break;
-
- case kFightIvo:
- loadIvoPlayer();
- loadIvoOpponent();
- break;
-
- case kFightSalko:
- loadSalkoPlayer();
- loadSalkoOpponent();
- break;
-
- case kFightVesna:
- loadVesnaPlayer();
- loadVesnaOpponent();
- break;
- }
-
- if (!_data->player || !_data->opponent)
- error("Fight::loadData - error loading fight data (type=%d)", type);
-
- //////////////////////////////////////////////////////////////////////////
- // Start running the fight
- _data->isRunning = true;
-
- if (_state < 5) {
- setSequenceAndDraw(_data->player, 0, kFightSequenceType0);
- setSequenceAndDraw(_data->opponent, 0, kFightSequenceType0);
- goto end_load;
- }
-
- switch(type) {
- default:
- break;
-
- case kFightMilos:
- _data->opponent->countdown = 1;
- setSequenceAndDraw(_data->player, 4, kFightSequenceType0);
- setSequenceAndDraw(_data->opponent, 0, kFightSequenceType0);
- break;
-
- case kFightIvo:
- _data->opponent->countdown = 1;
- setSequenceAndDraw(_data->player, 3, kFightSequenceType0);
- setSequenceAndDraw(_data->opponent, 6, kFightSequenceType0);
- break;
-
- case kFightVesna:
- _data->opponent->countdown = 1;
- setSequenceAndDraw(_data->player, 0, kFightSequenceType0);
- setSequenceAndDraw(_data->player, 3, kFightSequenceType2);
- setSequenceAndDraw(_data->opponent, 5, kFightSequenceType0);
- break;
- }
-
-end_load:
- // Setup event handlers
- _engine->backupEventHandlers();
- SET_EVENT_HANDLERS(Fight, this);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Shared
-//////////////////////////////////////////////////////////////////////////
-void Fight::processFighter(Fighter *fighter) {
- if (!_data)
- error("Fight::processFighter - invalid data!");
-
- if (!fighter->sequence) {
- if (fighter->frame) {
- getScenes()->removeFromQueue(fighter->frame);
- getScenes()->setCoordinates(fighter->frame);
- }
- SAFE_DELETE(fighter->frame);
- return;
- }
-
- if (fighter->sequence->count() <= fighter->frameIndex) {
- switch(fighter->action) {
- default:
- break;
-
- case kFightAction101:
- setSequenceAndDraw(fighter, fighter->sequenceIndex2, kFightSequenceType1);
- fighter->sequenceIndex2 = 0;
- break;
-
- case kFightActionResetFrame:
- fighter->frameIndex = 0;
- break;
-
- case kFightAction103:
- setSequenceAndDraw(fighter, 0, kFightSequenceType1);
- CALL_FUNCTION1(fighter, handleAction, kFightAction101);
- setSequenceAndDraw(fighter->opponent, 0, kFightSequenceType1);
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction101);
- CALL_FUNCTION0(fighter->opponent, update);
- break;
-
- case kFightActionWin:
- bailout(kFightEndWin);
- break;
-
- case kFightActionLost:
- bailout(kFightEndLost);
- break;
- }
- }
-
- if (_data->isRunning) {
-
- // Get the current sequence frame
- SequenceFrame *frame = new SequenceFrame(fighter->sequence, (uint16)fighter->frameIndex);
- frame->getInfo()->location = 1;
-
- if (fighter->frame == frame) {
- delete frame;
- return;
- }
-
- getSound()->playFightSound(frame->getInfo()->soundAction, frame->getInfo()->field_31);
-
- // Add current frame to queue and advance
- getScenes()->addToQueue(frame);
- fighter->frameIndex++;
-
- if (fighter->frame) {
- getScenes()->removeFromQueue(fighter->frame);
-
- if (!frame->getInfo()->field_2E)
- getScenes()->setCoordinates(fighter->frame);
- }
-
- // Replace by new frame
- delete fighter->frame;
- fighter->frame = frame;
- }
-}
-
-void Fight::handleAction(Fighter *fighter, FightAction action) {
- switch (action) {
- default:
- return;
-
- case kFightAction101:
- break;
-
- case kFightActionResetFrame:
- fighter->countdown--;
- break;
-
- case kFightAction103:
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightActionResetFrame);
- break;
-
- case kFightActionWin:
- _endType = kFightEndWin;
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightActionResetFrame);
- break;
-
- case kFightActionLost:
- _endType = kFightEndLost;
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightActionResetFrame);
- break;
- }
-
- // Update action
- fighter->action = action;
-}
-
-bool Fight::canInteract(Fighter const *fighter, FightAction /*= (FightAction)0*/ ) {
- return (fighter->action == kFightAction101 && !fighter->sequenceIndex);
-}
-
-void Fight::update(Fighter *fighter) {
-
- processFighter(fighter);
-
- if (fighter->frame)
- fighter->frame->getInfo()->location = (fighter->action == kFightActionResetFrame ? 2 : 0);
-}
-
-void Fight::updateOpponent(Fighter *fighter) {
-
- // This is an opponent struct!
- Opponent *opponent = (Opponent *)fighter;
-
- processFighter(opponent);
-
- if (opponent->field_38 && !opponent->sequenceIndex)
- opponent->field_38--;
-
- if (fighter->frame)
- fighter->frame->getInfo()->location = 1;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Milos
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::loadMilosPlayer() {
- REGISTER_PLAYER_FUNCTIONS(Milos)
-
- _data->player->sequences.push_back(loadSequence("2001cr.seq"));
- _data->player->sequences.push_back(loadSequence("2001cdl.seq"));
- _data->player->sequences.push_back(loadSequence("2001cdr.seq"));
- _data->player->sequences.push_back(loadSequence("2001cdm.seq"));
- _data->player->sequences.push_back(loadSequence("2001csgr.seq"));
- _data->player->sequences.push_back(loadSequence("2001csgl.seq"));
- _data->player->sequences.push_back(loadSequence("2001dbk.seq"));
-}
-
-void Fight::loadMilosOpponent() {
- REGISTER_OPPONENT_FUNCTIONS(Milos)
-
- _data->opponent->sequences.push_back(loadSequence("2001or.seq"));
- _data->opponent->sequences.push_back(loadSequence("2001oal.seq"));
- _data->opponent->sequences.push_back(loadSequence("2001oam.seq"));
- _data->opponent->sequences.push_back(loadSequence("2001okl.seq"));
- _data->opponent->sequences.push_back(loadSequence("2001okm.seq"));
- _data->opponent->sequences.push_back(loadSequence("2001dbk.seq"));
- _data->opponent->sequences.push_back(loadSequence("2001wbk.seq"));
-
- getSound()->playSound(kEntityTables0, "MUS027", SoundManager::kFlagDefault);
-
- _data->opponent->field_38 = 35;
-}
-
-void Fight::handleActionMilos(Fighter *fighter, FightAction action) {
- switch (action) {
- default:
- handleAction(fighter, action);
- return;
-
- case kFightAction1:
- if (fighter->sequenceIndex != 1 || CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 6, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 3, kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction2:
- if ((fighter->sequenceIndex != 2 && fighter->sequenceIndex != 3) || CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 6, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 4, kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction128:
- if (fighter->sequenceIndex != 1 || CHECK_SEQUENCE2(fighter, 4) || fighter->opponent->sequenceIndex != 1) {
- switch (fighter->opponent->sequenceIndex) {
- default:
- setSequenceAndDraw(fighter, rnd(3) + 1, kFightSequenceType0);
- break;
-
- case 1:
- setSequenceAndDraw(fighter, 1, kFightSequenceType0);
- break;
-
- case 2:
- setSequenceAndDraw(fighter, 3, kFightSequenceType0);
- break;
- }
- } else {
- setSequenceAndDraw(fighter, 4, kFightSequenceType1);
- CALL_FUNCTION0(fighter, update);
- }
- break;
- }
-}
-
-void Fight::updateMilos(Fighter *fighter) {
- if (fighter->frame && CHECK_SEQUENCE2(fighter, 2)) {
-
- // Draw sequences
- if (fighter->opponent->countdown <= 0) {
- setSequenceAndDraw(fighter, 5, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 6, kFightSequenceType1);
-
- getSound()->removeFromQueue(kEntityTables0);
- getSound()->playSound(kEntityTrain, "MUS029", SoundManager::kFlagDefault);
-
- CALL_FUNCTION1(fighter, handleAction, kFightActionWin);
- }
-
- if (fighter->sequenceIndex == 4) {
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction4);
- _endType = kFightEndLost;
- }
- }
-
- update(fighter);
-}
-
-bool Fight::canInteractMilos(Fighter const *fighter, FightAction action) {
- if (!_data)
- error("Fight::canInteractMilos - invalid data!");
-
- if (action != kFightAction128
- || _data->player->sequenceIndex != 1
- || !fighter->frame
- || CHECK_SEQUENCE2(fighter, 4)
- || fighter->opponent->sequenceIndex != 1) {
- return canInteract(fighter);
- }
-
- _engine->getCursor()->setStyle(kCursorHand);
-
- return true;
-}
-
-void Fight::handleOpponentActionMilos(Fighter *fighter, FightAction action) {
- if (action == kFightAction4) {
- setSequenceAndDraw(fighter, 5, kFightSequenceType1);
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- } else {
- if (action != kFightAction131)
- handleAction(fighter, action);
- }
-}
-
-void Fight::updateOpponentMilos(Fighter *fighter) {
- // This is an opponent struct!
- Opponent *opponent = (Opponent *)fighter;
-
- if (!opponent->field_38 && CALL_FUNCTION1(opponent, canInteract, kFightAction1) && !opponent->sequenceIndex2) {
-
- if (opponent->opponent->field_34 >= 2) {
- switch (rnd(5)) {
- default:
- break;
-
- case 0:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- break;
-
- case 1:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- break;
-
- case 2:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType1);
- break;
-
- case 3:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
-
- case 4:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 1, kFightSequenceType2);
- break;
- }
- } else {
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- }
-
- // Update field_38
- if (opponent->opponent->field_34 < 5)
- opponent->field_38 = 6 * (5 - opponent->opponent->field_34);
- else
- opponent->field_38 = 0;
- }
-
- if (opponent->frame && CHECK_SEQUENCE2(opponent, 2)) {
- if (opponent->sequenceIndex == 1 || opponent->sequenceIndex == 2)
- CALL_FUNCTION1(opponent->opponent, handleAction, (FightAction)opponent->sequenceIndex);
-
- if (opponent->opponent->countdown <= 0) {
- getSound()->removeFromQueue(kEntityTables0);
- CALL_FUNCTION1(opponent, handleAction, kFightActionLost);
- }
- }
-
- updateOpponent(opponent);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Anna
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::loadAnnaPlayer() {
- if (!_data)
- error("Fight::loadAnnaPlayer - invalid data!");
-
- // Special case: we are using some shared functions directly
- _data->player->handleAction = new Common::Functor2Mem<Fighter *, FightAction, void, Fight>(this, &Fight::handleActionAnna);
- _data->player->update = new Common::Functor1Mem<Fighter *, void, Fight>(this, &Fight::update);
- _data->player->canInteract = new Common::Functor2Mem<Fighter const *, FightAction, bool, Fight>(this, &Fight::canInteract);
-
- _data->player->sequences.push_back(loadSequence("2002cr.seq"));
- _data->player->sequences.push_back(loadSequence("2002cdl.seq"));
- _data->player->sequences.push_back(loadSequence("2002cdr.seq"));
- _data->player->sequences.push_back(loadSequence("2002cdm.seq"));
- _data->player->sequences.push_back(loadSequence("2002lbk.seq"));
-}
-
-void Fight::loadAnnaOpponent() {
- if (!_data)
- error("Fight::loadAnnaOpponent - invalid data!");
-
- // Special case: we are using some shared functions directly
- _data->opponent->handleAction = new Common::Functor2Mem<Fighter *, FightAction, void, Fight>(this, &Fight::handleAction);
- _data->opponent->update = new Common::Functor1Mem<Fighter *, void, Fight>(this, &Fight::updateOpponentAnna);
- _data->opponent->canInteract = new Common::Functor2Mem<Fighter const *, FightAction, bool, Fight>(this, &Fight::canInteract);
-
- _data->opponent->sequences.push_back(loadSequence("2002or.seq"));
- _data->opponent->sequences.push_back(loadSequence("2002oal.seq"));
- _data->opponent->sequences.push_back(loadSequence("2002oam.seq"));
- _data->opponent->sequences.push_back(loadSequence("2002oar.seq"));
- _data->opponent->sequences.push_back(loadSequence("2002okr.seq"));
- _data->opponent->sequences.push_back(loadSequence("2002okml.seq"));
- _data->opponent->sequences.push_back(loadSequence("2002okm.seq"));
-
- getSound()->playSound(kEntityTables0, "MUS030", SoundManager::kFlagDefault);
-
- _data->opponent->field_38 = 30;
-}
-
-void Fight::handleActionAnna(Fighter *fighter, FightAction action) {
- switch (action) {
- default:
- handleAction(fighter, action);
- return;
-
- case kFightAction1:
- if ((fighter->sequenceIndex != 1 && fighter->sequenceIndex != 3) || CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 4, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 4, kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction2:
- if ((fighter->sequenceIndex != 2 && fighter->sequenceIndex != 3) || CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 4, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 5, kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction3:
- if ((fighter->sequenceIndex != 2 && fighter->sequenceIndex != 1) || CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 4, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 6, kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction128:
- switch (fighter->opponent->sequenceIndex) {
- default:
- setSequenceAndDraw(fighter, 3, kFightSequenceType0);
- break;
-
- case 1:
- setSequenceAndDraw(fighter, 1, kFightSequenceType0);
- break;
-
- case 2:
- setSequenceAndDraw(fighter, 3, kFightSequenceType0);
- break;
-
- case 3:
- setSequenceAndDraw(fighter, 2, kFightSequenceType0);
- break;
- }
- break;
- }
-
- if (fighter->field_34 > 4) {
- getSound()->removeFromQueue(kEntityTables0);
- bailout(kFightEndWin);
- }
-}
-
-void Fight::updateOpponentAnna(Fighter *fighter) {
- // This is an opponent struct!
- Opponent *opponent = (Opponent *)fighter;
-
- if (!opponent->field_38 && CALL_FUNCTION1(opponent, canInteract, kFightAction1) && !opponent->sequenceIndex2) {
-
- if (opponent->opponent->field_34 >= 2) {
- switch (rnd(6)) {
- default:
- break;
-
- case 0:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- break;
-
- case 1:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- break;
-
- case 2:
- setSequenceAndDraw(opponent, 3, kFightSequenceType0);
- break;
-
- case 3:
- setSequenceAndDraw(opponent, 3, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
-
- case 4:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
-
- case 5:
- setSequenceAndDraw(opponent, 3, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
- }
- }
-
- // Update field_38
- opponent->field_38 = (int32)rnd(15);
- }
-
- if (opponent->frame && CHECK_SEQUENCE2(opponent, 2)) {
- if (opponent->sequenceIndex == 1 || opponent->sequenceIndex == 2 || opponent->sequenceIndex == 3)
- CALL_FUNCTION1(opponent->opponent, handleAction, (FightAction)opponent->sequenceIndex);
-
- if (opponent->opponent->countdown <= 0) {
- getSound()->removeFromQueue(kEntityTables0);
- CALL_FUNCTION1(opponent, handleAction, kFightActionLost);
- }
- }
-
- updateOpponent(opponent);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Ivo
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::loadIvoPlayer() {
- REGISTER_PLAYER_FUNCTIONS(Ivo)
-
- _data->player->sequences.push_back(loadSequence("2003cr.seq"));
- _data->player->sequences.push_back(loadSequence("2003car.seq"));
- _data->player->sequences.push_back(loadSequence("2003cal.seq"));
- _data->player->sequences.push_back(loadSequence("2003cdr.seq"));
- _data->player->sequences.push_back(loadSequence("2003cdm.seq"));
- _data->player->sequences.push_back(loadSequence("2003chr.seq"));
- _data->player->sequences.push_back(loadSequence("2003chl.seq"));
- _data->player->sequences.push_back(loadSequence("2003ckr.seq"));
- _data->player->sequences.push_back(loadSequence("2003lbk.seq"));
- _data->player->sequences.push_back(loadSequence("2003fbk.seq"));
-
- _data->player->countdown = 5;
-}
-
-void Fight::loadIvoOpponent() {
- REGISTER_OPPONENT_FUNCTIONS(Ivo)
-
- _data->opponent->sequences.push_back(loadSequence("2003or.seq"));
- _data->opponent->sequences.push_back(loadSequence("2003oal.seq"));
- _data->opponent->sequences.push_back(loadSequence("2003oar.seq"));
- _data->opponent->sequences.push_back(loadSequence("2003odm.seq"));
- _data->opponent->sequences.push_back(loadSequence("2003okl.seq"));
- _data->opponent->sequences.push_back(loadSequence("2003okj.seq"));
- _data->opponent->sequences.push_back(loadSequence("blank.seq"));
- _data->opponent->sequences.push_back(loadSequence("csdr.seq"));
- _data->opponent->sequences.push_back(loadSequence("2003l.seq"));
-
- getSound()->playSound(kEntityTables0, "MUS032", SoundManager::kFlagDefault);
-
- _data->opponent->countdown = 5;
- _data->opponent->field_38 = 15;
-}
-
-void Fight::handleActionIvo(Fighter *fighter, FightAction action) {
- switch (action) {
- default:
- handleAction(fighter, action);
- return;
-
- case kFightAction1:
- if (fighter->sequenceIndex != 1 || CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 7, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 4, kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- }
- break;
-
- case kFightAction2:
- if ((fighter->sequenceIndex != 2 && fighter->sequenceIndex != 3) || CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 7, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 5, kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- }
- break;
-
- case kFightAction128:
- switch (fighter->opponent->sequenceIndex) {
- default:
- case 1:
- setSequenceAndDraw(fighter, 1, kFightSequenceType0);
- break;
-
- case 2:
- setSequenceAndDraw(fighter, 2, kFightSequenceType0);
- break;
- }
- break;
-
- case kFightAction129:
- setSequenceAndDraw(fighter, (fighter->opponent->countdown > 1) ? 4 : 3, fighter->sequenceIndex ? kFightSequenceType2 : kFightSequenceType0);
- break;
-
- case kFightAction130:
- setSequenceAndDraw(fighter, 3, fighter->sequenceIndex ? kFightSequenceType2 : kFightSequenceType0);
- break;
- }
-}
-
-void Fight::updateIvo(Fighter *fighter) {
-
- if ((fighter->sequenceIndex == 3 || fighter->sequenceIndex == 4) && !fighter->frameIndex)
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction131);
-
- if (fighter->frame && CHECK_SEQUENCE2(fighter, 2)) {
-
- // Draw sequences
- if (fighter->opponent->countdown <= 0) {
- setSequenceAndDraw(fighter, 9, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, 8, kFightSequenceType1);
- getSound()->removeFromQueue(kEntityTables0);
-
- CALL_FUNCTION1(fighter, handleAction, kFightActionWin);
- return;
- }
-
- if (fighter->sequenceIndex == 3 || fighter->sequenceIndex == 4)
- CALL_FUNCTION1(fighter->opponent, handleAction, (FightAction)fighter->sequenceIndex);
- }
-
- update(fighter);
-}
-
-bool Fight::canInteractIvo(Fighter const *fighter, FightAction action) {
- if (action == kFightAction129 || action == kFightAction130)
- return (fighter->sequenceIndex >= 8);
-
- return canInteract(fighter);
-}
-
-void Fight::handleOpponentActionIvo(Fighter *fighter, FightAction action) {
- // This is an opponent struct!
- Opponent *opponent = (Opponent *)fighter;
-
- switch (action) {
- default:
- handleAction(fighter, action);
- break;
-
- case kFightAction3:
- if ((opponent->sequenceIndex != 1 && opponent->sequenceIndex != 3) || CHECK_SEQUENCE2(opponent, 4)) {
- setSequenceAndDraw(opponent, 6, kFightSequenceType1);
- setSequenceAndDraw(opponent->opponent, 6, kFightSequenceType1);
- CALL_FUNCTION1(opponent->opponent, handleAction, kFightAction103);
- }
- break;
-
- case kFightAction4:
- if ((opponent->sequenceIndex != 2 && opponent->sequenceIndex != 3) || CHECK_SEQUENCE2(opponent, 4)) {
- setSequenceAndDraw(opponent, 6, kFightSequenceType1);
- setSequenceAndDraw(opponent->opponent, 5, kFightSequenceType1);
- CALL_FUNCTION1(opponent->opponent, handleAction, kFightAction103);
- }
- break;
-
- case kFightAction131:
- if (opponent->sequenceIndex)
- break;
-
- if (rnd(100) <= (unsigned int)(opponent->countdown > 2 ? 60 : 75)) {
- setSequenceAndDraw(opponent, 3 , kFightSequenceType1);
- if (opponent->opponent->sequenceIndex == 4)
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- }
- break;
- }
-}
-
-void Fight::updateOpponentIvo(Fighter *fighter) {
- // This is an opponent struct!
- Opponent *opponent = (Opponent *)fighter;
-
- if (!opponent->field_38 && CALL_FUNCTION1(opponent, canInteract, kFightAction1) && !opponent->sequenceIndex2) {
-
- if (opponent->opponent->field_34 >= 2) {
- switch (rnd(5)) {
- default:
- break;
-
- case 0:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- break;
-
- case 1:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- break;
-
- case 2:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
-
- case 3:
- setSequenceAndDraw(opponent, 0, kFightSequenceType2);
- setSequenceAndDraw(opponent, 1, kFightSequenceType2);
- break;
-
- case 4:
- setSequenceAndDraw(opponent, 0, kFightSequenceType1);
- setSequenceAndDraw(opponent, 1, kFightSequenceType2);
- break;
- }
- }
-
- // Update field_38
- opponent->field_38 = 3 * opponent->countdown + (int32)rnd(10);
- }
-
- if (opponent->frame && CHECK_SEQUENCE2(opponent, 2)) {
-
- if (opponent->opponent->countdown <= 0) {
- setSequenceAndDraw(opponent, 7, kFightSequenceType1);
- setSequenceAndDraw(opponent->opponent, 8, kFightSequenceType1);
- getSound()->removeFromQueue(kEntityTables0);
-
- CALL_FUNCTION1(opponent->opponent, handleAction, kFightActionWin);
-
- return;
- }
-
- if (opponent->sequenceIndex == 1 || opponent->sequenceIndex == 2)
- CALL_FUNCTION1(opponent->opponent, handleAction, (FightAction)opponent->sequenceIndex);
- }
-
- updateOpponent(opponent);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Salko
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::loadSalkoPlayer() {
- REGISTER_PLAYER_FUNCTIONS(Salko)
-
- _data->player->sequences.push_back(loadSequence("2004cr.seq"));
- _data->player->sequences.push_back(loadSequence("2004cdr.seq"));
- _data->player->sequences.push_back(loadSequence("2004chj.seq"));
- _data->player->sequences.push_back(loadSequence("2004bk.seq"));
-
- _data->player->countdown = 2;
-}
-
-void Fight::loadSalkoOpponent() {
- REGISTER_OPPONENT_FUNCTIONS(Salko)
-
- _data->opponent->sequences.push_back(loadSequence("2004or.seq"));
- _data->opponent->sequences.push_back(loadSequence("2004oam.seq"));
- _data->opponent->sequences.push_back(loadSequence("2004oar.seq"));
- _data->opponent->sequences.push_back(loadSequence("2004okr.seq"));
- _data->opponent->sequences.push_back(loadSequence("2004ohm.seq"));
- _data->opponent->sequences.push_back(loadSequence("blank.seq"));
-
- getSound()->playSound(kEntityTables0, "MUS035", SoundManager::kFlagDefault);
-
- _data->opponent->countdown = 3;
- _data->opponent->field_38 = 30;
-}
-
-void Fight::handleActionSalko(Fighter *fighter, FightAction action) {
- switch (action) {
- default:
- handleAction(fighter, action);
- return;
-
- case kFightAction1:
- case kFightAction2:
- if (fighter->sequenceIndex != 1 && CHECK_SEQUENCE2(fighter, 4)) {
- fighter->field_34 = 0;
-
- setSequenceAndDraw(fighter, 3, kFightSequenceType1);
- setSequenceAndDraw(fighter->opponent, (action == kFightAction1 ? 3 : 4), kFightSequenceType1);
-
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
-
- if (action == kFightAction2)
- fighter->countdown= 0;
-
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction5:
- if (fighter->sequenceIndex != 3) {
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- }
- break;
-
- case kFightAction128:
- setSequenceAndDraw(fighter, 1, kFightSequenceType0);
- fighter->field_34 = 0;
- break;
-
- case kFightAction131:
- setSequenceAndDraw(fighter, 2, (fighter->sequenceIndex ? kFightSequenceType2 : kFightSequenceType0));
- break;
- }
-}
-
-void Fight::updateSalko(Fighter *fighter) {
- update(fighter);
-
- // The original doesn't check for currentSequence2 != NULL (might not happen when everything is working properly, but crashes with our current implementation)
- if (fighter->frame && CHECK_SEQUENCE2(fighter, 2)) {
-
- if (fighter->opponent->countdown <= 0) {
- getSound()->removeFromQueue(kEntityTables0);
- bailout(kFightEndWin);
-
- return;
- }
-
- if (fighter->sequenceIndex == 2)
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction2);
- }
-}
-
-bool Fight::canInteractSalko(Fighter const *fighter, FightAction action) {
- if (action == kFightAction131) {
- if (fighter->sequenceIndex == 1) {
- if (fighter->opponent->countdown <= 0)
- _engine->getCursor()->setStyle(kCursorHand);
-
- return true;
- }
-
- return false;
- }
-
- return canInteract(fighter);
-}
-
-void Fight::handleOpponentActionSalko(Fighter *fighter, FightAction action) {
- if (action == kFightAction2) {
- setSequenceAndDraw(fighter, 5, kFightSequenceType1);
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- } else {
- handleAction(fighter, action);
- }
-}
-
-void Fight::updateOpponentSalko(Fighter *fighter) {
- // This is an opponent struct
- Opponent *opponent = (Opponent *)fighter;
-
- if (!opponent->field_38 && CALL_FUNCTION1(opponent, canInteract, kFightAction1) && !opponent->sequenceIndex2) {
-
- switch (rnd(5)) {
- default:
- break;
-
- case 0:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- break;
-
- case 1:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- break;
-
- case 2:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
-
- case 3:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- setSequenceAndDraw(opponent, 1, kFightSequenceType2);
- break;
-
- case 4:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 1, kFightSequenceType2);
- break;
- }
-
- // Update field_38
- opponent->field_38 = 4 * opponent->countdown;
- }
-
- if (opponent->frame && CHECK_SEQUENCE2(opponent, 2)) {
- if (opponent->opponent->countdown <= 0) {
- getSound()->removeFromQueue(kEntityTables0);
- bailout(kFightEndLost);
-
- // Stop processing
- return;
- }
-
- if (opponent->sequenceIndex == 1 || opponent->sequenceIndex == 2)
- CALL_FUNCTION1(opponent->opponent, handleAction, (FightAction)opponent->sequenceIndex);
- }
-
- updateOpponent(opponent);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Vesna
-//////////////////////////////////////////////////////////////////////////
-
-void Fight::loadVesnaPlayer() {
- REGISTER_PLAYER_FUNCTIONS(Vesna)
-
- _data->player->sequences.push_back(loadSequence("2005cr.seq"));
- _data->player->sequences.push_back(loadSequence("2005cdr.seq"));
- _data->player->sequences.push_back(loadSequence("2005cbr.seq"));
- _data->player->sequences.push_back(loadSequence("2005bk.seq"));
- _data->player->sequences.push_back(loadSequence("2005cdm1.seq"));
- _data->player->sequences.push_back(loadSequence("2005chl.seq"));
-}
-
-void Fight::loadVesnaOpponent() {
- REGISTER_OPPONENT_FUNCTIONS(Vesna)
-
- _data->opponent->sequences.push_back(loadSequence("2005or.seq"));
- _data->opponent->sequences.push_back(loadSequence("2005oam.seq"));
- _data->opponent->sequences.push_back(loadSequence("2005oar.seq"));
- _data->opponent->sequences.push_back(loadSequence("2005okml.seq"));
- _data->opponent->sequences.push_back(loadSequence("2005okr.seq"));
- _data->opponent->sequences.push_back(loadSequence("2005odm1.seq"));
- _data->opponent->sequences.push_back(loadSequence("2005csbm.seq"));
- _data->opponent->sequences.push_back(loadSequence("2005oam4.seq"));
-
- getSound()->playSound(kEntityTables0, "MUS038", SoundManager::kFlagDefault);
-
- _data->opponent->countdown = 4;
- _data->opponent->field_38 = 30;
-}
-
-void Fight::handleActionVesna(Fighter *fighter, FightAction action) {
- switch (action) {
- default:
- handleAction(fighter, action);
- return;
-
- case kFightAction1:
- if (fighter->sequenceIndex != 1) {
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction2:
- if (fighter->sequenceIndex != 2) {
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- } else {
- fighter->field_34++;
- }
- break;
-
- case kFightAction5:
- if (fighter->sequenceIndex != 3) {
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- CALL_FUNCTION0(fighter, update);
- }
- break;
-
- case kFightAction128:
- if (fighter->sequenceIndex == 1 && fighter->opponent->sequenceIndex == 1 && CHECK_SEQUENCE2(fighter, 4)) {
- setSequenceAndDraw(fighter, 5, kFightSequenceType1);
- } else {
- setSequenceAndDraw(fighter, (fighter->opponent->sequenceIndex == 5) ? 3 : 1, kFightSequenceType0);
- }
- break;
-
- case kFightAction132:
- setSequenceAndDraw(fighter, 2, kFightSequenceType0);
- break;
- }
-
- if (fighter->field_34 > 10) {
- setSequenceAndDraw(fighter->opponent, 5, kFightSequenceType2);
- fighter->opponent->countdown = 1;
- fighter->field_34 = 0;
- }
-}
-
-void Fight::updateVesna(Fighter *fighter) {
- if (fighter->frame && CHECK_SEQUENCE2(fighter, 2)) {
-
- if (fighter->sequenceIndex == 3)
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction3);
-
- if (fighter->opponent->countdown <= 0) {
- getSound()->removeFromQueue(kEntityTables0);
- bailout(kFightEndWin);
- return;
- }
-
- if (fighter->sequenceIndex == 5)
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction5);
- }
-
- update(fighter);
-}
-
-bool Fight::canInteractVesna(Fighter const *fighter, FightAction action) {
- if (action != kFightAction128)
- return canInteract(fighter);
-
- if (fighter->sequenceIndex != 1) {
-
- if (fighter->opponent->sequenceIndex == 5) {
- _engine->getCursor()->setStyle(kCursorDown);
- return true;
- }
-
- return canInteract(fighter);
- }
-
- if (fighter->opponent->sequenceIndex == 1 && CHECK_SEQUENCE2(fighter, 4)) {
- _engine->getCursor()->setStyle(kCursorPunchLeft);
- return true;
- }
-
- return false;
-}
-
-void Fight::handleOpponentActionVesna(Fighter *fighter, FightAction action) {
- switch (action) {
- default:
- handleAction(fighter, action);
- break;
-
- case kFightAction3:
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- break;
-
- case kFightAction5:
- setSequenceAndDraw(fighter, 7, kFightSequenceType1);
- CALL_FUNCTION1(fighter->opponent, handleAction, kFightAction103);
- if (fighter->countdown <= 1)
- fighter->countdown = 1;
- break;
-
- case kFightAction131:
- break;
- }
-}
-
-void Fight::updateOpponentVesna(Fighter *fighter) {
- // This is an opponent struct
- Opponent *opponent = (Opponent *)fighter;
-
- if (!opponent->field_38 && CALL_FUNCTION1(opponent, canInteract, kFightAction1) && !opponent->sequenceIndex2) {
-
- if (opponent->opponent->field_34 == 1) {
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- } else {
- switch (rnd(6)) {
- default:
- break;
-
- case 0:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- break;
-
- case 1:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 1, kFightSequenceType2);
- break;
-
- case 2:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- break;
-
- case 3:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
-
- case 4:
- setSequenceAndDraw(opponent, 1, kFightSequenceType0);
- setSequenceAndDraw(opponent, 2, kFightSequenceType2);
- break;
-
- case 5:
- setSequenceAndDraw(opponent, 2, kFightSequenceType0);
- setSequenceAndDraw(opponent, 1, kFightSequenceType2);
- break;
- }
- }
-
- // Update field_38
- opponent->field_38 = 4 * opponent->countdown;
- }
-
- if (opponent->frame && CHECK_SEQUENCE2(opponent, 2)) {
- if (opponent->sequenceIndex == 1 || opponent->sequenceIndex == 2 || opponent->sequenceIndex == 5)
- CALL_FUNCTION1(opponent->opponent, handleAction, (FightAction)opponent->sequenceIndex);
-
- if (opponent->opponent->countdown <= 0) {
-
- switch (opponent->sequenceIndex) {
- default:
- break;
-
- case 1:
- setSequenceAndDraw(opponent, 3, kFightSequenceType1);
- break;
-
- case 2:
- setSequenceAndDraw(opponent, 4, kFightSequenceType1);
- break;
-
- case 5:
- setSequenceAndDraw(opponent, 6, kFightSequenceType1);
- break;
- }
-
- setSequenceAndDraw(opponent->opponent, 4, kFightSequenceType1);
-
- CALL_FUNCTION1(opponent, handleAction, kFightActionLost);
- CALL_FUNCTION0(opponent->opponent, update);
- CALL_FUNCTION0(opponent, update);
-
- getSound()->removeFromQueue(kEntityTables0);
-
- // Stop processing
- return;
- }
- }
-
- updateOpponent(opponent);
-}
-
-} // End of namespace LastExpress
diff --git a/engines/lastexpress/game/fight.h b/engines/lastexpress/game/fight.h
deleted file mode 100644
index a33cc93a29..0000000000
--- a/engines/lastexpress/game/fight.h
+++ /dev/null
@@ -1,266 +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.
- *
- */
-
-#ifndef LASTEXPRESS_FIGHT_H
-#define LASTEXPRESS_FIGHT_H
-
-/*
- Fight structure
- ---------------
- uint32 {4} - player struct
- uint32 {4} - opponent struct
- uint32 {4} - hasLost flag
-
- byte {1} - isRunning
-
- Fight participant structure
- ---------------------------
- uint32 {4} - function pointer
- uint32 {4} - pointer to fight structure
- uint32 {4} - pointer to opponent (fight participant structure)
- uint32 {4} - array of sequences
- uint32 {4} - number of sequences
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint16 {2} - ??
- uint16 {2} - ?? - only for opponent structure
- uint32 {4} - ?? - only for opponent structure
-
-*/
-
-#include "lastexpress/shared.h"
-
-#include "lastexpress/eventhandler.h"
-
-#include "common/array.h"
-
-namespace LastExpress {
-
-class LastExpressEngine;
-class Sequence;
-class SequenceFrame;
-
-//////////////////////////////////////////////////////////////////////////
-// TODO : objectify!
-class Fight : public EventHandler {
-public:
- enum FightEndType {
- kFightEndWin = 0,
- kFightEndLost = 1,
- kFightEndExit = 2
- };
-
- Fight(LastExpressEngine *engine);
- ~Fight();
-
- FightEndType setup(FightType type);
-
- void eventMouse(const Common::Event &ev);
- void eventTick(const Common::Event &ev);
-
- void setStopped();
- void resetState() { _state = 0; }
-
-private:
- enum FightSequenceType {
- kFightSequenceType0 = 0,
- kFightSequenceType1 = 1,
- kFightSequenceType2 = 2
- };
-
- enum FightAction {
- kFightAction1 = 1,
- kFightAction2 = 2,
- kFightAction3 = 3,
- kFightAction4 = 4,
- kFightAction5 = 5,
- kFightAction101 = 101,
- kFightActionResetFrame = 102,
- kFightAction103 = 103,
- kFightActionWin = 104,
- kFightActionLost = 105,
- kFightAction128 = 128,
- kFightAction129 = 129,
- kFightAction130 = 130,
- kFightAction131 = 131,
- kFightAction132 = 132
- };
-
- struct Fighter {
- Common::Functor2<Fighter *, FightAction, void> *handleAction;
- Common::Functor1<Fighter *, void> *update;
- Common::Functor2<Fighter const *, FightAction, bool> *canInteract;
- Fighter *opponent;
- Common::Array<Sequence *> sequences;
- uint32 sequenceIndex;
- Sequence *sequence;
- SequenceFrame *frame;
- uint32 frameIndex;
- uint32 field_24;
- FightAction action;
- uint32 sequenceIndex2;
- int32 countdown; // countdown before loosing ?
- uint32 field_34;
-
- Fighter() {
- handleAction = NULL;
- update = NULL;
- canInteract = NULL;
-
- opponent = NULL;
-
- sequenceIndex = 0;
- sequence = NULL;
- frame = NULL;
- frameIndex = 0;
-
- field_24 = 0;
-
- action = kFightAction101;
- sequenceIndex2 = 0;
-
- countdown = 1;
-
- field_34 = 0;
- }
- };
-
- // Opponent struct
- struct Opponent : Fighter {
- int32 field_38;
-
- Opponent() : Fighter() {
- field_38 = 0;
- }
- };
-
- struct FightData {
- Fighter *player;
- Opponent *opponent;
- int32 index;
-
- Sequence *sequences[20];
- Common::String names[20];
-
- bool isRunning;
-
- FightData() {
- player = new Fighter();
- opponent = new Opponent();
-
- // Set opponents
- player->opponent = opponent;
- opponent->opponent = player;
-
- index = 0;
-
- isRunning = false;
- }
- };
-
- LastExpressEngine *_engine;
- FightData *_data;
- FightEndType _endType;
- int _state;
-
- bool _handleTimer;
-
- // Events
- void handleTick(const Common::Event &ev, bool unknown);
-
- // State
- void bailout(FightEndType type);
-
-
- // Drawing
- void setSequenceAndDraw(Fighter *fighter, uint32 sequenceIndex, FightSequenceType type) const;
- void draw(Fighter *fighter) const;
-
- // Cleanup
- void clearData();
- void clearSequences(Fighter *fighter) const;
-
- //////////////////////////////////////////////////////////////////////////
- // Loading
- void loadData(FightType type);
-
- // Shared
- void processFighter(Fighter *fighter);
-
- // Default functions
- void handleAction(Fighter *fighter, FightAction action);
- void update(Fighter *fighter);
- bool canInteract(Fighter const *fighter, FightAction = (FightAction)0);
- void updateOpponent(Fighter *fighter);
-
- // Milos
- void loadMilosPlayer();
- void loadMilosOpponent();
- void handleActionMilos(Fighter *fighter, FightAction action);
- void updateMilos(Fighter *fighter);
- bool canInteractMilos(Fighter const *fighter, FightAction action);
- void handleOpponentActionMilos(Fighter *fighter, FightAction action);
- void updateOpponentMilos(Fighter *fighter);
-
- // Anna
- void loadAnnaPlayer();
- void loadAnnaOpponent();
- void handleActionAnna(Fighter *fighter, FightAction action);
- void updateOpponentAnna(Fighter *fighter);
-
- // Ivo
- void loadIvoPlayer();
- void loadIvoOpponent();
- void handleActionIvo(Fighter *fighter, FightAction action);
- void updateIvo(Fighter *fighter);
- bool canInteractIvo(Fighter const *fighter, FightAction action);
- void handleOpponentActionIvo(Fighter *fighter, FightAction action);
- void updateOpponentIvo(Fighter *fighter);
-
- // Salko
- void loadSalkoPlayer();
- void loadSalkoOpponent();
- void handleActionSalko(Fighter *fighter, FightAction action);
- void updateSalko(Fighter *fighter);
- bool canInteractSalko(Fighter const *fighter, FightAction action);
- void handleOpponentActionSalko(Fighter *fighter, FightAction action);
- void updateOpponentSalko(Fighter *fighter);
-
- // Vesna
- void loadVesnaPlayer();
- void loadVesnaOpponent();
- void handleActionVesna(Fighter *fighter, FightAction action);
- void updateVesna(Fighter *fighter);
- bool canInteractVesna(Fighter const *fighter, FightAction action);
- void handleOpponentActionVesna(Fighter *fighter, FightAction action);
- void updateOpponentVesna(Fighter *fighter);
-};
-
-} // End of namespace LastExpress
-
-#endif // LASTEXPRESS_FIGHT_H
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index adf6ff772e..e417b1ec0d 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -27,11 +27,14 @@
#include "lastexpress/data/snd.h"
#include "lastexpress/game/logic.h"
-#include "lastexpress/game/menu.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/menu/menu.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/graphics.h"
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -155,14 +158,14 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
_portraitHighlighted = false;
_isOpened = false;
- getSound()->playSoundWithSubtitles("LIB039.SND", SoundManager::kFlagMenuClock, kEntityPlayer);
+ getSound()->playSoundWithSubtitles("LIB039.SND", kFlagMenuClock, kEntityPlayer);
getMenu()->show(true, kSavegameTypeIndex, 0);
} else if (ev.type == Common::EVENT_RBUTTONDOWN) {
if (getGlobalTimer()) {
- if (getSound()->isBuffered("TIMER"))
- getSound()->removeFromQueue("TIMER");
+ if (getSoundQueue()->isBuffered("TIMER"))
+ getSoundQueue()->removeFromQueue("TIMER");
setGlobalTimer(900);
}
@@ -436,7 +439,7 @@ void Inventory::showHourGlass(){
//////////////////////////////////////////////////////////////////////////
Inventory::InventoryEntry *Inventory::get(InventoryItem item) {
if (item >= kPortraitOriginal)
- error("Inventory::getEntry: Invalid inventory item!");
+ error("[Inventory::get] Invalid inventory item");
return &_entries[item];
}
@@ -620,7 +623,7 @@ void Inventory::drawEgg() {
// Blinking egg: we need to blink the egg for delta time, with the blinking getting faster until it's always lit.
void Inventory::drawBlinkingEgg() {
- warning("Inventory::drawEgg - blinking not implemented!");
+ warning("[Inventory::drawBlinkingEgg] Blinking not implemented");
//// TODO show egg (with or without mouseover)
@@ -629,7 +632,7 @@ void Inventory::drawBlinkingEgg() {
// if (getGlobalTimer() + ticks >= 90)
// getSound()->playSoundWithSubtitles("TIMER.SND", 50331664, kEntityPlayer);
- // if (getSound()->isBuffered("TIMER"))
+ // if (getSoundQueue()->isBuffered("TIMER"))
// setGlobalTimer(0);
//}
diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp
index 0911c60de0..aeac8cff98 100644
--- a/engines/lastexpress/game/logic.cpp
+++ b/engines/lastexpress/game/logic.cpp
@@ -30,20 +30,25 @@
// Entities
#include "lastexpress/entities/chapters.h"
+// Fight
+#include "lastexpress/fight/fight.h"
+
// Game
#include "lastexpress/game/action.h"
#include "lastexpress/game/beetle.h"
#include "lastexpress/game/entities.h"
-#include "lastexpress/game/fight.h"
#include "lastexpress/game/inventory.h"
-#include "lastexpress/game/menu.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savegame.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/menu/menu.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/graphics.h"
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -149,7 +154,7 @@ void Logic::eventMouse(const Common::Event &ev) {
_engine->getCursor()->setStyle(getInventory()->get(kItemWhistle)->cursor);
// Check if clicked
- if (ev.type == Common::EVENT_LBUTTONUP && !getSound()->isBuffered("LIB045")) {
+ if (ev.type == Common::EVENT_LBUTTONUP && !getSoundQueue()->isBuffered("LIB045")) {
getSound()->playSoundEvent(kEntityPlayer, 45);
@@ -408,7 +413,7 @@ void Logic::eventTick(const Common::Event &) {
void Logic::resetState() {
getState()->scene = kSceneDefault;
- warning("Logic::resetState: not implemented! You need to restart the engine until this is implemented.");
+ warning("[Logic::resetState] Not implemented! You need to restart the engine until this is implemented.");
}
/**
@@ -421,7 +426,7 @@ void Logic::resetState() {
*/
void Logic::gameOver(SavegameType type, uint32 value, SceneIndex sceneIndex, bool showScene) const {
- getSound()->processEntries();
+ getSoundQueue()->processEntries();
getEntities()->reset();
getFlags()->isGameRunning = false;
getSavePoints()->reset();
@@ -429,16 +434,16 @@ void Logic::gameOver(SavegameType type, uint32 value, SceneIndex sceneIndex, boo
if (showScene) {
- getSound()->processEntry(SoundManager::kSoundType11);
+ getSoundQueue()->processEntry(kSoundType11);
if (sceneIndex && !getFlags()->mouseRightClick) {
getScenes()->loadScene(sceneIndex);
- while (getSound()->isBuffered(kEntityTables4)) {
+ while (getSoundQueue()->isBuffered(kEntityTables4)) {
if (getFlags()->mouseRightClick)
break;
- getSound()->updateQueue();
+ getSoundQueue()->updateQueue();
}
}
}
@@ -448,7 +453,7 @@ void Logic::gameOver(SavegameType type, uint32 value, SceneIndex sceneIndex, boo
}
void Logic::switchChapter() const {
- getSound()->clearStatus();
+ getSoundQueue()->clearStatus();
switch(getState()->progress.chapter) {
default:
@@ -488,7 +493,7 @@ void Logic::switchChapter() const {
}
void Logic::playFinalSequence() const {
- getSound()->processEntries();
+ getSoundQueue()->processEntries();
_action->playAnimation(kEventFinalSequence);
showCredits();
@@ -501,7 +506,7 @@ void Logic::playFinalSequence() const {
}
void Logic::showCredits() const {
- error("Logic::showCredits: not implemented!");
+ error("[Logic::showCredits] Not implemented");
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/lastexpress/game/object.cpp b/engines/lastexpress/game/object.cpp
index a600075953..d9e9e4279a 100644
--- a/engines/lastexpress/game/object.cpp
+++ b/engines/lastexpress/game/object.cpp
@@ -39,7 +39,7 @@ Objects::Objects(LastExpressEngine *engine) : _engine(engine) {}
const Objects::Object Objects::get(ObjectIndex index) const {
if (index >= kObjectMax)
- error("Objects::get - internal error: invalid object index (%d)", index);
+ error("[Objects::get] Invalid object index (%d)", index);
return _objects[index];
}
diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp
index 5d06ecab13..57c18b5697 100644
--- a/engines/lastexpress/game/savegame.cpp
+++ b/engines/lastexpress/game/savegame.cpp
@@ -24,11 +24,14 @@
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
-#include "lastexpress/game/menu.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/menu/menu.h"
+
+#include "lastexpress/sound/queue.h"
+
#include "lastexpress/debug.h"
#include "lastexpress/lastexpress.h"
#include "lastexpress/helpers.h"
@@ -42,12 +45,12 @@ namespace LastExpress {
static const struct {
const char *saveFile;
} gameInfo[6] = {
- {"blue.egg"},
- {"red.egg"},
- {"green.egg"},
- {"purple.egg"},
- {"teal.egg"},
- {"gold.egg"}
+ {"lastexpress-blue.egg"},
+ {"lastexpress-red.egg"},
+ {"lastexpress-green.egg"},
+ {"lastexpress-purple.egg"},
+ {"lastexpress-teal.egg"},
+ {"lastexpress-gold.egg"}
};
//////////////////////////////////////////////////////////////////////////
@@ -72,10 +75,10 @@ void SaveLoad::initStream() {
void SaveLoad::flushStream(GameId id) {
Common::OutSaveFile *save = openForSaving(id);
if (!save)
- error("SaveLoad::flushStream: cannot open savegame (%s)!", getFilename(id).c_str());
+ error("[SaveLoad::flushStream] Cannot open savegame (%s)", getFilename(id).c_str());
if (!_savegame)
- error("SaveLoad::flushStream: savegame stream is invalid");
+ error("[SaveLoad::flushStream] Savegame stream is invalid");
save->write(_savegame->getData(), (uint32)_savegame->size());
@@ -106,7 +109,7 @@ uint32 SaveLoad::init(GameId id, bool resetHeaders) {
SavegameMainHeader mainHeader;
mainHeader.saveLoadWithSerializer(ser);
if (!mainHeader.isValid())
- error("SaveLoad::init - Savegame seems to be corrupted (invalid header)");
+ error("[SaveLoad::init] Savegame seems to be corrupted (invalid header)");
// Reset cached entry headers if needed
if (resetHeaders) {
@@ -124,7 +127,7 @@ uint32 SaveLoad::init(GameId id, bool resetHeaders) {
while (_savegame->pos() < _savegame->size() && !_savegame->eos() && !_savegame->err()) {
// Update sound queue while we go through the savegame
- getSound()->updateQueue();
+ getSoundQueue()->updateQueue();
SavegameEntryHeader *entry = new SavegameEntryHeader();
entry->saveLoadWithSerializer(ser);
@@ -145,10 +148,10 @@ uint32 SaveLoad::init(GameId id, bool resetHeaders) {
void SaveLoad::loadStream(GameId id) {
Common::InSaveFile *save = openForLoading(id);
if (save->size() < 32)
- error("SaveLoad::init - Savegame seems to be corrupted (not enough data: %i bytes)", save->size());
+ error("[SaveLoad::loadStream] Savegame seems to be corrupted (not enough data: %i bytes)", save->size());
if (!_savegame)
- error("SaveLoad::loadStream: savegame stream is invalid");
+ error("[SaveLoad::loadStream] Savegame stream is invalid");
// Load all savegame data
uint8* buf = new uint8[8192];
@@ -189,7 +192,7 @@ void SaveLoad::clear(bool clearStream) {
// Load game
void SaveLoad::loadGame(GameId id) {
if (!_savegame)
- error("SaveLoad::loadGame: No savegame stream present!");
+ error("[SaveLoad::loadGame] No savegame stream present");
// Rewind current savegame
_savegame->seek(0);
@@ -197,12 +200,12 @@ void SaveLoad::loadGame(GameId id) {
// Validate main header
SavegameMainHeader header;
if (!loadMainHeader(_savegame, &header)) {
- debugC(2, kLastExpressDebugSavegame, "SaveLoad::saveGame - Cannot load main header: %s", getFilename(getMenu()->getGameId()).c_str());
+ debugC(2, kLastExpressDebugSavegame, "Cannot load main header: %s", getFilename(getMenu()->getGameId()).c_str());
return;
}
if (!_savegame)
- error("SaveLoad::loadGame: No savegame stream present!");
+ error("[SaveLoad::loadGame] No savegame stream present");
// Load the last entry
_savegame->seek(header.offsetEntry);
@@ -216,7 +219,7 @@ void SaveLoad::loadGame(GameId id) {
_gameTicksLastSavegame = getState()->timeTicks;
if (header.keepIndex) {
- getSound()->clearQueue();
+ getSoundQueue()->clearQueue();
readEntry(&type, &entity, &val, false);
}
@@ -227,7 +230,7 @@ void SaveLoad::loadGame(GameId id) {
// Load a specific game entry
void SaveLoad::loadGame(GameId id, uint32 index) {
- error("SaveLoad::loadGame: not implemented! (only loading the last entry is working for now)");
+ error("[SaveLoad::loadGame] Not implemented! (only loading the last entry is working for now)");
}
// Save game
@@ -238,12 +241,12 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) {
// Validate main header
SavegameMainHeader header;
if (!loadMainHeader(_savegame, &header)) {
- debugC(2, kLastExpressDebugSavegame, "SaveLoad::saveGame - Cannot load main header: %s", getFilename(getMenu()->getGameId()).c_str());
+ debugC(2, kLastExpressDebugSavegame, "Cannot load main header: %s", getFilename(getMenu()->getGameId()).c_str());
return;
}
if (!_savegame)
- error("SaveLoad::saveGame: savegame stream is invalid");
+ error("[SaveLoad::saveGame] Savegame stream is invalid");
// Validate the current entry if it exists
if (header.count > 0) {
@@ -255,7 +258,7 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) {
entry.saveLoadWithSerializer(ser);
if (!entry.isValid()) {
- warning("SaveLoad::saveGame: Invalid entry. This savegame might be corrupted!");
+ warning("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted");
_savegame->seek(header.offset);
} else if (getState()->time < entry.time || (type == kSavegameTypeTickInterval && getState()->time == entry.time)) {
// Not ready to save a game, skipping!
@@ -293,7 +296,7 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) {
// Validate the main header
if (!header.isValid())
- error("SaveLoad::saveGame: main game header is invalid!");
+ error("[SaveLoad::saveGame] Main game header is invalid");
// Write the main header
_savegame->seek(0);
@@ -304,7 +307,7 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) {
}
void SaveLoad::saveVolumeBrightness() {
- warning("SaveLoad::saveVolumeBrightness: not implemented!");
+ warning("[SaveLoad::saveVolumeBrightness] Not implemented");
}
//////////////////////////////////////////////////////////////////////////
@@ -316,7 +319,7 @@ bool SaveLoad::loadMainHeader(Common::InSaveFile *stream, SavegameMainHeader *he
// Check there is enough data (32 bytes)
if (stream->size() < 32) {
- debugC(2, kLastExpressDebugSavegame, "SaveLoad::loadMainHeader - Savegame seems to be corrupted (not enough data: %i bytes)!", stream->size());
+ debugC(2, kLastExpressDebugSavegame, "Savegame seems to be corrupted (not enough data: %i bytes)", stream->size());
return false;
}
@@ -328,7 +331,7 @@ bool SaveLoad::loadMainHeader(Common::InSaveFile *stream, SavegameMainHeader *he
// Validate the header
if (!header->isValid()) {
- debugC(2, kLastExpressDebugSavegame, "SaveLoad::loadMainHeader - Cannot validate main header!");
+ debugC(2, kLastExpressDebugSavegame, "Cannot validate main header");
return false;
}
@@ -345,11 +348,11 @@ void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) {
uint32 _count = (uint32)_savegame->pos() - _prevPosition; \
debugC(kLastExpressDebugSavegame, "Savegame: Writing " #name ": %d bytes", _count); \
if (_count != val)\
- error("SaveLoad::writeEntry: Number of bytes written (%d) differ from expected count (%d)", _count, val); \
+ error("[SaveLoad::writeEntry] Number of bytes written (%d) differ from expected count (%d)", _count, val); \
}
if (!_savegame)
- error("SaveLoad::writeEntry: savegame stream is invalid");
+ error("[SaveLoad::writeEntry] Savegame stream is invalid");
SavegameEntryHeader header;
@@ -376,7 +379,7 @@ void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) {
WRITE_ENTRY("inventory", getInventory()->saveLoadWithSerializer(ser), 7 * 32);
WRITE_ENTRY("objects", getObjects()->saveLoadWithSerializer(ser), 5 * 128);
WRITE_ENTRY("entities", getEntities()->saveLoadWithSerializer(ser), 1262 * 40);
- WRITE_ENTRY("sound", getSound()->saveLoadWithSerializer(ser), 3 * 4 + getSound()->count() * 64);
+ WRITE_ENTRY("sound", getSoundQueue()->saveLoadWithSerializer(ser), 3 * 4 + getSoundQueue()->count() * 64);
WRITE_ENTRY("savepoints", getSavePoints()->saveLoadWithSerializer(ser), 128 * 16 + 4 + getSavePoints()->count() * 16);
header.offset = (uint32)_savegame->pos() - (originalPosition + 32);
@@ -392,7 +395,7 @@ void SaveLoad::writeEntry(SavegameType type, EntityIndex entity, uint32 value) {
// Validate entry header
if (!header.isValid())
- error("SaveLoad::writeEntry: entry header is invalid");
+ error("[SaveLoad::writeEntry] Entry header is invalid");
// Save the header with the updated info
_savegame->seek(originalPosition);
@@ -409,7 +412,7 @@ void SaveLoad::readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, b
uint32 _count = (uint32)_savegame->pos() - _prevPosition; \
debugC(kLastExpressDebugSavegame, "Savegame: Reading " #name ": %d bytes", _count); \
if (_count != val) \
- error("SaveLoad::readEntry: Number of bytes read (%d) differ from expected count (%d)", _count, val); \
+ error("[SaveLoad::readEntry] Number of bytes read (%d) differ from expected count (%d)", _count, val); \
}
#define LOAD_ENTRY_ONLY(name, func) { \
@@ -420,10 +423,10 @@ void SaveLoad::readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, b
}
if (!type || !entity || !val)
- error("SaveLoad::readEntry: Invalid parameters passed!");
+ error("[SaveLoad::readEntry] Invalid parameters passed");
if (!_savegame)
- error("SaveLoad::readEntry: No savegame stream present!");
+ error("[SaveLoad::readEntry] No savegame stream present");
// Load entry header
SavegameEntryHeader entry;
@@ -431,7 +434,7 @@ void SaveLoad::readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, b
entry.saveLoadWithSerializer(ser);
if (!entry.isValid())
- error("SaveLoad::readEntry: entry header is invalid!");
+ error("[SaveLoad::readEntry] Entry header is invalid");
// Init type, entity & value
*type = entry.type;
@@ -451,7 +454,7 @@ void SaveLoad::readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, b
LOAD_ENTRY("inventory", getInventory()->saveLoadWithSerializer(ser), 7 * 32);
LOAD_ENTRY("objects", getObjects()->saveLoadWithSerializer(ser), 5 * 128);
LOAD_ENTRY("entities", getEntities()->saveLoadWithSerializer(ser), 1262 * 40);
- LOAD_ENTRY_ONLY("sound", getSound()->saveLoadWithSerializer(ser));
+ LOAD_ENTRY_ONLY("sound", getSoundQueue()->saveLoadWithSerializer(ser));
LOAD_ENTRY_ONLY("savepoints", getSavePoints()->saveLoadWithSerializer(ser));
// Update chapter
@@ -466,7 +469,7 @@ void SaveLoad::readEntry(SavegameType *type, EntityIndex *entity, uint32 *val, b
SaveLoad::SavegameEntryHeader *SaveLoad::getEntry(uint32 index) {
if (index >= _gameHeaders.size())
- error("SaveLoad::getEntry: invalid index (was:%d, max:%d)", index, _gameHeaders.size() - 1);
+ error("[SaveLoad::getEntry] Invalid index (was:%d, max:%d)", index, _gameHeaders.size() - 1);
return _gameHeaders[index];
}
@@ -486,7 +489,7 @@ bool SaveLoad::isSavegamePresent(GameId id) {
// Check if the game has been started in the specific savegame
bool SaveLoad::isSavegameValid(GameId id) {
if (!isSavegamePresent(id)) {
- debugC(2, kLastExpressDebugSavegame, "SaveLoad::isSavegameValid - Savegame does not exist: %s", getFilename(id).c_str());
+ debugC(2, kLastExpressDebugSavegame, "Savegame does not exist: %s", getFilename(id).c_str());
return false;
}
@@ -549,7 +552,7 @@ bool SaveLoad::isGameFinished(uint32 menuIndex, uint32 savegameIndex) {
// Get the file name from the savegame ID
Common::String SaveLoad::getFilename(GameId id) {
if (id >= 6)
- error("SaveLoad::getName - attempting to use an invalid game id. Valid values: 0 - 5, was %d", id);
+ error("[SaveLoad::getFilename] Attempting to use an invalid game id. Valid values: 0 - 5, was %d", id);
return gameInfo[id].saveFile;
}
@@ -558,7 +561,7 @@ Common::InSaveFile *SaveLoad::openForLoading(GameId id) {
Common::InSaveFile *load = g_system->getSavefileManager()->openForLoading(getFilename(id));
if (!load)
- debugC(2, kLastExpressDebugSavegame, "SaveLoad::openForLoading - Cannot open savegame for loading: %s", getFilename(id).c_str());
+ debugC(2, kLastExpressDebugSavegame, "Cannot open savegame for loading: %s", getFilename(id).c_str());
return load;
}
@@ -567,7 +570,7 @@ Common::OutSaveFile *SaveLoad::openForSaving(GameId id) {
Common::OutSaveFile *save = g_system->getSavefileManager()->openForSaving(getFilename(id));
if (!save)
- debugC(2, kLastExpressDebugSavegame, "SaveLoad::openForSaving - Cannot open savegame for writing: %s", getFilename(id).c_str());
+ debugC(2, kLastExpressDebugSavegame, "Cannot open savegame for writing: %s", getFilename(id).c_str());
return save;
}
diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp
index 7ec7c241e9..64ae26c2be 100644
--- a/engines/lastexpress/game/savepoint.cpp
+++ b/engines/lastexpress/game/savepoint.cpp
@@ -128,17 +128,17 @@ void SavePoints::addData(EntityIndex entity, ActionIndex action, uint32 param) {
//////////////////////////////////////////////////////////////////////////
void SavePoints::setCallback(EntityIndex index, Entity::Callback *callback) {
if (index >= 40)
- error("SavePoints::setCallback - attempting to use an invalid entity index. Valid values 0-39, was %d", index);
+ error("[SavePoints::setCallback] Attempting to use an invalid entity index. Valid values 0-39, was %d", index);
if (!callback || !callback->isValid())
- error("SavePoints::setCallback - attempting to set an invalid callback for entity %s", ENTITY_NAME(index));
+ error("[SavePoints::setCallback] Attempting to set an invalid callback for entity %s", ENTITY_NAME(index));
_callbacks[index] = callback;
}
Entity::Callback *SavePoints::getCallback(EntityIndex index) const {
if (index >= 40)
- error("SavePoints::getCallback - attempting to use an invalid entity index. Valid values 0-39, was %d", index);
+ error("[SavePoints::getCallback] Attempting to use an invalid entity index. Valid values 0-39, was %d", index);
return _callbacks[index];
}
diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index e830b1d128..b886951e0b 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -31,9 +31,11 @@
#include "lastexpress/game/logic.h"
#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/graphics.h"
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -79,12 +81,12 @@ void SceneManager::loadSceneDataFile(ArchiveIndex archive) {
case kArchiveCd2:
case kArchiveCd3:
if (!_sceneLoader->load(getArchive(Common::String::format("CD%iTRAIN.DAT", archive))))
- error("SceneManager::loadSceneDataFile: cannot load data file CD%iTRAIN.DAT", archive);
+ error("[SceneManager::loadSceneDataFile] Cannot load data file CD%iTRAIN.DAT", archive);
break;
default:
case kArchiveAll:
- error("SceneManager::loadSceneDataFile: Invalid archive index (must be [1-3], was %d", archive);
+ error("[SceneManager::loadSceneDataFile] Invalid archive index (must be [1-3], was %d", archive);
break;
}
}
@@ -462,7 +464,7 @@ bool SceneManager::checkPosition(SceneIndex index, CheckPositionType type) const
switch (type) {
default:
- error("SceneManager::checkPosition: Invalid position type: %d", type);
+ error("[SceneManager::checkPosition] Invalid position type: %d", type);
case kCheckPositionLookingUp:
return isInSleepingCar && (position >= 1 && position <= 19);
@@ -1057,9 +1059,9 @@ void SceneManager::preProcessScene(SceneIndex *index) {
// Sound processing
Scene *newScene = getScenes()->get(*index);
- if (getSound()->isBuffered(kEntityTables4)) {
+ if (getSoundQueue()->isBuffered(kEntityTables4)) {
if (newScene->type != Scene::kTypeReadText || newScene->param1)
- getSound()->processEntry(kEntityTables4);
+ getSoundQueue()->processEntry(kEntityTables4);
}
// Cleanup beetle sequences
@@ -1089,8 +1091,8 @@ void SceneManager::postProcessScene() {
if (getFlags()->mouseRightClick)
break;
- getSound()->updateQueue();
- getSound()->updateSubtitles();
+ getSoundQueue()->updateQueue();
+ getSoundQueue()->updateSubtitles();
}
}
@@ -1132,7 +1134,7 @@ void SceneManager::postProcessScene() {
}
if (progress)
- getSound()->excuseMe((progress == 1) ? entities[0] : entities[rnd(progress)], kEntityPlayer, SoundManager::kFlagDefault);
+ getSound()->excuseMe((progress == 1) ? entities[0] : entities[rnd(progress)], kEntityPlayer, kFlagDefault);
}
if (hotspot->scene)
@@ -1157,8 +1159,8 @@ void SceneManager::postProcessScene() {
if (getState()->time >= kTimeCityGalanta || getProgress().field_18 == 4)
break;
- getSound()->processEntry(SoundManager::kSoundType7);
- getSound()->playSound(kEntityTrain, "LIB050", SoundManager::kFlagDefault);
+ getSoundQueue()->processEntry(kSoundType7);
+ getSound()->playSound(kEntityTrain, "LIB050", kFlagDefault);
switch (getProgress().chapter) {
default:
diff --git a/engines/lastexpress/game/sound.h b/engines/lastexpress/game/sound.h
deleted file mode 100644
index ddafc21829..0000000000
--- a/engines/lastexpress/game/sound.h
+++ /dev/null
@@ -1,389 +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.
- *
- */
-
-#ifndef LASTEXPRESS_SOUND_H
-#define LASTEXPRESS_SOUND_H
-
-/*
-
- Sound entry: 68 bytes (this is what appears in the savegames)
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - entity
- uint32 {4} - ??
- uint32 {4} - ??
- char {16} - name 1
- char {16} - name 2
-
- Sound queue entry: 120 bytes
- uint16 {2} - status
- byte {1} - ??
- byte {1} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - file data pointer
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - archive structure pointer
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - ??
- uint32 {4} - entity
- uint32 {4} - ??
- uint32 {4} - ??
- char {16} - name 1
- char {16} - name 2
- uint32 {4} - pointer to next entry in the queue
- uint32 {4} - subtitle data pointer
-
-*/
-
-#include "lastexpress/data/snd.h"
-#include "lastexpress/data/subtitle.h"
-
-#include "lastexpress/shared.h"
-
-#include "lastexpress/helpers.h"
-
-#include "common/list.h"
-#include "common/mutex.h"
-#include "common/system.h"
-#include "common/serializer.h"
-
-namespace LastExpress {
-
-class LastExpressEngine;
-class SubtitleManager;
-
-class SoundManager : Common::Serializable {
-public:
- enum SoundType {
- kSoundTypeNone = 0,
- kSoundType1,
- kSoundType2,
- kSoundType3,
- kSoundType4,
- kSoundType5,
- kSoundType6,
- kSoundType7,
- kSoundType8,
- kSoundType9,
- kSoundType10,
- kSoundType11,
- kSoundType12,
- kSoundType13,
- kSoundType14,
- kSoundType15,
- kSoundType16
- };
-
- enum FlagType {
- kFlagInvalid = -1,
- kFlagNone = 0x0,
- kFlag2 = 0x2,
- kFlag3 = 0x3,
- kFlag4 = 0x4,
- kFlag5 = 0x5,
- kFlag6 = 0x6,
- kFlag7 = 0x7,
- kFlag8 = 0x8,
- kFlag9 = 0x9,
- kFlag10 = 0xA,
- kFlag11 = 0xB,
- kFlag12 = 0xC,
- kFlag13 = 0xD,
- kFlag14 = 0xE,
- kFlag15 = 0xF,
- kFlagDefault = 0x10,
-
- kFlagType1_2 = 0x1000000,
- kFlagSteam = 0x1001007,
- kFlagType13 = 0x3000000,
- kFlagMenuClock = 0x3080010,
- kFlagType7 = 0x4000000,
- kFlagType11 = 0x5000000,
- kFlagMusic = 0x5000010,
- kFlagType3 = 0x6000000,
- kFlagLoop = 0x6001008,
- kFlagType9 = 0x7000000
- };
-
- SoundManager(LastExpressEngine *engine);
- ~SoundManager();
-
- // Timer
- void handleTimer();
-
- // State
- void resetState() { _state |= kSoundType1; }
-
- // Sound queue
- void updateQueue();
- void resetQueue(SoundType type1, SoundType type2 = kSoundTypeNone);
- void clearQueue();
-
- // Subtitles
- void updateSubtitles();
-
- // Entry
- bool isBuffered(Common::String filename, bool testForEntity = false);
- bool isBuffered(EntityIndex entity);
- void setupEntry(SoundType type, EntityIndex index);
- void processEntry(EntityIndex entity);
- void processEntry(SoundType type);
- void processEntry(Common::String filename);
- void processEntries();
- void removeFromQueue(Common::String filename);
- void removeFromQueue(EntityIndex entity);
- uint32 getEntryTime(EntityIndex index);
-
- // Misc
- void unknownFunction4();
- void clearStatus();
-
- // Sound playing
- void playSound(EntityIndex entity, Common::String filename, FlagType flag = kFlagInvalid, byte a4 = 0);
- bool playSoundWithSubtitles(Common::String filename, FlagType flag, EntityIndex entity, byte a4 = 0);
- void playSoundEvent(EntityIndex entity, byte action, byte a3 = 0);
- void playDialog(EntityIndex entity, EntityIndex entityDialog, FlagType flag, byte a4);
- void playSteam(CityIndex index);
- void playFightSound(byte action, byte a4);
- void playLocomotiveSound();
- void playWarningCompartment(EntityIndex entity, ObjectIndex compartment);
-
- // Dialog & Letters
- void readText(int id);
- const char *getDialogName(EntityIndex entity) const;
-
- // Sound bites
- void excuseMe(EntityIndex entity, EntityIndex entity2 = kEntityPlayer, FlagType flag = kFlagNone);
- void excuseMeCath();
- const char *justCheckingCath() const;
- const char *wrongDoorCath() const;
- const char *justAMinuteCath() const;
-
- // FLags
- SoundManager::FlagType getSoundFlag(EntityIndex index) const;
-
- // Debug
- void stopAllSound();
-
- // Serializable
- void saveLoadWithSerializer(Common::Serializer &ser);
- uint32 count();
-
-private:
- typedef int32 *SoundBuffer;
-
- enum SoundStatus {
- kSoundStatus_20 = 0x20,
- kSoundStatus_40 = 0x40,
- kSoundStatus_180 = 0x180,
- kSoundStatusRemoved = 0x200,
- kSoundStatus_400 = 0x400,
-
- kSoundStatus_8000 = 0x8000,
- kSoundStatus_20000 = 0x20000,
- kSoundStatus_100000 = 0x100000,
- kSoundStatus_40000000 = 0x40000000,
-
- kSoundStatusClear0 = 0x10,
- kSoundStatusClear1 = 0x1F,
- kSoundStatusClear2 = 0x80,
- kSoundStatusClear3 = 0x200,
- kSoundStatusClear4 = 0x800,
- kSoundStatusClearAll = 0xFFFFFFE0
- };
-
- enum SoundState {
- kSoundState0 = 0,
- kSoundState1 = 1,
- kSoundState2 = 2
- };
-
- union SoundStatusUnion {
- uint32 status;
- byte status1;
- byte status2;
- byte status3;
- byte status4;
-
- SoundStatusUnion() {
- status = 0;
- }
- };
-
- struct SubtitleEntry;
-
- struct SoundEntry {
- SoundStatusUnion status;
- SoundType type; // int
- //int field_8;
- //int field_C;
- int processedFrameCount;
- void *soundData;
- //int field_18;
- int field_1C;
- uint32 time;
- //int field_24;
- //int field_28;
- Common::SeekableReadStream *stream; // int
- //int field_30;
- int field_34;
- int field_38;
- int field_3C;
- int field_40;
- EntityIndex entity;
- int field_48;
- uint32 field_4C;
- Common::String name1; //char[16];
- Common::String name2; //char[16];
- //int next; // offset to the next structure in the list (not used)
- SubtitleEntry *subtitle;
-
- // Sound stream
- StreamedSound *soundStream;
-
- SoundEntry() {
- status.status = 0;
- type = kSoundTypeNone;
-
- processedFrameCount = 0;
- soundData = NULL;
-
- field_1C = 0;
- time = 0;
-
- stream = NULL;
-
- field_34 = 0;
- field_38 = 0;
- field_3C = 0;
- field_40 = 0;
- entity = kEntityPlayer;
- field_48 = 0;
- field_4C = 0;
-
- subtitle = NULL;
-
- soundStream = NULL;
- }
-
- ~SoundEntry() {
- // Entries that have been queued would have their streamed disposed automatically
- if (!soundStream)
- SAFE_DELETE(stream);
-
- delete soundStream;
- }
- };
-
- struct SubtitleEntry {
- Common::String filename;
- SoundStatusUnion status;
- SoundEntry *sound;
- SubtitleManager *data;
-
- SubtitleEntry() {
- status.status = 0;
- sound = NULL;
- data = NULL;
- }
-
- ~SubtitleEntry() {
- SAFE_DELETE(data);
- }
- };
-
- // Engine
- LastExpressEngine *_engine;
-
- // State flag
- int _state;
- SoundType _currentType;
-
- Common::Mutex _mutex;
-
- // Unknown data
- uint32 _data0;
- uint32 _data1;
- uint32 _data2;
- uint32 _flag;
-
- // Filters
- int32 _buffer[2940]; ///< Static sound buffer
-
- // Compartment warnings by Mertens or Coudert
- uint32 _lastWarning[12];
-
- // Looping sound
- void playLoopingSound();
-
- // Sound entries
- Common::List<SoundEntry *> _soundList; ///< List of all sound entries
- Common::List<SoundEntry *> _soundCache; ///< List of entries with a data buffer
- void *_soundCacheData;
-
- SoundEntry *getEntry(EntityIndex index);
- SoundEntry *getEntry(Common::String name);
- SoundEntry *getEntry(SoundType type);
-
- void setupEntry(SoundEntry *entry, Common::String name, FlagType flag, int a4);
- void setEntryType(SoundEntry *entry, FlagType flag);
- void setEntryStatus(SoundEntry *entry, FlagType flag) const;
- void setInCache(SoundEntry *entry);
- bool setupCache(SoundEntry *entry);
- void removeFromCache(SoundEntry *entry);
- void loadSoundData(SoundEntry *entry, Common::String name);
-
- void updateEntry(SoundEntry *entry, uint value) const;
- void updateEntryState(SoundEntry *entry) const;
- void resetEntry(SoundEntry *entry) const;
- void removeEntry(SoundEntry *entry);
-
- // Subtitles
- int _drawSubtitles;
- Common::List<SubtitleEntry *> _subtitles;
- SubtitleEntry *_currentSubtitle;
- void showSubtitle(SoundEntry *entry, Common::String filename);
- SubtitleEntry *loadSubtitle(Common::String filename, SoundEntry *soundEntry);
- void loadSubtitleData(SubtitleEntry * entry);
- void setupSubtitleAndDraw(SubtitleEntry *subtitle);
- void drawSubtitle(SubtitleEntry *subtitle);
- void drawSubtitleOnScreen(SubtitleEntry *subtitle);
-
- // Sound filter
- void applyFilter(SoundEntry *entry, SoundBuffer buffer);
-};
-
-} // End of namespace LastExpress
-
-#endif // LASTEXPRESS_SOUND_H
diff --git a/engines/lastexpress/game/state.cpp b/engines/lastexpress/game/state.cpp
index 0cf2ddba40..f3fd9720b1 100644
--- a/engines/lastexpress/game/state.cpp
+++ b/engines/lastexpress/game/state.cpp
@@ -57,7 +57,7 @@ bool State::isNightTime() const {
void State::getHourMinutes(uint32 time, uint8 *hours, uint8 *minutes) {
if (hours == NULL || minutes == NULL)
- error("State::getHourMinutes: invalid parameters passed!");
+ error("[State::getHourMinutes] Invalid parameters passed");
*hours = (uint8)((time % 1296000) / 54000);
*minutes = (uint8)((time % 54000) / 900);
diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h
index 8f71e7d424..c937fdce9f 100644
--- a/engines/lastexpress/game/state.h
+++ b/engines/lastexpress/game/state.h
@@ -325,7 +325,7 @@ public:
switch (index) {
default:
- error("GameProgress::isEqual: invalid index value (was: %d, max:127)", index);
+ error("[GameProgress::getValueName] Invalid index value (was: %d, max:127)", index);
break;
EXPOSE_VALUE(0, field_0);
diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp
index abbdf2b766..e129457256 100644
--- a/engines/lastexpress/graphics.cpp
+++ b/engines/lastexpress/graphics.cpp
@@ -72,7 +72,7 @@ void GraphicsManager::clear(BackgroundType type) {
void GraphicsManager::clear(BackgroundType type, const Common::Rect &rect) {
switch (type) {
default:
- error("GraphicsManager::clear() - Unknown background type: %d", type);
+ error("[GraphicsManager::clear] Unknown background type: %d", type);
break;
case kBackgroundA:
@@ -105,7 +105,7 @@ bool GraphicsManager::draw(Drawable *drawable, BackgroundType type, bool transit
Graphics::Surface *GraphicsManager::getSurface(BackgroundType type) {
switch (type) {
default:
- error("GraphicsManager::getSurface() - Unknown surface type: %d", type);
+ error("[GraphicsManager::getSurface] Unknown surface type: %d", type);
break;
case kBackgroundA:
@@ -121,7 +121,7 @@ Graphics::Surface *GraphicsManager::getSurface(BackgroundType type) {
return &_inventory;
case kBackgroundAll:
- error("GraphicsManager::getSurface() - cannot return a surface for kBackgroundAll!");
+ error("[GraphicsManager::getSurface] Cannot return a surface for kBackgroundAll");
break;
}
}
diff --git a/engines/lastexpress/helpers.h b/engines/lastexpress/helpers.h
index 594c8b0400..7f3f1e246c 100644
--- a/engines/lastexpress/helpers.h
+++ b/engines/lastexpress/helpers.h
@@ -63,6 +63,7 @@
// Sound
#define getSound() _engine->getSoundManager()
+#define getSoundQueue() _engine->getSoundManager()->getQueue()
// Others
#define getEntityData(entity) getEntities()->getData(entity)
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index e162998719..885ca8b212 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -26,10 +26,13 @@
#include "lastexpress/data/font.h"
#include "lastexpress/game/logic.h"
-#include "lastexpress/game/menu.h"
#include "lastexpress/game/scenes.h"
#include "lastexpress/game/state.h"
-#include "lastexpress/game/sound.h"
+
+#include "lastexpress/menu/menu.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
#include "lastexpress/graphics.h"
#include "lastexpress/helpers.h"
@@ -150,8 +153,8 @@ Common::Error LastExpressEngine::run() {
_menu->show(false, kSavegameTypeIndex, 0);
while (!shouldQuit()) {
- _soundMan->updateQueue();
- _soundMan->updateSubtitles();
+ _soundMan->getQueue()->updateQueue();
+ _soundMan->getQueue()->updateSubtitles();
if (handleEvents())
continue;
@@ -182,7 +185,7 @@ void LastExpressEngine::pollEvents() {
bool LastExpressEngine::handleEvents() {
// Make sure all the subsystems have been initialized
if (!_debugger || !_graphicsMan)
- error("LastExpressEngine::handleEvents: called before the required subsystems have been initialized!");
+ error("[LastExpressEngine::handleEvents] Called before the required subsystems have been initialized");
// Execute stored commands
if (_debugger->hasCommand()) {
@@ -279,7 +282,7 @@ void LastExpressEngine::soundTimer(void *refCon) {
void LastExpressEngine::handleSoundTimer() {
if (_frameCounter & 1)
if (_soundMan)
- _soundMan->handleTimer();
+ _soundMan->getQueue()->handleTimer();
_frameCounter++;
}
@@ -288,22 +291,34 @@ void LastExpressEngine::handleSoundTimer() {
/// Event Handling
///////////////////////////////////////////////////////////////////////////////////
void LastExpressEngine::backupEventHandlers() {
+ if (_eventMouseBackup != NULL || _eventTickBackup != NULL)
+ error("[LastExpressEngine::backupEventHandlers] backup event handlers are already set");
+
_eventMouseBackup = _eventMouse;
_eventTickBackup = _eventTick;
}
void LastExpressEngine::restoreEventHandlers() {
if (_eventMouseBackup == NULL || _eventTickBackup == NULL)
- error("LastExpressEngine::restoreEventHandlers: restore called before backing up the event handlers!");
+ error("[LastExpressEngine::restoreEventHandlers] restore called before backing up the event handlers");
+
+ // Cleanup previous event handlers
+ SAFE_DELETE(_eventMouse);
+ SAFE_DELETE(_eventTick);
_eventMouse = _eventMouseBackup;
_eventTick = _eventTickBackup;
+
+ _eventMouseBackup = NULL;
+ _eventTickBackup = NULL;
}
void LastExpressEngine::setEventHandlers(EventHandler::EventFunction *mouse, EventHandler::EventFunction *tick) {
- // Cleanup previous event handlers
- delete _eventMouse;
- delete _eventTick;
+ if (_eventMouse != _eventMouseBackup)
+ SAFE_DELETE(_eventMouse);
+
+ if (_eventTick != _eventTickBackup)
+ SAFE_DELETE(_eventTick);
_eventMouse = mouse;
_eventTick = tick;
diff --git a/engines/lastexpress/menu/clock.cpp b/engines/lastexpress/menu/clock.cpp
new file mode 100644
index 0000000000..dedf045940
--- /dev/null
+++ b/engines/lastexpress/menu/clock.cpp
@@ -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.
+ *
+ */
+
+#include "lastexpress/menu/clock.h"
+
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/game/scenes.h"
+#include "lastexpress/game/state.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+Clock::Clock(LastExpressEngine *engine) : _engine(engine), _frameMinutes(NULL), _frameHour(NULL), _frameSun(NULL), _frameDate(NULL) {
+ _frameMinutes = new SequenceFrame(loadSequence("eggmin.seq"), 0, true);
+ _frameHour = new SequenceFrame(loadSequence("egghour.seq"), 0, true);
+ _frameSun = new SequenceFrame(loadSequence("sun.seq"), 0, true);
+ _frameDate = new SequenceFrame(loadSequence("datenew.seq"), 0, true);
+}
+
+Clock::~Clock() {
+ SAFE_DELETE(_frameMinutes);
+ SAFE_DELETE(_frameHour);
+ SAFE_DELETE(_frameSun);
+ SAFE_DELETE(_frameDate);
+
+ // Zero passed pointers
+ _engine = NULL;
+}
+
+void Clock::clear() {
+ getScenes()->removeFromQueue(_frameMinutes);
+ getScenes()->removeFromQueue(_frameHour);
+ getScenes()->removeFromQueue(_frameSun);
+ getScenes()->removeFromQueue(_frameDate);
+}
+
+void Clock::draw(uint32 time) {
+ assert(time >= kTimeCityParis && time <= kTimeCityConstantinople);
+
+ // Check that sequences have been loaded
+ if (!_frameMinutes || !_frameHour || !_frameSun || !_frameDate)
+ error("[Clock::draw] Clock sequences have not been loaded correctly");
+
+ // Clear existing frames
+ clear();
+
+ // Game starts at: 1037700 = 7:13 p.m. on July 24, 1914
+ // Game ends at: 4941000 = 7:30 p.m. on July 26, 1914
+ // Game lasts for: 3903300 = 2 days + 17 mins = 2897 mins
+
+ // 15 = 1 second
+ // 15 * 60 = 900 = 1 minute
+ // 900 * 60 = 54000 = 1 hour
+ // 54000 * 24 = 1296000 = 1 day
+
+ // Calculate each sequence index from the current time
+
+ uint8 hour = 0;
+ uint8 minute = 0;
+ State::getHourMinutes(time, &hour, &minute);
+ uint32 index_date = 18 * time / 1296000;
+ if (hour == 23)
+ index_date += 18 * minute / 60;
+
+ // Set sequences frames
+ _frameMinutes->setFrame(minute);
+ _frameHour->setFrame((5 * hour + minute / 12) % 60);
+ _frameSun->setFrame((5 * hour + minute / 12) % 120);
+ _frameDate->setFrame((uint16)index_date);
+
+ // Adjust z-order and queue
+ _frameMinutes->getInfo()->location = 1;
+ _frameHour->getInfo()->location = 1;
+ _frameSun->getInfo()->location = 1;
+ _frameDate->getInfo()->location = 1;
+
+ getScenes()->addToQueue(_frameMinutes);
+ getScenes()->addToQueue(_frameHour);
+ getScenes()->addToQueue(_frameSun);
+ getScenes()->addToQueue(_frameDate);
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/menu/clock.h b/engines/lastexpress/menu/clock.h
new file mode 100644
index 0000000000..339a18604f
--- /dev/null
+++ b/engines/lastexpress/menu/clock.h
@@ -0,0 +1,53 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_CLOCK_H
+#define LASTEXPRESS_CLOCK_H
+
+#include "common/scummsys.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+class SequenceFrame;
+
+class Clock {
+public:
+ explicit Clock(LastExpressEngine *engine);
+ ~Clock();
+
+ void draw(uint32 time);
+ void clear();
+
+private:
+ LastExpressEngine *_engine;
+
+ // Frames
+ SequenceFrame *_frameMinutes;
+ SequenceFrame *_frameHour;
+ SequenceFrame *_frameSun;
+ SequenceFrame *_frameDate;
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_CLOCK_H
diff --git a/engines/lastexpress/game/menu.cpp b/engines/lastexpress/menu/menu.cpp
index f9eef26326..f1a8bebe94 100644
--- a/engines/lastexpress/game/menu.cpp
+++ b/engines/lastexpress/menu/menu.cpp
@@ -20,7 +20,7 @@
*
*/
-#include "lastexpress/game/menu.h"
+#include "lastexpress/menu/menu.h"
// Data
#include "lastexpress/data/animation.h"
@@ -28,15 +28,21 @@
#include "lastexpress/data/snd.h"
#include "lastexpress/data/scene.h"
-#include "lastexpress/game/fight.h"
+#include "lastexpress/fight/fight.h"
+
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
#include "lastexpress/game/savegame.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/scenes.h"
-#include "lastexpress/game/sound.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/menu/clock.h"
+#include "lastexpress/menu/trainline.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
#include "lastexpress/graphics.h"
#include "lastexpress/helpers.h"
#include "lastexpress/lastexpress.h"
@@ -118,45 +124,6 @@ enum StartMenuTooltips {
//////////////////////////////////////////////////////////////////////////
// DATA
//////////////////////////////////////////////////////////////////////////
-
-// Information about the cities on the train line
-static const struct {
- uint8 frame;
- TimeValue time;
-} _trainCities[31] = {
- {0, kTimeCityParis},
- {9, kTimeCityEpernay},
- {11, kTimeCityChalons},
- {16, kTimeCityBarLeDuc},
- {21, kTimeCityNancy},
- {25, kTimeCityLuneville},
- {35, kTimeCityAvricourt},
- {37, kTimeCityDeutschAvricourt},
- {40, kTimeCityStrasbourg},
- {53, kTimeCityBadenOos},
- {56, kTimeCityKarlsruhe},
- {60, kTimeCityStuttgart},
- {63, kTimeCityGeislingen},
- {66, kTimeCityUlm},
- {68, kTimeCityAugsburg},
- {73, kTimeCityMunich},
- {84, kTimeCitySalzbourg},
- {89, kTimeCityAttnangPuchheim},
- {97, kTimeCityWels},
- {100, kTimeCityLinz},
- {104, kTimeCityAmstetten},
- {111, kTimeCityVienna},
- {120, kTimeCityPoszony},
- {124, kTimeCityGalanta},
- {132, kTimeCityBudapest},
- {148, kTimeCityBelgrade},
- /* Line 1 ends at 150 - line 2 begins at 0 */
- {157, kTimeCityNish},
- {165, kTimeCityTzaribrod},
- {174, kTimeCitySofia},
- {198, kTimeCityAdrianople},
- {210, kTimeCityConstantinople}};
-
static const struct {
TimeValue time;
uint index;
@@ -173,185 +140,6 @@ static const struct {
};
//////////////////////////////////////////////////////////////////////////
-// Clock
-//////////////////////////////////////////////////////////////////////////
-class Clock {
-public:
- explicit Clock(LastExpressEngine *engine);
- ~Clock();
-
- void draw(uint32 time);
- void clear();
-
-private:
- LastExpressEngine *_engine;
-
- // Frames
- SequenceFrame *_frameMinutes;
- SequenceFrame *_frameHour;
- SequenceFrame *_frameSun;
- SequenceFrame *_frameDate;
-};
-
-Clock::Clock(LastExpressEngine *engine) : _engine(engine), _frameMinutes(NULL), _frameHour(NULL), _frameSun(NULL), _frameDate(NULL) {
- _frameMinutes = new SequenceFrame(loadSequence("eggmin.seq"), 0, true);
- _frameHour = new SequenceFrame(loadSequence("egghour.seq"), 0, true);
- _frameSun = new SequenceFrame(loadSequence("sun.seq"), 0, true);
- _frameDate = new SequenceFrame(loadSequence("datenew.seq"), 0, true);
-}
-
-Clock::~Clock() {
- SAFE_DELETE(_frameMinutes);
- SAFE_DELETE(_frameHour);
- SAFE_DELETE(_frameSun);
- SAFE_DELETE(_frameDate);
-
- // Zero passed pointers
- _engine = NULL;
-}
-
-void Clock::clear() {
- getScenes()->removeFromQueue(_frameMinutes);
- getScenes()->removeFromQueue(_frameHour);
- getScenes()->removeFromQueue(_frameSun);
- getScenes()->removeFromQueue(_frameDate);
-}
-
-void Clock::draw(uint32 time) {
- assert(time >= kTimeCityParis && time <= kTimeCityConstantinople);
-
- // Check that sequences have been loaded
- if (!_frameMinutes || !_frameHour || !_frameSun || !_frameDate)
- error("Clock::process: clock sequences have not been loaded correctly!");
-
- // Clear existing frames
- clear();
-
- // Game starts at: 1037700 = 7:13 p.m. on July 24, 1914
- // Game ends at: 4941000 = 7:30 p.m. on July 26, 1914
- // Game lasts for: 3903300 = 2 days + 17 mins = 2897 mins
-
- // 15 = 1 second
- // 15 * 60 = 900 = 1 minute
- // 900 * 60 = 54000 = 1 hour
- // 54000 * 24 = 1296000 = 1 day
-
- // Calculate each sequence index from the current time
-
- uint8 hour = 0;
- uint8 minute = 0;
- State::getHourMinutes(time, &hour, &minute);
- uint32 index_date = 18 * time / 1296000;
- if (hour == 23)
- index_date += 18 * minute / 60;
-
- // Set sequences frames
- _frameMinutes->setFrame(minute);
- _frameHour->setFrame((5 * hour + minute / 12) % 60);
- _frameSun->setFrame((5 * hour + minute / 12) % 120);
- _frameDate->setFrame((uint16)index_date);
-
- // Adjust z-order and queue
- _frameMinutes->getInfo()->location = 1;
- _frameHour->getInfo()->location = 1;
- _frameSun->getInfo()->location = 1;
- _frameDate->getInfo()->location = 1;
-
- getScenes()->addToQueue(_frameMinutes);
- getScenes()->addToQueue(_frameHour);
- getScenes()->addToQueue(_frameSun);
- getScenes()->addToQueue(_frameDate);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// TrainLine
-//////////////////////////////////////////////////////////////////////////
-class TrainLine {
-public:
- explicit TrainLine(LastExpressEngine *engine);
- ~TrainLine();
-
- void draw(uint32 time);
- void clear();
-
-private:
- LastExpressEngine *_engine;
-
- // Frames
- SequenceFrame *_frameLine1;
- SequenceFrame *_frameLine2;
-};
-
-TrainLine::TrainLine(LastExpressEngine *engine) : _engine(engine), _frameLine1(NULL), _frameLine2(NULL) {
- _frameLine1 = new SequenceFrame(loadSequence("line1.seq"), 0, true);
- _frameLine2 = new SequenceFrame(loadSequence("line2.seq"), 0, true);
-}
-
-TrainLine::~TrainLine() {
- SAFE_DELETE(_frameLine1);
- SAFE_DELETE(_frameLine2);
-
- // Zero passed pointers
- _engine = NULL;
-}
-
-void TrainLine::clear() {
- getScenes()->removeFromQueue(_frameLine1);
- getScenes()->removeFromQueue(_frameLine2);
-}
-
-// Draw the train line at the time
-// line1: 150 frames (=> Belgrade)
-// line2: 61 frames (=> Constantinople)
-void TrainLine::draw(uint32 time) {
- assert(time >= kTimeCityParis && time <= kTimeCityConstantinople);
-
- // Check that sequences have been loaded
- if (!_frameLine1 || !_frameLine2)
- error("TrainLine::process: Line sequences have not been loaded correctly!");
-
- // Clear existing frames
- clear();
-
- // Get the index of the last city the train has visited
- uint index = 0;
- for (uint i = 0; i < ARRAYSIZE(_trainCities); i++)
- if ((uint32)_trainCities[i].time <= time)
- index = i;
-
- uint16 frame;
- if (time > (uint32)_trainCities[index].time) {
- // Interpolate linearly to use a frame between the cities
- uint8 diffFrames = _trainCities[index + 1].frame - _trainCities[index].frame;
- uint diffTimeCities = (uint)(_trainCities[index + 1].time - _trainCities[index].time);
- uint traveledTime = (time - (uint)_trainCities[index].time);
- frame = (uint16)(_trainCities[index].frame + (traveledTime * diffFrames) / diffTimeCities);
- } else {
- // Exactly on the city
- frame = _trainCities[index].frame;
- }
-
- // Set frame, z-order and queue
- if (frame < 150) {
- _frameLine1->setFrame(frame);
-
- _frameLine1->getInfo()->location = 1;
- getScenes()->addToQueue(_frameLine1);
- } else {
- // We passed Belgrade
- _frameLine1->setFrame(149);
- _frameLine2->setFrame(frame - 150);
-
- _frameLine1->getInfo()->location = 1;
- _frameLine2->getInfo()->location = 1;
-
- getScenes()->addToQueue(_frameLine1);
- getScenes()->addToQueue(_frameLine2);
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
// Menu
//////////////////////////////////////////////////////////////////////////
Menu::Menu(LastExpressEngine *engine) : _engine(engine),
@@ -528,7 +316,7 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
getFlags()->mouseRightClick = false;
// Play intro music
- getSound()->playSoundWithSubtitles("MUS001.SND", SoundManager::kFlagMusic, kEntityPlayer);
+ getSound()->playSoundWithSubtitles("MUS001.SND", kFlagMusic, kEntityPlayer);
// Show The Smoking Car logo
if (animation.load(getArchive("1931.nis")))
@@ -539,7 +327,7 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
} else {
// Only show the quick intro
if (!_hasShownStartScreen) {
- getSound()->playSoundWithSubtitles("MUS018.SND", SoundManager::kFlagMusic, kEntityPlayer);
+ getSound()->playSoundWithSubtitles("MUS018.SND", kFlagMusic, kEntityPlayer);
getScenes()->loadScene(kSceneStartScreen);
// Original game waits 60 frames and loops Sound::unknownFunction1 unless the right button is pressed
@@ -550,7 +338,7 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
if (getFlags()->mouseRightClick)
break;
- getSound()->updateQueue();
+ getSoundQueue()->updateQueue();
}
}
}
@@ -562,10 +350,10 @@ void Menu::show(bool doSavegame, SavegameType type, uint32 value) {
init(doSavegame, type, value);
// Setup sound
- getSound()->unknownFunction4();
- getSound()->resetQueue(SoundManager::kSoundType11, SoundManager::kSoundType13);
- if (getSound()->isBuffered("TIMER"))
- getSound()->removeFromQueue("TIMER");
+ getSoundQueue()->resetQueue();
+ getSoundQueue()->resetQueue(kSoundType11, kSoundType13);
+ if (getSoundQueue()->isBuffered("TIMER"))
+ getSoundQueue()->removeFromQueue("TIMER");
// Init flags & misc
_isShowingCredits = false;
@@ -625,13 +413,13 @@ bool Menu::handleEvent(StartMenuAction action, Common::EventType type) {
if (clicked) {
showFrame(kOverlayButtons, kButtonQuitPushed, true);
- getSound()->clearStatus();
- getSound()->updateQueue();
+ getSoundQueue()->clearStatus();
+ getSoundQueue()->updateQueue();
getSound()->playSound(kEntityPlayer, "LIB046");
// FIXME uncomment when sound queue is properly implemented
- /*while (getSound()->isBuffered("LIB046"))
- getSound()->updateQueue();*/
+ /*while (getSoundQueue()->isBuffered("LIB046"))
+ getSoundQueue()->updateQueue();*/
getFlags()->shouldRedraw = false;
@@ -698,7 +486,7 @@ bool Menu::handleEvent(StartMenuAction action, Common::EventType type) {
setLogicEventHandlers();
if (_index) {
- getSound()->processEntry(SoundManager::kSoundType11);
+ getSoundQueue()->processEntry(kSoundType11);
} else {
if (!getFlags()->mouseRightClick) {
getScenes()->loadScene((SceneIndex)(5 * _gameId + 3));
@@ -710,7 +498,7 @@ bool Menu::handleEvent(StartMenuAction action, Common::EventType type) {
getScenes()->loadScene((SceneIndex)(5 * _gameId + 5));
if (!getFlags()->mouseRightClick) {
- getSound()->processEntry(SoundManager::kSoundType11);
+ getSoundQueue()->processEntry(kSoundType11);
// Show intro
Animation animation;
@@ -726,7 +514,7 @@ bool Menu::handleEvent(StartMenuAction action, Common::EventType type) {
if (!getEvent(kEventIntro)) {
getEvent(kEventIntro) = 1;
- getSound()->processEntry(SoundManager::kSoundType11);
+ getSoundQueue()->processEntry(kSoundType11);
}
}
@@ -921,7 +709,7 @@ bool Menu::handleEvent(StartMenuAction action, Common::EventType type) {
while (nextFrameCount > getFrameCount()) {
_engine->pollEvents();
- getSound()->updateQueue();
+ getSoundQueue()->updateQueue();
}
} else {
showFrame(kOverlayButtons, kButtonVolumeDown, true);
@@ -956,7 +744,7 @@ bool Menu::handleEvent(StartMenuAction action, Common::EventType type) {
while (nextFrameCount > getFrameCount()) {
_engine->pollEvents();
- getSound()->updateQueue();
+ getSoundQueue()->updateQueue();
}
} else {
showFrame(kOverlayButtons, kButtonVolumeUp, true);
@@ -1072,7 +860,7 @@ void Menu::init(bool doSavegame, SavegameType type, uint32 value) {
useSameIndex = false;
// TODO remove existing savegame and reset index & savegame name
- warning("Menu::initGame: not implemented!");
+ warning("[Menu::initGame] Not implemented");
}
doSavegame = false;
@@ -1331,10 +1119,10 @@ void Menu::updateTime(uint32 time) {
_currentTime = time;
if (_time != time) {
- if (getSound()->isBuffered(kEntityChapters))
- getSound()->removeFromQueue(kEntityChapters);
+ if (getSoundQueue()->isBuffered(kEntityChapters))
+ getSoundQueue()->removeFromQueue(kEntityChapters);
- getSound()->playSoundWithSubtitles((_currentTime >= _time) ? "LIB042" : "LIB041", SoundManager::kFlagMenuClock, kEntityChapters);
+ getSound()->playSoundWithSubtitles((_currentTime >= _time) ? "LIB042" : "LIB041", kFlagMenuClock, kEntityChapters);
adjustIndex(_currentTime, _time, false);
}
}
@@ -1463,8 +1251,8 @@ void Menu::adjustTime() {
_time = _currentTime;
}
- if (_currentTime == _time && getSound()->isBuffered(kEntityChapters))
- getSound()->removeFromQueue(kEntityChapters);
+ if (_currentTime == _time && getSoundQueue()->isBuffered(kEntityChapters))
+ getSoundQueue()->removeFromQueue(kEntityChapters);
_clock->draw(_time);
_trainLine->draw(_time);
diff --git a/engines/lastexpress/game/menu.h b/engines/lastexpress/menu/menu.h
index 4b84c065cb..4b84c065cb 100644
--- a/engines/lastexpress/game/menu.h
+++ b/engines/lastexpress/menu/menu.h
diff --git a/engines/lastexpress/menu/trainline.cpp b/engines/lastexpress/menu/trainline.cpp
new file mode 100644
index 0000000000..f819776163
--- /dev/null
+++ b/engines/lastexpress/menu/trainline.cpp
@@ -0,0 +1,142 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "lastexpress/menu/trainline.h"
+
+#include "lastexpress/data/sequence.h"
+
+#include "lastexpress/game/scenes.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+namespace LastExpress {
+
+// Information about the cities on the train line
+static const struct {
+ uint8 frame;
+ TimeValue time;
+} _trainCities[31] = {
+ {0, kTimeCityParis},
+ {9, kTimeCityEpernay},
+ {11, kTimeCityChalons},
+ {16, kTimeCityBarLeDuc},
+ {21, kTimeCityNancy},
+ {25, kTimeCityLuneville},
+ {35, kTimeCityAvricourt},
+ {37, kTimeCityDeutschAvricourt},
+ {40, kTimeCityStrasbourg},
+ {53, kTimeCityBadenOos},
+ {56, kTimeCityKarlsruhe},
+ {60, kTimeCityStuttgart},
+ {63, kTimeCityGeislingen},
+ {66, kTimeCityUlm},
+ {68, kTimeCityAugsburg},
+ {73, kTimeCityMunich},
+ {84, kTimeCitySalzbourg},
+ {89, kTimeCityAttnangPuchheim},
+ {97, kTimeCityWels},
+ {100, kTimeCityLinz},
+ {104, kTimeCityAmstetten},
+ {111, kTimeCityVienna},
+ {120, kTimeCityPoszony},
+ {124, kTimeCityGalanta},
+ {132, kTimeCityBudapest},
+ {148, kTimeCityBelgrade},
+ /* Line 1 ends at 150 - line 2 begins at 0 */
+ {157, kTimeCityNish},
+ {165, kTimeCityTzaribrod},
+ {174, kTimeCitySofia},
+ {198, kTimeCityAdrianople},
+ {210, kTimeCityConstantinople}
+};
+
+TrainLine::TrainLine(LastExpressEngine *engine) : _engine(engine), _frameLine1(NULL), _frameLine2(NULL) {
+ _frameLine1 = new SequenceFrame(loadSequence("line1.seq"), 0, true);
+ _frameLine2 = new SequenceFrame(loadSequence("line2.seq"), 0, true);
+}
+
+TrainLine::~TrainLine() {
+ SAFE_DELETE(_frameLine1);
+ SAFE_DELETE(_frameLine2);
+
+ // Zero passed pointers
+ _engine = NULL;
+}
+
+void TrainLine::clear() {
+ getScenes()->removeFromQueue(_frameLine1);
+ getScenes()->removeFromQueue(_frameLine2);
+}
+
+// Draw the train line at the time
+// line1: 150 frames (=> Belgrade)
+// line2: 61 frames (=> Constantinople)
+void TrainLine::draw(uint32 time) {
+ assert(time >= kTimeCityParis && time <= kTimeCityConstantinople);
+
+ // Check that sequences have been loaded
+ if (!_frameLine1 || !_frameLine2)
+ error("[TrainLine::draw] Line sequences have not been loaded correctly");
+
+ // Clear existing frames
+ clear();
+
+ // Get the index of the last city the train has visited
+ uint index = 0;
+ for (uint i = 0; i < ARRAYSIZE(_trainCities); i++)
+ if ((uint32)_trainCities[i].time <= time)
+ index = i;
+
+ uint16 frame;
+ if (time > (uint32)_trainCities[index].time) {
+ // Interpolate linearly to use a frame between the cities
+ uint8 diffFrames = _trainCities[index + 1].frame - _trainCities[index].frame;
+ uint diffTimeCities = (uint)(_trainCities[index + 1].time - _trainCities[index].time);
+ uint traveledTime = (time - (uint)_trainCities[index].time);
+ frame = (uint16)(_trainCities[index].frame + (traveledTime * diffFrames) / diffTimeCities);
+ } else {
+ // Exactly on the city
+ frame = _trainCities[index].frame;
+ }
+
+ // Set frame, z-order and queue
+ if (frame < 150) {
+ _frameLine1->setFrame(frame);
+
+ _frameLine1->getInfo()->location = 1;
+ getScenes()->addToQueue(_frameLine1);
+ } else {
+ // We passed Belgrade
+ _frameLine1->setFrame(149);
+ _frameLine2->setFrame(frame - 150);
+
+ _frameLine1->getInfo()->location = 1;
+ _frameLine2->getInfo()->location = 1;
+
+ getScenes()->addToQueue(_frameLine1);
+ getScenes()->addToQueue(_frameLine2);
+ }
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/menu/trainline.h b/engines/lastexpress/menu/trainline.h
new file mode 100644
index 0000000000..af6a121e9c
--- /dev/null
+++ b/engines/lastexpress/menu/trainline.h
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_TRAINLINE_H
+#define LASTEXPRESS_TRAINLINE_H
+
+#include "common/scummsys.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+class SequenceFrame;
+
+class TrainLine {
+public:
+ explicit TrainLine(LastExpressEngine *engine);
+ ~TrainLine();
+
+ void draw(uint32 time);
+ void clear();
+
+private:
+ LastExpressEngine *_engine;
+
+ // Frames
+ SequenceFrame *_frameLine1;
+ SequenceFrame *_frameLine2;
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_TRAINLINE_H
diff --git a/engines/lastexpress/module.mk b/engines/lastexpress/module.mk
index 12fbb4f85b..a11a7c4b67 100644
--- a/engines/lastexpress/module.mk
+++ b/engines/lastexpress/module.mk
@@ -45,19 +45,29 @@ MODULE_OBJS := \
entities/verges.o \
entities/vesna.o \
entities/yasmin.o \
+ fight/fight.o \
+ fight/fighter.o \
+ fight/fighter_anna.o \
+ fight/fighter_ivo.o \
+ fight/fighter_milos.o \
+ fight/fighter_salko.o \
+ fight/fighter_vesna.o \
game/action.o \
game/beetle.o \
game/entities.o \
- game/fight.o \
game/inventory.o \
game/logic.o \
- game/menu.o \
game/object.o \
game/savegame.o \
game/savepoint.o \
game/scenes.o \
- game/sound.o \
game/state.o \
+ menu/clock.o \
+ menu/menu.o \
+ menu/trainline.o \
+ sound/entry.o \
+ sound/queue.o \
+ sound/sound.o \
debug.o \
detection.o \
graphics.o \
diff --git a/engines/lastexpress/resource.cpp b/engines/lastexpress/resource.cpp
index f376a3a299..3910aaa010 100644
--- a/engines/lastexpress/resource.cpp
+++ b/engines/lastexpress/resource.cpp
@@ -52,7 +52,7 @@ bool ResourceManager::isArchivePresent(ArchiveIndex type) {
switch (type) {
default:
case kArchiveAll:
- error("ResourceManager::isArchivePresent: Only checks for single CDs are valid!");
+ error("[ResourceManager::isArchivePresent] Only checks for single CDs are valid");
case kArchiveCd1:
return Common::File::exists(archiveCD1Path);
@@ -134,7 +134,7 @@ Common::SeekableReadStream *ResourceManager::getFileStream(const Common::String
// Check if the file exits in the archive
if (!hasFile(name)) {
//#ifdef _DEBUG
-// error("ResourceManager::getFileStream: cannot open file: %s", name.c_str());
+// error("[ResourceManager::getFileStream] Cannot open file: %s", name.c_str());
//#endif
debugC(2, kLastExpressDebugResource, "Error opening file: %s", name.c_str());
return NULL;
diff --git a/engines/lastexpress/resource.h b/engines/lastexpress/resource.h
index 7dc909ab34..9e05a90399 100644
--- a/engines/lastexpress/resource.h
+++ b/engines/lastexpress/resource.h
@@ -26,6 +26,8 @@
#include "lastexpress/data/archive.h"
#include "lastexpress/shared.h"
+#include "common/array.h"
+
namespace LastExpress {
class Background;
diff --git a/engines/lastexpress/shared.h b/engines/lastexpress/shared.h
index 8cebe16d87..d60a498447 100644
--- a/engines/lastexpress/shared.h
+++ b/engines/lastexpress/shared.h
@@ -28,6 +28,86 @@
namespace LastExpress {
//////////////////////////////////////////////////////////////////////////
+// Sound
+//////////////////////////////////////////////////////////////////////////
+
+enum SoundType {
+ kSoundTypeNone = 0,
+ kSoundType1,
+ kSoundType2,
+ kSoundType3,
+ kSoundType4,
+ kSoundType5,
+ kSoundType6,
+ kSoundType7,
+ kSoundType8,
+ kSoundType9,
+ kSoundType10,
+ kSoundType11,
+ kSoundType12,
+ kSoundType13,
+ kSoundType14,
+ kSoundType15,
+ kSoundType16
+};
+
+enum SoundFlag {
+ kFlagInvalid = -1,
+ kFlagNone = 0x0,
+ kFlag2 = 0x2,
+ kFlag3 = 0x3,
+ kFlag4 = 0x4,
+ kFlag5 = 0x5,
+ kFlag6 = 0x6,
+ kFlag7 = 0x7,
+ kFlag8 = 0x8,
+ kFlag9 = 0x9,
+ kFlag10 = 0xA,
+ kFlag11 = 0xB,
+ kFlag12 = 0xC,
+ kFlag13 = 0xD,
+ kFlag14 = 0xE,
+ kFlag15 = 0xF,
+ kFlagDefault = 0x10,
+
+ kFlagType1_2 = 0x1000000,
+ kFlagLoopedSound = 0x1001001,
+ kFlagSteam = 0x1001007,
+ kFlagType13 = 0x3000000,
+ kFlagMenuClock = 0x3080010,
+ kFlagType7 = 0x4000000,
+ kFlagType11 = 0x5000000,
+ kFlagMusic = 0x5000010,
+ kFlagType3 = 0x6000000,
+ kFlagLoop = 0x6001008,
+ kFlagType9 = 0x7000000
+};
+
+enum SoundState {
+ kSoundStateNone = 0,
+ kSoundState1 = 1,
+ kSoundState2 = 2
+};
+
+enum SoundStatus {
+ kSoundStatusClear0 = 0x10,
+ kSoundStatusFilter = 0x1F,
+ kSoundStatus_20 = 0x20,
+ kSoundStatus_40 = 0x40,
+ kSoundStatusCached = 0x80,
+ kSoundStatus_180 = 0x180,
+ kSoundStatusClosed = 0x200,
+ kSoundStatus_400 = 0x400,
+ kSoundStatusClear4 = 0x800,
+ kSoundStatus_8000 = 0x8000,
+ kSoundStatus_20000 = 0x20000,
+ kSoundStatus_100000 = 0x100000,
+ kSoundStatus_20000000 = 0x20000000,
+ kSoundStatus_40000000 = 0x40000000,
+ kSoundStatusClearAll = 0xFFFFFFE0
+};
+
+//////////////////////////////////////////////////////////////////////////
// Time values
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp
new file mode 100644
index 0000000000..44cc68a57b
--- /dev/null
+++ b/engines/lastexpress/sound/entry.cpp
@@ -0,0 +1,465 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "lastexpress/sound/entry.h"
+
+#include "lastexpress/game/logic.h"
+#include "lastexpress/game/savepoint.h"
+#include "lastexpress/game/state.h"
+
+#include "lastexpress/sound/queue.h"
+#include "lastexpress/sound/sound.h"
+
+#include "lastexpress/graphics.h"
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+#include "lastexpress/resource.h"
+
+#include "common/stream.h"
+
+namespace LastExpress {
+
+#define SOUNDCACHE_ENTRY_SIZE 92160
+#define FILTER_BUFFER_SIZE 2940
+
+//////////////////////////////////////////////////////////////////////////
+// SoundEntry
+//////////////////////////////////////////////////////////////////////////
+SoundEntry::SoundEntry(LastExpressEngine *engine) : _engine(engine) {
+ _type = kSoundTypeNone;
+
+ _blockCount = 0;
+ _time = 0;
+
+ _stream = NULL;
+
+ _field_34 = 0;
+ _field_38 = 0;
+ _field_3C = 0;
+ _variant = 0;
+ _entity = kEntityPlayer;
+ _field_48 = 0;
+ _priority = 0;
+
+ _subtitle = NULL;
+
+ _soundStream = NULL;
+
+ _queued = false;
+}
+
+SoundEntry::~SoundEntry() {
+ // Entries that have been queued will have their streamed disposed automatically
+ if (!_soundStream)
+ SAFE_DELETE(_stream);
+ delete _soundStream;
+
+ // Zero passed pointers
+ _engine = NULL;
+}
+
+void SoundEntry::open(Common::String name, SoundFlag flag, int priority) {
+ _priority = priority;
+ setType(flag);
+ setupStatus(flag);
+ loadStream(name);
+}
+
+void SoundEntry::close() {
+ _status.status |= kSoundStatusClosed;
+
+ // Loop until ready
+ //while (!(_status.status1 & 4) && !(getSoundQueue()->getFlag() & 8) && (getSoundQueue()->getFlag() & 1))
+ // ; // empty loop body
+
+ // The original game remove the entry from the cache here,
+ // but since we are called from within an iterator loop
+ // we will remove the entry there
+ // removeFromCache(entry);
+
+ if (_subtitle) {
+ _subtitle->draw();
+ SAFE_DELETE(_subtitle);
+ }
+
+ if (_entity) {
+ if (_entity == kEntitySteam)
+ getSound()->playLoopingSound(2);
+ else if (_entity != kEntityTrain)
+ getSavePoints()->push(kEntityPlayer, _entity, kActionEndSound);
+ }
+}
+
+void SoundEntry::play() {
+ if (!_stream) {
+ warning("[SoundEntry::play] stream has been disposed");
+ return;
+ }
+
+ // Prepare sound stream
+ if (!_soundStream)
+ _soundStream = new StreamedSound();
+
+ // Compute current filter id
+ int32 filterId = _status.status & kSoundStatusFilter;
+ // TODO adjust status (based on stepIndex)
+
+ if (_queued) {
+ _soundStream->setFilterId(filterId);
+ } else {
+ _stream->seek(0);
+
+ // Load the stream and start playing
+ _soundStream->load(_stream, filterId);
+
+ _queued = true;
+ }
+}
+
+bool SoundEntry::isFinished() {
+ if (!_stream)
+ return true;
+
+ if (!_soundStream || !_queued)
+ return false;
+
+ // TODO check that all data has been queued
+ return _soundStream->isFinished();
+}
+
+void SoundEntry::setType(SoundFlag flag) {
+ switch (flag & kFlagType9) {
+ default:
+ case kFlagNone:
+ _type = getSoundQueue()->getCurrentType();
+ getSoundQueue()->setCurrentType((SoundType)(_type + 1));
+ break;
+
+ case kFlagType1_2: {
+ SoundEntry *previous2 = getSoundQueue()->getEntry(kSoundType2);
+ if (previous2)
+ previous2->update(0);
+
+ SoundEntry *previous = getSoundQueue()->getEntry(kSoundType1);
+ if (previous) {
+ previous->setType(kSoundType2);
+ previous->update(0);
+ }
+
+ _type = kSoundType1;
+ }
+ break;
+
+ case kFlagType3: {
+ SoundEntry *previous = getSoundQueue()->getEntry(kSoundType3);
+ if (previous) {
+ previous->setType(kSoundType4);
+ previous->update(0);
+ }
+
+ _type = kSoundType11;
+ }
+ break;
+
+ case kFlagType7: {
+ SoundEntry *previous = getSoundQueue()->getEntry(kSoundType7);
+ if (previous)
+ previous->setType(kSoundType8);
+
+ _type = kSoundType7;
+ }
+ break;
+
+ case kFlagType9: {
+ SoundEntry *previous = getSoundQueue()->getEntry(kSoundType9);
+ if (previous)
+ previous->setType(kSoundType10);
+
+ _type = kSoundType9;
+ }
+ break;
+
+ case kFlagType11: {
+ SoundEntry *previous = getSoundQueue()->getEntry(kSoundType11);
+ if (previous)
+ previous->setType(kSoundType14);
+
+ _type = kSoundType11;
+ }
+ break;
+
+ case kFlagType13: {
+ SoundEntry *previous = getSoundQueue()->getEntry(kSoundType13);
+ if (previous)
+ previous->setType(kSoundType14);
+
+ _type = kSoundType13;
+ }
+ break;
+ }
+}
+
+void SoundEntry::setupStatus(SoundFlag flag) {
+ SoundStatus statusFlag = (SoundStatus)flag;
+ if (!((statusFlag & 0xFF) & kSoundStatusFilter))
+ statusFlag = (SoundStatus)(statusFlag | kSoundStatusCached);
+
+ if (((statusFlag & 0xFF00) >> 8) & kSoundStatusClear0)
+ _status.status = (uint32)statusFlag;
+ else
+ _status.status = (statusFlag | kSoundStatusClear4);
+}
+
+void SoundEntry::loadStream(Common::String name) {
+ _name2 = name;
+
+ // Load sound data
+ _stream = getArchive(name);
+
+ if (!_stream)
+ _stream = getArchive("DEFAULT.SND");
+
+ if (!_stream)
+ _status.status = kSoundStatusClosed;
+}
+
+void SoundEntry::update(uint val) {
+ if (!(_status.status3 & 64)) {
+ int value2 = val;
+
+ _status.status |= kSoundStatus_100000;
+
+ if (val) {
+ if (getSoundQueue()->getFlag() & 32) {
+ _variant = val;
+ value2 = val * 2 + 1;
+ }
+
+ _field_3C = value2;
+ } else {
+ _field_3C = 0;
+ _status.status |= kSoundStatus_40000000;
+ }
+ }
+}
+
+bool SoundEntry::updateSound() {
+ bool result;
+ char sub[16];
+
+ if (_status.status2 & 4) {
+ result = false;
+ } else {
+ if (_status.status2 & 0x80) {
+ if (_field_48 <= getSound()->getData2()) {
+ _status.status |= 0x20;
+ _status.status &= ~0x8000;
+ strcpy(sub, _name2.c_str());
+
+ int l = strlen(sub) + 1;
+ if (l - 1 > 4)
+ sub[l - 1 - 4] = 0;
+ showSubtitle(sub);
+ }
+ } else {
+ if (!(getSoundQueue()->getFlag() & 0x20)) {
+ if (!(_status.status3 & 8)) {
+ if (_entity) {
+ if (_entity < 0x80) {
+ updateEntryFlag(getSound()->getSoundFlag(_entity));
+ }
+ }
+ }
+ }
+ //if (status.status2 & 0x40 && !((uint32)_status.status & 0x180) && v1->soundBuffer)
+ // Sound_FillSoundBuffer(v1);
+ }
+ result = true;
+ }
+
+ return result;
+}
+
+void SoundEntry::updateEntryFlag(SoundFlag flag) {
+ if (flag) {
+ if (getSoundQueue()->getFlag() & 0x20 && _type != kSoundType9 && _type != kSoundType7)
+ update(flag);
+ else
+ _status.status = flag + (_status.status & ~0x1F);
+ } else {
+ _variant = 0;
+ _status.status |= 0x80u;
+ _status.status &= ~0x10001F;
+ }
+}
+
+void SoundEntry::updateState() {
+ if (getSoundQueue()->getFlag() & 32) {
+ if (_type != kSoundType9 && _type != kSoundType7 && _type != kSoundType5) {
+ uint32 variant = _status.status & kSoundStatusFilter;
+
+ _status.status &= kSoundStatusClearAll;
+
+ _variant = variant;
+ _status.status |= variant * 2 + 1;
+ }
+ }
+
+ _status.status |= kSoundStatus_20;
+}
+
+void SoundEntry::reset() {
+ _status.status |= kSoundStatusClosed;
+ _entity = kEntityPlayer;
+
+ if (_stream) {
+ if (!_soundStream) {
+ SAFE_DELETE(_stream);
+ } else {
+ // the original stream will be disposed
+ _soundStream->stop();
+ SAFE_DELETE(_soundStream);
+ }
+
+ _stream = NULL;
+ }
+}
+
+void SoundEntry::showSubtitle(Common::String filename) {
+ _subtitle = new SubtitleEntry(_engine);
+ _subtitle->load(filename, this);
+
+ if (_subtitle->getStatus().status2 & 4) {
+ _subtitle->draw();
+ SAFE_DELETE(_subtitle);
+ } else {
+ _status.status |= kSoundStatus_20000;
+ }
+}
+
+void SoundEntry::saveLoadWithSerializer(Common::Serializer &s) {
+ if (_name2.matchString("NISSND?") && (_status.status & kFlagType7) != kFlag3) {
+ s.syncAsUint32LE(_status.status);
+ s.syncAsUint32LE(_type);
+ s.syncAsUint32LE(_blockCount); // field_8;
+ s.syncAsUint32LE(_time);
+ s.syncAsUint32LE(_field_34); // field_10;
+ s.syncAsUint32LE(_field_38); // field_14;
+ s.syncAsUint32LE(_entity);
+
+ uint32 delta = (uint32)_field_48 - getSound()->getData2();
+ if (delta > kFlag8)
+ delta = 0;
+ s.syncAsUint32LE(delta);
+
+ s.syncAsUint32LE(_priority);
+
+ char name1[16];
+ strcpy((char *)&name1, _name1.c_str());
+ s.syncBytes((byte *)&name1, 16);
+
+ char name2[16];
+ strcpy((char *)&name2, _name2.c_str());
+ s.syncBytes((byte *)&name2, 16);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// SubtitleEntry
+//////////////////////////////////////////////////////////////////////////
+SubtitleEntry::SubtitleEntry(LastExpressEngine *engine) : _engine(engine) {
+ _sound = NULL;
+ _data = NULL;
+}
+
+SubtitleEntry::~SubtitleEntry() {
+ SAFE_DELETE(_data);
+}
+
+void SubtitleEntry::load(Common::String filename, SoundEntry *soundEntry) {
+ // Add ourselves to the list of active subtitles
+ getSoundQueue()->addSubtitle(this);
+
+ // Set sound entry and filename
+ _filename = filename + ".SBE";
+ _sound = soundEntry;
+
+ // Load subtitle data
+ if (_engine->getResourceManager()->hasFile(_filename)) {
+ if (getSoundQueue()->getSubtitleFlag() & 2)
+ return;
+
+ loadData();
+ } else {
+ _status.status = kSoundStatus_400;
+ }
+}
+
+void SubtitleEntry::loadData() {
+ _data = new SubtitleManager(_engine->getFont());
+ _data->load(getArchive(_filename));
+
+ getSoundQueue()->setSubtitleFlag(getSoundQueue()->getSubtitleFlag() | 2);
+ getSoundQueue()->setCurrentSubtitle(this);
+}
+
+void SubtitleEntry::setupAndDraw() {
+ if (!_data) {
+ _data = new SubtitleManager(_engine->getFont());
+ _data->load(getArchive(_filename));
+ }
+
+ if (_data->getMaxTime() > _sound->getTime()) {
+ _status.status = kSoundStatus_400;
+ } else {
+ _data->setTime((uint16)_sound->getTime());
+
+ if (getSoundQueue()->getSubtitleFlag() & 1)
+ drawOnScreen();
+ }
+
+ getSoundQueue()->setCurrentSubtitle(this);
+
+ // TODO Missing code
+}
+
+void SubtitleEntry::draw() {
+ // Remove ourselves from the queue
+ getSoundQueue()->removeSubtitle(this);
+
+ if (this == getSoundQueue()->getCurrentSubtitle()) {
+ drawOnScreen();
+
+ getSoundQueue()->setCurrentSubtitle(NULL);
+ getSoundQueue()->setSubtitleFlag(0);
+ }
+}
+
+void SubtitleEntry::drawOnScreen() {
+ if (_data == NULL)
+ return;
+
+ getSoundQueue()->setSubtitleFlag(getSoundQueue()->getSubtitleFlag() & -2);
+ _engine->getGraphicsManager()->draw(_data, GraphicsManager::kBackgroundOverlay);
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/sound/entry.h b/engines/lastexpress/sound/entry.h
new file mode 100644
index 0000000000..a88b0b7210
--- /dev/null
+++ b/engines/lastexpress/sound/entry.h
@@ -0,0 +1,196 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef LASTEXPRESS_SOUND_ENTRY_H
+#define LASTEXPRESS_SOUND_ENTRY_H
+
+/*
+ Sound entry: 68 bytes (this is what appears in savegames)
+ uint32 {4} - status
+ uint32 {4} - type
+ uint32 {4} - blockCount
+ uint32 {4} - time
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - entity
+ uint32 {4} - ??
+ uint32 {4} - priority
+ char {16} - name 1
+ char {16} - name 2
+
+ Sound queue entry: 120 bytes
+ uint16 {2} - status
+ byte {1} - type
+ byte {1} - ??
+ uint32 {4} - ??
+ uint32 {4} - currentDataPtr
+ uint32 {4} - soundData
+ uint32 {4} - currentBufferPtr
+ uint32 {4} - blockCount
+ uint32 {4} - time
+ uint32 {4} - size
+ uint32 {4} - ??
+ uint32 {4} - archive structure pointer
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - ??
+ uint32 {4} - entity
+ uint32 {4} - ??
+ uint32 {4} - priority
+ char {16} - name 1
+ char {16} - name 2
+ uint32 {4} - pointer to next entry in the queue
+ uint32 {4} - subtitle data pointer
+*/
+
+#include "lastexpress/data/snd.h"
+#include "lastexpress/data/subtitle.h"
+
+#include "lastexpress/shared.h"
+
+#include "common/serializer.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+class SubtitleEntry;
+
+union SoundStatusUnion {
+ uint32 status;
+ byte status1;
+ byte status2;
+ byte status3;
+ byte status4;
+
+ SoundStatusUnion() {
+ status = 0;
+ }
+};
+
+//////////////////////////////////////////////////////////////////////////
+// SoundEntry
+//////////////////////////////////////////////////////////////////////////
+class SoundEntry : Common::Serializable {
+public:
+ SoundEntry(LastExpressEngine *engine);
+ ~SoundEntry();
+
+ void open(Common::String name, SoundFlag flag, int priority);
+ void close();
+ void play();
+ void reset();
+ bool isFinished();
+ void update(uint val);
+ bool updateSound();
+ void updateState();
+ void updateEntryFlag(SoundFlag flag);
+
+ // Subtitles
+ void showSubtitle(Common::String filename);
+
+ // Serializable
+ void saveLoadWithSerializer(Common::Serializer &ser);
+
+ // Accessors
+ void setStatus(int status) { _status.status = status; }
+ void setType(SoundType type) { _type = type; }
+ void setEntity(EntityIndex entity) { _entity = entity; }
+ void setField48(int val) { _field_48 = val; }
+
+ SoundStatusUnion getStatus() { return _status; }
+ SoundType getType() { return _type; }
+ uint32 getTime() { return _time; }
+ EntityIndex getEntity() { return _entity; }
+ uint32 getPriority() { return _priority; }
+ Common::String getName2() { return _name2; }
+
+ // Streams
+ SimpleSound *getSoundStream() { return _soundStream; }
+
+private:
+ LastExpressEngine *_engine;
+
+ SoundStatusUnion _status;
+ SoundType _type; // int
+ //int _data;
+ //int _endOffset;
+ byte * _currentDataPtr;
+ //int _currentBufferPtr;
+ int _blockCount;
+ uint32 _time;
+ //int _size;
+ //int _field_28;
+ Common::SeekableReadStream *_stream; // The file stream
+ //int _archive;
+ int _field_34;
+ int _field_38;
+ int _field_3C;
+ int _variant;
+ EntityIndex _entity;
+ int _field_48;
+ uint32 _priority;
+ Common::String _name1; //char[16];
+ Common::String _name2; //char[16];
+ // original has pointer to the next structure in the list (not used)
+ SubtitleEntry *_subtitle;
+
+ // Sound buffer & stream
+ bool _queued;
+ StreamedSound *_soundStream; // the filtered sound stream
+
+ void setType(SoundFlag flag);
+ void setupStatus(SoundFlag flag);
+ void loadStream(Common::String name);
+};
+
+//////////////////////////////////////////////////////////////////////////
+// SubtitleEntry
+//////////////////////////////////////////////////////////////////////////
+class SubtitleEntry {
+public:
+ SubtitleEntry(LastExpressEngine *engine);
+ ~SubtitleEntry();
+
+ void load(Common::String filename, SoundEntry *soundEntry);
+ void loadData();
+ void draw();
+ void setupAndDraw();
+ void drawOnScreen();
+
+ // Accessors
+ SoundStatusUnion getStatus() { return _status; }
+ SoundEntry *getSoundEntry() { return _sound; }
+
+private:
+ LastExpressEngine *_engine;
+
+ Common::String _filename;
+ SoundStatusUnion _status;
+ SoundEntry *_sound;
+ SubtitleManager *_data;
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_SOUND_ENTRY_H
diff --git a/engines/lastexpress/sound/queue.cpp b/engines/lastexpress/sound/queue.cpp
new file mode 100644
index 0000000000..33b4c06793
--- /dev/null
+++ b/engines/lastexpress/sound/queue.cpp
@@ -0,0 +1,400 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 "lastexpress/sound/queue.h"
+
+#include "lastexpress/game/logic.h"
+#include "lastexpress/game/state.h"
+
+#include "lastexpress/sound/entry.h"
+
+#include "lastexpress/helpers.h"
+#include "lastexpress/lastexpress.h"
+
+namespace LastExpress {
+
+SoundQueue::SoundQueue(LastExpressEngine *engine) : _engine(engine) {
+ _state = 0;
+ _currentType = kSoundType16;
+ _flag = 0;
+
+ _subtitlesFlag = 0;
+ _currentSubtitle = NULL;
+}
+
+SoundQueue::~SoundQueue() {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
+ SAFE_DELETE(*i);
+ _soundList.clear();
+
+ for (Common::List<SubtitleEntry *>::iterator i = _subtitles.begin(); i != _subtitles.end(); ++i)
+ SAFE_DELETE(*i);
+ _subtitles.clear();
+
+ _currentSubtitle = NULL;
+
+ // Zero passed pointers
+ _engine = NULL;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Timer
+//////////////////////////////////////////////////////////////////////////
+void SoundQueue::handleTimer() {
+ Common::StackLock locker(_mutex);
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ SoundEntry *entry = (*i);
+
+ // When the entry has stopped playing, we remove his buffer
+ if (entry->isFinished()) {
+ entry->close();
+ SAFE_DELETE(entry);
+ i = _soundList.reverse_erase(i);
+ continue;
+ }
+
+ // Queue the entry data, applying filtering
+ entry->play();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Sound queue management
+//////////////////////////////////////////////////////////////////////////
+void SoundQueue::addToQueue(SoundEntry *entry) {
+ _soundList.push_back(entry);
+}
+
+void SoundQueue::removeFromQueue(EntityIndex entity) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(entity);
+ if (entry)
+ entry->reset();
+}
+
+void SoundQueue::removeFromQueue(Common::String filename) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(filename);
+ if (entry)
+ entry->reset();
+}
+
+void SoundQueue::updateQueue() {
+ Common::StackLock locker(_mutex);
+
+ ++_flag;
+
+ if (getSoundState() & kSoundState1) {
+ SoundEntry *entry = getEntry(kSoundType1);
+ if (!entry || getFlags()->flag_3 || (entry && entry->getTime() > getSound()->getLoopingSoundDuration())) {
+ getSound()->playLoopingSound(0x45);
+ } else {
+ if (getSound()->getData1() && getSound()->getData2() >= getSound()->getData1()) {
+ entry->update(getSound()->getData0());
+ getSound()->setData1(0);
+ }
+ }
+ }
+
+ for (Common::List<SoundEntry *>::iterator it = _soundList.begin(); it != _soundList.end(); ++it) {
+ SoundEntry *entry = *it;
+
+ // Original removes the entry data from the cache and sets the archive as not loaded
+ // and if the sound data buffer is not full, loads a new entry to be played based on
+ // its priority and filter id
+
+ if (!entry->updateSound() && !(entry->getStatus().status3 & 0x8)) {
+ entry->close();
+ SAFE_DELETE(entry);
+ it = _soundList.reverse_erase(it);
+ }
+ }
+
+ // Original update the current entry, loading another set of samples to be decoded
+
+ getFlags()->flag_3 = 0;
+
+ --_flag;
+}
+
+void SoundQueue::resetQueue() {
+ Common::StackLock locker(_mutex);
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ if ((*i)->getType() == kSoundType1) {
+ (*i)->reset();
+ break;
+ }
+ }
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ if ((*i)->getType() == kSoundType2) {
+ (*i)->reset();
+ break;
+ }
+ }
+}
+
+void SoundQueue::resetQueue(SoundType type1, SoundType type2) {
+ if (!type2)
+ type2 = type1;
+
+ Common::StackLock locker(_mutex);
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ if ((*i)->getType() != type1 && (*i)->getType() != type2)
+ (*i)->reset();
+ }
+}
+
+void SoundQueue::clearQueue() {
+ Common::StackLock locker(_mutex);
+
+ _flag |= 8;
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ SoundEntry *entry = (*i);
+
+ // Delete entry
+ entry->close();
+ SAFE_DELETE(entry);
+
+ i = _soundList.reverse_erase(i);
+ }
+
+ updateSubtitles();
+}
+
+//////////////////////////////////////////////////////////////////////////
+// State
+//////////////////////////////////////////////////////////////////////////
+void SoundQueue::clearStatus() {
+ Common::StackLock locker(_mutex);
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
+ (*i)->setStatus((*i)->getStatus().status | kSoundStatusClosed);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Entry management
+//////////////////////////////////////////////////////////////////////////
+void SoundQueue::setupEntry(SoundType type, EntityIndex index) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(type);
+ if (entry)
+ entry->setEntity(index);
+}
+
+void SoundQueue::processEntry(EntityIndex entity) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(entity);
+ if (entry) {
+ entry->update(0);
+ entry->setEntity(kEntityPlayer);
+ }
+}
+
+void SoundQueue::processEntry(SoundType type) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(type);
+ if (entry)
+ entry->update(0);
+}
+
+void SoundQueue::processEntry(Common::String filename) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(filename);
+ if (entry) {
+ entry->update(0);
+ entry->setEntity(kEntityPlayer);
+ }
+}
+
+void SoundQueue::processEntries() {
+ _state = 0;
+
+ processEntry(kSoundType1);
+ processEntry(kSoundType2);
+}
+
+SoundEntry *SoundQueue::getEntry(EntityIndex index) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ if ((*i)->getEntity() == index)
+ return *i;
+ }
+
+ return NULL;
+}
+
+SoundEntry *SoundQueue::getEntry(Common::String name) {
+ if (!name.contains('.'))
+ name += ".SND";
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ if ((*i)->getName2() == name)
+ return *i;
+ }
+
+ return NULL;
+}
+
+SoundEntry *SoundQueue::getEntry(SoundType type) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ if ((*i)->getType() == type)
+ return *i;
+ }
+
+ return NULL;
+}
+
+uint32 SoundQueue::getEntryTime(EntityIndex index) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(index);
+ if (entry)
+ return entry->getTime();
+
+ return 0;
+}
+
+bool SoundQueue::isBuffered(EntityIndex entity) {
+ Common::StackLock locker(_mutex);
+
+ return (getEntry(entity) != NULL);
+}
+
+bool SoundQueue::isBuffered(Common::String filename, bool testForEntity) {
+ Common::StackLock locker(_mutex);
+
+ SoundEntry *entry = getEntry(filename);
+
+ if (testForEntity)
+ return entry != NULL && entry->getEntity() != kEntityPlayer;
+
+ return (entry != NULL);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Subtitles
+//////////////////////////////////////////////////////////////////////////
+void SoundQueue::updateSubtitles() {
+ Common::StackLock locker(_mutex);
+
+ uint32 index = 0;
+ SubtitleEntry *subtitle = NULL;
+
+ for (Common::List<SubtitleEntry *>::iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) {
+ uint32 current_index = 0;
+ SoundEntry *soundEntry = (*i)->getSoundEntry();
+ SoundStatus status = (SoundStatus)soundEntry->getStatus().status;
+
+ if (!(status & kSoundStatus_40)
+ || status & kSoundStatus_180
+ || soundEntry->getTime() == 0
+ || (status & kSoundStatusFilter) < 6
+ || ((getFlags()->nis & 0x8000) && soundEntry->getPriority() < 90)) {
+ current_index = 0;
+ } else {
+ current_index = soundEntry->getPriority() + (status & kSoundStatusFilter);
+
+ if (_currentSubtitle == (*i))
+ current_index += 4;
+ }
+
+ if (index < current_index) {
+ index = current_index;
+ subtitle = (*i);
+ }
+ }
+
+ if (_currentSubtitle == subtitle) {
+ if (subtitle)
+ subtitle->setupAndDraw();
+
+ return;
+ }
+
+ if (_subtitlesFlag & 1)
+ subtitle->drawOnScreen();
+
+ if (subtitle) {
+ subtitle->loadData();
+ subtitle->setupAndDraw();
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Savegame
+//////////////////////////////////////////////////////////////////////////
+void SoundQueue::saveLoadWithSerializer(Common::Serializer &s) {
+ Common::StackLock locker(_mutex);
+
+ s.syncAsUint32LE(_state);
+ s.syncAsUint32LE(_currentType);
+
+ // Compute the number of entries to save
+ uint32 numEntries = count();
+ s.syncAsUint32LE(numEntries);
+
+ // Save or load each entry data
+ if (s.isSaving()) {
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
+ (*i)->saveLoadWithSerializer(s);
+ } else {
+ warning("[Sound::saveLoadWithSerializer] Loading not implemented");
+ s.skip(numEntries * 64);
+ }
+}
+
+
+// FIXME: We probably need another mutex here to protect during the whole savegame process
+// as we could have removed an entry between the time we check the count and the time we
+// save the entries
+uint32 SoundQueue::count() {
+ Common::StackLock locker(_mutex);
+
+ uint32 numEntries = 0;
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
+ if ((*i)->getName2().matchString("NISSND?"))
+ ++numEntries;
+
+ return numEntries;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Debug
+//////////////////////////////////////////////////////////////////////////
+void SoundQueue::stopAllSound() {
+ Common::StackLock locker(_mutex);
+
+ for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
+ (*i)->getSoundStream()->stop();
+}
+
+} // End of namespace LastExpress
diff --git a/engines/lastexpress/sound/queue.h b/engines/lastexpress/sound/queue.h
new file mode 100644
index 0000000000..75fe06883a
--- /dev/null
+++ b/engines/lastexpress/sound/queue.h
@@ -0,0 +1,121 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_SOUND_QUEUE_H
+#define LASTEXPRESS_SOUND_QUEUE_H
+
+#include "lastexpress/shared.h"
+
+#include "common/array.h"
+#include "common/mutex.h"
+#include "common/serializer.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+class SoundEntry;
+class SubtitleEntry;
+
+class SoundQueue : Common::Serializable {
+public:
+ SoundQueue(LastExpressEngine *engine);
+ ~SoundQueue();
+
+ // Timer
+ void handleTimer();
+
+ // Queue
+ void addToQueue(SoundEntry *entry);
+ void removeFromQueue(Common::String filename);
+ void removeFromQueue(EntityIndex entity);
+ void updateQueue();
+ void resetQueue();
+ void resetQueue(SoundType type1, SoundType type2 = kSoundTypeNone);
+ void clearQueue();
+
+ // State
+ void clearStatus();
+ int getSoundState() { return _state; }
+ void resetState() { resetState(kSoundState1); }
+ void resetState(SoundState state) { _state |= state; }
+
+ // Entries
+ void setupEntry(SoundType type, EntityIndex index);
+ void processEntry(EntityIndex entity);
+ void processEntry(SoundType type);
+ void processEntry(Common::String filename);
+ void processEntries();
+ SoundEntry *getEntry(SoundType type);
+ SoundEntry *getEntry(EntityIndex index);
+ SoundEntry *getEntry(Common::String name);
+ uint32 getEntryTime(EntityIndex index);
+ bool isBuffered(Common::String filename, bool testForEntity = false);
+ bool isBuffered(EntityIndex entity);
+
+ // Subtitles
+ void updateSubtitles();
+ void addSubtitle(SubtitleEntry *entry) { _subtitles.push_back(entry); }
+ void removeSubtitle(SubtitleEntry *entry) { _subtitles.remove(entry); }
+ void setCurrentSubtitle(SubtitleEntry *entry) { _currentSubtitle = entry; }
+ SubtitleEntry *getCurrentSubtitle() { return _currentSubtitle; }
+
+ // Serializable
+ void saveLoadWithSerializer(Common::Serializer &ser);
+ uint32 count();
+
+ // Accessors
+ uint32 getFlag() { return _flag; }
+ int getSubtitleFlag() { return _subtitlesFlag; }
+ void setSubtitleFlag(int flag) { _subtitlesFlag = flag; }
+ SoundType getCurrentType() { return _currentType; }
+ void setCurrentType(SoundType type) { _currentType = type; }
+
+protected:
+ // Debug
+ void stopAllSound();
+
+private:
+ LastExpressEngine *_engine;
+
+ Common::Mutex _mutex;
+
+ // State & shared data
+ int _state;
+ SoundType _currentType;
+ // TODO: this seems to be a synchronization flag for the sound timer
+ uint32 _flag;
+
+ // Entries
+ Common::List<SoundEntry *> _soundList; ///< List of all sound entries
+ void *_soundCacheData;
+
+ // Subtitles
+ int _subtitlesFlag;
+ Common::List<SubtitleEntry *> _subtitles;
+ SubtitleEntry *_currentSubtitle;
+
+ friend class Debugger;
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_SOUND_QUEUE_H
diff --git a/engines/lastexpress/game/sound.cpp b/engines/lastexpress/sound/sound.cpp
index 3f98ac79ea..2f7bb4a601 100644
--- a/engines/lastexpress/game/sound.cpp
+++ b/engines/lastexpress/sound/sound.cpp
@@ -20,15 +20,19 @@
*
*/
-#include "lastexpress/game/sound.h"
+#include "lastexpress/sound/sound.h"
#include "lastexpress/game/action.h"
#include "lastexpress/game/entities.h"
#include "lastexpress/game/inventory.h"
#include "lastexpress/game/logic.h"
+#include "lastexpress/game/object.h"
#include "lastexpress/game/savepoint.h"
#include "lastexpress/game/state.h"
+#include "lastexpress/sound/entry.h"
+#include "lastexpress/sound/queue.h"
+
#include "lastexpress/helpers.h"
#include "lastexpress/graphics.h"
#include "lastexpress/lastexpress.h"
@@ -36,11 +40,8 @@
namespace LastExpress {
-#define SOUNDCACHE_ENTRY_SIZE 92160
-#define SOUNDCACHE_MAX_SIZE 6
-
// Letters & messages
-const char *messages[24] = {
+static const char *const messages[24] = {
"",
"TXT1001", // 1
"TXT1001A", // 2
@@ -67,7 +68,7 @@ const char *messages[24] = {
"ENDALRM3" // 65
};
-const char *cities[17] = {
+static const char *const cities[17] = {
"EPERNAY",
"CHALONS",
"BARLEDUC",
@@ -87,7 +88,7 @@ const char *cities[17] = {
"POLICE"
};
-const char *locomotiveSounds[5] = {
+static const char *const locomotiveSounds[5] = {
"ZFX1005",
"ZFX1006",
"ZFX1007",
@@ -95,576 +96,51 @@ const char *locomotiveSounds[5] = {
"ZFX1007B"
};
-static const SoundManager::FlagType soundFlags[32] = {
- SoundManager::kFlagDefault, SoundManager::kFlag15, SoundManager::kFlag14, SoundManager::kFlag13, SoundManager::kFlag12,
- SoundManager::kFlag11, SoundManager::kFlag11, SoundManager::kFlag10, SoundManager::kFlag10, SoundManager::kFlag9, SoundManager::kFlag9, SoundManager::kFlag8, SoundManager::kFlag8,
- SoundManager::kFlag7, SoundManager::kFlag7, SoundManager::kFlag7, SoundManager::kFlag6, SoundManager::kFlag6, SoundManager::kFlag6,
- SoundManager::kFlag5, SoundManager::kFlag5, SoundManager::kFlag5, SoundManager::kFlag5, SoundManager::kFlag4, SoundManager::kFlag4, SoundManager::kFlag4, SoundManager::kFlag4,
- SoundManager::kFlag3, SoundManager::kFlag3, SoundManager::kFlag3, SoundManager::kFlag3, SoundManager::kFlag3
+static const SoundFlag soundFlags[32] = {
+ kFlagDefault,
+ kFlag15,
+ kFlag14,
+ kFlag13,
+ kFlag12,
+ kFlag11, kFlag11,
+ kFlag10, kFlag10,
+ kFlag9, kFlag9,
+ kFlag8, kFlag8,
+ kFlag7, kFlag7, kFlag7,
+ kFlag6, kFlag6, kFlag6,
+ kFlag5, kFlag5, kFlag5, kFlag5,
+ kFlag4, kFlag4, kFlag4, kFlag4,
+ kFlag3, kFlag3, kFlag3, kFlag3, kFlag3
};
-SoundManager::SoundManager(LastExpressEngine *engine) : _engine(engine), _state(0), _currentType(kSoundType16), _flag(0) {
+SoundManager::SoundManager(LastExpressEngine *engine) : _engine(engine) {
+ _loopingSoundDuration = 0;
+
+ _queue = new SoundQueue(engine);
+
+ memset(&_lastWarning, 0, sizeof(_lastWarning));
+
// Initialize unknown data
_data0 = 0;
_data1 = 0;
_data2 = 0;
-
- memset(&_buffer, 0, sizeof(_buffer));
- memset(&_lastWarning, 0, sizeof(_lastWarning));
-
- // Sound cache
- _soundCacheData = malloc(6 * SOUNDCACHE_ENTRY_SIZE);
-
- _drawSubtitles = 0;
- _currentSubtitle = NULL;
}
SoundManager::~SoundManager() {
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
- SAFE_DELETE(*i);
- _soundList.clear();
-
- // Entries in the cache are just pointers to sound list entries
- _soundCache.clear();
-
- for (Common::List<SubtitleEntry *>::iterator i = _subtitles.begin(); i != _subtitles.end(); ++i)
- SAFE_DELETE(*i);
- _subtitles.clear();
-
- _currentSubtitle = NULL;
-
- free(_soundCacheData);
+ SAFE_DELETE(_queue);
// Zero passed pointers
_engine = NULL;
}
//////////////////////////////////////////////////////////////////////////
-// Timer
-//////////////////////////////////////////////////////////////////////////
-void SoundManager::handleTimer() {
- Common::StackLock locker(_mutex);
-
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
- SoundEntry *entry = (*i);
- if (entry->stream == NULL) {
- SAFE_DELETE(*i);
- i = _soundList.reverse_erase(i);
- continue;
- } else if (!entry->soundStream) {
- entry->soundStream = new StreamedSound();
-
- // TODO: stream any sound in the queue after filtering
- entry->soundStream->load(entry->stream);
- }
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Sound queue management
-//////////////////////////////////////////////////////////////////////////
-void SoundManager::updateQueue() {
- // TODO add mutex lock!
- warning("Sound::updateQueue: not implemented!");
-}
-
-void SoundManager::resetQueue(SoundType type1, SoundType type2) {
- if (!type2)
- type2 = type1;
-
- Common::StackLock locker(_mutex);
-
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
- if ((*i)->type != type1 && (*i)->type != type2)
- resetEntry(*i);
- }
-}
-
-void SoundManager::removeFromQueue(EntityIndex entity) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(entity);
- if (entry)
- resetEntry(entry);
-}
-
-void SoundManager::removeFromQueue(Common::String filename) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(filename);
- if (entry)
- resetEntry(entry);
-}
-
-void SoundManager::clearQueue() {
- _flag |= 4;
-
- // FIXME: Wait a while for a flag to be set
- //for (int i = 0; i < 3000000; i++)
- // if (_flag & 8)
- // break;
-
- _flag |= 8;
-
- Common::StackLock locker(_mutex);
-
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
- SoundEntry *entry = (*i);
-
- // Delete entry
- removeEntry(entry);
- SAFE_DELETE(entry);
-
- i = _soundList.reverse_erase(i);
- }
-
- updateSubtitles();
-}
-
-bool SoundManager::isBuffered(EntityIndex entity) {
- Common::StackLock locker(_mutex);
-
- return (getEntry(entity) != NULL);
-}
-
-bool SoundManager::isBuffered(Common::String filename, bool testForEntity) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(filename);
-
- if (testForEntity)
- return entry != NULL && !entry->entity;
-
- return (entry != NULL);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Entry
-//////////////////////////////////////////////////////////////////////////
-void SoundManager::setupEntry(SoundEntry *entry, Common::String name, FlagType flag, int a4) {
- if (!entry)
- error("SoundManager::setupEntry: Invalid entry!");
-
- entry->field_4C = a4;
- setEntryType(entry, flag);
- setEntryStatus(entry, flag);
-
- // Add entry to sound list
- _soundList.push_back(entry);
-
- // TODO Add entry to cache and load sound data
- //setupCache(entry);
- loadSoundData(entry, name);
-}
-
-void SoundManager::setEntryType(SoundEntry *entry, FlagType flag) {
- switch (flag & kFlagType9) {
- default:
- case kFlagNone:
- entry->type = _currentType;
- _currentType = (SoundType)(_currentType + 1);
- break;
-
- case kFlagType1_2: {
- SoundEntry *previous2 = getEntry(kSoundType2);
- if (previous2)
- updateEntry(previous2, 0);
-
- SoundEntry *previous = getEntry(kSoundType1);
- if (previous) {
- previous->type = kSoundType2;
- updateEntry(previous, 0);
- }
-
- entry->type = kSoundType1;
- }
- break;
-
- case kFlagType3: {
- SoundEntry *previous = getEntry(kSoundType3);
- if (previous) {
- previous->type = kSoundType4;
- updateEntry(previous, 0);
- }
-
- entry->type = kSoundType11;
- }
- break;
-
- case kFlagType7: {
- SoundEntry *previous = getEntry(kSoundType7);
- if (previous)
- previous->type = kSoundType8;
-
- entry->type = kSoundType7;
- }
- break;
-
- case kFlagType9: {
- SoundEntry *previous = getEntry(kSoundType9);
- if (previous)
- previous->type = kSoundType10;
-
- entry->type = kSoundType9;
- }
- break;
-
- case kFlagType11: {
- SoundEntry *previous = getEntry(kSoundType11);
- if (previous)
- previous->type = kSoundType14;
-
- entry->type = kSoundType11;
- }
- break;
-
- case kFlagType13: {
- SoundEntry *previous = getEntry(kSoundType13);
- if (previous)
- previous->type = kSoundType14;
-
- entry->type = kSoundType13;
- }
- break;
- }
-}
-
-void SoundManager::setEntryStatus(SoundEntry *entry, FlagType flag) const {
- SoundStatus status = (SoundStatus)flag;
- if (!((status & 0xFF) & kSoundStatusClear1))
- status = (SoundStatus)(status | kSoundStatusClear2);
-
- if (((status & 0xFF00) >> 8) & kSoundStatusClear0)
- entry->status.status = (uint32)status;
- else
- entry->status.status = (status | kSoundStatusClear4);
-}
-
-void SoundManager::setInCache(SoundEntry *entry) {
- entry->status.status |= kSoundStatusClear2;
-}
-
-bool SoundManager::setupCache(SoundEntry *entry) {
- if (entry->soundData)
- return true;
-
- if (_soundCache.size() >= SOUNDCACHE_MAX_SIZE) {
-
- SoundEntry *cacheEntry = NULL;
- uint32 size = 1000;
-
- for (Common::List<SoundEntry *>::iterator i = _soundCache.begin(); i != _soundCache.end(); ++i) {
- if (!((*i)->status.status & kSoundStatus_180)) {
- uint32 newSize = (*i)->field_4C + ((*i)->status.status & kSoundStatusClear1);
-
- if (newSize < size) {
- cacheEntry = (*i);
- size = newSize;
- }
- }
- }
-
- if (entry->field_4C <= size)
- return false;
-
- if (cacheEntry)
- setInCache(cacheEntry);
-
- // TODO: Wait until the cache entry is ready to be removed
- while (!(cacheEntry->status.status1 & 1))
- ;
-
- if (cacheEntry->soundData)
- removeFromCache(cacheEntry);
-
- _soundCache.push_back(entry);
- entry->soundData = (char *)_soundCacheData + SOUNDCACHE_ENTRY_SIZE * (_soundCache.size() - 1);
- } else {
- _soundCache.push_back(entry);
- entry->soundData = (char *)_soundCacheData + SOUNDCACHE_ENTRY_SIZE * (_soundCache.size() - 1);
- }
-
- return true;
-}
-
-void SoundManager::removeFromCache(SoundEntry *entry) {
- for (Common::List<SoundEntry *>::iterator i = _soundCache.begin(); i != _soundCache.end(); ++i) {
- if ((*i) == entry) {
- // Remove sound buffer
- entry->soundData = NULL;
-
- // Remove entry from sound cache
- i = _soundCache.reverse_erase(i);
- }
- }
-}
-
-void SoundManager::clearStatus() {
- Common::StackLock locker(_mutex);
-
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
- (*i)->status.status |= kSoundStatusClear3;
-}
-
-void SoundManager::loadSoundData(SoundEntry *entry, Common::String name) {
- entry->name2 = name;
-
- // Load sound data
- entry->stream = getArchive(name);
-
- if (!entry->stream)
- entry->stream = getArchive("DEFAULT.SND");
-
- if (entry->stream) {
- warning("Sound::loadSoundData: not implemented!");
- } else {
- entry->status.status = kSoundStatusRemoved;
- }
-}
-
-void SoundManager::resetEntry(SoundEntry *entry) const {
- entry->status.status |= kSoundStatusRemoved;
- entry->entity = kEntityPlayer;
-
- if (entry->stream) {
- if (!entry->soundStream) {
- SAFE_DELETE(entry->stream);
- } else {
- entry->soundStream->stop();
- SAFE_DELETE(entry->soundStream);
- }
-
- entry->stream = NULL;
- }
-}
-
-
-void SoundManager::removeEntry(SoundEntry *entry) {
- entry->status.status |= kSoundStatusRemoved;
-
- // Loop until ready
- while (!(entry->status.status1 & 4) && !(_flag & 8) && (_flag & 1))
- ; // empty loop body
-
- // The original game remove the entry from the cache here,
- // but since we are called from within an iterator loop
- // we will remove the entry there
- // removeFromCache(entry);
-
- if (entry->subtitle) {
- drawSubtitle(entry->subtitle);
- SAFE_DELETE(entry->subtitle);
- }
-
- if (entry->entity) {
- if (entry->entity == kEntitySteam)
- playLoopingSound();
- else if (entry->entity != kEntityTrain)
- getSavePoints()->push(kEntityPlayer, entry->entity, kActionEndSound);
- }
-}
-
-void SoundManager::updateEntry(SoundEntry *entry, uint value) const {
- if (!(entry->status.status3 & 64)) {
- int value2 = value;
-
- entry->status.status |= kSoundStatus_100000;
-
- if (value) {
- if (_flag & 32) {
- entry->field_40 = value;
- value2 = value * 2 + 1;
- }
-
- entry->field_3C = value2;
- } else {
- entry->field_3C = 0;
- entry->status.status |= kSoundStatus_40000000;
- }
- }
-}
-
-void SoundManager::updateEntryState(SoundEntry *entry) const {
- if (_flag & 32) {
- if (entry->type != kSoundType9 && entry->type != kSoundType7 && entry->type != kSoundType5) {
- uint32 status = entry->status.status & kSoundStatusClear1;
-
- entry->status.status &= kSoundStatusClearAll;
-
- entry->field_40 = status;
- entry->status.status |= status * 2 + 1;
- }
- }
-
- entry->status.status |= kSoundStatus_20;
-}
-
-void SoundManager::processEntry(EntityIndex entity) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(entity);
- if (entry) {
- updateEntry(entry, 0);
- entry->entity = kEntityPlayer;
- }
-}
-
-void SoundManager::processEntry(SoundType type) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(type);
- if (entry)
- updateEntry(entry, 0);
-}
-
-void SoundManager::setupEntry(SoundType type, EntityIndex index) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(type);
- if (entry)
- entry->entity = index;
-}
-
-void SoundManager::processEntry(Common::String filename) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(filename);
- if (entry) {
- updateEntry(entry, 0);
- entry->entity = kEntityPlayer;
- }
-}
-
-void SoundManager::processEntries() {
- _state = 0;
-
- processEntry(kSoundType1);
- processEntry(kSoundType2);
-}
-
-uint32 SoundManager::getEntryTime(EntityIndex index) {
- Common::StackLock locker(_mutex);
-
- SoundEntry *entry = getEntry(index);
- if (entry)
- return entry->time;
-
- return 0;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Misc
-//////////////////////////////////////////////////////////////////////////
-
-void SoundManager::unknownFunction4() {
- // TODO: Add mutex ?
- warning("Sound::unknownFunction4: not implemented!");
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Entry search
-//////////////////////////////////////////////////////////////////////////
-SoundManager::SoundEntry *SoundManager::getEntry(EntityIndex index) {
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
- if ((*i)->entity == index)
- return *i;
- }
-
- return NULL;
-}
-
-SoundManager::SoundEntry *SoundManager::getEntry(Common::String name) {
- if (!name.contains('.'))
- name += ".SND";
-
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
- if ((*i)->name2 == name)
- return *i;
- }
-
- return NULL;
-}
-
-SoundManager::SoundEntry *SoundManager::getEntry(SoundType type) {
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
- if ((*i)->type == type)
- return *i;
- }
-
- return NULL;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Savegame
-//////////////////////////////////////////////////////////////////////////
-void SoundManager::saveLoadWithSerializer(Common::Serializer &s) {
- s.syncAsUint32LE(_state);
- s.syncAsUint32LE(_currentType);
-
- // Compute the number of entries to save
- uint32 numEntries = count();
- s.syncAsUint32LE(numEntries);
-
- Common::StackLock locker(_mutex);
-
- // Save or load each entry data
- if (s.isSaving()) {
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
- SoundEntry *entry = *i;
- if (entry->name2.matchString("NISSND?") && (entry->status.status & kFlagType7) != kFlag3) {
- s.syncAsUint32LE(entry->status.status); // status;
- s.syncAsUint32LE(entry->type); // type;
- s.syncAsUint32LE(entry->field_1C); // field_8;
- s.syncAsUint32LE(entry->time); // time;
- s.syncAsUint32LE(entry->field_34); // field_10;
- s.syncAsUint32LE(entry->field_38); // field_14;
- s.syncAsUint32LE(entry->entity); // entity;
-
- uint32 field_1C = (uint32)entry->field_48 - _data2;
- if (field_1C > kFlag8)
- field_1C = 0;
- s.syncAsUint32LE(field_1C); // field_1C;
-
- s.syncAsUint32LE(entry->field_4C); // field_20;
-
- char name1[16];
- strcpy((char *)&name1, entry->name1.c_str());
- s.syncBytes((byte *)&name1, 16);
-
- char name2[16];
- strcpy((char *)&name2, entry->name2.c_str());
- s.syncBytes((byte *)&name2, 16);
- }
- }
- } else {
- warning("Sound::saveLoadWithSerializer: not implemented!");
- s.skip(numEntries * 64);
- }
-}
-
-
-// FIXME: We probably need another mutex here to protect during the whole savegame process
-// as we could have removed an entry between the time we check the count and the time we
-// save the entries
-uint32 SoundManager::count() {
- Common::StackLock locker(_mutex);
-
- uint32 numEntries = 0;
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
- if ((*i)->name2.matchString("NISSND?"))
- ++numEntries;
-
- return numEntries;
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Game-related functions
+// Sound-related functions
//////////////////////////////////////////////////////////////////////////
-void SoundManager::playSound(EntityIndex entity, Common::String filename, FlagType flag, byte a4) {
- if (isBuffered(entity) && entity)
- removeFromQueue(entity);
+void SoundManager::playSound(EntityIndex entity, Common::String filename, SoundFlag flag, byte a4) {
+ if (_queue->isBuffered(entity) && entity)
+ _queue->removeFromQueue(entity);
- FlagType currentFlag = (flag == -1) ? getSoundFlag(entity) : (FlagType)(flag | 0x80000);
+ SoundFlag currentFlag = (flag == -1) ? getSoundFlag(entity) : (SoundFlag)(flag | 0x80000);
// Add .SND at the end of the filename if needed
if (!filename.contains('.'))
@@ -675,27 +151,29 @@ void SoundManager::playSound(EntityIndex entity, Common::String filename, FlagTy
getSavePoints()->push(kEntityPlayer, entity, kActionEndSound);
}
-bool SoundManager::playSoundWithSubtitles(Common::String filename, FlagType flag, EntityIndex entity, byte a4) {
- SoundEntry *entry = new SoundEntry();
-
- Common::StackLock locker(_mutex);
+bool SoundManager::playSoundWithSubtitles(Common::String filename, SoundFlag flag, EntityIndex entity, byte a4) {
+ SoundEntry *entry = new SoundEntry(_engine);
- setupEntry(entry, filename, flag, 30);
- entry->entity = entity;
+ entry->open(filename, flag, 30);
+ entry->setEntity(entity);
if (a4) {
- entry->field_48 = _data2 + 2 * a4;
- entry->status.status |= kSoundStatus_8000;
+ entry->setField48(_data2 + 2 * a4);
+ entry->setStatus(entry->getStatus().status | kSoundStatus_8000);
} else {
// Get subtitles name
- while (filename.size() > 4)
+ uint32 size = filename.size();
+ while (filename.size() > size - 4)
filename.deleteLastChar();
- showSubtitle(entry, filename);
- updateEntryState(entry);
+ entry->showSubtitle(filename);
+ entry->updateState();
}
- return (entry->type != kSoundTypeNone);
+ // Add entry to sound list
+ _queue->addToQueue(entry);
+
+ return (entry->getType() != kSoundTypeNone);
}
void SoundManager::playSoundEvent(EntityIndex entity, byte action, byte a3) {
@@ -708,7 +186,7 @@ void SoundManager::playSoundEvent(EntityIndex entity, byte action, byte a3) {
return;
int _action = (int)action;
- FlagType flag = getSoundFlag(entity);
+ SoundFlag flag = getSoundFlag(entity);
switch (action) {
case 36: {
@@ -826,17 +304,17 @@ void SoundManager::playSoundEvent(EntityIndex entity, byte action, byte a3) {
void SoundManager::playSteam(CityIndex index) {
if (index >= ARRAYSIZE(cities))
- error("SoundManager::playSteam: invalid city index (was %d, max %d)", index, ARRAYSIZE(cities));
+ error("[SoundManager::playSteam] Invalid city index (was %d, max %d)", index, ARRAYSIZE(cities));
- _state |= kSoundState2;
+ _queue->resetState(kSoundState2);
- if (!getEntry(kSoundType1))
+ if (!_queue->getEntry(kSoundType1))
playSoundWithSubtitles("STEAM.SND", kFlagSteam, kEntitySteam);
// Get the new sound entry and show subtitles
- SoundEntry *entry = getEntry(kSoundType1);
+ SoundEntry *entry = _queue->getEntry(kSoundType1);
if (entry)
- showSubtitle(entry, cities[index]);
+ entry->showSubtitle(cities[index]);
}
void SoundManager::playFightSound(byte action, byte a4) {
@@ -883,15 +361,15 @@ void SoundManager::playFightSound(byte action, byte a4) {
playSound(kEntityTrain, Common::String::format("LIB%03d.SND", _action), kFlagDefault, a4);
}
-void SoundManager::playDialog(EntityIndex entity, EntityIndex entityDialog, FlagType flag, byte a4) {
- if (isBuffered(getDialogName(entityDialog)))
- removeFromQueue(getDialogName(entityDialog));
+void SoundManager::playDialog(EntityIndex entity, EntityIndex entityDialog, SoundFlag flag, byte a4) {
+ if (_queue->isBuffered(getDialogName(entityDialog)))
+ _queue->removeFromQueue(getDialogName(entityDialog));
playSound(entity, getDialogName(entityDialog), flag, a4);
}
void SoundManager::playLocomotiveSound() {
- playSound(kEntityPlayer, locomotiveSounds[rnd(5)], (FlagType)(rnd(15) + 2));
+ playSound(kEntityPlayer, locomotiveSounds[rnd(5)], (SoundFlag)(rnd(15) + 2));
}
const char *SoundManager::getDialogName(EntityIndex entity) const {
@@ -1198,19 +676,19 @@ const char *SoundManager::getDialogName(EntityIndex entity) const {
// Letters & Messages
//////////////////////////////////////////////////////////////////////////
void SoundManager::readText(int id){
- if (!isBuffered(kEntityTables4))
+ if (!_queue->isBuffered(kEntityTables4))
return;
if (id < 0 || (id > 8 && id < 50) || id > 64)
- error("Sound::readText - attempting to use invalid id. Valid values [1;8] - [50;64], was %d", id);
+ error("[Sound::readText] Attempting to use invalid id. Valid values [1;8] - [50;64], was %d", id);
// Get proper message file (names are stored in sequence in the array but id is [1;8] - [50;64])
const char *text = messages[id <= 8 ? id : id - 41];
// Check if file is in cache for id [1;8]
if (id <= 8)
- if (isBuffered(text))
- removeFromQueue(text);
+ if (_queue->isBuffered(text))
+ _queue->removeFromQueue(text);
playSound(kEntityTables4, text, kFlagDefault);
}
@@ -1397,8 +875,8 @@ void SoundManager::playWarningCompartment(EntityIndex entity, ObjectIndex compar
_lastWarning[compartment - 28] = getState()->timeTicks;
}
-void SoundManager::excuseMe(EntityIndex entity, EntityIndex entity2, FlagType flag) {
- if (isBuffered(entity) && entity != kEntityPlayer && entity != kEntityChapters && entity != kEntityTrain)
+void SoundManager::excuseMe(EntityIndex entity, EntityIndex entity2, SoundFlag flag) {
+ if (_queue->isBuffered(entity) && entity != kEntityPlayer && entity != kEntityChapters && entity != kEntityTrain)
return;
if (entity2 == kEntityFrancois || entity2 == kEntityMax)
@@ -1747,7 +1225,7 @@ const char *SoundManager::justAMinuteCath() const {
//////////////////////////////////////////////////////////////////////////
// Sound flags
//////////////////////////////////////////////////////////////////////////
-SoundManager::FlagType SoundManager::getSoundFlag(EntityIndex entity) const {
+SoundFlag SoundManager::getSoundFlag(EntityIndex entity) const {
if (entity == kEntityPlayer)
return kFlagDefault;
@@ -1755,7 +1233,7 @@ SoundManager::FlagType SoundManager::getSoundFlag(EntityIndex entity) const {
return kFlagNone;
// Compute sound value
- FlagType ret = kFlag2;
+ SoundFlag ret = kFlag2;
// Get default value if valid
int index = ABS(getEntityData(entity)->entityPosition - getEntityData(kEntityPlayer)->entityPosition) / 230;
@@ -1768,7 +1246,7 @@ SoundManager::FlagType SoundManager::getSoundFlag(EntityIndex entity) const {
&& !getEntities()->isOutsideAnnaWindow())
return kFlagNone;
- return (FlagType)(ret / 6);
+ return (SoundFlag)(ret / 6);
}
switch (getEntityData(entity)->car) {
@@ -1777,25 +1255,25 @@ SoundManager::FlagType SoundManager::getSoundFlag(EntityIndex entity) const {
case kCarKronos:
if (getEntities()->isInKronosSalon(entity) != getEntities()->isInKronosSalon(kEntityPlayer))
- ret = (FlagType)(ret * 2);
+ ret = (SoundFlag)(ret * 2);
break;
case kCarGreenSleeping:
case kCarRedSleeping:
if (getEntities()->isInGreenCarEntrance(kEntityPlayer) && !getEntities()->isInKronosSalon(entity))
- ret = (FlagType)(ret * 2);
+ ret = (SoundFlag)(ret * 2);
if (getEntityData(kEntityPlayer)->location
&& (getEntityData(entity)->entityPosition != kPosition_1 || !getEntities()->isDistanceBetweenEntities(kEntityPlayer, entity, 400)))
- ret = (FlagType)(ret * 2);
+ ret = (SoundFlag)(ret * 2);
break;
case kCarRestaurant:
if (getEntities()->isInSalon(entity) == getEntities()->isInSalon(kEntityPlayer)
&& (getEntities()->isInRestaurant(entity) != getEntities()->isInRestaurant(kEntityPlayer)))
- ret = (FlagType)(ret * 2);
+ ret = (SoundFlag)(ret * 2);
else
- ret = (FlagType)(ret * 4);
+ ret = (SoundFlag)(ret * 4);
break;
}
@@ -1803,149 +1281,103 @@ SoundManager::FlagType SoundManager::getSoundFlag(EntityIndex entity) const {
}
//////////////////////////////////////////////////////////////////////////
-// Subtitles
+// Misc
//////////////////////////////////////////////////////////////////////////
-void SoundManager::updateSubtitles() {
- Common::StackLock locker(_mutex);
-
- uint32 index = 0;
- SubtitleEntry *subtitle = NULL;
-
- for (Common::List<SubtitleEntry *>::iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) {
- uint32 current_index = 0;
- SoundEntry *soundEntry = (*i)->sound;
- SoundStatus status = (SoundStatus)soundEntry->status.status;
-
- if (!(status & kSoundStatus_40)
- || status & 0x180
- || soundEntry->time == 0
- || (status & 0x1F) < 6
- || ((getFlags()->nis & 0x8000) && soundEntry->field_4C < 90)) {
- current_index = 0;
- } else {
- current_index = soundEntry->field_4C + (status & 0x1F);
-
- if (_currentSubtitle == (*i))
- current_index += 4;
- }
-
- if (index < current_index) {
- index = current_index;
- subtitle = (*i);
- }
- }
-
- if (_currentSubtitle == subtitle) {
- if (subtitle)
- setupSubtitleAndDraw(subtitle);
-
- return;
- }
-
- if (_drawSubtitles & 1)
- drawSubtitleOnScreen(subtitle);
-
- if (subtitle) {
- loadSubtitleData(subtitle);
- setupSubtitleAndDraw(subtitle);
- }
-}
-
-void SoundManager::showSubtitle(SoundEntry *entry, Common::String filename) {
- entry->subtitle = loadSubtitle(filename, entry);
-
- if (entry->subtitle->status.status2 & 4) {
- drawSubtitle(entry->subtitle);
- SAFE_DELETE(entry->subtitle);
- } else {
- entry->status.status |= kSoundStatus_20000;
- }
-}
+void SoundManager::playLoopingSound(int param) {
+ SoundEntry *entry = _queue->getEntry(kSoundType1);
-SoundManager::SubtitleEntry *SoundManager::loadSubtitle(Common::String filename, SoundEntry *soundEntry) {
- SubtitleEntry *entry = new SubtitleEntry();
- _subtitles.push_back(entry);
+ static const EntityPosition positions[8] = { kPosition_8200, kPosition_7500,
+ kPosition_6470, kPosition_5790,
+ kPosition_4840, kPosition_4070,
+ kPosition_3050, kPosition_2740 };
- // Set sound entry and filename
- entry->filename = filename + ".SBE";
- entry->sound = soundEntry;
+ byte numLoops[8];
+ numLoops[1] = 4;
+ numLoops[2] = 2;
+ numLoops[3] = 2;
+ numLoops[4] = 2;
+ numLoops[5] = 2;
+ numLoops[6] = 2;
- // Load subtitle data
- if (_engine->getResourceManager()->hasFile(filename)) {
- if (_drawSubtitles & 2)
- return entry;
+ char tmp[80];
+ tmp[0] = 0;
- loadSubtitleData(entry);
- } else {
- entry->status.status = kSoundStatus_400;
- }
+ int partNumber = 1;
+ int fnameLen = 6;
- return entry;
-}
-
-void SoundManager::loadSubtitleData(SubtitleEntry * entry) {
- entry->data = new SubtitleManager(_engine->getFont());
- entry->data->load(getArchive(entry->filename));
+ if (_queue->getSoundState() & kSoundState1 && param >= 0x45 && param <= 0x46) {
+ if (_queue->getSoundState() & kSoundState2) {
+ strcpy(tmp, "STEAM.SND");
- _drawSubtitles |= 2;
- _currentSubtitle = entry;
-}
+ _loopingSoundDuration = 32767;
+ } else {
+ if (getEntityData(kEntityPlayer)->location == kLocationOutsideTrain) {
+ partNumber = 6;
+ } else {
+ if (getEntities()->isInsideCompartments(kEntityPlayer)) {
+ int objNum = (getEntityData(kEntityPlayer)->car - 3) < 1 ? 9 : 40; // Weird numbers
+
+ numLoops[0] = 0;
+
+ for (int pos = 0; pos < 8; pos++) {
+ if (numLoops[0])
+ break;
+ if (getEntities()->isInsideCompartment(kEntityPlayer, getEntityData(kEntityPlayer)->car, positions[pos])) {
+ numLoops[0] = 1;
+ partNumber = (getObjects()->get((ObjectIndex)objNum).location - 2) < 1 ? 6 : 1;
+ }
+ objNum++;
+ }
+ } else {
+ switch (getEntityData(kEntityPlayer)->car) {
+ case 1:
+ case 6:
+ partNumber = 4;
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ partNumber = 1;
+ break;
+ case 7:
+ partNumber = 5;
+ break;
+ case 8:
+ partNumber = 99;
+ break;
+ case 9:
+ partNumber = 3;
+ break;
+ default:
+ partNumber = 6;
+ break;
+ }
+ }
+ }
-void SoundManager::setupSubtitleAndDraw(SubtitleEntry *subtitle) {
- if (!subtitle->data) {
- subtitle->data = new SubtitleManager(_engine->getFont());
- subtitle->data->load(getArchive(subtitle->filename));
- }
+ if (partNumber != 99)
+ sprintf(tmp, "LOOP%d%c.SND", partNumber, _engine->getRandom().getRandomNumber(numLoops[partNumber] - 1) + 'A');
+ }
- if (subtitle->data->getMaxTime() > subtitle->sound->time) {
- subtitle->status.status = kSoundStatus_400;
- } else {
- subtitle->data->setTime((uint16)subtitle->sound->time);
+ if (getFlags()->flag_3)
+ fnameLen = 5;
- if (_drawSubtitles & 1)
- drawSubtitleOnScreen(subtitle);
- }
+ if (!entry || scumm_strnicmp(entry->getName2().c_str(), tmp, fnameLen)) {
+ _loopingSoundDuration = _engine->getRandom().getRandomNumber(319) + 260;
- _currentSubtitle = subtitle;
-}
+ if (partNumber != 99) {
+ playSoundWithSubtitles(tmp, kFlagLoopedSound, kEntitySteam);
-void SoundManager::drawSubtitle(SubtitleEntry *subtitle) {
- // Remove subtitle from queue
- _subtitles.remove(subtitle);
+ if (entry)
+ entry->update(0);
- if (subtitle == _currentSubtitle) {
- drawSubtitleOnScreen(subtitle);
-
- _currentSubtitle = NULL;
- _drawSubtitles = 0;
+ SoundEntry *entry1 = _queue->getEntry(kSoundType1);
+ if (entry1)
+ entry1->update(7);
+ }
+ }
}
}
-void SoundManager::drawSubtitleOnScreen(SubtitleEntry *subtitle) {
- if (!subtitle)
- error("SoundManager::drawSubtitleOnScreen: Invalid subtitle entry!");
-
- _drawSubtitles &= ~1;
-
- if (subtitle->data == NULL)
- return;
-
- if (_drawSubtitles & 1)
- _engine->getGraphicsManager()->draw(subtitle->data, GraphicsManager::kBackgroundOverlay);
-}
-
-//////////////////////////////////////////////////////////////////////////
-// Misc
-//////////////////////////////////////////////////////////////////////////
-void SoundManager::playLoopingSound() {
- warning("SoundManager::playLoopingSound: not implemented!");
-}
-
-void SoundManager::stopAllSound() {
- Common::StackLock locker(_mutex);
-
- for (Common::List<SoundEntry *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i)
- (*i)->soundStream->stop();
-}
-
} // End of namespace LastExpress
diff --git a/engines/lastexpress/sound/sound.h b/engines/lastexpress/sound/sound.h
new file mode 100644
index 0000000000..517543f470
--- /dev/null
+++ b/engines/lastexpress/sound/sound.h
@@ -0,0 +1,93 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 LASTEXPRESS_SOUND_H
+#define LASTEXPRESS_SOUND_H
+
+#include "lastexpress/shared.h"
+
+#include "common/str.h"
+
+namespace LastExpress {
+
+class LastExpressEngine;
+class SoundQueue;
+
+class SoundManager {
+public:
+ SoundManager(LastExpressEngine *engine);
+ ~SoundManager();
+
+ // Sound playing
+ void playSound(EntityIndex entity, Common::String filename, SoundFlag flag = kFlagInvalid, byte a4 = 0);
+ bool playSoundWithSubtitles(Common::String filename, SoundFlag flag, EntityIndex entity, byte a4 = 0);
+ void playSoundEvent(EntityIndex entity, byte action, byte a3 = 0);
+ void playDialog(EntityIndex entity, EntityIndex entityDialog, SoundFlag flag, byte a4);
+ void playSteam(CityIndex index);
+ void playFightSound(byte action, byte a4);
+ void playLocomotiveSound();
+ void playWarningCompartment(EntityIndex entity, ObjectIndex compartment);
+ void playLoopingSound(int param);
+
+ // Dialog & Letters
+ void readText(int id);
+ const char *getDialogName(EntityIndex entity) const;
+
+ // Sound bites
+ void excuseMe(EntityIndex entity, EntityIndex entity2 = kEntityPlayer, SoundFlag flag = kFlagNone);
+ void excuseMeCath();
+ const char *justCheckingCath() const;
+ const char *wrongDoorCath() const;
+ const char *justAMinuteCath() const;
+
+ // Flags
+ SoundFlag getSoundFlag(EntityIndex index) const;
+
+ // Accessors
+ SoundQueue *getQueue() { return _queue; }
+ uint32 getData0() { return _data0; }
+ int32 getData1() { return _data1; }
+ int32 getData2() { return _data2; }
+ uint32 getLoopingSoundDuration() { return _loopingSoundDuration; }
+
+ // Setters
+ void setData1(int32 data) { _data1 = data; }
+
+private:
+ LastExpressEngine *_engine;
+ SoundQueue *_queue;
+
+ // Compartment warnings by Mertens or Coudert
+ uint32 _lastWarning[12];
+
+ // Looping sound
+ int _loopingSoundDuration;
+
+ // Unknown data
+ uint32 _data0;
+ int32 _data1;
+ int32 _data2;
+};
+
+} // End of namespace LastExpress
+
+#endif // LASTEXPRESS_SOUND_H
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index 68410875f7..ef4a22f73a 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -549,14 +549,19 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) {
}
bool Debugger::cmd_saveStrings(int argc, const char **argv) {
- StringData &strings = StringData::getReference();
- char buffer[32768];
-
if (argc != 2) {
DebugPrintf("strings <stringId>\n");
return true;
}
+ StringData &strings = StringData::getReference();
+
+ char *buffer = (char *)malloc(32768);
+ if (!buffer) {
+ DebugPrintf("Cannot allocate strings buffer\n");
+ return true;
+ }
+
uint16 id = strToInt(argv[1]);
strings.getString(id, buffer, NULL, NULL);
DebugPrintf("%s\n", buffer);
@@ -577,6 +582,9 @@ bool Debugger::cmd_saveStrings(int argc, const char **argv) {
DebugPrintf("Done\n");
*/
+
+ free(buffer);
+
return true;
}
diff --git a/engines/lure/disk.cpp b/engines/lure/disk.cpp
index 9212508be0..552da73f18 100644
--- a/engines/lure/disk.cpp
+++ b/engines/lure/disk.cpp
@@ -98,7 +98,6 @@ void Disk::openFile(uint8 fileNum) {
error("Could not open %s", sFilename);
char buffer[7];
- uint32 bytesRead;
// If it's the support file, then move to the correct language area
@@ -130,7 +129,7 @@ void Disk::openFile(uint8 fileNum) {
// Validate the header
- bytesRead = _fileHandle->read(buffer, 6);
+ _fileHandle->read(buffer, 6);
buffer[6] = '\0';
if (strcmp(buffer, HEADER_IDENT_STRING) != 0)
error("The file %s was not a valid VGA file", sFilename);
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index 97fbaa72ae..f38bac6e12 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -763,7 +763,7 @@ void Hotspot::showMessage(uint16 messageId, uint16 destCharacterId) {
MemoryBlock *data = res.messagesData();
Hotspot *hotspot;
uint8 *msgData = (uint8 *) data->data();
- uint16 v2, idVal;
+ uint16 idVal;
messageId &= 0x7fff;
// Skip through header to find table for given character
@@ -781,7 +781,6 @@ void Hotspot::showMessage(uint16 messageId, uint16 destCharacterId) {
// Scan through secondary list
uint16 *v = (uint16 *) (msgData + READ_LE_UINT16(msgData + idx + sizeof(uint16)));
- v2 = 0;
while ((idVal = READ_LE_UINT16(v)) != 0xffff) {
++v;
if (READ_LE_UINT16(v) == messageId) break;
diff --git a/engines/lure/memory.cpp b/engines/lure/memory.cpp
index c5c28fa8bc..137a8f6bee 100644
--- a/engines/lure/memory.cpp
+++ b/engines/lure/memory.cpp
@@ -93,8 +93,12 @@ void MemoryBlock::copyFrom(const byte *src, uint32 srcPos, uint32 destPos, uint3
void MemoryBlock::reallocate(uint32 size1) {
_size = size1;
- _data = (byte *) realloc(_data, size1);
- if (!_data) error ("Failed reallocating memory block");
+
+ byte *tmp = (byte *) realloc(_data, size1);
+ if (!tmp)
+ error ("[MemoryBlock::reallocate] Failed reallocating memory block");
+
+ _data = tmp;
}
} // End of namespace Lure
diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h
index 49b6ef78ba..8d6c557297 100644
--- a/engines/lure/res_struct.h
+++ b/engines/lure/res_struct.h
@@ -470,7 +470,7 @@ public:
bool isEmpty() const { return _actions.begin() == _actions.end(); }
void clear() { _actions.clear(); }
CurrentActionEntry &top() { return **_actions.begin(); }
- CurrentActionEntry &bottom() {
+ CurrentActionEntry &bottom() {
ActionsList::iterator i = _actions.end();
--i;
return **i;
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index cf28e0bb74..85b86a8400 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -31,7 +31,9 @@
#include "common/endian.h"
#include "audio/midiparser.h"
+namespace Common {
DECLARE_SINGLETON(Lure::SoundManager);
+}
namespace Lure {
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp
index 39a3f175cd..4f315dd396 100644
--- a/engines/m4/animation.cpp
+++ b/engines/m4/animation.cpp
@@ -91,7 +91,7 @@ void MadsAnimation::initialize(const Common::String &filename, uint16 flags, M4S
_scrollY = animStream->readSint16LE();
_scrollTicks = animStream->readUint16LE();
animStream->skip(8);
-
+
animStream->read(buffer, FILENAME_SIZE);
buffer[FILENAME_SIZE] = '\0';
_interfaceFile = Common::String(buffer);
@@ -230,7 +230,7 @@ void MadsAnimation::initialize(const Common::String &filename, uint16 flags, M4S
// Load all the sprite sets for the animation
for (int i = 0; i < spriteListCount; ++i) {
if (_field12 && (i == _spriteListIndex))
- // Skip over field, since it's manually loaded
+ // Skip over field, since it's manually loaded
continue;
_spriteListIndexes[i] = _view->_spriteSlots.addSprites(_spriteSetNames[i].c_str());
@@ -242,7 +242,7 @@ void MadsAnimation::initialize(const Common::String &filename, uint16 flags, M4S
if (madsRes)
resName += "*";
resName += _spriteSetNames[_spriteListIndex];
-
+
_spriteListIndexes[_spriteListIndex] = _view->_spriteSlots.addSprites(resName.c_str());
}
@@ -298,7 +298,7 @@ void MadsAnimation::update() {
if (_field12) {
int spriteListIndex = _spriteListIndexes[_spriteListIndex];
int newIndex = -1;
-
+
for (uint idx = _oldFrameEntry; idx < _frameEntries.size(); ++idx) {
if (_frameEntries[idx].frameNumber > _currentFrame)
break;
@@ -378,7 +378,7 @@ void MadsAnimation::update() {
if (_frameEntries[_oldFrameEntry].frameNumber > _currentFrame)
break;
else if (_frameEntries[_oldFrameEntry].frameNumber == _currentFrame) {
- // Found the correct frame
+ // Found the correct frame
int spriteSlotIndex = 0;
int index = 0;
@@ -393,14 +393,14 @@ void MadsAnimation::update() {
}
++index;
continue;
- }
-
+ }
+
if (spriteSlotIndex == 0) {
int slotIndex = _view->_spriteSlots.getIndex();
MadsSpriteSlot &slot = _view->_spriteSlots[slotIndex];
slot.copy(_frameEntries[_oldFrameEntry].spriteSlot);
slot.seqIndex = _frameEntries[_oldFrameEntry].seqIndex + 0x80;
-
+
SpriteAsset &spriteSet = _view->_spriteSlots.getSprite(
_view->_spriteSlots[slotIndex].spriteListIndex);
slot.spriteType = spriteSet.isBackground() ? BACKGROUND_SPRITE : FOREGROUND_SPRITE;
@@ -408,7 +408,7 @@ void MadsAnimation::update() {
break;
}
}
-
+
++_oldFrameEntry;
}
diff --git a/engines/m4/assets.cpp b/engines/m4/assets.cpp
index 8ffdeb53e0..d6cc71e133 100644
--- a/engines/m4/assets.cpp
+++ b/engines/m4/assets.cpp
@@ -97,8 +97,8 @@ long *DataAsset::getRow(int index) {
return &_data[_recSize * index];
}
-SpriteAsset::SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
- bool asStream, int flags) :
+SpriteAsset::SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
+ bool asStream, int flags) :
BaseAsset(vm) {
_stream = stream;
_palInterface = NULL;
@@ -285,7 +285,7 @@ void SpriteAsset::loadMadsSpriteAsset(MadsM4Engine *vm, Common::SeekableReadStre
// Load the frame
Common::MemoryReadStream *rs = new Common::MemoryReadStream(destData, frameSizes[curFrame]);
- _frames[curFrame].frame = new M4Sprite(rs, _frames[curFrame].x, _frames[curFrame].y,
+ _frames[curFrame].frame = new M4Sprite(rs, _frames[curFrame].x, _frames[curFrame].y,
_frames[curFrame].w, _frames[curFrame].h, false);
delete rs;
@@ -634,7 +634,7 @@ MadsSpriteSetCharInfo::MadsSpriteSetCharInfo(Common::SeekableReadStream *s) {
_totalFrames = s->readByte();
s->skip(1);
_numEntries = s->readUint16LE();
-
+
for (int i = 0; i < 16; ++i)
_frameList[i] = s->readUint16LE();
for (int i = 0; i < 16; ++i)
diff --git a/engines/m4/assets.h b/engines/m4/assets.h
index 90670dde53..25996a421e 100644
--- a/engines/m4/assets.h
+++ b/engines/m4/assets.h
@@ -115,7 +115,7 @@ public:
class SpriteAsset : public BaseAsset {
public:
- SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
+ SpriteAsset(MadsM4Engine *vm, Common::SeekableReadStream* stream, int size, const char *name,
bool asStream = false, int flags = 0);
SpriteAsset(MadsM4Engine *vm, const char *name);
~SpriteAsset();
@@ -151,7 +151,7 @@ protected:
Common::Array<uint32> _frameOffsets;
Common::Array<SpriteAssetFrame> _frames;
uint32 _frameStartOffset;
-
+
// MADS sprite set fields
uint8 _mode;
bool _isBackground;
diff --git a/engines/m4/detection.cpp b/engines/m4/detection.cpp
index 02ed967777..9c359c081f 100644
--- a/engines/m4/detection.cpp
+++ b/engines/m4/detection.cpp
@@ -79,7 +79,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -95,7 +95,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::DE_DEU,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -111,7 +111,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::RU_RUS,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -127,7 +127,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -143,7 +143,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Burger,
@@ -159,7 +159,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -175,7 +175,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -191,7 +191,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::DE_DEU,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -207,7 +207,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::FR_FRA,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -223,7 +223,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::ES_ESP,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -239,7 +239,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Riddle,
@@ -255,7 +255,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NOSPEECH
},
GType_RexNebular,
@@ -271,7 +271,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_RexNebular,
@@ -287,7 +287,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NOSPEECH
},
GType_DragonSphere,
@@ -304,7 +304,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_DragonSphere,
@@ -320,7 +320,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_DragonSphere,
@@ -336,7 +336,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NOSPEECH
},
GType_Phantom,
@@ -352,7 +352,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GType_Phantom,
@@ -368,7 +368,7 @@ static const M4GameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
GUIO_NONE
},
GType_Phantom,
diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp
index afe2692753..2b2c479673 100644
--- a/engines/m4/dialogs.cpp
+++ b/engines/m4/dialogs.cpp
@@ -265,7 +265,7 @@ void Dialog::setupInputArea() {
*/
bool Dialog::matchCommand(const char *s1, const char *s2) {
bool result = scumm_strnicmp(s1, s2, strlen(s2)) == 0;
- _commandCase = isupper(*s1);
+ _commandCase = isupper(static_cast<unsigned char>(*s1));
return result;
}
@@ -532,7 +532,7 @@ void Dialog::display(MadsM4Engine *vm, int widthChars, const char **descEntries)
}
dlg->_lines[0].underline = true;
-
+
dlg->draw();
vm->_viewManager->addView(dlg);
vm->_viewManager->moveToFront(dlg);
@@ -554,7 +554,7 @@ void Dialog::getValue(MadsM4Engine *vm, const char *title, const char *text, int
vm->_viewManager->moveToFront(dlg);
// TODO: How to wait until the dialog is closed
-
+
}
} // End of namespace M4
diff --git a/engines/m4/events.cpp b/engines/m4/events.cpp
index f8225fba3e..b476d08c9c 100644
--- a/engines/m4/events.cpp
+++ b/engines/m4/events.cpp
@@ -253,7 +253,7 @@ bool Mouse::setCursorNum(int cursorIndex) {
_cursor = _cursorSprites->getFrame(cursorIndex);
// Set the cursor to the sprite
- CursorMan.replaceCursor((const byte *)_cursor->getBasePtr(), _cursor->width(), _cursor->height(),
+ CursorMan.replaceCursor((const byte *)_cursor->getBasePtr(), _cursor->width(), _cursor->height(),
_cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOR_INDEX);
return true;
diff --git a/engines/m4/font.h b/engines/m4/font.h
index b00a393811..5a9c73e5d5 100644
--- a/engines/m4/font.h
+++ b/engines/m4/font.h
@@ -108,7 +108,7 @@ public:
Font *getFont(const char *filename);
void setFont(const char *filename);
- Font *current() {
+ Font *current() {
assert(_currentFont);
return _currentFont;
}
diff --git a/engines/m4/globals.cpp b/engines/m4/globals.cpp
index bf2c3abe1c..f4aab8ae8f 100644
--- a/engines/m4/globals.cpp
+++ b/engines/m4/globals.cpp
@@ -414,7 +414,7 @@ const char *MadsGlobals::loadMessage(uint index) {
}
/**
- * Adds the specified scene number to list of scenes previously visited
+ * Adds the specified scene number to list of scenes previously visited
*/
void MadsGlobals::addVisitedScene(int newSceneNumber) {
if (!isSceneVisited(newSceneNumber))
@@ -539,7 +539,7 @@ void MadsObject::load(Common::SeekableReadStream *stream) {
}
void MadsObject::setRoom(int roomNumber) {
-
+
}
} // End of namespace M4
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index 786c975850..4c272de32c 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -408,7 +408,7 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest
* Copies a given image onto a destination surface with scaling, transferring only pixels that meet
* the specified depth requirement on a secondary surface contain depth information
*/
-void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
+void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
M4Surface *depthsSurface, int scale, int transparentColor) {
if (scale == 100) {
@@ -451,7 +451,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
}
src->freeData();
- depthsSurface->freeData();
+ depthsSurface->freeData();
return;
}
@@ -501,7 +501,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
widthAmount -= destRight;
if (widthAmount > 0)
spriteWidth -= widthAmount;
-
+
int spriteRight = spriteLeft + spriteWidth;
if (spriteWidth <= 0)
return;
@@ -568,7 +568,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
}
src->freeData();
- depthsSurface->freeData();
+ depthsSurface->freeData();
this->freeData();
}
@@ -919,7 +919,7 @@ void M4Surface::scrollY(int yAmount) {
// Vertically shift all the lines
Common::copy(pixelsP + (pitch * ySize), pixelsP + (pitch * height()), pixelsP);
// Transfer the buffered lines to the bottom of the screen
- Common::copy(tempData, tempData + blockSize, pixelsP + (pitch * (height() - ySize)));
+ Common::copy(tempData, tempData + blockSize, pixelsP + (pitch * (height() - ySize)));
}
::free(tempData);
@@ -945,7 +945,7 @@ void M4Surface::translate(RGBList *list, bool isTransparent) {
M4Surface *M4Surface::flipHorizontal() const {
M4Surface *dest = new M4Surface(width(), height());
dest->_rgbList = (this->_rgbList == NULL) ? NULL : this->_rgbList->clone();
-
+
byte *destP = dest->getBasePtr();
for (int y = 0; y < height(); ++y) {
diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h
index 242857ba1a..f3dde454f3 100644
--- a/engines/m4/graphics.h
+++ b/engines/m4/graphics.h
@@ -170,7 +170,7 @@ public:
void frameRect(const Common::Rect &r, uint8 color);
void fillRect(const Common::Rect &r, uint8 color);
void copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY, int transparentColor = -1);
- void copyFrom(M4Surface *src, int destX, int destY, int depth, M4Surface *depthSurface,
+ void copyFrom(M4Surface *src, int destX, int destY, int depth, M4Surface *depthSurface,
int scale, int transparentColor = -1);
void update() {
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index 93f5ab4cba..efc7943114 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -259,7 +259,7 @@ void MadsM4Engine::dumpFile(const char *filename, bool uncompress) {
Common::DumpFile f;
byte buffer[DUMP_BUFFER_SIZE];
Common::SeekableReadStream *fileS = res()->get(filename);
-
+
if (!f.open(filename))
error("Could not open '%s' for writing", filename);
diff --git a/engines/m4/m4.h b/engines/m4/m4.h
index 18c3936db8..46107cb20a 100644
--- a/engines/m4/m4.h
+++ b/engines/m4/m4.h
@@ -94,7 +94,7 @@ class Animation;
enum M4GameType {
GType_Riddle = 1,
GType_Burger = 2,
- GType_RexNebular = 3,
+ GType_RexNebular = 3,
GType_DragonSphere = 4,
GType_Phantom = 5
};
diff --git a/engines/m4/m4_views.cpp b/engines/m4/m4_views.cpp
index 4eb84a7488..78c409252b 100644
--- a/engines/m4/m4_views.cpp
+++ b/engines/m4/m4_views.cpp
@@ -217,7 +217,7 @@ const char *INTERFACE_SERIES = "999intr";
#define SPR(x) _sprites->getFrame(x)
-M4InterfaceView::M4InterfaceView(MadsM4Engine *vm):
+M4InterfaceView::M4InterfaceView(MadsM4Engine *vm):
GameInterfaceView(vm, Common::Rect(0, vm->_screen->height() - INTERFACE_HEIGHT,
vm->_screen->width(), vm->_screen->height())),
_statusText(GUITextField(this, Common::Rect(200, 1, 450, 21))),
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp
index d35b31943a..2ea576dfa4 100644
--- a/engines/m4/mads_anim.cpp
+++ b/engines/m4/mads_anim.cpp
@@ -536,7 +536,7 @@ void AnimviewView::updateState() {
// Clear up current background and sprites
_backgroundSurface.reset();
clearLists();
-
+
// Reset flags
_startFrame = -1;
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp
index b1e57bd7f3..cc28a26e68 100644
--- a/engines/m4/mads_logic.cpp
+++ b/engines/m4/mads_logic.cpp
@@ -177,7 +177,7 @@ void MadsSceneLogic::initializeDataMap() {
uint32 MadsSceneLogic::getDataValue(int dataId) {
switch (dataId) {
- case 1:
+ case 1:
return _madsVm->scene()->_abortTimersMode2;
case 2:
return _madsVm->scene()->_abortTimers;
@@ -208,7 +208,7 @@ uint32 MadsSceneLogic::getDataValue(int dataId) {
void MadsSceneLogic::setDataValue(int dataId, uint16 dataValue) {
switch (dataId) {
- case 1:
+ case 1:
_madsVm->scene()->_abortTimersMode2 = (AbortTimerMode)dataValue;
break;
case 2:
@@ -297,7 +297,7 @@ uint16 MadsSceneLogic::startReversibleSpriteSequence(uint16 srcSpriteIdx, bool f
uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2),
spriteFrame->y + (spriteFrame->height() / 2)));
- return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
+ return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
true, 100, depth - 1, 1, ANIMTYPE_REVERSIBLE, 0, 0);
}
@@ -306,7 +306,7 @@ uint16 MadsSceneLogic::startCycledSpriteSequence(uint16 srcSpriteIdx, bool flipp
uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2),
spriteFrame->y + (spriteFrame->height() / 2)));
- return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
+ return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
true, 100, depth - 1, 1, ANIMTYPE_CYCLED, 0, 0);
}
@@ -315,7 +315,7 @@ uint16 MadsSceneLogic::startSpriteSequence3(uint16 srcSpriteIdx, bool flipped, i
uint8 depth = _madsVm->_rails->getDepth(Common::Point(spriteFrame->x + (spriteFrame->width() / 2),
spriteFrame->y + (spriteFrame->height() / 2)));
- return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
+ return _madsVm->scene()->_sequenceList.add(srcSpriteIdx, flipped, 1, triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0,
true, 100, depth - 1, -1, ANIMTYPE_CYCLED, 0, 0);
}
@@ -335,11 +335,11 @@ void MadsSceneLogic::getPlayerSpritesPrefix() {
strcpy(_madsVm->_player._spritesPrefix, "RXSM");
else if (_madsVm->globals()->_nextSceneId == 112)
strcpy(_madsVm->_player._spritesPrefix, "");
-
+
if (strcmp(oldName, _madsVm->_player._spritesPrefix) != 0)
_madsVm->_player._spritesChanged = true;
- if ((_madsVm->globals()->_nextSceneId == 105) ||
+ if ((_madsVm->globals()->_nextSceneId == 105) ||
((_madsVm->globals()->_nextSceneId == 109) && (_madsVm->globals()->_globals[15] != 0))) {
// TODO: unknown flag setting
_madsVm->_player._spritesChanged = true;
@@ -420,7 +420,7 @@ void MadsSceneLogic::initializeScripts() {
if ((language != 1) || (_madsVm->getLanguage() != Common::EN_ANY))
continue;
- // Found script block for the given game and language.
+ // Found script block for the given game and language.
_scriptsSize = (i < (offsets.size() - 1)) ? offsets[i + 1] - offsets[i] : f.size() - offsets[i];
break;
}
@@ -433,7 +433,7 @@ void MadsSceneLogic::initializeScripts() {
// Load up the list of subroutines into a hash map
uint32 blockOffset = f.pos() - 3;
- uint32 subsStart = 0;
+ uint32 subsStart = 0;
for (;;) {
// Get next entry
Common::String subName;
@@ -593,12 +593,12 @@ void MadsSceneLogic::execute(uint32 subOffset) {
}
case OP_DSTORE: { // Stores data variable
- param = getParam(scriptOffset, opcode);
+ param = getParam(scriptOffset, opcode);
ScriptVar v = stack.pop();
setDataValue(param, v.isInt() ? v.get() : 0);
break;
}
-
+
case OP_LOAD: // loads local variable onto stack
param = getParam(scriptOffset, opcode);
stack.push(locals[param]);
@@ -621,7 +621,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
case OP_GSTORE: // pops stack and stores in global variable
param = getParam(scriptOffset, opcode);
- assert(param < TOTAL_NUM_VARIABLES);
+ assert(param < TOTAL_NUM_VARIABLES);
_madsVm->globals()->_globals[param] = stack.pop().get();
break;
@@ -647,7 +647,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
// Condition satisfied - do the jump
scriptOffset = param;
break;
-
+
case OP_JMPTRUE: // conditional jump
param = subOffset + getParam(scriptOffset, opcode);
if (stack.pop().get() != 0)
@@ -708,7 +708,7 @@ void MadsSceneLogic::execute(uint32 subOffset) {
case OP_OR: param1 |= param2; break;
case OP_EOR: param1 ^= param2; break;
}
-
+
stack.push(ScriptVar(param1));
}
break;
@@ -774,7 +774,7 @@ uint32 MadsSceneLogic::getParam(uint32 &scriptOffset, int opcode) {
*/
void MadsSceneLogic::getCallParameters(int numParams, Common::Stack<ScriptVar> &stack, ScriptVar *callParams) {
assert(numParams <= MAX_CALL_PARAMS);
- for (int i = 0; i < numParams; ++i, ++callParams)
+ for (int i = 0; i < numParams; ++i, ++callParams)
*callParams = stack.pop();
}
@@ -881,7 +881,7 @@ void MadsSceneLogic::callSubroutine(int subIndex, Common::Stack<ScriptVar> &stac
case 14: {
// DynamicHotspots_add
EXTRACT_PARAMS(7);
- int idx = _madsVm->scene()->_dynamicHotspots.add(p[0], p[1], p[2],
+ int idx = _madsVm->scene()->_dynamicHotspots.add(p[0], p[1], p[2],
Common::Rect(p[6], p[5], p[6] + p[4], p[5] + p[3]));
stack.push(ScriptVar(idx));
break;
diff --git a/engines/m4/mads_logic.h b/engines/m4/mads_logic.h
index 3132094252..4f0b0d5ba2 100644
--- a/engines/m4/mads_logic.h
+++ b/engines/m4/mads_logic.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The MADS game logic is all hard-coded into the games, although for Rex at least
- * it seems to use only a fairly basic set of instructions and function calls, so it should be
- * possible
+ * it seems to use only a fairly basic set of instructions and function calls, so it should be
+ * possible
*/
#ifndef M4_MADS_LOGIC_H
diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp
index fa65329d76..8a2ab67f11 100644
--- a/engines/m4/mads_menus.cpp
+++ b/engines/m4/mads_menus.cpp
@@ -210,7 +210,7 @@ void RexMainMenuView::updateState() {
M4Sprite *spr = _menuItem->getFrame(0);
itemSize = _menuItem->getFrame(0)->height();
spr->copyTo(this, _menuItemPosList[_menuItemIndex - 1].x,
- _menuItemPosList[_menuItemIndex - 1].y + row + (itemSize / 2) - (spr->height() / 2),
+ _menuItemPosList[_menuItemIndex - 1].y + row + (itemSize / 2) - (spr->height() / 2),
spr->getTransparencyIndex());
delete _menuItem;
@@ -876,7 +876,7 @@ void RexDialogView::addLine(const char *msg_p, Font *font, MadsTextAlignment ali
}
break;
}
-
+
case RIGHT_ALIGN:
// Right align (moving left from given passed left)
rec->pos.x = left - font->getWidth(rec->text);
@@ -920,7 +920,7 @@ void RexDialogView::setClickableLines() {
for (int i = 0; i < DIALOG_LINES_SIZE; ++i) {
if (_dialogText[i].in_use) {
// Add an entry for the line
- _screenObjects.add(Common::Rect(_dialogText[i].pos.x, _dialogText[i].pos.y,
+ _screenObjects.add(Common::Rect(_dialogText[i].pos.x, _dialogText[i].pos.y,
_dialogText[i].pos.x + _dialogText[i].font->getWidth(_dialogText[i].text, _dialogText[i].widthAdjust),
_dialogText[i].pos.y + _dialogText[i].font->getHeight()), 19, i, 1);
}
@@ -988,7 +988,7 @@ RexGameMenuDialog::RexGameMenuDialog(): RexDialogView() {
void RexGameMenuDialog::addLines() {
// Add the title
int top = MADS_Y_OFFSET - 2 - ((((_vm->_font->current()->getHeight() + 2) * 6) >> 1) - 78);
-
+
addQuote(_vm->_font->current(), ALIGN_CENTER, 0, top, 10);
// Loop for adding the option lines of the dialog
@@ -1163,7 +1163,7 @@ bool RexOptionsDialog::onEvent(M4EventType eventType, int32 param1, int x, int y
return true;
}
- // Update the option selections
+ // Update the option selections
reload();
}
diff --git a/engines/m4/mads_player.cpp b/engines/m4/mads_player.cpp
index 0b83b54ff5..73480088ee 100644
--- a/engines/m4/mads_player.cpp
+++ b/engines/m4/mads_player.cpp
@@ -46,7 +46,7 @@ MadsPlayer::MadsPlayer() {
_unk4 = false;
_spritesChanged = true;
-
+
_direction = 0;
_newDirection = 0;
_priorTimer = 0;
@@ -131,7 +131,7 @@ void MadsPlayer::update() {
// Figure out the depth for the sprite
int newDepth = 1;
int yp = MIN(_playerPos.y, (int16)155);
-
+
for (int idx = 1; idx < 15; ++idx) {
if (_madsVm->scene()->getSceneResources()._depthBands[newDepth] >= yp)
newDepth = idx + 1;
@@ -199,7 +199,7 @@ void MadsPlayer::updateFrame() {
_unk2 = 0;
} else {
_unk2 = _actionList2[_actionIndex];
-
+
if (_actionIndex > 0)
--_actionIndex;
}
@@ -237,7 +237,7 @@ void MadsPlayer::setupFrame() {
_frameCount = spriteSet.getCount();
_yScale = spriteSet._charInfo->_yScale;
-
+
if ((_frameNum <= 0) || (_frameNum > _frameCount))
_frameNum = 1;
_forceRefresh = true;
@@ -336,7 +336,7 @@ void MadsPlayer::setDest(int destX, int destY, int facing) {
setTicksAmount();
_moving = true;
_destFacing = facing;
-
+
_madsVm->scene()->getSceneResources().setRouteNode(_madsVm->scene()->getSceneResources()._nodes.size() - 2,
_playerPos, _madsVm->scene()->_depthSurface);
_madsVm->scene()->getSceneResources().setRouteNode(_madsVm->scene()->getSceneResources()._nodes.size() - 1,
@@ -448,7 +448,7 @@ void MadsPlayer::move() {
bool routeFlag = false;
if (_moving) {
- int idx = _routeCount;
+ int idx = _routeCount;
while (!_v844C0 && (_destPos.x == _playerPos.x) && (_destPos.y == _playerPos.y)) {
if (idx != 0) {
--idx;
@@ -650,7 +650,7 @@ int MadsPlayer::scanPath(M4Surface *depthSurface, const Common::Point &srcPos, c
srcP += xDirection;
}
-
+
return 0;
}
@@ -730,12 +730,12 @@ void MadsPlayer::startMovement() {
int majorChange = MAX(xDiff, yDiff);
_v84530 = (majorChange == 0) ? 0 : _hypotenuse / majorChange;
-
+
if (_playerPos.x > _destPos.x)
_v8452C = MAX(_posChange.x, _posChange.y);
else
_v8452C = 0;
-
+
_hypotenuse /= 100;
_v8452E = -_v84530;
}
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp
index a0acbdd69d..5f160aa300 100644
--- a/engines/m4/mads_scene.cpp
+++ b/engines/m4/mads_scene.cpp
@@ -169,7 +169,7 @@ void MadsScene::loadScene(int sceneNumber) {
}
_abortTimers = 0;
_abortTimersMode2 = ABORTMODE_1;
-
+
// Do any scene specific setup
if (_vm->getGameType() == GType_RexNebular)
@@ -376,7 +376,7 @@ void MadsScene::updateState() {
if (_madsVm->globals()->_config.easyMouse)
_action.refresh();
-
+
if ((_activeAnimation) && !_abortTimers) {
_activeAnimation->update();
if (((MadsAnimation *) _activeAnimation)->freeFlag() || freeFlag) {
@@ -598,7 +598,7 @@ void MadsScene::loadAnimation(const Common::String &animName, int abortTimers) {
bool MadsScene::getDepthHighBit(const Common::Point &pt) {
const byte *p = _depthSurface->getBasePtr(pt.x, pt.y);
- if (_sceneResources._depthStyle == 2)
+ if (_sceneResources._depthStyle == 2)
return ((*p << 4) & 0x80) != 0;
return (*p & 0x80) != 0;
@@ -653,7 +653,7 @@ void MadsSceneResources::load(int sceneNumber, const char *resName, int v0, M4Su
_depthStyle = stream->readUint16LE();
_width = stream->readUint16LE();
_height = stream->readUint16LE();
-
+
stream->skip(24);
int nodeCount = stream->readUint16LE();
@@ -771,7 +771,7 @@ void MadsSceneResources::setRouteNode(int nodeIndex, const Common::Point &pt, M4
if (hypotenuse >= 0x3FFF)
// Shouldn't ever be this large
hypotenuse = 0x3FFF;
-
+
entry = hypotenuse | flags;
_nodes[idx].indexes[nodeIndex] = entry;
_nodes[nodeIndex].indexes[idx] = entry;
@@ -794,7 +794,7 @@ int MadsSceneResources::getRouteFlags(const Common::Point &src, const Common::Po
++yDiff;
byte *srcP = depthSurface->getBasePtr(src.x, src.y);
-
+
int totalCtr = majorDiff;
for (int xCtr = 0; xCtr < xDiff; ++xCtr, srcP += xDirection) {
totalCtr += yDiff;
@@ -837,7 +837,7 @@ int MadsSceneResources::getRouteFlags(const Common::Point &src, const Common::Po
*--------------------------------------------------------------------------
*/
-MadsInterfaceView::MadsInterfaceView(MadsM4Engine *vm): GameInterfaceView(vm,
+MadsInterfaceView::MadsInterfaceView(MadsM4Engine *vm): GameInterfaceView(vm,
Common::Rect(0, MADS_SURFACE_HEIGHT, vm->_screen->width(), vm->_screen->height())) {
_screenType = VIEWID_INTERFACE;
_highlightedElement = -1;
@@ -1078,7 +1078,7 @@ bool MadsInterfaceView::onEvent(M4EventType eventType, int32 param1, int x, int
// A standard action was selected
int verbId = kVerbLook + (_highlightedElement - ACTIONS_START);
warning("Selected action #%d", verbId);
-
+
} else if ((_highlightedElement >= VOCAB_START) && (_highlightedElement < (VOCAB_START + 5))) {
// A vocab action was selected
MadsObject *obj = _madsVm->globals()->getObject(_selectedObject);
@@ -1259,8 +1259,8 @@ void MadsInterfaceView::leaveScene() {
//--------------------------------------------------------------------------
-int getActiveAnimationBool() {
- return (_madsVm->scene()->activeAnimation()) ? 1 : 0;
+int getActiveAnimationBool() {
+ return (_madsVm->scene()->activeAnimation()) ? 1 : 0;
}
int getAnimationCurrentFrame() {
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index b66591a207..0521903c95 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -99,7 +99,7 @@ void MadsAction::set() {
// Use/to action
int selectedObject = _madsVm->scene()->getInterface()->getSelectedObject();
MadsObject *objEntry = _madsVm->globals()->getObject(selectedObject);
-
+
_action.objectNameId = objEntry->_descId;
_currentAction = objEntry->_vocabList[_selectedRow].vocabId;
@@ -244,7 +244,7 @@ void MadsAction::refresh() {
// Add a new text display entry to display the status text at the bottom of the screen area
uint colors = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003;
- _statusTextIndex = _owner._textDisplay.add(160 - (strWidth / 2),
+ _statusTextIndex = _owner._textDisplay.add(160 - (strWidth / 2),
MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colors, textSpacing, _statusText, font);
}
}
@@ -476,7 +476,7 @@ void MadsSpriteSlots::drawBackground() {
if (slot.depth > 1) {
// Draw the frame with depth processing
- _owner._bgSurface->copyFrom(frame, xp, yp, slot.depth, _owner._depthSurface, 100,
+ _owner._bgSurface->copyFrom(frame, xp, yp, slot.depth, _owner._depthSurface, 100,
frame->getTransparencyIndex());
} else {
// No depth, so simply draw the image
@@ -526,7 +526,7 @@ void MadsSpriteSlots::drawForeground(M4Surface *viewport) {
if ((slot.scale < 100) && (slot.scale != -1)) {
// Minimalised drawing
- viewport->copyFrom(spr, slot.xp, slot.yp, slot.depth, _owner._depthSurface, slot.scale,
+ viewport->copyFrom(spr, slot.xp, slot.yp, slot.depth, _owner._depthSurface, slot.scale,
sprite->getTransparencyIndex());
} else {
int xp, yp;
@@ -665,7 +665,7 @@ void MadsTextDisplay::draw(M4Surface *view) {
for (uint idx = 0; idx < _entries.size(); ++idx) {
if (_entries[idx].active && (_entries[idx].expire >= 0)) {
_entries[idx].font->setColors(_entries[idx].color1, _entries[idx].color2, 0);
- _entries[idx].font->writeString(view, _entries[idx].msg,
+ _entries[idx].font->writeString(view, _entries[idx].msg,
_entries[idx].bounds.left, _entries[idx].bounds.top, _entries[idx].bounds.width(),
_entries[idx].spacing);
}
@@ -728,7 +728,7 @@ int MadsKernelMessageList::add(const Common::Point &pt, uint fontColor, uint8 fl
rec.frameTimer = _madsVm->_currentTimer;
rec.abortTimers = abortTimers;
rec.abortMode = _owner._abortTimersMode2;
-
+
for (int i = 0; i < 3; ++i)
rec.actionNouns[i] = _madsVm->globals()->actionNouns[i];
@@ -850,7 +850,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
y1 = seqEntry.msgPos.y;
}
}
-
+
if (msg.flags & KMSG_PLAYER_TIMEOUT) {
if (word_8469E != 0) {
// TODO: Figure out various flags
@@ -867,7 +867,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
msg.msg[msg.msgOffset] = msg.asciiChar;
char *msgP = &msg.msg[++msg.msgOffset];
*msgP = msg.asciiChar2;
-
+
msg.asciiChar = *msgP;
msg.asciiChar2 = *(msgP + 1);
@@ -884,7 +884,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
flag = true;
}
- int strWidth = _talkFont->getWidth(msg.msg, _owner._textSpacing);
+ int strWidth = _talkFont->getWidth(msg.msg, _owner._textSpacing);
if (msg.flags & (KMSG_RIGHT_ALIGN | KMSG_CENTER_ALIGN)) {
x1 -= (msg.flags & KMSG_CENTER_ALIGN) ? strWidth / 2 : strWidth;
@@ -935,7 +935,7 @@ ScreenObjects::ScreenObjects(MadsView &owner): _owner(owner) {
_category = 0;
_objectIndex = 0;
}
-
+
/**
* Clears the entries list
*/
@@ -1153,7 +1153,7 @@ void MadsDirtyAreas::setSpriteSlot(int dirtyIdx, const MadsSpriteSlot &spriteSlo
SpriteAsset &spriteSet = _owner._spriteSlots.getSprite(spriteSlot.spriteListIndex);
M4Sprite *frame = spriteSet.getFrame(((spriteSlot.frameNumber & 0x7fff) - 1) & 0x7f);
-
+
if (spriteSlot.scale == -1) {
width = frame->width();
height = frame->height();
@@ -1270,8 +1270,8 @@ bool MadsSequenceList::addSubEntry(int index, SequenceSubEntryMode mode, int fra
return false;
}
-int MadsSequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
- int msgX, int msgY, bool nonFixed, char scale, uint8 depth, int frameInc, SpriteAnimType animType, int numSprites,
+int MadsSequenceList::add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks, int extraTicks, int numTicks,
+ int msgX, int msgY, bool nonFixed, char scale, uint8 depth, int frameInc, SpriteAnimType animType, int numSprites,
int frameStart) {
// Find a free slot
@@ -1340,7 +1340,7 @@ void MadsSequenceList::setSpriteSlot(int seqIndex, MadsSpriteSlot &spriteSlot) {
spriteSlot.frameNumber = (timerEntry.flipped ? 0x8000 : 0) | timerEntry.frameIndex;
spriteSlot.depth = timerEntry.depth;
spriteSlot.scale = timerEntry.scale;
-
+
if (!timerEntry.nonFixed) {
spriteSlot.xp = timerEntry.msgPos.x;
spriteSlot.yp = timerEntry.msgPos.y;
@@ -1420,7 +1420,7 @@ bool MadsSequenceList::loadSprites(int seqIndex) {
seqEntry.frameInc = 1;
} else {
// Otherwise reset back to last sprite for further reverse animating
- seqEntry.frameIndex = seqEntry.numSprites;
+ seqEntry.frameIndex = seqEntry.numSprites;
}
}
@@ -1478,7 +1478,7 @@ void MadsSequenceList::tick() {
continue;
// Set the next timeout for the timer entry
- seqEntry.timeout = currentTimer + seqEntry.numTicks;
+ seqEntry.timeout = currentTimer + seqEntry.numTicks;
// Action the sprite
if (loadSprites(idx)) {
@@ -1509,7 +1509,7 @@ void MadsSequenceList::setAnimRange(int seqIndex, int startVal, int endVal) {
tempStart = 1;
break;
}
-
+
switch (endVal) {
case -2:
case 0:
@@ -1558,7 +1558,7 @@ Animation::~Animation() {
MadsView::MadsView(View *view): _view(view), _dynamicHotspots(*this), _sequenceList(*this),
_kernelMessages(*this), _spriteSlots(*this), _dirtyAreas(*this), _textDisplay(*this),
_screenObjects(*this), _action(*this) {
-
+
_textSpacing = -1;
_newTimeout = 0;
_abortTimers = 0;
@@ -1590,8 +1590,8 @@ void MadsView::refresh() {
// Merge any identified dirty areas
_dirtyAreas.merge(1, DIRTY_AREAS_SIZE);
-
- // Copy dirty areas to the main display surface
+
+ // Copy dirty areas to the main display surface
_dirtyAreas.copy(_viewport, _bgSurface, _posAdjust);
// Handle dirty areas for foreground objects
diff --git a/engines/m4/mads_views.h b/engines/m4/mads_views.h
index 6be2283a32..41caaa2ded 100644
--- a/engines/m4/mads_views.h
+++ b/engines/m4/mads_views.h
@@ -208,7 +208,7 @@ public:
#define TIMED_TEXT_SIZE 10
#define INDEFINITE_TIMEOUT 9999999
-enum KernelMessageFlags {KMSG_QUOTED = 1, KMSG_PLAYER_TIMEOUT = 2, KMSG_SEQ_ENTRY = 4, KMSG_SCROLL = 8, KMSG_RIGHT_ALIGN = 0x10,
+enum KernelMessageFlags {KMSG_QUOTED = 1, KMSG_PLAYER_TIMEOUT = 2, KMSG_SEQ_ENTRY = 4, KMSG_SCROLL = 8, KMSG_RIGHT_ALIGN = 0x10,
KMSG_CENTER_ALIGN = 0x20, KMSG_EXPIRE = 0x40, KMSG_ACTIVE = 0x80};
class MadsKernelMessageEntry {
@@ -388,7 +388,7 @@ struct MadsSequenceEntry {
int8 active;
int8 spriteListIndex;
bool flipped;
-
+
int frameIndex;
int frameStart;
int numSprites;
@@ -402,7 +402,7 @@ struct MadsSequenceEntry {
bool nonFixed;
int field_13;
-
+
Common::Point msgPos;
int triggerCountdown;
bool doneFlag;
@@ -424,10 +424,10 @@ private:
public:
MadsSequenceList(MadsView &owner);
- MadsSequenceEntry &operator[](int index) { return _entries[index]; }
+ MadsSequenceEntry &operator[](int index) { return _entries[index]; }
void clear();
bool addSubEntry(int index, SequenceSubEntryMode mode, int frameIndex, int abortVal);
- int add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks,
+ int add(int spriteListIndex, bool flipped, int frameIndex, int triggerCountdown, int delayTicks,
int extraTicks, int numTicks, int msgX, int msgY, bool nonFixed, char scale, uint8 depth,
int frameInc, SpriteAnimType animType, int numSprites, int frameStart);
void remove(int seqIndex);
@@ -452,7 +452,7 @@ public:
virtual void setCurrentFrame(int frameNumber) = 0;
virtual int getCurrentFrame() = 0;
};
-
+
class MadsView {
private:
diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp
index 2ae29ca0bb..f5b2050052 100644
--- a/engines/m4/resource.cpp
+++ b/engines/m4/resource.cpp
@@ -313,7 +313,7 @@ const char *MADSResourceManager::getResourceFilename(const char *resourceName) {
/**
* Forms a resource name based on the passed specifiers
*/
-const char *MADSResourceManager::getResourceName(char asciiCh, int prefix, ExtensionType extType,
+const char *MADSResourceManager::getResourceName(char asciiCh, int prefix, ExtensionType extType,
const char *suffix, int index) {
static char resourceName[100];
diff --git a/engines/m4/resource.h b/engines/m4/resource.h
index 00c54a3680..c13c293544 100644
--- a/engines/m4/resource.h
+++ b/engines/m4/resource.h
@@ -109,7 +109,7 @@ public:
enum ResourceType {RESTYPE_ROOM, RESTYPE_SC, RESTYPE_TEXT, RESTYPE_QUO, RESTYPE_I,
RESTYPE_OB, RESTYPE_FONT, RESTYPE_SOUND, RESTYPE_SPEECH, RESTYPE_HAS_EXT, RESTYPE_NO_EXT};
-enum ExtensionType {EXTTYPE_SS = 1, EXTTYPE_AA = 2, EXTTYPE_DAT = 3, EXTTYPE_HH = 4, EXTTYPE_ART = 5,
+enum ExtensionType {EXTTYPE_SS = 1, EXTTYPE_AA = 2, EXTTYPE_DAT = 3, EXTTYPE_HH = 4, EXTTYPE_ART = 5,
EXTTYPE_INT = 6, EXTTYPE_NONE = -1};
enum ResourcePrefixType {RESPREFIX_GL = 1, RESPREFIX_SC = 2, RESPREFIX_RM = 3};
diff --git a/engines/m4/scene.cpp b/engines/m4/scene.cpp
index a38be20086..be49dcb13f 100644
--- a/engines/m4/scene.cpp
+++ b/engines/m4/scene.cpp
@@ -36,7 +36,7 @@
namespace M4 {
-Scene::Scene(MadsM4Engine *vm, SceneResources *res): View(vm, Common::Rect(0, 0, vm->_screen->width(),
+Scene::Scene(MadsM4Engine *vm, SceneResources *res): View(vm, Common::Rect(0, 0, vm->_screen->width(),
vm->_screen->height())), _sceneResources(res) {
_screenType = VIEWID_SCENE;
@@ -142,7 +142,7 @@ void Scene::showCodes() {
// Show the walk areas for the M4 engine in black and white
const byte *srcP = (const byte *)_walkSurface->getBasePtr(0, 0);
byte *destP = _backgroundSurface->getBasePtr(0, 0);
-
+
for (int i = 0; i < _walkSurface->width() * _walkSurface->height(); i++)
destP[i] = (srcP[i] & 0x10) ? 0xFF : 0;
@@ -154,7 +154,7 @@ void Scene::showCodes() {
_vm->_palette->setPalette(colors, 0, 256);
} else {
// MADS handling
-
+
// copy the walk data to the background, in whatever current palette is active
_walkSurface->copyTo(_backgroundSurface);
diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp
index d10dea5cad..76eae8a661 100644
--- a/engines/m4/sound.cpp
+++ b/engines/m4/sound.cpp
@@ -97,8 +97,8 @@ void Sound::playSound(const char *soundName, int volume, bool loop, int channel)
_mixer->playStream(Audio::Mixer::kSFXSoundType, &handle->handle, stream, -1, volume);
}
-void Sound::playSound(int soundNum) {
- warning("TODO: playSound(%d)", soundNum);
+void Sound::playSound(int soundNum) {
+ warning("TODO: playSound(%d)", soundNum);
}
void Sound::pauseSound() {
diff --git a/engines/m4/sprite.cpp b/engines/m4/sprite.cpp
index 1a3228d1bb..d0741732f3 100644
--- a/engines/m4/sprite.cpp
+++ b/engines/m4/sprite.cpp
@@ -182,7 +182,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
}
}
}
-
+
// Check if we need to scan forward to find the end of the line
if (!newLine) {
do {
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 1151339d49..004f1462a6 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -511,7 +511,7 @@ int16 GameDatabaseV2::loadgame(const char *filename, int16 version) {
_objects[i]->load(*in);
}
delete in;
-
+
_objectPropertyCache.clear(); // make sure to clear cache
return result;
}
@@ -642,7 +642,7 @@ void GameDatabaseV3::load(Common::SeekableReadStream &sourceS) {
void GameDatabaseV3::reloadFromStream(Common::SeekableReadStream &sourceS) {
sourceS.seek(_gameStateOffs);
sourceS.read(_gameState, _gameStateSize);
-
+
_objectPropertyCache.clear(); // make sure to clear cache
}
@@ -734,9 +734,9 @@ int16 GameDatabaseV3::loadgame(const char *filename, int16 version) {
in->skip(64); // skip savegame description
in->read(_gameState, _gameStateSize);
delete in;
-
+
_objectPropertyCache.clear(); // make sure to clear cache
-
+
return 0;
}
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index e8c948af4e..1320daaf9d 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -542,7 +542,7 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
- const ADGameDescription *fallbackDetect(const Common::FSList &fslist, const FileMap &allFiles) const;
+ const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const;
};
@@ -564,7 +564,7 @@ bool MadeMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
return gd != 0;
}
-const ADGameDescription *MadeMetaEngine::fallbackDetect(const Common::FSList &fslist, const FileMap &allFiles) const {
+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;
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp
index d54e2dac6b..f61516c91d 100644
--- a/engines/mohawk/bitmap.cpp
+++ b/engines/mohawk/bitmap.cpp
@@ -910,7 +910,7 @@ void DOSBitmap::expandEGAPlanes(Graphics::Surface *surface, Common::SeekableRead
j = -1;
x++;
}
- }
+ }
dst += surface->w;
}
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 4e5b7186ff..e7dc84606c 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -632,7 +632,7 @@ bool RivenConsole::Cmd_Combos(int argc, const char **argv) {
uint32 teleCombo = _vm->_vars["tcorrectorder"];
uint32 prisonCombo = _vm->_vars["pcorrectorder"];
uint32 domeCombo = _vm->_vars["adomecombo"];
-
+
DebugPrintf("Telescope Combo:\n ");
for (int i = 0; i < 5; i++)
DebugPrintf("%d ", _vm->_externalScriptHandler->getComboDigit(teleCombo, i));
@@ -700,14 +700,25 @@ bool LivingBooksConsole::Cmd_DrawImage(int argc, const char **argv) {
}
bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) {
- if (argc == 1) {
- DebugPrintf("Usage: changePage <page> [<mode>]\n");
+ if (argc < 2 || argc > 3) {
+ DebugPrintf("Usage: changePage <page>[.<subpage>] [<mode>]\n");
return true;
}
- if (_vm->tryLoadPageStart(argc == 2 ? _vm->getCurMode() : (LBMode)atoi(argv[2]), atoi(argv[1])))
- return false;
- DebugPrintf("no such page %d\n", atoi(argv[1]));
+ int page, subpage = 0;
+ if (sscanf(argv[1], "%d.%d", &page, &subpage) == 0) {
+ DebugPrintf("Usage: changePage <page>[.<subpage>] [<mode>]\n");
+ return true;
+ }
+ LBMode mode = argc == 2 ? _vm->getCurMode() : (LBMode)atoi(argv[2]);
+ if (subpage == 0) {
+ if (_vm->tryLoadPageStart(mode, page))
+ return false;
+ } else {
+ if (_vm->loadPage(mode, page, subpage))
+ return false;
+ }
+ DebugPrintf("no such page %d.%d\n", page, subpage);
return true;
}
diff --git a/engines/mohawk/cstime.cpp b/engines/mohawk/cstime.cpp
index 59bc5ad661..3f9827581b 100644
--- a/engines/mohawk/cstime.cpp
+++ b/engines/mohawk/cstime.cpp
@@ -217,7 +217,7 @@ void MohawkEngine_CSTime::nextScene() {
void MohawkEngine_CSTime::loadResourceFile(Common::String name) {
MohawkArchive *archive = new MohawkArchive();
- if (!archive->open(name + ".mhk"))
+ if (!archive->openFile(name + ".mhk"))
error("failed to open %s.mhk", name.c_str());
_mhk.push_back(archive);
}
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index f95084de8e..78e099ccfe 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -234,7 +234,7 @@ LivingBooksCursorManager_v2::LivingBooksCursorManager_v2() {
// Try to open the system archive if we have it
_sysArchive = new MohawkArchive();
- if (!_sysArchive->open("system.mhk")) {
+ if (!_sysArchive->openFile("system.mhk")) {
delete _sysArchive;
_sysArchive = 0;
}
@@ -252,6 +252,17 @@ void LivingBooksCursorManager_v2::setCursor(uint16 id) {
}
}
+void LivingBooksCursorManager_v2::setCursor(const Common::String &name) {
+ if (!_sysArchive)
+ return;
+
+ uint16 id = _sysArchive->findResourceID(ID_TCUR, name);
+ if (id == 0xffff)
+ error("Could not find cursor '%s'", name.c_str());
+ else
+ setCursor(id);
+}
+
PECursorManager::PECursorManager(const Common::String &appName) {
_exe = new Common::PEResources();
@@ -274,6 +285,7 @@ void PECursorManager::setCursor(uint16 id) {
Graphics::WinCursor *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/cursors.h b/engines/mohawk/cursors.h
index d92b6b4285..7bfa491904 100644
--- a/engines/mohawk/cursors.h
+++ b/engines/mohawk/cursors.h
@@ -56,6 +56,7 @@ public:
virtual void showCursor();
virtual void hideCursor();
virtual void setCursor(uint16 id);
+ virtual void setCursor(const Common::String &name) {}
virtual void setDefaultCursor();
virtual bool hasSource() const { return false; }
@@ -157,6 +158,7 @@ public:
~LivingBooksCursorManager_v2();
void setCursor(uint16 id);
+ void setCursor(const Common::String &name);
bool hasSource() const { return _sysArchive != 0; }
private:
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index 2cf80377f6..01eac0aaba 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -33,7 +33,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "ae3258c9c90128d274aa6a790b3ad181"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -51,7 +51,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("DEMO.DAT", "c39303dd53fb5c4e7f3c23231c606cd0"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -69,7 +69,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "4beb3366ed3f3b9bfb6e81a14a43bdcc"),
Common::DE_DEU,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -87,7 +87,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "e0937cca1ab125e48e30dc3cd5046ddf"),
Common::DE_DEU,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -105,7 +105,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "f7e7d7ca69934f1351b5acd4fe4d44c2"),
Common::ES_ESP,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -123,7 +123,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "032c88e3b7e8db4ca475e7b7db9a66bb"),
Common::JA_JPN,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -141,7 +141,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "d631d42567a941c67c78f2e491f4ea58"),
Common::FR_FRA,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -159,7 +159,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MAKING.DAT", "f6387e8f0f7b8a3e42c95294315d6a0e"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MAKINGOF,
@@ -177,7 +177,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MAKING.DAT", "03ff62607e64419ab2b6ebf7b7bcdf63"),
Common::JA_JPN,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MAKINGOF,
@@ -195,7 +195,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "c4cae9f143b5947262e6cb2397e1617e"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -213,7 +213,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "c4cae9f143b5947262e6cb2397e1617e"),
Common::EN_ANY,
Common::kPlatformMacintosh,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -231,7 +231,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "f88e0ace66dbca78eebdaaa1d3314ceb"),
Common::DE_DEU,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -249,7 +249,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MYST.DAT", "aea81633b2d2ae498f09072fb87263b6"),
Common::FR_FRA,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -267,7 +267,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("a_Data.MHK", "71145fdecbd68a0cfc292c2fbddf8e08"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -285,7 +285,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("a_Data.MHK", "d8ccae34a0e3c709135a73f449b783be"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -303,7 +303,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("a_Data.MHK", "249e8c995d191b03ee94c892c0eac775"),
Common::ES_ESP,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -321,7 +321,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("a_Data.MHK", "08fcaa5d5a2a01d7a5a6960f497212fe"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -339,7 +339,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("a_Data.MHK", "a5fe1c91a6033eb6ee54b287578b74b9"),
Common::DE_DEU,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -357,7 +357,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("a_Data.MHK", "aff2a384aaa9a0e0ec51010f708c5c04"),
Common::FR_FRA,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -375,7 +375,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("a_Data.MHK", "bae6b03bd8d6eb350d35fd13f0e3139f"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -390,7 +390,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("signin.mhk", "410b4ce8d1a8702971e4d1ffba9b965d"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_CSTIME,
@@ -405,7 +405,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("iface.mhk", "5c1203712a16513bd158dc3c1b6cebd7"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_DEMO,
+ ADGF_DEMO | ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_CSTIME,
@@ -421,7 +421,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("ZOOMBINI.MHK", "98b758fec55104c096cfd129048be9a6"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_ZOOMBINI,
@@ -436,6 +436,21 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("ZOOMBINI.MHK", "0672f65c40dd065840c896e41c13f980"),
Common::EN_ANY,
Common::kPlatformWindows,
+ ADGF_UNSTABLE,
+ Common::GUIO_NONE
+ },
+ GType_ZOOMBINI,
+ GF_HASMIDI,
+ 0
+ },
+
+ {
+ {
+ "zoombini",
+ "v2.0",
+ AD_ENTRY1("ZOOMBINI.MHK", "506b1122ffa740e2566cf0b583d24478"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
ADGF_NO_FLAGS,
Common::GUIO_NONE
},
@@ -451,7 +466,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("ZOOMBINI.MHK", "6ae0bdf791266b1fe3d4fabbf44c3faa"),
Common::DE_DEU,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_ZOOMBINI,
@@ -466,7 +481,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("ZOOMBINI.MHK", "8231e58525143ccf6e8b747df34b139f"),
Common::FR_FRA,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_ZOOMBINI,
@@ -481,7 +496,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("C2K.MHK", "605fe88380848031bbd0ff84ade6fe40"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_CSWORLD,
@@ -496,7 +511,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("C2K.MHK", "d4857aeb0f5e2e0c4ac556aa74f38c23"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_CSWORLD,
@@ -511,7 +526,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("AMTRAK.MHK", "2f95301f0bb950d555bb7b0e3b1b7eb1"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_CSAMTRAK,
@@ -645,7 +660,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("Outline.txt", "67abce5dcda969c23f367a98c90439bc"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV5,
@@ -660,7 +675,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("Outline.txt", "6a281eefe72987afb0f8fb6cf84553f5"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV5,
@@ -675,7 +690,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("Outline", "b7dc6e65fa9e80784a5bb8b557aa37c4"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -690,7 +705,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("BookOutline", "1ce006d7daaa26cf61040203856b88f1"),
Common::EN_ANY,
Common::kPlatformMacintosh,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -705,7 +720,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("BRODER.MHK", "007299da8b2c6e8ec1cde9598c243024"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_JAMESMATH,
@@ -721,7 +736,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("BRODER.MHK", "53c000938a50dca92860fd9b546dd276"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_JAMESMATH,
@@ -736,7 +751,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("MAINROOM.MHK", "12f51894d7f838af639ea9bf1bc8f45b"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_TREEHOUSE,
@@ -858,7 +873,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("AL236_1.MHK", "3ba145492a7b8b4dee0ef4222c5639c3"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_1STDEGREE,
@@ -876,7 +891,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("AL236_1.MHK", "0e0c70b1b702b6ddca61a1192ada1282"),
Common::FR_FRA,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_1STDEGREE,
@@ -891,7 +906,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("USAC2K.MHK", "b8c9d3a2586f62bce3a48b50d7a700e9"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_CSUSA,
@@ -1435,7 +1450,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("RACE.LB", "1645f36bcb36e440d928e920aa48c373"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -1451,7 +1466,22 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("RACE32.LB", "292a05bc48c1dd9583821a4181a02ef2"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
+ Common::GUIO_NONE
+ },
+ GType_LIVINGBOOKSV3,
+ 0,
+ 0
+ },
+
+ {
+ {
+ "arthurrace",
+ "",
+ AD_ENTRY1("BookOutline", "f0a9251824a648fce1b49cb7c1a0ba67"),
+ Common::EN_ANY,
+ Common::kPlatformMacintosh,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -1686,7 +1716,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("Outline", "0b5ab6dd7c08cf23066efa709fa48bbc"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -1701,7 +1731,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("BookOutline", "e139903eee98f0b0c3f39247a23b8f10"),
Common::EN_ANY,
Common::kPlatformMacintosh,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -1716,7 +1746,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("outline", "525be248363fe27d50d750632c1e759e"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV4,
@@ -1731,7 +1761,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("BookOutline", "54a324ee6f8260258bff7043a05b0004"),
Common::EN_ANY,
Common::kPlatformMacintosh,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV4,
@@ -1749,7 +1779,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("outline", "36225e0b4986a80135cfdd9643cc7030"),
Common::FR_FRA,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV4,
@@ -1825,7 +1855,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("outline", "d239506f969ff68fa886f084082e9158"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -1840,7 +1870,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("BookOutline", "6dd1c0606f1db3b71207121b4370e487"),
Common::EN_ANY,
Common::kPlatformMacintosh,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV3,
@@ -1934,7 +1964,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("OUTLINE", "dec4d1a05449f81b6012706932658326"),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV4,
@@ -1949,7 +1979,7 @@ static const MohawkGameDescription gameDescriptions[] = {
AD_ENTRY1("BookOutline", "87bf1f9113340ce1c6c880932e815882"),
Common::EN_ANY,
Common::kPlatformMacintosh,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_LIVINGBOOKSV4,
@@ -2150,7 +2180,7 @@ static const MohawkGameDescription fallbackDescs[] = {
AD_ENTRY1(0, 0),
Common::UNK_LANG,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -2165,7 +2195,7 @@ static const MohawkGameDescription fallbackDescs[] = {
AD_ENTRY1(0, 0),
Common::UNK_LANG,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MAKINGOF,
@@ -2180,7 +2210,7 @@ static const MohawkGameDescription fallbackDescs[] = {
AD_ENTRY1(0, 0),
Common::UNK_LANG,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_MYST,
@@ -2195,7 +2225,7 @@ static const MohawkGameDescription fallbackDescs[] = {
AD_ENTRY1(0, 0),
Common::UNK_LANG,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
@@ -2210,7 +2240,7 @@ static const MohawkGameDescription fallbackDescs[] = {
AD_ENTRY1(0, 0),
Common::UNK_LANG,
Common::kPlatformWindows,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
GType_RIVEN,
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 375806cda4..65073bd970 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -32,6 +32,7 @@
#include "common/archive.h"
#include "common/textconsole.h"
#include "common/system.h"
+#include "common/memstream.h"
#include "graphics/palette.h"
@@ -42,7 +43,7 @@
namespace Mohawk {
// read a null-terminated string from a stream
-Common::String MohawkEngine_LivingBooks::readString(Common::SeekableSubReadStreamEndian *stream) {
+Common::String MohawkEngine_LivingBooks::readString(Common::ReadStream *stream) {
Common::String ret;
while (!stream->eos()) {
byte in = stream->readByte();
@@ -54,7 +55,7 @@ Common::String MohawkEngine_LivingBooks::readString(Common::SeekableSubReadStrea
}
// read a rect from a stream
-Common::Rect MohawkEngine_LivingBooks::readRect(Common::SeekableSubReadStreamEndian *stream) {
+Common::Rect MohawkEngine_LivingBooks::readRect(Common::ReadStreamEndian *stream) {
Common::Rect rect;
// the V1 mac games have their rects in QuickDraw order
@@ -81,13 +82,19 @@ LBPage::LBPage(MohawkEngine_LivingBooks *vm) : _vm(vm) {
_cascade = false;
}
-void LBPage::open(MohawkArchive *mhk, uint16 baseId) {
+void LBPage::open(Archive *mhk, uint16 baseId) {
_mhk = mhk;
_baseId = baseId;
_vm->addArchive(_mhk);
- if (_vm->hasResource(ID_BCOD, baseId))
+ if (!_vm->hasResource(ID_BCOD, baseId)) {
+ // assume that BCOD is mandatory for v4/v5
+ if (_vm->getGameType() == GType_LIVINGBOOKSV4 || _vm->getGameType() == GType_LIVINGBOOKSV5)
+ error("missing BCOD resource (id %d)", baseId);
+ _code = new LBCode(_vm, 0);
+ } else {
_code = new LBCode(_vm, baseId);
+ }
loadBITL(baseId);
for (uint i = 0; i < _items.size(); i++)
@@ -197,9 +204,12 @@ Common::Error MohawkEngine_LivingBooks::run() {
break;
case Common::EVENT_LBUTTONDOWN:
- for (uint16 i = 0; i < _items.size(); i++)
- if (_items[i]->contains(event.mouse))
- found = _items[i];
+ for (Common::List<LBItem *>::const_iterator i = _orderedItems.begin(); i != _orderedItems.end(); ++i) {
+ if ((*i)->contains(event.mouse)) {
+ found = *i;
+ break;
+ }
+ }
if (found)
found->handleMouseDown(event.mouse);
@@ -334,6 +344,7 @@ void MohawkEngine_LivingBooks::destroyPage() {
delete _page;
assert(_items.empty());
+ assert(_orderedItems.empty());
_page = NULL;
_notifyEvents.clear();
@@ -384,8 +395,8 @@ bool MohawkEngine_LivingBooks::loadPage(LBMode mode, uint page, uint subpage) {
warning("ignoring 'killgag' for filename '%s'", filename.c_str());
}
- MohawkArchive *pageArchive = createMohawkArchive();
- if (!filename.empty() && pageArchive->open(filename)) {
+ Archive *pageArchive = createArchive();
+ if (!filename.empty() && pageArchive->openFile(filename)) {
_page = new LBPage(this);
_page->open(pageArchive, 1000);
} else {
@@ -560,6 +571,7 @@ void MohawkEngine_LivingBooks::updatePage() {
case kLBDelayedEventDestroy:
_items.remove_at(i);
i--;
+ _orderedItems.remove(delayedEvent.item);
delete delayedEvent.item;
_page->itemDestroyed(delayedEvent.item);
if (_focus == delayedEvent.item)
@@ -589,11 +601,11 @@ void MohawkEngine_LivingBooks::updatePage() {
}
}
-void MohawkEngine_LivingBooks::addArchive(MohawkArchive *archive) {
+void MohawkEngine_LivingBooks::addArchive(Archive *archive) {
_mhk.push_back(archive);
}
-void MohawkEngine_LivingBooks::removeArchive(MohawkArchive *archive) {
+void MohawkEngine_LivingBooks::removeArchive(Archive *archive) {
for (uint i = 0; i < _mhk.size(); i++) {
if (archive != _mhk[i])
continue;
@@ -606,6 +618,8 @@ void MohawkEngine_LivingBooks::removeArchive(MohawkArchive *archive) {
void MohawkEngine_LivingBooks::addItem(LBItem *item) {
_items.push_back(item);
+ _orderedItems.push_front(item);
+ item->_iterator = _orderedItems.begin();
}
void MohawkEngine_LivingBooks::removeItems(const Common::Array<LBItem *> &items) {
@@ -619,6 +633,7 @@ void MohawkEngine_LivingBooks::removeItems(const Common::Array<LBItem *> &items)
break;
}
assert(found);
+ _orderedItems.erase(items[i]->_iterator);
}
}
@@ -767,6 +782,8 @@ void LBPage::loadBITL(uint16 resourceId) {
if (bitlStream->size() == bitlStream->pos())
break;
}
+
+ delete bitlStream;
}
Common::SeekableSubReadStreamEndian *MohawkEngine_LivingBooks::wrapStreamEndian(uint32 tag, uint16 id) {
@@ -862,8 +879,11 @@ Common::String MohawkEngine_LivingBooks::convertWinFileName(const Common::String
return filename;
}
-MohawkArchive *MohawkEngine_LivingBooks::createMohawkArchive() const {
- return isPreMohawk() ? new LivingBooksArchive_v1() : new MohawkArchive();
+Archive *MohawkEngine_LivingBooks::createArchive() const {
+ if (isPreMohawk())
+ return new LivingBooksArchive_v1();
+
+ return new MohawkArchive();
}
bool MohawkEngine_LivingBooks::isPreMohawk() const {
@@ -1307,8 +1327,13 @@ void MohawkEngine_LivingBooks::handleNotify(NotifyEvent &event) {
if (getGameType() == GType_LIVINGBOOKSV1) {
debug(2, "kLBNotifyChangeMode: %d", event.param);
quitGame();
- } else {
- debug(2, "kLBNotifyChangeMode: mode %d, page %d.%d",
+ break;
+ }
+
+ debug(2, "kLBNotifyChangeMode: v2 type %d", event.param);
+ switch (event.param) {
+ case 1:
+ debug(2, "kLBNotifyChangeMode:, mode %d, page %d.%d",
event.newMode, event.newPage, event.newSubpage);
// TODO: what is entry.newUnknown?
if (!event.newMode)
@@ -1319,6 +1344,13 @@ void MohawkEngine_LivingBooks::handleNotify(NotifyEvent &event) {
error("kLBNotifyChangeMode failed to move to mode %d, page %d.%d",
event.newMode, event.newPage, event.newSubpage);
}
+ break;
+ case 3:
+ debug(2, "kLBNotifyChangeMode: new cursor '%s'", event.newCursor.c_str());
+ _cursor->setCursor(event.newCursor);
+ break;
+ default:
+ error("unknown v2 kLBNotifyChangeMode type %d", event.param);
}
break;
@@ -1873,6 +1905,7 @@ uint16 LBAnimation::getParentId() {
LBScriptEntry::LBScriptEntry() {
state = 0;
+ data = NULL;
argvParam = NULL;
argvTarget = NULL;
}
@@ -1880,6 +1913,7 @@ LBScriptEntry::LBScriptEntry() {
LBScriptEntry::~LBScriptEntry() {
delete[] argvParam;
delete[] argvTarget;
+ delete[] data;
for (uint i = 0; i < subentries.size(); i++)
delete subentries[i];
@@ -1943,7 +1977,10 @@ void LBItem::readFrom(Common::SeekableSubReadStreamEndian *stream) {
uint16 dataSize = stream->readUint16();
debug(4, "Data type %04x, size %d", dataType, dataSize);
- readData(dataType, dataSize, stream);
+ byte *buf = new byte[dataSize];
+ stream->read(buf, dataSize);
+ readData(dataType, dataSize, buf);
+ delete[] buf;
if ((uint)stream->pos() != oldPos + 4 + (uint)dataSize)
error("Failed to read correct number of bytes (off by %d) for data type %04x (size %d)",
@@ -1956,7 +1993,7 @@ void LBItem::readFrom(Common::SeekableSubReadStreamEndian *stream) {
}
}
-LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::SeekableSubReadStreamEndian *stream, bool isSubentry) {
+LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::MemoryReadStreamEndian *stream, bool isSubentry) {
if (size < 6)
error("Script entry of type 0x%04x was too small (%d)", type, size);
@@ -1999,30 +2036,40 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
entry->argc = stream->readUint16();
size -= 2;
+ entry->targetingType = 0;
+
uint16 targetingType = entry->argc;
- if (targetingType == 0x3f3f || targetingType == 0xffff) {
- entry->argc = 0;
+ if (targetingType == kTargetTypeExpression || targetingType == kTargetTypeCode
+ || targetingType == kTargetTypeName) {
+ entry->targetingType = targetingType;
+
+ // FIXME
+ if (targetingType == kTargetTypeCode)
+ error("encountered kTargetTypeCode");
+ if (size < 2)
+ error("not enough bytes (%d) reading special targeting", size);
uint16 count = stream->readUint16();
size -= 2;
debug(4, "%d targets with targeting type %04x", count, targetingType);
- // FIXME: targeting by name
uint oldAlign = size % 2;
for (uint i = 0; i < count; i++) {
Common::String target = _vm->readString(stream);
- warning("ignoring target '%s' in script entry", target.c_str());
+ debug(4, "target '%s'", target.c_str());
+ entry->targets.push_back(target);
+ if (target.size() + 1 > size)
+ error("failed to read target (ran out of stream)");
size -= target.size() + 1;
}
+ entry->argc = entry->targets.size();
if ((uint)(size % 2) != oldAlign) {
stream->skip(1);
size--;
}
- }
-
- if (entry->argc) {
+ } else if (entry->argc) {
entry->argvParam = new uint16[entry->argc];
entry->argvTarget = new uint16[entry->argc];
debug(4, "With %d targets:", entry->argc);
@@ -2057,16 +2104,32 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
}
if (type == kLBNotifyScript && entry->opcode == kLBNotifyChangeMode && _vm->getGameType() != GType_LIVINGBOOKSV1) {
- if (size < 8) {
- error("%d unknown bytes in notify entry kLBNotifyChangeMode", size);
+ switch (entry->param) {
+ case 1:
+ if (size < 8)
+ error("%d unknown bytes in notify entry kLBNotifyChangeMode", size);
+ entry->newUnknown = stream->readUint16();
+ entry->newMode = stream->readUint16();
+ entry->newPage = stream->readUint16();
+ entry->newSubpage = stream->readUint16();
+ debug(4, "kLBNotifyChangeMode: unknown %04x, mode %d, page %d.%d",
+ entry->newUnknown, entry->newMode, entry->newPage, entry->newSubpage);
+ size -= 8;
+ break;
+ case 3:
+ {
+ Common::String newCursor = _vm->readString(stream);
+ entry->newCursor = newCursor;
+ if (size < newCursor.size() + 1)
+ error("failed to read newCursor in notify entry");
+ size -= newCursor.size() + 1;
+ debug(4, "kLBNotifyChangeMode: new cursor '%s'", newCursor.c_str());
+ }
+ break;
+ default:
+ // the original engine also does something when param==2 (but not a notify)
+ error("unknown v2 kLBNotifyChangeMode type %d", entry->param);
}
- entry->newUnknown = stream->readUint16();
- entry->newMode = stream->readUint16();
- entry->newPage = stream->readUint16();
- entry->newSubpage = stream->readUint16();
- debug(4, "kLBNotifyChangeMode: unknown %04x, mode %d, page %d.%d",
- entry->newUnknown, entry->newMode, entry->newPage, entry->newSubpage);
- size -= 8;
}
if (entry->opcode == kLBOpSendExpression) {
if (size < 4)
@@ -2075,37 +2138,33 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
debug(4, "kLBOpSendExpression: offset %08x", entry->offset);
size -= 4;
}
- if (entry->opcode == 0xffff) {
+ if (entry->opcode == kLBOpRunData) {
if (size < 4)
- error("didn't get enough bytes (%d) to read message in script entry", size);
- uint16 msgId = stream->readUint16();
- uint16 msgLen = stream->readUint16();
+ error("didn't get enough bytes (%d) to read data header in script entry", size);
+ entry->dataType = stream->readUint16();
+ entry->dataLen = stream->readUint16();
size -= 4;
- if (msgId == kLBSetPlayInfo) {
- if (size != 20)
- error("wah, more than just the kLBSetPlayInfo in here");
- // FIXME
- warning("ignoring kLBSetPlayInfo");
- size -= 20;
- stream->skip(20);
- return entry;
- }
- if (msgId != kLBCommand)
- error("expected a command in script entry, got 0x%04x", msgId);
+ if (size < entry->dataLen)
+ error("didn't get enough bytes (%d) to read data in script entry", size);
- if (msgLen != size - (entry->event == kLBEventNotified ? 4 : 0) && !conditionTag)
- error("script entry msgLen %d is not equal to size %d", msgLen, size);
-
- Common::String command = _vm->readString(stream);
- if (command.size() + 1 > size) {
- error("failed to read command in script entry: msgLen %d, command '%s' (%d chars)",
- msgLen, command.c_str(), command.size());
+ if (entry->dataType == kLBCommand) {
+ Common::String command = _vm->readString(stream);
+ uint commandSize = command.size() + 1;
+ if (commandSize > entry->dataLen)
+ error("failed to read command in script entry: dataLen %d, command '%s' (%d chars)",
+ entry->dataLen, command.c_str(), commandSize);
+ entry->dataLen = commandSize;
+ entry->data = new byte[commandSize];
+ memcpy(entry->data, command.c_str(), commandSize);
+ size -= commandSize;
+ } else {
+ if (conditionTag)
+ error("kLBOpRunData had unexpected conditionTag");
+ entry->data = new byte[entry->dataLen];
+ stream->read(entry->data, entry->dataLen);
+ size -= entry->dataLen;
}
- size -= command.size() + 1;
-
- entry->command = command;
- debug(4, "script entry command '%s'", command.c_str());
}
if (entry->event == kLBEventNotified) {
if (size < 4)
@@ -2126,6 +2185,8 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
}
if (conditionTag == 1) {
+ if (!size)
+ error("failed to read condition (empty stream)");
Common::String condition = _vm->readString(stream);
if (condition.size() == 0) {
size--;
@@ -2140,6 +2201,8 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
entry->conditions.push_back(condition);
debug(4, "script entry condition '%s'", condition.c_str());
} else if (conditionTag == 2) {
+ if (size < 4)
+ error("expected more than %d bytes for conditionTag 2", size);
// FIXME
stream->skip(4);
size -= 4;
@@ -2156,7 +2219,12 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
return entry;
}
-void LBItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream) {
+void LBItem::readData(uint16 type, uint16 size, byte *data) {
+ Common::MemoryReadStreamEndian stream(data, size, _vm->isBigEndian());
+ readData(type, size, &stream);
+}
+
+void LBItem::readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) {
switch (type) {
case kLBMsgListScript:
case kLBNotifyScript:
@@ -2274,8 +2342,6 @@ void LBItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEnd
{
assert(size == 4);
uint offset = stream->readUint32();
- if (!_page->_code)
- error("no BCOD?");
_page->_code->runCode(this, offset);
}
break;
@@ -2547,6 +2613,7 @@ void LBItem::runScript(uint event, uint16 data, uint16 from) {
notifyEvent.newMode = entry->newMode;
notifyEvent.newPage = entry->newPage;
notifyEvent.newSubpage = entry->newSubpage;
+ notifyEvent.newCursor = entry->newCursor;
_vm->addNotifyEvent(notifyEvent);
} else
_vm->addNotifyEvent(NotifyEvent(entry->opcode, entry->param));
@@ -2612,15 +2679,59 @@ int LBItem::runScriptEntry(LBScriptEntry *entry) {
entry->type, entry->event, entry->opcode, entry->param);
if (entry->argc) {
- uint16 targetId = entry->argvTarget[n];
- // TODO: is this type, perhaps?
- uint16 param = entry->argvParam[n];
- target = _vm->getItemById(targetId);
- if (!target) {
- debug(2, "Target %04x (%04x) doesn't exist, skipping", targetId, param);
- continue;
+ switch (entry->targetingType) {
+ case kTargetTypeExpression:
+ {
+ // FIXME: this should be EVALUATED
+ LBValue &tgt = _vm->_variables[entry->targets[n]];
+ switch (tgt.type) {
+ case kLBValueItemPtr:
+ target = tgt.item;
+ break;
+ case kLBValueString:
+ // FIXME: handle 'self', at least
+ // TODO: correct otherwise? or only self?
+ target = _vm->getItemByName(tgt.string);
+ break;
+ case kLBValueInteger:
+ target = _vm->getItemById(tgt.integer);
+ break;
+ default:
+ // FIXME: handle list
+ warning("Target '%s' (by expression) resulted in unknown type, skipping", entry->targets[n].c_str());
+ continue;
+ }
+ }
+ if (!target) {
+ debug(2, "Target '%s' (by expression) doesn't exist, skipping", entry->targets[n].c_str());
+ continue;
+ }
+ debug(2, "Target: '%s' (expression '%s')", target->_desc.c_str(), entry->targets[n].c_str());
+ break;
+ case kTargetTypeCode:
+ // FIXME
+ error("encountered kTargetTypeCode");
+ break;
+ case kTargetTypeName:
+ // FIXME: handle 'self'
+ target = _vm->getItemByName(entry->targets[n]);
+ if (!target) {
+ debug(2, "Target '%s' (by name) doesn't exist, skipping", entry->targets[n].c_str());
+ continue;
+ }
+ debug(2, "Target: '%s' (by name)", target->_desc.c_str());
+ break;
+ default:
+ uint16 targetId = entry->argvTarget[n];
+ // TODO: is this type, perhaps?
+ uint16 param = entry->argvParam[n];
+ target = _vm->getItemById(targetId);
+ if (!target) {
+ debug(2, "Target %04x (%04x) doesn't exist, skipping", targetId, param);
+ continue;
+ }
+ debug(2, "Target: %04x (%04x) '%s'", targetId, param, target->_desc.c_str());
}
- debug(2, "Target: %04x (%04x) '%s'", targetId, param, target->_desc.c_str());
} else {
target = this;
debug(2, "Self-target on '%s'", _desc.c_str());
@@ -2753,8 +2864,6 @@ int LBItem::runScriptEntry(LBScriptEntry *entry) {
break;
case kLBOpSendExpression:
- if (!_page->_code)
- error("no BCOD?");
_page->_code->runCode(this, entry->offset);
break;
@@ -2781,15 +2890,13 @@ int LBItem::runScriptEntry(LBScriptEntry *entry) {
}
break;
- case kLBOpRunCommand:
- runCommand(entry->command);
+ case kLBOpRunData:
+ readData(entry->dataType, entry->dataLen, entry->data);
break;
case kLBOpJumpUnlessExpression:
case kLBOpBreakExpression:
case kLBOpJumpToExpression:
- if (!_page->_code)
- error("no BCOD?");
{
LBValue r = _page->_code->runCode(this, entry->offset);
// FIXME
@@ -2814,257 +2921,24 @@ void LBItem::setNextTime(uint16 min, uint16 max, uint32 start) {
debug(9, "nextTime is now %d frames away", _nextTime - (uint)(_vm->_system->getMillis() / 16));
}
-enum LBTokenType {
- kLBNoToken,
- kLBNameToken,
- kLBStringToken,
- kLBOperatorToken,
- kLBIntegerToken,
- kLBEndToken
-};
-
-static Common::String readToken(const Common::String &source, uint &pos, LBTokenType &type) {
- Common::String token;
- type = kLBNoToken;
-
- bool done = false;
- while (pos < source.size() && !done) {
- if (type == kLBStringToken) {
- if (source[pos] == '"') {
- pos++;
- return token;
- }
-
- token += source[pos];
- pos++;
- continue;
- }
-
- switch (source[pos]) {
- case ' ':
- pos++;
- done = true;
- break;
-
- case ')':
- if (type == kLBNoToken) {
- type = kLBEndToken;
- return Common::String();
- }
- done = true;
- break;
-
- case ';':
- if (type == kLBNoToken) {
- pos++;
- type = kLBEndToken;
- return Common::String();
- }
- done = true;
- break;
-
- case '@':
- // FIXME
- error("found @ in string '%s', not supported yet", source.c_str());
-
- case '+':
- case '-':
- case '!':
- case '=':
- case '>':
- case '<':
- if (type == kLBNoToken)
- type = kLBOperatorToken;
- if (type == kLBOperatorToken)
- token += source[pos];
- else
- done = true;
- break;
-
- case '"':
- if (type == kLBNoToken)
- type = kLBStringToken;
- else
- done = true;
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (type == kLBNoToken)
- type = kLBIntegerToken;
- if (type == kLBNameToken || type == kLBIntegerToken)
- token += source[pos];
- else
- done = true;
- break;
-
- default:
- if (type == kLBNoToken)
- type = kLBNameToken;
- if (type == kLBNameToken)
- token += source[pos];
- else
- done = true;
- break;
- }
-
- if (!done)
- pos++;
- }
-
- if (type == kLBStringToken)
- error("readToken: ran out of input while parsing string from '%s'", source.c_str());
-
- if (!token.size()) {
- assert(type == kLBNoToken);
- type = kLBEndToken;
- }
-
- return token;
-}
-
-LBValue LBItem::parseValue(const Common::String &source, uint &pos) {
- LBTokenType type, postOpType;
- Common::String preOp, postOp;
-
- Common::String str = readToken(source, pos, type);
- if (type == kLBOperatorToken) {
- preOp = str;
- str = readToken(source, pos, type);
- }
-
- LBValue value;
- if (type == kLBStringToken) {
- value.type = kLBValueString;
- value.string = str;
- } else if (type == kLBIntegerToken) {
- value.type = kLBValueInteger;
- value.integer = atoi(str.c_str());
- } else if (type == kLBNameToken) {
- value = _vm->_variables[str];
- } else {
- error("expected string/integer as value in '%s', got '%s'", source.c_str(), str.c_str());
- }
-
- uint readAheadPos = pos;
- postOp = readToken(source, readAheadPos, postOpType);
- if (postOpType != kLBEndToken) {
- if (postOpType != kLBOperatorToken)
- error("expected operator after '%s' in '%s', got '%s'", str.c_str(), source.c_str(), postOp.c_str());
- // might be a comparison operator, caller will handle other cases if valid
- if (postOp == "-" || postOp == "+") {
- pos = readAheadPos;
- LBValue nextValue = parseValue(source, pos);
- if (value.type != kLBValueInteger || nextValue.type != kLBValueInteger)
- error("expected integer for arthmetic operator in '%s'", source.c_str());
- if (postOp == "+")
- value.integer += nextValue.integer;
- else if (postOp == "-")
- value.integer -= nextValue.integer;
- }
- }
-
- if (preOp.size()) {
- if (preOp == "!") {
- if (value.type == kLBValueInteger)
- value.integer = !value.integer;
- else
- error("expected integer after ! operator in '%s'", source.c_str());
- } else {
- error("expected valid operator before '%s' in '%s', got '%s'", str.c_str(), source.c_str(), preOp.c_str());
- }
- }
-
- return value;
-}
-
void LBItem::runCommand(const Common::String &command) {
- uint pos = 0;
- LBTokenType type;
+ LBCode tempCode(_vm, 0);
debug(2, "running command '%s'", command.c_str());
- while (pos < command.size()) {
- Common::String varname = readToken(command, pos, type);
- if (type != kLBNameToken)
- error("expected name as lvalue of command '%s', got '%s'", command.c_str(), varname.c_str());
- Common::String op = readToken(command, pos, type);
- if (type != kLBOperatorToken || (op != "=" && op != "++" && op != "--"))
- error("expected assignment/postincrement/postdecrement operator for command '%s', got '%s'", command.c_str(), op.c_str());
-
- if (op == "=") {
- LBValue value = parseValue(command, pos);
- _vm->_variables[varname] = value;
- } else {
- if (_vm->_variables[varname].type != kLBValueInteger)
- error("expected integer after postincrement/postdecrement operator in '%s'", command.c_str());
- if (op == "++")
- _vm->_variables[varname].integer++;
- else if (op == "--")
- _vm->_variables[varname].integer--;
- }
-
- if (pos < command.size() && command[pos] == ';')
- pos++;
- }
+ uint offset = tempCode.parseCode(command);
+ tempCode.runCode(this, offset);
}
bool LBItem::checkCondition(const Common::String &condition) {
- uint pos = 0;
- LBTokenType type;
+ LBCode tempCode(_vm, 0);
debug(3, "checking condition '%s'", condition.c_str());
- if (condition.size() <= pos || condition[pos] != '(')
- error("bad condition '%s' (started wrong)", condition.c_str());
- pos++;
-
- LBValue value1 = parseValue(condition, pos);
-
- Common::String op = readToken(condition, pos, type);
- if (type == kLBEndToken) {
- if (condition.size() != pos + 1 || condition[pos] != ')')
- error("bad condition '%s' (ended wrong)", condition.c_str());
-
- if (value1.type == kLBValueInteger)
- return value1.integer;
- else
- error("expected comparison operator for condition '%s'", condition.c_str());
- }
- if (type != kLBOperatorToken || (op != "!=" && op != "==" && op != ">" && op != "<" && op != ">=" && op != "<="))
- error("expected comparison operator for condition '%s', got '%s'", condition.c_str(), op.c_str());
-
- LBValue value2 = parseValue(condition, pos);
-
- if (condition.size() != pos + 1 || condition[pos] != ')')
- error("bad condition '%s' (ended wrong)", condition.c_str());
-
- if (op == "!=")
- return (value1 != value2);
- else if (op == "==")
- return (value1 == value2);
-
- if (value1.type != kLBValueInteger || value2.type != kLBValueInteger)
- error("evaluation operator %s in condition '%s' expected two integer operands!", op.c_str(), condition.c_str());
-
- if (op == ">")
- return (value1.integer > value2.integer);
- else if (op == ">=")
- return (value1.integer >= value2.integer);
- else if (op == "<")
- return (value1.integer < value2.integer);
- else if (op == "<=")
- return (value1.integer <= value2.integer);
+ uint offset = tempCode.parseCode(condition);
+ LBValue result = tempCode.runCode(this, offset);
- return false; // unreachable
+ return result.toInt();
}
LBSoundItem::LBSoundItem(MohawkEngine_LivingBooks *vm, LBPage *page, Common::Rect rect) : LBItem(vm, page, rect) {
@@ -3118,7 +2992,7 @@ LBGroupItem::LBGroupItem(MohawkEngine_LivingBooks *vm, LBPage *page, Common::Rec
_starting = false;
}
-void LBGroupItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream) {
+void LBGroupItem::readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) {
switch (type) {
case kLBGroupData:
{
@@ -3239,7 +3113,7 @@ LBPaletteItem::~LBPaletteItem() {
delete[] _palette;
}
-void LBPaletteItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream) {
+void LBPaletteItem::readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) {
switch (type) {
case kLBPaletteXData:
{
@@ -3319,7 +3193,7 @@ LBLiveTextItem::LBLiveTextItem(MohawkEngine_LivingBooks *vm, LBPage *page, Commo
debug(3, "new LBLiveTextItem");
}
-void LBLiveTextItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream) {
+void LBLiveTextItem::readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) {
switch (type) {
case kLBLiveTextData:
{
@@ -3564,7 +3438,7 @@ LBPictureItem::LBPictureItem(MohawkEngine_LivingBooks *vm, LBPage *page, Common:
debug(3, "new LBPictureItem");
}
-void LBPictureItem::readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream) {
+void LBPictureItem::readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream) {
switch (type) {
case kLBSetDrawMode:
{
@@ -3790,8 +3664,8 @@ void LBProxyItem::init() {
}
debug(1, "LBProxyItem loading archive '%s' with id %d", filename.c_str(), baseId);
- MohawkArchive *pageArchive = _vm->createMohawkArchive();
- if (!pageArchive->open(filename))
+ Archive *pageArchive = _vm->createArchive();
+ if (!pageArchive->openFile(filename))
error("failed to open archive '%s' (for proxy '%s')", filename.c_str(), _desc.c_str());
_page = new LBPage(_vm);
_page->open(pageArchive, baseId);
diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h
index de84b0f13f..27e703a578 100644
--- a/engines/mohawk/livingbooks.h
+++ b/engines/mohawk/livingbooks.h
@@ -29,7 +29,6 @@
#include "mohawk/sound.h"
#include "common/config-file.h"
-#include "common/substream.h"
#include "common/rect.h"
#include "common/queue.h"
#include "common/random.h"
@@ -38,6 +37,11 @@
#include "livingbooks_code.h"
+namespace Common {
+ class SeekableSubReadStreamEndian;
+ class MemoryReadStreamEndian;
+}
+
namespace Mohawk {
#define LBKEY_MOD_CTRL 1
@@ -129,7 +133,9 @@ enum {
kLBEventMouseUp = 5,
kLBEventPhaseMain = 6,
kLBEventNotified = 7,
+ kLBEventDragStart = 8,
kLBEventDragMove = 9,
+ kLBEventDragEnd = 0xa,
kLBEventRolloverBegin = 0xb,
kLBEventRolloverMove = 0xc,
kLBEventRolloverEnd = 0xd,
@@ -218,7 +224,7 @@ enum {
kLBOpBreakExpression = 0xfffc,
kLBOpJumpToExpression = 0xfffd,
kLBOpRunSubentries = 0xfffe,
- kLBOpRunCommand = 0xffff
+ kLBOpRunData = 0xffff
};
enum {
@@ -233,6 +239,12 @@ enum {
kLBNotifyQuit = 0xd
};
+enum {
+ kTargetTypeExpression = 0x3f3f,
+ kTargetTypeCode = 0xfffe,
+ kTargetTypeName = 0xffff
+};
+
class MohawkEngine_LivingBooks;
class LBPage;
class LBGraphics;
@@ -253,11 +265,15 @@ struct LBScriptEntry {
uint16 *argvParam;
uint16 *argvTarget;
+ uint16 targetingType;
+ Common::Array<Common::String> targets;
+
// kLBNotifyChangeMode
uint16 newUnknown;
uint16 newMode;
uint16 newPage;
uint16 newSubpage;
+ Common::String newCursor;
// kLBEventNotified
uint16 matchFrom;
@@ -268,7 +284,10 @@ struct LBScriptEntry {
// kLBOpJumpUnlessExpression
uint16 target;
- Common::String command;
+ uint16 dataType;
+ uint16 dataLen;
+ byte *data;
+
Common::Array<Common::String> conditions;
Common::Array<LBScriptEntry *> subentries;
};
@@ -359,7 +378,8 @@ public:
virtual ~LBItem();
void readFrom(Common::SeekableSubReadStreamEndian *stream);
- virtual void readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream);
+ void readData(uint16 type, uint16 size, byte *data);
+ virtual void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
virtual void destroySelf(); // 0x2
virtual void setEnabled(bool enabled); // 0x3
@@ -388,6 +408,8 @@ public:
uint16 getSoundPriority() { return _soundMode; }
bool isAmbient() { return _isAmbient; }
+ Common::List<LBItem *>::iterator _iterator;
+
protected:
MohawkEngine_LivingBooks *_vm;
LBPage *_page;
@@ -417,11 +439,10 @@ protected:
void runScript(uint event, uint16 data = 0, uint16 from = 0);
int runScriptEntry(LBScriptEntry *entry);
- LBValue parseValue(const Common::String &command, uint &pos);
void runCommand(const Common::String &command);
bool checkCondition(const Common::String &condition);
- LBScriptEntry *parseScriptEntry(uint16 type, uint16 &size, Common::SeekableSubReadStreamEndian *stream, bool isSubentry = false);
+ LBScriptEntry *parseScriptEntry(uint16 type, uint16 &size, Common::MemoryReadStreamEndian *stream, bool isSubentry = false);
};
class LBSoundItem : public LBItem {
@@ -446,7 +467,7 @@ class LBGroupItem : public LBItem {
public:
LBGroupItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
- void readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream);
+ void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
void destroySelf();
void setEnabled(bool enabled);
@@ -459,7 +480,7 @@ public:
void setGlobalVisible(bool visible);
void startPhase(uint phase);
void stop();
-
+
protected:
bool _starting;
@@ -471,7 +492,7 @@ public:
LBPaletteItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
~LBPaletteItem();
- void readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream);
+ void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
bool togglePlaying(bool playing, bool restart);
void update();
@@ -497,7 +518,7 @@ class LBLiveTextItem : public LBItem {
public:
LBLiveTextItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
- void readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream);
+ void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
bool contains(Common::Point point);
void update();
@@ -526,7 +547,7 @@ class LBPictureItem : public LBItem {
public:
LBPictureItem(MohawkEngine_LivingBooks *_vm, LBPage *page, Common::Rect rect);
- void readData(uint16 type, uint16 size, Common::SeekableSubReadStreamEndian *stream);
+ void readData(uint16 type, uint16 size, Common::MemoryReadStreamEndian *stream);
bool contains(Common::Point point);
void draw();
@@ -592,6 +613,7 @@ struct NotifyEvent {
uint16 newMode;
uint16 newPage;
uint16 newSubpage;
+ Common::String newCursor;
};
enum DelayedEventType {
@@ -611,7 +633,7 @@ public:
LBPage(MohawkEngine_LivingBooks *vm);
~LBPage();
- void open(MohawkArchive *mhk, uint16 baseId);
+ void open(Archive *mhk, uint16 baseId);
uint16 getResourceVersion();
void itemDestroyed(LBItem *item);
@@ -621,7 +643,7 @@ public:
protected:
MohawkEngine_LivingBooks *_vm;
- MohawkArchive *_mhk;
+ Archive *_mhk;
Common::Array<LBItem *> _items;
uint16 _baseId;
@@ -646,12 +668,12 @@ public:
void addNotifyEvent(NotifyEvent event);
Common::SeekableSubReadStreamEndian *wrapStreamEndian(uint32 tag, uint16 id);
- Common::String readString(Common::SeekableSubReadStreamEndian *stream);
- Common::Rect readRect(Common::SeekableSubReadStreamEndian *stream);
+ Common::String readString(Common::ReadStream *stream);
+ Common::Rect readRect(Common::ReadStreamEndian *stream);
GUI::Debugger *getDebugger() { return _console; }
- void addArchive(MohawkArchive *archive);
- void removeArchive(MohawkArchive *Archive);
+ void addArchive(Archive *archive);
+ void removeArchive(Archive *archive);
void addItem(LBItem *item);
void removeItems(const Common::Array<LBItem *> &items);
@@ -672,6 +694,7 @@ public:
LBMode getCurMode() { return _curMode; }
bool tryLoadPageStart(LBMode mode, uint page);
+ bool loadPage(LBMode mode, uint page, uint subpage);
void prevPage();
void nextPage();
@@ -680,7 +703,7 @@ public:
// helper functions, also used by LBProxyItem
Common::String getFileNameFromConfig(const Common::String &section, const Common::String &key, Common::String &leftover);
- MohawkArchive *createMohawkArchive() const;
+ Archive *createArchive() const;
private:
LivingBooksConsole *_console;
@@ -697,10 +720,10 @@ private:
uint16 _phase;
LBPage *_page;
Common::Array<LBItem *> _items;
+ Common::List<LBItem *> _orderedItems;
Common::Queue<DelayedEvent> _eventQueue;
LBItem *_focus;
void destroyPage();
- bool loadPage(LBMode mode, uint page, uint subpage);
void updatePage();
uint16 _lastSoundOwner, _lastSoundId;
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp
index 165ca4a328..80b5fe9660 100644
--- a/engines/mohawk/livingbooks_code.cpp
+++ b/engines/mohawk/livingbooks_code.cpp
@@ -32,6 +32,10 @@ bool LBValue::operator==(const LBValue &x) const {
if (type != x.type) {
if (isNumeric() && x.isNumeric())
return toDouble() == x.toDouble();
+ else if (type == kLBValueString && x.type == kLBValueItemPtr)
+ return string == x.item->getName();
+ else if (type == kLBValueItemPtr && x.type == kLBValueString)
+ return item->getName() == x.string;
else
return false;
}
@@ -123,6 +127,12 @@ Common::Rect LBValue::toRect() const {
}
LBCode::LBCode(MohawkEngine_LivingBooks *vm, uint16 baseId) : _vm(vm) {
+ if (!baseId) {
+ _data = NULL;
+ _size = 0;
+ return;
+ }
+
Common::SeekableSubReadStreamEndian *bcodStream = _vm->wrapStreamEndian(ID_BCOD, baseId);
uint32 totalSize = bcodStream->readUint32();
@@ -168,12 +178,8 @@ LBValue LBCode::runCode(LBItem *src, uint32 offset) {
}
void LBCode::nextToken() {
- if (_currOffset + 1 >= _size) {
- // TODO
- warning("went off the end of code");
- _currToken = kTokenEndOfFile;
- _currValue = LBValue();
- return;
+ if (_currOffset >= _size) {
+ error("went off the end of code");
}
_currToken = _data[_currOffset++];
@@ -182,6 +188,8 @@ void LBCode::nextToken() {
switch (_currToken) {
case kTokenIdentifier:
{
+ if (_currOffset + 2 > _size)
+ error("went off the end of code reading identifier");
uint16 offset = READ_BE_UINT16(_data + _currOffset);
// TODO: check string exists
_currValue = _strings[offset];
@@ -191,9 +199,13 @@ void LBCode::nextToken() {
case kTokenLiteral:
{
+ if (_currOffset + 1 > _size)
+ error("went off the end of code reading literal");
byte literalType = _data[_currOffset++];
switch (literalType) {
case kLBCodeLiteralInteger:
+ if (_currOffset + 2 > _size)
+ error("went off the end of code reading literal integer");
_currValue = READ_BE_UINT16(_data + _currOffset);
_currOffset += 2;
break;
@@ -207,6 +219,8 @@ void LBCode::nextToken() {
case kTokenConstEventId:
case 0x5e: // TODO: ??
case kTokenKeycode:
+ if (_currOffset + 2 > _size)
+ error("went off the end of code reading immediate");
_currValue = READ_BE_UINT16(_data + _currOffset);
_currOffset += 2;
break;
@@ -223,6 +237,8 @@ void LBCode::nextToken() {
case kTokenString:
{
+ if (_currOffset + 2 > _size)
+ error("went off the end of code reading string");
uint16 offset = READ_BE_UINT16(_data + _currOffset);
// TODO: check string exists
_currValue = _strings[offset];
@@ -246,8 +262,10 @@ LBValue LBCode::runCode(byte terminator) {
parseStatement();
if (_stack.size())
result = _stack.pop();
- if (_currToken == terminator || _currToken == kTokenEndOfFile)
+ if (_currToken == terminator || _currToken == kTokenEndOfFile) {
+ debugN("\n");
break;
+ }
if (_currToken != kTokenEndOfStatement && _currToken != kTokenEndOfFile)
error("missing EOS (got %02x)", _currToken);
debugN("\n");
@@ -259,27 +277,27 @@ LBValue LBCode::runCode(byte terminator) {
void LBCode::parseStatement() {
parseComparisons();
- if (_currToken != kTokenAnd && _currToken != kTokenOr)
- return;
- byte op = _currToken;
- if (op == kTokenAnd)
- debugN(" && ");
- else
- debugN(" || ");
+ while (_currToken == kTokenAnd || _currToken == kTokenOr) {
+ byte op = _currToken;
+ if (op == kTokenAnd)
+ debugN(" && ");
+ else
+ debugN(" || ");
- nextToken();
- parseComparisons();
+ nextToken();
+ parseComparisons();
- LBValue val2 = _stack.pop();
- LBValue val1 = _stack.pop();
- bool result;
- if (op == kTokenAnd)
- result = !val1.isZero() && !val2.isZero();
- else
- result = !val1.isZero() || !val2.isZero();
+ LBValue val2 = _stack.pop();
+ LBValue val1 = _stack.pop();
+ bool result;
+ if (op == kTokenAnd)
+ result = !val1.isZero() && !val2.isZero();
+ else
+ result = !val1.isZero() || !val2.isZero();
- debugN(" [--> %s]", result ? "true" : "false");
- _stack.push(result);
+ debugN(" [--> %s]", result ? "true" : "false");
+ _stack.push(result);
+ }
}
void LBCode::parseComparisons() {
@@ -347,49 +365,95 @@ void LBCode::parseComparisons() {
void LBCode::parseConcat() {
parseArithmetic1();
- if (_currToken != kTokenConcat)
- return;
-
- debugN(" & ");
- nextToken();
- parseArithmetic1();
+ while (_currToken == kTokenConcat) {
+ debugN(" & ");
+ nextToken();
+ parseArithmetic1();
- LBValue val2 = _stack.pop();
- LBValue val1 = _stack.pop();
- Common::String result = val1.toString() + val2.toString();
- debugN(" [--> \"%s\"]", result.c_str());
- _stack.push(result);
+ LBValue val2 = _stack.pop();
+ LBValue val1 = _stack.pop();
+ Common::String result = val1.toString() + val2.toString();
+ debugN(" [--> \"%s\"]", result.c_str());
+ _stack.push(result);
+ }
}
void LBCode::parseArithmetic1() {
parseArithmetic2();
- if (_currToken != kTokenMinus && _currToken != kTokenPlus)
- return;
-
- byte op = _currToken;
- if (op == kTokenMinus)
- debugN(" - ");
- else if (op == kTokenPlus)
- debugN(" + ");
+ while (_currToken == kTokenMinus || _currToken == kTokenPlus) {
+ byte op = _currToken;
+ if (op == kTokenMinus)
+ debugN(" - ");
+ else if (op == kTokenPlus)
+ debugN(" + ");
- nextToken();
- parseArithmetic2();
-
- LBValue val2 = _stack.pop();
- LBValue val1 = _stack.pop();
- LBValue result;
- // TODO: cope with non-integers
- if (op == kTokenMinus)
- result = val1.toInt() - val2.toInt();
- else
- result = val1.toInt() + val2.toInt();
- _stack.push(result);
+ nextToken();
+ parseArithmetic2();
+
+ LBValue val2 = _stack.pop();
+ LBValue val1 = _stack.pop();
+ LBValue result;
+ // TODO: cope with non-integers
+ if (op == kTokenMinus)
+ result = val1.toInt() - val2.toInt();
+ else
+ result = val1.toInt() + val2.toInt();
+ debugN(" [--> %d]", result.toInt());
+ _stack.push(result);
+ }
}
void LBCode::parseArithmetic2() {
- // FIXME: other math operators
parseMain();
+
+ while (true) {
+ byte op = _currToken;
+ switch (op) {
+ case kTokenMultiply:
+ debugN(" * ");
+ break;
+ case kTokenDivide:
+ debugN(" / ");
+ break;
+ case kTokenIntDivide:
+ debugN(" div ");
+ break;
+ case kTokenModulo:
+ debugN(" %% ");
+ break;
+ default:
+ return;
+ }
+
+ nextToken();
+ parseMain();
+
+ LBValue val2 = _stack.pop();
+ LBValue val1 = _stack.pop();
+ LBValue result;
+ // TODO: cope with non-integers
+ if (op == kTokenMultiply) {
+ result = val1.toInt() * val2.toInt();
+ } else if (val2.toInt() == 0) {
+ result = 1;
+ } else {
+ switch (op) {
+ case kTokenDivide:
+ // TODO: fp divide
+ result = val1.toInt() / val2.toInt();
+ break;
+ case kTokenIntDivide:
+ result = val1.toInt() / val2.toInt();
+ break;
+ case kTokenModulo:
+ result = val1.toInt() % val2.toInt();
+ break;
+ }
+ }
+
+ _stack.push(result);
+ }
}
void LBCode::parseMain() {
@@ -437,6 +501,33 @@ void LBCode::parseMain() {
}
break;
+ case kTokenPlusPlus:
+ case kTokenMinusMinus:
+ {
+ byte token = _currToken;
+ if (token == kTokenPlusPlus)
+ debugN("++");
+ else
+ debugN("--");
+ nextToken();
+
+ if (_currToken != kTokenIdentifier)
+ error("expected identifier");
+ assert(_currValue.type == kLBValueString);
+ Common::String varname = _currValue.string;
+ debugN("%s", varname.c_str());
+ LBValue &val = _vm->_variables[varname];
+
+ // FIXME: pre/postincrement for non-integers
+ if (token == kTokenPlusPlus)
+ val.integer++;
+ else
+ val.integer--;
+ _stack.push(val);
+ nextToken();
+ }
+ break;
+
case kTokenLiteral:
case kTokenConstMode:
case kTokenConstEventId:
@@ -516,6 +607,16 @@ void LBCode::parseMain() {
}
}
+LBItem *LBCode::resolveItem(const LBValue &value) {
+ if (value.type == kLBValueItemPtr)
+ return value.item;
+ if (value.type == kLBValueString)
+ return _vm->getItemByName(value.string);
+ if (value.type == kLBValueInteger)
+ return _vm->getItemById(value.integer);
+ return NULL;
+}
+
Common::Array<LBValue> LBCode::readParams() {
Common::Array<LBValue> params;
@@ -583,10 +684,10 @@ struct CodeCommandInfo {
#define NUM_GENERAL_COMMANDS 129
CodeCommandInfo generalCommandInfo[NUM_GENERAL_COMMANDS] = {
- { "eval", 0 },
- { "random", 0 },
- { "stringLen", 0 },
- { "substring", 0 },
+ { "eval", &LBCode::cmdEval },
+ { "random", &LBCode::cmdRandom },
+ { "stringLen", &LBCode::cmdStringLen },
+ { "substring", &LBCode::cmdSubstring },
{ "max", 0 },
{ "min", 0 },
{ "abs", 0 },
@@ -740,6 +841,51 @@ void LBCode::cmdUnimplemented(const Common::Array<LBValue> &params) {
warning("unimplemented command called");
}
+void LBCode::cmdEval(const Common::Array<LBValue> &params) {
+ // FIXME: v4 eval is different?
+ if (params.size() != 1)
+ error("incorrect number of parameters (%d) to eval", params.size());
+
+ LBCode tempCode(_vm, 0);
+
+ uint offset = tempCode.parseCode(params[0].toString());
+ _stack.push(tempCode.runCode(_currSource, offset));
+}
+
+void LBCode::cmdRandom(const Common::Array<LBValue> &params) {
+ if (params.size() != 2)
+ error("incorrect number of parameters (%d) to random", params.size());
+
+ int min = params[0].toInt();
+ int max = params[1].toInt();
+ _stack.push(_vm->_rnd->getRandomNumberRng(min, max));
+}
+
+void LBCode::cmdStringLen(const Common::Array<LBValue> &params) {
+ if (params.size() != 1)
+ error("incorrect number of parameters (%d) to stringLen", params.size());
+
+ const Common::String &string = params[0].toString();
+ _stack.push(string.size());
+}
+
+void LBCode::cmdSubstring(const Common::Array<LBValue> &params) {
+ if (params.size() != 3)
+ error("incorrect number of parameters (%d) to substring", params.size());
+
+ const Common::String &string = params[0].toString();
+ uint begin = params[1].toInt();
+ uint end = params[2].toInt();
+ if (begin == 0)
+ error("invalid substring call (%d to %d)", begin, end);
+ if (begin > end || end > string.size()) {
+ _stack.push(Common::String());
+ return;
+ }
+ Common::String substring(string.c_str() + (begin - 1), end - begin + 1);
+ _stack.push(substring);
+}
+
void LBCode::cmdGetRect(const Common::Array<LBValue> &params) {
if (params.size() < 2) {
_stack.push(getRectFromParams(params));
@@ -882,7 +1028,7 @@ CodeCommandInfo itemCommandInfo[NUM_ITEM_COMMANDS] = {
{ "moveTo", &LBCode::itemMoveTo },
{ "mute", 0 },
{ "play", 0 },
- { "seek", 0 },
+ { "seek", &LBCode::itemSeek },
{ "seekToFrame", 0 },
{ "setParent", &LBCode::itemSetParent },
{ "setZOrder", 0 },
@@ -918,6 +1064,17 @@ void LBCode::itemMoveTo(const Common::Array<LBValue> &params) {
warning("ignoring moveTo");
}
+void LBCode::itemSeek(const Common::Array<LBValue> &params) {
+ if (params.size() != 2)
+ error("incorrect number of parameters (%d) to seek", params.size());
+
+ LBItem *item = resolveItem(params[0]);
+ if (!item)
+ error("attempted seek on invalid item (%s)", params[0].toString().c_str());
+ uint seekTo = params[1].toInt();
+ item->seek(seekTo);
+}
+
void LBCode::itemSetParent(const Common::Array<LBValue> &params) {
if (params.size() > 2)
error("incorrect number of parameters (%d) to setParent", params.size());
@@ -1002,4 +1159,278 @@ void LBCode::runNotifyCommand() {
}
}
+/*
+ * Helper function for parseCode/parseCodeSymbol:
+ * Returns an unused string id.
+ */
+uint LBCode::nextFreeString() {
+ for (uint i = 0; i <= 0xffff; i++) {
+ if (!_strings.contains(i))
+ return i;
+ }
+
+ error("nextFreeString couldn't find a space");
+}
+
+/*
+ * 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) {
+ // first, check whether the name matches a known function
+ for (uint i = 0; i < 2; i++) {
+ byte cmdToken;
+ CodeCommandInfo *cmdInfo = NULL;
+ uint cmdCount = 0;
+
+ switch (i) {
+ case 0:
+ cmdInfo = generalCommandInfo;
+ cmdToken = kTokenGeneralCommand;
+ cmdCount = NUM_GENERAL_COMMANDS;
+ break;
+ case 1:
+ cmdInfo = itemCommandInfo;
+ cmdToken = kTokenItemCommand;
+ cmdCount = NUM_ITEM_COMMANDS;
+ break;
+ }
+
+ for (uint n = 0; n < cmdCount; n++) {
+ const char *cmdName = cmdInfo[n].name;
+ if (!cmdName)
+ continue;
+ if (!name.equalsIgnoreCase(cmdName))
+ continue;
+
+ // found a matching function
+ code.push_back(cmdToken);
+ code.push_back(n + 1);
+ return true;
+ }
+ }
+
+ // not a function, so must be an identifier
+ code.push_back(kTokenIdentifier);
+
+ uint stringId = nextFreeString();
+ _strings[stringId] = name;
+
+ char tmp[2];
+ WRITE_BE_UINT16(tmp, (int16)stringId);
+ code.push_back(tmp[0]);
+ code.push_back(tmp[1]);
+
+ return false;
+}
+
+/*
+ * Parse a string for later execution, and return the offset where it was
+ * stored.
+ */
+uint LBCode::parseCode(const Common::String &source) {
+ struct LBCodeOperator {
+ byte token;
+ byte op;
+ byte lookahead1;
+ byte lookahead1Op;
+ byte lookahead2;
+ byte lookahead2Op;
+ };
+
+ #define NUM_LB_OPERATORS 11
+ static const LBCodeOperator operators[NUM_LB_OPERATORS] = {
+ { '+', kTokenPlus, '+', kTokenPlusPlus, '=', kTokenPlusEquals },
+ { '-', kTokenMinus, '-', kTokenMinusMinus, '=', kTokenMinusEquals },
+ { '/', kTokenDivide, '=', kTokenDivideEquals, 0, 0 },
+ { '*', kTokenMultiply, '=', kTokenMultiplyEquals, 0, 0 },
+ { '=', kTokenAssign, '=', kTokenEquals, 0, 0 },
+ { '>', kTokenGreaterThan, '=', kTokenGreaterThanEq, 0, 0 },
+ { '<', kTokenLessThan, '=', kTokenLessThanEq, 0, 0 },
+ { '!', kTokenNot, '=', kTokenNotEq, 0, 0 },
+ { '&', kTokenConcat, '&', kTokenAnd, '=', kTokenAndEquals },
+ { '|', 0, '|', kTokenOr, 0, 0 },
+ { ';', kTokenEndOfStatement, 0, 0, 0, 0 }
+ };
+
+ uint pos = 0;
+ Common::Array<byte> code;
+ Common::Array<uint> counterPositions;
+ bool wasFunction = false;
+
+ while (pos < source.size()) {
+ byte token = source[pos];
+ byte lookahead = 0;
+ if (pos + 1 < source.size())
+ lookahead = source[pos + 1];
+ pos++;
+
+ if (token != ' ' && token != '(' && wasFunction)
+ error("while parsing script '%s', encountered incomplete function call", source.c_str());
+
+ // First, we check for simple operators.
+ for (uint i = 0; i < NUM_LB_OPERATORS; i++) {
+ if (token != operators[i].token)
+ continue;
+ if (lookahead) {
+ if (lookahead == operators[i].lookahead1) {
+ code.push_back(operators[i].lookahead1Op);
+ token = 0;
+ } else if (lookahead == operators[i].lookahead2) {
+ code.push_back(operators[i].lookahead2Op);
+ token = 0;
+ }
+ if (!token) {
+ pos++;
+ break;
+ }
+ }
+ if (operators[i].op) {
+ code.push_back(operators[i].op);
+ token = 0;
+ }
+ break;
+ }
+ if (!token)
+ continue;
+
+ // Then, we check for more complex tokens.
+ switch (token) {
+ // whitespace
+ case ' ':
+ // ignore
+ break;
+ // literal string
+ case '"':
+ case '\'':
+ {
+ Common::String tempString;
+ while (pos < source.size()) {
+ if (source[pos] == token)
+ break;
+ tempString += source[pos++];
+ }
+ if (pos++ == source.size())
+ error("while parsing script '%s', string had no end", source.c_str());
+
+ code.push_back(kTokenString);
+
+ uint stringId = nextFreeString();
+ _strings[stringId] = tempString;
+
+ char tmp[2];
+ WRITE_BE_UINT16(tmp, (int16)stringId);
+ code.push_back(tmp[0]);
+ code.push_back(tmp[1]);
+ }
+ break;
+ // open bracket
+ case '(':
+ if (wasFunction) {
+ // function call parameters
+ wasFunction = false;
+ // we will need to back-patch the parameter count,
+ // if parameters are encountered
+ counterPositions.push_back(code.size());
+ code.push_back(1);
+ // if the next token is a ) then there are no
+ // parameters, otherwise start with 1 and increment
+ // if/when we encounter commas
+ for (uint i = pos; i < source.size(); i++) {
+ if (source[i] == ' ')
+ continue;
+ if (source[i] != ')')
+ break;
+ code[code.size() - 1] = 0;
+ break;
+ }
+ } else {
+ // brackets around expression
+ counterPositions.push_back(0);
+ }
+ code.push_back(kTokenOpenBracket);
+ break;
+ // close bracket
+ case ')':
+ if (counterPositions.empty())
+ error("while parsing script '%s', encountered unmatched )", source.c_str());
+ counterPositions.pop_back();
+ code.push_back(kTokenCloseBracket);
+ break;
+ // comma (seperating function params)
+ case ',':
+ {
+ if (counterPositions.empty())
+ error("while parsing script '%s', encountered unexpected ,", source.c_str());
+ code.push_back(kTokenComma);
+ uint counterPos = counterPositions.back();
+ if (!counterPos)
+ error("while parsing script '%s', encountered , outside parameter list", source.c_str());
+ code[counterPos]++;
+ }
+ break;
+ // old-style explicit function call
+ case '@':
+ {
+ Common::String tempString;
+ while (pos < source.size()) {
+ if (!isalpha(source[pos]) && !isdigit(source[pos]))
+ break;
+ tempString += source[pos++];
+ }
+ wasFunction = parseCodeSymbol(tempString, pos, code);
+ if (!wasFunction)
+ error("while parsing script '%s', encountered explicit function call to unknown function '%s'",
+ source.c_str(), tempString.c_str());
+ }
+ break;
+ default:
+ if (isdigit(token)) {
+ const char *in = source.c_str() + pos - 1;
+ // FIXME: handle floats?
+ char *endptr;
+ long int intValue = strtol(in, &endptr, 0);
+ assert(endptr > in);
+ pos += (endptr - in) - 1;
+
+ // FIXME: handle storing longs if needed
+ code.push_back(kTokenLiteral);
+ code.push_back(kLBCodeLiteralInteger);
+ char tmp[2];
+ WRITE_BE_UINT16(tmp, (int16)intValue);
+ code.push_back(tmp[0]);
+ code.push_back(tmp[1]);
+ } else if (isalpha(token)) {
+ Common::String tempString;
+ tempString += token;
+ while (pos < source.size()) {
+ if (!isalpha(source[pos]) && !isdigit(source[pos]))
+ break;
+ tempString += source[pos++];
+ }
+ wasFunction = parseCodeSymbol(tempString, pos, code);
+ } else {
+ error("while parsing script '%s', couldn't parse '%c'", source.c_str(), token);
+ }
+ }
+ }
+
+ if (wasFunction)
+ error("while parsing script '%s', encountered incomplete function call", source.c_str());
+ if (counterPositions.size())
+ error("while parsing script '%s', unmatched (", source.c_str());
+
+ code.push_back(kTokenEndOfFile);
+
+ uint codeOffset = _size;
+ byte *newData = new byte[_size + code.size()];
+ memcpy(newData, _data, _size);
+ memcpy(newData, &code[0], code.size());
+ delete[] _data;
+ _data = newData;
+ _size += code.size();
+ return codeOffset;
+}
+
} // End of namespace Mohawk
diff --git a/engines/mohawk/livingbooks_code.h b/engines/mohawk/livingbooks_code.h
index 9602e2d22d..79c9af94f7 100644
--- a/engines/mohawk/livingbooks_code.h
+++ b/engines/mohawk/livingbooks_code.h
@@ -181,6 +181,7 @@ public:
~LBCode();
LBValue runCode(LBItem *src, uint32 offset);
+ uint parseCode(const Common::String &source);
protected:
MohawkEngine_LivingBooks *_vm;
@@ -206,6 +207,7 @@ protected:
void parseArithmetic2();
void parseMain();
+ LBItem *resolveItem(const LBValue &value);
Common::Array<LBValue> readParams();
Common::Rect getRectFromParams(const Common::Array<LBValue> &params);
@@ -213,8 +215,15 @@ protected:
void runItemCommand();
void runNotifyCommand();
+ uint nextFreeString();
+ bool parseCodeSymbol(const Common::String &name, uint &pos, Common::Array<byte> &code);
+
public:
void cmdUnimplemented(const Common::Array<LBValue> &params);
+ void cmdEval(const Common::Array<LBValue> &params);
+ void cmdRandom(const Common::Array<LBValue> &params);
+ void cmdStringLen(const Common::Array<LBValue> &params);
+ void cmdSubstring(const Common::Array<LBValue> &params);
void cmdGetRect(const Common::Array<LBValue> &params);
void cmdTopLeft(const Common::Array<LBValue> &params);
void cmdBottomRight(const Common::Array<LBValue> &params);
@@ -228,9 +237,10 @@ public:
void cmdSetHitTest(const Common::Array<LBValue> &params);
void cmdKey(const Common::Array<LBValue> &params);
- void itemSetParent(const Common::Array<LBValue> &params);
- void itemMoveTo(const Common::Array<LBValue> &params);
void itemIsPlaying(const Common::Array<LBValue> &params);
+ void itemMoveTo(const Common::Array<LBValue> &params);
+ void itemSeek(const Common::Array<LBValue> &params);
+ void itemSetParent(const Common::Array<LBValue> &params);
};
} // End of namespace Mohawk
diff --git a/engines/mohawk/mohawk.h b/engines/mohawk/mohawk.h
index f0618f7374..2f0e570d56 100644
--- a/engines/mohawk/mohawk.h
+++ b/engines/mohawk/mohawk.h
@@ -77,7 +77,7 @@ enum MohawkGameFeatures {
struct MohawkGameDescription;
class Sound;
class PauseDialog;
-class MohawkArchive;
+class Archive;
class CursorManager;
class MohawkEngine : public ::Engine {
@@ -123,7 +123,7 @@ private:
protected:
// An array holding the main Mohawk archives require by the games
- Common::Array<MohawkArchive *> _mhk;
+ Common::Array<Archive *> _mhk;
};
} // End of namespace Mohawk
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index b60f8bd1ee..6bdf163a91 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -281,7 +281,7 @@ Common::Error MohawkEngine_Myst::run() {
// Load Help System (Masterpiece Edition Only)
if (getFeatures() & GF_ME) {
MohawkArchive *mhk = new MohawkArchive();
- if (!mhk->open("help.dat"))
+ if (!mhk->openFile("help.dat"))
error("Could not load help.dat");
_mhk.push_back(mhk);
}
@@ -488,7 +488,7 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS
_mhk[0] = new MohawkArchive();
}
- if (!_mhk[0]->open(mystFiles[_curStack]))
+ if (!_mhk[0]->openFile(mystFiles[_curStack]))
error("Could not open %s", mystFiles[_curStack]);
if (getPlatform() == Common::kPlatformMacintosh)
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index be5b7e1c76..307be2dd05 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -436,89 +436,77 @@ void MystScriptParser::o_changeCardDirectional(uint16 op, uint16 var, uint16 arg
// but with the current cardId stored.
// Opcode 18 then "pops" this stored CardId and returns to that card.
-// TODO: The purpose of the optional argv[1] on Opcode 17 and argv[0]
-// on Opcode 18 which are always 4, 5 or 6 is unknown.
-
void MystScriptParser::o_changeCardPush(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
- if (argc == 2) {
- debugC(kDebugScript, "Opcode %d: Jump to Card Id, Storing Current Card Id", op);
-
- uint16 cardId = argv[0];
- debugC(kDebugScript, "\tJump to CardId: %d", cardId);
+ debugC(kDebugScript, "Opcode %d: Jump to Card Id, Storing Current Card Id", op);
- uint16 u0 = argv[1]; // TODO
- debugC(kDebugScript, "\tu0: %d", u0);
+ _savedCardId = _vm->getCurCard();
+ uint16 cardId = argv[0];
- _savedCardId = _vm->getCurCard();
+ // argv[1] is not used in the original engine
- debugC(kDebugScript, "\tCurrent CardId: %d", _savedCardId);
+ debugC(kDebugScript, "\tCurrent CardId: %d", _savedCardId);
+ debugC(kDebugScript, "\tJump to CardId: %d", cardId);
- _vm->changeToCard(cardId, true);
- } else
- unknown(op, var, argc, argv);
+ _vm->changeToCard(cardId, true);
}
void MystScriptParser::o_changeCardPop(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
- if (argc == 1) {
- debugC(kDebugScript, "Opcode %d: Return To Stored Card Id", op);
- debugC(kDebugScript, "\tCardId: %d", _savedCardId);
+ debugC(kDebugScript, "Opcode %d: Return To Stored Card Id", op);
+ debugC(kDebugScript, "\tCardId: %d", _savedCardId);
- uint16 u0 = argv[0];
- debugC(kDebugScript, "\tu0: %d", u0);
+ // argv[0] is not used in the original engine
- _vm->changeToCard(_savedCardId, true);
- } else
- unknown(op, var, argc, argv);
+ _vm->changeToCard(_savedCardId, true);
}
void MystScriptParser::o_enableAreas(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
+ debugC(kDebugScript, "Opcode %d: Enable Hotspots", op);
- if (argc > 0) {
- debugC(kDebugScript, "Opcode %d: Enable Hotspots", op);
+ uint16 count = argv[0];
- uint16 count = argv[0];
+ if (argc == count + 1) {
+ for (uint16 i = 0; i < count; i++) {
+ debugC(kDebugScript, "Enable hotspot index %d", argv[i + 1]);
- if (argc != count + 1)
- unknown(op, var, argc, argv);
- else {
- for (uint16 i = 0; i < count; i++) {
- debugC(kDebugScript, "Enable hotspot index %d", argv[i + 1]);
- _vm->setResourceEnabled(argv[i + 1], true);
- }
+ MystResource *resource = 0;
+ if (argv[i + 1] == 0xFFFF)
+ resource = _invokingResource;
+ else
+ resource = _vm->_resources[argv[i + 1]];
+
+ if (resource)
+ resource->setEnabled(true);
+ else
+ warning("Unknown Resource in enableAreas script Opcode");
}
- } else
- unknown(op, var, argc, argv);
+ } else {
+ error("Invalid arguments for opcode %d", op);
+ }
}
void MystScriptParser::o_disableAreas(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
- if (argc > 0) {
- debugC(kDebugScript, "Opcode %d: Disable Hotspots", op);
-
- uint16 count = argv[0];
-
- if (argc != count + 1)
- unknown(op, var, argc, argv);
- else {
- for (uint16 i = 0; i < count; i++) {
- debugC(kDebugScript, "Disable hotspot index %d", argv[i + 1]);
- if (argv[i + 1] == 0xFFFF) {
- if (_invokingResource != NULL)
- _invokingResource->setEnabled(false);
- else
- warning("Unknown Resource in disableHotspots script Opcode");
- } else
- _vm->setResourceEnabled(argv[i + 1], false);
- }
+ debugC(kDebugScript, "Opcode %d: Disable Hotspots", op);
+
+ uint16 count = argv[0];
+
+ if (argc == count + 1) {
+ for (uint16 i = 0; i < count; i++) {
+ debugC(kDebugScript, "Disable hotspot index %d", argv[i + 1]);
+
+ MystResource *resource = 0;
+ if (argv[i + 1] == 0xFFFF)
+ resource = _invokingResource;
+ else
+ resource = _vm->_resources[argv[i + 1]];
+
+ if (resource)
+ resource->setEnabled(true);
+ else
+ warning("Unknown Resource in disableAreas script Opcode");
}
- } else
- unknown(op, var, argc, argv);
+ } else {
+ error("Invalid arguments for opcode %d", op);
+ }
}
void MystScriptParser::o_directionalUpdate(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -528,43 +516,37 @@ void MystScriptParser::o_directionalUpdate(uint16 op, uint16 var, uint16 argc, u
}
void MystScriptParser::o_toggleAreasActivation(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- if (argc > 0) {
- debugC(kDebugScript, "Opcode %d: Toggle areas activation", op);
+ debugC(kDebugScript, "Opcode %d: Toggle areas activation", op);
- uint16 count = argv[0];
+ uint16 count = argv[0];
- if (argc != count + 1)
- unknown(op, var, argc, argv);
- else {
- for (uint16 i = 0; i < count; i++) {
- debugC(kDebugScript, "Enable/Disable hotspot index %d", argv[i + 1]);
+ if (argc == count + 1) {
+ for (uint16 i = 0; i < count; i++) {
+ debugC(kDebugScript, "Enable/Disable hotspot index %d", argv[i + 1]);
- MystResource *resource = 0;
- if (argv[i + 1] == 0xFFFF)
- resource = _invokingResource;
- else
- resource = _vm->_resources[argv[i + 1]];
+ MystResource *resource = 0;
+ if (argv[i + 1] == 0xFFFF)
+ resource = _invokingResource;
+ else
+ resource = _vm->_resources[argv[i + 1]];
- if (resource)
- resource->setEnabled(!resource->isEnabled());
- }
+ if (resource)
+ resource->setEnabled(!resource->isEnabled());
+ else
+ warning("Unknown Resource in toggleAreasActivation script Opcode");
}
- } else
- unknown(op, var, argc, argv);
+ } else {
+ error("Invalid arguments for opcode %d", op);
+ }
}
void MystScriptParser::o_playSound(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
- if (argc == 1) {
- uint16 soundId = argv[0];
+ uint16 soundId = argv[0];
- debugC(kDebugScript, "Opcode %d: playSound", op);
- debugC(kDebugScript, "\tsoundId: %d", soundId);
+ debugC(kDebugScript, "Opcode %d: playSound", op);
+ debugC(kDebugScript, "\tsoundId: %d", soundId);
- _vm->_sound->replaceSoundMyst(soundId);
- } else
- unknown(op, var, argc, argv);
+ _vm->_sound->replaceSoundMyst(soundId);
}
void MystScriptParser::o_stopSoundBackground(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -578,6 +560,7 @@ void MystScriptParser::o_playSoundBlocking(uint16 op, uint16 var, uint16 argc, u
debugC(kDebugScript, "Opcode %d: playSoundBlocking", op);
debugC(kDebugScript, "\tsoundId: %d", soundId);
+ _vm->_sound->stopSound();
_vm->_sound->playSoundBlocking(soundId);
}
@@ -590,7 +573,6 @@ void MystScriptParser::o_copyBackBufferToScreen(uint16 op, uint16 var, uint16 ar
// Used in Mechanical Card 6267 (Code Lock)
rect = _invokingResource->getRect();
} else {
- // Used in ... TODO: Fill in.
rect = Common::Rect(argv[0], argv[1], argv[2], argv[3]);
}
@@ -645,8 +627,6 @@ void MystScriptParser::o_copyImageToBackBuffer(uint16 op, uint16 var, uint16 arg
// by Channelwood Card 3280 (Tank Valve) and water flow sound behavior in pipe
// on cards leading from shed...
void MystScriptParser::o_changeBackgroundSound(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
int16 *soundList = NULL;
uint16 *soundListVolume = NULL;
@@ -709,7 +689,7 @@ void MystScriptParser::o_changeBackgroundSound(uint16 op, uint16 var, uint16 arg
warning("Unknown sound control value in opcode %d", op);
}
} else
- unknown(op, var, argc, argv);
+ warning("Unknown arg count in opcode %d", op);
delete[] soundList;
soundList = NULL;
@@ -783,25 +763,19 @@ void MystScriptParser::o_changeCard(uint16 op, uint16 var, uint16 argc, uint16 *
}
void MystScriptParser::o_drawImageChangeCard(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- varUnusedCheck(op, var);
-
- if (argc == 3) {
debugC(kDebugScript, "Opcode %d: Draw Full Screen Image, Delay then Change Card", op);
uint16 imageId = argv[0];
uint16 cardId = argv[1];
- uint16 delay = argv[2]; // TODO: Not sure about argv[2] being delay..
+ // argv[2] is not used in the original engine
debugC(kDebugScript, "\timageId: %d", imageId);
debugC(kDebugScript, "\tcardId: %d", cardId);
- debugC(kDebugScript, "\tdelay: %d", delay);
_vm->_gfx->copyImageToScreen(imageId, Common::Rect(0, 0, 544, 333));
_vm->_system->updateScreen();
- _vm->_system->delayMillis(delay * 100);
+
_vm->changeToCard(cardId, true);
- } else
- unknown(op, var, argc, argv);
}
void MystScriptParser::o_changeMainCursor(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -916,7 +890,8 @@ void MystScriptParser::o_soundWaitStop(uint16 op, uint16 var, uint16 argc, uint1
// Used when Button is pushed...
debugC(kDebugScript, "Opcode %d: Wait for foreground sound to finish", op);
- // TODO: Implement
+ while (_vm->_sound->isPlaying())
+ _vm->_system->delayMillis(10);
}
void MystScriptParser::o_quit(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
diff --git a/engines/mohawk/myst_stacks/demo.cpp b/engines/mohawk/myst_stacks/demo.cpp
index 53d946dd66..5788f4b3a3 100644
--- a/engines/mohawk/myst_stacks/demo.cpp
+++ b/engines/mohawk/myst_stacks/demo.cpp
@@ -69,7 +69,7 @@ void Demo::disablePersistentScripts() {
void Demo::runPersistentScripts() {
Intro::runPersistentScripts();
-
+
if (_enabled201) {
// Used on Card 2001, 2002 and 2003
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index d6dd1b5407..12d9dc7e2f 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -102,6 +102,7 @@ void Mechanical::setupOpcodes() {
void Mechanical::disablePersistentScripts() {
_fortressSimulationRunning = false;
+ _elevatorRotationLeverMoving = false;
_elevatorGoingMiddle = false;
_birdSinging = false;
_fortressRotationRunning = false;
@@ -126,10 +127,10 @@ void Mechanical::runPersistentScripts() {
uint16 Mechanical::getVar(uint16 var) {
switch(var) {
- case 0: // Sirrus's Secret Panel State
- return _state.sirrusPanelState;
- case 1: // Achenar's Secret Panel State
+ case 0: // Achenar's Secret Panel State
return _state.achenarPanelState;
+ case 1: // Sirrus's Secret Panel State
+ return _state.sirrusPanelState;
case 2: // Achenar's Secret Room Crate Lid Open and Blue Page Present
if (_state.achenarCrateOpened) {
if (_globals.bluePagesInBook & 4 || _globals.heldPage == 3)
@@ -195,16 +196,21 @@ uint16 Mechanical::getVar(uint16 var) {
void Mechanical::toggleVar(uint16 var) {
switch(var) {
- case 0: // Sirrus's Secret Panel State
- _state.sirrusPanelState ^= 1;
- case 1: // Achenar's Secret Panel State
+ case 0: // Achenar's Secret Panel State
_state.achenarPanelState ^= 1;
+ break;
+ case 1: // Sirrus's Secret Panel State
+ _state.sirrusPanelState ^= 1;
+ break;
case 3: // Achenar's Secret Room Crate State
_state.achenarCrateOpened ^= 1;
+ break;
case 4: // Myst Book Room Staircase State
_mystStaircaseState ^= 1;
+ break;
case 10: // Fortress Staircase State
_state.staircaseState ^= 1;
+ break;
case 16: // Code Lock Shape #1 - Left
case 17: // Code Lock Shape #2
case 18: // Code Lock Shape #3
@@ -242,6 +248,7 @@ bool Mechanical::setVarValue(uint16 var, uint16 value) {
switch (var) {
case 13:
_elevatorPosition = value;
+ break;
case 14: // Elevator going down when at top
_elevatorGoingDown = value;
break;
@@ -724,6 +731,7 @@ void Mechanical::birdSing_run() {
uint32 time = _vm->_system->getMillis();
if (_birdSingEndTime < time) {
_bird->pauseMovie(true);
+ _vm->_sound->stopSound();
_birdSinging = false;
}
}
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 70abf0ccd3..66492d1200 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -397,7 +397,7 @@ uint16 Myst::getVar(uint16 var) {
else
return 0;
case 25: // Fireplace Red Page Present
- if (_globals.ending != 4)
+ if (_globals.ending != 4)
return !(_globals.redPagesInBook & 32) && (_globals.heldPage != 12);
else
return 0;
@@ -3269,7 +3269,7 @@ void Myst::generatorControlRoom_run(void) {
if (_generatorVoltage == _state.generatorVoltage) {
generatorRedrawRocket();
} else {
- // Animate generator gauge
+ // Animate generator gauge
if (_generatorVoltage > _state.generatorVoltage)
_generatorVoltage--;
else
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index 3a95b83199..f01375bacf 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -29,23 +29,25 @@
namespace Mohawk {
-MohawkArchive::MohawkArchive() {
- _mhk = NULL;
- _types = NULL;
- _fileTable = NULL;
+// Base Archive code
+
+Archive::Archive() {
+ _stream = 0;
+}
+
+Archive::~Archive() {
+ close();
}
-bool MohawkArchive::open(const Common::String &filename) {
+bool Archive::openFile(const Common::String &fileName) {
Common::File *file = new Common::File();
- if (!file->open(filename)) {
+ if (!file->open(fileName)) {
delete file;
return false;
}
- _curFile = filename;
-
- if (!open(file)) {
+ if (!openStream(file)) {
close();
return false;
}
@@ -53,431 +55,370 @@ bool MohawkArchive::open(const Common::String &filename) {
return true;
}
-void MohawkArchive::close() {
- delete _mhk; _mhk = NULL;
- delete[] _types; _types = NULL;
- delete[] _fileTable; _fileTable = NULL;
-
- _curFile.clear();
+void Archive::close() {
+ _types.clear();
+ delete _stream; _stream = 0;
}
-bool MohawkArchive::open(Common::SeekableReadStream *stream) {
- // Make sure no other file is open...
- close();
- _mhk = stream;
-
- if (_mhk->readUint32BE() != ID_MHWK) {
- warning("Could not find tag 'MHWK'");
+bool Archive::hasResource(uint32 tag, uint16 id) const {
+ if (!_types.contains(tag))
return false;
- }
-
- /* uint32 fileSize = */ _mhk->readUint32BE();
- if (_mhk->readUint32BE() != ID_RSRC) {
- warning("Could not find tag \'RSRC\'");
- return false;
- }
+ return _types[tag].contains(id);
+}
- _rsrc.version = _mhk->readUint16BE();
-
- if (_rsrc.version != 0x100) {
- warning("Unsupported Mohawk resource version %d.%d", (_rsrc.version >> 8) & 0xff, _rsrc.version & 0xff);
+bool Archive::hasResource(uint32 tag, const Common::String &resName) const {
+ if (!_types.contains(tag) || resName.empty())
return false;
- }
-
- _rsrc.compaction = _mhk->readUint16BE(); // Only used in creation, not in reading
- _rsrc.filesize = _mhk->readUint32BE();
- _rsrc.abs_offset = _mhk->readUint32BE();
- _rsrc.file_table_offset = _mhk->readUint16BE();
- _rsrc.file_table_size = _mhk->readUint16BE();
- debug (3, "Absolute Offset = %08x", _rsrc.abs_offset);
+ const ResourceMap &resMap = _types[tag];
- /////////////////////////////////
- //Resource Dir
- /////////////////////////////////
+ for (ResourceMap::const_iterator it = resMap.begin(); it != resMap.end(); it++)
+ if (it->_value.name.matchString(resName))
+ return true;
- // Type Table
- _mhk->seek(_rsrc.abs_offset);
- _typeTable.name_offset = _mhk->readUint16BE();
- _typeTable.resource_types = _mhk->readUint16BE();
+ return false;
+}
- debug (0, "Name List Offset = %04x Number of Resource Types = %04x", _typeTable.name_offset, _typeTable.resource_types);
+Common::SeekableReadStream *Archive::getResource(uint32 tag, uint16 id) {
+ if (!_types.contains(tag))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
- _types = new Type[_typeTable.resource_types];
+ const ResourceMap &resMap = _types[tag];
- for (uint16 i = 0; i < _typeTable.resource_types; i++) {
- _types[i].tag = _mhk->readUint32BE();
- _types[i].resource_table_offset = _mhk->readUint16BE();
- _types[i].name_table_offset = _mhk->readUint16BE();
+ if (!resMap.contains(id))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
- // HACK: Zoombini's SND resource starts will a NULL.
- if (_types[i].tag == ID_SND)
- debug (3, "Type[%02d]: Tag = \'SND\' ResTable Offset = %04x NameTable Offset = %04x", i, _types[i].resource_table_offset, _types[i].name_table_offset);
- else
- debug (3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x NameTable Offset = %04x", i, tag2str(_types[i].tag), _types[i].resource_table_offset, _types[i].name_table_offset);
-
- // Resource Table
- _mhk->seek(_rsrc.abs_offset + _types[i].resource_table_offset);
- _types[i].resTable.resources = _mhk->readUint16BE();
+ const Resource &res = resMap[id];
- debug (3, "Resources = %04x", _types[i].resTable.resources);
+ return new Common::SeekableSubReadStream(_stream, res.offset, res.offset + res.size);
+}
- _types[i].resTable.entries = new Type::ResourceTable::Entries[_types[i].resTable.resources];
+uint32 Archive::getOffset(uint32 tag, uint16 id) const {
+ if (!_types.contains(tag))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
- for (uint16 j = 0; j < _types[i].resTable.resources; j++) {
- _types[i].resTable.entries[j].id = _mhk->readUint16BE();
- _types[i].resTable.entries[j].index = _mhk->readUint16BE();
+ const ResourceMap &resMap = _types[tag];
- debug (4, "Entry[%02x]: ID = %04x (%d) Index = %04x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].index);
- }
+ if (!resMap.contains(id))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
- // Name Table
- _mhk->seek(_rsrc.abs_offset + _types[i].name_table_offset);
- _types[i].nameTable.num = _mhk->readUint16BE();
+ return resMap[id].offset;
+}
- debug (3, "Names = %04x", _types[i].nameTable.num);
+uint16 Archive::findResourceID(uint32 tag, const Common::String &resName) const {
+ if (!_types.contains(tag) || resName.empty())
+ return 0xFFFF;
- _types[i].nameTable.entries = new Type::NameTable::Entries[_types[i].nameTable.num];
+ const ResourceMap &resMap = _types[tag];
- for (uint16 j = 0; j < _types[i].nameTable.num; j++) {
- _types[i].nameTable.entries[j].offset = _mhk->readUint16BE();
- _types[i].nameTable.entries[j].index = _mhk->readUint16BE();
+ for (ResourceMap::const_iterator it = resMap.begin(); it != resMap.end(); it++)
+ if (it->_value.name.matchString(resName))
+ return it->_key;
- debug (4, "Entry[%02x]: Name List Offset = %04x Index = %04x", j, _types[i].nameTable.entries[j].offset, _types[i].nameTable.entries[j].index);
+ return 0xFFFF;
+}
- // Name List
- uint32 pos = _mhk->pos();
- _mhk->seek(_rsrc.abs_offset + _typeTable.name_offset + _types[i].nameTable.entries[j].offset);
- char c = (char)_mhk->readByte();
- while (c != 0) {
- _types[i].nameTable.entries[j].name += c;
- c = (char)_mhk->readByte();
- }
+Common::String Archive::getName(uint32 tag, uint16 id) const {
+ if (!_types.contains(tag))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
- debug (3, "Name = \'%s\'", _types[i].nameTable.entries[j].name.c_str());
+ const ResourceMap &resMap = _types[tag];
- // Get back to next entry
- _mhk->seek(pos);
- }
+ if (!resMap.contains(id))
+ error("Archive does not contain '%s' %04x", tag2str(tag), id);
- // Return to next TypeTable entry
- _mhk->seek(_rsrc.abs_offset + (i + 1) * 8 + 4);
+ return resMap[id].name;
+}
- debug (3, "\n");
- }
+Common::Array<uint32> Archive::getResourceTypeList() const {
+ Common::Array<uint32> typeList;
- _mhk->seek(_rsrc.abs_offset + _rsrc.file_table_offset);
- _fileTableAmount = _mhk->readUint32BE();
- _fileTable = new FileTable[_fileTableAmount];
+ for (TypeMap::const_iterator it = _types.begin(); it != _types.end(); it++)
+ typeList.push_back(it->_key);
- for (uint32 i = 0; i < _fileTableAmount; i++) {
- _fileTable[i].offset = _mhk->readUint32BE();
- _fileTable[i].dataSize = _mhk->readUint16BE();
- _fileTable[i].dataSize += _mhk->readByte() << 16; // Get bits 15-24 of dataSize too
- _fileTable[i].flags = _mhk->readByte();
- _fileTable[i].unk = _mhk->readUint16BE();
+ return typeList;
+}
- // Add in another 3 bits for file size from the flags.
- // The flags are useless to us except for doing this ;)
- _fileTable[i].dataSize += (_fileTable[i].flags & 7) << 24;
+Common::Array<uint16> Archive::getResourceIDList(uint32 type) const {
+ Common::Array<uint16> idList;
- debug (4, "File[%02x]: Offset = %08x DataSize = %07x Flags = %02x Unk = %04x", i, _fileTable[i].offset, _fileTable[i].dataSize, _fileTable[i].flags, _fileTable[i].unk);
- }
+ if (!_types.contains(type))
+ return idList;
- return true;
-}
+ const ResourceMap &resMap = _types[type];
-int MohawkArchive::getTypeIndex(uint32 tag) {
- for (uint16 i = 0; i < _typeTable.resource_types; i++)
- if (_types[i].tag == tag)
- return i;
- return -1; // not found
-}
+ for (ResourceMap::const_iterator it = resMap.begin(); it != resMap.end(); it++)
+ idList.push_back(it->_key);
-int MohawkArchive::getIDIndex(int typeIndex, uint16 id) {
- for (uint16 i = 0; i < _types[typeIndex].resTable.resources; i++)
- if (_types[typeIndex].resTable.entries[i].id == id)
- return i;
- return -1; // not found
+ return idList;
}
-int MohawkArchive::getIDIndex(int typeIndex, const Common::String &resName) {
- int index = -1;
+// Mohawk Archive code
- for (uint16 i = 0; i < _types[typeIndex].nameTable.num; i++)
- if (_types[typeIndex].nameTable.entries[i].name.matchString(resName)) {
- index = _types[typeIndex].nameTable.entries[i].index;
- break;
- }
+struct FileTableEntry {
+ uint32 offset;
+ uint32 size;
+ byte flags;
+ uint16 unknown;
+};
- if (index < 0)
- return -1; // Not found
+struct NameTableEntry {
+ uint16 index;
+ Common::String name;
+};
- for (uint16 i = 0; i < _types[typeIndex].resTable.resources; i++)
- if (_types[typeIndex].resTable.entries[i].index == index)
- return i;
-
- return -1; // Not found
-}
-
-uint16 MohawkArchive::findResourceID(uint32 type, const Common::String &resName) {
- int typeIndex = getTypeIndex(type);
+bool MohawkArchive::openStream(Common::SeekableReadStream *stream) {
+ // Make sure no other file is open...
+ close();
- if (typeIndex < 0)
- return 0xFFFF;
+ if (stream->readUint32BE() != ID_MHWK) {
+ warning("Could not find tag 'MHWK'");
+ return false;
+ }
- int idIndex = getIDIndex(typeIndex, resName);
+ /* uint32 fileSize = */ stream->readUint32BE();
- if (idIndex < 0)
- return 0xFFFF;
+ if (stream->readUint32BE() != ID_RSRC) {
+ warning("Could not find tag \'RSRC\'");
+ return false;
+ }
- return _types[typeIndex].resTable.entries[idIndex].id;
-}
+ uint16 version = stream->readUint16BE();
-bool MohawkArchive::hasResource(uint32 tag, uint16 id) {
- if (!_mhk)
+ if (version != 0x100) {
+ warning("Unsupported Mohawk resource version %d.%d", (version >> 8) & 0xff, version & 0xff);
return false;
+ }
- int16 typeIndex = getTypeIndex(tag);
+ /* uint16 compaction = */ stream->readUint16BE(); // Only used in creation, not in reading
+ /* uint32 rsrcSize = */ stream->readUint32BE();
+ uint32 absOffset = stream->readUint32BE();
+ uint16 fileTableOffset = stream->readUint16BE();
+ /* uint16 fileTableSize = */ stream->readUint16BE();
- if (typeIndex < 0)
- return false;
+ // First, read in the file table
+ stream->seek(absOffset + fileTableOffset);
+ Common::Array<FileTableEntry> fileTable;
+ fileTable.resize(stream->readUint32BE());
- return getIDIndex(typeIndex, id) >= 0;
-}
+ debug(4, "Reading file table with %d entries", fileTable.size());
-bool MohawkArchive::hasResource(uint32 tag, const Common::String &resName) {
- if (!_mhk)
- return false;
+ for (uint32 i = 0; i < fileTable.size(); i++) {
+ fileTable[i].offset = stream->readUint32BE();
+ fileTable[i].size = stream->readUint16BE();
+ fileTable[i].size += stream->readByte() << 16; // Get bits 15-24 of size too
+ fileTable[i].flags = stream->readByte();
+ fileTable[i].unknown = stream->readUint16BE();
- int16 typeIndex = getTypeIndex(tag);
+ // Add in another 3 bits for file size from the flags.
+ // The flags are useless to us except for doing this ;)
+ fileTable[i].size += (fileTable[i].flags & 7) << 24;
- if (typeIndex < 0)
- return false;
+ debug(4, "File[%02x]: Offset = %08x Size = %07x Flags = %02x Unknown = %04x", i, fileTable[i].offset, fileTable[i].size, fileTable[i].flags, fileTable[i].unknown);
+ }
- return getIDIndex(typeIndex, resName) >= 0;
-}
+ // Now go in an read in each of the types
+ stream->seek(absOffset);
+ uint16 stringTableOffset = stream->readUint16BE();
+ uint16 typeCount = stream->readUint16BE();
-Common::String MohawkArchive::getName(uint32 tag, uint16 id) {
- if (!_mhk)
- return 0;
+ debug(0, "Name List Offset = %04x Number of Resource Types = %04x", stringTableOffset, typeCount);
- int16 typeIndex = getTypeIndex(tag);
+ for (uint16 i = 0; i < typeCount; i++) {
+ uint32 tag = stream->readUint32BE();
+ uint16 resourceTableOffset = stream->readUint16BE();
+ uint16 nameTableOffset = stream->readUint16BE();
- if (typeIndex < 0)
- return 0;
+ // HACK: Zoombini's SND resource starts will a NULL.
+ if (tag == ID_SND)
+ debug(3, "Type[%02d]: Tag = \'SND\' ResTable Offset = %04x NameTable Offset = %04x", i, resourceTableOffset, nameTableOffset);
+ else
+ debug(3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x NameTable Offset = %04x", i, tag2str(tag), resourceTableOffset, nameTableOffset);
- int16 idIndex = -1;
+ // Name Table
+ stream->seek(absOffset + nameTableOffset);
+ Common::Array<NameTableEntry> nameTable;
+ nameTable.resize(stream->readUint16BE());
- for (uint16 i = 0; i < _types[typeIndex].resTable.resources; i++)
- if (_types[typeIndex].resTable.entries[i].id == id) {
- idIndex = _types[typeIndex].resTable.entries[i].index;
- break;
- }
+ debug(3, "Names = %04x", nameTable.size());
- assert(idIndex >= 0);
+ for (uint16 j = 0; j < nameTable.size(); j++) {
+ uint16 offset = stream->readUint16BE();
+ nameTable[j].index = stream->readUint16BE();
- for (uint16 i = 0; i < _types[typeIndex].nameTable.num; i++)
- if (_types[typeIndex].nameTable.entries[i].index == idIndex)
- return _types[typeIndex].nameTable.entries[i].name;
+ debug(4, "Entry[%02x]: Name List Offset = %04x Index = %04x", j, offset, nameTable[j].index);
- return 0; // not found
-}
+ // Name List
+ uint32 pos = stream->pos();
+ stream->seek(absOffset + stringTableOffset + offset);
+ char c = (char)stream->readByte();
+ while (c != 0) {
+ nameTable[j].name += c;
+ c = (char)stream->readByte();
+ }
-uint32 MohawkArchive::getOffset(uint32 tag, uint16 id) {
- assert(_mhk);
+ debug(3, "Name = \'%s\'", nameTable[j].name.c_str());
- int16 typeIndex = getTypeIndex(tag);
- assert(typeIndex >= 0);
+ // Get back to next entry
+ stream->seek(pos);
+ }
- int16 idIndex = getIDIndex(typeIndex, id);
- assert(idIndex >= 0);
+ // Resource Table
+ stream->seek(absOffset + resourceTableOffset);
+ uint16 resourceCount = stream->readUint16BE();
- return _fileTable[_types[typeIndex].resTable.entries[idIndex].index - 1].offset;
-}
+ debug(3, "Resource count = %04x", resourceCount);
-Common::SeekableReadStream *MohawkArchive::getResource(uint32 tag, uint16 id) {
- if (!_mhk)
- error("MohawkArchive::getResource(): No File in Use");
+ ResourceMap &resMap = _types[tag];
- int16 typeIndex = getTypeIndex(tag);
+ for (uint16 j = 0; j < resourceCount; j++) {
+ uint16 id = stream->readUint16BE();
+ uint16 index = stream->readUint16BE();
- if (typeIndex < 0)
- error("Could not find a tag of '%s' in file '%s'", tag2str(tag), _curFile.c_str());
+ Resource &res = resMap[id];
- int16 idIndex = getIDIndex(typeIndex, id);
+ // Pull out the name from the name table
+ for (uint32 k = 0; k < nameTable.size(); k++) {
+ if (nameTable[k].index == index) {
+ res.name = nameTable[k].name;
+ break;
+ }
+ }
- if (idIndex < 0)
- error("Could not find '%s' %04x in file '%s'", tag2str(tag), id, _curFile.c_str());
+ // Pull out our offset/size too
+ res.offset = fileTable[index - 1].offset;
+
+ // WORKAROUND: tMOV resources pretty much ignore the size part of the file table,
+ // as the original just passed the full Mohawk file to QuickTime and the offset.
+ // We need to do this because of the way Mohawk is set up (this is much more "proper"
+ // than passing _stream at the right offset). We may want to do that in the future, though.
+ if (tag == ID_TMOV) {
+ if (index == fileTable.size())
+ res.size = stream->size() - fileTable[index - 1].offset;
+ else
+ res.size = fileTable[index].offset - fileTable[index - 1].offset;
+ } else
+ res.size = fileTable[index - 1].size;
+
+ debug(4, "Entry[%02x]: ID = %04x (%d) Index = %04x", j, id, id, index);
+ }
- // Note: the fileTableIndex is based off 1, not 0. So, subtract 1
- uint16 fileTableIndex = _types[typeIndex].resTable.entries[idIndex].index - 1;
+ // Return to next TypeTable entry
+ stream->seek(absOffset + (i + 1) * 8 + 4);
- // WORKAROUND: tMOV resources pretty much ignore the size part of the file table,
- // as the original just passed the full Mohawk file to QuickTime and the offset.
- // We need to do this because of the way Mohawk is set up (this is much more "proper"
- // than passing _mhk at the right offset). We may want to do that in the future, though.
- if (_types[typeIndex].tag == ID_TMOV) {
- if (fileTableIndex == _fileTableAmount - 1)
- return new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _mhk->size());
- else
- return new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _fileTable[fileTableIndex + 1].offset);
+ debug(3, "\n");
}
- return new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _fileTable[fileTableIndex].offset + _fileTable[fileTableIndex].dataSize);
+ _stream = stream;
+ return true;
}
-bool LivingBooksArchive_v1::open(Common::SeekableReadStream *stream) {
+// Living Books Archive code
+
+bool LivingBooksArchive_v1::openStream(Common::SeekableReadStream *stream) {
close();
- _mhk = stream;
// This is for the "old" Mohawk resource format used in some older
// Living Books. It is very similar, just missing the MHWK tag and
// some other minor differences, especially with the file table
// being merged into the resource table.
- uint32 headerSize = _mhk->readUint32BE();
+ uint32 headerSize = stream->readUint32BE();
// NOTE: There are differences besides endianness! (Subtle changes,
// but different).
if (headerSize == 6) { // We're in Big Endian mode (Macintosh)
- _mhk->readUint16BE(); // Resource Table Size
- _typeTable.resource_types = _mhk->readUint16BE();
- _types = new OldType[_typeTable.resource_types];
+ stream->readUint16BE(); // Resource Table Size
+ uint16 typeCount = stream->readUint16BE();
- debug (0, "Old Mohawk File (Macintosh): Number of Resource Types = %04x", _typeTable.resource_types);
+ debug(0, "Old Mohawk File (Macintosh): Number of Resource Types = %04x", typeCount);
- for (uint16 i = 0; i < _typeTable.resource_types; i++) {
- _types[i].tag = _mhk->readUint32BE();
- _types[i].resource_table_offset = (uint16)_mhk->readUint32BE() + 6;
- _mhk->readUint32BE(); // Unknown (always 0?)
+ for (uint16 i = 0; i < typeCount; i++) {
+ uint32 tag = stream->readUint32BE();
+ uint32 resourceTableOffset = stream->readUint32BE() + 6;
+ stream->readUint32BE(); // Unknown (always 0?)
- debug (3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(_types[i].tag), _types[i].resource_table_offset);
+ debug(3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(tag), resourceTableOffset);
- uint32 oldPos = _mhk->pos();
+ uint32 oldPos = stream->pos();
// Resource Table/File Table
- _mhk->seek(_types[i].resource_table_offset);
- _types[i].resTable.resources = _mhk->readUint16BE();
- _types[i].resTable.entries = new OldType::ResourceTable::Entries[_types[i].resTable.resources];
-
- for (uint16 j = 0; j < _types[i].resTable.resources; j++) {
- _types[i].resTable.entries[j].id = _mhk->readUint16BE();
- _types[i].resTable.entries[j].offset = _mhk->readUint32BE();
- _types[i].resTable.entries[j].size = _mhk->readByte() << 16;
- _types[i].resTable.entries[j].size += _mhk->readUint16BE();
- _mhk->skip(5); // Unknown (always 0?)
-
- debug (4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].offset, _types[i].resTable.entries[j].size);
- }
+ stream->seek(resourceTableOffset);
+ uint16 resourceCount = stream->readUint16BE();
- _mhk->seek(oldPos);
- debug (3, "\n");
- }
- } else if (SWAP_BYTES_32(headerSize) == 6) { // We're in Little Endian mode (Windows)
- _mhk->readUint16LE(); // Resource Table Size
- _typeTable.resource_types = _mhk->readUint16LE();
- _types = new OldType[_typeTable.resource_types];
-
- debug (0, "Old Mohawk File (Windows): Number of Resource Types = %04x", _typeTable.resource_types);
+ ResourceMap &resMap = _types[tag];
- for (uint16 i = 0; i < _typeTable.resource_types; i++) {
- _types[i].tag = _mhk->readUint32LE();
- _types[i].resource_table_offset = _mhk->readUint16LE() + 6;
- _mhk->readUint16LE(); // Unknown (always 0?)
+ for (uint16 j = 0; j < resourceCount; j++) {
+ uint16 id = stream->readUint16BE();
- debug (3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(_types[i].tag), _types[i].resource_table_offset);
+ Resource &res = resMap[id];
- uint32 oldPos = _mhk->pos();
-
- // Resource Table/File Table
- _mhk->seek(_types[i].resource_table_offset);
- _types[i].resTable.resources = _mhk->readUint16LE();
- _types[i].resTable.entries = new OldType::ResourceTable::Entries[_types[i].resTable.resources];
+ res.offset = stream->readUint32BE();
+ res.size = stream->readByte() << 16;
+ res.size |= stream->readUint16BE();
+ stream->skip(5); // Unknown (always 0?)
- for (uint16 j = 0; j < _types[i].resTable.resources; j++) {
- _types[i].resTable.entries[j].id = _mhk->readUint16LE();
- _types[i].resTable.entries[j].offset = _mhk->readUint32LE();
- _types[i].resTable.entries[j].size = _mhk->readUint32LE();
- _mhk->readUint16LE(); // Unknown (always 0?)
-
- debug (4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].offset, _types[i].resTable.entries[j].size);
+ debug(4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, id, id, res.offset, res.size);
}
- _mhk->seek(oldPos);
- debug (3, "\n");
+ stream->seek(oldPos);
+ debug(3, "\n");
}
- } else {
- warning("Could not determine type of Old Mohawk resource");
- return false;
- }
-
- return true;
-}
-
-uint32 LivingBooksArchive_v1::getOffset(uint32 tag, uint16 id) {
- assert(_mhk);
-
- int16 typeIndex = getTypeIndex(tag);
- assert(typeIndex >= 0);
+ } else if (SWAP_BYTES_32(headerSize) == 6) { // We're in Little Endian mode (Windows)
+ stream->readUint16LE(); // Resource Table Size
+ uint16 typeCount = stream->readUint16LE();
- int16 idIndex = getIDIndex(typeIndex, id);
- assert(idIndex >= 0);
+ debug(0, "Old Mohawk File (Windows): Number of Resource Types = %04x", typeCount);
- return _types[typeIndex].resTable.entries[idIndex].offset;
-}
+ for (uint16 i = 0; i < typeCount; i++) {
+ uint32 tag = stream->readUint32LE();
+ uint16 resourceTableOffset = stream->readUint16LE() + 6;
+ stream->readUint16LE(); // Unknown (always 0?)
-Common::SeekableReadStream *LivingBooksArchive_v1::getResource(uint32 tag, uint16 id) {
- if (!_mhk)
- error("LivingBooksArchive_v1::getResource(): No File in Use");
+ debug(3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(tag), resourceTableOffset);
- int16 typeIndex = getTypeIndex(tag);
+ uint32 oldPos = stream->pos();
- if (typeIndex < 0)
- error("Could not find a tag of \'%s\' in file \'%s\'", tag2str(tag), _curFile.c_str());
+ // Resource Table/File Table
+ stream->seek(resourceTableOffset);
+ uint16 resourceCount = stream->readUint16LE();
- int16 idIndex = getIDIndex(typeIndex, id);
+ ResourceMap &resMap = _types[tag];
- if (idIndex < 0)
- error("Could not find \'%s\' %04x in file \'%s\'", tag2str(tag), id, _curFile.c_str());
+ for (uint16 j = 0; j < resourceCount; j++) {
+ uint16 id = stream->readUint16LE();
- return new Common::SeekableSubReadStream(_mhk, _types[typeIndex].resTable.entries[idIndex].offset, _types[typeIndex].resTable.entries[idIndex].offset + _types[typeIndex].resTable.entries[idIndex].size);
-}
+ Resource &res = resMap[id];
-bool LivingBooksArchive_v1::hasResource(uint32 tag, uint16 id) {
- if (!_mhk)
- return false;
+ res.offset = stream->readUint32LE();
+ res.size = stream->readUint32LE();
+ stream->readUint16LE(); // Unknown (always 0?)
- int16 typeIndex = getTypeIndex(tag);
+ debug(4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, id, id, res.offset, res.size);
+ }
- if (typeIndex < 0)
+ stream->seek(oldPos);
+ debug(3, "\n");
+ }
+ } else {
+ // Not a valid Living Books Archive
return false;
+ }
- return getIDIndex(typeIndex, id) >= 0;
+ _stream = stream;
+ return true;
}
-int LivingBooksArchive_v1::getTypeIndex(uint32 tag) {
- for (uint16 i = 0; i < _typeTable.resource_types; i++)
- if (_types[i].tag == tag)
- return i;
- return -1; // not found
-}
-
-int LivingBooksArchive_v1::getIDIndex(int typeIndex, uint16 id) {
- for (uint16 i = 0; i < _types[typeIndex].resTable.resources; i++)
- if (_types[typeIndex].resTable.entries[i].id == id)
- return i;
- return -1; // not found
-}
+// DOS Archive (v2) code
// Partially based on the Prince of Persia Format Specifications
// See http://sdfg.com.ar/git/?p=fp-git.git;a=blob;f=FP/doc/FormatSpecifications
// However, I'm keeping with the terminology we've been using with the
// later archive formats.
-bool DOSArchive_v2::open(Common::SeekableReadStream *stream) {
+bool DOSArchive_v2::openStream(Common::SeekableReadStream *stream) {
close();
uint32 typeTableOffset = stream->readUint32LE();
@@ -488,36 +429,38 @@ bool DOSArchive_v2::open(Common::SeekableReadStream *stream) {
stream->seek(typeTableOffset);
- _typeTable.resource_types = stream->readUint16LE();
- _types = new OldType[_typeTable.resource_types];
+ uint16 typeCount = stream->readUint16LE();
- for (uint16 i = 0; i < _typeTable.resource_types; i++) {
- _types[i].tag = stream->readUint32LE();
- _types[i].resource_table_offset = stream->readUint16LE();
+ for (uint16 i = 0; i < typeCount; i++) {
+ uint32 tag = stream->readUint32LE();
+ uint16 resourceTableOffset = stream->readUint16LE();
- debug(3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(_types[i].tag), _types[i].resource_table_offset);
+ debug(3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(tag), resourceTableOffset);
uint32 oldPos = stream->pos();
// Resource Table/File Table
- stream->seek(_types[i].resource_table_offset + typeTableOffset);
- _types[i].resTable.resources = stream->readUint16LE();
- _types[i].resTable.entries = new OldType::ResourceTable::Entries[_types[i].resTable.resources];
+ stream->seek(resourceTableOffset + typeTableOffset);
+ uint16 resourceCount = stream->readUint16LE();
+
+ ResourceMap &resMap = _types[tag];
+
+ for (uint16 j = 0; j < resourceCount; j++) {
+ uint16 id = stream->readUint16LE();
- for (uint16 j = 0; j < _types[i].resTable.resources; j++) {
- _types[i].resTable.entries[j].id = stream->readUint16LE();
- _types[i].resTable.entries[j].offset = stream->readUint32LE() + 1; // Need to add one to the offset to skip the checksum byte
- _types[i].resTable.entries[j].size = stream->readUint16LE();
- stream->skip(3); // Skip the useless flags
+ Resource &res = resMap[id];
+ res.offset = stream->readUint32LE() + 1; // Need to add one to the offset to skip the checksum byte
+ res.size = stream->readUint16LE();
+ stream->skip(3); // Skip (useless) flags
- debug (4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].offset, _types[i].resTable.entries[j].size);
+ debug(4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, id, id, res.offset, res.size);
}
stream->seek(oldPos);
- debug (3, "\n");
+ debug(3, "\n");
}
- _mhk = stream;
+ _stream = stream;
return true;
}
diff --git a/engines/mohawk/resource.h b/engines/mohawk/resource.h
index cabce04e38..f2ead7af65 100644
--- a/engines/mohawk/resource.h
+++ b/engines/mohawk/resource.h
@@ -22,6 +22,7 @@
#include "common/scummsys.h"
#include "common/endian.h"
+#include "common/hashmap.h"
#include "common/file.h"
#include "common/str.h"
@@ -128,127 +129,64 @@ namespace Mohawk {
#define ID_BBOX MKTAG('B','B','O','X') // Boxes? (CSWorld, CSAmtrak)
#define ID_SYSX MKTAG('S','Y','S','X') // MIDI Sysex
-struct FileTable {
- uint32 offset;
- uint32 dataSize; // Really 27 bits
- byte flags; // Mostly useless except for the bottom 3 bits which are part of the size
- uint16 unk; // Always 0
-};
-
-struct Type {
- Type() { resTable.entries = NULL; nameTable.entries = NULL; }
- ~Type() { delete[] resTable.entries; delete[] nameTable.entries; }
-
- //Type Table
- uint32 tag;
- uint16 resource_table_offset;
- uint16 name_table_offset;
-
- struct ResourceTable {
- uint16 resources;
- struct Entries {
- uint16 id;
- uint16 index;
- } *entries;
- } resTable;
-
- struct NameTable {
- uint16 num;
- struct Entries {
- uint16 offset;
- uint16 index;
- // Name List
- Common::String name;
- } *entries;
- } nameTable;
-};
-
-struct TypeTable {
- uint16 name_offset;
- uint16 resource_types;
-};
-struct RSRC_Header {
- uint16 version;
- uint16 compaction;
- uint32 filesize;
- uint32 abs_offset;
- uint16 file_table_offset;
- uint16 file_table_size;
-};
-
-class MohawkArchive {
+class Archive {
public:
- MohawkArchive();
- virtual ~MohawkArchive() { close(); }
+ Archive();
+ virtual ~Archive();
- bool open(const Common::String &filename);
- virtual bool open(Common::SeekableReadStream *stream);
+ bool openFile(const Common::String &fileName);
+ virtual bool openStream(Common::SeekableReadStream *stream) = 0;
void close();
- virtual bool hasResource(uint32 tag, uint16 id);
- virtual bool hasResource(uint32 tag, const Common::String &resName);
- virtual Common::SeekableReadStream *getResource(uint32 tag, uint16 id);
- virtual uint32 getOffset(uint32 tag, uint16 id);
- virtual uint16 findResourceID(uint32 type, const Common::String &resName);
- Common::String getName(uint32 tag, uint16 id);
+ bool isOpen() const { return _stream != 0; }
+
+ bool hasResource(uint32 tag, uint16 id) const;
+ bool hasResource(uint32 tag, const Common::String &resName) const;
+ Common::SeekableReadStream *getResource(uint32 tag, uint16 id);
+ uint32 getOffset(uint32 tag, uint16 id) const;
+ uint16 findResourceID(uint32 tag, const Common::String &resName) const;
+ Common::String getName(uint32 tag, uint16 id) const;
+
+ Common::Array<uint32> getResourceTypeList() const;
+ Common::Array<uint16> getResourceIDList(uint32 type) const;
protected:
- Common::SeekableReadStream *_mhk;
- TypeTable _typeTable;
- Common::String _curFile;
-
-private:
- RSRC_Header _rsrc;
- Type *_types;
- FileTable *_fileTable;
- uint16 _nameTableAmount;
- uint16 _resourceTableAmount;
- uint16 _fileTableAmount;
-
- int getTypeIndex(uint32 tag);
- int getIDIndex(int typeIndex, uint16 id);
- int getIDIndex(int typeIndex, const Common::String &resName);
+ Common::SeekableReadStream *_stream;
+
+ struct Resource {
+ uint32 offset;
+ uint32 size;
+ Common::String name;
+ };
+
+ typedef Common::HashMap<uint16, Resource> ResourceMap;
+ typedef Common::HashMap<uint32, ResourceMap> TypeMap;
+ TypeMap _types;
};
-class LivingBooksArchive_v1 : public MohawkArchive {
+class MohawkArchive : public Archive {
public:
- LivingBooksArchive_v1() : MohawkArchive() {}
- ~LivingBooksArchive_v1() {}
+ MohawkArchive() : Archive() {}
+ ~MohawkArchive() {}
- bool hasResource(uint32 tag, uint16 id);
- bool hasResource(uint32 tag, const Common::String &resName) { return false; }
- virtual bool open(Common::SeekableReadStream *stream);
- Common::SeekableReadStream *getResource(uint32 tag, uint16 id);
- Common::SeekableReadStream *getResource(uint32 tag, const Common::String &resName) { return 0; }
- uint32 getOffset(uint32 tag, uint16 id);
- uint16 findResourceID(uint32 type, const Common::String &resName) { return 0xFFFF; }
+ bool openStream(Common::SeekableReadStream *stream);
+};
-protected:
- struct OldType {
- uint32 tag;
- uint16 resource_table_offset;
- struct ResourceTable {
- uint16 resources;
- struct Entries {
- uint16 id;
- uint32 offset;
- uint32 size;
- } *entries;
- } resTable;
- } *_types;
-
-private:
- int getTypeIndex(uint32 tag);
- int getIDIndex(int typeIndex, uint16 id);
+class LivingBooksArchive_v1 : public Archive {
+public:
+ LivingBooksArchive_v1() : Archive() {}
+ ~LivingBooksArchive_v1() {}
+
+ bool openStream(Common::SeekableReadStream *stream);
};
-class DOSArchive_v2 : public LivingBooksArchive_v1 {
+class DOSArchive_v2 : public Archive {
public:
- DOSArchive_v2() : LivingBooksArchive_v1() {}
+ DOSArchive_v2() : Archive() {}
~DOSArchive_v2() {}
- virtual bool open(Common::SeekableReadStream *stream);
+ bool openStream(Common::SeekableReadStream *stream);
};
} // End of namespace Mohawk
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 3514afdb61..612b8b3685 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -143,7 +143,7 @@ Common::Error MohawkEngine_Riven::run() {
_extrasFile = new MohawkArchive();
// We need extras.mhk for inventory images, marble images, and credits images
- if (!_extrasFile->open("extras.mhk")) {
+ if (!_extrasFile->openFile("extras.mhk")) {
Common::String message = "You're missing 'extras.mhk'. Using the 'arcriven.z' installer file also works.";
GUIErrorMessage(message);
warning("%s", message.c_str());
@@ -178,7 +178,7 @@ Common::Error MohawkEngine_Riven::run() {
changeToCard(1);
}
-
+
while (!_gameOver && !shouldQuit())
handleEvents();
@@ -317,7 +317,7 @@ void MohawkEngine_Riven::changeToStack(uint16 n) {
Common::String filename = Common::String(prefix) + endings[i];
MohawkArchive *mhk = new MohawkArchive();
- if (mhk->open(filename))
+ if (mhk->openFile(filename))
_mhk.push_back(mhk);
else
delete mhk;
@@ -436,7 +436,7 @@ void MohawkEngine_Riven::loadCard(uint16 id) {
void MohawkEngine_Riven::loadHotspots(uint16 id) {
// Clear old hotspots
delete[] _hotspots;
-
+
// NOTE: The hotspot scripts are cleared by the RivenScriptManager automatically.
Common::SeekableReadStream *inStream = getResource(ID_HSPT, id);
@@ -460,8 +460,8 @@ void MohawkEngine_Riven::loadHotspots(uint16 id) {
// - tspit 371 (DVD: 377), hotspot 4
if (left >= right || top >= bottom) {
warning("%s %d hotspot %d is invalid: (%d, %d, %d, %d)", getStackName(_curStack).c_str(), _curCard, i, left, top, right, bottom);
- left = top = right = bottom = 0;
- _hotspots[i].enabled = 0;
+ left = top = right = bottom = 0;
+ _hotspots[i].enabled = 0;
}
_hotspots[i].rect = Common::Rect(left, top, right, bottom);
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 8ad05ded13..60e94ea795 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -244,7 +244,7 @@ void RivenExternal::runCredits(uint16 video, uint32 delay) {
_vm->_gfx->updateCredits();
}
} else if (_vm->_video->updateMovies())
- _vm->_system->updateScreen();
+ _vm->_system->updateScreen();
Common::Event event;
while (_vm->_system->getEventManager()->pollEvent(event))
@@ -2060,7 +2060,7 @@ void RivenExternal::xbookclick(uint16 argc, uint16 *argv) {
_vm->_cursor->setCursor(kRivenMainCursor);
_vm->_system->updateScreen();
-
+
// OK, Gehn has opened the trap book and has asked us to go in. Let's watch
// and see what the player will do...
while (_vm->_video->getElapsedTime(video) < endTime && !_vm->shouldQuit()) {
@@ -2216,7 +2216,7 @@ void RivenExternal::xgwatch(uint16 argc, uint16 *argv) {
curSound++;
soundTime = _vm->_system->getMillis();
}
-
+
// Poll events just to check for quitting
Common::Event event;
while (_vm->_system->getEventManager()->pollEvent(event)) {}
@@ -2525,7 +2525,7 @@ static Common::Rect generateMarbleGridRect(uint16 x, uint16 y) {
}
void RivenExternal::xt7500_checkmarbles(uint16 argc, uint16 *argv) {
- // Set apower if the marbles are in their correct spot.
+ // Set apower if the marbles are in their correct spot.
bool valid = true;
static const uint32 marbleFinalValues[] = { 1114121, 1441798, 0, 65552, 65558, 262146 };
diff --git a/engines/mohawk/riven_saveload.cpp b/engines/mohawk/riven_saveload.cpp
index 35d82d4aa0..18c13ec12b 100644
--- a/engines/mohawk/riven_saveload.cpp
+++ b/engines/mohawk/riven_saveload.cpp
@@ -100,7 +100,7 @@ bool RivenSaveLoad::loadGame(Common::String filename) {
MohawkArchive *mhk = new MohawkArchive();
- if (!mhk->open(loadFile)) {
+ if (!mhk->openStream(loadFile)) {
warning("Save file is not a Mohawk archive");
delete mhk;
return false;
@@ -274,7 +274,16 @@ Common::MemoryWriteStreamDynamic *RivenSaveLoad::genZIPSSection() {
}
bool RivenSaveLoad::saveGame(Common::String filename) {
- // Note, this code is still WIP. It works quite well for now.
+ // NOTE: This code is designed to only output a Mohawk archive
+ // for a Riven saved game. It's hardcoded to do this because
+ // (as of right now) this is the only place in the engine
+ // that requires this feature. If the time comes when other
+ // games need this, we should think about coming up with some
+ // more common way of outputting resources to an archive.
+
+ // TODO: Make these saves work with the original interpreter.
+ // Not sure why they don't work yet (they still can be loaded
+ // by ScummVM).
// Make sure we have the right extension
if (!filename.matchString("*.rvn", true))
@@ -296,99 +305,101 @@ bool RivenSaveLoad::saveGame(Common::String filename) {
Common::MemoryWriteStreamDynamic *zipsSection = genZIPSSection();
// Let's calculate the file size!
- uint32 fileSize = 0;
+ uint32 fileSize = 142;
fileSize += versSection->size();
fileSize += nameSection->size();
fileSize += varsSection->size();
fileSize += zipsSection->size();
- fileSize += 16; // RSRC Header
- fileSize += 4; // Type Table Header
- fileSize += 4 * 8; // Type Table Entries
- fileSize += 2; // Pseudo-Name entries
- // IFF Header
+ // MHWK Header (8 bytes - total: 8)
saveFile->writeUint32BE(ID_MHWK);
- saveFile->writeUint32BE(fileSize);
+ saveFile->writeUint32BE(fileSize - 8);
- // RSRC Header
+ // RSRC Header (20 bytes - total: 28)
saveFile->writeUint32BE(ID_RSRC);
saveFile->writeUint16BE(0x100); // Resource Version (1.0)
- saveFile->writeUint16BE(0); // No compaction
- saveFile->writeUint32BE(fileSize + 8); // Add on the 8 from the IFF header
- saveFile->writeUint32BE(28); // IFF + RSRC
- saveFile->writeUint16BE(62); // File Table Offset
- saveFile->writeUint16BE(44); // 4 + 4 * 10
-
- //Type Table
- saveFile->writeUint16BE(36); // After the Type Table Entries
+ saveFile->writeUint16BE(1); // Compaction -- original saves have this too
+ saveFile->writeUint32BE(fileSize); // Subtract off the MHWK header size
+ saveFile->writeUint32BE(28); // Absolute offset: right after both headers
+ saveFile->writeUint16BE(70); // File Table Offset
+ saveFile->writeUint16BE(44); // File Table Size (4 bytes count + 4 entries * 10 bytes per entry)
+
+ // Type Table (4 bytes - total: 32)
+ saveFile->writeUint16BE(36); // String table offset After the Type Table Entries
saveFile->writeUint16BE(4); // 4 Type Table Entries
- // Hardcode Entries
+ // Hardcode Entries (32 bytes - total: 64)
saveFile->writeUint32BE(ID_VERS);
- saveFile->writeUint16BE(38);
- saveFile->writeUint16BE(36);
+ saveFile->writeUint16BE(46); // Resource table offset
+ saveFile->writeUint16BE(38); // String table offset
saveFile->writeUint32BE(ID_NAME);
- saveFile->writeUint16BE(44);
- saveFile->writeUint16BE(36);
+ saveFile->writeUint16BE(52);
+ saveFile->writeUint16BE(40);
saveFile->writeUint32BE(ID_VARS);
- saveFile->writeUint16BE(50);
- saveFile->writeUint16BE(36);
+ saveFile->writeUint16BE(58);
+ saveFile->writeUint16BE(42);
saveFile->writeUint32BE(ID_ZIPS);
- saveFile->writeUint16BE(56);
- saveFile->writeUint16BE(36);
+ saveFile->writeUint16BE(64);
+ saveFile->writeUint16BE(44);
- // Pseudo-Name Table/Name List
+ // Pseudo-String Table (2 bytes - total: 66)
saveFile->writeUint16BE(0); // We don't need a name list
- // VERS Section (Resource Table)
+ // Psuedo-Name Tables (8 bytes - total: 74)
+ saveFile->writeUint16BE(0);
+ saveFile->writeUint16BE(0);
+ saveFile->writeUint16BE(0);
+ saveFile->writeUint16BE(0);
+
+ // VERS Section (Resource Table) (6 bytes - total: 80)
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(1);
- // NAME Section (Resource Table)
+ // NAME Section (Resource Table) (6 bytes - total: 86)
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(2);
- // VARS Section (Resource Table)
+ // VARS Section (Resource Table) (6 bytes - total: 92)
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(3);
- // ZIPS Section (Resource Table)
+ // ZIPS Section (Resource Table) (6 bytes - total: 98)
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(1);
saveFile->writeUint16BE(4);
- // File Table
+ // File Table (4 bytes - total: 102)
saveFile->writeUint32BE(4);
- // VERS Section (File Table)
- saveFile->writeUint32BE(134);
+ // VERS Section (File Table) (10 bytes - total: 112)
+ saveFile->writeUint32BE(142);
saveFile->writeUint16BE(versSection->size() & 0xFFFF);
saveFile->writeByte((versSection->size() & 0xFF0000) >> 16);
saveFile->writeByte(0);
saveFile->writeUint16BE(0);
- // NAME Section (File Table)
- saveFile->writeUint32BE(134 + versSection->size());
+ // NAME Section (File Table) (10 bytes - total: 122)
+ saveFile->writeUint32BE(142 + versSection->size());
saveFile->writeUint16BE(nameSection->size() & 0xFFFF);
saveFile->writeByte((nameSection->size() & 0xFF0000) >> 16);
saveFile->writeByte(0);
saveFile->writeUint16BE(0);
- // VARS Section (File Table)
- saveFile->writeUint32BE(134 + versSection->size() + nameSection->size());
+ // VARS Section (File Table) (10 bytes - total: 132)
+ saveFile->writeUint32BE(142 + versSection->size() + nameSection->size());
saveFile->writeUint16BE(varsSection->size() & 0xFFFF);
saveFile->writeByte((varsSection->size() & 0xFF0000) >> 16);
saveFile->writeByte(0);
saveFile->writeUint16BE(0);
- // ZIPS Section (File Table)
- saveFile->writeUint32BE(134 + versSection->size() + nameSection->size() + varsSection->size());
+ // ZIPS Section (File Table) (10 bytes - total: 142)
+ saveFile->writeUint32BE(142 + versSection->size() + nameSection->size() + varsSection->size());
saveFile->writeUint16BE(zipsSection->size() & 0xFFFF);
saveFile->writeByte((zipsSection->size() & 0xFF0000) >> 16);
saveFile->writeByte(0);
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp
index 161acb665f..6e3e9a34dc 100644
--- a/engines/mohawk/riven_scripts.cpp
+++ b/engines/mohawk/riven_scripts.cpp
@@ -546,7 +546,7 @@ void RivenScript::storeMovieOpcode(uint16 op, uint16 argc, uint16 *argv) {
byte *scriptBuf = (byte *)malloc(scriptSize);
WRITE_BE_UINT16(scriptBuf, 1); // One command
WRITE_BE_UINT16(scriptBuf + 2, argv[3]); // One opcode
- WRITE_BE_UINT16(scriptBuf + 4, argc - 4); // argc - 4 args
+ WRITE_BE_UINT16(scriptBuf + 4, argc - 4); // argc - 4 args
for (int i = 0; i < argc - 4; i++)
WRITE_BE_UINT16(scriptBuf + 6 + (i * 2), argv[i + 4]);
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index 6144c89e21..791b18db49 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -141,6 +141,19 @@ Audio::SoundHandle *Sound::replaceSoundMyst(uint16 id, byte volume, bool loop) {
&& name.equals(_vm->getResourceName(ID_MSND, convertMystID(_handles[i].id))))
return &_handles[i].handle;
+ // The original engine also forces looping for those sounds
+ switch (id) {
+ case 2205:
+ case 2207:
+ case 5378:
+ case 7220:
+ case 9119: // Elevator engine sound in mechanical age is looping.
+ case 9120:
+ case 9327:
+ loop = true;
+ break;
+ }
+
stopSound();
return playSound(id, volume, loop);
}
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index eec6256276..cd8fc8ef80 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -436,22 +436,22 @@ VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint
entry.filename = filename;
entry.loop = loop;
entry.enabled = true;
-
+
Common::File *file = new Common::File();
if (!file->open(filename)) {
delete file;
return NULL_VID_HANDLE;
}
-
+
entry->loadStream(file);
-
+
// Search for any deleted videos so we can take a formerly used slot
for (uint32 i = 0; i < _videoStreams.size(); i++)
if (!_videoStreams[i].video) {
_videoStreams[i] = entry;
return i;
}
-
+
// Otherwise, just add it to the list
_videoStreams.push_back(entry);
return _videoStreams.size() - 1;
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 880d41a8a3..a908152bf8 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -52,7 +52,7 @@ struct BalloonPositions {
class DialogueManager {
-
+
Parallaction *_vm;
Dialogue *_dialogue;
@@ -81,10 +81,10 @@ protected:
bool _isKeyDown;
uint16 _downKey;
-protected:
+protected:
Gfx *_gfx;
BalloonManager *_balloonMan;
-
+
public:
DialogueManager(Parallaction *vm, ZonePtr z);
virtual ~DialogueManager();
@@ -108,11 +108,11 @@ protected:
NEXT_ANSWER,
DIALOGUE_OVER
} _state;
-
+
static const int NO_ANSWER_SELECTED = -1;
void transitionToState(DialogueState newState);
-
+
bool displayQuestion();
void displayAnswers();
bool testAnswerFlags(Answer *a);
@@ -132,7 +132,7 @@ protected:
DialogueManager::DialogueManager(Parallaction *vm, ZonePtr z) : _vm(vm), _z(z) {
_gfx = _vm->_gfx;
_balloonMan = _vm->_balloonMan;
-
+
_dialogue = _z->u._speakDialogue;
isNpc = !_z->u._filename.empty() && _z->u._filename.compareToIgnoreCase("yourself");
_questioner = isNpc ? _vm->_disk->loadTalk(_z->u._filename.c_str()) : _vm->_char._talk;
@@ -166,11 +166,11 @@ void DialogueManager::transitionToState(DialogueState newState) {
"nextanswer",
"over"
};
-
+
if (_state != newState) {
debugC(3, kDebugDialogue, "DialogueManager moved to state '%s'", dialogueStates[newState]);
- if (DebugMan.isDebugChannelEnabled(kDebugDialogue) && gDebugLevel == 9) {
+ if (DebugMan.isDebugChannelEnabled(kDebugDialogue) && gDebugLevel == 9) {
switch (newState) {
case RUN_QUESTION:
debug(" Q : %s", _q->_text.c_str());
@@ -188,7 +188,7 @@ void DialogueManager::transitionToState(DialogueState newState) {
_state = newState;
}
-
+
bool DialogueManager::testAnswerFlags(Answer *a) {
uint32 flags = _vm->getLocationFlags();
if (a->_yesFlags & kFlagsGlobal)
@@ -240,7 +240,7 @@ int16 DialogueManager::selectAnswerN() {
VisibleAnswer *oldAnswer = &_visAnswers[_oldSelection];
VisibleAnswer *answer = &_visAnswers[_selection];
-
+
if (_selection != _oldSelection) {
if (_oldSelection != NO_ANSWER_SELECTED) {
_balloonMan->setBalloonText(oldAnswer->_balloon, oldAnswer->_a->_text, BalloonManager::kUnselectedColor);
@@ -286,7 +286,7 @@ void DialogueManager::nextAnswer() {
return;
}
- // try and check if there are any suitable answers,
+ // try and check if there are any suitable answers,
// given the current game state.
addVisibleAnswers(_q);
if (!_numVisAnswers) {
@@ -294,9 +294,9 @@ void DialogueManager::nextAnswer() {
transitionToState(DIALOGUE_OVER);
return;
}
-
+
if (_visAnswers[0]._a->textIsNull()) {
- // if the first answer is null (it's implied that it's the
+ // if the first answer is null (it's implied that it's the
// only one because we already called addVisibleAnswers),
// then jump to the next question
_answerId = _visAnswers[0]._index;
@@ -547,7 +547,7 @@ void Parallaction::runDialogueFrame() {
if (_input->_inputMode != Input::kInputModeDialogue) {
return;
}
-
+
_dialogueMan->run();
if (_dialogueMan->isOver()) {
diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp
index 0ec1675c48..658ef5af82 100644
--- a/engines/parallaction/exec_br.cpp
+++ b/engines/parallaction/exec_br.cpp
@@ -530,11 +530,11 @@ DECLARE_INSTRUCTION_OPCODE(endif) {
DECLARE_INSTRUCTION_OPCODE(stop) {
ZonePtr z = ctxt._inst->_z;
-
- // Prevent execution if zone is missing. The known case is "PART2/insegui.scr", which has
+
+ // Prevent execution if zone is missing. The known case is "PART2/insegui.scr", which has
// "STOP insegui", which doesn't exist (see ticket #3021744 for the gory details)
if (!z) return;
-
+
if (ACTIONTYPE(z) == kZoneHear) {
warning("Parallaction_br::instOp_stop not yet implemented for HEAR zones");
// TODO: stop music or sound effects generated by a zone.
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index 24544f46dd..48d84ed101 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -296,19 +296,19 @@ void Gfx::bltMaskScale(const Common::Rect& r, byte *data, Graphics::Surface *sur
// clipped scaled destination rectangle
Common::Rect dstRect(scaledWidth, scaledHeight);
dstRect.moveTo(scaledLeft, scaledTop);
-
- Common::Rect clipper(surf->w, surf->h);
+
+ Common::Rect clipper(surf->w, surf->h);
dstRect.clip(clipper);
if (!dstRect.isValidRect()) return;
-
-
+
+
// clipped source rectangle
Common::Rect srcRect;
srcRect.left = (dstRect.left - scaledLeft) * 100 / scale;
srcRect.top = (dstRect.top - scaledTop) * 100 / scale;
srcRect.setWidth(dstRect.width() * 100 / scale);
srcRect.setHeight(dstRect.height() * 100 / scale);
- if (!srcRect.isValidRect()) return;
+ if (!srcRect.isValidRect()) return;
Common::Point dp;
dp.x = dstRect.left;
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index cf0cf13333..1da61b68ae 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -565,7 +565,7 @@ void Gfx::showFloatingLabel(GfxObj *label) {
label->x = -1000;
label->y = -1000;
label->setFlags(kGfxObjVisible);
-
+
_floatingLabel = label;
_labels.push_back(label);
}
@@ -673,7 +673,7 @@ void Gfx::showLabel(GfxObj *label, int16 x, int16 y) {
label->x = x;
label->y = y;
-
+
_labels.push_back(label);
}
@@ -695,7 +695,7 @@ void Gfx::unregisterLabel(GfxObj *label) {
_labels.remove_at(i);
break;
}
- }
+ }
}
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index 2f86f3693b..3eea1e871a 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -28,6 +28,7 @@
#include "common/hashmap.h"
#include "common/hash-str.h"
#include "common/stream.h"
+#include "common/array.h"
#include "graphics/surface.h"
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index c520ad4f25..d1361a6e8c 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -223,10 +223,10 @@ public:
}
break;
- default:
+ default:
_vm->_nextPart = _firstLocation[selection].part;
_vm->scheduleLocationSwitch(_firstLocation[selection].location);
-
+
}
_vm->_system->showMouse(false);
diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp
index ef1a8a6e7e..3794aeae29 100644
--- a/engines/parallaction/gui_ns.cpp
+++ b/engines/parallaction/gui_ns.cpp
@@ -122,7 +122,7 @@ public:
_dosLanguageSelectBlocks[1] = Common::Rect( 129, 85, 177, 155 ); // French
_dosLanguageSelectBlocks[2] = Common::Rect( 178, 60, 226, 130 ); // English
_dosLanguageSelectBlocks[3] = Common::Rect( 227, 35, 275, 105 ); // German
-
+
_amigaLanguageSelectBlocks[0] = Common::Rect( -1, -1, -1, -1 ); // Italian: not supported by Amiga multi-lingual version
_amigaLanguageSelectBlocks[1] = Common::Rect( 129, 85, 177, 155 ); // French
_amigaLanguageSelectBlocks[2] = Common::Rect( 178, 60, 226, 130 ); // English
@@ -149,7 +149,7 @@ public:
_language = -1;
_allowChoice = true;
}
-
+
~ChooseLanguageInputState_NS() {
destroyLabels();
}
@@ -222,15 +222,15 @@ public:
_nextState[0] = "newgame";
_nextState[1] = "loadgame";
-
+
_labels[0] = 0;
_labels[1] = 0;
}
-
+
~SelectGameInputState_NS() {
destroyLabels();
}
-
+
void destroyLabels() {
_vm->_gfx->unregisterLabel(_labels[0]);
_vm->_gfx->unregisterLabel(_labels[1]);
@@ -326,7 +326,7 @@ public:
_labels[2] = 0;
_labels[3] = 0;
}
-
+
~NewGameInputState_NS() {
destroyLabels();
}
@@ -475,7 +475,7 @@ public:
_block.create(BLOCK_WIDTH, BLOCK_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
_labels[0] = 0;
_labels[1] = 0;
-
+
_codeSelectBlocks[0] = Common::Rect( 111, 129, 127, 153 ); // na
_codeSelectBlocks[1] = Common::Rect( 128, 120, 144, 144 ); // wa
_codeSelectBlocks[2] = Common::Rect( 145, 111, 161, 135 ); // ra
@@ -698,7 +698,7 @@ public:
_vm->_gfx->unregisterLabel(_labels[0]);
_vm->_gfx->unregisterLabel(_labels[1]);
delete _labels[0];
- delete _labels[1];
+ delete _labels[1];
_labels[0] = 0;
_labels[1] = 0;
}
@@ -827,18 +827,18 @@ public:
_labels[2] = 0;
_labels[3] = 0;
}
-
+
void destroyLabels() {
_vm->_gfx->unregisterLabel(_labels[0]);
_vm->_gfx->unregisterLabel(_labels[1]);
_vm->_gfx->unregisterLabel(_labels[2]);
_vm->_gfx->unregisterLabel(_labels[3]);
-
+
delete _labels[0];
delete _labels[1];
delete _labels[2];
delete _labels[3];
-
+
_labels[0] = 0;
_labels[1] = 0;
_labels[2] = 0;
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index 3750602076..22406013a1 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -264,7 +264,7 @@ bool Answer::textIsNull() {
int Answer::speakerMood() {
return _mood & 0xF;
}
-
+
Question::Question(const Common::String &name) : _name(name), _mood(0) {
memset(_answers, 0, sizeof(_answers));
}
@@ -278,16 +278,16 @@ Question::~Question() {
bool Question::textIsNull() {
return (_text.equalsIgnoreCase("NULL"));
}
-
+
int Question::speakerMood() {
return _mood & 0xF;
}
int Question::balloonWinding() {
- return _mood & 0x10;
+ return _mood & 0x10;
}
-
+
Instruction::Instruction() {
_index = 0;
_flags = 0;
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 9bbc7d0c57..a37c4439a1 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -627,7 +627,7 @@ bool Parallaction::checkSpecialZoneBox(ZonePtr z, uint32 type, uint x, uint y) {
return false;
}
}
-
+
// WORKAROUND: this huge condition is needed because we made TypeData a collection of structs
// instead of an union. So, merge->_obj1 and get->_icon were just aliases in the original engine,
// but we need to check it separately here. The same workaround is applied in freeZones.
@@ -659,14 +659,14 @@ bool Parallaction::checkZoneType(ZonePtr z, uint32 type) {
if (_gameType == GType_BRA) {
if (type == 0) {
- if (ITEMTYPE(z) == 0) {
+ if (ITEMTYPE(z) == 0) {
if (ACTIONTYPE(z) != kZonePath) {
return true;
}
- }
+ }
if (ACTIONTYPE(z) == kZoneDoor) {
return true;
- }
+ }
}
}
@@ -751,7 +751,7 @@ ZonePtr Parallaction::hitZone(uint32 type, uint16 x, uint16 y) {
AnimationPtr a = *ait;
_a = (a->_flags & kFlagsActive) ? 1 : 0; // _a: active Animation
-
+
if (!_a) {
if (_gameType == GType_BRA && ACTIONTYPE(a) != kZoneTrap) {
continue;
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index 64cf1b437d..0b92db1f0a 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -351,7 +351,7 @@ void Parallaction_ns::changeLocation() {
// prevent music changes during the introduction
_soundManI->playLocationMusic(location);
}
-
+
_input->stopHovering();
// this is still needed to remove the floatingLabel
_gfx->freeLabels();
@@ -471,7 +471,7 @@ void Parallaction_ns::changeCharacter(const char *name) {
// prevent music changes during the introduction
_soundManI->playCharacterMusic(_char.getBaseName());
}
-
+
// The original engine used to reload 'common' only on loadgames. We are reloading here since 'common'
// contains character specific stuff. This causes crashes like bug #1816899, because parseLocation tries
// to reload scripts but the data archive selected is occasionally wrong. This has been solved by having
diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp
index e4be53022e..df53ecca3f 100644
--- a/engines/parallaction/parser_br.cpp
+++ b/engines/parallaction/parser_br.cpp
@@ -524,14 +524,14 @@ DECLARE_COMMAND_PARSER(location) {
ctxt.cmd->_startPos.x = -1000;
ctxt.cmd->_startPos2.x = -1000;
if (_tokens[ctxt.nextToken][0] != '\0') {
- if (isdigit(_tokens[ctxt.nextToken][0]) || _tokens[ctxt.nextToken][0] == '-') {
+ if (isdigit(static_cast<unsigned char>(_tokens[ctxt.nextToken][0])) || _tokens[ctxt.nextToken][0] == '-') {
ctxt.cmd->_startPos.x = atoi(_tokens[ctxt.nextToken]);
ctxt.nextToken++;
ctxt.cmd->_startPos.y = atoi(_tokens[ctxt.nextToken]);
ctxt.nextToken++;
}
- if (isdigit(_tokens[ctxt.nextToken][0]) || _tokens[ctxt.nextToken][0] == '-') {
+ if (isdigit(static_cast<unsigned char>(_tokens[ctxt.nextToken][0])) || _tokens[ctxt.nextToken][0] == '-') {
ctxt.cmd->_startPos2.x = atoi(_tokens[ctxt.nextToken]);
ctxt.nextToken++;
ctxt.cmd->_startPos2.y = atoi(_tokens[ctxt.nextToken]);
@@ -677,7 +677,7 @@ DECLARE_COMMAND_PARSER(text) {
createCommand(_parser->_lookup);
- if (isdigit(_tokens[1][1])) {
+ if (isdigit(static_cast<unsigned char>(_tokens[1][1]))) {
ctxt.cmd->_zeta0 = atoi(_tokens[1]);
ctxt.nextToken++;
} else {
@@ -714,7 +714,7 @@ DECLARE_COMMAND_PARSER(unary) {
DECLARE_ZONE_PARSER(limits) {
debugC(7, kDebugParser, "ZONE_PARSER(limits) ");
- if (isalpha(_tokens[1][1])) {
+ if (isalpha(static_cast<unsigned char>(_tokens[1][1]))) {
ctxt.z->_flags |= kFlagsAnimLinked;
ctxt.z->_linkedName = _tokens[1];
} else {
@@ -824,12 +824,12 @@ void LocationParser_br::parseHearData(ZonePtr z) {
}
void LocationParser_br::parseNoneData(ZonePtr z) {
- /* the only case we have to handle here is that of "scende2", which is the only Animation with
+ /* the only case we have to handle here is that of "scende2", which is the only Animation with
a command list following the type marker.
*/
if (!scumm_stricmp(_tokens[0], "commands")) {
parseCommands(z->_commands);
- }
+ }
}
@@ -1003,7 +1003,7 @@ DECLARE_INSTRUCTION_PARSER(text) {
int _si = 1;
- if (isdigit(_tokens[1][1])) {
+ if (isdigit(static_cast<unsigned char>(_tokens[1][1]))) {
ctxt.inst->_y = atoi(_tokens[1]);
_si = 2;
} else {
@@ -1066,7 +1066,7 @@ DECLARE_INSTRUCTION_PARSER(endif) {
void ProgramParser_br::parseRValue(ScriptVar &v, const char *str) {
- if (isdigit(str[0]) || str[0] == '-') {
+ if (isdigit(static_cast<unsigned char>(str[0])) || str[0] == '-') {
v.setImmediate(atoi(str));
return;
}
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index 69763affc8..100b608172 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -534,7 +534,7 @@ DECLARE_INSTRUCTION_PARSER(endscript) {
void ProgramParser_ns::parseRValue(ScriptVar &v, const char *str) {
- if (isdigit(str[0]) || str[0] == '-') {
+ if (isdigit(static_cast<unsigned char>(str[0])) || str[0] == '-') {
v.setImmediate(atoi(str));
return;
}
@@ -1412,9 +1412,9 @@ void LocationParser_ns::parseSpeakData(ZonePtr z) {
}
void LocationParser_ns::parseNoneData(ZonePtr z) {
- // "None" zones should have no content, but some
- // inconsistently define their command list after
- // the TYPE marker. This routine catches these
+ // "None" zones should have no content, but some
+ // inconsistently define their command list after
+ // the TYPE marker. This routine catches these
// command lists that would be lost otherwise.
if (!scumm_stricmp(_tokens[0], "commands")) {
parseCommands(z->_commands);
@@ -1423,7 +1423,7 @@ void LocationParser_ns::parseNoneData(ZonePtr z) {
_script->readLineToken(true);
_parser->parseStatement();
} while (!ctxt.endcommands);
-
+
// no need to parse one more line here, as
// it is done by the caller
}
diff --git a/engines/parallaction/sound.h b/engines/parallaction/sound.h
index baca5a7213..d0b5e5c175 100644
--- a/engines/parallaction/sound.h
+++ b/engines/parallaction/sound.h
@@ -131,11 +131,11 @@ class DosSoundMan_ns : public SoundMan_ns {
MidiPlayer *_midiPlayer;
bool _playing;
-
+
bool isLocationSilent(const char *locationName);
bool locationHasOwnSoftMusic(const char *locationName);
-
+
public:
DosSoundMan_ns(Parallaction_ns *vm);
~DosSoundMan_ns();
diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp
index 917d310738..b5d4c72ea4 100644
--- a/engines/parallaction/sound_ns.cpp
+++ b/engines/parallaction/sound_ns.cpp
@@ -140,7 +140,7 @@ void DosSoundMan_ns::playMusic() {
Common::SeekableReadStream *stream = _vm->_disk->loadMusic(_musicFile);
_midiPlayer->play(stream);
_midiPlayer->setVolume(255);
-
+
_playing = true;
}
@@ -159,7 +159,7 @@ void DosSoundMan_ns::pause(bool p) {
bool DosSoundMan_ns::locationHasOwnSoftMusic(const char *locationName) {
return !scumm_stricmp(locationName, "night") || !scumm_stricmp(locationName, "intsushi");
}
-
+
void DosSoundMan_ns::playCharacterMusic(const char *character) {
if (!character || locationHasOwnSoftMusic(_vm->_location._name)) {
return;
@@ -167,7 +167,7 @@ void DosSoundMan_ns::playCharacterMusic(const char *character) {
char *name = const_cast<char*>(character);
const char *newMusicFile = 0;
-
+
if (!scumm_stricmp(name, _dinoName)) {
newMusicFile = "dino";
} else
@@ -200,7 +200,7 @@ void DosSoundMan_ns::playLocationMusic(const char *location) {
debugC(2, kDebugExec, "changeLocation: music stopped");
} else {
playCharacterMusic(_vm->_char.getBaseName());
- }
+ }
}
diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp
index 21ee5ee5d9..5d5695ace4 100644
--- a/engines/parallaction/walk.cpp
+++ b/engines/parallaction/walk.cpp
@@ -590,14 +590,14 @@ void PathWalker_BR::doWalk(State &s) {
int xStep = (scale * 16) / 100 + 1;
int yStep = (scale * 10) / 100 + 1;
- /* WORKAROUND: in the balloon scene, the position of the balloon (which is implemented as a
+ /* WORKAROUND: in the balloon scene, the position of the balloon (which is implemented as a
Character) is controlled by the user (for movement, via this walking code) and by the scripts
(to simulate the balloon floating in the air, in a neverending loop that alters the position
coordinates).
When the two step sizes are equal in magnitude and opposite in direction, then the walk code
enters an infinite loop without giving control back to the user (this happens quite frequently
- when navigating the balloon near the borders of the screen, where the calculated step is
- forcibly small because of clipping). Since the "floating" script (part1/scripts/mongolo.scr)
+ when navigating the balloon near the borders of the screen, where the calculated step is
+ forcibly small because of clipping). Since the "floating" script (part1/scripts/mongolo.scr)
uses increments of 3 for both x and y, we tweak the calculated steps accordingly here. */
if (xStep == 3) xStep--;
if (yStep == 3) yStep--;
diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp
index b83bf60435..1f8d9b29f9 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -658,7 +658,7 @@ void Talk::stringAnimation(const SpeechParameters *parameters, int startFrame, i
} else if (parameters->animation[0] == 'E') {
// Talking head animation
return;
- } else if (!isdigit(parameters->animation[0])) {
+ } else if (!isdigit(static_cast<unsigned char>(parameters->animation[0]))) {
debug(6, "Error in speak string animation: '%s'", parameters->animation);
return;
} else
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 86606855e3..06ce335518 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -340,7 +340,7 @@ void Actor::loadActorSpriteList(ActorData *actor) {
uint lastFrame = 0;
uint curFrameIndex;
int resourceId = actor->_spriteListResourceId;
-
+
if (actor->_frames != NULL) {
for (ActorFrameSequences::const_iterator i = actor->_frames->begin(); i != actor->_frames->end(); ++i) {
for (int orient = 0; orient < ACTOR_DIRECTIONS_COUNT; orient++) {
@@ -385,6 +385,7 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource
ByteArrayReadStreamEndian actorS(actorListData);
+ _actors.clear();
_actors.resize(actorCount);
i = 0;
for (ActorDataArray::iterator actor = _actors.begin(); actor != _actors.end(); ++actor, i++) {
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index 451497986d..d9d4b70168 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -321,7 +321,7 @@ public:
_screenDepth = in->readSint32LE();
_screenScale = in->readSint32LE();
}
-
+
CommonObjectData() {
_index = 0;
_id = 0;
@@ -463,7 +463,7 @@ public:
void cmdActorWalkTo(int argc, const char **argv);
bool validActorId(uint16 id) {
- return (id == ID_PROTAG) || ((id >= objectIndexToId(kGameObjectActor, 0)) && (id < objectIndexToId(kGameObjectActor, _actors.size())));
+ return (id == ID_PROTAG) || ((id >= objectIndexToId(kGameObjectActor, 0)) && (id < objectIndexToId(kGameObjectActor, _actors.size())));
}
int actorIdToIndex(uint16 id) { return (id == ID_PROTAG) ? 0 : objectIdToIndex(id); }
uint16 actorIndexToId(int index) { return (index == 0) ? ID_PROTAG : objectIndexToId(kGameObjectActor, index); }
@@ -650,7 +650,7 @@ private:
public:
#ifdef ACTOR_DEBUG
#ifndef SAGA_DEBUG
- you must also define SAGA_DEBUG
+ #error You must also define SAGA_DEBUG
#endif
//path debug - use with care
struct DebugPoint {
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp
index 5607fcdd66..ea33a0950d 100644
--- a/engines/saga/actor_walk.cpp
+++ b/engines/saga/actor_walk.cpp
@@ -1165,7 +1165,15 @@ void Actor::moveDragon(ActorData *actor) {
dir0 = actor->_actionDirection;
dir1 = actor->_tileDirections[actor->_walkStepIndex++];
dir2 = actor->_tileDirections[actor->_walkStepIndex];
- dir3 = actor->_tileDirections[actor->_walkStepIndex + 1];
+ // Fix for Bug #3324850 ("ITE (SAGA): crash in dog sewers")
+ // If there were more than two steps left, get the third (next) step.
+ // Otherwise, store the second step again so the anim looks right.
+ // (If you stop the move instead, Rif isn't automatically knocked into
+ // the Sewer.)
+ if (actor->_walkStepIndex + 1 < actor->_walkStepsCount)
+ dir3 = actor->_tileDirections[actor->_walkStepIndex + 1];
+ else
+ dir3 = dir2;
if (dir0 != dir1){
actor->_actionDirection = dir0 = dir1;
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp
index 7ec4a59398..8b2d1e9dad 100644
--- a/engines/saga/animation.cpp
+++ b/engines/saga/animation.cpp
@@ -169,7 +169,7 @@ int Anim::playCutaway(int cut, bool fade) {
ByteArray resourceData;
_vm->_resource->loadResource(context, _cutawayList[cut].animResourceId, resourceData);
load(MAX_ANIMATIONS + cutawaySlot, resourceData);
-
+
setCycles(MAX_ANIMATIONS + cutawaySlot, _cutawayList[cut].cycles);
setFrameTime(MAX_ANIMATIONS + cutawaySlot, 1000 / _cutawayList[cut].frameRate);
@@ -414,7 +414,7 @@ void Anim::load(uint16 animId, const ByteArray &resourceData) {
}
anim->resourceData.resize(resourceData.size() - dataOffset);
-
+
memcpy(anim->resourceData.getBuffer(), resourceData.getBuffer() + dataOffset, anim->resourceData.size());
// Cache frame offsets
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index 7a98fe4164..2f1b61eed8 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -67,9 +67,6 @@ int SagaEngine::getGameId() const { return _gameDescription->gameId; }
uint32 SagaEngine::getFeatures() const {
uint32 result = _gameDescription->features;
- if (_gf_wyrmkeep)
- result |= GF_WYRMKEEP;
-
return result;
}
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index f63efd206b..a29d835a54 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -221,7 +221,7 @@ static const SAGAGameDescription gameDescriptions[] = {
GUIO_NOSPEECH
},
GID_ITE,
- GF_WYRMKEEP | GF_SCENE_SUBSTITUTES | GF_MONO_MUSIC | GF_LE_VOICES,
+ 0,
ITE_DEFAULT_SCENE,
&ITE_Resources,
ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -247,7 +247,7 @@ static const SAGAGameDescription gameDescriptions[] = {
GUIO_NOSPEECH
},
GID_ITE,
- GF_WYRMKEEP | GF_LE_VOICES,
+ 0,
ITE_DEFAULT_SCENE,
&ITE_Resources,
ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -273,7 +273,7 @@ static const SAGAGameDescription gameDescriptions[] = {
GUIO_NONE
},
GID_ITE,
- GF_WYRMKEEP | GF_SCENE_SUBSTITUTES,
+ 0,
ITE_DEFAULT_SCENE,
&ITE_Resources,
ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -299,7 +299,7 @@ static const SAGAGameDescription gameDescriptions[] = {
GUIO_NONE
},
GID_ITE,
- GF_WYRMKEEP | GF_8BIT_UNSIGNED_PCM,
+ GF_8BIT_UNSIGNED_PCM,
ITE_DEFAULT_SCENE,
&ITE_Resources,
ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -356,7 +356,7 @@ static const SAGAGameDescription gameDescriptions[] = {
GUIO_NONE
},
GID_ITE,
- GF_WYRMKEEP,
+ 0,
ITE_DEFAULT_SCENE,
&ITE_Resources,
ARRAYSIZE(ITEWINDEMO_GameFonts),
@@ -388,7 +388,7 @@ static const SAGAGameDescription gameDescriptions[] = {
GUIO_NONE
},
GID_ITE,
- GF_WYRMKEEP,
+ 0,
ITE_DEFAULT_SCENE,
&ITE_Resources,
ARRAYSIZE(ITE_GameFonts),
@@ -418,7 +418,7 @@ static const SAGAGameDescription gameDescriptions[] = {
GUIO_NONE
},
GID_ITE,
- GF_WYRMKEEP,
+ 0,
ITE_DEFAULT_SCENE,
&ITE_Resources,
ARRAYSIZE(ITE_GameFonts),
@@ -821,7 +821,7 @@ static const SAGAGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GID_DINO,
@@ -851,7 +851,7 @@ static const SAGAGameDescription gameDescriptions[] = {
},
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
GUIO_NONE
},
GID_FTA2,
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index 35f41e30ab..ec3ef2f6f9 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -557,7 +557,7 @@ int Events::handleInterval(Event *event) {
}
EventColumns *Events::chain(EventColumns *eventColumns, const Event &event) {
-
+
if (eventColumns == NULL) {
EventColumns tmp;
diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp
index 87fd48e2d2..9248f2b530 100644
--- a/engines/saga/introproc_ite.cpp
+++ b/engines/saga/introproc_ite.cpp
@@ -179,21 +179,22 @@ enum {
EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]) {
int game;
Common::Language lang;
+ bool hasWyrmkeepCredits = (Common::File::exists("credit3n.dlt") || // PC
+ Common::File::exists("credit3m.dlt")); // Mac
// The assumption here is that all WyrmKeep versions have the same
// credits, regardless of which operating system they're for.
lang = _vm->getLanguage();
- if (_vm->getFeatures() & GF_WYRMKEEP) {
+ if (hasWyrmkeepCredits)
game = kITEWyrmKeep;
- } else if (_vm->getPlatform() == Common::kPlatformMacintosh) {
+ else if (_vm->getPlatform() == Common::kPlatformMacintosh)
game = kITEMac;
- } else if (_vm->getFeatures() & GF_EXTRA_ITE_CREDITS) {
+ else if (_vm->getFeatures() & GF_EXTRA_ITE_CREDITS)
game = kITEPCCD;
- } else {
+ else
game = kITEPC;
- }
int line_spacing = 0;
int paragraph_spacing;
@@ -303,6 +304,11 @@ int Scene::SC_ITEIntroAnimProc(int param, void *refCon) {
int Scene::ITEIntroAnimProc(int param) {
Event event;
EventColumns *eventColumns;
+ bool isMac = _vm->getPlatform() == Common::kPlatformMacintosh;
+ bool isMultiCD = _vm->getPlatform() == Common::kPlatformUnknown;
+ bool hasWyrmkeepCredits = (Common::File::exists("credit3n.dlt") || // PC
+ Common::File::exists("credit3m.dlt")); // Mac
+ bool isDemo = Common::File::exists("scriptsd.rsc");
switch (param) {
case SCENE_BEGIN:{
@@ -324,19 +330,10 @@ int Scene::ITEIntroAnimProc(int param) {
// playback
int lastAnim;
- if (_vm->getFeatures() & GF_WYRMKEEP) {
- if (_vm->getPlatform() == Common::kPlatformMacintosh) {
- lastAnim = 3;
- } else {
- lastAnim = 2;
- }
- } else {
- if (_vm->getPlatform() == Common::kPlatformMacintosh) {
- lastAnim = 4;
- } else {
- lastAnim = 5;
- }
- }
+ if (hasWyrmkeepCredits || isMultiCD || isDemo)
+ lastAnim = isMac ? 3 : 2;
+ else
+ lastAnim = isMac ? 4 : 5;
for (int i = 0; i < lastAnim; i++)
_vm->_anim->link(i, i+1);
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp
index 80d53a2794..bdf8936a55 100644
--- a/engines/saga/introproc_saga2.cpp
+++ b/engines/saga/introproc_saga2.cpp
@@ -113,7 +113,7 @@ void Scene::playMovie(const char *filename) {
_vm->_system->updateScreen();
}
}
-
+
Common::Event event;
while (_vm->_system->getEventManager()->pollEvent(event)) {
if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP)
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index adea59ca9a..e886f0df82 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -836,7 +836,7 @@ void IsoMap::drawTile(uint16 tileIndex, const Point &point, const Location *loca
count = colDiff;
col += colDiff;
}
-
+
colDiff = _tileClip.right - col;
if (colDiff > 0) {
int countDiff = fgRunCount - count;
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 21f3cc489e..49d3f91d77 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -287,7 +287,12 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
if (_vm->isBigEndian())
musicFlags &= ~Audio::FLAG_LITTLE_ENDIAN;
- if (_vm->getFeatures() & GF_MONO_MUSIC)
+ // The newer ITE Mac demo version contains a music file, but it has mono music.
+ // This is the only music file that is about 7MB, whereas all the other ones
+ // are much larger. Thus, we use this simple heuristic to determine if we got
+ // mono music in the ITE demos or not.
+ if (!strcmp(_digitalMusicContext->fileName(), "musicd.rsc") &&
+ _digitalMusicContext->fileSize() < 8000000)
musicFlags &= ~Audio::FLAG_STEREO;
audioStream = Audio::makeRawStream(musicStream, 11025, musicFlags, DisposeAfterUse::YES);
@@ -368,10 +373,12 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
void Music::pause() {
_player->pause();
+ _player->setVolume(0);
}
void Music::resume() {
_player->resume();
+ _player->setVolume(_vm->_musicVolume);
}
void Music::stop() {
diff --git a/engines/saga/palanim.cpp b/engines/saga/palanim.cpp
index 1fefad93ab..021a4c9bac 100644
--- a/engines/saga/palanim.cpp
+++ b/engines/saga/palanim.cpp
@@ -53,7 +53,7 @@ void PalAnim::loadPalAnim(const ByteArray &resourceData) {
debug(3, "PalAnim::loadPalAnim(): Loading %d PALANIM entries.", _entries.size());
for (Common::Array<PalanimEntry>::iterator i = _entries.begin(); i != _entries.end(); ++i) {
-
+
i->cycle = 0;
i->colors.resize(readS.readUint16());
@@ -139,7 +139,7 @@ void PalAnim::cycleStep(int vectortime) {
void PalAnim::clear() {
debug(3, "PalAnim::clear()");
-
+
_entries.clear();
}
diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp
index 72b021309c..1b0dfa2f22 100644
--- a/engines/saga/resource.cpp
+++ b/engines/saga/resource.cpp
@@ -162,12 +162,6 @@ bool Resource::createContexts() {
uint16 voiceFileAddType;
};
-
- // If the Wyrmkeep credits file is found, set the Wyrmkeep version flag to true
- if (Common::File::exists("credit3n.dlt")) {
- _vm->_gf_wyrmkeep = true;
- }
-
for (const ADGameFileDescription *gameFileDescription = _vm->getFilesDescriptions();
gameFileDescription->fileName; gameFileDescription++) {
addContext(gameFileDescription->fileName, gameFileDescription->fileType);
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 15bd2aff72..6e272d37c0 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -72,9 +72,8 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc)
_readingSpeed = 0;
_copyProtection = false;
- _gf_wyrmkeep = false;
_musicWasPlaying = false;
-
+ _hasITESceneSubstitutes = false;
_sndRes = NULL;
_sound = NULL;
@@ -211,9 +210,9 @@ Common::Error SagaEngine::run() {
_subtitlesEnabled = ConfMan.getBool("subtitles");
_readingSpeed = getTalkspeed();
_copyProtection = ConfMan.getBool("copy_protection");
- _gf_wyrmkeep = false;
_musicWasPlaying = false;
_isIHNMDemo = Common::File::exists("music.res");
+ _hasITESceneSubstitutes = Common::File::exists("boarhall.bbm");
if (_readingSpeed > 3)
_readingSpeed = 0;
@@ -451,7 +450,7 @@ void SagaEngine::loadStrings(StringsTable &stringsTable, const ByteArray &string
error("SagaEngine::loadStrings() Wrong offset");
}
stringsTable.strings[ui] = &stringsTable.buffer[offset];
-
+
debug(9, "string[%i]=%s", ui, stringsTable.strings[ui]);
}
}
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 23258e1277..336883680a 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -137,16 +137,12 @@ enum GameFileTypes {
};
enum GameFeatures {
- GF_WYRMKEEP = 1 << 0,
- GF_ITE_FLOPPY = 1 << 1,
- GF_SCENE_SUBSTITUTES = 1 << 2,
+ GF_ITE_FLOPPY = 1 << 0,
#if 0
- GF_OLD_ITE_DOS = 1 << 3, // Currently unused
+ GF_OLD_ITE_DOS = 1 << 1, // Currently unused
#endif
- GF_MONO_MUSIC = 1 << 4,
- GF_EXTRA_ITE_CREDITS = 1 << 5,
- GF_LE_VOICES = 1 << 6,
- GF_8BIT_UNSIGNED_PCM = 1 << 7
+ GF_EXTRA_ITE_CREDITS = 1 << 2,
+ GF_8BIT_UNSIGNED_PCM = 1 << 3
};
enum VerbTypeIds {
@@ -532,9 +528,9 @@ public:
int _readingSpeed;
bool _copyProtection;
- bool _gf_wyrmkeep;
bool _musicWasPlaying;
bool _isIHNMDemo;
+ bool _hasITESceneSubstitutes;
SndRes *_sndRes;
Sound *_sound;
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 66ee8f4504..61e62d5626 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -451,7 +451,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy
// This is used for latter ITE demos where all places on world map except
// Tent Faire are substituted with LBM picture and short description
- if (_vm->getFeatures() & GF_SCENE_SUBSTITUTES) {
+ if (_vm->_hasITESceneSubstitutes) {
for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
if (sceneSubstitutes[i].sceneId == sceneNumber) {
Surface bbmBuffer;
diff --git a/engines/saga/scene.h b/engines/saga/scene.h
index adac3b622a..6e2cb12380 100644
--- a/engines/saga/scene.h
+++ b/engines/saga/scene.h
@@ -126,7 +126,7 @@ struct SceneDescription {
uint16 sceneScriptEntrypointNumber;
uint16 startScriptEntrypointNumber;
int16 musicResourceId;
-
+
void reset() {
flags = resourceListResourceId = endSlope = beginSlope = scriptModuleNumber = sceneScriptEntrypointNumber = startScriptEntrypointNumber = musicResourceId = 0;
}
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index 2433c93e93..add34e22a2 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -262,9 +262,12 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
buffer.flags |= Audio::FLAG_UNSIGNED;
buffer.flags &= ~Audio::FLAG_16BITS;
} else {
- // Voice files in newer ITE demo versions are OKI ADPCM (VOX) encoded
- if (!uncompressedSound && !scumm_stricmp(context->fileName(), "voicesd.rsc"))
+ // Voice files in newer ITE demo versions are OKI ADPCM (VOX) encoded.
+ // These are LE in all the Windows and Mac demos
+ if (!uncompressedSound && !scumm_stricmp(context->fileName(), "voicesd.rsc")) {
resourceType = kSoundVOX;
+ buffer.flags |= Audio::FLAG_LITTLE_ENDIAN;
+ }
}
}
buffer.buffer = NULL;
@@ -272,8 +275,6 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
// Check for LE sounds
if (!context->isBigEndian())
buffer.flags |= Audio::FLAG_LITTLE_ENDIAN;
- if ((context->fileType() & GAME_VOICEFILE) && (_vm->getFeatures() & GF_LE_VOICES))
- buffer.flags |= Audio::FLAG_LITTLE_ENDIAN;
// Older Mac versions of ITE were Macbinary packed
int soundOffset = (context->fileType() & GAME_MACBINARY) ? 36 : 0;
diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp
index 81893c7480..2895c6800c 100644
--- a/engines/saga/sprite.cpp
+++ b/engines/saga/sprite.cpp
@@ -207,7 +207,7 @@ void Sprite::drawClip(const Point &spritePointer, int width, int height, const b
const byte *srcPointer;
int backBufferPitch = _vm->_gfx->getBackBufferPitch();
-
+
//find Rects intersection
yDiff = clipRect.top - spritePointer.y;
if (yDiff > 0) {
@@ -247,10 +247,10 @@ void Sprite::drawClip(const Point &spritePointer, int width, int height, const b
}
bufRowPointer = _vm->_gfx->getBackBufferPixels() + backBufferPitch * yDstOffset + xDstOffset;
srcRowPointer = spriteBuffer + width * ySrcOffset + xSrcOffset;
-
+
// validate src, dst buffers
assert(_vm->_gfx->getBackBufferPixels() <= bufRowPointer);
- assert((_vm->_gfx->getBackBufferPixels() + (_vm->getDisplayInfo().width * _vm->getDisplayInfo().height)) >=
+ assert((_vm->_gfx->getBackBufferPixels() + (_vm->getDisplayInfo().width * _vm->getDisplayInfo().height)) >=
(byte *)(bufRowPointer + backBufferPitch * (cHeight - 1) + cWidth));
assert((const byte *)spriteBuffer <= srcRowPointer);
assert(((const byte *)spriteBuffer + (width * height)) >= (const byte *)(srcRowPointer + width * (cHeight - 1) + cWidth));
@@ -469,7 +469,7 @@ void Sprite::scaleBuffer(const byte *src, int width, int height, int scale, size
_decodeBuf.resize(outLength);
byte *dst = &_decodeBuf.front();
-
+
memset(dst, 0, _decodeBuf.size());
for (int i = 0; i < height; i++) {
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index 551c39b880..0b187ce630 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -24,49 +24,34 @@
#include "graphics/surface.h"
#include "common/textconsole.h"
-void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) {
- if (_thumbnail.get() == t)
- return;
-
- _thumbnail = Common::SharedPtr<Graphics::Surface>(t, Graphics::SharedPtrSurfaceDeleter());
+SaveStateDescriptor::SaveStateDescriptor()
+ // FIXME: default to 0 (first slot) or to -1 (invalid slot) ?
+ : _slot(-1), _description(), _isDeletable(true), _isWriteProtected(false),
+ _saveDate(), _saveTime(), _playTime(), _thumbnail() {
}
-bool SaveStateDescriptor::getBool(const Common::String &key) const {
- if (contains(key)) {
- const Common::String value = getVal(key);
- bool valueAsBool;
- if (Common::parseBool(value, valueAsBool))
- return valueAsBool;
- error("SaveStateDescriptor: %s '%s' has unknown value '%s' for boolean '%s'",
- save_slot().c_str(), description().c_str(), value.c_str(), key.c_str());
- }
- return false;
+SaveStateDescriptor::SaveStateDescriptor(int s, const Common::String &d)
+ : _slot(s), _description(d), _isDeletable(true), _isWriteProtected(false),
+ _saveDate(), _saveTime(), _playTime(), _thumbnail() {
}
-void SaveStateDescriptor::setDeletableFlag(bool state) {
- setVal("is_deletable", state ? "true" : "false");
-}
+void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) {
+ if (_thumbnail.get() == t)
+ return;
-void SaveStateDescriptor::setWriteProtectedFlag(bool state) {
- setVal("is_write_protected", state ? "true" : "false");
+ _thumbnail = Common::SharedPtr<Graphics::Surface>(t, Graphics::SharedPtrSurfaceDeleter());
}
void SaveStateDescriptor::setSaveDate(int year, int month, int day) {
- Common::String buffer;
- buffer = Common::String::format("%.2d.%.2d.%.4d", day, month, year);
- setVal("save_date", buffer);
+ _saveDate = Common::String::format("%.2d.%.2d.%.4d", day, month, year);
}
void SaveStateDescriptor::setSaveTime(int hour, int min) {
- Common::String buffer;
- buffer = Common::String::format("%.2d:%.2d", hour, min);
- setVal("save_time", buffer);
+ _saveTime = Common::String::format("%.2d:%.2d", hour, min);
}
void SaveStateDescriptor::setPlayTime(int hours, int minutes) {
- Common::String buffer;
- buffer = Common::String::format("%.2d:%.2d", hours, minutes);
- setVal("play_time", buffer);
+ _playTime = Common::String::format("%.2d:%.2d", hours, minutes);
}
void SaveStateDescriptor::setPlayTime(uint32 msecs) {
diff --git a/engines/savestate.h b/engines/savestate.h
index df01732058..6cbdb22edf 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -24,7 +24,7 @@
#define ENGINES_SAVESTATE_H
#include "common/array.h"
-#include "common/hash-str.h"
+#include "common/str.h"
#include "common/ptr.h"
@@ -33,65 +33,60 @@ struct Surface;
}
/**
- * A hashmap describing details about a given save state.
- * TODO
- * Guaranteed to contain save_slot and description values.
- * Additional ideas: Playtime, creation date, thumbnail, ...
+ * Object describing a save state.
+ *
+ * This at least includes the save slot number and a human readable
+ * description of the save state.
+ *
+ * Further possibilites are a thumbnail, play time, creation date,
+ * creation time, delete protected, write protection.
*/
-class SaveStateDescriptor : public Common::StringMap {
-protected:
- Common::SharedPtr<Graphics::Surface> _thumbnail; // can be 0
-
+class SaveStateDescriptor {
public:
- SaveStateDescriptor() : _thumbnail() {
- setVal("save_slot", "-1"); // FIXME: default to 0 (first slot) or to -1 (invalid slot) ?
- setVal("description", "");
- }
-
- SaveStateDescriptor(int s, const Common::String &d) : _thumbnail() {
- setVal("save_slot", Common::String::format("%d", s));
- setVal("description", d);
- }
+ SaveStateDescriptor();
+ SaveStateDescriptor(int s, const Common::String &d);
- SaveStateDescriptor(const Common::String &s, const Common::String &d) : _thumbnail() {
- setVal("save_slot", s);
- setVal("description", d);
- }
-
- /** The saveslot id, as it would be passed to the "-x" command line switch. */
- Common::String &save_slot() { return getVal("save_slot"); }
+ /**
+ * @param slot The saveslot id, as it would be passed to the "-x" command line switch.
+ */
+ void setSaveSlot(int slot) { _slot = slot; }
- /** The saveslot id, as it would be passed to the "-x" command line switch (read-only variant). */
- const Common::String &save_slot() const { return getVal("save_slot"); }
+ /**
+ * @return The saveslot id, as it would be passed to the "-x" command line switch.
+ */
+ int getSaveSlot() const { return _slot; }
- /** A human readable description of the save state. */
- Common::String &description() { return getVal("description"); }
+ /**
+ * @param desc A human readable description of the save state.
+ */
+ void setDescription(const Common::String &desc) { _description = desc; }
- /** A human readable description of the save state (read-only variant). */
- const Common::String &description() const { return getVal("description"); }
+ /**
+ * @return A human readable description of the save state.
+ */
+ const Common::String &getDescription() const { return _description; }
/** Optional entries only included when querying via MetaEngine::querySaveMetaInfo */
/**
- * Returns the value of a given key as boolean.
- * It accepts 'true', 'yes' and '1' for true and
- * 'false', 'no' and '0' for false.
- * (FIXME:) On unknown value it errors out ScummVM.
- * On unknown key it returns false as default.
+ * Defines whether the save state is allowed to be deleted.
*/
- bool getBool(const Common::String &key) const;
+ void setDeletableFlag(bool state) { _isDeletable = state; }
/**
- * Sets the 'is_deletable' key, which indicates if the
- * given savestate is safe for deletion.
+ * Queries whether the save state is allowed to be deleted.
*/
- void setDeletableFlag(bool state);
+ bool getDeletableFlag() const { return _isDeletable; }
/**
- * Sets the 'is_write_protected' key, which indicates if the
- * given savestate can be overwritten or not
+ * Defines whether the save state is write protected.
*/
- void setWriteProtectedFlag(bool state);
+ void setWriteProtectedFlag(bool state) { _isWriteProtected = state; }
+
+ /**
+ * Queries whether the save state is write protected.
+ */
+ bool getWriteProtectedFlag() const { return _isWriteProtected; }
/**
* Return a thumbnail graphics surface representing the savestate visually.
@@ -109,24 +104,100 @@ public:
void setThumbnail(Graphics::Surface *t);
/**
- * Sets the 'save_date' key properly, based on the given values.
+ * Sets the date the save state was created.
+ *
+ * @param year Year of creation.
+ * @param month Month of creation.
+ * @param day Day of creation.
*/
void setSaveDate(int year, int month, int day);
/**
- * Sets the 'save_time' key properly, based on the given values.
+ * Queries a human readable description of the date the save state was created.
+ *
+ * This will return an empty string in case the value is not set.
+ */
+ const Common::String &getSaveDate() const { return _saveDate; }
+
+ /**
+ * Sets the time the save state was created.
+ *
+ * @param hour Hour of creation.
+ * @param min Minute of creation.
*/
void setSaveTime(int hour, int min);
/**
- * Sets the 'play_time' key properly, based on the given values.
+ * Queries a human readable description of the time the save state was created.
+ *
+ * This will return an empty string in case the value is not set.
+ */
+ const Common::String &getSaveTime() const { return _saveTime; }
+
+ /**
+ * Sets the time the game was played before the save state was created.
+ *
+ * @param hours How many hours the user played the game so far.
+ * @param min How many minutes the user played the game so far.
*/
void setPlayTime(int hours, int minutes);
/**
- * Sets the 'play_time' key properly, based on the given value.
+ * Sets the time the game was played before the save state was created.
+ *
+ * @param msecs How many milliseconds the user played the game so far.
*/
void setPlayTime(uint32 msecs);
+
+ /**
+ * Queries a human readable description of the time the game was played
+ * before the save state was created.
+ *
+ * This will return an empty string in case the value is not set.
+ */
+ const Common::String &getPlayTime() const { return _playTime; }
+
+private:
+ /**
+ * The saveslot id, as it would be passed to the "-x" command line switch.
+ */
+ int _slot;
+
+ /**
+ * A human readable description of the save state.
+ */
+ Common::String _description;
+
+ /**
+ * Whether the save state can be deleted.
+ */
+ bool _isDeletable;
+
+ /**
+ * Whether the save state is write protected.
+ */
+ bool _isWriteProtected;
+
+ /**
+ * Human readable description of the date the save state was created.
+ */
+ Common::String _saveDate;
+
+ /**
+ * Human readable description of the time the save state was created.
+ */
+ Common::String _saveTime;
+
+ /**
+ * Human readable description of the time the game was played till the
+ * save state was created.
+ */
+ Common::String _playTime;
+
+ /**
+ * The thumbnail of the save state.
+ */
+ Common::SharedPtr<Graphics::Surface> _thumbnail;
};
/** List of savestates. */
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index b1b5f81995..2f69d5caa1 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -255,7 +255,7 @@ void Console::postEnter() {
videoDecoder = new RobotDecoder(g_system->getMixer(), _engine->getPlatform() == Common::kPlatformMacintosh);
} else if (_videoFile.hasSuffix(".duk")) {
duckMode = true;
- videoDecoder = new Video::AviDecoder(g_system->getMixer());
+ videoDecoder = new Video::AviDecoder(g_system->getMixer());
#endif
} else if (_videoFile.hasSuffix(".avi")) {
videoDecoder = new Video::AviDecoder(g_system->getMixer());
@@ -895,7 +895,7 @@ bool Console::cmdVerifyScripts(int argc, const char **argv) {
return true;
}
-// Same as in sound/drivers/midi.cpp
+// Same as in sound/drivers/midi.cpp
uint8 getGmInstrument(const Mt32ToGmMap &Mt32Ins) {
if (Mt32Ins.gmInstr == MIDI_MAPPED_TO_RHYTHM)
return Mt32Ins.gmRhythmKey + 0x80;
@@ -913,7 +913,7 @@ bool Console::cmdShowInstruments(int argc, const char **argv) {
MidiPlayer *player = MidiPlayer_Midi_create(doSoundVersion);
MidiParser_SCI *parser = new MidiParser_SCI(doSoundVersion, 0);
parser->setMidiDriver(player);
-
+
Common::List<ResourceId> *resources = _engine->getResMan()->listResources(kResourceTypeSound);
Common::sort(resources->begin(), resources->end());
Common::List<ResourceId>::iterator itr = resources->begin();
@@ -984,7 +984,7 @@ bool Console::cmdShowInstruments(int argc, const char **argv) {
if (channel != 15) { // SCI special
byte instrument = *channelData++;
if (!firstOneShown)
- firstOneShown = true;
+ firstOneShown = true;
else
DebugPrintf(",");
@@ -1577,7 +1577,7 @@ bool Console::cmdPlayVideo(int argc, const char **argv) {
Common::String filename = argv[1];
filename.toLowercase();
- if (filename.hasSuffix(".seq") || filename.hasSuffix(".avi") || filename.hasSuffix(".vmd") ||
+ if (filename.hasSuffix(".seq") || filename.hasSuffix(".avi") || filename.hasSuffix(".vmd") ||
filename.hasSuffix(".rbt") || filename.hasSuffix(".duk")) {
_videoFile = filename;
_videoFrameDelay = (argc == 2) ? 10 : atoi(argv[2]);
@@ -1699,7 +1699,7 @@ bool Console::cmdShowSavedBits(int argc, const char **argv) {
return true;
}
- // Now we _finally_ know these are valid saved bits
+ // Now we _finally_ know these are valid saved bits
Common::Rect rect;
byte mask;
@@ -1829,7 +1829,7 @@ bool Console::cmdPrintSegmentTable(int argc, const char **argv) {
case SEG_TYPE_STRING:
DebugPrintf("T SCI32 strings (%d)", (*(StringTable *)mobj).entries_used);
break;
-#endif
+#endif
default:
DebugPrintf("I Invalid (type = %x)", mobj->getType());
@@ -2954,8 +2954,8 @@ void Console::printKernelCallsFound(int kernelFuncNum, bool showFoundScripts) {
uint16 argc2 = opparams[1];
if (kFuncNum == kernelFuncNum) {
- DebugPrintf("Called from script %d, object %s, method %s(%d) with %d bytes for arguments\n",
- itr->getNumber(), objName,
+ DebugPrintf("Called from script %d, object %s, method %s(%d) with %d bytes for arguments\n",
+ itr->getNumber(), objName,
_engine->getKernel()->getSelectorName(obj->getFuncSelector(i)).c_str(), i, argc2);
}
}
diff --git a/engines/sci/decompressor.cpp b/engines/sci/decompressor.cpp
index 03a06d240d..82af6eca43 100644
--- a/engines/sci/decompressor.cpp
+++ b/engines/sci/decompressor.cpp
@@ -181,16 +181,27 @@ int DecompressorLZW::unpackLZW(Common::ReadStream *src, byte *dest, uint32 nPack
init(src, dest, nPacked, nUnpacked);
uint16 token; // The last received value
-
- uint16 tokenlist[4096]; // pointers to dest[]
- uint16 tokenlengthlist[4096]; // char length of each token
uint16 tokenlastlength = 0;
+ uint16 *tokenlist = (uint16 *)malloc(4096 * sizeof(uint16)); // pointers to dest[]
+ uint16* tokenlengthlist = (uint16 *)malloc(4096 * sizeof(uint16)); // char length of each token
+ if (!tokenlist || !tokenlengthlist) {
+ free(tokenlist);
+ free(tokenlengthlist);
+
+ error("[DecompressorLZW::unpackLZW] Cannot allocate token memory buffers");
+ }
+
while (!isFinished()) {
token = getBitsLSB(_numbits);
- if (token == 0x101)
+ if (token == 0x101) {
+ free(tokenlist);
+ free(tokenlengthlist);
+
return 0; // terminator
+ }
+
if (token == 0x100) { // reset command
_numbits = 9;
_endtoken = 0x1FF;
@@ -199,6 +210,10 @@ int DecompressorLZW::unpackLZW(Common::ReadStream *src, byte *dest, uint32 nPack
if (token > 0xff) {
if (token >= _curtoken) {
warning("unpackLZW: Bad token %x", token);
+
+ free(tokenlist);
+ free(tokenlengthlist);
+
return SCI_ERROR_DECOMPRESSION_ERROR;
}
tokenlastlength = tokenlengthlist[token] + 1;
@@ -231,6 +246,9 @@ int DecompressorLZW::unpackLZW(Common::ReadStream *src, byte *dest, uint32 nPack
}
}
+ free(tokenlist);
+ free(tokenlengthlist);
+
return _dwWrote == _szUnpacked ? 0 : SCI_ERROR_DECOMPRESSION_ERROR;
}
@@ -238,12 +256,20 @@ int DecompressorLZW::unpackLZW1(Common::ReadStream *src, byte *dest, uint32 nPac
uint32 nUnpacked) {
init(src, dest, nPacked, nUnpacked);
- byte stak[0x1014];
+ byte *stak = (byte *)malloc(0x1014);
+ unsigned int tokensSize = 0x1004 * sizeof(Tokenlist);
+ Tokenlist *tokens = (Tokenlist *)malloc(tokensSize);
+ if (!stak || !tokens) {
+ free(stak);
+ free(tokens);
+
+ error("[DecompressorLZW::unpackLZW1] Cannot allocate decompression buffers");
+ }
+
+ memset(tokens, 0, tokensSize);
+
byte lastchar = 0;
uint16 stakptr = 0, lastbits = 0;
- Tokenlist tokens[0x1004];
- memset(tokens, 0, sizeof(tokens));
-
byte decryptstart = 0;
uint16 bitstring;
@@ -310,6 +336,10 @@ int DecompressorLZW::unpackLZW1(Common::ReadStream *src, byte *dest, uint32 nPac
break;
}
}
+
+ free(stak);
+ free(tokens);
+
return _dwWrote == _szUnpacked ? 0 : SCI_ERROR_DECOMPRESSION_ERROR;
}
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 7bc9699e9b..2285e512bd 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -23,6 +23,7 @@
#include "engines/advancedDetector.h"
#include "base/plugins.h"
#include "common/file.h"
+#include "common/ptr.h"
#include "common/savefile.h"
#include "common/system.h"
#include "graphics/thumbnail.h"
@@ -224,6 +225,7 @@ static const OldNewIdTableEntry s_oldNewTable[] = {
{ "emc", "funseeker", SCI_VERSION_NONE },
{ "gk", "gk1", SCI_VERSION_NONE },
// gk2 is the same
+ { "gk2demo", "gk2", SCI_VERSION_NONE },
{ "hoyledemo", "hoyle1", SCI_VERSION_NONE },
{ "cardgames", "hoyle1", SCI_VERSION_NONE },
{ "solitare", "hoyle2", SCI_VERSION_NONE },
@@ -235,7 +237,7 @@ static const OldNewIdTableEntry s_oldNewTable[] = {
{ "kq4", "kq4sci", SCI_VERSION_NONE },
// kq5 is the same
// kq6 is the same
- // kq7 is the same
+ { "kq7cd", "kq7", SCI_VERSION_NONE },
{ "mm1", "laurabow", SCI_VERSION_NONE },
{ "cb1", "laurabow", SCI_VERSION_NONE },
{ "lb2", "laurabow2", SCI_VERSION_NONE },
@@ -323,7 +325,7 @@ Common::String convertSierraGameId(Common::String sierraId, uint32 *gameFlags, R
for (const OldNewIdTableEntry *cur = s_oldNewTable; cur->oldId[0]; ++cur) {
if (sierraId == cur->oldId) {
- // Distinguish same IDs from the SCI version
+ // Distinguish same IDs via the SCI version
if (cur->version != SCI_VERSION_NONE && cur->version != getSciVersion())
continue;
@@ -428,64 +430,57 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
s_fallbackDesc.flags = ADGF_NO_FLAGS;
s_fallbackDesc.platform = Common::kPlatformPC; // default to PC platform
s_fallbackDesc.gameid = "sci";
+ s_fallbackDesc.guioptions = Common::GUIO_NONE;
- // First grab all filenames
- // TODO: Consider using allFiles instead of fslist
- for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- if (file->isDirectory())
- continue;
-
- Common::String filename = file->getName();
- filename.toLowercase();
+ if (allFiles.contains("resource.map") || allFiles.contains("Data1")
+ || allFiles.contains("resmap.001") || allFiles.contains("resmap.001")) {
+ foundResMap = true;
+ }
- if (filename.contains("resource.map") || filename.contains("resmap.00") || filename.contains("Data1")) {
- foundResMap = true;
+ // Determine if we got a CD version and set the CD flag accordingly, by checking for
+ // resource.aud for SCI1.1 CD games, or audio001.002 for SCI1 CD games. We assume that
+ // the file should be over 10MB, as it contains all the game speech and is usually
+ // around 450MB+. The size check is for some floppy game versions like KQ6 floppy, which
+ // also have a small resource.aud file
+ if (allFiles.contains("resource.aud") || allFiles.contains("audio001.002")) {
+ Common::FSNode file = allFiles.contains("resource.aud") ? allFiles["resource.aud"] : allFiles["audio001.002"];
+ Common::SeekableReadStream *tmpStream = file.createReadStream();
+ if (tmpStream->size() > 10 * 1024 * 1024) {
+ // We got a CD version, so set the CD flag accordingly
+ s_fallbackDesc.flags |= ADGF_CD;
}
+ delete tmpStream;
+ }
- // Determine if we got a CD version and set the CD flag accordingly, by checking for
- // resource.aud for SCI1.1 CD games, or audio001.002 for SCI1 CD games. We assume that
- // the file should be over 10MB, as it contains all the game speech and is usually
- // around 450MB+. The size check is for some floppy game versions like KQ6 floppy, which
- // also have a small resource.aud file
- if (filename.contains("resource.aud") || filename.contains("audio001.002")) {
- Common::SeekableReadStream *tmpStream = file->createReadStream();
- if (tmpStream->size() > 10 * 1024 * 1024) {
- // We got a CD version, so set the CD flag accordingly
- s_fallbackDesc.flags |= ADGF_CD;
- s_fallbackDesc.extra = "CD";
- }
- delete tmpStream;
- }
+ if (allFiles.contains("resource.000") || allFiles.contains("resource.001")
+ || allFiles.contains("ressci.000") || allFiles.contains("ressci.001"))
+ foundRes000 = true;
- if (filename.contains("resource.000") || filename.contains("resource.001")
- || filename.contains("ressci.000") || filename.contains("ressci.001"))
- foundRes000 = true;
+ // Data1 contains both map and volume for SCI1.1+ Mac games
+ if (allFiles.contains("Data1")) {
+ foundResMap = foundRes000 = true;
+ s_fallbackDesc.platform = Common::kPlatformMacintosh;
+ }
- // Data1 contains both map and volume for SCI1.1+ Mac games
- if (filename.contains("Data1")) {
- foundResMap = foundRes000 = true;
- s_fallbackDesc.platform = Common::kPlatformMacintosh;
- }
+ // Determine the game platform
+ // The existence of any of these files indicates an Amiga game
+ if (allFiles.contains("9.pat") || allFiles.contains("spal") ||
+ allFiles.contains("patch.005") || allFiles.contains("bank.001"))
+ s_fallbackDesc.platform = Common::kPlatformAmiga;
- // Determine the game platform
- // The existence of any of these files indicates an Amiga game
- if (filename.contains("9.pat") || filename.contains("spal") ||
- filename.contains("patch.005") || filename.contains("bank.001"))
- s_fallbackDesc.platform = Common::kPlatformAmiga;
+ // The existence of 7.pat or patch.200 indicates a Mac game
+ if (allFiles.contains("7.pat") || allFiles.contains("patch.200"))
+ s_fallbackDesc.platform = Common::kPlatformMacintosh;
- // The existence of 7.pat or patch.200 indicates a Mac game
- if (filename.contains("7.pat") || filename.contains("patch.200"))
- s_fallbackDesc.platform = Common::kPlatformMacintosh;
+ // The data files for Atari ST versions are the same as their DOS counterparts
- // The data files for Atari ST versions are the same as their DOS counterparts
- }
// If these files aren't found, it can't be SCI
if (!foundResMap && !foundRes000) {
return 0;
}
- ResourceManager *resMan = new ResourceManager();
+ Common::ScopedPtr<ResourceManager> resMan(new ResourceManager());
assert(resMan);
resMan->addAppropriateSources(fslist);
resMan->init(true);
@@ -495,7 +490,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
// Is SCI32 compiled in? If not, and this is a SCI32 game,
// stop here
if (getSciVersion() >= SCI_VERSION_2) {
- delete resMan;
return (const ADGameDescription *)&s_fallbackDesc;
}
#endif
@@ -506,7 +500,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
// Can't be SCI (or unsupported SCI views). Pinball Creep by sierra also uses resource.map/resource.000 files
// but doesnt share sci format at all, if we dont return 0 here we will detect this game as SCI
if (gameViews == kViewUnknown) {
- delete resMan;
return 0;
}
@@ -519,7 +512,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
// If we don't have a game id, the game is not SCI
if (sierraGameId.empty()) {
- delete resMan;
return 0;
}
@@ -558,24 +550,43 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const FileMap &allFiles,
}
- // Fill in extras field
+ // Fill in "extra" field
+
+ // Is this an EGA version that might have a VGA pendant? Then we want
+ // to mark it as such in the "extra" field.
+ const bool markAsEGA = (gameViews == kViewEga && s_fallbackDesc.platform != Common::kPlatformAmiga
+ && getSciVersion() > SCI_VERSION_1_EGA_ONLY);
+
+ const bool isDemo = (s_fallbackDesc.flags & ADGF_DEMO);
+ const bool isCD = (s_fallbackDesc.flags & ADGF_CD);
+
+ if (!isCD)
+ s_fallbackDesc.guioptions |= Common::GUIO_NOSPEECH;
if (gameId.hasSuffix("sci")) {
s_fallbackDesc.extra = "SCI";
// Differentiate EGA versions from the VGA ones, where needed
- if (gameViews == kViewEga && s_fallbackDesc.platform != Common::kPlatformAmiga)
+ if (markAsEGA)
s_fallbackDesc.extra = "SCI/EGA";
+
+ // Mark as demo.
+ // Note: This overwrites the 'EGA' info, if it was previously set.
+ if (isDemo)
+ s_fallbackDesc.extra = "SCI/Demo";
} else {
- if (gameViews == kViewEga && s_fallbackDesc.platform != Common::kPlatformAmiga)
+ if (markAsEGA)
s_fallbackDesc.extra = "EGA";
- }
-
- // Add "demo" to the description for demos
- if (s_fallbackDesc.flags & ADGF_DEMO)
- s_fallbackDesc.extra = (gameId.hasSuffix("sci")) ? "SCI/Demo" : "Demo";
- delete resMan;
+ // Set "CD" and "Demo" as appropriate.
+ // Note: This overwrites the 'EGA' info, if it was previously set.
+ if (isDemo && isCD)
+ s_fallbackDesc.extra = "CD Demo";
+ else if (isDemo)
+ s_fallbackDesc.extra = "Demo";
+ else if (isCD)
+ s_fallbackDesc.extra = "CD";
+ }
return (const ADGameDescription *)&s_fallbackDesc;
}
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index def3879945..3b18a1f68d 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -60,7 +60,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH },
- // Castle of Dr. Brain - German Amiga (from www.back2roots.org, also includes english language)
+ // Castle of Dr. Brain - German Amiga (from www.back2roots.org, also includes English language)
// Executable scanning reports "1.005.001"
// SCI interpreter version 1.000.510
{"castlebrain", "", {
@@ -72,6 +72,16 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::DE_DEU, Common::kPlatformAmiga, ADGF_ADDENGLISH, GUIO_NOSPEECH },
+ // Castle of Dr. Brain Macintosh (from omer_mor, bug report #3328251)
+ {"castlebrain", "", {
+ {"resource.map", 0, "75cb06a94d2e0641295edd043f26f3a8", 2763},
+ {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 476566},
+ {"resource.001", 0, "7f7da982f5cd868e1e608cd4f6515656", 400521},
+ {"resource.002", 0, "e1a6b6f1060f60be9dcb6d28ad7a2a20", 1168310},
+ {"resource.003", 0, "6c3d1bb26ad532c94046bc9ac49b5ff4", 891295},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformMacintosh, 0, GUIO_NOSPEECH },
+
// Castle of Dr. Brain - English DOS Non-Interactive Demo
// SCI interpreter version 1.000.005
{"castlebrain", "Demo", {
@@ -617,7 +627,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Gabriel Knight - English DOS Floppy (supplied my markcoolio in bug report #2723777)
// SCI interpreter version 2.000.000
@@ -625,7 +635,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "65e8c14092e4c9b3b3538b7602c8c5ec", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// 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"
@@ -633,7 +643,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ef41df08cf2c1f680216cdbeed0f8311", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Gabriel Knight - German DOS Floppy (supplied my markcoolio in bug report #2723775)
// SCI interpreter version 2.000.000
@@ -641,7 +651,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ad6508b0296b25c07b1f58828dc33696", 10789},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13077029},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Gabriel Knight - English DOS CD (from jvprat)
// Executable scanning reports "2.000.000", VERSION file reports "01.100.000"
@@ -649,7 +659,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, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight - English Windows CD (from jvprat)
// Executable scanning reports "2.000.000", VERSION file reports "01.100.000"
@@ -657,7 +667,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10996},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 12581736},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight - German DOS CD (from Tobis87)
// SCI interpreter version 2.000.000
@@ -665,7 +675,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, GUIO_NONE },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight - Spanish DOS CD (from jvprat)
// Executable scanning reports "2.000.000", VERSION file reports "1.000.000, April 13, 1995"
@@ -673,7 +683,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, GUIO_NONE },
+ Common::ES_ESP, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight - French DOS CD (from Hkz)
// VERSION file reports "1.000.000, May 3, 1994"
@@ -681,7 +691,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, GUIO_NONE },
+ Common::FR_FRA, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight - German Windows CD (from Tobis87)
// SCI interpreter version 2.000.000
@@ -689,7 +699,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a7d3e55114c65647310373cb390815ba", 11392},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13400497},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformWindows, ADGF_CD, GUIO_NONE },
+ Common::DE_DEU, Common::kPlatformWindows, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight - Spanish Windows CD (from jvprat)
// Executable scanning reports "2.000.000", VERSION file reports "1.000.000, April 13, 1995"
@@ -697,7 +707,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7cb6e9bba15b544ec7a635c45bde9953", 11404},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13381599},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformWindows, ADGF_CD, GUIO_NONE },
+ Common::ES_ESP, Common::kPlatformWindows, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight - English Macintosh
{"gk1", "", {
@@ -706,7 +716,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"Data3", 0, "f25068b408b09275d8b698866462f578", 3677599},
{"Data4", 0, "1cceebbe411b26c860a74f91c337fdf3", 3230086},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_NONE },
// Gabriel Knight 2 - English Windows Non-Interactive Demo
// Executable scanning reports "2.100.002"
@@ -714,7 +724,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e0effce11c4908f4b91838741716c83d", 1351},
{"resource.000", 0, "d04cfc7f04b6f74d13025378be49ec2b", 4640330},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
// Gabriel Knight 2 - English DOS (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.1"
@@ -732,7 +742,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.006", 0, "ce9359037277b7d7976da185c2fa0aad", 2977},
{"ressci.006", 0, "8e44e03890205a7be12f45aaba9644b4", 60659424},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Gabriel Knight 2 - French DOS (6-CDs Sierra Originals reedition)
// Executable scanning reports "2.100.002", VERSION file reports "1.0"
@@ -750,7 +760,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.006", 0, "11b2e722170b8c93fdaa5428e2c7676f", 3001},
{"ressci.006", 0, "4037d941aec39d2e654e20960429aefc", 60568486},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0,
+ Common::FR_FRA, Common::kPlatformPC, ADGF_UNSTABLE,
GUIO_NOSPEECH },
// Gabriel Knight 2 - English Macintosh
@@ -763,7 +773,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"Data4", 0, "8b843c62eb53136a855d6e0087e3cb0d", 5889553},
{"Data5", 0, "f9fcf9ab2eb13b2125c33a1cda03a093", 14349984},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_NONE },
#endif // ENABLE_SCI32
@@ -1446,7 +1456,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4948e4e1506f1e1c4e1d47abfa06b7f8", 204385195},
{"resource.map", 0, "40ccafb2195301504eba2e4f4f2c7f3d", 18925},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// King's Quest 7 - English Windows (from the King's Quest Collection)
// Executable scanning reports "2.100.002", VERSION file reports "1.4"
@@ -1454,7 +1464,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2be9ab94429c721af8e05c507e048a15", 18697},
{"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 203882535},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// King's Quest 7 - English DOS (from FRG)
// SCI interpreter version 2.100.002, VERSION file reports "2.00b"
@@ -1462,7 +1472,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8676b0fbbd7362989a029fe72fea14c6", 18709},
{"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// King's Quest 7 - English Windows (from FRG)
// SCI interpreter version 2.100.002, VERSION file reports "2.00b"
@@ -1470,7 +1480,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8676b0fbbd7362989a029fe72fea14c6", 18709},
{"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// King's Quest 7 - German Windows (supplied by markcoolio in bug report #2727402)
// SCI interpreter version 2.100.002
@@ -1478,7 +1488,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "838b9ff132bd6962026fee832e8a7ddb", 18697},
{"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 206626576},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// King's Quest 7 - Spanish DOS (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "2.00"
@@ -1486,7 +1496,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0b62693cbe87e3aaca3e8655a437f27f", 18709},
{"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::ES_ESP, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// King's Quest 7 - English DOS Non-Interactive Demo
// SCI interpreter version 2.100.002
@@ -1494,7 +1504,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "b44f774108d63faa1d021101221c5a54", 1690},
{"resource.000", 0, "d9659d2cf0c269c6a9dc776707f5bea0", 2433827},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
#endif // ENABLE_SCI32
@@ -1660,6 +1670,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ // Larry 1 VGA Remake - English Macintosh (from omer_mor, bug report #3328262)
+ {"lsl1sci", "SCI", {
+ {"resource.map", 0, "6395e7f7881e37e39d81ff5175a35f6f", 3237},
+ {"resource.000", 0, "5933df4ea688584d6f59fdea5a9404f8", 989066},
+ {"resource.001", 0, "aa6f153f70f1e32d1bde465fff08eecf", 1137418},
+ {"resource.002", 0, "b22c616aa789ebef990290c7ffd86548", 1097477},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformMacintosh, 0, GUIO_NOSPEECH },
+
// Larry 1 VGA Remake - English DOS Non-Interactive Demo
// SCI interpreter version 1.000.084
{"lsl1sci", "SCI/Demo", {
@@ -1923,6 +1942,20 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ // Larry 5 - English Macintosh (from omer_mor, bug report #3328257)
+ {"lsl5", "", {
+ {"resource.map", 0, "f12439da78b9878e16436661deb83f84", 6525},
+ {"resource.000", 0, "f2537473213d70e7f4fc82e988ab90ca", 702403},
+ {"resource.001", 0, "db4a1381d88028876a99303bfaaba893", 704679},
+ {"resource.002", 0, "e86aeb27711f4a673e06ec32cfc84125", 1125854},
+ {"resource.003", 0, "13fd4942bb818f9acd2970d66fca6509", 854733},
+ {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 1046644},
+ {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 1008293},
+ {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1110043},
+ {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 989801},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformMacintosh, 0, GUIO_NOSPEECH },
+
// Larry 5 - German DOS (from Tobis87)
// SCI interpreter version T.A00.196
{"lsl5", "", {
@@ -2087,7 +2120,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0c0804434ea62278dd15032b1947426c", 8872},
{"resource.000", 0, "9a9f4870504444cda863dd14d077a680", 18520872},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
// Larry 6 - German DOS CD - HIRES (provided by richiefs in bug report #2670691)
// SCI interpreter version 2.100.002
@@ -2095,7 +2128,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "badfdf446ffed569a310d2c63a249421", 8896},
{"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18534274},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
// Larry 6 - French DOS CD - HIRES (provided by richiefs in bug report #2670691)
// SCI interpreter version 2.100.002
@@ -2103,7 +2136,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "d184e9aa4f2d4b5670ddb3669db82cda", 8896},
{"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18538987},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::FR_FRA, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
// Larry 7 - English DOS Demo (provided by richiefs in bug report #2670691)
// SCI interpreter version 2.100.002
@@ -2111,7 +2144,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, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
#ifdef ENABLE_SCI3_GAMES
// Larry 7 - English DOS CD (from spookypeanut)
@@ -2120,7 +2153,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "eae93e1b1d1ccc58b4691c371281c95d", 8188},
{"ressci.000", 0, "89353723488219e25589165d73ed663e", 66965678},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
// Larry 7 - German DOS (from Tobis87)
// SCI interpreter version 3.000.000
@@ -2128,7 +2161,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "c11e6bfcfc2f2d05da47e5a7df3e9b1a", 8188},
{"ressci.000", 0, "a8c6817bb94f332ff498a71c8b47f893", 66971724},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Larry 7 - French DOS (provided by richiefs in bug report #2670691)
// SCI interpreter version 3.000.000
@@ -2136,7 +2169,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "4407849fd52fe3efb0c30fba60cd5cd4", 8206},
{"ressci.000", 0, "dc37c3055fffbefb494ff22b145d377b", 66964472},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Larry 7 - Italian DOS CD (from glorifindel)
// SCI interpreter version 3.000.000
@@ -2144,7 +2177,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "9852a97141f789413f29bf956052acdb", 8212},
{"ressci.000", 0, "440b9fed89590abb4e4386ed6f948ee2", 67140181},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::IT_ITA, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
// Larry 7 - Spanish DOS (from the Leisure Suit Larry Collection)
// Executable scanning reports "3.000.000", VERSION file reports "1.0s"
@@ -2152,7 +2185,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "8f3d603e1acc834a5d598b30cdfc93f3", 8188},
{"ressci.000", 0, "32792f9bc1bf3633a88b382bb3f6e40d", 67071418},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::ES_ESP, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
#endif
// Lighthouse - English Windows Demo (from jvprat)
@@ -2161,7 +2194,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, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
#ifdef ENABLE_SCI3_GAMES
// Lighthouse - English Windows Demo
@@ -2170,7 +2203,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, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
// Lighthouse - English DOS (from jvprat)
// Executable scanning reports "3.000.000", VERSION file reports "1.1"
@@ -2180,7 +2213,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.002", 0, "c68db5333f152fea6ca2dfc75cad8b34", 7573},
{"ressci.002", 0, "175468431a979b9f317c294ce3bc1430", 94628315},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Lighthouse - Spanish DOS (from jvprat)
// Executable scanning reports "3.000.000", VERSION file reports "1.1"
@@ -2190,7 +2223,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.002", 0, "e7dc85884a2417e2eff9de0c63dd65fa", 7630},
{"ressci.002", 0, "3c8d627c555b0e3e4f1d9955bc0f0df4", 94631127},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::ES_ESP, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
#endif // ENABLE_SCI3_GAMES
#endif // ENABLE_SCI32
@@ -2307,7 +2340,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5159a1578c4306bfe070a3e4d8c2e1d3", 4741},
{"resource.000", 0, "1926925c95d82f0999590e93b02887c5", 15150768},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
// Mixed-Up Mother Goose Deluxe - Multilingual Windows CD (English/French/German/Spanish)
// Executable scanning reports "2.100.002"
@@ -2315,7 +2348,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "ef611af561898dcfea87846919ebf3eb", 4969},
{"ressci.000", 0, "227685bc59d90821978d330713e44a7a", 17205800},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
#endif // ENABLE_SCI32
// Ms. Astro Chicken - English DOS
@@ -2345,15 +2378,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.007", 0, "afbd16ea77869a720afa1c5371de107d", 7972},
//{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 25859038},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
-
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
+
// Phantasmagoria - English DOS Demo
// Executable scanning reports "2.100.002"
{"phantasmagoria", "Demo", {
{"resmap.001", 0, "416138651ea828219ca454cae18341a3", 11518},
{"ressci.001", 0, "3aae6559aa1df273bc542d5ac6330d75", 65844612},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
// Phantasmagoria - English DOS/Windows (GOG version) - ressci.* merged in ressci.000
// Windows executable scanning reports "2.100.002" - "Sep 19 1995 15:09:43"
@@ -2364,7 +2397,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "cd5967f9b9586e3380645961c0765be3", 116822037},
{"resmap.000", 0, "3cafc1c6a53945c1f3babbfd6380c64c", 16468},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Phantasmagoria - English Macintosh
// NOTE: This only contains disc 1 files (as well as the two persistent files:
@@ -2380,7 +2413,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
// Data8-12 are empty
{"Data13", 0, "6d2c450fca19a69b5af74ed5b03c0a17", 14923328},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK | ADGF_UNSTABLE, GUIO_NONE },
#ifdef ENABLE_SCI3_GAMES
// Phantasmagoria 2 - English Windows (from jvprat)
@@ -2397,7 +2430,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.005", 0, "8bd5ceeedcbe16dfe55d1b90dcd4be84", 1942},
{"ressci.005", 0, "05f9fe2bee749659acb3cd2c90252fc5", 67905112},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Phantasmagoria 2 - English DOS (GOG version) - ressci.* merged in ressci.000
// Executable scanning reports "3.000.000" - "Dec 07 1996 09:29:03"
@@ -2407,7 +2440,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "c54f26d9f43f908151263254b6d97053", 108134481},
{"resmap.000", 0, "de154a223a9ef4ea7358b76adc38ef5b", 2956},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
#endif // ENABLE_SCI3_GAMES
#endif // ENABLE_SCI32
@@ -2614,7 +2647,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, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Police Quest 4 - English DOS
// SCI interpreter version 2.000.000 (a guess?)
@@ -2622,7 +2655,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "aed9643158ccf01b71f359db33137f82", 9895},
{"resource.000", 0, "da383857b3be1e4514daeba2524359e0", 15141432},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Police Quest 4 - French DOS (supplied by abevi in bug report #2612718)
// SCI interpreter version 2.000.000
@@ -2630,7 +2663,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "008030846edcc7c5c7a812c7f4ae4ceb", 9256},
{"resource.000", 0, "6ba98bd2e436739d87ecd2a9b99cabb4", 14730153},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::FR_FRA, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Police Quest 4 - German DOS (supplied by markcoolio in bug report #2723840)
// SCI interpreter version 2.000.000 (a guess?)
@@ -2638,7 +2671,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2393ee728ab930b2762cb5889f9b5aff", 9256},
{"resource.000", 0, "6ba98bd2e436739d87ecd2a9b99cabb4", 14730155},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Police Quest: SWAT - English DOS/Windows Demo (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "0.001.200"
@@ -2646,7 +2679,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, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
// Police Quest: SWAT - English DOS (from GOG.com)
// Executable scanning reports "2.100.002", VERSION file reports "1.0c"
@@ -2654,7 +2687,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "1c2563fee189885e29d9348f37306d94", 12175},
{"ressci.000", 0, "b2e1826ca81ce2e7e764587f5a14eee9", 127149181},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NONE },
// Police Quest: SWAT - English Windows (from the Police Quest Collection)
// Executable scanning reports "2.100.002", VERSION file reports "1.0c"
@@ -2669,7 +2702,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.004", 0, "4228038906f041623e65789500b22285", 6835},
{"ressci.004", 0, "b7e619e6ecf62fe65d5116a3a422e5f0", 46223872},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NONE },
#endif // ENABLE_SCI32
// Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy (supplied by merkur in bug report #2718784)
@@ -2980,7 +3013,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "685bdb1ed47bbbb0e5e25db392da83ce", 9301},
{"resource.000", 0, "f64fd6aa3977939a86ff30783dd677e1", 11004993},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Quest for Glory 4 1.1 Floppy - English DOS (supplied by abevi in bug report #2612718)
// SCI interpreter version 2.000.000
@@ -2988,7 +3021,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "d10a4cc177d2091d744e2ad8c049b0ae", 9295},
{"resource.000", 0, "f64fd6aa3977939a86ff30783dd677e1", 11003589},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// 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"
@@ -2996,7 +3029,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301},
{"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Quest for Glory 4 CD - English DOS/Windows (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.0"
@@ -3004,7 +3037,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, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// RAMA - English DOS/Windows Demo
// Executable scanning reports "2.100.002", VERSION file reports "000.000.008"
@@ -3012,7 +3045,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.001", 0, "775304e9b2a545156be4d94209550094", 1393},
{"ressci.001", 0, "259437fd75fdf51e8207fda8c01fa4fd", 2334384},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NONE },
#ifdef ENABLE_SCI3_GAMES
// RAMA - English Windows (from jvprat)
@@ -3025,7 +3058,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.003", 0, "31ef4c0621711585d031f0ae81707251", 1636},
{"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6860492},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NONE },
// RAMA - English Windows (from Quietust, in bug report #2850645)
{"rama", "", {
@@ -3036,7 +3069,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.003", 0, "48841e4b84ef1b98b48d43566fda9e13", 1636},
{"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6870356},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NONE },
// RAMA - Italian Windows CD (from glorifindel)
// SCI interpreter version 3.000.000 (a guess?)
@@ -3044,7 +3077,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70611091},
{"resmap.001", 0, "70ba2ff04a2b7fb2c52420ba7fbd47c2", 8338},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE },
+ Common::IT_ITA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NONE },
#endif // ENABLE_SCI3_GAMES
// Shivers - English Windows (from jvprat)
@@ -3053,14 +3086,14 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "f2ead37749ed8f6535a2445a7d05a0cc", 46525},
{"ressci.000", 0, "4294c6d7510935f2e0a52e302073c951", 262654836},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NONE },
// Shivers - German Windows (from Tobis87)
{"shivers", "", {
{"resmap.000", 0, "f483d0a1f78334c18052e92785c3086e", 46537},
{"ressci.000", 0, "6751b144671e2deed919eb9d284b07eb", 262390692},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NONE },
+ Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NONE },
// Shivers - English Windows Demo
// Executable scanning reports "2.100.002"
@@ -3068,7 +3101,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "d9e0bc5eddefcbe47f528760085d8927", 1186},
{"ressci.000", 0, "3a93c6340b54e07e65d0e5583354d186", 10505469},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NONE },
// Shivers 2 doesn't contain SCI scripts. The whole game logic has
// been reimplemented from SCI in native code placed in DLL files.
@@ -3086,7 +3119,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "d8659188b84beaef076bd869837cd530", 634},
{"ressci.000", 0, "7fbac0807a044c9543e8ac376d200e59", 4925003},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NONE },
// Shivers 2 - English Windows (from abevi)
// VERSION.TXT Version 1.0 (3/25/97)
@@ -3094,7 +3127,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.001", 0, "a79d03d6eb75be0a79324f14e3d2ace4", 95346793},
{"resmap.001", 0, "a4804d436d90c4ec2e46b537f5e954db", 6268},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
#endif
@@ -3117,6 +3150,15 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+
+ // Slater & Charlie Go Camping - English DOS/Windows (Sierra Originals)
+ {"slater", "", {
+ {"resource.000", 0, "d7b4cc8e2c0b3a4768f8dfb5de27f206", 2256126},
+ {"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044},
+ {"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132},
+ AD_LISTEND},
+ Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH },
+
// Space Quest 1 VGA Remake - English Amiga (from www.back2roots.org)
// SCI interpreter version 1.000.510 (just a guess)
{"sq1sci", "SCI", {
@@ -3479,7 +3521,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
// Space Quest 4 - English Macintosh
// Executable scanning reports "x.yyy.zzz"
- // VERSION file reports "1.148"
+ // VERSION file reports "1.148"
{"sq4", "", {
{"resource.map", 0, "6ffc6f76c4127d140759a512ab9a07be", 6042},
{"resource.000", 0, "6a538b389705232cf9b2d7de2cf9c0a7", 224833},
@@ -3572,7 +3614,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "6dddfa3a8f3a3a513ec9dfdfae955005", 10528},
{"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Space Quest 6 - English DOS/Win3.11 CD ver 1.11 (from FRG)
// SCI interpreter version 2.100.002 (just a guess)
@@ -3580,7 +3622,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e0615d6e4e10e37ae42e6a2a95aaf145", 10528},
{"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// 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"
@@ -3588,7 +3630,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "3c831625931d5079b73ae8c275f52c95", 10534},
{"resource.000", 0, "4195ca940f759424f62b90e262cc1737", 40932397},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::FR_FRA, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Space Quest 6 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723884)
// SCI interpreter version 2.100.002 (just a guess)
@@ -3596,7 +3638,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "664d797415484f85c90b1b45aedc7686", 10534},
{"resource.000", 0, "ba87ba91e5bdabb4169dd0df75777722", 40933685},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE },
+ Common::DE_DEU, Common::kPlatformPC, ADGF_CD | ADGF_UNSTABLE, GUIO_NONE },
// Space Quest 6 - English DOS/Win3.11 Interactive Demo (from FRG)
// SCI interpreter version 2.100.002 (just a guess)
@@ -3604,7 +3646,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, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
#endif // ENABLE_SCI32
// The Island of Dr. Brain - English DOS CD (from jvprat)
@@ -3638,7 +3680,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "9a3e172cde9963d0a969f26469318cec", 3403},
{"ressci.000", 0, "db3e290481c35c3224e9602e71e4a1f1", 5073868},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_UNSTABLE, GUIO_NOSPEECH },
// Torin's Passage - English Windows
// SCI interpreter version 2.100.002 (just a guess)
@@ -3646,7 +3688,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Torin's Passage - Spanish Windows (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.0"
@@ -3655,7 +3697,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
// TODO: depend on one of the patches?
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::ES_ESP, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Torin's Passage - French Windows
// SCI interpreter version 2.100.002 (just a guess)
@@ -3663,7 +3705,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::FR_FRA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Torin's Passage - German Windows
// SCI interpreter version 2.100.002 (just a guess)
@@ -3671,7 +3713,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NOSPEECH },
+ Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NOSPEECH },
// Torin's Passage - Italian Windows CD (from glorifindel)
// SCI interpreter version 2.100.002 (just a guess)
@@ -3679,7 +3721,7 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE },
+ Common::IT_ITA, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO_NONE },
#endif // ENABLE_SCI32
// SCI Fanmade Games
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 07ba626d15..4592c5be9c 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -75,7 +75,7 @@ public:
* @return Message function type, SCI_VERSION_1_LATE / SCI_VERSION_1_1
*/
SciVersion detectMessageFunctionType();
-
+
#ifdef ENABLE_SCI32
/**
* Autodetects the kernel functions used in SCI2.1
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 68b1601580..ff3c67c84b 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -272,7 +272,7 @@ private:
// Kernel-related lists
Common::StringArray _selectorNames;
Common::StringArray _kernelNames;
-
+
const Common::String _invalid;
};
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 31ef64d109..0c5d4e680d 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -558,16 +558,16 @@ static SciKernelMapEntry s_kernelMap[] = {
// SetWindowsOption is used to set Windows specific options, like for example the title bar visibility of
// the game window in Phantasmagoria 2. We ignore these settings completely.
{ MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL },
-
+
// Used by the Windows version of Phantasmagoria 1 to get the video speed setting. This is called after
- // kGetConfig and overrides the setting obtained by it. It is a dummy function in the DOS Version. We can
+ // kGetConfig and overrides the setting obtained by it. It is a dummy function in the DOS Version. We can
// just use GetConfig and mark this one as empty, like the DOS version does.
{ MAP_EMPTY(GetSierraProfileInt), SIG_EVERYWHERE, "(.*)", NULL, NULL },
// Unused / debug SCI2.1 unused functions, always mapped to kDummy
// The debug functions are called from the inbuilt debugger or polygon
- // editor in SCI2.1 games. Related objects are: PEditor, EditablePolygon,
+ // editor in SCI2.1 games. Related objects are: PEditor, EditablePolygon,
// aeDisplayClass and scalerCode
{ MAP_DUMMY(FindSelector), SIG_EVERYWHERE, "(.*)", NULL, NULL },
{ MAP_DUMMY(FindClass), SIG_EVERYWHERE, "(.*)", NULL, NULL },
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index 2cd6b198de..df3b3efd57 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -194,7 +194,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) {
// Wait a bit here, so that the CPU isn't maxed out when the game
// is waiting for user input (e.g. when showing text boxes) - bug
// #3037874. Make sure that we're not delaying while the game is
- // benchmarking, as that will affect the final benchmarked result -
+ // benchmarking, as that will affect the final benchmarked result -
// check bugs #3058865 and #3127824
if (s->_gameIsBenchmarking) {
// Game is benchmarking, don't add a delay
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index e1e52215d2..1bd6754ca5 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -208,7 +208,7 @@ reg_t kFClose(EngineState *s, int argc, reg_t *argv) {
reg_t kFPuts(EngineState *s, int argc, reg_t *argv) {
int handle = argv[0].toUint16();
Common::String data = s->_segMan->getString(argv[1]);
-
+
FileHandle *f = getFileFromHandle(s, handle);
if (f)
f->_out->write(data.c_str(), data.size());
@@ -812,7 +812,7 @@ reg_t kFileIOReadRaw(EngineState *s, int argc, reg_t *argv) {
int bytesRead = 0;
char *buf = new char[size];
debugC(kDebugLevelFile, "kFileIO(readRaw): %d, %d", handle, size);
-
+
FileHandle *f = getFileFromHandle(s, handle);
if (f) {
bytesRead = f->_in->read(buf, size);
@@ -910,7 +910,7 @@ reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) {
int offset = argv[1].toUint16();
int whence = argv[2].toUint16();
debugC(kDebugLevelFile, "kFileIO(seek): %d, %d, %d", handle, offset, whence);
-
+
FileHandle *f = getFileFromHandle(s, handle);
if (f)
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 6c96266922..36de767464 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -151,7 +151,7 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) {
case 2:
pos.y = argv[1].toSint16();
pos.x = argv[0].toSint16();
-
+
g_sci->_gfxCursor->kernelSetPos(pos);
break;
case 4: {
@@ -192,7 +192,7 @@ static reg_t kSetCursorSci11(EngineState *s, int argc, reg_t *argv) {
break;
case 10:
// Freddy pharkas, when using the whiskey glass to read the prescription (bug #3034973)
- g_sci->_gfxCursor->kernelSetZoomZone(argv[0].toUint16(),
+ g_sci->_gfxCursor->kernelSetZoomZone(argv[0].toUint16(),
Common::Rect(argv[1].toUint16(), argv[2].toUint16(), argv[3].toUint16(), argv[4].toUint16()),
argv[5].toUint16(), argv[6].toUint16(), argv[7].toUint16(),
argv[8].toUint16(), argv[9].toUint16());
@@ -428,7 +428,7 @@ reg_t kCanBeHere(EngineState *s, int argc, reg_t *argv) {
reg_t kCantBeHere(EngineState *s, int argc, reg_t *argv) {
reg_t curObject = argv[0];
reg_t listReference = (argc > 1) ? argv[1] : NULL_REG;
-
+
reg_t canBeHere = g_sci->_gfxCompare->kernelCanBeHere(curObject, listReference);
return canBeHere;
}
@@ -1279,7 +1279,7 @@ reg_t kCantBeHere32(EngineState *s, int argc, reg_t *argv) {
// TODO
// reg_t curObject = argv[0];
// reg_t listReference = (argc > 1) ? argv[1] : NULL_REG;
-
+
return NULL_REG;
}
@@ -1642,8 +1642,8 @@ reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv) {
reg_t kSetFontRes(EngineState *s, int argc, reg_t *argv) {
// TODO: This defines the resolution that the fonts are supposed to be displayed
// in. Currently, this is only used for showing high-res fonts in GK1 Mac, but
- // should be extended to handle other font resolutions such as those
-
+ // should be extended to handle other font resolutions such as those
+
int xResolution = argv[0].toUint16();
//int yResolution = argv[1].toUint16();
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index daed248db1..e6837242e4 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -75,11 +75,11 @@ reg_t kGameIsRestarting(EngineState *s, int argc, reg_t *argv) {
}
break;
case GID_SQ4:
- // In SQ4 (floppy and CD) the sequel police appear way too quickly in
+ // In SQ4 (floppy and CD) the sequel police appear way too quickly in
// the Skate-o-rama rooms, resulting in all sorts of timer issues, like
// #3109139 (which occurs because a police officer instantly teleports
// just before Roger exits and shoots him). We throttle these scenes a
- // bit more, in order to prevent timer bugs related to the sequel police
+ // bit more, in order to prevent timer bugs related to the sequel police
if (s->currentRoomNumber() == 405 || s->currentRoomNumber() == 406 ||
s->currentRoomNumber() == 410 || s->currentRoomNumber() == 411) {
s->_throttleTrigger = true;
@@ -186,7 +186,7 @@ reg_t kSetDebug(EngineState *s, int argc, reg_t *argv) {
if (g_sci->getGameId() != GID_GK1) {
debug("Debug mode activated");
-
+
g_sci->getDebugger()->attach();
}
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 31715f19d3..14f7db47a0 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -239,7 +239,7 @@ reg_t kInitBresen(EngineState *s, int argc, reg_t *argv) {
client_step--;
if (!client_step)
- error("kInitBresen failed");
+ error("kInitBresen failed");
client_xStep--;
}
@@ -440,7 +440,7 @@ reg_t kDoAvoider(EngineState *s, int argc, reg_t *argv) {
invokeSelector(s, clientLooper, SELECTOR(doit), argc, argv, 2, params);
}
s->r_acc = SIGNAL_REG;
-
+
} else {
// is blocked
if (avoiderHeading == -1)
diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 8904a48978..375aeaa06b 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1110,7 +1110,7 @@ static Polygon *convert_polygon(EngineState *s, reg_t polygon) {
// Make sure that we have enough points
if (pointList.maxSize < size * POLY_POINT_SIZE) {
warning("convert_polygon: Not enough memory allocated for polygon points. "
- "Expected %d, got %d. Skipping polygon",
+ "Expected %d, got %d. Skipping polygon",
size * POLY_POINT_SIZE, pointList.maxSize);
return NULL;
}
@@ -1202,7 +1202,7 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
change_polygons_opt_0(pf_s);
Common::Point *new_start = fixup_start_point(pf_s, start);
-
+
if (!new_start) {
warning("AvoidPath: Couldn't fixup start position for pathfinding");
delete pf_s;
@@ -1210,7 +1210,7 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co
}
Common::Point *new_end = fixup_end_point(pf_s, end);
-
+
if (!new_end) {
warning("AvoidPath: Couldn't fixup end position for pathfinding");
delete new_start;
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index d83254b2c4..93c1fffe3c 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -163,7 +163,7 @@ reg_t kClone(EngineState *s, int argc, reg_t *argv) {
// extend the internal storage size.
if (infoSelector & kInfoFlagClone)
parentObj = s->_segMan->getObject(parentAddr);
-
+
*cloneObj = *parentObj;
// Mark as clone
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index c3c10bd2a2..b383f88840 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -238,14 +238,14 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
/* int writelength; -- unused atm */
- if (xfer && (isdigit(xfer) || xfer == '-' || xfer == '=')) {
+ if (xfer && (isdigit(static_cast<unsigned char>(xfer)) || xfer == '-' || xfer == '=')) {
char *destp;
if (xfer == '0')
fillchar = '0';
else if (xfer == '=')
align = ALIGN_CENTER;
- else if (isdigit(xfer) || (xfer == '-'))
+ else if (isdigit(static_cast<unsigned char>(xfer)) || (xfer == '-'))
source--; // Go to start of length argument
str_leng = strtol(source, &destp, 10);
@@ -336,8 +336,9 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
if (align >= 0)
while (str_leng-- > 1)
*target++ = ' '; /* Format into the text */
-
- *target++ = arguments[paramindex++];
+ char argchar = arguments[paramindex++];
+ if (argchar)
+ *target++ = argchar;
mode = 0;
}
break;
@@ -427,7 +428,7 @@ reg_t kGetFarText(EngineState *s, int argc, reg_t *argv) {
}
seeker = (char *)textres->data;
-
+
// The second parameter (counter) determines the number of the string
// inside the text resource.
while (counter--) {
@@ -715,7 +716,7 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) {
// triggers an assert when doing string2[i + index2].
for (uint16 i = 0; i < count; i++)
string1->setValue(i + index1, string2[i + index2]);
-
+
return strAddress;
}
case 7: { // Cmp
@@ -730,6 +731,10 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) {
case 8: { // Dup
const char *rawString = 0;
uint32 size = 0;
+ reg_t stringHandle;
+ // We allocate the new string first because if the StringTable needs to
+ // grow, our rawString pointer will be invalidated
+ SciString *dupString = s->_segMan->allocateString(&stringHandle);
if (argv[1].segment == s->_segMan->getStringSegmentId()) {
SciString *string = s->_segMan->lookupString(argv[1]);
@@ -741,8 +746,6 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) {
size = string.size() + 1;
}
- reg_t stringHandle;
- SciString *dupString = s->_segMan->allocateString(&stringHandle);
dupString->setSize(size);
for (uint32 i = 0; i < size; i++)
@@ -781,14 +784,14 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) {
return NULL_REG;
case 15: { // upper
Common::String string = s->_segMan->getString(argv[1]);
-
+
string.toUppercase();
s->_segMan->strcpy(argv[1], string.c_str());
return NULL_REG;
}
case 16: { // lower
Common::String string = s->_segMan->getString(argv[1]);
-
+
string.toLowercase();
s->_segMan->strcpy(argv[1], string.c_str());
return NULL_REG;
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 9a60f39c85..6d810d516c 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -65,7 +65,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) {
scaleBuffer = new byte[width * height * bytesPerPixel];
}
- uint16 x, y;
+ uint16 x, y;
// Sanity check...
if (videoState.x > 0 && videoState.y > 0 && isVMD) {
@@ -94,7 +94,7 @@ void playVideo(Video::VideoDecoder *videoDecoder, VideoState videoState) {
if (frame) {
if (scaleBuffer) {
- // TODO: Probably should do aspect ratio correction in e.g. GK1 Windows
+ // TODO: Probably should do aspect ratio correction in e.g. GK1 Windows
g_sci->_gfxScreen->scale2x((byte *)frame->pixels, scaleBuffer, videoDecoder->getWidth(), videoDecoder->getHeight(), bytesPerPixel);
g_system->copyRectToScreen(scaleBuffer, pitch, x, y, width, height);
} else {
@@ -130,7 +130,7 @@ reg_t kShowMovie(EngineState *s, int argc, reg_t *argv) {
uint16 screenWidth = g_system->getWidth();
uint16 screenHeight = g_system->getHeight();
-
+
Video::VideoDecoder *videoDecoder = 0;
if (argv[0].segment != 0) {
diff --git a/engines/sci/engine/object.cpp b/engines/sci/engine/object.cpp
index f09f18298a..a1854a2723 100644
--- a/engines/sci/engine/object.cpp
+++ b/engines/sci/engine/object.cpp
@@ -259,13 +259,13 @@ void Object::initSelectorsSci3(const byte *buf) {
// two selectors are always reserved (because their storage
// space is used by the typeMask).
// We don't know beforehand how many methods and properties
- // there are, so we count them first.
+ // there are, so we count them first.
for (int groupNr = 0; groupNr < groups; ++groupNr) {
byte groupLocation = groupInfo[groupNr];
const byte *seeker = selectorBase + groupLocation * 32 * 2;
if (groupLocation != 0) {
- // This object actually has selectors belonging to this group
+ // This object actually has selectors belonging to this group
int typeMask = READ_SCI11ENDIAN_UINT32(seeker);
for (int bit = 2; bit < 32; ++bit) {
@@ -277,7 +277,7 @@ void Object::initSelectorsSci3(const byte *buf) {
} else {
// Undefined selector
}
-
+
}
}
}
@@ -296,7 +296,7 @@ void Object::initSelectorsSci3(const byte *buf) {
const byte *seeker = selectorBase + groupLocation * 32 * 2;
if (groupLocation != 0) {
- // This object actually has selectors belonging to this group
+ // This object actually has selectors belonging to this group
int typeMask = READ_SCI11ENDIAN_UINT32(seeker);
int groupBaseId = groupNr * 32;
@@ -323,7 +323,7 @@ void Object::initSelectorsSci3(const byte *buf) {
} else {
// Undefined selector
}
-
+
}
}
}
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index 80c8e9e83d..0ca16b48a2 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -79,7 +79,7 @@ public:
}
reg_t getSpeciesSelector() const {
- if (getSciVersion() <= SCI_VERSION_2_1)
+ if (getSciVersion() <= SCI_VERSION_2_1)
return _variables[_offset];
else // SCI3
return _speciesSelectorSci3;
@@ -93,7 +93,7 @@ public:
}
reg_t getSuperClassSelector() const {
- if (getSciVersion() <= SCI_VERSION_2_1)
+ if (getSciVersion() <= SCI_VERSION_2_1)
return _variables[_offset + 1];
else // SCI3
return _superClassPosSci3;
diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h
index fbd77eb076..1d899b0d37 100644
--- a/engines/sci/engine/savegame.h
+++ b/engines/sci/engine/savegame.h
@@ -51,7 +51,7 @@ struct EngineState;
* 19 - exportsAreWide
* 18 - SCI32 arrays/strings
* 17 - sound
- *
+ *
*/
enum {
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index a38aa06bc4..01e1afe5ea 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -160,7 +160,7 @@ void Script::load(ResourceManager *resMan) {
_numExports = 0;
_synonyms = 0;
_numSynonyms = 0;
-
+
if (getSciVersion() <= SCI_VERSION_1_LATE) {
_exportTable = (const uint16 *)findBlockSCI0(SCI_OBJ_EXPORTS);
if (_exportTable) {
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 2d3d8f6155..a714980a35 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -209,7 +209,7 @@ const byte ecoquest2SignatureEcorderTutorial[] = {
const uint16 ecoquest2PatchEcorderTutorial[] = {
0x31, 0x23, // bnt [next state] (save 1 byte)
- // The parameter count below should be 7, but we're out of bytes
+ // The parameter count below should be 7, but we're out of bytes
// to patch! A workaround has been added because of this
0x78, // push1 (parameter count)
//0x39, 0x07, // pushi 07 (parameter count)
@@ -221,7 +221,7 @@ const uint16 ecoquest2PatchEcorderTutorial[] = {
0x78, // push1 (visual screen)
0x39, 0x17, // pushi 17 (color)
0x43, 0x6c, 0x0e, // call kGraph
- // The parameter count below should be 5, but we're out of bytes
+ // The parameter count below should be 5, but we're out of bytes
// to patch! A workaround has been added because of this
0x78, // push1 (parameter count)
//0x39, 0x05, // pushi 05 (parameter count)
@@ -697,7 +697,7 @@ const SciScriptSignature laurabow2Signatures[] = {
// ===========================================================================
// Mother Goose SCI1/SCI1.1
-// MG::replay somewhat calculates the savedgame-id used when saving again
+// MG::replay somewhat calculates the savedgame-id used when saving again
// this doesn't work right and we remove the code completely.
// We set the savedgame-id directly right after restoring in kRestoreGame.
const byte mothergoose256SignatureReplay[] = {
@@ -1034,7 +1034,7 @@ const uint16 sq1vgaPatchEgoShowsCard[] = {
// script, description, magic DWORD, adjust
const SciScriptSignature sq1vgaSignatures[] = {
- { 58, "Sarien armory droid zapping ego first time", 1, PATCH_MAGICDWORD( 0x72, 0x88, 0x15, 0x36 ), -70,
+ { 58, "Sarien armory droid zapping ego first time", 1, PATCH_MAGICDWORD( 0x72, 0x88, 0x15, 0x36 ), -70,
sq1vgaSignatureEgoShowsCard, sq1vgaPatchEgoShowsCard },
SCI_SIGNATUREENTRY_TERMINATOR};
@@ -1087,7 +1087,7 @@ void Script::applyPatch(const uint16 *patch, byte *scriptData, const uint32 scri
}
patch++;
patchWord = *patch;
- }
+ }
}
// will return -1 if no match was found, otherwise an offset to the start of the signature match
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 957930784b..3a18fbc68f 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -72,7 +72,7 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
const byte *scr;
int scr_size;
reg_t retval = make_reg(pos.segment, pos.offset + 1);
- uint16 param_value = 0xffff; // Suppress GCC warning by setting default value, chose value as invalid to getKernelName etc.
+ uint16 param_value = 0xffff; // Suppress GCC warning by setting default value, chose value as invalid to getKernelName etc.
int i = 0;
Kernel *kernel = g_sci->getKernel();
@@ -617,8 +617,8 @@ void debugSelectorCall(reg_t send_obj, Selector selector, int argc, StackPtr arg
Console *con = g_sci->getSciDebugger();
#ifdef VM_DEBUG_SEND
- debugN("Send to %04x:%04x (%s), selector %04x (%s):", PRINT_REG(send_obj),
- s->_segMan->getObjectName(send_obj), selector,
+ debugN("Send to %04x:%04x (%s), selector %04x (%s):", PRINT_REG(send_obj),
+ s->_segMan->getObjectName(send_obj), selector,
g_sci->getKernel()->getSelectorName(selector).c_str());
#endif // VM_DEBUG_SEND
@@ -644,18 +644,18 @@ void debugSelectorCall(reg_t send_obj, Selector selector, int argc, StackPtr arg
reg_t selectorValue = *varp.getPointer(segMan);
if (!argc && (activeBreakpointTypes & BREAK_SELECTORREAD)) {
if (g_sci->checkSelectorBreakpoint(BREAK_SELECTORREAD, send_obj, selector))
- con->DebugPrintf("Read from selector (%s:%s): %04x:%04x\n",
+ con->DebugPrintf("Read from selector (%s:%s): %04x:%04x\n",
objectName, selectorName,
PRINT_REG(selectorValue));
} else if (argc && (activeBreakpointTypes & BREAK_SELECTORWRITE)) {
if (g_sci->checkSelectorBreakpoint(BREAK_SELECTORWRITE, send_obj, selector))
- con->DebugPrintf("Write to selector (%s:%s): change %04x:%04x to %04x:%04x\n",
+ con->DebugPrintf("Write to selector (%s:%s): change %04x:%04x to %04x:%04x\n",
objectName, selectorName,
PRINT_REG(selectorValue), PRINT_REG(argp[1]));
}
if (argc > 1)
- debug(kDebugLevelScripts, "Write to selector (%s:%s): change %04x:%04x to %04x:%04x, argc == %d\n",
+ debug(kDebugLevelScripts, "Write to selector (%s:%s): change %04x:%04x to %04x:%04x, argc == %d\n",
objectName, selectorName,
PRINT_REG(selectorValue), PRINT_REG(argp[1]), argc);
}
diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp
index 5d8a81a7f1..3f11d6ff49 100644
--- a/engines/sci/engine/segment.cpp
+++ b/engines/sci/engine/segment.cpp
@@ -255,7 +255,7 @@ SegmentRef ArrayTable::dereference(reg_t pointer) {
return ret;
}
-void ArrayTable::freeAtAddress(SegManager *segMan, reg_t sub_addr) {
+void ArrayTable::freeAtAddress(SegManager *segMan, reg_t sub_addr) {
_table[sub_addr.offset].destroy();
freeEntry(sub_addr.offset);
}
diff --git a/engines/sci/engine/selector.cpp b/engines/sci/engine/selector.cpp
index 2edbea9676..c2f857f319 100644
--- a/engines/sci/engine/selector.cpp
+++ b/engines/sci/engine/selector.cpp
@@ -212,7 +212,7 @@ void writeSelector(SegManager *segMan, reg_t object, Selector selectorId, reg_t
*address.getPointer(segMan) = value;
}
-void invokeSelector(EngineState *s, reg_t object, int selectorId,
+void invokeSelector(EngineState *s, reg_t object, int selectorId,
int k_argc, StackPtr k_argp, int argc, const reg_t *argv) {
int i;
int framesize = 2 + 1 * argc;
diff --git a/engines/sci/engine/selector.h b/engines/sci/engine/selector.h
index f13c13e00c..085dd6e832 100644
--- a/engines/sci/engine/selector.h
+++ b/engines/sci/engine/selector.h
@@ -185,7 +185,7 @@ void writeSelector(SegManager *segMan, reg_t object, Selector selectorId, reg_t
/**
* Invokes a selector from an object.
*/
-void invokeSelector(EngineState *s, reg_t object, int selectorId,
+void invokeSelector(EngineState *s, reg_t object, int selectorId,
int k_argc, StackPtr k_argp, int argc = 0, const reg_t *argv = 0);
} // End of namespace Sci
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 3328f80de1..4ea9f72054 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -144,7 +144,7 @@ void EngineState::wait(int16 ticks) {
void EngineState::initGlobals() {
Script *script_000 = _segMan->getScript(1);
-
+
if (!script_000->_localsBlock)
error("Script 0 has no locals block");
@@ -331,7 +331,7 @@ void SciEngine::checkVocabularySwitch() {
uint16 parserLanguage = 1;
if (SELECTOR(parseLang) != -1)
parserLanguage = readSelectorValue(_gamestate->_segMan, _gameObjectAddress, SELECTOR(parseLang));
-
+
if (parserLanguage != _vocabularyLanguage) {
delete _vocabulary;
_vocabulary = new Vocabulary(_resMan, parserLanguage > 1 ? true : false);
diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp
index 6526eff2db..cca4c47be8 100644
--- a/engines/sci/engine/static_selectors.cpp
+++ b/engines/sci/engine/static_selectors.cpp
@@ -96,7 +96,7 @@ static const char * const sci2Selectors[] = {
"center", "all", "show", "textLeft", "textTop", // 115 - 119
"textRight", "textBottom", "borderColor", "titleFore", "titleBack", // 120 - 124
"titleFont", "dimmed", "frameOut", "lastKey", "magnifier", // 125 - 129
- "magPower", "mirrored", "pitch", "roll", "yaw", // 130 - 134
+ "magPower", "mirrored", "pitch", "roll", "yaw", // 130 - 134
"left", "right", "top", "bottom", "numLines" // 135 - 139
};
#endif
@@ -265,8 +265,8 @@ void Kernel::findSpecificSelectors(Common::StringArray &selectorNames) {
if (targetClass) {
if (classReferences[i].selectorType == kSelectorMethod) {
if (targetClass->getMethodCount() < selectorOffset + 1)
- error("The %s class has less than %d methods (%d)",
- classReferences[i].className, selectorOffset + 1,
+ error("The %s class has less than %d methods (%d)",
+ classReferences[i].className, selectorOffset + 1,
targetClass->getMethodCount());
targetSelectorPos = targetClass->getFuncSelector(selectorOffset);
@@ -275,7 +275,7 @@ void Kernel::findSpecificSelectors(Common::StringArray &selectorNames) {
selectorOffset += (getSciVersion() <= SCI_VERSION_1_LATE) ? 3 : 8;
if (targetClass->getVarCount() < selectorOffset + 1)
- error("The %s class has less than %d variables (%d)",
+ error("The %s class has less than %d variables (%d)",
classReferences[i].className, selectorOffset + 1,
targetClass->getVarCount());
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 1517355365..274b0bbbc9 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -42,7 +42,7 @@ const reg_t NULL_REG = {0, 0};
const reg_t SIGNAL_REG = {0, SIGNAL_OFFSET};
const reg_t TRUE_REG = {0, 1};
//#define VM_DEBUG_SEND
-// Enable the define below to have the VM abort on cases where a conditional
+// Enable the define below to have the VM abort on cases where a conditional
// statement is followed by an unconditional jump (which will most likely lead
// to an infinite loop). Aids in detecting script bugs such as #3040722.
//#define ABORT_ON_INFINITE_LOOP
@@ -130,14 +130,14 @@ static reg_t read_var(EngineState *s, int type, int index) {
if (solution.type == WORKAROUND_NONE) {
#ifdef RELEASE_BUILD
// If we are running an official ScummVM release -> fake 0 in unknown cases
- warning("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)",
+ warning("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)",
index, originReply.objectName.c_str(), originReply.methodName.c_str(), s->currentRoomNumber(),
originReply.scriptNr, originReply.localCallOffset);
s->variables[type][index] = NULL_REG;
break;
#else
- error("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)",
+ error("Uninitialized read for temp %d from method %s::%s (room %d, script %d, localCall %x)",
index, originReply.objectName.c_str(), originReply.methodName.c_str(), s->currentRoomNumber(),
originReply.scriptNr, originReply.localCallOffset);
#endif
@@ -366,8 +366,8 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) {
switch (solution.type) {
case WORKAROUND_NONE:
kernel->signatureDebug(kernelCall.signature, argc, argv);
- error("[VM] k%s[%x]: signature mismatch via method %s::%s (room %d, script %d, localCall 0x%x)",
- kernelCall.name, kernelCallNr, originReply.objectName.c_str(), originReply.methodName.c_str(),
+ error("[VM] k%s[%x]: signature mismatch via method %s::%s (room %d, script %d, localCall 0x%x)",
+ kernelCall.name, kernelCallNr, originReply.objectName.c_str(), originReply.methodName.c_str(),
s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset);
break;
case WORKAROUND_IGNORE: // don't do kernel call, leave acc alone
@@ -418,12 +418,12 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) {
int callNameLen = strlen(kernelCall.name);
if (strncmp(kernelCall.name, kernelSubCall.name, callNameLen) == 0) {
const char *subCallName = kernelSubCall.name + callNameLen;
- error("[VM] k%s(%s): signature mismatch via method %s::%s (room %d, script %d, localCall %x)",
- kernelCall.name, subCallName, originReply.objectName.c_str(), originReply.methodName.c_str(),
+ error("[VM] k%s(%s): signature mismatch via method %s::%s (room %d, script %d, localCall %x)",
+ kernelCall.name, subCallName, originReply.objectName.c_str(), originReply.methodName.c_str(),
s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset);
}
- error("[VM] k%s: signature mismatch via method %s::%s (room %d, script %d, localCall %x)",
- kernelSubCall.name, originReply.objectName.c_str(), originReply.methodName.c_str(),
+ error("[VM] k%s: signature mismatch via method %s::%s (room %d, script %d, localCall %x)",
+ kernelSubCall.name, originReply.objectName.c_str(), originReply.methodName.c_str(),
s->currentRoomNumber(), originReply.scriptNr, originReply.localCallOffset);
break;
}
@@ -462,7 +462,7 @@ int readPMachineInstruction(const byte *src, byte &extOpcode, int16 opparams[4])
extOpcode = src[offset++]; // Get "extended" opcode (lower bit has special meaning)
const byte opcode = extOpcode >> 1; // get the actual opcode
- memset(opparams, 0, sizeof(opparams));
+ memset(opparams, 0, 4*sizeof(int16));
for (int i = 0; g_opcode_formats[opcode][i]; ++i) {
//debugN("Opcode: 0x%x, Opnumber: 0x%x, temp: %d\n", opcode, opcode, temp);
@@ -828,10 +828,10 @@ void run_vm(EngineState *s) {
uint16 localCallOffset = s->xs->addr.pc.offset + opparams[0];
- ExecStack xstack(s->xs->objp, s->xs->objp, s->xs->sp,
+ ExecStack xstack(s->xs->objp, s->xs->objp, s->xs->sp,
(call_base->requireUint16()) + s->r_rest, call_base,
s->xs->local_segment, make_reg(s->xs->addr.pc.segment, localCallOffset),
- NULL_SELECTOR, -1, localCallOffset, s->_executionStack.size() - 1,
+ NULL_SELECTOR, -1, localCallOffset, s->_executionStack.size() - 1,
EXEC_STACK_TYPE_CALL);
s->_executionStack.push_back(xstack);
diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp
index e39c7708ad..b95fd58129 100644
--- a/engines/sci/engine/vm_types.cpp
+++ b/engines/sci/engine/vm_types.cpp
@@ -32,8 +32,8 @@ reg_t reg_t::lookForWorkaround(const reg_t right) const {
SciTrackOriginReply originReply;
SciWorkaroundSolution solution = trackOriginAndFindWorkaround(0, arithmeticWorkarounds, &originReply);
if (solution.type == WORKAROUND_NONE)
- error("Invalid arithmetic operation (params: %04x:%04x and %04x:%04x) from method %s::%s (room %d, script %d, localCall %x)",
- PRINT_REG(*this), PRINT_REG(right), originReply.objectName.c_str(),
+ error("Invalid arithmetic operation (params: %04x:%04x and %04x:%04x) from method %s::%s (room %d, script %d, localCall %x)",
+ PRINT_REG(*this), PRINT_REG(right), originReply.objectName.c_str(),
originReply.methodName.c_str(), g_sci->getEngineState()->currentRoomNumber(), originReply.scriptNr,
originReply.localCallOffset);
assert(solution.type == WORKAROUND_FAKE);
@@ -56,7 +56,7 @@ reg_t reg_t::operator+(const reg_t right) const {
return make_reg(segment, offset + right.toSint16());
default:
return lookForWorkaround(right);
- }
+ }
} else if (isNumber() && right.isPointer()) {
// Adding a pointer to a number, flip the order
return right + *this;
@@ -94,9 +94,9 @@ reg_t reg_t::operator/(const reg_t right) const {
reg_t reg_t::operator%(const reg_t right) const {
if (isNumber() && right.isNumber() && !right.isNull()) {
- // Support for negative numbers was added in Iceman, and perhaps in
+ // Support for negative numbers was added in Iceman, and perhaps in
// SCI0 0.000.685 and later. Theoretically, this wasn't really used
- // in SCI0, so the result is probably unpredictable. Such a case
+ // in SCI0, so the result is probably unpredictable. Such a case
// would indicate either a script bug, or a modulo on an unsigned
// integer larger than 32767. In any case, such a case should be
// investigated, instead of being silently accepted.
@@ -178,7 +178,7 @@ int reg_t::cmp(const reg_t right, bool treatAsUnsigned) const {
if (treatAsUnsigned || !isNumber())
return toUint16() - right.toUint16();
else
- return toSint16() - right.toSint16();
+ return toSint16() - right.toSint16();
} else if (pointerComparisonWithInteger(right)) {
return 1;
} else if (right.pointerComparisonWithInteger(*this)) {
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 464b4d8d5b..b2cde47f4a 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -77,6 +77,7 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_HOYLE4, 700, 700, 1, "BridgeHand", "calcQTS", -1, 3, { WORKAROUND_FAKE, 0 } }, // sometimes when placing a bid in bridge
{ GID_HOYLE4, 300, 300, 0, "", "export 2", 0x1d4d, 0, { WORKAROUND_FAKE, 0 } }, // after passing around cards in hearts
{ GID_HOYLE4, 400, 400, 1, "GinHand", "calcRuns", -1, 4, { WORKAROUND_FAKE, 0 } }, // sometimes while playing Gin Rummy (e.g. when knocking and placing a card) - bug #3292334
+ { GID_HOYLE4, 500, 17, 1, "Character", "say", -1, 504, { WORKAROUND_FAKE, 0 } }, // sometimes while playing Cribbage (e.g. when the opponent says "Last Card") - bug #3292327
{ GID_ISLANDBRAIN, 100, 937, 0, "IconBar", "dispatchEvent", -1, 58, { WORKAROUND_FAKE, 0 } }, // when using ENTER at the startup menu - bug #3045225
{ GID_ISLANDBRAIN, 140, 140, 0, "piece", "init", -1, 3, { WORKAROUND_FAKE, 1 } }, // first puzzle right at the start, some initialization variable. bnt is done on it, and it should be non-0
{ GID_ISLANDBRAIN, 200, 268, 0, "anElement", "select", -1, 0, { WORKAROUND_FAKE, 0 } }, // elements puzzle, gets used before super TextIcon
@@ -282,6 +283,8 @@ const SciWorkaroundEntry kGraphSaveBox_workarounds[] = {
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry kGraphRestoreBox_workarounds[] = {
+ { GID_LSL6, -1, 86, 0, "LL6Inv", "show", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // happens when restoring, is called with hunk segment, but hunk is not allocated at that time
+ // ^^ TODO: check, if this is really a script error or an issue with our restore code
{ GID_LSL6, -1, 86, 0, "LL6Inv", "hide", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // happens during the game, gets called with 1 extra parameter
{ GID_SQ5, 850, 850, 0, NULL, "changeState", -1, 0, { WORKAROUND_STILLCALL, 0 } }, // happens while playing Battle Cruiser (invalid segment) - bug #3056811
SCI_WORKAROUNDENTRY_TERMINATOR
@@ -447,7 +450,7 @@ SciWorkaroundSolution trackOriginAndFindWorkaround(int index, const SciWorkaroun
do {
workaround = workaroundList;
while (workaround->methodName) {
- bool objectNameMatches = (workaround->objectName == NULL) ||
+ bool objectNameMatches = (workaround->objectName == NULL) ||
(workaround->objectName == g_sci->getSciLanguageString(searchObjectName, K_LANG_ENGLISH));
// Special case: in the fanmade Russian translation of SQ4, all
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 74879f6c63..c14cfada07 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -261,7 +261,7 @@ SciEvent EventManager::getScummVMEvent() {
else if ((modifiers & Common::KBD_CTRL) && input.character > 0 && input.character < 27)
input.character += 96; // 0x01 -> 'a'
}
-
+
// If no actual key was pressed (e.g. if only a modifier key was pressed),
// ignore the event
if (!input.character)
@@ -277,7 +277,7 @@ void EventManager::updateScreen() {
if (g_system->getMillis() - s->_screenUpdateTime >= 1000 / 60) {
g_system->updateScreen();
s->_screenUpdateTime = g_system->getMillis();
- // Throttle the checking of shouldQuit() to 60fps as well, since
+ // Throttle the checking of shouldQuit() to 60fps as well, since
// Engine::shouldQuit() invokes 2 virtual functions
// (EventManager::shouldQuit() and EventManager::shouldRTL()),
// which is very expensive to invoke constantly without any
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index c36ecd112a..18f8511953 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -201,7 +201,7 @@ void GfxAnimate::fill(byte &old_picNotValid) {
adjustInvalidCels(view, it);
processViewScaling(view, it);
setNsRect(view, it);
-
+
//warning("%s view %d, loop %d, cel %d, signal %x", _s->_segMan->getObjectName(curObject), it->viewId, it->loopNo, it->celNo, it->signal);
// Calculate current priority according to y-coordinate
@@ -659,7 +659,7 @@ void GfxAnimate::throttleSpeed() {
// No entries drawn -> no speed throttler triggering
break;
case 1: {
-
+
// One entry drawn -> check if that entry was a speed benchmark view, if not enable speed throttler
AnimateEntry *onlyCast = &_lastCastData[0];
if ((onlyCast->viewId == 0) && (onlyCast->loopNo == 13) && (onlyCast->celNo == 0)) {
diff --git a/engines/sci/graphics/compare.h b/engines/sci/graphics/compare.h
index 83b4f49c08..bacb6e71e2 100644
--- a/engines/sci/graphics/compare.h
+++ b/engines/sci/graphics/compare.h
@@ -51,7 +51,7 @@ private:
GfxCoordAdjuster *_coordAdjuster;
uint16 isOnControl(uint16 screenMask, const Common::Rect &rect);
-
+
/**
* This function checks whether any of the objects in the given list,
* *different* from checkObject, has a brRect which is contained inside
diff --git a/engines/sci/graphics/coordadjuster.h b/engines/sci/graphics/coordadjuster.h
index 1b8a3e2679..23cf79d209 100644
--- a/engines/sci/graphics/coordadjuster.h
+++ b/engines/sci/graphics/coordadjuster.h
@@ -68,7 +68,7 @@ public:
void moveCursor(Common::Point &pos);
Common::Rect pictureGetDisplayArea();
-
+
private:
GfxPorts *_ports;
@@ -90,7 +90,7 @@ public:
void pictureSetDisplayArea(Common::Rect displayArea);
Common::Rect pictureGetDisplayArea();
-
+
private:
SegManager *_segMan;
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 913f680e99..673729784f 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -423,8 +423,8 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject, bool pauseSound) {
default:
while (itemIterator != itemEnd) {
itemEntry = *itemIterator;
- if (itemEntry->keyPress == keyPress &&
- itemEntry->keyModifier == keyModifier &&
+ if (itemEntry->keyPress == keyPress &&
+ itemEntry->keyModifier == keyModifier &&
itemEntry->enabled)
break;
itemIterator++;
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 899ef10b33..c5a3545701 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -71,7 +71,7 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen, bool useMergi
_macClut = 0;
loadMacIconBarPalette();
-
+
#ifdef ENABLE_SCI32
_clutTable = 0;
#endif
@@ -236,7 +236,7 @@ static byte blendColors(byte c1, byte c2) {
// return (c1/2+c2/2)+((c1&1)+(c2&1))/2;
// gamma 2.2
- double t = (pow(c1/255.0, 2.2/1.0) * 255.0) +
+ double t = (pow(c1/255.0, 2.2/1.0) * 255.0) +
(pow(c2/255.0, 2.2/1.0) * 255.0);
return (byte)(0.5 + (pow(0.5*t/255.0, 1.0/2.2) * 255.0));
}
@@ -378,7 +378,7 @@ bool GfxPalette::merge(Palette *newPalette, bool force, bool forceRealMerge) {
break;
}
}
-
+
// if still no luck - set an approximate color
if (j == 256) {
newPalette->mapping[i] = res & 0xFF;
@@ -991,7 +991,7 @@ void GfxPalette::unloadClut() {
delete[] _clutTable;
_clutTable = 0;
}
-
+
#endif
} // End of namespace Sci
diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h
index 9b0c45baf6..243420cc47 100644
--- a/engines/sci/graphics/palette.h
+++ b/engines/sci/graphics/palette.h
@@ -125,7 +125,7 @@ private:
void loadMacIconBarPalette();
byte *_macClut;
-
+
#ifdef ENABLE_SCI32
byte *_clutTable;
#endif
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index ce69ba8922..ecb54e89e8 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -357,7 +357,7 @@ void GfxPicture::drawCelData(byte *inbuffer, int size, int headerPos, int rlePos
curByte = *ptr++;
if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y)))
_screen->putPixel(x, y, drawMask, curByte, priority, 0);
-
+
if (x == leftX) {
ptr += sourcePixelSkipPerRow;
x = rightX;
@@ -515,7 +515,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
icemanDrawFix = true;
}
if (g_sci->getGameId() == GID_KQ5) {
- // WORKAROUND: ignore the seemingly broken priority of picture 48
+ // WORKAROUND: ignore the seemingly broken priority of picture 48
// (island overview). Fixes bug #3041044.
if (_resourceId == 48)
ignoreBrokenPriority = true;
@@ -551,7 +551,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
case PIC_OP_SET_PRIORITY:
pic_priority = data[curPos++] & 0x0F;
- if (isEGA)
+ if (isEGA)
pic_priority = EGApriority[pic_priority];
if (ignoreBrokenPriority)
pic_priority = 255;
diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp
index 9412976d5b..6b4c8180bf 100644
--- a/engines/sci/graphics/ports.cpp
+++ b/engines/sci/graphics/ports.cpp
@@ -721,7 +721,7 @@ void GfxPorts::printWindowList(Console *con) {
if ((*it)->isWindow()) {
Window *wnd = ((Window *)*it);
con->DebugPrintf("%d: '%s' at %d, %d, (%d, %d, %d, %d), drawn: %d, style: %d\n",
- wnd->id, wnd->title.c_str(), wnd->left, wnd->top,
+ wnd->id, wnd->title.c_str(), wnd->left, wnd->top,
wnd->rect.left, wnd->rect.top, wnd->rect.right, wnd->rect.bottom,
wnd->bDrawn, wnd->wndStyle);
}
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index 4ab0b9719f..dbe2135143 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -338,7 +338,7 @@ void GfxScreen::drawLine(Common::Point startPoint, Common::Point endPoint, byte
void GfxScreen::putKanjiChar(Graphics::FontSJIS *commonFont, int16 x, int16 y, uint16 chr, byte color) {
byte *displayPtr = _displayScreen + y * _displayWidth * 2 + x * 2;
// we don't use outline, so color 0 is actually not used
- commonFont->drawChar(displayPtr, chr, _displayWidth, 1, color, 0);
+ commonFont->drawChar(displayPtr, chr, _displayWidth, 1, color, 0, -1, -1);
}
byte GfxScreen::getVisual(int x, int y) {
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index c2f71a0e54..84547d9828 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -100,7 +100,7 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1
// cX -> sets textColor to _textColors[X-1]
curCode = textCode[0];
curCodeParm = textCode[1];
- if (isdigit(curCodeParm)) {
+ if (isdigit(static_cast<unsigned char>(curCodeParm))) {
curCodeParm -= '0';
} else {
curCodeParm = -1;
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp
index afb4c184e8..6ca4903e17 100644
--- a/engines/sci/graphics/view.cpp
+++ b/engines/sci/graphics/view.cpp
@@ -202,7 +202,7 @@ void GfxView::initData(GuiResourceId resourceId) {
palOffset = READ_SCI11ENDIAN_UINT32(_resourceData + 8);
// For SCI32, this is a scale flag
- if (getSciVersion() >= SCI_VERSION_2) {
+ if (getSciVersion() >= SCI_VERSION_2) {
_sci2ScaleRes = (Sci32ViewNativeResolution)_resourceData[5];
if (_screen->getUpscaledHires() == GFX_SCREEN_UPSCALED_DISABLED)
_sci2ScaleRes = SCI_VIEW_NATIVERES_NONE;
@@ -426,7 +426,7 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo
// compression for SCI1.1+ Mac
while (pixelNr < pixelCount) {
uint32 pixelLine = pixelNr;
-
+
if (hasByteLengths) {
pixelNr += *rlePtr++;
runLength = *rlePtr++;
@@ -500,7 +500,7 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo
} else {
memcpy(outPtr + pixelNr, literalPtr, MIN<uint16>(runLength, pixelCount - pixelNr));
literalPtr += runLength;
- }
+ }
break;
case 0x80: // fill with color
if (!literalPos)
diff --git a/engines/sci/parser/said.cpp b/engines/sci/parser/said.cpp
index 827e28073a..01c25ef401 100644
--- a/engines/sci/parser/said.cpp
+++ b/engines/sci/parser/said.cpp
@@ -224,7 +224,7 @@ static bool parsePart2(ParseTreeNode* parentNode, bool& nonempty)
} else if (said_tokens[said_token] == TOKEN_BRACKETO) {
said_token++;
-
+
found = parsePart2(newNode, nonempty);
if (found) {
@@ -282,7 +282,7 @@ static bool parsePart3(ParseTreeNode* parentNode, bool& nonempty)
} else if (said_tokens[said_token] == TOKEN_BRACKETO) {
said_token++;
-
+
found = parsePart3(newNode, nonempty);
if (found) {
@@ -366,7 +366,7 @@ static bool parseRef(ParseTreeNode* parentNode)
said_attach_subtree(newParent, 0x144, 0x14f, newNode);
newParent = newParent->right;
-
+
newNode = said_branch_node(said_next_node(), 0, 0);
found = parseRef(newNode);
@@ -381,14 +381,14 @@ static bool parseRef(ParseTreeNode* parentNode)
}
- }
+ }
// NB: This is not an "else if'.
// If there is a "< [ ... ]", that is parsed as "< ..."
if (said_tokens[said_token] == TOKEN_BRACKETO) {
said_token++;
-
+
found = parseRef(newNode);
if (found) {
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 308bd92ef4..f18b6c91f5 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -128,7 +128,7 @@ static const char *s_resourceTypeSuffixes[] = {
"trn", "rbt", "vmd", "chk", "",
"etc", "duk", "clu", "tga", "zzz",
"", "", ""
-};
+};
const char *getResourceTypeName(ResourceType restype) {
if (restype != kResourceTypeInvalid)
@@ -449,11 +449,11 @@ bool MacResourceForkResourceSource::isCompressableResource(ResourceType type) co
*ptr++ = value; \
}
-void MacResourceForkResourceSource::decompressResource(Common::SeekableReadStream *stream, Resource *resource) const {
+void MacResourceForkResourceSource::decompressResource(Common::SeekableReadStream *stream, Resource *resource) const {
// KQ6 Mac is the only game not compressed. It's not worth writing a
// heuristic just for that game. Also, skip over any resource that cannot
// be compressed.
- bool canBeCompressed = !(g_sci && g_sci->getGameId() == GID_KQ6) && isCompressableResource(resource->_id.getType());
+ bool canBeCompressed = !(g_sci && g_sci->getGameId() == GID_KQ6) && isCompressableResource(resource->_id.getType());
uint32 uncompressedSize = 0;
// GK2 Mac is crazy. In its Patches resource fork, picture 2315 is not
@@ -503,7 +503,7 @@ void MacResourceForkResourceSource::decompressResource(Common::SeekableReadStrea
// Copy chunk expanded
extraByte1 = stream->readByte();
extraByte2 = stream->readByte();
-
+
literalLength = extraByte2 & 3;
OUTPUT_LITERAL()
@@ -824,7 +824,7 @@ void ChunkResourceSource::scanSource(ResourceManager *resMan) {
byte *ptr = chunk->data;
uint32 firstOffset = 0;
-
+
for (;;) {
ResourceType type = resMan->convertResType(*ptr);
uint16 number = READ_LE_UINT16(ptr + 1);
@@ -844,7 +844,7 @@ void ChunkResourceSource::scanSource(ResourceManager *resMan) {
// There's no end marker to the data table, but the first resource
// begins directly after the entry table. So, when we hit the first
// resource, we're at the end of the entry table.
-
+
if (!firstOffset)
firstOffset = entry.offset;
@@ -1243,7 +1243,7 @@ ResVersion ResourceManager::detectVolVersion() {
for (Common::List<ResourceSource *>::iterator it = _sources.begin(); it != _sources.end(); ++it) {
rsrc = *it;
-
+
if (rsrc->getSourceType() == kSourceVolume) {
if (rsrc->_resourceFile) {
fileStream = rsrc->_resourceFile->createReadStream();
@@ -1291,7 +1291,7 @@ ResVersion ResourceManager::detectVolVersion() {
// loading SCI3 volumes, the format is otherwise
// identical to SCI2. We therefore get the compression
// indicator here, but disregard it in the following
- // code.
+ // code.
wCompression = fileStream->readUint16LE();
if (fileStream->eos()) {
@@ -1473,7 +1473,7 @@ void ResourceManager::readResourcePatchesBase36() {
name = (*x)->getName();
ResourceId resource36 = convertPatchNameBase36((ResourceType)i, name);
-
+
/*
if (i == kResourceTypeAudio36)
debug("audio36 patch: %s => %s. tuple:%d, %s\n", name.c_str(), inputName.c_str(), resource36.tuple, resource36.toString().c_str());
@@ -1494,7 +1494,7 @@ void ResourceManager::readResourcePatchesBase36() {
// Check for SOL as well
tag = (tag << 16) | stream->readUint16BE();
-
+
if (tag != MKTAG('S','O','L',0)) {
delete stream;
continue;
@@ -1555,7 +1555,7 @@ void ResourceManager::readResourcePatches() {
name = (*x)->getName();
// SCI1 scheme
- if (isdigit(name[0])) {
+ if (isdigit(static_cast<unsigned char>(name[0]))) {
char *end = 0;
resourceNr = strtol(name.c_str(), &end, 10);
bAdd = (*end == '.'); // Ensure the next character is the period
@@ -1563,7 +1563,7 @@ void ResourceManager::readResourcePatches() {
// SCI0 scheme
int resname_len = strlen(szResType);
if (scumm_strnicmp(name.c_str(), szResType, resname_len) == 0
- && !isalpha(name[resname_len + 1])) {
+ && !isalpha(static_cast<unsigned char>(name[resname_len + 1]))) {
resourceNr = atoi(name.c_str() + resname_len + 1);
bAdd = true;
}
@@ -1613,7 +1613,7 @@ int ResourceManager::readResourceMapSCI0(ResourceSource *map) {
warning("Error while reading %s", map->getLocationName().c_str());
return SCI_ERROR_RESMAP_NOT_FOUND;
}
-
+
if (offset == 0xFFFFFFFF)
break;
@@ -2129,7 +2129,7 @@ void ResourceManager::detectSciVersion() {
bool oldDecompressors = true;
ResourceCompression viewCompression;
-#ifdef ENABLE_SCI32
+#ifdef ENABLE_SCI32
viewCompression = getViewCompression();
#else
if (_volVersion >= kResVersionSci2) {
@@ -2173,7 +2173,7 @@ void ResourceManager::detectSciVersion() {
}
#endif
}
-
+
if (_volVersion == kResVersionSci11Mac) {
// SCI32 doesn't have the resource.cfg file, so we can figure out
// which of the games are SCI1.1. Note that there are no Mac SCI2 games.
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 588ea76ea5..f3a3c8dd5b 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -197,7 +197,7 @@ void ResourceManager::readWaveAudioPatches() {
for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
Common::String name = (*x)->getName();
- if (isdigit(name[0]))
+ if (isdigit(static_cast<unsigned char>(name[0])))
processWavePatch(ResourceId(kResourceTypeAudio, atoi(name.c_str())), name);
}
}
@@ -356,14 +356,14 @@ int ResourceManager::readAudioMapSCI11(ResourceSource *map) {
stream->seek(offset + 1);
byte headerSize = stream->readByte();
assert(headerSize == 11 || headerSize == 12);
-
+
stream->skip(5);
uint32 size = stream->readUint32LE() + headerSize + 2;
addResource(ResourceId(kResourceTypeAudio, n), src, offset, size);
}
} else {
- bool isEarly = (entrySize != 11);
+ bool isEarly = (entrySize != 11);
if (!isEarly) {
offset = READ_LE_UINT32(ptr);
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index cc9042ceb7..792b2b2055 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -282,7 +282,7 @@ Common::Error SciEngine::run() {
// without this games would be pretty badly broken
}
- // Show any special warnings for buggy scripts with severe game bugs,
+ // Show any special warnings for buggy scripts with severe game bugs,
// which have been patched by Sierra
if (getGameId() == GID_LONGBOW) {
// Longbow 1.0 has a buggy script which prevents the game
@@ -868,8 +868,9 @@ void SciEngine::syncIngameAudioOptions() {
_gamestate->variables[VAR_GLOBAL][90] = make_reg(0, 2); // speech
} else if (subtitlesOn && speechOn) {
// Is it a game that supports simultaneous speech and subtitles?
- if (getGameId() == GID_SQ4
+ if (getGameId() == GID_SQ4
|| getGameId() == GID_FREDDYPHARKAS
+ || getGameId() == GID_ECOQUEST
// TODO: The following need script patches for simultaneous speech and subtitles
//|| getGameId() == GID_KQ6
//|| getGameId() == GID_LAURABOW2
@@ -907,7 +908,7 @@ void SciEngine::loadMacExecutable() {
// KQ6/Freddy require the executable to load their icon bar palettes
if (hasMacIconBar())
error("Could not load Mac resource fork '%s'", filename.c_str());
-
+
// TODO: Show some sort of warning dialog saying they can't get any
// high-res Mac fonts, when we get to that point ;)
}
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 04ccbd97d2..b419d862a4 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -38,7 +38,7 @@ struct ADGameDescription;
* Status of this engine: ???
*
* Games using this engine:
- * - Newer Sierra adventure games (based on FreeSCI)
+ * - Newer Sierra adventure games (based on FreeSCI)
*
* @todo give a concrete list of supported games. Could also
* list future games, with status for each.
@@ -176,7 +176,7 @@ enum SciGameId {
GID_FANMADE // FIXME: Do we really need/want this?
};
-/**
+/**
* SCI versions
* For more information, check here:
* http://wiki.scummvm.org/index.php/Sierra_Game_Versions#SCI_Games
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp
index 592caa5814..123dd21894 100644
--- a/engines/sci/sound/audio.cpp
+++ b/engines/sci/sound/audio.cpp
@@ -285,7 +285,7 @@ Audio::RewindableAudioStream *AudioPlayer::getAudioStream(uint32 number, uint32
// instead.
memcpy(compressedData, audioRes->data, audioRes->size);
Common::SeekableReadStream *compressedStream = new Common::MemoryReadStream(compressedData, audioRes->size, DisposeAfterUse::YES);
-
+
switch (audioCompressionType) {
case MKTAG('M','P','3',' '):
#ifdef USE_MAD
diff --git a/engines/sci/sound/drivers/amigamac.cpp b/engines/sci/sound/drivers/amigamac.cpp
index 1436ca45a7..3c750401b9 100644
--- a/engines/sci/sound/drivers/amigamac.cpp
+++ b/engines/sci/sound/drivers/amigamac.cpp
@@ -178,7 +178,7 @@ int MidiDriver_AmigaMac::interpolate(int8 *samples, frac_t offset, bool isUnsign
int diff = (s2 - s1) << 8;
return (s1 << 8) + fracToInt(diff * (offset & FRAC_LO_MASK));
}
-
+
int diff = (samples[x + 1] - samples[x]) << 8;
return (samples[x] << 8) + fracToInt(diff * (offset & FRAC_LO_MASK));
}
@@ -373,7 +373,7 @@ void MidiDriver_AmigaMac::setOutputFrac(int voice) {
fnote -= instrument->baseNote;
fnote *= 4;
// FIXME: check how SSCI maps this
- fnote += (_channels[_voices[voice].hw_channel].pitch - 0x2000) / 169;
+ fnote += (_channels[_voices[voice].hw_channel].pitch - 0x2000) / 169;
while (fnote < 0) {
divFact *= 2;
@@ -617,7 +617,7 @@ int MidiDriver_AmigaMac::open() {
} else if (!loadInstrumentsSCI0Mac(stream))
return Common::kUnknownError;
}
-
+
MidiDriver_Emulated::open();
_mixer->playStream(Audio::Mixer::kPlainSoundType, &_mixerSoundHandle, this, -1, _mixer->kMaxChannelVolume, 0, DisposeAfterUse::NO);
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 96cbf135ed..2afab3858d 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -291,8 +291,8 @@ void SciMusic::soundInitSnd(MusicEntry *pSnd) {
if (_soundVersion >= SCI_VERSION_1_EARLY && g_sci->getPlatform() == Common::kPlatformAmiga)
flags = 0;
int endPart = track->digitalSampleEnd > 0 ? (track->digitalSampleSize - track->digitalSampleEnd) : 0;
- pSnd->pStreamAud = Audio::makeRawStream(channelData + track->digitalSampleStart,
- track->digitalSampleSize - track->digitalSampleStart - endPart,
+ pSnd->pStreamAud = Audio::makeRawStream(channelData + track->digitalSampleStart,
+ track->digitalSampleSize - track->digitalSampleStart - endPart,
track->digitalSampleRate, flags, DisposeAfterUse::NO);
delete pSnd->pLoopStream;
pSnd->pLoopStream = 0;
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index d394fd0b2b..77f45e0788 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -53,14 +53,14 @@ namespace Sci {
// Taken from http://anthonylarme.tripod.com/phantas/phintgtp.html
//
// (...) What we needed was a way of playing video, but have it blend into
-// normal room art instead of occupying its own rectangular area. Room art
-// consists of a background pic overlaid with various animating cels
-// (traditional lingo: sprites). The cels each have a priority that determines
-// who is on top and who is behind in the drawing order. Cels are read from
-// *.v56 files (another proprietary format). A Robot is video frames with
-// transparent background including priority and x,y information. Thus, it is
+// normal room art instead of occupying its own rectangular area. Room art
+// consists of a background pic overlaid with various animating cels
+// (traditional lingo: sprites). The cels each have a priority that determines
+// who is on top and who is behind in the drawing order. Cels are read from
+// *.v56 files (another proprietary format). A Robot is video frames with
+// transparent background including priority and x,y information. Thus, it is
// like a cel, except it comes from an RBT - not a v56. Because it blends into
-// our graphics engine, it looks just like a part of the room. A RBT can move
+// our graphics engine, it looks just like a part of the room. A RBT can move
// around the screen and go behind other objects. (...)
#ifdef ENABLE_SCI32
@@ -105,7 +105,7 @@ bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) {
_surface = new Graphics::Surface();
readHeaderChunk();
-
+
// There are several versions of robot files, ranging from 3 to 6.
// v3: no known examples
// v4: PQ:SWAT demo
@@ -223,7 +223,7 @@ void RobotDecoder::calculateVideoDimensions() {
// This is an O(n) operation, as each frame has a different size.
// We need to know the actual frame size to have a constant video size.
uint32 pos = _fileStream->pos();
-
+
for (uint32 curFrame = 0; curFrame < _header.frameCount; curFrame++) {
_fileStream->skip(4);
uint16 frameWidth = _fileStream->readUint16();
@@ -327,8 +327,8 @@ const Graphics::Surface *RobotDecoder::decodeNextFrame() {
// FIXME: For some reason, there are audio hiccups/gaps
if (_header.hasSound) {
_fileStream->skip(8); // header
- _audioStream->queueBuffer(g_sci->_audio->getDecodedRobotAudioFrame(_fileStream, audioChunkSize - 8),
- (audioChunkSize - 8) * 2, DisposeAfterUse::NO,
+ _audioStream->queueBuffer(g_sci->_audio->getDecodedRobotAudioFrame(_fileStream, audioChunkSize - 8),
+ (audioChunkSize - 8) * 2, DisposeAfterUse::NO,
Audio::FLAG_16BITS | Audio::FLAG_LITTLE_ENDIAN);
} else {
_fileStream->skip(audioChunkSize);
@@ -359,7 +359,7 @@ void RobotDecoder::close() {
}
reset();
-}
+}
#endif
diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h
index f5e8ad9b05..800a3c9024 100644
--- a/engines/sci/video/seq_decoder.h
+++ b/engines/sci/video/seq_decoder.h
@@ -58,7 +58,7 @@ public:
Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); }
const byte *getPalette() { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
-
+
protected:
Common::Rational getFrameRate() const { assert(_frameDelay); return Common::Rational(60, _frameDelay); }
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index e4057d1f13..20b929dfd4 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -1066,7 +1066,7 @@ static int checkXYInBoxBounds(int boxnum, int x, int y, int &destX, int &destY)
int dist;
// MM C64: This fixes the trunk bug (#3070065), as well
- // as the fruit bowl, however im not sure if its
+ // as the fruit bowl, however im not sure if its
// the proper solution or not.
if( g_scumm->_game.version == 0 )
yDist = ABS(y - destY);
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index dce6c9c144..8558da397e 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -49,34 +49,28 @@ void ScummEngine::loadCJKFont() {
_newLineCharacter = 0;
if (_game.version <= 5 && _game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) { // FM-TOWNS v3 / v5 Kanji
-#ifdef DISABLE_TOWNS_DUAL_LAYER_MODE
+#if defined(DISABLE_TOWNS_DUAL_LAYER_MODE) || !defined(USE_RGB_COLOR)
+ GUIErrorMessage("FM-Towns Kanji font drawing requires dual graphics layer support which is disabled in this build");
error("FM-Towns Kanji font drawing requires dual graphics layer support which is disabled in this build");
#else
// use FM-TOWNS font rom, since game files don't have kanji font resources
- _cjkFont = Graphics::FontSJIS::createFont(Common::kPlatformFMTowns);
+ _cjkFont = Graphics::FontSJIS::createFont(_game.platform);
if (!_cjkFont)
error("SCUMM::Font: Could not open file 'FMT_FNT.ROM'");
_textSurfaceMultiplier = 2;
_useCJKMode = true;
#endif
} else if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine && _language == Common::JA_JPN) {
- int numChar = 3418;
- _2byteWidth = 12;
- _2byteHeight = 12;
+#ifdef USE_RGB_COLOR
// use PC-Engine System Card, since game files don't have kanji font resources
- if (!fp.open("pce.cdbios")) {
- error("SCUMM::Font: Could not open System Card pce.cdbios");
- } else {
- _useCJKMode = true;
- debug(2, "Loading PC-Engine System Card");
-
- // A 0x200 byte header can be present at the beginning of the syscard. Seek past it too.
- fp.seek((fp.size() & 0x200) ? 0x30200 : 0x30000);
+ _cjkFont = Graphics::FontSJIS::createFont(_game.platform);
+ if (!_cjkFont)
+ error("SCUMM::Font: Could not open file 'pce.cdbios'");
- _2byteFontPtr = new byte[_2byteWidth * _2byteHeight * numChar / 8];
- fp.read(_2byteFontPtr, _2byteWidth * _2byteHeight * numChar / 8);
- fp.close();
- }
+ _cjkFont->setDrawingMode(Graphics::FontSJIS::kShadowMode);
+ _2byteWidth = _2byteHeight = 12;
+ _useCJKMode = true;
+#endif
} else if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD && _language == Common::JA_JPN) {
int numChar = 1413;
_2byteWidth = 16;
@@ -160,71 +154,16 @@ void ScummEngine::loadCJKFont() {
}
}
-static int SJIStoPCEChunk(int f, int s) { //converts sjis code to pce font offset
- // rangeTbl maps SJIS char-codes to the PCE System Card font rom.
- // Each pair {<upperBound>,<lowerBound>} in the array represents a SJIS range.
- const int rangeCnt = 45;
- static const uint16 rangeTbl[rangeCnt][2] = {
- // Symbols
- {0x8140,0x817E},{0x8180,0x81AC},
- // 0-9
- {0x824F,0x8258},
- // Latin upper
- {0x8260,0x8279},
- // Latin lower
- {0x8281,0x829A},
- // Kana
- {0x829F,0x82F1},{0x8340,0x837E},{0x8380,0x8396},
- // Greek upper
- {0x839F,0x83B6},
- // Greek lower
- {0x83BF,0x83D6},
- // Cyrillic upper
- {0x8440,0x8460},
- // Cyrillic lower
- {0x8470,0x847E},{0x8480,0x8491},
- // Kanji
- {0x889F,0x88FC},
- {0x8940,0x897E},{0x8980,0x89FC},
- {0x8A40,0x8A7E},{0x8A80,0x8AFC},
- {0x8B40,0x8B7E},{0x8B80,0x8BFC},
- {0x8C40,0x8C7E},{0x8C80,0x8CFC},
- {0x8D40,0x8D7E},{0x8D80,0x8DFC},
- {0x8E40,0x8E7E},{0x8E80,0x8EFC},
- {0x8F40,0x8F7E},{0x8F80,0x8FFC},
- {0x9040,0x907E},{0x9080,0x90FC},
- {0x9140,0x917E},{0x9180,0x91FC},
- {0x9240,0x927E},{0x9280,0x92FC},
- {0x9340,0x937E},{0x9380,0x93FC},
- {0x9440,0x947E},{0x9480,0x94FC},
- {0x9540,0x957E},{0x9580,0x95FC},
- {0x9640,0x967E},{0x9680,0x96FC},
- {0x9740,0x977E},{0x9780,0x97FC},
- {0x9840,0x9872}
- };
-
- int ch = (f << 8) | (s & 0xFF);
- int offset = 0;
- for (int i = 0; i < rangeCnt; ++i) {
- if (ch >= rangeTbl[i][0] && ch <= rangeTbl[i][1])
- return offset + ch - rangeTbl[i][0];
- offset += rangeTbl[i][1] - rangeTbl[i][0] + 1;
- }
-
- debug(4, "Invalid Char: 0x%x", ch);
- return 0;
-}
-
byte *ScummEngine::get2byteCharPtr(int idx) {
+ if (_game.platform == Common::kPlatformFMTowns || _game.platform == Common::kPlatformPCEngine)
+ return 0;
+
switch (_language) {
case Common::KO_KOR:
idx = ((idx % 256) - 0xb0) * 94 + (idx / 256) - 0xa1;
break;
case Common::JA_JPN:
- if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) {
- idx = SJIStoPCEChunk((idx % 256), (idx / 256));
- return _2byteFontPtr + (_2byteWidth * _2byteHeight / 8) * idx;
- } else if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD && _language == Common::JA_JPN) {
+ if (_game.id == GID_MONKEY && _game.platform == Common::kPlatformSegaCD && _language == Common::JA_JPN) {
// init pointer to charset resource
if (_2byteFontPtr[0] == 0xFF) {
int charsetId = 5;
@@ -313,7 +252,7 @@ CharsetRenderer::~CharsetRenderer() {
CharsetRendererCommon::CharsetRendererCommon(ScummEngine *vm)
: CharsetRenderer(vm), _bytesPerPixel(0), _fontHeight(0), _numChars(0) {
- _shadowMode = kNoShadowMode;
+ _shadowMode = false;
_shadowColor = 0;
}
@@ -361,17 +300,9 @@ void CharsetRendererV3::setCurID(int32 id) {
}
int CharsetRendererCommon::getFontHeight() {
- if (_vm->_useCJKMode) {
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- static const uint8 sjisFontHeightM1[] = { 0, 8, 9, 8, 9, 8, 9, 0, 0, 0 };
- static const uint8 sjisFontHeightM2[] = { 0, 8, 9, 9, 9, 8, 9, 9, 9, 8 };
- static const uint8 sjisFontHeightI4[] = { 0, 8, 9, 9, 9, 8, 8, 8, 8, 8 };
- const uint8 *htbl = (_vm->_game.id == GID_MONKEY) ? sjisFontHeightM1 : ((_vm->_game.id == GID_INDY4) ? sjisFontHeightI4 : sjisFontHeightM2);
- return (_vm->_game.version == 3) ? 8 : htbl[_curId];
- } else {
- return MAX(_vm->_2byteHeight + 1, _fontHeight);
- }
- } else
+ if (_vm->_useCJKMode)
+ return MAX(_vm->_2byteHeight + 1, _fontHeight);
+ else
return _fontHeight;
}
@@ -379,57 +310,16 @@ int CharsetRendererCommon::getFontHeight() {
int CharsetRendererClassic::getCharWidth(uint16 chr) {
int spacing = 0;
- if (_vm->_useCJKMode) {
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- if ((chr & 0xff00) == 0xfd00) {
- chr &= 0xff;
- } else if (chr >= 256) {
- spacing = 8;
- } else if (useTownsFontRomCharacter(chr)) {
- spacing = 4;
- }
+ if (_vm->_useCJKMode && chr >= 0x80)
+ return _vm->_2byteWidth / 2;
- if (spacing) {
- if (_vm->_game.id == GID_MONKEY) {
- spacing++;
- if (_curId == 2)
- spacing++;
- } else if (_vm->_game.id != GID_INDY4 && _curId == 1) {
- spacing++;
- }
- }
-
- } else if (chr >= 0x80) {
- return _vm->_2byteWidth / 2;
- }
- }
-
- if (!spacing) {
- int offs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
- if (offs) {
- spacing = _fontPtr[offs] + (signed char)_fontPtr[offs + 2];
- }
- }
+ int offs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
+ if (offs)
+ spacing = _fontPtr[offs] + (signed char)_fontPtr[offs + 2];
return spacing;
}
-bool CharsetRendererClassic::useTownsFontRomCharacter(uint16 chr) {
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (_vm->_game.platform != Common::kPlatformFMTowns || !_vm->_useCJKMode)
- return false;
-
- if (chr < 128) {
- if (((_vm->_game.id == GID_MONKEY2 && _curId != 0) || (_vm->_game.id == GID_INDY4 && _curId != 3)) && (chr > 31 && chr != 94 && chr != 95 && chr != 126 && chr != 127))
- return true;
- return false;
- }
- return true;
-#else
- return false;
-#endif
-}
-
int CharsetRenderer::getStringWidth(int arg, const byte *text) {
int pos = 0;
int width = 1;
@@ -607,22 +497,51 @@ void CharsetRenderer::addLinebreaks(int a, byte *str, int pos, int maxwidth) {
int CharsetRendererV3::getCharWidth(uint16 chr) {
int spacing = 0;
- if (_vm->_useCJKMode) {
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- if (chr >= 256)
- spacing = 8;
- else if (chr >= 128)
- spacing = 4;
- } else if (chr & 0x80) {
- spacing = _vm->_2byteWidth / 2;
+ if (_vm->_useCJKMode && (chr & 0x80))
+ spacing = _vm->_2byteWidth / 2;
+
+ if (!spacing)
+ spacing = *(_widthTable + chr);
+
+ return spacing;
+}
+
+void CharsetRendererV3::enableShadow(bool enable) {
+ _shadowColor = 0;
+ _shadowMode = enable;
+}
+
+void CharsetRendererV3::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth) {
+ int y, x;
+ byte bits = 0;
+ uint8 col = _color;
+ int pitch = s.pitch - width * bitDepth;
+ byte *dst2 = dst + s.pitch;
+
+ for (y = 0; y < height && y + drawTop < s.h; y++) {
+ for (x = 0; x < width; x++) {
+ if ((x % 8) == 0)
+ bits = *src++;
+ if ((bits & revBitMask(x % 8)) && y + drawTop >= 0) {
+ if (_shadowMode)
+ dst[1] = dst2[0] = dst2[1] = _shadowColor;
+ dst[0] = col;
+ }
+ dst += bitDepth;
+ dst2 += bitDepth;
}
- }
- if (!spacing) {
- spacing = *(_widthTable + chr);
+ dst += pitch;
+ dst2 += pitch;
}
+}
- return spacing;
+int CharsetRendererV3::getDrawWidthIntern(uint16 chr) {
+ return getCharWidth(chr);
+}
+
+int CharsetRendererV3::getDrawHeightIntern(uint16) {
+ return 8;
}
void CharsetRendererV3::setColor(byte color) {
@@ -661,43 +580,6 @@ void CharsetRendererPCE::setColor(byte color) {
}
#endif
-void CharsetRendererCommon::enableShadow(bool enable) {
- if (enable) {
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- _shadowColor = 8;
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- _shadowColor = _vm->_game.version == 5 ? _vm->_townsCharsetColorMap[0] : 0x88;
- if (_vm->_cjkFont) {
- if (_vm->_game.version == 5) {
- if (((_vm->_game.id == GID_MONKEY) && (_curId == 2 || _curId == 4 || _curId == 6)) ||
- ((_vm->_game.id == GID_MONKEY2) && (_curId != 1 && _curId != 5 && _curId != 9)) ||
- ((_vm->_game.id == GID_INDY4) && (_curId == 2 || _curId == 3 || _curId == 4))) {
- _vm->_cjkFont->setDrawingMode(Graphics::FontSJIS::kOutlineMode);
- } else {
- _vm->_cjkFont->setDrawingMode(Graphics::FontSJIS::kDefaultMode);
- }
- _vm->_cjkFont->toggleFlippedMode((_vm->_game.id == GID_MONKEY || _vm->_game.id == GID_MONKEY2) && _curId == 3);
- } else {
- _vm->_cjkFont->setDrawingMode(Graphics::FontSJIS::kShadowMode);
- }
- }
-#endif
- _shadowMode = kFMTOWNSShadowMode;
- } else {
- _shadowColor = 0;
- _shadowMode = kNormalShadowMode;
- }
- } else {
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (_vm->_cjkFont) {
- _vm->_cjkFont->setDrawingMode(Graphics::FontSJIS::kDefaultMode);
- _vm->_cjkFont->toggleFlippedMode(false);
- }
-#endif
- _shadowMode = kNoShadowMode;
- }
-}
-
void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
// WORKAROUND for bug #1509509: Indy3 Mac does not show black
// characters (such as in the grail diary) if ignoreCharsetMask
@@ -720,33 +602,19 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
if (chr == '@')
return;
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (_vm->_useCJKMode && chr > 127) {
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- charPtr = 0;
- width = _vm->_cjkFont->getCharWidth(chr);
- height = _vm->_cjkFont->getFontHeight();
- } else {
- width = _vm->_2byteWidth;
- height = _vm->_2byteHeight;
- charPtr = _vm->get2byteCharPtr(chr);
- }
- } else
-#endif
- {
- charPtr = _fontPtr + chr * 8;
- width = getCharWidth(chr);
- height = 8;
- }
+ charPtr = (_vm->_useCJKMode && chr > 127) ? _vm->get2byteCharPtr(chr) : _fontPtr + chr * 8;
+ width = getDrawWidthIntern(chr);
+ height = getDrawHeightIntern(chr);
+ setDrawCharIntern(chr);
+
+ origWidth = width;
+ origHeight = height;
// Clip at the right side (to avoid drawing "outside" the screen bounds).
if (_left + origWidth > _right + 1)
return;
- origWidth = width;
- origHeight = height;
-
- if (_shadowMode != kNoShadowMode) {
+ if (_shadowMode) {
width++;
height++;
}
@@ -768,28 +636,17 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
_textScreenID = vs->number;
}
- if (
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- (_vm->_game.platform != Common::kPlatformFMTowns) &&
-#endif
- (ignoreCharsetMask || !vs->hasTwoBuffers)) {
+ if ((ignoreCharsetMask || !vs->hasTwoBuffers)) {
dst = vs->getPixels(_left, drawTop);
- if (charPtr)
- drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight, vs->format.bytesPerPixel);
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- else if (_vm->_cjkFont)
- _vm->_cjkFont->drawChar(vs, chr, _left, drawTop, _color, _shadowColor);
-#endif
+ drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight, vs->format.bytesPerPixel);
} else {
dst = (byte *)_vm->_textSurface.getBasePtr(_left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier);
- if (charPtr)
- drawBits1(_vm->_textSurface, dst, charPtr, drawTop, origWidth, origHeight, _vm->_textSurface.format.bytesPerPixel, (_vm->_textSurfaceMultiplier == 2 && !is2byte));
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- else if (_vm->_cjkFont)
- _vm->_cjkFont->drawChar(_vm->_textSurface, chr, _left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier, _color, _shadowColor);
-#endif
- if (is2byte)
- origWidth /= _vm->_textSurfaceMultiplier;
+ drawBits1(_vm->_textSurface, dst, charPtr, drawTop, origWidth, origHeight, _vm->_textSurface.format.bytesPerPixel);
+ }
+
+ if (is2byte) {
+ origWidth /= _vm->_textSurfaceMultiplier;
+ height /= _vm->_textSurfaceMultiplier;
}
if (_str.left > _left)
@@ -799,39 +656,21 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
if (_str.right < _left) {
_str.right = _left;
- if (_shadowMode != kNoShadowMode)
+ if (_shadowMode)
_str.right++;
}
- if (_str.bottom < _top + height / _vm->_textSurfaceMultiplier)
- _str.bottom = _top + height / _vm->_textSurfaceMultiplier;
+ if (_str.bottom < _top + height)
+ _str.bottom = _top + height;
}
void CharsetRendererV3::drawChar(int chr, Graphics::Surface &s, int x, int y) {
- const byte *charPtr;
- byte *dst;
- int width, height;
- int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
- if (is2byte) {
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- _vm->_cjkFont->drawChar(s, chr, x * _vm->_textSurfaceMultiplier, y * _vm->_textSurfaceMultiplier, _color, _shadowColor);
- return;
- }
- else
-#endif
- {
- charPtr = _vm->get2byteCharPtr(chr);
- width = _vm->_2byteWidth;
- height = _vm->_2byteHeight;
- }
- } else {
- charPtr = _fontPtr + chr * 8;
-// width = height = 8;
- width = getCharWidth(chr);
- height = 8;
- }
- dst = (byte *)s.pixels + y * s.pitch + x;
+ const byte *charPtr = (_vm->_useCJKMode && chr > 127) ? _vm->get2byteCharPtr(chr) : _fontPtr + chr * 8;
+ int width = getDrawWidthIntern(chr);
+ int height = getDrawHeightIntern(chr);
+ setDrawCharIntern(chr);
+
+ byte *dst = (byte *)s.pixels + y * s.pitch + x;
drawBits1(s, dst, charPtr, y, width, height, s.format.bytesPerPixel);
}
@@ -850,29 +689,6 @@ void CharsetRenderer::translateColor() {
}
}
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
-void CharsetRenderer::processTownsCharsetColors(uint8 bytesPerPixel) {
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- for (int i = 0; i < (1 << bytesPerPixel); i++) {
- uint8 c = _vm->_charsetColorMap[i];
-
- if (c > 16) {
- uint8 t = (_vm->_currentPalette[c * 3] < 32) ? 4 : 12;
- t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 2 : 10);
- t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 1 : 9);
- c = t;
- }
-
- if (c == 0)
- c = _vm->_townsOverrideShadowColor;
-
- c = ((c & 0x0f) << 4) | (c & 0x0f);
- _vm->_townsCharsetColorMap[i] = c;
- }
- }
-}
-#endif
-
void CharsetRenderer::saveLoadWithSerializer(Serializer *ser) {
static const SaveLoadEntry charsetRendererEntries[] = {
MKLINE_OLD(CharsetRenderer, _curId, sleByte, VER(73), VER(73)),
@@ -890,10 +706,7 @@ void CharsetRenderer::saveLoadWithSerializer(Serializer *ser) {
}
void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
- int width, height, origWidth, origHeight;
- int offsX, offsY;
VirtScreen *vs;
- const byte *charPtr;
bool is2byte = (chr >= 256 && _vm->_useCJKMode);
assertRange(1, _curId, _vm->_numCharsets - 1, "charset");
@@ -908,64 +721,8 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
_vm->_charsetColorMap[1] = _color;
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- processTownsCharsetColors(_bytesPerPixel);
- bool noSjis = false;
-
- if (_vm->_game.platform == Common::kPlatformFMTowns && _vm->_useCJKMode) {
- if ((chr & 0x00ff) == 0x00fd) {
- chr >>= 8;
- noSjis = true;
- }
- }
-
- if (useTownsFontRomCharacter(chr) && !noSjis) {
- charPtr = 0;
- _vm->_cjkChar = chr;
- enableShadow(true);
-
- width = getCharWidth(chr);
- // For whatever reason MI1 uses a different font width
- // for alignment calculation and for drawing when
- // charset 2 is active. This fixes some subtle glitches.
- if (_vm->_game.id == GID_MONKEY && _curId == 2)
- width--;
- origWidth = width;
-
- origHeight = height = getFontHeight();
- offsX = offsY = 0;
- } else if (_vm->_useCJKMode && (chr >= 128) && !noSjis) {
- enableShadow(true);
- origWidth = width = _vm->_2byteWidth;
- origHeight = height = _vm->_2byteHeight;
- charPtr = _vm->get2byteCharPtr(chr);
- offsX = offsY = 0;
- if (_shadowMode != kNoShadowMode) {
- width++;
- height++;
- }
- } else
-#endif
- {
- uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
- assert(charOffs < 0x14000);
- if (!charOffs)
- return;
- charPtr = _fontPtr + charOffs;
-
- width = origWidth = charPtr[0];
- height = origHeight = charPtr[1];
-
- if (_disableOffsX) {
- offsX = 0;
- } else {
- offsX = (signed char)charPtr[2];
- }
-
- offsY = (signed char)charPtr[3];
-
- charPtr += 4; // Skip over char header
- }
+ if (!prepareDraw(chr))
+ return;
if (_firstChar) {
_str.left = 0;
@@ -974,12 +731,12 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
_str.bottom = 0;
}
- _top += offsY;
- _left += offsX;
+ _top += _offsY;
+ _left += _offsX;
- if (_left + origWidth > _right + 1 || _left < 0) {
- _left += origWidth;
- _top -= offsY;
+ if (_left + _origWidth > _right + 1 || _left < 0) {
+ _left += _origWidth;
+ _top -= _offsY;
return;
}
@@ -1001,33 +758,29 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
int drawTop = _top - vs->topline;
- _vm->markRectAsDirty(vs->number, _left, _left + width, drawTop, drawTop + height);
+ _vm->markRectAsDirty(vs->number, _left, _left + _width, drawTop, drawTop + _height);
// This check for kPlatformFMTowns and kMainVirtScreen is at least required for the chat with
// the navigator's head in front of the ghost ship in Monkey Island 1
- if (!ignoreCharsetMask
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- || (_vm->_game.platform == Common::kPlatformFMTowns && vs->number == kMainVirtScreen)
-#endif
- ) {
+ if (!ignoreCharsetMask || (_vm->_game.platform == Common::kPlatformFMTowns && vs->number == kMainVirtScreen)) {
_hasMask = true;
_textScreenID = vs->number;
}
- printCharIntern(is2byte, charPtr, origWidth, origHeight, width, height, vs, ignoreCharsetMask);
+ printCharIntern(is2byte, _charPtr, _origWidth, _origHeight, _width, _height, vs, ignoreCharsetMask);
- _left += origWidth;
+ _left += _origWidth;
if (_str.right < _left) {
_str.right = _left;
- if (_vm->_game.platform != Common::kPlatformFMTowns && _shadowMode != kNoShadowMode)
+ if (_vm->_game.platform != Common::kPlatformFMTowns && _shadowMode)
_str.right++;
}
- if (_str.bottom < _top + origHeight)
- _str.bottom = _top + origHeight;
+ if (_str.bottom < _top + _origHeight)
+ _str.bottom = _top + _origHeight;
- _top -= offsY;
+ _top -= _offsY;
}
void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask) {
@@ -1065,11 +818,7 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
} else {
Graphics::Surface dstSurface;
Graphics::Surface backSurface;
- if ((ignoreCharsetMask || !vs->hasTwoBuffers)
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- && (_vm->_game.platform != Common::kPlatformFMTowns)
-#endif
- ) {
+ if ((ignoreCharsetMask || !vs->hasTwoBuffers)) {
dstSurface = *vs;
dstPtr = vs->getPixels(_left, drawTop);
} else {
@@ -1088,16 +837,7 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
drawTop = _top - _vm->_screenTop;
}
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (!charPtr && _vm->_cjkFont) {
- _vm->_cjkFont->drawChar(dstSurface, _vm->_cjkChar, _left * _vm->_textSurfaceMultiplier, (_top - _vm->_screenTop) * _vm->_textSurfaceMultiplier, _vm->_townsCharsetColorMap[1], _shadowColor);
- } else
-#endif
- if (is2byte) {
- drawBits1(dstSurface, dstPtr, charPtr, drawTop, origWidth, origHeight, dstSurface.format.bytesPerPixel);
- } else {
- drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight, _vm->_textSurfaceMultiplier == 2);
- }
+ drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight);
if (_blitAlso && vs->hasTwoBuffers) {
// FIXME: Revisiting this code, I think the _blitAlso mode is likely broken
@@ -1136,54 +876,36 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
}
}
-void CharsetRendererClassic::drawChar(int chr, Graphics::Surface &s, int x, int y) {
- const byte *charPtr;
- byte *dst;
- int width, height;
- int is2byte = (chr >= 0x80 && _vm->_useCJKMode) ? 1 : 0;
-
- if (is2byte) {
- enableShadow(true);
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (_vm->_game.platform == Common::kPlatformFMTowns) {
- _vm->_cjkFont->drawChar(s, chr, x * _vm->_textSurfaceMultiplier, y * _vm->_textSurfaceMultiplier, _color, _shadowColor);
- return;
- } else
-#endif
- {
- charPtr = _vm->get2byteCharPtr(chr);
- width = _vm->_2byteWidth;
- height = _vm->_2byteHeight;
- }
- } else {
- uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
- assert(charOffs < 0x10000);
- if (!charOffs)
- return;
- charPtr = _fontPtr + charOffs;
+bool CharsetRendererClassic::prepareDraw(uint16 chr) {
+ uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
+ assert(charOffs < 0x14000);
+ if (!charOffs)
+ return false;
+ _charPtr = _fontPtr + charOffs;
- width = charPtr[0];
- height = charPtr[1];
+ _width = _origWidth = _charPtr[0];
+ _height = _origHeight = _charPtr[1];
- charPtr += 4; // Skip over char header
+ if (_disableOffsX) {
+ _offsX = 0;
+ } else {
+ _offsX = (signed char)_charPtr[2];
}
- dst = (byte *)s.pixels + y * s.pitch + x;
+ _offsY = (signed char)_charPtr[3];
- if (is2byte) {
- drawBits1(s, dst, charPtr, y, width, height, s.format.bytesPerPixel);
- } else {
- drawBitsN(s, dst, charPtr, *_fontPtr, y, width, height);
- }
+ _charPtr += 4; // Skip over char header
+ return true;
}
-void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height,
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- bool scale2x) {
-#else
- bool) {
-#endif
+void CharsetRendererClassic::drawChar(int chr, Graphics::Surface &s, int x, int y) {
+ if (!prepareDraw(chr))
+ return;
+ byte *dst = (byte *)s.pixels + y * s.pitch + x;
+ drawBitsN(s, dst, _charPtr, *_fontPtr, y, _width, _height);
+}
+void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height) {
int y, x;
int color;
byte numbits, bits;
@@ -1195,38 +917,13 @@ void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, co
numbits = 8;
byte *cmap = _vm->_charsetColorMap;
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- byte *dst2 = dst;
-
- if (_vm->_game.platform == Common::kPlatformFMTowns)
- cmap = _vm->_townsCharsetColorMap;
- if (scale2x) {
- dst2 += s.pitch;
- pitch <<= 1;
- }
-#endif
-
for (y = 0; y < height && y + drawTop < s.h; y++) {
for (x = 0; x < width; x++) {
color = (bits >> (8 - bpp)) & 0xFF;
- if (color && y + drawTop >= 0) {
+ if (color && y + drawTop >= 0)
*dst = cmap[color];
-
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (scale2x)
- dst[1] = dst2[0] = dst2[1] = dst[0];
-#endif
- }
dst++;
-
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- if (scale2x) {
- dst++;
- dst2 += 2;
- }
-#endif
-
bits <<= bpp;
numbits -= bpp;
if (numbits == 0) {
@@ -1235,52 +932,93 @@ void CharsetRendererClassic::drawBitsN(const Graphics::Surface &s, byte *dst, co
}
}
dst += pitch;
+ }
+}
+
+CharsetRendererTownsV3::CharsetRendererTownsV3(ScummEngine *vm) : CharsetRendererV3(vm), _sjisCurChar(0) {
+}
+
+int CharsetRendererTownsV3::getCharWidth(uint16 chr) {
+ int spacing = 0;
+
+ if (_vm->_useCJKMode) {
+ if (chr >= 256)
+ spacing = 8;
+ else if (chr >= 128)
+ spacing = 4;
+ }
+
+ if (!spacing)
+ spacing = *(_widthTable + chr);
+
+ return spacing;
+}
+
+int CharsetRendererTownsV3::getFontHeight() {
+ return _vm->_useCJKMode ? 8 : _fontHeight;
+}
+
+void CharsetRendererTownsV3::enableShadow(bool enable) {
+ _shadowColor = 8;
+ _shadowMode = enable;
+
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- dst2 += pitch;
+ _shadowColor = 0x88;
+#ifdef USE_RGB_COLOR
+ if (_vm->_cjkFont)
+ _vm->_cjkFont->setDrawingMode(enable ? Graphics::FontSJIS::kFMTownsShadowMode : Graphics::FontSJIS::kDefaultMode);
+#endif
#endif
- }
}
-void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth,
+void CharsetRendererTownsV3::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth) {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- bool scale2x) {
+#ifdef USE_RGB_COLOR
+ if (_sjisCurChar) {
+ assert(_vm->_cjkFont);
+ _vm->_cjkFont->drawChar(_vm->_textSurface, _sjisCurChar, _left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier, _color, _shadowColor);
+ return;
+ }
+#endif
+
+ dst = (byte *)_vm->_textSurface.getBasePtr(_left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier);
+ int sfPitch = _vm->_textSurface.pitch;
+ int sfHeight = _vm->_textSurface.h;
+ bool scale2x = (_vm->_textSurfaceMultiplier == 2 && !(_sjisCurChar >= 256 && _vm->_useCJKMode));
#else
- bool) {
+ int sfPitch = s.pitch;
+ int sfHeight = s.h;
#endif
int y, x;
byte bits = 0;
uint8 col = _color;
- int pitch = s.pitch - width * bitDepth;
- byte *dst2 = dst + s.pitch;
+ int pitch = sfPitch - width * bitDepth;
+ byte *dst2 = dst + sfPitch;
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
byte *dst3 = dst2;
byte *dst4 = dst2;
if (scale2x) {
- dst3 = dst2 + s.pitch;
- dst4 = dst3 + s.pitch;
+ dst3 = dst2 + sfPitch;
+ dst4 = dst3 + sfPitch;
pitch <<= 1;
}
- if (_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 5)
- col = _vm->_townsCharsetColorMap[1];
#endif
- for (y = 0; y < height && y + drawTop < s.h; y++) {
+ for (y = 0; y < height && y + drawTop < sfHeight; y++) {
for (x = 0; x < width; x++) {
if ((x % 8) == 0)
bits = *src++;
if ((bits & revBitMask(x % 8)) && y + drawTop >= 0) {
if (bitDepth == 2) {
- if (_shadowMode != kNoShadowMode) {
+ if (_shadowMode) {
WRITE_UINT16(dst + 2, _vm->_16BitPalette[_shadowColor]);
- WRITE_UINT16(dst + s.pitch, _vm->_16BitPalette[_shadowColor]);
- if (_shadowMode != kFMTOWNSShadowMode)
- WRITE_UINT16(dst + s.pitch + 2, _vm->_16BitPalette[_shadowColor]);
+ WRITE_UINT16(dst + sfPitch, _vm->_16BitPalette[_shadowColor]);
}
WRITE_UINT16(dst, _vm->_16BitPalette[_color]);
} else {
- if (_shadowMode != kNoShadowMode) {
+ if (_shadowMode) {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (scale2x) {
dst[2] = dst[3] = dst2[2] = dst2[3] = _shadowColor;
@@ -1289,8 +1027,6 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
#endif
{
dst[1] = dst2[0] = _shadowColor;
- if (_shadowMode != kFMTOWNSShadowMode)
- dst2[1] = _shadowColor;
}
}
dst[0] = col;
@@ -1321,31 +1057,64 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
#endif
}
}
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+int CharsetRendererTownsV3::getDrawWidthIntern(uint16 chr) {
+#ifdef USE_RGB_COLOR
+ if (_vm->_useCJKMode && chr > 127) {
+ assert(_vm->_cjkFont);
+ return _vm->_cjkFont->getCharWidth(chr);
+ }
+#endif
+ return CharsetRendererV3::getDrawWidthIntern(chr);
+}
+
+int CharsetRendererTownsV3::getDrawHeightIntern(uint16 chr) {
+#ifdef USE_RGB_COLOR
+ if (_vm->_useCJKMode && chr > 127) {
+ assert(_vm->_cjkFont);
+ return _vm->_cjkFont->getFontHeight();
+ }
+#endif
+ return CharsetRendererV3::getDrawHeightIntern(chr);
+}
+
+void CharsetRendererTownsV3::setDrawCharIntern(uint16 chr) {
+ _sjisCurChar = (_vm->_useCJKMode && chr > 127) ? chr : 0;
+}
+#endif
#ifdef USE_RGB_COLOR
-void CharsetRendererPCE::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth, bool scalex) {
+void CharsetRendererPCE::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth) {
+ if (_sjisCurChar) {
+ assert(_vm->_cjkFont);
+ uint16 col1 = _color;
+ uint16 col2 = _shadowColor;
+
+ if (s.format.bytesPerPixel == 2) {
+ col1 = _vm->_16BitPalette[col1];
+ col2 = _vm->_16BitPalette[col2];
+ }
+
+ _vm->_cjkFont->drawChar(dst, _sjisCurChar, s.pitch, s.format.bytesPerPixel, col1, col2, -1, -1);
+ return;
+ }
+
int y, x;
- int bitCount = 0;
byte bits = 0;
- const bool resetLineBitCount = (_vm->_language != Common::JA_JPN || width != 12);
-
for (y = 0; y < height && y + drawTop < s.h; y++) {
- if (resetLineBitCount)
- bitCount = 0;
+ int bitCount = 0;
for (x = 0; x < width; x++) {
if ((bitCount % 8) == 0)
bits = *src++;
if ((bits & revBitMask(bitCount % 8)) && y + drawTop >= 0) {
if (bitDepth == 2) {
- if (_shadowMode != kNoShadowMode) {
+ if (_shadowMode)
WRITE_UINT16(dst + s.pitch + 2, _vm->_16BitPalette[_shadowColor]);
- }
WRITE_UINT16(dst, _vm->_16BitPalette[_color]);
} else {
- if (_shadowMode != kNoShadowMode) {
+ if (_shadowMode)
*(dst + s.pitch + 1) = _shadowColor;
- }
*dst = _color;
}
}
@@ -1356,6 +1125,22 @@ void CharsetRendererPCE::drawBits1(const Graphics::Surface &s, byte *dst, const
dst += s.pitch - width * bitDepth;
}
}
+
+int CharsetRendererPCE::getDrawWidthIntern(uint16 chr) {
+ if (_vm->_useCJKMode && chr > 127)
+ return _vm->_2byteWidth;
+ return CharsetRendererV3::getDrawWidthIntern(chr);
+}
+
+int CharsetRendererPCE::getDrawHeightIntern(uint16 chr) {
+ if (_vm->_useCJKMode && chr > 127)
+ return _vm->_2byteHeight;
+ return CharsetRendererV3::getDrawHeightIntern(chr);
+}
+
+void CharsetRendererPCE::setDrawCharIntern(uint16 chr) {
+ _sjisCurChar = (_vm->_useCJKMode && chr > 127) ? chr : 0;
+}
#endif
#ifdef ENABLE_SCUMM_7_8
@@ -1530,7 +1315,7 @@ void CharsetRendererNES::printChar(int chr, bool ignoreCharsetMask) {
if (_str.right < _left) {
_str.right = _left;
- if (_shadowMode != kNoShadowMode)
+ if (_shadowMode)
_str.right++;
}
@@ -1553,7 +1338,204 @@ void CharsetRendererNES::drawChar(int chr, Graphics::Surface &s, int x, int y) {
drawBits1(s, dst, charPtr, y, width, height, s.format.bytesPerPixel);
}
-void CharsetRendererNES::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth, bool scalex) {
+#ifdef USE_RGB_COLOR
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+CharsetRendererTownsClassic::CharsetRendererTownsClassic(ScummEngine *vm) : CharsetRendererClassic(vm), _sjisCurChar(0) {
+}
+
+int CharsetRendererTownsClassic::getCharWidth(uint16 chr) {
+ int spacing = 0;
+
+ if (_vm->_useCJKMode) {
+ if ((chr & 0xff00) == 0xfd00) {
+ chr &= 0xff;
+ } else if (chr >= 256) {
+ spacing = 8;
+ } else if (useFontRomCharacter(chr)) {
+ spacing = 4;
+ }
+
+ if (spacing) {
+ if (_vm->_game.id == GID_MONKEY) {
+ spacing++;
+ if (_curId == 2)
+ spacing++;
+ } else if (_vm->_game.id != GID_INDY4 && _curId == 1) {
+ spacing++;
+ }
+ }
+ }
+
+ if (!spacing) {
+ int offs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
+ if (offs)
+ spacing = _fontPtr[offs] + (signed char)_fontPtr[offs + 2];
+ }
+
+ return spacing;
+}
+
+int CharsetRendererTownsClassic::getFontHeight() {
+ static const uint8 sjisFontHeightM1[] = { 0, 8, 9, 8, 9, 8, 9, 0, 0, 0 };
+ static const uint8 sjisFontHeightM2[] = { 0, 8, 9, 9, 9, 8, 9, 9, 9, 8 };
+ static const uint8 sjisFontHeightI4[] = { 0, 8, 9, 9, 9, 8, 8, 8, 8, 8 };
+ const uint8 *htbl = (_vm->_game.id == GID_MONKEY) ? sjisFontHeightM1 : ((_vm->_game.id == GID_INDY4) ? sjisFontHeightI4 : sjisFontHeightM2);
+ return _vm->_useCJKMode ? htbl[_curId] : _fontHeight;
+}
+
+void CharsetRendererTownsClassic::drawBitsN(const Graphics::Surface&, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height) {
+ if (_sjisCurChar) {
+ assert(_vm->_cjkFont);
+ _vm->_cjkFont->drawChar(_vm->_textSurface, _sjisCurChar, _left * _vm->_textSurfaceMultiplier, (_top - _vm->_screenTop) * _vm->_textSurfaceMultiplier, _vm->_townsCharsetColorMap[1], _shadowColor);
+ return;
+ }
+
+ bool scale2x = (_vm->_textSurfaceMultiplier == 2);
+ dst = (byte *)_vm->_textSurface.pixels + (_top - _vm->_screenTop) * _vm->_textSurface.pitch * _vm->_textSurfaceMultiplier + _left * _vm->_textSurfaceMultiplier;
+
+ int y, x;
+ int color;
+ byte numbits, bits;
+
+ int pitch = _vm->_textSurface.pitch - width;
+
+ assert(bpp == 1 || bpp == 2 || bpp == 4 || bpp == 8);
+ bits = *src++;
+ numbits = 8;
+ byte *cmap = _vm->_charsetColorMap;
+ byte *dst2 = dst;
+
+ if (_vm->_game.platform == Common::kPlatformFMTowns)
+ cmap = _vm->_townsCharsetColorMap;
+ if (scale2x) {
+ dst2 += _vm->_textSurface.pitch;
+ pitch <<= 1;
+ }
+
+ for (y = 0; y < height && y + drawTop < _vm->_textSurface.h; y++) {
+ for (x = 0; x < width; x++) {
+ color = (bits >> (8 - bpp)) & 0xFF;
+
+ if (color && y + drawTop >= 0) {
+ *dst = cmap[color];
+ if (scale2x)
+ dst[1] = dst2[0] = dst2[1] = dst[0];
+ }
+ dst++;
+
+ if (scale2x) {
+ dst++;
+ dst2 += 2;
+ }
+
+ bits <<= bpp;
+ numbits -= bpp;
+ if (numbits == 0) {
+ bits = *src++;
+ numbits = 8;
+ }
+ }
+ dst += pitch;
+ dst2 += pitch;
+ }
+}
+
+bool CharsetRendererTownsClassic::prepareDraw(uint16 chr) {
+ processCharsetColors();
+ bool noSjis = false;
+
+ if (_vm->_game.platform == Common::kPlatformFMTowns && _vm->_useCJKMode) {
+ if ((chr & 0x00ff) == 0x00fd) {
+ chr >>= 8;
+ noSjis = true;
+ }
+ }
+
+ if (useFontRomCharacter(chr) && !noSjis) {
+ setupShadowMode();
+ _charPtr = 0;
+ _sjisCurChar = chr;
+
+ _width = getCharWidth(chr);
+ // For whatever reason MI1 uses a different font width
+ // for alignment calculation and for drawing when
+ // charset 2 is active. This fixes some subtle glitches.
+ if (_vm->_game.id == GID_MONKEY && _curId == 2)
+ _width--;
+ _origWidth = _width;
+
+ _origHeight = _height = getFontHeight();
+ _offsX = _offsY = 0;
+ } else if (_vm->_useCJKMode && (chr >= 128) && !noSjis) {
+ setupShadowMode();
+ _origWidth = _width = _vm->_2byteWidth;
+ _origHeight = _height = _vm->_2byteHeight;
+ _charPtr = _vm->get2byteCharPtr(chr);
+ _offsX = _offsY = 0;
+ if (_shadowMode) {
+ _width++;
+ _height++;
+ }
+ } else {
+ _sjisCurChar = 0;
+ return CharsetRendererClassic::prepareDraw(chr);
+ }
+ return true;
+}
+
+void CharsetRendererTownsClassic::setupShadowMode() {
+ _shadowMode = true;
+ _shadowColor = _vm->_townsCharsetColorMap[0];
+ assert(_vm->_cjkFont);
+
+ if (((_vm->_game.id == GID_MONKEY) && (_curId == 2 || _curId == 4 || _curId == 6)) ||
+ ((_vm->_game.id == GID_MONKEY2) && (_curId != 1 && _curId != 5 && _curId != 9)) ||
+ ((_vm->_game.id == GID_INDY4) && (_curId == 2 || _curId == 3 || _curId == 4))) {
+ _vm->_cjkFont->setDrawingMode(Graphics::FontSJIS::kOutlineMode);
+ } else {
+ _vm->_cjkFont->setDrawingMode(Graphics::FontSJIS::kDefaultMode);
+ }
+
+ _vm->_cjkFont->toggleFlippedMode((_vm->_game.id == GID_MONKEY || _vm->_game.id == GID_MONKEY2) && _curId == 3);
+}
+
+bool CharsetRendererTownsClassic::useFontRomCharacter(uint16 chr) {
+ if (!_vm->_useCJKMode)
+ return false;
+
+ // Some SCUMM 5 games contain hard coded logic to determine whether to use
+ // the SCUMM fonts or the FM-Towns font rom to draw a character. For the other
+ // games we will simply check for a character greater 127.
+ if (chr < 128) {
+ if (((_vm->_game.id == GID_MONKEY2 && _curId != 0) || (_vm->_game.id == GID_INDY4 && _curId != 3)) && (chr > 31 && chr != 94 && chr != 95 && chr != 126 && chr != 127))
+ return true;
+ return false;
+ }
+ return true;
+}
+
+void CharsetRendererTownsClassic::processCharsetColors() {
+ for (int i = 0; i < (1 << _bytesPerPixel); i++) {
+ uint8 c = _vm->_charsetColorMap[i];
+
+ if (c > 16) {
+ uint8 t = (_vm->_currentPalette[c * 3] < 32) ? 4 : 12;
+ t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 2 : 10);
+ t |= ((_vm->_currentPalette[c * 3 + 1] < 32) ? 1 : 9);
+ c = t;
+ }
+
+ if (c == 0)
+ c = _vm->_townsOverrideShadowColor;
+
+ c = ((c & 0x0f) << 4) | (c & 0x0f);
+ _vm->_townsCharsetColorMap[i] = c;
+ }
+}
+#endif
+#endif
+
+void CharsetRendererNES::drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth) {
for (int i = 0; i < 8; i++) {
byte c0 = src[i];
byte c1 = src[i + 8];
diff --git a/engines/scumm/charset.h b/engines/scumm/charset.h
index 4c657b475e..b23ec996f5 100644
--- a/engines/scumm/charset.h
+++ b/engines/scumm/charset.h
@@ -25,6 +25,7 @@
#include "common/scummsys.h"
#include "common/rect.h"
#include "graphics/sjis.h"
+#include "scumm/scumm.h"
#include "scumm/gfx.h"
#include "scumm/saveload.h"
@@ -78,10 +79,6 @@ public:
void addLinebreaks(int a, byte *str, int pos, int maxwidth);
void translateColor();
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- void processTownsCharsetColors(uint8 bytesPerPixel);
-#endif
-
virtual void setCurID(int32 id) = 0;
int getCurID() { return _curId; }
@@ -101,31 +98,26 @@ protected:
int _fontHeight;
int _numChars;
- enum ShadowMode {
- kNoShadowMode,
- kFMTOWNSShadowMode,
- kNormalShadowMode
- };
byte _shadowColor;
- ShadowMode _shadowMode;
-
- void enableShadow(bool enable);
- virtual void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth, bool scale2x = false);
-
+ bool _shadowMode;
public:
CharsetRendererCommon(ScummEngine *vm);
void setCurID(int32 id);
- int getFontHeight();
+ virtual int getFontHeight();
};
class CharsetRendererClassic : public CharsetRendererCommon {
protected:
- void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height, bool scale2x = false);
+ virtual void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height);
+ void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask);
+ virtual bool prepareDraw(uint16 chr);
- void printCharIntern(bool is2byte, const byte *charPtr, int origWidth, int origHeight, int width, int height, VirtScreen *vs, bool ignoreCharsetMask);
+ int _width, _height, _origWidth, _origHeight;
+ int _offsX, _offsY;
+ const byte *_charPtr;
public:
CharsetRendererClassic(ScummEngine *vm) : CharsetRendererCommon(vm) {}
@@ -134,18 +126,34 @@ public:
void drawChar(int chr, Graphics::Surface &s, int x, int y);
int getCharWidth(uint16 chr);
+};
+
+#ifdef USE_RGB_COLOR
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+class CharsetRendererTownsClassic : public CharsetRendererClassic {
+public:
+ CharsetRendererTownsClassic(ScummEngine *vm);
+
+ int getCharWidth(uint16 chr);
+ int getFontHeight();
- // Some SCUMM 5 games contain hard coded logic to determine whether to use
- // the SCUMM fonts or the FM-Towns font rom to draw a character. For the other
- // games we will simply check for a character greater 127.
- bool useTownsFontRomCharacter(uint16 chr);
+private:
+ void drawBitsN(const Graphics::Surface &s, byte *dst, const byte *src, byte bpp, int drawTop, int width, int height);
+ bool prepareDraw(uint16 chr);
+ void setupShadowMode();
+ bool useFontRomCharacter(uint16 chr);
+ void processCharsetColors();
+
+ uint16 _sjisCurChar;
};
+#endif
+#endif
class CharsetRendererNES : public CharsetRendererCommon {
protected:
byte *_trTable;
- void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth, bool scale2x = false);
+ void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth);
public:
CharsetRendererNES(ScummEngine *vm) : CharsetRendererCommon(vm) {}
@@ -160,6 +168,12 @@ public:
class CharsetRendererV3 : public CharsetRendererCommon {
protected:
+ virtual void enableShadow(bool enable);
+ virtual void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth);
+ virtual int getDrawWidthIntern(uint16 chr);
+ virtual int getDrawHeightIntern(uint16 chr);
+ virtual void setDrawCharIntern(uint16 chr) {}
+
const byte *_widthTable;
public:
@@ -169,16 +183,40 @@ public:
void drawChar(int chr, Graphics::Surface &s, int x, int y);
void setCurID(int32 id);
void setColor(byte color);
+ virtual int getCharWidth(uint16 chr);
+};
+
+class CharsetRendererTownsV3 : public CharsetRendererV3 {
+public:
+ CharsetRendererTownsV3(ScummEngine *vm);
+
int getCharWidth(uint16 chr);
+ int getFontHeight();
+
+private:
+ void enableShadow(bool enable);
+ void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth);
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+ int getDrawWidthIntern(uint16 chr);
+ int getDrawHeightIntern(uint16 chr);
+ void setDrawCharIntern(uint16 chr);
+#endif
+ uint16 _sjisCurChar;
};
#ifdef USE_RGB_COLOR
class CharsetRendererPCE : public CharsetRendererV3 {
-protected:
- void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth, bool scale2x = false);
+private:
+ void drawBits1(const Graphics::Surface &s, byte *dst, const byte *src, int drawTop, int width, int height, uint8 bitDepth);
+
+ int getDrawWidthIntern(uint16 chr);
+ int getDrawHeightIntern(uint16 chr);
+ void setDrawCharIntern(uint16 chr);
+
+ uint16 _sjisCurChar;
public:
- CharsetRendererPCE(ScummEngine *vm) : CharsetRendererV3(vm) {}
+ CharsetRendererPCE(ScummEngine *vm) : CharsetRendererV3(vm), _sjisCurChar(0) {}
void setColor(byte color);
};
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 75cde5e33a..4ca4988605 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -73,10 +73,10 @@ static const int v1MMNESLookup[25] = {
};
static const byte v0ActorTalkArray[0x19] = {
- 0x00, 0x06, 0x06, 0x06, 0x06,
- 0x06, 0x06, 0x00, 0x46, 0x06,
- 0x06, 0x06, 0x06, 0xFF, 0xFF,
- 0x06, 0xC0, 0x06, 0x06, 0x00,
+ 0x00, 0x06, 0x06, 0x06, 0x06,
+ 0x06, 0x06, 0x00, 0x46, 0x06,
+ 0x06, 0x06, 0x06, 0xFF, 0xFF,
+ 0x06, 0xC0, 0x06, 0x06, 0x00,
0xC0, 0xC0, 0x00, 0x06, 0x06
};
@@ -1417,7 +1417,7 @@ byte C64CostumeLoader::increaseAnims(Actor *a) {
if (A->_moving && _vm->_currentRoom != 1 && _vm->_currentRoom != 44) {
if (a->_cost.soundPos == 0)
a->_cost.soundCounter++;
-
+
// Is this the correct location?
// 0x073C
if (v0ActorTalkArray[a->_number] & 0x3F)
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index e9b5260eca..a8adb4d5c5 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -551,7 +551,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
uint16 color;
const uint16 *src = _cursorImages[_currentCursor];
- if (_bytesPerPixelOutput == 2) {
+ if (_outputPixelFormat.bytesPerPixel == 2) {
if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) {
byte r, g, b;
colorPCEToRGB(default_pce_cursor_colors[idx], &r, &g, &b);
@@ -577,14 +577,14 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
_cursor.width = 16 * _textSurfaceMultiplier;
_cursor.height = 16 * _textSurfaceMultiplier;
- int scl = _bytesPerPixelOutput * _textSurfaceMultiplier;
+ int scl = _outputPixelFormat.bytesPerPixel * _textSurfaceMultiplier;
for (i = 0; i < 16; i++) {
for (j = 0; j < 16; j++) {
if (src[i] & (1 << j)) {
byte *dst1 = _grabbedCursor + 16 * scl * i * _textSurfaceMultiplier + (15 - j) * scl;
byte *dst2 = (_textSurfaceMultiplier == 2) ? dst1 + 16 * scl : dst1;
- if (_bytesPerPixelOutput == 2) {
+ if (_outputPixelFormat.bytesPerPixel == 2) {
for (int b = 0; b < scl; b += 2) {
*((uint16*)dst1) = *((uint16*)dst2) = color;
dst1 += 2;
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index e5c5906404..d3514645d3 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -142,6 +142,14 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {
Common::String result;
char id = 0;
+ Common::String bPattern = _filenamePattern.pattern;
+
+ // Special cases for Blue's games, which share common (b) files
+ if (_game.id == GID_BIRTHDAY && !(_game.features & GF_DEMO))
+ bPattern = "Blue'sBirthday";
+ else if (_game.id == GID_TREASUREHUNT)
+ bPattern = "Blue'sTreasureHunt";
+
switch (_filenamePattern.genMethod) {
case kGenHEMac:
case kGenHEMacNoParens:
@@ -154,13 +162,7 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {
switch (disk) {
case 2:
id = 'b';
- // Special cases for Blue's games, which share common (b) files
- if (_game.id == GID_BIRTHDAY && !(_game.features & GF_DEMO))
- result = "Blue'sBirthday.(b)";
- else if (_game.id == GID_TREASUREHUNT)
- result = "Blue'sTreasureHunt.(b)";
- else
- result = Common::String::format("%s.(b)", _filenamePattern.pattern);
+ result = bPattern + ".(b)";
break;
case 1:
id = 'a';
@@ -185,10 +187,11 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const {
// For mac they're stored in game binary
result = _filenamePattern.pattern;
} else {
+ Common::String pattern = id == 'b' ? bPattern : _filenamePattern.pattern;
if (_filenamePattern.genMethod == kGenHEMac)
- result = Common::String::format("%s (%c)", _filenamePattern.pattern, id);
+ result = Common::String::format("%s (%c)", pattern.c_str(), id);
else
- result = Common::String::format("%s %c", _filenamePattern.pattern, id);
+ result = Common::String::format("%s %c", pattern.c_str(), id);
}
}
@@ -272,7 +275,7 @@ static BaseScummFile *openDiskImage(const Common::FSNode &node, const GameFilena
GameSettings gs;
memset(&gs, 0, sizeof(GameSettings));
gs.gameid = gfp->gameid;
- gs.id = (Common::String(gfp->gameid) == "maniac" ? GID_MANIAC : GID_ZAK);
+ gs.id = (Common::String(gfp->gameid) == "maniac" ? GID_MANIAC : GID_ZAK);
gs.platform = gfp->platform;
// determine second disk file name
@@ -454,7 +457,7 @@ static void composeFileHashMap(DescMap &fileMD5Map, const Common::FSList &fslist
matched = true;
break;
}
-
+
if (!matched)
continue;
@@ -515,7 +518,7 @@ static void detectGames(const Common::FSList &fslist, Common::List<DetectorResul
if (d.md5.empty()) {
Common::SeekableReadStream *tmp = 0;
bool isDiskImg = (file.hasSuffix(".d64") || file.hasSuffix(".dsk") || file.hasSuffix(".prg"));
-
+
if (isDiskImg) {
tmp = openDiskImage(d.node, gfp);
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index e510c46cf2..11901f7565 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -243,11 +243,11 @@ static const GameSettings gameVariantsTable[] = {
{"monkey", "FM-TOWNS", 0, GID_MONKEY, 5, 0, MDT_TOWNS, GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_NOMIDI | GUIO_MIDITOWNS},
{"monkey", "SEGA", 0, GID_MONKEY, 5, 0, MDT_NONE, GF_AUDIOTRACKS, Common::kPlatformSegaCD, GUIO_NOSPEECH | GUIO_NOMIDI},
- {"monkey2", "", 0, GID_MONKEY2, 5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
- {"monkey2", "FM-TOWNS", 0, GID_MONKEY2, 5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_MIDITOWNS | GUIO_MIDIADLIB | GUIO_MIDIMT32},
+ {"monkey2", "", 0, GID_MONKEY2, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
+ {"monkey2", "FM-TOWNS", 0, GID_MONKEY2, 5, 0, MDT_PCSPK | MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_NOSPEECH | GUIO_MIDITOWNS | GUIO_MIDIADLIB | GUIO_MIDIMT32},
- {"atlantis", "", 0, GID_INDY4, 5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NONE},
- {"atlantis", "Floppy", 0, GID_INDY4, 5, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
+ {"atlantis", "", 0, GID_INDY4, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NONE},
+ {"atlantis", "Floppy", 0, GID_INDY4, 5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO_NOSPEECH},
{"atlantis", "FM-TOWNS", 0, GID_INDY4, 5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO_MIDITOWNS | GUIO_MIDIADLIB | GUIO_MIDIMT32},
{"tentacle", "", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO_NONE},
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 1b913e16b4..f22547f193 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -251,7 +251,7 @@ GdiV2::~GdiV2() {
}
#ifdef USE_RGB_COLOR
-Gdi16Bit::Gdi16Bit(ScummEngine *vm) : Gdi(vm) {
+GdiHE16bit::GdiHE16bit(ScummEngine *vm) : GdiHE(vm) {
}
#endif
@@ -652,16 +652,13 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
assert(0 == (width & 3));
// Compose the text over the game graphics
-#ifdef USE_ARM_GFX_ASM
- asmDrawStripToScreen(height, width, text, src, _compositeBuf, vs->pitch, width, _textSurface.pitch);
-#else
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns) {
towns_drawStripToScreen(vs, x, y, x, top, width, height);
- return;
+ return;
} else
-#endif
- if (_bytesPerPixelOutput == 2) {
+#endif
+ if (_outputPixelFormat.bytesPerPixel == 2) {
const byte *srcPtr = (const byte *)src;
const byte *textPtr = (byte *)_textSurface.getBasePtr(x * m, y * m);
byte *dstPtr = _compositeBuf;
@@ -682,7 +679,11 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
srcPtr += vsPitch;
textPtr += _textSurface.pitch - width * m;
}
- } else {
+ }
+#ifdef USE_ARM_GFX_ASM
+ asmDrawStripToScreen(height, width, text, src, _compositeBuf, vs->pitch, width, _textSurface.pitch);
+#else
+ else {
// We blit four pixels at a time, for improved performance.
const uint32 *src32 = (const uint32 *)src;
uint32 *dst32 = (uint32 *)_compositeBuf;
@@ -721,11 +722,11 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
ditherHerc(_compositeBuf, _herculesBuf, width, &x, &y, &width, &height);
- src = _herculesBuf + x + y * Common::kHercW;
- pitch = Common::kHercW;
+ src = _herculesBuf + x + y * kHercWidth;
+ pitch = kHercWidth;
// center image on the screen
- x += (Common::kHercW - _screenWidth * 2) / 2; // (720 - 320*2)/2 = 40
+ x += (kHercWidth - _screenWidth * 2) / 2; // (720 - 320*2)/2 = 40
} else if (_useCJKMode && m == 2) {
pitch *= m;
x *= m;
@@ -818,10 +819,10 @@ void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid
int dsty = yo*2 - yo/4;
for (int y1 = 0; y1 < heighto;) {
- assert(dsty < Common::kHercH);
+ assert(dsty < kHercHeight);
srcptr = src + y1 * srcPitch;
- dstptr = hercbuf + dsty * Common::kHercW + xo * 2;
+ dstptr = hercbuf + dsty * kHercWidth + xo * 2;
const int idx1 = (dsty % 7) % 2;
for (int x1 = 0; x1 < widtho; x1++) {
@@ -1023,7 +1024,7 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
if (rect.left > vs->w)
return;
-
+
// Convert 'rect' to local (virtual screen) coordinates
rect.top -= vs->topline;
rect.bottom -= vs->topline;
@@ -1067,7 +1068,7 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
fill(mask, _textSurface.pitch, backColor, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
}
#endif
-
+
if (_game.features & GF_16BIT_COLOR)
fill(screenBuf, vs->pitch, _16BitPalette[backColor], width, height, vs->format.bytesPerPixel);
else
@@ -1127,7 +1128,7 @@ void ScummEngine::clearTextSurface() {
fill((byte*)_textSurface.pixels, _textSurface.pitch,
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
_game.platform == Common::kPlatformFMTowns ? 0 :
-#endif
+#endif
CHARSET_MASK_TRANSPARENCY, _textSurface.w, _textSurface.h, _textSurface.format.bytesPerPixel);
}
@@ -1344,12 +1345,12 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) {
color = ((color & 0x0f) << 4) | (color & 0x0f);
byte *mask = (byte *)_textSurface.getBasePtr(x * _textSurfaceMultiplier, (y - _screenTop + vs->topline) * _textSurfaceMultiplier);
fill(mask, _textSurface.pitch, color, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
-
+
if (_game.id == GID_MONKEY2 || _game.id == GID_INDY4 || ((_game.id == GID_INDY3 || _game.id == GID_ZAK) && vs->number != kTextVirtScreen) || (_game.id == GID_LOOM && vs->number == kMainVirtScreen))
return;
}
#endif
-
+
fill(backbuff, vs->pitch, color, width, height, vs->format.bytesPerPixel);
}
}
@@ -3673,7 +3674,7 @@ void Gdi::unkDecode11(byte *dst, int dstPitch, const byte *src, int height) cons
#undef READ_BIT_256
#ifdef USE_RGB_COLOR
-void Gdi16Bit::writeRoomColor(byte *dst, byte color) const {
+void GdiHE16bit::writeRoomColor(byte *dst, byte color) const {
WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2));
}
#endif
@@ -4009,7 +4010,7 @@ void ScummEngine::scrollEffect(int dir) {
y = 1 + step;
while (y < vs->h) {
moveScreen(0, -step, vs->h);
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_townsScreen) {
towns_drawStripToScreen(vs, 0, vs->topline + vs->h - step, 0, y - step, vs->w, step);
} else
@@ -4022,7 +4023,7 @@ void ScummEngine::scrollEffect(int dir) {
vs->w * m, step * m);
_system->updateScreen();
}
-
+
waitForTimer(delay);
y += step;
}
@@ -4045,7 +4046,7 @@ void ScummEngine::scrollEffect(int dir) {
vs->w * m, step * m);
_system->updateScreen();
}
-
+
waitForTimer(delay);
y += step;
}
@@ -4092,7 +4093,7 @@ void ScummEngine::scrollEffect(int dir) {
0, 0,
step, vs->h);
_system->updateScreen();
- }
+ }
waitForTimer(delay);
x += step;
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index 6da07efd18..4b44ddc376 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -32,6 +32,11 @@ namespace Scumm {
class ScummEngine;
+enum HerculesDimensions {
+ kHercWidth = 720,
+ kHercHeight = 350
+};
+
/** Camera modes */
enum {
kNormalCameraMode = 1,
@@ -430,11 +435,11 @@ public:
};
#ifdef USE_RGB_COLOR
-class Gdi16Bit : public Gdi {
+class GdiHE16bit : public GdiHE {
protected:
virtual void writeRoomColor(byte *dst, byte color) const;
public:
- Gdi16Bit(ScummEngine *vm);
+ GdiHE16bit(ScummEngine *vm);
};
#endif
@@ -443,21 +448,21 @@ public:
// switching graphics layers on and off).
class TownsScreen {
public:
- TownsScreen(OSystem *system, int width, int height, int bpp);
+ TownsScreen(OSystem *system, int width, int height, Graphics::PixelFormat &format);
~TownsScreen();
void setupLayer(int layer, int width, int height, int numCol, void *srcPal = 0);
void clearLayer(int layer);
void fillLayerRect(int layer, int x, int y, int w, int h, int col);
//void copyRectToLayer(int layer, int x, int y, int w, int h, const uint8 *src);
-
+
uint8 *getLayerPixels(int layer, int x, int y);
int getLayerPitch(int layer);
int getLayerHeight(int layer);
int getLayerBpp(int layer);
int getLayerScaleW(int layer);
int getLayerScaleH(int layer);
-
+
void addDirtyRect(int x, int y, int w, int h);
void toggleLayers(int flag);
void update();
@@ -484,16 +489,16 @@ private:
uint8 **bltInternY;
uint16 *bltTmpPal;
} _layers[2];
-
+
uint8 *_outBuffer;
int _height;
int _width;
int _pitch;
- int _bpp;
-
+ Graphics::PixelFormat _pixelFormat;
+
int _numDirtyRects;
- Common::List<Common::Rect> _dirtyRects;
+ Common::List<Common::Rect> _dirtyRects;
OSystem *_system;
};
#endif // DISABLE_TOWNS_DUAL_LAYER_MODE
diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp
index cdccd3e193..6a3f50a1af 100644
--- a/engines/scumm/gfx_towns.cpp
+++ b/engines/scumm/gfx_towns.cpp
@@ -47,13 +47,13 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
int dp2 = _townsScreen->getLayerPitch(1) - width * m * _townsScreen->getLayerBpp(1);
int sp1 = vs->pitch - (width * vs->format.bytesPerPixel);
int sp2 = _textSurface.pitch - width * m;
-
+
if (vs->number == kMainVirtScreen || _game.id == GID_INDY3 || _game.id == GID_ZAK) {
for (int h = 0; h < height; ++h) {
- if (_bytesPerPixelOutput == 2) {
+ if (_outputPixelFormat.bytesPerPixel == 2) {
for (int w = 0; w < width; ++w) {
*(uint16*)dst1 = _16BitPalette[*src1++];
- dst1 += _bytesPerPixelOutput;
+ dst1 += _outputPixelFormat.bytesPerPixel;
}
src1 += sp1;
@@ -63,13 +63,13 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
src1 += vs->pitch;
dst1 += _townsScreen->getLayerPitch(0);
}
-
+
for (int sH = 0; sH < m; ++sH) {
memcpy(dst2, src2, width * m);
src2 += _textSurface.pitch;
dst2 += _townsScreen->getLayerPitch(1);
}
- }
+ }
} else {
dst1 = dst2;
for (int h = 0; h < height; ++h) {
@@ -81,7 +81,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
dst1 = dst2;
uint8 *src3 = src2;
-
+
if (m == 2) {
dst2 += _townsScreen->getLayerPitch(1);
src3 += _townsScreen->getLayerPitch(1);
@@ -95,7 +95,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
dst1++;
}
- src1 += sp1;
+ src1 += sp1;
src2 = src3 + sp2;
dst1 = dst2 + dp2;
dst2 += dp2;
@@ -197,8 +197,8 @@ const uint8 ScummEngine::_townsLayer2Mask[] = {
#define DIRTY_RECTS_MAX 20
#define FULL_REDRAW (DIRTY_RECTS_MAX + 1)
-TownsScreen::TownsScreen(OSystem *system, int width, int height, int bpp) :
- _system(system), _width(width), _height(height), _bpp(bpp), _pitch(width * bpp) {
+TownsScreen::TownsScreen(OSystem *system, int width, int height, Graphics::PixelFormat &format) :
+ _system(system), _width(width), _height(height), _pixelFormat(format), _pitch(width * format.bytesPerPixel) {
memset(&_layers[0], 0, sizeof(TownsScreenLayer));
memset(&_layers[1], 0, sizeof(TownsScreenLayer));
_outBuffer = new byte[_pitch * _height];
@@ -231,7 +231,7 @@ void TownsScreen::setupLayer(int layer, int width, int height, int numCol, void
if (width > _width || height > _height)
error("TownsScreen::setupLayer(): Layer width/height must be equal or less than screen width/height");
-
+
l->scaleW = _width / width;
l->scaleH = _height / height;
@@ -247,7 +247,7 @@ void TownsScreen::setupLayer(int layer, int width, int height, int numCol, void
l->pitch = width * l->bpp;
l->palette = (uint8*)pal;
- if (l->palette && _bpp == 1)
+ if (l->palette && _pixelFormat.bytesPerPixel == 1)
warning("TownsScreen::setupLayer(): Layer palette usage requires 16 bit graphics setting.\nLayer palette will be ignored.");
delete[] l->pixels;
@@ -267,14 +267,14 @@ void TownsScreen::setupLayer(int layer, int width, int height, int numCol, void
l->bltInternY[i] = l->pixels + (i / l->scaleH) * l->pitch;
delete[] l->bltTmpPal;
- l->bltTmpPal = (l->bpp == 1 && _bpp == 2) ? new uint16[l->numCol] : 0;
-
+ l->bltTmpPal = (l->bpp == 1 && _pixelFormat.bytesPerPixel == 2) ? new uint16[l->numCol] : 0;
+
l->enabled = true;
_layers[0].onBottom = true;
_layers[1].onBottom = _layers[0].enabled ? false : true;
l->ready = true;
}
-
+
void TownsScreen::clearLayer(int layer) {
if (layer < 0 || layer > 1)
return;
@@ -300,10 +300,10 @@ void TownsScreen::fillLayerRect(int layer, int x, int y, int w, int h, int col)
assert(x >= 0 && y >= 0 && ((x + w) * l->bpp) <= (l->pitch) && (y + h) <= (l->height));
uint8 *pos = l->pixels + y * l->pitch + x * l->bpp;
-
+
for (int i = 0; i < h; ++i) {
if (l->bpp == 2) {
- for (int ii = 0; ii < w; ++ii) {
+ for (int ii = 0; ii < w; ++ii) {
*(uint16*)pos = col;
pos += 2;
}
@@ -359,8 +359,8 @@ int TownsScreen::getLayerScaleH(int layer) {
void TownsScreen::addDirtyRect(int x, int y, int w, int h) {
if (w <= 0 || h <= 0 || _numDirtyRects > DIRTY_RECTS_MAX)
- return;
-
+ return;
+
if (_numDirtyRects == DIRTY_RECTS_MAX) {
// full redraw
_dirtyRects.clear();
@@ -383,25 +383,25 @@ void TownsScreen::addDirtyRect(int x, int y, int w, int h) {
y = r->top;
skip = true;
}
-
+
if (x2 > r->left && x2 < r->right && y > r->top && y < r->bottom) {
x2 = r->right;
y = r->top;
skip = true;
}
-
+
if (x2 > r->left && x2 < r->right && y2 > r->top && y2 < r->bottom) {
x2 = r->right;
y2 = r->bottom;
skip = true;
}
-
+
if (x > r->left && x < r->right && y2 > r->top && y2 < r->bottom) {
x = r->left;
y2 = r->bottom;
skip = true;
- }
-
+ }
+
if (skip) {
r->left = x;
r->top = y;
@@ -449,20 +449,22 @@ void TownsScreen::updateOutputBuffer() {
if (!l->enabled || !l->ready)
continue;
- uint8 *dst = _outBuffer + r->top * _pitch + r->left * _bpp;
- int ptch = _pitch - (r->right - r->left + 1) * _bpp;
+ uint8 *dst = _outBuffer + r->top * _pitch + r->left * _pixelFormat.bytesPerPixel;
+ int ptch = _pitch - (r->right - r->left + 1) * _pixelFormat.bytesPerPixel;
- if (_bpp == 2 && l->bpp == 1) {
+ if (_pixelFormat.bytesPerPixel == 2 && l->bpp == 1) {
+ if (!l->palette)
+ error("void TownsScreen::updateOutputBuffer(): No palette assigned to 8 bit layer %d", i);
for (int ic = 0; ic < l->numCol; ic++)
l->bltTmpPal[ic] = calc16BitColor(&l->palette[ic * 3]);
}
for (int y = r->top; y <= r->bottom; ++y) {
- if (l->bpp == _bpp && l->scaleW == 1 && l->onBottom && l->numCol & 0xff00) {
- memcpy(dst, &l->bltInternY[y][l->bltInternX[r->left]], (r->right + 1 - r->left) * _bpp);
+ if (l->bpp == _pixelFormat.bytesPerPixel && l->scaleW == 1 && l->onBottom && l->numCol & 0xff00) {
+ memcpy(dst, &l->bltInternY[y][l->bltInternX[r->left]], (r->right + 1 - r->left) * _pixelFormat.bytesPerPixel);
dst += _pitch;
- } else if (_bpp == 2) {
+ } else if (_pixelFormat.bytesPerPixel == 2) {
for (int x = r->left; x <= r->right; ++x) {
uint8 *src = &l->bltInternY[y][l->bltInternX[x]];
if (l->bpp == 1) {
@@ -484,13 +486,13 @@ void TownsScreen::updateOutputBuffer() {
uint8 col = l->bltInternY[y][l->bltInternX[x]];
if (col || l->onBottom) {
if (l->numCol == 16)
- col = (col >> 4) & (col & 0x0f);
+ col = (col >> 4) & (col & 0x0f);
*dst = col;
}
dst++;
}
dst += ptch;
- }
+ }
}
}
}
@@ -498,17 +500,13 @@ void TownsScreen::updateOutputBuffer() {
void TownsScreen::outputToScreen() {
for (Common::List<Common::Rect>::iterator i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i)
- _system->copyRectToScreen(_outBuffer + i->top * _pitch + i->left * _bpp, _pitch, i->left, i->top, i->right - i->left + 1, i->bottom - i->top + 1);
+ _system->copyRectToScreen(_outBuffer + i->top * _pitch + i->left * _pixelFormat.bytesPerPixel, _pitch, i->left, i->top, i->right - i->left + 1, i->bottom - i->top + 1);
_dirtyRects.clear();
_numDirtyRects = 0;
}
uint16 TownsScreen::calc16BitColor(const uint8 *palEntry) {
- uint16 ar = (palEntry[0] & 0xf8) << 7;
- uint16 ag = (palEntry[1] & 0xf8) << 2;
- uint16 ab = (palEntry[2] >> 3);
- uint16 col = ar | ag | ab;
- return col;
+ return _pixelFormat.RGBToColor(palEntry[0], palEntry[1], palEntry[2]);
}
#undef DIRTY_RECTS_MAX
diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp
index 74183c24d3..40e99c26a8 100644
--- a/engines/scumm/he/animation_he.cpp
+++ b/engines/scumm/he/animation_he.cpp
@@ -26,27 +26,42 @@
#include "scumm/he/intern_he.h"
#include "audio/audiostream.h"
+#include "video/smk_decoder.h"
+
+#ifdef USE_BINK
+#include "video/bink_decoder.h"
+#endif
namespace Scumm {
-MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer)
- : SmackerDecoder(mixer), _vm(vm), _mixer(mixer) {
+MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) {
+#ifdef USE_BINK
+ if (_vm->_game.heversion >= 100 && (_vm->_game.features & GF_16BIT_COLOR))
+ _video = new Video::BinkDecoder();
+ else
+#endif
+ _video = new Video::SmackerDecoder(mixer);
_flags = 0;
_wizResNum = 0;
}
+MoviePlayer::~MoviePlayer() {
+ delete _video;
+}
+
int MoviePlayer::getImageNum() {
- if (!isVideoLoaded())
+ if (!_video->isVideoLoaded())
return 0;
+
return _wizResNum;
}
int MoviePlayer::load(const char *filename, int flags, int image) {
- if (isVideoLoaded())
- close();
+ if (_video->isVideoLoaded())
+ _video->close();
- if (!loadFile(filename)) {
+ if (!_video->loadFile(filename)) {
warning("Failed to load video file %s", filename);
return -1;
}
@@ -54,7 +69,7 @@ int MoviePlayer::load(const char *filename, int flags, int image) {
debug(1, "Playing video %s", filename);
if (flags & 2)
- _vm->_wiz->createWizEmptyImage(image, 0, 0, getWidth(), getHeight());
+ _vm->_wiz->createWizEmptyImage(image, 0, 0, _video->getWidth(), _video->getHeight());
_flags = flags;
_wizResNum = image;
@@ -62,34 +77,59 @@ int MoviePlayer::load(const char *filename, int flags, int image) {
}
void MoviePlayer::copyFrameToBuffer(byte *dst, int dstType, uint x, uint y, uint pitch) {
- uint h = getHeight();
- uint w = getWidth();
+ uint h = _video->getHeight();
+ uint w = _video->getWidth();
+
+ const Graphics::Surface *surface = _video->decodeNextFrame();
+
+ if (!surface)
+ return;
- const Graphics::Surface *surface = decodeNextFrame();
byte *src = (byte *)surface->pixels;
- if (hasDirtyPalette())
- _vm->setPaletteFromPtr(getPalette(), 256);
+ if (_video->hasDirtyPalette())
+ _vm->setPaletteFromPtr(_video->getPalette(), 256);
if (_vm->_game.features & GF_16BIT_COLOR) {
- dst += y * pitch + x * 2;
- do {
- for (uint i = 0; i < w; i++) {
- uint16 color = READ_LE_UINT16(_vm->_hePalettes + _vm->_hePaletteSlot + 768 + src[i] * 2);
- switch (dstType) {
- case kDstScreen:
- WRITE_UINT16(dst + i * 2, color);
- break;
- case kDstResource:
- WRITE_LE_UINT16(dst + i * 2, color);
- break;
- default:
- error("copyFrameToBuffer: Unknown dstType %d", dstType);
+ if (surface->format.bytesPerPixel == 1) {
+ dst += y * pitch + x * 2;
+ do {
+ for (uint i = 0; i < w; i++) {
+ uint16 color = READ_LE_UINT16(_vm->_hePalettes + _vm->_hePaletteSlot + 768 + src[i] * 2);
+ switch (dstType) {
+ case kDstScreen:
+ WRITE_UINT16(dst + i * 2, color);
+ break;
+ case kDstResource:
+ WRITE_LE_UINT16(dst + i * 2, color);
+ break;
+ default:
+ error("copyFrameToBuffer: Unknown dstType %d", dstType);
+ }
}
- }
- dst += pitch;
- src += w;
- } while (--h);
+ dst += pitch;
+ src += w;
+ } while (--h);
+ } else {
+ dst += y * pitch + x * 2;
+ do {
+ for (uint i = 0; i < w; i++) {
+ uint16 color = *((uint16 *)src + i);
+ switch (dstType) {
+ case kDstScreen:
+ WRITE_UINT16(dst + i * 2, color);
+ break;
+ case kDstResource:
+ WRITE_LE_UINT16(dst + i * 2, color);
+ break;
+ default:
+ error("copyFrameToBuffer: Unknown dstType %d", dstType);
+ }
+ }
+ dst += pitch;
+ src += surface->pitch;
+ } while (--h);
+ }
} else {
dst += y * pitch + x;
do {
@@ -101,7 +141,7 @@ void MoviePlayer::copyFrameToBuffer(byte *dst, int dstType, uint x, uint y, uint
}
void MoviePlayer::handleNextFrame() {
- if (!isVideoLoaded())
+ if (!_video->isVideoLoaded())
return;
VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen];
@@ -115,17 +155,37 @@ void MoviePlayer::handleNextFrame() {
} else if (_flags & 1) {
copyFrameToBuffer(pvs->getBackPixels(0, 0), kDstScreen, 0, 0, pvs->pitch);
- Common::Rect imageRect(getWidth(), getHeight());
+ Common::Rect imageRect(_video->getWidth(), _video->getHeight());
_vm->restoreBackgroundHE(imageRect);
} else {
copyFrameToBuffer(pvs->getPixels(0, 0), kDstScreen, 0, 0, pvs->pitch);
- Common::Rect imageRect(getWidth(), getHeight());
+ Common::Rect imageRect(_video->getWidth(), _video->getHeight());
_vm->markRectAsDirty(kMainVirtScreen, imageRect);
}
- if (endOfVideo())
- close();
+ if (_video->endOfVideo())
+ _video->close();
+}
+
+void MoviePlayer::close() {
+ _video->close();
+}
+
+int MoviePlayer::getWidth() const {
+ return _video->getWidth();
+}
+
+int MoviePlayer::getHeight() const {
+ return _video->getHeight();
+}
+
+int MoviePlayer::getFrameCount() const {
+ return _video->getFrameCount();
+}
+
+int MoviePlayer::getCurFrame() const {
+ return _video->endOfVideo() ? -1 : _video->getCurFrame() + 1;
}
} // End of namespace Scumm
diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h
index b3405fead0..7fa31a195d 100644
--- a/engines/scumm/he/animation_he.h
+++ b/engines/scumm/he/animation_he.h
@@ -23,34 +23,41 @@
#if !defined(SCUMM_HE_ANIMATION_H) && defined(ENABLE_HE)
#define SCUMM_HE_ANIMATION_H
-#include "video/smk_decoder.h"
-
#include "audio/mixer.h"
+namespace Video {
+ class VideoDecoder;
+}
+
namespace Scumm {
class ScummEngine_v90he;
-class MoviePlayer : public Video::SmackerDecoder {
- ScummEngine_v90he *_vm;
-
- Audio::Mixer *_mixer;
-
- Audio::SoundHandle _bgSound;
- Audio::AudioStream *_bgSoundStream;
-
- char baseName[40];
- uint32 _flags;
- uint32 _wizResNum;
-
+class MoviePlayer {
public:
MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer);
+ ~MoviePlayer();
int getImageNum();
int load(const char *filename, int flags, int image = 0);
void copyFrameToBuffer(byte *dst, int dstType, uint x, uint y, uint pitch);
void handleNextFrame();
+
+ void close();
+ int getWidth() const;
+ int getHeight() const;
+ int getFrameCount() const;
+ int getCurFrame() const;
+
+private:
+ ScummEngine_v90he *_vm;
+
+ Video::VideoDecoder *_video;
+
+ char baseName[40];
+ uint32 _flags;
+ uint32 _wizResNum;
};
} // End of namespace Scumm
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index a7d808e316..af56bca2ee 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -1018,7 +1018,7 @@ int LogicHEsoccer::op_1007(int32 *args) {
// Returns the square root of the sum of the squares of the arguments
static inline double sqrtSquare(double a1, double a2, double a3) {
return sqrt(a1 * a1 + a2 * a2 + a3 * a3);
-}
+}
int LogicHEsoccer::op_1008(int32 *args) {
// TODO: Used during a match (kicking?)
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index 4565bb9f26..39240e347f 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -166,7 +166,7 @@ bool MacResExtractor::extractResource(int id, CachedCursor *cc) {
}
Common::SeekableReadStream *dataStream = _resMgr->getResource('crsr', id + 1000);
-
+
if (!dataStream)
return false;
diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h
index 9978869ffc..6996ce81eb 100644
--- a/engines/scumm/he/resource_he.h
+++ b/engines/scumm/he/resource_he.h
@@ -61,7 +61,7 @@ private:
ResExtractor::CachedCursor *findCachedCursor(int id);
ResExtractor::CachedCursor *getCachedCursorSlot();
-
+
CachedCursor _cursorCache[MAX_CACHED_CURSORS];
};
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index e057ab524a..5a9172ff8a 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -2933,7 +2933,7 @@ void ScummEngine_v100he::o100_getVideoData() {
break;
case 73:
pop();
- push(_moviePlay->endOfVideo() ? -1 : (_moviePlay->getCurFrame() + 1));
+ push(_moviePlay->getCurFrame());
break;
case 84:
pop();
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index fb070b3e27..dbeee567bf 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -94,6 +94,12 @@ int ScummEngine_v60he::convertFilePath(byte *dst, int dstSize) {
debug(1, "convertFilePath: original filePath is %s", dst);
int len = resStrLen(dst);
+
+ // Switch all \ to / for portablity
+ for (int i = 0; i < len; i++)
+ if (dst[i] == '\\')
+ dst[i] = '/';
+
if (_game.platform == Common::kPlatformMacintosh) {
// Remove : prefix in HE71 games
if (dst[0] == ':') {
@@ -107,12 +113,6 @@ int ScummEngine_v60he::convertFilePath(byte *dst, int dstSize) {
if (dst[i] == ':')
dst[i] = '/';
}
- } else {
- // Switch all \ to / for portablity
- for (int i = 0; i < len; i++) {
- if (dst[i] == '\\')
- dst[i] = '/';
- }
}
// Strip path
@@ -744,7 +744,7 @@ void ScummEngine_v60he::o60_closeFile() {
_hOutFileTable[slot] = 0;
}
- delete _hInFileTable[slot];
+ delete _hInFileTable[slot];
_hInFileTable[slot] = 0;
}
}
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 8f16bf0f3a..5af4035930 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -1446,7 +1446,7 @@ void ScummEngine_v72he::o72_openFile() {
_hOutFileTable[slot]->write(initialData, initialSize);
delete[] initialData;
}
-
+
} break;
default:
error("o72_openFile(): wrong open file mode %d", mode);
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index 6b632d8ff2..66a0a34d16 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -1460,7 +1460,7 @@ void ScummEngine_v90he::o90_getVideoData() {
break;
case 52: // Get current frame
pop();
- push(_moviePlay->endOfVideo() ? -1 : (_moviePlay->getCurFrame() + 1));
+ push(_moviePlay->getCurFrame());
break;
case 63: // Get image number
pop();
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 7d971f5ca4..27a72c2afe 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -26,6 +26,7 @@
#include "common/util.h"
#include "common/system.h"
+#include "common/endian.h"
#include "scumm/imuse/imuse.h"
#include "scumm/imuse/imuse_internal.h"
@@ -43,30 +44,31 @@ namespace Scumm {
////////////////////////////////////////
IMuseInternal::IMuseInternal() :
-_native_mt32(false),
-_enable_gs(false),
-_sc55(false),
-_midi_adlib(NULL),
-_midi_native(NULL),
-_sysex(NULL),
-_paused(false),
-_initialized(false),
-_tempoFactor(0),
-_player_limit(ARRAYSIZE(_players)),
-_recycle_players(false),
-_queue_end(0),
-_queue_pos(0),
-_queue_sound(0),
-_queue_adding(0),
-_queue_marker(0),
-_queue_cleared(0),
-_master_volume(0),
-_music_volume(0),
-_trigger_count(0),
-_snm_trigger_index(0) {
- memset(_channel_volume,0,sizeof(_channel_volume));
- memset(_channel_volume_eff,0,sizeof(_channel_volume_eff));
- memset(_volchan_table,0,sizeof(_volchan_table));
+ _native_mt32(false),
+ _enable_gs(false),
+ _sc55(false),
+ _midi_adlib(NULL),
+ _midi_native(NULL),
+ _sysex(NULL),
+ _paused(false),
+ _initialized(false),
+ _tempoFactor(0),
+ _player_limit(ARRAYSIZE(_players)),
+ _recycle_players(false),
+ _queue_end(0),
+ _queue_pos(0),
+ _queue_sound(0),
+ _queue_adding(0),
+ _queue_marker(0),
+ _queue_cleared(0),
+ _master_volume(0),
+ _music_volume(0),
+ _trigger_count(0),
+ _snm_trigger_index(0),
+ _pcSpeaker(false) {
+ memset(_channel_volume, 0, sizeof(_channel_volume));
+ memset(_channel_volume_eff, 0, sizeof(_channel_volume_eff));
+ memset(_volchan_table, 0, sizeof(_volchan_table));
}
IMuseInternal::~IMuseInternal() {
@@ -99,9 +101,15 @@ IMuseInternal::~IMuseInternal() {
}
}
-byte *IMuseInternal::findStartOfSound(int sound, int ct) {
+byte *IMuseInternal::findStartOfSound(int sound, int ct) {
int32 size, pos;
- static uint32 id[] = { 'MThd', 'FORM', 'MDhd', 'MDpg' };
+
+ static const uint32 id[] = {
+ MKTAG('M', 'T', 'h', 'd'),
+ MKTAG('F', 'O', 'R', 'M'),
+ MKTAG('M', 'D', 'h', 'd'),
+ MKTAG('M', 'D', 'p', 'g')
+ };
byte *ptr = g_scumm->_res->_types[rtSound][sound]._address;
@@ -112,7 +120,7 @@ byte *IMuseInternal::findStartOfSound(int sound, int ct) {
// Check for old-style headers first, like 'RO'
int trFlag = (kMThd | kFORM);
- if (ptr[0] == 'R' && ptr[1] == 'O'&& ptr[2] != 'L')
+ if (ptr[0] == 'R' && ptr[1] == 'O' && ptr[2] != 'L')
return ct == trFlag ? ptr : 0;
if (ptr[4] == 'S' && ptr[5] == 'O')
return ct == trFlag ? ptr + 4 : 0;
@@ -146,22 +154,22 @@ bool IMuseInternal::isMT32(int sound) {
uint32 tag = READ_BE_UINT32(ptr);
switch (tag) {
- case MKTAG('A','D','L',' '):
- case MKTAG('A','S','F','X'): // Special AD class for old AdLib sound effects
- case MKTAG('S','P','K',' '):
+ case MKTAG('A', 'D', 'L', ' '):
+ case MKTAG('A', 'S', 'F', 'X'): // Special AD class for old AdLib sound effects
+ case MKTAG('S', 'P', 'K', ' '):
return false;
- case MKTAG('A','M','I',' '):
- case MKTAG('R','O','L',' '):
+ case MKTAG('A', 'M', 'I', ' '):
+ case MKTAG('R', 'O', 'L', ' '):
return true;
- case MKTAG('M','A','C',' '): // Occurs in the Mac version of FOA and MI2
+ case MKTAG('M', 'A', 'C', ' '): // Occurs in the Mac version of FOA and MI2
return true;
- case MKTAG('G','M','D',' '):
+ case MKTAG('G', 'M', 'D', ' '):
return false;
- case MKTAG('M','I','D','I'): // Occurs in Sam & Max
+ case MKTAG('M', 'I', 'D', 'I'): // Occurs in Sam & Max
// HE games use Roland music
if (ptr[8] == 'H' && ptr[9] == 'S')
return true;
@@ -188,20 +196,20 @@ bool IMuseInternal::isMIDI(int sound) {
uint32 tag = READ_BE_UINT32(ptr);
switch (tag) {
- case MKTAG('A','D','L',' '):
- case MKTAG('A','S','F','X'): // Special AD class for old AdLib sound effects
- case MKTAG('S','P','K',' '):
+ case MKTAG('A', 'D', 'L', ' '):
+ case MKTAG('A', 'S', 'F', 'X'): // Special AD class for old AdLib sound effects
+ case MKTAG('S', 'P', 'K', ' '):
return false;
- case MKTAG('A','M','I',' '):
- case MKTAG('R','O','L',' '):
+ case MKTAG('A', 'M', 'I', ' '):
+ case MKTAG('R', 'O', 'L', ' '):
return true;
- case MKTAG('M','A','C',' '): // Occurs in the Mac version of FOA and MI2
+ case MKTAG('M', 'A', 'C', ' '): // Occurs in the Mac version of FOA and MI2
return true;
- case MKTAG('G','M','D',' '):
- case MKTAG('M','I','D','I'): // Occurs in Sam & Max
+ case MKTAG('G', 'M', 'D', ' '):
+ case MKTAG('M', 'I', 'D', 'I'): // Occurs in Sam & Max
return true;
}
@@ -374,7 +382,8 @@ int IMuseInternal::save_or_load(Serializer *ser, ScummEngine *scumm) {
for (i = 0; i < ARRAYSIZE(_parts); ++i)
_parts[i].saveLoadWithSerializer(ser);
- { // Load/save the instrument definitions, which were revamped with V11.
+ {
+ // Load/save the instrument definitions, which were revamped with V11.
Part *part = &_parts[0];
if (ser->getVersion() >= VER(11)) {
for (i = ARRAYSIZE(_parts); i; --i, ++part) {
@@ -460,6 +469,10 @@ uint32 IMuseInternal::property(int prop, uint32 value) {
case IMuse::PROP_GAME_ID:
_game_id = value;
break;
+
+ case IMuse::PROP_PC_SPEAKER:
+ _pcSpeaker = (value != 0);
+ break;
}
return 0;
@@ -515,7 +528,7 @@ void IMuseInternal::stopAllSounds() {
int IMuseInternal::getSoundStatus(int sound) const {
Common::StackLock lock(_mutex, "IMuseInternal::getSoundStatus()");
- return getSoundStatus_internal (sound, true);
+ return getSoundStatus_internal(sound, true);
}
int IMuseInternal::getMusicTimer() {
@@ -558,7 +571,7 @@ bool IMuseInternal::startSound_internal(int sound, int offset) {
int i;
ImTrigger *trigger = _snm_triggers;
for (i = ARRAYSIZE(_snm_triggers); i; --i, ++trigger) {
- if (trigger->sound && trigger->id && trigger->command[0] == 8 && trigger->command[1] == sound && getSoundStatus_internal (trigger->sound,true))
+ if (trigger->sound && trigger->id && trigger->command[0] == 8 && trigger->command[1] == sound && getSoundStatus_internal(trigger->sound, true))
return false;
}
@@ -656,9 +669,7 @@ int IMuseInternal::getSoundStatus_internal(int sound, bool ignoreFadeouts) const
return (sound == -1) ? 0 : get_queue_sound_status(sound);
}
-int32 IMuseInternal::doCommand_internal
- (int a, int b, int c, int d, int e, int f, int g, int h)
-{
+int32 IMuseInternal::doCommand_internal(int a, int b, int c, int d, int e, int f, int g, int h) {
int args[8];
args[0] = a;
args[1] = b;
@@ -726,7 +737,7 @@ int32 IMuseInternal::doCommand_internal(int numargs, int a[]) {
}
return -1;
case 13:
- return getSoundStatus_internal (a[1], true);
+ return getSoundStatus_internal(a[1], true);
case 14:
// Sam and Max: Parameter fade
player = findActivePlayer(a[1]);
@@ -772,8 +783,7 @@ int32 IMuseInternal::doCommand_internal(int numargs, int a[]) {
a[0] = 0;
for (i = 0; i < ARRAYSIZE(_snm_triggers); ++i) {
if (_snm_triggers[i].sound == a[1] && _snm_triggers[i].id &&
- (a[3] == -1 || _snm_triggers[i].id == a[3]))
- {
+ (a[3] == -1 || _snm_triggers[i].id == a[3])) {
++a[0];
}
}
@@ -945,7 +955,7 @@ void IMuseInternal::handle_marker(uint id, byte data) {
_trigger_count--;
_queue_cleared = false;
_queue_end = (_queue_end + 1) % ARRAYSIZE(_cmd_queue);
-
+
while (_queue_end != _queue_pos && _cmd_queue[_queue_end].array[0] == COMMAND_ID && !_queue_cleared) {
p = _cmd_queue[_queue_end].array;
doCommand_internal(p[1], p[2], p[3], p[4], p[5], p[6], p[7], 0);
@@ -995,9 +1005,9 @@ int IMuseInternal::get_queue_sound_status(int sound) const {
i = (i + 1) % ARRAYSIZE(_cmd_queue);
}
- for (i = 0; i < ARRAYSIZE (_deferredCommands); ++i) {
+ for (i = 0; i < ARRAYSIZE(_deferredCommands); ++i) {
if (_deferredCommands[i].time_left && _deferredCommands[i].a == 8 &&
- _deferredCommands[i].b == sound) {
+ _deferredCommands[i].b == sound) {
return 2;
}
}
@@ -1206,7 +1216,7 @@ int32 IMuseInternal::ImSetTrigger(int sound, int id, int a, int b, int c, int d,
// NOTE: We ONLY do this if the sound that will trigger the command is actually
// playing. Otherwise, there's a problem when exiting and re-entering the
// Bumpusville mansion. Ref Bug #780918.
- if (trig->command[0] == 8 && getSoundStatus_internal(trig->command[1],true) && getSoundStatus_internal(sound,true))
+ if (trig->command[0] == 8 && getSoundStatus_internal(trig->command[1], true) && getSoundStatus_internal(sound, true))
stopSound_internal(trig->command[1]);
return 0;
}
@@ -1239,8 +1249,7 @@ int32 IMuseInternal::ImFireAllTriggers(int sound) {
return (count > 0) ? 0 : -1;
}
-int IMuseInternal::set_channel_volume(uint chan, uint vol)
-{
+int IMuseInternal::set_channel_volume(uint chan, uint vol) {
if (chan >= 8 || vol > 127)
return -1;
@@ -1420,7 +1429,7 @@ void IMuseInternal::initMT32(MidiDriver *midi) {
// Display a welcome message on MT-32 displays.
memcpy(&buffer[0], "\x41\x10\x16\x12\x20\x00\x00", 7);
memcpy(&buffer[7], " ", 20);
- memcpy(buffer + 7 +(20 - len) / 2, info, len);
+ memcpy(buffer + 7 + (20 - len) / 2, info, len);
byte checksum = 0;
for (int i = 4; i < 27; ++i)
checksum -= buffer[i];
@@ -1466,9 +1475,9 @@ void IMuseInternal::initGM(MidiDriver *midi) {
// 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));
+ 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");
@@ -1489,7 +1498,7 @@ void IMuseInternal::initGM(MidiDriver *midi) {
// Set Channels 1-16 Reverb to 64, which is the
// equivalent of MT-32 default Reverb Level 5
for (i = 0; i < 16; ++i)
- midi->send(( 64 << 16) | (91 << 8) | (0xB0 | i));
+ midi->send((64 << 16) | (91 << 8) | (0xB0 | i));
debug(2, "GM Controller 91 Change: Channels 1-16 Reverb Level is 64");
// Set Channels 1-16 Pitch Bend Sensitivity to
@@ -1630,8 +1639,8 @@ void IMuseInternal::reallocateMidiChannels(MidiDriver *midi) {
hipart = NULL;
for (i = 32, part = _parts; i; i--, part++) {
if (part->_player && part->_player->getMidiDriver() == midi &&
- !part->_percussion && part->_on &&
- !part->_mc && part->_pri_eff >= hipri) {
+ !part->_percussion && part->_on &&
+ !part->_mc && part->_pri_eff >= hipri) {
hipri = part->_pri_eff;
hipart = part;
}
@@ -1661,16 +1670,35 @@ void IMuseInternal::reallocateMidiChannels(MidiDriver *midi) {
}
}
-void IMuseInternal::setGlobalAdLibInstrument(byte slot, byte *data) {
+void IMuseInternal::setGlobalInstrument(byte slot, byte *data) {
if (slot < 32) {
- _global_adlib_instruments[slot].adlib(data);
+ if (_pcSpeaker)
+ _global_instruments[slot].pcspk(data);
+ else
+ _global_instruments[slot].adlib(data);
}
}
-void IMuseInternal::copyGlobalAdLibInstrument(byte slot, Instrument *dest) {
+void IMuseInternal::copyGlobalInstrument(byte slot, Instrument *dest) {
if (slot >= 32)
return;
- _global_adlib_instruments[slot].copy_to(dest);
+
+ // Both the AdLib code and the PC Speaker code use an all zero instrument
+ // as default in the original, thus we do the same.
+ // PC Speaker instrument size is 23, while AdLib instrument size is 30.
+ // Thus we just use a 30 byte instrument data array as default.
+ const byte defaultInstr[30] = { 0 };
+
+ if (_global_instruments[slot].isValid()) {
+ // 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);
+ dest->pcspk(defaultInstr);
+ } else {
+ debug(0, "Trying to use non-existant global AdLib instrument %d", slot);
+ dest->adlib(defaultInstr);
+ }
}
diff --git a/engines/scumm/imuse/imuse.h b/engines/scumm/imuse/imuse.h
index 8014b13409..23449e470b 100644
--- a/engines/scumm/imuse/imuse.h
+++ b/engines/scumm/imuse/imuse.h
@@ -37,7 +37,7 @@ class Player;
class ScummEngine;
class Serializer;
-typedef void (*sysexfunc) (Player *, const byte *, uint16);
+typedef void (*sysexfunc)(Player *, const byte *, uint16);
/**
* iMuse implementation interface.
@@ -55,7 +55,8 @@ public:
PROP_GS,
PROP_LIMIT_PLAYERS,
PROP_RECYCLE_PLAYERS,
- PROP_GAME_ID
+ PROP_GAME_ID,
+ PROP_PC_SPEAKER
};
public:
@@ -66,7 +67,7 @@ public:
virtual int32 doCommand(int numargs, int args[]) = 0;
virtual int clear_queue() = 0;
virtual uint32 property(int prop, uint32 value) = 0;
- virtual void addSysexHandler (byte mfgID, sysexfunc handler) = 0;
+ virtual void addSysexHandler(byte mfgID, sysexfunc handler) = 0;
public:
virtual void startSoundWithNoteOffset(int sound, int offset) = 0;
diff --git a/engines/scumm/imuse/imuse_internal.h b/engines/scumm/imuse/imuse_internal.h
index 8808a3655a..3b0d36e119 100644
--- a/engines/scumm/imuse/imuse_internal.h
+++ b/engines/scumm/imuse/imuse_internal.h
@@ -135,7 +135,7 @@ struct ImTrigger {
int sound;
byte id;
uint16 expire;
- int command [8];
+ int command[8];
ImTrigger() { memset(this, 0, sizeof(ImTrigger)); }
};
@@ -153,12 +153,12 @@ struct CommandQueue {
//////////////////////////////////////////////////
class Player : public MidiDriver_BASE {
-/*
- * External SysEx handler functions shall each be defined in
- * a separate file. This header file shall be included at the
- * top of the file immediately following this special #define:
- * #define SYSEX_CALLBACK_FUNCTION nameOfHandlerFunction
- */
+ /*
+ * External SysEx handler functions shall each be defined in
+ * a separate file. This header file shall be included at the
+ * top of the file immediately following this special #define:
+ * #define SYSEX_CALLBACK_FUNCTION nameOfHandlerFunction
+ */
#ifdef SYSEX_CALLBACK_FUNCTION
friend void SYSEX_CALLBACK_FUNCTION(Player *, const byte *, uint16);
#endif
@@ -244,7 +244,7 @@ public:
void clear();
void clearLoop();
void fixAfterLoad();
- Part * getActivePart(uint8 part);
+ Part *getActivePart(uint8 part);
uint getBeatIndex();
int8 getDetune() const { return _detune; }
byte getEffectiveVolume() const { return _vol_eff; }
@@ -252,7 +252,7 @@ public:
MidiDriver *getMidiDriver() const { return _midi; }
int getParam(int param, byte chan);
int8 getPan() const { return _pan; }
- Part * getPart(uint8 part);
+ Part *getPart(uint8 part);
byte getPriority() const { return _priority; }
uint getTicksPerBeat() const { return TICKS_PER_BEAT; }
int8 getTranspose() const { return _transpose; }
@@ -342,6 +342,7 @@ struct Part : public Serializable {
void off();
void set_instrument(uint b);
void set_instrument(byte *data);
+ void set_instrument_pcspk(byte *data);
void load_global_instrument(byte b);
void set_transpose(int8 transpose);
@@ -375,12 +376,12 @@ class IMuseInternal : public IMuse {
friend class Player;
friend struct Part;
-/*
- * External SysEx handler functions shall each be defined in
- * a separate file. This header file shall be included at the
- * top of the file immediately following this special #define:
- * #define SYSEX_CALLBACK_FUNCTION nameOfHandlerFunction
- */
+ /*
+ * External SysEx handler functions shall each be defined in
+ * a separate file. This header file shall be included at the
+ * top of the file immediately following this special #define:
+ * #define SYSEX_CALLBACK_FUNCTION nameOfHandlerFunction
+ */
#ifdef SYSEX_CALLBACK_FUNCTION
friend void SYSEX_CALLBACK_FUNCTION(Player *, const byte *, uint16);
#endif
@@ -433,7 +434,8 @@ protected:
Player _players[8];
Part _parts[32];
- Instrument _global_adlib_instruments[32];
+ bool _pcSpeaker;
+ Instrument _global_instruments[32];
CommandQueue _cmd_queue[64];
DeferredCommand _deferredCommands[4];
@@ -449,8 +451,8 @@ protected:
enum ChunkType {
kMThd = 1,
kFORM = 2,
- kMDhd = 4, // Used in MI2 and INDY4. Contain certain start parameters (priority, volume, etc. ) for the player.
- kMDpg = 8 // These chunks exist in DOTT and SAMNMAX. They don't get processed, however.
+ kMDhd = 4, // Used in MI2 and INDY4. Contain certain start parameters (priority, volume, etc. ) for the player.
+ kMDpg = 8 // These chunks exist in DOTT and SAMNMAX. They don't get processed, however.
};
byte *findStartOfSound(int sound, int ct = (kMThd | kFORM));
@@ -498,8 +500,8 @@ protected:
int setImuseMasterVolume(uint vol);
void reallocateMidiChannels(MidiDriver *midi);
- void setGlobalAdLibInstrument(byte slot, byte *data);
- void copyGlobalAdLibInstrument(byte slot, Instrument *dest);
+ void setGlobalInstrument(byte slot, byte *data);
+ void copyGlobalInstrument(byte slot, Instrument *dest);
bool isNativeMT32() { return _native_mt32; }
protected:
diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp
index 5df8407a96..73e7704469 100644
--- a/engines/scumm/imuse/imuse_part.cpp
+++ b/engines/scumm/imuse/imuse_part.cpp
@@ -193,14 +193,18 @@ void Part::set_onoff(bool on) {
}
}
-void Part::set_instrument(byte * data) {
- _instrument.adlib(data);
+void Part::set_instrument(byte *data) {
+ if (_se->_pcSpeaker)
+ _instrument.pcspk(data);
+ else
+ _instrument.adlib(data);
+
if (clearToTransmit())
_instrument.send(_mc);
}
void Part::load_global_instrument(byte slot) {
- _player->_se->copyGlobalAdLibInstrument(slot, &_instrument);
+ _player->_se->copyGlobalInstrument(slot, &_instrument);
if (clearToTransmit())
_instrument.send(_mc);
}
@@ -234,7 +238,7 @@ void Part::noteOn(byte note, byte velocity) {
// should be implemented as a class static var. As it is, using
// a function level static var in most cases is arcane and evil.
static byte prev_vol_eff = 128;
- if (_vol_eff != prev_vol_eff){
+ if (_vol_eff != prev_vol_eff) {
mc->volume(_vol_eff);
prev_vol_eff = _vol_eff;
}
diff --git a/engines/scumm/imuse/imuse_player.cpp b/engines/scumm/imuse/imuse_player.cpp
index 0b084f3116..73be2174cd 100644
--- a/engines/scumm/imuse/imuse_player.cpp
+++ b/engines/scumm/imuse/imuse_player.cpp
@@ -79,7 +79,7 @@ Player::Player() :
_isMT32(false),
_isMIDI(false),
_se(0),
- _vol_chan(0){
+ _vol_chan(0) {
}
Player::~Player() {
@@ -120,7 +120,7 @@ bool Player::startSound(int sound, MidiDriver *midi) {
_midi = NULL;
return false;
}
-
+
debugC(DEBUG_IMUSE, "Starting music %d", sound);
return true;
}
@@ -133,7 +133,7 @@ bool Player::isFadingOut() const {
int i;
for (i = 0; i < ARRAYSIZE(_parameterFaders); ++i) {
if (_parameterFaders[i].param == ParameterFader::pfVolume &&
- _parameterFaders[i].end == 0) {
+ _parameterFaders[i].end == 0) {
return true;
}
}
@@ -194,7 +194,7 @@ int Player::start_seq_sound(int sound, bool reset_vars) {
_parser->property(MidiParser::mpSmartJump, 1);
_parser->loadMusic(ptr, 0);
_parser->setTrack(_track_index);
-
+
ptr = _se->findStartOfSound(sound, IMuseInternal::kMDhd);
setSpeed(reset_vars ? (ptr ? (READ_BE_UINT32(&ptr[4]) && ptr[15] ? ptr[15] : 128) : 128) : _speed);
@@ -226,7 +226,7 @@ void Player::loadStartParameters(int sound) {
_pan = ptr[4];
_transpose = ptr[5];
_detune = ptr[6];
- setSpeed(ptr[7]);
+ setSpeed(ptr[7]);
}
}
}
@@ -371,11 +371,13 @@ void Player::sysEx(const byte *p, uint16 len) {
if (a != IMUSE_SYSEX_ID) {
if (a == ROLAND_SYSEX_ID) {
// Roland custom instrument definition.
- part = getPart(p[0] & 0x0F);
- if (part) {
- part->_instrument.roland(p - 1);
- if (part->clearToTransmit())
- part->_instrument.send(part->_mc);
+ if (_isMIDI || _isMT32) {
+ part = getPart(p[0] & 0x0F);
+ if (part) {
+ part->_instrument.roland(p - 1);
+ if (part->clearToTransmit())
+ part->_instrument.send(part->_mc);
+ }
}
} else if (a == YM2612_SYSEX_ID) {
// FM-TOWNS custom instrument definition
@@ -399,13 +401,13 @@ void Player::sysEx(const byte *p, uint16 len) {
if (!_scanning) {
for (a = 0; a < len + 1 && a < 19; ++a) {
- sprintf((char *)&buf[a*3], " %02X", p[a]);
+ sprintf((char *)&buf[a * 3], " %02X", p[a]);
} // next for
if (a < len + 1) {
- buf[a*3] = buf[a*3+1] = buf[a*3+2] = '.';
+ buf[a * 3] = buf[a * 3 + 1] = buf[a * 3 + 2] = '.';
++a;
} // end if
- buf[a*3] = '\0';
+ buf[a * 3] = '\0';
debugC(DEBUG_IMUSE, "[%02d] SysEx:%s", _id, buf);
}
@@ -814,7 +816,7 @@ int Player::query_part_param(int param, byte chan) {
return part->_vol;
case 16:
// FIXME: Need to know where this occurs...
-error("Trying to cast instrument (%d, %d) -- please tell Fingolfin", param, chan);
+ error("Trying to cast instrument (%d, %d) -- please tell Fingolfin", param, chan);
// In old versions of the code, this used to return part->_program.
// This was changed in revision 2.29 of imuse.cpp (where this code used
// to reside).
@@ -845,9 +847,8 @@ void Player::onTimer() {
uint beat_index = target_tick / TICKS_PER_BEAT + 1;
uint tick_index = target_tick % TICKS_PER_BEAT;
- if (_loop_counter &&(beat_index > _loop_from_beat ||
- (beat_index == _loop_from_beat && tick_index >= _loop_from_tick)))
- {
+ if (_loop_counter && (beat_index > _loop_from_beat ||
+ (beat_index == _loop_from_beat && tick_index >= _loop_from_tick))) {
_loop_counter--;
jump(_track_index, _loop_to_beat, _loop_to_tick);
}
@@ -891,15 +892,15 @@ int Player::addParameterFader(int param, int target, int time) {
// target = target * 128 / 100;
break;
- case 127:
- { // FIXME? I *think* this clears all parameter faders.
- ParameterFader *ptr = &_parameterFaders[0];
- int i;
- for (i = ARRAYSIZE(_parameterFaders); i; --i, ++ptr)
- ptr->param = 0;
- return 0;
- }
- break;
+ case 127: {
+ // FIXME? I *think* this clears all parameter faders.
+ ParameterFader *ptr = &_parameterFaders[0];
+ int i;
+ for (i = ARRAYSIZE(_parameterFaders); i; --i, ++ptr)
+ ptr->param = 0;
+ return 0;
+ }
+ break;
default:
debug(0, "Player::addParameterFader(%d, %d, %d): Unknown parameter", param, target, time);
@@ -1085,7 +1086,7 @@ void Player::saveLoadWithSerializer(Serializer *ser) {
}
ser->saveLoadEntries(this, playerEntries);
ser->saveLoadArrayOf(_parameterFaders, ARRAYSIZE(_parameterFaders),
- sizeof(ParameterFader), parameterFaderEntries);
+ sizeof(ParameterFader), parameterFaderEntries);
return;
}
diff --git a/engines/scumm/imuse/instrument.cpp b/engines/scumm/imuse/instrument.cpp
index 955700fc2b..11bb4e7605 100644
--- a/engines/scumm/imuse/instrument.cpp
+++ b/engines/scumm/imuse/instrument.cpp
@@ -114,14 +114,15 @@ roland_to_gm_map[] = {
// { "trickle4 ", ??? }
};
+// This emulates the percussion bank setup LEC used with the MT-32,
+// where notes 24 - 34 were assigned instruments without reverb.
+// It also fixes problems on GS devices that map sounds to these
+// notes by default.
const byte Instrument::_gmRhythmMap[35] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 36, 37, 38, 39, 40, 41, 66, 47,
- 65, 48, 56};
- // This emulates the percussion bank setup LEC used with the MT-32,
- // where notes 24 - 34 were assigned instruments without reverb.
- // It also fixes problems on GS devices that map sounds to these
- // notes by default.
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 36, 37, 38, 39, 40, 41, 66, 47,
+ 65, 48, 56
+};
class Instrument_Program : public InstrumentInternal {
private:
@@ -136,15 +137,16 @@ public:
void copy_to(Instrument *dest) { dest->program(_program, _mt32); }
bool is_valid() {
return (_program < 128) &&
- ((_native_mt32 == _mt32) || _native_mt32
- ? (MidiDriver::_gmToMt32[_program] < 128)
- : (MidiDriver::_mt32ToGm[_program] < 128)); }
+ ((_native_mt32 == _mt32) || _native_mt32
+ ? (MidiDriver::_gmToMt32[_program] < 128)
+ : (MidiDriver::_mt32ToGm[_program] < 128));
+ }
};
class Instrument_AdLib : public InstrumentInternal {
private:
-#include "common/pack-start.h" // START STRUCT PACKING
+#include "common/pack-start.h" // START STRUCT PACKING
struct AdLibInstrument {
byte flags_1;
@@ -159,13 +161,17 @@ private:
byte waveform_2;
byte feedback;
byte flags_a;
- struct { byte a,b,c,d,e,f,g,h; } extra_a;
+ struct {
+ byte a, b, c, d, e, f, g, h;
+ } extra_a;
byte flags_b;
- struct { byte a,b,c,d,e,f,g,h; } extra_b;
+ struct {
+ byte a, b, c, d, e, f, g, h;
+ } extra_b;
byte duration;
} PACKED_STRUCT;
-#include "common/pack-end.h" // END STRUCT PACKING
+#include "common/pack-end.h" // END STRUCT PACKING
AdLibInstrument _instrument;
@@ -181,7 +187,7 @@ public:
class Instrument_Roland : public InstrumentInternal {
private:
-#include "common/pack-start.h" // START STRUCT PACKING
+#include "common/pack-start.h" // START STRUCT PACKING
struct RolandInstrument {
byte roland_id;
@@ -242,11 +248,11 @@ private:
byte checksum;
} PACKED_STRUCT;
-#include "common/pack-end.h" // END STRUCT PACKING
+#include "common/pack-end.h" // END STRUCT PACKING
RolandInstrument _instrument;
- char _instrument_name [11];
+ char _instrument_name[11];
uint8 getEquivalentGM();
@@ -259,6 +265,19 @@ public:
bool is_valid() { return (_native_mt32 ? true : (_instrument_name[0] != '\0')); }
};
+class Instrument_PcSpk : public InstrumentInternal {
+public:
+ Instrument_PcSpk(const byte *data);
+ Instrument_PcSpk(Serializer *s);
+ void saveOrLoad(Serializer *s);
+ void send(MidiChannel *mc);
+ void copy_to(Instrument *dest) { dest->pcspk((byte *)&_instrument); }
+ bool is_valid() { return true; }
+
+private:
+ byte _instrument[23];
+};
+
////////////////////////////////////////
//
// Instrument class members
@@ -299,7 +318,15 @@ void Instrument::roland(const byte *instrument) {
_instrument = new Instrument_Roland(instrument);
}
-void Instrument::saveOrLoad (Serializer *s) {
+void Instrument::pcspk(const byte *instrument) {
+ clear();
+ if (!instrument)
+ return;
+ _type = itPcSpk;
+ _instrument = new Instrument_PcSpk(instrument);
+}
+
+void Instrument::saveOrLoad(Serializer *s) {
if (s->isSaving()) {
s->saveByte(_type);
if (_instrument)
@@ -319,6 +346,9 @@ void Instrument::saveOrLoad (Serializer *s) {
case itRoland:
_instrument = new Instrument_Roland(s);
break;
+ case itPcSpk:
+ _instrument = new Instrument_PcSpk(s);
+ break;
default:
warning("No known instrument classification #%d", (int)_type);
_type = itNone;
@@ -333,8 +363,8 @@ void Instrument::saveOrLoad (Serializer *s) {
////////////////////////////////////////
Instrument_Program::Instrument_Program(byte program, bool mt32) :
-_program (program),
-_mt32 (mt32) {
+ _program(program),
+ _mt32(mt32) {
if (program > 127)
_program = 255;
}
@@ -413,7 +443,7 @@ Instrument_Roland::Instrument_Roland(const byte *data) {
Instrument_Roland::Instrument_Roland(Serializer *s) {
_instrument_name[0] = '\0';
if (!s->isSaving())
- saveOrLoad (s);
+ saveOrLoad(s);
else
memset(&_instrument, 0, sizeof(_instrument));
}
@@ -470,4 +500,32 @@ uint8 Instrument_Roland::getEquivalentGM() {
return 255;
}
+////////////////////////////////////////
+//
+// Instrument_PcSpk class members
+//
+////////////////////////////////////////
+
+Instrument_PcSpk::Instrument_PcSpk(const byte *data) {
+ memcpy(_instrument, data, sizeof(_instrument));
+}
+
+Instrument_PcSpk::Instrument_PcSpk(Serializer *s) {
+ if (!s->isSaving())
+ saveOrLoad(s);
+ else
+ memset(_instrument, 0, sizeof(_instrument));
+}
+
+void Instrument_PcSpk::saveOrLoad(Serializer *s) {
+ if (s->isSaving())
+ s->saveBytes(_instrument, sizeof(_instrument));
+ else
+ s->loadBytes(_instrument, sizeof(_instrument));
+}
+
+void Instrument_PcSpk::send(MidiChannel *mc) {
+ mc->sysEx_customInstrument('SPK ', (byte *)&_instrument);
+}
+
} // End of namespace Scumm
diff --git a/engines/scumm/imuse/instrument.h b/engines/scumm/imuse/instrument.h
index 3555d319e6..a855c64155 100644
--- a/engines/scumm/imuse/instrument.h
+++ b/engines/scumm/imuse/instrument.h
@@ -39,7 +39,6 @@ public:
virtual void send(MidiChannel *mc) = 0;
virtual void copy_to(Instrument *dest) = 0;
virtual bool is_valid() = 0;
- virtual operator int() { return 255; }
};
class Instrument {
@@ -52,10 +51,11 @@ public:
itNone = 0,
itProgram = 1,
itAdLib = 2,
- itRoland = 3
+ itRoland = 3,
+ itPcSpk = 4
};
- Instrument() : _type (0), _instrument (0) { }
+ Instrument() : _type(0), _instrument(0) { }
~Instrument() { delete _instrument; }
static void nativeMT32(bool native);
static const byte _gmRhythmMap[35];
@@ -71,6 +71,7 @@ public:
void program(byte program, bool mt32);
void adlib(const byte *instrument);
void roland(const byte *instrument);
+ void pcspk(const byte *instrument);
byte getType() { return _type; }
bool isValid() { return (_instrument ? _instrument->is_valid() : false); }
diff --git a/engines/scumm/imuse/pcspk.cpp b/engines/scumm/imuse/pcspk.cpp
new file mode 100644
index 0000000000..01e2ab3b7d
--- /dev/null
+++ b/engines/scumm/imuse/pcspk.cpp
@@ -0,0 +1,835 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "scumm/imuse/pcspk.h"
+
+#include "common/util.h"
+
+namespace Scumm {
+
+PcSpkDriver::PcSpkDriver(Audio::Mixer *mixer)
+ : MidiDriver_Emulated(mixer), _pcSpk(mixer->getOutputRate()) {
+}
+
+PcSpkDriver::~PcSpkDriver() {
+ close();
+}
+
+int PcSpkDriver::open() {
+ if (_isOpen)
+ return MERR_ALREADY_OPEN;
+
+ MidiDriver_Emulated::open();
+
+ for (uint i = 0; i < 6; ++i)
+ _channels[i].init(this, i);
+ _activeChannel = 0;
+ _effectTimer = 0;
+ _randBase = 1;
+
+ // We need to take care we only send note frequencies, when the internal
+ // settings actually changed, thus we need some extra state to keep track
+ // of that.
+ _lastActiveChannel = 0;
+ _lastActiveOut = 0;
+
+ // We set the output sound type to music here to allow sound volume
+ // adjustment. The drawback here is that we can not control the music and
+ // sfx separately here. But the AdLib output has the same issue so it
+ // should not be that bad.
+ _mixer->playStream(Audio::Mixer::kMusicSoundType, &_mixerSoundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
+ return 0;
+}
+
+void PcSpkDriver::close() {
+ if (!_isOpen)
+ return;
+ _isOpen = false;
+
+ _mixer->stopHandle(_mixerSoundHandle);
+}
+
+void PcSpkDriver::send(uint32 d) {
+ assert((d & 0x0F) < 6);
+ _channels[(d & 0x0F)].send(d);
+}
+
+void PcSpkDriver::sysEx_customInstrument(byte channel, uint32 type, const byte *instr) {
+ assert(channel < 6);
+ if (type == 'SPK ')
+ _channels[channel].sysEx_customInstrument(type, instr);
+}
+
+MidiChannel *PcSpkDriver::allocateChannel() {
+ for (uint i = 0; i < 6; ++i) {
+ if (_channels[i].allocate())
+ return &_channels[i];
+ }
+
+ return 0;
+}
+
+void PcSpkDriver::generateSamples(int16 *buf, int len) {
+ _pcSpk.readBuffer(buf, len);
+}
+
+void PcSpkDriver::onTimer() {
+ if (!_activeChannel)
+ return;
+
+ for (uint i = 0; i < 6; ++i) {
+ OutputChannel &out = _channels[i]._out;
+
+ if (!out.active)
+ continue;
+
+ if (out.length == 0 || --out.length != 0) {
+ if (out.unkB && out.unkC) {
+ out.unkA += out.unkB;
+ if (out.instrument)
+ out.unkE = ((int8)out.instrument[out.unkA] * out.unkC) >> 4;
+ }
+
+ ++_effectTimer;
+ if (_effectTimer > 3) {
+ _effectTimer = 0;
+
+ if (out.effectEnvelopeA.state)
+ updateEffectGenerator(_channels[i], out.effectEnvelopeA, out.effectDefA);
+ if (out.effectEnvelopeB.state)
+ updateEffectGenerator(_channels[i], out.effectEnvelopeB, out.effectDefB);
+ }
+ } else {
+ out.active = 0;
+ updateNote();
+ return;
+ }
+ }
+
+ if (_activeChannel->_tl) {
+ output((_activeChannel->_out.note << 7) + _activeChannel->_pitchBend + _activeChannel->_out.unk60 + _activeChannel->_out.unkE);
+ } else {
+ _pcSpk.stop();
+ _lastActiveChannel = 0;
+ _lastActiveOut = 0;
+ }
+}
+
+void PcSpkDriver::updateNote() {
+ uint8 priority = 0;
+ _activeChannel = 0;
+ for (uint i = 0; i < 6; ++i) {
+ if (_channels[i]._allocated && _channels[i]._out.active && _channels[i]._priority >= priority) {
+ priority = _channels[i]._priority;
+ _activeChannel = &_channels[i];
+ }
+ }
+
+ if (_activeChannel == 0 || _activeChannel->_tl == 0) {
+ _pcSpk.stop();
+ _lastActiveChannel = 0;
+ _lastActiveOut = 0;
+ } else {
+ output(_activeChannel->_pitchBend + (_activeChannel->_out.note << 7));
+ }
+}
+
+void PcSpkDriver::output(uint16 out) {
+ byte v1 = (out >> 7) & 0xFF;
+ byte v2 = (out >> 2) & 0x1E;
+
+ byte shift = _outputTable1[v1];
+ uint16 indexBase = _outputTable2[v1] << 5;
+ uint16 frequency = _frequencyTable[(indexBase + v2) / 2] >> shift;
+
+ // Only output in case the active channel changed or the frequency changed.
+ // This is not faithful to the original. Since our timings differ we would
+ // get distorted sound otherwise though.
+ if (_lastActiveChannel != _activeChannel || _lastActiveOut != out) {
+ _pcSpk.play(Audio::PCSpeaker::kWaveFormSquare, 1193180 / frequency, -1);
+ _lastActiveChannel = _activeChannel;
+ _lastActiveOut = out;
+ }
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::init(PcSpkDriver *owner, byte channel) {
+ _owner = owner;
+ _channel = channel;
+ _allocated = false;
+ memset(&_out, 0, sizeof(_out));
+}
+
+bool PcSpkDriver::MidiChannel_PcSpk::allocate() {
+ if (_allocated)
+ return false;
+
+ memset(&_out, 0, sizeof(_out));
+ memset(_instrument, 0, sizeof(_instrument));
+ _out.effectDefA.envelope = &_out.effectEnvelopeA;
+ _out.effectDefB.envelope = &_out.effectEnvelopeB;
+
+ _allocated = true;
+ return true;
+}
+
+MidiDriver *PcSpkDriver::MidiChannel_PcSpk::device() {
+ return _owner;
+}
+
+byte PcSpkDriver::MidiChannel_PcSpk::getNumber() {
+ return _channel;
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::release() {
+ _out.active = 0;
+ _allocated = false;
+ _owner->updateNote();
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::send(uint32 b) {
+ uint8 type = b & 0xF0;
+ uint8 p1 = (b >> 8) & 0xFF;
+ uint8 p2 = (b >> 16) & 0xFF;
+
+ switch (type) {
+ case 0x80:
+ noteOff(p1);
+ break;
+
+ case 0x90:
+ if (p2)
+ noteOn(p1, p2);
+ else
+ noteOff(p1);
+ break;
+
+ case 0xB0:
+ controlChange(p1, p2);
+ break;
+
+ case 0xE0:
+ pitchBend((p1 | (p2 << 7)) - 0x2000);
+ break;
+
+ default:
+ break;
+ }
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::noteOff(byte note) {
+ if (!_allocated)
+ return;
+
+ if (_sustain) {
+ if (_out.note == note)
+ _out.sustainNoteOff = 1;
+ } else {
+ if (_out.note == note) {
+ _out.active = 0;
+ _owner->updateNote();
+ }
+ }
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::noteOn(byte note, byte velocity) {
+ if (!_allocated)
+ return;
+
+ _out.note = note;
+ _out.sustainNoteOff = 0;
+ _out.length = _instrument[0];
+
+ if (_instrument[4] * 256 < ARRAYSIZE(PcSpkDriver::_outInstrumentData))
+ _out.instrument = _owner->_outInstrumentData + _instrument[4] * 256;
+ else
+ _out.instrument = 0;
+
+ _out.unkA = 0;
+ _out.unkB = _instrument[1];
+ _out.unkC = _instrument[2];
+ _out.unkE = 0;
+ _out.unk60 = 0;
+ _out.active = 1;
+
+ // In case we get a note on event on the last active channel, we reset the
+ // last active channel, thus we assure the frequency is correctly set, even
+ // when the same note was sent.
+ if (_owner->_lastActiveChannel == this) {
+ _owner->_lastActiveChannel = 0;
+ _owner->_lastActiveOut = 0;
+ }
+ _owner->updateNote();
+
+ _out.unkC += PcSpkDriver::getEffectModifier(_instrument[3] + ((velocity & 0xFE) << 4));
+ if (_out.unkC > 63)
+ _out.unkC = 63;
+
+ if ((_instrument[5] & 0x80) != 0)
+ _owner->setupEffects(*this, _out.effectEnvelopeA, _out.effectDefA, _instrument[5], _instrument + 6);
+
+ if ((_instrument[14] & 0x80) != 0)
+ _owner->setupEffects(*this, _out.effectEnvelopeB, _out.effectDefB, _instrument[14], _instrument + 15);
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::programChange(byte program) {
+ // Nothing to implement here, the iMuse code takes care of passing us the
+ // instrument data.
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::pitchBend(int16 bend) {
+ _pitchBend = (bend * _pitchBendFactor) >> 6;
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::controlChange(byte control, byte value) {
+ switch (control) {
+ case 1:
+ if (_out.effectEnvelopeA.state && _out.effectDefA.useModWheel)
+ _out.effectEnvelopeA.modWheelState = (value >> 2);
+ if (_out.effectEnvelopeB.state && _out.effectDefB.useModWheel)
+ _out.effectEnvelopeB.modWheelState = (value >> 2);
+ break;
+
+ case 7:
+ _tl = value;
+ if (_owner->_activeChannel == this) {
+ if (_tl == 0) {
+ _owner->_lastActiveChannel = 0;
+ _owner->_lastActiveOut = 0;
+ _owner->_pcSpk.stop();
+ } else {
+ _owner->output((_out.note << 7) + _pitchBend + _out.unk60 + _out.unkE);
+ }
+ }
+ break;
+
+ case 64:
+ _sustain = value;
+ if (!value && _out.sustainNoteOff) {
+ _out.active = 0;
+ _owner->updateNote();
+ }
+ break;
+
+ case 123:
+ _out.active = 0;
+ _owner->updateNote();
+ break;
+
+ default:
+ break;
+ }
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::pitchBendFactor(byte value) {
+ _pitchBendFactor = value;
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::priority(byte value) {
+ _priority = value;
+}
+
+void PcSpkDriver::MidiChannel_PcSpk::sysEx_customInstrument(uint32 type, const byte *instr) {
+ memcpy(_instrument, instr, sizeof(_instrument));
+}
+
+uint8 PcSpkDriver::getEffectModifier(uint16 level) {
+ uint8 base = level / 32;
+ uint8 index = level % 32;
+
+ if (index == 0)
+ return 0;
+
+ return (base * (index + 1)) >> 5;
+}
+
+int16 PcSpkDriver::getEffectModLevel(int16 level, int8 mod) {
+ if (!mod) {
+ return 0;
+ } else if (mod == 31) {
+ return level;
+ } else if (level < -63 || level > 63) {
+ return (mod * (level + 1)) >> 6;
+ } else if (mod < 0) {
+ if (level < 0)
+ return getEffectModifier(((-level) << 5) - mod);
+ else
+ return -getEffectModifier((level << 5) - mod);
+ } else {
+ if (level < 0)
+ return -getEffectModifier(((-level) << 5) + mod);
+ else
+ return getEffectModifier(((-level) << 5) + mod);
+ }
+}
+
+int16 PcSpkDriver::getRandMultipy(int16 input) {
+ if (_randBase & 1)
+ _randBase = (_randBase >> 1) ^ 0xB8;
+ else
+ _randBase >>= 1;
+
+ return (_randBase * input) >> 8;
+}
+
+void PcSpkDriver::setupEffects(MidiChannel_PcSpk &chan, EffectEnvelope &env, EffectDefinition &def, byte flags, const byte *data) {
+ def.phase = 0;
+ def.useModWheel = flags & 0x40;
+ env.loop = flags & 0x20;
+ def.type = flags & 0x1F;
+
+ env.modWheelSensitivity = 31;
+ if (def.useModWheel)
+ env.modWheelState = chan._modWheel >> 2;
+ else
+ env.modWheelState = 31;
+
+ switch (def.type) {
+ case 0:
+ env.maxLevel = 767;
+ env.startLevel = 383;
+ break;
+
+ case 1:
+ env.maxLevel = 31;
+ env.startLevel = 15;
+ break;
+
+ case 2:
+ env.maxLevel = 63;
+ env.startLevel = chan._out.unkB;
+ break;
+
+ case 3:
+ env.maxLevel = 63;
+ env.startLevel = chan._out.unkC;
+ break;
+
+ case 4:
+ env.maxLevel = 3;
+ env.startLevel = chan._instrument[4];
+ break;
+
+ case 5:
+ env.maxLevel = 62;
+ env.startLevel = 31;
+ env.modWheelState = 0;
+ break;
+
+ case 6:
+ env.maxLevel = 31;
+ env.startLevel = 0;
+ env.modWheelSensitivity = 0;
+ break;
+
+ default:
+ break;
+ }
+
+ startEffect(env, data);
+}
+
+void PcSpkDriver::startEffect(EffectEnvelope &env, const byte *data) {
+ env.state = 1;
+ env.currentLevel = 0;
+ env.modWheelLast = 31;
+ env.duration = data[0] * 63;
+
+ env.stateTargetLevels[0] = data[1];
+ env.stateTargetLevels[1] = data[3];
+ env.stateTargetLevels[2] = data[5];
+ env.stateTargetLevels[3] = data[6];
+
+ env.stateModWheelLevels[0] = data[2];
+ env.stateModWheelLevels[1] = data[4];
+ env.stateModWheelLevels[2] = 0;
+ env.stateModWheelLevels[3] = data[7];
+
+ initNextEnvelopeState(env);
+}
+
+void PcSpkDriver::initNextEnvelopeState(EffectEnvelope &env) {
+ uint8 lastState = env.state - 1;
+
+ uint16 stepCount = _effectEnvStepTable[getEffectModifier(((env.stateTargetLevels[lastState] & 0x7F) << 5) + env.modWheelSensitivity)];
+ if (env.stateTargetLevels[lastState] & 0x80)
+ stepCount = getRandMultipy(stepCount);
+ if (!stepCount)
+ stepCount = 1;
+
+ env.stateNumSteps = env.stateStepCounter = stepCount;
+
+ int16 totalChange = 0;
+ if (lastState != 2) {
+ totalChange = getEffectModLevel(env.maxLevel, (env.stateModWheelLevels[lastState] & 0x7F) - 31);
+ if (env.stateModWheelLevels[lastState] & 0x80)
+ totalChange = getRandMultipy(totalChange);
+
+ if (totalChange + env.startLevel > env.maxLevel)
+ totalChange = env.maxLevel - env.startLevel;
+ else if (totalChange + env.startLevel < 0)
+ totalChange = -env.startLevel;
+
+ totalChange -= env.currentLevel;
+ }
+
+ env.changePerStep = totalChange / stepCount;
+ if (totalChange < 0) {
+ totalChange = -totalChange;
+ env.dir = -1;
+ } else {
+ env.dir = 1;
+ }
+ env.changePerStepRem = totalChange % stepCount;
+ env.changeCountRem = 0;
+}
+
+void PcSpkDriver::updateEffectGenerator(MidiChannel_PcSpk &chan, EffectEnvelope &env, EffectDefinition &def) {
+ if (advanceEffectEnvelope(env, def) & 1) {
+ switch (def.type) {
+ case 0: case 1:
+ chan._out.unk60 = def.phase << 4;
+ break;
+
+ case 2:
+ chan._out.unkB = (def.phase & 0xFF) + chan._instrument[1];
+ break;
+
+ case 3:
+ chan._out.unkC = (def.phase & 0xFF) + chan._instrument[2];
+ break;
+
+ case 4:
+ if ((chan._instrument[4] + (def.phase & 0xFF)) * 256 < ARRAYSIZE(_outInstrumentData))
+ chan._out.instrument = _outInstrumentData + (chan._instrument[4] + (def.phase & 0xFF)) * 256;
+ else
+ chan._out.instrument = 0;
+ break;
+
+ case 5:
+ env.modWheelState = (def.phase & 0xFF);
+ break;
+
+ case 6:
+ env.modWheelSensitivity = (def.phase & 0xFF);
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+uint8 PcSpkDriver::advanceEffectEnvelope(EffectEnvelope &env, EffectDefinition &def) {
+ if (env.duration != 0) {
+ env.duration -= 17;
+ if (env.duration <= 0) {
+ env.state = 0;
+ return 0;
+ }
+ }
+
+ uint8 changedFlags = 0;
+ int16 newLevel = env.currentLevel + env.changePerStep;
+ env.changeCountRem += env.changePerStepRem;
+ if (env.changeCountRem >= env.stateNumSteps) {
+ env.changeCountRem -= env.stateNumSteps;
+ newLevel += env.dir;
+ }
+
+ if (env.currentLevel != newLevel || env.modWheelLast != env.modWheelState) {
+ env.currentLevel = newLevel;
+ env.modWheelLast = env.modWheelState;
+
+ int16 newPhase = getEffectModLevel(newLevel, env.modWheelState);
+ if (def.phase != newPhase) {
+ changedFlags |= 1;
+ def.phase = newPhase;
+ }
+ }
+
+ --env.stateStepCounter;
+ if (!env.stateStepCounter) {
+ ++env.state;
+ if (env.state > 4) {
+ if (env.loop) {
+ env.state = 1;
+ changedFlags |= 2;
+ } else {
+ env.state = 0;
+ return changedFlags;
+ }
+ }
+
+ initNextEnvelopeState(env);
+ }
+
+ return changedFlags;
+}
+
+const byte PcSpkDriver::_outInstrumentData[1024] = {
+ 0x00, 0x03, 0x06, 0x09, 0x0C, 0x0F, 0x12, 0x15,
+ 0x18, 0x1B, 0x1E, 0x21, 0x24, 0x27, 0x2A, 0x2D,
+ 0x30, 0x33, 0x36, 0x39, 0x3B, 0x3E, 0x41, 0x43,
+ 0x46, 0x49, 0x4B, 0x4E, 0x50, 0x52, 0x55, 0x57,
+ 0x59, 0x5B, 0x5E, 0x60, 0x62, 0x64, 0x66, 0x67,
+ 0x69, 0x6B, 0x6C, 0x6E, 0x70, 0x71, 0x72, 0x74,
+ 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7B,
+ 0x7C, 0x7D, 0x7D, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E,
+ 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7D, 0x7D,
+ 0x7C, 0x7B, 0x7B, 0x7A, 0x79, 0x78, 0x77, 0x76,
+ 0x75, 0x74, 0x72, 0x71, 0x70, 0x6E, 0x6C, 0x6B,
+ 0x69, 0x67, 0x66, 0x64, 0x62, 0x60, 0x5E, 0x5B,
+ 0x59, 0x57, 0x55, 0x52, 0x50, 0x4E, 0x4B, 0x49,
+ 0x46, 0x43, 0x41, 0x3E, 0x3B, 0x39, 0x36, 0x33,
+ 0x30, 0x2D, 0x2A, 0x27, 0x24, 0x21, 0x1E, 0x1B,
+ 0x18, 0x15, 0x12, 0x0F, 0x0C, 0x09, 0x06, 0x03,
+ 0x00, 0xFD, 0xFA, 0xF7, 0xF4, 0xF1, 0xEE, 0xEB,
+ 0xE8, 0xE5, 0xE2, 0xDF, 0xDC, 0xD9, 0xD6, 0xD3,
+ 0xD0, 0xCD, 0xCA, 0xC7, 0xC5, 0xC2, 0xBF, 0xBD,
+ 0xBA, 0xB7, 0xB5, 0xB2, 0xB0, 0xAE, 0xAB, 0xA9,
+ 0xA7, 0xA5, 0xA2, 0xA0, 0x9E, 0x9C, 0x9A, 0x99,
+ 0x97, 0x95, 0x94, 0x92, 0x90, 0x8F, 0x8E, 0x8C,
+ 0x8B, 0x8A, 0x89, 0x88, 0x87, 0x86, 0x85, 0x85,
+ 0x84, 0x83, 0x83, 0x82, 0x82, 0x82, 0x82, 0x82,
+ 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x83, 0x83,
+ 0x84, 0x85, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A,
+ 0x8B, 0x8C, 0x8E, 0x8F, 0x90, 0x92, 0x94, 0x95,
+ 0x97, 0x99, 0x9A, 0x9C, 0x9E, 0xA0, 0xA2, 0xA5,
+ 0xA7, 0xA9, 0xAB, 0xAE, 0xB0, 0xB2, 0xB5, 0xB7,
+ 0xBA, 0xBD, 0xBF, 0xC2, 0xC5, 0xC7, 0xCA, 0xCD,
+ 0xD0, 0xD3, 0xD6, 0xD9, 0xDC, 0xDF, 0xE2, 0xE5,
+ 0xE8, 0xEB, 0xEE, 0xF1, 0xF4, 0xF7, 0xFA, 0xFD,
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+ 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
+ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+ 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
+ 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
+ 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
+ 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
+ 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+ 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
+ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
+ 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,
+ 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
+ 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
+ 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7,
+ 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
+ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
+ 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
+ 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
+ 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
+ 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
+ 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
+ 0x29, 0x23, 0xBE, 0x84, 0xE1, 0x6C, 0xD6, 0xAE,
+ 0x52, 0x90, 0x49, 0xF1, 0xF1, 0xBB, 0xE9, 0xEB,
+ 0xB3, 0xA6, 0xDB, 0x3C, 0x87, 0x0C, 0x3E, 0x99,
+ 0x24, 0x5E, 0x0D, 0x1C, 0x06, 0xB7, 0x47, 0xDE,
+ 0xB3, 0x12, 0x4D, 0xC8, 0x43, 0xBB, 0x8B, 0xA6,
+ 0x1F, 0x03, 0x5A, 0x7D, 0x09, 0x38, 0x25, 0x1F,
+ 0x5D, 0xD4, 0xCB, 0xFC, 0x96, 0xF5, 0x45, 0x3B,
+ 0x13, 0x0D, 0x89, 0x0A, 0x1C, 0xDB, 0xAE, 0x32,
+ 0x20, 0x9A, 0x50, 0xEE, 0x40, 0x78, 0x36, 0xFD,
+ 0x12, 0x49, 0x32, 0xF6, 0x9E, 0x7D, 0x49, 0xDC,
+ 0xAD, 0x4F, 0x14, 0xF2, 0x44, 0x40, 0x66, 0xD0,
+ 0x6B, 0xC4, 0x30, 0xB7, 0x32, 0x3B, 0xA1, 0x22,
+ 0xF6, 0x22, 0x91, 0x9D, 0xE1, 0x8B, 0x1F, 0xDA,
+ 0xB0, 0xCA, 0x99, 0x02, 0xB9, 0x72, 0x9D, 0x49,
+ 0x2C, 0x80, 0x7E, 0xC5, 0x99, 0xD5, 0xE9, 0x80,
+ 0xB2, 0xEA, 0xC9, 0xCC, 0x53, 0xBF, 0x67, 0xD6,
+ 0xBF, 0x14, 0xD6, 0x7E, 0x2D, 0xDC, 0x8E, 0x66,
+ 0x83, 0xEF, 0x57, 0x49, 0x61, 0xFF, 0x69, 0x8F,
+ 0x61, 0xCD, 0xD1, 0x1E, 0x9D, 0x9C, 0x16, 0x72,
+ 0x72, 0xE6, 0x1D, 0xF0, 0x84, 0x4F, 0x4A, 0x77,
+ 0x02, 0xD7, 0xE8, 0x39, 0x2C, 0x53, 0xCB, 0xC9,
+ 0x12, 0x1E, 0x33, 0x74, 0x9E, 0x0C, 0xF4, 0xD5,
+ 0xD4, 0x9F, 0xD4, 0xA4, 0x59, 0x7E, 0x35, 0xCF,
+ 0x32, 0x22, 0xF4, 0xCC, 0xCF, 0xD3, 0x90, 0x2D,
+ 0x48, 0xD3, 0x8F, 0x75, 0xE6, 0xD9, 0x1D, 0x2A,
+ 0xE5, 0xC0, 0xF7, 0x2B, 0x78, 0x81, 0x87, 0x44,
+ 0x0E, 0x5F, 0x50, 0x00, 0xD4, 0x61, 0x8D, 0xBE,
+ 0x7B, 0x05, 0x15, 0x07, 0x3B, 0x33, 0x82, 0x1F,
+ 0x18, 0x70, 0x92, 0xDA, 0x64, 0x54, 0xCE, 0xB1,
+ 0x85, 0x3E, 0x69, 0x15, 0xF8, 0x46, 0x6A, 0x04,
+ 0x96, 0x73, 0x0E, 0xD9, 0x16, 0x2F, 0x67, 0x68,
+ 0xD4, 0xF7, 0x4A, 0x4A, 0xD0, 0x57, 0x68, 0x76
+};
+
+const byte PcSpkDriver::_outputTable1[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5,
+ 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7
+};
+
+const byte PcSpkDriver::_outputTable2[] = {
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
+ 8, 9, 10, 11,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7
+};
+
+const uint16 PcSpkDriver::_effectEnvStepTable[] = {
+ 1, 2, 4, 5,
+ 6, 7, 8, 9,
+ 10, 12, 14, 16,
+ 18, 21, 24, 30,
+ 36, 50, 64, 82,
+ 100, 136, 160, 192,
+ 240, 276, 340, 460,
+ 600, 860, 1200, 1600
+};
+
+const uint16 PcSpkDriver::_frequencyTable[] = {
+ 0x8E84, 0x8E00, 0x8D7D, 0x8CFA,
+ 0x8C78, 0x8BF7, 0x8B76, 0x8AF5,
+ 0x8A75, 0x89F5, 0x8976, 0x88F7,
+ 0x8879, 0x87FB, 0x877D, 0x8700,
+ 0x8684, 0x8608, 0x858C, 0x8511,
+ 0x8496, 0x841C, 0x83A2, 0x8328,
+ 0x82AF, 0x8237, 0x81BF, 0x8147,
+ 0x80D0, 0x8059, 0x7FE3, 0x7F6D,
+ 0x7EF7, 0x7E82, 0x7E0D, 0x7D99,
+ 0x7D25, 0x7CB2, 0x7C3F, 0x7BCC,
+ 0x7B5A, 0x7AE8, 0x7A77, 0x7A06,
+ 0x7995, 0x7925, 0x78B5, 0x7846,
+ 0x77D7, 0x7768, 0x76FA, 0x768C,
+ 0x761F, 0x75B2, 0x7545, 0x74D9,
+ 0x746D, 0x7402, 0x7397, 0x732C,
+ 0x72C2, 0x7258, 0x71EF, 0x7186,
+ 0x711D, 0x70B5, 0x704D, 0x6FE5,
+ 0x6F7E, 0x6F17, 0x6EB0, 0x6E4A,
+ 0x6DE5, 0x6D7F, 0x6D1A, 0x6CB5,
+ 0x6C51, 0x6BED, 0x6B8A, 0x6B26,
+ 0x6AC4, 0x6A61, 0x69FF, 0x699D,
+ 0x693C, 0x68DB, 0x687A, 0x681A,
+ 0x67BA, 0x675A, 0x66FA, 0x669B,
+ 0x663D, 0x65DF, 0x6581, 0x6523,
+ 0x64C6, 0x6469, 0x640C, 0x63B0,
+ 0x6354, 0x62F8, 0x629D, 0x6242,
+ 0x61E7, 0x618D, 0x6133, 0x60D9,
+ 0x6080, 0x6027, 0x5FCE, 0x5F76,
+ 0x5F1E, 0x5EC6, 0x5E6E, 0x5E17,
+ 0x5DC1, 0x5D6A, 0x5D14, 0x5CBE,
+ 0x5C68, 0x5C13, 0x5BBE, 0x5B6A,
+ 0x5B15, 0x5AC1, 0x5A6E, 0x5A1A,
+ 0x59C7, 0x5974, 0x5922, 0x58CF,
+ 0x587D, 0x582C, 0x57DA, 0x5789,
+ 0x5739, 0x56E8, 0x5698, 0x5648,
+ 0x55F9, 0x55A9, 0x555A, 0x550B,
+ 0x54BD, 0x546F, 0x5421, 0x53D3,
+ 0x5386, 0x5339, 0x52EC, 0x52A0,
+ 0x5253, 0x5207, 0x51BC, 0x5170,
+ 0x5125, 0x50DA, 0x5090, 0x5046,
+ 0x4FFB, 0x4FB2, 0x4F68, 0x4F1F,
+ 0x4ED6, 0x4E8D, 0x4E45, 0x4DFC,
+ 0x4DB5, 0x4D6D, 0x4D25, 0x4CDE,
+ 0x4C97, 0x4C51, 0x4C0A, 0x4BC4,
+ 0x4B7E, 0x4B39, 0x4AF3, 0x4AAE,
+ 0x4A69, 0x4A24, 0x49E0, 0x499C,
+ 0x4958, 0x4914, 0x48D1, 0x488E,
+ 0x484B, 0x4808, 0x47C6, 0x4783
+};
+
+} // End of namespace Scumm
+
diff --git a/engines/scumm/imuse/pcspk.h b/engines/scumm/imuse/pcspk.h
new file mode 100644
index 0000000000..e77ac8c1bf
--- /dev/null
+++ b/engines/scumm/imuse/pcspk.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 SCUMM_IMUSE_PCSPK_H
+#define SCUMM_IMUSE_PCSPK_H
+
+#include "audio/softsynth/emumidi.h"
+#include "audio/softsynth/pcspk.h"
+
+namespace Scumm {
+
+class PcSpkDriver : public MidiDriver_Emulated {
+public:
+ PcSpkDriver(Audio::Mixer *mixer);
+ ~PcSpkDriver();
+
+ virtual int open();
+ virtual void close();
+
+ virtual void send(uint32 d);
+ virtual void sysEx_customInstrument(byte channel, uint32 type, const byte *instr);
+
+ virtual MidiChannel *allocateChannel();
+ virtual MidiChannel *getPercussionChannel() { return 0; }
+
+ bool isStereo() const { return _pcSpk.isStereo(); }
+ int getRate() const { return _pcSpk.getRate(); }
+protected:
+ void generateSamples(int16 *buf, int len);
+ void onTimer();
+
+private:
+ Audio::PCSpeaker _pcSpk;
+ int _effectTimer;
+ uint8 _randBase;
+
+ void updateNote();
+ void output(uint16 out);
+
+ static uint8 getEffectModifier(uint16 level);
+ int16 getEffectModLevel(int16 level, int8 mod);
+ int16 getRandMultipy(int16 input);
+
+ struct EffectEnvelope {
+ uint8 state;
+ int16 currentLevel;
+ int16 duration;
+ int16 maxLevel;
+ int16 startLevel;
+ uint8 loop;
+ uint8 stateTargetLevels[4];
+ uint8 stateModWheelLevels[4];
+ uint8 modWheelSensitivity;
+ uint8 modWheelState;
+ uint8 modWheelLast;
+ int16 stateNumSteps;
+ int16 stateStepCounter;
+ int16 changePerStep;
+ int8 dir;
+ int16 changePerStepRem;
+ int16 changeCountRem;
+ };
+
+ struct EffectDefinition {
+ int16 phase;
+ uint8 type;
+ uint8 useModWheel;
+ EffectEnvelope *envelope;
+ };
+
+ struct OutputChannel {
+ uint8 active;
+ uint8 note;
+ uint8 sustainNoteOff;
+ uint8 length;
+ const uint8 *instrument;
+ uint8 unkA;
+ uint8 unkB;
+ uint8 unkC;
+ int16 unkE;
+ EffectEnvelope effectEnvelopeA;
+ EffectDefinition effectDefA;
+ EffectEnvelope effectEnvelopeB;
+ EffectDefinition effectDefB;
+ int16 unk60;
+ };
+
+ struct MidiChannel_PcSpk : public MidiChannel {
+ virtual MidiDriver *device();
+ virtual byte getNumber();
+ virtual void release();
+
+ virtual void send(uint32 b);
+ virtual void noteOff(byte note);
+ virtual void noteOn(byte note, byte velocity);
+ virtual void programChange(byte program);
+ virtual void pitchBend(int16 bend);
+ virtual void controlChange(byte control, byte value);
+ virtual void pitchBendFactor(byte value);
+ virtual void priority(byte value);
+ virtual void sysEx_customInstrument(uint32 type, const byte *instr);
+
+ void init(PcSpkDriver *owner, byte channel);
+ bool allocate();
+
+ PcSpkDriver *_owner;
+ bool _allocated;
+ byte _channel;
+
+ OutputChannel _out;
+ uint8 _instrument[23];
+ uint8 _programNr;
+ uint8 _priority;
+ uint8 _tl;
+ uint8 _modWheel;
+ uint8 _sustain;
+ uint8 _pitchBendFactor;
+ int16 _pitchBend;
+ };
+
+ void setupEffects(MidiChannel_PcSpk &chan, EffectEnvelope &env, EffectDefinition &def, byte flags, const byte *data);
+ void startEffect(EffectEnvelope &env, const byte *data);
+ void initNextEnvelopeState(EffectEnvelope &env);
+ void updateEffectGenerator(MidiChannel_PcSpk &chan, EffectEnvelope &env, EffectDefinition &def);
+ uint8 advanceEffectEnvelope(EffectEnvelope &env, EffectDefinition &def);
+
+ MidiChannel_PcSpk _channels[6];
+ MidiChannel_PcSpk *_activeChannel;
+
+ MidiChannel_PcSpk *_lastActiveChannel;
+ uint16 _lastActiveOut;
+
+ static const byte _outInstrumentData[1024];
+ static const byte _outputTable1[];
+ static const byte _outputTable2[];
+ static const uint16 _effectEnvStepTable[];
+ static const uint16 _frequencyTable[];
+};
+
+} // End of namespace Scumm
+
+#endif
+
diff --git a/engines/scumm/imuse/sysex_samnmax.cpp b/engines/scumm/imuse/sysex_samnmax.cpp
index 4c4219e7bb..a4f525da56 100644
--- a/engines/scumm/imuse/sysex_samnmax.cpp
+++ b/engines/scumm/imuse/sysex_samnmax.cpp
@@ -53,8 +53,7 @@ void sysexHandler_SamNMax(Player *player, const byte *msg, uint16 len) {
// something magical is supposed to happen....
for (a = 0; a < ARRAYSIZE(se->_snm_triggers); ++a) {
if (se->_snm_triggers[a].sound == player->_id &&
- se->_snm_triggers[a].id == *p)
- {
+ se->_snm_triggers[a].id == *p) {
se->_snm_triggers[a].sound = se->_snm_triggers[a].id = 0;
se->doCommand(8, se->_snm_triggers[a].command);
break;
diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp
index 4eb3bee93c..85ffc86f47 100644
--- a/engines/scumm/imuse/sysex_scumm.cpp
+++ b/engines/scumm/imuse/sysex_scumm.cpp
@@ -49,50 +49,52 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) {
switch (code = *p++) {
case 0:
// Allocate new part.
- // There are 17 bytes of useful information here.
+ // There are 8 bytes (after decoding!) of useful information here.
// Here is what we know about them so far:
- // BYTE 00: Channel #
- // BYTE 02: BIT 01(0x01): Part on?(1 = yes)
+ // BYTE 0: Channel #
+ // BYTE 1: BIT 01(0x01): Part on?(1 = yes)
// BIT 02(0x02): Reverb? (1 = yes) [bug #1088045]
- // BYTE 04: Priority adjustment [guessing]
- // BYTE 05: Volume(upper 4 bits) [guessing]
- // BYTE 06: Volume(lower 4 bits) [guessing]
- // BYTE 07: Pan(upper 4 bits) [bug #1088045]
- // BYTE 08: Pan(lower 4 bits) [bug #1088045]
- // BYTE 09: BIT 04(0x08): Percussion?(1 = yes)
- // BYTE 13: Pitchbend range(upper 4 bits) [bug #1088045]
- // BYTE 14: Pitchbend range(lower 4 bits) [bug #1088045]
- // BYTE 15: Program(upper 4 bits)
- // BYTE 16: Program(lower 4 bits)
-
- // athrxx (05-21-2011):
- // BYTE 9, 10: Transpose (if set to 0x80, this means that part->_transpose_eff will be 0 (also ignoring player->_transpose)
- // BYTE 11, 12: Detune
+ // BYTE 2: Priority adjustment
+ // BYTE 3: Volume [guessing]
+ // BYTE 4: Pan [bug #1088045]
+ // BYTE 5: BIT 8(0x80): Percussion?(1 = yes) [guessed?]
+ // BYTE 5: Transpose, if set to 0x80(=-1) it means no transpose
+ // BYTE 6: Detune
+ // BYTE 7: Pitchbend factor [bug #1088045]
+ // BYTE 8: Program
part = player->getPart(p[0] & 0x0F);
+ player->decode_sysex_bytes(p + 1, buf + 1, len - 1);
if (part) {
- part->set_onoff(p[2] & 0x01);
- part->effectLevel((p[2] & 0x02) ? 127 : 0);
- part->set_pri(p[4]);
- part->volume((p[5] & 0x0F) << 4 |(p[6] & 0x0F));
- part->set_pan((p[7] & 0x0F) << 4 | (p[8] & 0x0F));
- part->_percussion = player->_isMIDI ? ((p[9] & 0x08) > 0) : false;
- part->set_transpose((p[9] & 0x0F) << 4 | (p[10] & 0x0F));
- part->set_detune((p[11] & 0x0F) << 4 | (p[12] & 0x0F));
- part->pitchBendFactor((p[13] & 0x0F) << 4 | (p[14] & 0x0F));
+ part->set_onoff(buf[1] & 0x01);
+ part->effectLevel((buf[1] & 0x02) ? 127 : 0);
+ part->set_pri(buf[2]);
+ part->volume(buf[3]);
+ part->set_pan(buf[4]);
+ part->_percussion = player->_isMIDI ? ((buf[5] & 0x80) > 0) : false;
+ part->set_transpose(buf[5]);
+ part->set_detune(buf[6]);
+ part->pitchBendFactor(buf[7]);
if (part->_percussion) {
if (part->_mc) {
part->off();
se->reallocateMidiChannels(player->_midi);
}
} else {
- // Even in cases where a program does not seem to be specified,
- // i.e. bytes 15 and 16 are 0, we send a program change because
- // 0 is a valid program number. MI2 tests show that in such
- // cases, a regular program change message always seems to follow
- // anyway.
- if (player->_isMIDI)
- part->_instrument.program((p[15] & 0x0F) << 4 |(p[16] & 0x0F), player->_isMT32);
+ if (player->_isMIDI) {
+ // Even in cases where a program does not seem to be specified,
+ // i.e. bytes 15 and 16 are 0, we send a program change because
+ // 0 is a valid program number. MI2 tests show that in such
+ // cases, a regular program change message always seems to follow
+ // anyway.
+ part->_instrument.program(buf[8], player->_isMT32);
+ } else {
+ // Like the original we set up the instrument data of the
+ // specified program here too. In case the global
+ // instrument data is not loaded already, this will take
+ // care of setting a default instrument too.
+ se->copyGlobalInstrument(buf[8], &part->_instrument);
+ }
part->sendAll();
}
}
@@ -113,11 +115,10 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) {
++p; // Skip hardware type
part = player->getPart(a);
if (part) {
- if (len == 62) {
+ if (len == 62 || len == 48) {
player->decode_sysex_bytes(p, buf, len - 2);
part->set_instrument((byte *)buf);
} else {
- // SPK tracks have len == 48 here, and are not supported
part->programChange(254); // Must be invalid, but not 255 (which is reserved)
}
}
@@ -127,7 +128,8 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) {
p += 2; // Skip hardware type and... whatever came right before it
a = *p++;
player->decode_sysex_bytes(p, buf, len - 3);
- se->setGlobalAdLibInstrument(a, buf);
+ if (len == 63 || len == 49)
+ se->setGlobalInstrument(a, buf);
break;
case 33: // Parameter adjust
@@ -185,10 +187,9 @@ void sysexHandler_Scumm(Player *player, const byte *msg, uint16 len) {
case 80: // Loop
player->decode_sysex_bytes(p + 1, buf, len - 1);
- player->setLoop
- (READ_BE_UINT16(buf), READ_BE_UINT16(buf + 2),
- READ_BE_UINT16(buf + 4), READ_BE_UINT16(buf + 6),
- READ_BE_UINT16(buf + 8));
+ player->setLoop(READ_BE_UINT16(buf), READ_BE_UINT16(buf + 2),
+ READ_BE_UINT16(buf + 4), READ_BE_UINT16(buf + 6),
+ READ_BE_UINT16(buf + 8));
break;
case 81: // End loop
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp
index 69cd89320c..6edfe0bd33 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.cpp
+++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp
@@ -105,7 +105,9 @@ static const byte imxOtherTable[6][64] = {
void releaseImcTables() {
free(_destImcTable);
+ _destImcTable = NULL;
free(_destImcTable2);
+ _destImcTable2 = NULL;
}
void initializeImcTables() {
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 07c52578c3..5eea7acc6b 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -181,7 +181,7 @@ void ScummEngine::parseEvent(Common::Event event) {
_mouse.y = event.mouse.y;
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
- _mouse.x -= (Common::kHercW - _screenWidth * 2) / 2;
+ _mouse.x -= (kHercWidth - _screenWidth * 2) / 2;
_mouse.x >>= 1;
_mouse.y = _mouse.y * 4 / 7;
} else if (_useCJKMode && _textSurfaceMultiplier == 2) {
diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk
index 1a60564a9e..99ffdf7f21 100644
--- a/engines/scumm/module.mk
+++ b/engines/scumm/module.mk
@@ -27,6 +27,7 @@ MODULE_OBJS := \
imuse/imuse_part.o \
imuse/imuse_player.o \
imuse/instrument.o \
+ imuse/pcspk.o \
imuse/sysex_samnmax.o \
imuse/sysex_scumm.o \
input.o \
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index ba13ff46d9..51ba2195d7 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -48,11 +48,7 @@ uint8 *ScummEngine::getHEPaletteSlot(uint16 palSlot) {
}
uint16 ScummEngine::get16BitColor(uint8 r, uint8 g, uint8 b) {
- uint16 ar = (r >> 3) << 10;
- uint16 ag = (g >> 3) << 5;
- uint16 ab = (b >> 3) << 0;
- uint16 col = ar | ag | ab;
- return col;
+ return _outputPixelFormat.RGBToColor(r, g, b);
}
void ScummEngine::resetPalette() {
diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp
index e71a8d0587..dd7630d370 100644
--- a/engines/scumm/player_towns.cpp
+++ b/engines/scumm/player_towns.cpp
@@ -32,7 +32,7 @@ Player_Towns::Player_Towns(ScummEngine *vm, bool isVersion2) : _vm(vm), _v2(isVe
void Player_Towns::setSfxVolume(int vol) {
if (!_intf)
- return;
+ return;
_intf->setSoundEffectVolume(vol);
}
@@ -98,17 +98,17 @@ void Player_Towns::playPcmTrack(int sound, const uint8 *data, int velo, int pan,
return;
const uint8 *sfxData = data + 16;
-
+
int numChan = _v2 ? 1 : data[14];
for (int i = 0; i < numChan; i++) {
int chan = allocatePcmChannel(sound, i, priority);
if (!chan)
return;
-
+
_intf->callback(70, _unkFlags);
_intf->callback(3, chan + 0x3f, pan);
_intf->callback(37, chan + 0x3f, note, velo, sfxData);
-
+
_pcmCurrentSound[chan].note = note;
_pcmCurrentSound[chan].velo = velo;
_pcmCurrentSound[chan].pan = pan;
@@ -191,7 +191,7 @@ Player_Towns_v1::Player_Towns_v1(ScummEngine *vm, Audio::Mixer *mixer) : Player_
if (_vm->_game.version == 3) {
_soundOverride = new SoundOvrParameters[_numSoundMax];
memset(_soundOverride, 0, _numSoundMax * sizeof(SoundOvrParameters));
- }
+ }
_driver = new TownsEuphonyDriver(mixer);
}
@@ -204,7 +204,7 @@ Player_Towns_v1::~Player_Towns_v1() {
bool Player_Towns_v1::init() {
if (!_driver)
return false;
-
+
if (!_driver->init())
return false;
@@ -235,13 +235,13 @@ void Player_Towns_v1::startSound(int sound) {
if (type == 0) {
uint8 velocity = 0;
uint8 note = 0;
-
+
if (_vm->_game.version == 3) {
velocity = (_soundOverride[sound].vLeft + _soundOverride[sound].vRight);
note = _soundOverride[sound].note;
}
- velocity = velocity ? velocity >> 2 : ptr[14] >> 1;
+ velocity = velocity ? velocity >> 2 : ptr[14] >> 1;
playPcmTrack(sound, ptr + 6, velocity, 64, note ? note : ptr[50], READ_LE_UINT16(ptr + 10));
} else if (type == 1) {
@@ -267,7 +267,7 @@ void Player_Towns_v1::stopSound(int sound) {
_eupLooping = false;
_driver->stopParser();
}
-
+
stopPcmTrack(sound);
}
@@ -293,7 +293,7 @@ int Player_Towns_v1::getSoundStatus(int sound) const {
int32 Player_Towns_v1::doCommand(int numargs, int args[]) {
int32 res = 0;
-
+
switch (args[0]) {
case 2:
_driver->intf()->callback(73, 0);
@@ -381,12 +381,12 @@ void Player_Towns_v1::saveLoadWithSerializer(Serializer *ser) {
void Player_Towns_v1::restoreAfterLoad() {
setVolumeCD(_cdaVolLeft, _cdaVolRight);
-
+
if (_cdaCurrentSoundTemp) {
uint8 *ptr = _vm->getResourceAddress(rtSound, _cdaCurrentSoundTemp) + 6;
if (_vm->_game.version != 3)
ptr += 2;
-
+
if (ptr[7] == 2) {
playCdaTrack(_cdaCurrentSoundTemp, ptr, true);
_cdaCurrentSound = _cdaCurrentSoundTemp;
@@ -398,7 +398,7 @@ void Player_Towns_v1::restoreAfterLoad() {
uint8 *ptr = _vm->getResourceAddress(rtSound, _eupCurrentSound) + 6;
if (_vm->_game.version != 3)
ptr += 2;
-
+
if (ptr[7] == 1) {
setSoundVolume(_eupCurrentSound, _eupVolLeft, _eupVolRight);
playEuphonyTrack(_eupCurrentSound, ptr);
@@ -458,7 +458,7 @@ void Player_Towns_v1::startSoundEx(int sound, int velo, int pan, int note) {
} else if (ptr[13] == 2) {
int volLeft = velo;
int volRight = velo;
-
+
if (pan < 50)
volRight = ((pan * 2 + 1) * velo + 50) / 100;
else if (pan > 50)
@@ -478,7 +478,7 @@ void Player_Towns_v1::stopSoundSuspendLooping(int sound) {
return;
} else if (sound == _cdaCurrentSound) {
if (_cdaNumLoops && _cdaForceRestart)
- _cdaForceRestart = 1;
+ _cdaForceRestart = 1;
} else {
for (int i = 1; i < 9; i++) {
if (sound == _pcmCurrentSound[i].index) {
@@ -487,7 +487,7 @@ void Player_Towns_v1::stopSoundSuspendLooping(int sound) {
_driver->stopSoundEffect(i + 0x3f);
if (_pcmCurrentSound[i].looping)
_pcmCurrentSound[i].paused = 1;
- else
+ else
_pcmCurrentSound[i].index = 0;
}
}
@@ -532,7 +532,7 @@ void Player_Towns_v1::playEuphonyTrack(int sound, const uint8 *data) {
uint32 trackSize = READ_LE_UINT32(src);
src += 4;
uint8 startTick = *src++;
-
+
_driver->setMusicTempo(*src++);
_driver->startMusicTrack(trackData, trackSize, startTick);
@@ -559,7 +559,7 @@ void Player_Towns_v1::playCdaTrack(int sound, const uint8 *data, bool skipTrackV
}
}
- if (sound == _cdaCurrentSound && _vm->_sound->pollCD() == 1)
+ if (sound == _cdaCurrentSound && _vm->_sound->pollCD() == 1)
return;
ptr += 16;
@@ -585,7 +585,7 @@ Player_Towns_v2::~Player_Towns_v2() {
_intf = 0;
if (_imuseDispose)
- delete _imuse;
+ delete _imuse;
delete[] _sblData;
delete[] _soundOverride;
@@ -594,7 +594,7 @@ Player_Towns_v2::~Player_Towns_v2() {
bool Player_Towns_v2::init() {
if (!_intf)
return false;
-
+
if (!_intf->init())
return false;
@@ -637,7 +637,7 @@ void Player_Towns_v2::startSound(int sound) {
void Player_Towns_v2::stopSound(int sound) {
if (_soundOverride[sound].type == 7) {
- stopPcmTrack(sound);
+ stopPcmTrack(sound);
} else {
_imuse->stopSound(sound);
}
@@ -651,7 +651,7 @@ void Player_Towns_v2::stopAllSounds() {
int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
int32 res = -1;
uint8 *ptr = 0;
-
+
switch (args[0]) {
case 8:
startSound(args[1]);
@@ -675,7 +675,7 @@ int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
case 258:
if (_soundOverride[args[1]].type == 0) {
ptr = _vm->getResourceAddress(rtSound, args[1]);
- if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
+ if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
_soundOverride[args[1]].type = 7;
}
if (_soundOverride[args[1]].type == 7) {
@@ -683,11 +683,11 @@ int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
res = 0;
}
break;
-
+
case 259:
if (_soundOverride[args[1]].type == 0) {
ptr = _vm->getResourceAddress(rtSound, args[1]);
- if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
+ if (READ_BE_UINT32(ptr) == MKTAG('T','O','W','S'))
_soundOverride[args[1]].type = 7;
}
if (_soundOverride[args[1]].type == 7) {
@@ -702,7 +702,7 @@ int32 Player_Towns_v2::doCommand(int numargs, int args[]) {
if (res == -1)
return _imuse->doCommand(numargs, args);
-
+
return res;
}
@@ -718,9 +718,9 @@ void Player_Towns_v2::playVocTrack(const uint8 *data) {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x36, 0x04, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00
};
-
+
uint32 len = (READ_LE_UINT32(data) >> 8) - 2;
-
+
int chan = allocatePcmChannel(0xffff, 0, 0x1000);
if (!chan)
return;
diff --git a/engines/scumm/player_towns.h b/engines/scumm/player_towns.h
index 470020d621..5c76d7c6c7 100644
--- a/engines/scumm/player_towns.h
+++ b/engines/scumm/player_towns.h
@@ -47,8 +47,8 @@ public:
virtual void restoreAfterLoad();
// version 1 specific
- virtual int getCurrentCdaSound() { return 0; }
- virtual int getCurrentCdaVolume() { return 0; }
+ virtual int getCurrentCdaSound() { return 0; }
+ virtual int getCurrentCdaVolume() { return 0; }
virtual void setVolumeCD(int left, int right) {}
virtual void setSoundVolume(int sound, int left, int right) {}
virtual void setSoundNote(int sound, int note) {}
@@ -92,8 +92,8 @@ public:
void stopAllSounds();
int getSoundStatus(int sound) const;
- int getCurrentCdaSound() { return _cdaCurrentSound; }
- int getCurrentCdaVolume() { return (_cdaVolLeft + _cdaVolRight + 1) >> 1; }
+ int getCurrentCdaSound() { return _cdaCurrentSound; }
+ int getCurrentCdaVolume() { return (_cdaVolLeft + _cdaVolRight + 1) >> 1; }
int32 doCommand(int numargs, int args[]);
@@ -124,7 +124,7 @@ private:
uint8 _cdaVolLeft;
uint8 _cdaVolRight;
-
+
uint8 _eupCurrentSound;
uint8 _eupLooping;
uint8 _eupVolLeft;
@@ -170,7 +170,7 @@ private:
SoundOvrParameters *_soundOverride;
uint8 *_sblData;
-
+
IMuse *_imuse;
const bool _imuseDispose;
};
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 0448f60593..10301da3e3 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -822,11 +822,12 @@ byte *ResourceManager::createResource(ResType type, ResId idx, uint32 size) {
expireResources(size);
- byte *ptr = (byte *)calloc(size + SAFETY_AREA, 1);
+ byte *ptr = new byte[size + SAFETY_AREA];
if (ptr == NULL) {
error("createResource(%s,%d): Out of memory while allocating %d", nameOfResType(type), idx, size);
}
+ memset(ptr, 0, size + SAFETY_AREA);
_allocatedSize += size;
_types[type][idx]._address = ptr;
@@ -845,12 +846,12 @@ ResourceManager::Resource::Resource() {
}
ResourceManager::Resource::~Resource() {
- delete _address;
+ delete[] _address;
_address = 0;
}
void ResourceManager::Resource::nuke() {
- delete _address;
+ delete[] _address;
_address = 0;
_size = 0;
_flags = 0;
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 19834cb35d..3cc710c207 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1316,10 +1316,10 @@ void ScummEngine::saveOrLoad(Serializer *s) {
MKEND()
};
- s->saveLoadArrayOf(_textPalette, 48, sizeof(_textPalette[0]), sleUint8);
+ s->saveLoadArrayOf(_textPalette, 48, sizeof(_textPalette[0]), sleUint8);
s->saveLoadArrayOf(_cyclRects, 10, sizeof(_cyclRects[0]), townsFields);
s->saveLoadArrayOf(&_curStringRect, 1, sizeof(_curStringRect), townsFields);
- s->saveLoadArrayOf(_townsCharsetColorMap, 16, sizeof(_townsCharsetColorMap[0]), sleUint8);
+ s->saveLoadArrayOf(_townsCharsetColorMap, 16, sizeof(_townsCharsetColorMap[0]), sleUint8);
s->saveLoadEntries(this, townsExtraEntries);
}
#endif
@@ -1489,7 +1489,7 @@ void ScummEngine_v5::saveOrLoad(Serializer *s) {
// Reset cursors for old FM-Towns savegames saved with 256 color setting.
// Otherwise the cursor will be messed up when displayed in the new hi color setting.
- if (_game.platform == Common::kPlatformFMTowns && _bytesPerPixelOutput == 2 && s->isLoading() && s->getVersion() < VER(82)) {
+ if (_game.platform == Common::kPlatformFMTowns && _outputPixelFormat.bytesPerPixel == 2 && s->isLoading() && s->getVersion() < VER(82)) {
if (_game.id == GID_LOOM) {
redefineBuiltinCursorFromChar(1, 1);
redefineBuiltinCursorHotspot(1, 0, 0);
@@ -1497,6 +1497,16 @@ void ScummEngine_v5::saveOrLoad(Serializer *s) {
resetCursors();
}
}
+
+ // Regenerate 16bit palette after loading.
+ // This avoids color issues when loading savegames that have been saved with a different ScummVM port
+ // that uses a different 16bit color mode than the ScummVM port which is currently used.
+#ifdef USE_RGB_COLOR
+ if (_game.platform == Common::kPlatformPCEngine && s->isLoading()) {
+ for (int i = 0; i < 256; ++i)
+ _16BitPalette[i] = get16BitColor(_currentPalette[i * 3 + 0], _currentPalette[i * 3 + 1], _currentPalette[i * 3 + 2]);
+ }
+#endif
}
#ifdef ENABLE_SCUMM_7_8
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 1302c8c28d..8340f62dbc 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -68,6 +68,18 @@ void ScummEngine_v4::o4_ifState() {
int a = getVarOrDirectWord(PARAM_1);
int b = getVarOrDirectByte(PARAM_2);
+ // WORKAROUND bug #3306145 (also occurs in original): Some old versions of
+ // Indy3 sometimes fail to allocate IQ points correctly. To quote:
+ // "About the points error leaving Castle Brunwald: It seems to "reversed"!
+ // When you get caught, free yourself and escape, you get 25 IQ points even
+ // though you're not supposed to. However if you escape WITHOUT getting
+ // caught, you get 0 IQ points (supposed to get 25 IQ points)."
+ // This workaround is meant to address that.
+ if (_game.id == GID_INDY3 && a == 367 &&
+ vm.slot[_currentScript].number == 363 && _currentRoom == 25) {
+ b = 0;
+ }
+
jumpRelative(getState(a) == b);
}
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 2c8f65496f..02c8d977a5 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1611,7 +1611,7 @@ void ScummEngine_v5::o5_resourceRoutines() {
foo = getVarOrDirectByte(PARAM_2);
bar = fetchScriptByte();
if (_townsPlayer)
- _townsPlayer->setSoundVolume(resid, foo, bar);
+ _townsPlayer->setSoundVolume(resid, foo, bar);
break;
case 37:
if (_townsPlayer)
@@ -2095,6 +2095,20 @@ void ScummEngine_v5::o5_startScript() {
if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns && script == 171)
return;
+ // WORKAROUND bug #3306145 (also occurs in original): Some old versions of
+ // Indy3 sometimes fail to allocate IQ points correctly. To quote:
+ // "In the Amiga version you get the 15 points for puzzle 30 if you give the
+ // book or KO the guy. The PC version correctly gives 10 points for puzzle
+ // 29 for KO and 15 for puzzle 30 when giving the book."
+ // This workaround is meant to address that.
+ if (_game.id == GID_INDY3 && vm.slot[_currentScript].number == 106 && script == 125 && VAR(115) != 2) {
+ // If Var[115] != 2, then:
+ // Correct: startScript(125,[29,10]);
+ // Wrong : startScript(125,[30,15]);
+ data[0] = 29;
+ data[1] = 10;
+ }
+
// Method used by original games to skip copy protection scheme
if (!_copyProtection) {
// Copy protection was disabled in LucasArts Classic Adventures (PC Disk)
@@ -2319,7 +2333,7 @@ void ScummEngine_v5::o5_verbOps() {
if (_game.platform == Common::kPlatformFMTowns && _game.version == 3 && slot)
continue;
-
+
if (slot == 0) {
for (slot = 1; slot < _numVerbs; slot++) {
if (_verbs[slot].verbid == 0)
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 0a5338374e..0f01e39459 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -71,6 +71,7 @@
#include "scumm/he/cup_player_he.h"
#include "scumm/util.h"
#include "scumm/verbs.h"
+#include "scumm/imuse/pcspk.h"
#include "backends/audiocd/audiocd.h"
@@ -114,17 +115,18 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_rnd("scumm")
{
- if (_game.heversion > 0) {
- _gdi = new GdiHE(this);
- } else if (_game.platform == Common::kPlatformNES) {
- _gdi = new GdiNES(this);
#ifdef USE_RGB_COLOR
- } else if (_game.features & GF_16BIT_COLOR) {
+ if (_game.features & GF_16BIT_COLOR) {
if (_game.platform == Common::kPlatformPCEngine)
_gdi = new GdiPCEngine(this);
- else
- _gdi = new Gdi16Bit(this);
+ else if (_game.heversion > 0)
+ _gdi = new GdiHE16bit(this);
+ } else
#endif
+ if (_game.heversion > 0) {
+ _gdi = new GdiHE(this);
+ } else if (_game.platform == Common::kPlatformNES) {
+ _gdi = new GdiNES(this);
} else if (_game.version <= 1) {
_gdi = new GdiV1(this);
} else if (_game.version == 2) {
@@ -260,7 +262,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_switchRoomEffect2 = 0;
_switchRoomEffect = 0;
- _bytesPerPixelOutput = _bytesPerPixel = 1;
+ _bytesPerPixel = 1;
_doEffect = false;
_snapScroll = false;
_currentLights = 0;
@@ -282,8 +284,9 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_16BitPalette = NULL;
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
_townsScreen = 0;
+#ifdef USE_RGB_COLOR
_cjkFont = 0;
- _cjkChar = 0;
+#endif
#endif
_shadowPalette = NULL;
_shadowPaletteSize = 0;
@@ -328,7 +331,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
memset(&_cyclRects, 0, 16 * sizeof(Common::Rect));
_numCyclRects = 0;
#endif
-
+
//
// Init all VARS to 0xFF
//
@@ -545,24 +548,25 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
_screenHeight = 200;
}
- _bytesPerPixelOutput = _bytesPerPixel = (_game.features & GF_16BIT_COLOR) ? 2 : 1;
+ _bytesPerPixel = (_game.features & GF_16BIT_COLOR) ? 2 : 1;
+ uint8 sizeMult = _bytesPerPixel;
#ifdef USE_RGB_COLOR
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns)
- _bytesPerPixelOutput = 2;
+ sizeMult = 2;
#endif
#endif
// Allocate gfx compositing buffer (not needed for V7/V8 games).
if (_game.version < 7)
- _compositeBuf = (byte *)malloc(_screenWidth * _screenHeight * _bytesPerPixelOutput);
+ _compositeBuf = (byte *)malloc(_screenWidth * _screenHeight * sizeMult);
else
_compositeBuf = 0;
_herculesBuf = 0;
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
- _herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH);
+ _herculesBuf = (byte *)malloc(kHercWidth * kHercHeight);
}
// Add debug levels
@@ -589,7 +593,7 @@ ScummEngine::~ScummEngine() {
delete _actors[i];
delete[] _actors;
}
-
+
delete[] _sortedActors;
delete[] _2byteFontPtr;
@@ -631,8 +635,10 @@ ScummEngine::~ScummEngine() {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
delete _townsScreen;
+#ifdef USE_RGB_COLOR
delete _cjkFont;
#endif
+#endif
delete _debugger;
@@ -1138,7 +1144,7 @@ Common::Error ScummEngine::init() {
// Initialize backend
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
- initGraphics(Common::kHercW, Common::kHercH, true);
+ initGraphics(kHercWidth, kHercHeight, true);
} else {
int screenWidth = _screenWidth;
int screenHeight = _screenHeight;
@@ -1148,16 +1154,37 @@ Common::Error ScummEngine::init() {
screenWidth *= _textSurfaceMultiplier;
screenHeight *= _textSurfaceMultiplier;
}
- if (_game.features & GF_16BIT_COLOR
+ if (_game.features & GF_16BIT_COLOR
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
|| _game.platform == Common::kPlatformFMTowns
#endif
) {
#ifdef USE_RGB_COLOR
- Graphics::PixelFormat format = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
- initGraphics(screenWidth, screenHeight, screenWidth > 320, &format);
- if (format != _system->getScreenFormat())
- return Common::kUnsupportedColorMode;
+ _outputPixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
+
+ if (_game.platform != Common::kPlatformFMTowns && _game.platform != Common::kPlatformPCEngine) {
+ initGraphics(screenWidth, screenHeight, screenWidth > 320, &_outputPixelFormat);
+ if (_outputPixelFormat != _system->getScreenFormat())
+ return Common::kUnsupportedColorMode;
+ } else {
+ Common::List<Graphics::PixelFormat> tryModes = _system->getSupportedFormats();
+ for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ++g) {
+ if (g->bytesPerPixel != 2 || g->aBits()) {
+ g = tryModes.erase(g);
+ g--;
+ }
+
+ if (*g == _outputPixelFormat) {
+ tryModes.clear();
+ tryModes.push_back(_outputPixelFormat);
+ break;
+ }
+ }
+
+ initGraphics(screenWidth, screenHeight, screenWidth > 320, tryModes);
+ if (_system->getScreenFormat().bytesPerPixel != 2)
+ return Common::kUnsupportedColorMode;
+ }
#else
if (_game.platform == Common::kPlatformFMTowns && _game.version == 3) {
warning("Starting game without the required 16bit color support.\nYou may experience color glitches");
@@ -1169,12 +1196,14 @@ Common::Error ScummEngine::init() {
} else {
#ifdef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns && _game.version == 5)
- error("This game requires dual graphics layer support which is disabled in this build");
+ return Common::Error(Common::kUnsupportedColorMode, "This game requires dual graphics layer support which is disabled in this build");
#endif
initGraphics(screenWidth, screenHeight, (screenWidth > 320));
}
}
+ _outputPixelFormat = _system->getScreenFormat();
+
setupScumm();
readIndexFile();
@@ -1283,7 +1312,7 @@ void ScummEngine::setupScumm() {
_res->setHeapThreshold(400000, maxHeapThreshold);
free(_compositeBuf);
- _compositeBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier * _bytesPerPixelOutput);
+ _compositeBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier * _outputPixelFormat.bytesPerPixel);
}
#ifdef ENABLE_SCUMM_7_8
@@ -1325,13 +1354,23 @@ void ScummEngine::setupCharsetRenderer() {
_charset = new CharsetRendererPCE(this);
else
#endif
+ if (_game.platform == Common::kPlatformFMTowns)
+ _charset = new CharsetRendererTownsV3(this);
+ else
_charset = new CharsetRendererV3(this);
#ifdef ENABLE_SCUMM_7_8
} else if (_game.version == 8) {
_charset = new CharsetRendererNut(this);
#endif
} else {
- _charset = new CharsetRendererClassic(this);
+#ifdef USE_RGB_COLOR
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+ if (_game.platform == Common::kPlatformFMTowns)
+ _charset = new CharsetRendererTownsClassic(this);
+ else
+#endif
+#endif
+ _charset = new CharsetRendererClassic(this);
}
}
@@ -1364,8 +1403,7 @@ void ScummEngine::resetScumm() {
#ifdef USE_RGB_COLOR
if (_game.features & GF_16BIT_COLOR
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
-
- || _game.platform == Common::kPlatformFMTowns
+ || (_game.platform == Common::kPlatformFMTowns)
#endif
)
_16BitPalette = (uint16 *)calloc(512, sizeof(uint16));
@@ -1374,8 +1412,8 @@ void ScummEngine::resetScumm() {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns) {
delete _townsScreen;
- _townsScreen = new TownsScreen(_system, _screenWidth * _textSurfaceMultiplier, _screenHeight * _textSurfaceMultiplier, _bytesPerPixelOutput);
- _townsScreen->setupLayer(0, _screenWidth, _screenHeight, (_bytesPerPixelOutput == 2) ? 32767 : 256);
+ _townsScreen = new TownsScreen(_system, _screenWidth * _textSurfaceMultiplier, _screenHeight * _textSurfaceMultiplier, _outputPixelFormat);
+ _townsScreen->setupLayer(0, _screenWidth, _screenHeight, (_outputPixelFormat.bytesPerPixel == 2) ? 32767 : 256);
_townsScreen->setupLayer(1, _screenWidth * _textSurfaceMultiplier, _screenHeight * _textSurfaceMultiplier, 16, _textPalette);
}
#endif
@@ -1833,18 +1871,20 @@ void ScummEngine::setupMusic(int midi) {
MidiDriver *nativeMidiDriver = 0;
MidiDriver *adlibMidiDriver = 0;
- if (_musicType != MDT_ADLIB && _musicType != MDT_TOWNS)
+ if (_musicType != MDT_ADLIB && _musicType != MDT_TOWNS && _musicType != MDT_PCSPK)
nativeMidiDriver = MidiDriver::createMidi(dev);
if (nativeMidiDriver != NULL && _native_mt32)
nativeMidiDriver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
- bool multi_midi = ConfMan.getBool("multi_midi") && _musicType != MDT_NONE && (midi & MDT_ADLIB);
+ bool multi_midi = ConfMan.getBool("multi_midi") && _musicType != MDT_NONE && _musicType != MDT_PCSPK && (midi & MDT_ADLIB);
if (_musicType == MDT_ADLIB || _musicType == MDT_TOWNS || multi_midi) {
adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
+ } else if (_musicType == MDT_PCSPK) {
+ adlibMidiDriver = new PcSpkDriver(_mixer);
}
_imuse = IMuse::create(_system, nativeMidiDriver, adlibMidiDriver);
-
+
if (_game.platform == Common::kPlatformFMTowns) {
_musicEngine = _townsPlayer = new Player_Towns_v2(this, _mixer, _imuse, true);
if (!_townsPlayer->init())
@@ -1869,6 +1909,8 @@ void ScummEngine::setupMusic(int midi) {
_imuse->property(IMuse::PROP_LIMIT_PLAYERS, 1);
_imuse->property(IMuse::PROP_RECYCLE_PLAYERS, 1);
}
+ if (_musicType == MDT_PCSPK)
+ _imuse->property(IMuse::PROP_PC_SPEAKER, 1);
}
}
}
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 6e75f47d77..e503af750d 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -46,9 +46,10 @@
/* This disables the dual layer mode which is used in FM-Towns versions
* of SCUMM games and which emulates the behavior of the original code.
* The only purpose is code size reduction for certain backends.
- * SCUMM 3 (FM-Towns) games will run in normal (DOS VGA) mode, which should
- * work just fine in most situations. Some glitches might occur. SCUMM 5 games
- * will not work without dual layer (and 16 bit color) support.
+ * SCUMM 3 (FM-Towns) games will run in English in normal (DOS VGA) mode,
+ * which should work just fine in most situations. Some glitches might
+ * occur. Japanese mode and SCUMM 5 FM-Towns games will not work without
+ * dual layer (and 16 bit color) support.
*/
#define DISABLE_TOWNS_DUAL_LAYER_MODE
#endif
@@ -345,6 +346,7 @@ class ResourceManager;
class ScummEngine : public Engine {
friend class ScummDebugger;
friend class CharsetRenderer;
+ friend class CharsetRendererTownsClassic;
friend class ResourceManager;
public:
@@ -897,7 +899,7 @@ public:
Common::RenderMode _renderMode;
uint8 _bytesPerPixel;
- uint8 _bytesPerPixelOutput;
+ Graphics::PixelFormat _outputPixelFormat;
protected:
ColorCycle _colorCycle[16]; // Palette cycles
@@ -1004,7 +1006,7 @@ protected:
// Screen rendering
byte *_compositeBuf;
byte *_herculesBuf;
-
+
virtual void drawDirtyScreenParts();
void updateDirtyScreen(VirtScreenNumber slot);
void drawStripToScreen(VirtScreen *vs, int x, int w, int t, int b);
@@ -1148,7 +1150,7 @@ protected:
void restoreCharsetBg();
void clearCharsetMask();
void clearTextSurface();
-
+
virtual void initCharset(int charset);
virtual void printString(int m, const byte *msg);
@@ -1326,14 +1328,17 @@ public:
// Exists both in V7 and in V72HE:
byte VAR_NUM_GLOBAL_OBJS;
+#ifdef USE_RGB_COLOR
+ // FM-Towns / PC-Engine specific
+ Graphics::FontSJIS *_cjkFont;
+#endif
+
// FM-Towns specific
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
public:
bool towns_isRectInStringBox(int x1, int y1, int x2, int y2);
byte _townsPaletteFlags;
- byte _townsCharsetColorMap[16];
- Graphics::FontSJIS *_cjkFont;
- uint16 _cjkChar;
+ byte _townsCharsetColorMap[16];
protected:
void towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, int srcX, int srcY, int w, int h);
@@ -1348,10 +1353,10 @@ protected:
Common::Rect _cyclRects[16];
int _numCyclRects;
-
+
Common::Rect _curStringRect;
- byte _townsOverrideShadowColor;
+ byte _townsOverrideShadowColor;
byte _textPalette[48];
byte _townsClearLayerFlag;
byte _townsActiveLayerFlags;
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 66502572de..2f4e86bf61 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -90,13 +90,13 @@ public:
assert(def_end != NULL);
char *id_end = def_end;
- while (id_end >= def_start && !isdigit(*(id_end-1))) {
+ while (id_end >= def_start && !isdigit(static_cast<unsigned char>(*(id_end-1)))) {
id_end--;
}
assert(id_end > def_start);
char *id_start = id_end;
- while (isdigit(*(id_start - 1))) {
+ while (isdigit(static_cast<unsigned char>(*(id_start - 1)))) {
id_start--;
}
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index c22da8e7c7..c3cad19fdc 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -312,7 +312,7 @@ void Sound::playSound(int soundID) {
sound = (byte *)malloc(size);
memcpy(sound, ptr + 6, size);
stream = Audio::makeRawStream(sound, size, rate, Audio::FLAG_UNSIGNED);
- _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
+ _mixer->playStream(Audio::Mixer::kSFXSoundType, NULL, stream, soundID);
}
else if (_vm->_game.platform != Common::kPlatformFMTowns && READ_BE_UINT32(ptr) == MKTAG('S','O','U','N')) {
if (_vm->_game.version != 3)
@@ -1137,14 +1137,27 @@ int ScummEngine::readSoundResource(ResId idx) {
break;
case MKTAG('S','P','K',' '):
pri = -1;
-// if (_musicType == MDT_PCSPK || _musicType == MDT_PCJR)
-// pri = 11;
+ if (_musicType == MDT_PCSPK || _musicType == MDT_PCJR)
+ pri = 11;
break;
}
+ // We only allow SPK resources for PC Speaker, PCJr and CMS here
+ // since other resource would sound horribly with their output
+ // drivers.
if ((_musicType == MDT_PCSPK || _musicType == MDT_PCJR || _musicType == MDT_CMS) && pri != 11)
pri = -1;
+ // We only allow ADL resources when AdLib or FM-Towns is used as
+ // primary audio output. This fixes some odd sounds when Indy and
+ // Sophia leave Atlantis with the submarine in Indy4. (Easy to
+ // check with bootparam 4061 in the CD version). It seems the game
+ // only contains a ROL resource for sound id 60. Formerly we tried
+ // to play that via the AdLib or FM-Towns audio driver resulting
+ // in strange noises. Now we behave like the original did.
+ if ((_musicType == MDT_ADLIB || _musicType == MDT_TOWNS) && pri != 10)
+ pri = -1;
+
debugC(DEBUG_RESOURCE, " tag: %s, total_size=%d, pri=%d", tag2str(tag), size, pri);
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 4b3207c6bf..2d2209c155 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -1383,10 +1383,10 @@ void ScummEngine_v7::loadLanguageBundle() {
} else if (*ptr == '#') {
// Number of subtags following a given basetag. We don't need that
// information so we just skip it
- } else if (isdigit(*ptr)) {
+ } else if (isdigit(static_cast<unsigned char>(*ptr))) {
int idx = 0;
// A number (up to three digits)...
- while (isdigit(*ptr)) {
+ while (isdigit(static_cast<unsigned char>(*ptr))) {
idx = idx * 10 + (*ptr - '0');
ptr++;
}
@@ -1424,12 +1424,12 @@ void ScummEngine_v7::loadLanguageBundle() {
for (i = 0; i < _languageIndexSize; i++) {
// First 8 chars in the line give the string ID / 'tag'
int j;
- for (j = 0; j < 8 && !isspace(*ptr); j++, ptr++)
+ for (j = 0; j < 8 && !isspace(static_cast<unsigned char>(*ptr)); j++, ptr++)
_languageIndex[i].tag[j] = toupper(*ptr);
_languageIndex[i].tag[j] = 0;
// After that follows a single space which we skip
- assert(isspace(*ptr));
+ assert(isspace(static_cast<unsigned char>(*ptr)));
ptr++;
// Then comes the translated string: we record an offset to that.
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index 56f8de2ad1..4527d7a121 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -704,8 +704,12 @@ void ScummEngine_v99he::resetScummVars() {
VAR(VAR_NUM_UNK) = _numUnk;
if (_game.heversion >= 100 && (_game.features & GF_16BIT_COLOR)) {
- // Disable Bink and Smacker video in 16bit color games
+ // Enable Bink video in 16bit color games
+#ifdef USE_BINK
+ VAR(140) = 1;
+#else
VAR(140) = 0;
+#endif
}
}
#endif
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 69caceb53a..0c1554840e 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -152,7 +152,7 @@ void ScummEngine_v0::setNewKidVerbs() {
void ScummEngine_v0::switchActor(int slot) {
resetSentence(false);
-
+
if (_currentRoom == 45)
return;
@@ -728,7 +728,7 @@ void ScummEngine_v0::runObject(int obj, int entry) {
entry = 0x0F;
}
}
-
+
_v0ObjectInInventory = prev;
if (getVerbEntrypoint(obj, entry) != 0) {
@@ -830,7 +830,7 @@ bool ScummEngine_v0::verbObtain(int obj, int objIndex) {
} else {
_verbPickup = false;
}
-
+
// Ignore verbs?
Actor *a = derefActor(VAR(VAR_EGO), "verbObtain");
if (((ActorC64 *)a)->_miscflags & 0x40) {
@@ -989,7 +989,7 @@ bool ScummEngine_v0::verbExec() {
runObject(_activeObjectIndex, entry);
_v0ObjectIndex = false;
} else if (_activeInventory) {
- // Not sure this is the correct way to do this,
+ // Not sure this is the correct way to do this,
// however its working for most situations - segra
if (verbExecutes(_activeInventory, true) == false) {
if (_activeObject2 && _activeObject2Inv && verbExecutes(_activeObject2, true)) {
@@ -1001,7 +1001,7 @@ bool ScummEngine_v0::verbExec() {
runObject(_activeObject, _activeVerb);
} else {
_v0ObjectInInventory = true;
-
+
if (_activeObject2) {
_activeObject = _activeObject2;
@@ -1085,7 +1085,7 @@ void ScummEngine_v0::checkExecVerbs() {
// Click into V2 inventory
checkV2Inventory(_mouse.x, _mouse.y);
-
+
// Did the Inventory position changed (arrows pressed, do nothing)
if (invOff != _inventoryOffset)
return;
@@ -1143,7 +1143,7 @@ void ScummEngine_v0::checkExecVerbs() {
obj = 0;
objIdx = 0;
}
-
+
if (a->_miscflags & 0x80) {
if (_activeVerb != 7 && over != 7) {
_activeVerb = 0;
@@ -1444,9 +1444,9 @@ void ScummEngine::restoreVerbBG(int verb) {
VerbSlot *vs;
vs = &_verbs[verb];
- uint8 col =
+ uint8 col =
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
- ((_game.platform == Common::kPlatformFMTowns) && (_game.id == GID_MONKEY2 || _game.id == GID_INDY4) && (vs->bkcolor == _townsOverrideShadowColor)) ? 0 :
+ ((_game.platform == Common::kPlatformFMTowns) && (_game.id == GID_MONKEY2 || _game.id == GID_INDY4) && (vs->bkcolor == _townsOverrideShadowColor)) ? 0 :
#endif
vs->bkcolor;
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index f3cce06ad6..a1067496da 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -206,7 +206,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
// Extract the extension
Common::String ext = file->c_str() + file->size() - 3;
ext.toUppercase();
- if (isdigit(ext[0]) && isdigit(ext[1]) && isdigit(ext[2])){
+ if (isdigit(static_cast<unsigned char>(ext[0])) && isdigit(static_cast<unsigned char>(ext[1])) && isdigit(static_cast<unsigned char>(ext[2]))){
int slotNum = atoi(ext.c_str());
Common::InSaveFile *in = saveFileMan->openForLoading(*file);
if (in) {
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index cb86264eeb..f19efd2635 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -114,7 +114,7 @@ bool MoviePlayer::load(uint32 id) {
int startFrame = strtoul(ptr, const_cast<char **>(&ptr), 10);
int endFrame = strtoul(ptr, const_cast<char **>(&ptr), 10);
- while (*ptr && isspace(*ptr))
+ while (*ptr && isspace(static_cast<unsigned char>(*ptr)))
ptr++;
if (startFrame > endFrame) {
@@ -261,7 +261,7 @@ bool MoviePlayer::playVideo() {
uint32 minWeight = 0xFFFFFFFF;
uint32 weight;
byte r, g, b;
-
+
const byte *palette = _decoder->getPalette();
for (int i = 0; i < 256; i++) {
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 133abf165e..80b4809722 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -296,7 +296,7 @@ bool MoviePlayer::playVideo() {
uint32 minWeight = 0xFFFFFFFF;
uint32 weight;
byte r, g, b;
-
+
const byte *palette = _decoder->getPalette();
for (int i = 0; i < 256; i++) {
diff --git a/engines/sword2/controls.cpp b/engines/sword2/controls.cpp
index 6ce447a4cc..3611294eb8 100644
--- a/engines/sword2/controls.cpp
+++ b/engines/sword2/controls.cpp
@@ -477,6 +477,8 @@ void Widget::createSurfaceImage(int state, uint32 res, int x, int y, uint32 pc)
// Points to just after frame header, ie. start of sprite data
_sprites[state].data = frame + FrameHeader::size();
+ _sprites[state].colorTable = colTablePtr;
+ _sprites[state].isText = false;
_vm->_screen->createSurface(&_sprites[state], &_surfaces[state]._surface);
_surfaces[state]._original = true;
diff --git a/engines/sword2/render.cpp b/engines/sword2/render.cpp
index 1e068d6061..8bf9d922d5 100644
--- a/engines/sword2/render.cpp
+++ b/engines/sword2/render.cpp
@@ -699,8 +699,6 @@ int32 Screen::initializePsxBackgroundLayer(byte *parallax) {
*/
int32 Screen::initializePsxParallaxLayer(byte *parallax) {
- uint16 plxXres, plxYres;
- uint16 xTiles, yTiles;
uint16 i, j, k;
byte *data;
byte *dst;
@@ -714,10 +712,10 @@ int32 Screen::initializePsxParallaxLayer(byte *parallax) {
return RD_OK;
}
- plxXres = READ_LE_UINT16(parallax);
- plxYres = READ_LE_UINT16(parallax + 2);
- xTiles = READ_LE_UINT16(parallax + 4);
- yTiles = READ_LE_UINT16(parallax + 6);
+ // uint16 plxXres = READ_LE_UINT16(parallax);
+ // uint16 plxYres = READ_LE_UINT16(parallax + 2);
+ uint16 xTiles = READ_LE_UINT16(parallax + 4);
+ uint16 yTiles = READ_LE_UINT16(parallax + 6);
// Beginning of parallax table composed by uint32,
// if word is 0, corresponding tile contains no data and must be skipped,
diff --git a/engines/sword25/detection_tables.h b/engines/sword25/detection_tables.h
index ca586b4f01..fe9e6e7934 100644
--- a/engines/sword25/detection_tables.h
+++ b/engines/sword25/detection_tables.h
@@ -34,7 +34,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("data.b25c", "f8b6e03ada2d2f6cf27fbc11ad1572e9", 654310588),
Common::EN_ANY,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -43,7 +43,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("lang_fr.b25c", "690caf157387e06d2c3d1ca53c43f428", 1006043),
Common::FR_FRA,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -52,7 +52,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("data.b25c", "f8b6e03ada2d2f6cf27fbc11ad1572e9", 654310588),
Common::DE_DEU,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -61,7 +61,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("lang_hr.b25c", "e881054d1f8ec1e527422fc521c25405", 1273217),
Common::HU_HUN,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -70,7 +70,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("lang_it.b25c", "f3325666da0515cc2b42062e953c0889", 996197),
Common::IT_ITA,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -79,7 +79,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("lang_pl.b25c", "49dc1a20f95391a808e475c49be2bac0", 1281799),
Common::PL_POL,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -88,7 +88,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("lang_pt.b25c", "1df701432f9e13dcefe1adeb890b9c69", 993812),
Common::PT_BRA,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -97,7 +97,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("lang_ru.b25c", "deb33dd2f90a71ff60181918a8ce5063", 1235378),
Common::RU_RUS,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
{
@@ -106,7 +106,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_ENTRY1s("lang_es.b25c", "384c19072d83725f351bb9ecb4d3f02b", 987965),
Common::ES_ESP,
Common::kPlatformUnknown,
- ADGF_NO_FLAGS,
+ ADGF_UNSTABLE,
Common::GUIO_NONE
},
@@ -120,7 +120,7 @@ static const ADGameDescription gameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY,
Common::kPlatformUnknown,
- GF_EXTRACTED,
+ GF_EXTRACTED | ADGF_UNSTABLE,
Common::GUIO_NONE
},
AD_TABLE_END_MARKER
diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp
index 098bd2c6b9..a7ebb5df8c 100644
--- a/engines/sword25/fmv/theora_decoder.cpp
+++ b/engines/sword25/fmv/theora_decoder.cpp
@@ -424,6 +424,12 @@ bool TheoraDecoder::queueAudio() {
if (!_audStream)
return false;
+ // An audio buffer should have been allocated (either in the constructor or after queuing the current buffer)
+ if (!_audiobuf) {
+ warning("[TheoraDecoder::queueAudio] Invalid audio buffer");
+ return false;
+ }
+
bool queuedAudio = false;
for (;;) {
@@ -454,6 +460,11 @@ bool TheoraDecoder::queueAudio() {
// The audio mixer is now responsible for the old audio buffer.
// We need to create a new one.
_audiobuf = (ogg_int16_t *)malloc(AUDIOFD_FRAGSIZE * sizeof(ogg_int16_t));
+ if (!_audiobuf) {
+ warning("[TheoraDecoder::queueAudio] Cannot allocate memory for audio buffer");
+ return false;
+ }
+
_audiobufFill = 0;
queuedAudio = true;
}
diff --git a/engines/sword25/gfx/animation.h b/engines/sword25/gfx/animation.h
index 55deacd333..60070be214 100644
--- a/engines/sword25/gfx/animation.h
+++ b/engines/sword25/gfx/animation.h
@@ -210,7 +210,7 @@ private:
AnimationDescription *getAnimationDescription() const;
/**
- * Initializes a new animation resource from an XML file.
+ * Initializes a new animation resource from an XML file.
*/
void initializeAnimationResource(const Common::String &fileName);
};
diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp
index b9d70cf87b..621e20ad8c 100644
--- a/engines/sword25/gfx/animationresource.cpp
+++ b/engines/sword25/gfx/animationresource.cpp
@@ -64,7 +64,7 @@ AnimationResource::AnimationResource(const Common::String &filename) :
char *xmlData = _pPackage->getXmlFile(getFileName(), &fileSize);
if (!xmlData) {
error("Could not read \"%s\".", getFileName().c_str());
- return;
+ return;
}
// Parse the contents
@@ -118,7 +118,7 @@ bool AnimationResource::parserCallback_animation(ParserNode *node) {
// Loop type value
const char *loopTypeString = node->values["type"].c_str();
-
+
if (strcmp(loopTypeString, "oneshot") == 0) {
_animationType = Animation::AT_ONESHOT;
} else if (strcmp(loopTypeString, "loop") == 0) {
@@ -148,7 +148,7 @@ bool AnimationResource::parserCallback_frame(ParserNode *node) {
}
frame.fileName = _pPackage->getAbsolutePath(fileString);
if (frame.fileName.empty()) {
- error("Could not create absolute path for file specified in <frame> tag in \"%s\": \"%s\".",
+ error("Could not create absolute path for file specified in <frame> tag in \"%s\": \"%s\".",
getFileName().c_str(), fileString);
return false;
}
diff --git a/engines/sword25/gfx/animationtemplateregistry.cpp b/engines/sword25/gfx/animationtemplateregistry.cpp
index 43c099c89d..8184b49eba 100644
--- a/engines/sword25/gfx/animationtemplateregistry.cpp
+++ b/engines/sword25/gfx/animationtemplateregistry.cpp
@@ -34,7 +34,9 @@
#include "sword25/gfx/animationtemplateregistry.h"
#include "sword25/gfx/animationtemplate.h"
+namespace Common {
DECLARE_SINGLETON(Sword25::AnimationTemplateRegistry);
+}
namespace Sword25 {
diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp
index 7657abb5f2..0aeca7c180 100644
--- a/engines/sword25/gfx/fontresource.cpp
+++ b/engines/sword25/gfx/fontresource.cpp
@@ -85,7 +85,7 @@ bool FontResource::parserCallback_font(ParserNode *node) {
getFileName().c_str(), DEFAULT_GAPWIDTH);
_gapWidth = DEFAULT_GAPWIDTH;
}
-
+
// Get a reference to the package manager
assert(_pKernel);
PackageManager *pPackage = _pKernel->getPackage();
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 6b1c2bc514..14ba032107 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -156,7 +156,7 @@ RenderObjectPtr<Panel> GraphicEngine::getMainPanel() {
}
void GraphicEngine::setVsync(bool vsync) {
- warning("STUB: SetVsync(%d)", vsync);
+ // ScummVM has no concept of VSync
}
bool GraphicEngine::getVsync() const {
@@ -365,7 +365,7 @@ void GraphicEngine::updateLastFrameDuration() {
}
bool GraphicEngine::saveThumbnailScreenshot(const Common::String &filename) {
- // Note: In ScumMVM, rather than saivng the thumbnail to a file, we store it in memory
+ // Note: In ScumMVM, rather than saivng the thumbnail to a file, we store it in memory
// until needed when creating savegame files
delete _thumbnail;
diff --git a/engines/sword25/gfx/image/art.cpp b/engines/sword25/gfx/image/art.cpp
index cd7cfb6b69..2ba102e779 100644
--- a/engines/sword25/gfx/image/art.cpp
+++ b/engines/sword25/gfx/image/art.cpp
@@ -151,6 +151,8 @@ ArtSVP *art_svp_from_vpath(ArtVpath *vpath) {
n_segs_max = 16;
svp = (ArtSVP *)malloc(sizeof(ArtSVP) +
(n_segs_max - 1) * sizeof(ArtSVPSeg));
+ if (!svp)
+ error("[art_svp_from_vpath] Cannot allocate memory");
dir = 0;
n_points = 0;
@@ -167,9 +169,14 @@ ArtSVP *art_svp_from_vpath(ArtVpath *vpath) {
if (points != NULL && n_points >= 2) {
if (n_segs == n_segs_max) {
n_segs_max <<= 1;
- svp = (ArtSVP *)realloc(svp, sizeof(ArtSVP) +
- (n_segs_max - 1) *
- sizeof(ArtSVPSeg));
+ ArtSVP *tmp = (ArtSVP *)realloc(svp, sizeof(ArtSVP) +
+ (n_segs_max - 1) *
+ sizeof(ArtSVPSeg));
+
+ if (!tmp)
+ error("Cannot reallocate memory in art_svp_from_vpath()");
+
+ svp = tmp;
}
svp->segs[n_segs].n_points = n_points;
svp->segs[n_segs].dir = (dir > 0);
@@ -204,9 +211,14 @@ ArtSVP *art_svp_from_vpath(ArtVpath *vpath) {
y = points[n_points - 1].y;
if (n_segs == n_segs_max) {
n_segs_max <<= 1;
- svp = (ArtSVP *)realloc(svp, sizeof(ArtSVP) +
- (n_segs_max - 1) *
- sizeof(ArtSVPSeg));
+ ArtSVP *tmp = (ArtSVP *)realloc(svp, sizeof(ArtSVP) +
+ (n_segs_max - 1) *
+ sizeof(ArtSVPSeg));
+
+ if (!tmp)
+ error("Cannot reallocate memory in art_svp_from_vpath()");
+
+ svp = tmp;
}
svp->segs[n_segs].n_points = n_points;
svp->segs[n_segs].dir = (dir > 0);
@@ -246,9 +258,14 @@ ArtSVP *art_svp_from_vpath(ArtVpath *vpath) {
if (n_points >= 2) {
if (n_segs == n_segs_max) {
n_segs_max <<= 1;
- svp = (ArtSVP *)realloc(svp, sizeof(ArtSVP) +
- (n_segs_max - 1) *
- sizeof(ArtSVPSeg));
+ ArtSVP *tmp = (ArtSVP *)realloc(svp, sizeof(ArtSVP) +
+ (n_segs_max - 1) *
+ sizeof(ArtSVPSeg));
+
+ if (!tmp)
+ error("Cannot reallocate memory in art_svp_from_vpath()");
+
+ svp = tmp;
}
svp->segs[n_segs].n_points = n_points;
svp->segs[n_segs].dir = (dir > 0);
@@ -1026,6 +1043,8 @@ struct _ArtPriPoint {
static ArtPriQ *art_pri_new(void) {
ArtPriQ *result = art_new(ArtPriQ, 1);
+ if (!result)
+ error("[art_pri_new] Cannot allocate memory");
result->n_items = 0;
result->n_items_max = 16;
@@ -1157,8 +1176,13 @@ static int art_svp_writer_rewind_add_segment(ArtSvpWriter *self, int wind_left,
(swr->n_segs_max - 1) *
sizeof(ArtSVPSeg));
swr->svp = svp;
- swr->n_points_max = art_renew(swr->n_points_max, int,
- swr->n_segs_max);
+ int *tmp = art_renew(swr->n_points_max, int,
+ swr->n_segs_max);
+
+ if (!tmp)
+ error("Cannot reallocate memory in art_svp_writer_rewind_add_segment()");
+
+ swr->n_points_max = tmp;
}
seg = &svp->segs[seg_num];
seg->n_points = 1;
@@ -1169,6 +1193,9 @@ static int art_svp_writer_rewind_add_segment(ArtSvpWriter *self, int wind_left,
seg->bbox.x1 = x;
seg->bbox.y1 = y;
seg->points = art_new(ArtPoint, init_n_points_max);
+ if (!seg->points)
+ error("[art_svp_writer_rewind_add_segment] Cannot allocate memory");
+
seg->points[0].x = x;
seg->points[0].y = y;
return seg_num;
@@ -1213,6 +1240,8 @@ ArtSVP *art_svp_writer_rewind_reap(ArtSvpWriter *self) {
ArtSvpWriter *art_svp_writer_rewind_new(ArtWindRule rule) {
ArtSvpWriterRewind *result = art_new(ArtSvpWriterRewind, 1);
+ if (!result)
+ error("[art_svp_writer_rewind_new] Cannot allocate memory");
result->super.add_segment = art_svp_writer_rewind_add_segment;
result->super.add_point = art_svp_writer_rewind_add_point;
@@ -1222,6 +1251,9 @@ ArtSvpWriter *art_svp_writer_rewind_new(ArtWindRule rule) {
result->n_segs_max = 16;
result->svp = (ArtSVP *)malloc(sizeof(ArtSVP) +
(result->n_segs_max - 1) * sizeof(ArtSVPSeg));
+ if (!result->svp)
+ error("[art_svp_writer_rewind_new] Cannot allocate memory");
+
result->svp->n_segs = 0;
result->n_points_max = art_new(int, result->n_segs_max);
@@ -1392,6 +1424,9 @@ static void art_svp_intersect_push_pt(ArtIntersectCtx *ctx, ArtActiveSeg *seg,
seg->y1 = y;
pri_pt = art_new(ArtPriPoint, 1);
+ if (!pri_pt)
+ error("[art_svp_intersect_push_pt] Cannot allocate memory");
+
pri_pt->x = x;
pri_pt->y = y;
pri_pt->user_data = seg;
@@ -1855,6 +1890,8 @@ static void art_svp_intersect_horiz(ArtIntersectCtx *ctx, ArtActiveSeg *seg,
return;
hs = art_new(ArtActiveSeg, 1);
+ if (!hs)
+ error("[art_svp_intersect_horiz] Cannot allocate memory");
hs->flags = ART_ACTIVE_FLAGS_DEL | (seg->flags & ART_ACTIVE_FLAGS_OUT);
if (seg->flags & ART_ACTIVE_FLAGS_OUT) {
@@ -1993,10 +2030,11 @@ static void art_svp_intersect_add_seg(ArtIntersectCtx *ctx, const ArtSVPSeg *in_
ArtActiveSeg *seg = art_new(ArtActiveSeg, 1);
ArtActiveSeg *test;
double x0, y0;
- ArtActiveSeg *beg_range;
ArtActiveSeg *last = NULL;
ArtActiveSeg *left, *right;
ArtPriPoint *pri_pt = art_new(ArtPriPoint, 1);
+ if (!pri_pt)
+ error("[art_svp_intersect_add_seg] Cannot allocate memory");
seg->flags = 0;
seg->in_seg = in_seg;
@@ -2019,7 +2057,6 @@ static void art_svp_intersect_add_seg(ArtIntersectCtx *ctx, const ArtSVPSeg *in_
x0 = in_seg->points[0].x;
y0 = in_seg->points[0].y;
- beg_range = NULL;
for (test = ctx->active_head; test != NULL; test = test->right) {
double d;
int test_bneg = test->flags & ART_ACTIVE_FLAGS_BNEG;
@@ -2166,6 +2203,9 @@ void art_svp_intersector(const ArtSVP *in, ArtSvpWriter *out) {
return;
ctx = art_new(ArtIntersectCtx, 1);
+ if (!ctx)
+ error("[art_svp_intersector] Cannot allocate memory");
+
ctx->in = in;
ctx->out = out;
pq = art_pri_new();
@@ -2178,6 +2218,9 @@ void art_svp_intersector(const ArtSVP *in, ArtSvpWriter *out) {
ctx->in_curs = 0;
first_point = art_new(ArtPriPoint, 1);
+ if (!first_point)
+ error("[art_svp_intersector] Cannot allocate memory");
+
first_point->x = in->segs[0].points[0].x;
first_point->y = in->segs[0].points[0].y;
first_point->user_data = NULL;
@@ -2319,6 +2362,8 @@ static void art_svp_render_delete_active(int *active_segs, int j, int n_active_s
ArtSVPRenderAAIter *art_svp_render_aa_iter(const ArtSVP *svp,
int x0, int y0, int x1, int y1) {
ArtSVPRenderAAIter *iter = art_new(ArtSVPRenderAAIter, 1);
+ if (!iter)
+ error("[art_svp_render_aa_iter] Cannot allocate memory");
iter->svp = svp;
iter->y = y0;
@@ -2499,7 +2544,7 @@ void art_svp_render_aa_iter_step(ArtSVPRenderAAIter *iter, int *p_start,
ADD_STEP(x, xdelta)
}
if (x < x1) {
- this_ =
+ this_ =
(int)(delta * (1 - 0.5 *
(x_max - ix_max) * (x_max - ix_max) *
rslope));
diff --git a/engines/sword25/gfx/image/art.h b/engines/sword25/gfx/image/art.h
index bfeb31cc30..8c9c97bc57 100644
--- a/engines/sword25/gfx/image/art.h
+++ b/engines/sword25/gfx/image/art.h
@@ -51,10 +51,13 @@ namespace Sword25 {
#define art_expand(p, type, max) \
do { \
if(max) {\
- p = art_renew(p, type, max <<= 1); \
+ type *tmp = art_renew(p, type, max <<= 1); \
+ if (!tmp) error("Cannot reallocate memory for art data"); \
+ p = tmp; \
} else { \
max = 1; \
p = art_new(type, 1); \
+ if (!p) error("Cannot allocate memory for art data"); \
} \
} while (0)
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index a9c9de4f0c..3b29b0333f 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -72,7 +72,10 @@ static byte *readSavegameThumbnail(const Common::String &filename, uint &fileSiz
// Seek to the actual PNG image
loadString(*file); // Marker (BS25SAVEGAME)
- loadString(*file); // Version
+ Common::String storedVersionID = loadString(*file); // Version
+ if (storedVersionID != "SCUMMVM1")
+ loadString(*file);
+
loadString(*file); // Description
uint32 compressedGamedataSize = atoi(loadString(*file).c_str());
loadString(*file); // Uncompressed game data size
@@ -373,17 +376,23 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
default: // alpha blending
#if defined(SCUMM_LITTLE_ENDIAN)
- if (cb != 255)
+ if (cb == 0)
+ *out = 0;
+ else if (cb != 255)
*out += ((b - *out) * a * cb) >> 16;
else
*out += ((b - *out) * a) >> 8;
out++;
- if (cg != 255)
+ if (cg == 0)
+ *out = 0;
+ else if (cg != 255)
*out += ((g - *out) * a * cg) >> 16;
else
*out += ((g - *out) * a) >> 8;
out++;
- if (cr != 255)
+ if (cr == 0)
+ *out = 0;
+ else if (cr != 255)
*out += ((r - *out) * a * cr) >> 16;
else
*out += ((r - *out) * a) >> 8;
@@ -393,17 +402,23 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
#else
*out = 255;
out++;
- if (cr != 255)
+ if (cr == 0)
+ *out = 0;
+ else if (cr != 255)
*out += ((r - *out) * a * cr) >> 16;
else
*out += ((r - *out) * a) >> 8;
out++;
- if (cg != 255)
+ if (cg == 0)
+ *out = 0;
+ else if (cg != 255)
*out += ((g - *out) * a * cg) >> 16;
else
*out += ((g - *out) * a) >> 8;
out++;
- if (cb != 255)
+ if (cb == 0)
+ *out = 0;
+ else if (cb != 255)
*out += ((b - *out) * a * cb) >> 16;
else
*out += ((b - *out) * a) >> 8;
diff --git a/engines/sword25/gfx/image/vectorimage.cpp b/engines/sword25/gfx/image/vectorimage.cpp
index 9235ec2fcf..81f4fc2ad5 100644
--- a/engines/sword25/gfx/image/vectorimage.cpp
+++ b/engines/sword25/gfx/image/vectorimage.cpp
@@ -248,7 +248,7 @@ VectorImage::VectorImage(const byte *pFileData, uint fileSize, bool &success, co
}
// readout SWF size
- Common::Rect movieRect = flashRectToBSRect(bs);
+ flashRectToBSRect(bs);
// Get frame rate and frame count
/* uint32 frameRate = */
@@ -321,6 +321,8 @@ ArtBpath *VectorImage::storeBez(ArtBpath *bez, int lineStyle, int fillStyle0, in
bez[*bezNodes].code = ART_END;
ArtBpath *bez1 = art_new(ArtBpath, *bezNodes + 1);
+ if (!bez1)
+ error("[VectorImage::storeBez] Cannot allocate memory");
for (int i = 0; i <= *bezNodes; i++)
bez1[i] = bez[i];
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp
index 97dad3346d..6d4dc213f2 100644
--- a/engines/sword25/gfx/image/vectorimagerenderer.cpp
+++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp
@@ -270,6 +270,9 @@ ArtVpath *art_vpath_cat(ArtVpath *a, ArtVpath *b) {
len_a = art_vpath_len(a);
len_b = art_vpath_len(b);
dest = art_new(ArtVpath, len_a + len_b + 1);
+ if (!dest)
+ error("[art_vpath_cat] Cannot allocate memory");
+
p = dest;
for (int i = 0; i < len_a; i++)
@@ -299,6 +302,8 @@ ArtVpath *art_vpath_reverse(ArtVpath *a) {
len = art_vpath_len(a);
dest = art_new(ArtVpath, len + 1);
+ if (!dest)
+ error("[art_vpath_reverse] Cannot allocate memory");
for (i = 0; i < len; i++) {
it = a[len - i - 1];
@@ -371,6 +376,8 @@ void drawBez(ArtBpath *bez1, ArtBpath *bez2, byte *buffer, int width, int height
int size = art_vpath_len(vec);
ArtVpath *vect = art_new(ArtVpath, size + 1);
+ if (!vect)
+ error("[drawBez] Cannot allocate memory");
int k;
for (k = 0; k < size; k++) {
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index 4f9ba1d3c5..de7b62fba9 100644
--- a/engines/sword25/gfx/screenshot.cpp
+++ b/engines/sword25/gfx/screenshot.cpp
@@ -67,8 +67,8 @@ bool Screenshot::saveToFile(Graphics::Surface *data, Common::WriteStream *stream
Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data) {
// This method takes a screen image with a dimension of 800x600, and creates a screenshot with a dimension of 200x125.
- // First 50 pixels are cut off the top and bottom (the interface boards in the game). The remaining image of 800x500
- // will be on a 16th of its size, reduced by being handed out in 4x4 pixel blocks and the average of each block
+ // First 50 pixels are cut off the top and bottom (the interface boards in the game). The remaining image of 800x500
+ // will be on a 16th of its size, reduced by being handed out in 4x4 pixel blocks and the average of each block
// generates a pixel of the target image. Finally, the result as a PNG file is stored as a file.
// The source image must be 800x600.
@@ -84,7 +84,7 @@ Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data)
// Über das Zielbild iterieren und einen Pixel zur Zeit berechnen.
uint x, y;
x = y = 0;
-
+
for (byte *pDest = (byte *)thumbnail.pixels; pDest < ((byte *)thumbnail.pixels + thumbnail.pitch * thumbnail.h); ) {
// Get an average over a 4x4 pixel block in the source image
int alpha, red, green, blue;
diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp
index 60ad94e20f..0ae07b36b5 100644
--- a/engines/sword25/gfx/staticbitmap.cpp
+++ b/engines/sword25/gfx/staticbitmap.cpp
@@ -170,7 +170,10 @@ bool StaticBitmap::unpersist(InputPersistenceBlock &reader) {
result &= Bitmap::unpersist(reader);
Common::String resourceFilename;
reader.readString(resourceFilename);
- result &= initBitmapResource(resourceFilename);
+ // We may not have saves, and we actually do not need to
+ // restore them. So do not even try to load them.
+ if (!resourceFilename.hasPrefix("/saves"))
+ result &= initBitmapResource(resourceFilename);
result &= RenderObject::unpersistChildren(reader);
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index 8e18d2936d..82bb7cdff7 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -61,7 +61,7 @@ Text::Text(InputPersistenceBlock &reader, RenderObjectPtr<RenderObject> parentPt
// Temporarily set fields prior to unpersisting actual values
_modulationColor(0xffffffff),
_autoWrap(false),
- _autoWrapThreshold(AUTO_WRAP_THRESHOLD_DEFAULT) {
+ _autoWrapThreshold(AUTO_WRAP_THRESHOLD_DEFAULT) {
// Unpersist the fields
_initSuccess = unpersist(reader);
diff --git a/engines/sword25/kernel/inputpersistenceblock.cpp b/engines/sword25/kernel/inputpersistenceblock.cpp
index c1cd771e39..cdce539c31 100644
--- a/engines/sword25/kernel/inputpersistenceblock.cpp
+++ b/engines/sword25/kernel/inputpersistenceblock.cpp
@@ -35,9 +35,10 @@
namespace Sword25 {
-InputPersistenceBlock::InputPersistenceBlock(const void *data, uint dataLength) :
+InputPersistenceBlock::InputPersistenceBlock(const void *data, uint dataLength, int version) :
_data(static_cast<const byte *>(data), dataLength),
- _errorState(NONE) {
+ _errorState(NONE),
+ _version(version) {
_iter = _data.begin();
}
@@ -54,8 +55,8 @@ void InputPersistenceBlock::read(int16 &value) {
void InputPersistenceBlock::read(signed int &value) {
if (checkMarker(SINT_MARKER)) {
- rawRead(&value, sizeof(signed int));
- value = convertEndianessFromStorageToSystem(value);
+ value = (int32)READ_LE_UINT32(_iter);
+ _iter += 4;
} else {
value = 0;
}
@@ -63,8 +64,8 @@ void InputPersistenceBlock::read(signed int &value) {
void InputPersistenceBlock::read(uint &value) {
if (checkMarker(UINT_MARKER)) {
- rawRead(&value, sizeof(uint));
- value = convertEndianessFromStorageToSystem(value);
+ value = READ_LE_UINT32(_iter);
+ _iter += 4;
} else {
value = 0;
}
@@ -72,8 +73,10 @@ void InputPersistenceBlock::read(uint &value) {
void InputPersistenceBlock::read(float &value) {
if (checkMarker(FLOAT_MARKER)) {
- rawRead(&value, sizeof(float));
- value = convertEndianessFromStorageToSystem(value);
+ uint32 tmp[1];
+ tmp[0] = READ_LE_UINT32(_iter);
+ value = ((float *)tmp)[0];
+ _iter += 4;
} else {
value = 0.0f;
}
@@ -81,12 +84,11 @@ void InputPersistenceBlock::read(float &value) {
void InputPersistenceBlock::read(bool &value) {
if (checkMarker(BOOL_MARKER)) {
- uint uintBool;
- rawRead(&uintBool, sizeof(float));
- uintBool = convertEndianessFromStorageToSystem(uintBool);
+ uint uintBool = READ_LE_UINT32(_iter);
+ _iter += 4;
value = uintBool == 0 ? false : true;
} else {
- value = 0.0f;
+ value = false;
}
}
@@ -116,13 +118,6 @@ void InputPersistenceBlock::readByteArray(Common::Array<byte> &value) {
}
}
-void InputPersistenceBlock::rawRead(void *destPtr, size_t size) {
- if (checkBlockSize(size)) {
- memcpy(destPtr, &*_iter, size);
- _iter += size;
- }
-}
-
bool InputPersistenceBlock::checkBlockSize(int size) {
if (_data.end() - _iter >= size) {
return true;
diff --git a/engines/sword25/kernel/inputpersistenceblock.h b/engines/sword25/kernel/inputpersistenceblock.h
index f643b06bc1..2518d7e32c 100644
--- a/engines/sword25/kernel/inputpersistenceblock.h
+++ b/engines/sword25/kernel/inputpersistenceblock.h
@@ -46,7 +46,7 @@ public:
OUT_OF_SYNC
};
- InputPersistenceBlock(const void *data, uint dataLength);
+ InputPersistenceBlock(const void *data, uint dataLength, int version);
virtual ~InputPersistenceBlock();
void read(int16 &value);
@@ -64,14 +64,17 @@ public:
return _errorState;
}
+ int getVersion() const { return _version; }
+
private:
bool checkMarker(byte marker);
bool checkBlockSize(int size);
- void rawRead(void *destPtr, size_t size);
Common::Array<byte> _data;
Common::Array<byte>::const_iterator _iter;
ErrorState _errorState;
+
+ int _version;
};
} // End of namespace Sword25
diff --git a/engines/sword25/kernel/outputpersistenceblock.cpp b/engines/sword25/kernel/outputpersistenceblock.cpp
index cf28ea401f..e29d956e5f 100644
--- a/engines/sword25/kernel/outputpersistenceblock.cpp
+++ b/engines/sword25/kernel/outputpersistenceblock.cpp
@@ -43,19 +43,23 @@ OutputPersistenceBlock::OutputPersistenceBlock() {
void OutputPersistenceBlock::write(signed int value) {
writeMarker(SINT_MARKER);
- value = convertEndianessFromSystemToStorage(value);
+ value = TO_LE_32(value);
rawWrite(&value, sizeof(value));
}
void OutputPersistenceBlock::write(uint value) {
writeMarker(UINT_MARKER);
- value = convertEndianessFromSystemToStorage(value);
+ value = TO_LE_32(value);
rawWrite(&value, sizeof(value));
}
void OutputPersistenceBlock::write(float value) {
writeMarker(FLOAT_MARKER);
- value = convertEndianessFromSystemToStorage(value);
+ uint32 tmp[1];
+
+ ((float *)tmp)[0] = value;
+ tmp[0] = TO_LE_32(tmp[0]);
+
rawWrite(&value, sizeof(value));
}
@@ -63,7 +67,7 @@ void OutputPersistenceBlock::write(bool value) {
writeMarker(BOOL_MARKER);
uint uintBool = value ? 1 : 0;
- uintBool = convertEndianessFromSystemToStorage(uintBool);
+ uintBool = TO_LE_32(uintBool);
rawWrite(&uintBool, sizeof(uintBool));
}
diff --git a/engines/sword25/kernel/persistenceblock.h b/engines/sword25/kernel/persistenceblock.h
index d8440faa50..8ac3e84a41 100644
--- a/engines/sword25/kernel/persistenceblock.h
+++ b/engines/sword25/kernel/persistenceblock.h
@@ -64,48 +64,6 @@ protected:
BLOCK_MARKER
};
- // -----------------------------------------------------------------------------
- // Endianess Conversions
- // -----------------------------------------------------------------------------
- //
- // Everything is stored in Little Endian
- // Big Endian Systems will need to be byte swapped during both saving and reading of saved values
- //
-
- template<typename T>
- static T convertEndianessFromSystemToStorage(T value) {
- if (isBigEndian())
- reverseByteOrder(&value);
- return value;
- }
-
- template<typename T>
- static T convertEndianessFromStorageToSystem(T value) {
- if (isBigEndian())
- reverseByteOrder(&value);
- return value;
- }
-
-private:
- static bool isBigEndian() {
- uint dummy = 1;
- byte *dummyPtr = reinterpret_cast<byte *>(&dummy);
- return dummyPtr[0] == 0;
- }
-
- template<typename T>
- static void swap(T &one, T &two) {
- T temp = one;
- one = two;
- two = temp;
- }
-
- static void reverseByteOrder(void *ptr) {
- // Reverses the byte order of the 32-bit word pointed to by Ptr
- byte *charPtr = static_cast<byte *>(ptr);
- swap(charPtr[0], charPtr[3]);
- swap(charPtr[1], charPtr[2]);
- }
};
#define CTASSERT(ex) typedef char ctassert_type[(ex) ? 1 : -1]
diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp
index 17e9199b5c..27d669caa1 100644
--- a/engines/sword25/kernel/persistenceservice.cpp
+++ b/engines/sword25/kernel/persistenceservice.cpp
@@ -50,7 +50,9 @@ static const char *SAVEGAME_DIRECTORY = "saves";
static const char *FILE_MARKER = "BS25SAVEGAME";
static const uint SLOT_COUNT = 18;
static const uint FILE_COPY_BUFFER_SIZE = 1024 * 10;
-static const char *VERSIONID = "SCUMMVM1";
+static const char *VERSIONIDOLD = "SCUMMVM1";
+static const char *VERSIONID = "SCUMMVM2";
+static const int VERSIONNUM = 2;
#define MAX_SAVEGAME_SIZE 100
@@ -99,6 +101,7 @@ struct SavegameInformation {
bool isOccupied;
bool isCompatible;
Common::String description;
+ int version;
uint gamedataLength;
uint gamedataOffset;
uint gamedataUncompressedLength;
@@ -147,9 +150,15 @@ struct PersistenceService::Impl {
// Read in the header
Common::String storedMarker = loadString(file);
Common::String storedVersionID = loadString(file);
+ if (storedVersionID == VERSIONIDOLD) {
+ curSavegameInfo.version = 1;
+ } else {
+ Common::String versionNum = loadString(file);
+ curSavegameInfo.version = atoi(versionNum.c_str());
+ }
Common::String gameDescription = loadString(file);
- Common::String gameDataLength = loadString(file);
- curSavegameInfo.gamedataLength = atoi(gameDataLength.c_str());
+ Common::String gamedataLength = loadString(file);
+ curSavegameInfo.gamedataLength = atoi(gamedataLength.c_str());
Common::String gamedataUncompressedLength = loadString(file);
curSavegameInfo.gamedataUncompressedLength = atoi(gamedataUncompressedLength.c_str());
@@ -158,7 +167,7 @@ struct PersistenceService::Impl {
// The slot is marked as occupied.
curSavegameInfo.isOccupied = true;
// Check if the saved game is compatible with the current engine version.
- curSavegameInfo.isCompatible = (storedVersionID == Common::String(VERSIONID));
+ curSavegameInfo.isCompatible = (curSavegameInfo.version <= VERSIONNUM);
// Load the save game description.
curSavegameInfo.description = gameDescription;
// The offset to the stored save game data within the file.
@@ -199,7 +208,7 @@ Common::String PersistenceService::getSavegameDirectory() {
// Try and return the path using the savegame subfolder. But if doesn't exist, fall back on the data directory
if (childNode.exists())
return childNode.getPath();
-
+
return node.getPath();
}
@@ -242,6 +251,12 @@ Common::String &PersistenceService::getSavegameFilename(uint slotID) {
return result;
}
+int PersistenceService::getSavegameVersion(uint slotID) {
+ if (!checkslotID(slotID))
+ return -1;
+ return _impl->_savegameInformations[slotID].version;
+}
+
bool PersistenceService::saveGame(uint slotID, const Common::String &screenshotFilename) {
// FIXME: This code is a hack which bypasses the savefile API,
// and should eventually be removed.
@@ -264,6 +279,11 @@ bool PersistenceService::saveGame(uint slotID, const Common::String &screenshotF
file->writeString(VERSIONID);
file->writeByte(0);
+ char buf[20];
+ snprintf(buf, 20, "%d", VERSIONNUM);
+ file->writeString(buf);
+ file->writeByte(0);
+
TimeDate dt;
g_system->getTimeAndDate(dt);
file->writeString(formatTimestamp(dt));
@@ -385,7 +405,7 @@ bool PersistenceService::loadGame(uint slotID) {
memcpy(uncompressedDataBuffer, compressedDataBuffer, uncompressedBufferSize);
}
- InputPersistenceBlock reader(&uncompressedDataBuffer[0], curSavegameInfo.gamedataUncompressedLength);
+ InputPersistenceBlock reader(&uncompressedDataBuffer[0], curSavegameInfo.gamedataUncompressedLength, curSavegameInfo.version);
// Einzelne Engine-Module depersistieren.
bool success = true;
diff --git a/engines/sword25/kernel/persistenceservice.h b/engines/sword25/kernel/persistenceservice.h
index f73962892c..59e0a3661d 100644
--- a/engines/sword25/kernel/persistenceservice.h
+++ b/engines/sword25/kernel/persistenceservice.h
@@ -57,6 +57,7 @@ public:
void reloadSlots();
bool isSlotOccupied(uint slotID);
bool isSavegameCompatible(uint slotID);
+ int getSavegameVersion(uint slotID);
Common::String &getSavegameDescription(uint slotID);
Common::String &getSavegameFilename(uint slotID);
diff --git a/engines/sword25/math/regionregistry.cpp b/engines/sword25/math/regionregistry.cpp
index dff8560205..68c360a5ee 100644
--- a/engines/sword25/math/regionregistry.cpp
+++ b/engines/sword25/math/regionregistry.cpp
@@ -34,7 +34,9 @@
#include "sword25/math/regionregistry.h"
#include "sword25/math/region.h"
+namespace Common {
DECLARE_SINGLETON(Sword25::RegionRegistry);
+}
namespace Sword25 {
diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp
index 5c869203c6..5549f50c3c 100644
--- a/engines/sword25/package/packagemanager.cpp
+++ b/engines/sword25/package/packagemanager.cpp
@@ -157,7 +157,7 @@ byte *PackageManager::getFile(const Common::String &fileName, uint *fileSizePtr)
byte *buffer = new byte[file->size()];
file->read(buffer, file->size());
-
+
delete file;
return buffer;
}
diff --git a/engines/sword25/package/packagemanager.h b/engines/sword25/package/packagemanager.h
index 3c4c4e89c5..b0c6718008 100644
--- a/engines/sword25/package/packagemanager.h
+++ b/engines/sword25/package/packagemanager.h
@@ -141,6 +141,9 @@ public:
uint fileSize;
char *data = (char *)getFile(fileName, &fileSize);
char *result = (char *)malloc(fileSize + strlen(versionStr) + 1);
+ if (!result)
+ error("[PackageManager::getXmlFile] Cannot allocate memory");
+
strcpy(result, versionStr);
Common::copy(data, data + fileSize, result + strlen(versionStr));
result[fileSize + strlen(versionStr)] = '\0';
@@ -151,7 +154,7 @@ public:
return result;
}
-
+
/**
* Returns the path to the current directory.
* @return Returns a string containing the path to the current directory.
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 9244137c25..1b424dac65 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -33,6 +33,8 @@
#include "sword25/sfx/soundengine.h"
#include "sword25/package/packagemanager.h"
#include "sword25/kernel/resource.h"
+#include "sword25/kernel/inputpersistenceblock.h"
+#include "sword25/kernel/outputpersistenceblock.h"
#include "audio/decoders/vorbis.h"
@@ -61,6 +63,8 @@ SoundEngine::SoundEngine(Kernel *pKernel) : ResourceService(pKernel) {
_mixer = g_system->getMixer();
+ _maxHandleId = 1;
+
for (int i = 0; i < SOUND_HANDLES; i++)
_handles[i].type = kFreeHandle;
}
@@ -139,19 +143,24 @@ void SoundEngine::resumeLayer(uint layer) {
SndHandle *SoundEngine::getHandle(uint *id) {
- // NOTE: Index 0 means error. Thus we're not using it
- for (uint i = 1; i < SOUND_HANDLES; i++) {
+ for (uint i = 0; i < SOUND_HANDLES; i++) {
if (_handles[i].type != kFreeHandle && !_mixer->isSoundHandleActive(_handles[i].handle)) {
- debugC(kDebugSound, 5, "Handle %d has finished playing", i);
+ debugC(1, kDebugSound, "Handle %d has finished playing", _handles[i].id);
_handles[i].type = kFreeHandle;
}
}
- for (uint i = 1; i < SOUND_HANDLES; i++) {
+ for (uint i = 0; i < SOUND_HANDLES; i++) {
if (_handles[i].type == kFreeHandle) {
- debugC(kDebugSound, 5, "Allocated handle %d", i);
+ debugC(1, kDebugSound, "Allocated handle %d", _handles[i].id);
+ _handles[i].id = _maxHandleId;
+ _handles[i].type = kAllocatedHandle;
+
if (id)
- *id = i;
+ *id = _maxHandleId;
+
+ _maxHandleId++;
+
return &_handles[i];
}
}
@@ -161,6 +170,17 @@ SndHandle *SoundEngine::getHandle(uint *id) {
return NULL;
}
+SndHandle *SoundEngine::findHandle(uint id) {
+ for (uint i = 0; i < SOUND_HANDLES; i++) {
+ if (_handles[i].id == id)
+ return &_handles[i];
+ }
+
+ warning("Sound::findHandle(): Unknown handle");
+
+ return NULL;
+}
+
Audio::Mixer::SoundType getType(SoundEngine::SOUND_TYPES type) {
switch (type) {
case SoundEngine::MUSIC:
@@ -184,13 +204,27 @@ bool SoundEngine::playSound(const Common::String &fileName, SOUND_TYPES type, fl
return true;
}
-uint SoundEngine::playSoundEx(const Common::String &fileName, SOUND_TYPES type, float volume, float pan, bool loop, int loopStart, int loopEnd, uint layer) {
+uint SoundEngine::playSoundEx(const Common::String &fileName, SOUND_TYPES type, float volume, float pan, bool loop, int loopStart, int loopEnd, uint layer, uint handleId) {
Common::SeekableReadStream *in = Kernel::getInstance()->getPackage()->getStream(fileName);
#ifdef USE_VORBIS
Audio::SeekableAudioStream *stream = Audio::makeVorbisStream(in, DisposeAfterUse::YES);
#endif
uint id;
- SndHandle *handle = getHandle(&id);
+ SndHandle *handle;
+
+ if (handleId == 0x1337)
+ handle = getHandle(&id);
+ else
+ handle = &_handles[handleId];
+
+ handle->fileName = fileName;
+ handle->sndType = type;
+ handle->volume = volume;
+ handle->pan = pan;
+ handle->loop = loop;
+ handle->loopStart = loopStart;
+ handle->loopEnd = loopEnd;
+ handle->layer = layer;
debugC(1, kDebugSound, "SoundEngine::playSoundEx(%s, %d, %f, %f, %d, %d, %d, %d)", fileName.c_str(), type, volume, pan, loop, loopStart, loopEnd, layer);
@@ -202,43 +236,43 @@ uint SoundEngine::playSoundEx(const Common::String &fileName, SOUND_TYPES type,
}
void SoundEngine::setSoundVolume(uint handle, float volume) {
- assert(handle < SOUND_HANDLES);
-
debugC(1, kDebugSound, "SoundEngine::setSoundVolume(%d, %f)", handle, volume);
- _mixer->setChannelVolume(_handles[handle].handle, (byte)(volume * 255));
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle != NULL)
+ _mixer->setChannelVolume(sndHandle->handle, (byte)(volume * 255));
}
void SoundEngine::setSoundPanning(uint handle, float pan) {
- assert(handle < SOUND_HANDLES);
-
debugC(1, kDebugSound, "SoundEngine::setSoundPanning(%d, %f)", handle, pan);
- _mixer->setChannelBalance(_handles[handle].handle, (int8)(pan * 127));
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle != NULL)
+ _mixer->setChannelBalance(sndHandle->handle, (int8)(pan * 127));
}
void SoundEngine::pauseSound(uint handle) {
- assert(handle < SOUND_HANDLES);
-
debugC(1, kDebugSound, "SoundEngine::pauseSound(%d)", handle);
- _mixer->pauseHandle(_handles[handle].handle, true);
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle != NULL)
+ _mixer->pauseHandle(sndHandle->handle, true);
}
void SoundEngine::resumeSound(uint handle) {
- assert(handle < SOUND_HANDLES);
-
debugC(1, kDebugSound, "SoundEngine::resumeSound(%d)", handle);
- _mixer->pauseHandle(_handles[handle].handle, false);
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle != NULL)
+ _mixer->pauseHandle(sndHandle->handle, false);
}
void SoundEngine::stopSound(uint handle) {
- assert(handle < SOUND_HANDLES);
-
debugC(1, kDebugSound, "SoundEngine::stopSound(%d)", handle);
- _mixer->stopHandle(_handles[handle].handle);
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle != NULL)
+ _mixer->stopHandle(sndHandle->handle);
}
bool SoundEngine::isSoundPaused(uint handle) {
@@ -250,23 +284,30 @@ bool SoundEngine::isSoundPaused(uint handle) {
}
bool SoundEngine::isSoundPlaying(uint handle) {
- assert(handle < SOUND_HANDLES);
-
debugC(1, kDebugSound, "SoundEngine::isSoundPlaying(%d)", handle);
- return _mixer->isSoundHandleActive(_handles[handle].handle);
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle == NULL)
+ return false;
+ return _mixer->isSoundHandleActive(sndHandle->handle);
}
float SoundEngine::getSoundVolume(uint handle) {
debugC(1, kDebugSound, "SoundEngine::getSoundVolume(%d)", handle);
- return (float)_mixer->getChannelVolume(_handles[handle].handle) / 255.0;
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle == NULL)
+ return 0.f;
+ return (float)_mixer->getChannelVolume(sndHandle->handle) / 255.0;
}
float SoundEngine::getSoundPanning(uint handle) {
debugC(1, kDebugSound, "SoundEngine::getSoundPanning(%d)", handle);
- return (float)_mixer->getChannelBalance(_handles[handle].handle) / 127.0;
+ SndHandle* sndHandle = findHandle(handle);
+ if (sndHandle == NULL)
+ return 0.f;
+ return (float)_mixer->getChannelBalance(sndHandle->handle) / 127.0;
}
Resource *SoundEngine::loadResource(const Common::String &fileName) {
@@ -284,16 +325,61 @@ bool SoundEngine::canLoadResource(const Common::String &fileName) {
}
-bool SoundEngine::persist(OutputPersistenceBlock &writer) {
- warning("STUB: SoundEngine::persist()");
+ bool SoundEngine::persist(OutputPersistenceBlock &writer) {
+ writer.write(_maxHandleId);
+
+ for (uint i = 0; i < SOUND_HANDLES; i++) {
+ writer.write(_handles[i].id);
+
+ writer.writeString(_handles[i].fileName);
+ writer.write((int)_handles[i].sndType);
+ writer.write(_handles[i].volume);
+ writer.write(_handles[i].pan);
+ writer.write(_handles[i].loop);
+ writer.write(_handles[i].loopStart);
+ writer.write(_handles[i].loopEnd);
+ writer.write(_handles[i].layer);
+ }
return true;
}
bool SoundEngine::unpersist(InputPersistenceBlock &reader) {
- warning("STUB: SoundEngine::unpersist()");
+ _mixer->stopAll();
+
+ if (reader.getVersion() < 2)
+ return true;
+
+ reader.read(_maxHandleId);
+
+ for (uint i = 0; i < SOUND_HANDLES; i++) {
+ reader.read(_handles[i].id);
+
+ Common::String fileName;
+ int sndType;
+ float volume;
+ float pan;
+ bool loop;
+ int loopStart;
+ int loopEnd;
+ uint layer;
+
+ reader.readString(fileName);
+ reader.read(sndType);
+ reader.read(volume);
+ reader.read(pan);
+ reader.read(loop);
+ reader.read(loopStart);
+ reader.read(loopEnd);
+ reader.read(layer);
+
+ if (reader.isGood()) {
+ playSoundEx(fileName, (SOUND_TYPES)sndType, volume, pan, loop, loopStart, loopEnd, layer, i);
+ } else
+ return false;
+ }
- return true;
+ return reader.isGood();
}
diff --git a/engines/sword25/sfx/soundengine.h b/engines/sword25/sfx/soundengine.h
index 4dbd475846..8132ec556e 100644
--- a/engines/sword25/sfx/soundengine.h
+++ b/engines/sword25/sfx/soundengine.h
@@ -58,13 +58,22 @@ namespace Sword25 {
enum sndHandleType {
kFreeHandle,
- kEffectHandle,
- kVoiceHandle
+ kAllocatedHandle
};
struct SndHandle {
Audio::SoundHandle handle;
sndHandleType type;
+ uint32 id;
+
+ Common::String fileName;
+ int sndType;
+ float volume;
+ float pan;
+ bool loop;
+ int loopStart;
+ int loopEnd;
+ uint layer;
};
@@ -176,7 +185,7 @@ public:
* @remark If more control is needed over the playing, eg. changing the sound parameters
* for Volume and Panning, then PlaySoundEx should be used.
*/
- uint playSoundEx(const Common::String &fileName, SOUND_TYPES type, float volume = 1.0f, float pan = 0.0f, bool loop = false, int loopStart = -1, int loopEnd = -1, uint layer = 0);
+ uint playSoundEx(const Common::String &fileName, SOUND_TYPES type, float volume = 1.0f, float pan = 0.0f, bool loop = false, int loopStart = -1, int loopEnd = -1, uint layer = 0, uint handleId = 0x1337);
/**
* Sets the volume of a playing sound
@@ -244,10 +253,13 @@ public:
private:
bool registerScriptBindings();
SndHandle *getHandle(uint *id);
+ SndHandle *findHandle(uint id);
private:
Audio::Mixer *_mixer;
SndHandle _handles[SOUND_HANDLES];
+
+ uint32 _maxHandleId;
};
} // End of namespace Sword25
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index b111746c32..2201188052 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -50,7 +50,9 @@
#include "sword25/gfx/animationtemplateregistry.h" // Needed so we can destroy the singleton
#include "sword25/gfx/renderobjectregistry.h" // Needed so we can destroy the singleton
+namespace Common {
DECLARE_SINGLETON(Sword25::RenderObjectRegistry);
+}
#include "sword25/math/regionregistry.h" // Needed so we can destroy the singleton
namespace Sword25 {
diff --git a/engines/sword25/util/lua/lapi.cpp b/engines/sword25/util/lua/lapi.cpp
index 16f8460e39..ff25cfc653 100644
--- a/engines/sword25/util/lua/lapi.cpp
+++ b/engines/sword25/util/lua/lapi.cpp
@@ -213,7 +213,7 @@ LUA_API void lua_replace (lua_State *L, int idx) {
api_checkvalidindex(L, o);
if (idx == LUA_ENVIRONINDEX) {
Closure *func = curr_func(L);
- api_check(L, ttistable(L->top - 1));
+ api_check(L, ttistable(L->top - 1));
func->c.env = hvalue(L->top - 1);
luaC_barrier(L, func, L->top - 1);
}
@@ -773,7 +773,7 @@ LUA_API int lua_setfenv (lua_State *L, int idx) {
#define checkresults(L,na,nr) \
api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na)))
-
+
LUA_API void lua_call (lua_State *L, int nargs, int nresults) {
StkId func;
diff --git a/engines/sword25/util/lua/lauxlib.cpp b/engines/sword25/util/lua/lauxlib.cpp
index 8978cd5613..1261777315 100644
--- a/engines/sword25/util/lua/lauxlib.cpp
+++ b/engines/sword25/util/lua/lauxlib.cpp
@@ -570,13 +570,13 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
}
c = lf.f->getc();
- if (c == '#') { // Unix exec. file?
+ if (c == '#') { // Unix exec. file?
lf.extraline = 1;
- while ((c = lf.f->getc()) != EOF && c != '\n') ; // skip first line
+ while ((c = lf.f->getc()) != EOF && c != '\n') ; // skip first line
if (c == '\n') c = lf.f->getc();
}
- if (c == LUA_SIGNATURE[0] && filename) { // binary file?
- lf.f = freopen(filename, "rb", lf.f); // reopen in binary mode
+ if (c == LUA_SIGNATURE[0] && filename) { // binary file?
+ lf.f = freopen(filename, "rb", lf.f); // reopen in binary mode
if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
// skip eventual `#!...'
while ((c = lf.f->getc()) != EOF && c != LUA_SIGNATURE[0]) ;
diff --git a/engines/sword25/util/lua/ldblib.cpp b/engines/sword25/util/lua/ldblib.cpp
index 4d0333b46e..618e9a843f 100644
--- a/engines/sword25/util/lua/ldblib.cpp
+++ b/engines/sword25/util/lua/ldblib.cpp
@@ -142,7 +142,7 @@ static int db_getinfo (lua_State *L) {
treatstackoption(L, L1, "func");
return 1; /* return table */
}
-
+
static int db_getlocal (lua_State *L) {
int arg;
diff --git a/engines/sword25/util/lua/ldebug.cpp b/engines/sword25/util/lua/ldebug.cpp
index 0b26522b31..85c492cc77 100644
--- a/engines/sword25/util/lua/ldebug.cpp
+++ b/engines/sword25/util/lua/ldebug.cpp
@@ -184,7 +184,7 @@ static void collectvalidlines (lua_State *L, Closure *f) {
int i;
for (i=0; i<f->l.p->sizelineinfo; i++)
setbvalue(luaH_setnum(L, t, lineinfo[i]), 1);
- sethvalue(L, L->top, t);
+ sethvalue(L, L->top, t);
}
incr_top(L);
}
diff --git a/engines/sword25/util/lua/ldo.cpp b/engines/sword25/util/lua/ldo.cpp
index bbcdf98b3d..49e0881a45 100644
--- a/engines/sword25/util/lua/ldo.cpp
+++ b/engines/sword25/util/lua/ldo.cpp
@@ -384,7 +384,7 @@ int luaD_poscall (lua_State *L, StkId firstResult) {
** The arguments are on the stack, right after the function.
** When returns, all the results are on the stack, starting at the original
** function position.
-*/
+*/
void luaD_call (lua_State *L, StkId func, int nResults) {
if (++L->nCcalls >= LUAI_MAXCCALLS) {
if (L->nCcalls == LUAI_MAXCCALLS)
diff --git a/engines/sword25/util/lua/lgc.cpp b/engines/sword25/util/lua/lgc.cpp
index 52ff72bdc9..71e581ad30 100644
--- a/engines/sword25/util/lua/lgc.cpp
+++ b/engines/sword25/util/lua/lgc.cpp
@@ -310,7 +310,7 @@ static l_mem propagatemark (global_State *g) {
traverseproto(g, p);
return sizeof(Proto) + sizeof(Instruction) * p->sizecode +
sizeof(Proto *) * p->sizep +
- sizeof(TValue) * p->sizek +
+ sizeof(TValue) * p->sizek +
sizeof(int) * p->sizelineinfo +
sizeof(LocVar) * p->sizelocvars +
sizeof(TString *) * p->sizeupvalues;
@@ -697,7 +697,7 @@ void luaC_linkupval (lua_State *L, UpVal *uv) {
GCObject *o = obj2gco(uv);
o->gch.next = g->rootgc; /* link upvalue into `rootgc' list */
g->rootgc = o;
- if (isgray(o)) {
+ if (isgray(o)) {
if (g->gcstate == GCSpropagate) {
gray2black(o); /* closed upvalues need barrier */
luaC_barrier(L, uv, uv->v);
diff --git a/engines/sword25/util/lua/liolib.cpp b/engines/sword25/util/lua/liolib.cpp
index b505d1e4df..6c00de5094 100644
--- a/engines/sword25/util/lua/liolib.cpp
+++ b/engines/sword25/util/lua/liolib.cpp
@@ -228,7 +228,7 @@ static int g_iofile (lua_State *L, int f, const char *mode) {
}
lua_rawseti(L, LUA_ENVIRONINDEX, f);
}
- // return current value
+ // return current value
lua_rawgeti(L, LUA_ENVIRONINDEX, f);
return 1;
}
@@ -315,7 +315,7 @@ static int read_line (lua_State *L, Sword25::Sword25FileProxy *f) {
for (;;) {
size_t l;
char *p = luaL_prepbuffer(&b);
- if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { // eof?
+ if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) { // eof?
luaL_pushresult(&b); // close buffer
return (lua_objlen(L, -1) > 0); // check whether read something
}
@@ -332,19 +332,19 @@ static int read_line (lua_State *L, Sword25::Sword25FileProxy *f) {
static int read_chars (lua_State *L, Sword25::Sword25FileProxy *f, size_t n) {
- size_t rlen; // how much to read
- size_t nr; // number of chars actually read
+ size_t rlen; // how much to read
+ size_t nr; // number of chars actually read
luaL_Buffer b;
luaL_buffinit(L, &b);
- rlen = LUAL_BUFFERSIZE; // try to read that much each time
+ rlen = LUAL_BUFFERSIZE; // try to read that much each time
do {
char *p = luaL_prepbuffer(&b);
- if (rlen > n) rlen = n; // cannot read more than asked
+ if (rlen > n) rlen = n; // cannot read more than asked
nr = fread(p, sizeof(char), rlen, f);
luaL_addsize(&b, nr);
- n -= nr; // still have to read `n' chars
- } while (n > 0 && nr == rlen); // until end of count or eof
- luaL_pushresult(&b); // close buffer
+ n -= nr; // still have to read `n' chars
+ } while (n > 0 && nr == rlen); // until end of count or eof
+ luaL_pushresult(&b); // close buffer
return (n == 0 || lua_objlen(L, -1) > 0);
}
@@ -354,11 +354,11 @@ static int g_read (lua_State *L, Sword25::Sword25FileProxy *f, int first) {
int success;
int n;
clearerr(f);
- if (nargs == 0) { // no arguments?
+ if (nargs == 0) { // no arguments?
success = read_line(L, f);
- n = first+1; // to return 1 result
+ n = first+1; // to return 1 result
}
- else { // ensure stack space for all results and for auxlib's buffer
+ else { // ensure stack space for all results and for auxlib's buffer
luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments");
success = 1;
for (n = first; nargs-- && success; n++) {
@@ -370,15 +370,15 @@ static int g_read (lua_State *L, Sword25::Sword25FileProxy *f, int first) {
const char *p = lua_tostring(L, n);
luaL_argcheck(L, p && p[0] == '*', n, "invalid option");
switch (p[1]) {
- case 'n': // number
+ case 'n': // number
success = read_number(L, f);
break;
- case 'l': // line
+ case 'l': // line
success = read_line(L, f);
break;
- case 'a': // file
- read_chars(L, f, ~((size_t)0)); // read MAX_SIZE_T chars
- success = 1; // always success
+ case 'a': // file
+ read_chars(L, f, ~((size_t)0)); // read MAX_SIZE_T chars
+ success = 1; // always success
break;
default:
return luaL_argerror(L, n, "invalid format");
@@ -389,8 +389,8 @@ static int g_read (lua_State *L, Sword25::Sword25FileProxy *f, int first) {
if (ferror(f))
return pushresult(L, 0, NULL);
if (!success) {
- lua_pop(L, 1); // remove last result
- lua_pushnil(L); // push nil instead
+ lua_pop(L, 1); // remove last result
+ lua_pushnil(L); // push nil instead
}
return n - first;
}
@@ -419,8 +419,8 @@ static int io_readline (lua_State *L) {
if (ferror(f))
return luaL_error(L, "%s", "LUA I/O error descriptions have been removed in ScummVM");
if (sucess) return 1;
- else { // EOF
- if (lua_toboolean(L, lua_upvalueindex(2))) { // generator created file?
+ else { // EOF
+ if (lua_toboolean(L, lua_upvalueindex(2))) { // generator created file?
lua_settop(L, 0);
lua_pushvalue(L, lua_upvalueindex(1));
aux_close(L); // close it
diff --git a/engines/sword25/util/lua/llex.cpp b/engines/sword25/util/lua/llex.cpp
index 4d73a6a600..b456ee2dfe 100644
--- a/engines/sword25/util/lua/llex.cpp
+++ b/engines/sword25/util/lua/llex.cpp
@@ -188,7 +188,7 @@ static void trydecpoint (LexState *ls, SemInfo *seminfo) {
sprintf(buf, "%.1f", 1.0);
ls->decpoint = '.';
for (i = 0; buf[i]; i++) {
- if (!isspace(buf[i]) && !isdigit(buf[i])) {
+ if (!isspace(static_cast<unsigned char>(buf[i])) && !isdigit(static_cast<unsigned char>(buf[i]))) {
ls->decpoint = buf[i];
break;
}
diff --git a/engines/sword25/util/lua/llimits.h b/engines/sword25/util/lua/llimits.h
index a31ad160ad..0925231350 100644
--- a/engines/sword25/util/lua/llimits.h
+++ b/engines/sword25/util/lua/llimits.h
@@ -107,7 +107,7 @@ typedef lu_int32 Instruction;
#ifndef lua_lock
-#define lua_lock(L) ((void) 0)
+#define lua_lock(L) ((void) 0)
#define lua_unlock(L) ((void) 0)
#endif
@@ -118,7 +118,7 @@ typedef lu_int32 Instruction;
/*
** macro to control inclusion of some hard tests on stack reallocation
-*/
+*/
#ifndef HARDSTACKTESTS
#define condhardstacktests(x) ((void)0)
#else
diff --git a/engines/sword25/util/lua/loadlib.cpp b/engines/sword25/util/lua/loadlib.cpp
index 9795a575f5..f4cdd70a78 100644
--- a/engines/sword25/util/lua/loadlib.cpp
+++ b/engines/sword25/util/lua/loadlib.cpp
@@ -182,7 +182,7 @@ static int ll_require (lua_State *L) {
** 'module' function
** =======================================================
*/
-
+
static void setfenv (lua_State *L) {
lua_Debug ar;
@@ -298,7 +298,7 @@ LUALIB_API int luaopen_package (lua_State *L) {
lua_setfield(L, -2, "__gc");
/* create `package' table */
luaL_register(L, LUA_LOADLIBNAME, pk_funcs);
-#if defined(LUA_COMPAT_LOADLIB)
+#if defined(LUA_COMPAT_LOADLIB)
lua_getfield(L, -1, "loadlib");
lua_setfield(L, LUA_GLOBALSINDEX, "loadlib");
#endif
diff --git a/engines/sword25/util/lua/lobject.h b/engines/sword25/util/lua/lobject.h
index 35aaed028a..5418a918b1 100644
--- a/engines/sword25/util/lua/lobject.h
+++ b/engines/sword25/util/lua/lobject.h
@@ -337,7 +337,7 @@ typedef struct Node {
typedef struct Table {
CommonHeader;
- lu_byte flags; /* 1<<p means tagmethod(p) is not present */
+ lu_byte flags; /* 1<<p means tagmethod(p) is not present */
lu_byte lsizenode; /* log2 of size of `node' array */
struct Table *metatable;
TValue *array; /* array part */
diff --git a/engines/sword25/util/lua/lopcodes.h b/engines/sword25/util/lua/lopcodes.h
index e1aed0f637..2f850c4365 100644
--- a/engines/sword25/util/lua/lopcodes.h
+++ b/engines/sword25/util/lua/lopcodes.h
@@ -186,8 +186,8 @@ OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */
OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */
OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */
-OP_TEST,/* A C if not (R(A) <=> C) then pc++ */
-OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */
+OP_TEST,/* A C if not (R(A) <=> C) then pc++ */
+OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */
OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */
OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */
@@ -197,8 +197,8 @@ OP_FORLOOP,/* A sBx R(A)+=R(A+2);
if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/
OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
-OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));
- if R(A+3) ~= nil then R(A+2)=R(A+3) else pc++ */
+OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));
+ if R(A+3) ~= nil then R(A+2)=R(A+3) else pc++ */
OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/
@@ -240,7 +240,7 @@ OP_VARARG/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */
** bits 4-5: B arg mode
** bit 6: instruction set register A
** bit 7: operator is a test
-*/
+*/
enum OpArgMask {
OpArgN, /* argument is not used */
diff --git a/engines/sword25/util/lua/lstate.cpp b/engines/sword25/util/lua/lstate.cpp
index 495d75c8a6..e542bcbacc 100644
--- a/engines/sword25/util/lua/lstate.cpp
+++ b/engines/sword25/util/lua/lstate.cpp
@@ -36,7 +36,7 @@ typedef struct LG {
lua_State l;
global_State g;
} LG;
-
+
static void stack_init (lua_State *L1, lua_State *L) {
diff --git a/engines/sword25/util/lua/lstrlib.cpp b/engines/sword25/util/lua/lstrlib.cpp
index e5501b9b49..2a1b8690e2 100644
--- a/engines/sword25/util/lua/lstrlib.cpp
+++ b/engines/sword25/util/lua/lstrlib.cpp
@@ -635,7 +635,7 @@ static void add_value (MatchState *ms, luaL_Buffer *b, const char *s,
lua_pushlstring(L, s, e - s); /* keep original text */
}
else if (!lua_isstring(L, -1))
- luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1));
+ luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1));
luaL_addvalue(b); /* add result to accumulator */
}
diff --git a/engines/sword25/util/lua/ltable.cpp b/engines/sword25/util/lua/ltable.cpp
index b2ec0e912a..45381fe673 100644
--- a/engines/sword25/util/lua/ltable.cpp
+++ b/engines/sword25/util/lua/ltable.cpp
@@ -48,7 +48,7 @@
#define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t))))
-
+
#define hashstr(t,str) hashpow2(t, (str)->tsv.hash)
#define hashboolean(t,p) hashpow2(t, p)
@@ -303,7 +303,7 @@ static void resize (lua_State *L, Table *t, int nasize, int nhsize) {
if (nasize > oldasize) /* array part must grow? */
setarrayvector(L, t, nasize);
/* create new hash part with appropriate size */
- setnodevector(L, t, nhsize);
+ setnodevector(L, t, nhsize);
if (nasize < oldasize) { /* array part must shrink? */
t->sizearray = nasize;
/* re-insert elements from vanishing slice */
@@ -392,11 +392,11 @@ static Node *getfreepos (Table *t) {
/*
-** inserts a new key into a hash table; first, check whether key's main
-** position is free. If not, check whether colliding node is in its main
-** position or not: if it is not, move colliding node to an empty place and
-** put new key in its main position; otherwise (colliding node is in its main
-** position), new key goes to an empty position.
+** inserts a new key into a hash table; first, check whether key's main
+** position is free. If not, check whether colliding node is in its main
+** position or not: if it is not, move colliding node to an empty place and
+** put new key in its main position; otherwise (colliding node is in its main
+** position), new key goes to an empty position.
*/
static TValue *newkey (lua_State *L, Table *t, const TValue *key) {
Node *mp = mainposition(t, key);
diff --git a/engines/sword25/util/lua/lua.h b/engines/sword25/util/lua/lua.h
index 417cdadf8b..08ad80d70f 100644
--- a/engines/sword25/util/lua/lua.h
+++ b/engines/sword25/util/lua/lua.h
@@ -247,7 +247,7 @@ LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
-/*
+/*
** ===============================================================
** some useful macros
** ===============================================================
diff --git a/engines/sword25/util/lua/lualib.h b/engines/sword25/util/lua/lualib.h
index 33d4e314c2..830f6a0894 100644
--- a/engines/sword25/util/lua/lualib.h
+++ b/engines/sword25/util/lua/lualib.h
@@ -41,7 +41,7 @@ LUALIB_API int (luaopen_package) (lua_State *L);
/* open all previous libraries */
-LUALIB_API void (luaL_openlibs) (lua_State *L);
+LUALIB_API void (luaL_openlibs) (lua_State *L);
diff --git a/engines/sword25/util/lua/lvm.cpp b/engines/sword25/util/lua/lvm.cpp
index fb700c20a2..d0f2198651 100644
--- a/engines/sword25/util/lua/lvm.cpp
+++ b/engines/sword25/util/lua/lvm.cpp
@@ -125,7 +125,7 @@ void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) {
callTMres(L, val, tm, t, key);
return;
}
- t = tm; /* else repeat with `tm' */
+ t = tm; /* else repeat with `tm' */
}
luaG_runerror(L, "loop in gettable");
}
@@ -152,7 +152,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
callTM(L, tm, t, key, val);
return;
}
- t = tm; /* else repeat with `tm' */
+ t = tm; /* else repeat with `tm' */
}
luaG_runerror(L, "loop in settable");
}
diff --git a/engines/sword25/util/lua/scummvm_file.cpp b/engines/sword25/util/lua/scummvm_file.cpp
index 3c0377d0ee..33053a71cb 100644
--- a/engines/sword25/util/lua/scummvm_file.cpp
+++ b/engines/sword25/util/lua/scummvm_file.cpp
@@ -32,11 +32,30 @@ Sword25FileProxy::Sword25FileProxy(const Common::String &filename, const Common:
setupConfigFile();
}
+Common::String Sword25FileProxy::formatDouble(double value) {
+ // This is a bit hackish. The point of it is that it's important that
+ // we ignore the locale decimal mark and force it to be a point. If it
+ // would happen to be a comma instead, it seems that it's seen as two
+ // comma-separated integers rather than one floating-point value. Or
+ // something like that.
+
+ bool negative = value < 0.0;
+ value = fabs(value);
+ double integerPart = floor(value);
+ double fractionalPart = (value - integerPart) * 1000000.0;
+
+ Common::String out = Common::String::format("%.0f.%.0f", integerPart, fractionalPart);
+ if (negative)
+ out = "-" + out;
+
+ return out;
+}
+
void Sword25FileProxy::setupConfigFile() {
- double sfxVolume = ConfMan.hasKey("sfx_volume") ? 1.0 : 1.0 * ConfMan.getInt("sfx_volume") / 255.0;
- double musicVolume = ConfMan.hasKey("music_volume") ? 0.5 : 1.0 * ConfMan.getInt("music_volume") / 255.0;
- double speechVolume = ConfMan.hasKey("speech_volume") ? 1.0 : 1.0 * ConfMan.getInt("speech_volume") / 255.0;
- bool subtitles = ConfMan.hasKey("subtitles") ? true : ConfMan.getBool("subtitles");
+ double sfxVolume = !ConfMan.hasKey("sfx_volume") ? 1.0 : 1.0 * ConfMan.getInt("sfx_volume") / 255.0;
+ double musicVolume = !ConfMan.hasKey("music_volume") ? 0.5 : 1.0 * ConfMan.getInt("music_volume") / 255.0;
+ double speechVolume = !ConfMan.hasKey("speech_volume") ? 1.0 : 1.0 * ConfMan.getInt("speech_volume") / 255.0;
+ bool subtitles = !ConfMan.hasKey("subtitles") ? true : ConfMan.getBool("subtitles");
_readData = Common::String::format(
"GAME_LANGUAGE = \"%s\"\r\n\
@@ -45,10 +64,13 @@ MAX_MEMORY_USAGE = 256000000\r\n\
GFX_VSYNC_ACTIVE = true\r\n\
SFX_SAMPLING_RATE = 44100\r\n\
SFX_CHANNEL_COUNT = 32\r\n\
-SFX_SOUND_VOLUME = %f\r\n\
-SFX_MUSIC_VOLUME = %f\r\n\
-SFX_SPEECH_VOLUME = %f\r\n",
- getLanguage().c_str(), subtitles ? "true" : "false", sfxVolume, musicVolume, speechVolume);
+SFX_SOUND_VOLUME = %s\r\n\
+SFX_MUSIC_VOLUME = %s\r\n\
+SFX_SPEECH_VOLUME = %s\r\n",
+ getLanguage().c_str(), subtitles ? "true" : "false",
+ formatDouble(sfxVolume).c_str(),
+ formatDouble(musicVolume).c_str(),
+ formatDouble(speechVolume).c_str());
_readPos = 0;
}
@@ -76,14 +98,14 @@ size_t Sword25FileProxy::write(const char *ptr, size_t count) {
// Legitimate data
const char *p = strchr(ptr, '\n');
if (!p) p = ptr + strlen(ptr);
- while ((*p == '\r') || (*p == '\n'))
+ while ((*p == '\r') || (*p == '\n'))
++p;
_settings += Common::String(ptr, p - ptr);
ptr = p;
}
- while ((*ptr == '\r') || (*ptr == '\n'))
+ while ((*ptr == '\r') || (*ptr == '\n'))
++ptr;
}
@@ -97,7 +119,7 @@ void Sword25FileProxy::writeSettings() {
if ((*pSrc != '\r') && (*pSrc != '\n')) {
const char *p = strchr(pSrc, '=');
assert(p);
-
+
// Get the setting name
const char *pEnd = p - 1;
while (*pEnd == ' ')
@@ -110,10 +132,10 @@ void Sword25FileProxy::writeSettings() {
++pStart;
pEnd = pStart + 1;
- while ((*pEnd != '\r') && (*pEnd != '\n') && (*pEnd != '\0'))
+ while ((*pEnd != '\r') && (*pEnd != '\n') && (*pEnd != '\0'))
++pEnd;
Common::String value(pStart + (*pStart == '"' ? 1 : 0), pEnd - pStart - (*pStart == '"' ? 2 : 0));
-
+
// Update the setting
updateSetting(settingName, value);
pSrc = pEnd;
diff --git a/engines/sword25/util/lua/scummvm_file.h b/engines/sword25/util/lua/scummvm_file.h
index a4cbd2a6cf..e8c468ee07 100644
--- a/engines/sword25/util/lua/scummvm_file.h
+++ b/engines/sword25/util/lua/scummvm_file.h
@@ -37,6 +37,7 @@ private:
uint _readPos;
Common::String _settings;
+ Common::String formatDouble(double value);
void setupConfigFile();
Common::String getLanguage();
void setLanguage(const Common::String &lang);
diff --git a/engines/teenagent/animation.cpp b/engines/teenagent/animation.cpp
index af54bca6a4..e945bda1e5 100644
--- a/engines/teenagent/animation.cpp
+++ b/engines/teenagent/animation.cpp
@@ -115,7 +115,7 @@ void Animation::load(Common::SeekableReadStream *s, Type type) {
return;
}
- uint16 pos = 0;
+ //uint16 pos = 0;
int off = 0;
switch (type) {
case kTypeLan:
@@ -141,7 +141,7 @@ void Animation::load(Common::SeekableReadStream *s, Type type) {
frames = new Surface[frames_count];
s->skip(frames_count * 2 - 2); //sizes
- pos = s->readUint16LE();
+ /*pos = */s->readUint16LE();
//debug(0, "pos?: %04x", pos);
for (uint16 i = 0; i < frames_count; ++i) {
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index 8430f42c61..4951b2d940 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -58,7 +58,7 @@ Inventory::Inventory(TeenAgentEngine *engine) {
for (byte i = 0; i < offsets; ++i) {
_offset[i] = READ_LE_UINT16(_items + i * 2 + 1);
}
- _offset[92] = items_size;
+ _offset[92] = items_size;
Resources *res = Resources::instance();
for (byte i = 0; i <= 92; ++i) {
diff --git a/engines/teenagent/inventory.h b/engines/teenagent/inventory.h
index 55c58a1c22..61e5364542 100644
--- a/engines/teenagent/inventory.h
+++ b/engines/teenagent/inventory.h
@@ -75,12 +75,12 @@ private:
void backgroundEffect(Graphics::Surface *s);
void render(Inventory *inventory, uint item_id, Graphics::Surface *surface, int delta);
};
-
+
Item _graphics[24];
bool _active;
Common::Point _mouse;
-
+
bool tryObjectCallback(InventoryObject *obj);
InventoryObject *_hoveredObj;
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 9e69383215..597ca670c0 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -106,13 +106,20 @@ void Resources::loadOff(Graphics::Surface &surface, byte *palette, int id) {
error("invalid background %d", id);
return;
}
- byte buf[64768];
- off.read(id, buf, sizeof(buf));
+
+ const uint bufferSize = 64768;
+ byte *buf = (byte *)malloc(bufferSize);
+ if (!buf)
+ error("[Resources::loadOff] Cannot allocate buffer");
+
+ off.read(id, buf, bufferSize);
byte *src = buf;
byte *dst = (byte *)surface.pixels;
memcpy(dst, src, 64000);
memcpy(palette, buf + 64000, 768);
+
+ free(buf);
}
Common::SeekableReadStream *Resources::loadLan(uint32 id) const {
diff --git a/engines/teenagent/resources.h b/engines/teenagent/resources.h
index c2eb32dbd4..5c08a46489 100644
--- a/engines/teenagent/resources.h
+++ b/engines/teenagent/resources.h
@@ -44,9 +44,9 @@ public:
//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)
- * is very sensitive to the number of simultaneously opened files.
+ /*
+ * PSP (as the other sony playstation consoles - to be confirmed and 'ifdef'ed here too)
+ * is very sensitive to the number of simultaneously opened files.
* This is an attempt to reduce their number to zero.
* TransientFilePack does not keep opened file descriptors and reopens it on each request.
*/
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index ef18b95f5a..4be6c9c31a 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -576,7 +576,7 @@ void Scene::paletteEffect(byte step) {
byte *src = res->dseg.ptr(0x6609);
byte *dst = palette + 3 * 0xf2;
for(byte i = 0; i < 0xd; ++i) {
- for(byte c = 0; c < 3; ++c, ++src)
+ for(byte c = 0; c < 3; ++c, ++src)
*dst++ = *src > step? *src - step: 0;
}
}
@@ -812,9 +812,9 @@ bool Scene::render(bool tick_game, bool tick_mark, uint32 delta) {
_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 &&
+ //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);
}
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index ce8862ffd0..0289b994e6 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -206,7 +206,7 @@ void TeenAgentEngine::deinit() {
Common::Error TeenAgentEngine::loadGameState(int slot) {
debug(0, "loading from slot %d", slot);
- Common::ScopedPtr<Common::InSaveFile>
+ Common::ScopedPtr<Common::InSaveFile>
in(_saveFileMan->openForLoading(Common::String::format("teenagent.%02d", slot)));
if (!in)
in.reset(_saveFileMan->openForLoading(Common::String::format("teenagent.%d", slot)));
@@ -216,14 +216,22 @@ Common::Error TeenAgentEngine::loadGameState(int slot) {
Resources *res = Resources::instance();
- assert(res->dseg.size() >= 0x6478 + 0x777a);
- char data[0x777a];
+ const uint dataSize = 0x777a;
+ assert(res->dseg.size() >= 0x6478 + dataSize);
+
+ char *data = (char *)malloc(dataSize);
+ if (!data)
+ error("[TeenAgentEngine::loadGameState] Cannot allocate buffer");
+
in->seek(0);
- if (in->read(data, 0x777a) != 0x777a) {
+ if (in->read(data, dataSize) != dataSize) {
+ free(data);
return Common::kReadingFailed;
}
- memcpy(res->dseg.ptr(0x6478), data, sizeof(data));
+ memcpy(res->dseg.ptr(0x6478), data, dataSize);
+
+ free(data);
scene->clear();
inventory->activate(false);
@@ -290,17 +298,32 @@ bool TeenAgentEngine::showCDLogo() {
if (!cdlogo.exists("cdlogo.res") || !cdlogo.open("cdlogo.res"))
return true;
- byte bg[0xfa00];
- byte palette[3*256];
+ const uint bgSize = 0xfa00;
+ const uint paletteSize = 3 * 256;
+
+ byte *bg = (byte *)malloc(bgSize);
+ if (!bg)
+ error("[TeenAgentEngine::showCDLogo] Cannot allocate background buffer");
- cdlogo.read(bg, sizeof(bg));
- cdlogo.read(palette, sizeof(palette));
- for (uint c = 0; c < 3*256; ++c)
+ byte *palette = (byte *)malloc(paletteSize);
+ if (!palette) {
+ free(bg);
+ error("[TeenAgentEngine::showCDLogo] Cannot allocate palette buffer");
+ }
+
+ cdlogo.read(bg, bgSize);
+ cdlogo.read(palette, paletteSize);
+
+ 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->updateScreen();
+ free(bg);
+ free(palette);
+
for(uint i = 0; i < 20; ++i) {
int r = skipEvents();
if (r != 0)
@@ -317,43 +340,66 @@ bool TeenAgentEngine::showLogo() {
if (!logo.open("unlogic.res"))
return true;
- byte bg[0xfa00];
- byte palette[3*256];
-
Common::ScopedPtr<Common::SeekableReadStream> frame(logo.getStream(1));
if (!frame)
return true;
- frame->read(bg, sizeof(bg));
- frame->read(palette, sizeof(palette));
- for (uint c = 0; c < 3*256; ++c)
+ const uint bgSize = 0xfa00;
+ const uint paletteSize = 3 * 256;
+
+ byte *bg = (byte *)malloc(bgSize);
+ if (!bg)
+ error("[TeenAgentEngine::showLogo] Cannot allocate background buffer");
+
+ byte *palette = (byte *)malloc(paletteSize);
+ if (!palette) {
+ free(bg);
+ error("[TeenAgentEngine::showLogo] Cannot allocate palette buffer");
+ }
+
+ frame->read(bg, bgSize);
+ frame->read(palette, paletteSize);
+
+ for (uint c = 0; c < paletteSize; ++c)
palette[c] *= 4;
+
_system->getPaletteManager()->setPalette(palette, 0, 0x100);
+ free(palette);
+
uint n = logo.fileCount();
for(uint f = 0; f < 4; ++f)
for(uint i = 2; i <= n; ++i) {
{
int r = skipEvents();
- if (r != 0)
+ if (r != 0) {
+ free(bg);
return r > 0? true: false;
+ }
}
_system->copyRectToScreen(bg, 320, 0, 0, 320, 200);
frame.reset(logo.getStream(i));
- if (!frame)
+ if (!frame) {
+ free(bg);
return true;
+ }
Surface s;
s.load(frame, Surface::kTypeOns);
- if (s.empty())
+ if (s.empty()) {
+ free(bg);
return true;
+ }
_system->copyRectToScreen((const byte *)s.pixels, s.w, s.x, s.y, s.w, s.h);
_system->updateScreen();
_system->delayMillis(100);
}
+
+ free(bg);
+
return true;
}
@@ -364,29 +410,53 @@ bool TeenAgentEngine::showMetropolis() {
FilePack varia;
varia.open("varia.res");
- byte palette[3*256];
+ const uint paletteSize = 3 * 256;
+ byte *palette = (byte *)malloc(paletteSize);
+ if (!palette)
+ error("[TeenAgentEngine::showMetropolis] Cannot allocate palette buffer");
+
{
Common::ScopedPtr<Common::SeekableReadStream> s(varia.getStream(5));
- s->read(palette, sizeof(palette));
- for (uint c = 0; c < 3*256; ++c)
+ s->read(palette, paletteSize);
+ for (uint c = 0; c < paletteSize; ++c)
palette[c] *= 4;
}
_system->getPaletteManager()->setPalette(palette, 0, 0x100);
- byte varia_6[21760], varia_9[18302];
- varia.read(6, varia_6, sizeof(varia_6));
- varia.read(9, varia_9, sizeof(varia_9));
+ free(palette);
- byte colors[56 * 160 * 2];
- memset(colors, 0, sizeof(colors));
+ 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);
+
+ error("[TeenAgentEngine::showMetropolis] Cannot allocate buffer");
+ }
+
+ varia.read(6, varia_6, varia6Size);
+ varia.read(9, varia_9, varia9Size);
+
+ const uint colorsSize = 56 * 160 * 2;
+ byte *colors = (byte *)malloc(colorsSize);
+ if (!colors)
+ error("[TeenAgentEngine::showMetropolis] Cannot allocate colors buffer");
+
+ memset(colors, 0, colorsSize);
int logo_y = -56;
for(uint f = 0; f < 300; ++f) {
{
int r = skipEvents();
- if (r != 0)
+ if (r != 0) {
+ free(varia_6);
+ free(varia_9);
+ free(colors);
return r > 0? true: false;
+ }
}
Graphics::Surface *surface = _system->lockScreen();
@@ -441,6 +511,11 @@ bool TeenAgentEngine::showMetropolis() {
_system->updateScreen();
_system->delayMillis(100);
}
+
+ free(varia_6);
+ free(varia_9);
+ free(colors);
+
return true;
}
@@ -963,10 +1038,10 @@ void TeenAgentEngine::playSoundNow(byte id) {
void TeenAgentEngine::setMusic(byte id) {
debug(0, "starting music %u", id);
Resources *res = Resources::instance();
-
+
if (id != 1) //intro music
*res->dseg.ptr(0xDB90) = 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) {
diff --git a/engines/testbed/config-params.cpp b/engines/testbed/config-params.cpp
index 9a5062185b..d7ead48f63 100644
--- a/engines/testbed/config-params.cpp
+++ b/engines/testbed/config-params.cpp
@@ -24,7 +24,9 @@
#include "testbed/config-params.h"
+namespace Common {
DECLARE_SINGLETON(Testbed::ConfigParams);
+}
namespace Testbed {
diff --git a/engines/testbed/config-params.h b/engines/testbed/config-params.h
index e982f62c72..6906d9248e 100644
--- a/engines/testbed/config-params.h
+++ b/engines/testbed/config-params.h
@@ -34,7 +34,7 @@ class ConfigParams : public Common::Singleton<ConfigParams> {
private:
friend class Common::Singleton<SingletonBaseType>;
ConfigParams();
-
+
/**
* Private variables related to log files.
*/
@@ -57,16 +57,16 @@ private:
TestbedConfigManager *_testbedConfMan;
public:
-
+
bool isRerunRequired();
void setRerunFlag(bool flag) { _rerunTests = flag; }
bool isSessionInteractive() { return _isInteractive; }
void setSessionAsInteractive(bool status) { _isInteractive = status; }
-
+
bool isGameDataFound() { return _isGameDataFound; }
void setGameDataFound(bool status) { _isGameDataFound = status; }
-
+
TestbedConfigManager *getTestbedConfigManager() { return _testbedConfMan; }
void setTestbedConfigManager(TestbedConfigManager* confMan) { _testbedConfMan = confMan; }
@@ -74,7 +74,7 @@ public:
void setLogDirectory(const Common::String &dirname) { _logDirectory = dirname; }
Common::String &getLogFilename() { return _logFilename; }
void setLogFilename(const Common::String &filename) { _logFilename = filename; }
-
+
Common::WriteStream *getLogWriteStream() { return _ws; }
Graphics::FontManager::FontUsage getCurrentFontUsageType() { return _displayFont; }
void setCurrentFontUsageType(Graphics::FontManager::FontUsage f) { _displayFont = f; }
diff --git a/engines/tinsel/coroutine.h b/engines/tinsel/coroutine.h
index b62c40b4e5..5bcf1149d9 100644
--- a/engines/tinsel/coroutine.h
+++ b/engines/tinsel/coroutine.h
@@ -178,10 +178,15 @@ public:
#define CORO_RESCHEDULE do { g_scheduler->reschedule(); CORO_SLEEP(1); } while (0)
/**
- * Stop the currently running coroutine.
+ * Stop the currently running coroutine and all calling coroutines.
+ *
+ * This sets _sleep to -1 rather than 0 so that the context doesn't get
+ * deleted by CoroContextHolder, since we want CORO_INVOKE_ARGS to
+ * propogate the _sleep value and return immediately (the scheduler will
+ * then delete the entire coroutine's state, including all subcontexts).
*/
#define CORO_KILL_SELF() \
- do { if (&coroParam != &nullContext) { coroParam->_sleep = 0; } return; } while (0)
+ do { if (&coroParam != &nullContext) { coroParam->_sleep = -1; } return; } while (0)
/**
@@ -193,8 +198,12 @@ public:
/**
* Invoke another coroutine.
*
- * What makes this tricky is that the coroutine we called my yield/sleep,
- * and we need to deal with this adequately.
+ * If the subcontext still exists after the coroutine is invoked, it has
+ * either yielded/slept or killed itself, and so we copy the _sleep value
+ * to our own context and return (execution will continue at the case
+ * statement below, where we loop and call the coroutine again).
+ * If the subcontext is null, the coroutine ended normally, and we can
+ * simply break out of the loop and continue execution.
*
* @param subCoro name of the coroutine-enabled function to invoke
* @param ARGS list of arguments to pass to subCoro
diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h
index c86db9e438..116322aa89 100644
--- a/engines/tinsel/detection_tables.h
+++ b/engines/tinsel/detection_tables.h
@@ -119,7 +119,7 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V1,
},
- {
+ {
{
"dw",
"Floppy",
@@ -142,7 +142,7 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V1,
},
- {
+ {
{
"dw",
"Floppy",
@@ -165,7 +165,7 @@ static const TinselGameDescription gameDescriptions[] = {
TINSEL_V1,
},
- {
+ {
{
"dw",
"Floppy",
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index 0834e7df24..2ab1e653d4 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -140,11 +140,11 @@ static const byte fragment7[] = {OP_IMM | OPSIZE16, FRAGMENT_WORD(908), OP_JUMP
static const byte fragment8[] = {OP_IMM | OPSIZE16, FRAGMENT_WORD(910), OP_JUMP | OPSIZE16, FRAGMENT_WORD(644)};
static const byte fragment9[] = {OP_JUMP | OPSIZE8, 123};
static const byte fragment10[] = {OP_IMM | OPSIZE16, FRAGMENT_WORD(160), OP_JUMP | OPSIZE16, FRAGMENT_WORD(136)};
-static const byte fragment11[] = {OP_JMPTRUE | OPSIZE16, FRAGMENT_WORD(1572),
+static const byte fragment11[] = {OP_JMPTRUE | OPSIZE16, FRAGMENT_WORD(1572),
OP_ONE, OP_LIBCALL | OPSIZE8, 14, // Re-show the cursor
OP_IMM | OPSIZE16, FRAGMENT_WORD(322), OP_LIBCALL | OPSIZE8, 46, // Give back the whistle
OP_JUMP | OPSIZE16, FRAGMENT_WORD(1661)};
-static const byte fragment12[] = {OP_JMPTRUE | OPSIZE16, FRAGMENT_WORD(1491),
+static const byte fragment12[] = {OP_JMPTRUE | OPSIZE16, FRAGMENT_WORD(1491),
OP_ONE, OP_LIBCALL | OPSIZE8, 14, // Re-show the cursor
OP_IMM | OPSIZE16, FRAGMENT_WORD(322), OP_LIBCALL | OPSIZE8, 46, // Give back the whistle
OP_JUMP | OPSIZE16, FRAGMENT_WORD(1568)};
@@ -208,10 +208,10 @@ const WorkaroundEntry workaroundList[] = {
// See bug report #2934211.
{TINSEL_V1, true, 352601285, 1569, sizeof(fragment11), fragment11},
{TINSEL_V1, false, 352602304, 1488, sizeof(fragment12), fragment12},
-
+
// DW2: Corrects a bug with global 306 not being cleared if you leave
// the marketplace scene whilst D'Blah is talking (even if it's not
- // actually audible); returning to the scene and clicking on him multiple
+ // actually audible); returning to the scene and clicking on him multiple
// times would cause the game to crash
{TINSEL_V2, true, 1109294728, 0, sizeof(fragment13), fragment13},
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 1244168a21..7a973ba4be 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -483,7 +483,7 @@ static void DoSave() {
NeedLoad = true;
if (SaveSceneName == NULL) {
- // Generate a new unique save name
+ // Generate a new unique save name
int i;
int ano = 1; // Allocated number
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index b24d6bf9b8..d6cd806eb2 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -70,6 +70,7 @@ Scheduler::Scheduler() {
active = new PROCESS;
active->pPrevious = NULL;
+ active->pNext = NULL;
g_scheduler = this; // FIXME HACK
}
@@ -113,6 +114,14 @@ void Scheduler::reset() {
memset(processList, 'S', MAX_PROCESSES * sizeof(PROCESS));
}
+ // Kill all running processes (i.e. free memory allocated for their state).
+ PROCESS *pProc = active->pNext;
+ while (pProc != NULL) {
+ delete pProc->state;
+ pProc->state = 0;
+ pProc = pProc->pNext;
+ }
+
// no active processes
pCurrent = active->pNext = NULL;
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index 7613c1a897..7fbec69cbf 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -214,39 +214,39 @@ static const MASTER_LIB_CODES DW1_CODES[] = {
};
static const MASTER_LIB_CODES DW2DEMO_CODES[] = {
- ACTORBRIGHTNESS, ACTORDIRECTION, ACTORPALETTE, ACTORPRIORITY,
+ ACTORBRIGHTNESS, ACTORDIRECTION, ACTORPALETTE, ACTORPRIORITY,
ACTORREF, ACTORRGB, ACTORSCALE, ACTORXPOS, ACTORYPOS,
ADDHIGHLIGHT, ADDINV, ADDINV1, ADDINV2, ADDOPENINV, ADDTOPIC,
- BACKGROUND, CALLACTOR, CALLGLOBALPROCESS, CALLOBJECT,
+ BACKGROUND, CALLACTOR, CALLGLOBALPROCESS, CALLOBJECT,
CALLPROCESS, CALLSCENE, CALLTAG, CAMERA, CDCHANGESCENE,
CDDOCHANGE, CDLOAD, CDPLAY, CLEARHOOKSCENE, CLOSEINVENTORY,
- CONTROL, CONVERSATION, CURSOR, CURSORXPOS, CURSORYPOS,
- DECCONVW, DECCURSOR, DECFLAGS, DECINV1, DECINV2, DECINVW,
+ CONTROL, CONVERSATION, CURSOR, CURSORXPOS, CURSORYPOS,
+ DECCONVW, DECCURSOR, DECFLAGS, DECINV1, DECINV2, DECINVW,
DECLEAD, DECSCALE, DECTAGFONT, DECTALKFONT, DELTOPIC,
DIMMUSIC, DROP, DROPOUT, EFFECTACTOR, ENABLEMENU, ENDACTOR,
- ESCAPEOFF, ESCAPEON, EVENT, FACETAG, FADEIN, FADEOUT, FRAMEGRAB,
- FREEZECURSOR, GETINVLIMIT, GHOST, GLOBALVAR, HASRESTARTED,
- HAVE, HELDOBJECT, HIDEACTOR, HIDEBLOCK, HIDEEFFECT, HIDEPATH,
+ ESCAPEOFF, ESCAPEON, EVENT, FACETAG, FADEIN, FADEOUT, FRAMEGRAB,
+ FREEZECURSOR, GETINVLIMIT, GHOST, GLOBALVAR, HASRESTARTED,
+ HAVE, HELDOBJECT, HIDEACTOR, HIDEBLOCK, HIDEEFFECT, HIDEPATH,
HIDEREFER, HIDETAG, HOLD, HOOKSCENE, IDLETIME, INSTANTSCROLL,
- INVENTORY, INVPLAY, INWHICHINV, KILLACTOR, KILLGLOBALPROCESS,
- KILLPROCESS, LOCALVAR, MOVECURSOR, MOVETAG, MOVETAGTO, NEWSCENE,
- NOBLOCKING, NOPAUSE, NOSCROLL, OFFSET, OTHEROBJECT, PAUSE, PLAY,
- PLAYMUSIC, PLAYRTF, PLAYSAMPLE, POINTACTOR, POINTTAG, POSTACTOR,
+ INVENTORY, INVPLAY, INWHICHINV, KILLACTOR, KILLGLOBALPROCESS,
+ KILLPROCESS, LOCALVAR, MOVECURSOR, MOVETAG, MOVETAGTO, NEWSCENE,
+ NOBLOCKING, NOPAUSE, NOSCROLL, OFFSET, OTHEROBJECT, PAUSE, PLAY,
+ PLAYMUSIC, PLAYRTF, PLAYSAMPLE, POINTACTOR, POINTTAG, POSTACTOR,
POSTGLOBALPROCESS, POSTOBJECT, POSTPROCESS, POSTTAG, PRINT,
PRINTCURSOR, PRINTOBJ, PRINTTAG, QUITGAME, RANDOM, RESETIDLETIME,
- RESTARTGAME, RESTORESCENE, RUNMODE, SAVESCENE, SAY, SAYAT,
- SCALINGREELS, SCREENXPOS, SCREENYPOS, SCROLL, SCROLLPARAMETERS,
+ RESTARTGAME, RESTORESCENE, RUNMODE, SAVESCENE, SAY, SAYAT,
+ SCALINGREELS, SCREENXPOS, SCREENYPOS, SCROLL, SCROLLPARAMETERS,
SENDACTOR, SENDGLOBALPROCESS, SENDOBJECT, SENDPROCESS, SENDTAG,
- SETBRIGHTNESS, SETINVLIMIT, SETINVSIZE, SETLANGUAGE, SETPALETTE,
- SETSYSTEMSTRING, SETSYSTEMVAR, SHELL, SHOWACTOR, SHOWBLOCK,
+ SETBRIGHTNESS, SETINVLIMIT, SETINVSIZE, SETLANGUAGE, SETPALETTE,
+ SETSYSTEMSTRING, SETSYSTEMVAR, SHELL, SHOWACTOR, SHOWBLOCK,
SHOWEFFECT, SHOWPATH, SHOWREFER, SHOWTAG, STAND, STANDTAG,
- STARTGLOBALPROCESS, STARTPROCESS, STARTTIMER, STOPWALK, SUBTITLES,
- SWALK, SYSTEMVAR, TAGTAGXPOS, TAGTAGYPOS, TAGWALKXPOS, TAGWALKYPOS,
+ STARTGLOBALPROCESS, STARTPROCESS, STARTTIMER, STOPWALK, SUBTITLES,
+ SWALK, SYSTEMVAR, TAGTAGXPOS, TAGTAGYPOS, TAGWALKXPOS, TAGWALKYPOS,
TALK, TALKAT, TALKPALETTEINDEX, TALKRGB, TALKVIA, THISOBJECT,
- THISTAG, TIMER, TOPIC, TOPPLAY, TOPWINDOW, TRANSLUCENTINDEX,
- UNDIMMUSIC, UNHOOKSCENE, WAITFRAME, WAITKEY, WAITSCROLL, WAITTIME,
- WALK, WALKED, WALKEDPOLY, WALKEDTAG, WALKINGACTOR, WALKPOLY,
- WALKTAG, WALKXPOS, WALKYPOS, WHICHCD, WHICHINVENTORY,
+ THISTAG, TIMER, TOPIC, TOPPLAY, TOPWINDOW, TRANSLUCENTINDEX,
+ UNDIMMUSIC, UNHOOKSCENE, WAITFRAME, WAITKEY, WAITSCROLL, WAITTIME,
+ WALK, WALKED, WALKEDPOLY, WALKEDTAG, WALKINGACTOR, WALKPOLY,
+ WALKTAG, WALKXPOS, WALKYPOS, WHICHCD, WHICHINVENTORY,
HIGHEST_LIBCODE
};
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 23bd0f6487..07d51ef1b9 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -271,6 +271,18 @@ void Animation::applyPalette(int32 offset, int32 srcOffset, int32 numEntries) {
_vm->setPaletteEntries(_palette + srcOffset, offset, numEntries);
}
+Common::Rect Animation::getFrameRect(int32 frame) {
+ debugC(4, kDebugAnim, "getFrameRect(%d)", frame);
+ if ((frame < 0) || (frame >= _numFrames)) {
+ return Common::Rect();
+ }
+
+ if (_frames[frame]._ref != -1)
+ frame = _frames[frame]._ref;
+
+ return Common::Rect(_frames[frame]._x1, _frames[frame]._y1, _frames[frame]._x2, _frames[frame]._y2);
+}
+
int32 Animation::getFrameWidth(int32 frame) {
debugC(4, kDebugAnim, "getFrameWidth(%d)", frame);
if ((frame < 0) || (frame >= _numFrames))
diff --git a/engines/toon/anim.h b/engines/toon/anim.h
index 13c501b910..4b95b6cf40 100644
--- a/engines/toon/anim.h
+++ b/engines/toon/anim.h
@@ -68,6 +68,7 @@ public:
void drawFrameWithMaskAndScale(Graphics::Surface &surface, int32 frame, int32 xx, int32 yy, int32 zz, Picture *mask, int32 scale);
void drawStrip(int32 offset = 0);
void applyPalette(int32 offset, int32 srcOffset, int32 numEntries);
+ Common::Rect getFrameRect(int32 frame);
int32 getFrameWidth(int32 frame);
int32 getFrameHeight(int32 frame);
int32 getWidth() const;
diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp
index 06c6e21d21..022214157a 100644
--- a/engines/toon/character.cpp
+++ b/engines/toon/character.cpp
@@ -596,7 +596,8 @@ int32 Character::getId() {
void Character::save(Common::WriteStream *stream) {
debugC(1, kDebugCharacter, "save(stream)");
- stream->writeSint32LE(_flags);
+ // we have to save visibility too, put in flags to not invalidate old savegames.
+ stream->writeSint32LE(_flags | ((_visible == false) ? 0x100 : 0));
stream->writeSint32LE(_x);
stream->writeSint32LE(_y);
stream->writeSint32LE(_z);
@@ -633,6 +634,12 @@ void Character::load(Common::ReadStream *stream) {
if (_sceneAnimationId > -1) {
setAnimationInstance(_vm->getSceneAnimation(_sceneAnimationId)->_animInstance);
}
+
+ // "not visible" flag.
+ if (_flags & 0x100) {
+ _flags &= ~0x100;
+ setVisible(false);
+ }
}
void Character::setAnimScript(int32 animScriptId) {
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index 4c491ae2b3..63304c905f 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -21,6 +21,7 @@
*/
#include "common/debug.h"
+#include "common/rect.h"
#include "toon/font.h"
@@ -80,7 +81,7 @@ void FontRenderer::renderText(int32 x, int32 y, Common::String origText, int32 m
x -= xx / 2;
}
- _vm->addDirtyRect(x, y, x + xx + 2, y + yy);
+ _vm->addDirtyRect(x, y, x + xx, y + yy);
int32 curX = x;
int32 curY = y;
@@ -110,6 +111,7 @@ void FontRenderer::computeSize(Common::String origText, int32 *retX, int32 *retY
int32 lineHeight = 0;
int32 totalHeight = 0;
int32 totalWidth = 0;
+ int32 lastLineHeight = 0;
const byte *text = (const byte *)origText.c_str();
while (*text) {
@@ -122,17 +124,25 @@ void FontRenderer::computeSize(Common::String origText, int32 *retX, int32 *retY
totalHeight += lineHeight;
lineHeight = 0;
lineWidth = 0;
+ lastLineHeight = 0;
} else {
curChar = textToFont(curChar);
int32 charWidth = _currentFont->getFrameWidth(curChar) - 1;
int32 charHeight = _currentFont->getFrameHeight(curChar);
lineWidth += charWidth;
lineHeight = MAX(lineHeight, charHeight);
+
+ // The character may be offset, so the height doesn't
+ // really tell how far it will stick out. For now,
+ // assume we only need to take the lower bound into
+ // consideration.
+ Common::Rect charRect = _currentFont->getFrameRect(curChar);
+ lastLineHeight = MAX<int32>(lastLineHeight, charRect.bottom);
}
text++;
}
- totalHeight += lineHeight;
+ totalHeight += lastLineHeight;
totalWidth = MAX(totalWidth, lineWidth);
*retX = totalWidth;
diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index 2318eaaac7..7637f4e62f 100644
--- a/engines/toon/movie.cpp
+++ b/engines/toon/movie.cpp
@@ -94,7 +94,7 @@ void Movie::play(Common::String video, int32 flags) {
_vm->getAudioManager()->setMusicVolume(0);
_decoder->loadFile(video.c_str());
playVideo(isFirstIntroVideo);
- _vm->flushPalette(false);
+ _vm->flushPalette(true);
if (flags & 1)
_vm->getAudioManager()->setMusicVolume(_vm->getAudioManager()->isMusicMuted() ? 0 : 255);
_decoder->close();
@@ -103,7 +103,6 @@ void Movie::play(Common::String video, int32 flags) {
bool Movie::playVideo(bool isFirstIntroVideo) {
debugC(1, kDebugMovie, "playVideo(isFirstIntroVideo: %d)", isFirstIntroVideo);
-
while (!_vm->shouldQuit() && !_decoder->endOfVideo()) {
if (_decoder->needsUpdate()) {
const Graphics::Surface *frame = _decoder->decodeNextFrame();
diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp
index c116d63663..43a134e39b 100644
--- a/engines/toon/path.cpp
+++ b/engines/toon/path.cpp
@@ -342,8 +342,15 @@ next:
curX = destx;
curY = desty;
- int32 retPathX[4096];
- int32 retPathY[4096];
+ int32 *retPathX = (int32 *)malloc(4096 * sizeof(int32));
+ int32 *retPathY = (int32 *)malloc(4096 * sizeof(int32));
+ if (!retPathX || !retPathY) {
+ free(retPathX);
+ free(retPathY);
+
+ error("[PathFinding::findPath] Cannot allocate pathfinding buffers");
+ }
+
int32 numpath = 0;
retPathX[numpath] = curX;
@@ -377,8 +384,12 @@ next:
}
}
- if (bestX < 0 || bestY < 0)
+ if (bestX < 0 || bestY < 0) {
+ free(retPathX);
+ free(retPathY);
+
return 0;
+ }
retPathX[numpath] = bestX;
retPathY[numpath] = bestY;
@@ -389,6 +400,10 @@ next:
memcpy(_tempPathX, retPathX, sizeof(int32) * numpath);
memcpy(_tempPathY, retPathY, sizeof(int32) * numpath);
+
+ free(retPathX);
+ free(retPathY);
+
return true;
}
@@ -396,6 +411,9 @@ next:
curY = bestY;
}
+ free(retPathX);
+ free(retPathY);
+
return false;
}
@@ -406,8 +424,8 @@ void PathFinding::init(Picture *mask) {
_height = mask->getHeight();
_currentMask = mask;
_heap->unload();
- // In order to reduce memory fragmentation on small devices, we use the maximum
- // possible size here which is TOON_BACKBUFFER_WIDTH. Even though this is
+ // In order to reduce memory fragmentation on small devices, we use the maximum
+ // possible size here which is TOON_BACKBUFFER_WIDTH. Even though this is
// 1280 as opposed to the possible 640, it actually helps memory allocation on
// those devices.
_heap->init(TOON_BACKBUFFER_WIDTH * _height); // should really be _width
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index 0257964fb5..295e304765 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -29,16 +29,14 @@
namespace Toon {
-bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
- debugC(1, kDebugPicture, "loadPicture(%s, %d)", file.c_str(), (totalPalette) ? 1 : 0);
+bool Picture::loadPicture(Common::String file) {
+ debugC(1, kDebugPicture, "loadPicture(%s)", file.c_str());
uint32 size = 0;
uint8 *fileData = _vm->resources()->getFileData(file, &size);
if (!fileData)
return false;
- _useFullPalette = totalPalette;
-
uint32 compId = READ_BE_UINT32(fileData);
switch (compId) {
@@ -57,6 +55,8 @@ bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
// do we have a palette ?
_paletteEntries = (dstsize & 0x7ff) / 3;
+ _useFullPalette = (_paletteEntries == 256);
+ // _useFullPalette = true;
if (_paletteEntries) {
_palette = new uint8[_paletteEntries * 3];
memcpy(_palette, _data + dstsize - (dstsize & 0x7ff), _paletteEntries * 3);
@@ -70,7 +70,8 @@ bool Picture::loadPicture(Common::String file, bool totalPalette /*= false*/) {
uint32 decSize = READ_LE_UINT32(fileData + 10);
_data = new uint8[decSize + 100];
_paletteEntries = READ_LE_UINT16(fileData + 14) / 3;
-
+ _useFullPalette = (_paletteEntries == 256);
+
if (_paletteEntries) {
_palette = new uint8[_paletteEntries * 3];
memcpy(_palette, fileData + 16, _paletteEntries * 3);
diff --git a/engines/toon/picture.h b/engines/toon/picture.h
index 23edbc91da..ee0e006702 100644
--- a/engines/toon/picture.h
+++ b/engines/toon/picture.h
@@ -38,7 +38,7 @@ class Picture {
public:
Picture(ToonEngine *vm);
~Picture();
- bool loadPicture(Common::String file, bool totalPalette = false);
+ bool loadPicture(Common::String file);
void setupPalette();
void draw(Graphics::Surface &surface, int32 x, int32 y, int32 dx, int32 dy);
void drawWithRectList(Graphics::Surface& surface, int32 x, int32 y, int32 dx, int32 dy, Common::Array<Common::Rect>& rectArray);
diff --git a/engines/toon/tools.cpp b/engines/toon/tools.cpp
index c9aa470deb..c2ee8acf8a 100644
--- a/engines/toon/tools.cpp
+++ b/engines/toon/tools.cpp
@@ -372,7 +372,7 @@ int32 RncDecoder::unpackM1(const void *input, uint16 inputSize, void *output) {
_dstPtr += inputLength;
_srcPtr += inputLength;
_inputByteLeft -= inputLength;
- uint16 a;
+ uint16 a;
if (_inputByteLeft <= 0)
a = 0;
else if (_inputByteLeft == 1)
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 0e0978b3d6..cff6c24469 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -114,7 +114,7 @@ void ToonEngine::init() {
_drew = _characters[0];
_flux = _characters[1];
-
+
// preload walk anim for flux and drew
_drew->loadWalkAnimation("STNDWALK.CAF");
@@ -614,7 +614,7 @@ struct MainMenuEntry {
bool ToonEngine::showMainmenu(bool &loadedGame) {
Picture *mainmenuPicture = new Picture(this);
- mainmenuPicture->loadPicture("TITLESCR.CPS", true);
+ mainmenuPicture->loadPicture("TITLESCR.CPS");
mainmenuPicture->setupPalette();
flushPalette(false);
@@ -690,6 +690,11 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
}
}
+ if (_needPaletteFlush) {
+ flushPalette(false);
+ _needPaletteFlush = false;
+ }
+
parseInput();
copyToVirtualScreen(true);
_system->delayMillis(17);
@@ -1547,7 +1552,7 @@ void ToonEngine::clickEvent() {
return;
}
} else {
- if (!_drew->walkTo(_mouseX, _mouseY)) {
+ if (!_drew->walkTo(_mouseX + _gameState->_currentScrollValue, _mouseY)) {
// walk was canceled ?
return;
}
@@ -2600,7 +2605,7 @@ int32 ToonEngine::showInventory() {
delete _inventoryPicture;
_inventoryPicture = new Picture(this);
fadeOut(5);
- _inventoryPicture->loadPicture("SACK128.CPS", true);
+ _inventoryPicture->loadPicture("SACK128.CPS");
_inventoryPicture->setupPalette();
dirtyAllScreen();
@@ -2695,7 +2700,7 @@ int32 ToonEngine::showInventory() {
}
renderInventory();
-
+ _system->delayMillis(10);
}
_gameState->_currentScrollValue = oldScrollValue;
@@ -2786,7 +2791,7 @@ void ToonEngine::showCutaway(Common::String cutawayPicture) {
if (cutawayPicture == "") {
cutawayPicture = Common::String(_gameState->_locations[_gameState->_currentScene]._cutaway) + ".CPS";
}
- _currentCutaway->loadPicture(cutawayPicture, false);
+ _currentCutaway->loadPicture(cutawayPicture);
_currentCutaway->setupPalette();
_oldScrollValue = _gameState->_currentScrollValue;
_gameState->_currentScrollValue = 0;
@@ -3418,7 +3423,7 @@ void ToonEngine::viewInventoryItem(Common::String str, int32 lineId, int32 itemD
fadeOut(5);
Picture *pic = new Picture(this);
- pic->loadPicture(str, false);
+ pic->loadPicture(str);
pic->setupPalette();
dirtyAllScreen();
flushPalette();
diff --git a/engines/toon/toon.h b/engines/toon/toon.h
index 65c6ba0234..cad684d590 100644
--- a/engines/toon/toon.h
+++ b/engines/toon/toon.h
@@ -204,7 +204,7 @@ public:
void viewInventoryItem(Common::String str, int32 lineId, int32 itemDest);
void storePalette();
void restorePalette();
- const char *getSpecialConversationMusic(int32 locationId);
+ const char *getSpecialConversationMusic(int32 locationId);
void playRoomMusic();
void waitForScriptStep();
void doMagnifierEffect();
@@ -320,7 +320,7 @@ public:
}
Common::Error saveGameState(int slot, const Common::String &desc) {
-
+
return (saveGame(slot, desc) ? Common::kWritingFailed : Common::kNoError);
}
@@ -381,7 +381,7 @@ protected:
Common::Array<Common::Rect> _oldDirtyRects;
bool _dirtyAll;
-
+
AnimationInstance *_cursorAnimationInstance;
Animation *_cursorAnimation;
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index f469a95803..c58e2f1a33 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(chr)) {
+ if (descriptionLen < 32 && isprint(static_cast<unsigned char>(chr))) {
description[descriptionLen] = chr;
description[descriptionLen + 1] = 0;
}
diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp
index 8f4752e912..6df6fc0e5f 100644
--- a/engines/touche/resource.cpp
+++ b/engines/touche/resource.cpp
@@ -468,14 +468,22 @@ void ToucheEngine::res_loadSprite(int num, int index) {
if (size > spr->size) {
debug(8, "Reallocating memory for sprite %d (index %d), %d bytes needed", num, index, size - spr->size);
spr->size = size;
- if (spr->ptr) {
- spr->ptr = (uint8 *)realloc(spr->ptr, size);
- } else {
- spr->ptr = (uint8 *)malloc(size);
- }
- if (!spr->ptr) {
- error("Unable to reallocate memory for sprite %d (%d bytes)", num, size);
+
+ uint8 *buffer = NULL;
+ if (spr->ptr)
+ buffer = (uint8 *)realloc(spr->ptr, size);
+
+ if (!buffer) {
+ // Free previously allocated sprite (when realloc failed)
+ free(spr->ptr);
+
+ buffer = (uint8 *)malloc(size);
}
+
+ if (!buffer)
+ error("[ToucheEngine::res_loadSprite] Unable to reallocate memory for sprite %d (%d bytes)", num, size);
+
+ spr->ptr = buffer;
}
for (int i = 0; i < _currentImageHeight; ++i) {
res_decodeScanLineImageRLE(spr->ptr + _currentImageWidth * i, _currentImageWidth);
diff --git a/engines/tsage/blueforce_logic.cpp b/engines/tsage/blueforce_logic.cpp
index 9813bef6f7..d266d5e1d9 100644
--- a/engines/tsage/blueforce_logic.cpp
+++ b/engines/tsage/blueforce_logic.cpp
@@ -30,7 +30,7 @@ namespace tSage {
void BlueForceGame::start() {
// Start the game
_globals->_sceneManager.changeScene(20);
-
+
_globals->_events.setCursor(CURSOR_WALK);
}
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 5fa36142e7..0ae575c557 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -231,7 +231,7 @@ void SequenceManager::signal() {
case 26:
v1 = getNextValue();
v2 = getNextValue();
- _soundHandler.startSound(v1, v2 ? this : NULL, 127);
+ _soundHandler.play(v1, v2 ? this : NULL, 127);
break;
case 27: {
v1 = getNextValue();
@@ -416,13 +416,13 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
// Event handling loop
Event event;
- while (!_vm->getEventManager()->shouldQuit()) {
+ while (!_vm->shouldQuit()) {
while (!_globals->_events.getEvent(event, EVENT_KEYPRESS | EVENT_BUTTON_DOWN | EVENT_MOUSE_MOVE) &&
- !_vm->getEventManager()->shouldQuit()) {
+ !_vm->shouldQuit()) {
g_system->delayMillis(10);
g_system->updateScreen();
}
- if (_vm->getEventManager()->shouldQuit())
+ if (_vm->shouldQuit())
break;
if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode >= Common::KEYCODE_1) &&
diff --git a/engines/tsage/converse.h b/engines/tsage/converse.h
index 6876fa41cb..13c490e995 100644
--- a/engines/tsage/converse.h
+++ b/engines/tsage/converse.h
@@ -25,6 +25,7 @@
#include "tsage/core.h"
#include "tsage/dialogs.h"
+#include "tsage/sound.h"
namespace tSage {
@@ -50,7 +51,7 @@ public:
int _objectIndex;
SceneObject *_sceneObject;
SceneObject *_objectList[6];
- SoundHandler _soundHandler;
+ ASound _soundHandler;
public:
SequenceManager();
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index ed2b03ebc4..d0075d5acf 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -31,6 +31,7 @@
#include "tsage/scenes.h"
#include "tsage/staticres.h"
#include "tsage/globals.h"
+#include "tsage/sound.h"
namespace tSage {
@@ -1551,7 +1552,7 @@ void SceneItem::display(int resNum, int lineNum, ...) {
Event event;
// Keep event on-screen until a mouse or keypress
- while (!_vm->getEventManager()->shouldQuit() && !_globals->_events.getEvent(event,
+ while (!_vm->shouldQuit() && !_globals->_events.getEvent(event,
EVENT_BUTTON_DOWN | EVENT_KEYPRESS)) {
g_system->updateScreen();
g_system->delayMillis(10);
@@ -2868,8 +2869,6 @@ void Region::draw() {
}
void Region::uniteLine(int yp, LineSliceSet &sliceSet) {
- // TODO: More properly implement like the original
-
// First expand the bounds as necessary to fit in the row
if (_ySlices.empty()) {
_bounds = Rect(sliceSet.items[0].xs, yp, sliceSet.items[sliceSet.items.size() - 1].xe, yp + 1);
@@ -2961,55 +2960,6 @@ int SceneRegions::indexOf(const Common::Point &pt) {
/*--------------------------------------------------------------------------*/
-SoundHandler::SoundHandler() {
- _action = NULL;
- _field280 = -1;
- if (_globals)
- _globals->_sceneListeners.push_back(this);
-}
-
-SoundHandler::~SoundHandler() {
- if (_globals)
- _globals->_sceneListeners.remove(this);
-}
-
-void SoundHandler::dispatch() {
- EventHandler::dispatch();
- int v = _sound.proc12();
-
- if (v != -1) {
- _field280 = v;
- _sound.proc2(-1);
-
- if (_action)
- _action->signal();
- }
-
- if (_field280 != -1) {
- // FIXME: Hardcoded to only flag a sound ended if an action has been set
- if (_action) {
-// if (!_sound.proc3()) {
- _field280 = -1;
- if (_action) {
- _action->signal();
- _action = NULL;
- }
- }
- }
-}
-
-void SoundHandler::startSound(int soundNum, Action *action, int volume) {
- _action = action;
- _field280 = 0;
- setVolume(volume);
- _sound.startSound(soundNum);
-
- warning("TODO: SoundHandler::startSound");
-}
-
-
-/*--------------------------------------------------------------------------*/
-
void SceneItemList::addItems(SceneItem *first, ...) {
va_list va;
va_start(va, first);
@@ -3072,13 +3022,12 @@ void WalkRegion::loadProcessList(byte *dataP, int dataSize, int &dataIndex, int
int yp = READ_LE_UINT16(dataP + idx * 4 + 2);
if (yp != y1) {
/*
- * Commented out: doesn't seem to be used
+ * Commented out: v doesn't seem to be used
int v;
if (idx == (dataSize - 1))
v = READ_LE_UINT16(dataP + 2);
else
v = process1(idx, dataP, dataSize);
- warning("TODO: v not used? - %d", v);
*/
process2(dataIndex, x1, y1, xp, yp);
++dataIndex;
@@ -3490,8 +3439,9 @@ void SceneHandler::postInit(SceneObjectList *OwnerList) {
_globals->_scenePalette.loadPalette(0);
_globals->_scenePalette.refresh();
- // TODO: Bunch of other scene related setup goes here
_globals->_soundManager.postInit();
+ _globals->_soundManager.buildDriverList(true);
+ _globals->_soundManager.installConfigDrivers();
_globals->_game->start();
}
@@ -3594,9 +3544,10 @@ void SceneHandler::dispatch() {
if (_globals->_sceneManager._scene)
_globals->_sceneManager._scene->dispatch();
- //TODO: Figure out purpose of the given list
- //_globals->_regions.forEach(SceneHandler::handleListener);
+ // Not actually used
+ //_eventListeners.forEach(SceneHandler::handleListener);
+ // Handle pending eents
Event event;
while (_globals->_events.getEvent(event))
process(event);
@@ -3620,7 +3571,6 @@ void SceneHandler::dispatchObject(EventHandler *obj) {
}
void SceneHandler::saveListener(Serializer &ser) {
- warning("TODO: SceneHandler::saveListener");
}
} // End of namespace tSage
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 92907addbc..b86e2f63fe 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -33,7 +33,6 @@
#include "tsage/graphics.h"
#include "tsage/resources.h"
#include "tsage/saveload.h"
-#include "tsage/sound.h"
namespace tSage {
@@ -719,74 +718,6 @@ public:
/*--------------------------------------------------------------------------*/
-class GameSoundHandler {
-public:
- void proc1() {
- warning("TODO: GameSoundHandler::proc1");
- }
- void proc5(int v) {
- warning("TODO: GameSoundHandler::proc5");
- }
- void proc11(int v1, int v2, int v3, int v4) {
- warning("TODO: GameSoundHandler::proc11");
- }
- int proc12() {
- // TODO
- return -1;
- }
- void proc2(int v) {
- // TODO
- }
- int proc3() {
- return 0;
- }
- void setVolume(int volume) {
- warning("TODO GameSoundHandler::setVolume");
- }
- void startSound(int soundNum) {
- warning("TODO GameSoundHandler::startSound");
- }
-};
-
-class SoundHandler : public EventHandler {
-public:
- GameSoundHandler _sound;
- Action *_action;
- int _field280;
-public:
- SoundHandler();
- ~SoundHandler();
-
- void startSound(int soundNum, Action *action = NULL, int volume = 127);
- void proc1(Action *action) {
- proc11(0, 5, 10, 1, action);
- }
- void proc2(int v) {
- warning("TODO: SoundHandler::proc2");
- }
- void proc3() {
- warning("TODO: SoundHandler::proc5");
- }
- void proc4() {
- _sound.proc1();
- }
- void proc5(int v) {
- _sound.proc5(v);
- }
- void proc11(int v1, int v2, int v3, int v4, Action *action) {
- if (action)
- _action = action;
-
- _sound.proc11(v1, v2, v3, v4);
- }
- void setVolume(int volume) { _sound.setVolume(volume); }
-
- virtual Common::String getClassName() { return "SoundHandler"; }
- virtual void dispatch();
-};
-
-/*--------------------------------------------------------------------------*/
-
class SceneItemList : public SynchronizedList<SceneItem *> {
public:
void addItems(SceneItem *first, ...);
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index 5288c98b72..9277fd429a 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -63,7 +63,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
if (argc < 2) {
DebugPrintf("Usage: %s <scene number> [prior scene #]\n", argv[0]);
return true;
- }
+ }
if (argc == 3)
_globals->_sceneManager._sceneNumber = strToInt(argv[2]);
@@ -222,7 +222,7 @@ bool Debugger::Cmd_ListObjects(int argc, const char **argv) {
DebugPrintf("Usage: %s\n", argv[0]);
return true;
}
-
+
DebugPrintf("Available objects for this game are:\n");
DebugPrintf("0 - Stunner\n");
DebugPrintf("1 - Scanner\n");
@@ -393,7 +393,7 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
// Lock the background surface for access
Graphics::Surface destSurface = _globals->_sceneManager._scene->_backSurface.lockSurface();
-
+
// Iterate through the scene items
SynchronizedList<SceneItem *>::iterator i;
for (i = _globals->_sceneItems.reverse_begin(); i != _globals->_sceneItems.end(); --i, ++colIndex) {
@@ -418,7 +418,7 @@ bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
LineSliceSet set = r.getLineSlices(y);
for (uint p = 0; p < set.items.size(); ++p)
- destSurface.hLine(set.items[p].xs - sceneBounds.left, y - sceneBounds.top,
+ destSurface.hLine(set.items[p].xs - sceneBounds.left, y - sceneBounds.top,
set.items[p].xe - sceneBounds.left - 1, colIndex);
}
}
diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
index fb97e40449..f9ced562c2 100644
--- a/engines/tsage/detection_tables.h
+++ b/engines/tsage/detection_tables.h
@@ -24,7 +24,7 @@ namespace tSage {
static const tSageGameDescription gameDescriptions[] = {
- // Ringworld CD and First Wave versions
+ // Ringworld English CD and First Wave versions
{
{
"ring",
@@ -32,8 +32,22 @@ static const tSageGameDescription gameDescriptions[] = {
AD_ENTRY1s("ring.rlb", "466f0e6492d9d0f34d35c5cd088de90f", 37847618),
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
- Common::GUIO_NONE
+ ADGF_UNSTABLE,
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
+ },
+ GType_Ringworld,
+ GF_CD | GF_ALT_REGIONS
+ },
+ // Ringworld Spanish CD
+ {
+ {
+ "ring",
+ "CD",
+ AD_ENTRY1s("ring.rlb", "cb8bba91b30cd172712371d7123bd763", 7427980),
+ Common::ES_ESP,
+ Common::kPlatformPC,
+ ADGF_UNSTABLE,
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
},
GType_Ringworld,
GF_CD | GF_ALT_REGIONS
@@ -46,8 +60,8 @@ static const tSageGameDescription gameDescriptions[] = {
AD_ENTRY1s("ring.rlb", "7b7f0c5b37b58fa5ec06ebb2ca0d0d9d", 8438770),
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
- Common::GUIO_NONE
+ ADGF_UNSTABLE,
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
},
GType_Ringworld,
GF_FLOPPY
@@ -61,27 +75,27 @@ static const tSageGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DEMO,
- Common::GUIO_NONE
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
},
GType_Ringworld,
GF_FLOPPY | GF_DEMO
},
-#if 0
- // FIXME: Compute new MD5s based on 5000 bytes instead of 0 (unlimited)
+
// Ringworld English Floppy Demo #2 version
{
{
"ring",
"Floppy Demo",
- AD_ENTRY1s("demoring.rlb", "9ecf48e088a0d475778fab480b3dbdd0", 832206),
+ AD_ENTRY1s("demoring.rlb", "64050e1806203b15bb03876140eb4f56", 832206),
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DEMO,
- Common::GUIO_NONE
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
},
GType_Ringworld,
GF_FLOPPY | GF_DEMO | GF_ALT_REGIONS
},
+#if 0
// FIXME: Compute new MD5s based on 5000 bytes instead of 0 (unlimited)
// Blue Force floppy
{
@@ -91,8 +105,8 @@ static const tSageGameDescription gameDescriptions[] = {
AD_ENTRY1s("blue.rlb", "17c3993415e8a2cf93040eef7e88ec93", 1156508),
Common::EN_ANY,
Common::kPlatformPC,
- ADGF_NO_FLAGS,
- Common::GUIO_NONE
+ ADGF_UNSTABLE,
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
},
GType_BlueForce,
GF_FLOPPY
@@ -107,7 +121,7 @@ static const tSageGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- Common::GUIO_NONE
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
},
GType_BlueForce,
GF_FLOPPY
@@ -121,7 +135,7 @@ static const tSageGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformPC,
ADGF_NO_FLAGS,
- Common::GUIO_NONE
+ Common::GUIO_NOSPEECH | Common::GUIO_NOSFX
},
GType_BlueForce,
GF_CD
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index c1bd1d027f..d315ce092b 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -43,7 +43,7 @@ MessageDialog::MessageDialog(const Common::String &message, const Common::String
const Common::String &btn2Message) : GfxDialog() {
// Set up the message
addElements(&_msg, &_btn1, NULL);
-
+
_msg.set(message, 200, ALIGN_LEFT);
_msg._bounds.moveTo(0, 0);
_defaultButton = &_btn1;
@@ -243,7 +243,7 @@ void RightClickDialog::execute() {
// Dialog event handler loop
_gfxManager.activate();
- while (!_vm->getEventManager()->shouldQuit() && (_selectedAction == -1)) {
+ while (!_vm->shouldQuit() && (_selectedAction == -1)) {
Event evt;
while (_globals->_events.getEvent(evt, EVENT_MOUSE_MOVE | EVENT_BUTTON_DOWN)) {
evt.mousePos.x -= _bounds.left;
@@ -465,14 +465,14 @@ void InventoryDialog::execute() {
bool lookFlag = false;
_gfxManager.activate();
- while (!_vm->getEventManager()->shouldQuit()) {
+ while (!_vm->shouldQuit()) {
// Get events
Event event;
- while (!_globals->_events.getEvent(event) && !_vm->getEventManager()->shouldQuit()) {
+ while (!_globals->_events.getEvent(event) && !_vm->shouldQuit()) {
g_system->delayMillis(10);
g_system->updateScreen();
}
- if (_vm->getEventManager()->shouldQuit())
+ if (_vm->shouldQuit())
break;
hiliteObj = NULL;
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index 9df2a7ccd6..010117ec78 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -48,6 +48,7 @@ bool EventsClass::pollEvent() {
_priorFrameTime = milli;
++_frameNumber;
+ // Update screen
g_system->updateScreen();
}
@@ -77,7 +78,7 @@ bool EventsClass::pollEvent() {
void EventsClass::waitForPress(int eventMask) {
Event evt;
- while (!_vm->getEventManager()->shouldQuit() && !getEvent(evt, eventMask))
+ while (!_vm->shouldQuit() && !getEvent(evt, eventMask))
g_system->delayMillis(10);
}
@@ -85,7 +86,7 @@ void EventsClass::waitForPress(int eventMask) {
* Standard event retrieval, which only returns keyboard and mouse clicks
*/
bool EventsClass::getEvent(Event &evt, int eventMask) {
- while (pollEvent() && !_vm->getEventManager()->shouldQuit()) {
+ while (pollEvent() && !_vm->shouldQuit()) {
evt.handled = false;
evt.eventType = EVENT_NONE;
evt.mousePos = _event.mouse;
@@ -280,7 +281,7 @@ void EventsClass::hideCursor() {
setCursor(CURSOR_NONE);
}
-bool EventsClass::isCursorVisible() const {
+bool EventsClass::isCursorVisible() const {
return !_globals->getFlag(122);
}
@@ -307,7 +308,7 @@ void EventsClass::delay(int numFrames) {
void EventsClass::listenerSynchronize(Serializer &s) {
s.syncAsUint32LE(_frameNumber);
s.syncAsUint32LE(_prevDelayFrame);
-
+
if (s.getVersion() >= 5) {
s.syncAsSint16LE(_currentCursor);
s.syncAsSint16LE(_lastCursor);
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index a13455d378..e0fbd88745 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -37,6 +37,7 @@ enum EventType {EVENT_NONE = 0, EVENT_BUTTON_DOWN = 1, EVENT_BUTTON_UP = 2, EVEN
enum ButtonShiftFlags {BTNSHIFT_LEFT = 0, BTNSHIFT_RIGHT = 3, BTNSHIFT_MIDDLE = 4};
// Intrinisc game delay between execution frames. This runs at 60Hz
+#define GAME_FRAME_RATE 60
#define GAME_FRAME_TIME (1000 / 60)
class GfxManager;
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 863f1458b1..34b26ec311 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -94,8 +94,8 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
_sceneObjects_queue.push_front(_sceneObjects);
_prevSceneOffset = Common::Point(-1, -1);
- _sceneListeners.push_back(&_soundHandler);
- _sceneListeners.push_back(&_sequenceManager._soundHandler);
+ _sounds.push_back(&_soundHandler);
+ _sounds.push_back(&_sequenceManager._soundHandler);
_scrollFollower = NULL;
_inventory = NULL;
@@ -117,9 +117,9 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
}
Globals::~Globals() {
- _globals = NULL;
delete _inventory;
delete _game;
+ _globals = NULL;
}
void Globals::reset() {
@@ -140,7 +140,7 @@ void Globals::synchronize(Serializer &s) {
s.syncAsSint32LE(_gfxColors.foreground);
s.syncAsSint32LE(_fontColors.background);
s.syncAsSint32LE(_fontColors.foreground);
-
+
if (s.getVersion() >= 4) {
s.syncAsByte(_unkColor1);
s.syncAsByte(_unkColor2);
@@ -148,7 +148,7 @@ void Globals::synchronize(Serializer &s) {
}
s.syncAsSint16LE(_dialogCenter.x); s.syncAsSint16LE(_dialogCenter.y);
- _sceneListeners.synchronize(s);
+ _sounds.synchronize(s);
for (int i = 0; i < 256; ++i)
s.syncAsByte(_flags[i]);
@@ -158,4 +158,13 @@ void Globals::synchronize(Serializer &s) {
s.syncAsSint32LE(_stripNum);
}
+void Globals::dispatchSound(ASound *obj) {
+ obj->dispatch();
+}
+
+void Globals::dispatchSounds() {
+ Common::for_each(_sounds.begin(), _sounds.end(), Globals::dispatchSound);
+}
+
+
} // end of namespace tSage
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 8212387ed1..7cfec718e2 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -28,11 +28,14 @@
#include "tsage/dialogs.h"
#include "tsage/scenes.h"
#include "tsage/events.h"
+#include "tsage/sound.h"
#include "tsage/saveload.h"
namespace tSage {
class Globals : public SavedObject {
+private:
+ static void dispatchSound(ASound *obj);
public:
GfxSurface _screenSurface;
GfxManager _gfxManagerInstance;
@@ -55,10 +58,10 @@ public:
SoundManager _soundManager;
Common::Point _dialogCenter;
WalkRegions _walkRegions;
- SynchronizedList<EventHandler *> _sceneListeners;
+ SynchronizedList<ASound *> _sounds;
bool _flags[256];
Player _player;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
InvObjectList *_inventory;
Region _paneRegions[2];
int _paneRefreshFlag[2];
@@ -90,6 +93,7 @@ public:
GfxManager &gfxManager() { return **_gfxManagers.begin(); }
virtual Common::String getClassName() { return "Globals"; }
virtual void synchronize(Serializer &s);
+ void dispatchSounds();
};
extern Globals *_globals;
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 25dc897ecd..87ffdf4494 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -326,7 +326,7 @@ void GfxSurface::synchronize(Serializer &s) {
s.syncAsSint16LE(zero);
}
} else {
- int w, h;
+ int w = 0, h = 0;
s.syncAsSint16LE(w);
s.syncAsSint16LE(h);
@@ -408,7 +408,7 @@ bool GfxSurface::displayText(const Common::String &msg, const Common::Point &pt)
// Write for a mouse or keypress
Event event;
- while (!_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !_vm->getEventManager()->shouldQuit())
+ while (!_globals->_events.getEvent(event, EVENT_BUTTON_DOWN | EVENT_KEYPRESS) && !_vm->shouldQuit())
;
// Restore the display area
@@ -718,7 +718,7 @@ bool GfxElement::focusedEvent(Event &event) {
int xOffset = mousePos.x - _globals->_events._mousePos.x;
int yOffset = mousePos.y - _globals->_events._mousePos.y;
- while (event.eventType != EVENT_BUTTON_UP && !_vm->getEventManager()->shouldQuit()) {
+ while (event.eventType != EVENT_BUTTON_UP && !_vm->shouldQuit()) {
g_system->delayMillis(10);
if (_bounds.contains(mousePos)) {
@@ -846,7 +846,7 @@ void GfxButton::setDefaults() {
gfxManager._font.getStringBounds(_message.c_str(), tempRect, 240);
tempRect.right = ((tempRect.right + 15) / 16) * 16;
- // Set the button bounds
+ // Set the button bounds
tempRect.collapse(-_globals->_gfxEdgeAdjust, -_globals->_gfxEdgeAdjust);
if (_vm->getFeatures() & GF_CD)
--tempRect.top;
@@ -866,7 +866,7 @@ void GfxButton::draw() {
// Set the font and color
gfxManager._font.setFontNumber(_fontNumber);
- //
+ //
gfxManager._font._colors.foreground = this->_unkColor1;
gfxManager._font._colors2.background = this->_unkColor2;
gfxManager._font._colors2.foreground = this->_unkColor3;
@@ -895,7 +895,7 @@ bool GfxButton::process(Event &event) {
case EVENT_KEYPRESS:
if (!event.handled && (event.kbd.keycode == _keycode)) {
- // TODO: Ensure momentary click operation displays
+ // Highlight the button momentarily
highlight();
g_system->delayMillis(20);
highlight();
@@ -1029,7 +1029,7 @@ GfxButton *GfxDialog::execute(GfxButton *defaultButton) {
GfxButton *selectedButton = NULL;
bool breakFlag = false;
- while (!_vm->getEventManager()->shouldQuit() && !breakFlag) {
+ while (!_vm->shouldQuit() && !breakFlag) {
Event event;
while (_globals->_events.getEvent(event) && !breakFlag) {
// Adjust mouse positions to be relative within the dialog
diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp
index 676d319ba9..6d2c6b5837 100644
--- a/engines/tsage/resources.cpp
+++ b/engines/tsage/resources.cpp
@@ -66,7 +66,9 @@ uint16 MemoryManager::allocate(uint32 size) {
byte *MemoryManager::allocate2(uint32 size) {
uint32 idx = allocate(size);
- return lock(idx);
+ byte *result = lock(idx);
+ Common::set_to(result, result + size, 0);
+ return result;
}
byte *MemoryManager::lock(uint32 handle) {
@@ -235,8 +237,13 @@ byte *TLib::getResource(uint16 id, bool suppressErrors) {
uint16 ctrCurrent = 0x102, ctrMax = 0x200;
uint16 word_48050 = 0, currentToken = 0, word_48054 =0;
byte byte_49068 = 0, byte_49069 = 0;
- DecodeReference table[0x1000];
- for (int i = 0; i < 0x1000; ++i) {
+
+ const uint tableSize = 0x1000;
+ DecodeReference *table = (DecodeReference *)malloc(tableSize * sizeof(DecodeReference));
+ if (!table)
+ error("[TLib::getResource] Cannot allocate table buffer");
+
+ for (uint i = 0; i < tableSize; ++i) {
table[i].vByte = table[i].vWord = 0;
}
Common::Stack<uint16> tokenList;
@@ -300,6 +307,8 @@ byte *TLib::getResource(uint16 id, bool suppressErrors) {
}
}
+ free(table);
+
assert(bytesWritten == re->uncompressedSize);
delete compStream;
return dataOut;
diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp
index de8dbf8c12..b24fec98f9 100644
--- a/engines/tsage/ringworld_demo.cpp
+++ b/engines/tsage/ringworld_demo.cpp
@@ -30,7 +30,7 @@ namespace tSage {
void RingworldDemoGame::start() {
// Start the demo's single scene
_globals->_sceneManager.changeScene(1);
-
+
_globals->_events.setCursor(CURSOR_NONE);
}
@@ -72,6 +72,7 @@ void RingworldDemoGame::processEvent(Event &event) {
ConfigDialog *dlg = new ConfigDialog();
dlg->runModal();
delete dlg;
+ _globals->_soundManager.syncSounds();
_globals->_events.setCursorFromFlag();
break;
}
@@ -101,19 +102,19 @@ void RingworldDemoScene::postInit(SceneObjectList *OwnerList) {
}
void RingworldDemoScene::signal() {
- _soundHandler.startSound(4);
+ _soundHandler.play(4);
_actor1.postInit();
_actor2.postInit();
_actor3.postInit();
_actor4.postInit();
_actor5.postInit();
_actor6.postInit();
-
+
setAction(&_sequenceManager, this, 22, &_actor1, &_actor2, &_actor3, &_actor4, &_actor5, &_actor6, NULL);
}
void RingworldDemoScene::process(Event &event) {
-
+
}
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_demo.h b/engines/tsage/ringworld_demo.h
index 7492c1e871..3e7431e107 100644
--- a/engines/tsage/ringworld_demo.h
+++ b/engines/tsage/ringworld_demo.h
@@ -28,6 +28,7 @@
#include "tsage/core.h"
#include "tsage/scenes.h"
#include "tsage/globals.h"
+#include "tsage/sound.h"
namespace tSage {
@@ -46,7 +47,7 @@ public:
SequenceManager _sequenceManager;
SceneObject _actor1, _actor2, _actor3;
SceneObject _actor4, _actor5, _actor6;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void process(Event &event);
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 95c9da9fe7..070d8afd25 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -268,7 +268,7 @@ void SceneArea::setup(int resNum, int rlbNum, int subNum, int actionId) {
}
void SceneArea::draw2() {
- _surface.draw(Common::Point(_bounds.left, _bounds.top));
+ _surface.draw(Common::Point(_bounds.left, _bounds.top));
}
void SceneArea::display() {
@@ -296,7 +296,7 @@ void SceneArea::draw(bool flag) {
void SceneArea::wait() {
// Wait until a mouse or keypress
Event event;
- while (!_vm->getEventManager()->shouldQuit() && !_globals->_events.getEvent(event)) {
+ while (!_vm->shouldQuit() && !_globals->_events.getEvent(event)) {
g_system->updateScreen();
g_system->delayMillis(10);
}
@@ -619,7 +619,7 @@ void SpeakerSKL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(203, 120));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(7013);
_object2.setStrip2(1);
@@ -651,7 +651,7 @@ void SpeakerQL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(128, 146));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2612);
_object2.setStrip2(1);
@@ -667,7 +667,6 @@ void SpeakerQL::setText(const Common::String &msg) {
/*--------------------------------------------------------------------------*/
SpeakerSR::SpeakerSR() {
- // TODO: check initialization of object3
_speakerName = "SR";
_newSceneNumber = 2811;
_textPos = Common::Point(10, 30);
@@ -684,7 +683,7 @@ void SpeakerSR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(224, 198));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2813);
_object2.setStrip2(1);
@@ -725,7 +724,7 @@ void SpeakerSL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(95, 198));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2812);
_object2.setStrip2(1);
@@ -757,7 +756,7 @@ void SpeakerQR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(191, 146));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2613);
_object2.setStrip2(1);
@@ -789,7 +788,7 @@ void SpeakerQU::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(116, 120));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(7021);
_object2.setStrip2(1);
@@ -818,7 +817,7 @@ void SpeakerCR::setText(const Common::String &msg) {
_object1.fixPriority(255);
_object1.setPosition(Common::Point(219, 168));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(9011);
_object2.setStrip2(1);
@@ -847,7 +846,7 @@ void SpeakerMR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(220, 143));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2713);
_object2.setStrip2(1);
@@ -879,7 +878,7 @@ void SpeakerSAL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(185, 200));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2853);
_object2.setStrip2(1);
@@ -910,7 +909,7 @@ void SpeakerML::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(99, 143));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(2712);
_object2.setStrip2(1);
@@ -941,7 +940,7 @@ void SpeakerCHFL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(205, 116));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4113);
_object2.setStrip2(1);
@@ -972,7 +971,7 @@ void SpeakerCHFR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(103, 116));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4112);
_object2.setStrip2(1);
@@ -1003,7 +1002,7 @@ void SpeakerPL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(107, 117));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4062);
_object2.setStrip2(1);
@@ -1048,7 +1047,7 @@ void SpeakerPR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(212, 117));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4063);
_object2.setStrip2(2);
@@ -1093,7 +1092,7 @@ void SpeakerCDR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(208, 97));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4163);
_object2.setStrip2(2);
@@ -1124,7 +1123,7 @@ void SpeakerCDL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(112, 97));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(4162);
_object2.setStrip2(2);
@@ -1155,7 +1154,7 @@ void SpeakerFLL::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(216, 129));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(5223);
_object2.setStrip2(1);
@@ -1186,7 +1185,7 @@ void SpeakerBatR::setText(const Common::String &msg) {
_object1._frame = 1;
_object1.setPosition(Common::Point(137, 122));
_object1.animate(ANIM_MODE_7, 0, NULL);
-
+
_object2.postInit(&_objectList);
_object2.setVisage(5361);
_object2.setStrip2(1);
@@ -1334,9 +1333,20 @@ void RingworldGame::start() {
RING_INVENTORY._scanner._sceneNumber = 1;
RING_INVENTORY._ring._sceneNumber = 1;
+ int slot = -1;
+
+ if (ConfMan.hasKey("save_slot")) {
+ slot = ConfMan.getInt("save_slot");
+ Common::String file = _vm->generateSaveName(slot);
+ Common::InSaveFile *in = _vm->_system->getSavefileManager()->openForLoading(file);
+ if (in)
+ delete in;
+ else
+ slot = -1;
+ }
- if (ConfMan.hasKey("save_slot"))
- _globals->_sceneHandler._loadGameSlot = ConfMan.getInt("save_slot");
+ if (slot >= 0)
+ _globals->_sceneHandler._loadGameSlot = slot;
else
// Switch to the title screen
_globals->_sceneManager.setNewScene(1000);
@@ -1346,7 +1356,7 @@ void RingworldGame::start() {
void RingworldGame::restart() {
_globals->_scenePalette.clearListeners();
- _globals->_soundHandler.proc3();
+ _globals->_soundHandler.stop();
// Reset the flags
_globals->reset();
@@ -1441,6 +1451,7 @@ void RingworldGame::processEvent(Event &event) {
ConfigDialog *dlg = new ConfigDialog();
dlg->runModal();
delete dlg;
+ _globals->_soundManager.syncSounds();
_globals->_events.setCursorFromFlag();
break;
}
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp
index 6960788db3..8299a05967 100644
--- a/engines/tsage/ringworld_scenes1.cpp
+++ b/engines/tsage/ringworld_scenes1.cpp
@@ -98,7 +98,7 @@ void Scene10::Action1::signal() {
scene->_object4.animate(ANIM_MODE_6, this);
break;
case 10:
- _globals->_soundHandler.proc1(this);
+ _globals->_soundHandler.fadeOut(this);
break;
case 11:
_globals->_scenePalette.clearListeners();
@@ -185,7 +185,7 @@ void Scene10::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
setAction(&_action1);
- _globals->_soundHandler.startSound(5);
+ _globals->_soundHandler.play(5);
}
void Scene10::stripCallback(int v) {
@@ -232,7 +232,7 @@ void Scene15::Action1::signal() {
Common::Point pt(160, 100);
NpcMover *mover = new NpcMover();
scene->_object1.addMover(mover, &pt, this);
- scene->_soundHandler.startSound(7);
+ scene->_soundHandler.play(7);
break;
}
case 3:
@@ -256,7 +256,7 @@ void Scene15::postInit(SceneObjectList *OwnerList) {
loadScene(15);
Scene::postInit();
setZoomPercents(0, 100, 200, 100);
- _globals->_soundHandler.startSound(6);
+ _globals->_soundHandler.play(6);
setAction(&_action1);
}
@@ -276,7 +276,7 @@ void Scene20::Action1::signal() {
scene->_stripManager.start(20, this);
break;
case 2:
- _globals->_soundHandler.proc1(this);
+ _globals->_soundHandler.fadeOut(this);
break;
case 3:
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
@@ -341,8 +341,8 @@ void Scene20::Action2::signal() {
break;
}
case 8:
- scene->_sound.proc4();
- scene->_sound.proc1(this);
+ scene->_sound.release();
+ _globals->_soundHandler.fadeOut(this);
break;
case 9:
SceneItem::display(0, 0, LIST_END);
@@ -400,8 +400,8 @@ void Scene20::Action3::signal() {
break;
}
case 6:
- scene->_sound.startSound(60, this, 127);
- _globals->_soundHandler.proc4();
+ scene->_sound.play(60, this, 127);
+ _globals->_soundHandler.release();
break;
case 7:
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
@@ -450,7 +450,7 @@ void Scene20::Action4::signal() {
break;
}
case 4: {
- scene->_sound.startSound(28);
+ scene->_sound.play(28);
scene->_sceneObject4.postInit();
scene->_sceneObject4.setVisage(21);
scene->_sceneObject4.setStrip(3);
@@ -463,7 +463,7 @@ void Scene20::Action4::signal() {
break;
}
case 5: {
- scene->_sound.startSound(42);
+ scene->_sound.play(42);
scene->_sceneObject4.remove();
scene->_SceneObjectExt.setVisage(21);
scene->_SceneObjectExt.setStrip(1);
@@ -487,7 +487,7 @@ void Scene20::Action4::signal() {
break;
}
case 6: {
- scene->_sound.startSound(42);
+ scene->_sound.play(42);
scene->_SceneObjectExt.setStrip(2);
scene->_SceneObjectExt.animate(ANIM_MODE_2, NULL);
@@ -506,7 +506,7 @@ void Scene20::Action4::signal() {
case 7:
_globals->_player.setStrip(2);
_globals->_player.animate(ANIM_MODE_2, NULL);
- scene->_sound.startSound(77, this, 127);
+ scene->_sound.play(77, this, 127);
break;
case 8:
_globals->_game->endGame(20, 0);
@@ -549,15 +549,15 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_SceneObjectExt._moveDiff = Common::Point(10, 10);
_sceneObject3._moveDiff = Common::Point(10, 10);
- _globals->_soundHandler.startSound(20);
- _sound.startSound(21);
- _sound.proc5(1);
+ _globals->_soundHandler.play(20);
+ _sound.play(21);
+ _sound.holdAt(true);
setAction(&_action2);
_sceneBounds = Rect(320, 0, 640, 200);
} else if (_globals->_sceneManager._previousScene == 60) {
// Evasion
- _sound.startSound(30);
+ _sound.play(30);
_globals->_player.postInit();
_globals->_player.setVisage(20);
_globals->_player.setPosition(Common::Point(588, 79));
@@ -605,7 +605,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_speakerGameText.setTextPos(Common::Point(350, 20));
_speakerGameText._textWidth = 260;
- _globals->_soundHandler.startSound(8);
+ _globals->_soundHandler.play(8);
_sceneBounds = Rect(320, 0, 640, 200);
}
@@ -669,7 +669,7 @@ void Scene30::BeamAction::signal() {
case 2:
// Hide the beam and lower the player's hand
- scene->_sound.startSound(10, NULL, 127);
+ scene->_sound.play(10, NULL, 127);
_globals->_player.animate(ANIM_MODE_6, this);
scene->_beam.remove();
break;
@@ -693,14 +693,14 @@ void Scene30::BeamAction::signal() {
case 4:
// Open the door
- scene->_sound.startSound(11, NULL, 127);
+ scene->_sound.play(11, NULL, 127);
scene->_door.animate(ANIM_MODE_5, this);
break;
case 5:
// Run the Kzin's talk sequence
- scene->_sound.startSound(13, NULL, 127);
- _globals->_soundHandler.startSound(12, NULL, 127);
+ scene->_sound.play(13, NULL, 127);
+ _globals->_soundHandler.play(12, NULL, 127);
scene->_stripManager.start((scene->_sceneMode == 0) ? 30 : 37, this);
break;
@@ -732,7 +732,7 @@ void Scene30::KzinAction::signal() {
setDelay(1200);
break;
case 1:
- _globals->_soundHandler.proc2(0);
+ _globals->_soundHandler.fadeOut(NULL);
_globals->_player.disableControl();
setAction(&scene->_sequenceManager, _globals->_sceneManager._scene, 31, &scene->_kzin, &scene->_door, NULL);
break;
@@ -772,12 +772,12 @@ void Scene30::RingAction::signal() {
}
case 3:
- scene->_sound.startSound(11, NULL, 127);
+ scene->_sound.play(11, NULL, 127);
scene->_door.animate(ANIM_MODE_6, this);
break;
case 4: {
- scene->_sound.startSound(13, NULL, 127);
+ scene->_sound.play(13, NULL, 127);
NpcMover *kzinMover = new NpcMover();
Common::Point pt(354, 5);
scene->_kzin.addMover(kzinMover, &pt, this);
@@ -955,7 +955,7 @@ void Scene40::Action1::signal() {
scene->_doorway.setVisage(46);
scene->_doorway.setPosition(Common::Point(305, 61));
scene->_doorway.animate(ANIM_MODE_5, this);
- scene->_soundHandler.startSound(25);
+ scene->_soundHandler.play(25);
break;
case 3:
scene->_doorway.hide();
@@ -976,7 +976,7 @@ void Scene40::Action1::signal() {
scene->_assassin.setFrame(1);
scene->_assassin.setPosition(Common::Point(13, 171));
scene->_assassin.animate(ANIM_MODE_5, this);
- scene->_soundHandler.startSound(25);
+ scene->_soundHandler.play(25);
break;
case 5:
scene->_doorway.show();
@@ -1011,7 +1011,7 @@ void Scene40::Action1::signal() {
break;
}
case 10: {
- scene->_soundHandler.startSound(27);
+ scene->_soundHandler.play(27);
Common::Point pt(223, 184);
NpcMover *mover = new NpcMover();
scene->_dyingKzin.addMover(mover, &pt, this);
@@ -1024,7 +1024,7 @@ void Scene40::Action1::signal() {
break;
}
case 12: {
- _globals->_soundHandler.startSound(26);
+ _globals->_soundHandler.play(26);
_globals->_player._uiEnabled = true;
scene->_assassin.setVisage(42);
scene->_assassin.setPosition(Common::Point(4, 191));
@@ -1043,7 +1043,7 @@ void Scene40::Action1::signal() {
scene->_assassin.setStrip(1);
scene->_assassin.setFrame(1);
scene->_assassin.animate(ANIM_MODE_5, this);
- scene->_soundHandler.startSound(28);
+ scene->_soundHandler.play(28);
break;
case 15:
_globals->_player.disableControl();
@@ -1057,7 +1057,7 @@ void Scene40::Action1::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 16:
- _globals->_soundHandler.startSound(77, this);
+ _globals->_soundHandler.play(77, this);
break;
case 17:
_globals->_game->endGame(40, 20);
@@ -1083,7 +1083,7 @@ void Scene40::Action2::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 2: {
- scene->_soundHandler.startSound(28);
+ scene->_soundHandler.play(28);
scene->_doorway.postInit();
scene->_doorway.setVisage(16);
scene->_doorway.setStrip2(6);
@@ -1103,7 +1103,7 @@ void Scene40::Action2::signal() {
scene->_assassin.setVisage(44);
scene->_assassin._frame = 1;
scene->_assassin.animate(ANIM_MODE_5, this);
- scene->_soundHandler.startSound(29);
+ scene->_soundHandler.play(29);
RING_INVENTORY._infoDisk._sceneNumber = 40;
break;
case 4:
@@ -1234,11 +1234,11 @@ void Scene40::Action6::signal() {
scene->_doorway.setVisage(46);
scene->_doorway.setPosition(Common::Point(305, 61));
scene->_doorway.animate(ANIM_MODE_5, this);
- scene->_soundHandler.startSound(25);
+ scene->_soundHandler.play(25);
break;
}
case 1:
- scene->_soundHandler.startSound(28);
+ scene->_soundHandler.play(28);
scene->_doorway.setPosition(Common::Point(148, 74));
scene->_doorway.setFrame(1);
scene->_doorway.setStrip(2);
@@ -1255,8 +1255,7 @@ void Scene40::Action7::signal() {
switch (_actionIndex++) {
case 0:
- // TODO: check if it's rand(500) or rand(499)+500
- setDelay(_globals->_randomSource.getRandomNumber(500));
+ setDelay(_globals->_randomSource.getRandomNumber(499) + 500);
break;
case 1:
scene->_object7.postInit();
@@ -1270,7 +1269,7 @@ void Scene40::Action7::signal() {
scene->_object7.setFrame(15);
}
scene->_object7.animate(ANIM_MODE_5, this);
- scene->_soundHandler.startSound(25);
+ scene->_soundHandler.play(25);
break;
case 2:
scene->_object7.remove();
@@ -1322,7 +1321,7 @@ void Scene40::Action8::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 3:
- _globals->_soundHandler.startSound(77, this);
+ _globals->_soundHandler.play(77, this);
break;
case 4:
_globals->_game->endGame(40, 45);
@@ -1480,7 +1479,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_globals->_player.disableControl();
if (_globals->_sceneManager._previousScene == 20) {
- _globals->_soundHandler.startSound(24);
+ _globals->_soundHandler.play(24);
_globals->_player.setVisage(43);
_object1.postInit();
@@ -1872,7 +1871,7 @@ void Scene60::Action1::signal() {
scene->_floppyDrive.setPosition(Common::Point(136, 65));
scene->_floppyDrive.animate(ANIM_MODE_5, this);
- scene->_soundHandler1.startSound(35);
+ scene->_soundHandler1.play(35);
break;
case 2:
scene->_redLights.postInit();
@@ -1893,13 +1892,13 @@ void Scene60::Action1::signal() {
scene->_message._numFrames = 5;
_globals->_sceneItems.push_front(&scene->_message);
- scene->_soundHandler2.startSound(38);
+ scene->_soundHandler2.play(38);
}
_globals->_events.setCursor(CURSOR_USE);
break;
case 3:
- scene->_soundHandler2.startSound(37);
+ scene->_soundHandler2.play(37);
scene->loadScene(65);
scene->_message.remove();
@@ -1968,8 +1967,8 @@ void Scene60::Action1::signal() {
scene->_floppyDrive.setFrame(scene->_floppyDrive.getFrameCount());
scene->_floppyDrive.animate(ANIM_MODE_6, this);
- scene->_soundHandler1.startSound(35);
- scene->_soundHandler3.proc3();
+ scene->_soundHandler1.play(35);
+ scene->_soundHandler3.stop();
scene->_masterButton.setFrame(1);
scene->_masterButton._state = 0;
@@ -2019,7 +2018,7 @@ void Scene60::PrevObject::doAction(int action) {
animate(ANIM_MODE_8, 1, NULL);
if (scene->_action1.getActionIndex() > 5) {
- scene->_soundHandler3.startSound(36);
+ scene->_soundHandler3.play(36);
scene->_action1.setActionIndex(scene->_action1.getActionIndex() - 2);
scene->_action1.setDelay(1);
}
@@ -2037,7 +2036,7 @@ void Scene60::NextObject::doAction(int action) {
animate(ANIM_MODE_8, 1, NULL);
if (scene->_action1.getActionIndex() < 8) {
- scene->_soundHandler3.startSound(36);
+ scene->_soundHandler3.play(36);
scene->_action1.setDelay(1);
}
} else {
@@ -2051,7 +2050,7 @@ void Scene60::ExitObject::doAction(int action) {
if (action == CURSOR_LOOK) {
SceneItem::display2(60, 18);
} else if (action == CURSOR_USE) {
- scene->_soundHandler3.startSound(36);
+ scene->_soundHandler3.play(36);
animate(ANIM_MODE_8, 1, NULL);
scene->_nextButton.remove();
scene->_prevButton.remove();
@@ -2132,8 +2131,8 @@ void Scene60::ControlObject::doAction(int action) {
if (_animateMode == ANIM_MODE_NONE)
SceneItem::display2(60, 14);
else if (!scene->_slaveButton._state) {
- _globals->_soundHandler.startSound(40);
- _globals->_soundHandler.proc5(1);
+ _globals->_soundHandler.play(40);
+ _globals->_soundHandler.holdAt(true);
_globals->_sceneManager.changeScene(20);
} else {
scene->_sceneMode = 15;
@@ -2153,14 +2152,14 @@ void Scene60::SlaveObject::doAction(int action) {
if (scene->_masterButton._state)
scene->_sceneMode = 19;
else if (_state) {
- scene->_soundHandler3.proc3();
+ scene->_soundHandler3.stop();
animate(ANIM_MODE_6, NULL);
_globals->clearFlag(102);
_globals->clearFlag(!_globals->_stripNum ? 117 : 120);
_state = 0;
scene->_sceneMode = 9998;
} else {
- scene->_soundHandler3.startSound(39);
+ scene->_soundHandler3.play(39);
_globals->setFlag(102);
_globals->setFlag(!_globals->_stripNum ? 117 : 120);
animate(ANIM_MODE_5, NULL);
@@ -2185,14 +2184,14 @@ void Scene60::MasterObject::doAction(int action) {
else if (scene->_slaveButton._state)
scene->_sceneMode = 20;
else if (_state) {
- scene->_soundHandler3.proc3();
+ scene->_soundHandler3.stop();
animate(ANIM_MODE_6, NULL);
_state = 0;
_globals->clearFlag(103);
_globals->clearFlag(!_globals->_stripNum ? 116 : 119);
scene->_sceneMode = 9998;
} else {
- scene->_soundHandler3.startSound(39);
+ scene->_soundHandler3.play(39);
animate(ANIM_MODE_5, NULL);
_state = 1;
_globals->setFlag(103);
@@ -2347,7 +2346,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_redLights.setPosition(Common::Point(199, 186));
_redLights.animate(ANIM_MODE_8, 0, NULL);
- _soundHandler1.startSound(35);
+ _soundHandler1.play(35);
if (!_globals->getFlag(83)) {
_message.postInit();
@@ -2359,7 +2358,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_message._numFrames = 5;
_globals->_sceneItems.push_front(&_message);
- _soundHandler2.startSound(38);
+ _soundHandler2.play(38);
}
}
} else {
@@ -2382,7 +2381,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_redLights.animate(ANIM_MODE_8, 0, NULL);
_redLights._numFrames = 5;
- _soundHandler1.startSound(35);
+ _soundHandler1.play(35);
if (!_globals->getFlag(83)) {
_message.postInit();
@@ -2394,7 +2393,7 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_message._numFrames = 5;
_globals->_sceneItems.push_front(&_message);
- _soundHandler2.startSound(38);
+ _soundHandler2.play(38);
}
}
}
@@ -2462,7 +2461,7 @@ void Scene90::Action1::signal() {
setDelay(2);
break;
case 5:
- scene->_soundHandler2.startSound(58);
+ scene->_soundHandler2.play(58);
if (scene->_stripManager._field2E8 == 220)
scene->_stripManager.start(91, this, scene);
@@ -2477,7 +2476,7 @@ void Scene90::Action1::signal() {
break;
case 7:
scene->_object2.animate(ANIM_MODE_NONE);
- _globals->_soundHandler.startSound(56);
+ _globals->_soundHandler.play(56);
scene->_object3.animate(ANIM_MODE_5, this);
break;
case 8: {
@@ -2507,8 +2506,8 @@ void Scene90::Action1::signal() {
break;
}
case 11:
- _globals->_soundHandler.startSound(57);
- _globals->_soundHandler.startSound(68);
+ _globals->_soundHandler.play(57);
+ _globals->_soundHandler.play(68);
scene->_object3.animate(ANIM_MODE_6, NULL);
SceneItem::display(90, _globals->getFlag(104) ? 15 : 14,
@@ -2556,8 +2555,8 @@ void Scene90::Object2::doAction(int action) {
scene->_object6.hide();
scene->_sceneMode = 91;
- scene->_soundHandler1.startSound(59);
- scene->_soundHandler1.proc5(1);
+ scene->_soundHandler1.play(59);
+ scene->_soundHandler1.holdAt(true);
scene->setAction(&scene->_sequenceManager, scene, 91, this, &scene->_object6, NULL);
break;
case CURSOR_LOOK:
@@ -2653,9 +2652,9 @@ void Scene90::postInit(SceneObjectList *OwnerList) {
_globals->_sceneItems.push_back(&_object3);
_globals->_player.disableControl();
- _globals->_soundHandler.startSound(55);
- _soundHandler1.startSound(52);
- _soundHandler1.proc5(1);
+ _globals->_soundHandler.play(55);
+ _soundHandler1.play(52);
+ _soundHandler1.holdAt(true);
setAction(&_action1);
@@ -2670,7 +2669,7 @@ void Scene90::signal() {
switch (_sceneMode) {
case 91:
_sceneMode = 92;
- _globals->_soundHandler.startSound(77, this);
+ _globals->_soundHandler.play(77, this);
break;
case 92:
_globals->_scenePalette.clearListeners();
@@ -2713,7 +2712,7 @@ void Scene95::Action1::signal() {
setDelay(60);
break;
case 2: {
- scene->_soundHandler.startSound(66);
+ scene->_soundHandler.play(66);
scene->_object3._numFrames = 5;
scene->_object3.animate(ANIM_MODE_5, NULL);
SceneItem::display(0, 0);
@@ -2728,7 +2727,7 @@ void Scene95::Action1::signal() {
break;
}
case 3: {
- scene->_soundHandler.startSound(21);
+ scene->_soundHandler.play(21);
Common::Point pt1(235, 72);
PlayerMover *mover1 = new PlayerMover();
@@ -2768,7 +2767,7 @@ void Scene95::Action1::signal() {
scene->_object1.setVisage(91);
scene->_object1.setPosition(Common::Point(-22, 220));
- scene->_soundHandler.startSound(21);
+ scene->_soundHandler.play(21);
Common::Point pt1(5, 198);
NpcMover *mover1 = new NpcMover();
@@ -2826,7 +2825,7 @@ void Scene95::postInit(SceneObjectList *OwnerList) {
_object3.setVisage(96);
_object3.setPosition(Common::Point(29, 198));
- _soundHandler.startSound(67);
+ _soundHandler.play(67);
setAction(&_action1);
}
@@ -2890,7 +2889,7 @@ void Scene6100::Action3::signal() {
scene->_sunflower3.hide();
scene->_rocks.hide();
scene->_sceneText.hide();
-
+
_globals->_events.setCursor(CURSOR_WALK);
scene->_stripManager.start(8120, this);
break;
@@ -3000,21 +2999,21 @@ void Scene6100::Action5::dispatch() {
(tempSet.sqrt(zeroSet) < 150.0)) {
switch (scene->_hitCount++) {
case 0:
- scene->_soundHandler.startSound(233);
+ scene->_soundHandler.play(233);
scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
scene->_probe.setAction(&scene->_action1);
break;
case 1:
- scene->_soundHandler.startSound(233);
+ scene->_soundHandler.play(233);
scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
scene->_probe.setAction(&scene->_action2);
break;
case 2:
- scene->_soundHandler.startSound(234);
+ scene->_soundHandler.play(234);
scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
@@ -3106,10 +3105,10 @@ void Scene6100::Object::synchronize(Serializer &s) {
SceneObject::synchronize(s);
// Save the double fields of the FloatSet
- s.syncBytes((byte *)&_floats._float1, sizeof(double));
- s.syncBytes((byte *)&_floats._float2, sizeof(double));
- s.syncBytes((byte *)&_floats._float3, sizeof(double));
- s.syncBytes((byte *)&_floats._float4, sizeof(double));
+ s.syncAsDouble(_floats._float1);
+ s.syncAsDouble(_floats._float2);
+ s.syncAsDouble(_floats._float3);
+ s.syncAsDouble(_floats._float4);
}
/*--------------------------------------------------------------------------*/
@@ -3243,7 +3242,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
if (!_globals->getFlag(76))
_probe.setAction(&_action4);
- _globals->_soundHandler.startSound(231);
+ _globals->_soundHandler.play(231);
}
void Scene6100::remove() {
diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h
index abd765473c..283cf68e07 100644
--- a/engines/tsage/ringworld_scenes1.h
+++ b/engines/tsage/ringworld_scenes1.h
@@ -30,6 +30,7 @@
#include "tsage/core.h"
#include "tsage/scenes.h"
#include "tsage/globals.h"
+#include "tsage/sound.h"
namespace tSage {
@@ -65,7 +66,7 @@ class Scene15 : public Scene {
public:
Action1 _action1;
SceneObject _object1;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL);
};
@@ -97,7 +98,7 @@ public:
Action3 _action3;
Action4 _action4;
SceneObject _sceneObject1, _SceneObjectExt, _sceneObject3, _sceneObject4, _sceneObject5;
- SoundHandler _sound;
+ ASound _sound;
public:
Scene20();
virtual ~Scene20() {}
@@ -143,7 +144,7 @@ class Scene30 : public Scene {
};
public:
- SoundHandler _sound;
+ ASound _sound;
DisplayHotspot _groundHotspot, _wallsHotspot, _courtyardHotspot, _treeHotspot;
BeamObject _beam;
DoorObject _door;
@@ -232,7 +233,7 @@ public:
SpeakerQText _speakerQText;
SpeakerSText _speakerSText;
SpeakerGameText _speakerGameText;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
Action1 _action1;
Action2 _action2;
Action3 _action3;
@@ -271,7 +272,7 @@ class Scene50 : public Scene {
public:
virtual void signal();
};
-
+
/* Objects */
class Object1 : public SceneObject {
public:
@@ -311,7 +312,7 @@ public:
virtual void dispatch();
};
-class Scene60 : public Scene {
+class Scene60 : public Scene {
class Action1 : public Action {
public:
virtual void signal();
@@ -387,9 +388,9 @@ public:
SceneObject _redLights;
Item1 _item1;
Item _item2, _item3, _item4, _item5, _item6;
- SoundHandler _soundHandler1;
- SoundHandler _soundHandler2;
- SoundHandler _soundHandler3;
+ ASound _soundHandler1;
+ ASound _soundHandler2;
+ ASound _soundHandler3;
Scene60();
virtual void postInit(SceneObjectList *OwnerList = NULL);
@@ -423,7 +424,7 @@ public:
DisplayObject _object3, _object4, _object5;
SceneObject _object6;
DisplayHotspot _item1, _item2, _item3;
- SoundHandler _soundHandler1, _soundHandler2;
+ ASound _soundHandler1, _soundHandler2;
Scene90();
@@ -441,7 +442,7 @@ class Scene95 : public Scene {
public:
Action1 _action1;
SceneObject _object1, _object2, _object3;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
Scene95();
virtual void postInit(SceneObjectList *OwnerList);
@@ -505,7 +506,7 @@ public:
Action5 _action5;
GetBoxAction _getBoxAction;
Action7 _action7;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
Speaker _speaker1;
SpeakerQR _speakerQR;
SpeakerSL _speakerSL;
diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp
index 0b4186531d..ba4060548e 100644
--- a/engines/tsage/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld_scenes10.cpp
@@ -151,7 +151,7 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
_sceneHotspot5.setup(69, 36, 121, 272, 9100, 45, 46);
_sceneHotspot6.setup(127, 0, 200, 52, 9100, 47, 48);
- _globals->_soundHandler.startSound(251);
+ _globals->_soundHandler.play(251);
if (_globals->_sceneManager._previousScene == 9150) {
if (_globals->getFlag(20)) {
_globals->_player.disableControl();
@@ -236,7 +236,7 @@ void Scene9150::dispatch() {
} else {
_globals->_player.disableControl();
if (_globals->getFlag(11)) {
- _globals->_soundHandler.startSound(286);
+ _globals->_soundHandler.play(286);
_sceneMode = 9153;
} else {
_sceneMode = 9156;
@@ -270,7 +270,7 @@ void Scene9150::postInit(SceneObjectList *OwnerList) {
_sceneHotspot8.setup(133, 584, 142, 640, 9150, 57, -1);
_sceneHotspot10.setup(83, 304, 103, 323, 9150, 58, 59);
- _globals->_soundHandler.startSound(285);
+ _globals->_soundHandler.play(285);
_globals->_player.disableControl();
if (_globals->getFlag(20)) {
@@ -402,7 +402,8 @@ void Scene9200::postInit(SceneObjectList *OwnerList) {
_object1.animate(ANIM_MODE_2, NULL);
_object1.setPosition(Common::Point(132, 114));
_object1.fixPriority(140);
- _soundHandler.startSound(297);
+ _soundHandler.play(297);
+
_stripManager.addSpeaker(&_speakerQText);
_stripManager.addSpeaker(&_speakerGR);
_stripManager.addSpeaker(&_speakerGText);
@@ -479,7 +480,7 @@ void Scene9300::signal() {
_globals->setFlag(84);
// No break on purpose
case 9303:
- _globals->_soundHandler.startSound(295);
+ _globals->_soundHandler.play(295);
_globals->_sceneManager.changeScene(9350);
break;
case 9302:
@@ -509,7 +510,7 @@ void Scene9300::postInit(SceneObjectList *OwnerList) {
_globals->_player.changeZoom(-1);
_object1.postInit();
_object2.postInit();
- _globals->_soundHandler.startSound(289);
+ _globals->_soundHandler.play(289);
_hotspot1.setup(35, 142, 76, 212, 9300, 0, 1);
_hotspot2.setup(28, 90, 81, 143, 9300, 2, 3);
@@ -764,7 +765,7 @@ void Scene9400::signal() {
void Scene9400::dispatch() {
if ((_object1._animateMode == 2) && (_object1._strip == 1) && (_object1._frame == 4)){
if (_field1032 == 0) {
- _soundHandler.startSound(296);
+ _soundHandler.play(296);
_field1032 = 1;
}
} else {
@@ -1083,7 +1084,7 @@ void Scene9500::signal() {
switch (_sceneMode) {
case 9503:
_globals->_sceneManager.changeScene(9200);
- _globals->_soundHandler.startSound(295);
+ _globals->_soundHandler.play(295);
break;
case 9504:
_globals->_sceneManager.changeScene(9850);
@@ -1141,7 +1142,7 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
setZoomPercents(110, 75, 200, 150);
_globals->_player.postInit();
- _globals->_soundHandler.startSound(305);
+ _globals->_soundHandler.play(305);
_candle.postInit();
_candle.setVisage(9500);
@@ -1249,7 +1250,7 @@ void Scene9700::signal() {
_globals->_events.setCursor(CURSOR_USE);
break;
case 9704:
- _globals->_soundHandler.startSound(323);
+ _globals->_soundHandler.play(323);
_globals->_sceneManager.changeScene(9750);
break;
}
@@ -1308,7 +1309,7 @@ void Scene9700::postInit(SceneObjectList *OwnerList) {
void Scene9750::signal() {
switch (_sceneMode ++) {
case 9751:
- _globals->_soundHandler.proc1(this);
+ _globals->_soundHandler.fadeOut(this);
break;
case 9752:
_globals->_sceneManager.changeScene(2100);
@@ -1440,7 +1441,7 @@ void Scene9850::Hotspot17::doAction(int action) {
SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else {
if (action == CURSOR_USE)
- scene->_soundHandler.startSound(306);
+ scene->_soundHandler.play(306);
NamedHotspot::doAction(action);
}
}
@@ -1452,7 +1453,7 @@ void Scene9850::Hotspot18::doAction(int action) {
SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else {
if (action == CURSOR_USE)
- scene->_soundHandler.startSound(306);
+ scene->_soundHandler.play(306);
NamedHotspot::doAction(action);
}
}
@@ -1464,7 +1465,7 @@ void Scene9850::Hotspot19::doAction(int action) {
SceneItem::display(9850, 31, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else {
if (action == CURSOR_USE)
- scene->_soundHandler.startSound(313);
+ scene->_soundHandler.play(313);
NamedHotspot::doAction(action);
}
}
@@ -1653,7 +1654,7 @@ void Scene9900::strAction1::signal() {
switch (_actionIndex++) {
case 0:
- scene->_soundHandler.startSound(351);
+ scene->_soundHandler.play(351);
_object9.postInit();
_object9.setVisage(18);
_object9._frame = 1;
@@ -1673,7 +1674,7 @@ void Scene9900::strAction1::signal() {
_globals->_scenePalette.addFader(&mask2[0], 1, 5, this);
break;
case 3:
- _globals->_soundHandler.startSound(377);
+ _globals->_soundHandler.play(377);
setDelay(120);
break;
case 4:
@@ -1854,7 +1855,7 @@ void Scene9900::signal() {
switch (_sceneMode){
case 150:
- _globals->_soundHandler.startSound(380);
+ _globals->_soundHandler.play(380);
_object8.postInit();
_object8.setVisage(2002);
_object8.setStrip(1);
@@ -1887,7 +1888,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9902, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break;
case 9904:
- _globals->_soundHandler.startSound(390);
+ _globals->_soundHandler.play(390);
_sceneMode = 9912;
setAction(&_strAction2, this);
break;
@@ -1918,7 +1919,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9904, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break;
case 9909:
- _globals->_soundHandler.startSound(375);
+ _globals->_soundHandler.play(375);
_globals->_player.disableControl();
_sceneMode = 9907;
setAction(&_sequenceManager, this, 9907, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
@@ -1929,7 +1930,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9911, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break;
case 9911:
- _globals->_soundHandler.startSound(367);
+ _globals->_soundHandler.play(367);
_globals->_player.disableControl();
_sceneMode = 9909;
setAction(&_sequenceManager, this, 9909, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
@@ -2080,7 +2081,7 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {
else
_globals->_stripNum = 2121;
- _globals->_soundHandler.startSound(118);
+ _globals->_soundHandler.play(118);
}
diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h
index aa41555718..33b16d0014 100644
--- a/engines/tsage/ringworld_scenes10.h
+++ b/engines/tsage/ringworld_scenes10.h
@@ -129,7 +129,7 @@ public:
SpeakerGText _speakerGText;
SpeakerGR _speakerGR;
SpeakerQText _speakerQText;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SceneHotspot1 _hotspot1;
NamedHotspot _hotspot2;
NamedHotspot _hotspot3;
@@ -230,7 +230,7 @@ public:
NamedHotspot _hotspot4;
NamedHotspot _hotspot5;
NamedHotspot _hotspot6;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
int _field1032;
SceneHotspot7 _hotspot7;
SceneHotspot8 _hotspot8;
@@ -424,7 +424,7 @@ public:
SceneObject _objLever;
Object6 _objScimitar;
Object7 _objSword;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
NamedHotspot _hotspot1;
NamedHotspot _hotspot2;
NamedHotspot _hotspot3;
@@ -482,7 +482,7 @@ class Scene9900 : public Scene {
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SequenceManager _sequenceManager;
SceneObject _object1;
SceneObject _object2;
diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp
index 4378eac724..0154123c3d 100644
--- a/engines/tsage/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld_scenes2.cpp
@@ -117,6 +117,7 @@ void Scene1000::Action3::signal() {
// First time being played, so show the introduction
ConfMan.setBool(SEEN_INTRO, true);
ConfMan.flushToDisk();
+
setDelay(1);
} else {
// Prompt user for whether to start play or watch introduction
@@ -124,7 +125,7 @@ void Scene1000::Action3::signal() {
if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
_actionIndex = 20;
- _globals->_soundHandler.proc1(this);
+ _globals->_soundHandler.fadeOut(this);
} else {
setDelay(1);
}
@@ -214,7 +215,7 @@ void Scene1000::Action3::signal() {
case 18:
zoom(false);
_globals->_scenePalette.clearListeners();
- _globals->_soundHandler.proc1(this);
+ _globals->_soundHandler.fadeOut(this);
break;
case 19:
_globals->_sceneManager.changeScene(10);
@@ -267,7 +268,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
- _globals->_soundHandler.startSound(114);
+ _globals->_soundHandler.play(114);
} else if (_globals->_sceneManager._previousScene == 2222) {
setZoomPercents(150, 10, 180, 100);
_object1.postInit();
@@ -283,7 +284,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
setAction(&_action1);
} else {
- _globals->_soundHandler.startSound(4);
+ _globals->_soundHandler.play(4);
setZoomPercents(0, 10, 30, 100);
_object3.postInit();
_object3.setVisage(1050);
@@ -429,7 +430,7 @@ void Scene1001::Action1::signal() {
setDelay(10);
break;
case 16: {
- scene->_soundHandler1.startSound(90);
+ scene->_soundHandler1.play(90);
scene->_object6.postInit();
scene->_object6.setVisage(16);
@@ -446,7 +447,7 @@ void Scene1001::Action1::signal() {
break;
}
case 17: {
- scene->_soundHandler1.startSound(90);
+ scene->_soundHandler1.play(90);
scene->_object6.remove();
scene->_object7.postInit();
@@ -475,7 +476,7 @@ void Scene1001::Action1::signal() {
setDelay(30);
break;
case 19: {
- _globals->_soundHandler.startSound(91);
+ _globals->_soundHandler.play(91);
byte adjustData[4] = {0xff, 0xff, 0xff, 0};
_globals->_scenePalette.fade(adjustData, false, 0);
@@ -496,7 +497,7 @@ void Scene1001::Action1::signal() {
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 22:
- _globals->_soundHandler.startSound(92);
+ _globals->_soundHandler.play(92);
scene->_stripManager.start(111, this);
break;
case 23:
@@ -526,7 +527,7 @@ void Scene1001::postInit(SceneObjectList *OwnerList) {
_object3.setStrip2(4);
_object3.setPosition(Common::Point(61, 177));
- _globals->_soundHandler.startSound(85);
+ _globals->_soundHandler.play(85);
setAction(&_action1);
}
@@ -647,7 +648,7 @@ void Scene1250::postInit(SceneObjectList *OwnerList) {
setAction(&_action4);
} else {
setAction(&_action3);
- _globals->_soundHandler.startSound(114);
+ _globals->_soundHandler.play(114);
}
}
@@ -734,7 +735,7 @@ void Scene1400::Action1::signal() {
_globals->_sceneManager._scrollerRect = Rect(40, 20, 280, 180);
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
_globals->_stripNum = 1500;
- _globals->_soundHandler.proc3();
+ _globals->_soundHandler.stop();
_globals->_sceneManager.changeScene(1500);
break;
@@ -779,7 +780,7 @@ void Scene1400::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.y = (_globals->_sceneManager._scene->_sceneBounds.top / 100) * 100;
setAction(&_action1);
- _globals->_soundHandler.startSound(118);
+ _globals->_soundHandler.play(118);
}
/*--------------------------------------------------------------------------
@@ -842,7 +843,7 @@ void Scene1500::Action1::signal() {
setDelay(30);
break;
case 6:
- scene->_soundHandler.startSound(123);
+ scene->_soundHandler.play(123);
scene->_object1.setStrip2(4);
scene->_object1.setFrame(1);
scene->_object1.animate(ANIM_MODE_5, this);
@@ -850,13 +851,13 @@ void Scene1500::Action1::signal() {
case 7:
scene->_object1.setStrip2(5);
scene->_object1.animate(ANIM_MODE_2, NULL);
- scene->_soundHandler.startSound(124, this);
+ scene->_soundHandler.play(124, this);
break;
case 8:
- _globals->_soundHandler.startSound(126, this);
+ _globals->_soundHandler.play(126, this);
break;
case 9:
- _globals->_soundHandler.startSound(127);
+ _globals->_soundHandler.play(127);
_globals->_sceneManager.changeScene(2000);
break;
}
@@ -893,7 +894,7 @@ void Scene1500::Action2::signal() {
break;
}
case 3:
- scene->_soundHandler.proc4();
+ scene->_soundHandler.release();
_globals->_stripNum = 1505;
_globals->_sceneManager.changeScene(2400);
break;
@@ -907,7 +908,7 @@ void Scene1500::postInit(SceneObjectList *OwnerList) {
Scene::postInit();
if ((_globals->_stripNum == 1500) || ((_globals->_stripNum != 1504) && (_globals->_stripNum != 2751))) {
- _globals->_soundHandler.startSound(120);
+ _globals->_soundHandler.play(120);
setZoomPercents(105, 20, 145, 100);
setAction(&_action1);
diff --git a/engines/tsage/ringworld_scenes2.h b/engines/tsage/ringworld_scenes2.h
index 7731b45ae8..93a8f04fd4 100644
--- a/engines/tsage/ringworld_scenes2.h
+++ b/engines/tsage/ringworld_scenes2.h
@@ -72,7 +72,7 @@ public:
Action1 _action1;
SceneObject _object1, _object2, _object3, _object4;
SceneObject _object5, _object6, _object7;
- SoundHandler _soundHandler1, _soundHandler2;
+ ASound _soundHandler1, _soundHandler2;
virtual void postInit(SceneObjectList *OwnerList = NULL);
};
@@ -134,7 +134,7 @@ public:
virtual void signal();
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
Action1 _action1;
Action2 _action2;
SceneObject _object1, _object2, _object3;
diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp
index a19f15eca6..3f9921b0ad 100644
--- a/engines/tsage/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld_scenes3.cpp
@@ -129,11 +129,11 @@ void Scene2000::Action6::signal() {
setDelay(130);
break;
case 1:
- scene->_soundHandler2.startSound(79);
+ scene->_soundHandler2.play(79);
scene->_stripManager.start(2000, this);
break;
case 2:
- _globals->_soundHandler.startSound(81);
+ _globals->_soundHandler.play(81);
scene->_object6.postInit();
scene->_object6.setVisage(2003);
scene->_object6.setAction(NULL);
@@ -148,7 +148,7 @@ void Scene2000::Action6::signal() {
scene->_object6.animate(ANIM_MODE_6, this);
break;
case 5:
- _globals->_soundHandler.startSound(80);
+ _globals->_soundHandler.play(80);
scene->_object6.remove();
_globals->_sceneManager.changeScene(1001);
break;
@@ -308,12 +308,12 @@ void Scene2000::Action14::signal() {
setDelay(60);
break;
case 3:
- _globals->_soundHandler.startSound(99);
+ _globals->_soundHandler.play(99);
scene->_object8.show();
scene->_object8.animate(ANIM_MODE_5, this);
break;
case 4:
- _globals->_soundHandler.startSound(12);
+ _globals->_soundHandler.play(12);
scene->_object8.setStrip(2);
scene->_object8.setFrame(1);
scene->_object9.show();
@@ -324,7 +324,7 @@ void Scene2000::Action14::signal() {
scene->_stripManager.start(2001, this, scene);
break;
case 6:
- _globals->_soundHandler.proc1(0/* was false */);
+ _globals->_soundHandler.fadeOut(0/* was false */);
scene->_object8.setStrip(1);
scene->_object8.setFrame(scene->_object8.getFrameCount());
scene->_object8.animate(ANIM_MODE_6, this);
@@ -333,7 +333,7 @@ void Scene2000::Action14::signal() {
scene->_object10.remove();
break;
case 7:
- _globals->_soundHandler.startSound(111);
+ _globals->_soundHandler.play(111);
scene->_object8.remove();
setDelay(5);
break;
@@ -425,11 +425,11 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
setAction(&_action13);
break;
case 2200:
- _globals->_soundHandler.startSound(111);
+ _globals->_soundHandler.play(111);
setAction(&_action14);
break;
case 2222:
- _globals->_soundHandler.startSound(115);
+ _globals->_soundHandler.play(115);
setAction(&_action8);
break;
case 3500:
@@ -437,12 +437,12 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
break;
default:
_object6.remove();
- _globals->_soundHandler.startSound(80);
+ _globals->_soundHandler.play(80);
setAction(&_action6);
break;
}
- _soundHandler1.startSound(78);
+ _soundHandler1.play(78);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
}
@@ -502,7 +502,7 @@ void Scene2100::Action1::signal() {
break;
}
case 2:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 3: {
@@ -526,7 +526,7 @@ void Scene2100::Action1::signal() {
_state = 0;
_globals->_events.setCursor(CURSOR_USE);
- while (!_state && !_vm->getEventManager()->shouldQuit()) {
+ while (!_state && !_vm->shouldQuit()) {
// Wait for an event
Event event;
if (!_globals->_events.getEvent(event)) {
@@ -551,7 +551,7 @@ void Scene2100::Action1::signal() {
}
}
- scene->_soundHandler.startSound(161);
+ scene->_soundHandler.play(161);
scene->_area1.restore();
scene->_area2.restore();
scene->_area3.restore();
@@ -560,7 +560,7 @@ void Scene2100::Action1::signal() {
if (_state == 2100) {
setDelay(1);
} else {
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this);
}
break;
@@ -576,7 +576,7 @@ void Scene2100::Action1::signal() {
break;
case 7:
_globals->_player.fixPriority(-1);
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
case 8:
@@ -776,17 +776,17 @@ void Scene2100::Action9::signal() {
scene->_stripManager.start(6050, this);
break;
case 2:
- scene->_soundHandler.startSound(99);
+ scene->_soundHandler.play(99);
scene->_object4.show();
scene->_object4.animate(ANIM_MODE_5, this);
break;
case 3:
- scene->_soundHandler.startSound(12);
+ scene->_soundHandler.play(12);
scene->_object4.setStrip(2);
scene->_stripManager.start(6051, this, scene);
break;
case 4:
- scene->_soundHandler.proc1(0/* was false */);
+ scene->_soundHandler.fadeOut(0/* was false */);
scene->_object4.setStrip(1);
scene->_object4.setFrame(scene->_object4.getFrameCount());
scene->_object4.animate(ANIM_MODE_6, this);
@@ -847,7 +847,7 @@ void Scene2100::Action10::signal() {
break;
}
case 5:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 6: {
@@ -880,7 +880,7 @@ void Scene2100::Action10::signal() {
setDelay(45);
break;
case 9:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
case 10:
@@ -924,7 +924,7 @@ void Scene2100::Action11::signal() {
break;
}
case 3:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 4: {
@@ -945,7 +945,7 @@ void Scene2100::Action11::signal() {
setDelay(45);
break;
case 6:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
case 7:
@@ -970,7 +970,7 @@ void Scene2100::Action12::signal() {
scene->_stripManager.start(6000, this);
break;
case 2:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 3: {
@@ -984,7 +984,7 @@ void Scene2100::Action12::signal() {
break;
}
case 4: {
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, NULL);
_globals->_player.fixPriority(-1);
@@ -1096,7 +1096,7 @@ void Scene2100::Action14::signal() {
scene->_stripManager.start(6008, this);
break;
case 4:
- scene->_soundHandler.startSound(99);
+ scene->_soundHandler.play(99);
scene->_object4.show();
scene->_object4.animate(ANIM_MODE_5, this);
break;
@@ -1105,7 +1105,7 @@ void Scene2100::Action14::signal() {
scene->_stripManager.start(6009, this, scene);
break;
case 6:
- scene->_soundHandler.proc1(0/* was false */);
+ scene->_soundHandler.fadeOut(0/* was false */);
scene->_object4.setStrip(1);
scene->_object4.setFrame(scene->_object4.getFrameCount());
scene->_object4.animate(ANIM_MODE_6, this);
@@ -1136,7 +1136,7 @@ void Scene2100::Action14::signal() {
break;
}
case 10:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 11: {
@@ -1151,7 +1151,7 @@ void Scene2100::Action14::signal() {
break;
case 13:
scene->_object3.fixPriority(1);
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
case 14:
@@ -1180,7 +1180,7 @@ void Scene2100::Action15::signal() {
scene->_object3.fixPriority(1);
scene->_object3.changeZoom(-1);
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 2: {
@@ -1191,7 +1191,7 @@ void Scene2100::Action15::signal() {
break;
}
case 3: {
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this);
Common::Point pt(272, 140);
@@ -1251,7 +1251,7 @@ void Scene2100::Action16::signal() {
break;
}
case 5:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 6: {
@@ -1266,7 +1266,7 @@ void Scene2100::Action16::signal() {
setDelay(45);
break;
case 8:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
case 9:
@@ -1295,17 +1295,17 @@ void Scene2100::Action17::signal() {
scene->_stripManager.start(7070, this);
break;
case 4:
- scene->_soundHandler.startSound(99);
+ scene->_soundHandler.play(99);
scene->_object4.show();
scene->_object4.animate(ANIM_MODE_5, this);
break;
case 5:
- scene->_soundHandler.startSound(12);
+ scene->_soundHandler.play(12);
scene->_object4.setStrip(2);
scene->_stripManager.start(7071, this, scene);
break;
case 6:
- scene->_soundHandler.proc1(NULL);
+ scene->_soundHandler.fadeOut(NULL);
scene->_object4.setStrip(1);
scene->_object4.setFrame(scene->_object4.getFrameCount());
scene->_object4.animate(ANIM_MODE_6, this);
@@ -1690,8 +1690,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) {
case 2120:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_object1.fixPriority(-1);
_globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(80, 66));
@@ -1759,8 +1759,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
}
break;
case 3700:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
Scene::setZoomPercents(80, 75, 100, 90);
if (_globals->_sceneObjects->contains(&_object2))
@@ -1778,8 +1778,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2105, &_object3, NULL);
break;
case 4250:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_globals->clearFlag(43);
_globals->_player.setVisage(2104);
@@ -1797,8 +1797,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2107, &_object4, NULL);
break;
case 5000:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
if (_globals->_sceneObjects->contains(&_object2))
_object2.remove();
@@ -1814,8 +1814,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action5);
break;
case 5100:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
@@ -1833,8 +1833,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action9);
break;
case 7000:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
if (RING_INVENTORY._stasisBox2._sceneNumber == 1) {
_globals->_player.fixPriority(1);
@@ -1861,8 +1861,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
}
break;
case 7600:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
if (_globals->_sceneObjects->contains(&_object2))
_object2.remove();
@@ -1873,8 +1873,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action8);
break;
case 8100:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
@@ -1886,8 +1886,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2106, NULL);
break;
case 9750:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
@@ -1904,8 +1904,8 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 2103, &_object4, NULL);
break;
default:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_globals->_player._uiEnabled = true;
break;
@@ -1962,7 +1962,7 @@ void Scene2100::signal() {
void Scene2100::synchronize(Serializer &s) {
Scene::synchronize(s);
if (s.getVersion() >= 3)
- s.syncAsSint16LE(_sitFl);
+ s.syncAsSint16LE(_sitFl);
}
/*--------------------------------------------------------------------------
@@ -2074,7 +2074,7 @@ void Scene2120::Action1::dispatch() {
_actionIndex = !_entries[scene->_subjectIndex]._visage ? 4 : 3;
setDelay(30);
- scene->_soundHandler.startSound(159);
+ scene->_soundHandler.play(159);
}
// Next Page button handling
@@ -2105,7 +2105,7 @@ void Scene2120::Action1::dispatch() {
setDelay(30);
}
- scene->_soundHandler.startSound(159);
+ scene->_soundHandler.play(159);
}
// Previous Page button handling
@@ -2132,7 +2132,7 @@ void Scene2120::Action1::dispatch() {
break;
}
- scene->_soundHandler.startSound(159);
+ scene->_soundHandler.play(159);
}
// Exit button handling
@@ -2162,7 +2162,7 @@ void Scene2120::Action1::dispatch() {
setDelay(1);
}
- scene->_soundHandler.startSound(159);
+ scene->_soundHandler.play(159);
}
}
@@ -2232,7 +2232,7 @@ void Scene2150::Action1::signal() {
break;
}
case 1:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot1.animate(ANIM_MODE_5, this);
break;
case 2: {
@@ -2257,7 +2257,7 @@ void Scene2150::Action1::signal() {
_state = 0;
_globals->_events.setCursor(CURSOR_USE);
- while (!_state && !_vm->getEventManager()->shouldQuit()) {
+ while (!_state && !_vm->shouldQuit()) {
// Wait for an event
Event event;
if (!_globals->_events.getEvent(event)) {
@@ -2282,7 +2282,7 @@ void Scene2150::Action1::signal() {
}
}
- scene->_soundHandler.startSound(161);
+ scene->_soundHandler.play(161);
scene->_area1.restore();
scene->_area2.restore();
scene->_area3.restore();
@@ -2291,7 +2291,7 @@ void Scene2150::Action1::signal() {
if (_state == 2150) {
setDelay(1);
} else {
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot1.animate(ANIM_MODE_6, this);
}
break;
@@ -2306,7 +2306,7 @@ void Scene2150::Action1::signal() {
}
break;
case 6:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot1.animate(ANIM_MODE_6, this);
break;
case 7:
@@ -2333,10 +2333,10 @@ void Scene2150::Action2::signal() {
_globals->_player.setStrip(8);
_globals->_player.animate(ANIM_MODE_8, 1, this);
- scene->_soundHandler.startSound(163);
+ scene->_soundHandler.play(163);
break;
case 2:
- scene->_soundHandler.startSound(164);
+ scene->_soundHandler.play(164);
scene->_hotspot10.animate(ANIM_MODE_5, this);
break;
case 3:
@@ -2361,7 +2361,7 @@ void Scene2150::Action2::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 5:
- scene->_soundHandler.startSound(164);
+ scene->_soundHandler.play(164);
scene->_hotspot10.animate(ANIM_MODE_6, NULL);
scene->_hotspot14.remove();
@@ -2559,8 +2559,8 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) {
case 2120:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_globals->_player.setPosition(Common::Point(108, 99));
break;
case 2200:
@@ -2709,7 +2709,7 @@ void Scene2200::Action3::signal() {
switch (_actionIndex++) {
case 0: {
- scene->_soundHandler2.startSound(103);
+ scene->_soundHandler2.play(103);
scene->_hotspot4.setStrip(4);
scene->_hotspot4.animate(ANIM_MODE_NONE, NULL);
@@ -2726,7 +2726,7 @@ void Scene2200::Action3::signal() {
break;
}
case 1:
- scene->_soundHandler2.startSound(104);
+ scene->_soundHandler2.play(104);
scene->_hotspot4.setStrip(2);
scene->_hotspot4.setFrame(2);
setDelay(120);
@@ -2882,7 +2882,7 @@ void Scene2200::Hotspot9::doAction(int action) {
break;
case OBJECT_INFODISK:
if (_globals->_sceneManager._previousScene == 2310) {
- scene->_soundHandler2.startSound(35);
+ scene->_soundHandler2.play(35);
_globals->_player.disableControl();
scene->setAction(&scene->_action3);
}
@@ -2943,8 +2943,8 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot8.remove();
break;
case 4000:
- _globals->_soundHandler.startSound(100);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(100);
+ _globals->_soundHandler.holdAt(true);
_globals->_player.remove();
_hotspot5.remove();
_hotspot8.remove();
@@ -2984,9 +2984,9 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot4.fixPriority(255);
_globals->_sceneItems.push_back(&_hotspot4);
- _soundHandler1.startSound(101);
- _soundHandler2.startSound(100);
- _globals->_soundHandler.proc5(true);
+ _soundHandler1.play(101);
+ _soundHandler2.play(100);
+ _globals->_soundHandler.holdAt(true);
_globals->_sceneItems.push_back(&_hotspot5);
setAction(&_action2);
@@ -3139,7 +3139,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) {
setAction(&_action1);
}
- _soundHandler.startSound(116);
+ _soundHandler.play(116);
_globals->_sceneManager._scene->_sceneBounds.center(_hotspot1._position);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
@@ -3225,7 +3225,7 @@ void Scene2230::Action2::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 3:
- scene->_soundHandler.startSound(157);
+ scene->_soundHandler.play(157);
_globals->_player._moveDiff = Common::Point(1, 1);
_globals->_player.setAction(&scene->_action4);
_globals->_player._uiEnabled = true;
@@ -3249,7 +3249,7 @@ void Scene2230::Action3::signal() {
NpcMover *mover = new NpcMover();
_globals->_player.addMover(mover, &pt, this);
- scene->_soundHandler.proc3();
+ scene->_soundHandler.stop();
break;
}
case 1:
@@ -3368,7 +3368,7 @@ void Scene2230::Action7::signal() {
break;
}
case 2: {
- scene->_soundHandler.startSound(158);
+ scene->_soundHandler.play(158);
scene->_hotspot8.setStrip2(2);
Common::Point pt(scene->_hotspot8._position.x, 97);
@@ -3451,7 +3451,7 @@ void Scene2230::Action8::signal() {
scene->_hotspot2.animate(ANIM_MODE_6, this);
break;
case 4: {
- scene->_soundHandler.startSound(158);
+ scene->_soundHandler.play(158);
scene->_hotspot2.remove();
scene->_hotspot8._frame = 1;
@@ -3774,7 +3774,7 @@ void Scene2280::Action1::signal() {
break;
}
case 1:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot16.animate(ANIM_MODE_5, this);
break;
case 2: {
@@ -3789,7 +3789,7 @@ void Scene2280::Action1::signal() {
break;
case 4:
_globals->_player.fixPriority(1);
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot16.animate(ANIM_MODE_6, this);
break;
case 5:
@@ -3810,7 +3810,7 @@ void Scene2280::Action2::signal() {
break;
}
case 1:
- scene->_soundHandler.startSound(265);
+ scene->_soundHandler.play(265);
_globals->_player.setVisage(2162);
_globals->_player._frame = 1;
@@ -3830,7 +3830,7 @@ void Scene2280::Action2::signal() {
scene->_hotspot12.remove();
break;
case 4:
- scene->_soundHandler.startSound(266);
+ scene->_soundHandler.play(266);
_globals->_player.setVisage(2170);
_globals->_player._frame = 1;
_globals->_player._strip = 4;
@@ -3858,7 +3858,7 @@ void Scene2280::Action3::signal() {
break;
}
case 1:
- scene->_soundHandler.startSound(265);
+ scene->_soundHandler.play(265);
_globals->_player.setVisage(2162);
_globals->_player._frame = 6;
@@ -4338,8 +4338,8 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_sceneMode = 2281;
setAction(&_sequenceManager, this, 2281, &_globals->_player, &_hotspot16, NULL);
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
}
_globals->_sceneItems.addItems(&_hotspot13, &_hotspot11, &_hotspot9, &_hotspot14, &_hotspot7,
@@ -4390,7 +4390,7 @@ void Scene2300::Action1::signal() {
}
case 2: {
scene->_hotspot8.setAction(&scene->_action4);
- scene->_soundHandler2.startSound(21);
+ scene->_soundHandler2.play(21);
Common::Point pt1(95, scene->_hotspot5._position.y);
NpcMover *mover1 = new NpcMover();
@@ -4428,7 +4428,7 @@ void Scene2300::Action1::signal() {
break;
}
case 6:
- scene->_soundHandler1.startSound(28);
+ scene->_soundHandler1.play(28);
_globals->_player.disableControl();
scene->_hotspot2.setVisage(40);
@@ -4442,7 +4442,7 @@ void Scene2300::Action1::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 7:
- _globals->_soundHandler.startSound(77, this);
+ _globals->_soundHandler.play(77, this);
break;
case 8:
_globals->_game->endGame(2300, 0);
@@ -4470,7 +4470,7 @@ void Scene2300::Action1::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 11:
- scene->_soundHandler1.startSound(28);
+ scene->_soundHandler1.play(28);
scene->_hotspot5._strip = 2;
scene->_hotspot6._strip = 2;
@@ -4487,7 +4487,7 @@ void Scene2300::Action1::signal() {
_globals->_player.animate(ANIM_MODE_6, this);
break;
case 12:
- scene->_soundHandler1.startSound(77);
+ scene->_soundHandler1.play(77);
_globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setStrip(4);
@@ -4565,8 +4565,8 @@ void Scene2300::Action2::signal() {
scene->_hotspot2.setFrame(1);
scene->_hotspot2.animate(ANIM_MODE_5, this);
- scene->_soundHandler1.startSound(28);
- scene->_soundHandler2.startSound(97);
+ scene->_soundHandler1.play(28);
+ scene->_soundHandler2.play(97);
break;
case 7:
scene->_hotspot7._strip = 2;
@@ -4610,8 +4610,8 @@ void Scene2300::Action3::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 3:
- scene->_soundHandler1.startSound(97);
- scene->_soundHandler2.startSound(28);
+ scene->_soundHandler1.play(97);
+ scene->_soundHandler2.play(28);
scene->_hotspot7._strip = 2;
scene->_hotspot7._frame = 1;
@@ -4623,7 +4623,7 @@ void Scene2300::Action3::signal() {
_globals->_player.animate(ANIM_MODE_6, NULL);
break;
case 4:
- scene->_soundHandler2.startSound(97);
+ scene->_soundHandler2.play(97);
_globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setStrip(1);
@@ -4645,7 +4645,7 @@ void Scene2300::Action4::signal() {
switch (_actionIndex++) {
case 0:
scene->_hotspot8.animate(ANIM_MODE_5, this);
- scene->_soundHandler1.startSound(11);
+ scene->_soundHandler1.play(11);
break;
case 1:
scene->_hotspot9.postInit();
@@ -4655,7 +4655,7 @@ void Scene2300::Action4::signal() {
scene->_hotspot9.setPosition(Common::Point(273, 199));
scene->_hotspot9.fixPriority(19);
scene->_hotspot9.animate(ANIM_MODE_5, this);
- scene->_soundHandler1.startSound(11);
+ scene->_soundHandler1.play(11);
break;
case 2:
scene->_hotspot8.remove();
@@ -4666,10 +4666,10 @@ void Scene2300::Action4::signal() {
scene->_hotspot10.setFrame(4);
scene->_hotspot10.setPosition(Common::Point(292, 113));
scene->_hotspot10.animate(ANIM_MODE_5, this);
- scene->_soundHandler1.startSound(11);
+ scene->_soundHandler1.play(11);
break;
case 3:
- scene->_soundHandler1.startSound(13);
+ scene->_soundHandler1.play(13);
remove();
break;
}
@@ -4747,7 +4747,7 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
_hotspot8.setVisage(2301);
_hotspot8.setPosition(Common::Point(288, 74));
- _globals->_soundHandler.startSound(96);
+ _globals->_soundHandler.play(96);
if (_globals->_sceneManager._previousScene == 2000) {
_hotspot8.remove();
@@ -4778,8 +4778,8 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
_hotspot7.setPosition(Common::Point(229, 125));
_hotspot7._numFrames = 5;
- _soundHandler1.startSound(95);
- _soundHandler2.startSound(96);
+ _soundHandler1.play(95);
+ _soundHandler2.play(96);
_globals->_sceneItems.push_back(&_hotspot7);
setAction(&_action2);
@@ -5062,7 +5062,7 @@ void Scene2320::Action2::signal() {
switch (_actionIndex++) {
case 0: {
- scene->_soundHandler.startSound(253);
+ scene->_soundHandler.play(253);
scene->_hotspot13.fixPriority(99);
Common::Point pt(scene->_hotspot13._position.x, 200);
@@ -5088,7 +5088,7 @@ void Scene2320::Action3::signal() {
break;
}
case 1:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_5, this);
break;
case 2: {
@@ -5112,7 +5112,7 @@ void Scene2320::Action3::signal() {
_state = 0;
_globals->_events.setCursor(CURSOR_USE);
- while (!_state && !_vm->getEventManager()->shouldQuit()) {
+ while (!_state && !_vm->shouldQuit()) {
// Wait for an event
Event event;
if (!_globals->_events.getEvent(event)) {
@@ -5137,7 +5137,7 @@ void Scene2320::Action3::signal() {
}
}
- scene->_soundHandler.startSound(161);
+ scene->_soundHandler.play(161);
scene->_area1.restore();
scene->_area2.restore();
scene->_area3.restore();
@@ -5146,7 +5146,7 @@ void Scene2320::Action3::signal() {
if (_state == 2320) {
setDelay(10);
} else {
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_6, this);
}
break;
@@ -5162,7 +5162,7 @@ void Scene2320::Action3::signal() {
break;
}
case 6:
- scene->_soundHandler.startSound(162);
+ scene->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_6, this);
break;
case 7:
@@ -5250,8 +5250,8 @@ void Scene2320::Action4::signal() {
break;
case 10:
if (_globals->getFlag(109)) {
- _globals->_soundHandler.startSound(40);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(40);
+ _globals->_soundHandler.holdAt(true);
Common::Point pt(303, 240);
NpcMover *mover = new NpcMover();
@@ -5311,7 +5311,7 @@ void Scene2320::Action4::signal() {
}
case 19: {
scene->_hotspot16.remove();
- scene->_soundHandler.startSound(253);
+ scene->_soundHandler.play(253);
scene->_hotspot13.show();
Common::Point pt(319, 157);
@@ -5462,7 +5462,7 @@ void Scene2320::Action7::signal() {
setDelay(30);
break;
case 1:
- _globals->_soundHandler.startSound(162);
+ _globals->_soundHandler.play(162);
scene->_hotspot6.animate(ANIM_MODE_5, this);
break;
case 2:
@@ -5889,8 +5889,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) {
case 2120:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(389, 72));
@@ -5907,8 +5907,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
case 4250:
case 5000:
case 7000:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
if ((_globals->_sceneManager._previousScene == 7000) && !_globals->getFlag(80))
_globals->setFlag(36);
@@ -5924,8 +5924,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
setAction(&_action6);
break;
case 6100:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_hotspot8.postInit();
_hotspot8.setVisage(2345);
@@ -5936,9 +5936,9 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager1, this, 2325, &_globals->_player, &_hotspot6, &_hotspot8, &_hotspot7, NULL);
break;
case 7600:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
- _soundHandler.startSound(21);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
+ _soundHandler.play(21);
_globals->_player.setVisage(2323);
_globals->_player.setStrip(2);
@@ -5995,8 +5995,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager1, this, 2325, &_globals->_player, &_hotspot6, &_hotspot8, &_hotspot7, NULL);
break;
default:
- _globals->_soundHandler.startSound(160);
- _globals->_soundHandler.proc5(true);
+ _globals->_soundHandler.play(160);
+ _globals->_soundHandler.holdAt(true);
_sceneMode = 2321;
_globals->_player.setStrip(3);
@@ -6127,7 +6127,7 @@ void Scene2400::postInit(SceneObjectList *OwnerList) {
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
- _globals->_soundHandler.startSound(153);
+ _globals->_soundHandler.play(153);
}
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_scenes3.h b/engines/tsage/ringworld_scenes3.h
index cc237a1f91..711360c190 100644
--- a/engines/tsage/ringworld_scenes3.h
+++ b/engines/tsage/ringworld_scenes3.h
@@ -114,7 +114,7 @@ public:
Action14 _action14;
SceneObject _object1, _object2, _object3, _object4, _object5;
SceneObject _object6, _object7, _object8, _object9, _object10;
- SoundHandler _soundHandler1, _soundHandler2;
+ ASound _soundHandler1, _soundHandler2;
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void stripCallback(int v);
@@ -232,7 +232,7 @@ class Scene2100 : public Scene {
};
public:
SequenceManager _sequenceManager;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SpeakerMText _speakerMText;
SpeakerMR _speakerMR;
SpeakerQL _speakerQL;
@@ -311,7 +311,7 @@ class Scene2120 : public Scene {
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SceneObject _topicArrowHotspot, _arrowHotspot, _visageHotspot;
SceneObject _subjectButton, _nextPageButton, _previousPageButton, _exitButton;
Action1 _action1;
@@ -359,7 +359,7 @@ class Scene2150 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SequenceManager _sequenceManager;
SpeakerGameText _speakerGameText;
@@ -440,7 +440,7 @@ public:
DisplayHotspot _hotspot10;
SceneObject _hotspot2, _hotspot4;
SceneObject _hotspot6, _hotspot7, _hotspot8;
- SoundHandler _soundHandler1, _soundHandler2;
+ ASound _soundHandler1, _soundHandler2;
Scene2200();
virtual void postInit(SceneObjectList *OwnerList = NULL);
@@ -462,7 +462,7 @@ class Scene2222 : public Scene {
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SpeakerSText _speakerSText;
SpeakerMText _speakerMText;
SpeakerQText _speakerQText;
@@ -552,7 +552,7 @@ class Scene2230 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
Action1 _action1;
Action2 _action2;
Action3 _action3;
@@ -652,7 +652,7 @@ class Scene2280 : public Scene {
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SequenceManager _sequenceManager;
Rect _exitRect;
Action1 _action1;
@@ -712,7 +712,7 @@ class Scene2300 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler1, _soundHandler2;
+ ASound _soundHandler1, _soundHandler2;
SpeakerSL _speakerSL;
SpeakerMText _speakerMText;
SpeakerQText _speakerQText;
@@ -834,7 +834,7 @@ class Scene2320 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SequenceManager _sequenceManager1, _sequenceManager2;
SpeakerMText _speakerMText;
SpeakerMR _speakerMR;
diff --git a/engines/tsage/ringworld_scenes4.cpp b/engines/tsage/ringworld_scenes4.cpp
index 883da9b5b1..838769e4af 100644
--- a/engines/tsage/ringworld_scenes4.cpp
+++ b/engines/tsage/ringworld_scenes4.cpp
@@ -178,7 +178,7 @@ void Scene3700::Action1::signal() {
setDelay(90);
break;
case 3:
- scene->_soundHandler.startSound(196);
+ scene->_soundHandler.play(196);
scene->_viewer.hide();
scene->_hotspot1.postInit();
@@ -190,7 +190,7 @@ void Scene3700::Action1::signal() {
setDelay(90);
break;
case 4:
- scene->_soundHandler.startSound(197);
+ scene->_soundHandler.play(197);
scene->_hotspot1.hide();
scene->_hotspot2.postInit();
@@ -202,7 +202,7 @@ void Scene3700::Action1::signal() {
setDelay(30);
break;
case 5:
- scene->_soundHandler.startSound(198);
+ scene->_soundHandler.play(198);
scene->_hotspot2.hide();
scene->_hotspot1.show();
setDelay(90);
@@ -244,7 +244,7 @@ void Scene3700::postInit(tSage::SceneObjectList *OwnerList) {
_viewer.setPosition(Common::Point(195, 83));
setAction(&_action1);
- _globals->_soundHandler.startSound(195);
+ _globals->_soundHandler.play(195);
}
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_scenes4.h b/engines/tsage/ringworld_scenes4.h
index 389c67b83a..0b575d02d3 100644
--- a/engines/tsage/ringworld_scenes4.h
+++ b/engines/tsage/ringworld_scenes4.h
@@ -82,7 +82,7 @@ public:
SpeakerSText _speakerSText;
SpeakerMText _speakerMText;
SpeakerMR _speakerMR;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL);
};
diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp
index 8b95e40abe..fccc7e1b50 100644
--- a/engines/tsage/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld_scenes5.cpp
@@ -102,7 +102,7 @@ void Scene4000::Action1::signal() {
ADD_MOVER_NULL(scene->_hotspot5, -40, 86);
break;
case 5:
- _globals->_soundHandler.startSound(155);
+ _globals->_soundHandler.play(155);
_globals->setFlag(43);
_globals->setFlag(114);
scene->_stripManager.start(4430, this);
@@ -354,14 +354,14 @@ void Scene4000::Action8::signal() {
setDelay(60);
break;
case 3:
- _globals->_soundHandler.startSound(170);
+ _globals->_soundHandler.play(170);
scene->_smoke2.setVisage(4000);
scene->_smoke2.setStrip(6);
scene->_smoke2.animate(ANIM_MODE_2, NULL);
setDelay(60);
break;
case 4:
- _globals->_soundHandler.startSound(77, this);
+ _globals->_soundHandler.play(77, this);
break;
case 5:
_globals->_game->endGame(4000, 15);
@@ -429,7 +429,7 @@ void Scene4000::Action11::signal() {
scene->_olo.animate(ANIM_MODE_1, NULL);
break;
case 5:
- scene->_soundHandler1.proc3();
+ scene->_soundHandler1.stop();
scene->_forceField.remove();
ADD_MOVER(_globals->_player, 340, 163);
@@ -494,12 +494,12 @@ void Scene4000::Action13::signal() {
setDelay(3);
break;
case 1:
- scene->_soundHandler2.startSound(151);
- scene->_soundHandler2.proc5(true);
+ scene->_soundHandler2.play(151);
+ scene->_soundHandler2.holdAt(true);
ADD_MOVER(scene->_lander, -30, 70);
break;
case 2:
- scene->_soundHandler2.proc4();
+ scene->_soundHandler2.release();
_globals->_sceneManager.changeScene(4010);
break;
}
@@ -867,7 +867,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_theTech.setPosition(Common::Point(281, 176));
if (_globals->getFlag(34)) {
- _soundHandler1.startSound(156);
+ _soundHandler1.play(156);
_forceField.postInit();
_forceField.setVisage(4000);
@@ -900,7 +900,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) {
case 2320:
- _globals->_soundHandler.startSound(155);
+ _globals->_soundHandler.play(155);
if (RING_INVENTORY._ale._sceneNumber == 1) {
_guardRock.postInit();
@@ -962,7 +962,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
}
if (_globals->_stripNum == 4025) {
- _soundHandler1.startSound(182);
+ _soundHandler1.play(182);
_forceField.remove();
_hotspot5.postInit();
@@ -1043,7 +1043,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
break;
case 4050:
- _globals->_soundHandler.startSound(155);
+ _globals->_soundHandler.play(155);
_globals->_player.disableControl();
if (_globals->_stripNum == 4050) {
@@ -1080,7 +1080,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
break;
default:
- _globals->_soundHandler.startSound(155);
+ _globals->_soundHandler.play(155);
_lander.postInit();
_lander.setVisage(4002);
@@ -1104,7 +1104,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
RING_INVENTORY._ladder._sceneNumber = 4100;
RING_INVENTORY._rope._sceneNumber = 4150;
- _soundHandler1.startSound(156);
+ _soundHandler1.play(156);
_forceField.postInit();
_forceField.setVisage(4000);
@@ -1243,8 +1243,8 @@ void Scene4000::dispatch() {
if ((RING_INVENTORY._peg._sceneNumber == 1) && _globals->getFlag(34) &&
_globals->getFlag(37) && !_globals->getFlag(40)) {
_globals->_player.disableControl();
- _soundHandler1.startSound(177);
- _globals->_soundHandler.startSound(178);
+ _soundHandler1.play(177);
+ _globals->_soundHandler.play(178);
setAction(&_action1);
}
@@ -1892,7 +1892,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_olloFace.fixPriority(152);
if(_globals->_sceneManager._previousScene == 4050) {
- _globals->_soundHandler.startSound(155);
+ _globals->_soundHandler.play(155);
_globals->_player.setPosition(Common::Point(72, 128));
_globals->_player.enableControl();
@@ -1921,7 +1921,7 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_miranda.setStrip(3);
_miranda.setFrame(2);
_miranda.changeZoom(-1);
-
+
_miranda.setPosition(Common::Point(66, 209));
_globals->_sceneItems.push_back(&_miranda);
}
@@ -2273,7 +2273,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.setStrip(2);
setAction(&_action2);
- _globals->_soundHandler.startSound(175);
+ _globals->_soundHandler.play(175);
} else {
// Without the rope
_globals->_player.setVisage(5315);
@@ -2284,7 +2284,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.animate(ANIM_MODE_2, NULL);
setAction(&_action4);
- _globals->_soundHandler.startSound(176);
+ _globals->_soundHandler.play(176);
}
break;
case 4045:
@@ -2298,7 +2298,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setPosition(Common::Point(193, 193));
- _globals->_soundHandler.startSound(175);
+ _globals->_soundHandler.play(175);
break;
default:
break;
@@ -2717,7 +2717,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) {
&_hotspot11, &_hotspot9, &_hotspot7, &_hotspot10, &_hotspot8, &_hotspot14, NULL);
if (_globals->_sceneManager._previousScene == 4150) {
- _globals->_soundHandler.startSound(155);
+ _globals->_soundHandler.play(155);
if (!_globals->getFlag(42)) {
_hotspot1.setVisage(4104);
@@ -3095,8 +3095,8 @@ void Scene4150::postInit(SceneObjectList *OwnerList) {
&_hotspot10, &_hotspot9, &_hotspot8, &_hotspot7, &_hotspot6, &_hotspot2,
&_hotspot5, NULL);
- _globals->_soundHandler.startSound(165);
- _soundHandler.startSound(311);
+ _globals->_soundHandler.play(165);
+ _soundHandler.play(311);
}
void Scene4150::signal() {
@@ -3110,8 +3110,8 @@ void Scene4150::dispatch() {
Scene::dispatch();
if (!_action && (_globals->_player._position.x >= 316)) {
- _globals->_soundHandler.proc1(NULL);
- _soundHandler.proc1(NULL);
+ _globals->_soundHandler.fadeOut(NULL);
+ _soundHandler.fadeOut(NULL);
_globals->_player.disableControl();
_sceneMode = 4152;
setAction(&_sequenceManager, this, 4152, &_globals->_player, NULL);
@@ -3414,7 +3414,7 @@ void Scene4250::Hotspot6::doAction(int action) {
SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 20 : 3);
break;
case OBJECT_HELMET:
- _globals->_soundHandler.startSound(354);
+ _globals->_soundHandler.play(354);
_globals->_player.disableControl();
RING_INVENTORY._helmet._sceneNumber = 4250;
@@ -3443,7 +3443,7 @@ void Scene4250::Hotspot6::doAction(int action) {
break;
case OBJECT_NULLIFIER:
if (RING_INVENTORY._helmet._sceneNumber == 4250) {
- _globals->_soundHandler.startSound(353);
+ _globals->_soundHandler.play(353);
_globals->_player.disableControl();
RING_INVENTORY._helmet._sceneNumber = 1;
@@ -3650,7 +3650,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot7.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_globals->_sceneItems.push_back(&_hotspot7);
- _globals->_soundHandler.startSound(185);
+ _globals->_soundHandler.play(185);
}
void Scene4250::signal() {
@@ -3683,7 +3683,7 @@ void Scene4250::signal() {
_globals->_player.enableControl();
break;
case 4259:
- _globals->_soundHandler.startSound(360);
+ _globals->_soundHandler.play(360);
_globals->_sceneManager.changeScene(9900);
break;
case 4261:
@@ -3751,36 +3751,36 @@ void Scene4300::Action1::signal() {
_globals->setFlag(56);
_globals->_scenePalette.addRotation(240, 254, -1);
scene->_hotspot7.animate(ANIM_MODE_6, this);
- _globals->_soundHandler.startSound(164);
+ _globals->_soundHandler.play(164);
break;
case 1:
- _globals->_soundHandler.startSound(340);
- scene->_soundHandler1.startSound(341);
+ _globals->_soundHandler.play(340);
+ scene->_soundHandler1.play(341);
scene->_hotspot1.remove();
setDelay(3);
break;
case 2:
- scene->_soundHandler1.startSound(341);
+ scene->_soundHandler1.play(341);
scene->_hotspot2.remove();
setDelay(6);
break;
case 3:
- scene->_soundHandler1.startSound(341);
+ scene->_soundHandler1.play(341);
scene->_hotspot3.remove();
setDelay(6);
break;
case 4:
- scene->_soundHandler1.startSound(341);
+ scene->_soundHandler1.play(341);
scene->_hotspot4.remove();
setDelay(12);
break;
case 5:
- scene->_soundHandler1.startSound(341);
+ scene->_soundHandler1.play(341);
scene->_hotspot5.remove();
setDelay(12);
break;
case 6:
- scene->_soundHandler1.startSound(341);
+ scene->_soundHandler1.play(341);
scene->_hotspot6.remove();
setDelay(60);
break;
@@ -3793,7 +3793,7 @@ void Scene4300::Action1::signal() {
scene->_stripManager.start(8015, this, scene);
break;
case 9:
- _globals->_soundHandler.startSound(350);
+ _globals->_soundHandler.play(350);
_globals->_sceneManager._fadeMode = FADEMODE_GRADUAL;
_globals->_events.setCursor(CURSOR_USE);
_globals->_player.enableControl();
@@ -3916,7 +3916,7 @@ void Scene4300::Hotspot10::doAction(int action) {
void Scene4300::Hotspot15::signal() {
Scene4300 *scene = (Scene4300 *)_globals->_sceneManager._scene;
- scene->_soundHandler2.startSound(345);
+ scene->_soundHandler2.play(345);
_strip = (_globals->_randomSource.getRandomNumber(6) < 2) ? 2 : 1;
if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) ||
@@ -3982,7 +3982,7 @@ void Scene4300::Hotspot17::doAction(int action) {
SceneItem::display2(4300, 26);
break;
case OBJECT_STASIS_BOX2:
- scene->_soundHandler1.startSound(352);
+ scene->_soundHandler1.play(352);
_globals->_events.setCursor(CURSOR_USE);
scene->_sceneMode = 4303;
@@ -4241,11 +4241,11 @@ void Scene4301::Action1::signal() {
switch (_actionIndex++) {
case 0:
- scene->_soundHandler.startSound(164);
+ scene->_soundHandler.play(164);
scene->_hotspot1.animate(ANIM_MODE_5, this);
break;
case 1:
- _globals->_soundHandler.startSound(335);
+ _globals->_soundHandler.play(335);
_globals->_events.setCursor(CURSOR_USE);
scene->_hotspot2.postInit();
@@ -4268,9 +4268,9 @@ void Scene4301::Action1::signal() {
_actionIndex = 2;
break;
case 10:
- // Puzzle: Wrong code
+ // Puzzle: Wrong code
_globals->_events.setCursor(CURSOR_NONE);
- scene->_soundHandler.startSound(337);
+ scene->_soundHandler.play(337);
if (scene->_hotspot3._flags & OBJFLAG_HIDE)
scene->_hotspot3.show();
else
@@ -4285,7 +4285,7 @@ void Scene4301::Action1::signal() {
for (_state = 0; _state < 6; ++_state)
_buttonList[_state].remove();
- scene->_soundHandler.startSound(338);
+ scene->_soundHandler.play(338);
scene->_hotspot3.hide();
_actionIndex = 2;
@@ -4295,7 +4295,7 @@ void Scene4301::Action1::signal() {
case 20:
// Puzzle: Correct code
_globals->_player.disableControl();
- scene->_soundHandler.startSound(339);
+ scene->_soundHandler.play(339);
scene->_hotspot3._frame = 3;
if (scene->_hotspot3._flags & OBJFLAG_HIDE)
scene->_hotspot3.show();
@@ -4329,7 +4329,7 @@ void Scene4301::Action1::process(Event &event) {
if ((event.eventType == EVENT_BUTTON_DOWN) && buttonsRect.contains(event.mousePos)) {
event.handled = true;
- scene->_soundHandler.startSound(336);
+ scene->_soundHandler.play(336);
int buttonIndex = ((event.mousePos.y - buttonsRect.top) / 33) * 3 +
((event.mousePos.x - buttonsRect.left) / 33);
diff --git a/engines/tsage/ringworld_scenes5.h b/engines/tsage/ringworld_scenes5.h
index a2991c7283..c3ae9f4aa9 100644
--- a/engines/tsage/ringworld_scenes5.h
+++ b/engines/tsage/ringworld_scenes5.h
@@ -134,7 +134,7 @@ class Scene4000 : public Scene {
};
public:
SequenceManager _sequenceManager1, _sequenceManager2, _sequenceManager3;
- SoundHandler _soundHandler1, _soundHandler2;
+ ASound _soundHandler1, _soundHandler2;
SpeakerQR _speakerQR;
SpeakerML _speakerML;
SpeakerMR _speakerMR;
@@ -471,7 +471,7 @@ class Scene4150 : public Scene {
public:
SequenceManager _sequenceManager;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SpeakerQText _speakerQText;
SpeakerQR _speakerQR;
SpeakerCDL _speakerCDL;
@@ -541,7 +541,7 @@ class Scene4250 : public Scene {
public:
SequenceManager _sequenceManager;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SpeakerSR _speakerSR;
SpeakerSL _speakerSL;
SpeakerSText _speakerSText;
@@ -613,7 +613,7 @@ class Scene4300 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler1, _soundHandler2;
+ ASound _soundHandler1, _soundHandler2;
SequenceManager _sequenceManager;
GfxButton _gfxButton;
SpeakerQText _speakerQText;
@@ -672,7 +672,7 @@ class Scene4301 : public Scene {
public:
Common::List<int> _list1;
SequenceManager _sequenceManager;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
Action1 _action1;
SceneObject _hotspot1, _hotspot2, _hotspot3;
Hotspot4 _hotspot4;
diff --git a/engines/tsage/ringworld_scenes6.cpp b/engines/tsage/ringworld_scenes6.cpp
index 9e5766d656..68c184196c 100644
--- a/engines/tsage/ringworld_scenes6.cpp
+++ b/engines/tsage/ringworld_scenes6.cpp
@@ -41,8 +41,8 @@ void Scene5000::Action1::signal() {
setDelay(10);
break;
case 1:
- scene->_soundHandler.startSound(190);
- scene->_soundHandler.proc5(true);
+ scene->_soundHandler.play(190);
+ scene->_soundHandler.holdAt(true);
ADD_MOVER(scene->_hotspot1, 283, 12);
break;
case 2:
@@ -55,7 +55,7 @@ void Scene5000::Action1::signal() {
setDelay(15);
break;
case 4:
- scene->_soundHandler.proc4();
+ scene->_soundHandler.release();
ADD_MOVER(scene->_hotspot1, 233, 80);
break;
case 5:
@@ -561,7 +561,7 @@ void Scene5000::postInit(SceneObjectList *OwnerList) {
break;
}
- _globals->_soundHandler.startSound(190);
+ _globals->_soundHandler.play(190);
}
void Scene5000::signal() {
@@ -639,7 +639,7 @@ void Scene5100::Action1::signal() {
}
break;
case 4:
- scene->_soundHandler.startSound(206);
+ scene->_soundHandler.play(206);
scene->_hotspot5.postInit();
scene->_hotspot5.setVisage(5362);
@@ -740,7 +740,7 @@ void Scene5100::Action3::signal() {
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 2:
- scene->_soundHandler.startSound(28);
+ scene->_soundHandler.play(28);
if (static_cast<SceneObject *>(_owner)->_position.x < _globals->_player._position.x) {
scene->_hotspot2.setVisage(5130);
scene->_hotspot2._strip = 1;
@@ -786,7 +786,7 @@ void Scene5100::Action4::signal() {
switch (_actionIndex++) {
case 0: {
_globals->_player.disableControl();
- scene->_soundHandler.startSound(208);
+ scene->_soundHandler.play(208);
SceneItem::display2(5100, 15);
ObjectMover3 *mover = new ObjectMover3();
@@ -1289,7 +1289,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
loadScene(5100);
- _globals->_soundHandler.startSound(205);
+ _globals->_soundHandler.play(205);
}
void Scene5100::signal() {
@@ -1385,7 +1385,7 @@ void Scene5100::dispatch() {
_globals->_player.disableControl();
_globals->_player.addMover(NULL);
- _soundHandler.startSound(207);
+ _soundHandler.play(207);
_sceneMode = 5103;
setAction(&_sequenceManager, this, (_globals->_player._position.x >= 966) ? 5104 : 5103,
&_globals->_player, &_hotspot15, NULL);
@@ -1396,7 +1396,7 @@ void Scene5100::dispatch() {
(_globals->_sceneManager._previousScene != 5200) && (_sceneMode != 5150)) {
setAction(NULL);
_sceneMode = 5150;
- _soundHandler.startSound(208);
+ _soundHandler.play(208);
if (RING_INVENTORY._vial._sceneNumber == 5100) {
_globals->_player.addMover(NULL);
@@ -1471,7 +1471,7 @@ void Scene5200::Action2::signal() {
_globals->_player.animate(ANIM_MODE_4, 3, 1, this);
break;
case 2:
- scene->_soundHandler.proc3();
+ scene->_soundHandler.stop();
scene->_hotspot14.remove();
RING_INVENTORY._stasisBox._sceneNumber = 1;
@@ -1486,7 +1486,7 @@ void Scene5200::Action2::signal() {
ADD_MOVER(scene->_hotspot8, 141, 77);
break;
case 4:
- scene->_soundHandler.startSound(303);
+ scene->_soundHandler.play(303);
scene->_hotspot8._strip = 2;
scene->_hotspot8._frame = 1;
@@ -1523,7 +1523,7 @@ void Scene5200::Action4::signal() {
setDelay(120);
break;
case 1:
- _globals->_soundHandler.startSound(209);
+ _globals->_soundHandler.play(209);
scene->_stripManager.start(5202, this, scene);
break;
case 2:
@@ -1622,8 +1622,8 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_speakerQText._textPos.x = 20;
if (RING_INVENTORY._stasisBox._sceneNumber == 5200) {
- _soundHandler.startSound(216);
- _soundHandler.proc5(true);
+ _soundHandler.play(216);
+ _soundHandler.holdAt(true);
_hotspot14.postInit();
_hotspot14.setVisage(5202);
@@ -1643,7 +1643,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
// Happens when the player enters the throne room via the secret passage,
// after talking with the bat. No NPCs are around and the player can
// obtain the stasis box.
- _globals->_soundHandler.startSound(205);
+ _globals->_soundHandler.play(205);
_globals->_player.disableControl();
_globals->_player.postInit();
@@ -2131,7 +2131,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
_hotspot8._sceneRegionId = 8;
_globals->_sceneItems.addItems(&_hotspot8, &_hotspot2, &_hotspot6, &_hotspot3, &_hotspot7, NULL);
- _globals->_soundHandler.startSound(212);
+ _globals->_soundHandler.play(212);
}
void Scene5300::signal() {
@@ -2141,7 +2141,7 @@ void Scene5300::signal() {
_globals->_sceneManager.changeScene(5100);
break;
case 5307:
- _soundHandler.proc1(NULL);
+ _soundHandler.fadeOut(NULL);
// No break on purpose
case 5302:
case 5308:
diff --git a/engines/tsage/ringworld_scenes6.h b/engines/tsage/ringworld_scenes6.h
index 6ac73d4bff..2e99f5ab87 100644
--- a/engines/tsage/ringworld_scenes6.h
+++ b/engines/tsage/ringworld_scenes6.h
@@ -75,7 +75,7 @@ class Scene5000 : public Scene {
};
public:
SequenceManager _sequenceManager;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SpeakerSText _speakerSText;
SpeakerQText _speakerQText;
Action1 _action1;
@@ -163,7 +163,7 @@ class Scene5100 : public Scene {
};
public:
SequenceManager _sequenceManager;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SpeakerMText _speakerMText;
SpeakerQText _speakerQText;
SpeakerSText _speakerSText;
@@ -226,7 +226,7 @@ class Scene5200 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SpeakerFLL _speakerFLL;
SpeakerFLText _speakerFLText;
SpeakerQL _speakerQL;
@@ -291,7 +291,7 @@ class Scene5300 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SequenceManager _sequenceManager;
SpeakerQR _speakerQR;
SpeakerQL _speakerQL;
diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp
index 934c7494fa..2b329b958a 100644
--- a/engines/tsage/ringworld_scenes8.cpp
+++ b/engines/tsage/ringworld_scenes8.cpp
@@ -60,7 +60,7 @@ void Scene7000::Action1::signal() {
setAction(&scene->_action6, this);
break;
case 2:
- scene->_soundHandler.startSound(252);
+ scene->_soundHandler.play(252);
scene->_object8.remove();
scene->_object1.postInit();
scene->_object1.setVisage(7003);
@@ -184,7 +184,7 @@ void Scene7000::Action4::signal() {
setDelay(300);
break;
case 2:
- _globals->_soundHandler.startSound(252);
+ _globals->_soundHandler.play(252);
scene->_object1.show();
scene->_object1.setStrip(3);
scene->_object1.setFrame(1);
@@ -214,7 +214,7 @@ void Scene7000::Action5::signal() {
}
case 1:
_globals->_player.checkAngle(&scene->_object1);
- _globals->_soundHandler.startSound(252);
+ _globals->_soundHandler.play(252);
scene->_object1.setStrip(2);
scene->_stripManager.start(7015, this);
break;
@@ -546,7 +546,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object1.animate(ANIM_MODE_8, 0, NULL);
_globals->_sceneItems.push_back(&_object1);
}
- _soundHandler.startSound(251);
+ _soundHandler.play(251);
if (_globals->_sceneManager._previousScene == 2100) {
if (_globals->getFlag(72)) {
_globals->_player.postInit();
@@ -565,7 +565,7 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
setAction(&_action1);
}
} else {
- _globals->_soundHandler.startSound(250);
+ _globals->_soundHandler.play(250);
_globals->setFlag(72);
_object3.postInit();
@@ -611,9 +611,9 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object3.setVisage(5001);
_object3.setStrip2(1);
_object3.setPosition(Common::Point(307, 0));
- _soundHandler.startSound(151);
- _soundHandler.proc5(1);
- _globals->_soundHandler.startSound(250);
+ _soundHandler.play(151);
+ _soundHandler.holdAt(true);
+ _globals->_soundHandler.play(250);
setAction(&_action3);
}
@@ -1135,9 +1135,9 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object1.setPosition(Common::Point(100, 100));
setAction(&_action11);
- _soundHandler1.startSound(270);
- _soundHandler2.startSound(275);
- _globals->_soundHandler.startSound(270);
+ _soundHandler1.play(270);
+ _soundHandler2.play(275);
+ _globals->_soundHandler.play(270);
}
/*--------------------------------------------------------------------------
* Scene 7200 - Underwater: Entering the cave
@@ -1302,7 +1302,7 @@ void Scene7200::postInit(SceneObjectList *OwnerList) {
_swimmer.setPosition(Common::Point(-8, 16));
setAction(&_action1);
- _soundHandler.startSound(271);
+ _soundHandler.play(271);
}
/*--------------------------------------------------------------------------
@@ -1344,7 +1344,7 @@ void Scene7300::Action1::signal() {
break;
case 7:
setDelay(3);
- _globals->_soundHandler.proc1(NULL);
+ _globals->_soundHandler.fadeOut(NULL);
break;
case 8:
_globals->_sceneManager.changeScene(2280);
@@ -1497,7 +1497,7 @@ void Scene7300::postInit(SceneObjectList *OwnerList) {
_object8._numFrames = 2;
setAction(&_action1);
- _globals->_soundHandler.startSound(272);
+ _globals->_soundHandler.play(272);
}
/*--------------------------------------------------------------------------
@@ -1601,8 +1601,8 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
}
_sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y);
loadScene(7600);
- _soundHandler2.startSound(255);
- _soundHandler1.startSound(251);
+ _soundHandler2.play(255);
+ _soundHandler1.play(251);
}
/*--------------------------------------------------------------------------
@@ -1665,7 +1665,7 @@ void Scene7700::Action3::signal() {
setDelay(60);
// No break on purpose!
case 2:
- scene->_soundHandler.startSound(260);
+ scene->_soundHandler.play(260);
scene->_object8.setVisage(7703);
scene->_object8.setPosition(Common::Point(177, 97));
scene->_object8.setStrip2(3);
@@ -1874,7 +1874,7 @@ void Scene7700::SceneHotspot8::doAction(int action) {
break;
case CURSOR_USE:
scene->_sceneMode = 7709;
- scene->_soundHandler.startSound(259);
+ scene->_soundHandler.play(259);
scene->_object15.setFrame(scene->_object15.getFrameCount());
scene->_object15.animate(ANIM_MODE_6, scene);
if ((scene->_field977 == 2) && (scene->_field97B == 0)) {
@@ -1900,7 +1900,7 @@ void Scene7700::SceneHotspot9::doAction(int action) {
break;
case CURSOR_USE:
scene->_sceneMode = 7709;
- scene->_soundHandler.startSound(259);
+ scene->_soundHandler.play(259);
scene->_object15.setFrame(1);
scene->_object15.animate(ANIM_MODE_5, scene);
if (scene->_field977 > 2) {
@@ -2034,7 +2034,7 @@ void Scene7700::Object7::doAction(int action) {
break;
case OBJECT_STUNNER:
if (!_globals->getFlag(78)) {
- _globals->_soundHandler.proc3();
+ _globals->_soundHandler.stop();
_globals->setFlag(78);
setAction(NULL);
_globals->_player.disableControl();
@@ -2124,7 +2124,8 @@ void Scene7700::Object9::doAction(int action) {
_globals->_sceneItems.push_front(&scene->_object10);
scene->_object10.fixPriority(240);
}
- scene->_soundHandler.startSound(262);
+
+ scene->_soundHandler.play(262);
scene->_object14.animate(ANIM_MODE_5, NULL);
}
_globals->_events.setCursor(CURSOR_WALK);
@@ -2222,7 +2223,7 @@ void Scene7700::signal() {
}
break;
case 7702:
- _soundHandler.proc1(0);
+ _soundHandler.fadeOut(0);
_globals->_sceneManager.changeScene(7600);
break;
case 7703:
@@ -2233,7 +2234,7 @@ void Scene7700::signal() {
_globals->_player.enableControl();
break;
case 7704:
- _globals->_soundHandler.startSound(256);
+ _globals->_soundHandler.play(256);
_prof.setStrip2(4);
_prof.setFrame2(1);
_prof.setPosition(Common::Point(159, 87));
@@ -2520,7 +2521,7 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_sceneMode = 7701;
setAction(&_sequenceManager, this, 7701, &_globals->_player, NULL);
- _soundHandler.startSound(256);
+ _soundHandler.play(256);
}
Scene7700::Scene7700() {
diff --git a/engines/tsage/ringworld_scenes8.h b/engines/tsage/ringworld_scenes8.h
index 8b183e895f..fe9560d9d8 100644
--- a/engines/tsage/ringworld_scenes8.h
+++ b/engines/tsage/ringworld_scenes8.h
@@ -94,7 +94,7 @@ class Scene7000 : public Scene {
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SequenceManager _sequenceManager;
SpeakerSKText _speakerSKText;
SpeakerSKL _speakerSKL;
@@ -165,8 +165,8 @@ class Scene7100 : public Scene {
};
public:
- SoundHandler _soundHandler1;
- SoundHandler _soundHandler2;
+ ASound _soundHandler1;
+ ASound _soundHandler2;
SceneObject _object1;
SceneObject _object2;
SceneObject _object3;
@@ -230,7 +230,7 @@ public:
SceneObject _object7;
SceneObject _object8;
SceneObject _object9;
- SoundHandler _soundHandler;
+ ASound _soundHandler;
virtual void postInit(SceneObjectList *OwnerList = NULL);
};
@@ -296,8 +296,8 @@ public:
SceneObject _object4;
SceneObject _object5;
SceneObject _object6;
- SoundHandler _soundHandler1;
- SoundHandler _soundHandler2;
+ ASound _soundHandler1;
+ ASound _soundHandler2;
virtual void postInit(SceneObjectList *OwnerList = NULL);
};
@@ -409,7 +409,7 @@ class Scene7700 : public Scene {
virtual void doAction(int action);
};
public:
- SoundHandler _soundHandler;
+ ASound _soundHandler;
SequenceManager _sequenceManager;
GfxButton _gfxButton;
SpeakerEText _speakerEText;
diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp
index 522e40c236..40444cd630 100644
--- a/engines/tsage/saveload.cpp
+++ b/engines/tsage/saveload.cpp
@@ -21,11 +21,13 @@
*/
#include "common/savefile.h"
+#include "common/mutex.h"
#include "graphics/palette.h"
#include "graphics/scaler.h"
#include "graphics/thumbnail.h"
#include "tsage/globals.h"
#include "tsage/saveload.h"
+#include "tsage/sound.h"
#include "tsage/tsage.h"
namespace tSage {
@@ -101,10 +103,24 @@ void Serializer::validate(int v, Common::Serializer::Version minVersion,
error("Savegame is corrupt");
}
+#define DOUBLE_PRECISION 1000000000
+
+void Serializer::syncAsDouble(double &v) {
+ int32 num = (int32)(v);
+ uint32 fraction = (uint32)((v - (int32)v) * DOUBLE_PRECISION);
+
+ syncAsSint32LE(num);
+ syncAsUint32LE(fraction);
+
+ if (isLoading())
+ v = num + (double)fraction / DOUBLE_PRECISION;
+}
+
/*--------------------------------------------------------------------------*/
Common::Error Saver::save(int slot, const Common::String &saveName) {
assert(!getMacroRestoreFlag());
+ Common::StackLock slock1(_globals->_soundManager._serverDisabledMutex);
// Signal any objects registered for notification
_saveNotifiers.notify(false);
@@ -149,6 +165,7 @@ Common::Error Saver::save(int slot, const Common::String &saveName) {
Common::Error Saver::restore(int slot) {
assert(!getMacroRestoreFlag());
+ Common::StackLock slock1(_globals->_soundManager._serverDisabledMutex);
// Signal any objects registered for notification
_loadNotifiers.notify(false);
@@ -205,7 +222,7 @@ Common::Error Saver::restore(int slot) {
// Final post-restore notifications
_macroRestoreFlag = false;
- _loadNotifiers.notify(false);
+ _loadNotifiers.notify(true);
return Common::kNoError;
}
diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h
index c1c2851f28..ce181cbc8f 100644
--- a/engines/tsage/saveload.h
+++ b/engines/tsage/saveload.h
@@ -33,7 +33,7 @@ namespace tSage {
typedef void (*SaveNotifierFn)(bool postFlag);
-#define TSAGE_SAVEGAME_VERSION 5
+#define TSAGE_SAVEGAME_VERSION 6
class SavedObject;
@@ -77,6 +77,7 @@ public:
Common::Serializer::Version maxVersion = kLastVersion);
void validate(int v, Common::Serializer::Version minVersion = 0,
Common::Serializer::Version maxVersion = kLastVersion);
+ void syncAsDouble(double &v);
};
/*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index 4625661b62..b94e95c696 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -55,7 +55,7 @@ void SceneManager::checkScene() {
_nextSceneNumber = -1;
}
- Common::for_each(_globals->_sceneListeners.begin(), _globals->_sceneListeners.end(), SceneHandler::dispatchObject);
+ _globals->dispatchSounds();
}
void SceneManager::sceneChange() {
@@ -105,8 +105,6 @@ void SceneManager::sceneChange() {
// Set the next scene to be active
_sceneNumber = _nextSceneNumber;
- // TODO: Unknown check of word_45CD3 / call to saver method
-
// Free any regions
disposeRegions();
@@ -208,7 +206,6 @@ void SceneManager::setBackSurface() {
}
void SceneManager::saveListener(int saveMode) {
- warning("TODO: SceneManager::saveLIstener");
}
void SceneManager::loadNotifier(bool postFlag) {
@@ -238,7 +235,11 @@ void SceneManager::listenerSynchronize(Serializer &s) {
if (s.isLoading()) {
changeScene(_sceneNumber);
- checkScene();
+
+ if (_nextSceneNumber != -1) {
+ sceneChange();
+ _nextSceneNumber = -1;
+ }
}
_globals->_sceneManager._scrollerRect.synchronize(s);
@@ -510,7 +511,7 @@ void Game::execute() {
activeFlag = true;
}
}
- } while (activeFlag && !_vm->getEventManager()->shouldQuit());
+ } while (activeFlag && !_vm->shouldQuit());
}
} // End of namespace tSage
diff --git a/engines/tsage/scenes.h b/engines/tsage/scenes.h
index b3c009c4fe..5845efaec9 100644
--- a/engines/tsage/scenes.h
+++ b/engines/tsage/scenes.h
@@ -71,7 +71,9 @@ public:
class SceneManager : public GameHandler, public SaveListener {
private:
- void disposeRegions() { warning("TODO: disposeRegions()"); }
+ void disposeRegions() {
+ // No need to do anything, since regions will be freed automatically when the scene is
+ }
Scene *getNewScene();
public:
Scene *_scene;
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index defec1cebd..e26b3d1544 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -20,38 +20,2932 @@
*
*/
+#include "common/config-manager.h"
#include "tsage/core.h"
#include "tsage/globals.h"
#include "tsage/debugger.h"
#include "tsage/graphics.h"
+#include "tsage/tsage.h"
namespace tSage {
+static SoundManager *_soundManager = NULL;
+
+/*--------------------------------------------------------------------------*/
+
+SoundManager::SoundManager() {
+ _soundManager = this;
+ __sndmgrReady = false;
+ _ourSndResVersion = 0x102;
+ _ourDrvResVersion = 0x10A;
+
+ for (int i = 0; i < SOUND_ARR_SIZE; ++i)
+ _voiceTypeStructPtrs[i] = NULL;
+
+ _groupsAvail = 0;
+ _newVolume = _masterVol = 127;
+ _driversDetected = false;
+ _needToRethink = false;
+
+ _soTimeIndexFlag = false;
+}
+
+SoundManager::~SoundManager() {
+ if (__sndmgrReady) {
+ Common::StackLock slock(_serverDisabledMutex);
+
+ for (Common::List<Sound *>::iterator i = _soundList.begin(); i != _soundList.end(); ) {
+ Sound *s = *i;
+ ++i;
+ s->stop();
+ }
+ for (Common::List<SoundDriver *>::iterator i = _installedDrivers.begin(); i != _installedDrivers.end(); ) {
+ SoundDriver *driver = *i;
+ ++i;
+ delete driver;
+ }
+ _sfTerminate();
+
+ g_system->getTimerManager()->removeTimerProc(_sfUpdateCallback);
+ }
+
+ _soundManager = NULL;
+}
+
void SoundManager::postInit() {
- _saver->addSaveNotifier(&SoundManager::saveNotifier);
- _saver->addLoadNotifier(&SoundManager::loadNotifier);
- _saver->addListener(this);
+ if (!__sndmgrReady) {
+ _saver->addSaveNotifier(&SoundManager::saveNotifier);
+ _saver->addLoadNotifier(&SoundManager::loadNotifier);
+ _saver->addListener(this);
+
+ // Install a timer for handling sound manager updates at 60Hz
+ g_system->getTimerManager()->installTimerProc(_sfUpdateCallback, 1000000 / GAME_FRAME_RATE, NULL);
+
+ __sndmgrReady = true;
+ }
+}
+
+/**
+ * Loops through all the loaded sounds, and stops any that have been flagged for stopping
+ */
+void SoundManager::dispatch() {
+ Common::List<Sound *>::iterator i = _soundList.begin();
+ while (i != _soundList.end()) {
+ Sound *sound = *i;
+ ++i;
+
+ // If the sound is flagged for stopping, then stop it
+ if (sound->_stoppedAsynchronously) {
+ sound->stop();
+ }
+ }
+}
+
+void SoundManager::syncSounds() {
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ bool music_mute = mute;
+
+ if (!mute) {
+ music_mute = ConfMan.getBool("music_mute");
+ }
+
+ // Get the new music volume
+ int musicVolume = music_mute ? 0 : MIN(255, ConfMan.getInt("music_volume"));
+
+ this->setMasterVol(musicVolume / 2);
+}
+
+void SoundManager::update() {
+ _sfSoundServer();
+}
+
+Common::List<SoundDriverEntry> &SoundManager::buildDriverList(bool detectFlag) {
+ assert(__sndmgrReady);
+ _availableDrivers.clear();
+
+ // Build up a list of available drivers. Currently we only implement an Adlib music
+ // and SoundBlaster FX driver
+
+ // Adlib driver
+ SoundDriverEntry sd;
+ sd.driverNum = ADLIB_DRIVER_NUM;
+ sd.status = detectFlag ? SNDSTATUS_DETECTED : SNDSTATUS_SKIPPED;
+ sd.field2 = 0;
+ sd.field6 = 15000;
+ sd.shortDescription = "Adlib or SoundBlaster";
+ sd.longDescription = "3812fm";
+ _availableDrivers.push_back(sd);
+
+ // SoundBlaster entry
+ SoundDriverEntry sdFx;
+ sdFx.driverNum = SBLASTER_DRIVER_NUM;
+ sdFx.status = detectFlag ? SNDSTATUS_DETECTED : SNDSTATUS_SKIPPED;
+ sdFx.field2 = 0;
+ sdFx.field6 = 15000;
+ sdFx.shortDescription = "SndBlast";
+ sdFx.longDescription = "SoundBlaster";
+ _availableDrivers.push_back(sdFx);
+
+ _driversDetected = true;
+ return _availableDrivers;
+}
+
+void SoundManager::installConfigDrivers() {
+ installDriver(ADLIB_DRIVER_NUM);
+#ifdef DEBUG
+ installDriver(SBLASTER_DRIVER_NUM);
+#endif
+}
+
+Common::List<SoundDriverEntry> &SoundManager::getDriverList(bool detectFlag) {
+ if (detectFlag)
+ return _availableDrivers;
+ else
+ return buildDriverList(false);
+}
+
+void SoundManager::dumpDriverList() {
+ _availableDrivers.clear();
+}
+
+/**
+ * Install the specified driver number
+ */
+void SoundManager::installDriver(int driverNum) {
+ // If driver is already installed, no need to install it
+ if (isInstalled(driverNum))
+ return;
+
+ // Instantiate the sound driver
+ SoundDriver *driver = instantiateDriver(driverNum);
+ if (!driver)
+ return;
+
+ assert((_ourDrvResVersion >= driver->_minVersion) && (_ourDrvResVersion <= driver->_maxVersion));
+
+ // Mute any loaded sounds
+ Common::StackLock slock(_serverDisabledMutex);
+
+ for (Common::List<Sound *>::iterator i = _playList.begin(); i != _playList.end(); ++i)
+ (*i)->mute(true);
+
+ // Install the driver
+ if (!_sfInstallDriver(driver))
+ error("Sound driver initialization failed");
+
+ switch (driverNum) {
+ case ROLAND_DRIVER_NUM:
+ case ADLIB_DRIVER_NUM: {
+ // Handle loading bank infomation
+ byte *bankData = _resourceManager->getResource(RES_BANK, driverNum, 0, true);
+ if (bankData) {
+ // Install the patch bank data
+ _sfInstallPatchBank(driver, bankData);
+ DEALLOCATE(bankData);
+ } else {
+ // Could not locate patch bank data, so unload the driver
+ _sfUnInstallDriver(driver);
+
+ // Unmute currently active sounds
+ for (Common::List<Sound *>::iterator i = _playList.begin(); i != _playList.end(); ++i)
+ (*i)->mute(false);
+ }
+ break;
+ }
+ }
+}
+
+/**
+ * Instantiate a driver class for the specified driver number
+ */
+SoundDriver *SoundManager::instantiateDriver(int driverNum) {
+ switch (driverNum) {
+ case ADLIB_DRIVER_NUM:
+ return new AdlibSoundDriver();
+ case SBLASTER_DRIVER_NUM:
+ return new AdlibFxSoundDriver();
+ default:
+ error("Unknown sound driver - %d", driverNum);
+ }
+}
+
+/**
+ * Uninstall the specified driver
+ */
+void SoundManager::unInstallDriver(int driverNum) {
+ Common::List<SoundDriver *>::const_iterator i;
+ for (i = _installedDrivers.begin(); i != _installedDrivers.end(); ++i) {
+ if ((*i)->_driverResID == driverNum) {
+ // Found driver to remove
+
+ // Mute any loaded sounds
+ Common::StackLock slock(_serverDisabledMutex);
+
+ Common::List<Sound *>::iterator j;
+ for (j = _playList.begin(); j != _playList.end(); ++j)
+ (*j)->mute(true);
+
+ // Uninstall the driver
+ _sfUnInstallDriver(*i);
+
+ // Re-orient all the loaded sounds
+ for (j = _soundList.begin(); j != _soundList.end(); ++j)
+ (*j)->orientAfterDriverChange();
+
+ // Unmute currently active sounds
+ for (j = _playList.begin(); j != _playList.end(); ++j)
+ (*j)->mute(false);
+ }
+ }
+}
+
+/**
+ * Returns true if a specified driver number is currently installed
+ */
+bool SoundManager::isInstalled(int driverNum) const {
+ Common::List<SoundDriver *>::const_iterator i;
+ for (i = _installedDrivers.begin(); i != _installedDrivers.end(); ++i) {
+ if ((*i)->_driverResID == driverNum)
+ return true;
+ }
+
+ return false;
+}
+
+void SoundManager::setMasterVol(int volume) {
+ _newVolume = volume;
+}
+
+int SoundManager::getMasterVol() const {
+ return _masterVol;
+}
+
+void SoundManager::loadSound(int soundNum, bool showErrors) {
+ // This method preloaded the data associated with a given sound, so is now redundant
+}
+
+void SoundManager::unloadSound(int soundNum) {
+ // This method signalled the resource manager to unload the data for a sound, and is now redundant
+}
+
+int SoundManager::determineGroup(const byte *soundData) {
+ return _sfDetermineGroup(soundData);
+}
+
+void SoundManager::checkResVersion(const byte *soundData) {
+ int maxVersion = READ_LE_UINT16(soundData + 4);
+ int minVersion = READ_LE_UINT16(soundData + 6);
+
+ if (_soundManager->_ourSndResVersion < minVersion)
+ error("Attempt to play/prime sound resource that is too new");
+ if (_soundManager->_ourSndResVersion > maxVersion)
+ error("Attempt to play/prime sound resource that is too old");
+}
+
+int SoundManager::extractPriority(const byte *soundData) {
+ return READ_LE_UINT16(soundData + 12);
+}
+
+int SoundManager::extractLoop(const byte *soundData) {
+ return READ_LE_UINT16(soundData + 14);
+}
+
+void SoundManager::extractTrackInfo(trackInfoStruct *trackInfo, const byte *soundData, int groupNum) {
+ _sfExtractTrackInfo(trackInfo, soundData, groupNum);
}
+void SoundManager::addToSoundList(Sound *sound) {
+ if (!contains(_soundList, sound))
+ _soundList.push_back(sound);
+}
+
+void SoundManager::removeFromSoundList(Sound *sound) {
+ _soundList.remove(sound);
+}
+
+void SoundManager::addToPlayList(Sound *sound) {
+ _sfAddToPlayList(sound);
+}
+
+void SoundManager::removeFromPlayList(Sound *sound) {
+ if (_soundManager)
+ _sfRemoveFromPlayList(sound);
+}
+
+bool SoundManager::isOnPlayList(Sound *sound) {
+ return _sfIsOnPlayList(sound);
+}
+
+void SoundManager::updateSoundVol(Sound *sound) {
+ _sfUpdateVolume(sound);
+}
+
+void SoundManager::updateSoundPri(Sound *sound) {
+ _sfUpdatePriority(sound);
+}
+
+void SoundManager::updateSoundLoop(Sound *sound) {
+ _sfUpdateLoop(sound);
+}
+
+void SoundManager::rethinkVoiceTypes() {
+ Common::StackLock slock(sfManager()._serverSuspendedMutex);
+ _sfRethinkVoiceTypes();
+}
+
+void SoundManager::_sfSoundServer() {
+ Common::StackLock slock1(sfManager()._serverDisabledMutex);
+ Common::StackLock slock2(sfManager()._serverSuspendedMutex);
+
+ if (sfManager()._needToRethink) {
+ _sfRethinkVoiceTypes();
+ sfManager()._needToRethink = false;
+ } else {
+ _sfDereferenceAll();
+ }
+
+ // If the master volume has changed, update it
+ if (sfManager()._newVolume != sfManager()._masterVol)
+ _sfSetMasterVol(sfManager()._newVolume);
+
+ // If a time index has been set for any sound, fast forward to it
+ SynchronizedList<Sound *>::iterator i;
+ for (i = sfManager()._playList.begin(); i != sfManager()._playList.end(); ++i) {
+ Sound *s = *i;
+ if (s->_newTimeIndex != 0) {
+ s->mute(true);
+ s->_soSetTimeIndex(s->_newTimeIndex);
+ s->mute(false);
+ s->_newTimeIndex = 0;
+ }
+ }
+
+ // Handle any fading if necessary
+ _sfProcessFading();
+
+ // Poll all sound drivers in case they need it
+ for (Common::List<SoundDriver *>::iterator j = sfManager()._installedDrivers.begin();
+ j != sfManager()._installedDrivers.end(); ++j) {
+ (*j)->poll();
+ }
+}
+
+void SoundManager::_sfProcessFading() {
+ // Loop through processing active sounds
+ bool removeFlag = false;
+ Common::List<Sound *>::iterator i = sfManager()._playList.begin();
+ while (i != sfManager()._playList.end()) {
+ Sound *s = *i;
+ ++i;
+
+ if (!s->_pausedCount)
+ removeFlag = s->_soServiceTracks();
+ if (removeFlag) {
+ _sfDoRemoveFromPlayList(s);
+ s->_stoppedAsynchronously = true;
+ sfManager()._needToRethink = true;
+ }
+
+ if (s->_fadeDest != -1) {
+ if (s->_fadeCounter != 0)
+ --s->_fadeCounter;
+ else {
+ if (s->_volume >= s->_fadeDest) {
+ s->_volume = ((s->_volume - s->_fadeDest) > s->_fadeSteps) ?
+ s->_volume - s->_fadeSteps : s->_fadeDest;
+ } else {
+ s->_volume = ((s->_fadeDest - s->_volume) > s->_fadeSteps) ?
+ s->_volume + s->_fadeSteps : s->_fadeDest;
+ }
+
+ _sfDoUpdateVolume(s);
+ if (s->_volume != s->_fadeDest)
+ s->_fadeCounter = s->_fadeTicks;
+ else {
+ s->_fadeDest = -1;
+ if (s->_stopAfterFadeFlag) {
+ _sfDoRemoveFromPlayList(s);
+ s->_stoppedAsynchronously = true;
+ sfManager()._needToRethink = true;
+ }
+ }
+ }
+ }
+ }
+
+ // Loop through the voiceType list
+ for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
+ VoiceTypeStruct *vtStruct = sfManager()._voiceTypeStructPtrs[voiceIndex];
+ if (!vtStruct)
+ continue;
+
+ if (vtStruct->_voiceType == VOICETYPE_1) {
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if (vtStruct->_entries[idx]._type1._field6 >= -1)
+ ++vtStruct->_entries[idx]._type1._field6;
+ }
+ }
+ }
+}
+
+void SoundManager::_sfUpdateVoiceStructs() {
+ for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
+ VoiceTypeStruct *vs = sfManager()._voiceTypeStructPtrs[voiceIndex];
+ if (!vs)
+ continue;
+
+ if (vs->_voiceType == VOICETYPE_0) {
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntry &vse = vs->_entries[idx];
+
+ vse._type0._sound = vse._type0._sound2;
+ vse._type0._channelNum = vse._type0._channelNum2;
+ vse._type0._priority = vse._type0._priority2;
+ vse._type0._fieldA = vse._type0._field12;
+ }
+ } else {
+ vs->_field3 = vs->_numVoices;
+
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntry &vse = vs->_entries[idx];
+
+ vse._type1._sound = vse._type1._sound2;
+ vse._type1._channelNum = vse._type1._channelNum2;
+ vse._type1._priority = vse._type1._priority2;
+ }
+ }
+ }
+}
+
+void SoundManager::_sfUpdateVoiceStructs2() {
+ for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
+ VoiceTypeStruct *vtStruct = sfManager()._voiceTypeStructPtrs[voiceIndex];
+ if (!vtStruct)
+ continue;
+
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+
+ if (vtStruct->_voiceType == VOICETYPE_0) {
+ VoiceStructEntryType0 &vse = vtStruct->_entries[idx]._type0;
+ vse._sound2 = vse._sound;
+ vse._channelNum2 = vse._channelNum;
+ vse._priority2 = vse._priority;
+ vse._field12 = vse._fieldA;
+ } else {
+ VoiceStructEntryType1 &vse = vtStruct->_entries[idx]._type1;
+ vse._sound2 = vse._sound;
+ vse._channelNum2 = vse._channelNum;
+ vse._priority2 = vse._priority;
+ }
+ }
+ }
+}
+
+void SoundManager::_sfUpdateCallback(void *ref) {
+ ((SoundManager *)ref)->update();
+}
+
+/*--------------------------------------------------------------------------*/
+
void SoundManager::saveNotifier(bool postFlag) {
- _globals->_soundManager.saveNotifierProc(postFlag);
+ _soundManager->saveNotifierProc(postFlag);
}
void SoundManager::saveNotifierProc(bool postFlag) {
- warning("TODO: SoundManager::saveNotifierProc");
+ // Nothing needs to be done when saving the game
}
void SoundManager::loadNotifier(bool postFlag) {
- _globals->_soundManager.loadNotifierProc(postFlag);
+ _soundManager->loadNotifierProc(postFlag);
}
void SoundManager::loadNotifierProc(bool postFlag) {
- warning("TODO: SoundManager::loadNotifierProc");
+ if (!postFlag) {
+ // Stop any currently playing sounds
+ if (__sndmgrReady) {
+ Common::StackLock slock(_serverDisabledMutex);
+
+ for (Common::List<Sound *>::iterator i = _soundList.begin(); i != _soundList.end(); ) {
+ Sound *s = *i;
+ ++i;
+ s->stop();
+ }
+ }
+ } else {
+ // Savegame is now loaded, so iterate over the sound list to prime any sounds as necessary
+ for (Common::List<Sound *>::iterator i = _soundList.begin(); i != _soundList.end(); ++i) {
+ Sound *s = *i;
+ s->orientAfterRestore();
+ }
+ }
}
void SoundManager::listenerSynchronize(Serializer &s) {
s.validate("SoundManager");
- warning("TODO: SoundManager listenerSynchronize");
+ assert(__sndmgrReady && _driversDetected);
+
+ if (s.getVersion() < 6)
+ return;
+
+ Common::StackLock slock(_serverDisabledMutex);
+ _playList.synchronize(s);
+
+ _soundList.synchronize(s);
+}
+
+/*--------------------------------------------------------------------------*/
+
+SoundManager &SoundManager::sfManager() {
+ assert(_soundManager);
+ return *_soundManager;
+}
+
+int SoundManager::_sfDetermineGroup(const byte *soundData) {
+ const byte *p = soundData + READ_LE_UINT16(soundData + 8);
+ uint32 v;
+ while ((v = READ_LE_UINT32(p)) != 0) {
+ if ((v & _soundManager->_groupsAvail) == v)
+ return v;
+
+ p += 6 + (READ_LE_UINT16(p + 4) * 4);
+ }
+
+ return 0;
+}
+
+void SoundManager::_sfAddToPlayList(Sound *sound) {
+ Common::StackLock slock(sfManager()._serverSuspendedMutex);
+
+ _sfDoAddToPlayList(sound);
+ sound->_stoppedAsynchronously = false;
+ _sfRethinkVoiceTypes();
+}
+
+void SoundManager::_sfRemoveFromPlayList(Sound *sound) {
+ Common::StackLock slock(sfManager()._serverSuspendedMutex);
+
+ if (_sfDoRemoveFromPlayList(sound))
+ _sfRethinkVoiceTypes();
+}
+
+bool SoundManager::_sfIsOnPlayList(Sound *sound) {
+ Common::StackLock slock(sfManager()._serverSuspendedMutex);
+
+ bool result = contains(_soundManager->_playList, sound);
+
+ return result;
+}
+
+void SoundManager::_sfRethinkSoundDrivers() {
+ // Free any existing entries
+ int idx;
+
+ for (idx = 0; idx < SOUND_ARR_SIZE; ++idx) {
+ if (sfManager()._voiceTypeStructPtrs[idx]) {
+ delete sfManager()._voiceTypeStructPtrs[idx];
+ sfManager()._voiceTypeStructPtrs[idx] = NULL;
+ }
+ }
+
+ for (idx = 0; idx < SOUND_ARR_SIZE; ++idx) {
+ byte flag = 0xff;
+ int total = 0;
+
+ // Loop through the sound drivers
+ for (Common::List<SoundDriver *>::iterator i = sfManager()._installedDrivers.begin();
+ i != sfManager()._installedDrivers.end(); ++i) {
+ // Process the group data for each sound driver
+ SoundDriver *driver = *i;
+ const byte *groupData = driver->_groupOffset->pData;
+
+ while (*groupData != 0xff) {
+ byte byteVal = *groupData++;
+
+ if (byteVal == idx) {
+ byte byteVal2 = *groupData++;
+ if (flag == 0xff)
+ flag = byteVal2;
+ else {
+ assert(flag == byteVal2);
+ }
+
+ if (!flag) {
+ while (*groupData++ != 0xff)
+ ++total;
+ } else {
+ total += *groupData;
+ groupData += 2;
+ }
+ } else if (*groupData++ == 0) {
+ while (*groupData != 0xff)
+ ++groupData;
+ ++groupData;
+ } else {
+ groupData += 2;
+ }
+ }
+ }
+
+ if (total) {
+ VoiceTypeStruct *vs = new VoiceTypeStruct();
+ sfManager()._voiceTypeStructPtrs[idx] = vs;
+
+ if (!flag) {
+ vs->_voiceType = VOICETYPE_0;
+ } else {
+ vs->_voiceType = VOICETYPE_1;
+ }
+
+ vs->_total = vs->_numVoices = total;
+ vs->_field3 = 0;
+
+ for (Common::List<SoundDriver *>::iterator i = sfManager()._installedDrivers.begin();
+ i != sfManager()._installedDrivers.end(); ++i) {
+ // Process the group data for each sound driver
+ SoundDriver *driver = *i;
+ const byte *groupData = driver->_groupOffset->pData;
+
+ while (*groupData != 0xff) {
+ byte byteVal = *groupData++;
+
+ if (byteVal == idx) {
+ ++groupData;
+
+ if (!flag) {
+ while ((byteVal = *groupData++) != 0xff) {
+ VoiceStructEntry ve;
+ memset(&ve, 0, sizeof(VoiceStructEntry));
+
+ ve._field1 = (byteVal & 0x80) ? 0 : 1;
+ ve._driver = driver;
+ ve._type0._sound = NULL;
+ ve._type0._channelNum = 0;
+ ve._type0._priority = 0;
+ ve._type0._fieldA = 0;
+
+ vs->_entries.push_back(ve);
+ }
+ } else {
+ byteVal = *groupData;
+ groupData += 2;
+
+ for (int entryIndez = 0; entryIndez < byteVal; ++entryIndez) {
+ VoiceStructEntry ve;
+ memset(&ve, 0, sizeof(VoiceStructEntry));
+
+ ve._voiceNum = entryIndez;
+ ve._driver = driver;
+ ve._type1._field4 = -1;
+ ve._type1._field5 = 0;
+ ve._type1._field6 = 0;
+ ve._type1._sound = NULL;
+ ve._type1._channelNum = 0;
+ ve._type1._priority = 0;
+
+ vs->_entries.push_back(ve);
+ }
+ }
+ } else {
+ if (*groupData++ != 0) {
+ while (*groupData != 0xff)
+ ++groupData;
+ } else {
+ groupData += 2;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+void SoundManager::_sfRethinkVoiceTypes() {
+ _sfDereferenceAll();
+
+ // Pre-processing
+ for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
+ VoiceTypeStruct *vs = sfManager()._voiceTypeStructPtrs[voiceIndex];
+ if (!vs)
+ continue;
+
+ if (vs->_voiceType == VOICETYPE_0) {
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntry &vse = vs->_entries[idx];
+ vse._type0._sound3 = vse._type0._sound;
+ vse._type0._channelNum3 = vse._type0._channelNum;
+ vse._type0._priority3 = vse._type0._priority;
+ vse._type0._field1A = vse._type0._fieldA;
+ vse._type0._sound = NULL;
+ vse._type0._channelNum = 0;
+ vse._type0._priority = 0;
+ vse._type0._fieldA = 0;
+ vse._type0._sound2 = NULL;
+ vse._type0._channelNum2 = 0;
+ vse._type0._priority2 = 0;
+ vse._type0._field12 = 0;
+ }
+ } else {
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntry &vse = vs->_entries[idx];
+ vse._type1._sound3 = vse._type1._sound;
+ vse._type1._channelNum3 = vse._type1._channelNum;
+ vse._type1._priority3 = vse._type1._priority;
+ vse._type1._sound = NULL;
+ vse._type1._channelNum = 0;
+ vse._type1._priority = 0;
+ vse._type1._sound2 = NULL;
+ vse._type1._channelNum2 = 0;
+ vse._type1._priority2 = 0;
+ }
+
+ // Reset the number of voices available
+ vs->_numVoices = vs->_total;
+ }
+ }
+
+ // Main processing loop
+ int priorityOffset = 0;
+ for (Common::List<Sound *>::iterator i = sfManager()._playList.begin(); i != sfManager()._playList.end(); ++i, priorityOffset += 16) {
+ Sound *sound = *i;
+ if ((sound->_mutedCount != 0) || (sound->_pausedCount != 0))
+ continue;
+
+ _sfUpdateVoiceStructs();
+ Common::set_to(sound->_chWork, sound->_chWork + SOUND_ARR_SIZE, false);
+
+ for (;;) {
+ // Scan for sub priority
+ int foundIndex = -1, foundPriority = 0;
+ for (int idx = 0; idx < SOUND_ARR_SIZE; ++idx) {
+ if (!(sound->_chFlags[idx] & 0x8000) & !sound->_chWork[idx]) {
+ int subPriority = sound->_chSubPriority[idx];
+ if (subPriority)
+ subPriority = 16 - subPriority + priorityOffset;
+
+ if (foundIndex != -1) {
+ if (subPriority < foundPriority) {
+ foundIndex = idx;
+ foundPriority = subPriority;
+ }
+ } else {
+ foundIndex = idx;
+ foundPriority = subPriority;
+ }
+ }
+ }
+ if (foundIndex == -1)
+ break;
+
+ int chNumVoices = sound->_chNumVoices[foundIndex];
+ sound->_chWork[foundIndex] = true;
+
+ VoiceTypeStruct *vtStruct = sfManager()._voiceTypeStructPtrs[sound->_chVoiceType[foundIndex]];
+ if (!vtStruct) {
+ if (foundPriority)
+ continue;
+
+ _sfUpdateVoiceStructs2();
+ break;
+ }
+
+ if (vtStruct->_voiceType != VOICETYPE_0) {
+ // Type 1
+ int numVoices = vtStruct->_numVoices;
+
+ if (numVoices >= chNumVoices) {
+ int channelCount = chNumVoices, idx = 0;
+ while (channelCount > 0) {
+ if (!vtStruct->_entries[idx]._type1._sound2) {
+ vtStruct->_entries[idx]._type1._sound2 = sound;
+ vtStruct->_entries[idx]._type1._channelNum2 = foundIndex;
+ vtStruct->_entries[idx]._type1._priority2 = foundPriority;
+ --channelCount;
+ }
+ ++idx;
+ }
+
+ vtStruct->_numVoices -= chNumVoices;
+ continue;
+ } else if (!foundPriority) {
+ do {
+ int maxPriority = 0;
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx)
+ maxPriority = MAX(maxPriority, vtStruct->_entries[idx]._type1._priority2);
+
+ if (!maxPriority) {
+ _sfUpdateVoiceStructs2();
+ break;
+ }
+
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if (vtStruct->_entries[idx]._type1._priority2 == maxPriority) {
+ vtStruct->_entries[idx]._type1._sound2 = NULL;
+ vtStruct->_entries[idx]._type1._channelNum2 = 0;
+ vtStruct->_entries[idx]._type1._priority2 = 0;
+ ++numVoices;
+ }
+ }
+ } while (chNumVoices > numVoices);
+
+ int voicesCtr = chNumVoices;
+ for (uint idx = 0; (idx < vtStruct->_entries.size()) && (voicesCtr > 0); ++idx) {
+ if (!vtStruct->_entries[idx]._type1._sound2) {
+ vtStruct->_entries[idx]._type1._sound2 = sound;
+ vtStruct->_entries[idx]._type1._channelNum2 = foundIndex;
+ vtStruct->_entries[idx]._type1._priority2 = foundPriority;
+ --voicesCtr;
+ }
+ }
+
+ numVoices -= chNumVoices;
+ vtStruct->_numVoices = numVoices;
+ continue;
+ } else if (!numVoices) {
+ break;
+ }
+ continue;
+ } else {
+ // Type 0
+ if (sound->_isEmpty) {
+ uint idx = 0;
+ while ((idx < vtStruct->_entries.size()) &&
+ (vtStruct->_entries[idx]._voiceNum == foundIndex))
+ ++idx;
+ if (idx == vtStruct->_entries.size())
+ continue;
+ }
+
+ int flagsVal = sound->_chFlags[foundIndex] & 3;
+ if (flagsVal != 1) {
+ // All modes except mode 1 (loc_23EDF)
+ int entryIndex = -1, maxVoiceNum = 0;
+
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if (!vtStruct->_entries[idx]._type0._sound2 && (vtStruct->_entries[idx]._field1 != 0) &&
+ (vtStruct->_entries[idx]._voiceNum > maxVoiceNum)) {
+ maxVoiceNum = vtStruct->_entries[idx]._voiceNum;
+ entryIndex = idx;
+ }
+ }
+
+ if (entryIndex != -1) {
+ vtStruct->_entries[entryIndex]._type0._sound2 = sound;
+ vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
+ vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
+ vtStruct->_entries[entryIndex]._type0._field12 = 0;
+ continue;
+ }
+
+ if (foundPriority != 0)
+ continue;
+
+ int maxPriority = 0;
+ entryIndex = -1;
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if ((vtStruct->_entries[idx]._field1 != 0) &&
+ (vtStruct->_entries[idx]._type0._priority2 > maxPriority)) {
+ maxPriority = vtStruct->_entries[idx]._type0._priority2;
+ entryIndex = idx;
+ }
+ }
+
+ if (entryIndex != -1) {
+ vtStruct->_entries[entryIndex]._type0._sound2 = sound;
+ vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
+ vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
+ vtStruct->_entries[entryIndex]._type0._field12 = 0;
+ continue;
+ }
+
+ _sfUpdateVoiceStructs2();
+ break;
+ } else {
+ // Channel mode 1 handling (loc_23FAC)
+
+ bool foundMatch = false;
+ int entryIndex = -1;
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if (vtStruct->_entries[idx]._voiceNum == foundIndex) {
+ foundIndex = true;
+ if (!vtStruct->_entries[idx]._type0._sound2) {
+ entryIndex = idx;
+ break;
+ }
+ }
+ }
+
+ if (entryIndex != -1) {
+ vtStruct->_entries[entryIndex]._type0._sound2 = sound;
+ vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
+ vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
+ vtStruct->_entries[entryIndex]._type0._field12 = 0;
+ continue;
+ }
+
+ if (!foundMatch) {
+ if (foundPriority)
+ continue;
+ if (entryIndex == -1) {
+ _sfUpdateVoiceStructs2();
+ break;
+ }
+ }
+
+ // Find the entry with the highest priority
+ int maxPriority = 0;
+ foundMatch = false;
+ entryIndex = -1;
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if (vtStruct->_entries[idx]._voiceNum != foundIndex)
+ continue;
+ if (!vtStruct->_entries[idx]._type0._field12) {
+ foundMatch = true;
+ break;
+ }
+
+ if (vtStruct->_entries[idx]._type0._priority2 > maxPriority) {
+ maxPriority = vtStruct->_entries[idx]._type0._priority2;
+ entryIndex = -1;
+ }
+ }
+
+ if (!foundMatch) {
+ if (foundPriority)
+ continue;
+
+ if (entryIndex != -1) {
+ vtStruct->_entries[entryIndex]._type0._sound2 = sound;
+ vtStruct->_entries[entryIndex]._type0._channelNum2 = foundIndex;
+ vtStruct->_entries[entryIndex]._type0._priority2 = foundPriority;
+ vtStruct->_entries[entryIndex]._type0._field12 = 1;
+ continue;
+ }
+
+ _sfUpdateVoiceStructs2();
+ break;
+ }
+
+ // Found a match (loc_24061)
+ maxPriority = 0;
+ int maxVoiceNum = 0;
+ int priorityIndex = -1, voiceIndex = -1;
+
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if (vtStruct->_entries[idx]._field1) {
+ if (!vtStruct->_entries[idx]._type0._sound2) {
+ if (vtStruct->_entries[idx]._voiceNum > maxVoiceNum) {
+ maxVoiceNum = vtStruct->_entries[idx]._voiceNum;
+ voiceIndex = idx;
+ }
+ } else {
+ if (vtStruct->_entries[idx]._type0._priority2 > maxPriority) {
+ maxPriority = vtStruct->_entries[idx]._type0._priority2;
+ priorityIndex = idx;
+ }
+ }
+ }
+ }
+
+ if (voiceIndex != -1) {
+ VoiceStructEntryType0 &vteSrc = vtStruct->_entries[foundIndex]._type0;
+ VoiceStructEntryType0 &vteDest = vtStruct->_entries[voiceIndex]._type0;
+
+ vteDest._sound2 = vteSrc._sound2;
+ vteDest._channelNum2 = vteSrc._channelNum2;
+ vteDest._priority2 = vteSrc._priority2;
+
+ vteSrc._sound2 = sound;
+ vteSrc._channelNum2 = foundIndex;
+ vteSrc._priority2 = foundPriority;
+ vteSrc._field12 = 1;
+ continue;
+ }
+
+ if (!foundPriority)
+ continue;
+ if (priorityIndex == -1) {
+ _sfUpdateVoiceStructs2();
+ break;
+ }
+
+ VoiceStructEntryType0 &vteSrc = vtStruct->_entries[foundIndex]._type0;
+ VoiceStructEntryType0 &vteDest = vtStruct->_entries[priorityIndex]._type0;
+
+ if (priorityIndex != foundIndex) {
+ vteDest._sound2 = vteSrc._sound2;
+ vteDest._channelNum2 = vteSrc._channelNum2;
+ vteDest._priority2 = vteSrc._priority2;
+ vteDest._field12 = vteSrc._field12;
+ }
+
+ vteSrc._sound2 = sound;
+ vteSrc._channelNum2 = foundIndex;
+ vteSrc._priority2 = foundPriority;
+ vteSrc._field12 = 1;
+ continue;
+ }
+ }
+ }
+ }
+
+ // Post-processing
+ for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
+ VoiceTypeStruct *vs = sfManager()._voiceTypeStructPtrs[voiceIndex];
+ if (!vs)
+ continue;
+
+ if (vs->_voiceType == VOICETYPE_0) {
+ // Type 0
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntryType0 &vse = vs->_entries[idx]._type0;
+ SoundDriver *driver = vs->_entries[idx]._driver;
+ assert(driver);
+
+ if (vse._field12) {
+ int total = 0;
+ vse._sound = vse._sound2;
+ if (vse._sound3 != vse._sound)
+ ++total;
+
+ vse._channelNum = vse._channelNum2;
+ if (vse._channelNum3 != vse._channelNum)
+ ++total;
+
+ vse._priority = vse._priority2;
+ vse._fieldA = 1;
+ vse._sound2 = NULL;
+
+ if (total) {
+ driver->proc24(vse._channelNum, idx, vse._sound, 123, 0);
+ driver->proc24(vse._channelNum, idx, vse._sound, 1, vse._sound->_chModulation[vse._channelNum]);
+ driver->proc24(vse._channelNum, idx, vse._sound, 7,
+ vse._sound->_chVolume[vse._channelNum] * vse._sound->_volume / 127);
+ driver->proc24(vse._channelNum, idx, vse._sound, 10, vse._sound->_chPan[vse._channelNum]);
+ driver->proc24(vse._channelNum, idx, vse._sound, 64, vse._sound->_chDamper[vse._channelNum]);
+
+ driver->setProgram(vse._channelNum, vse._sound->_chProgram[vse._channelNum]);
+ driver->setPitchBlend(vse._channelNum, vse._sound->_chPitchBlend[vse._channelNum]);
+
+ vse._sound3 = NULL;
+ }
+ } else {
+ vse._sound = NULL;
+ vse._channelNum = 0;
+ vse._priority = 0;
+ vse._fieldA = 0;
+ }
+ }
+
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntryType0 &vse = vs->_entries[idx]._type0;
+ Sound *sound = vse._sound2;
+ int channelNum = vse._channelNum2;
+
+ if (!sound)
+ continue;
+
+ for (uint entryIndex = 0; entryIndex < vs->_entries.size(); ++entryIndex) {
+ if ((vs->_entries[entryIndex]._type0._sound3 != sound) ||
+ (vs->_entries[entryIndex]._type0._channelNum3 != channelNum)) {
+ // Found match
+ vs->_entries[entryIndex]._type0._sound = sound;
+ vs->_entries[entryIndex]._type0._channelNum = channelNum;
+ vs->_entries[entryIndex]._type0._priority = vse._priority2;
+ vs->_entries[entryIndex]._type0._fieldA = 0;
+ vse._sound2 = NULL;
+ break;
+ }
+ }
+ }
+
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntryType0 &vse = vs->_entries[idx]._type0;
+ Sound *sound = vse._sound2;
+ if (!sound)
+ continue;
+
+ int voiceNum = 0, foundIndex = -1;
+ for (uint entryIndex = 0; entryIndex < vs->_entries.size(); ++entryIndex) {
+ if ((vs->_entries[entryIndex]._field1) && !vs->_entries[entryIndex]._type0._sound) {
+ int tempVoice = vs->_entries[entryIndex]._voiceNum;
+
+ if (voiceNum <= tempVoice) {
+ voiceNum = tempVoice;
+ foundIndex = entryIndex;
+ }
+ }
+ }
+ assert(foundIndex != -1);
+
+ VoiceStructEntryType0 &vseFound = vs->_entries[foundIndex]._type0;
+
+ vseFound._sound = vse._sound2;
+ vseFound._channelNum = vse._channelNum2;
+ vseFound._priority = vse._priority2;
+ vseFound._fieldA = 0;
+
+ SoundDriver *driver = vs->_entries[foundIndex]._driver;
+ assert(driver);
+
+ driver->proc24(vseFound._channelNum, voiceIndex, vseFound._sound, 123, 0);
+ driver->proc24(vseFound._channelNum, voiceIndex, vseFound._sound,
+ 1, vseFound._sound->_chModulation[vseFound._channelNum]);
+ driver->proc24(vseFound._channelNum, voiceIndex, vseFound._sound,
+ 7, vseFound._sound->_chVolume[vseFound._channelNum] * vseFound._sound->_volume / 127);
+ driver->proc24(vseFound._channelNum, voiceIndex, vseFound._sound,
+ 10, vseFound._sound->_chPan[vseFound._channelNum]);
+ driver->setProgram(vseFound._channelNum, vseFound._sound->_chProgram[vseFound._channelNum]);
+ driver->setPitchBlend(vseFound._channelNum, vseFound._sound->_chPitchBlend[vseFound._channelNum]);
+ }
+
+ // Final loop
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntryType0 &vse = vs->_entries[idx]._type0;
+
+ if (!vse._sound && (vse._sound3)) {
+ SoundDriver *driver = vs->_entries[idx]._driver;
+ assert(driver);
+ driver->proc24(vs->_entries[idx]._voiceNum, voiceIndex, vse._sound3, 123, 0);
+ }
+ }
+
+ } else {
+ // Type 1
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntry &vse = vs->_entries[idx];
+ vse._type1._sound = NULL;
+ vse._type1._channelNum = 0;
+ vse._type1._priority = 0;
+ }
+
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntryType1 &vse = vs->_entries[idx]._type1;
+ Sound *sound = vse._sound2;
+ int channelNum = vse._channelNum2;
+
+ if (!sound)
+ continue;
+
+ for (uint entryIndex = 0; entryIndex < vs->_entries.size(); ++entryIndex) {
+ VoiceStructEntryType1 &vse2 = vs->_entries[entryIndex]._type1;
+ if (!vse2._sound && (vse2._sound3 == sound) && (vse2._channelNum3 == channelNum)) {
+ vse2._sound = sound;
+ vse2._channelNum = channelNum;
+ vse2._priority = vse._priority2;
+ vse._sound2 = NULL;
+ break;
+ }
+ }
+ }
+
+ uint idx2 = 0;
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntryType1 &vse = vs->_entries[idx]._type1;
+ Sound *sound = vse._sound2;
+ if (!sound)
+ continue;
+
+ while (vs->_entries[idx2]._type1._sound)
+ ++idx2;
+
+ VoiceStructEntryType1 &vse2 = vs->_entries[idx2]._type1;
+ vse2._sound = vse._sound2;
+ vse2._channelNum = vse._channelNum2;
+ vse2._priority = vse._priority2;
+ vse2._field4 = -1;
+ vse2._field5 = 0;
+ vse2._field6 = 0;
+
+ SoundDriver *driver = vs->_entries[idx2]._driver;
+ assert(driver);
+
+ driver->updateVoice(vs->_entries[idx2]._voiceNum);
+ driver->proc38(vs->_entries[idx2]._voiceNum, 1, vse2._sound->_chModulation[vse2._channelNum]);
+ driver->proc38(vs->_entries[idx2]._voiceNum, 7,
+ vse2._sound->_chVolume[vse2._channelNum] * vse2._sound->_volume / 127);
+ driver->proc38(vs->_entries[idx2]._voiceNum, 10, vse2._sound->_chPan[vse2._channelNum]);
+ driver->setPitch(vs->_entries[idx2]._voiceNum, vse2._sound->_chPitchBlend[vse2._channelNum]);
+ }
+
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntryType1 &vse = vs->_entries[idx]._type1;
+
+ if (!vse._sound && (vse._sound3)) {
+ vse._field4 = -1;
+ vse._field5 = 0;
+ vse._field6 = 0;
+
+ SoundDriver *driver = vs->_entries[idx]._driver;
+ assert(driver);
+ driver->updateVoice(vs->_entries[idx]._voiceNum);
+ }
+ }
+ }
+ }
+}
+
+void SoundManager::_sfUpdateVolume(Sound *sound) {
+ _sfDereferenceAll();
+ _sfDoUpdateVolume(sound);
+}
+
+void SoundManager::_sfDereferenceAll() {
+ // Orignal used handles for both the driver list and voiceTypeStructPtrs list. This method then refreshed
+ // pointer lists based on the handles. Since in ScummVM we're just using pointers directly, this
+ // method doesn't need any implementation
+}
+
+void SoundManager::_sfUpdatePriority(Sound *sound) {
+ Common::StackLock slock(sfManager()._serverSuspendedMutex);
+
+ int tempPriority = (sound->_fixedPriority == 255) ? sound->_sndResPriority : sound->_priority;
+ if (sound->_priority != tempPriority) {
+ sound->_priority = tempPriority;
+ if (_sfDoRemoveFromPlayList(sound)) {
+ _sfDoAddToPlayList(sound);
+ _sfRethinkVoiceTypes();
+ }
+ }
+}
+
+void SoundManager::_sfUpdateLoop(Sound *sound) {
+ if (sound->_fixedLoop)
+ sound->_loop = sound->_sndResLoop;
+ else
+ sound->_loop = sound->_fixedLoop;
+}
+
+void SoundManager::_sfSetMasterVol(int volume) {
+ if (volume > 127)
+ volume = 127;
+
+ if (volume != _soundManager->_masterVol) {
+ _soundManager->_masterVol = volume;
+
+ for (Common::List<SoundDriver *>::iterator i = _soundManager->_installedDrivers.begin();
+ i != _soundManager->_installedDrivers.end(); ++i) {
+ (*i)->setMasterVolume(volume);
+ }
+ }
+}
+
+void SoundManager::_sfExtractTrackInfo(trackInfoStruct *trackInfo, const byte *soundData, int groupNum) {
+ trackInfo->_numTracks = 0;
+
+ const byte *p = soundData + READ_LE_UINT16(soundData + 8);
+ uint32 v;
+ while ((v = READ_LE_UINT32(p)) != 0) {
+ if ((v == 0x80000000) || (v == (uint)groupNum)) {
+ // Found group to process
+ int count = READ_LE_UINT16(p + 4);
+ p += 6;
+
+ for (int idx = 0; idx < count; ++idx) {
+ if (trackInfo->_numTracks == 16) {
+ trackInfo->_numTracks = -1;
+ return;
+ }
+
+ trackInfo->_chunks[trackInfo->_numTracks] = READ_LE_UINT16(p);
+ trackInfo->_voiceTypes[trackInfo->_numTracks] = READ_LE_UINT16(p + 2);
+ ++trackInfo->_numTracks;
+ p += 4;
+ }
+ } else {
+ // Not correct group, so move to next one
+ p += 6 + (READ_LE_UINT16(p + 4) * 4);
+ }
+ }
+}
+
+void SoundManager::_sfTerminate() {
+
+}
+
+void SoundManager::_sfExtractGroupMask() {
+ uint32 mask = 0;
+
+ for (Common::List<SoundDriver *>::iterator i = sfManager()._installedDrivers.begin();
+ i != sfManager()._installedDrivers.end(); ++i)
+ mask |= (*i)->_groupMask;
+
+ _soundManager->_groupsAvail = mask;
+}
+
+bool SoundManager::_sfInstallDriver(SoundDriver *driver) {
+ if (!driver->open())
+ return false;
+
+ sfManager()._installedDrivers.push_back(driver);
+ driver->_groupOffset = driver->getGroupData();
+ driver->_groupMask = READ_LE_UINT32(driver->_groupOffset);
+
+ _sfExtractGroupMask();
+ _sfRethinkSoundDrivers();
+ driver->setMasterVolume(sfManager()._masterVol);
+
+ return true;
+}
+
+void SoundManager::_sfUnInstallDriver(SoundDriver *driver) {
+ sfManager()._installedDrivers.remove(driver);
+ delete driver;
+
+ _sfExtractGroupMask();
+ _sfRethinkSoundDrivers();
+}
+
+void SoundManager::_sfInstallPatchBank(SoundDriver *driver, const byte *bankData) {
+ driver->installPatch(bankData, _vm->_memoryManager.getSize(bankData));
+}
+
+/**
+ * Adds the specified sound in the playing sound list, inserting in order of priority
+ */
+void SoundManager::_sfDoAddToPlayList(Sound *sound) {
+ Common::StackLock slock2(sfManager()._serverSuspendedMutex);
+
+ Common::List<Sound *>::iterator i = sfManager()._playList.begin();
+ while ((i != sfManager()._playList.end()) && (sound->_priority > (*i)->_priority))
+ ++i;
+
+ sfManager()._playList.insert(i, sound);
+}
+
+/**
+ * Removes the specified sound from the play list
+ */
+bool SoundManager::_sfDoRemoveFromPlayList(Sound *sound) {
+ Common::StackLock slock(sfManager()._serverSuspendedMutex);
+
+ bool result = false;
+ for (Common::List<Sound *>::iterator i = sfManager()._playList.begin(); i != sfManager()._playList.end(); ++i) {
+ if (*i == sound) {
+ result = true;
+ sfManager()._playList.erase(i);
+ break;
+ }
+ }
+
+ return result;
+}
+
+void SoundManager::_sfDoUpdateVolume(Sound *sound) {
+ Common::StackLock slock(sfManager()._serverSuspendedMutex);
+
+ for (int voiceIndex = 0; voiceIndex < SOUND_ARR_SIZE; ++voiceIndex) {
+ VoiceTypeStruct *vs = sfManager()._voiceTypeStructPtrs[voiceIndex];
+ if (!vs)
+ continue;
+
+ for (uint idx = 0; idx < vs->_entries.size(); ++idx) {
+ VoiceStructEntry &vse = vs->_entries[idx];
+ SoundDriver *driver = vse._driver;
+
+ if (vs->_voiceType == VOICETYPE_0) {
+ if (vse._type0._sound) {
+ int vol = sound->_volume * sound->_chVolume[vse._type0._channelNum] / 127;
+ driver->proc24(voiceIndex, vse._voiceNum, sound, 7, vol);
+ }
+ } else {
+ if (vse._type1._sound) {
+ int vol = sound->_volume * sound->_chVolume[vse._type1._channelNum] / 127;
+ driver->proc38(vse._voiceNum, 7, vol);
+ }
+ }
+ }
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Sound::Sound() {
+ _stoppedAsynchronously = false;
+ _soundResID = 0;
+ _group = 0;
+ _sndResPriority = 0;
+ _fixedPriority = -1;
+ _sndResLoop = 1;
+ _fixedLoop = -1;
+ _priority = 0;
+ _volume = 127;
+ _loop = 0;
+ _pausedCount = 0;
+ _mutedCount = 0;
+ _hold = 0xff;
+ _cueValue = -1;
+ _fadeDest = -1;
+ _fadeSteps = 0;
+ _fadeTicks = 0;
+ _fadeCounter = 0;
+ _stopAfterFadeFlag = false;
+ _timer = 0;
+ _newTimeIndex = 0;
+ _loopTimer = 0;
+ _trackInfo._numTracks = 0;
+ _primed = false;
+ _isEmpty = false;
+ _remoteReceiver = NULL;
+
+
+ memset(_chProgram, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chModulation, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chVolume, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chPan, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chDamper, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chPitchBlend, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chVoiceType, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chNumVoices, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chSubPriority, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_chFlags, 0, SOUND_ARR_SIZE * sizeof(int));
+ Common::set_to(_chWork, _chWork + SOUND_ARR_SIZE, false);
+ memset(_channelData, 0, SOUND_ARR_SIZE * sizeof(byte *));
+ memset(_trkChannel, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_trkState, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_trkLoopState, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_trkIndex, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_trkLoopIndex, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_trkRest, 0, SOUND_ARR_SIZE * sizeof(int));
+ memset(_trkLoopRest, 0, SOUND_ARR_SIZE * sizeof(int));
+}
+
+Sound::~Sound() {
+ stop();
+}
+
+void Sound::synchronize(Serializer &s) {
+ if (s.getVersion() < 6)
+ return;
+
+ assert(!_remoteReceiver);
+
+ s.syncAsSint16LE(_soundResID);
+ s.syncAsByte(_primed);
+ s.syncAsByte(_stoppedAsynchronously);
+ s.syncAsSint16LE(_group);
+ s.syncAsSint16LE(_sndResPriority);
+ s.syncAsSint16LE(_fixedPriority);
+ s.syncAsSint16LE(_sndResLoop);
+ s.syncAsSint16LE(_fixedLoop);
+ s.syncAsSint16LE(_priority);
+ s.syncAsSint16LE(_volume);
+ s.syncAsSint16LE(_loop);
+ s.syncAsSint16LE(_pausedCount);
+ s.syncAsSint16LE(_mutedCount);
+ s.syncAsSint16LE(_hold);
+ s.syncAsSint16LE(_cueValue);
+ s.syncAsSint16LE(_fadeDest);
+ s.syncAsSint16LE(_fadeSteps);
+ s.syncAsUint32LE(_fadeTicks);
+ s.syncAsUint32LE(_fadeCounter);
+ s.syncAsByte(_stopAfterFadeFlag);
+ s.syncAsUint32LE(_timer);
+ s.syncAsSint16LE(_loopTimer);
+}
+
+void Sound::play(int soundNum) {
+ prime(soundNum);
+ _soundManager->addToPlayList(this);
+}
+
+void Sound::stop() {
+ _globals->_soundManager.removeFromPlayList(this);
+ _unPrime();
+}
+
+void Sound::prime(int soundResID) {
+ if (_soundResID != -1) {
+ stop();
+ _prime(soundResID, false);
+ }
+}
+
+void Sound::unPrime() {
+ stop();
+}
+
+void Sound::_prime(int soundResID, bool dontQueue) {
+ if (_primed)
+ unPrime();
+
+ _soundResID = soundResID;
+ if (_soundResID != -1) {
+ // Sound number specified
+ _isEmpty = false;
+ _remoteReceiver = NULL;
+ byte *soundData = _resourceManager->getResource(RES_SOUND, soundResID, 0);
+ _soundManager->checkResVersion(soundData);
+ _group = _soundManager->determineGroup(soundData);
+ _sndResPriority = _soundManager->extractPriority(soundData);
+ _sndResLoop = _soundManager->extractLoop(soundData);
+ _soundManager->extractTrackInfo(&_trackInfo, soundData, _group);
+
+ for (int idx = 0; idx < _trackInfo._numTracks; ++idx) {
+ _channelData[idx] = _resourceManager->getResource(RES_SOUND, soundResID, _trackInfo._chunks[idx]);
+ }
+
+ DEALLOCATE(soundData);
+ } else {
+ // No sound specified
+ _isEmpty = true;
+ _group = 0;
+ _sndResPriority = 0;
+ _sndResLoop = 0;
+ _trackInfo._numTracks = 0;
+ _channelData[0] = ALLOCATE(200);
+ _remoteReceiver = ALLOCATE(200);
+ }
+
+ _soPrimeSound(dontQueue);
+ if (!dontQueue)
+ _soundManager->addToSoundList(this);
+
+ _primed = true;
+}
+
+void Sound::_unPrime() {
+ if (_primed) {
+ if (_isEmpty) {
+ DEALLOCATE(_channelData[0]);
+ DEALLOCATE(_remoteReceiver);
+ _remoteReceiver = NULL;
+ } else {
+ for (int idx = 0; idx < _trackInfo._numTracks; ++idx) {
+ DEALLOCATE(_channelData[idx]);
+ }
+ }
+
+ _trackInfo._numTracks = 0;
+ if (_soundManager)
+ _soundManager->removeFromSoundList(this);
+
+ _primed = false;
+ _stoppedAsynchronously = false;
+ }
+}
+
+void Sound::orientAfterDriverChange() {
+ if (!_isEmpty) {
+ int timeIndex = getTimeIndex();
+
+ for (int idx = 0; idx < _trackInfo._numTracks; ++idx)
+ DEALLOCATE(_channelData[idx]);
+
+ _trackInfo._numTracks = 0;
+ _primed = false;
+ _prime(_soundResID, true);
+
+ setTimeIndex(timeIndex);
+ }
+}
+
+void Sound::orientAfterRestore() {
+ if (!_isEmpty) {
+ int timeIndex = getTimeIndex();
+ _primed = false;
+ _prime(_soundResID, true);
+ setTimeIndex(timeIndex);
+ }
+}
+
+void Sound::go() {
+ if (!_primed)
+ error("Attempt to execute Sound::go() on an unprimed Sound");
+
+ _soundManager->addToPlayList(this);
+}
+
+void Sound::halt(void) {
+ _soundManager->removeFromPlayList(this);
+}
+
+int Sound::getSoundNum() const {
+ return _soundResID;
+}
+
+bool Sound::isPlaying() {
+ return _soundManager->isOnPlayList(this);
+}
+
+bool Sound::isPrimed() const {
+ return _primed;
+}
+
+bool Sound::isPaused() const {
+ return _pausedCount != 0;
+}
+
+bool Sound::isMuted() const {
+ return _mutedCount != 0;
+}
+
+void Sound::pause(bool flag) {
+ Common::StackLock slock(_globals->_soundManager._serverSuspendedMutex);
+
+ if (flag)
+ ++_pausedCount;
+ else if (_pausedCount > 0)
+ --_pausedCount;
+
+ _soundManager->rethinkVoiceTypes();
+}
+
+void Sound::mute(bool flag) {
+ Common::StackLock slock(_globals->_soundManager._serverSuspendedMutex);
+
+ if (flag)
+ ++_mutedCount;
+ else if (_mutedCount > 0)
+ --_mutedCount;
+
+ _soundManager->rethinkVoiceTypes();
+}
+
+void Sound::fade(int fadeDest, int fadeSteps, int fadeTicks, bool stopAfterFadeFlag) {
+ Common::StackLock slock(_globals->_soundManager._serverSuspendedMutex);
+
+ if (fadeDest > 127)
+ fadeDest = 127;
+ if (fadeTicks > 127)
+ fadeTicks = 127;
+ if (fadeSteps > 255)
+ fadeSteps = 255;
+
+ _fadeDest = fadeDest;
+ _fadeTicks = fadeTicks;
+ _fadeSteps = fadeSteps;
+ _fadeCounter = 0;
+ _stopAfterFadeFlag = stopAfterFadeFlag;
+}
+
+void Sound::setTimeIndex(uint32 timeIndex) {
+ if (_primed)
+ _newTimeIndex = timeIndex;
+}
+
+uint32 Sound::getTimeIndex() const {
+ return _timer;
+}
+
+int Sound::getCueValue() const {
+ return _cueValue;
+}
+
+void Sound::setCueValue(int cueValue) {
+ _cueValue = cueValue;
+}
+
+void Sound::setVol(int volume) {
+ if (volume > 127)
+ volume = 127;
+
+ if (_volume != volume) {
+ _volume = volume;
+ if (isPlaying())
+ _soundManager->updateSoundVol(this);
+ }
+}
+
+int Sound::getVol() const {
+ return _volume;
+}
+
+void Sound::setPri(int priority) {
+ if (priority > 127)
+ priority = 127;
+ _fixedPriority = priority;
+ _soundManager->updateSoundPri(this);
+}
+
+void Sound::setLoop(int flag) {
+ _fixedLoop = flag;
+ _soundManager->updateSoundLoop(this);
+}
+
+int Sound::getPri() const {
+ return _priority;
+}
+
+int Sound::getLoop() {
+ return _loop;
+}
+
+void Sound::holdAt(int amount) {
+ if (amount > 127)
+ amount = 127;
+ _hold = amount;
+}
+
+void Sound::release() {
+ _hold = -1;
+}
+
+void Sound::_soPrimeSound(bool dontQueue) {
+ if (!dontQueue) {
+ _priority = (_fixedPriority != -1) ? _fixedPriority : _sndResPriority;
+ _loop = !_fixedLoop ? _fixedLoop : _sndResLoop;
+ _pausedCount = 0;
+ _mutedCount = 0;
+ _hold = -1;
+ _cueValue = -1;
+ _fadeDest = -1;
+ _fadeSteps = 0;
+ _fadeTicks = 0;
+ _fadeCounter = 0;
+ _stopAfterFadeFlag = false;
+ }
+
+ _timer = 0;
+ _newTimeIndex = 0;
+ _loopTimer = 0;
+ _soPrimeChannelData();
+}
+
+void Sound::_soSetTimeIndex(uint timeIndex) {
+ Common::StackLock slock(_globals->_soundManager._serverSuspendedMutex);
+
+ if (timeIndex != _timer) {
+ _soundManager->_soTimeIndexFlag = true;
+ _timer = 0;
+ _loopTimer = 0;
+ _soPrimeChannelData();
+
+ while (timeIndex > 0) {
+ if (_soServiceTracks()) {
+ SoundManager::_sfDoRemoveFromPlayList(this);
+ _stoppedAsynchronously = true;
+ _soundManager->_needToRethink = true;
+ break;
+ }
+
+ --timeIndex;
+ }
+
+ _soundManager->_soTimeIndexFlag = false;
+ }
+}
+
+bool Sound::_soServiceTracks() {
+ if (_isEmpty) {
+ _soRemoteReceive();
+ return false;
+ }
+
+ bool flag = true;
+ for (int trackCtr = 0; trackCtr < _trackInfo._numTracks; ++trackCtr) {
+ int mode = *_channelData[trackCtr];
+
+ if (mode == 0) {
+ _soServiceTrackType0(trackCtr, _channelData[trackCtr]);
+ } else if (mode == 1) {
+ _soServiceTrackType1(trackCtr, _channelData[trackCtr]);
+ } else {
+ error("Unknown sound mode encountered");
+ }
+
+ if (_trkState[trackCtr])
+ flag = false;
+ }
+
+ ++_timer;
+ if (!flag)
+ return false;
+ else if ((_loop > 0) && (--_loop == 0))
+ return true;
+ else {
+ for (int trackCtr = 0; trackCtr < _trackInfo._numTracks; ++trackCtr) {
+ _trkState[trackCtr] = _trkLoopState[trackCtr];
+ _trkRest[trackCtr] = _trkLoopRest[trackCtr];
+ _trkIndex[trackCtr] = _trkLoopIndex[trackCtr];
+ }
+
+ _timer = _loopTimer;
+ return false;
+ }
+}
+
+void Sound::_soPrimeChannelData() {
+ if (_isEmpty) {
+ for (int idx = 0; idx < 16; ++idx) {
+ _chProgram[idx] = 0;
+ _chModulation[idx] = 0;
+ _chVolume[idx] = 127;
+ _chPan[idx] = 64;
+ _chDamper[idx] = 0;
+ _chVoiceType[idx] = VOICETYPE_0;
+ _chNumVoices[idx] = 0;
+ _chSubPriority[idx] = 0;
+ _chPitchBlend[idx] = 0x2000;
+ _chFlags[idx] = 1;
+ }
+
+ _trkChannel[0] = 0;
+ _trkState[0] = 1;
+ _trkLoopState[0] = 1;
+ _trkIndex[0] = 0;
+ _trkLoopIndex[0] = 0;
+ } else {
+ for (int idx = 0; idx < SOUND_ARR_SIZE; ++idx)
+ _chFlags[idx] = 0x8000;
+
+ for (int idx = 0; idx < _trackInfo._numTracks; ++idx) {
+ byte *d = _channelData[idx];
+ int mode = *d;
+ int channelNum = (int8)*(d + 1);
+
+ _trkChannel[idx] = channelNum;
+ assert((channelNum >= -1) && (channelNum < 16));
+
+ if (channelNum >= 0) {
+ _chProgram[channelNum] = *(d + 10);
+ _chModulation[channelNum] = 0;
+ _chVolume[channelNum] = *(d + 11);
+ _chPan[channelNum] = *(d + 12);
+ _chDamper[channelNum] = 0;
+ _chVoiceType[channelNum] = _trackInfo._voiceTypes[idx];
+ _chNumVoices[channelNum] = *(d + 6);
+ _chSubPriority[channelNum] = *(d + 7);
+ _chPitchBlend[channelNum] = 0x2000;
+ _chFlags[channelNum] = READ_LE_UINT16(d + 8);
+ }
+
+ if (mode == 0) {
+ _trkState[idx] = 1;
+ _trkLoopState[idx] = 1;
+ _trkIndex[idx] = 14;
+ _trkLoopIndex[idx] = 14;
+ _trkRest[idx] = 0;
+ _trkLoopRest[idx] = 0;
+ } else if (mode == 1) {
+ _trkState[idx] = 1;
+ _trkLoopState[idx] = 1;
+ _trkIndex[idx] = 0;
+ _trkLoopIndex[idx] = 0;
+ _trkRest[idx] = 0;
+ _trkLoopRest[idx] = 0;
+ } else {
+ error("Unknown sound mode encountered");
+ }
+ }
+ }
+}
+
+void Sound::_soRemoteReceive() {
+ error("_soRemoteReceive not implemented");
+}
+
+void Sound::_soServiceTrackType0(int trackIndex, const byte *channelData) {
+ if (_trkRest[trackIndex]) {
+ --_trkRest[trackIndex];
+ return;
+ }
+ if (!_trkState[trackIndex])
+ return;
+
+ int channelNum = _trkChannel[trackIndex];
+ assert((channelNum >= -1) && (channelNum < SOUND_ARR_SIZE));
+ int chFlags = (channelNum == -1) ? 0 : _chFlags[channelNum];
+ int voiceNum = -1;
+ SoundDriver *driver = NULL;
+
+ VoiceTypeStruct *vtStruct;
+ VoiceType voiceType = VOICETYPE_0, chVoiceType = VOICETYPE_0;
+
+ if ((channelNum == -1) || _soundManager->_soTimeIndexFlag) {
+ vtStruct = NULL;
+ voiceType = VOICETYPE_0;
+ } else {
+ chVoiceType = (VoiceType)_chVoiceType[channelNum];
+ vtStruct = _soundManager->_voiceTypeStructPtrs[(int)chVoiceType];
+
+ if (vtStruct) {
+ voiceType = vtStruct->_voiceType;
+ if (voiceType == VOICETYPE_0) {
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ if (!vtStruct->_entries[idx]._type0._sound &&
+ (vtStruct->_entries[idx]._type0._channelNum != channelNum)) {
+ voiceNum = vtStruct->_entries[idx]._voiceNum;
+ driver = vtStruct->_entries[idx]._driver;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ const byte *pData = channelData + _trkIndex[trackIndex];
+
+ for (;;) {
+ byte v = *pData++;
+ if (!(v & 0x80)) {
+ // Area #1
+ if (!_soundManager->_soTimeIndexFlag) {
+ // Only do processing if fast forwarding to a given time index
+ if (channelNum != -1) {
+ if (voiceType == VOICETYPE_1) {
+ _soUpdateDamper(vtStruct, channelNum, chVoiceType, v);
+ } else if (voiceNum != -1) {
+ assert(driver);
+ driver->proc18(voiceNum, chVoiceType);
+ }
+ }
+ }
+ } else if (!(v & 0x40)) {
+ // Area #2
+ if (!_soundManager->_soTimeIndexFlag) {
+ // Only do processing if fast forwarding to a given time index
+ byte b = *pData++;
+ v <<= 1;
+ if (b & 0x80)
+ v |= 1;
+
+ b &= 0x7f;
+
+ if (channelNum != -1) {
+ if (voiceType != VOICETYPE_0) {
+ if (chFlags & 0x10)
+ _soProc42(vtStruct, channelNum, chVoiceType, v);
+ else
+ _soProc32(vtStruct, channelNum, chVoiceType, v, b);
+ } else if (voiceNum != -1) {
+ assert(driver);
+ driver->proc20(voiceNum, chVoiceType);
+ }
+ }
+ } else {
+ ++pData;
+ }
+ } else if (!(v & 0x20)) {
+ // Area #3
+ v &= 0x1f;
+
+ // Gather up an extended number
+ int trkRest = v;
+ while ((*pData & 0xE0) == 0xC0) {
+ byte b = *pData++;
+ trkRest = (trkRest << 5) | (b & 0x1f);
+ }
+
+ _trkRest[trackIndex] = trkRest - 1;
+ _trkIndex[trackIndex] = pData - channelData;
+ return;
+ } else if (!(v & 0x10)) {
+ // Area #4
+ v = (v & 0xf) << 1;
+
+ byte b = *pData++;
+ if (b & 0x80)
+ v |= 1;
+ b &= 0x7f;
+
+ assert(v < 4);
+ int cmdList[32] = { 1, 7, 10, 64 };
+ int cmdVal = cmdList[v];
+
+ if (channelNum == -1) {
+ if (_soDoUpdateTracks(cmdVal, b))
+ return;
+ } else {
+ _soDoTrackCommand(_trkChannel[trackIndex], cmdVal, b);
+
+ if (!_soundManager->_soTimeIndexFlag) {
+ if (cmdVal == 7)
+ b = static_cast<byte>(_volume * (int)b / 127);
+
+ if (voiceType != VOICETYPE_0) {
+ _soProc38(vtStruct, channelNum, chVoiceType, cmdVal, b);
+ } else if (voiceNum != -1) {
+ assert(driver);
+ driver->proc24(voiceNum, chVoiceType, this, cmdVal, b);
+ }
+ }
+ }
+ } else if (!(v & 0x8)) {
+ // Area #5
+ if (!_soundManager->_soTimeIndexFlag) {
+ // Only do processing if fast forwarding to a given time index
+ int cx = READ_LE_UINT16(pData);
+ pData += 2;
+
+ if (channelNum != -1) {
+ assert(driver);
+ driver->proc22(voiceNum, chVoiceType, cx);
+ }
+ } else {
+ pData += 2;
+ }
+ } else if (!(v & 0x4)) {
+ // Area #6
+ int cmd = *pData++;
+ int value = *pData++;
+
+ if (channelNum != -1) {
+ _soDoTrackCommand(_trkChannel[trackIndex], cmd, value);
+
+ if (!_soundManager->_soTimeIndexFlag) {
+ if (voiceType != VOICETYPE_0) {
+ _soProc38(vtStruct, channelNum, chVoiceType, cmd, value);
+ } else if (voiceNum != -1) {
+ assert(driver);
+ driver->proc24(voiceNum, chVoiceType, this, cmd, value);
+ }
+ }
+ } else if (_soDoUpdateTracks(cmd, value)) {
+ return;
+ }
+ } else if (!(v & 0x2)) {
+ // Area #7
+ if (!_soundManager->_soTimeIndexFlag) {
+ int pitchBlend = READ_BE_UINT16(pData);
+ pData += 2;
+
+ if (channelNum != -1) {
+ int channel = _trkChannel[trackIndex];
+ _chPitchBlend[channel] = pitchBlend;
+
+ if (voiceType != VOICETYPE_0) {
+ _soProc40(vtStruct, channelNum, pitchBlend);
+ } else if (voiceNum != -1) {
+ assert(driver);
+ driver->setPitchBlend(channel, pitchBlend);
+ }
+ }
+ } else {
+ pData += 2;
+ }
+ } else if (!(v & 0x1)) {
+ // Area #8
+ int program = *pData++;
+
+ if (channelNum != -1) {
+ int channel = _trkChannel[trackIndex];
+ _chProgram[channel] = program;
+
+ if (!_soundManager->_soTimeIndexFlag) {
+ if ((voiceType == VOICETYPE_0) && (voiceNum != -1)) {
+ assert(driver);
+ driver->setProgram(voiceNum, program);
+ }
+ }
+ } else {
+ _soSetTrackPos(trackIndex, pData - channelData, program);
+ }
+
+ } else {
+ // Area #9
+ byte b = *pData++;
+
+ if (b & 0x80) {
+ _trkState[trackIndex] = 0;
+ _trkIndex[trackIndex] = pData - channelData;
+ return;
+ }
+
+ if (!_soundManager->_soTimeIndexFlag) {
+ if ((channelNum != -1) && (voiceType == VOICETYPE_0) && (voiceNum != -1)) {
+ assert(driver);
+ driver->setVolume1(voiceNum, chVoiceType, 0, b);
+ }
+
+ }
+ }
+ }
+}
+
+void Sound::_soUpdateDamper(VoiceTypeStruct *voiceType, int channelNum, VoiceType mode, int v0) {
+ bool hasDamper = _chDamper[channelNum] != 0;
+
+ for (uint idx = 0; idx < voiceType->_entries.size(); ++idx) {
+ VoiceStructEntryType1 &vte = voiceType->_entries[idx]._type1;
+
+ if ((vte._field4 == v0) && (vte._channelNum == channelNum) && (vte._sound == this)) {
+ if (hasDamper)
+ vte._field5 = 1;
+ else {
+ SoundDriver *driver = voiceType->_entries[idx]._driver;
+ assert(driver);
+
+ vte._field4 = -1;
+ vte._field5 = 0;
+ driver->updateVoice(voiceType->_entries[idx]._voiceNum);
+ }
+ return;
+ }
+ }
+}
+
+void Sound::_soProc32(VoiceTypeStruct *vtStruct, int channelNum, VoiceType voiceType, int v0, int v1) {
+ int entryIndex = _soFindSound(vtStruct, channelNum);
+ if (entryIndex != -1) {
+ SoundDriver *driver = vtStruct->_entries[entryIndex]._driver;
+ assert(driver);
+
+ vtStruct->_entries[entryIndex]._type1._field6 = 0;
+ vtStruct->_entries[entryIndex]._type1._field4 = v0;
+ vtStruct->_entries[entryIndex]._type1._field5 = 0;
+
+ driver->proc32(this, vtStruct->_entries[entryIndex]._voiceNum, _chProgram[channelNum], v0, v1);
+ }
+}
+
+void Sound::_soProc42(VoiceTypeStruct *vtStruct, int channelNum, VoiceType voiceType, int v0) {
+ for (int trackCtr = 0; trackCtr < _trackInfo._numTracks; ++trackCtr) {
+ const byte *instrument = _channelData[trackCtr];
+ if ((*(instrument + 13) == v0) && (*instrument == 1)) {
+ int entryIndex = _soFindSound(vtStruct, channelNum);
+
+ if (entryIndex != -1) {
+ SoundDriver *driver = vtStruct->_entries[entryIndex]._driver;
+ assert(driver);
+
+ vtStruct->_entries[entryIndex]._type1._field6 = 0;
+ vtStruct->_entries[entryIndex]._type1._field4 = v0;
+ vtStruct->_entries[entryIndex]._type1._field5 = 0;
+
+ int v1, v2;
+ driver->proc32(this, vtStruct->_entries[entryIndex]._voiceNum, -1, v0, 0x7F);
+ driver->proc42(vtStruct->_entries[entryIndex]._voiceNum, voiceType, 0, &v1, &v2);
+ }
+ break;
+ }
+ }
+}
+
+void Sound::_soProc38(VoiceTypeStruct *vtStruct, int channelNum, VoiceType voiceType, int cmd, int value) {
+ if (cmd == 64) {
+ if (value == 0) {
+ for (uint entryIndex = 0; entryIndex < vtStruct->_entries.size(); ++entryIndex) {
+ VoiceStructEntryType1 &vte = vtStruct->_entries[entryIndex]._type1;
+
+ if ((vte._sound == this) && (vte._channelNum == channelNum) && (vte._field5 != 0)) {
+ SoundDriver *driver = vtStruct->_entries[entryIndex]._driver;
+ assert(driver);
+
+ vte._field4 = -1;
+ vte._field5 = 0;
+ driver->updateVoice(vtStruct->_entries[entryIndex]._voiceNum);
+ }
+ }
+ }
+ } else if (cmd == 75) {
+ _soundManager->_needToRethink = true;
+ } else {
+ for (uint entryIndex = 0; entryIndex < vtStruct->_entries.size(); ++entryIndex) {
+ VoiceStructEntry &vte = vtStruct->_entries[entryIndex];
+
+ if ((vte._type1._sound == this) && (vte._type1._channelNum == channelNum)) {
+ SoundDriver *driver = vte._driver;
+ assert(driver);
+
+ driver->proc38(vte._voiceNum, cmd, value);
+ }
+ }
+ }
+}
+
+void Sound::_soProc40(VoiceTypeStruct *vtStruct, int channelNum, int pitchBlend) {
+ for (uint entryIndex = 0; entryIndex < vtStruct->_entries.size(); ++entryIndex) {
+ VoiceStructEntryType1 &vte = vtStruct->_entries[entryIndex]._type1;
+
+ if ((vte._sound == this) && (vte._channelNum == channelNum)) {
+ SoundDriver *driver = vtStruct->_entries[entryIndex]._driver;
+ assert(driver);
+
+ driver->setPitch(vtStruct->_entries[entryIndex]._voiceNum, pitchBlend);
+ }
+ }
+}
+
+void Sound::_soDoTrackCommand(int channelNum, int command, int value) {
+ switch (command) {
+ case 1:
+ _chModulation[channelNum] = value;
+ break;
+ case 7:
+ _chVolume[channelNum] = value;
+ break;
+ case 10:
+ _chPan[channelNum] = value;
+ break;
+ case 64:
+ _chDamper[channelNum] = value;
+ break;
+ case 75:
+ _chNumVoices[channelNum] = value;
+ break;
+ }
+}
+
+bool Sound::_soDoUpdateTracks(int command, int value) {
+ if ((command == 76) || (_hold != value))
+ return false;
+
+ for (int trackIndex = 0; trackIndex < _trackInfo._numTracks; ++trackIndex) {
+ _trkState[trackIndex] = _trkLoopState[trackIndex];
+ _trkRest[trackIndex] = _trkLoopRest[trackIndex];
+ _trkIndex[trackIndex] = _trkLoopIndex[trackIndex];
+ }
+
+ _timer = _loopTimer;
+ return true;
+}
+
+void Sound::_soSetTrackPos(int trackIndex, int trackPos, int cueValue) {
+ _trkIndex[trackIndex] = trackPos;
+ if (cueValue == 127) {
+ if (!_soundManager->_soTimeIndexFlag)
+ _cueValue = cueValue;
+ } else {
+ for (int idx = 0; idx < _trackInfo._numTracks; ++idx) {
+ _trkLoopState[idx] = _trkState[idx];
+ _trkLoopRest[idx] = _trkRest[idx];
+ _trkLoopIndex[idx] = _trkIndex[idx];
+ }
+
+ _loopTimer = _timer;
+ }
+}
+
+void Sound::_soServiceTrackType1(int trackIndex, const byte *channelData) {
+ if (_soundManager->_soTimeIndexFlag || !_trkState[trackIndex])
+ return;
+
+ int channel = _trkChannel[trackIndex];
+ if (channel == -1)
+ _trkState[trackIndex] = 0;
+ else {
+ int voiceType = _chVoiceType[channel];
+ VoiceTypeStruct *vtStruct = _soundManager->_voiceTypeStructPtrs[voiceType];
+
+ if (!vtStruct)
+ _trkState[trackIndex] = 0;
+ else {
+ if (vtStruct->_voiceType != VOICETYPE_0) {
+ if (_trkState[trackIndex] == 1) {
+ int entryIndex = _soFindSound(vtStruct, *(channelData + 1));
+ if (entryIndex != -1) {
+ SoundDriver *driver = vtStruct->_entries[entryIndex]._driver;
+ assert(driver);
+
+ vtStruct->_entries[entryIndex]._type1._field6 = 0;
+ vtStruct->_entries[entryIndex]._type1._field4 = *(channelData + 1);
+ vtStruct->_entries[entryIndex]._type1._field5 = 0;
+
+ int v1, v2;
+ driver->proc32(this, vtStruct->_entries[entryIndex]._voiceNum, -1, *(channelData + 1), 0x7f);
+ driver->proc42(vtStruct->_entries[entryIndex]._voiceNum, *(channelData + 1), _loop ? 1 : 0,
+ &v1, &v2);
+ }
+ } else {
+ for (uint entryIndex = 0; entryIndex < vtStruct->_entries.size(); ++entryIndex) {
+ VoiceStructEntry &vte = vtStruct->_entries[entryIndex];
+ VoiceStructEntryType1 &vse = vte._type1;
+ if ((vse._sound == this) && (vse._channelNum == channel) && (vse._field4 == vtStruct->_total)) {
+ SoundDriver *driver = vte._driver;
+
+ int v1, v2;
+ driver->proc42(vte._voiceNum, vtStruct->_total, _loop ? 1 : 0, &v1, &v2);
+ if (v2) {
+ _trkState[trackIndex] = 0;
+ } else if (vtStruct->_total) {
+ _timer = 0;
+ }
+ }
+ }
+
+ _trkState[trackIndex] = 0;
+ }
+ } else {
+ _trkState[trackIndex] = 0;
+ }
+ }
+ }
+}
+
+int Sound::_soFindSound(VoiceTypeStruct *vtStruct, int channelNum) {
+ int entryIndex = -1, entry2Index = -1;
+ int v6 = 0, v8 = 0;
+
+ for (uint idx = 0; idx < vtStruct->_entries.size(); ++idx) {
+ VoiceStructEntryType1 &vte = vtStruct->_entries[idx]._type1;
+ if ((vte._channelNum == channelNum) && (vte._sound == this)) {
+ int v = vte._field6;
+ if (vte._field4 != -1) {
+ if (v8 <= v) {
+ v8 = v;
+ entry2Index = idx;
+ }
+ } else {
+ if (v6 <= v) {
+ v6 = v;
+ entryIndex = idx;
+ }
+ }
+ }
+ }
+
+ if (entryIndex != -1)
+ return entryIndex;
+ else if ((entryIndex == -1) && (entry2Index == -1))
+ return -1;
+ else {
+ SoundDriver *driver = vtStruct->_entries[entry2Index]._driver;
+ assert(driver);
+ driver->updateVoice(vtStruct->_entries[entry2Index]._voiceNum);
+
+ return entry2Index;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+ASound::ASound(): EventHandler() {
+ _action = NULL;
+ _cueValue = -1;
+ if (_globals)
+ _globals->_sounds.push_back(this);
+}
+
+ASound::~ASound() {
+ if (_globals)
+ _globals->_sounds.remove(this);
+}
+
+void ASound::synchronize(Serializer &s) {
+ EventHandler::synchronize(s);
+
+ SYNC_POINTER(_action);
+ s.syncAsByte(_cueValue);
+
+}
+
+void ASound::dispatch() {
+ EventHandler::dispatch();
+
+ int cueValue = _sound.getCueValue();
+ if (cueValue != -1) {
+ _cueValue = cueValue;
+ _sound.setCueValue(-1);
+
+ if (_action)
+ _action->signal();
+ }
+
+ if (_cueValue != -1) {
+ if (!_sound.isPrimed()) {
+ _cueValue = -1;
+ if (_action) {
+ _action->signal();
+ _action = NULL;
+ }
+ }
+ }
+}
+
+void ASound::play(int soundNum, Action *action, int volume) {
+ _action = action;
+ _cueValue = 0;
+
+ setVol(volume);
+ _sound.play(soundNum);
+}
+
+void ASound::stop() {
+ _sound.stop();
+ _action = NULL;
+}
+
+void ASound::prime(int soundResID, Action *action) {
+ _action = action;
+ _cueValue = 0;
+ _sound.prime(soundResID);
+}
+
+void ASound::unPrime() {
+ _sound.unPrime();
+ _action = NULL;
+}
+
+void ASound::fade(int fadeDest, int fadeSteps, int fadeTicks, bool stopAfterFadeFlag, Action *action) {
+ if (action)
+ _action = action;
+
+ _sound.fade(fadeDest, fadeSteps, fadeTicks, stopAfterFadeFlag);
+}
+
+
+/*--------------------------------------------------------------------------*/
+
+SoundDriver::SoundDriver() {
+ _driverResID = 0;
+ _minVersion = _maxVersion = 0;
+ _groupMask = 0;
+}
+
+/*--------------------------------------------------------------------------*/
+
+const byte adlib_group_data[] = { 1, 1, 9, 1, 0xff };
+
+const byte v440B0[9] = { 0, 1, 2, 6, 7, 8, 12, 13, 14 };
+
+const byte v440B9[9] = { 3, 4, 5, 9, 10, 11, 15, 16, 17 };
+
+const byte v440C2[18] = {
+ 0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21
+};
+
+const byte v44134[64] = {
+ 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 47, 48, 49, 50, 50, 51, 52, 52, 53, 54, 54, 55,
+ 56, 56, 57, 57, 58, 58, 59, 59, 59, 60, 60, 60, 61, 61,
+ 61, 62, 62, 62, 62, 63, 63, 63
+};
+
+const int v440D4[48] = {
+ 343, 348, 353, 358, 363, 369, 374, 379, 385, 391, 396,
+ 402, 408, 414, 420, 426, 432, 438, 445, 451, 458, 465,
+ 471, 478, 485, 492, 499, 507, 514, 521, 529, 537, 544,
+ 552, 560, 569, 577, 585, 594, 602, 611, 620, 629, 638,
+ 647, 657, 666, 676
+};
+
+AdlibSoundDriver::AdlibSoundDriver(): SoundDriver() {
+ _minVersion = 0x102;
+ _maxVersion = 0x10A;
+ _masterVolume = 0;
+
+ _groupData.groupMask = 9;
+ _groupData.v1 = 0x46;
+ _groupData.v2 = 0;
+ _groupData.pData = &adlib_group_data[0];
+
+ _mixer = _vm->_mixer;
+ _sampleRate = _mixer->getOutputRate();
+ _opl = OPL::Config::create();
+ assert(_opl);
+ _opl->init(_sampleRate);
+
+ _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
+
+ Common::set_to(_channelVoiced, _channelVoiced + ADLIB_CHANNEL_COUNT, false);
+ memset(_channelVolume, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v4405E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44067, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44070, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44079, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44082, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ _v44082[ADLIB_CHANNEL_COUNT] = 0x90;
+ Common::set_to(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000);
+ memset(_v4409E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ _patchData = NULL;
+}
+
+AdlibSoundDriver::~AdlibSoundDriver() {
+ DEALLOCATE(_patchData);
+ _mixer->stopHandle(_soundHandle);
+ delete _opl;
+}
+
+bool AdlibSoundDriver::open() {
+ write(1, 0x20);
+ if (!reset())
+ return false;
+
+ write(8, 0);
+ for (int idx = 0x20; idx < 0xF6; ++idx)
+ write(idx, 0);
+
+ write(0xBD, 0);
+ return true;
+}
+
+void AdlibSoundDriver::close() {
+ for (int idx = 0xB0; idx < 0xB8; ++idx)
+ write(idx, _portContents[idx] & 0xDF);
+ for (int idx = 0x40; idx < 0x55; ++idx)
+ write(idx, 0x3F);
+ reset();
+}
+
+bool AdlibSoundDriver::reset() {
+ write(1, 0x20);
+ write(1, 0x20);
+
+ return true;
+}
+
+const GroupData *AdlibSoundDriver::getGroupData() {
+ return &_groupData;
+}
+
+void AdlibSoundDriver::installPatch(const byte *data, int size) {
+ byte *patchData = ALLOCATE(size);
+ Common::copy(data, data + size, patchData);
+ _patchData = patchData;
+}
+
+int AdlibSoundDriver::setMasterVolume(int volume) {
+ int oldVolume = _masterVolume;
+ _masterVolume = volume;
+
+ for (int channelNum = 0; channelNum < ADLIB_CHANNEL_COUNT; ++channelNum)
+ updateChannelVolume(channelNum);
+
+ return oldVolume;
+}
+
+void AdlibSoundDriver::proc32(Sound *sound, int channel, int program, int v0, int v1) {
+ if (program == -1)
+ return;
+
+ int offset = READ_LE_UINT16(_patchData + program * 2);
+ if (offset) {
+ const byte *dataP = _patchData + offset;
+ int id;
+
+ for (offset = 2, id = 0; id != READ_LE_UINT16(dataP); offset += 30, ++id) {
+ if ((dataP[offset] <= v0) && (dataP[offset + 1] >= v0)) {
+ if (dataP[offset + 2] != 0xff)
+ v0 = dataP[offset + 2];
+
+ _v4409E[channel] = dataP + offset - _patchData;
+
+ // Set sustain/release
+ int portNum = v440C2[v440B0[channel]] + 0x80;
+ write(portNum, (_portContents[portNum] & 0xF0) | 0xF);
+
+ portNum = v440C2[v440B9[channel]] + 0x80;
+ write(portNum, (_portContents[portNum] & 0xF0) | 0xF);
+
+ if (_channelVoiced[channel])
+ clearVoice(channel);
+
+ _v44067[channel] = v0;
+ _v4405E[channel] = v1;
+
+ updateChannel(channel);
+ setFrequency(channel);
+ updateChannelVolume(channel);
+ setVoice(channel);
+ break;
+ }
+ }
+ }
+}
+
+void AdlibSoundDriver::updateVoice(int channel) {
+ if (_channelVoiced[channel])
+ clearVoice(channel);
+}
+
+void AdlibSoundDriver::proc38(int channel, int cmd, int value) {
+ if (cmd == 7) {
+ // Set channel volume
+ _channelVolume[channel] = value;
+ updateChannelVolume(channel);
+ }
+}
+
+void AdlibSoundDriver::setPitch(int channel, int pitchBlend) {
+ _pitchBlend[channel] = pitchBlend;
+ setFrequency(channel);
+}
+
+void AdlibSoundDriver::write(byte reg, byte value) {
+ _portContents[reg] = value;
+ _queue.push(RegisterValue(reg, value));
+}
+
+void AdlibSoundDriver::flush() {
+ Common::StackLock slock(SoundManager::sfManager()._serverDisabledMutex);
+
+ while (!_queue.empty()) {
+ RegisterValue v = _queue.pop();
+ _opl->writeReg(v._regNum, v._value);
+ }
+}
+
+void AdlibSoundDriver::updateChannelVolume(int channelNum) {
+ int volume = (_masterVolume * _channelVolume[channelNum] / 127 * _v4405E[channelNum] / 127) / 2;
+ int level2 = 63 - v44134[volume * _v44079[channelNum] / 63];
+ int level1 = !_v44082[channelNum] ? 63 - _v44070[channelNum] :
+ 63 - v44134[volume * _v44070[channelNum] / 63];
+
+ int portNum = v440C2[v440B0[channelNum]] + 0x40;
+ write(portNum, (_portContents[portNum] & 0x80) | level1);
+
+ portNum = v440C2[v440B9[channelNum]] + 0x40;
+ write(portNum, (_portContents[portNum] & 0x80) | level2);
+}
+
+void AdlibSoundDriver::setVoice(int channel) {
+ int portNum = 0xB0 + channel;
+ write(portNum, _portContents[portNum] | 0x20);
+ _channelVoiced[channel] = true;
+}
+
+void AdlibSoundDriver::clearVoice(int channel) {
+ write(0xB0 + channel, _portContents[0xB0 + channel] & ~0x20);
+ _channelVoiced[channel] = false;
+}
+
+void AdlibSoundDriver::updateChannel(int channel) {
+ const byte *dataP = _patchData + _v4409E[channel];
+ int portOffset = v440C2[v440B0[channel]];
+
+ int portNum = portOffset + 0x20;
+ int portValue = 0;
+ if (*(dataP + 4))
+ portValue |= 0x80;
+ if (*(dataP + 5))
+ portValue |= 0x40;
+ if (*(dataP + 8))
+ portValue |= 0x20;
+ if (*(dataP + 6))
+ portValue |= 0x10;
+ portValue |= *(dataP + 7);
+ write(portNum, portValue);
+
+ portValue = (_portContents[0x40 + portOffset] & 0x3F) | (*(dataP + 9) << 6);
+ write(0x40 + portOffset, portValue);
+
+ _v44070[channel] = 63 - *(dataP + 10);
+ write(0x60 + portOffset, *(dataP + 12) | (*(dataP + 11) << 4));
+ write(0x80 + portOffset, *(dataP + 14) | (*(dataP + 13) << 4));
+ write(0xE0 + portOffset, (_portContents[0xE0 + portOffset] & 0xFC) | *(dataP + 15));
+
+ portOffset = v440C2[v440B9[channel]];
+ portNum = portOffset + 0x20;
+ portValue = 0;
+ if (*(dataP + 17))
+ portValue |= 0x80;
+ if (*(dataP + 18))
+ portValue |= 0x40;
+ if (*(dataP + 21))
+ portValue |= 0x20;
+ if (*(dataP + 19))
+ portValue |= 0x10;
+ portValue |= *(dataP + 20);
+ write(portNum, portValue);
+
+ write(0x40 + portOffset, (_portContents[0x40 + portOffset] & 0x3f) | (*(dataP + 22) << 6));
+ _v44079[channel] = 0x3F - *(dataP + 23);
+ write(0x60 + portOffset, *(dataP + 25) | (*(dataP + 24) << 4));
+ write(0x80 + portOffset, *(dataP + 27) | (*(dataP + 26) << 4));
+ write(0xE0 + portOffset, (_portContents[0xE0 + portOffset] & 0xFC) | *(dataP + 28));
+
+ write(0xC0 + channel, (_portContents[0xC0 + channel] & 0xF0)
+ | (*(dataP + 16) << 1) | *(dataP + 3));
+
+ _v44082[channel] = *(dataP + 3);
+}
+
+void AdlibSoundDriver::setFrequency(int channel) {
+ int offset, ch;
+
+ int v = _pitchBlend[channel];
+ if (v == 0x2000) {
+ offset = 0;
+ ch = _v44067[channel];
+ } else if (v > 0x2000) {
+ ch = _v44067[channel];
+ v -= 0x2000;
+ if (v == 0x1fff)
+ v = 0x2000;
+
+ offset = (v / 170) & 3;
+ ch += (v / 170) >> 2;
+
+ if (ch >= 128)
+ ch = 127;
+ } else {
+ ch = _v44067[channel];
+ int tempVal = (0x2000 - v) / 170;
+ int tempVal2 = 4 - (tempVal & 3);
+
+ if (tempVal2 == 4)
+ offset = 0;
+ else {
+ offset = tempVal2;
+ --ch;
+ }
+
+ ch -= tempVal >> 2;
+ if (ch < 0)
+ ch = 0;
+ }
+
+ int var2 = ch / 12;
+ if (var2)
+ --var2;
+
+ int dataWord = v440D4[((ch % 12) << 2) + offset];
+ write(0xA0 + channel, dataWord & 0xff);
+ write(0xB0 + channel, (_portContents[0xB0 + channel] & 0xE0) |
+ ((dataWord >> 8) & 3) | (var2 << 2));
+}
+
+int AdlibSoundDriver::readBuffer(int16 *buffer, const int numSamples) {
+ update(buffer, numSamples);
+ return numSamples;
+}
+
+void AdlibSoundDriver::update(int16 *buf, int len) {
+ static int samplesLeft = 0;
+ while (len != 0) {
+ int count = samplesLeft;
+ if (count > len) {
+ count = len;
+ }
+ samplesLeft -= count;
+ len -= count;
+ _opl->readBuffer(buf, count);
+ if (samplesLeft == 0) {
+ flush();
+ samplesLeft = _sampleRate / 50;
+ }
+ buf += count;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+const byte adlibFx_group_data[] = { 3, 1, 1, 0, 0xff };
+
+
+AdlibFxSoundDriver::AdlibFxSoundDriver(): SoundDriver() {
+ _minVersion = 0x102;
+ _maxVersion = 0x10A;
+ _masterVolume = 0;
+
+ _groupData.groupMask = 1;
+ _groupData.v1 = 0x3E;
+ _groupData.v2 = 0;
+ _groupData.pData = &adlib_group_data[0];
+
+ _mixer = _vm->_mixer;
+ _sampleRate = _mixer->getOutputRate();
+ _mixer->playStream(Audio::Mixer::kPlainSoundType, &_soundHandle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
+/*
+ Common::set_to(_channelVoiced, _channelVoiced + ADLIB_CHANNEL_COUNT, false);
+ memset(_channelVolume, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v4405E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44067, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44070, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44079, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ memset(_v44082, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ _v44082[ADLIB_CHANNEL_COUNT] = 0x90;
+ Common::set_to(_pitchBlend, _pitchBlend + ADLIB_CHANNEL_COUNT, 0x2000);
+ memset(_v4409E, 0, ADLIB_CHANNEL_COUNT * sizeof(int));
+ _patchData = NULL;
+*/
+}
+
+AdlibFxSoundDriver::~AdlibFxSoundDriver() {
+ _mixer->stopHandle(_soundHandle);
+}
+
+bool AdlibFxSoundDriver::open() {
+ write209();
+ write(64);
+ write(165);
+
+ // for (int idx = 0; idx < 5000 * 16; ++idx) al = port[21h]
+
+// _v45071 = 1;
+// _v4506F = 0;
+
+ return true;
+}
+
+void AdlibFxSoundDriver::close() {
+ write(208);
+ write211();
+
+}
+
+bool AdlibFxSoundDriver::reset() {
+
+ return true;
+}
+
+const GroupData *AdlibFxSoundDriver::getGroupData() {
+ return &_groupData;
+}
+
+void AdlibFxSoundDriver::poll() {
+ if (!_masterVolume || !_channelVolume) {
+ if (_v45046)
+ write211();
+ } else {
+ if (!_v45046)
+ write209();
+ }
+}
+
+int AdlibFxSoundDriver::setMasterVolume(int volume) {
+ int oldVolume = _masterVolume;
+ _masterVolume = volume;
+
+ return oldVolume;
+}
+
+void AdlibFxSoundDriver::proc32(Sound *sound, int channel, int program, int v0, int v1) {
+ if (program == -1)
+ return;
+
+ if (_sound)
+ updateVoice(channel);
+
+ // TODO: Stuff
+
+
+
+}
+
+void AdlibFxSoundDriver::updateVoice(int channel) {
+ if (_sound) {
+ write(208);
+
+ _sound = NULL;
+ _v45062 = 0;
+ _v45066 = 0;
+ _v45068 = 0;
+ }
+}
+
+void AdlibFxSoundDriver::proc38(int channel, int cmd, int value) {
+ if (cmd == 7) {
+ // Set channel volume
+ _channelVolume = value;
+ }
+}
+
+void AdlibFxSoundDriver::proc42(int channel, int cmd, int value, int *v1, int *v2) {
+ _v4506A = value;
+ *v1 = _v4506B;
+ *v2 = 0;
+ _v4506B = 0;
+
+ if (!_sound)
+ *v2 = 1;
+}
+
+void AdlibFxSoundDriver::write(int v) {
+ /*
+ port[adlib_port + 12] = v;
+ for (int i = 0; i < 100; ++i) {
+ if (!port[adlib_port + 12] & 0x80)
+ break;
+ }
+ */
+}
+
+void AdlibFxSoundDriver::flush() {
+ Common::StackLock slock(SoundManager::sfManager()._serverDisabledMutex);
+
+ // No data output yet
+}
+
+
+
+int AdlibFxSoundDriver::readBuffer(int16 *buffer, const int numSamples) {
+ update(buffer, numSamples);
+ return numSamples;
+}
+
+void AdlibFxSoundDriver::update(int16 *buf, int len) {
+/*
+ static int samplesLeft = 0;
+ while (len != 0) {
+ int count = samplesLeft;
+ if (count > len) {
+ count = len;
+ }
+ samplesLeft -= count;
+ len -= count;
+ YM3812UpdateOne(_opl, buf, count);
+ if (samplesLeft == 0) {
+ flush();
+ samplesLeft = _sampleRate / 50;
+ }
+ buf += count;
+ }
+*/
+}
+
+void AdlibFxSoundDriver::write209() {
+ write(209);
+ _v45046 = true;
+}
+
+void AdlibFxSoundDriver::write211() {
+ write(211);
+ _v45046 = false;
}
} // End of namespace tSage
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index 03ae77b703..6a47a1aaf5 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -24,23 +24,484 @@
#define TSAGE_SOUND_H
#include "common/scummsys.h"
+#include "common/mutex.h"
+#include "common/queue.h"
+#include "audio/audiostream.h"
+#include "audio/fmopl.h"
+#include "audio/mixer.h"
+#include "common/list.h"
#include "tsage/saveload.h"
+#include "tsage/core.h"
namespace tSage {
+class Sound;
+
+#define SOUND_ARR_SIZE 16
+#define ROLAND_DRIVER_NUM 2
+#define ADLIB_DRIVER_NUM 3
+#define SBLASTER_DRIVER_NUM 4
+
+struct trackInfoStruct {
+ int _numTracks;
+ int _chunks[SOUND_ARR_SIZE];
+ int _voiceTypes[SOUND_ARR_SIZE];
+};
+
+enum SoundDriverStatus {SNDSTATUS_FAILED = 0, SNDSTATUS_DETECTED = 1, SNDSTATUS_SKIPPED = 2};
+enum VoiceType {VOICETYPE_0 = 0, VOICETYPE_1 = 1};
+
+class SoundDriverEntry {
+public:
+ int driverNum;
+ SoundDriverStatus status;
+ int field2, field6;
+ Common::String shortDescription;
+ Common::String longDescription;
+};
+
+struct GroupData {
+ uint32 groupMask;
+ byte v1;
+ byte v2;
+ const byte *pData;
+};
+
+struct RegisterValue {
+ uint8 _regNum;
+ uint8 _value;
+
+ RegisterValue(int regNum, int value) {
+ _regNum = regNum; _value = value;
+ }
+};
+
+class SoundDriver {
+public:
+ Common::String _shortDescription, _longDescription;
+ int _minVersion, _maxVersion;
+ // The following fields were originally held in separate arrays in the SoundManager class
+ uint32 _groupMask;
+ const GroupData *_groupOffset;
+ int _driverResID;
+public:
+ SoundDriver();
+ virtual ~SoundDriver() {};
+
+ const Common::String &getShortDriverDescription() { return _shortDescription; }
+ const Common::String &getLongDriverDescription() { return _longDescription; }
+
+ virtual bool open() { return true; } // Method #0
+ virtual void close() {} // Method #1
+ virtual bool reset() { return true; } // Method #2
+ virtual const GroupData *getGroupData() { return NULL; } // Method #3
+ virtual void installPatch(const byte *data, int size) {} // Method #4
+ virtual void poll() {} // Method #5
+ virtual void proc12() {} // Method #6
+ virtual int setMasterVolume(int volume) { return 0; } // Method #7
+ virtual void proc16() {} // Method #8
+ virtual void proc18(int al, VoiceType voiceType) {} // Method #9
+ virtual void proc20(int al, VoiceType voiceType) {} // Method #10
+ virtual void proc22(int al, VoiceType voiceType, int v3) {} // Method #11
+ virtual void proc24(int channel, int voiceIndex, Sound *sound, int v1, int v2) {}
+ virtual void setProgram(int channel, int program) {} // Method #13
+ virtual void setVolume1(int channel, int v2, int v3, int volume) {}
+ virtual void setPitchBlend(int channel, int pitchBlend) {} // Method #15
+ virtual void proc32(Sound *sound, int channel, int program, int v0, int v1) {}// Method #16
+ virtual void updateVoice(int channel) {} // Method #17
+ virtual void proc36() {} // Method #18
+ virtual void proc38(int channel, int cmd, int value) {} // Method #19
+ virtual void setPitch(int channel, int pitchBlend) {} // Method #20
+ virtual void proc42(int channel, int cmd, int value, int *v1, int *v2) {} // Method #21
+};
+
+struct VoiceStructEntryType0 {
+ Sound *_sound;
+ int _channelNum;
+ int _priority;
+ int _fieldA;
+ Sound *_sound2;
+ int _channelNum2;
+ int _priority2;
+ int _field12;
+ Sound *_sound3;
+ int _channelNum3;
+ int _priority3;
+ int _field1A;
+};
+
+struct VoiceStructEntryType1 {
+ int _field4;
+ int _field5;
+ int _field6;
+ Sound *_sound;
+ int _channelNum;
+ int _priority;
+ Sound *_sound2;
+ int _channelNum2;
+ int _priority2;
+ Sound *_sound3;
+ int _channelNum3;
+ int _priority3;
+};
+
+struct VoiceStructEntry {
+ int _voiceNum;
+ int _field1;
+ SoundDriver *_driver;
+
+ VoiceStructEntryType0 _type0;
+ VoiceStructEntryType1 _type1;
+};
+
+class VoiceTypeStruct {
+public:
+ VoiceType _voiceType;
+ int _total;
+ int _numVoices;
+ int _field3;
+
+ Common::Array<VoiceStructEntry> _entries;
+};
+
class SoundManager : public SaveListener {
+private:
+ SoundDriver *instantiateDriver(int driverNum);
public:
- void dispatch() {}
+ bool __sndmgrReady;
+ int _ourSndResVersion, _ourDrvResVersion;
+ SynchronizedList<Sound *> _playList;
+ Common::List<SoundDriver *> _installedDrivers;
+ VoiceTypeStruct *_voiceTypeStructPtrs[SOUND_ARR_SIZE];
+ uint32 _groupsAvail;
+ int _masterVol;
+ int _newVolume;
+ Common::Mutex _serverDisabledMutex;
+ Common::Mutex _serverSuspendedMutex;
+ bool _driversDetected;
+ SynchronizedList<Sound *> _soundList;
+ Common::List<SoundDriverEntry> _availableDrivers;
+ bool _needToRethink;
+ // Misc flags
+ bool _soTimeIndexFlag;
+public:
+ SoundManager();
+ ~SoundManager();
+
+ void dispatch();
virtual void listenerSynchronize(Serializer &s);
virtual void postInit();
+ void syncSounds();
+ void update();
- void proc2() {}
static void saveNotifier(bool postFlag);
void saveNotifierProc(bool postFlag);
static void loadNotifier(bool postFlag);
void loadNotifierProc(bool postFlag);
+
+ void installConfigDrivers();
+ Common::List<SoundDriverEntry> &buildDriverList(bool detectFlag);
+ Common::List<SoundDriverEntry> &getDriverList(bool detectFlag);
+ void dumpDriverList();
+ void installDriver(int driverNum);
+ bool isInstalled(int driverNum) const;
+ void unInstallDriver(int driverNum);
+ void checkResVersion(const byte *soundData);
+ int determineGroup(const byte *soundData);
+ int extractPriority(const byte *soundData);
+ int extractLoop(const byte *soundData);
+ bool isOnPlayList(Sound *sound);
+ void extractTrackInfo(trackInfoStruct *trackInfo, const byte *soundData, int groupNum);
+ void addToSoundList(Sound *sound);
+ void removeFromSoundList(Sound *sound);
+ void addToPlayList(Sound *sound);
+ void removeFromPlayList(Sound *sound);
+ void rethinkVoiceTypes();
+ void updateSoundVol(Sound *sound);
+ void updateSoundPri(Sound *sound);
+ void updateSoundLoop(Sound *sound);
+ void setMasterVol(int volume);
+ int getMasterVol() const;
+ void loadSound(int soundNum, bool showErrors);
+ void unloadSound(int soundNum);
+
+ // _sf methods
+ static SoundManager &sfManager();
+ static void _sfTerminate();
+ static int _sfDetermineGroup(const byte *soundData);
+ static void _sfAddToPlayList(Sound *sound);
+ static void _sfRemoveFromPlayList(Sound *sound);
+ static bool _sfIsOnPlayList(Sound *sound);
+ static void _sfRethinkSoundDrivers();
+ static void _sfRethinkVoiceTypes();
+ static void _sfUpdateVolume(Sound *sound);
+ static void _sfDereferenceAll();
+ static void _sfUpdatePriority(Sound *sound);
+ static void _sfUpdateLoop(Sound *sound);
+ static void _sfSetMasterVol(int volume);
+ static void _sfExtractTrackInfo(trackInfoStruct *trackInfo, const byte *soundData, int groupNum);
+ static void _sfExtractGroupMask();
+ static bool _sfInstallDriver(SoundDriver *driver);
+ static void _sfUnInstallDriver(SoundDriver *driver);
+ static void _sfInstallPatchBank(SoundDriver *driver, const byte *bankData);
+ static void _sfDoAddToPlayList(Sound *sound);
+ static bool _sfDoRemoveFromPlayList(Sound *sound);
+ static void _sfDoUpdateVolume(Sound *sound);
+ static void _sfSoundServer();
+ static void _sfProcessFading();
+ static void _sfUpdateVoiceStructs();
+ static void _sfUpdateVoiceStructs2();
+ static void _sfUpdateCallback(void *ref);
};
+class Sound: public EventHandler {
+private:
+ void _prime(int soundResID, bool dontQueue);
+ void _unPrime();
+public:
+ bool _stoppedAsynchronously;
+ int _soundResID;
+ int _group;
+ int _sndResPriority;
+ int _fixedPriority;
+ int _sndResLoop;
+ int _fixedLoop;
+ int _priority;
+ int _volume;
+ int _loop;
+ int _pausedCount;
+ int _mutedCount;
+ int _hold;
+ int _cueValue;
+ int _fadeDest;
+ int _fadeSteps;
+ int _fadeTicks;
+ int _fadeCounter;
+ bool _stopAfterFadeFlag;
+ uint32 _timer;
+ uint32 _newTimeIndex;
+ int _loopTimer;
+ int _chProgram[SOUND_ARR_SIZE];
+ int _chModulation[SOUND_ARR_SIZE];
+ int _chVolume[SOUND_ARR_SIZE];
+ int _chPan[SOUND_ARR_SIZE];
+ int _chDamper[SOUND_ARR_SIZE];
+ int _chPitchBlend[SOUND_ARR_SIZE];
+ int _chVoiceType[SOUND_ARR_SIZE];
+ int _chNumVoices[SOUND_ARR_SIZE];
+ int _chSubPriority[SOUND_ARR_SIZE];
+ int _chFlags[SOUND_ARR_SIZE];
+ bool _chWork[SOUND_ARR_SIZE];
+ trackInfoStruct _trackInfo;
+ byte *_channelData[SOUND_ARR_SIZE];
+ int _trkChannel[SOUND_ARR_SIZE];
+ int _trkState[SOUND_ARR_SIZE];
+ int _trkLoopState[SOUND_ARR_SIZE];
+ int _trkIndex[SOUND_ARR_SIZE];
+ int _trkLoopIndex[SOUND_ARR_SIZE];
+ int _trkRest[SOUND_ARR_SIZE];
+ int _trkLoopRest[SOUND_ARR_SIZE];
+
+ bool _primed;
+ bool _isEmpty;
+ byte *_remoteReceiver;
+public:
+ Sound();
+ ~Sound();
+
+ void synchronize(Serializer &s);
+ void orientAfterRestore();
+
+ void play(int soundResID);
+ void stop();
+ void prime(int soundResID);
+ void unPrime();
+ void go();
+ void halt(void);
+ bool isPlaying();
+ int getSoundNum() const;
+ bool isPrimed() const;
+ bool isPaused() const;
+ bool isMuted() const;
+ void pause(bool flag);
+ void mute(bool flag);
+ void fade(int fadeDest, int fadeSteps, int fadeTicks, bool stopAfterFadeFlag);
+ void setTimeIndex(uint32 timeIndex);
+ uint32 getTimeIndex() const;
+ int getCueValue() const;
+ void setCueValue(int cueValue);
+ void setVol(int volume);
+ int getVol() const;
+ void setPri(int priority);
+ void setLoop(int flag);
+ int getPri() const;
+ int getLoop();
+ void holdAt(int amount);
+ void release();
+ void orientAfterDriverChange();
+
+ // _so methods
+ void _soPrimeSound(bool dontQueue);
+ void _soSetTimeIndex(uint timeIndex);
+ bool _soServiceTracks();
+ void _soPrimeChannelData();
+ void _soRemoteReceive();
+ void _soServiceTrackType0(int trackIndex, const byte *channelData);
+ void _soUpdateDamper(VoiceTypeStruct *voiceType, int channelNum, VoiceType mode, int v0);
+ void _soProc32(VoiceTypeStruct *vtStruct, int channelNum, VoiceType voiceType, int v0, int v1);
+ void _soProc42(VoiceTypeStruct *vtStruct, int channelNum, VoiceType voiceType, int v0);
+ void _soProc38(VoiceTypeStruct *vtStruct, int channelNum, VoiceType voiceType, int cmd, int value);
+ void _soProc40(VoiceTypeStruct *vtStruct, int channelNum, int pitchBlend);
+ void _soDoTrackCommand(int channelNum, int command, int value);
+ bool _soDoUpdateTracks(int command, int value);
+ void _soSetTrackPos(int trackIndex, int trackPos, int cueValue);
+
+ void _soServiceTrackType1(int trackIndex, const byte *channelData);
+ int _soFindSound(VoiceTypeStruct *vtStruct, int channelNum);
+};
+
+class ASound: public EventHandler {
+public:
+ Sound _sound;
+ Action *_action;
+ int _cueValue;
+
+ ASound();
+ ~ASound();
+ virtual void synchronize(Serializer &s);
+ virtual void dispatch();
+
+ void play(int soundNum, Action *action = NULL, int volume = 127);
+ void stop();
+ void prime(int soundNum, Action *action = NULL);
+ void unPrime();
+ void go() { _sound.go(); }
+ void hault(void) { _sound.halt(); }
+ bool isPlaying() { return _sound.isPlaying(); }
+ int getSoundNum() const { return _sound.getSoundNum(); }
+ bool isPaused() const { return _sound.isPaused(); }
+ bool isMuted() const { return _sound.isMuted(); }
+ void pause(bool flag) { _sound.pause(flag); }
+ void mute(bool flag) { _sound.mute(flag); }
+ void fade(int fadeDest, int fadeSteps, int fadeTicks, bool stopAfterFadeFlag, Action *action);
+ void fadeIn() { fade(127, 5, 10, false, NULL); }
+ void fadeOut(Action *action) { fade(0, 5, 10, true, action); }
+ void setTimeIndex(uint32 timeIndex) { _sound.setTimeIndex(timeIndex); }
+ uint32 getTimeIndex() const { return _sound.getTimeIndex(); }
+ void setPri(int v) { _sound.setPri(v); }
+ void setLoop(int total) { _sound.setLoop(total); }
+ int getPri() const { return _sound.getPri(); }
+ int getLoop() { return _sound.getLoop(); }
+ void setVol(int volume) { _sound.setVol(volume); }
+ int getVol() const { return _sound.getVol(); }
+ void holdAt(int v) { _sound.holdAt(v); }
+ void release() { _sound.release(); }
+};
+
+#define ADLIB_CHANNEL_COUNT 9
+
+class AdlibSoundDriver: public SoundDriver, Audio::AudioStream {
+private:
+ GroupData _groupData;
+ Audio::Mixer *_mixer;
+ FM_OPL *_opl;
+ Audio::SoundHandle _soundHandle;
+ int _sampleRate;
+ byte _portContents[256];
+ const byte *_patchData;
+ int _masterVolume;
+ Common::Queue<RegisterValue> _queue;
+
+ bool _channelVoiced[ADLIB_CHANNEL_COUNT];
+ int _channelVolume[ADLIB_CHANNEL_COUNT];
+ int _v4405E[ADLIB_CHANNEL_COUNT];
+ int _v44067[ADLIB_CHANNEL_COUNT];
+ int _v44070[ADLIB_CHANNEL_COUNT];
+ int _v44079[ADLIB_CHANNEL_COUNT];
+ int _v44082[ADLIB_CHANNEL_COUNT + 1];
+ int _pitchBlend[ADLIB_CHANNEL_COUNT];
+ int _v4409E[ADLIB_CHANNEL_COUNT];
+
+
+ void write(byte reg, byte value);
+ void flush();
+ void updateChannelVolume(int channel);
+ void setVoice(int channel);
+ void clearVoice(int channel);
+ void updateChannel(int channel);
+ void setFrequency(int channel);
+public:
+ AdlibSoundDriver();
+ virtual ~AdlibSoundDriver();
+
+ virtual bool open();
+ virtual void close();
+ virtual bool reset();
+ virtual const GroupData *getGroupData();
+ virtual void installPatch(const byte *data, int size);
+ virtual int setMasterVolume(int volume);
+ virtual void proc32(Sound *sound, int channel, int program, int v0, int v1);
+ virtual void updateVoice(int channel);
+ virtual void proc38(int channel, int cmd, int value);
+ virtual void setPitch(int channel, int pitchBlend);
+
+ // AudioStream interface
+ 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; }
+
+ void update(int16 *buf, int len);
+};
+
+class AdlibFxSoundDriver: public SoundDriver, Audio::AudioStream {
+private:
+ Common::Queue<RegisterValue> _queue;
+ GroupData _groupData;
+ Audio::Mixer *_mixer;
+ Audio::SoundHandle _soundHandle;
+ int _sampleRate;
+
+ int _v45062;
+ int _v45066;
+ int _v45068;
+ int _v4506A;
+ int _v4506B;
+ bool _v45046;
+ byte _masterVolume;
+ byte _channelVolume;
+ Sound *_sound;
+
+ void write(int v);
+ void flush();
+ void sub_4556E();
+ void write209();
+ void write211();
+public:
+ AdlibFxSoundDriver();
+ virtual ~AdlibFxSoundDriver();
+
+ virtual bool open();
+ virtual void close();
+ virtual bool reset();
+ virtual const GroupData *getGroupData();
+ virtual void poll();
+ virtual int setMasterVolume(int volume);
+ virtual void proc32(Sound *sound, int channel, int program, int v0, int v1);
+ virtual void updateVoice(int channel);
+ virtual void proc38(int channel, int cmd, int value);
+ virtual void proc42(int channel, int cmd, int value, int *v1, int *v2);
+
+ // AudioStream interface
+ 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; }
+
+ void update(int16 *buf, int len);
+};
+
+
} // End of namespace tSage
#endif
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 50ce0ce4be..23a0193b7c 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -81,12 +81,17 @@ void TSageEngine::initialize() {
_globals = new Globals();
_globals->gfxManager().setDefaults();
+
+ // Setup sound settings
+ syncSoundSettings();
}
void TSageEngine::deinitialize() {
delete _globals;
delete _resourceManager;
delete _saver;
+ _resourceManager = NULL;
+ _saver = NULL;
}
Common::Error TSageEngine::run() {
@@ -136,4 +141,14 @@ Common::String TSageEngine::generateSaveName(int slot) {
return Common::String::format("%s.%03d", _targetName.c_str(), slot);
}
+void TSageEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
+ _globals->_soundManager.syncSounds();
+}
+
+bool TSageEngine::shouldQuit() {
+ return getEventManager()->shouldQuit() || getEventManager()->shouldRTL();
+}
+
} // End of namespace tSage
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index 5db45f24ab..805461886a 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -51,7 +51,9 @@ enum {
};
enum {
- kRingDebugScripts = 1 << 0
+ kRingDebugScripts = 1 << 0,
+ ktSageSound = 1 << 1,
+ ktSageCore = 1 << 2
};
struct tSageGameDescription;
@@ -76,6 +78,7 @@ public:
uint32 getGameID() const;
uint32 getFeatures() const;
Common::String getPrimaryFilename() const;
+ bool shouldQuit();
virtual Common::Error init();
virtual Common::Error run();
@@ -83,6 +86,7 @@ public:
virtual bool canSaveGameStateCurrently();
virtual Common::Error loadGameState(int slot);
virtual Common::Error saveGameState(int slot, const Common::String &desc);
+ virtual void syncSoundSettings();
Common::String generateSaveName(int slot);
void initialize();
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index a5498903e2..1d4e482bf4 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -24,7 +24,9 @@
#include "common/system.h"
#include "common/stack.h"
+namespace Common {
DECLARE_SINGLETON(Graphics::CursorManager);
+}
namespace Graphics {
diff --git a/graphics/font.cpp b/graphics/font.cpp
index cdf9090625..3f7152a95e 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -19,771 +19,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "common/stream.h"
-#include "common/file.h"
-#include "common/endian.h"
+#include "graphics/font.h"
+
#include "common/array.h"
-#include "common/textconsole.h"
#include "common/util.h"
-#include "graphics/font.h"
-#include "graphics/surface.h"
namespace Graphics {
-void free_font(NewFontData *pf);
-
-NewFont::~NewFont() {
- if (_font) {
- free_font(_font);
- }
-}
-
-int NewFont::getCharWidth(byte chr) const {
- // If no width table is specified, return the maximum width
- if (!_desc.width)
- return _desc.maxwidth;
- // If this character is not included in the font, use the default char.
- if (chr < _desc.firstchar || _desc.firstchar + _desc.size < chr) {
- chr = _desc.defaultchar;
- }
- return _desc.width[chr - _desc.firstchar];
-}
-
-
-template <typename PixelType>
-void drawCharIntern(byte *ptr, uint pitch, const bitmap_t *src, int h, int minX, int maxX, const PixelType color) {
- const bitmap_t maxXMask = ~((1 << (16-maxX)) - 1);
- while (h-- > 0) {
- bitmap_t buffer = READ_UINT16(src);
- src++;
-
- buffer &= maxXMask;
- buffer <<= minX;
- PixelType *tmp = (PixelType *)ptr;
- while (buffer != 0) {
- if ((buffer & 0x8000) != 0)
- *tmp = color;
- tmp++;
- buffer <<= 1;
- }
-
- ptr += pitch;
- }
-}
-
-void NewFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const uint32 color) const {
- assert(dst != 0);
-
- assert(_desc.bits != 0 && _desc.maxwidth <= 16);
- assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2);
-
- // If this character is not included in the font, use the default char.
- if (chr < _desc.firstchar || chr >= _desc.firstchar + _desc.size) {
- chr = _desc.defaultchar;
- }
-
- chr -= _desc.firstchar;
-
- int bbw, bbh, bbx, bby;
-
- // Get the bounding box of the character
- if (!_desc.bbx) {
- bbw = _desc.fbbw;
- bbh = _desc.fbbh;
- bbx = _desc.fbbx;
- bby = _desc.fbby;
- } else {
- bbw = _desc.bbx[chr].w;
- bbh = _desc.bbx[chr].h;
- bbx = _desc.bbx[chr].x;
- bby = _desc.bbx[chr].y;
- }
-
- byte *ptr = (byte *)dst->getBasePtr(tx + bbx, ty + _desc.ascent - bby - bbh);
-
- const bitmap_t *tmp = _desc.bits + (_desc.offset ? _desc.offset[chr] : (chr * _desc.fbbh));
-
- int y = MIN(bbh, ty + _desc.ascent - bby);
- tmp += bbh - y;
- y -= MAX(0, ty + _desc.ascent - bby - dst->h);
-
- if (dst->format.bytesPerPixel == 1)
- drawCharIntern<byte>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
- else if (dst->format.bytesPerPixel == 2)
- drawCharIntern<uint16>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
-}
-
-
-#pragma mark -
-
-/* BEGIN font.h*/
-/* bitmap_t helper macros*/
-#define BITMAP_WORDS(x) (((x)+15)/16) /* image size in words*/
-#define BITMAP_BYTES(x) (BITMAP_WORDS(x)*sizeof(bitmap_t))
-#define BITMAP_BITSPERIMAGE (sizeof(bitmap_t) * 8)
-#define BITMAP_BITVALUE(n) ((bitmap_t) (((bitmap_t) 1) << (n)))
-#define BITMAP_FIRSTBIT (BITMAP_BITVALUE(BITMAP_BITSPERIMAGE - 1))
-#define BITMAP_TESTBIT(m) ((m) & BITMAP_FIRSTBIT)
-#define BITMAP_SHIFTBIT(m) ((bitmap_t) ((m) << 1))
-
-/* builtin C-based proportional/fixed font structure */
-/* based on The Microwindows Project http://microwindows.org */
-struct NewFontData {
- char * name; /* font name*/
- int maxwidth; /* max width in pixels*/
- int height; /* height in pixels*/
- int ascent; /* ascent (baseline) height*/
- int firstchar; /* first character in bitmap*/
- int size; /* font size in glyphs*/
- bitmap_t* bits; /* 16-bit right-padded bitmap data*/
- unsigned long* offset; /* offsets into bitmap data*/
- unsigned char* width; /* character widths or NULL if fixed*/
- BBX* bbx; /* character bounding box or NULL if fixed */
- int defaultchar; /* default char (not glyph index)*/
- long bits_size; /* # words of bitmap_t bits*/
-
- /* unused by runtime system, read in by convbdf*/
- char * facename; /* facename of font*/
- char * copyright; /* copyright info for loadable fonts*/
- int pixel_size;
- int descent;
- int fbbw, fbbh, fbbx, fbby;
-};
-/* END font.h*/
-
-#define isprefix(buf,str) (!strncmp(buf, str, strlen(str)))
-#define strequal(s1,s2) (!strcmp(s1, s2))
-
-#define EXTRA 300
-
-int start_char = 0;
-int limit_char = 255;
-
-NewFontData* bdf_read_font(Common::SeekableReadStream &fp);
-int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf);
-int bdf_read_bitmaps(Common::SeekableReadStream &fp, NewFontData* pf);
-char * bdf_getline(Common::SeekableReadStream &fp, char *buf, int len);
-bitmap_t bdf_hexval(unsigned char *buf);
-
-void free_font(NewFontData* pf) {
- if (!pf)
- return;
- free(pf->name);
- free(pf->facename);
- free(pf->bits);
- free(pf->offset);
- free(pf->width);
- free(pf->bbx);
- free(pf);
-}
-
-/* build incore structure from .bdf file*/
-NewFontData* bdf_read_font(Common::SeekableReadStream &fp) {
- NewFontData* pf;
- uint32 pos = fp.pos();
-
- pf = (NewFontData*)calloc(1, sizeof(NewFontData));
- if (!pf)
- goto errout;
-
- if (!bdf_read_header(fp, pf)) {
- warning("Error reading font header");
- goto errout;
- }
-
- fp.seek(pos, SEEK_SET);
-
- if (!bdf_read_bitmaps(fp, pf)) {
- warning("Error reading font bitmaps");
- goto errout;
- }
-
- return pf;
-
- errout:
- free_font(pf);
- return NULL;
-}
-
-/* read bdf font header information, return 0 on error*/
-int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
- int encoding = 0;
- int nchars = 0, maxwidth, maxheight;
- int firstchar = 65535;
- int lastchar = -1;
- char buf[256];
- char facename[256];
- char copyright[256];
-
- /* set certain values to errors for later error checking*/
- pf->defaultchar = -1;
- pf->ascent = -1;
- pf->descent = -1;
-
- for (;;) {
- if (!bdf_getline(fp, buf, sizeof(buf))) {
- warning("Error: EOF on file");
- return 0;
- }
-
- /* note: the way sscanf is used here ensures that a terminating null
- character is automatically added. Refer to:
- http://pubs.opengroup.org/onlinepubs/009695399/functions/fscanf.html */
-
- if (isprefix(buf, "FONT ")) { /* not required*/
- if (sscanf(buf, "FONT %[^\n]", facename) != 1) {
- warning("Error: bad 'FONT'");
- return 0;
- }
- pf->facename = strdup(facename);
- continue;
- }
- if (isprefix(buf, "COPYRIGHT ")) { /* not required*/
- if (sscanf(buf, "COPYRIGHT \"%[^\"]", copyright) != 1) {
- warning("Error: bad 'COPYRIGHT'");
- return 0;
- }
- pf->copyright = strdup(copyright);
- continue;
- }
- if (isprefix(buf, "DEFAULT_CHAR ")) { /* not required*/
- if (sscanf(buf, "DEFAULT_CHAR %d", &pf->defaultchar) != 1) {
- warning("Error: bad 'DEFAULT_CHAR'");
- return 0;
- }
- }
- if (isprefix(buf, "FONT_DESCENT ")) {
- if (sscanf(buf, "FONT_DESCENT %d", &pf->descent) != 1) {
- warning("Error: bad 'FONT_DESCENT'");
- return 0;
- }
- continue;
- }
- if (isprefix(buf, "FONT_ASCENT ")) {
- if (sscanf(buf, "FONT_ASCENT %d", &pf->ascent) != 1) {
- warning("Error: bad 'FONT_ASCENT'");
- return 0;
- }
- continue;
- }
- if (isprefix(buf, "FONTBOUNDINGBOX ")) {
- if (sscanf(buf, "FONTBOUNDINGBOX %d %d %d %d",
- &pf->fbbw, &pf->fbbh, &pf->fbbx, &pf->fbby) != 4) {
- warning("Error: bad 'FONTBOUNDINGBOX'");
- return 0;
- }
- continue;
- }
- if (isprefix(buf, "CHARS ")) {
- if (sscanf(buf, "CHARS %d", &nchars) != 1) {
- warning("Error: bad 'CHARS'");
- return 0;
- }
- continue;
- }
-
- /*
- * Reading ENCODING is necessary to get firstchar/lastchar
- * which is needed to pre-calculate our offset and widths
- * array sizes.
- */
- if (isprefix(buf, "ENCODING ")) {
- if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
- warning("Error: bad 'ENCODING'");
- return 0;
- }
- if (encoding >= 0 &&
- encoding <= limit_char &&
- encoding >= start_char) {
-
- if (firstchar > encoding)
- firstchar = encoding;
- if (lastchar < encoding)
- lastchar = encoding;
- }
- continue;
- }
- if (strequal(buf, "ENDFONT"))
- break;
- }
-
- /* calc font height*/
- if (pf->ascent < 0 || pf->descent < 0 || firstchar < 0) {
- warning("Error: Invalid BDF file, requires FONT_ASCENT/FONT_DESCENT/ENCODING");
- return 0;
- }
- pf->height = pf->ascent + pf->descent;
-
- /* calc default char*/
- if (pf->defaultchar < 0 ||
- pf->defaultchar < firstchar ||
- pf->defaultchar > limit_char )
- pf->defaultchar = firstchar;
-
- /* calc font size (offset/width entries)*/
- pf->firstchar = firstchar;
- pf->size = lastchar - firstchar + 1;
-
- /* use the font boundingbox to get initial maxwidth*/
- /*maxwidth = pf->fbbw - pf->fbbx;*/
- maxwidth = pf->fbbw;
- maxheight = pf->fbbh;
-
- /* initially use font bounding box for bits allocation*/
- pf->bits_size = nchars * BITMAP_WORDS(maxwidth) * maxheight;
-
- /* allocate bits, offset, and width arrays*/
- pf->bits = (bitmap_t *)malloc(pf->bits_size * sizeof(bitmap_t) + EXTRA);
- pf->offset = (unsigned long *)malloc(pf->size * sizeof(unsigned long));
- pf->width = (unsigned char *)malloc(pf->size * sizeof(unsigned char));
- pf->bbx = (BBX *)malloc(pf->size * sizeof(BBX));
-
- if (!pf->bits || !pf->offset || !pf->width) {
- warning("Error: no memory for font load");
- return 0;
- }
-
- return 1;
-}
-
-/* read bdf font bitmaps, return 0 on error*/
-int bdf_read_bitmaps(Common::SeekableReadStream &fp, NewFontData* pf) {
- long ofs = 0;
- int maxwidth = 0;
- int i, k, encoding = 0, width = 0;
- int bbw = 0, bbh = 0, bbx = 0, bby = 0;
- int proportional = 0;
- int need_bbx = 0;
- int encodetable = 0;
- long l;
- char buf[256];
-
- /* initially mark offsets as not used*/
- for (i = 0; i < pf->size; ++i)
- pf->offset[i] = (unsigned long)-1;
-
- for (;;) {
- if (!bdf_getline(fp, buf, sizeof(buf))) {
- warning("Error: EOF on file");
- return 0;
- }
- if (isprefix(buf, "STARTCHAR")) {
- encoding = width = bbw = bbh = bbx = bby = -1;
- continue;
- }
- if (isprefix(buf, "ENCODING ")) {
- if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
- warning("Error: bad 'ENCODING'");
- return 0;
- }
- if (encoding < start_char || encoding > limit_char)
- encoding = -1;
- continue;
- }
- if (isprefix(buf, "DWIDTH ")) {
- if (sscanf(buf, "DWIDTH %d", &width) != 1) {
- warning("Error: bad 'DWIDTH'");
- return 0;
- }
- /* use font boundingbox width if DWIDTH <= 0*/
- if (width <= 0)
- width = pf->fbbw - pf->fbbx;
- continue;
- }
- if (isprefix(buf, "BBX ")) {
- if (sscanf(buf, "BBX %d %d %d %d", &bbw, &bbh, &bbx, &bby) != 4) {
- warning("Error: bad 'BBX'");
- return 0;
- }
- continue;
- }
- if (strequal(buf, "BITMAP")) {
- bitmap_t *ch_bitmap = pf->bits + ofs;
- int ch_words;
-
- if (encoding < 0)
- continue;
-
- /* set bits offset in encode map*/
- if (pf->offset[encoding-pf->firstchar] != (unsigned long)-1) {
- warning("Error: duplicate encoding for character %d (0x%02x), ignoring duplicate",
- encoding, encoding);
- continue;
- }
- pf->offset[encoding-pf->firstchar] = ofs;
- pf->width[encoding-pf->firstchar] = width;
-
- pf->bbx[encoding-pf->firstchar].w = bbw;
- pf->bbx[encoding-pf->firstchar].h = bbh;
- pf->bbx[encoding-pf->firstchar].x = bbx;
- pf->bbx[encoding-pf->firstchar].y = bby;
-
- if (width > maxwidth)
- maxwidth = width;
-
- /* clear bitmap*/
- memset(ch_bitmap, 0, BITMAP_BYTES(bbw) * bbh);
-
- ch_words = BITMAP_WORDS(bbw);
-
- /* read bitmaps*/
- for (i = 0; i < bbh; ++i) {
- if (!bdf_getline(fp, buf, sizeof(buf))) {
- warning("Error: EOF reading BITMAP data");
- return 0;
- }
- if (isprefix(buf, "ENDCHAR"))
- break;
-
- for (k = 0; k < ch_words; ++k) {
- bitmap_t value;
-
- value = bdf_hexval((unsigned char *)buf);
- if (bbw > 8) {
- WRITE_UINT16(ch_bitmap, value);
- } else {
- WRITE_UINT16(ch_bitmap, value << 8);
- }
- ch_bitmap++;
- }
- }
-
- ofs += ch_words * bbh;
- continue;
- }
- if (strequal(buf, "ENDFONT"))
- break;
- }
-
- /* set max width*/
- pf->maxwidth = maxwidth;
-
- /* change unused offset/width values to default char values*/
- for (i = 0; i < pf->size; ++i) {
- int defchar = pf->defaultchar - pf->firstchar;
-
- if (pf->offset[i] == (unsigned long)-1) {
- pf->offset[i] = pf->offset[defchar];
- pf->width[i] = pf->width[defchar];
- pf->bbx[i].w = pf->bbx[defchar].w;
- pf->bbx[i].h = pf->bbx[defchar].h;
- pf->bbx[i].x = pf->bbx[defchar].x;
- pf->bbx[i].y = pf->bbx[defchar].y;
- }
- }
-
- /* determine whether font doesn't require encode table*/
- l = 0;
- for (i = 0; i < pf->size; ++i) {
- if (pf->offset[i] != (unsigned long)l) {
- encodetable = 1;
- break;
- }
- l += BITMAP_WORDS(pf->bbx[i].w) * pf->bbx[i].h;
- }
- if (!encodetable) {
- free(pf->offset);
- pf->offset = NULL;
- }
-
- /* determine whether font is fixed-width*/
- for (i = 0; i < pf->size; ++i) {
- if (pf->width[i] != maxwidth) {
- proportional = 1;
- break;
- }
- }
- if (!proportional) {
- free(pf->width);
- pf->width = NULL;
- }
-
- /* determine if the font needs a bbx table */
- for (i = 0; i < pf->size; ++i) {
- if (pf->bbx[i].w != pf->fbbw || pf->bbx[i].h != pf->fbbh || pf->bbx[i].x != pf->fbbx || pf->bbx[i].y != pf->fbby) {
- need_bbx = 1;
- break;
- }
- }
- if (!need_bbx) {
- free(pf->bbx);
- pf->bbx = NULL;
- }
-
- /* reallocate bits array to actual bits used*/
- if (ofs < pf->bits_size) {
- bitmap_t *tmp = (bitmap_t *)realloc(pf->bits, ofs * sizeof(bitmap_t));
- if (tmp != NULL || ofs == 0)
- pf->bits = tmp;
- else
- error("bdf_read_bitmaps: Error while reallocating memory");
- pf->bits_size = ofs;
- }
- else {
- if (ofs > pf->bits_size) {
- warning("Warning: DWIDTH spec > max FONTBOUNDINGBOX");
- if (ofs > pf->bits_size+EXTRA) {
- warning("Error: Not enough bits initially allocated");
- return 0;
- }
- pf->bits_size = ofs;
- }
- }
-
- return 1;
-}
-
-/* read the next non-comment line, returns buf or NULL if EOF*/
-// TODO: Can we use SeekableReadStream::readLine instead?
-char *bdf_getline(Common::SeekableReadStream &fp, char *buf, int len) {
- int c;
- char *b;
-
- for (;;) {
- b = buf;
- while (!fp.eos()) {
- c = fp.readByte();
- if (c == '\r')
- continue;
- if (c == '\n')
- break;
- if (b - buf >= (len - 1))
- break;
- *b++ = c;
- }
- *b = '\0';
- if (fp.eos() && b == buf)
- return NULL;
- if (b != buf && !isprefix(buf, "COMMENT"))
- break;
- }
- return buf;
-}
-
-/* return hex value of buffer */
-bitmap_t bdf_hexval(unsigned char *buf) {
- bitmap_t val = 0;
-
- for (unsigned char *ptr = buf; *ptr; ptr++) {
- int c = *ptr;
-
- if (c >= '0' && c <= '9')
- c -= '0';
- else if (c >= 'A' && c <= 'F')
- c = c - 'A' + 10;
- else if (c >= 'a' && c <= 'f')
- c = c - 'a' + 10;
- else
- c = 0;
- val = (val << 4) | c;
- }
- return val;
-}
-
-NewFont *NewFont::loadFont(Common::SeekableReadStream &stream) {
- NewFontData *data = bdf_read_font(stream);
- if (!data || stream.err()) {
- free_font(data);
- return 0;
- }
-
- FontDesc desc;
- desc.name = data->name;
- desc.maxwidth = data->maxwidth;
- desc.height = data->height;
- desc.fbbw = data->fbbw;
- desc.fbbh = data->fbbh;
- desc.fbbx = data->fbbx;
- desc.fbby = data->fbby;
- desc.ascent = data->ascent;
- desc.firstchar = data->firstchar;
- desc.size = data->size;
- desc.bits = data->bits;
- desc.offset = data->offset;
- desc.width = data->width;
- desc.bbx = data->bbx;
- desc.defaultchar = data->defaultchar;
- desc.bits_size = data->bits_size;
-
- return new NewFont(desc, data);
-}
-
-bool NewFont::cacheFontData(const NewFont &font, const Common::String &filename) {
- Common::DumpFile cacheFile;
- if (!cacheFile.open(filename)) {
- warning("Couldn't open file '%s' for writing", filename.c_str());
- return false;
- }
-
- cacheFile.writeUint16BE(font._desc.maxwidth);
- cacheFile.writeUint16BE(font._desc.height);
- cacheFile.writeUint16BE(font._desc.fbbw);
- cacheFile.writeUint16BE(font._desc.fbbh);
- cacheFile.writeSint16BE(font._desc.fbbx);
- cacheFile.writeSint16BE(font._desc.fbby);
- cacheFile.writeUint16BE(font._desc.ascent);
- cacheFile.writeUint16BE(font._desc.firstchar);
- cacheFile.writeUint16BE(font._desc.size);
- cacheFile.writeUint16BE(font._desc.defaultchar);
- cacheFile.writeUint32BE(font._desc.bits_size);
-
- for (long i = 0; i < font._desc.bits_size; ++i) {
- cacheFile.writeUint16BE(font._desc.bits[i]);
- }
-
- if (font._desc.offset) {
- cacheFile.writeByte(1);
- for (int i = 0; i < font._desc.size; ++i) {
- cacheFile.writeUint32BE(font._desc.offset[i]);
- }
- } else {
- cacheFile.writeByte(0);
- }
-
- if (font._desc.width) {
- cacheFile.writeByte(1);
- for (int i = 0; i < font._desc.size; ++i) {
- cacheFile.writeByte(font._desc.width[i]);
- }
- } else {
- cacheFile.writeByte(0);
- }
-
- if (font._desc.bbx) {
- cacheFile.writeByte(1);
- for (int i = 0; i < font._desc.size; ++i) {
- cacheFile.writeByte(font._desc.bbx[i].w);
- cacheFile.writeByte(font._desc.bbx[i].h);
- cacheFile.writeByte(font._desc.bbx[i].x);
- cacheFile.writeByte(font._desc.bbx[i].y);
- }
- } else {
- cacheFile.writeByte(0);
- }
-
- return !cacheFile.err();
-}
-
-NewFont *NewFont::loadFromCache(Common::SeekableReadStream &stream) {
- NewFont *font = 0;
-
- NewFontData *data = (NewFontData *)malloc(sizeof(NewFontData));
- if (!data)
- return 0;
-
- memset(data, 0, sizeof(NewFontData));
-
- data->maxwidth = stream.readUint16BE();
- data->height = stream.readUint16BE();
- data->fbbw = stream.readUint16BE();
- data->fbbh = stream.readUint16BE();
- data->fbbx = stream.readSint16BE();
- data->fbby = stream.readSint16BE();
- data->ascent = stream.readUint16BE();
- data->firstchar = stream.readUint16BE();
- data->size = stream.readUint16BE();
- data->defaultchar = stream.readUint16BE();
- data->bits_size = stream.readUint32BE();
-
- data->bits = (bitmap_t *)malloc(sizeof(bitmap_t) * data->bits_size);
- if (!data->bits) {
- free(data);
- return 0;
- }
-
- for (long i = 0; i < data->bits_size; ++i) {
- data->bits[i] = stream.readUint16BE();
- }
-
- bool hasOffsetTable = (stream.readByte() != 0);
- if (hasOffsetTable) {
- data->offset = (unsigned long *)malloc(sizeof(unsigned long) * data->size);
- if (!data->offset) {
- free(data->bits);
- free(data);
- return 0;
- }
-
- for (int i = 0; i < data->size; ++i) {
- data->offset[i] = stream.readUint32BE();
- }
- }
-
- bool hasWidthTable = (stream.readByte() != 0);
- if (hasWidthTable) {
- data->width = (unsigned char *)malloc(sizeof(unsigned char) * data->size);
- if (!data->width) {
- free(data->bits);
- free(data->offset);
- free(data);
- return 0;
- }
-
- for (int i = 0; i < data->size; ++i) {
- data->width[i] = stream.readByte();
- }
- }
-
- bool hasBBXTable = (stream.readByte() != 0);
- if (hasBBXTable) {
- data->bbx = (BBX *)malloc(sizeof(BBX) * data->size);
- if (!data->bbx) {
- free(data->bits);
- free(data->offset);
- free(data->width);
- free(data);
- return 0;
- }
-
- for (int i = 0; i < data->size; ++i) {
- data->bbx[i].w = (int8)stream.readByte();
- data->bbx[i].h = (int8)stream.readByte();
- data->bbx[i].x = (int8)stream.readByte();
- data->bbx[i].y = (int8)stream.readByte();
- }
- }
-
- if (stream.err() || stream.eos()) {
- free(data->bits);
- free(data->offset);
- free(data->width);
- free(data);
- return 0;
- }
-
- FontDesc desc;
- desc.name = data->name;
- desc.maxwidth = data->maxwidth;
- desc.height = data->height;
- desc.fbbw = data->fbbw;
- desc.fbbh = data->fbbh;
- desc.fbbx = data->fbbx;
- desc.fbby = data->fbby;
- desc.ascent = data->ascent;
- desc.firstchar = data->firstchar;
- desc.size = data->size;
- desc.bits = data->bits;
- desc.offset = data->offset;
- desc.width = data->width;
- desc.bbx = data->bbx;
- desc.defaultchar = data->defaultchar;
- desc.bits_size = data->bits_size;
-
- font = new NewFont(desc, data);
- if (!font) {
- free(data->bits);
- free(data->offset);
- free(data->width);
- free(data);
- return 0;
- }
-
- return font;
-}
-
-#pragma mark -
-
-
int Font::getStringWidth(const Common::String &str) const {
int space = 0;
@@ -944,7 +186,7 @@ int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Co
if (lineWidth > 0) {
wrapper.add(line, lineWidth);
// Trim left side
- while (tmpStr.size() && isspace(tmpStr[0])) {
+ while (tmpStr.size() && isspace(static_cast<unsigned char>(tmpStr[0]))) {
tmpWidth -= getCharWidth(tmpStr[0]);
tmpStr.deleteChar(0);
}
diff --git a/graphics/font.h b/graphics/font.h
index dc75f86e1f..9c0b4affc1 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -25,7 +25,6 @@
#include "common/str.h"
namespace Common {
-class SeekableReadStream;
template<class T> class Array;
}
@@ -114,68 +113,6 @@ public:
int wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const;
};
-typedef uint16 bitmap_t; /* bitmap image unit size*/
-
-struct BBX {
- int8 w;
- int8 h;
- int8 x;
- int8 y;
-};
-
-/* builtin C-based proportional/fixed font structure */
-/* based on The Microwindows Project http://microwindows.org */
-struct FontDesc {
- const char * name; /* font name*/
- int maxwidth; /* max width in pixels*/
- int height; /* height in pixels*/
- int fbbw, fbbh, fbbx, fbby; /* max bounding box */
- int ascent; /* ascent (baseline) height*/
- int firstchar; /* first character in bitmap*/
- int size; /* font size in glyphs*/
- const bitmap_t* bits; /* 16-bit right-padded bitmap data*/
- const unsigned long* offset; /* offsets into bitmap data*/
- const unsigned char* width; /* character widths or NULL if fixed*/
- const BBX* bbx; /* character bounding box or NULL if fixed */
- int defaultchar; /* default char (not glyph index)*/
- long bits_size; /* # words of bitmap_t bits*/
-};
-
-struct NewFontData;
-
-class NewFont : public Font {
-protected:
- FontDesc _desc;
- NewFontData *_font;
-
-public:
- NewFont(const FontDesc &desc, NewFontData *font = 0) : _desc(desc), _font(font) {}
- ~NewFont();
-
- virtual int getFontHeight() const { return _desc.height; }
- virtual int getMaxCharWidth() const { return _desc.maxwidth; }
-
- virtual int getCharWidth(byte chr) const;
- virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const;
-
- static NewFont *loadFont(Common::SeekableReadStream &stream);
- static bool cacheFontData(const NewFont &font, const Common::String &filename);
- static NewFont *loadFromCache(Common::SeekableReadStream &stream);
-};
-
-#define DEFINE_FONT(n) \
- const NewFont *n = 0; \
- void create_##n() { \
- n = new NewFont(desc); \
- }
-
-#define FORWARD_DECLARE_FONT(n) \
- extern const NewFont *n; \
- extern void create_##n()
-
-#define INIT_FONT(n) \
- create_##n()
-
} // End of namespace Graphics
#endif
diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp
index f40cf97602..e59e5a33c5 100644
--- a/graphics/fontman.cpp
+++ b/graphics/fontman.cpp
@@ -19,11 +19,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "graphics/font.h"
#include "graphics/fontman.h"
+#include "graphics/font.h"
+#include "graphics/fonts/bdf.h"
+
#include "common/translation.h"
+namespace Common {
DECLARE_SINGLETON(Graphics::FontManager);
+}
namespace Graphics {
diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp
new file mode 100644
index 0000000000..b7d0f7749e
--- /dev/null
+++ b/graphics/fonts/bdf.cpp
@@ -0,0 +1,796 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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/fonts/bdf.h"
+
+#include "common/file.h"
+#include "common/endian.h"
+#include "common/textconsole.h"
+
+#include "graphics/surface.h"
+
+namespace Graphics {
+
+void free_font(BdfFontData *pf);
+
+BdfFont::~BdfFont() {
+ if (_font) {
+ free_font(_font);
+ }
+}
+
+int BdfFont::getFontHeight() const {
+ return _desc.height;
+}
+
+int BdfFont::getMaxCharWidth() const {
+ return _desc.maxwidth;
+}
+
+int BdfFont::getCharWidth(byte chr) const {
+ // If no width table is specified, return the maximum width
+ if (!_desc.width)
+ return _desc.maxwidth;
+ // If this character is not included in the font, use the default char.
+ if (chr < _desc.firstchar || _desc.firstchar + _desc.size < chr) {
+ chr = _desc.defaultchar;
+ }
+ return _desc.width[chr - _desc.firstchar];
+}
+
+
+template<typename PixelType>
+void drawCharIntern(byte *ptr, uint pitch, const bitmap_t *src, int h, int minX, int maxX, const PixelType color) {
+ const bitmap_t maxXMask = ~((1 << (16 - maxX)) - 1);
+ while (h-- > 0) {
+ bitmap_t buffer = READ_UINT16(src);
+ src++;
+
+ buffer &= maxXMask;
+ buffer <<= minX;
+ PixelType *tmp = (PixelType *)ptr;
+ while (buffer != 0) {
+ if ((buffer & 0x8000) != 0)
+ *tmp = color;
+ tmp++;
+ buffer <<= 1;
+ }
+
+ ptr += pitch;
+ }
+}
+
+void BdfFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const uint32 color) const {
+ assert(dst != 0);
+
+ assert(_desc.bits != 0 && _desc.maxwidth <= 16);
+ assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2);
+
+ // If this character is not included in the font, use the default char.
+ if (chr < _desc.firstchar || chr >= _desc.firstchar + _desc.size) {
+ chr = _desc.defaultchar;
+ }
+
+ chr -= _desc.firstchar;
+
+ int bbw, bbh, bbx, bby;
+
+ // Get the bounding box of the character
+ if (!_desc.bbx) {
+ bbw = _desc.fbbw;
+ bbh = _desc.fbbh;
+ bbx = _desc.fbbx;
+ bby = _desc.fbby;
+ } else {
+ bbw = _desc.bbx[chr].w;
+ bbh = _desc.bbx[chr].h;
+ bbx = _desc.bbx[chr].x;
+ bby = _desc.bbx[chr].y;
+ }
+
+ byte *ptr = (byte *)dst->getBasePtr(tx + bbx, ty + _desc.ascent - bby - bbh);
+
+ const bitmap_t *tmp = _desc.bits + (_desc.offset ? _desc.offset[chr] : (chr * _desc.fbbh));
+
+ int y = MIN(bbh, ty + _desc.ascent - bby);
+ tmp += bbh - y;
+ y -= MAX(0, ty + _desc.ascent - bby - dst->h);
+
+ if (dst->format.bytesPerPixel == 1)
+ drawCharIntern<byte>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
+ else if (dst->format.bytesPerPixel == 2)
+ drawCharIntern<uint16>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
+}
+
+
+#pragma mark -
+
+/* BEGIN font.h*/
+/* bitmap_t helper macros*/
+#define BITMAP_WORDS(x) (((x)+15)/16) /* image size in words*/
+#define BITMAP_BYTES(x) (BITMAP_WORDS(x)*sizeof(bitmap_t))
+#define BITMAP_BITSPERIMAGE (sizeof(bitmap_t) * 8)
+#define BITMAP_BITVALUE(n) ((bitmap_t) (((bitmap_t) 1) << (n)))
+#define BITMAP_FIRSTBIT (BITMAP_BITVALUE(BITMAP_BITSPERIMAGE - 1))
+#define BITMAP_TESTBIT(m) ((m) & BITMAP_FIRSTBIT)
+#define BITMAP_SHIFTBIT(m) ((bitmap_t) ((m) << 1))
+
+/* builtin C-based proportional/fixed font structure */
+/* based on The Microwindows Project http://microwindows.org */
+struct BdfFontData {
+ char *name; /* font name */
+ int maxwidth; /* max width in pixels */
+ int height; /* height in pixels */
+ int ascent; /* ascent (baseline) height */
+ int firstchar; /* first character in bitmap */
+ int size; /* font size in glyphs */
+ bitmap_t *bits; /* 16-bit right-padded bitmap data */
+ unsigned long *offset; /* offsets into bitmap data */
+ unsigned char *width; /* character widths or NULL if fixed */
+ BBX *bbx; /* character bounding box or NULL if fixed */
+ int defaultchar; /* default char (not glyph index) */
+ long bits_size; /* # words of bitmap_t bits */
+
+ /* unused by runtime system, read in by convbdf */
+ char *facename; /* facename of font */
+ char *copyright; /* copyright info for loadable fonts */
+ int pixel_size;
+ int descent;
+ int fbbw, fbbh, fbbx, fbby;
+};
+/* END font.h */
+
+#define isprefix(buf,str) (!strncmp(buf, str, strlen(str)))
+#define strequal(s1,s2) (!strcmp(s1, s2))
+
+#define EXTRA 300
+
+int start_char = 0;
+int limit_char = 255;
+
+BdfFontData *bdf_read_font(Common::SeekableReadStream &fp);
+int bdf_read_header(Common::SeekableReadStream &fp, BdfFontData *pf);
+int bdf_read_bitmaps(Common::SeekableReadStream &fp, BdfFontData *pf);
+char *bdf_getline(Common::SeekableReadStream &fp, char *buf, int len);
+bitmap_t bdf_hexval(unsigned char *buf);
+
+void free_font(BdfFontData *pf) {
+ if (!pf)
+ return;
+ free(pf->name);
+ free(pf->facename);
+ free(pf->copyright);
+ free(pf->bits);
+ free(pf->offset);
+ free(pf->width);
+ free(pf->bbx);
+ free(pf);
+}
+
+/* build incore structure from .bdf file*/
+BdfFontData *bdf_read_font(Common::SeekableReadStream &fp) {
+ BdfFontData *pf;
+ uint32 pos = fp.pos();
+
+ pf = (BdfFontData *)calloc(1, sizeof(BdfFontData));
+ if (!pf)
+ goto errout;
+
+ if (!bdf_read_header(fp, pf)) {
+ warning("Error reading font header");
+ goto errout;
+ }
+
+ fp.seek(pos, SEEK_SET);
+
+ if (!bdf_read_bitmaps(fp, pf)) {
+ warning("Error reading font bitmaps");
+ goto errout;
+ }
+
+ return pf;
+
+errout:
+ free_font(pf);
+ return NULL;
+}
+
+/* read bdf font header information, return 0 on error*/
+int bdf_read_header(Common::SeekableReadStream &fp, BdfFontData *pf) {
+ int encoding = 0;
+ int nchars = 0, maxwidth, maxheight;
+ int firstchar = 65535;
+ int lastchar = -1;
+ char buf[256];
+ char facename[256];
+ char copyright[256];
+ memset(facename, 0, sizeof(facename));
+ memset(copyright, 0, sizeof(copyright));
+
+ /* set certain values to errors for later error checking*/
+ pf->defaultchar = -1;
+ pf->ascent = -1;
+ pf->descent = -1;
+
+ for (;;) {
+ if (!bdf_getline(fp, buf, sizeof(buf))) {
+ warning("Error: EOF on file");
+ return 0;
+ }
+
+ /* note: the way sscanf is used here ensures that a terminating null
+ character is automatically added. Refer to:
+ http://pubs.opengroup.org/onlinepubs/009695399/functions/fscanf.html */
+
+ if (isprefix(buf, "FONT ")) { /* not required*/
+ if (sscanf(buf, "FONT %[^\n]", facename) != 1) {
+ warning("Error: bad 'FONT'");
+ return 0;
+ }
+
+ pf->facename = strdup(facename);
+ continue;
+ }
+ if (isprefix(buf, "COPYRIGHT ")) { /* not required*/
+ if (sscanf(buf, "COPYRIGHT \"%[^\"]", copyright) != 1) {
+ warning("Error: bad 'COPYRIGHT'");
+ return 0;
+ }
+
+ pf->copyright = strdup(copyright);
+ continue;
+ }
+ if (isprefix(buf, "DEFAULT_CHAR ")) { /* not required*/
+ if (sscanf(buf, "DEFAULT_CHAR %d", &pf->defaultchar) != 1) {
+ warning("Error: bad 'DEFAULT_CHAR'");
+ return 0;
+ }
+ }
+ if (isprefix(buf, "FONT_DESCENT ")) {
+ if (sscanf(buf, "FONT_DESCENT %d", &pf->descent) != 1) {
+ warning("Error: bad 'FONT_DESCENT'");
+ return 0;
+ }
+ continue;
+ }
+ if (isprefix(buf, "FONT_ASCENT ")) {
+ if (sscanf(buf, "FONT_ASCENT %d", &pf->ascent) != 1) {
+ warning("Error: bad 'FONT_ASCENT'");
+ return 0;
+ }
+ continue;
+ }
+ if (isprefix(buf, "FONTBOUNDINGBOX ")) {
+ if (sscanf(buf, "FONTBOUNDINGBOX %d %d %d %d",
+ &pf->fbbw, &pf->fbbh, &pf->fbbx, &pf->fbby) != 4) {
+ warning("Error: bad 'FONTBOUNDINGBOX'");
+ return 0;
+ }
+ continue;
+ }
+ if (isprefix(buf, "CHARS ")) {
+ if (sscanf(buf, "CHARS %d", &nchars) != 1) {
+ warning("Error: bad 'CHARS'");
+ return 0;
+ }
+ continue;
+ }
+
+ /*
+ * Reading ENCODING is necessary to get firstchar/lastchar
+ * which is needed to pre-calculate our offset and widths
+ * array sizes.
+ */
+ if (isprefix(buf, "ENCODING ")) {
+ if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
+ warning("Error: bad 'ENCODING'");
+ return 0;
+ }
+ if (encoding >= 0 &&
+ encoding <= limit_char &&
+ encoding >= start_char) {
+
+ if (firstchar > encoding)
+ firstchar = encoding;
+ if (lastchar < encoding)
+ lastchar = encoding;
+ }
+ continue;
+ }
+ if (strequal(buf, "ENDFONT"))
+ break;
+ }
+
+ /* calc font height*/
+ if (pf->ascent < 0 || pf->descent < 0 || firstchar < 0) {
+ warning("Error: Invalid BDF file, requires FONT_ASCENT/FONT_DESCENT/ENCODING");
+ return 0;
+ }
+ pf->height = pf->ascent + pf->descent;
+
+ /* calc default char*/
+ if (pf->defaultchar < 0 ||
+ pf->defaultchar < firstchar ||
+ pf->defaultchar > limit_char)
+ pf->defaultchar = firstchar;
+
+ /* calc font size (offset/width entries)*/
+ pf->firstchar = firstchar;
+ pf->size = lastchar - firstchar + 1;
+
+ /* use the font boundingbox to get initial maxwidth*/
+ /*maxwidth = pf->fbbw - pf->fbbx;*/
+ maxwidth = pf->fbbw;
+ maxheight = pf->fbbh;
+
+ /* initially use font bounding box for bits allocation*/
+ pf->bits_size = nchars * BITMAP_WORDS(maxwidth) * maxheight;
+
+ /* allocate bits, offset, and width arrays*/
+ pf->bits = (bitmap_t *)malloc(pf->bits_size * sizeof(bitmap_t) + EXTRA);
+ pf->offset = (unsigned long *)malloc(pf->size * sizeof(unsigned long));
+ pf->width = (unsigned char *)malloc(pf->size * sizeof(unsigned char));
+ pf->bbx = (BBX *)malloc(pf->size * sizeof(BBX));
+
+ if (!pf->bits || !pf->offset || !pf->width) {
+ warning("Error: no memory for font load");
+ return 0;
+ }
+
+ return 1;
+}
+
+/* read bdf font bitmaps, return 0 on error*/
+int bdf_read_bitmaps(Common::SeekableReadStream &fp, BdfFontData *pf) {
+ long ofs = 0;
+ int maxwidth = 0;
+ int i, k, encoding = 0, width = 0;
+ int bbw = 0, bbh = 0, bbx = 0, bby = 0;
+ int proportional = 0;
+ int need_bbx = 0;
+ int encodetable = 0;
+ long l;
+ char buf[256];
+
+ /* initially mark offsets as not used*/
+ for (i = 0; i < pf->size; ++i)
+ pf->offset[i] = (unsigned long)-1;
+
+ for (;;) {
+ if (!bdf_getline(fp, buf, sizeof(buf))) {
+ warning("Error: EOF on file");
+ return 0;
+ }
+ if (isprefix(buf, "STARTCHAR")) {
+ encoding = width = bbw = bbh = bbx = bby = -1;
+ continue;
+ }
+ if (isprefix(buf, "ENCODING ")) {
+ if (sscanf(buf, "ENCODING %d", &encoding) != 1) {
+ warning("Error: bad 'ENCODING'");
+ return 0;
+ }
+ if (encoding < start_char || encoding > limit_char)
+ encoding = -1;
+ continue;
+ }
+ if (isprefix(buf, "DWIDTH ")) {
+ if (sscanf(buf, "DWIDTH %d", &width) != 1) {
+ warning("Error: bad 'DWIDTH'");
+ return 0;
+ }
+ /* use font boundingbox width if DWIDTH <= 0*/
+ if (width <= 0)
+ width = pf->fbbw - pf->fbbx;
+ continue;
+ }
+ if (isprefix(buf, "BBX ")) {
+ if (sscanf(buf, "BBX %d %d %d %d", &bbw, &bbh, &bbx, &bby) != 4) {
+ warning("Error: bad 'BBX'");
+ return 0;
+ }
+ continue;
+ }
+ if (strequal(buf, "BITMAP")) {
+ bitmap_t *ch_bitmap = pf->bits + ofs;
+ int ch_words;
+
+ if (encoding < 0)
+ continue;
+
+ /* set bits offset in encode map*/
+ if (pf->offset[encoding - pf->firstchar] != (unsigned long)-1) {
+ warning("Error: duplicate encoding for character %d (0x%02x), ignoring duplicate",
+ encoding, encoding);
+ continue;
+ }
+ pf->offset[encoding - pf->firstchar] = ofs;
+ pf->width[encoding - pf->firstchar] = width;
+
+ pf->bbx[encoding - pf->firstchar].w = bbw;
+ pf->bbx[encoding - pf->firstchar].h = bbh;
+ pf->bbx[encoding - pf->firstchar].x = bbx;
+ pf->bbx[encoding - pf->firstchar].y = bby;
+
+ if (width > maxwidth)
+ maxwidth = width;
+
+ /* clear bitmap*/
+ memset(ch_bitmap, 0, BITMAP_BYTES(bbw) * bbh);
+
+ ch_words = BITMAP_WORDS(bbw);
+
+ /* read bitmaps*/
+ for (i = 0; i < bbh; ++i) {
+ if (!bdf_getline(fp, buf, sizeof(buf))) {
+ warning("Error: EOF reading BITMAP data");
+ return 0;
+ }
+ if (isprefix(buf, "ENDCHAR"))
+ break;
+
+ for (k = 0; k < ch_words; ++k) {
+ bitmap_t value;
+
+ value = bdf_hexval((unsigned char *)buf);
+ if (bbw > 8) {
+ WRITE_UINT16(ch_bitmap, value);
+ } else {
+ WRITE_UINT16(ch_bitmap, value << 8);
+ }
+ ch_bitmap++;
+ }
+ }
+
+ ofs += ch_words * bbh;
+ continue;
+ }
+ if (strequal(buf, "ENDFONT"))
+ break;
+ }
+
+ /* set max width*/
+ pf->maxwidth = maxwidth;
+
+ /* change unused offset/width values to default char values*/
+ for (i = 0; i < pf->size; ++i) {
+ int defchar = pf->defaultchar - pf->firstchar;
+
+ if (pf->offset[i] == (unsigned long)-1) {
+ pf->offset[i] = pf->offset[defchar];
+ pf->width[i] = pf->width[defchar];
+ pf->bbx[i].w = pf->bbx[defchar].w;
+ pf->bbx[i].h = pf->bbx[defchar].h;
+ pf->bbx[i].x = pf->bbx[defchar].x;
+ pf->bbx[i].y = pf->bbx[defchar].y;
+ }
+ }
+
+ /* determine whether font doesn't require encode table*/
+ l = 0;
+ for (i = 0; i < pf->size; ++i) {
+ if (pf->offset[i] != (unsigned long)l) {
+ encodetable = 1;
+ break;
+ }
+ l += BITMAP_WORDS(pf->bbx[i].w) * pf->bbx[i].h;
+ }
+ if (!encodetable) {
+ free(pf->offset);
+ pf->offset = NULL;
+ }
+
+ /* determine whether font is fixed-width*/
+ for (i = 0; i < pf->size; ++i) {
+ if (pf->width[i] != maxwidth) {
+ proportional = 1;
+ break;
+ }
+ }
+ if (!proportional) {
+ free(pf->width);
+ pf->width = NULL;
+ }
+
+ /* determine if the font needs a bbx table */
+ for (i = 0; i < pf->size; ++i) {
+ if (pf->bbx[i].w != pf->fbbw || pf->bbx[i].h != pf->fbbh || pf->bbx[i].x != pf->fbbx || pf->bbx[i].y != pf->fbby) {
+ need_bbx = 1;
+ break;
+ }
+ }
+ if (!need_bbx) {
+ free(pf->bbx);
+ pf->bbx = NULL;
+ }
+
+ /* reallocate bits array to actual bits used*/
+ if (ofs < pf->bits_size) {
+ bitmap_t *tmp = (bitmap_t *)realloc(pf->bits, ofs * sizeof(bitmap_t));
+ if (tmp != NULL || ofs == 0)
+ pf->bits = tmp;
+ else
+ error("bdf_read_bitmaps: Error while reallocating memory");
+ pf->bits_size = ofs;
+ } else {
+ if (ofs > pf->bits_size) {
+ warning("Warning: DWIDTH spec > max FONTBOUNDINGBOX");
+ if (ofs > pf->bits_size + EXTRA) {
+ warning("Error: Not enough bits initially allocated");
+ return 0;
+ }
+ pf->bits_size = ofs;
+ }
+ }
+
+ return 1;
+}
+
+/* read the next non-comment line, returns buf or NULL if EOF*/
+// TODO: Can we use SeekableReadStream::readLine instead?
+char *bdf_getline(Common::SeekableReadStream &fp, char *buf, int len) {
+ int c;
+ char *b;
+
+ for (;;) {
+ b = buf;
+ while (!fp.eos()) {
+ c = fp.readByte();
+ if (c == '\r')
+ continue;
+ if (c == '\n')
+ break;
+ if (b - buf >= (len - 1))
+ break;
+ *b++ = c;
+ }
+ *b = '\0';
+ if (fp.eos() && b == buf)
+ return NULL;
+ if (b != buf && !isprefix(buf, "COMMENT"))
+ break;
+ }
+ return buf;
+}
+
+/* return hex value of buffer */
+bitmap_t bdf_hexval(unsigned char *buf) {
+ bitmap_t val = 0;
+
+ for (unsigned char *ptr = buf; *ptr; ptr++) {
+ int c = *ptr;
+
+ if (c >= '0' && c <= '9')
+ c -= '0';
+ else if (c >= 'A' && c <= 'F')
+ c = c - 'A' + 10;
+ else if (c >= 'a' && c <= 'f')
+ c = c - 'a' + 10;
+ else
+ c = 0;
+ val = (val << 4) | c;
+ }
+ return val;
+}
+
+BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) {
+ BdfFontData *data = bdf_read_font(stream);
+ if (!data || stream.err()) {
+ free_font(data);
+ return 0;
+ }
+
+ BdfFontDesc desc;
+ desc.name = data->name;
+ desc.maxwidth = data->maxwidth;
+ desc.height = data->height;
+ desc.fbbw = data->fbbw;
+ desc.fbbh = data->fbbh;
+ desc.fbbx = data->fbbx;
+ desc.fbby = data->fbby;
+ desc.ascent = data->ascent;
+ desc.firstchar = data->firstchar;
+ desc.size = data->size;
+ desc.bits = data->bits;
+ desc.offset = data->offset;
+ desc.width = data->width;
+ desc.bbx = data->bbx;
+ desc.defaultchar = data->defaultchar;
+ desc.bits_size = data->bits_size;
+
+ return new BdfFont(desc, data);
+}
+
+bool BdfFont::cacheFontData(const BdfFont &font, const Common::String &filename) {
+ Common::DumpFile cacheFile;
+ if (!cacheFile.open(filename)) {
+ warning("Couldn't open file '%s' for writing", filename.c_str());
+ return false;
+ }
+
+ cacheFile.writeUint16BE(font._desc.maxwidth);
+ cacheFile.writeUint16BE(font._desc.height);
+ cacheFile.writeUint16BE(font._desc.fbbw);
+ cacheFile.writeUint16BE(font._desc.fbbh);
+ cacheFile.writeSint16BE(font._desc.fbbx);
+ cacheFile.writeSint16BE(font._desc.fbby);
+ cacheFile.writeUint16BE(font._desc.ascent);
+ cacheFile.writeUint16BE(font._desc.firstchar);
+ cacheFile.writeUint16BE(font._desc.size);
+ cacheFile.writeUint16BE(font._desc.defaultchar);
+ cacheFile.writeUint32BE(font._desc.bits_size);
+
+ for (long i = 0; i < font._desc.bits_size; ++i) {
+ cacheFile.writeUint16BE(font._desc.bits[i]);
+ }
+
+ if (font._desc.offset) {
+ cacheFile.writeByte(1);
+ for (int i = 0; i < font._desc.size; ++i) {
+ cacheFile.writeUint32BE(font._desc.offset[i]);
+ }
+ } else {
+ cacheFile.writeByte(0);
+ }
+
+ if (font._desc.width) {
+ cacheFile.writeByte(1);
+ for (int i = 0; i < font._desc.size; ++i) {
+ cacheFile.writeByte(font._desc.width[i]);
+ }
+ } else {
+ cacheFile.writeByte(0);
+ }
+
+ if (font._desc.bbx) {
+ cacheFile.writeByte(1);
+ for (int i = 0; i < font._desc.size; ++i) {
+ cacheFile.writeByte(font._desc.bbx[i].w);
+ cacheFile.writeByte(font._desc.bbx[i].h);
+ cacheFile.writeByte(font._desc.bbx[i].x);
+ cacheFile.writeByte(font._desc.bbx[i].y);
+ }
+ } else {
+ cacheFile.writeByte(0);
+ }
+
+ return !cacheFile.err();
+}
+
+BdfFont *BdfFont::loadFromCache(Common::SeekableReadStream &stream) {
+ BdfFont *font = 0;
+
+ BdfFontData *data = (BdfFontData *)malloc(sizeof(BdfFontData));
+ if (!data)
+ return 0;
+
+ memset(data, 0, sizeof(BdfFontData));
+
+ data->maxwidth = stream.readUint16BE();
+ data->height = stream.readUint16BE();
+ data->fbbw = stream.readUint16BE();
+ data->fbbh = stream.readUint16BE();
+ data->fbbx = stream.readSint16BE();
+ data->fbby = stream.readSint16BE();
+ data->ascent = stream.readUint16BE();
+ data->firstchar = stream.readUint16BE();
+ data->size = stream.readUint16BE();
+ data->defaultchar = stream.readUint16BE();
+ data->bits_size = stream.readUint32BE();
+
+ data->bits = (bitmap_t *)malloc(sizeof(bitmap_t) * data->bits_size);
+ if (!data->bits) {
+ free(data);
+ return 0;
+ }
+
+ for (long i = 0; i < data->bits_size; ++i) {
+ data->bits[i] = stream.readUint16BE();
+ }
+
+ bool hasOffsetTable = (stream.readByte() != 0);
+ if (hasOffsetTable) {
+ data->offset = (unsigned long *)malloc(sizeof(unsigned long) * data->size);
+ if (!data->offset) {
+ free(data->bits);
+ free(data);
+ return 0;
+ }
+
+ for (int i = 0; i < data->size; ++i) {
+ data->offset[i] = stream.readUint32BE();
+ }
+ }
+
+ bool hasWidthTable = (stream.readByte() != 0);
+ if (hasWidthTable) {
+ data->width = (unsigned char *)malloc(sizeof(unsigned char) * data->size);
+ if (!data->width) {
+ free(data->bits);
+ free(data->offset);
+ free(data);
+ return 0;
+ }
+
+ for (int i = 0; i < data->size; ++i) {
+ data->width[i] = stream.readByte();
+ }
+ }
+
+ bool hasBBXTable = (stream.readByte() != 0);
+ if (hasBBXTable) {
+ data->bbx = (BBX *)malloc(sizeof(BBX) * data->size);
+ if (!data->bbx) {
+ free(data->bits);
+ free(data->offset);
+ free(data->width);
+ free(data);
+ return 0;
+ }
+
+ for (int i = 0; i < data->size; ++i) {
+ data->bbx[i].w = (int8)stream.readByte();
+ data->bbx[i].h = (int8)stream.readByte();
+ data->bbx[i].x = (int8)stream.readByte();
+ data->bbx[i].y = (int8)stream.readByte();
+ }
+ }
+
+ if (stream.err() || stream.eos()) {
+ free(data->bits);
+ free(data->offset);
+ free(data->width);
+ free(data);
+ return 0;
+ }
+
+ BdfFontDesc desc;
+ desc.name = data->name;
+ desc.maxwidth = data->maxwidth;
+ desc.height = data->height;
+ desc.fbbw = data->fbbw;
+ desc.fbbh = data->fbbh;
+ desc.fbbx = data->fbbx;
+ desc.fbby = data->fbby;
+ desc.ascent = data->ascent;
+ desc.firstchar = data->firstchar;
+ desc.size = data->size;
+ desc.bits = data->bits;
+ desc.offset = data->offset;
+ desc.width = data->width;
+ desc.bbx = data->bbx;
+ desc.defaultchar = data->defaultchar;
+ desc.bits_size = data->bits_size;
+
+ font = new BdfFont(desc, data);
+ if (!font) {
+ free(data->bits);
+ free(data->offset);
+ free(data->width);
+ free(data);
+ return 0;
+ }
+
+ return font;
+}
+
+} // End of namespace Graphics
+
diff --git a/graphics/fonts/bdf.h b/graphics/fonts/bdf.h
new file mode 100644
index 0000000000..31c009eb27
--- /dev/null
+++ b/graphics/fonts/bdf.h
@@ -0,0 +1,100 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef GRAPHICS_FONTS_BDF_H
+#define GRAPHICS_FONTS_BDF_H
+
+#include "common/system.h"
+
+#include "graphics/font.h"
+
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Graphics {
+
+typedef uint16 bitmap_t; /* bitmap image unit size*/
+
+struct BBX {
+ int8 w;
+ int8 h;
+ int8 x;
+ int8 y;
+};
+
+/* builtin C-based proportional/fixed font structure */
+/* based on The Microwindows Project http://microwindows.org */
+struct BdfFontDesc {
+ const char *name; /* font name */
+ int maxwidth; /* max width in pixels */
+ int height; /* height in pixels */
+ int fbbw, fbbh, fbbx, fbby; /* max bounding box */
+ int ascent; /* ascent (baseline) height */
+ int firstchar; /* first character in bitmap */
+ int size; /* font size in glyphs */
+ const bitmap_t *bits; /* 16-bit right-padded bitmap data */
+ const unsigned long *offset; /* offsets into bitmap data */
+ const unsigned char *width; /* character widths or NULL if fixed */
+ const BBX *bbx; /* character bounding box or NULL if fixed */
+ int defaultchar; /* default char (not glyph index) */
+ long bits_size; /* # words of bitmap_t bits */
+};
+
+struct BdfFontData;
+
+class BdfFont : public Font {
+protected:
+ BdfFontDesc _desc;
+ BdfFontData *_font;
+
+public:
+ BdfFont(const BdfFontDesc &desc, BdfFontData *font = 0) : _desc(desc), _font(font) {}
+ ~BdfFont();
+
+ virtual int getFontHeight() const;
+ virtual int getMaxCharWidth() const;
+
+ virtual int getCharWidth(byte chr) const;
+ virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const;
+
+ static BdfFont *loadFont(Common::SeekableReadStream &stream);
+ static bool cacheFontData(const BdfFont &font, const Common::String &filename);
+ static BdfFont *loadFromCache(Common::SeekableReadStream &stream);
+};
+
+#define DEFINE_FONT(n) \
+ const BdfFont *n = 0; \
+ void create_##n() { \
+ n = new BdfFont(desc); \
+ }
+
+#define FORWARD_DECLARE_FONT(n) \
+ extern const BdfFont *n; \
+ extern void create_##n()
+
+#define INIT_FONT(n) \
+ create_##n()
+
+} // End of namespace Graphics
+
+#endif
+
diff --git a/graphics/fonts/consolefont.cpp b/graphics/fonts/consolefont.cpp
index 65ccd3ec70..5b4768327a 100644
--- a/graphics/fonts/consolefont.cpp
+++ b/graphics/fonts/consolefont.cpp
@@ -1,5 +1,5 @@
/* Generated by convbdf on Sat Jun 17 01:37:46 2006. */
-#include "graphics/font.h"
+#include "graphics/fonts/bdf.h"
/* Font information:
name: 5x8-L1
@@ -5635,7 +5635,7 @@ static const unsigned long _sysfont_offset[] = {
};
/* Exported structure definition. */
-static const FontDesc desc = {
+static const BdfFontDesc desc = {
"5x8-L1",
5,
8,
diff --git a/graphics/fonts/newfont.cpp b/graphics/fonts/newfont.cpp
index 0327c0997a..f02baba2de 100644
--- a/graphics/fonts/newfont.cpp
+++ b/graphics/fonts/newfont.cpp
@@ -1,5 +1,5 @@
/* Generated by convbdf on Sat Jun 17 01:34:15 2006. */
-#include "graphics/font.h"
+#include "graphics/fonts/bdf.h"
/* Font information:
name: clR6x12-L1
@@ -7419,7 +7419,7 @@ static const unsigned long _sysfont_offset[] = {
};
/* Exported structure definition. */
-static const FontDesc desc = {
+static const BdfFontDesc desc = {
"clR6x12-L1",
6,
12,
diff --git a/graphics/fonts/newfont_big.cpp b/graphics/fonts/newfont_big.cpp
index 7b15a6ab38..59c54a4551 100644
--- a/graphics/fonts/newfont_big.cpp
+++ b/graphics/fonts/newfont_big.cpp
@@ -1,5 +1,5 @@
/* Generated by convbdf on Tue Jun 13 00:00:22 2006. */
-#include "graphics/font.h"
+#include "graphics/fonts/bdf.h"
/* Font information:
name: helvB12-L1
@@ -5523,7 +5523,7 @@ static const BBX _sysfont_bbx[] = {
};
/* Exported structure definition. */
-static const FontDesc desc = {
+static const BdfFontDesc desc = {
"helvB12-L1",
13,
14,
diff --git a/graphics/fonts/winfont.cpp b/graphics/fonts/winfont.cpp
index 0e87769f2f..3bad92236d 100644
--- a/graphics/fonts/winfont.cpp
+++ b/graphics/fonts/winfont.cpp
@@ -81,7 +81,7 @@ bool WinFont::loadFromFON(const Common::String &fileName, const WinFontDirEntry
return true;
// Then try loading via the PE code
- return loadFromPE(fileName, dirEntry);
+ return loadFromPE(fileName, dirEntry);
}
bool WinFont::loadFromNE(const Common::String &fileName, const WinFontDirEntry &dirEntry) {
@@ -98,7 +98,7 @@ bool WinFont::loadFromNE(const Common::String &fileName, const WinFontDirEntry &
}
uint32 fontId = getFontIndex(*fontDirectory, dirEntry);
-
+
delete fontDirectory;
// Couldn't match the face name
@@ -120,37 +120,43 @@ bool WinFont::loadFromNE(const Common::String &fileName, const WinFontDirEntry &
}
bool WinFont::loadFromPE(const Common::String &fileName, const WinFontDirEntry &dirEntry) {
- Common::PEResources exe;
+ Common::PEResources *exe = new Common::PEResources();
- if (!exe.loadFromEXE(fileName))
+ if (!exe->loadFromEXE(fileName)) {
+ delete exe;
return false;
+ }
// Let's pull out the font directory
- Common::SeekableReadStream *fontDirectory = exe.getResource(Common::kPEFontDir, Common::String("FONTDIR"));
+ Common::SeekableReadStream *fontDirectory = exe->getResource(Common::kPEFontDir, Common::String("FONTDIR"));
if (!fontDirectory) {
warning("No font directory in '%s'", fileName.c_str());
+ delete exe;
return false;
}
uint32 fontId = getFontIndex(*fontDirectory, dirEntry);
-
+
delete fontDirectory;
// Couldn't match the face name
if (fontId == 0xffffffff) {
warning("Could not find face '%s' in '%s'", dirEntry.faceName.c_str(), fileName.c_str());
+ delete exe;
return false;
}
// Actually go get our font now...
- Common::SeekableReadStream *fontStream = exe.getResource(Common::kPEFont, fontId);
+ Common::SeekableReadStream *fontStream = exe->getResource(Common::kPEFont, fontId);
if (!fontStream) {
warning("Could not find font %d in %s", fontId, fileName.c_str());
+ delete exe;
return false;
}
bool ok = loadFromFNT(*fontStream);
delete fontStream;
+ delete exe;
return ok;
}
diff --git a/graphics/fonts/winfont.h b/graphics/fonts/winfont.h
index b6c1be7064..4382d7ed6b 100644
--- a/graphics/fonts/winfont.h
+++ b/graphics/fonts/winfont.h
@@ -88,7 +88,7 @@ private:
uint16 charWidth;
uint32 offset;
byte *bitmap;
- } *_glyphs;
+ } *_glyphs;
};
} // End of namespace Graphics
diff --git a/graphics/jpeg.h b/graphics/jpeg.h
index bda0c08240..27b91e8777 100644
--- a/graphics/jpeg.h
+++ b/graphics/jpeg.h
@@ -72,7 +72,7 @@ private:
// Result image for this component
Surface surface;
};
-
+
Component *_components;
// Scan components
diff --git a/graphics/module.mk b/graphics/module.mk
index 32658c96bd..469ee42047 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -6,6 +6,7 @@ MODULE_OBJS := \
dither.o \
font.o \
fontman.o \
+ fonts/bdf.o \
fonts/consolefont.o \
fonts/newfont_big.o \
fonts/newfont.o \
diff --git a/graphics/png.cpp b/graphics/png.cpp
index e6dceab3fa..2189fd333f 100644
--- a/graphics/png.cpp
+++ b/graphics/png.cpp
@@ -100,7 +100,7 @@ enum PNGFilters {
kFilterPaeth = 4
};
-PNG::PNG() : _compressedBuffer(0), _compressedBufferSize(0),
+PNG::PNG() : _compressedBuffer(0), _compressedBufferSize(0),
_unfilteredSurface(0), _transparentColorSpecified(false) {
}
@@ -116,75 +116,76 @@ Graphics::Surface *PNG::getSurface(const PixelFormat &format) {
output->create(_unfilteredSurface->w, _unfilteredSurface->h, format);
byte *src = (byte *)_unfilteredSurface->pixels;
byte a = 0xFF;
+ byte bpp = _unfilteredSurface->format.bytesPerPixel;
if (_header.colorType != kIndexed) {
- if (_header.colorType == kTrueColor || _header.colorType == kTrueColorWithAlpha) {
- if (_unfilteredSurface->format.bytesPerPixel != 3 && _unfilteredSurface->format.bytesPerPixel != 4)
+ if (_header.colorType == kTrueColor ||
+ _header.colorType == kTrueColorWithAlpha) {
+ if (bpp != 3 && bpp != 4)
error("Unsupported truecolor PNG format");
- } else if (_header.colorType == kGrayScale || _header.colorType == kGrayScaleWithAlpha) {
- if (_unfilteredSurface->format.bytesPerPixel != 1 && _unfilteredSurface->format.bytesPerPixel != 2)
+ } else if (_header.colorType == kGrayScale ||
+ _header.colorType == kGrayScaleWithAlpha) {
+ if (bpp != 1 && bpp != 2)
error("Unsupported grayscale PNG format");
}
for (uint16 i = 0; i < output->h; i++) {
for (uint16 j = 0; j < output->w; j++) {
- if (format.bytesPerPixel == 2) { // 2bpp
- uint16 *dest = ((uint16 *)output->getBasePtr(j, i));
- if (_unfilteredSurface->format.bytesPerPixel == 1) { // Grayscale
- if (_transparentColorSpecified)
- a = (src[0] == _transparentColor[0]) ? 0 : 0xFF;
- *dest = format.ARGBToColor( a, src[0], src[0], src[0]);
- } else if (_unfilteredSurface->format.bytesPerPixel == 2) { // Grayscale + alpha
- *dest = format.ARGBToColor(src[1], src[0], src[0], src[0]);
- } else if (_unfilteredSurface->format.bytesPerPixel == 3) { // RGB
- if (_transparentColorSpecified) {
- bool isTransparentColor = (src[0] == _transparentColor[0] &&
- src[1] == _transparentColor[1] &&
- src[2] == _transparentColor[2]);
- a = isTransparentColor ? 0 : 0xFF;
- }
- *dest = format.ARGBToColor( a, src[0], src[1], src[2]);
- } else if (_unfilteredSurface->format.bytesPerPixel == 4) { // RGBA
- *dest = format.ARGBToColor(src[3], src[0], src[1], src[2]);
- }
- } else { // 4bpp
- uint32 *dest = ((uint32 *)output->getBasePtr(j, i));
- if (_unfilteredSurface->format.bytesPerPixel == 1) { // Grayscale
- if (_transparentColorSpecified)
- a = (src[0] == _transparentColor[0]) ? 0 : 0xFF;
- *dest = format.ARGBToColor( a, src[0], src[0], src[0]);
- } else if (_unfilteredSurface->format.bytesPerPixel == 2) { // Grayscale + alpha
- *dest = format.ARGBToColor(src[1], src[0], src[0], src[0]);
- } else if (_unfilteredSurface->format.bytesPerPixel == 3) { // RGB
- if (_transparentColorSpecified) {
- bool isTransparentColor = (src[0] == _transparentColor[0] &&
- src[1] == _transparentColor[1] &&
- src[2] == _transparentColor[2]);
- a = isTransparentColor ? 0 : 0xFF;
- }
- *dest = format.ARGBToColor( a, src[0], src[1], src[2]);
- } else if (_unfilteredSurface->format.bytesPerPixel == 4) { // RGBA
- *dest = format.ARGBToColor(src[3], src[0], src[1], src[2]);
+ uint32 result = 0;
+
+ switch (bpp) {
+ case 1: // Grayscale
+ if (_transparentColorSpecified)
+ a = (src[0] == _transparentColor[0]) ? 0 : 0xFF;
+ result = format.ARGBToColor( a, src[0], src[0], src[0]);
+ break;
+ case 2: // Grayscale + alpha
+ result = format.ARGBToColor(src[1], src[0], src[0], src[0]);
+ break;
+ case 3: // RGB
+ if (_transparentColorSpecified) {
+ bool isTransparentColor = (src[0] == _transparentColor[0] &&
+ src[1] == _transparentColor[1] &&
+ src[2] == _transparentColor[2]);
+ a = isTransparentColor ? 0 : 0xFF;
}
+ result = format.ARGBToColor( a, src[0], src[1], src[2]);
+ break;
+ case 4: // RGBA
+ result = format.ARGBToColor(src[3], src[0], src[1], src[2]);
+ break;
}
- src += _unfilteredSurface->format.bytesPerPixel;
+ if (format.bytesPerPixel == 2) // 2bpp
+ *((uint16 *)output->getBasePtr(j, i)) = (uint16)result;
+ else // 4bpp
+ *((uint32 *)output->getBasePtr(j, i)) = result;
+
+ src += bpp;
}
}
} else {
byte index, r, g, b;
+ uint32 mask = (0xff >> (8 - _header.bitDepth)) << (8 - _header.bitDepth);
// Convert the indexed surface to the target pixel format
for (uint16 i = 0; i < output->h; i++) {
- bool otherPixel = false;
+ int data = 0;
+ int bitCount = 8;
+ byte *src1 = src;
for (uint16 j = 0; j < output->w; j++) {
- if (_header.bitDepth != 4)
- index = *src;
- else if (!otherPixel)
- index = (*src) >> 4;
- else
- index = (*src) & 0xf;
+ if (bitCount == 8) {
+ data = *src;
+ src++;
+ }
+
+ index = (data & mask) >> (8 - _header.bitDepth);
+ data = (data << _header.bitDepth) & 0xff;
+ bitCount -= _header.bitDepth;
+
+ if (bitCount == 0)
+ bitCount = 8;
r = _palette[index * 4 + 0];
g = _palette[index * 4 + 1];
@@ -195,14 +196,8 @@ Graphics::Surface *PNG::getSurface(const PixelFormat &format) {
*((uint16 *)output->getBasePtr(j, i)) = format.ARGBToColor(a, r, g, b);
else
*((uint32 *)output->getBasePtr(j, i)) = format.ARGBToColor(a, r, g, b);
-
- if (_header.bitDepth != 4 || otherPixel)
- src++;
- otherPixel = !otherPixel;
}
- // The surface is a whole scanline wide, skip the rest of it.
- if (_header.bitDepth == 4)
- src += output->w / 2;
+ src = src1 + output->w;
}
}
@@ -236,7 +231,7 @@ bool PNG::read(Common::SeekableReadStream *str) {
case kChunkIDAT:
if (_compressedBufferSize == 0) {
_compressedBufferSize += chunkLength;
- _compressedBuffer = new byte[_compressedBufferSize];
+ _compressedBuffer = (byte *)malloc(_compressedBufferSize);
_stream->read(_compressedBuffer, chunkLength);
} else {
// Expand the buffer
@@ -244,8 +239,8 @@ bool PNG::read(Common::SeekableReadStream *str) {
_compressedBufferSize += chunkLength;
byte *tmp = new byte[prevSize];
memcpy(tmp, _compressedBuffer, prevSize);
- delete[] _compressedBuffer;
- _compressedBuffer = new byte[_compressedBufferSize];
+ free(_compressedBuffer);
+ _compressedBuffer = (byte *)malloc(_compressedBufferSize);
memcpy(_compressedBuffer, tmp, prevSize);
delete[] tmp;
_stream->read(_compressedBuffer + prevSize, chunkLength);
@@ -282,7 +277,7 @@ bool PNG::read(Common::SeekableReadStream *str) {
// Unpack the compressed buffer
Common::MemoryReadStream *compData = new Common::MemoryReadStream(_compressedBuffer, _compressedBufferSize, DisposeAfterUse::YES);
_imageData = Common::wrapCompressedReadStream(compData);
-
+
// Construct the final image
constructImage();
@@ -306,7 +301,7 @@ byte PNG::paethPredictor(int16 a, int16 b, int16 c) {
int16 pa = ABS<int16>(b - c);
int16 pb = ABS<int16>(a - c);
int16 pc = ABS<int16>(a + b - c - c);
-
+
if (pa <= MIN<int16>(pb, pc))
return (byte)a;
else if (pb <= pc)
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp
index a35fb9046e..9ade0e6c57 100644
--- a/graphics/scaler.cpp
+++ b/graphics/scaler.cpp
@@ -24,6 +24,7 @@
#include "graphics/scaler/scalebit.h"
#include "common/util.h"
#include "common/system.h"
+#include "common/textconsole.h"
int gBitFormat = 565;
@@ -90,6 +91,9 @@ void InitLUT(Graphics::PixelFormat format) {
if (RGBtoYUV == 0)
RGBtoYUV = (uint32 *)malloc(65536 * sizeof(uint32));
+ if (!RGBtoYUV)
+ error("[InitLUT] Cannot allocate memory for YUV/LUT buffers");
+
for (int color = 0; color < 65536; ++color) {
format.colorToRGB(color, r, g, b);
Y = (r + g + b) >> 2;
diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp
index 943395aff3..b12fac418b 100644
--- a/graphics/scaler/aspect.cpp
+++ b/graphics/scaler/aspect.cpp
@@ -201,7 +201,7 @@ int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, i
template<typename ColorMask>
void Normal1xAspectTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
- for (int y = 0; y < height; ++y) {
+ for (int y = 0; y < (height * 6 / 5); ++y) {
#if ASPECT_MODE == kSuperFastAndUglyAspectMode
if ((y % 6) == 5)
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp
index 660abf556c..be078a4da9 100644
--- a/graphics/sjis.cpp
+++ b/graphics/sjis.cpp
@@ -40,13 +40,30 @@ FontSJIS *FontSJIS::createFont(const Common::Platform platform) {
// Try the font ROM of the specified platform
if (platform == Common::kPlatformFMTowns) {
ret = new FontTowns();
- if (ret && ret->loadData())
- return ret;
+ if (ret) {
+ if (ret->loadData())
+ return ret;
+ }
delete ret;
- }
+ } else if (platform == Common::kPlatformPCEngine) {
+ ret = new FontPCEngine();
+ if (ret) {
+ if (ret->loadData())
+ return ret;
+ }
+ delete ret;
+ } // TODO: PC98 font rom support
+ /* else if (platform == Common::kPlatformPC98) {
+ ret = new FontPC98();
+ if (ret) {
+ if (ret->loadData())
+ return ret;
+ }
+ delete ret;
+ }*/
// Try ScummVM's font.
- ret = new FontSjisSVM();
+ ret = new FontSjisSVM(platform);
if (ret && ret->loadData())
return ret;
delete ret;
@@ -58,21 +75,76 @@ void FontSJIS::drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32
drawChar(dst.getBasePtr(x, y), ch, dst.pitch, dst.format.bytesPerPixel, c1, c2, dst.w - x, dst.h - y);
}
+FontSJISBase::FontSJISBase()
+ : _drawMode(kDefaultMode), _flippedMode(false), _fontWidth(16), _fontHeight(16), _bitPosNewLineMask(0) {
+}
+
+void FontSJISBase::setDrawingMode(DrawingMode mode) {
+ if (hasFeature(1 << mode))
+ _drawMode = mode;
+ else
+ warning("Unsupported drawing mode selected");
+}
+
+void FontSJISBase::toggleFlippedMode(bool enable) {
+ if (hasFeature(kFeatFlipped))
+ _flippedMode = enable;
+ else
+ warning("Flipped mode unsupported by this font");
+}
+
+uint FontSJISBase::getFontHeight() const {
+ switch (_drawMode) {
+ case kOutlineMode:
+ return _fontHeight + 2;
+
+ case kDefaultMode:
+ return _fontHeight;
+
+ default:
+ return _fontHeight + 1;
+ }
+}
+
+uint FontSJISBase::getMaxFontWidth() const {
+ switch (_drawMode) {
+ case kOutlineMode:
+ return _fontWidth + 2;
+
+ case kDefaultMode:
+ return _fontWidth;
+
+ default:
+ return _fontWidth + 1;
+ }
+}
+
+uint FontSJISBase::getCharWidth(uint16 ch) const {
+ if (isASCII(ch))
+ return ((_drawMode == kOutlineMode) ? 10 : (_drawMode == kDefaultMode ? 8 : 9));
+ else
+ return getMaxFontWidth();
+}
+
template<typename Color>
void FontSJISBase::blitCharacter(const uint8 *glyph, const int w, const int h, uint8 *dst, int pitch, Color c) const {
+ uint8 bitPos = 0;
+ uint8 mask = 0;
+
for (int y = 0; y < h; ++y) {
Color *d = (Color *)dst;
dst += pitch;
- uint8 mask = 0;
+ bitPos &= _bitPosNewLineMask;
for (int x = 0; x < w; ++x) {
- if (!(x % 8))
+ if (!(bitPos % 8))
mask = *glyph++;
if (mask & 0x80)
*d = c;
++d;
+ ++bitPos;
mask <<= 1;
}
}
@@ -146,14 +218,14 @@ void FontSJISBase::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1,
int outlineExtraWidth = 2, outlineExtraHeight = 2;
int outlineXOffset = 0, outlineYOffset = 0;
- if (is8x16(ch)) {
- glyphSource = getCharData8x16(ch);
+ if (isASCII(ch)) {
+ glyphSource = getCharData(ch);
width = 8;
- height = 16;
+ height = _fontHeight;
} else {
glyphSource = getCharData(ch);
- width = 16;
- height = 16;
+ width = _fontWidth;
+ height = _fontHeight;
}
if (maxW != -1 && maxW < width) {
@@ -161,7 +233,7 @@ void FontSJISBase::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1,
outlineExtraWidth = 0;
outlineXOffset = 1;
}
-
+
if (maxH != -1 && maxH < height) {
height = maxH;
outlineExtraHeight = 0;
@@ -191,7 +263,7 @@ void FontSJISBase::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1,
if (_drawMode == kOutlineMode) {
blitCharacter<uint8>(outline, width + outlineExtraWidth, height + outlineExtraHeight, (uint8 *)dst, pitch, c2);
blitCharacter<uint8>(glyphSource, width - outlineXOffset, height - outlineYOffset, (uint8 *)dst + pitch + 1, pitch, c1);
- } else {
+ } else {
if (_drawMode != kDefaultMode) {
blitCharacter<uint8>(glyphSource, width - outlineXOffset, height, ((uint8*)dst) + 1, pitch, c2);
blitCharacter<uint8>(glyphSource, width, height - outlineYOffset, ((uint8*)dst) + pitch, pitch, c2);
@@ -220,14 +292,7 @@ void FontSJISBase::drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1,
}
}
-uint FontSJISBase::getCharWidth(uint16 ch) const {
- if (is8x16(ch))
- return (_drawMode == kOutlineMode) ? 10 : (_drawMode == kDefaultMode ? 8 : 9);
- else
- return getMaxFontWidth();
-}
-
-bool FontSJISBase::is8x16(uint16 ch) const {
+bool FontSJISBase::isASCII(uint16 ch) const {
if (ch >= 0xFF)
return false;
else if (ch <= 0x7F || (ch >= 0xA1 && ch <= 0xDF))
@@ -253,105 +318,211 @@ bool FontTowns::loadData() {
}
const uint8 *FontTowns::getCharData(uint16 ch) const {
- uint8 f = ch & 0xFF;
- uint8 s = ch >> 8;
-
- // copied from scumm\charset.cpp
- enum {
- KANA = 0,
- KANJI = 1,
- EKANJI = 2
- };
+ if (ch < kFont8x16Chars) {
+ return _fontData8x16 + ch * 16;
+ } else {
+ uint8 f = ch & 0xFF;
+ uint8 s = ch >> 8;
+
+ // moved from scumm\charset.cpp
+ enum {
+ KANA = 0,
+ KANJI = 1,
+ EKANJI = 2
+ };
+
+ int base = s - ((s + 1) % 32);
+ int c = 0, p = 0, chunk_f = 0, chunk = 0, cr = 0, kanjiType = KANA;
+
+ if (f >= 0x81 && f <= 0x84) kanjiType = KANA;
+ if (f >= 0x88 && f <= 0x9f) kanjiType = KANJI;
+ if (f >= 0xe0 && f <= 0xea) kanjiType = EKANJI;
+
+ if ((f > 0xe8 || (f == 0xe8 && base >= 0x9f)) || (f > 0x90 || (f == 0x90 && base >= 0x9f))) {
+ c = 48; //correction
+ p = -8; //correction
+ }
- int base = s - ((s + 1) % 32);
- int c = 0, p = 0, chunk_f = 0, chunk = 0, cr = 0, kanjiType = KANA;
+ if (kanjiType == KANA) {//Kana
+ chunk_f = (f - 0x81) * 2;
+ } else if (kanjiType == KANJI) {//Standard Kanji
+ p += f - 0x88;
+ chunk_f = c + 2 * p;
+ } else if (kanjiType == EKANJI) {//Enhanced Kanji
+ p += f - 0xe0;
+ chunk_f = c + 2 * p;
+ }
- if (f >= 0x81 && f <= 0x84) kanjiType = KANA;
- if (f >= 0x88 && f <= 0x9f) kanjiType = KANJI;
- if (f >= 0xe0 && f <= 0xea) kanjiType = EKANJI;
+ // Base corrections
+ if (base == 0x7f && s == 0x7f)
+ base -= 0x20;
+ if (base == 0x9f && s == 0xbe)
+ base += 0x20;
+ if (base == 0xbf && s == 0xde)
+ base += 0x20;
+ //if (base == 0x7f && s == 0x9e)
+ // base += 0x20;
+
+ switch (base) {
+ case 0x3f:
+ cr = 0; //3f
+ if (kanjiType == KANA) chunk = 1;
+ else if (kanjiType == KANJI) chunk = 31;
+ else if (kanjiType == EKANJI) chunk = 111;
+ break;
+ case 0x5f:
+ cr = 0; //5f
+ if (kanjiType == KANA) chunk = 17;
+ else if (kanjiType == KANJI) chunk = 47;
+ else if (kanjiType == EKANJI) chunk = 127;
+ break;
+ case 0x7f:
+ cr = -1; //80
+ if (kanjiType == KANA) chunk = 9;
+ else if (kanjiType == KANJI) chunk = 63;
+ else if (kanjiType == EKANJI) chunk = 143;
+ break;
+ case 0x9f:
+ cr = 1; //9e
+ if (kanjiType == KANA) chunk = 2;
+ else if (kanjiType == KANJI) chunk = 32;
+ else if (kanjiType == EKANJI) chunk = 112;
+ break;
+ case 0xbf:
+ cr = 1; //be
+ if (kanjiType == KANA) chunk = 18;
+ else if (kanjiType == KANJI) chunk = 48;
+ else if (kanjiType == EKANJI) chunk = 128;
+ break;
+ case 0xdf:
+ cr = 1; //de
+ if (kanjiType == KANA) chunk = 10;
+ else if (kanjiType == KANJI) chunk = 64;
+ else if (kanjiType == EKANJI) chunk = 144;
+ break;
+ default:
+ debug(4, "Invalid Char! f %x s %x base %x c %d p %d", f, s, base, c, p);
+ }
- if ((f > 0xe8 || (f == 0xe8 && base >= 0x9f)) || (f > 0x90 || (f == 0x90 && base >= 0x9f))) {
- c = 48; //correction
- p = -8; //correction
+ debug(6, "Kanji: %c%c f 0x%x s 0x%x base 0x%x c %d p %d chunk %d cr %d index %d", f, s, f, s, base, c, p, chunk, cr, ((chunk_f + chunk) * 32 + (s - base)) + cr);
+ const int chunkNum = (((chunk_f + chunk) * 32 + (s - base)) + cr);
+ if (chunkNum < 0 || chunkNum >= kFont16x16Chars)
+ return 0;
+ else
+ return _fontData16x16 + chunkNum * 32;
}
+}
- if (kanjiType == KANA) {//Kana
- chunk_f = (f - 0x81) * 2;
- } else if (kanjiType == KANJI) {//Standard Kanji
- p += f - 0x88;
- chunk_f = c + 2 * p;
- } else if (kanjiType == EKANJI) {//Enhanced Kanji
- p += f - 0xe0;
- chunk_f = c + 2 * p;
- }
+bool FontTowns::hasFeature(int feat) const {
+ static const int features = kFeatDefault | kFeatOutline | kFeatShadow | kFeatFMTownsShadow | kFeatFlipped;
+ return (features & feat) ? true : false;
+}
- // Base corrections
- if (base == 0x7f && s == 0x7f)
- base -= 0x20;
- if (base == 0x9f && s == 0xbe)
- base += 0x20;
- if (base == 0xbf && s == 0xde)
- base += 0x20;
- //if (base == 0x7f && s == 0x9e)
- // base += 0x20;
-
- switch (base) {
- case 0x3f:
- cr = 0; //3f
- if (kanjiType == KANA) chunk = 1;
- else if (kanjiType == KANJI) chunk = 31;
- else if (kanjiType == EKANJI) chunk = 111;
- break;
- case 0x5f:
- cr = 0; //5f
- if (kanjiType == KANA) chunk = 17;
- else if (kanjiType == KANJI) chunk = 47;
- else if (kanjiType == EKANJI) chunk = 127;
- break;
- case 0x7f:
- cr = -1; //80
- if (kanjiType == KANA) chunk = 9;
- else if (kanjiType == KANJI) chunk = 63;
- else if (kanjiType == EKANJI) chunk = 143;
- break;
- case 0x9f:
- cr = 1; //9e
- if (kanjiType == KANA) chunk = 2;
- else if (kanjiType == KANJI) chunk = 32;
- else if (kanjiType == EKANJI) chunk = 112;
- break;
- case 0xbf:
- cr = 1; //be
- if (kanjiType == KANA) chunk = 18;
- else if (kanjiType == KANJI) chunk = 48;
- else if (kanjiType == EKANJI) chunk = 128;
- break;
- case 0xdf:
- cr = 1; //de
- if (kanjiType == KANA) chunk = 10;
- else if (kanjiType == KANJI) chunk = 64;
- else if (kanjiType == EKANJI) chunk = 144;
- break;
- default:
- debug(4, "Invalid Char! f %x s %x base %x c %d p %d", f, s, base, c, p);
- }
+// PC-Engine ROM font
- debug(6, "Kanji: %c%c f 0x%x s 0x%x base 0x%x c %d p %d chunk %d cr %d index %d", f, s, f, s, base, c, p, chunk, cr, ((chunk_f + chunk) * 32 + (s - base)) + cr);
- const int chunkNum = (((chunk_f + chunk) * 32 + (s - base)) + cr);
- if (chunkNum < 0 || chunkNum >= kFont16x16Chars)
- return 0;
- else
- return _fontData16x16 + chunkNum * 32;
+bool FontPCEngine::loadData() {
+ Common::SeekableReadStream *data = SearchMan.createReadStreamForMember("pce.cdbios");
+ if (!data)
+ return false;
+
+ data->seek((data->size() & 0x200) ? 0x30200 : 0x30000);
+ data->read(_fontData12x12, kFont12x12Chars * 18);
+
+ _fontWidth = _fontHeight = 12;
+ _bitPosNewLineMask = _fontWidth & 7;
+
+ bool retValue = !data->err();
+ delete data;
+ return retValue;
}
-const uint8 *FontTowns::getCharData8x16(uint16 c) const {
- if (c >= kFont8x16Chars)
- return 0;
- return _fontData8x16 + c * 16;
+const uint8 *FontPCEngine::getCharData(uint16 ch) const {
+ // Converts sjis code to pce font offset
+ // (moved from scumm\charset.cpp).
+ // rangeTbl maps SJIS char-codes to the PCE System Card font rom.
+ // Each pair {<upperBound>,<lowerBound>} in the array represents a SJIS range.
+ const int rangeCnt = 45;
+ static const uint16 rangeTbl[rangeCnt][2] = {
+ // Symbols
+ {0x8140,0x817E},{0x8180,0x81AC},
+ // 0-9
+ {0x824F,0x8258},
+ // Latin upper
+ {0x8260,0x8279},
+ // Latin lower
+ {0x8281,0x829A},
+ // Kana
+ {0x829F,0x82F1},{0x8340,0x837E},{0x8380,0x8396},
+ // Greek upper
+ {0x839F,0x83B6},
+ // Greek lower
+ {0x83BF,0x83D6},
+ // Cyrillic upper
+ {0x8440,0x8460},
+ // Cyrillic lower
+ {0x8470,0x847E},{0x8480,0x8491},
+ // Kanji
+ {0x889F,0x88FC},
+ {0x8940,0x897E},{0x8980,0x89FC},
+ {0x8A40,0x8A7E},{0x8A80,0x8AFC},
+ {0x8B40,0x8B7E},{0x8B80,0x8BFC},
+ {0x8C40,0x8C7E},{0x8C80,0x8CFC},
+ {0x8D40,0x8D7E},{0x8D80,0x8DFC},
+ {0x8E40,0x8E7E},{0x8E80,0x8EFC},
+ {0x8F40,0x8F7E},{0x8F80,0x8FFC},
+ {0x9040,0x907E},{0x9080,0x90FC},
+ {0x9140,0x917E},{0x9180,0x91FC},
+ {0x9240,0x927E},{0x9280,0x92FC},
+ {0x9340,0x937E},{0x9380,0x93FC},
+ {0x9440,0x947E},{0x9480,0x94FC},
+ {0x9540,0x957E},{0x9580,0x95FC},
+ {0x9640,0x967E},{0x9680,0x96FC},
+ {0x9740,0x977E},{0x9780,0x97FC},
+ {0x9840,0x9872}
+ };
+
+ ch = (ch << 8) | (ch >> 8);
+ int offset = 0;
+ for (int i = 0; i < rangeCnt; ++i) {
+ if (ch >= rangeTbl[i][0] && ch <= rangeTbl[i][1]) {
+ return _fontData12x12 + 18 * (offset + ch - rangeTbl[i][0]);
+ break;
+ }
+ offset += rangeTbl[i][1] - rangeTbl[i][0] + 1;
+ }
+
+ debug(4, "Invalid Char: 0x%x", ch);
+ return 0;
+}
+
+bool FontPCEngine::hasFeature(int feat) const {
+ // Outline mode not supported due to use of _bitPosNewLineMask. This could be implemented,
+ // but is not needed for any particular target at the moment.
+ // Flipped mode is also not supported since the hard coded table (taken from SCUMM 5 FM-TOWNS)
+ // is set up for font sizes of 8/16. This mode is also not required at the moment, since
+ // there aren't any SCUMM 5 PC-Engine games.
+ static const int features = kFeatDefault | kFeatShadow | kFeatFMTownsShadow;
+ return (features & feat) ? true : false;
}
// ScummVM SJIS font
+FontSjisSVM::FontSjisSVM(const Common::Platform platform)
+ : _fontData16x16(0), _fontData16x16Size(0), _fontData8x16(0), _fontData8x16Size(0),
+ _fontData12x12(0), _fontData12x12Size(0) {
+
+ if (platform == Common::kPlatformPCEngine) {
+ _fontWidth = 12;
+ _fontHeight = 12;
+ }
+}
+
+FontSjisSVM::~FontSjisSVM() {
+ delete[] _fontData16x16;
+ delete[] _fontData8x16;
+ delete[] _fontData12x12;
+}
+
bool FontSjisSVM::loadData() {
Common::SeekableReadStream *data = SearchMan.createReadStreamForMember("SJIS.FNT");
if (!data)
@@ -366,23 +537,33 @@ bool FontSjisSVM::loadData() {
}
uint32 version = data->readUint32BE();
- if (version != 2) {
+ if (version != 3) {
delete data;
return false;
}
uint numChars16x16 = data->readUint16BE();
uint numChars8x16 = data->readUint16BE();
+ uint numChars12x12 = data->readUint16BE();
+
+ if (_fontWidth == 16) {
+ _fontData16x16Size = numChars16x16 * 32;
+ _fontData16x16 = new uint8[_fontData16x16Size];
+ assert(_fontData16x16);
+ data->read(_fontData16x16, _fontData16x16Size);
+
+ _fontData8x16Size = numChars8x16 * 16;
+ _fontData8x16 = new uint8[numChars8x16 * 16];
+ assert(_fontData8x16);
+ data->read(_fontData8x16, _fontData8x16Size);
+ } else {
+ data->skip(numChars16x16 * 32);
+ data->skip(numChars8x16 * 16);
- _fontData16x16Size = numChars16x16 * 32;
- _fontData16x16 = new uint8[_fontData16x16Size];
- assert(_fontData16x16);
- data->read(_fontData16x16, _fontData16x16Size);
-
- _fontData8x16Size = numChars8x16 * 16;
- _fontData8x16 = new uint8[numChars8x16 * 16];
- assert(_fontData8x16);
-
- data->read(_fontData8x16, _fontData8x16Size);
+ _fontData12x12Size = numChars12x12 * 24;
+ _fontData12x12 = new uint8[_fontData12x12Size];
+ assert(_fontData12x12);
+ data->read(_fontData12x12, _fontData12x12Size);
+ }
bool retValue = !data->err();
delete data;
@@ -390,49 +571,85 @@ bool FontSjisSVM::loadData() {
}
const uint8 *FontSjisSVM::getCharData(uint16 c) const {
- const uint8 fB = c & 0xFF;
- const uint8 sB = c >> 8;
+ if (_fontWidth == 12)
+ return getCharDataPCE(c);
+ else
+ return getCharDataDefault(c);
+}
- // We only allow 2 byte SJIS characters.
- if (fB <= 0x80 || fB >= 0xF0 || (fB >= 0xA0 && fB <= 0xDF) || sB == 0x7F)
+bool FontSjisSVM::hasFeature(int feat) const {
+ // Flipped mode is not supported since the hard coded table (taken from SCUMM 5 FM-TOWNS)
+ // is set up for font sizes of 8/16. This mode is also not required at the moment, since
+ // there aren't any SCUMM 5 PC-Engine games.
+ static const int features16 = kFeatDefault | kFeatOutline | kFeatShadow | kFeatFMTownsShadow | kFeatFlipped;
+ static const int features12 = kFeatDefault | kFeatOutline | kFeatShadow | kFeatFMTownsShadow;
+ return (((_fontWidth == 12) ? features12 : features16) & feat) ? true : false;
+}
+
+const uint8 *FontSjisSVM::getCharDataPCE(uint16 c) const {
+ if (isASCII(c))
return 0;
- int base = fB;
- base -= 0x81;
- if (base >= 0x5F)
- base -= 0x40;
+ const uint8 fB = c & 0xFF;
+ const uint8 sB = c >> 8;
- int index = sB;
- index -= 0x40;
- if (index >= 0x3F)
- --index;
+ int base, index;
+ mapKANJIChar(fB, sB, base, index);
- // Another check if the passed character was an
- // correctly encoded SJIS character.
- if (index < 0 || index >= 0xBC || base < 0)
+ if (base == -1)
return 0;
- const uint offset = (base * 0xBC + index) * 32;
- assert(offset + 16 <= _fontData16x16Size);
- return _fontData16x16 + offset;
+ const uint offset = (base * 0xBC + index) * 24;
+ assert(offset + 16 <= _fontData12x12Size);
+ return _fontData12x12 + offset;
}
-const uint8 *FontSjisSVM::getCharData8x16(uint16 c) const {
+const uint8 *FontSjisSVM::getCharDataDefault(uint16 c) const {
const uint8 fB = c & 0xFF;
const uint8 sB = c >> 8;
- if (!is8x16(c) || sB)
- return 0;
+ if (isASCII(c)) {
+ int index = fB;
- int index = fB;
+ // half-width katakana
+ if (fB >= 0xA1 && fB <= 0xDF)
+ index -= 0x21;
+
+ const uint offset = index * 16;
+ assert(offset <= _fontData8x16Size);
+ return _fontData8x16 + offset;
+ } else {
+ int base, index;
+ mapKANJIChar(fB, sB, base, index);
- // half-width katakana
- if (fB >= 0xA1 && fB <= 0xDF)
- index -= 0x21;
+ if (base == -1)
+ return 0;
+
+ const uint offset = (base * 0xBC + index) * 32;
+ assert(offset + 16 <= _fontData16x16Size);
+ return _fontData16x16 + offset;
+ }
+}
- const uint offset = index * 16;
- assert(offset <= _fontData8x16Size);
- return _fontData8x16 + offset;
+void FontSjisSVM::mapKANJIChar(const uint8 fB, const uint8 sB, int &base, int &index) const {
+ base = index = -1;
+
+ // We only allow 2 byte SJIS characters.
+ if (fB <= 0x80 || fB >= 0xF0 || (fB >= 0xA0 && fB <= 0xDF) || sB == 0x7F)
+ return;
+
+ base = fB - 0x81;
+ if (base >= 0x5F)
+ base -= 0x40;
+
+ index = sB - 0x40;
+ if (index >= 0x3F)
+ --index;
+
+ // Another check if the passed character was an
+ // correctly encoded SJIS character.
+ if (index < 0 || index >= 0xBC || base < 0)
+ base = index = -1;
}
} // End of namespace Graphics
diff --git a/graphics/sjis.h b/graphics/sjis.h
index 21ced62b1d..4b54da53b4 100644
--- a/graphics/sjis.h
+++ b/graphics/sjis.h
@@ -75,7 +75,7 @@ public:
virtual bool loadData() = 0;
/**
- * Enable drawing with outline or shadow.
+ * Enable drawing with outline or shadow if supported by the Font.
*
* After changing outline state, getFontHeight and getMaxFontWidth / getCharWidth might return
* different values!
@@ -90,11 +90,17 @@ public:
virtual void setDrawingMode(DrawingMode mode) {}
/**
- * Enable flipped character drawing (e.g. in the MI1 circus scene after Guybrush gets shot out of the cannon).
+ * Enable flipped character drawing if supported by the Font (e.g. in the MI1 circus scene after Guybrush gets shot out of the cannon).
*/
virtual void toggleFlippedMode(bool enable) {}
/**
+ * Set spacing between characters and lines. This affects font height / char width
+ */
+ virtual void setCharSpacing(int spacing) {}
+ virtual void setLineSpacing(int spacing) {}
+
+ /**
* Returns the height of the font.
*/
virtual uint getFontHeight() const = 0;
@@ -123,30 +129,30 @@ public:
* @param bpp bytes per pixel of the destination buffer
* @param c1 forground color
* @param c2 outline color
- * @param maxW max draw width (to ensure that character drawing takes place within surface boundaries)
- * @param maxH max draw height (to ensure that character drawing takes place within surface boundaries)
+ * @param maxW max draw width (to ensure that character drawing takes place within surface boundaries), -1 = no check
+ * @param maxH max draw height (to ensure that character drawing takes place within surface boundaries), -1 = no check
*/
- virtual void drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW = -1, int maxH = -1) const = 0;
+ virtual void drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW, int maxH) const = 0;
};
/**
- * A base class to render 16x16 (2 byte chars), 8x16 (1 byte chars) monochrome SJIS fonts.
+ * A base class to render monochrome SJIS fonts.
*/
class FontSJISBase : public FontSJIS {
public:
- FontSJISBase() : _drawMode(kDefaultMode), _flippedMode(false) {}
+ FontSJISBase();
- void setDrawingMode(DrawingMode mode) { _drawMode = mode; }
+ virtual void setDrawingMode(DrawingMode mode);
- void toggleFlippedMode(bool enable) { _flippedMode = enable; }
+ virtual void toggleFlippedMode(bool enable);
- uint getFontHeight() const { return (_drawMode == kOutlineMode) ? 18 : (_drawMode == kDefaultMode ? 16 : 17); }
-
- uint getMaxFontWidth() const { return (_drawMode == kOutlineMode) ? 18 : (_drawMode == kDefaultMode ? 16 : 17); }
+ virtual uint getFontHeight() const;
- uint getCharWidth(uint16 ch) const;
+ virtual uint getMaxFontWidth() const;
- void drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW = -1, int maxH = -1) const;
+ virtual uint getCharWidth(uint16 ch) const;
+
+ virtual void drawChar(void *dst, uint16 ch, int pitch, int bpp, uint32 c1, uint32 c2, int maxW, int maxH) const;
private:
template<typename Color>
void blitCharacter(const uint8 *glyph, const int w, const int h, uint8 *dst, int pitch, Color c) const;
@@ -161,17 +167,28 @@ private:
protected:
DrawingMode _drawMode;
bool _flippedMode;
-
- bool is8x16(uint16 ch) const;
+ int _fontWidth, _fontHeight;
+ uint8 _bitPosNewLineMask;
+
+ bool isASCII(uint16 ch) const;
virtual const uint8 *getCharData(uint16 c) const = 0;
- virtual const uint8 *getCharData8x16(uint16 c) const = 0;
+
+ enum DrawingFeature {
+ kFeatDefault = 1 << 0,
+ kFeatOutline = 1 << 1,
+ kFeatShadow = 1 << 2,
+ kFeatFMTownsShadow = 1 << 3,
+ kFeatFlipped = 1 << 4
+ };
+
+ virtual bool hasFeature(int feat) const = 0;
};
/**
* FM-TOWNS ROM based SJIS compatible font.
*
- * This is used in KYRA and SCI.
+ * This is used in KYRA, SCUMM and SCI.
*/
class FontTowns : public FontSJISBase {
public:
@@ -188,8 +205,32 @@ private:
uint8 _fontData16x16[kFont16x16Chars * 32];
uint8 _fontData8x16[kFont8x16Chars * 32];
- const uint8 *getCharData(uint16 c) const;
- const uint8 *getCharData8x16(uint16 c) const;
+ virtual const uint8 *getCharData(uint16 c) const;
+
+ bool hasFeature(int feat) const;
+};
+
+/**
+ * PC-Engine System Card based SJIS compatible font.
+ *
+ * This is used in LOOM.
+ */
+class FontPCEngine : public FontSJISBase {
+public:
+ /**
+ * Loads the ROM data from "pce.cdbios".
+ */
+ bool loadData();
+private:
+ enum {
+ kFont12x12Chars = 3418
+ };
+
+ uint8 _fontData12x12[kFont12x12Chars * 18];
+
+ virtual const uint8 *getCharData(uint16 c) const;
+
+ bool hasFeature(int feat) const;
};
/**
@@ -197,8 +238,8 @@ private:
*/
class FontSjisSVM : public FontSJISBase {
public:
- FontSjisSVM() : _fontData16x16(0), _fontData16x16Size(0), _fontData8x16(0), _fontData8x16Size(0) {}
- ~FontSjisSVM() { delete[] _fontData16x16; delete[] _fontData8x16; }
+ FontSjisSVM(const Common::Platform platform);
+ ~FontSjisSVM();
/**
* Load the font data from "SJIS.FNT".
@@ -211,8 +252,17 @@ private:
uint8 *_fontData8x16;
uint _fontData8x16Size;
- const uint8 *getCharData(uint16 c) const;
- const uint8 *getCharData8x16(uint16 c) const;
+ uint8 *_fontData12x12;
+ uint _fontData12x12Size;
+
+ virtual const uint8 *getCharData(uint16 c) const;
+
+ bool hasFeature(int feat) const;
+
+ const uint8 *getCharDataPCE(uint16 c) const;
+ const uint8 *getCharDataDefault(uint16 c) const;
+
+ void mapKANJIChar(const uint8 fB, const uint8 sB, int &base, int &index) const;
};
// TODO: Consider adding support for PC98 ROM
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index cee8e61438..0fad25734c 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -127,7 +127,7 @@ void Surface::vLine(int x, int y, int y2, uint32 color) {
*ptr = (uint16)color;
ptr += pitch / 2;
}
-
+
} else if (format.bytesPerPixel == 4) {
uint32 *ptr = (uint32 *)getBasePtr(x, y);
while (y++ <= y2) {
diff --git a/graphics/surface.h b/graphics/surface.h
index 2a0f71955a..018a283aad 100644
--- a/graphics/surface.h
+++ b/graphics/surface.h
@@ -189,7 +189,7 @@ struct Surface {
/**
* A deleter for Surface objects which can be used with SharedPtr.
- *
+ *
* This deleter assures Surface::free is called on deletion.
*/
struct SharedPtrSurfaceDeleter {
diff --git a/graphics/yuv_to_rgb.cpp b/graphics/yuv_to_rgb.cpp
index 037ea9a007..bdc481016e 100644
--- a/graphics/yuv_to_rgb.cpp
+++ b/graphics/yuv_to_rgb.cpp
@@ -189,7 +189,9 @@ const YUVToRGBLookup *YUVToRGBManager::getLookup(Graphics::PixelFormat format) {
} // End of namespace Graphics
+namespace Common {
DECLARE_SINGLETON(Graphics::YUVToRGBManager);
+}
#define YUVToRGBMan (Graphics::YUVToRGBManager::instance())
diff --git a/graphics/yuv_to_rgb.h b/graphics/yuv_to_rgb.h
index 9b561f2002..e85c104098 100644
--- a/graphics/yuv_to_rgb.h
+++ b/graphics/yuv_to_rgb.h
@@ -26,6 +26,7 @@
/**
* @file
* YUV to RGB conversion used in engines:
+ * - scumm (he)
* - sword25
*/
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 73c1835c9e..4a2e0a7ac5 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -33,6 +33,7 @@
#include "graphics/imagedec.h"
#include "graphics/surface.h"
#include "graphics/VectorRenderer.h"
+#include "graphics/fonts/bdf.h"
#include "gui/widget.h"
#include "gui/ThemeEngine.h"
@@ -1394,7 +1395,7 @@ const Graphics::Font *ThemeEngine::loadFontFromArchive(const Common::String &fil
if (_themeArchive)
stream = _themeArchive->createReadStreamForMember(filename);
if (stream) {
- font = Graphics::NewFont::loadFont(*stream);
+ font = Graphics::BdfFont::loadFont(*stream);
delete stream;
}
@@ -1408,7 +1409,7 @@ const Graphics::Font *ThemeEngine::loadCachedFontFromArchive(const Common::Strin
if (_themeArchive)
stream = _themeArchive->createReadStreamForMember(filename);
if (stream) {
- font = Graphics::NewFont::loadFromCache(*stream);
+ font = Graphics::BdfFont::loadFromCache(*stream);
delete stream;
}
@@ -1422,7 +1423,7 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename) {
if (!cacheFilename.empty()) {
if (fontFile.open(cacheFilename)) {
- font = Graphics::NewFont::loadFromCache(fontFile);
+ font = Graphics::BdfFont::loadFromCache(fontFile);
}
if (font)
@@ -1434,7 +1435,7 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename) {
// normal open
if (fontFile.open(filename)) {
- font = Graphics::NewFont::loadFont(fontFile);
+ font = Graphics::BdfFont::loadFont(fontFile);
}
if (!font) {
@@ -1443,7 +1444,7 @@ const Graphics::Font *ThemeEngine::loadFont(const Common::String &filename) {
if (font) {
if (!cacheFilename.empty()) {
- if (!Graphics::NewFont::cacheFontData(*(const Graphics::NewFont *)font, cacheFilename)) {
+ if (!Graphics::BdfFont::cacheFontData(*(const Graphics::BdfFont *)font, cacheFilename)) {
warning("Couldn't create cache file for font '%s'", filename.c_str());
}
}
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 5b1faa4075..db45b5a995 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -352,11 +352,8 @@ bool ThemeParser::parserCallback_drawdata(ParserNode *node) {
}
if (node->values.contains("cache")) {
- if (node->values["cache"] == "true")
- cached = true;
- else if (node->values["cache"] == "false")
- cached = false;
- else return parserError("'Parsed' value must be either true or false.");
+ if (!Common::parseBool(node->values["cache"], cached))
+ return parserError("'Parsed' value must be either true or false.");
}
if (_theme->addDrawData(node->values["id"], cached) == false)
@@ -595,9 +592,7 @@ bool ThemeParser::parserCallback_widget(ParserNode *node) {
bool enabled = true;
if (node->values.contains("enabled")) {
- if (node->values["enabled"] == "false")
- enabled = false;
- else if (node->values["enabled"] != "true")
+ if (!Common::parseBool(node->values["enabled"], enabled))
return parserError("Invalid value for Widget enabling (expecting true/false)");
}
@@ -641,9 +636,7 @@ bool ThemeParser::parserCallback_dialog(ParserNode *node) {
}
if (node->values.contains("enabled")) {
- if (node->values["enabled"] == "false")
- enabled = false;
- else if (node->values["enabled"] != "true")
+ if (!Common::parseBool(node->values["enabled"], enabled))
return parserError("Invalid value for Dialog enabling (expecting true/false)");
}
@@ -677,16 +670,19 @@ bool ThemeParser::parserCallback_import(ParserNode *node) {
bool ThemeParser::parserCallback_layout(ParserNode *node) {
int spacing = -1;
+ bool center = false;
if (node->values.contains("spacing")) {
if (!parseIntegerKey(node->values["spacing"], 1, &spacing))
return false;
}
+ Common::parseBool(node->values["center"], center);
+
if (node->values["type"] == "vertical")
- _theme->getEvaluator()->addLayout(GUI::ThemeLayout::kLayoutVertical, spacing, node->values["center"] == "true");
+ _theme->getEvaluator()->addLayout(GUI::ThemeLayout::kLayoutVertical, spacing, center);
else if (node->values["type"] == "horizontal")
- _theme->getEvaluator()->addLayout(GUI::ThemeLayout::kLayoutHorizontal, spacing, node->values["center"] == "true");
+ _theme->getEvaluator()->addLayout(GUI::ThemeLayout::kLayoutHorizontal, spacing, center);
else
return parserError("Invalid layout type. Only 'horizontal' and 'vertical' layouts allowed.");
diff --git a/gui/credits.h b/gui/credits.h
index 1b13b31829..cc9698195a 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -3,13 +3,13 @@ static const char *credits[] = {
"C1""ScummVM Team",
"",
"C1""Project Leaders",
-"C0""Max Horn",
"C0""Eugene Sandulenko",
"",
"C1""Retired Project Leaders",
"C0""James Brown",
"C0""Vincent Hamm",
"C2""ScummVM co-founder, Original Cruise/CinE author",
+"C0""Max Horn",
"C0""Ludvig Strigeus",
"C2""Original ScummVM and SimonVM author",
"",
@@ -23,8 +23,8 @@ static const char *credits[] = {
"C0""Vincent Hamm",
"C2""(retired)",
"C0""Max Horn",
-"C0""Travis Howell",
"C2""(retired)",
+"C0""Travis Howell",
"C0""Pawel Kolodziejski",
"C2""Codecs, iMUSE, Smush, etc.",
"C0""Gregory Montoir",
@@ -37,7 +37,6 @@ static const char *credits[] = {
"C0""Jonathan Gray",
"C2""(retired)",
"C0""Travis Howell",
-"C2""(retired)",
"C0""Gregory Montoir",
"C0""Eugene Sandulenko",
"",
@@ -47,6 +46,7 @@ static const char *credits[] = {
"C0""Filippos Karapetis",
"C0""Pawel Kolodziejski",
"C0""Walter van Niftrik",
+"C2""(retired)",
"C0""Kari Salminen",
"C0""Eugene Sandulenko",
"C0""David Symonds",
@@ -56,7 +56,6 @@ static const char *credits[] = {
"C0""Torbj\366rn Andersson",
"C0""Paul Gilbert",
"C0""Travis Howell",
-"C2""(retired)",
"C0""Oliver Kiehl",
"C2""(retired)",
"C0""Ludvig Strigeus",
@@ -83,6 +82,10 @@ static const char *credits[] = {
"C0""Filippos Karapetis",
"C0""Pawel Kolodziejski",
"",
+"C1""DreamWeb",
+"C0""Vladimir Menshakov",
+"C0""Torbj\366rn Andersson",
+"",
"C1""Gob",
"C0""Torbj\366rn Andersson",
"C0""Arnaud Boutonn\351",
@@ -152,9 +155,11 @@ static const char *credits[] = {
"C0""Greg Frieger",
"C0""Paul Gilbert",
"C0""Max Horn",
+"C2""(retired)",
"C0""Filippos Karapetis",
"C0""Martin Kiewitz",
"C0""Walter van Niftrik",
+"C2""(retired)",
"C0""Willem Jan Palenstijn",
"C0""Jordi Vilalta Prat",
"C0""Lars Skovlund",
@@ -185,6 +190,7 @@ static const char *credits[] = {
"C0""Eugene Sandulenko",
"C0""Filippos Karapetis",
"C0""Max Horn",
+"C2""(retired)",
"C0""Paul Gilbert",
"C0""Torbj\366rn Andersson",
"",
@@ -200,6 +206,7 @@ static const char *credits[] = {
"C0""Paul Gilbert",
"C0""Sven Hesse",
"C0""Max Horn",
+"C2""(retired)",
"C0""Filippos Karapetis",
"C0""Joost Peters",
"",
@@ -264,6 +271,7 @@ static const char *credits[] = {
"",
"C1""SDL (Win/Linux/OS X/etc.)",
"C0""Max Horn",
+"C2""(retired)",
"C0""Eugene Sandulenko",
"C2""Asm routines, GFX layers",
"",
@@ -281,7 +289,7 @@ static const char *credits[] = {
"C1""Other subsystems",
"C1""Infrastructure",
"C0""Max Horn",
-"C2""Backend & Engine APIs, file API, sound mixer, audiostreams, data structures, etc.",
+"C2""Backend & Engine APIs, file API, sound mixer, audiostreams, data structures, etc. (retired)",
"C0""Eugene Sandulenko",
"C0""Johannes Schickel",
"",
@@ -316,8 +324,6 @@ static const char *credits[] = {
"C2""Wiki maintainer",
"C0""Andre Heider",
"C2""Buildbot maintainer",
-"C0""Max Horn",
-"C2""Forum, IRC channel and Mailing list maintainer",
"C0""Joost Peters",
"C2""Doxygen Project Documentation maintainer",
"C0""Jordi Vilalta Prat",
@@ -386,6 +392,7 @@ static const char *credits[] = {
"",
"C1""Mac OS X",
"C0""Max Horn",
+"C2""(retired)",
"C0""Oystein Eftevaag",
"",
"C1""Mandriva",
@@ -411,7 +418,6 @@ static const char *credits[] = {
"",
"C1""Win32",
"C0""Travis Howell",
-"C2""(retired)",
"",
"C1""Win64",
"C0""Chris Gray",
@@ -521,7 +527,7 @@ static const char *credits[] = {
"C2""Initial MI1 CD music support",
"C0""Quietust",
"C2""Sound support for Amiga SCUMM V2/V3 games, MM NES support",
-"C0""segra",
+"C0""Robert Crossfield",
"C2""Improved support for Apple II/C64 versions of MM",
"C0""Andreas R\366ver",
"C2""Broken Sword I & II MPEG2 cutscene support",
diff --git a/gui/debugger.h b/gui/debugger.h
index b74b0d6f0f..3a587d2723 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -26,6 +26,7 @@
#include "common/ptr.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
+#include "common/array.h"
namespace GUI {
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index af1852d56d..212d68430c 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -39,7 +39,9 @@
#include "graphics/cursorman.h"
+namespace Common {
DECLARE_SINGLETON(GUI::GuiManager);
+}
namespace GUI {
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index b0adce3f47..70580e8b9c 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -24,6 +24,7 @@
#include "common/config-manager.h"
#include "common/debug.h"
#include "common/system.h"
+#include "common/taskbar.h"
#include "common/translation.h"
#include "gui/launcher.h" // For addGameToConf()
@@ -60,6 +61,7 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
: Dialog("MassAdd"),
_dirsScanned(0),
_oldGamesCount(0),
+ _dirTotal(0),
_okButton(0),
_dirProgressText(0),
_gameProgressText(0) {
@@ -69,14 +71,14 @@ MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
// The dir we start our scan at
_scanStack.push(startDir);
-// Removed for now... Why would you put a title on mass add dialog called "Mass Add Dialog"?
-// new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
+ // Removed for now... Why would you put a title on mass add dialog called "Mass Add Dialog"?
+ // new StaticTextWidget(this, "massadddialog_caption", "Mass Add Dialog");
_dirProgressText = new StaticTextWidget(this, "MassAdd.DirProgressText",
- _("... progress ..."));
+ _("... progress ..."));
_gameProgressText = new StaticTextWidget(this, "MassAdd.GameProgressText",
- _("... progress ..."));
+ _("... progress ..."));
_dirProgressText->setAlign(Graphics::kTextAlignCenter);
_gameProgressText->setAlign(Graphics::kTextAlignCenter);
@@ -130,6 +132,12 @@ struct GameDescLess {
void MassAddDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
+#if defined(USE_TASKBAR)
+ // Remove progress bar and count from taskbar
+ g_system->getTaskbarManager()->setProgressState(Common::TaskbarManager::kTaskbarNoProgress);
+ g_system->getTaskbarManager()->setCount(0);
+#endif
+
// FIXME: It's a really bad thing that we use two arbitrary constants
if (cmd == kOkCmd) {
// Sort the detected games. This is not strictly necessary, but nice for
@@ -226,10 +234,17 @@ void MassAddDialog::handleTickle() {
for (Common::FSList::const_iterator file = files.begin(); file != files.end(); ++file) {
if (file->isDirectory()) {
_scanStack.push(*file);
+
+ _dirTotal++;
}
}
_dirsScanned++;
+
+#if defined(USE_TASKBAR)
+ g_system->getTaskbarManager()->setProgressValue(_dirsScanned, _dirTotal);
+ g_system->getTaskbarManager()->setCount(_games.size());
+#endif
}
diff --git a/gui/massadd.h b/gui/massadd.h
index 15cef7ba68..7350213835 100644
--- a/gui/massadd.h
+++ b/gui/massadd.h
@@ -60,6 +60,7 @@ private:
int _dirsScanned;
int _oldGamesCount;
+ int _dirTotal;
Widget *_okButton;
StaticTextWidget *_dirProgressText;
diff --git a/gui/options.cpp b/gui/options.cpp
index b0b9fe6c90..3cc2eea6b9 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -343,12 +343,12 @@ void OptionsDialog::close() {
ConfMan.removeKey("render_mode", _domain);
}
}
-
+
// Setup graphics again if needed
if (_domain == Common::ConfigManager::kApplicationDomain && graphicsModeChanged) {
g_system->beginGFXTransaction();
g_system->setGraphicsMode(ConfMan.get("gfx_mode", _domain).c_str());
-
+
if (ConfMan.hasKey("aspect_ratio"))
g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio", _domain));
if (ConfMan.hasKey("fullscreen"))
@@ -383,7 +383,7 @@ void OptionsDialog::close() {
message += "\n";
message += _("the video mode could not be changed.");
}
-
+
if (gfxError & OSystem::kTransactionAspectRatioFailed) {
ConfMan.setBool("aspect_ratio", g_system->getFeatureState(OSystem::kFeatureAspectRatioCorrection), _domain);
message += "\n";
@@ -808,7 +808,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const Common::String &prefi
_gmDevicePopUp->appendEntry(d->getCompleteName(), d->getHandle());
} else if (d->getMusicDriverId() == "auto") {
_gmDevicePopUp->appendEntry(_("Use first available device"), d->getHandle());
- }
+ }
}
}
@@ -855,7 +855,7 @@ void OptionsDialog::addMT32Controls(GuiObject *boss, const Common::String &prefi
// Make sure the null device is the first one in the list to avoid undesired
// auto detection for users who don't have a saved setting yet.
for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); ++m) {
- MusicDevices i = (**m)->getDevices();
+ MusicDevices i = (**m)->getDevices();
for (MusicDevices::iterator d = i.begin(); d != i.end(); ++d) {
if (d->getMusicDriverId() == "null")
_mt32DevicePopUp->appendEntry(_("Don't use Roland MT-32 music"), d->getHandle());
diff --git a/gui/saveload.cpp b/gui/saveload.cpp
index 460246e5fc..02ddf814dc 100644
--- a/gui/saveload.cpp
+++ b/gui/saveload.cpp
@@ -131,7 +131,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
if (_list->isEditable() || !_list->getSelectedString().empty()) {
_list->endEditMode();
if (!_saveList.empty()) {
- setResult(atoi(_saveList[selItem].save_slot().c_str()));
+ setResult(_saveList[selItem].getSaveSlot());
_resultString = _list->getSelectedString();
}
close();
@@ -141,7 +141,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
case kChooseCmd:
_list->endEditMode();
if (!_saveList.empty()) {
- setResult(atoi(_saveList[selItem].save_slot().c_str()));
+ setResult(_saveList[selItem].getSaveSlot());
_resultString = _list->getSelectedString();
}
close();
@@ -154,7 +154,7 @@ void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 da
MessageDialog alert(_("Do you really want to delete this savegame?"),
_("Delete"), _("Cancel"));
if (alert.runModal() == GUI::kMessageOK) {
- (*_plugin)->removeSaveState(_target.c_str(), atoi(_saveList[selItem].save_slot().c_str()));
+ (*_plugin)->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot());
setResult(-1);
_list->setSelected(-1);
@@ -241,10 +241,10 @@ void SaveLoadChooser::updateSelection(bool redraw) {
_playtime->setLabel(_("No playtime saved"));
if (selItem >= 0 && !_list->getSelectedString().empty() && _metaInfoSupport) {
- SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), atoi(_saveList[selItem].save_slot().c_str()));
+ SaveStateDescriptor desc = (*_plugin)->querySaveMetaInfos(_target.c_str(), _saveList[selItem].getSaveSlot());
- isDeletable = desc.getBool("is_deletable") && _delSupport;
- isWriteProtected = desc.getBool("is_write_protected");
+ isDeletable = desc.getDeletableFlag() && _delSupport;
+ isWriteProtected = desc.getWriteProtectedFlag();
// Don't allow the user to change the description of write protected games
if (isWriteProtected)
@@ -259,16 +259,19 @@ void SaveLoadChooser::updateSelection(bool redraw) {
}
if (_saveDateSupport) {
- if (desc.contains("save_date"))
- _date->setLabel(_("Date: ") + desc.getVal("save_date"));
+ const Common::String &saveDate = desc.getSaveDate();
+ if (!saveDate.empty())
+ _date->setLabel(_("Date: ") + saveDate);
- if (desc.contains("save_time"))
- _time->setLabel(_("Time: ") + desc.getVal("save_time"));
+ const Common::String &saveTime = desc.getSaveTime();
+ if (!saveTime.empty())
+ _time->setLabel(_("Time: ") + saveTime);
}
if (_playTimeSupport) {
- if (desc.contains("play_time"))
- _playtime->setLabel(_("Playtime: ") + desc.getVal("play_time"));
+ const Common::String &playTime = desc.getPlayTime();
+ if (!playTime.empty())
+ _playtime->setLabel(_("Playtime: ") + playTime);
}
}
@@ -326,25 +329,25 @@ void SaveLoadChooser::updateSaveList() {
ListWidget::ColorList colors;
for (SaveStateList::const_iterator x = _saveList.begin(); x != _saveList.end(); ++x) {
// Handle gaps in the list of save games
- saveSlot = atoi(x->save_slot().c_str());
+ saveSlot = x->getSaveSlot();
if (curSlot < saveSlot) {
while (curSlot < saveSlot) {
SaveStateDescriptor dummySave(curSlot, "");
_saveList.insert_at(curSlot, dummySave);
- saveNames.push_back(dummySave.description());
+ saveNames.push_back(dummySave.getDescription());
colors.push_back(ThemeEngine::kFontColorNormal);
curSlot++;
}
// Sync the save list iterator
for (x = _saveList.begin(); x != _saveList.end(); ++x) {
- if (atoi(x->save_slot().c_str()) == saveSlot)
+ if (x->getSaveSlot() == saveSlot)
break;
}
}
// Show "Untitled savestate" for empty/whitespace savegame descriptions
- Common::String description = x->description();
+ Common::String description = x->getDescription();
Common::String trimmedDescription = description;
trimmedDescription.trim();
if (trimmedDescription.empty()) {
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index 9e5c0465d9..df15d72567 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/icons/count.ico b/icons/count.ico
new file mode 100644
index 0000000000..73e399e394
--- /dev/null
+++ b/icons/count.ico
Binary files differ
diff --git a/icons/scummvm.ico b/icons/scummvm.ico
index 0142e90f14..0283e8432e 100644
--- a/icons/scummvm.ico
+++ b/icons/scummvm.ico
Binary files differ
diff --git a/po/POTFILES b/po/POTFILES
index 323e50e8e4..26bbf52d8f 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -63,7 +63,8 @@ backends/keymapper/remap-dialog.cpp
backends/midi/windows.cpp
backends/platform/ds/arm9/source/dsoptions.cpp
backends/platform/iphone/osys_events.cpp
-backends/graphics/sdl/sdl-graphics.cpp
+backends/platform/sdl/macosx/appMenu_osx.mm
+backends/graphics/surfacesdl/surfacesdl-graphics.cpp
backends/graphics/opengl/opengl-graphics.cpp
backends/graphics/openglsdl/openglsdl-graphics.cpp
backends/platform/symbian/src/SymbianActions.cpp
diff --git a/po/ca_ES.po b/po/ca_ES.po
index ce4c1db140..d837be093f 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2010-09-21 23:12+0100\n"
"Last-Translator: Jordi Vilalta Prat <jvprat@jvprat.com>\n"
"Language-Team: Catalan <scummvm-devel@lists.sf.net>\n"
@@ -45,8 +45,8 @@ msgstr "Amunt"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -85,7 +85,7 @@ msgstr "Mapeja"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -607,8 +607,9 @@ msgstr "Mode de pintat:"
msgid "Special dithering modes supported by some games"
msgstr "Modes de dispersió especials suportats per alguns jocs"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Mode pantalla completa"
@@ -1096,7 +1097,11 @@ msgstr ""
msgid "Engine plugin does not support save states"
msgstr "El motor no suporta el nivell de depuració '%s'"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
#, fuzzy
msgid "Unknown error"
msgstr "Error desconegut"
@@ -1119,34 +1124,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules Àmbar"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~C~ontinua"
@@ -1252,6 +1242,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~A~nterior"
@@ -1804,14 +1805,14 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1822,7 +1823,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1833,7 +1834,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1844,7 +1845,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2208,33 +2209,33 @@ msgstr "Mode Touchpad activat."
msgid "Touchpad mode disabled."
msgstr "Mode Touchpad desactivat."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (sense escalar)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (no escalat)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Correcció de la relació d'aspecte"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Correcció de la relació d'aspecte"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
msgid "Active graphics filter:"
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Mode de pintat:"
@@ -2251,20 +2252,20 @@ msgstr ""
msgid "OpenGL Original"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Mode de vídeo actual:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 6a570b81c2..9d2751a711 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
-"PO-Revision-Date: 2011-06-14 15:04+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
+"PO-Revision-Date: 2011-06-24 06:44+0100\n"
"Last-Translator: Zbynìk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -49,8 +49,8 @@ msgstr "Jít nahoru"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -89,7 +89,7 @@ msgstr "Mapovat"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -605,8 +605,9 @@ msgstr "Re¾im vykreslení:"
msgid "Special dithering modes supported by some games"
msgstr "Speciální re¾imy chvìní podporované nìkterými hrami"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Re¾im celé obrazovky"
@@ -1079,7 +1080,11 @@ msgstr "Nelze nalézt vhodný zás. modul jádra"
msgid "Engine plugin does not support save states"
msgstr "Zás. modul jádra nepodporuje ulo¾ené stavy"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Zru¹eno u¾ivatelem"
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Neznámá chyba"
@@ -1101,36 +1106,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules Jantarová"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr "Hra v '%s' se zdá být neznámá."
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr "Prosím nahlaste následující data týmu ScummVM spolu se jménem"
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr "hry, kterou jste se pokusili pøidat a její verzi/jazyk/atd.:"
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-"Bylo zji¹tìno, ¾e Va¹e verze hry pou¾ívá jméno souboru shodující se s "
-"variantou %s."
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr "Pokud je toto pùvodní a nezmìnìná verze, ohlaste prosím jakékoli"
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr "pøede¹le vypsané informace od ScummVM zpátky týmu."
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~P~okraèovat"
@@ -1247,6 +1235,20 @@ msgstr ""
"abyste mohli poslouchat hudbu ve høe.\n"
"Pro podrobnosti si pøeètìte README."
+#: engines/engine.cpp:405
+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 ""
+"VAROVÁNÍ: Hra, kterou se chystáte spustit, není je¹tì plnì podporována "
+"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:408
+msgid "Start anyway"
+msgstr "Pøesto spustit"
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~P~øedchozí"
@@ -1779,7 +1781,7 @@ msgstr "Letìt doprava"
msgid "Fly to lower right"
msgstr "Letìt doprava dolù"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
@@ -1788,7 +1790,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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1799,7 +1801,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1810,7 +1812,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1821,7 +1823,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2204,31 +2206,31 @@ msgstr "Touchpad re¾im zapnut"
msgid "Touchpad mode disabled."
msgstr "Touchpad re¾im vypnut"
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normální (bez zmìny velikosti)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normální (bez zmìny velikosti)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
msgid "Enabled aspect ratio correction"
msgstr "Povolena korekce pomìru stran"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
msgid "Disabled aspect ratio correction"
msgstr "Zakázána korekce pomìru stran"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
msgid "Active graphics filter:"
msgstr "Aktivní grafický filtr:"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
msgid "Windowed mode"
msgstr "Re¾im do okna"
@@ -2244,19 +2246,19 @@ msgstr "OpenGL Zachovávající"
msgid "OpenGL Original"
msgstr "OpenGL Pùvodní"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
msgid "Current display mode"
msgstr "Souèasný re¾im obrazu"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr "Souèasná velikost"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr "Aktivní re¾im filtru: Lineární"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr "Aktivní re¾im filtru: Nejbli¾¹í"
@@ -2627,6 +2629,19 @@ msgstr "Minimální Hlasitost"
msgid "Decreasing Volume"
msgstr "Sni¾uji Hlasitost"
+#~ msgid ""
+#~ "Your game version has been detected using filename matching as a variant "
+#~ "of %s."
+#~ msgstr ""
+#~ "Bylo zji¹tìno, ¾e Va¹e verze hry pou¾ívá jméno souboru shodující se s "
+#~ "variantou %s."
+
+#~ msgid "If this is an original and unmodified version, please report any"
+#~ msgstr "Pokud je toto pùvodní a nezmìnìná verze, ohlaste prosím jakékoli"
+
+#~ msgid "information previously printed by ScummVM to the team."
+#~ msgstr "pøede¹le vypsané informace od ScummVM zpátky týmu."
+
#~ msgid "Discovered %d new games."
#~ msgstr "Objeveno %d nových her."
diff --git a/po/da_DA.po b/po/da_DA.po
index 1d9acf76f5..9bb43f7784 100644
--- a/po/da_DA.po
+++ b/po/da_DA.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-01-08 22:53+0100\n"
"Last-Translator: Steffen Nyeland <steffen@nyeland.dk>\n"
"Language-Team: Steffen Nyeland <steffen@nyeland.dk>\n"
@@ -45,8 +45,8 @@ msgstr "Gå op"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -85,7 +85,7 @@ msgstr "Kortlæg"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -604,8 +604,9 @@ msgstr "Rendere tilstand:"
msgid "Special dithering modes supported by some games"
msgstr "Speciel farvereduceringstilstand understøttet a nogle spil"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Fuldskærms tilstand"
@@ -1083,7 +1084,11 @@ msgstr ""
msgid "Engine plugin does not support save states"
msgstr "Motor understøtter ikke fejlfindingsniveau '%s'"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
#, fuzzy
msgid "Unknown error"
msgstr "Ukendt fejl"
@@ -1106,34 +1111,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules brun"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "Gen~o~ptag"
@@ -1239,6 +1229,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "Fo~r~rige"
@@ -1772,14 +1773,14 @@ msgstr "Flyv til højre"
msgid "Fly to lower right"
msgstr "Flyv nederst til højre"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1790,7 +1791,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1801,7 +1802,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1812,7 +1813,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2176,34 +2177,34 @@ msgstr "Pegeplade tilstand aktiveret."
msgid "Touchpad mode disabled."
msgstr "Pegeplade tilstand deaktiveret."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Skift billedformat korrektion"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Skift billedformat korrektion"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Skift mellem grafik filtre"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Rendere tilstand:"
@@ -2220,20 +2221,20 @@ msgstr "OpenGL Bevar"
msgid "OpenGL Original"
msgstr "OpenGL Original"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Aktuel videotilstand:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/de_DE.po b/po/de_DE.po
index 154c529984..d823212316 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
-"PO-Revision-Date: 2011-04-24 12:35+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
+"PO-Revision-Date: 2011-06-20 09:45+0100\n"
"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n"
"Language-Team: Lothar Serra Mari <Lothar@Windowsbase.de> & Simon Sawatzki "
"<SimSaw@gmx.de>\n"
@@ -47,8 +47,8 @@ msgstr "Pfad hoch"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -87,7 +87,7 @@ msgstr "Zuweisen"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -522,7 +522,7 @@ msgstr "Suchlauf abgeschlossen!"
#: gui/massadd.cpp:246
#, c-format
msgid "Discovered %d new games, ignored %d previously added games."
-msgstr ""
+msgstr "%d neue Spiele gefunden, %d bereits hinzugefügte Spiele ignoriert."
#: gui/massadd.cpp:250
#, c-format
@@ -530,9 +530,9 @@ msgid "Scanned %d directories ..."
msgstr "%d Ordner durchsucht..."
#: gui/massadd.cpp:253
-#, fuzzy, c-format
+#, c-format
msgid "Discovered %d new games, ignored %d previously added games ..."
-msgstr "%d neue Spiele gefunden..."
+msgstr "%d neue Spiele gefunden, %d bereits hinzugefügte Spiele ignoriert..."
#: gui/options.cpp:72
msgid "Never"
@@ -582,19 +582,20 @@ msgstr "-"
#: gui/options.cpp:372
msgid "Failed to apply some of the graphic options changes:"
-msgstr ""
+msgstr "Fehler bei einigen Änderungen in Grafikoptionen:"
#: gui/options.cpp:384
msgid "the video mode could not be changed."
-msgstr ""
+msgstr "Grafikmodus konnte nicht geändert werden."
#: gui/options.cpp:390
msgid "the fullscreen setting could not be changed"
-msgstr ""
+msgstr "Vollbildeinstellung konnte nicht geändert werden."
#: gui/options.cpp:396
msgid "the aspect ratio setting could not be changed"
msgstr ""
+"Einstellung für Seitenverhältniskorrektur konnte nicht geändert werden."
#: gui/options.cpp:705
msgid "Graphics mode:"
@@ -609,8 +610,9 @@ msgid "Special dithering modes supported by some games"
msgstr ""
"Spezielle Farbmischungsmethoden werden von manchen Spielen unterstützt."
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Vollbildmodus"
@@ -908,9 +910,8 @@ msgid "Language of ScummVM GUI"
msgstr "Sprache der ScummVM-Oberfläche"
#: gui/options.cpp:1295
-#, fuzzy
msgid "You have to restart ScummVM before your changes will take effect."
-msgstr "Sie müssen ScummVM neu starten, um die Einstellungen zu übernehmen."
+msgstr "Sie müssen ScummVM neu starten, damit die Änderungen wirksam werden."
#: gui/options.cpp:1308
msgid "Select directory for savegames"
@@ -1094,7 +1095,11 @@ msgstr "Konnte kein passendes Engine-Plugin finden."
msgid "Engine plugin does not support save states"
msgstr "Engine-Plugin unterstützt keine Speicherstände."
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Unbekannter Fehler"
@@ -1116,33 +1121,22 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules-Gelb"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
-msgstr ""
+msgstr "Das Spiel im Verzeichnis \"%s\" scheint nicht bekannt zu sein."
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
+"Bitte berichten Sie die folgenden Daten auf Englisch an das ScummVM-Team "
+"sowie"
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
+"den Namen des Spiels, das Sie hinzufügen wollten, als auch die Version/"
+"Sprache/usw.:"
#: engines/dialogs.cpp:84
msgid "~R~esume"
@@ -1198,6 +1192,9 @@ msgid ""
"the README for basic information, and for instructions on how to obtain "
"further assistance."
msgstr ""
+"Leider bietet diese Engine keine Spielhilfe. Bitte lesen Sie die LIESMICH-"
+"Datei für grundlegende Informationen und Anweisungen dazu, wie man an "
+"weitere Hilfe gelangt."
#: engines/dialogs.cpp:312 engines/mohawk/dialogs.cpp:100
#: engines/mohawk/dialogs.cpp:152
@@ -1215,21 +1212,19 @@ msgstr "~T~asten"
#: engines/engine.cpp:220
msgid "Could not initialize color format."
-msgstr ""
+msgstr "Konnte Farbenformat nicht initialisieren."
#: engines/engine.cpp:228
-#, fuzzy
msgid "Could not switch to video mode: '"
-msgstr "Aktueller Videomodus:"
+msgstr "Konnte nicht zu Grafikmodus wechseln: '"
#: engines/engine.cpp:237
-#, fuzzy
msgid "Could not apply aspect ratio setting."
-msgstr "Seitenverhältnis anpassen: an/aus"
+msgstr "Konnte Einstellung für Seitenverhältniskorrektur nicht anwenden."
#: engines/engine.cpp:242
msgid "Could not apply fullscreen setting."
-msgstr ""
+msgstr "Konnte Einstellung für Vollbildmodus nicht anwenden."
#: engines/engine.cpp:342
msgid ""
@@ -1239,6 +1234,13 @@ msgid ""
"the data files to your hard disk instead.\n"
"See the README file for details."
msgstr ""
+"Sie scheinen dieses Spiel direkt von CD zu\n"
+"spielen. Dies kann bekanntermaßen zu Problemen\n"
+"führen und es wird deshalb empfohlen, die\n"
+"Dateien des Spiels auf die Festplatte zu\n"
+"kopieren und von dort aus zu spielen.\n"
+"Lesen Sie die LIESMICH-Datei für\n"
+"weitere Informationen."
#: engines/engine.cpp:353
msgid ""
@@ -1248,6 +1250,23 @@ msgid ""
"order to listen to the game's music.\n"
"See the README file for details."
msgstr ""
+"Dieses Spiel hat Audio-Titel auf seiner CD.\n"
+"Diese Titel müssen von der CD mittels eines\n"
+"geeigneten Extrahierungsprogramms für\n"
+"Audio-CDs beschafft werden, um diese im\n"
+"Spiel hören zu können. Lesen Sie die\n"
+"LIESMICH-Datei für weitere Informationen."
+
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
@@ -1401,7 +1420,6 @@ msgid " since they may cause crashes"
msgstr " da dies Abstürze oder fehlerhaftes"
#: engines/scumm/help.cpp:110
-#, fuzzy
msgid " or incorrect game behavior."
msgstr " Spielverhalten verursachen kann."
@@ -1782,14 +1800,16 @@ msgstr "Nach rechts fliegen"
msgid "Fly to lower right"
msgstr "Nach unten rechts fliegen"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
msgstr ""
+"Systemeigene MIDI-Ünterstützung erfordert das Roland-Upgrade von LucasArts,\n"
+"aber %s fehlt. Stattdessen wird AdLib verwendet."
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1800,7 +1820,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1811,7 +1831,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1822,7 +1842,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -1864,40 +1884,24 @@ msgstr "Laden"
#: engines/agos/animation.cpp:544
#, c-format
msgid "Cutscene file '%s' not found!"
-msgstr ""
+msgstr "Zwischensequenz \"%s\" nicht gefunden!"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283
#: engines/tinsel/saveload.cpp:468
-#, fuzzy
msgid "Failed to load game state from file."
-msgstr ""
-"Konnte Spielstand nicht aus folgender Datei laden:\n"
-"\n"
-"%s"
+msgstr "Konnte Spielstand aus Datei nicht laden."
#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:546
-#, fuzzy
msgid "Failed to save game state to file."
-msgstr ""
-"Konnte Spielstand nicht in folgender Datei speichern:\n"
-"\n"
-"%s"
+msgstr "Konnte Spielstand nicht in Datei speichern."
#: engines/gob/inter_v5.cpp:107
-#, fuzzy
msgid "Failed to delete file."
-msgstr ""
-"Konnte Spielstand nicht in folgender Datei speichern:\n"
-"\n"
-"%s"
+msgstr "Konnte Datei nicht löschen."
#: engines/groovie/script.cpp:417
-#, fuzzy
msgid "Failed to save game"
-msgstr ""
-"Konnte Spielstand nicht in folgender Datei speichern:\n"
-"\n"
-"%s"
+msgstr "Konnte Spielstand nicht speichern."
#: engines/kyra/sound_midi.cpp:475
msgid ""
@@ -1907,36 +1911,49 @@ msgid ""
"General MIDI ones. After all it might happen\n"
"that a few tracks will not be correctly played."
msgstr ""
+"Sie scheinen ein General-MIDI-Gerät zu\n"
+"verwenden, aber das Spiel unterstützt nur\n"
+"Roland MT-32 MIDI. Es wird versucht, die\n"
+"Roland-MT-32-Instrumente denen von General MIDI\n"
+"zuzuordnen. Es kann jedoch vorkommen, dass ein\n"
+"paar Musikstücke nicht richtig abgespielt werden."
#: engines/m4/m4_menus.cpp:138
-#, fuzzy
msgid "Save game failed!"
-msgstr "Speichern:"
+msgstr "Konnte Spielstand nicht speichern!"
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
"Please download it from www.scummvm.org"
msgstr ""
+"Konnte \"sky.cpt\" nicht finden!\n"
+"Bitte laden Sie die Datei von\n"
+"www.scummvm.org herunter."
#: engines/sky/compact.cpp:141
msgid ""
"The \"sky.cpt\" file has an incorrect size.\n"
"Please (re)download it from www.scummvm.org"
msgstr ""
+"Die Datei \"sky.cpt\" hat eine ungültige Größe.\n"
+"Bitte laden Sie diese Datei (erneut) von\n"
+"www.scummvm.org herunter."
#: engines/sword1/animation.cpp:344 engines/sword2/animation.cpp:379
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:354 engines/sword2/animation.cpp:389
msgid "MPEG2 cutscenes are no longer supported"
-msgstr ""
+msgstr "MPEG2-Zwischensequenzen werden nicht mehr unterstützt."
#: engines/sword1/animation.cpp:359 engines/sword2/animation.cpp:397
#, c-format
msgid "Cutscene '%s' not found"
-msgstr ""
+msgstr "Zwischensequenz \"%s\" gefunden"
#: engines/sword1/control.cpp:863
msgid ""
@@ -1948,6 +1965,13 @@ msgid ""
"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 Speicherstände von Baphomets Fluch 1 "
+"haben, die umgewandelt werden sollten.\n"
+"Das alte Spielstandsformat wird nicht mehr unterstützt, also können Sie "
+"diese Speicherstände nicht laden, wenn Sie diese nicht konvertieren.\n"
+"\n"
+"Klicken Sie auf OK, um diese jetzt umzuwandeln, ansonsten werden Sie erneut "
+"gefragt, wenn Sie das nächste Mal dieses Spiel starten.\n"
#: engines/sword1/control.cpp:1232
#, c-format
@@ -1955,18 +1979,20 @@ 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 ""
+"Die für den neuen Spielstand vorgesehene Datei existiert bereits!\n"
+"Möchten Sie den alten Speicherstand (%s) oder den neuen (%s) behalten?\n"
#: engines/sword1/control.cpp:1235
msgid "Keep the old one"
-msgstr ""
+msgstr "Den alten behalten"
#: engines/sword1/control.cpp:1235
msgid "Keep the new one"
-msgstr ""
+msgstr "Den neuen behalten"
#: engines/sword1/logic.cpp:1633
msgid "This is the end of the Broken Sword 1 Demo"
-msgstr ""
+msgstr "Das ist das Ende der Demo von Broken Sword 1 (Baphomets Fluch 1)."
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -1974,16 +2000,16 @@ msgid ""
"Can't save game in slot %i\n"
"\n"
msgstr ""
+"Kann Spiel nicht speichern auf Speicherplatz %i\n"
+"\n"
#: engines/parallaction/saveload.cpp:211
-#, fuzzy
msgid "Loading game..."
-msgstr "Spiel laden:"
+msgstr "Spiel wird geladen..."
#: engines/parallaction/saveload.cpp:226
-#, fuzzy
msgid "Saving game..."
-msgstr "Speichern:"
+msgstr "Spiel wird gespeichert..."
#: engines/parallaction/saveload.cpp:279
msgid ""
@@ -1994,10 +2020,17 @@ msgid ""
"\n"
"Press OK to convert them now, otherwise you will be asked next time.\n"
msgstr ""
+"ScummVM hat erkannt, dass Sie alte Speicherstände von Nippon Safes haben, "
+"die umbenannt werden sollten.\n"
+"Die alten Dateinamen werden nicht mehr unterstützt, also können Sie diese "
+"Speicherstände nicht laden, wenn Sie diese nicht konvertieren.\n"
+"\n"
+"Klicken Sie auf OK, um diese jetzt umzuwandeln, ansonsten werden Sie erneut "
+"gefragt, wenn Sie das nächste Mal dieses Spiel starten.\n"
#: engines/parallaction/saveload.cpp:326
msgid "ScummVM successfully converted all your savefiles."
-msgstr ""
+msgstr "ScummVM hat alle Speicherstände erfolgreich umgewandelt."
#: engines/parallaction/saveload.cpp:328
msgid ""
@@ -2006,6 +2039,9 @@ msgid ""
"\n"
"Please report to the team."
msgstr ""
+"ScummVM hat ein paar Warnungen im Konsolenfenster ausgegeben und kann nicht "
+"gewährleisten, dass alle Speicherstände umgewandelt wurden.\n"
+"\n"
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
@@ -2021,6 +2057,9 @@ msgid ""
"The selected audio device '%s' was not found (e.g. might be turned off or "
"disconnected). Attempting to fall back to the next available device..."
msgstr ""
+"Das ausgewählte Audiogerät \"%s\" wurde nicht gefunden (könnte "
+"beispielsweise ausgeschaltet oder nicht angeschlossen sein). Es wird "
+"versucht, auf das nächste verfügbare Gerät zurückzugreifen."
#: audio/mididrv.cpp:216
#, c-format
@@ -2028,6 +2067,9 @@ msgid ""
"The selected audio device '%s' cannot be used. See log file for more "
"information. Attempting to fall back to the next available device..."
msgstr ""
+"Das ausgewählte Audiogerät \"%s\" kann nicht verwendet werden. Schauen Sie "
+"für weitere Informationen in der Log-Datei nach. Es wird versucht, auf das "
+"nächste verfügbare Gerät zurückzugreifen."
#: audio/mididrv.cpp:250
#, c-format
@@ -2035,6 +2077,9 @@ msgid ""
"The preferred audio device '%s' was not found (e.g. might be turned off or "
"disconnected). Attempting to fall back to the next available device..."
msgstr ""
+"Das bevorzugte Audiogerät \"%s\" wurde nicht gefunden (könnte beispielsweise "
+"ausgeschaltet oder nicht angeschlossen sein). Es wird versucht, auf das "
+"nächste verfügbare Gerät zurückzugreifen."
#: audio/mididrv.cpp:265
#, c-format
@@ -2042,6 +2087,9 @@ msgid ""
"The preferred audio device '%s' cannot be used. See log file for more "
"information. Attempting to fall back to the next available device..."
msgstr ""
+"Das bevorzugte Audiogerät \"%s\" kann nicht verwendet werden. Schauen Sie "
+"für weitere Informationen in der Log-Datei nach. Es wird versucht, auf das "
+"nächste verfügbare Gerät zurückzugreifen."
#: audio/null.h:43
msgid "No music"
@@ -2064,9 +2112,8 @@ msgid "C64 Audio Emulator"
msgstr "C64-Audio-Emulator"
#: audio/softsynth/mt32.cpp:329
-#, fuzzy
msgid "Initializing MT-32 Emulator"
-msgstr "MT-32-Emulator wird gestartet..."
+msgstr "MT-32-Emulator wird gestartet"
#: audio/softsynth/mt32.cpp:543
msgid "MT-32 Emulator"
@@ -2173,14 +2220,12 @@ msgid "Disable power off"
msgstr "Stromsparmodus abschalten"
#: backends/platform/iphone/osys_events.cpp:338
-#, fuzzy
msgid "Mouse-click-and-drag mode enabled."
-msgstr "Touchpad-Modus aktiviert."
+msgstr "Maus-klick-und-zieh-Modus aktiviert."
#: backends/platform/iphone/osys_events.cpp:340
-#, fuzzy
msgid "Mouse-click-and-drag mode disabled."
-msgstr "Touchpad-Modus ausgeschaltet."
+msgstr "Maus-klick-und-zieh-Modus ausgeschaltet."
#: backends/platform/iphone/osys_events.cpp:351
msgid "Touchpad mode enabled."
@@ -2190,37 +2235,33 @@ msgstr "Touchpad-Modus aktiviert."
msgid "Touchpad mode disabled."
msgstr "Touchpad-Modus ausgeschaltet."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (keine Skalierung)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal ohn.Skalieren"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
msgid "Enabled aspect ratio correction"
-msgstr "Seitenverhältnis anpassen: an/aus"
+msgstr "Seitenverhältniskorrektur an"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
msgid "Disabled aspect ratio correction"
-msgstr "Seitenverhältnis anpassen: an/aus"
+msgstr "Seitenverhältniskorrektur aus"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
msgid "Active graphics filter:"
-msgstr "Zwischen Grafikfiltern wechseln"
+msgstr "Aktiver Grafikfilter:"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
msgid "Windowed mode"
-msgstr "Render-Modus:"
+msgstr "Fenstermodus"
#: backends/graphics/opengl/opengl-graphics.cpp:139
msgid "OpenGL Normal"
@@ -2234,22 +2275,21 @@ msgstr ""
msgid "OpenGL Original"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
-#, fuzzy
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
msgid "Current display mode"
-msgstr "Aktueller Videomodus:"
+msgstr "Aktueller Grafikmodus"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
-msgstr ""
+msgstr "Aktueller Vergrößerungsfaktor"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
-msgstr ""
+msgstr "Aktiver Filtermodus: linear"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
-msgstr ""
+msgstr "Aktiver Filtermodus: nächste Nachbarn"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2331,7 +2371,7 @@ msgstr "Video"
#: backends/platform/wii/options.cpp:54
msgid "Current video mode:"
-msgstr "Aktueller Videomodus:"
+msgstr "Aktueller Grafikmodus:"
#: backends/platform/wii/options.cpp:56
msgid "Double-strike"
@@ -2442,17 +2482,15 @@ msgid "Network down"
msgstr "Netzwerk ist aus."
#: backends/platform/wii/options.cpp:178
-#, fuzzy
msgid "Initializing network"
-msgstr "Netzwerk wird gestartet..."
+msgstr "Netzwerk wird gestartet"
#: backends/platform/wii/options.cpp:182
-#, fuzzy
msgid "Timeout while initializing network"
msgstr "Zeitüberschreitung beim Starten des Netzwerks"
#: backends/platform/wii/options.cpp:186
-#, fuzzy, c-format
+#, c-format
msgid "Network not initialized (%d)"
msgstr "Netzwerk nicht gestartet (%d)"
@@ -2575,58 +2613,66 @@ msgstr ""
"zuzuweisen, um das ganze Inventar sehen zu können."
#: backends/events/default/default-events.cpp:222
-#, fuzzy
msgid "Do you really want to return to the Launcher?"
-msgstr "Diesen Spielstand wirklich löschen?"
+msgstr "Möchten Sie wirklich zur Spieleliste zurückkehren?"
#: backends/events/default/default-events.cpp:222
-#, fuzzy
msgid "Launcher"
-msgstr "Schlage"
+msgstr "Spieleliste"
#: backends/events/default/default-events.cpp:244
-#, fuzzy
msgid "Do you really want to quit?"
-msgstr "Möchten Sie beenden?"
+msgstr "Möchten Sie wirklich beenden?"
#: backends/events/gph/gph-events.cpp:366
#: backends/events/gph/gph-events.cpp:409
#: backends/events/openpandora/op-events.cpp:141
msgid "Touchscreen 'Tap Mode' - Left Click"
-msgstr ""
+msgstr "Berührungsbildschirm-Tipp-Modus - Linksklick"
#: backends/events/gph/gph-events.cpp:368
#: backends/events/gph/gph-events.cpp:411
#: backends/events/openpandora/op-events.cpp:143
msgid "Touchscreen 'Tap Mode' - Right Click"
-msgstr ""
+msgstr "Berührungsbildschirm-Tipp-Modus - Rechtsklick"
#: backends/events/gph/gph-events.cpp:370
#: backends/events/gph/gph-events.cpp:413
#: backends/events/openpandora/op-events.cpp:145
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
-msgstr ""
+msgstr "Berührungsbildschirm-Tipp-Modus - schweben (kein Klick)"
#: backends/events/gph/gph-events.cpp:390
-#, fuzzy
msgid "Maximum Volume"
-msgstr "Lautstärke"
+msgstr "Höchste Lautstärke"
#: backends/events/gph/gph-events.cpp:392
msgid "Increasing Volume"
-msgstr ""
+msgstr "Lautstärke höher"
#: backends/events/gph/gph-events.cpp:398
-#, fuzzy
msgid "Minimal Volume"
-msgstr "Lautstärke"
+msgstr "Niedrigste Lautstärke"
#: backends/events/gph/gph-events.cpp:400
msgid "Decreasing Volume"
-msgstr ""
-
-#~ msgid "Discovered %d new games."
-#~ msgstr "%d neue Spiele gefunden."
+msgstr "Lautstärke niedriger"
+
+#~ msgid ""
+#~ "Your game version has been detected using filename matching as a variant "
+#~ "of %s."
+#~ msgstr ""
+#~ "Ihre Spielversion wurde durch Dateinamen-Übereinstimmung als Variante von "
+#~ "%s erkannt."
+
+#~ msgid "If this is an original and unmodified version, please report any"
+#~ msgstr ""
+#~ "Sollte es sich hierbei um eine unmodifizierte Originalversion handeln,"
+
+#~ msgid "information previously printed by ScummVM to the team."
+#~ msgstr ""
+#~ "so teilen Sie bitte dem Team die von ScummVM zuvor ausgegebenen Daten auf "
+#~ "Englisch mit."
#~ msgid "Command line argument not processed"
#~ msgstr "Argument in Kommandozeile nicht verarbeitet"
diff --git a/po/es_ES.po b/po/es_ES.po
index 0f76d38917..730b8d48b0 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-05-08 13:31+0100\n"
"Last-Translator: Tomás Maidagan\n"
"Language-Team: \n"
@@ -45,8 +45,8 @@ msgstr "Arriba"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -85,7 +85,7 @@ msgstr "Asignar"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -604,8 +604,9 @@ msgstr "Renderizado:"
msgid "Special dithering modes supported by some games"
msgstr "Modos especiales de expansión soportados por algunos juegos"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Pantalla completa"
@@ -1085,7 +1086,11 @@ msgstr "No se ha encontrado un plugin adecuado"
msgid "Engine plugin does not support save states"
msgstr "El plugin del motor no es compatible con partidas guardadas"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Error desconocido"
@@ -1107,34 +1112,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules ámbar"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~R~eanudar"
@@ -1240,6 +1230,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~A~nterior"
@@ -1773,14 +1774,14 @@ msgstr "Volar a la derecha"
msgid "Fly to lower right"
msgstr "Volar abajo y a la derecha"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1791,7 +1792,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1802,7 +1803,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1813,7 +1814,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2180,34 +2181,34 @@ msgstr "Modo Touchpad activado."
msgid "Touchpad mode disabled."
msgstr "Modo Touchpad desactivado."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (sin reescalado)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Corrección de aspecto"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Corrección de aspecto"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Alternar entre filtros gráficos"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Renderizado:"
@@ -2224,20 +2225,20 @@ msgstr "OpenGL Conservar"
msgid "OpenGL Original"
msgstr "OpenGL Original"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Modo de vídeo actual:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 1dca127df8..7b6326a75b 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-05-02 19:50+0100\n"
"Last-Translator: Thierry Crozat <criezy@scummvm.org>\n"
"Language-Team: French <scummvm-devel@lists.sf.net>\n"
@@ -46,8 +46,8 @@ msgstr "Remonter"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -86,7 +86,7 @@ msgstr "Affecter"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -606,8 +606,9 @@ msgstr "Mode de rendu:"
msgid "Special dithering modes supported by some games"
msgstr "Mode spécial de tramage supporté par certains jeux"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Plein écran"
@@ -1090,7 +1091,11 @@ msgstr "Aucun plugin n'a pu être trouvé pour ce jeu"
msgid "Engine plugin does not support save states"
msgstr "Ce moteur de jeu ne supporte pas les sauvegardes"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Erreur inconnue"
@@ -1112,34 +1117,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules Ambre"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~R~eprendre"
@@ -1245,6 +1235,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~P~récédent"
@@ -1778,14 +1779,14 @@ msgstr "Voler vers la droite"
msgid "Fly to lower right"
msgstr "Voler vers la bas à droite"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1796,7 +1797,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1807,7 +1808,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1818,7 +1819,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -1835,7 +1836,7 @@ msgstr "Mode ~Z~ip Activé"
#: engines/mohawk/dialogs.cpp:91
msgid "~T~ransitions Enabled"
-msgstr "T~r~ansitions activé"
+msgstr "T~r~ansitions activées"
#: engines/mohawk/dialogs.cpp:92
msgid "~D~rop Page"
@@ -2186,34 +2187,34 @@ msgstr "Mode touchpad activé"
msgid "Touchpad mode disabled."
msgstr "Mode touchpad désactivé"
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (échelle d'origine)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Changer correction du rapport d'aspect"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Changer correction du rapport d'aspect"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Changer de filtre graphique"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Mode de rendu:"
@@ -2230,20 +2231,20 @@ msgstr "OpenGL Préserve"
msgid "OpenGL Original"
msgstr "OpenGL Originel"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Mode vidéo actuel"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/hu_HU.po b/po/hu_HU.po
index d392369220..4663df0ded 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
-"PO-Revision-Date: 2011-06-12 07:17+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
+"PO-Revision-Date: 2011-06-21 09:54+0100\n"
"Last-Translator: Gruby <grubycza@hotmail.com>\n"
"Language-Team: Hungarian\n"
"MIME-Version: 1.0\n"
@@ -49,8 +49,8 @@ msgstr "Feljebb"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -89,7 +89,7 @@ msgstr "Kiosztás"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -606,8 +606,9 @@ msgstr "Kirajzolás mód:"
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:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Teljesképernyõs mód:"
@@ -1078,7 +1079,11 @@ msgstr "Nem található alkalmas motor plugin"
msgid "Engine plugin does not support save states"
msgstr "A motor nem támogatja a játékállás mentését"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "Felhasználói megszakítás"
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Ismeretlen hiba"
@@ -1100,34 +1105,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules Sárga"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr "A '%s' játék ismeretlennek tûnik."
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr "Kérlek jelezd a ScummVM csapatnak a következõ adatokat, együtt a játék"
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr "címével és megbízható adataival játékverzió/nyelv(ek)/stb.:"
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr "A felismert játékverziód a használt fájlnévvel a %s egy változata."
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr "Ha ez egy eredeti nem változtatott verzió, kérlek jelezd minden"
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr "elõzõleg kiírt információt a ScummVM csapatnak."
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "Folytatás"
@@ -1182,6 +1172,8 @@ msgid ""
"the README for basic information, and for instructions on how to obtain "
"further assistance."
msgstr ""
+"Sajnálom, a motor jelenleg nem tartalmaz játék közbeni súgót. Olvassd el a "
+"README-t az alap információkról, és hogy hogyan segíthetsz a késõbbiekben."
#: engines/dialogs.cpp:312 engines/mohawk/dialogs.cpp:100
#: engines/mohawk/dialogs.cpp:152
@@ -1199,21 +1191,19 @@ msgstr "Billentyük"
#: engines/engine.cpp:220
msgid "Could not initialize color format."
-msgstr ""
+msgstr "Szín formátum nincs alkalmazva"
#: engines/engine.cpp:228
-#, fuzzy
msgid "Could not switch to video mode: '"
-msgstr "Jelenlegi videómód:"
+msgstr "Videómód nincs átállítva: ' "
#: engines/engine.cpp:237
-#, fuzzy
msgid "Could not apply aspect ratio setting."
-msgstr "Méretarány korrekció engedélyezve"
+msgstr "Méretarány korrekció nem változott."
#: engines/engine.cpp:242
msgid "Could not apply fullscreen setting."
-msgstr ""
+msgstr "Teljesképernyõs beállítás nincs alkalmazva"
#: engines/engine.cpp:342
msgid ""
@@ -1223,6 +1213,11 @@ msgid ""
"the data files to your hard disk instead.\n"
"See the README file for details."
msgstr ""
+"Úgy néz ki, ezt a játékot CD-rõl futtatod\n"
+"Ez ismert problémákat okoz, ezért\n"
+"ajánlatos átmásolni a játék\n"
+"adatfájljait a merevlemezedre.\n"
+"Nézd meg a README fájlt a részletekért."
#: engines/engine.cpp:353
msgid ""
@@ -1232,6 +1227,25 @@ msgid ""
"order to listen to the game's music.\n"
"See the README file for details."
msgstr ""
+"A játékhoz audiósávok tartoznak a lemezen\n"
+"ezeket a sávokat másold ki egy megfelelõ\n"
+"CD audió kitömörítõ programmal\n"
+"hogy a játék zenéje hallható legyen.\n"
+"Nézd meg a README fájlt a részletekért."
+
+#: engines/engine.cpp:405
+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 ""
+"FIGYELEM: A játékot amit indítani akarsz még nem teljesen támogatotja a "
+"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:408
+msgid "Start anyway"
+msgstr "Indítás így is"
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
@@ -1765,14 +1779,16 @@ msgstr "Jobbra repülés"
msgid "Fly to lower right"
msgstr "Jobbra le repülés"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, c-format
msgid ""
"Native MIDI support requires the Roland Upgrade from LucasArts,\n"
"but %s is missing. Using AdLib instead."
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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1783,7 +1799,7 @@ msgstr ""
"\n"
"%s fájlba nem sikerült"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1794,7 +1810,7 @@ msgstr ""
"\n"
"%s fájlból nem sikerült"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1805,7 +1821,7 @@ msgstr ""
"\n"
"%s fájlba elkészült"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -1846,40 +1862,24 @@ msgstr "Visszaállítás"
#: engines/agos/animation.cpp:544
#, c-format
msgid "Cutscene file '%s' not found!"
-msgstr ""
+msgstr "'%s' átvezetõ fájl nem található"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283
#: engines/tinsel/saveload.cpp:468
-#, fuzzy
msgid "Failed to load game state from file."
-msgstr ""
-"Játékállás betöltése:\n"
-"\n"
-"%s fájlból nem sikerült"
+msgstr "Játékállás betöltése fájlból nem sikerült."
#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:546
-#, fuzzy
msgid "Failed to save game state to file."
-msgstr ""
-"Játékállás mentése:\n"
-"\n"
-"%s fájlba nem sikerült"
+msgstr "Játékállás mentése fájlba nem sikerült."
#: engines/gob/inter_v5.cpp:107
-#, fuzzy
msgid "Failed to delete file."
-msgstr ""
-"Játékállás mentése:\n"
-"\n"
-"%s fájlba nem sikerült"
+msgstr "Fájl törlés sikertelen."
#: engines/groovie/script.cpp:417
-#, fuzzy
msgid "Failed to save game"
-msgstr ""
-"Játékállás mentése:\n"
-"\n"
-"%s fájlba nem sikerült"
+msgstr "Játék mentés nem sikerült"
#: engines/kyra/sound_midi.cpp:475
msgid ""
@@ -1889,36 +1889,44 @@ msgid ""
"General MIDI ones. After all it might happen\n"
"that a few tracks will not be correctly played."
msgstr ""
+"Úgy néz ki egy General MIDI eszközt használsz,\n"
+"a játék csak Roland MT32 MIDI eszközt támogat.\n"
+"Cseréld ki Roland MT32 hangszerekre\n"
+"a General MIDI-t. Különben néhány\n"
+"sávot nem lehet rendesen lejátszani."
#: engines/m4/m4_menus.cpp:138
-#, fuzzy
msgid "Save game failed!"
-msgstr "Játék mentése:"
+msgstr "Játék mentése nem sikerült!"
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
"Please download it from www.scummvm.org"
msgstr ""
+"A \"sky.cpt\" fájl nem található!\n"
+"Töltsd le a www.scummvm.org oldaláról"
#: engines/sky/compact.cpp:141
msgid ""
"The \"sky.cpt\" file has an incorrect size.\n"
"Please (re)download it from www.scummvm.org"
msgstr ""
+"A \"sky.cpt\" fájl mérete nem megfelelõ.\n"
+"Töltsd le a www.scummvm.org oldaláról"
#: engines/sword1/animation.cpp:344 engines/sword2/animation.cpp:379
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
-msgstr ""
+msgstr "DXA átvezetõ elérhetõ, de a ScummVM zlib támogatás nincs lefordítva"
#: engines/sword1/animation.cpp:354 engines/sword2/animation.cpp:389
msgid "MPEG2 cutscenes are no longer supported"
-msgstr ""
+msgstr "MPEG2 átvezetõk már nem támogatottak"
#: engines/sword1/animation.cpp:359 engines/sword2/animation.cpp:397
#, c-format
msgid "Cutscene '%s' not found"
-msgstr ""
+msgstr "'%s' átvezetõ nem található"
#: engines/sword1/control.cpp:863
msgid ""
@@ -1930,6 +1938,13 @@ msgid ""
"Press OK to convert them now, otherwise you will be asked again the next "
"time you start the game.\n"
msgstr ""
+"ScummVM régi játékmentést talált a Broken Sword 1 hez, ezt át kell "
+"alakítani.\n"
+"A régi játékmentés nem támogatott, ezért a játék nem töltõdik be átalakítás "
+"nélkül.\n"
+"\n"
+"Nyomj OK-t az átalakításhoz, vagy rákérdezzek ha legközelebb elindítod a "
+"játékot.\n"
#: engines/sword1/control.cpp:1232
#, c-format
@@ -1937,18 +1952,20 @@ 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 ""
+"A választott játékmentés már létezik!\n"
+"Megtartod a régi játékmentést (%s) vagy kicseréled az újra (%s)?\n"
#: engines/sword1/control.cpp:1235
msgid "Keep the old one"
-msgstr ""
+msgstr "A régit megtartom"
#: engines/sword1/control.cpp:1235
msgid "Keep the new one"
-msgstr ""
+msgstr "Az újat megtartom"
#: engines/sword1/logic.cpp:1633
msgid "This is the end of the Broken Sword 1 Demo"
-msgstr ""
+msgstr "Ez a Broken Sword 1 Demo vége"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -1956,16 +1973,16 @@ msgid ""
"Can't save game in slot %i\n"
"\n"
msgstr ""
+"Játékállás nem menthetõ %i slotba\n"
+"\n"
#: engines/parallaction/saveload.cpp:211
-#, fuzzy
msgid "Loading game..."
-msgstr "Játék betöltése:"
+msgstr "Játék betöltés..."
#: engines/parallaction/saveload.cpp:226
-#, fuzzy
msgid "Saving game..."
-msgstr "Játék mentése:"
+msgstr "Játék mentés..."
#: engines/parallaction/saveload.cpp:279
msgid ""
@@ -1976,10 +1993,16 @@ msgid ""
"\n"
"Press OK to convert them now, otherwise you will be asked next time.\n"
msgstr ""
+"ScummVM régi játékmentést talált a Nippon Safes hez ezt át kell nevezni.\n"
+"A régi játékmentés nem támogatott, ezért a játék nem töltõdik be átnevezés "
+"nélkül..\n"
+"\n"
+"Nyomj OK-t az átalakításhoz, vagy rákérdezzek ha legközelebb elindítod a "
+"játékot.\n"
#: engines/parallaction/saveload.cpp:326
msgid "ScummVM successfully converted all your savefiles."
-msgstr ""
+msgstr "ScummVM konvertálta az összes játékállásodat."
#: engines/parallaction/saveload.cpp:328
msgid ""
@@ -1988,6 +2011,10 @@ msgid ""
"\n"
"Please report to the team."
msgstr ""
+"ScummVM kiírt néhány figyelmeztetést a konzolablakba és nem biztos hogy az "
+"összes fájlod át lett alakítva.\n"
+"\n"
+"Légyszíves jelentsd a csapatnak."
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
@@ -1998,40 +2025,40 @@ msgid "DOSBox OPL emulator"
msgstr "DOSBox OPL emulátor"
#: audio/mididrv.cpp:204
-#, fuzzy, c-format
+#, c-format
msgid ""
"The selected audio device '%s' was not found (e.g. might be turned off or "
"disconnected). Attempting to fall back to the next available device..."
msgstr ""
-"A '%s' kiválasztott hangeszköz nem elérhetõ. Bõvebb információ a "
-"naplófájlban. Következõ elérhetõ eszköz keresése..."
+"A kiválasztott '%s' hangeszköz nem található. (Lekapcsoltad, vagy kihúztad). "
+"A következõ elérhetõ eszköz keresése..."
#: audio/mididrv.cpp:216
-#, fuzzy, c-format
+#, c-format
msgid ""
"The selected audio device '%s' cannot be used. See log file for more "
"information. Attempting to fall back to the next available device..."
msgstr ""
-"A '%s' kiválasztott hangeszköz nem elérhetõ. Bõvebb információ a "
-"naplófájlban. Következõ elérhetõ eszköz keresése..."
+"A kiválasztott '%s' hangeszköz nem használható. Bõvebb információ a "
+"naplófájlban. A következõ elérhetõ eszköz keresése..."
#: audio/mididrv.cpp:250
-#, fuzzy, c-format
+#, c-format
msgid ""
"The preferred audio device '%s' was not found (e.g. might be turned off or "
"disconnected). Attempting to fall back to the next available device..."
msgstr ""
-"A '%s' elsõdleges hangeszköz nem elérhetõ. Bõvebb információ a naplófájlban. "
-"Következõ elérhetõ eszköz keresése..."
+"Az elsõdleges '%s' hangeszköz nem található. (Lekapcsoltad, vagy kihúztad). "
+"A következõ elérhetõ eszköz keresése..."
#: audio/mididrv.cpp:265
-#, fuzzy, c-format
+#, c-format
msgid ""
"The preferred audio device '%s' cannot be used. See log file for more "
"information. Attempting to fall back to the next available device..."
msgstr ""
-"A '%s' elsõdleges hangeszköz nem elérhetõ. Bõvebb információ a naplófájlban. "
-"Következõ elérhetõ eszköz keresése..."
+"Az elsõdleges '%s' hangeszköz nem használható. Bõvebb információ a "
+"naplófájlban. A következõ elérhetõ eszköz keresése..."
#: audio/null.h:43
msgid "No music"
@@ -2162,14 +2189,12 @@ msgid "Disable power off"
msgstr "Leállítás tiltva"
#: backends/platform/iphone/osys_events.cpp:338
-#, fuzzy
msgid "Mouse-click-and-drag mode enabled."
-msgstr "Touchpad mód engedélyezve."
+msgstr "Egér kattint-és-húz mód engedélyezve."
#: backends/platform/iphone/osys_events.cpp:340
-#, fuzzy
msgid "Mouse-click-and-drag mode disabled."
-msgstr "Touchpad mód letiltva."
+msgstr "Egér kattint-és-húz mód letiltva."
#: backends/platform/iphone/osys_events.cpp:351
msgid "Touchpad mode enabled."
@@ -2179,31 +2204,31 @@ msgstr "Touchpad mód engedélyezve."
msgid "Touchpad mode disabled."
msgstr "Touchpad mód letiltva."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normál (nincs átméretezés)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normál (nincs átméretezés)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
msgid "Enabled aspect ratio correction"
msgstr "Méretarány korrekció engedélyezve"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
msgid "Disabled aspect ratio correction"
msgstr "Méretarány korrekció letiltva"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
msgid "Active graphics filter:"
msgstr "Aktív grafikus szûrõk:"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
msgid "Windowed mode"
msgstr "Ablakos mód"
@@ -2219,19 +2244,19 @@ msgstr "OpenGL Megtartott"
msgid "OpenGL Original"
msgstr "OpenGL Eredeti"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
msgid "Current display mode"
msgstr "Jelenlegi videómód"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr "Aktuális méretezés"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr "Aktív filter mód: Lineáris"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr "Aktív filter mód: Közelítõ"
@@ -2553,19 +2578,16 @@ msgstr ""
"a teljes listát"
#: backends/events/default/default-events.cpp:222
-#, fuzzy
msgid "Do you really want to return to the Launcher?"
-msgstr "Biztos hogy törölni akarod ezt a játékállást?"
+msgstr "Biztos hogy visszatérsz az indítópulthoz?"
#: backends/events/default/default-events.cpp:222
-#, fuzzy
msgid "Launcher"
-msgstr "Megüt"
+msgstr "Indítópult"
#: backends/events/default/default-events.cpp:244
-#, fuzzy
msgid "Do you really want to quit?"
-msgstr "Ki akarsz lépni ?"
+msgstr "Biztos hogy ki akarsz lépni ?"
#: backends/events/gph/gph-events.cpp:366
#: backends/events/gph/gph-events.cpp:409
@@ -2601,6 +2623,17 @@ msgstr "Minimum Hangerõ"
msgid "Decreasing Volume"
msgstr "Hangerõ csökkentése"
+#~ msgid ""
+#~ "Your game version has been detected using filename matching as a variant "
+#~ "of %s."
+#~ msgstr "A felismert játékverziód a használt fájlnévvel a %s egy változata."
+
+#~ msgid "If this is an original and unmodified version, please report any"
+#~ msgstr "Ha ez egy eredeti nem változtatott verzió, kérlek jelezd minden"
+
+#~ msgid "information previously printed by ScummVM to the team."
+#~ msgstr "elõzõleg kiírt információt a ScummVM csapatnak."
+
#~ msgid "Discovered %d new games."
#~ msgstr "%d Új játékot találtam."
diff --git a/po/it_IT.po b/po/it_IT.po
index 24f09e349f..1386e41973 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-04-24 14:46+0100\n"
"Last-Translator: Matteo 'Maff' Angelino <matteo.maff at gmail dot com>\n"
"Language-Team: Italian\n"
@@ -45,8 +45,8 @@ msgstr "Su"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -85,7 +85,7 @@ msgstr "Mappa"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -606,8 +606,9 @@ msgstr "Resa grafica:"
msgid "Special dithering modes supported by some games"
msgstr "Modalità di resa grafica speciali supportate da alcuni giochi"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Modalità a schermo intero"
@@ -1086,7 +1087,11 @@ msgstr "Impossibile trovare un plugin idoneo"
msgid "Engine plugin does not support save states"
msgstr "Il plugin del motore non supporta i salvataggi"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Errore sconosciuto"
@@ -1108,34 +1113,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules ambra"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~R~ipristina"
@@ -1241,6 +1231,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~P~recedenti"
@@ -1774,14 +1775,14 @@ msgstr "Vola a destra"
msgid "Fly to lower right"
msgstr "Vola in basso a destra"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1792,7 +1793,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1803,7 +1804,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1814,7 +1815,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2182,34 +2183,34 @@ msgstr "Modalità touchpad attivata."
msgid "Touchpad mode disabled."
msgstr "Modalità touchpad disattivata."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normale (nessun ridimensionamento)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normale (no ridim.)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Cambia correzione proporzioni"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Cambia correzione proporzioni"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Cambia filtro grafico"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Resa grafica:"
@@ -2226,20 +2227,20 @@ msgstr "OpenGL Conserve"
msgid "OpenGL Original"
msgstr "OpenGL Original"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Modalità video attuale:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 3afebc96d9..eb895ed8c4 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-04-25 22:56+0100\n"
"Last-Translator: Einar Johan T. Sømåen <einarjohants@gmail.com>\n"
"Language-Team: somaen <einarjohants@gmail.com>\n"
@@ -49,8 +49,8 @@ msgstr "Gå tilbake"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -89,7 +89,7 @@ msgstr "Koble"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -608,8 +608,9 @@ msgstr "Tegnemodus:"
msgid "Special dithering modes supported by some games"
msgstr "Spesiel dithering-modus støttet av enkelte spill"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
@@ -1081,7 +1082,11 @@ msgstr "Kunne ikke finne en passende engine-plugin"
msgid "Engine plugin does not support save states"
msgstr "Spillmotor-plugin støtter ikke lagrede tilstander"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Ukjent feil"
@@ -1103,34 +1108,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules Oransje"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~F~ortsett"
@@ -1236,6 +1226,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~F~orrige"
@@ -1769,14 +1770,14 @@ msgstr "Fly til høyre"
msgid "Fly to lower right"
msgstr "Fly til nedre høyre"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1787,7 +1788,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1798,7 +1799,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1809,7 +1810,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2176,34 +2177,34 @@ msgstr "Touchpad-modus aktivert."
msgid "Touchpad mode disabled."
msgstr "Touchpad-modus deaktivert."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (ingen skalering)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Veksle aspekt-rate korrigering"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Veksle aspekt-rate korrigering"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Bytt grafikkfiltre"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Tegnemodus:"
@@ -2220,20 +2221,20 @@ msgstr "OpenGL Bevar"
msgid "OpenGL Original"
msgstr "OpenGL Original"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Nåværende videomodus:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 9eecf8b6b5..ff43eb2a17 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+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"
@@ -49,8 +49,8 @@ msgstr "Gå tilbake"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -89,7 +89,7 @@ msgstr "Kople"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -607,8 +607,9 @@ msgstr "Teiknemodus:"
msgid "Special dithering modes supported by some games"
msgstr "Spesielle dithering-modus som støttast av nokre spel"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
@@ -1079,7 +1080,11 @@ msgstr "Kunne ikkje finne ein passande spelmotor-plugin"
msgid "Engine plugin does not support save states"
msgstr "Spelmotor-plugin støttar ikkje lagra tilstandar."
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Ukjend feil"
@@ -1101,34 +1106,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules Raudgul"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~F~ortsett"
@@ -1236,6 +1226,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~F~orrige"
@@ -1769,14 +1770,14 @@ msgstr "Fly til høgre"
msgid "Fly to lower right"
msgstr "Fly til nedre høgre"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1784,7 +1785,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1792,7 +1793,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1800,7 +1801,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2150,34 +2151,34 @@ msgstr ""
msgid "Touchpad mode disabled."
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (inga skalering)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (inga skalering)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Veksle aspekt-korrigering"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Veksle aspekt-korrigering"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Veksle grafikkfiltre"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Teiknemodus:"
@@ -2194,20 +2195,20 @@ msgstr "OpenGL Bevar"
msgid "OpenGL Original"
msgstr "OpenGL Original"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Gjeldende videomodus:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/pl_PL.po b/po/pl_PL.po
index f591d0065a..12d53847f5 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-05-02 12:09+0100\n"
"Last-Translator: \n"
"Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n"
@@ -49,8 +49,8 @@ msgstr "W górê"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -89,7 +89,7 @@ msgstr "Przypisz"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -604,8 +604,9 @@ msgstr "Renderer:"
msgid "Special dithering modes supported by some games"
msgstr "Specjalne tryby ditheringu wspierane przez niektóre gry"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Tryb pe³noekranowy"
@@ -1081,7 +1082,11 @@ msgstr "Nie uda³o siê znale¼æ odpowiedniej wtyczki silnika"
msgid "Engine plugin does not support save states"
msgstr "Silnik nie wspiera zapisu stanu gry"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Nieznany b³±d"
@@ -1103,34 +1108,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Bursztynowy Hercules"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~W~znów"
@@ -1236,6 +1226,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~P~oprzedni"
@@ -1769,14 +1770,14 @@ msgstr "Leæ w prawo"
msgid "Fly to lower right"
msgstr "Leæ w dó³, w prawo"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1787,7 +1788,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1798,7 +1799,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1809,7 +1810,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2176,34 +2177,34 @@ msgstr "Tryb touchpada w³±czony."
msgid "Touchpad mode disabled."
msgstr "Tryb touchpada wy³±czony."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Zwyk³y (bez skalowania)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Zwyk³y (bez skalowania)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "W³±cz/wy³±cz korekcjê formatu obrazu"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "W³±cz/wy³±cz korekcjê formatu obrazu"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Prze³±czaj pomiêdzy filtrami grafiki"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Renderer:"
@@ -2220,20 +2221,20 @@ msgstr "OpenGL - zachow."
msgid "OpenGL Original"
msgstr "OpenGL - pierw."
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Obecny tryb wideo:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po
index a9a0d1412d..2ea8bfe237 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-05-03 19:11-0300\n"
"Last-Translator: Saulo Benigno <saulobenigno@gmail.com>\n"
"Language-Team: ScummBR (www.scummbr.com) <scummbr@yahoo.com.br>\n"
@@ -49,8 +49,8 @@ msgstr "Acima"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -89,7 +89,7 @@ msgstr "Mapear"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -608,8 +608,9 @@ msgstr "Renderização"
msgid "Special dithering modes supported by some games"
msgstr "Modos especiais de dithering suportados por alguns jogos"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Modo Tela Cheia"
@@ -1088,7 +1089,11 @@ msgstr "Não foi possível encontrar engine adequada"
msgid "Engine plugin does not support save states"
msgstr "A engine atual não suporta salvar o progresso do jogo"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Erro desconhecido"
@@ -1110,34 +1115,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules Amber"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~V~oltar ao jogo"
@@ -1243,6 +1233,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~A~nterior"
@@ -1776,14 +1777,14 @@ msgstr "Voar para direita"
msgid "Fly to lower right"
msgstr "Voar para direita inferior"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1794,7 +1795,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1805,7 +1806,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1816,7 +1817,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2184,34 +2185,34 @@ msgstr "Modo Touchpad ligado."
msgid "Touchpad mode disabled."
msgstr "Modo Touchpad desligado."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normal (sem escala)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normal (sem escala)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Habilita correção de proporção"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Habilita correção de proporção"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Alterna entre os filtros gráficos"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Renderização"
@@ -2228,20 +2229,20 @@ msgstr "OpenGL Conserve"
msgid "OpenGL Original"
msgstr "OpenGL Original"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Modo de vídeo atual:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 9600a810ea..27bea4eac2 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2010-06-13 20:55+0300\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Russian\n"
@@ -47,8 +47,8 @@ msgstr "²ÒÕàå"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -87,7 +87,7 @@ msgstr "½Ð×ÝÐçØâì"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -519,7 +519,7 @@ msgstr "¿ÞØáÚ ×ÐÚÞÝçÕÝ!"
#: gui/massadd.cpp:246
#, c-format
msgid "Discovered %d new games, ignored %d previously added games."
-msgstr ""
+msgstr "½ÐÙÔÕÝÞ %d ÝÞÒëå ØÓà, ßàÞßãéÕÝÞ %Ò àÐÝÕÕ ÔÞÑÐÒÛÕÝÝëå ØÓà."
#: gui/massadd.cpp:250
#, c-format
@@ -527,9 +527,9 @@ msgid "Scanned %d directories ..."
msgstr "¿àÞáÜÞâàÕÝÞ %d ÔØàÕÚâÞàØÙ ..."
#: gui/massadd.cpp:253
-#, fuzzy, c-format
+#, c-format
msgid "Discovered %d new games, ignored %d previously added games ..."
-msgstr "½ÐÙÔÕÝÞ %d ÝÞÒëå ØÓà ..."
+msgstr "½ÐÙÔÕÝÞ %d ÝÞÒëå ØÓà, ßàÞßãéÕÝÞ %d àÐÝÕÕ ÔÞÑÐÒÛÕÝÝëå ØÓà ..."
#: gui/options.cpp:72
msgid "Never"
@@ -579,19 +579,19 @@ msgstr "½Õ ×ÐÔÐÝ"
#: gui/options.cpp:372
msgid "Failed to apply some of the graphic options changes:"
-msgstr ""
+msgstr "½Õ ãÔÐÛÞáì ßàØÜÕÝØâì Ø×ÜÕÝÕÝØï ÝÕÚâÞàëå ÓàÐäØçÕáÚØå ÞßæØÙ:"
#: gui/options.cpp:384
msgid "the video mode could not be changed."
-msgstr ""
+msgstr "ÒØÔÕÞàÕÖØÜ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ."
#: gui/options.cpp:390
msgid "the fullscreen setting could not be changed"
-msgstr ""
+msgstr "ßÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ"
#: gui/options.cpp:396
msgid "the aspect ratio setting could not be changed"
-msgstr ""
+msgstr "àÕÖØÜ ÚÞààÕÚâØàÞÒÚØ áÞÞâÝÞèÕÝØï áâÞàÞÝ ÝÕ ÜÞÖÕâ Ñëâì Ø×ÜÕÝñÝ"
#: gui/options.cpp:705
msgid "Graphics mode:"
@@ -605,8 +605,9 @@ msgstr "ÀÕÖØÜ àÐáâàÐ:"
msgid "Special dithering modes supported by some games"
msgstr "ÁßÕæØÐÛìÝëÕ àÕÖØÜë àÕÝÔÕàØÝÓÐ, ßÞÔÔÕàÖØÒÐÕÜëÕ ÝÕÚÞâÞàëÜØ ØÓàÐÜØ"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "¿ÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ"
@@ -903,7 +904,6 @@ msgid "Language of ScummVM GUI"
msgstr "Ï×ëÚ ÓàÐäØçÕáÚÞÓÞ ØÝâÕàäÕÙáÐ ScummVM"
#: gui/options.cpp:1295
-#, fuzzy
msgid "You have to restart ScummVM before your changes will take effect."
msgstr "²ë ÔÞÛÖÝë ßÕàÕ×ÐßãáâØâì ScummVM çâÞÑë ßàØÜÕÝØâì Ø×ÜÕÝÕÝØï."
@@ -1088,7 +1088,11 @@ msgstr "½Õ ÜÞÓã ÝÐÙâØ ßÞÔåÞÔïéØÙ ßÛÐÓØÝ ÔÛï ÔÒØÖÚÐ"
msgid "Engine plugin does not support save states"
msgstr "´ÒØÖÞÚ ÝÕ ßÞÔÔÕàÖØÒÐÕâ áÞåàÐÝÕÝØï"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr "¿àÕàÒÐÝÞ ßÞÛì×ÞÒÐâÕÛÕÜ"
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "½ÕØ×ÒÕáâÝÐï ÞèØÑÚÐ"
@@ -1110,33 +1114,18 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules ÏÝâÐàÝëÙ"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
-msgstr ""
+msgstr "ºÐÖÕâáï, çâÞ ØÓàÐ '%s' Õéñ ÝÕØ×ÒÕáâÝÐ."
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
-msgstr ""
+msgstr "¿ÞÖÐÛãÙáâÐ, ßÕàÕÔÐÙâÕ áÛÕÔãîéØÕ ÔÐÝÝëÕ ÚÞÜÐÝÔÕ ScummVM ÒÜÕáâÕ á ÝÐ×ÒÐÝØÕÜ"
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
-msgstr ""
-
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
+msgstr "ØÓàë, ÚÞâÞàãî Òë ßëâÐÕâÕáì ÔÞÑÐÒØâì, Ø ãÚÐÖØâÕ Õñ ÒÕàáØî, ï×ëÚ Ø â.Ô."
#: engines/dialogs.cpp:84
msgid "~R~esume"
@@ -1192,6 +1181,9 @@ msgid ""
"the README for basic information, and for instructions on how to obtain "
"further assistance."
msgstr ""
+"¿àÞáØÜ ßàÞéÕÝØï, ÝÞ íâÞâ ÔÒØÖÞÕ ßÞÚÐ ÝÕ ßàÕÔÞáâÐÒÛïÕâ ßÞÜÞéØ ÒÝãâàØ ØÓàë. "
+"¿ÞÖÐÛãÙáâÐ, ÞÑàÐâØâÕáì Ò äÐÙÛ README ×Ð ÑÐ×ÞÒÞÙ ØÝäÞàÜÐæØÕÙ, Ð âÐÚÖÕ ØÝáâàãÚæØïÜØ "
+"Þ âÞÜ, ÚÐÚ ßÞÛãçØâì ÔÐÛìÝÕÙèãî ßÞÜÞéì."
#: engines/dialogs.cpp:312 engines/mohawk/dialogs.cpp:100
#: engines/mohawk/dialogs.cpp:152
@@ -1209,21 +1201,19 @@ msgstr "~º~ÛÐÒØèØ"
#: engines/engine.cpp:220
msgid "Could not initialize color format."
-msgstr ""
+msgstr "½Õ ÜÞÓã ØÝØæØÐÛØ×ØàÞÒÐâì äÞàÜÐâ æÒÕâÐ."
#: engines/engine.cpp:228
-#, fuzzy
msgid "Could not switch to video mode: '"
-msgstr "ÂÕÚãéØÙ ÒØÔÕÞàÕÖØÜ:"
+msgstr "½Õ ÜÞÓã ßÕàÕÚÛîçØâì ÒØÔÕÞàÕÖØÜ:"
#: engines/engine.cpp:237
-#, fuzzy
msgid "Could not apply aspect ratio setting."
-msgstr "¿ÕàÕÚÛîçÕÝØÕ ÚÞààÕ򾯯 áÞÞâÝÞèÕÝØï áâÞàÞÝ"
+msgstr "½Õ ãÔÐÛÞáì ØáßÞÛì×ÞÒÐâì ÚÞààÕÚæØî áÞÞâÝÞèÕÝØï áâÞàÞÝ."
#: engines/engine.cpp:242
msgid "Could not apply fullscreen setting."
-msgstr ""
+msgstr "½Õ ÜÞÓã ßàØÜÕÝØâì ßÞÛÝÞíÚàÐÝÝëÙ àÕÖØÜ."
#: engines/engine.cpp:342
msgid ""
@@ -1233,6 +1223,11 @@ msgid ""
"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:353
msgid ""
@@ -1242,6 +1237,26 @@ msgid ""
"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:405
+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:408
+msgid "Start anyway"
+msgstr "²áñ àÐÒÝÞ ×ÐßãáâØâì"
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
@@ -1395,7 +1410,6 @@ msgid " since they may cause crashes"
msgstr " âÐÚ ÚÐÚ ÞÝØ ÜÞÓãâ ßàØÒÕáâØ Ú"
#: engines/scumm/help.cpp:110
-#, fuzzy
msgid " or incorrect game behavior."
msgstr " ÝÕÒÕàÝÞÙ àÐÑÞâÕ ØÓàë."
@@ -1776,14 +1790,16 @@ msgstr "»ÕâÕâì ÒßàÐÒÞ"
msgid "Fly to lower right"
msgstr "»ÕâÕâì ÒßàÐÒÞ-ÒÝØ×"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1794,7 +1810,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1805,7 +1821,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1816,13 +1832,13 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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 ""
-"ÁÕÙçÐá ÔÞÛÖÝÐ ×ÐßãáâØâìáï ØÓàÐ Maniax Mansion. ½Þ ScummVM ßÞÚÐ íâÞ ÝÕ ãÜÕÕâ. "
+"ÁÕÙçÐá ÔÞÛÖÝÐ ×ÐßãáâØâìáï ØÓàÐ Maniac Mansion. ½Þ ScummVM ßÞÚÐ íâÞÓÞ ÝÕ ãÜÕÕâ. "
"ÇâÞÑë áëÓàÐâì, ÝÐÖÜØâÕ '½ÞÒÐï ØÓàÐ' Ò áâÐàâÞÒÞÜ ÜÕÝî ScummVM, Ð ×ÐâÕÜ "
"ÒëÑÕàØâÕ ÔØàÕÚâÞàØî Maniac ÒÝãâàØ ÔØàÕÚâÞàØØ á ØÓàÞÙ Tentacle."
@@ -1836,11 +1852,11 @@ msgstr "¿ÕàÕåÞÔë ÐÚâØÒØàÞÒÐÝë"
#: engines/mohawk/dialogs.cpp:92
msgid "~D~rop Page"
-msgstr ""
+msgstr "²ëÑàÞáØâì áâàÐÝØæã"
#: engines/mohawk/dialogs.cpp:96
msgid "~S~how Map"
-msgstr ""
+msgstr "¿ÞÚÐ×Ðâì ÚÐàâã"
#: engines/mohawk/dialogs.cpp:150
msgid "~W~ater Effect Enabled"
@@ -1857,40 +1873,24 @@ msgstr "²ÞááâÒÝÞÒØâì"
#: engines/agos/animation.cpp:544
#, c-format
msgid "Cutscene file '%s' not found!"
-msgstr ""
+msgstr "ÄÐÙÛ ×ÐáâÐÒÚØ '%s' ÝÕ ÝÐÙÔÕÝ!"
#: engines/gob/inter_playtoons.cpp:256 engines/gob/inter_v2.cpp:1283
#: engines/tinsel/saveload.cpp:468
-#, fuzzy
msgid "Failed to load game state from file."
-msgstr ""
-"½Õ ãÔÐÛÞáì ×ÐÓàãרâì ØÓàã Ø× äÐÙÛÐ:\n"
-"\n"
-"%s"
+msgstr "½Õ ãÔÐÛÞáì ×ÐÓàãרâì áÞåàÐÝñÝÝãî ØÓàã Ø× äÐÙÛÐ."
#: engines/gob/inter_v2.cpp:1353 engines/tinsel/saveload.cpp:546
-#, fuzzy
msgid "Failed to save game state to file."
-msgstr ""
-"½Õ ãÔÐÛÞáì ×ÐߨáÐâì ØÓàã Ò äÐÙÛ:\n"
-"\n"
-"%s"
+msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã Ò äÐÙÛ."
#: engines/gob/inter_v5.cpp:107
-#, fuzzy
msgid "Failed to delete file."
-msgstr ""
-"½Õ ãÔÐÛÞáì ×ÐߨáÐâì ØÓàã Ò äÐÙÛ:\n"
-"\n"
-"%s"
+msgstr "½Õ ãÔÐÛÞáì ãÔÐÛØâì äÐÙÛ."
#: engines/groovie/script.cpp:417
-#, fuzzy
msgid "Failed to save game"
-msgstr ""
-"½Õ ãÔÐÛÞáì ×ÐߨáÐâì ØÓàã Ò äÐÙÛ:\n"
-"\n"
-"%s"
+msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã"
#: engines/kyra/sound_midi.cpp:475
msgid ""
@@ -1900,36 +1900,45 @@ msgid ""
"General MIDI ones. After all it might happen\n"
"that a few tracks will not be correctly played."
msgstr ""
+"ºÐÖÕâáï, Òë ßëâÐÕâÕáì ØáßÞÛì×ÞÒÐâì ãáâàÞÙáâÒÞ\n"
+"General MIDI, ÝÞ íâÐ ØÓàÐ ßÞÔÔÕàÖØÒÐÕâ âÞÛìÚÞ\n"
+"Roland MT32 MIDI. ¼ë ßÞßàÞÑãÕÜ ßÞÔÞÑàÐâì General\n"
+"MIDI ØÝáâàãÜÕÝâë, ßÞåÞÖØÕ ÝÐ Roland MT32, ÝÞ\n"
+"ÜÞÖÕâ âÐÚ ßÞÛãçØâìáï, çâÞ ÝÕÚÞâÞàëÕ âàÕÚØ ÑãÔãâ\n"
+"áëÓàÐÝë ÝÕÒÕàÝÞ."
#: engines/m4/m4_menus.cpp:138
-#, fuzzy
msgid "Save game failed!"
-msgstr "ÁÞåàÐÝØâì ØÓàã:"
+msgstr "½Õ ãÔÐÛÞáì áÞåàÐÝØâì ØÓàã!"
#: engines/sky/compact.cpp:130
msgid ""
"Unable to find \"sky.cpt\" file!\n"
"Please download it from www.scummvm.org"
msgstr ""
+"¾âáãâáâÒãÕâ äÐÙÛ sky.cpt!\n"
+"¿ÞÖÐÛãÙáâÐ, áÚÐçÐÙâÕ ÕÓÞ á www.scummvm.org"
#: engines/sky/compact.cpp:141
msgid ""
"The \"sky.cpt\" file has an incorrect size.\n"
"Please (re)download it from www.scummvm.org"
msgstr ""
+"ÄÐÙÛ sky.cpt ØÜÕÕâ ÝÕÒÕàÝëÙ àÐ×ÜÕà.\n"
+"¿ÞÖÐÛãÙáâÐ, áÚÐçÐÙâÕ ÕÓÞ ×ÐÝÞÒÞ á www.scummvm.org"
#: engines/sword1/animation.cpp:344 engines/sword2/animation.cpp:379
msgid "DXA cutscenes found but ScummVM has been built without zlib support"
-msgstr ""
+msgstr "½ÐÙÔÕÝë ×ÐáâÐÒÚØ Ò äÞàÜÐâÕ DXA, ÝÞ ScummVM ÑëÛ áÞÑàÐÝ ÑÕ× ßÞÔÔÕàÖÚØ zlib"
#: engines/sword1/animation.cpp:354 engines/sword2/animation.cpp:389
msgid "MPEG2 cutscenes are no longer supported"
-msgstr ""
+msgstr "·ÐáâÐÒÚØ Ò äÞàÜÐâÕ MPEG2 ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐîâáï"
#: engines/sword1/animation.cpp:359 engines/sword2/animation.cpp:397
#, c-format
msgid "Cutscene '%s' not found"
-msgstr ""
+msgstr "·ÐáâÐÒÚÐ '%s' ÝÕ ÝÐÙÔÕÝÐ"
#: engines/sword1/control.cpp:863
msgid ""
@@ -1941,6 +1950,12 @@ msgid ""
"Press OK to convert them now, otherwise you will be asked again the next "
"time you start the game.\n"
msgstr ""
+"ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áÞåàÐÝÕÝØï ØÓàë ÁÛÞÜÐÝÝëÙ ¼Õç Ò áâÐàÞÜ äÞàÜÐâÕ.\n"
+"ÁâÐàëÙ äÞàÜÐâ ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐÕâáï, Ø çâÞÑë ×ÐÓàãרâì áÞåàÐÝÕÝØï, ÞÝØ "
+"ÔÞÛÖÝë Ñëâì ßÕàÕÒÕÔÕÝë Ò ÝÞÒëÙ äÞàÜÐâ.\n"
+"\n"
+"½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕÒÕáâØ Øå Ò ÝÞÒëÙ äÞàÜÐâ áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ "
+"íâÞ áÞÞÑéÕÝØÕ ßÞïÒØâáï áÝÞÒÐ ßàØ áÛÕÔãîéÕÜ ×ÐßãáÚÕ ØÓàë."
#: engines/sword1/control.cpp:1232
#, c-format
@@ -1948,18 +1963,20 @@ 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 ""
+msgstr "¾áâÐÒØâì áâÐàÞÕ"
#: engines/sword1/control.cpp:1235
msgid "Keep the new one"
-msgstr ""
+msgstr "ÁÔÕÛÐâì ÝÞÒÞÕ"
#: engines/sword1/logic.cpp:1633
msgid "This is the end of the Broken Sword 1 Demo"
-msgstr ""
+msgstr "ÍâÞ ×ÐÒÕàèÕÝØÕ ÔÕÜÞ ÁÛÞÜÐÝÝÞÓÞ ¼ÕçÐ 1"
#: engines/parallaction/saveload.cpp:133
#, c-format
@@ -1967,16 +1984,16 @@ msgid ""
"Can't save game in slot %i\n"
"\n"
msgstr ""
+"½Õ ÜÞÓã áÞåàÐÝØâì ØÓàã Ò ßÞרæØî %i\n"
+"\n"
#: engines/parallaction/saveload.cpp:211
-#, fuzzy
msgid "Loading game..."
-msgstr "·ÐÓàãרâì ØÓàã:"
+msgstr "·ÐÓàãÖÐî ØÓàã..."
#: engines/parallaction/saveload.cpp:226
-#, fuzzy
msgid "Saving game..."
-msgstr "ÁÞåàÐÝØâì ØÓàã:"
+msgstr "ÁÞåàÐÝïî ØÓàã..."
#: engines/parallaction/saveload.cpp:279
msgid ""
@@ -1987,10 +2004,17 @@ msgid ""
"\n"
"Press OK to convert them now, otherwise you will be asked next time.\n"
msgstr ""
+"ScummVM ÞÑÝÐàãÖØÛ ã ÒÐá áâÐàëÕ áÞåàÐÝÕÝØï ØÓàë Nippon Safes, ÚÞâÞàëÕ ÝÕÞÑåÞÔØÜÞ "
+"ßÕàÕØÜÕÝÞÒÐâì."
+"ÁâÐàëÕ ÝÐ×ÒÐÝØï ÑÞÛìèÕ ÝÕ ßÞÔÔÕàÖØÒÐîâáï, Ø ßÞíâÞÜã Òë ÝÕ áÜÞÖÕâÕ ×ÐÓàãרâì "
+"áÞåàÐÝÕÝØï, ÕáÛØ ÝÕ ßÕàÕØÜÕÝãÕâÕ Øå.\n"
+"\n"
+"½ÐÖÜØâÕ ¾º, çâÞÑë ßÕàÕØÜÕÝÞÒÐâì Øå áÕÙçÐá, Ò ßàÞâØÒÝÞÜ áÛãçÐÕ íâÞ ÖÕ áÞÞÑéÕÝØÕ "
+"ßÞïÒØâáï ßàØ áÛÕÔãîéÕÜ ×ÐßãáÚÕ ØÓàë."
#: engines/parallaction/saveload.cpp:326
msgid "ScummVM successfully converted all your savefiles."
-msgstr ""
+msgstr "ScummVM ãáßÕèÝÞ ßàÕÞÑàÐ×ÞÒÐÛ ÒáÕ ÒÐèØ áÞåàÐÝÕÝØï ØÓà."
#: engines/parallaction/saveload.cpp:328
msgid ""
@@ -1999,6 +2023,10 @@ msgid ""
"\n"
"Please report to the team."
msgstr ""
+"ScummVM ÝÐߨáÐÛ ÝÕáÚÞÛìÚÞ ßàÕÔãßàÕÖÔÕÝØÙ Ò ÞÚÝÞ ÚÞÝáÞÛØ, Ø ÝÕ áÜÞÓ ßàÕÞÑàÐ×ÞÒÐâì "
+"ÒáÕ äÐÙÛë.\n"
+"\n"
+"¿ÞÖÐÛãÙáâÐ, áÞÞÑéØâÕ ÞÑ íâÞÜ ÚÞÜÐÝÔÕ ScummVM."
#: audio/fmopl.cpp:49
msgid "MAME OPL emulator"
@@ -2014,6 +2042,8 @@ msgid ""
"The selected audio device '%s' was not found (e.g. might be turned off or "
"disconnected). Attempting to fall back to the next available device..."
msgstr ""
+"²ëÑàÐÝÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÑëÛÞ ÝÐÙÔÕÝÞ (ÒÞ×ÜÞÖÝÞ ÞÝÞ ÒëÚÛîçÕÝÞ "
+"ØÛØ ÝÕ ßÞÔÚÛîçÕÝÞ). ¿ëâÐîáì ØáßÞÛì×ÞÒÐâì ÔàãÓÞÕ ÔÞáâãßÝÞÕ ãáâàÞÙáâÒÞ..."
#: audio/mididrv.cpp:216
#, c-format
@@ -2021,6 +2051,9 @@ msgid ""
"The selected audio device '%s' cannot be used. See log file for more "
"information. Attempting to fall back to the next available device..."
msgstr ""
+"²ëÑàÐÝÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÜÞÖÕâ Ñëâì ØáßÞÛì×ÞÒÐÝÞ. ÁÜÞâàØâÕ "
+"äÐÙÛ ßàÞâÞÚÞÛÐ ÔÛï ÑÞÛÕÕ ßÞÔàÞÑÝÞÙ ØÝäÞàÜÐæØØ. ¿ëâÐîáì ØáßÞÛì×ÞÒÐâì ÔàãÓÞÕ "
+"ÔÞáâãßÝÞÕ ãáâàÞÙáâÒÞ..."
#: audio/mididrv.cpp:250
#, c-format
@@ -2028,6 +2061,8 @@ msgid ""
"The preferred audio device '%s' was not found (e.g. might be turned off or "
"disconnected). Attempting to fall back to the next available device..."
msgstr ""
+"¿àÕÔßÞçâØâÕÛìÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÑëÛÞ ÝÐÙÔÕÝÞ (ÒÞ×ÜÞÖÝÞ ÞÝÞ ÒëÚÛîçÕÝÞ "
+"ØÛØ ÝÕ ßÞÔÚÛîçÕÝÞ). ¿ëâÐîáì ØáßÞÛì×ÞÒÐâì ÔàãÓÞÕ ÔÞáâãßÝÞÕ ãáâàÞÙáâÒÞ..."
#: audio/mididrv.cpp:265
#, c-format
@@ -2035,6 +2070,9 @@ msgid ""
"The preferred audio device '%s' cannot be used. See log file for more "
"information. Attempting to fall back to the next available device..."
msgstr ""
+"¿àÕÔßÞçâØâÕÛìÝÞÕ ×ÒãÚÞÒÞÕ ãáâàÞÙáâÒÞ '%s' ÝÕ ÜÞÖÕâ Ñëâì ØáßÞÛì×ÞÒÐÝÞ. ÁÜÞâàØâÕ "
+"äÐÙÛ ßàÞâÞÚÞÛÐ ÔÛï ÑÞÛÕÕ ßÞÔàÞÑÝÞÙ ØÝäÞàÜÐæØØ. ¿ëâÐîáì ØáßÞÛì×ÞÒÐâì ÔàãÓÞÕ "
+"ÔÞáâãßÝÞÕ ãáâàÞÙáâÒÞ..."
#: audio/null.h:43
msgid "No music"
@@ -2057,7 +2095,6 @@ msgid "C64 Audio Emulator"
msgstr "ÍÜãÛïâÞà ×ÒãÚÐ C64"
#: audio/softsynth/mt32.cpp:329
-#, fuzzy
msgid "Initializing MT-32 Emulator"
msgstr "½ÐáâàÐØÒÐî íÜãÛïâÞà MT-32"
@@ -2166,14 +2203,12 @@ msgid "Disable power off"
msgstr "·ÐßàÕâØâì ÒëÚÛîçÕÝØÕ"
#: backends/platform/iphone/osys_events.cpp:338
-#, fuzzy
msgid "Mouse-click-and-drag mode enabled."
-msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒÚÛîçÕÝ."
+msgstr "ÀÕÖØÜ ÜëèØ ÝÐÖÐâì-Ø-âïÝãâì ÒÚÛîçÕÝ."
#: backends/platform/iphone/osys_events.cpp:340
-#, fuzzy
msgid "Mouse-click-and-drag mode disabled."
-msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒëÚÛîçÕÝ."
+msgstr "ÀÕÖØÜ ÜëèØ ÝÐÖÐâì-Ø-âïÝãâì ÒëÚÛîçÕÝ."
#: backends/platform/iphone/osys_events.cpp:351
msgid "Touchpad mode enabled."
@@ -2183,37 +2218,33 @@ msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒÚÛîçÕÝ."
msgid "Touchpad mode disabled."
msgstr "ÀÕÖØÜ âÐçßÐÔÐ ÒëÚÛîçÕÝ."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "±Õ× ãÒÕÛØçÕÝØï"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "±Õ× ãÒÕÛØçÕÝØï"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
msgid "Enabled aspect ratio correction"
-msgstr "¿ÕàÕÚÛîçÕÝØÕ ÚÞààÕ򾯯 áÞÞâÝÞèÕÝØï áâÞàÞÝ"
+msgstr "ºÞààÕÚæØï áÞÞâÝÞèÕÝØï áâÞàÞÝ ÒÚÛîçÕÝÐ"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
msgid "Disabled aspect ratio correction"
-msgstr "¿ÕàÕÚÛîçÕÝØÕ ÚÞààÕ򾯯 áÞÞâÝÞèÕÝØï áâÞàÞÝ"
+msgstr "ºÞààÕÚæØï áÞÞâÝÞèÕÝØï áâÞàÞÝ ÒëÚÛîçÕÝÐ"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
msgid "Active graphics filter:"
-msgstr "¿ÕàÕÚÛîçÕÝØÕ ÜÕÖÔã ÓàÐäØçÕáÚØÜØ äØÛìâàÐÜØ"
+msgstr "°ÚâØÒÝëÙ ÓàÐäØçÕáÚØÙ äØÛìâà:"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
-#, fuzzy
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
msgid "Windowed mode"
-msgstr "ÀÕÖØÜ àÐáâàÐ:"
+msgstr "¾ÚÞÝÝëÙ àÕÖØÜ"
#: backends/graphics/opengl/opengl-graphics.cpp:139
msgid "OpenGL Normal"
@@ -2227,22 +2258,21 @@ msgstr "OpenGL á áÞåàÐÝÕÝØÕÜ"
msgid "OpenGL Original"
msgstr "OpenGL Ø×ÝÐçÐÛìÝëÙ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
-#, fuzzy
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
msgid "Current display mode"
-msgstr "ÂÕÚãéØÙ ÒØÔÕÞàÕÖØÜ:"
+msgstr "ÂÕÚãéØÙ ÒØÔÕÞàÕÖØÜ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
-msgstr ""
+msgstr "ÂÕÚãéØÙ ÜÐáèâÐÑ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
-msgstr ""
+msgstr "°ÚâØÒÝëÙ àÕÖØÜ äØÛìâàÐ: »ØÝÕÙÝëÙ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
-msgstr ""
+msgstr "°ÚâØÒÝëÙ àÕÖØÜ äØÛìâàÐ: ±ÛØÖÐÙèØÙ"
#: backends/platform/symbian/src/SymbianActions.cpp:38
#: backends/platform/wince/CEActionsSmartphone.cpp:39
@@ -2435,17 +2465,15 @@ msgid "Network down"
msgstr "ÁÕâì ÒëÚÛîçÕÝÐ"
#: backends/platform/wii/options.cpp:178
-#, fuzzy
msgid "Initializing network"
msgstr "½ÐáâàÐØÒÐî áÕâì"
#: backends/platform/wii/options.cpp:182
-#, fuzzy
msgid "Timeout while initializing network"
msgstr "²àÕÜï ßÞÔÚÛîçÕÝØï Ú áÕâØ ØáâÕÚÛÞ"
#: backends/platform/wii/options.cpp:186
-#, fuzzy, c-format
+#, c-format
msgid "Network not initialized (%d)"
msgstr "ÁÕâì ÝÕ ÝÐáâàÞØÛÐáì (%d)"
@@ -2564,55 +2592,50 @@ msgstr ""
"ØÝÒÕÝâÐàì Ò ØÓàÕ"
#: backends/events/default/default-events.cpp:222
-#, fuzzy
msgid "Do you really want to return to the Launcher?"
-msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ãÔÐÛØâì íâÞ áÞåàÐÝÕÝØÕ?"
+msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ÒÕàÝãâìáï Ò ÓÛÐÒÝÞÕ ÜÕÝî?"
#: backends/events/default/default-events.cpp:222
-#, fuzzy
msgid "Launcher"
-msgstr "ÃÔÐà"
+msgstr "³ÛÐÒÝÞÕ ÜÕÝî"
#: backends/events/default/default-events.cpp:244
-#, fuzzy
msgid "Do you really want to quit?"
-msgstr "²ë åÞâØâÕ ÒëÙâØ?"
+msgstr "²ë ÔÕÙáâÒØâÕÛìÝÞ åÞâØâÕ ÒëÙâØ?"
#: backends/events/gph/gph-events.cpp:366
#: backends/events/gph/gph-events.cpp:409
#: backends/events/openpandora/op-events.cpp:141
msgid "Touchscreen 'Tap Mode' - Left Click"
-msgstr ""
+msgstr "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - »ÕÒëÙ ÚÛØÚ"
#: backends/events/gph/gph-events.cpp:368
#: backends/events/gph/gph-events.cpp:411
#: backends/events/openpandora/op-events.cpp:143
msgid "Touchscreen 'Tap Mode' - Right Click"
-msgstr ""
+msgstr "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - ¿àÐÒëÙ ÚÛØÚ"
#: backends/events/gph/gph-events.cpp:370
#: backends/events/gph/gph-events.cpp:413
#: backends/events/openpandora/op-events.cpp:145
msgid "Touchscreen 'Tap Mode' - Hover (No Click)"
-msgstr ""
+msgstr "ÀÕÖØÜ 'ÚÐáÐÝØÙ' âÐçáÚàØÝÐ - ¿àÞÛñâ (ÑÕ× ÚÛØÚÐ)"
#: backends/events/gph/gph-events.cpp:390
-#, fuzzy
msgid "Maximum Volume"
-msgstr "³àÞÜÚÞáâì"
+msgstr "¼ÐÚáØÜÐÛìÝÐï ÓàÞÜÚÞáâì"
#: backends/events/gph/gph-events.cpp:392
msgid "Increasing Volume"
-msgstr ""
+msgstr "ÃÒÕÛØçÕÝØÕ ÓàÞÜÚÞáâØ"
#: backends/events/gph/gph-events.cpp:398
-#, fuzzy
msgid "Minimal Volume"
-msgstr "³àÞÜÚÞáâì"
+msgstr "¼ØÝØÜÐÛìÝÐï ÓàÞÜÚÞáâì"
#: backends/events/gph/gph-events.cpp:400
msgid "Decreasing Volume"
-msgstr ""
+msgstr "ÃÜÕÝìèÕÝØÕ ÓàÞÜÚÞáâØ"
#~ msgid "Discovered %d new games."
#~ msgstr "½ÐÙÔÕÝÞ %d ÝÞÒëå ØÓà."
diff --git a/po/scummvm.pot b/po/scummvm.pot
index 39c80538d8..7abb933cb1 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.4.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+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"
@@ -45,8 +45,8 @@ msgstr ""
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -85,7 +85,7 @@ msgstr ""
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -597,8 +597,9 @@ msgstr ""
msgid "Special dithering modes supported by some games"
msgstr ""
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr ""
@@ -1063,7 +1064,11 @@ msgstr ""
msgid "Engine plugin does not support save states"
msgstr ""
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr ""
@@ -1085,34 +1090,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr ""
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr ""
@@ -1216,6 +1206,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr ""
@@ -1748,14 +1749,14 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1763,7 +1764,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1771,7 +1772,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1779,7 +1780,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2121,31 +2122,31 @@ msgstr ""
msgid "Touchpad mode disabled."
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
msgid "Enabled aspect ratio correction"
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
msgid "Disabled aspect ratio correction"
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
msgid "Active graphics filter:"
msgstr ""
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
msgid "Windowed mode"
msgstr ""
@@ -2161,19 +2162,19 @@ msgstr ""
msgid "OpenGL Original"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
msgid "Current display mode"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/se_SE.po b/po/se_SE.po
index ccb12b159f..7301fd52d1 100644
--- a/po/se_SE.po
+++ b/po/se_SE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-05-02 13:07+0100\n"
"Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n"
"Language-Team: \n"
@@ -50,8 +50,8 @@ msgstr "Uppåt"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -90,7 +90,7 @@ msgstr "Ställ in"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -609,8 +609,9 @@ msgstr "Renderingsläge:"
msgid "Special dithering modes supported by some games"
msgstr "Speciella gitterlägen stödda av vissa spel"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "Fullskärmsläge"
@@ -1089,7 +1090,11 @@ msgstr "Kunde inte hitta lämpligt motortillägg"
msgid "Engine plugin does not support save states"
msgstr "Motorn stöder inte debug-nivå '%s'"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "Okänt fel"
@@ -1111,34 +1116,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Herkules bärnsten"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "~F~ortsätt"
@@ -1244,6 +1234,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~F~öregående"
@@ -1777,14 +1778,14 @@ msgstr "Flyg åt höger"
msgid "Fly to lower right"
msgstr "Flyg åt nedre höger"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1795,7 +1796,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1806,7 +1807,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1817,7 +1818,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2184,34 +2185,34 @@ msgstr "Touchpad-läge aktiverat."
msgid "Touchpad mode disabled."
msgstr "Touchpad-läge inaktiverat."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "Normalt (ingen skalning)"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "Normalt (ingen skalning)"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "Korrektion av bildförhållande på/av"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "Korrektion av bildförhållande på/av"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "Växla grafikfilter"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "Renderingsläge:"
@@ -2228,20 +2229,20 @@ msgstr "OpenGL konservation"
msgid "OpenGL Original"
msgstr "OpenGL original"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "Aktivt videoläge:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/po/uk_UA.po b/po/uk_UA.po
index dfacf84fa7..0d94a6320f 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-06-13 22:20+0100\n"
+"POT-Creation-Date: 2011-06-20 23:09+0100\n"
"PO-Revision-Date: 2011-03-26 22:38+0200\n"
"Last-Translator: Lubomyr Lisen\n"
"Language-Team: Ukrainian\n"
@@ -47,8 +47,8 @@ msgstr "²ÒÕàå"
#: gui/browser.cpp:69 gui/chooser.cpp:45 gui/KeysDialog.cpp:43
#: gui/launcher.cpp:312 gui/massadd.cpp:92 gui/options.cpp:1178
#: gui/saveload.cpp:63 gui/saveload.cpp:155 gui/themebrowser.cpp:54
-#: engines/sword1/control.cpp:865 engines/parallaction/saveload.cpp:281
-#: backends/platform/wii/options.cpp:48
+#: engines/engine.cpp:408 engines/sword1/control.cpp:865
+#: engines/parallaction/saveload.cpp:281 backends/platform/wii/options.cpp:48
#: backends/events/default/default-events.cpp:222
#: backends/events/default/default-events.cpp:244
msgid "Cancel"
@@ -87,7 +87,7 @@ msgstr "¿àØ×ÝÐçØâØ"
#: gui/KeysDialog.cpp:42 gui/launcher.cpp:313 gui/launcher.cpp:936
#: gui/launcher.cpp:940 gui/massadd.cpp:89 gui/options.cpp:1179
-#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1772
+#: engines/engine.cpp:346 engines/engine.cpp:357 engines/scumm/scumm.cpp:1796
#: engines/agos/animation.cpp:545 engines/groovie/script.cpp:417
#: engines/sky/compact.cpp:131 engines/sky/compact.cpp:141
#: engines/sword1/animation.cpp:344 engines/sword1/animation.cpp:354
@@ -604,8 +604,9 @@ msgstr "ÀÕÖØÜ àÐáâàãÒ.:"
msgid "Special dithering modes supported by some games"
msgstr "ÁßÕæöÐÛìÝö àÕÖØÜØ àÐáâàãÒÐÝÝï, ïÚö ßöÔâàØÜãîâì ÔÕïÚö öÓàØ"
-#: gui/options.cpp:726 backends/graphics/sdl/sdl-graphics.cpp:2252
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:456
+#: gui/options.cpp:726
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2252
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:460
msgid "Fullscreen mode"
msgstr "¿ÞÒÝÞÕÚàÐÝÝØÙ àÕÖØÜ"
@@ -1083,7 +1084,11 @@ msgstr "½Õ ÜÞÖã ×ÝÐÙâØ ÝÕÞÑåöÔÕÞÓÞ ÒâãÛÚÐ ÔÛï ÔÒØÖÚÐ."
msgid "Engine plugin does not support save states"
msgstr "´ÒØÖÞÚ ÝÕ ßöÔâàØÜãô àöÒÕÝì ÒöÔÛÐÔÚØ '%s'"
-#: common/error.cpp:72
+#: common/error.cpp:71
+msgid "User canceled"
+msgstr ""
+
+#: common/error.cpp:75
msgid "Unknown error"
msgstr "½ÕÒöÔÞÜÐ ßÞÜØÛÚÐ"
@@ -1105,34 +1110,19 @@ msgctxt "lowres"
msgid "Hercules Amber"
msgstr "Hercules ÏÝâÐàÝØÙ"
-#: engines/advancedDetector.cpp:323
+#: engines/advancedDetector.cpp:296
#, c-format
msgid "The game in '%s' seems to be unknown."
msgstr ""
-#: engines/advancedDetector.cpp:324
+#: engines/advancedDetector.cpp:297
msgid "Please, report the following data to the ScummVM team along with name"
msgstr ""
-#: engines/advancedDetector.cpp:326
+#: engines/advancedDetector.cpp:299
msgid "of the game you tried to add and its version/language/etc.:"
msgstr ""
-#: engines/advancedDetector.cpp:574
-#, c-format
-msgid ""
-"Your game version has been detected using filename matching as a variant of %"
-"s."
-msgstr ""
-
-#: engines/advancedDetector.cpp:577
-msgid "If this is an original and unmodified version, please report any"
-msgstr ""
-
-#: engines/advancedDetector.cpp:579
-msgid "information previously printed by ScummVM to the team."
-msgstr ""
-
#: engines/dialogs.cpp:84
msgid "~R~esume"
msgstr "¿àÞÔÞÒ~Ö~ØâØ"
@@ -1238,6 +1228,17 @@ msgid ""
"See the README file for details."
msgstr ""
+#: engines/engine.cpp:405
+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:408
+msgid "Start anyway"
+msgstr ""
+
#: engines/scumm/dialogs.cpp:281
msgid "~P~revious"
msgstr "~¿~ÞßÕà"
@@ -1771,14 +1772,14 @@ msgstr "»ÕâöâØ ÝÐßàÐÒÞ"
msgid "Fly to lower right"
msgstr "»ÕâöâØ ÔÞÝØ×ã ÝÐßàÐÒÞ"
-#: engines/scumm/scumm.cpp:1770
+#: engines/scumm/scumm.cpp:1794
#, 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:2256 engines/agos/saveload.cpp:190
+#: engines/scumm/scumm.cpp:2280 engines/agos/saveload.cpp:190
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1789,7 +1790,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:155
+#: engines/scumm/scumm.cpp:2287 engines/agos/saveload.cpp:155
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1800,7 +1801,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:198
+#: engines/scumm/scumm.cpp:2299 engines/agos/saveload.cpp:198
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1811,7 +1812,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2490
+#: engines/scumm/scumm.cpp:2514
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' "
@@ -2178,34 +2179,34 @@ msgstr "ÀÕÖØÜ âÐçßÐÔã ãÒöÜÚÝÕÝÞ."
msgid "Touchpad mode disabled."
msgstr "ÀÕÖØÜ âÐçßÐÔã ÒØÜÚÝÕÝÞ."
-#: backends/graphics/sdl/sdl-graphics.cpp:45
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:45
msgid "Normal (no scaling)"
msgstr "±Õ× ×ÑöÛìèÕÝÝï"
-#: backends/graphics/sdl/sdl-graphics.cpp:64
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:64
msgctxt "lowres"
msgid "Normal (no scaling)"
msgstr "±Õ× ×ÑöÛìèÕÝÝï"
-#: backends/graphics/sdl/sdl-graphics.cpp:2137
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:517
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2137
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:521
#, fuzzy
msgid "Enabled aspect ratio correction"
msgstr "ºÞàÕÚæöï áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ"
-#: backends/graphics/sdl/sdl-graphics.cpp:2143
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:522
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2143
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:526
#, fuzzy
msgid "Disabled aspect ratio correction"
msgstr "ºÞàÕÚæöï áßöÒÒöÔÝÞèÕÝÝï áâÞàöÝ"
-#: backends/graphics/sdl/sdl-graphics.cpp:2198
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2198
#, fuzzy
msgid "Active graphics filter:"
msgstr "¿ÕàÕÚÛîçÕÝÝï ÜöÖ ÓàÐäöçÝØÜØ äöÛìâàÐÜØ"
-#: backends/graphics/sdl/sdl-graphics.cpp:2254
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:461
+#: backends/graphics/surfacesdl/surfacesdl-graphics.cpp:2254
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:465
#, fuzzy
msgid "Windowed mode"
msgstr "ÀÕÖØÜ àÐáâàãÒ.:"
@@ -2222,20 +2223,20 @@ msgstr "OpenGL ×ÑÕàÕÖÕÝØÙ"
msgid "OpenGL Original"
msgstr "OpenGL ÞàØÓöÝÐÛìÝØÙ"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:399
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:403
#, fuzzy
msgid "Current display mode"
msgstr "¿ÞâÞçÝØÙ ÒöÔÕÞàÕÖØÜ:"
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:412
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:416
msgid "Current scale"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:542
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:546
msgid "Active filter mode: Linear"
msgstr ""
-#: backends/graphics/openglsdl/openglsdl-graphics.cpp:544
+#: backends/graphics/openglsdl/openglsdl-graphics.cpp:548
msgid "Active filter mode: Nearest"
msgstr ""
diff --git a/ports.mk b/ports.mk
index 15dc7e854b..c537173fc0 100644
--- a/ports.mk
+++ b/ports.mk
@@ -143,6 +143,13 @@ osxsnap: bundle
cp $(srcdir)/COPYRIGHT ./ScummVM-snapshot/Copyright\ Holders
cp $(srcdir)/NEWS ./ScummVM-snapshot/News
cp $(srcdir)/README ./ScummVM-snapshot/ScummVM\ ReadMe
+ mkdir ScummVM-snapshot/doc
+ cp $(srcdir)/doc/QuickStart ./ScummVM-snapshot/doc/QuickStart
+ mkdir ScummVM-snapshot/doc/de
+ cp $(srcdir)/doc/de/Liesmich ./ScummVM-snapshot/doc/de/Liesmich
+ cp $(srcdir)/doc/de/Schnellstart ./ScummVM-snapshot/doc/de/Schnellstart
+ mkdir ScummVM-snapshot/doc/fr
+ cp $(srcdir)/doc/fr/QuickStart_fr ./ScummVM-snapshot/doc/fr/QuickStart_fr
/Developer/Tools/SetFile -t ttro -c ttxt ./ScummVM-snapshot/*
/Developer/Tools/CpMac -r $(bundle_name) ./ScummVM-snapshot/
cp $(srcdir)/dists/macosx/DS_Store ./ScummVM-snapshot/.DS_Store
@@ -162,39 +169,43 @@ osxsnap: bundle
scummvmwinres.o: $(srcdir)/icons/scummvm.ico $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(srcdir)/dists/scummvm.rc
$(QUIET_WINDRES)$(WINDRES) -DHAVE_CONFIG_H $(WINDRESFLAGS) $(DEFINES) -I. -I$(srcdir) $(srcdir)/dists/scummvm.rc scummvmwinres.o
-# Special target to prepare data files for distribution / installer creation
-win32data: $(EXECUTABLE)
- mkdir -p $(srcdir)/$(WIN32PATH)
- cp $(srcdir)/AUTHORS $(srcdir)/$(WIN32PATH)
- cp $(srcdir)/COPYING $(srcdir)/$(WIN32PATH)
- cp $(srcdir)/COPYING.LGPL $(srcdir)/$(WIN32PATH)
- cp $(srcdir)/COPYRIGHT $(srcdir)/$(WIN32PATH)
- cp $(srcdir)/NEWS $(srcdir)/$(WIN32PATH)
- cp $(srcdir)/README $(srcdir)/$(WIN32PATH)
- cp /usr/local/README-SDL.txt $(srcdir)/$(WIN32PATH)/README-SDL
- unix2dos $(srcdir)/$(WIN32PATH)/*.*
- $(STRIP) $(EXECUTABLE) -o $(srcdir)/$(WIN32PATH)/$(EXECUTABLE)
- cp $(DIST_FILES_THEMES) $(srcdir)/$(WIN32PATH)
-ifdef DIST_FILES_ENGINEDATA
- cp $(DIST_FILES_ENGINEDATA) $(srcdir)/$(WIN32PATH)
-endif
- cp /usr/local/bin/SDL.dll $(srcdir)/$(WIN32PATH)
-
# Special target to create a win32 snapshot binary (for Inno Setup)
-win32dist: win32data
- cp $(srcdir)/icons/scummvm.ico $(srcdir)/$(WIN32PATH)
- cp $(srcdir)/dists/win32/ScummVM.iss $(srcdir)/$(WIN32PATH)
- mv $(WIN32PATH)/AUTHORS $(srcdir)/$(WIN32PATH)/AUTHORS.txt
- mv $(WIN32PATH)/COPYING $(srcdir)/$(WIN32PATH)/COPYING.txt
- mv $(WIN32PATH)/COPYING.LGPL $(srcdir)/$(WIN32PATH)/COPYING.LGPL.txt
- mv $(WIN32PATH)/COPYRIGHT $(srcdir)/$(WIN32PATH)/COPYRIGHT.txt
- mv $(WIN32PATH)/NEWS $(srcdir)/$(WIN32PATH)/NEWS.txt
- mv $(WIN32PATH)/README $(srcdir)/$(WIN32PATH)/README.txt
- mv $(WIN32PATH)/README-SDL $(srcdir)/$(WIN32PATH)/README-SDL.txt
+win32dist: $(EXECUTABLE)
+ mkdir -p $(WIN32PATH)
+ mkdir -p $(WIN32PATH)/graphics
+ mkdir -p $(WIN32PATH)/doc
+ mkdir -p $(WIN32PATH)/doc/de
+ mkdir -p $(WIN32PATH)/doc/fr
+ $(STRIP) $(EXECUTABLE) -o $(WIN32PATH)/$(EXECUTABLE)
+ cp $(DIST_FILES_THEMES) $(WIN32PATH)
+ifdef DIST_FILES_ENGINEDATA
+ cp $(DIST_FILES_ENGINEDATA) $(WIN32PATH)
+endif
+ cp $(srcdir)/AUTHORS $(WIN32PATH)/AUTHORS.txt
+ cp $(srcdir)/COPYING $(WIN32PATH)/COPYING.txt
+ cp $(srcdir)/COPYING.LGPL $(WIN32PATH)/COPYING.LGPL.txt
+ cp $(srcdir)/COPYRIGHT $(WIN32PATH)/COPYRIGHT.txt
+ cp $(srcdir)/NEWS $(WIN32PATH)/NEWS.txt
+ cp $(srcdir)/README $(WIN32PATH)/README.txt
+ cp $(srcdir)/doc/QuickStart $(WIN32PATH)/doc/QuickStart.txt
+ cp $(srcdir)/doc/de/Schnellstart $(WIN32PATH)/doc/de/Schnellstart.txt
+ cp $(srcdir)/doc/de/Liesmich $(WIN32PATH)/doc/de/Liesmich.txt
+ cp $(srcdir)/doc/fr/QuickStart_fr $(WIN32PATH)/doc/fr/QuickStart_fr.txt
+ cp /usr/local/README-SDL.txt $(WIN32PATH)
+ cp /usr/local/bin/SDL.dll $(WIN32PATH)
+ cp $(srcdir)/dists/win32/graphics/left.bmp $(WIN32PATH)/graphics
+ cp $(srcdir)/dists/win32/graphics/scummvm-install.ico $(WIN32PATH)/graphics
+ cp $(srcdir)/dists/win32/ScummVM.iss $(WIN32PATH)
+ unix2dos $(WIN32PATH)/*.txt
+ unix2dos $(WIN32PATH)/doc/de/*.txt
+ unix2dos $(WIN32PATH)/doc/fr/*.txt
# Special target to create a win32 NSIS installer
-win32setup: win32data
- makensis -V2 -Dtop_srcdir="../.." -Dtext_dir="../../$(WIN32PATH)" -Dbuild_dir="../../$(WIN32PATH)" $(srcdir)/dists/nsis/scummvm.nsi
+win32setup: $(EXECUTABLE)
+ mkdir -p $(srcdir)/$(STAGINGPATH)
+ $(STRIP) $(EXECUTABLE) -o $(srcdir)/$(STAGINGPATH)/$(EXECUTABLE)
+ cp /usr/local/bin/SDL.dll $(srcdir)/$(STAGINGPATH)
+ makensis -V2 -Dtop_srcdir="../.." -Dstaging_dir="../../$(STAGINGPATH)" -Darch=$(ARCH) $(srcdir)/dists/win32/scummvm.nsi
#
# AmigaOS specific
@@ -211,6 +222,29 @@ ifdef DIST_FILES_ENGINEDATA
endif
cp $(DIST_FILES_DOCS) $(AOS4PATH)
+#
+# PlayStation 3 specific
+#
+ps3pkg: $(EXECUTABLE)
+ $(STRIP) $(EXECUTABLE)
+ sprxlinker $(EXECUTABLE)
+ mkdir -p ps3pkg/USRDIR/data/
+ mkdir -p ps3pkg/USRDIR/doc/
+ mkdir -p ps3pkg/USRDIR/saves/
+ make_self_npdrm "$(EXECUTABLE)" ps3pkg/USRDIR/EBOOT.BIN UP0001-SCUM12000_00-0000000000000000
+ cp $(DIST_FILES_THEMES) ps3pkg/USRDIR/data/
+ifdef DIST_FILES_ENGINEDATA
+ cp $(DIST_FILES_ENGINEDATA) ps3pkg/USRDIR/data/
+endif
+ cp $(DIST_FILES_DOCS) ps3pkg/USRDIR/doc/
+ cp $(srcdir)/dists/ps3/readme-ps3.md ps3pkg/USRDIR/doc/
+ cp $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip ps3pkg/USRDIR/data/
+ cp $(srcdir)/dists/ps3/ICON0.PNG ps3pkg/
+ cp $(srcdir)/dists/ps3/PIC1.PNG ps3pkg/
+ sfo.py -f $(srcdir)/dists/ps3/sfo.xml ps3pkg/PARAM.SFO
+ pkg.py --contentid UP0001-SCUM12000_00-0000000000000000 ps3pkg/ scummvm-ps3.pkg
+ package_finalize scummvm-ps3.pkg
+
# Mark special targets as phony
-.PHONY: deb bundle osxsnap win32dist install uninstall
+.PHONY: deb bundle osxsnap win32dist install uninstall ps3pkg
diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
new file mode 100644
index 0000000000..de716269c9
--- /dev/null
+++ b/video/bink_decoder.cpp
@@ -0,0 +1,1643 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' Bink decoder which is in turn
+// based quite heavily on the Bink decoder found in FFmpeg.
+// Many thanks to Kostya Shishkov for doing the hard work.
+
+#include "audio/decoders/raw.h"
+
+#include "common/util.h"
+#include "common/textconsole.h"
+#include "common/math.h"
+#include "common/stream.h"
+#include "common/file.h"
+#include "common/str.h"
+#include "common/bitstream.h"
+#include "common/huffman.h"
+#include "common/rdft.h"
+#include "common/dct.h"
+#include "common/system.h"
+
+#include "graphics/yuv_to_rgb.h"
+#include "graphics/surface.h"
+
+#include "video/binkdata.h"
+#include "video/bink_decoder.h"
+
+static const uint32 kBIKfID = MKTAG('B', 'I', 'K', 'f');
+static const uint32 kBIKgID = MKTAG('B', 'I', 'K', 'g');
+static const uint32 kBIKhID = MKTAG('B', 'I', 'K', 'h');
+static const uint32 kBIKiID = MKTAG('B', 'I', 'K', 'i');
+
+static const uint32 kVideoFlagAlpha = 0x00100000;
+
+static const uint16 kAudioFlagDCT = 0x1000;
+static const uint16 kAudioFlagStereo = 0x2000;
+
+// Number of bits used to store first DC value in bundle
+static const uint32 kDCStartBits = 11;
+
+namespace Video {
+
+BinkDecoder::VideoFrame::VideoFrame() : bits(0) {
+}
+
+BinkDecoder::VideoFrame::~VideoFrame() {
+ delete bits;
+}
+
+
+BinkDecoder::AudioTrack::AudioTrack() : bits(0), bands(0), rdft(0), dct(0) {
+}
+
+BinkDecoder::AudioTrack::~AudioTrack() {
+ delete bits;
+
+ delete[] bands;
+
+ delete rdft;
+ delete dct;
+}
+
+
+BinkDecoder::BinkDecoder() {
+ _bink = 0;
+ _audioTrack = 0;
+
+ for (int i = 0; i < 16; i++)
+ _huffman[i] = 0;
+
+ for (int i = 0; i < kSourceMAX; i++) {
+ _bundles[i].countLength = 0;
+
+ _bundles[i].huffman.index = 0;
+ for (int j = 0; j < 16; j++)
+ _bundles[i].huffman.symbols[j] = j;
+
+ _bundles[i].data = 0;
+ _bundles[i].dataEnd = 0;
+ _bundles[i].curDec = 0;
+ _bundles[i].curPtr = 0;
+ }
+
+ for (int i = 0; i < 16; i++) {
+ _colHighHuffman[i].index = 0;
+ for (int j = 0; j < 16; j++)
+ _colHighHuffman[i].symbols[j] = j;
+ }
+
+ for (int i = 0; i < 4; i++) {
+ _curPlanes[i] = 0;
+ _oldPlanes[i] = 0;
+ }
+
+ _audioStream = 0;
+ _audioStarted = false;
+}
+
+BinkDecoder::~BinkDecoder() {
+ close();
+}
+
+void BinkDecoder::close() {
+ reset();
+
+ if (_audioStream) {
+ // Stop audio
+ g_system->getMixer()->stopHandle(_audioHandle);
+ _audioStream = 0;
+ }
+
+ _audioStarted = false;
+
+ for (int i = 0; i < 4; i++) {
+ delete[] _curPlanes[i]; _curPlanes[i] = 0;
+ delete[] _oldPlanes[i]; _oldPlanes[i] = 0;
+ }
+
+ deinitBundles();
+
+ for (int i = 0; i < 16; i++) {
+ delete _huffman[i];
+ _huffman[i] = 0;
+ }
+
+ delete _bink; _bink = 0;
+ _surface.free();
+
+ _audioTrack = 0;
+
+ for (int i = 0; i < kSourceMAX; i++) {
+ _bundles[i].countLength = 0;
+
+ _bundles[i].huffman.index = 0;
+ for (int j = 0; j < 16; j++)
+ _bundles[i].huffman.symbols[j] = j;
+
+ _bundles[i].data = 0;
+ _bundles[i].dataEnd = 0;
+ _bundles[i].curDec = 0;
+ _bundles[i].curPtr = 0;
+ }
+
+ for (int i = 0; i < 16; i++) {
+ _colHighHuffman[i].index = 0;
+ for (int j = 0; j < 16; j++)
+ _colHighHuffman[i].symbols[j] = j;
+ }
+
+ _audioTracks.clear();
+ _frames.clear();
+}
+
+uint32 BinkDecoder::getElapsedTime() const {
+ if (_audioStream && g_system->getMixer()->isSoundHandleActive(_audioHandle))
+ return g_system->getMixer()->getSoundElapsedTime(_audioHandle);
+
+ return g_system->getMillis() - _startTime;
+}
+
+const Graphics::Surface *BinkDecoder::decodeNextFrame() {
+ if (endOfVideo())
+ return 0;
+
+ VideoFrame &frame = _frames[_curFrame + 1];
+
+ if (!_bink->seek(frame.offset))
+ error("Bad bink seek");
+
+ uint32 frameSize = frame.size;
+
+ for (uint32 i = 0; i < _audioTracks.size(); i++) {
+ AudioTrack &audio = _audioTracks[i];
+
+ uint32 audioPacketLength = _bink->readUint32LE();
+
+ frameSize -= 4;
+
+ if (frameSize < audioPacketLength)
+ error("Audio packet too big for the frame");
+
+ if (audioPacketLength >= 4) {
+ if (i == _audioTrack) {
+ // Only play one audio track
+
+ // Number of samples in bytes
+ audio.sampleCount = _bink->readUint32LE() / (2 * audio.channels);
+
+ audio.bits = new Common::BitStream32LE(*_bink, (audioPacketLength - 4) * 8);
+
+ audioPacket(audio);
+
+ delete audio.bits;
+ audio.bits = 0;
+
+ } else
+ // Skip the rest
+ _bink->skip(audioPacketLength);
+
+ frameSize -= audioPacketLength;
+ }
+ }
+
+ frame.bits = new Common::BitStream32LE(*_bink, frameSize * 8);
+
+ videoPacket(frame);
+
+ delete frame.bits;
+ frame.bits = 0;
+
+ _curFrame++;
+ if (_curFrame == 0)
+ _startTime = g_system->getMillis();
+
+ if (!_audioStarted && _audioStream) {
+ _audioStarted = true;
+ g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandle, _audioStream);
+ }
+
+ return &_surface;
+}
+
+void BinkDecoder::audioPacket(AudioTrack &audio) {
+ if (!_audioStream)
+ return;
+
+ int outSize = audio.frameLen * audio.channels;
+ while (audio.bits->pos() < audio.bits->size()) {
+ int16 *out = (int16 *)malloc(outSize * 2);
+ memset(out, 0, outSize * 2);
+
+ audioBlock(audio, out);
+
+ byte flags = Audio::FLAG_16BITS;
+ if (audio.outChannels == 2)
+ flags |= Audio::FLAG_STEREO;
+
+#ifdef SCUMM_LITTLE_ENDIAN
+ flags |= Audio::FLAG_LITTLE_ENDIAN;
+#endif
+
+ _audioStream->queueBuffer((byte *)out, audio.blockSize * 2, DisposeAfterUse::YES, flags);
+
+ if (audio.bits->pos() & 0x1F) // next data block starts at a 32-byte boundary
+ audio.bits->skip(32 - (audio.bits->pos() & 0x1F));
+ }
+}
+
+void BinkDecoder::videoPacket(VideoFrame &video) {
+ assert(video.bits);
+
+ if (_hasAlpha) {
+ if (_id == kBIKiID)
+ video.bits->skip(32);
+
+ decodePlane(video, 3, false);
+ }
+
+ if (_id == kBIKiID)
+ video.bits->skip(32);
+
+ for (int i = 0; i < 3; i++) {
+ int planeIdx = ((i == 0) || !_swapPlanes) ? i : (i ^ 3);
+
+ decodePlane(video, planeIdx, i != 0);
+
+ if (video.bits->pos() >= video.bits->size())
+ break;
+ }
+
+ // Convert the YUV data we have to our format
+ // We're ignoring alpha for now
+ assert(_curPlanes[0] && _curPlanes[1] && _curPlanes[2]);
+ Graphics::convertYUV420ToRGB(&_surface, _curPlanes[0], _curPlanes[1], _curPlanes[2],
+ _surface.w, _surface.h, _surface.w, _surface.w >> 1);
+
+ // And swap the planes with the reference planes
+ for (int i = 0; i < 4; i++)
+ SWAP(_curPlanes[i], _oldPlanes[i]);
+}
+
+void BinkDecoder::decodePlane(VideoFrame &video, int planeIdx, bool isChroma) {
+
+ uint32 blockWidth = isChroma ? ((_surface.w + 15) >> 4) : ((_surface.w + 7) >> 3);
+ uint32 blockHeight = isChroma ? ((_surface.h + 15) >> 4) : ((_surface.h + 7) >> 3);
+ uint32 width = isChroma ? (_surface.w >> 1) : _surface.w;
+ uint32 height = isChroma ? (_surface.h >> 1) : _surface.h;
+
+ DecodeContext ctx;
+
+ ctx.video = &video;
+ ctx.planeIdx = planeIdx;
+ ctx.destStart = _curPlanes[planeIdx];
+ ctx.destEnd = _curPlanes[planeIdx] + width * height;
+ ctx.prevStart = _oldPlanes[planeIdx];
+ ctx.prevEnd = _oldPlanes[planeIdx] + width * height;
+ ctx.pitch = width;
+
+ for (int i = 0; i < 64; i++) {
+ ctx.coordMap[i] = (i & 7) + (i >> 3) * ctx.pitch;
+
+ ctx.coordScaledMap1[i] = ((i & 7) * 2 + 0) + (((i >> 3) * 2 + 0) * ctx.pitch);
+ ctx.coordScaledMap2[i] = ((i & 7) * 2 + 1) + (((i >> 3) * 2 + 0) * ctx.pitch);
+ ctx.coordScaledMap3[i] = ((i & 7) * 2 + 0) + (((i >> 3) * 2 + 1) * ctx.pitch);
+ ctx.coordScaledMap4[i] = ((i & 7) * 2 + 1) + (((i >> 3) * 2 + 1) * ctx.pitch);
+ }
+
+ for (int i = 0; i < kSourceMAX; i++) {
+ _bundles[i].countLength = _bundles[i].countLengths[isChroma ? 1 : 0];
+
+ readBundle(video, (Source) i);
+ }
+
+ for (ctx.blockY = 0; ctx.blockY < blockHeight; ctx.blockY++) {
+ readBlockTypes (video, _bundles[kSourceBlockTypes]);
+ readBlockTypes (video, _bundles[kSourceSubBlockTypes]);
+ readColors (video, _bundles[kSourceColors]);
+ readPatterns (video, _bundles[kSourcePattern]);
+ readMotionValues(video, _bundles[kSourceXOff]);
+ readMotionValues(video, _bundles[kSourceYOff]);
+ readDCS (video, _bundles[kSourceIntraDC], kDCStartBits, false);
+ readDCS (video, _bundles[kSourceInterDC], kDCStartBits, true);
+ readRuns (video, _bundles[kSourceRun]);
+
+ ctx.dest = ctx.destStart + 8 * ctx.blockY * ctx.pitch;
+ ctx.prev = ctx.prevStart + 8 * ctx.blockY * ctx.pitch;
+
+ for (ctx.blockX = 0; ctx.blockX < blockWidth; ctx.blockX++, ctx.dest += 8, ctx.prev += 8) {
+ BlockType blockType = (BlockType) getBundleValue(kSourceBlockTypes);
+
+ // 16x16 block type on odd line means part of the already decoded block, so skip it
+ if ((ctx.blockY & 1) && (blockType == kBlockScaled)) {
+ ctx.blockX += 1;
+ ctx.dest += 8;
+ ctx.prev += 8;
+ continue;
+ }
+
+ switch (blockType) {
+ case kBlockSkip:
+ blockSkip(ctx);
+ break;
+
+ case kBlockScaled:
+ blockScaled(ctx);
+ break;
+
+ case kBlockMotion:
+ blockMotion(ctx);
+ break;
+
+ case kBlockRun:
+ blockRun(ctx);
+ break;
+
+ case kBlockResidue:
+ blockResidue(ctx);
+ break;
+
+ case kBlockIntra:
+ blockIntra(ctx);
+ break;
+
+ case kBlockFill:
+ blockFill(ctx);
+ break;
+
+ case kBlockInter:
+ blockInter(ctx);
+ break;
+
+ case kBlockPattern:
+ blockPattern(ctx);
+ break;
+
+ case kBlockRaw:
+ blockRaw(ctx);
+ break;
+
+ default:
+ error("Unknown block type: %d", blockType);
+ }
+
+ }
+
+ }
+
+ if (video.bits->pos() & 0x1F) // next plane data starts at 32-bit boundary
+ video.bits->skip(32 - (video.bits->pos() & 0x1F));
+
+}
+
+void BinkDecoder::readBundle(VideoFrame &video, Source source) {
+ if (source == kSourceColors) {
+ for (int i = 0; i < 16; i++)
+ readHuffman(video, _colHighHuffman[i]);
+
+ _colLastVal = 0;
+ }
+
+ if ((source != kSourceIntraDC) && (source != kSourceInterDC))
+ readHuffman(video, _bundles[source].huffman);
+
+ _bundles[source].curDec = _bundles[source].data;
+ _bundles[source].curPtr = _bundles[source].data;
+}
+
+void BinkDecoder::readHuffman(VideoFrame &video, Huffman &huffman) {
+ huffman.index = video.bits->getBits(4);
+
+ if (huffman.index == 0) {
+ // The first tree always gives raw nibbles
+
+ for (int i = 0; i < 16; i++)
+ huffman.symbols[i] = i;
+
+ return;
+ }
+
+ byte hasSymbol[16];
+
+ if (video.bits->getBit()) {
+ // Symbol selection
+
+ memset(hasSymbol, 0, 16);
+
+ uint8 length = video.bits->getBits(3);
+ for (int i = 0; i <= length; i++) {
+ huffman.symbols[i] = video.bits->getBits(4);
+ hasSymbol[huffman.symbols[i]] = 1;
+ }
+
+ for (int i = 0; i < 16; i++)
+ if (hasSymbol[i] == 0)
+ huffman.symbols[++length] = i;
+
+ return;
+ }
+
+ // Symbol shuffling
+
+ byte tmp1[16], tmp2[16];
+ byte *in = tmp1, *out = tmp2;
+
+ uint8 depth = video.bits->getBits(2);
+
+ for (int i = 0; i < 16; i++)
+ in[i] = i;
+
+ for (int i = 0; i <= depth; i++) {
+ int size = 1 << i;
+
+ for (int j = 0; j < 16; j += (size << 1))
+ mergeHuffmanSymbols(video, out + j, in + j, size);
+
+ SWAP(in, out);
+ }
+
+ memcpy(huffman.symbols, in, 16);
+}
+
+void BinkDecoder::mergeHuffmanSymbols(VideoFrame &video, byte *dst, const byte *src, int size) {
+ const byte *src2 = src + size;
+ int size2 = size;
+
+ do {
+ if (!video.bits->getBit()) {
+ *dst++ = *src++;
+ size--;
+ } else {
+ *dst++ = *src2++;
+ size2--;
+ }
+
+ } while (size && size2);
+
+ while (size--)
+ *dst++ = *src++;
+ while (size2--)
+ *dst++ = *src2++;
+}
+
+bool BinkDecoder::loadStream(Common::SeekableReadStream *stream) {
+ close();
+
+ _id = stream->readUint32BE();
+ if ((_id != kBIKfID) && (_id != kBIKgID) && (_id != kBIKhID) && (_id != kBIKiID))
+ return false;
+
+ uint32 fileSize = stream->readUint32LE() + 8;
+ uint32 frameCount = stream->readUint32LE();
+ uint32 largestFrameSize = stream->readUint32LE();
+
+ if (largestFrameSize > fileSize) {
+ warning("Largest frame size greater than file size");
+ return false;
+ }
+
+ stream->skip(4);
+
+ uint32 width = stream->readUint32LE();
+ uint32 height = stream->readUint32LE();
+
+ uint32 frameRateNum = stream->readUint32LE();
+ uint32 frameRateDen = stream->readUint32LE();
+ if (frameRateNum == 0 || frameRateDen == 0) {
+ warning("Invalid frame rate (%d/%d)", frameRateNum, frameRateDen);
+ return false;
+ }
+
+ _frameRate = Common::Rational(frameRateNum, frameRateDen);
+ _bink = stream;
+
+ _videoFlags = _bink->readUint32LE();
+
+ uint32 audioTrackCount = _bink->readUint32LE();
+
+ if (audioTrackCount > 1) {
+ warning("More than one audio track found. Using the first one");
+
+ _audioTrack = 0;
+ }
+
+ if (audioTrackCount > 0) {
+ _audioTracks.reserve(audioTrackCount);
+
+ _bink->skip(4 * audioTrackCount);
+
+ // Reading audio track properties
+ for (uint32 i = 0; i < audioTrackCount; i++) {
+ AudioTrack track;
+
+ track.sampleRate = _bink->readUint16LE();
+ track.flags = _bink->readUint16LE();
+
+ _audioTracks.push_back(track);
+
+ initAudioTrack(_audioTracks[i]);
+ }
+
+ _bink->skip(4 * audioTrackCount);
+ }
+
+ // Reading video frame properties
+ _frames.resize(frameCount);
+ for (uint32 i = 0; i < frameCount; i++) {
+ _frames[i].offset = _bink->readUint32LE();
+ _frames[i].keyFrame = _frames[i].offset & 1;
+
+ _frames[i].offset &= ~1;
+
+ if (i != 0)
+ _frames[i - 1].size = _frames[i].offset - _frames[i - 1].offset;
+
+ _frames[i].bits = 0;
+ }
+
+ _frames[frameCount - 1].size = _bink->size() - _frames[frameCount - 1].offset;
+
+ _hasAlpha = _videoFlags & kVideoFlagAlpha;
+ _swapPlanes = (_id == kBIKhID) || (_id == kBIKiID); // BIKh and BIKi swap the chroma planes
+
+ Graphics::PixelFormat format = g_system->getScreenFormat();
+ _surface.create(width, height, format);
+
+ // Give the planes a bit extra space
+ width = _surface.w + 32;
+ height = _surface.h + 32;
+
+ _curPlanes[0] = new byte[ width * height ]; // Y
+ _curPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution
+ _curPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution
+ _curPlanes[3] = new byte[ width * height ]; // A
+ _oldPlanes[0] = new byte[ width * height ]; // Y
+ _oldPlanes[1] = new byte[(width >> 1) * (height >> 1)]; // U, 1/4 resolution
+ _oldPlanes[2] = new byte[(width >> 1) * (height >> 1)]; // V, 1/4 resolution
+ _oldPlanes[3] = new byte[ width * height ]; // A
+
+ // Initialize the video with solid black
+ memset(_curPlanes[0], 0, width * height );
+ memset(_curPlanes[1], 0, (width >> 1) * (height >> 1));
+ memset(_curPlanes[2], 0, (width >> 1) * (height >> 1));
+ memset(_curPlanes[3], 255, width * height );
+ memset(_oldPlanes[0], 0, width * height );
+ memset(_oldPlanes[1], 0, (width >> 1) * (height >> 1));
+ memset(_oldPlanes[2], 0, (width >> 1) * (height >> 1));
+ memset(_oldPlanes[3], 255, width * height );
+
+ initBundles();
+ initHuffman();
+
+ if (_audioTrack < _audioTracks.size()) {
+ const AudioTrack &audio = _audioTracks[_audioTrack];
+
+ _audioStream = Audio::makeQueuingAudioStream(audio.outSampleRate, audio.outChannels == 2);
+ }
+
+ return true;
+}
+
+void BinkDecoder::initAudioTrack(AudioTrack &audio) {
+ audio.sampleCount = 0;
+ audio.bits = 0;
+
+ audio.channels = ((audio.flags & kAudioFlagStereo) != 0) ? 2 : 1;
+ audio.codec = ((audio.flags & kAudioFlagDCT ) != 0) ? kAudioCodecDCT : kAudioCodecRDFT;
+
+ if (audio.channels > kAudioChannelsMax)
+ error("Too many audio channels: %d", audio.channels);
+
+ uint32 frameLenBits;
+ // Calculate frame length
+ if (audio.sampleRate < 22050)
+ frameLenBits = 9;
+ else if(audio.sampleRate < 44100)
+ frameLenBits = 10;
+ else
+ frameLenBits = 11;
+
+ audio.frameLen = 1 << frameLenBits;
+
+ audio.outSampleRate = audio.sampleRate;
+ audio.outChannels = audio.channels;
+
+ if (audio.codec == kAudioCodecRDFT) {
+ // RDFT audio already interleaves the samples correctly
+
+ if (audio.channels == 2)
+ frameLenBits++;
+
+ audio.sampleRate *= audio.channels;
+ audio.frameLen *= audio.channels;
+ audio.channels = 1;
+ }
+
+ audio.overlapLen = audio.frameLen / 16;
+ audio.blockSize = (audio.frameLen - audio.overlapLen) * audio.channels;
+ audio.root = 2.0 / sqrt((double)audio.frameLen);
+
+ uint32 sampleRateHalf = (audio.sampleRate + 1) / 2;
+
+ // Calculate number of bands
+ for (audio.bandCount = 1; audio.bandCount < 25; audio.bandCount++)
+ if (sampleRateHalf <= binkCriticalFreqs[audio.bandCount - 1])
+ break;
+
+ audio.bands = new uint32[audio.bandCount + 1];
+
+ // Populate bands
+ audio.bands[0] = 1;
+ for (uint32 i = 1; i < audio.bandCount; i++)
+ audio.bands[i] = binkCriticalFreqs[i - 1] * (audio.frameLen / 2) / sampleRateHalf;
+ audio.bands[audio.bandCount] = audio.frameLen / 2;
+
+ audio.first = true;
+
+ for (uint8 i = 0; i < audio.channels; i++)
+ audio.coeffsPtr[i] = audio.coeffs + i * audio.frameLen;
+
+ audio.codec = ((audio.flags & kAudioFlagDCT) != 0) ? kAudioCodecDCT : kAudioCodecRDFT;
+
+ if (audio.codec == kAudioCodecRDFT)
+ audio.rdft = new Common::RDFT(frameLenBits, Common::RDFT::DFT_C2R);
+ else if (audio.codec == kAudioCodecDCT)
+ audio.dct = new Common::DCT(frameLenBits, Common::DCT::DCT_III);
+}
+
+void BinkDecoder::initBundles() {
+ uint32 bw = (_surface.w + 7) >> 3;
+ uint32 bh = (_surface.h + 7) >> 3;
+ uint32 blocks = bw * bh;
+
+ for (int i = 0; i < kSourceMAX; i++) {
+ _bundles[i].data = new byte[blocks * 64];
+ _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 };
+
+ // Calculate the lengths of an element count in bits
+ for (int i = 0; i < 2; i++) {
+ int width = MAX<uint32>(cw[i], 8);
+
+ _bundles[kSourceBlockTypes ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceSubBlockTypes].countLengths[i] = Common::intLog2((width >> 4) + 511) + 1;
+ _bundles[kSourceColors ].countLengths[i] = Common::intLog2((width >> 3)*64 + 511) + 1;
+ _bundles[kSourceIntraDC ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceInterDC ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceXOff ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourceYOff ].countLengths[i] = Common::intLog2((width >> 3) + 511) + 1;
+ _bundles[kSourcePattern ].countLengths[i] = Common::intLog2((cbw[i] << 3) + 511) + 1;
+ _bundles[kSourceRun ].countLengths[i] = Common::intLog2((width >> 3)*48 + 511) + 1;
+ }
+}
+
+void BinkDecoder::deinitBundles() {
+ for (int i = 0; i < kSourceMAX; i++)
+ delete[] _bundles[i].data;
+}
+
+void BinkDecoder::initHuffman() {
+ for (int i = 0; i < 16; i++)
+ _huffman[i] = new Common::Huffman(binkHuffmanLengths[i][15], 16, binkHuffmanCodes[i], binkHuffmanLengths[i]);
+}
+
+byte BinkDecoder::getHuffmanSymbol(VideoFrame &video, Huffman &huffman) {
+ return huffman.symbols[_huffman[huffman.index]->getSymbol(*video.bits)];
+}
+
+int32 BinkDecoder::getBundleValue(Source source) {
+ if ((source < kSourceXOff) || (source == kSourceRun))
+ return *_bundles[source].curPtr++;
+
+ if ((source == kSourceXOff) || (source == kSourceYOff))
+ return (int8) *_bundles[source].curPtr++;
+
+ int16 ret = *((int16 *) _bundles[source].curPtr);
+
+ _bundles[source].curPtr += 2;
+
+ return ret;
+}
+
+uint32 BinkDecoder::readBundleCount(VideoFrame &video, Bundle &bundle) {
+ if (!bundle.curDec || (bundle.curDec > bundle.curPtr))
+ return 0;
+
+ uint32 n = video.bits->getBits(bundle.countLength);
+ if (n == 0)
+ bundle.curDec = 0;
+
+ return n;
+}
+
+void BinkDecoder::blockSkip(DecodeContext &ctx) {
+ byte *dest = ctx.dest;
+ byte *prev = ctx.prev;
+
+ for (int j = 0; j < 8; j++, dest += ctx.pitch, prev += ctx.pitch)
+ memcpy(dest, prev, 8);
+}
+
+void BinkDecoder::blockScaledSkip(DecodeContext &ctx) {
+ byte *dest = ctx.dest;
+ byte *prev = ctx.prev;
+
+ for (int j = 0; j < 16; j++, dest += ctx.pitch, prev += ctx.pitch)
+ memcpy(dest, prev, 16);
+}
+
+void BinkDecoder::blockScaledRun(DecodeContext &ctx) {
+ const uint8 *scan = binkPatterns[ctx.video->bits->getBits(4)];
+
+ int i = 0;
+ do {
+ int run = getBundleValue(kSourceRun) + 1;
+
+ i += run;
+ if (i > 64)
+ error("Run went out of bounds");
+
+ if (ctx.video->bits->getBit()) {
+
+ byte v = getBundleValue(kSourceColors);
+ for (int j = 0; j < run; j++, scan++)
+ ctx.dest[ctx.coordScaledMap1[*scan]] =
+ ctx.dest[ctx.coordScaledMap2[*scan]] =
+ ctx.dest[ctx.coordScaledMap3[*scan]] =
+ ctx.dest[ctx.coordScaledMap4[*scan]] = v;
+
+ } else
+ for (int j = 0; j < run; j++, scan++)
+ ctx.dest[ctx.coordScaledMap1[*scan]] =
+ ctx.dest[ctx.coordScaledMap2[*scan]] =
+ ctx.dest[ctx.coordScaledMap3[*scan]] =
+ ctx.dest[ctx.coordScaledMap4[*scan]] = getBundleValue(kSourceColors);
+
+ } while (i < 63);
+
+ if (i == 63)
+ ctx.dest[ctx.coordScaledMap1[*scan]] =
+ ctx.dest[ctx.coordScaledMap2[*scan]] =
+ ctx.dest[ctx.coordScaledMap3[*scan]] =
+ ctx.dest[ctx.coordScaledMap4[*scan]] = getBundleValue(kSourceColors);
+}
+
+void BinkDecoder::blockScaledIntra(DecodeContext &ctx) {
+ int16 block[64];
+ memset(block, 0, 64 * sizeof(int16));
+
+ block[0] = getBundleValue(kSourceIntraDC);
+
+ readDCTCoeffs(*ctx.video, block, true);
+
+ IDCT(block);
+
+ int16 *src = block;
+ byte *dest1 = ctx.dest;
+ byte *dest2 = ctx.dest + ctx.pitch;
+ for (int j = 0; j < 8; j++, dest1 += (ctx.pitch << 1) - 16, dest2 += (ctx.pitch << 1) - 16, src += 8) {
+
+ for (int i = 0; i < 8; i++, dest1 += 2, dest2 += 2)
+ dest1[0] = dest1[1] = dest2[0] = dest2[1] = src[i];
+
+ }
+}
+
+void BinkDecoder::blockScaledFill(DecodeContext &ctx) {
+ byte v = getBundleValue(kSourceColors);
+
+ byte *dest = ctx.dest;
+ for (int i = 0; i < 16; i++, dest += ctx.pitch)
+ memset(dest, v, 16);
+}
+
+void BinkDecoder::blockScaledPattern(DecodeContext &ctx) {
+ byte col[2];
+
+ for (int i = 0; i < 2; i++)
+ col[i] = getBundleValue(kSourceColors);
+
+ byte *dest1 = ctx.dest;
+ byte *dest2 = ctx.dest + ctx.pitch;
+ for (int j = 0; j < 8; j++, dest1 += (ctx.pitch << 1) - 16, dest2 += (ctx.pitch << 1) - 16) {
+ byte v = getBundleValue(kSourcePattern);
+
+ for (int i = 0; i < 8; i++, dest1 += 2, dest2 += 2, v >>= 1)
+ dest1[0] = dest1[1] = dest2[0] = dest2[1] = col[v & 1];
+ }
+}
+
+void BinkDecoder::blockScaledRaw(DecodeContext &ctx) {
+ byte row[8];
+
+ byte *dest1 = ctx.dest;
+ byte *dest2 = ctx.dest + ctx.pitch;
+ for (int j = 0; j < 8; j++, dest1 += (ctx.pitch << 1) - 16, dest2 += (ctx.pitch << 1) - 16) {
+ memcpy(row, _bundles[kSourceColors].curPtr, 8);
+
+ for (int i = 0; i < 8; i++, dest1 += 2, dest2 += 2)
+ dest1[0] = dest1[1] = dest2[0] = dest2[1] = row[i];
+
+ _bundles[kSourceColors].curPtr += 8;
+ }
+}
+
+void BinkDecoder::blockScaled(DecodeContext &ctx) {
+ BlockType blockType = (BlockType) getBundleValue(kSourceSubBlockTypes);
+
+ switch (blockType) {
+ case kBlockRun:
+ blockScaledRun(ctx);
+ break;
+
+ case kBlockIntra:
+ blockScaledIntra(ctx);
+ break;
+
+ case kBlockFill:
+ blockScaledFill(ctx);
+ break;
+
+ case kBlockPattern:
+ blockScaledPattern(ctx);
+ break;
+
+ case kBlockRaw:
+ blockScaledRaw(ctx);
+ break;
+
+ default:
+ error("Invalid 16x16 block type: %d", blockType);
+ }
+
+ ctx.blockX += 1;
+ ctx.dest += 8;
+ ctx.prev += 8;
+}
+
+void BinkDecoder::blockMotion(DecodeContext &ctx) {
+ int8 xOff = getBundleValue(kSourceXOff);
+ int8 yOff = getBundleValue(kSourceYOff);
+
+ byte *dest = ctx.dest;
+ byte *prev = ctx.prev + yOff * ((int32) ctx.pitch) + xOff;
+ if ((prev < ctx.prevStart) || (prev > ctx.prevEnd))
+ error("Copy out of bounds (%d | %d)", ctx.blockX * 8 + xOff, ctx.blockY * 8 + yOff);
+
+ for (int j = 0; j < 8; j++, dest += ctx.pitch, prev += ctx.pitch)
+ memcpy(dest, prev, 8);
+}
+
+void BinkDecoder::blockRun(DecodeContext &ctx) {
+ const uint8 *scan = binkPatterns[ctx.video->bits->getBits(4)];
+
+ int i = 0;
+ do {
+ int run = getBundleValue(kSourceRun) + 1;
+
+ i += run;
+ if (i > 64)
+ error("Run went out of bounds");
+
+ if (ctx.video->bits->getBit()) {
+
+ byte v = getBundleValue(kSourceColors);
+ for (int j = 0; j < run; j++)
+ ctx.dest[ctx.coordMap[*scan++]] = v;
+
+ } else
+ for (int j = 0; j < run; j++)
+ ctx.dest[ctx.coordMap[*scan++]] = getBundleValue(kSourceColors);
+
+ } while (i < 63);
+
+ if (i == 63)
+ ctx.dest[ctx.coordMap[*scan++]] = getBundleValue(kSourceColors);
+}
+
+void BinkDecoder::blockResidue(DecodeContext &ctx) {
+ blockMotion(ctx);
+
+ byte v = ctx.video->bits->getBits(7);
+
+ int16 block[64];
+ memset(block, 0, 64 * sizeof(int16));
+
+ readResidue(*ctx.video, block, v);
+
+ byte *dst = ctx.dest;
+ int16 *src = block;
+ for (int i = 0; i < 8; i++, dst += ctx.pitch, src += 8)
+ for (int j = 0; j < 8; j++)
+ dst[j] += src[j];
+}
+
+void BinkDecoder::blockIntra(DecodeContext &ctx) {
+ int16 block[64];
+ memset(block, 0, 64 * sizeof(int16));
+
+ block[0] = getBundleValue(kSourceIntraDC);
+
+ readDCTCoeffs(*ctx.video, block, true);
+
+ IDCTPut(ctx, block);
+}
+
+void BinkDecoder::blockFill(DecodeContext &ctx) {
+ byte v = getBundleValue(kSourceColors);
+
+ byte *dest = ctx.dest;
+ for (int i = 0; i < 8; i++, dest += ctx.pitch)
+ memset(dest, v, 8);
+}
+
+void BinkDecoder::blockInter(DecodeContext &ctx) {
+ blockMotion(ctx);
+
+ int16 block[64];
+ memset(block, 0, 64 * sizeof(int16));
+
+ block[0] = getBundleValue(kSourceInterDC);
+
+ readDCTCoeffs(*ctx.video, block, false);
+
+ IDCTAdd(ctx, block);
+}
+
+void BinkDecoder::blockPattern(DecodeContext &ctx) {
+ byte col[2];
+
+ for (int i = 0; i < 2; i++)
+ col[i] = getBundleValue(kSourceColors);
+
+ byte *dest = ctx.dest;
+ for (int i = 0; i < 8; i++, dest += ctx.pitch - 8) {
+ byte v = getBundleValue(kSourcePattern);
+
+ for (int j = 0; j < 8; j++, v >>= 1)
+ *dest++ = col[v & 1];
+ }
+}
+
+void BinkDecoder::blockRaw(DecodeContext &ctx) {
+ byte *dest = ctx.dest;
+ byte *data = _bundles[kSourceColors].curPtr;
+ for (int i = 0; i < 8; i++, dest += ctx.pitch, data += 8)
+ memcpy(dest, data, 8);
+
+ _bundles[kSourceColors].curPtr += 64;
+}
+
+void BinkDecoder::readRuns(VideoFrame &video, Bundle &bundle) {
+ uint32 n = readBundleCount(video, bundle);
+ if (n == 0)
+ return;
+
+ byte *decEnd = bundle.curDec + n;
+ if (decEnd > bundle.dataEnd)
+ error("Run value went out of bounds");
+
+ if (video.bits->getBit()) {
+ byte v = video.bits->getBits(4);
+
+ memset(bundle.curDec, v, n);
+ bundle.curDec += n;
+
+ } else
+ while (bundle.curDec < decEnd)
+ *bundle.curDec++ = getHuffmanSymbol(video, bundle.huffman);
+}
+
+void BinkDecoder::readMotionValues(VideoFrame &video, Bundle &bundle) {
+ uint32 n = readBundleCount(video, bundle);
+ if (n == 0)
+ return;
+
+ byte *decEnd = bundle.curDec + n;
+ if (decEnd > bundle.dataEnd)
+ error("Too many motion values");
+
+ if (video.bits->getBit()) {
+ byte v = video.bits->getBits(4);
+
+ if (v) {
+ int sign = -(int)video.bits->getBit();
+ v = (v ^ sign) - sign;
+ }
+
+ memset(bundle.curDec, v, n);
+
+ bundle.curDec += n;
+ return;
+ }
+
+ do {
+ byte v = getHuffmanSymbol(video, bundle.huffman);
+
+ if (v) {
+ int sign = -(int)video.bits->getBit();
+ v = (v ^ sign) - sign;
+ }
+
+ *bundle.curDec++ = v;
+
+ } while (bundle.curDec < decEnd);
+}
+
+const uint8 rleLens[4] = { 4, 8, 12, 32 };
+void BinkDecoder::readBlockTypes(VideoFrame &video, Bundle &bundle) {
+ uint32 n = readBundleCount(video, bundle);
+ if (n == 0)
+ return;
+
+ byte *decEnd = bundle.curDec + n;
+ if (decEnd > bundle.dataEnd)
+ error("Too many block type values");
+
+ if (video.bits->getBit()) {
+ byte v = video.bits->getBits(4);
+
+ memset(bundle.curDec, v, n);
+
+ bundle.curDec += n;
+ return;
+ }
+
+ byte last = 0;
+ do {
+
+ byte v = getHuffmanSymbol(video, bundle.huffman);
+
+ if (v < 12) {
+ last = v;
+ *bundle.curDec++ = v;
+ } else {
+ int run = rleLens[v - 12];
+
+ memset(bundle.curDec, last, run);
+
+ bundle.curDec += run;
+ }
+
+ } while (bundle.curDec < decEnd);
+}
+
+void BinkDecoder::readPatterns(VideoFrame &video, Bundle &bundle) {
+ uint32 n = readBundleCount(video, bundle);
+ if (n == 0)
+ return;
+
+ byte *decEnd = bundle.curDec + n;
+ if (decEnd > bundle.dataEnd)
+ error("Too many pattern values");
+
+ byte v;
+ while (bundle.curDec < decEnd) {
+ v = getHuffmanSymbol(video, bundle.huffman);
+ v |= getHuffmanSymbol(video, bundle.huffman) << 4;
+ *bundle.curDec++ = v;
+ }
+}
+
+
+void BinkDecoder::readColors(VideoFrame &video, Bundle &bundle) {
+ uint32 n = readBundleCount(video, bundle);
+ if (n == 0)
+ return;
+
+ byte *decEnd = bundle.curDec + n;
+ if (decEnd > bundle.dataEnd)
+ error("Too many color values");
+
+ if (video.bits->getBit()) {
+ _colLastVal = getHuffmanSymbol(video, _colHighHuffman[_colLastVal]);
+
+ byte v;
+ v = getHuffmanSymbol(video, bundle.huffman);
+ v = (_colLastVal << 4) | v;
+
+ if (_id != kBIKiID) {
+ int sign = ((int8) v) >> 7;
+ v = ((v & 0x7F) ^ sign) - sign;
+ v += 0x80;
+ }
+
+ memset(bundle.curDec, v, n);
+ bundle.curDec += n;
+
+ return;
+ }
+
+ while (bundle.curDec < decEnd) {
+ _colLastVal = getHuffmanSymbol(video, _colHighHuffman[_colLastVal]);
+
+ byte v;
+ v = getHuffmanSymbol(video, bundle.huffman);
+ v = (_colLastVal << 4) | v;
+
+ if (_id != kBIKiID) {
+ int sign = ((int8) v) >> 7;
+ v = ((v & 0x7F) ^ sign) - sign;
+ v += 0x80;
+ }
+ *bundle.curDec++ = v;
+ }
+}
+
+void BinkDecoder::readDCS(VideoFrame &video, Bundle &bundle, int startBits, bool hasSign) {
+ uint32 length = readBundleCount(video, bundle);
+ if (length == 0)
+ return;
+
+ int16 *dest = (int16 *) bundle.curDec;
+
+ int32 v = video.bits->getBits(startBits - (hasSign ? 1 : 0));
+ if (v && hasSign) {
+ int sign = -(int)video.bits->getBit();
+ v = (v ^ sign) - sign;
+ }
+
+ *dest++ = v;
+ length--;
+
+ for (uint32 i = 0; i < length; i += 8) {
+ uint32 length2 = MIN<uint32>(length - i, 8);
+
+ byte bSize = video.bits->getBits(4);
+
+ if (bSize) {
+
+ for (uint32 j = 0; j < length2; j++) {
+ int16 v2 = video.bits->getBits(bSize);
+ if (v2) {
+ int sign = -(int)video.bits->getBit();
+ v2 = (v2 ^ sign) - sign;
+ }
+
+ v += v2;
+ *dest++ = v;
+
+ if ((v < -32768) || (v > 32767))
+ error("DC value went out of bounds: %d", v);
+ }
+
+ } else
+ for (uint32 j = 0; j < length2; j++)
+ *dest++ = v;
+ }
+
+ bundle.curDec = (byte *) dest;
+}
+
+/** Reads 8x8 block of DCT coefficients. */
+void BinkDecoder::readDCTCoeffs(VideoFrame &video, int16 *block, bool isIntra) {
+ int coefCount = 0;
+ int coefIdx[64];
+
+ int listStart = 64;
+ int listEnd = 64;
+
+ int coefList[128]; int modeList[128];
+ coefList[listEnd] = 4; modeList[listEnd++] = 0;
+ coefList[listEnd] = 24; modeList[listEnd++] = 0;
+ coefList[listEnd] = 44; modeList[listEnd++] = 0;
+ coefList[listEnd] = 1; modeList[listEnd++] = 3;
+ coefList[listEnd] = 2; modeList[listEnd++] = 3;
+ coefList[listEnd] = 3; modeList[listEnd++] = 3;
+
+ int bits = video.bits->getBits(4) - 1;
+ for (int mask = 1 << bits; bits >= 0; mask >>= 1, bits--) {
+ int listPos = listStart;
+
+ while (listPos < listEnd) {
+
+ if (!(modeList[listPos] | coefList[listPos]) || !video.bits->getBit()) {
+ listPos++;
+ continue;
+ }
+
+ int ccoef = coefList[listPos];
+ int mode = modeList[listPos];
+
+ switch (mode) {
+ case 0:
+ coefList[listPos] = ccoef + 4;
+ modeList[listPos] = 1;
+ case 2:
+ if (mode == 2) {
+ coefList[listPos] = 0;
+ modeList[listPos++] = 0;
+ }
+ for (int i = 0; i < 4; i++, ccoef++) {
+ if (video.bits->getBit()) {
+ coefList[--listStart] = ccoef;
+ modeList[ listStart] = 3;
+ } else {
+ int t;
+ if (!bits) {
+ t = 1 - (video.bits->getBit() << 1);
+ } else {
+ t = video.bits->getBits(bits) | mask;
+
+ int sign = -(int)video.bits->getBit();
+ t = (t ^ sign) - sign;
+ }
+ block[binkScan[ccoef]] = t;
+ coefIdx[coefCount++] = ccoef;
+ }
+ }
+ break;
+
+ case 1:
+ modeList[listPos] = 2;
+ for (int i = 0; i < 3; i++) {
+ ccoef += 4;
+ coefList[listEnd] = ccoef;
+ modeList[listEnd++] = 2;
+ }
+ break;
+
+ case 3:
+ int t;
+ if (!bits) {
+ t = 1 - (video.bits->getBit() << 1);
+ } else {
+ t = video.bits->getBits(bits) | mask;
+
+ int sign = -(int)video.bits->getBit();
+ t = (t ^ sign) - sign;
+ }
+ block[binkScan[ccoef]] = t;
+ coefIdx[coefCount++] = ccoef;
+ coefList[listPos] = 0;
+ modeList[listPos++] = 0;
+ break;
+ }
+ }
+ }
+
+ uint8 quantIdx = video.bits->getBits(4);
+ const uint32 *quant = isIntra ? binkIntraQuant[quantIdx] : binkInterQuant[quantIdx];
+ block[0] = (block[0] * quant[0]) >> 11;
+
+ for (int i = 0; i < coefCount; i++) {
+ int idx = coefIdx[i];
+ block[binkScan[idx]] = (block[binkScan[idx]] * quant[idx]) >> 11;
+ }
+
+}
+
+/** Reads 8x8 block with residue after motion compensation. */
+void BinkDecoder::readResidue(VideoFrame &video, int16 *block, int masksCount) {
+ int nzCoeff[64];
+ int nzCoeffCount = 0;
+
+ int listStart = 64;
+ int listEnd = 64;
+
+ int coefList[128]; int modeList[128];
+ coefList[listEnd] = 4; modeList[listEnd++] = 0;
+ coefList[listEnd] = 24; modeList[listEnd++] = 0;
+ coefList[listEnd] = 44; modeList[listEnd++] = 0;
+ coefList[listEnd] = 0; modeList[listEnd++] = 2;
+
+ for (int mask = 1 << video.bits->getBits(3); mask; mask >>= 1) {
+
+ for (int i = 0; i < nzCoeffCount; i++) {
+ if (!video.bits->getBit())
+ continue;
+ if (block[nzCoeff[i]] < 0)
+ block[nzCoeff[i]] -= mask;
+ else
+ block[nzCoeff[i]] += mask;
+ masksCount--;
+ if (masksCount < 0)
+ return;
+ }
+
+ int listPos = listStart;
+ while (listPos < listEnd) {
+
+ if (!(coefList[listPos] | modeList[listPos]) || !video.bits->getBit()) {
+ listPos++;
+ continue;
+ }
+
+ int ccoef = coefList[listPos];
+ int mode = modeList[listPos];
+
+ switch (mode) {
+ case 0:
+ coefList[listPos] = ccoef + 4;
+ modeList[listPos] = 1;
+ case 2:
+ if (mode == 2) {
+ coefList[listPos] = 0;
+ modeList[listPos++] = 0;
+ }
+
+ for (int i = 0; i < 4; i++, ccoef++) {
+ if (video.bits->getBit()) {
+ coefList[--listStart] = ccoef;
+ modeList[ listStart] = 3;
+ } else {
+ nzCoeff[nzCoeffCount++] = binkScan[ccoef];
+
+ int sign = -(int)video.bits->getBit();
+ block[binkScan[ccoef]] = (mask ^ sign) - sign;
+
+ masksCount--;
+ if (masksCount < 0)
+ return;
+ }
+ }
+ break;
+
+ case 1:
+ modeList[listPos] = 2;
+ for (int i = 0; i < 3; i++) {
+ ccoef += 4;
+ coefList[listEnd] = ccoef;
+ modeList[listEnd++] = 2;
+ }
+ break;
+
+ case 3:
+ nzCoeff[nzCoeffCount++] = binkScan[ccoef];
+
+ int sign = -(int)video.bits->getBit();
+ block[binkScan[ccoef]] = (mask ^ sign) - sign;
+
+ coefList[listPos] = 0;
+ modeList[listPos++] = 0;
+ masksCount--;
+ if (masksCount < 0)
+ return;
+ break;
+ }
+ }
+ }
+}
+
+float BinkDecoder::getFloat(AudioTrack &audio) {
+ int power = audio.bits->getBits(5);
+
+ float f = ldexp((float)audio.bits->getBits(23), power - 23);
+
+ if (audio.bits->getBit())
+ f = -f;
+
+ return f;
+}
+
+void BinkDecoder::audioBlock(AudioTrack &audio, int16 *out) {
+ if (audio.codec == kAudioCodecDCT)
+ audioBlockDCT (audio);
+ else if (audio.codec == kAudioCodecRDFT)
+ audioBlockRDFT(audio);
+
+ for (uint32 i = 0; i < audio.channels; i++)
+ for (uint32 j = 0; j < audio.frameLen; j++)
+ audio.coeffsPtr[i][j] = 385.0 + audio.coeffsPtr[i][j] * (1.0 / 32767.0);
+
+ floatToInt16Interleave(out, const_cast<const float **>(audio.coeffsPtr), audio.frameLen, audio.channels);
+
+ if (!audio.first) {
+ int count = audio.overlapLen * audio.channels;
+ int shift = Common::intLog2(count);
+ for (int i = 0; i < count; i++) {
+ out[i] = (audio.prevCoeffs[i] * (count - i) + out[i] * i) >> shift;
+ }
+ }
+
+ memcpy(audio.prevCoeffs, out + audio.blockSize, audio.overlapLen * audio.channels * sizeof(*out));
+
+ audio.first = false;
+}
+
+void BinkDecoder::audioBlockDCT(AudioTrack &audio) {
+ audio.bits->skip(2);
+
+ for (uint8 i = 0; i < audio.channels; i++) {
+ float *coeffs = audio.coeffsPtr[i];
+
+ readAudioCoeffs(audio, coeffs);
+
+ coeffs[0] /= 0.5;
+
+ audio.dct->calc(coeffs);
+
+ for (uint32 j = 0; j < audio.frameLen; j++)
+ coeffs[j] *= (audio.frameLen / 2.0);
+ }
+
+}
+
+void BinkDecoder::audioBlockRDFT(AudioTrack &audio) {
+ for (uint8 i = 0; i < audio.channels; i++) {
+ float *coeffs = audio.coeffsPtr[i];
+
+ readAudioCoeffs(audio, coeffs);
+
+ audio.rdft->calc(coeffs);
+ }
+}
+
+static const uint8 rleLengthTab[16] = {
+ 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 32, 64
+};
+
+void BinkDecoder::readAudioCoeffs(AudioTrack &audio, float *coeffs) {
+ coeffs[0] = getFloat(audio) * audio.root;
+ coeffs[1] = getFloat(audio) * audio.root;
+
+ float quant[25];
+
+ for (uint32 i = 0; i < audio.bandCount; i++) {
+ int value = audio.bits->getBits(8);
+
+ // 0.066399999 / log10(M_E)
+ quant[i] = exp(MIN(value, 95) * 0.15289164787221953823f) * audio.root;
+ }
+
+ float q = 0.0;
+
+ // Find band (k)
+ int k;
+ for (k = 0; audio.bands[k] < 1; k++)
+ q = quant[k];
+
+ // Parse coefficients
+ uint32 i = 2;
+ while (i < audio.frameLen) {
+
+ uint32 j = 0;
+ if (audio.bits->getBit())
+ j = i + rleLengthTab[audio.bits->getBits(4)] * 8;
+ else
+ j = i + 8;
+
+ j = MIN(j, audio.frameLen);
+
+ int width = audio.bits->getBits(4);
+ if (width == 0) {
+
+ memset(coeffs + i, 0, (j - i) * sizeof(*coeffs));
+ i = j;
+ while (audio.bands[k] * 2 < i)
+ q = quant[k++];
+
+ } else {
+
+ while (i < j) {
+ if (audio.bands[k] * 2 == i)
+ q = quant[k++];
+
+ int coeff = audio.bits->getBits(width);
+ if (coeff) {
+
+ if (audio.bits->getBit())
+ coeffs[i] = -q * coeff;
+ else
+ coeffs[i] = q * coeff;
+
+ } else {
+ coeffs[i] = 0.0;
+ }
+ i++;
+ }
+
+ }
+
+ }
+
+}
+
+static inline int floatToInt16One(const float *src) {
+ int32 tmp = *(const int32 *) src;
+
+ if (tmp & 0xF0000)
+ tmp = (0x43C0FFFF - tmp) >> 31;
+
+ return tmp - 0x8000;
+}
+
+void BinkDecoder::floatToInt16Interleave(int16 *dst, const float **src, uint32 length, uint8 channels) {
+ if (channels == 2) {
+ for (uint32 i = 0; i < length; i++) {
+ dst[2 * i ] = TO_LE_16(floatToInt16One(src[0] + i));
+ dst[2 * i + 1] = TO_LE_16(floatToInt16One(src[1] + i));
+ }
+ } else {
+ for(uint8 c = 0; c < channels; c++)
+ for(uint32 i = 0, j = c; i < length; i++, j += channels)
+ dst[j] = TO_LE_16(floatToInt16One(src[c] + i));
+ }
+}
+
+#define A1 2896 /* (1/sqrt(2))<<12 */
+#define A2 2217
+#define A3 3784
+#define A4 -5352
+
+#define IDCT_TRANSFORM(dest,s0,s1,s2,s3,s4,s5,s6,s7,d0,d1,d2,d3,d4,d5,d6,d7,munge,src) {\
+ const int a0 = (src)[s0] + (src)[s4]; \
+ const int a1 = (src)[s0] - (src)[s4]; \
+ const int a2 = (src)[s2] + (src)[s6]; \
+ const int a3 = (A1*((src)[s2] - (src)[s6])) >> 11; \
+ const int a4 = (src)[s5] + (src)[s3]; \
+ const int a5 = (src)[s5] - (src)[s3]; \
+ const int a6 = (src)[s1] + (src)[s7]; \
+ const int a7 = (src)[s1] - (src)[s7]; \
+ const int b0 = a4 + a6; \
+ const int b1 = (A3*(a5 + a7)) >> 11; \
+ const int b2 = ((A4*a5) >> 11) - b0 + b1; \
+ const int b3 = (A1*(a6 - a4) >> 11) - b2; \
+ const int b4 = ((A2*a7) >> 11) + b3 - b1; \
+ (dest)[d0] = munge(a0+a2 +b0); \
+ (dest)[d1] = munge(a1+a3-a2+b2); \
+ (dest)[d2] = munge(a1-a3+a2+b3); \
+ (dest)[d3] = munge(a0-a2 -b4); \
+ (dest)[d4] = munge(a0-a2 +b4); \
+ (dest)[d5] = munge(a1-a3+a2-b3); \
+ (dest)[d6] = munge(a1+a3-a2-b2); \
+ (dest)[d7] = munge(a0+a2 -b0); \
+}
+/* end IDCT_TRANSFORM macro */
+
+#define MUNGE_NONE(x) (x)
+#define IDCT_COL(dest,src) IDCT_TRANSFORM(dest,0,8,16,24,32,40,48,56,0,8,16,24,32,40,48,56,MUNGE_NONE,src)
+
+#define MUNGE_ROW(x) (((x) + 0x7F)>>8)
+#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src)
+
+static inline void IDCTCol(int16 *dest, const int16 *src)
+{
+ if ((src[8] | src[16] | src[24] | src[32] | src[40] | src[48] | src[56]) == 0) {
+ dest[ 0] =
+ dest[ 8] =
+ dest[16] =
+ dest[24] =
+ dest[32] =
+ dest[40] =
+ dest[48] =
+ dest[56] = src[0];
+ } else {
+ IDCT_COL(dest, src);
+ }
+}
+
+void BinkDecoder::IDCT(int16 *block) {
+ int i;
+ int16 temp[64];
+
+ for (i = 0; i < 8; i++)
+ IDCTCol(&temp[i], &block[i]);
+ for (i = 0; i < 8; i++) {
+ IDCT_ROW( (&block[8*i]), (&temp[8*i]) );
+ }
+}
+
+void BinkDecoder::IDCTAdd(DecodeContext &ctx, int16 *block) {
+ int i, j;
+
+ IDCT(block);
+ byte *dest = ctx.dest;
+ for (i = 0; i < 8; i++, dest += ctx.pitch, block += 8)
+ for (j = 0; j < 8; j++)
+ dest[j] += block[j];
+}
+
+void BinkDecoder::IDCTPut(DecodeContext &ctx, int16 *block) {
+ int i;
+ int16 temp[64];
+ for (i = 0; i < 8; i++)
+ IDCTCol(&temp[i], &block[i]);
+ for (i = 0; i < 8; i++) {
+ IDCT_ROW( (&ctx.dest[i*ctx.pitch]), (&temp[8*i]) );
+ }
+}
+
+} // End of namespace Video
diff --git a/video/bink_decoder.h b/video/bink_decoder.h
new file mode 100644
index 0000000000..ceb55391a9
--- /dev/null
+++ b/video/bink_decoder.h
@@ -0,0 +1,334 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 eos' Bink decoder which is in turn
+// based quite heavily on the Bink decoder found in FFmpeg.
+// Many thanks to Kostya Shishkov for doing the hard work.
+
+#include "common/scummsys.h"
+
+#ifdef USE_BINK
+
+#ifndef VIDEO_BINK_DECODER_H
+#define VIDEO_BINK_DECODER_H
+
+#include "audio/audiostream.h"
+#include "audio/mixer.h"
+#include "common/array.h"
+#include "common/rational.h"
+
+#include "video/video_decoder.h"
+
+namespace Common {
+ class SeekableReadStream;
+ class BitStream;
+ class Huffman;
+
+ class RDFT;
+ class DCT;
+}
+
+namespace Video {
+
+/**
+ * Decoder for Bink videos.
+ *
+ * Video decoder used in engines:
+ * - scumm (he)
+ */
+class BinkDecoder : public FixedRateVideoDecoder {
+public:
+ BinkDecoder();
+ ~BinkDecoder();
+
+ // VideoDecoder API
+ bool loadStream(Common::SeekableReadStream *stream);
+ void close();
+ bool isVideoLoaded() const { return _bink != 0; }
+ uint16 getWidth() const { return _surface.w; }
+ uint16 getHeight() const { return _surface.h; }
+ Graphics::PixelFormat getPixelFormat() const { return _surface.format; }
+ uint32 getFrameCount() const { return _frames.size(); }
+ uint32 getElapsedTime() const;
+ const Graphics::Surface *decodeNextFrame();
+
+ // FixedRateVideoDecoder
+ Common::Rational getFrameRate() const { return _frameRate; }
+
+private:
+ static const int kAudioChannelsMax = 2;
+ static const int kAudioBlockSizeMax = (kAudioChannelsMax << 11);
+
+ /** IDs for different data types used in Bink video codec. */
+ enum Source {
+ kSourceBlockTypes = 0, ///< 8x8 block types.
+ kSourceSubBlockTypes , ///< 16x16 block types (a subset of 8x8 block types).
+ kSourceColors , ///< Pixel values used for different block types.
+ kSourcePattern , ///< 8-bit values for 2-color pattern fill.
+ kSourceXOff , ///< X components of motion value.
+ kSourceYOff , ///< Y components of motion value.
+ kSourceIntraDC , ///< DC values for intrablocks with DCT.
+ kSourceInterDC , ///< DC values for interblocks with DCT.
+ kSourceRun , ///< Run lengths for special fill block.
+
+ kSourceMAX
+ };
+
+ /** Bink video block types. */
+ enum BlockType {
+ kBlockSkip = 0, ///< Skipped block.
+ kBlockScaled , ///< Block has size 16x16.
+ kBlockMotion , ///< Block is copied from previous frame with some offset.
+ kBlockRun , ///< Block is composed from runs of colors with custom scan order.
+ kBlockResidue , ///< Motion block with some difference added.
+ kBlockIntra , ///< Intra DCT block.
+ kBlockFill , ///< Block is filled with single color.
+ kBlockInter , ///< Motion block with DCT applied to the difference.
+ kBlockPattern , ///< Block is filled with two colors following custom pattern.
+ kBlockRaw ///< Uncoded 8x8 block.
+ };
+
+ /** Data structure for decoding and tranlating Huffman'd data. */
+ struct Huffman {
+ int index; ///< Index of the Huffman codebook to use.
+ byte symbols[16]; ///< Huffman symbol => Bink symbol tranlation list.
+ };
+
+ /** Data structure used for decoding a single Bink data type. */
+ struct Bundle {
+ int countLengths[2]; ///< Lengths of number of entries to decode (in bits).
+ int countLength; ///< Length of number of entries to decode (in bits) for the current plane.
+
+ Huffman huffman; ///< Huffman codebook.
+
+ byte *data; ///< Buffer for decoded symbols.
+ byte *dataEnd; ///< Buffer end.
+
+ byte *curDec; ///< Pointer to the data that wasn't yet decoded.
+ byte *curPtr; ///< Pointer to the data that wasn't yet read.
+ };
+
+ enum AudioCodec {
+ kAudioCodecDCT,
+ kAudioCodecRDFT
+ };
+
+ /** An audio track. */
+ struct AudioTrack {
+ uint16 flags;
+
+ uint32 sampleRate;
+ uint8 channels;
+
+ uint32 outSampleRate;
+ uint8 outChannels;
+
+ AudioCodec codec;
+
+ uint32 sampleCount;
+
+ Common::BitStream *bits;
+
+ bool first;
+
+ uint32 frameLen;
+ uint32 overlapLen;
+
+ uint32 blockSize;
+
+ uint32 bandCount;
+ uint32 *bands;
+
+ float root;
+
+ float coeffs[16 * kAudioBlockSizeMax];
+ int16 prevCoeffs[kAudioBlockSizeMax];
+
+ float *coeffsPtr[kAudioChannelsMax];
+
+ Common::RDFT *rdft;
+ Common::DCT *dct;
+
+ AudioTrack();
+ ~AudioTrack();
+ };
+
+ /** A video frame. */
+ struct VideoFrame {
+ bool keyFrame;
+
+ uint32 offset;
+ uint32 size;
+
+ Common::BitStream *bits;
+
+ VideoFrame();
+ ~VideoFrame();
+ };
+
+ /** A decoder state. */
+ struct DecodeContext {
+ VideoFrame *video;
+
+ uint32 planeIdx;
+
+ uint32 blockX;
+ uint32 blockY;
+
+ byte *dest;
+ byte *prev;
+
+ byte *destStart, *destEnd;
+ byte *prevStart, *prevEnd;
+
+ uint32 pitch;
+
+ int coordMap[64];
+ int coordScaledMap1[64];
+ int coordScaledMap2[64];
+ int coordScaledMap3[64];
+ int coordScaledMap4[64];
+ };
+
+ Common::SeekableReadStream *_bink;
+
+ uint32 _id; ///< The BIK FourCC.
+
+ Common::Rational _frameRate;
+
+ Graphics::Surface _surface;
+
+ Audio::SoundHandle _audioHandle;
+ Audio::QueuingAudioStream *_audioStream;
+ bool _audioStarted;
+
+ uint32 _videoFlags; ///< Video frame features.
+
+ bool _hasAlpha; ///< Do video frames have alpha?
+ bool _swapPlanes; ///< Are the planes ordered (A)YVU instead of (A)YUV?
+
+ uint32 _audioFrame;
+
+ Common::Array<AudioTrack> _audioTracks; ///< All audio tracks.
+ Common::Array<VideoFrame> _frames; ///< All video frames.
+
+ uint32 _audioTrack; ///< Audio track to use.
+
+ Common::Huffman *_huffman[16]; ///< The 16 Huffman codebooks used in Bink decoding.
+
+ Bundle _bundles[kSourceMAX]; ///< Bundles for decoding all data types.
+
+ /** Huffman codebooks to use for decoding high nibbles in color data types. */
+ Huffman _colHighHuffman[16];
+ /** Value of the last decoded high nibble in color data types. */
+ int _colLastVal;
+
+ byte *_curPlanes[4]; ///< The 4 color planes, YUVA, current frame.
+ byte *_oldPlanes[4]; ///< The 4 color planes, YUVA, last frame.
+
+
+ /** Initialize the bundles. */
+ void initBundles();
+ /** Deinitialize the bundles. */
+ void deinitBundles();
+
+ /** Initialize the Huffman decoders. */
+ void initHuffman();
+
+ /** Decode an audio packet. */
+ void audioPacket(AudioTrack &audio);
+ /** Decode a video packet. */
+ void videoPacket(VideoFrame &video);
+
+ /** Decode a plane. */
+ void decodePlane(VideoFrame &video, int planeIdx, bool isChroma);
+
+ /** Read/Initialize a bundle for decoding a plane. */
+ void readBundle(VideoFrame &video, Source source);
+
+ /** Read the symbols for a Huffman code. */
+ void readHuffman(VideoFrame &video, Huffman &huffman);
+ /** Merge two Huffman symbol lists. */
+ void mergeHuffmanSymbols(VideoFrame &video, byte *dst, const byte *src, int size);
+
+ /** Read and translate a symbol out of a Huffman code. */
+ byte getHuffmanSymbol(VideoFrame &video, Huffman &huffman);
+
+ /** Get a direct value out of a bundle. */
+ int32 getBundleValue(Source source);
+ /** Read a count value out of a bundle. */
+ uint32 readBundleCount(VideoFrame &video, Bundle &bundle);
+
+ // Handle the block types
+ void blockSkip (DecodeContext &ctx);
+ void blockScaledSkip (DecodeContext &ctx);
+ void blockScaledRun (DecodeContext &ctx);
+ void blockScaledIntra (DecodeContext &ctx);
+ void blockScaledFill (DecodeContext &ctx);
+ void blockScaledPattern(DecodeContext &ctx);
+ void blockScaledRaw (DecodeContext &ctx);
+ void blockScaled (DecodeContext &ctx);
+ void blockMotion (DecodeContext &ctx);
+ void blockRun (DecodeContext &ctx);
+ void blockResidue (DecodeContext &ctx);
+ void blockIntra (DecodeContext &ctx);
+ void blockFill (DecodeContext &ctx);
+ void blockInter (DecodeContext &ctx);
+ void blockPattern (DecodeContext &ctx);
+ void blockRaw (DecodeContext &ctx);
+
+ // Read the bundles
+ void readRuns (VideoFrame &video, Bundle &bundle);
+ void readMotionValues(VideoFrame &video, Bundle &bundle);
+ void readBlockTypes (VideoFrame &video, Bundle &bundle);
+ void readPatterns (VideoFrame &video, Bundle &bundle);
+ void readColors (VideoFrame &video, Bundle &bundle);
+ void readDCS (VideoFrame &video, Bundle &bundle, int startBits, bool hasSign);
+ void readDCTCoeffs (VideoFrame &video, int16 *block, bool isIntra);
+ void readResidue (VideoFrame &video, int16 *block, int masksCount);
+
+ void initAudioTrack(AudioTrack &audio);
+
+ float getFloat(AudioTrack &audio);
+
+ /** Decode an audio block. */
+ void audioBlock (AudioTrack &audio, int16 *out);
+ /** Decode a DCT'd audio block. */
+ void audioBlockDCT (AudioTrack &audio);
+ /** Decode a RDFT'd audio block. */
+ void audioBlockRDFT(AudioTrack &audio);
+
+ void readAudioCoeffs(AudioTrack &audio, float *coeffs);
+
+ void floatToInt16Interleave(int16 *dst, const float **src, uint32 length, uint8 channels);
+
+ // Bink video IDCT
+ void IDCT(int16 *block);
+ void IDCTPut(DecodeContext &ctx, int16 *block);
+ void IDCTAdd(DecodeContext &ctx, int16 *block);
+};
+
+} // End of namespace Video
+
+#endif // VIDEO_BINK_DECODER_H
+
+#endif // USE_BINK
diff --git a/video/binkdata.h b/video/binkdata.h
new file mode 100644
index 0000000000..02105a7493
--- /dev/null
+++ b/video/binkdata.h
@@ -0,0 +1,578 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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 VIDEO_BINKDATA_H
+#define VIDEO_BINKDATA_H
+
+#include "common/scummsys.h"
+
+namespace Video {
+
+static const uint16 binkCriticalFreqs[25] = {
+ 100, 200, 300, 400, 510, 630, 770, 920,
+ 1080, 1270, 1480, 1720, 2000, 2320, 2700, 3150,
+ 3700, 4400, 5300, 6400, 7700, 9500, 12000, 15500,
+ 24500,
+};
+
+/** Bink DCT and residue 8x8 block scan order */
+static const uint8 binkScan[64] = {
+ 0, 1, 8, 9, 2, 3, 10, 11,
+ 4, 5, 12, 13, 6, 7, 14, 15,
+ 20, 21, 28, 29, 22, 23, 30, 31,
+ 16, 17, 24, 25, 32, 33, 40, 41,
+ 34, 35, 42, 43, 48, 49, 56, 57,
+ 50, 51, 58, 59, 18, 19, 26, 27,
+ 36, 37, 44, 45, 38, 39, 46, 47,
+ 52, 53, 60, 61, 54, 55, 62, 63
+};
+
+static const uint32 binkHuffmanCodes[16][16] = {
+ { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F },
+ { 0x00, 0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F },
+ { 0x00, 0x02, 0x01, 0x09, 0x05, 0x15, 0x0D, 0x1D, 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F },
+ { 0x00, 0x02, 0x06, 0x01, 0x09, 0x05, 0x0D, 0x1D, 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F },
+ { 0x00, 0x04, 0x02, 0x06, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F },
+ { 0x00, 0x04, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x0B, 0x07, 0x17, 0x0F, 0x1F },
+ { 0x00, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x0B, 0x1B, 0x07, 0x17, 0x0F, 0x1F },
+ { 0x00, 0x01, 0x05, 0x03, 0x13, 0x0B, 0x1B, 0x3B, 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F },
+ { 0x00, 0x01, 0x03, 0x13, 0x0B, 0x2B, 0x1B, 0x3B, 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F },
+ { 0x00, 0x01, 0x05, 0x0D, 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F },
+ { 0x00, 0x02, 0x01, 0x05, 0x0D, 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F },
+ { 0x00, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x13, 0x0B, 0x1B, 0x07, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F },
+ { 0x00, 0x02, 0x01, 0x03, 0x13, 0x0B, 0x1B, 0x3B, 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x1F, 0x3F },
+ { 0x00, 0x01, 0x05, 0x03, 0x07, 0x27, 0x17, 0x37, 0x0F, 0x4F, 0x2F, 0x6F, 0x1F, 0x5F, 0x3F, 0x7F },
+ { 0x00, 0x01, 0x05, 0x03, 0x07, 0x17, 0x37, 0x77, 0x0F, 0x4F, 0x2F, 0x6F, 0x1F, 0x5F, 0x3F, 0x7F },
+ { 0x00, 0x02, 0x01, 0x05, 0x03, 0x07, 0x27, 0x17, 0x37, 0x0F, 0x2F, 0x6F, 0x1F, 0x5F, 0x3F, 0x7F }
+};
+
+static const uint8 binkHuffmanLengths[16][16] = {
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 },
+ { 1, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 },
+ { 2, 2, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 },
+ { 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 },
+ { 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5 },
+ { 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5 },
+ { 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5 },
+ { 1, 3, 3, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 },
+ { 1, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 },
+ { 1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6 },
+ { 2, 2, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6 },
+ { 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6 },
+ { 2, 2, 2, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 },
+ { 1, 3, 3, 3, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7 },
+ { 1, 3, 3, 3, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7 },
+ { 2, 2, 3, 3, 3, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7 }
+};
+
+static const uint8 binkPatterns[16][64] = {
+{
+ 0x00, 0x08, 0x10, 0x18, 0x20, 0x28, 0x30, 0x38,
+ 0x39, 0x31, 0x29, 0x21, 0x19, 0x11, 0x09, 0x01,
+ 0x02, 0x0A, 0x12, 0x1A, 0x22, 0x2A, 0x32, 0x3A,
+ 0x3B, 0x33, 0x2B, 0x23, 0x1B, 0x13, 0x0B, 0x03,
+ 0x04, 0x0C, 0x14, 0x1C, 0x24, 0x2C, 0x34, 0x3C,
+ 0x3D, 0x35, 0x2D, 0x25, 0x1D, 0x15, 0x0D, 0x05,
+ 0x06, 0x0E, 0x16, 0x1E, 0x26, 0x2E, 0x36, 0x3E,
+ 0x3F, 0x37, 0x2F, 0x27, 0x1F, 0x17, 0x0F, 0x07
+},
+{
+ 0x3B, 0x3A, 0x39, 0x38, 0x30, 0x31, 0x32, 0x33,
+ 0x2B, 0x2A, 0x29, 0x28, 0x20, 0x21, 0x22, 0x23,
+ 0x1B, 0x1A, 0x19, 0x18, 0x10, 0x11, 0x12, 0x13,
+ 0x0B, 0x0A, 0x09, 0x08, 0x00, 0x01, 0x02, 0x03,
+ 0x04, 0x05, 0x06, 0x07, 0x0F, 0x0E, 0x0D, 0x0C,
+ 0x14, 0x15, 0x16, 0x17, 0x1F, 0x1E, 0x1D, 0x1C,
+ 0x24, 0x25, 0x26, 0x27, 0x2F, 0x2E, 0x2D, 0x2C,
+ 0x34, 0x35, 0x36, 0x37, 0x3F, 0x3E, 0x3D, 0x3C
+},
+{
+ 0x19, 0x11, 0x12, 0x1A, 0x1B, 0x13, 0x0B, 0x03,
+ 0x02, 0x0A, 0x09, 0x01, 0x00, 0x08, 0x10, 0x18,
+ 0x20, 0x28, 0x30, 0x38, 0x39, 0x31, 0x29, 0x2A,
+ 0x32, 0x3A, 0x3B, 0x33, 0x2B, 0x23, 0x22, 0x21,
+ 0x1D, 0x15, 0x16, 0x1E, 0x1F, 0x17, 0x0F, 0x07,
+ 0x06, 0x0E, 0x0D, 0x05, 0x04, 0x0C, 0x14, 0x1C,
+ 0x24, 0x2C, 0x34, 0x3C, 0x3D, 0x35, 0x2D, 0x2E,
+ 0x36, 0x3E, 0x3F, 0x37, 0x2F, 0x27, 0x26, 0x25
+},
+{
+ 0x03, 0x0B, 0x02, 0x0A, 0x01, 0x09, 0x00, 0x08,
+ 0x10, 0x18, 0x11, 0x19, 0x12, 0x1A, 0x13, 0x1B,
+ 0x23, 0x2B, 0x22, 0x2A, 0x21, 0x29, 0x20, 0x28,
+ 0x30, 0x38, 0x31, 0x39, 0x32, 0x3A, 0x33, 0x3B,
+ 0x3C, 0x34, 0x3D, 0x35, 0x3E, 0x36, 0x3F, 0x37,
+ 0x2F, 0x27, 0x2E, 0x26, 0x2D, 0x25, 0x2C, 0x24,
+ 0x1C, 0x14, 0x1D, 0x15, 0x1E, 0x16, 0x1F, 0x17,
+ 0x0F, 0x07, 0x0E, 0x06, 0x0D, 0x05, 0x0C, 0x04
+},
+{
+ 0x18, 0x19, 0x10, 0x11, 0x08, 0x09, 0x00, 0x01,
+ 0x02, 0x03, 0x0A, 0x0B, 0x12, 0x13, 0x1A, 0x1B,
+ 0x1C, 0x1D, 0x14, 0x15, 0x0C, 0x0D, 0x04, 0x05,
+ 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F,
+ 0x27, 0x26, 0x2F, 0x2E, 0x37, 0x36, 0x3F, 0x3E,
+ 0x3D, 0x3C, 0x35, 0x34, 0x2D, 0x2C, 0x25, 0x24,
+ 0x23, 0x22, 0x2B, 0x2A, 0x33, 0x32, 0x3B, 0x3A,
+ 0x39, 0x38, 0x31, 0x30, 0x29, 0x28, 0x21, 0x20
+},
+{
+ 0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
+ 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B,
+ 0x20, 0x21, 0x22, 0x23, 0x28, 0x29, 0x2A, 0x2B,
+ 0x30, 0x31, 0x32, 0x33, 0x38, 0x39, 0x3A, 0x3B,
+ 0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
+ 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F,
+ 0x24, 0x25, 0x26, 0x27, 0x2C, 0x2D, 0x2E, 0x2F,
+ 0x34, 0x35, 0x36, 0x37, 0x3C, 0x3D, 0x3E, 0x3F
+},
+{
+ 0x06, 0x07, 0x0F, 0x0E, 0x0D, 0x05, 0x0C, 0x04,
+ 0x03, 0x0B, 0x02, 0x0A, 0x09, 0x01, 0x00, 0x08,
+ 0x10, 0x18, 0x11, 0x19, 0x12, 0x1A, 0x13, 0x1B,
+ 0x14, 0x1C, 0x15, 0x1D, 0x16, 0x1E, 0x17, 0x1F,
+ 0x27, 0x2F, 0x26, 0x2E, 0x25, 0x2D, 0x24, 0x2C,
+ 0x23, 0x2B, 0x22, 0x2A, 0x21, 0x29, 0x20, 0x28,
+ 0x31, 0x30, 0x38, 0x39, 0x3A, 0x32, 0x3B, 0x33,
+ 0x3C, 0x34, 0x3D, 0x35, 0x36, 0x37, 0x3F, 0x3E
+},
+{
+ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x1F, 0x1E, 0x1D, 0x1C, 0x1B, 0x1A, 0x19, 0x18,
+ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+ 0x2F, 0x2E, 0x2D, 0x2C, 0x2B, 0x2A, 0x29, 0x28,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
+ 0x3F, 0x3E, 0x3D, 0x3C, 0x3B, 0x3A, 0x39, 0x38
+},
+{
+ 0x00, 0x08, 0x09, 0x01, 0x02, 0x03, 0x0B, 0x0A,
+ 0x12, 0x13, 0x1B, 0x1A, 0x19, 0x11, 0x10, 0x18,
+ 0x20, 0x28, 0x29, 0x21, 0x22, 0x23, 0x2B, 0x2A,
+ 0x32, 0x31, 0x30, 0x38, 0x39, 0x3A, 0x3B, 0x33,
+ 0x34, 0x3C, 0x3D, 0x3E, 0x3F, 0x37, 0x36, 0x35,
+ 0x2D, 0x2C, 0x24, 0x25, 0x26, 0x2E, 0x2F, 0x27,
+ 0x1F, 0x17, 0x16, 0x1E, 0x1D, 0x1C, 0x14, 0x15,
+ 0x0D, 0x0C, 0x04, 0x05, 0x06, 0x0E, 0x0F, 0x07
+},
+{
+ 0x18, 0x19, 0x10, 0x11, 0x08, 0x09, 0x00, 0x01,
+ 0x02, 0x03, 0x0A, 0x0B, 0x12, 0x13, 0x1A, 0x1B,
+ 0x1C, 0x1D, 0x14, 0x15, 0x0C, 0x0D, 0x04, 0x05,
+ 0x06, 0x07, 0x0E, 0x0F, 0x16, 0x17, 0x1E, 0x1F,
+ 0x26, 0x27, 0x2E, 0x2F, 0x36, 0x37, 0x3E, 0x3F,
+ 0x3C, 0x3D, 0x34, 0x35, 0x2C, 0x2D, 0x24, 0x25,
+ 0x22, 0x23, 0x2A, 0x2B, 0x32, 0x33, 0x3A, 0x3B,
+ 0x38, 0x39, 0x30, 0x31, 0x28, 0x29, 0x20, 0x21
+},
+{
+ 0x00, 0x08, 0x01, 0x09, 0x02, 0x0A, 0x03, 0x0B,
+ 0x13, 0x1B, 0x12, 0x1A, 0x11, 0x19, 0x10, 0x18,
+ 0x20, 0x28, 0x21, 0x29, 0x22, 0x2A, 0x23, 0x2B,
+ 0x33, 0x3B, 0x32, 0x3A, 0x31, 0x39, 0x30, 0x38,
+ 0x3C, 0x34, 0x3D, 0x35, 0x3E, 0x36, 0x3F, 0x37,
+ 0x2F, 0x27, 0x2E, 0x26, 0x2D, 0x25, 0x2C, 0x24,
+ 0x1F, 0x17, 0x1E, 0x16, 0x1D, 0x15, 0x1C, 0x14,
+ 0x0C, 0x04, 0x0D, 0x05, 0x0E, 0x06, 0x0F, 0x07
+},
+{
+ 0x00, 0x08, 0x10, 0x18, 0x19, 0x1A, 0x1B, 0x13,
+ 0x0B, 0x03, 0x02, 0x01, 0x09, 0x11, 0x12, 0x0A,
+ 0x04, 0x0C, 0x14, 0x1C, 0x1D, 0x1E, 0x1F, 0x17,
+ 0x0F, 0x07, 0x06, 0x05, 0x0D, 0x15, 0x16, 0x0E,
+ 0x24, 0x2C, 0x34, 0x3C, 0x3D, 0x3E, 0x3F, 0x37,
+ 0x2F, 0x27, 0x26, 0x25, 0x2D, 0x35, 0x36, 0x2E,
+ 0x20, 0x28, 0x30, 0x38, 0x39, 0x3A, 0x3B, 0x33,
+ 0x2B, 0x23, 0x22, 0x21, 0x29, 0x31, 0x32, 0x2A
+},
+{
+ 0x00, 0x08, 0x09, 0x01, 0x02, 0x03, 0x0B, 0x0A,
+ 0x13, 0x1B, 0x1A, 0x12, 0x11, 0x10, 0x18, 0x19,
+ 0x21, 0x20, 0x28, 0x29, 0x2A, 0x22, 0x23, 0x2B,
+ 0x33, 0x3B, 0x3A, 0x32, 0x31, 0x39, 0x38, 0x30,
+ 0x34, 0x3C, 0x3D, 0x35, 0x36, 0x3E, 0x3F, 0x37,
+ 0x2F, 0x27, 0x26, 0x2E, 0x2D, 0x2C, 0x24, 0x25,
+ 0x1D, 0x1C, 0x14, 0x15, 0x16, 0x1E, 0x1F, 0x17,
+ 0x0E, 0x0F, 0x07, 0x06, 0x05, 0x0D, 0x0C, 0x04
+},
+{
+ 0x18, 0x10, 0x08, 0x00, 0x01, 0x02, 0x03, 0x0B,
+ 0x13, 0x1B, 0x1A, 0x19, 0x11, 0x0A, 0x09, 0x12,
+ 0x1C, 0x14, 0x0C, 0x04, 0x05, 0x06, 0x07, 0x0F,
+ 0x17, 0x1F, 0x1E, 0x1D, 0x15, 0x0E, 0x0D, 0x16,
+ 0x3C, 0x34, 0x2C, 0x24, 0x25, 0x26, 0x27, 0x2F,
+ 0x37, 0x3F, 0x3E, 0x3D, 0x35, 0x2E, 0x2D, 0x36,
+ 0x38, 0x30, 0x28, 0x20, 0x21, 0x22, 0x23, 0x2B,
+ 0x33, 0x3B, 0x3A, 0x39, 0x31, 0x2A, 0x29, 0x32
+},
+{
+ 0x00, 0x08, 0x09, 0x01, 0x02, 0x0A, 0x12, 0x11,
+ 0x10, 0x18, 0x19, 0x1A, 0x1B, 0x13, 0x0B, 0x03,
+ 0x07, 0x06, 0x0E, 0x0F, 0x17, 0x16, 0x15, 0x0D,
+ 0x05, 0x04, 0x0C, 0x14, 0x1C, 0x1D, 0x1E, 0x1F,
+ 0x3F, 0x3E, 0x36, 0x37, 0x2F, 0x2E, 0x2D, 0x35,
+ 0x3D, 0x3C, 0x34, 0x2C, 0x24, 0x25, 0x26, 0x27,
+ 0x38, 0x30, 0x31, 0x39, 0x3A, 0x32, 0x2A, 0x29,
+ 0x28, 0x20, 0x21, 0x22, 0x23, 0x2B, 0x33, 0x3B
+},
+{
+ 0x00, 0x01, 0x08, 0x09, 0x10, 0x11, 0x18, 0x19,
+ 0x20, 0x21, 0x28, 0x29, 0x30, 0x31, 0x38, 0x39,
+ 0x3A, 0x3B, 0x32, 0x33, 0x2A, 0x2B, 0x22, 0x23,
+ 0x1A, 0x1B, 0x12, 0x13, 0x0A, 0x0B, 0x02, 0x03,
+ 0x04, 0x05, 0x0C, 0x0D, 0x14, 0x15, 0x1C, 0x1D,
+ 0x24, 0x25, 0x2C, 0x2D, 0x34, 0x35, 0x3C, 0x3D,
+ 0x3E, 0x3F, 0x36, 0x37, 0x2E, 0x2F, 0x26, 0x27,
+ 0x1E, 0x1F, 0x16, 0x17, 0x0E, 0x0F, 0x06, 0x07
+}
+};
+
+static const uint32 binkIntraQuant[16][64] = {
+{
+ 0x010000, 0x016315, 0x01E83D, 0x02A535, 0x014E7B, 0x016577, 0x02F1E6, 0x02724C,
+ 0x010000, 0x00EEDA, 0x024102, 0x017F9B, 0x00BE80, 0x00611E, 0x01083C, 0x00A552,
+ 0x021F88, 0x01DC53, 0x027FAD, 0x01F697, 0x014819, 0x00A743, 0x015A31, 0x009688,
+ 0x02346F, 0x030EE5, 0x01FBFA, 0x02C096, 0x01D000, 0x028396, 0x019247, 0x01F9AA,
+ 0x02346F, 0x01FBFA, 0x01DC53, 0x0231B8, 0x012F12, 0x01E06C, 0x00CB10, 0x0119A8,
+ 0x01C48C, 0x019748, 0x014E86, 0x0122AF, 0x02C628, 0x027F20, 0x0297B5, 0x023F32,
+ 0x025000, 0x01AB6B, 0x01D122, 0x0159B3, 0x012669, 0x008D43, 0x00EE1F, 0x0075ED,
+ 0x01490C, 0x010288, 0x00F735, 0x00EF51, 0x00E0F1, 0x0072AD, 0x00A4D8, 0x006517,
+},
+{
+ 0x015555, 0x01D971, 0x028AFC, 0x0386F1, 0x01BDF9, 0x01DC9F, 0x03ED33, 0x034311,
+ 0x015555, 0x013E78, 0x030158, 0x01FF7A, 0x00FE00, 0x00817D, 0x01604F, 0x00DC6D,
+ 0x02D4B5, 0x027B19, 0x0354E7, 0x029E1F, 0x01B577, 0x00DF04, 0x01CD96, 0x00C8B6,
+ 0x02F095, 0x0413DC, 0x02A54E, 0x03AB73, 0x026AAB, 0x035A1E, 0x02185E, 0x02A238,
+ 0x02F095, 0x02A54E, 0x027B19, 0x02ECF5, 0x019418, 0x028090, 0x010EC0, 0x01778A,
+ 0x025B66, 0x021F0B, 0x01BE09, 0x018394, 0x03B2E0, 0x03542A, 0x0374F1, 0x02FEEE,
+ 0x031555, 0x0239E4, 0x026C2D, 0x01CCEE, 0x01888C, 0x00BC59, 0x013D7E, 0x009D3C,
+ 0x01B6BB, 0x0158B5, 0x01499C, 0x013F17, 0x012BEC, 0x0098E6, 0x00DBCB, 0x0086C9,
+},
+{
+ 0x01AAAB, 0x024FCE, 0x032DBB, 0x0468AD, 0x022D78, 0x0253C7, 0x04E87F, 0x0413D5,
+ 0x01AAAB, 0x018E16, 0x03C1AE, 0x027F58, 0x013D80, 0x00A1DC, 0x01B863, 0x011388,
+ 0x0389E2, 0x0319DF, 0x042A21, 0x0345A7, 0x0222D4, 0x0116C5, 0x0240FC, 0x00FAE3,
+ 0x03ACBA, 0x0518D3, 0x034EA1, 0x04964F, 0x030555, 0x0430A5, 0x029E76, 0x034AC5,
+ 0x03ACBA, 0x034EA1, 0x0319DF, 0x03A833, 0x01F91E, 0x0320B4, 0x015270, 0x01D56D,
+ 0x02F23F, 0x02A6CE, 0x022D8B, 0x01E479, 0x049F98, 0x042935, 0x04522D, 0x03BEA9,
+ 0x03DAAB, 0x02C85D, 0x030738, 0x02402A, 0x01EAAF, 0x00EB6F, 0x018CDE, 0x00C48A,
+ 0x022469, 0x01AEE2, 0x019C02, 0x018EDD, 0x0176E7, 0x00BF20, 0x0112BE, 0x00A87B,
+},
+{
+ 0x020000, 0x02C62A, 0x03D07A, 0x054A69, 0x029CF6, 0x02CAEF, 0x05E3CC, 0x04E499,
+ 0x020000, 0x01DDB4, 0x048204, 0x02FF36, 0x017D01, 0x00C23C, 0x021077, 0x014AA3,
+ 0x043F0F, 0x03B8A6, 0x04FF5A, 0x03ED2E, 0x029032, 0x014E86, 0x02B461, 0x012D11,
+ 0x0468DF, 0x061DCA, 0x03F7F5, 0x05812C, 0x03A000, 0x05072C, 0x03248D, 0x03F353,
+ 0x0468DF, 0x03F7F5, 0x03B8A6, 0x046370, 0x025E24, 0x03C0D8, 0x019620, 0x02334F,
+ 0x038919, 0x032E91, 0x029D0D, 0x02455E, 0x058C50, 0x04FE3F, 0x052F69, 0x047E65,
+ 0x04A000, 0x0356D6, 0x03A243, 0x02B365, 0x024CD2, 0x011A85, 0x01DC3E, 0x00EBD9,
+ 0x029218, 0x020510, 0x01EE69, 0x01DEA2, 0x01C1E2, 0x00E559, 0x0149B0, 0x00CA2D,
+},
+{
+ 0x02AAAB, 0x03B2E3, 0x0515F8, 0x070DE2, 0x037BF2, 0x03B93E, 0x07DA65, 0x068621,
+ 0x02AAAB, 0x027CF0, 0x0602B1, 0x03FEF3, 0x01FC01, 0x0102FA, 0x02C09F, 0x01B8DA,
+ 0x05A96A, 0x04F632, 0x06A9CE, 0x053C3E, 0x036AED, 0x01BE09, 0x039B2D, 0x01916B,
+ 0x05E129, 0x0827B8, 0x054A9C, 0x0756E5, 0x04D555, 0x06B43B, 0x0430BC, 0x05446F,
+ 0x05E129, 0x054A9C, 0x04F632, 0x05D9EB, 0x032830, 0x050121, 0x021D80, 0x02EF14,
+ 0x04B6CC, 0x043E16, 0x037C11, 0x030728, 0x0765C0, 0x06A855, 0x06E9E2, 0x05FDDB,
+ 0x062AAB, 0x0473C8, 0x04D85A, 0x0399DC, 0x031118, 0x0178B2, 0x027AFD, 0x013A77,
+ 0x036D76, 0x02B16A, 0x029337, 0x027E2E, 0x0257D8, 0x0131CC, 0x01B796, 0x010D91,
+},
+{
+ 0x038000, 0x04DACA, 0x06ACD5, 0x094238, 0x0492AE, 0x04E322, 0x0A4EA5, 0x08900C,
+ 0x038000, 0x0343FB, 0x07E388, 0x053E9F, 0x029AC1, 0x0153E8, 0x039CD0, 0x02429E,
+ 0x076E5B, 0x068322, 0x08BEDE, 0x06DF11, 0x047C57, 0x02496B, 0x04BBAB, 0x020EDD,
+ 0x07B786, 0x0AB421, 0x06F1ED, 0x09A20D, 0x065800, 0x08CC8E, 0x057FF7, 0x06E9D2,
+ 0x07B786, 0x06F1ED, 0x068322, 0x07AE04, 0x0424BF, 0x06917B, 0x02C6B8, 0x03D9CB,
+ 0x062FEB, 0x05917D, 0x0492D7, 0x03F964, 0x09B58C, 0x08BCEF, 0x0912F8, 0x07DD30,
+ 0x081800, 0x05D7F7, 0x065BF6, 0x04B9F1, 0x040670, 0x01EE69, 0x03416C, 0x019CBC,
+ 0x047FAA, 0x0388DC, 0x036138, 0x03459C, 0x03134C, 0x01915C, 0x0240F5, 0x0161CF,
+},
+{
+ 0x040000, 0x058C54, 0x07A0F4, 0x0A94D3, 0x0539EC, 0x0595DD, 0x0BC798, 0x09C932,
+ 0x040000, 0x03BB68, 0x090409, 0x05FE6D, 0x02FA01, 0x018477, 0x0420EE, 0x029547,
+ 0x087E1F, 0x07714C, 0x09FEB5, 0x07DA5D, 0x052064, 0x029D0D, 0x0568C3, 0x025A21,
+ 0x08D1BE, 0x0C3B94, 0x07EFEA, 0x0B0258, 0x074000, 0x0A0E59, 0x06491A, 0x07E6A7,
+ 0x08D1BE, 0x07EFEA, 0x07714C, 0x08C6E0, 0x04BC48, 0x0781B1, 0x032C3F, 0x04669F,
+ 0x071232, 0x065D22, 0x053A1A, 0x048ABC, 0x0B18A0, 0x09FC7F, 0x0A5ED3, 0x08FCC9,
+ 0x094000, 0x06ADAC, 0x074487, 0x0566CA, 0x0499A5, 0x02350B, 0x03B87B, 0x01D7B3,
+ 0x052430, 0x040A20, 0x03DCD3, 0x03BD45, 0x0383C5, 0x01CAB3, 0x029361, 0x01945A,
+},
+{
+ 0x050000, 0x06EF69, 0x098931, 0x0D3A07, 0x068867, 0x06FB55, 0x0EB97E, 0x0C3B7E,
+ 0x050000, 0x04AA42, 0x0B450B, 0x077E08, 0x03B881, 0x01E595, 0x05292A, 0x033A99,
+ 0x0A9DA7, 0x094D9F, 0x0C7E62, 0x09D0F4, 0x06687D, 0x034450, 0x06C2F4, 0x02F0AA,
+ 0x0B062D, 0x0F4A78, 0x09EBE4, 0x0DC2EE, 0x091000, 0x0C91EF, 0x07DB61, 0x09E050,
+ 0x0B062D, 0x09EBE4, 0x094D9F, 0x0AF898, 0x05EB59, 0x09621D, 0x03F74F, 0x058046,
+ 0x08D6BE, 0x07F46A, 0x0688A0, 0x05AD6B, 0x0DDEC8, 0x0C7B9F, 0x0CF687, 0x0B3BFB,
+ 0x0B9000, 0x085917, 0x0915A8, 0x06C07D, 0x05C00E, 0x02C24D, 0x04A69A, 0x024D9F,
+ 0x066D3C, 0x050CA7, 0x04D407, 0x04AC96, 0x0464B6, 0x023D5F, 0x033839, 0x01F971,
+},
+{
+ 0x060000, 0x08527E, 0x0B716E, 0x0FDF3C, 0x07D6E1, 0x0860CC, 0x11AB63, 0x0EADCB,
+ 0x060000, 0x05991C, 0x0D860D, 0x08FDA3, 0x047702, 0x0246B3, 0x063165, 0x03DFEA,
+ 0x0CBD2E, 0x0B29F1, 0x0EFE0F, 0x0BC78B, 0x07B096, 0x03EB93, 0x081D24, 0x038732,
+ 0x0D3A9C, 0x12595D, 0x0BE7DF, 0x108384, 0x0AE000, 0x0F1585, 0x096DA8, 0x0BD9FA,
+ 0x0D3A9C, 0x0BE7DF, 0x0B29F1, 0x0D2A50, 0x071A6B, 0x0B4289, 0x04C25F, 0x0699EE,
+ 0x0A9B4A, 0x098BB2, 0x07D727, 0x06D01A, 0x10A4F0, 0x0EFABE, 0x0F8E3C, 0x0D7B2E,
+ 0x0DE000, 0x0A0482, 0x0AE6CA, 0x081A2F, 0x06E677, 0x034F90, 0x0594B9, 0x02C38C,
+ 0x07B649, 0x060F2F, 0x05CB3C, 0x059BE7, 0x0545A7, 0x02B00C, 0x03DD11, 0x025E87,
+},
+{
+ 0x080000, 0x0B18A8, 0x0F41E8, 0x1529A5, 0x0A73D7, 0x0B2BBB, 0x178F2F, 0x139264,
+ 0x080000, 0x0776CF, 0x120812, 0x0BFCD9, 0x05F402, 0x0308EF, 0x0841DC, 0x052A8E,
+ 0x10FC3E, 0x0EE297, 0x13FD69, 0x0FB4B9, 0x0A40C8, 0x053A1A, 0x0AD186, 0x04B442,
+ 0x11A37B, 0x187727, 0x0FDFD4, 0x1604B0, 0x0E8000, 0x141CB1, 0x0C9235, 0x0FCD4D,
+ 0x11A37B, 0x0FDFD4, 0x0EE297, 0x118DC0, 0x09788F, 0x0F0362, 0x06587F, 0x08CD3D,
+ 0x0E2463, 0x0CBA43, 0x0A7434, 0x091577, 0x163140, 0x13F8FE, 0x14BDA5, 0x11F992,
+ 0x128000, 0x0D5B58, 0x0E890D, 0x0ACD94, 0x093349, 0x046A15, 0x0770F7, 0x03AF65,
+ 0x0A4861, 0x08143F, 0x07B9A6, 0x077A89, 0x070789, 0x039565, 0x0526C2, 0x0328B4,
+},
+{
+ 0x0C0000, 0x10A4FD, 0x16E2DB, 0x1FBE78, 0x0FADC3, 0x10C198, 0x2356C7, 0x1D5B96,
+ 0x0C0000, 0x0B3237, 0x1B0C1A, 0x11FB46, 0x08EE03, 0x048D66, 0x0C62CA, 0x07BFD5,
+ 0x197A5D, 0x1653E3, 0x1DFC1E, 0x178F16, 0x0F612C, 0x07D727, 0x103A49, 0x070E64,
+ 0x1A7539, 0x24B2BB, 0x17CFBD, 0x210709, 0x15C000, 0x1E2B0A, 0x12DB4F, 0x17B3F4,
+ 0x1A7539, 0x17CFBD, 0x1653E3, 0x1A54A0, 0x0E34D7, 0x168513, 0x0984BE, 0x0D33DC,
+ 0x153695, 0x131765, 0x0FAE4E, 0x0DA033, 0x2149E1, 0x1DF57D, 0x1F1C78, 0x1AF65B,
+ 0x1BC000, 0x140904, 0x15CD94, 0x10345E, 0x0DCCEE, 0x069F20, 0x0B2972, 0x058718,
+ 0x0F6C91, 0x0C1E5E, 0x0B9678, 0x0B37CE, 0x0A8B4E, 0x056018, 0x07BA22, 0x04BD0E,
+},
+{
+ 0x110000, 0x179466, 0x206C0C, 0x2CF87F, 0x16362A, 0x17BCED, 0x321044, 0x299714,
+ 0x110000, 0x0FDC79, 0x265125, 0x19794E, 0x0CA685, 0x0672FB, 0x118BF4, 0x0AFA6D,
+ 0x241804, 0x1FA181, 0x2A7A80, 0x21600A, 0x15C9A9, 0x0B1B77, 0x16FD3C, 0x09FF0D,
+ 0x257B66, 0x33FD33, 0x21BBA2, 0x2EC9F7, 0x1ED000, 0x2ABCF9, 0x1AB6B0, 0x219444,
+ 0x257B66, 0x21BBA2, 0x1FA181, 0x254D38, 0x142030, 0x1FE730, 0x0D7C0E, 0x12B423,
+ 0x1E0D52, 0x1B0BCF, 0x1636EE, 0x134D9E, 0x2F28A9, 0x2A711B, 0x2C12FF, 0x263256,
+ 0x275000, 0x1C621B, 0x1EE33C, 0x16F4DB, 0x138CFB, 0x09616E, 0x0FD00C, 0x07D4B7,
+ 0x15D9CE, 0x112B06, 0x106A80, 0x0FE464, 0x0EF004, 0x079D77, 0x0AF25B, 0x06B67F,
+},
+{
+ 0x160000, 0x1E83CF, 0x29F53D, 0x3A3286, 0x1CBE90, 0x1EB842, 0x40C9C2, 0x35D293,
+ 0x160000, 0x1486BA, 0x319630, 0x20F756, 0x105F06, 0x085891, 0x16B51E, 0x0E3506,
+ 0x2EB5AA, 0x28EF20, 0x36F8E1, 0x2B30FE, 0x1C3225, 0x0E5FC7, 0x1DC030, 0x0CEFB7,
+ 0x308193, 0x4347AC, 0x2BA786, 0x3C8CE5, 0x27E000, 0x374EE7, 0x229212, 0x2B7494,
+ 0x308193, 0x2BA786, 0x28EF20, 0x3045D0, 0x1A0B89, 0x29494D, 0x11735D, 0x183469,
+ 0x26E410, 0x230039, 0x1CBF8F, 0x18FB09, 0x3D0771, 0x36ECBA, 0x390986, 0x316E52,
+ 0x32E000, 0x24BB33, 0x27F8E4, 0x1DB557, 0x194D09, 0x0C23BB, 0x1476A6, 0x0A2256,
+ 0x1C470A, 0x1637AD, 0x153E87, 0x1490FA, 0x1354B9, 0x09DAD6, 0x0E2A94, 0x08AFF0,
+},
+{
+ 0x1C0000, 0x26D64D, 0x3566AA, 0x4A11C2, 0x249572, 0x27190E, 0x527525, 0x44805E,
+ 0x1C0000, 0x1A1FD6, 0x3F1C3E, 0x29F4F9, 0x14D607, 0x0A9F44, 0x1CE683, 0x1214F0,
+ 0x3B72D9, 0x341911, 0x45F6F0, 0x36F889, 0x23E2BB, 0x124B5B, 0x25DD54, 0x1076E9,
+ 0x3DBC30, 0x55A109, 0x378F64, 0x4D1069, 0x32C000, 0x46646C, 0x2BFFB9, 0x374E8E,
+ 0x3DBC30, 0x378F64, 0x341911, 0x3D7020, 0x2125F5, 0x348BD6, 0x1635BC, 0x1ECE57,
+ 0x317F5B, 0x2C8BEB, 0x2496B6, 0x1FCB22, 0x4DAC61, 0x45E778, 0x4897C2, 0x3EE97F,
+ 0x40C000, 0x2EBFB5, 0x32DFAE, 0x25CF86, 0x203380, 0x0F734B, 0x1A0B5F, 0x0CE5E2,
+ 0x23FD53, 0x1C46DC, 0x1B09C4, 0x1A2CE1, 0x189A60, 0x0C8AE2, 0x1207A5, 0x0B0E77,
+},
+{
+ 0x220000, 0x2F28CC, 0x40D818, 0x59F0FE, 0x2C6C53, 0x2F79DA, 0x642089, 0x532E29,
+ 0x220000, 0x1FB8F1, 0x4CA24B, 0x32F29C, 0x194D09, 0x0CE5F7, 0x2317E8, 0x15F4DB,
+ 0x483007, 0x3F4303, 0x54F4FF, 0x42C014, 0x2B9351, 0x1636EE, 0x2DFA79, 0x13FE1A,
+ 0x4AF6CC, 0x67FA67, 0x437743, 0x5D93EE, 0x3DA000, 0x5579F1, 0x356D61, 0x432888,
+ 0x4AF6CC, 0x437743, 0x3F4303, 0x4A9A70, 0x284060, 0x3FCE60, 0x1AF81B, 0x256845,
+ 0x3C1AA5, 0x36179D, 0x2C6DDD, 0x269B3C, 0x5E5152, 0x54E237, 0x5825FE, 0x4C64AD,
+ 0x4EA000, 0x38C437, 0x3DC678, 0x2DE9B5, 0x2719F7, 0x12C2DB, 0x1FA018, 0x0FA96E,
+ 0x2BB39B, 0x22560C, 0x20D500, 0x1FC8C8, 0x1DE007, 0x0F3AEE, 0x15E4B7, 0x0D6CFE,
+},
+{
+ 0x2C0000, 0x3D079E, 0x53EA79, 0x74650C, 0x397D20, 0x3D7083, 0x819383, 0x6BA525,
+ 0x2C0000, 0x290D75, 0x632C61, 0x41EEAC, 0x20BE0C, 0x10B121, 0x2D6A3B, 0x1C6A0C,
+ 0x5D6B54, 0x51DE40, 0x6DF1C2, 0x5661FB, 0x38644B, 0x1CBF8F, 0x3B8060, 0x19DF6D,
+ 0x610326, 0x868F57, 0x574F0B, 0x7919CA, 0x4FC000, 0x6E9DCE, 0x452423, 0x56E928,
+ 0x610326, 0x574F0B, 0x51DE40, 0x608BA0, 0x341713, 0x52929A, 0x22E6BA, 0x3068D2,
+ 0x4DC821, 0x460071, 0x397F1E, 0x31F611, 0x7A0EE2, 0x6DD974, 0x72130C, 0x62DCA3,
+ 0x65C000, 0x497665, 0x4FF1C9, 0x3B6AAE, 0x329A12, 0x184776, 0x28ED4D, 0x1444AC,
+ 0x388E14, 0x2C6F5A, 0x2A7D0F, 0x2921F4, 0x26A973, 0x13B5AD, 0x1C5528, 0x115FDF,
+},
+};
+
+static const uint32 binkInterQuant[16][64] = {
+{
+ 0x010000, 0x017946, 0x01A5A9, 0x0248DC, 0x016363, 0x0152A7, 0x0243EC, 0x0209EA,
+ 0x012000, 0x00E248, 0x01BBDA, 0x015CBC, 0x00A486, 0x0053E0, 0x00F036, 0x008095,
+ 0x01B701, 0x016959, 0x01B0B9, 0x0153FD, 0x00F8E7, 0x007EE4, 0x00EA30, 0x007763,
+ 0x01B701, 0x0260EB, 0x019DE9, 0x023E1B, 0x017000, 0x01FE6E, 0x012DB5, 0x01A27B,
+ 0x01E0D1, 0x01B0B9, 0x018A33, 0x01718D, 0x00D87A, 0x014449, 0x007B9A, 0x00AB71,
+ 0x013178, 0x0112EA, 0x00AD08, 0x009BB9, 0x023D97, 0x020437, 0x021CCC, 0x01E6B4,
+ 0x018000, 0x012DB5, 0x0146D9, 0x0100CE, 0x00CFD2, 0x006E5C, 0x00B0E4, 0x005A2D,
+ 0x00E9CC, 0x00B7B1, 0x00846F, 0x006B85, 0x008337, 0x0042E5, 0x004A10, 0x002831,
+},
+{
+ 0x015555, 0x01F708, 0x023237, 0x030BD0, 0x01D9D9, 0x01C389, 0x03053B, 0x02B7E3,
+ 0x018000, 0x012DB5, 0x024FCE, 0x01D0FA, 0x00DB5D, 0x006FD5, 0x014048, 0x00AB71,
+ 0x024957, 0x01E1CC, 0x0240F7, 0x01C551, 0x014BDE, 0x00A92F, 0x013840, 0x009F2F,
+ 0x024957, 0x032BE4, 0x0227E1, 0x02FD7A, 0x01EAAB, 0x02A893, 0x019247, 0x022DF9,
+ 0x028116, 0x0240F7, 0x020D99, 0x01ECBC, 0x0120A3, 0x01B061, 0x00A4CE, 0x00E497,
+ 0x01974B, 0x016E8E, 0x00E6B5, 0x00CFA2, 0x02FCC9, 0x02B04A, 0x02D110, 0x0288F1,
+ 0x020000, 0x019247, 0x01B3CC, 0x015668, 0x011518, 0x009325, 0x00EBDA, 0x00783D,
+ 0x0137BB, 0x00F4ED, 0x00B093, 0x008F5C, 0x00AEF4, 0x005931, 0x0062BF, 0x003597,
+},
+{
+ 0x01AAAB, 0x0274CB, 0x02BEC4, 0x03CEC4, 0x02504F, 0x02346C, 0x03C689, 0x0365DC,
+ 0x01E000, 0x017922, 0x02E3C1, 0x024539, 0x011235, 0x008BCA, 0x01905A, 0x00D64D,
+ 0x02DBAD, 0x025A40, 0x02D134, 0x0236A5, 0x019ED6, 0x00D37B, 0x018650, 0x00C6FB,
+ 0x02DBAD, 0x03F6DD, 0x02B1D9, 0x03BCD8, 0x026555, 0x0352B8, 0x01F6D8, 0x02B977,
+ 0x03215C, 0x02D134, 0x029100, 0x0267EB, 0x0168CC, 0x021C7A, 0x00CE01, 0x011DBD,
+ 0x01FD1E, 0x01CA31, 0x012062, 0x01038A, 0x03BBFB, 0x035C5C, 0x038554, 0x032B2D,
+ 0x028000, 0x01F6D8, 0x0220C0, 0x01AC02, 0x015A5E, 0x00B7EF, 0x0126D1, 0x00964C,
+ 0x0185A9, 0x013228, 0x00DCB8, 0x00B333, 0x00DAB2, 0x006F7D, 0x007B6F, 0x0042FC,
+},
+{
+ 0x020000, 0x02F28D, 0x034B52, 0x0491B8, 0x02C6C5, 0x02A54E, 0x0487D8, 0x0413D5,
+ 0x024000, 0x01C48F, 0x0377B5, 0x02B977, 0x01490C, 0x00A7BF, 0x01E06C, 0x01012A,
+ 0x036E03, 0x02D2B3, 0x036172, 0x02A7FA, 0x01F1CE, 0x00FDC7, 0x01D460, 0x00EEC7,
+ 0x036E03, 0x04C1D6, 0x033BD1, 0x047C37, 0x02E000, 0x03FCDD, 0x025B6A, 0x0344F5,
+ 0x03C1A1, 0x036172, 0x031466, 0x02E31B, 0x01B0F5, 0x028892, 0x00F735, 0x0156E2,
+ 0x0262F1, 0x0225D5, 0x015A10, 0x013772, 0x047B2D, 0x04086E, 0x043998, 0x03CD69,
+ 0x030000, 0x025B6A, 0x028DB3, 0x02019B, 0x019FA3, 0x00DCB8, 0x0161C7, 0x00B45B,
+ 0x01D398, 0x016F63, 0x0108DD, 0x00D70A, 0x01066F, 0x0085C9, 0x00941F, 0x005062,
+},
+{
+ 0x02AAAB, 0x03EE11, 0x04646D, 0x0617A0, 0x03B3B2, 0x038713, 0x060A75, 0x056FC6,
+ 0x030000, 0x025B6A, 0x049F9B, 0x03A1F4, 0x01B6BB, 0x00DFAA, 0x028090, 0x0156E2,
+ 0x0492AE, 0x03C399, 0x0481ED, 0x038AA2, 0x0297BD, 0x01525F, 0x027080, 0x013E5E,
+ 0x0492AE, 0x0657C8, 0x044FC1, 0x05FAF4, 0x03D555, 0x055126, 0x03248D, 0x045BF2,
+ 0x05022D, 0x0481ED, 0x041B33, 0x03D979, 0x024147, 0x0360C3, 0x01499C, 0x01C92E,
+ 0x032E96, 0x02DD1C, 0x01CD6A, 0x019F43, 0x05F991, 0x056093, 0x05A220, 0x0511E1,
+ 0x040000, 0x03248D, 0x036799, 0x02ACCF, 0x022A2F, 0x01264B, 0x01D7B5, 0x00F079,
+ 0x026F75, 0x01E9D9, 0x016127, 0x011EB8, 0x015DE9, 0x00B262, 0x00C57F, 0x006B2D,
+},
+{
+ 0x038000, 0x052876, 0x05C3CF, 0x07FF02, 0x04DBD9, 0x04A148, 0x07EDBA, 0x0722B4,
+ 0x03F000, 0x0317FB, 0x06117C, 0x04C491, 0x023FD5, 0x01258F, 0x0348BD, 0x01C209,
+ 0x060085, 0x04F0B9, 0x05EA87, 0x04A5F5, 0x036728, 0x01BC1C, 0x0333A8, 0x01A1DB,
+ 0x060085, 0x085336, 0x05A8AE, 0x07D960, 0x050800, 0x06FA82, 0x041FF9, 0x05B8AE,
+ 0x0692DA, 0x05EA87, 0x0563B2, 0x050D6E, 0x02F5AD, 0x046F00, 0x01B09C, 0x02580C,
+ 0x042D25, 0x03C235, 0x025D9B, 0x022108, 0x07D78F, 0x070EC1, 0x0764CA, 0x06A777,
+ 0x054000, 0x041FF9, 0x0477F9, 0x0382D0, 0x02D75E, 0x018242, 0x026B1D, 0x013B9F,
+ 0x03324A, 0x0282ED, 0x01CF83, 0x017851, 0x01CB42, 0x00EA21, 0x010336, 0x008CAC,
+},
+{
+ 0x040000, 0x05E519, 0x0696A4, 0x092370, 0x058D8A, 0x054A9C, 0x090FB0, 0x0827AA,
+ 0x048000, 0x03891F, 0x06EF69, 0x0572EE, 0x029218, 0x014F7E, 0x03C0D8, 0x020254,
+ 0x06DC05, 0x05A565, 0x06C2E4, 0x054FF3, 0x03E39B, 0x01FB8E, 0x03A8C0, 0x01DD8D,
+ 0x06DC05, 0x0983AC, 0x0677A2, 0x08F86E, 0x05C000, 0x07F9B9, 0x04B6D4, 0x0689EB,
+ 0x078343, 0x06C2E4, 0x0628CC, 0x05C635, 0x0361EA, 0x051124, 0x01EE69, 0x02ADC5,
+ 0x04C5E1, 0x044BAA, 0x02B41F, 0x026EE5, 0x08F65A, 0x0810DD, 0x087330, 0x079AD1,
+ 0x060000, 0x04B6D4, 0x051B65, 0x040337, 0x033F47, 0x01B970, 0x02C38F, 0x0168B6,
+ 0x03A730, 0x02DEC6, 0x0211BA, 0x01AE14, 0x020CDD, 0x010B93, 0x01283E, 0x00A0C4,
+},
+{
+ 0x050000, 0x075E60, 0x083C4D, 0x0B6C4C, 0x06F0ED, 0x069D43, 0x0B539C, 0x0A3194,
+ 0x05A000, 0x046B67, 0x08AB44, 0x06CFAA, 0x03369E, 0x01A35E, 0x04B10F, 0x0282E8,
+ 0x089307, 0x070EBF, 0x08739C, 0x06A3F0, 0x04DC82, 0x027A72, 0x0492F0, 0x0254F0,
+ 0x089307, 0x0BE497, 0x08158B, 0x0B3689, 0x073000, 0x09F827, 0x05E489, 0x082C66,
+ 0x096413, 0x08739C, 0x07B2FF, 0x0737C2, 0x043A64, 0x06556D, 0x026A04, 0x035936,
+ 0x05F75A, 0x055E94, 0x036127, 0x030A9E, 0x0B33F1, 0x0A1514, 0x0A8FFC, 0x098186,
+ 0x078000, 0x05E489, 0x06623F, 0x050405, 0x040F19, 0x0227CC, 0x037473, 0x01C2E3,
+ 0x0490FC, 0x039677, 0x029629, 0x021999, 0x029015, 0x014E78, 0x01724E, 0x00C8F5,
+},
+{
+ 0x060000, 0x08D7A6, 0x09E1F6, 0x0DB528, 0x085450, 0x07EFEA, 0x0D9788, 0x0C3B7E,
+ 0x06C000, 0x054DAE, 0x0A671E, 0x082C66, 0x03DB24, 0x01F73E, 0x05A145, 0x03037D,
+ 0x0A4A08, 0x087818, 0x0A2455, 0x07F7ED, 0x05D569, 0x02F955, 0x057D20, 0x02CC54,
+ 0x0A4A08, 0x0E4582, 0x09B373, 0x0D74A5, 0x08A000, 0x0BF696, 0x07123E, 0x09CEE0,
+ 0x0B44E4, 0x0A2455, 0x093D32, 0x08A950, 0x0512DF, 0x0799B6, 0x02E59E, 0x0404A7,
+ 0x0728D2, 0x06717F, 0x040E2F, 0x03A657, 0x0D7187, 0x0C194B, 0x0CACC8, 0x0B683A,
+ 0x090000, 0x07123E, 0x07A918, 0x0604D2, 0x04DEEA, 0x029629, 0x042556, 0x021D11,
+ 0x057AC8, 0x044E28, 0x031A97, 0x02851E, 0x03134C, 0x01915C, 0x01BC5D, 0x00F126,
+},
+{
+ 0x080000, 0x0BCA33, 0x0D2D48, 0x1246E0, 0x0B1B15, 0x0A9538, 0x121F5F, 0x104F53,
+ 0x090000, 0x07123E, 0x0DDED2, 0x0AE5DD, 0x052430, 0x029EFD, 0x0781B1, 0x0404A7,
+ 0x0DB80B, 0x0B4ACB, 0x0D85C7, 0x0A9FE7, 0x07C736, 0x03F71D, 0x075180, 0x03BB1A,
+ 0x0DB80B, 0x130757, 0x0CEF44, 0x11F0DC, 0x0B8000, 0x0FF372, 0x096DA8, 0x0D13D6,
+ 0x0F0686, 0x0D85C7, 0x0C5198, 0x0B8C6A, 0x06C3D4, 0x0A2248, 0x03DCD3, 0x055B8A,
+ 0x098BC3, 0x089754, 0x05683E, 0x04DDC9, 0x11ECB4, 0x1021B9, 0x10E661, 0x0F35A3,
+ 0x0C0000, 0x096DA8, 0x0A36CB, 0x08066E, 0x067E8E, 0x0372E1, 0x05871E, 0x02D16B,
+ 0x074E60, 0x05BD8B, 0x042374, 0x035C28, 0x0419BB, 0x021726, 0x02507C, 0x014188,
+},
+{
+ 0x0C0000, 0x11AF4C, 0x13C3EC, 0x1B6A50, 0x10A89F, 0x0FDFD4, 0x1B2F0F, 0x1876FD,
+ 0x0D8000, 0x0A9B5D, 0x14CE3C, 0x1058CB, 0x07B649, 0x03EE7B, 0x0B4289, 0x0606FB,
+ 0x149410, 0x10F030, 0x1448AB, 0x0FEFDA, 0x0BAAD2, 0x05F2AB, 0x0AFA40, 0x0598A7,
+ 0x149410, 0x1C8B03, 0x1366E6, 0x1AE949, 0x114000, 0x17ED2B, 0x0E247C, 0x139DC1,
+ 0x1689C8, 0x1448AB, 0x127A63, 0x11529F, 0x0A25BE, 0x0F336D, 0x05CB3C, 0x08094E,
+ 0x0E51A4, 0x0CE2FE, 0x081C5D, 0x074CAE, 0x1AE30E, 0x183296, 0x195991, 0x16D074,
+ 0x120000, 0x0E247C, 0x0F5230, 0x0C09A5, 0x09BDD5, 0x052C51, 0x084AAC, 0x043A21,
+ 0x0AF590, 0x089C51, 0x06352E, 0x050A3B, 0x062698, 0x0322B9, 0x0378BA, 0x01E24D,
+},
+{
+ 0x110000, 0x190DAC, 0x1C0039, 0x26D69C, 0x17998C, 0x167D16, 0x2682AB, 0x22A891,
+ 0x132000, 0x0F06C3, 0x1D797F, 0x172876, 0x0AECE7, 0x0591D9, 0x0FF398, 0x0889E3,
+ 0x1D2717, 0x17FEEF, 0x1CBC47, 0x1693CA, 0x108754, 0x086D1D, 0x0F8D30, 0x07ED98,
+ 0x1D2717, 0x286F9A, 0x1B7C71, 0x261FD3, 0x187000, 0x21E552, 0x140904, 0x1BCA27,
+ 0x1FEDDC, 0x1CBC47, 0x1A2D62, 0x188A62, 0x0E6022, 0x1588DA, 0x083540, 0x0B6284,
+ 0x1448FE, 0x124192, 0x0B7D84, 0x0A574B, 0x2616FF, 0x2247AA, 0x23E98D, 0x2051FA,
+ 0x198000, 0x140904, 0x15B46F, 0x110DAA, 0x0DCCEE, 0x07541E, 0x0BBF1F, 0x05FD04,
+ 0x0F868B, 0x0C32C8, 0x08CB57, 0x0723D4, 0x08B6AD, 0x047130, 0x04EB08, 0x02AB42,
+},
+{
+ 0x160000, 0x206C0C, 0x243C86, 0x3242E8, 0x1E8A79, 0x1D1A59, 0x31D646, 0x2CDA25,
+ 0x18C000, 0x13722A, 0x2624C3, 0x1DF820, 0x0E2385, 0x073537, 0x14A4A7, 0x0B0CCC,
+ 0x25BA1D, 0x1F0DAE, 0x252FE4, 0x1D37BB, 0x1563D6, 0x0AE78E, 0x142021, 0x0A4288,
+ 0x25BA1D, 0x345430, 0x2391FB, 0x31565C, 0x1FA000, 0x2BDD7A, 0x19ED8D, 0x23F68C,
+ 0x2951EF, 0x252FE4, 0x21E061, 0x1FC224, 0x129A87, 0x1BDE47, 0x0A9F44, 0x0EBBBA,
+ 0x1A4058, 0x17A026, 0x0EDEAB, 0x0D61E9, 0x314AEF, 0x2C5CBE, 0x2E798A, 0x29D380,
+ 0x210000, 0x19ED8D, 0x1C16AE, 0x1611AE, 0x11DC06, 0x097BEA, 0x0F3391, 0x07BFE7,
+ 0x141787, 0x0FC93E, 0x0B617F, 0x093D6D, 0x0B46C1, 0x05BFA8, 0x065D55, 0x037437,
+},
+{
+ 0x1C0000, 0x2943B2, 0x2E1E7C, 0x3FF810, 0x26DEC9, 0x250A43, 0x3F6DCE, 0x3915A3,
+ 0x1F8000, 0x18BFD8, 0x308BE1, 0x262485, 0x11FEA9, 0x092C75, 0x1A45EB, 0x0E1049,
+ 0x300425, 0x2785C6, 0x2F5439, 0x252FA8, 0x1B393F, 0x0DE0E4, 0x199D41, 0x0D0EDC,
+ 0x300425, 0x4299B2, 0x2D456E, 0x3ECB00, 0x284000, 0x37D40F, 0x20FFCB, 0x2DC56D,
+ 0x3496D3, 0x2F5439, 0x2B1D93, 0x286B74, 0x17AD66, 0x2377FE, 0x0D84E2, 0x12C062,
+ 0x21692A, 0x1E11A5, 0x12ECDA, 0x110840, 0x3EBC76, 0x387608, 0x3B2652, 0x353BBA,
+ 0x2A0000, 0x20FFCB, 0x23BFC6, 0x1C1681, 0x16BAF1, 0x0C1213, 0x1358E8, 0x09DCF8,
+ 0x19924F, 0x141767, 0x0E7C16, 0x0BC28A, 0x0E5A0D, 0x075104, 0x0819B2, 0x04655D,
+},
+{
+ 0x220000, 0x321B58, 0x380072, 0x4DAD38, 0x2F3318, 0x2CFA2D, 0x4D0556, 0x455122,
+ 0x264000, 0x1E0D86, 0x3AF2FE, 0x2E50EB, 0x15D9CE, 0x0B23B2, 0x1FE730, 0x1113C7,
+ 0x3A4E2D, 0x2FFDDF, 0x39788E, 0x2D2795, 0x210EA8, 0x10DA39, 0x1F1A61, 0x0FDB2F,
+ 0x3A4E2D, 0x50DF33, 0x36F8E1, 0x4C3FA5, 0x30E000, 0x43CAA5, 0x281209, 0x37944D,
+ 0x3FDBB7, 0x39788E, 0x345AC4, 0x3114C3, 0x1CC044, 0x2B11B4, 0x106A80, 0x16C509,
+ 0x2891FC, 0x248324, 0x16FB08, 0x14AE97, 0x4C2DFD, 0x448F54, 0x47D31B, 0x40A3F5,
+ 0x330000, 0x281209, 0x2B68DF, 0x221B53, 0x1B99DB, 0x0EA83B, 0x177E3E, 0x0BFA09,
+ 0x1F0D17, 0x18658F, 0x1196AE, 0x0E47A8, 0x116D5A, 0x08E260, 0x09D60F, 0x055684,
+},
+{
+ 0x2C0000, 0x40D818, 0x48790C, 0x6485D0, 0x3D14F2, 0x3A34B2, 0x63AC8D, 0x59B44A,
+ 0x318000, 0x26E454, 0x4C4986, 0x3BF03F, 0x1C470A, 0x0E6A6E, 0x29494D, 0x161998,
+ 0x4B743A, 0x3E1B5C, 0x4A5FC7, 0x3A6F75, 0x2AC7AC, 0x15CF1D, 0x284041, 0x148510,
+ 0x4B743A, 0x68A861, 0x4723F6, 0x62ACB8, 0x3F4000, 0x57BAF3, 0x33DB1A, 0x47ED19,
+ 0x52A3DE, 0x4A5FC7, 0x43C0C2, 0x3F8448, 0x25350D, 0x37BC8E, 0x153E87, 0x1D7775,
+ 0x3480B0, 0x2F404C, 0x1DBD56, 0x1AC3D2, 0x6295DE, 0x58B97B, 0x5CF313, 0x53A701,
+ 0x420000, 0x33DB1A, 0x382D5C, 0x2C235D, 0x23B80D, 0x12F7D4, 0x1E6723, 0x0F7FCF,
+ 0x282F0E, 0x1F927D, 0x16C2FF, 0x127AD9, 0x168D83, 0x0B7F50, 0x0CBAAA, 0x06E86E,
+},
+};
+
+} // End of namespace Video
+
+#endif // GRAPHICS_VIDEO_BINKDATA_H
diff --git a/video/codecs/cdtoons.cpp b/video/codecs/cdtoons.cpp
index 9bdc794fa6..528cee8094 100644
--- a/video/codecs/cdtoons.cpp
+++ b/video/codecs/cdtoons.cpp
@@ -24,6 +24,7 @@
#include "common/rect.h"
#include "common/stream.h"
#include "common/textconsole.h"
+#include "common/array.h"
namespace Video {
diff --git a/video/codecs/truemotion1.cpp b/video/codecs/truemotion1.cpp
index b8a3c0ab37..e475c8426c 100644
--- a/video/codecs/truemotion1.cpp
+++ b/video/codecs/truemotion1.cpp
@@ -112,7 +112,7 @@ TrueMotion1Decoder::~TrueMotion1Decoder() {
void TrueMotion1Decoder::selectDeltaTables(int deltaTableIndex) {
if (deltaTableIndex > 3)
return;
-
+
for (byte i = 0; i < 8; i++) {
_ydt[i] = ydts[deltaTableIndex][i];
_cdt[i] = cdts[deltaTableIndex][i];
diff --git a/video/codecs/truemotion1.h b/video/codecs/truemotion1.h
index 33fbedca93..628cfa4584 100644
--- a/video/codecs/truemotion1.h
+++ b/video/codecs/truemotion1.h
@@ -27,7 +27,7 @@
#ifndef VIDEO_CODECS_TRUEMOTION1_H
#define VIDEO_CODECS_TRUEMOTION1_H
-
+
#include "video/codecs/codec.h"
namespace Video {
@@ -51,7 +51,7 @@ private:
uint16 _width, _height;
int _flags;
-
+
struct PredictorTableEntry {
uint32 color;
bool getNextIndex;
diff --git a/video/module.mk b/video/module.mk
index d813218785..ceeac94384 100644
--- a/video/module.mk
+++ b/video/module.mk
@@ -19,5 +19,10 @@ MODULE_OBJS := \
codecs/smc.o \
codecs/truemotion1.o
+ifdef USE_BINK
+MODULE_OBJS += \
+ bink_decoder.o
+endif
+
# Include common rules
include $(srcdir)/rules.mk
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index 9575845cd3..f93f0d616e 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -134,7 +134,7 @@ uint32 QuickTimeDecoder::findKeyFrame(uint32 frame) const {
for (int i = _tracks[_videoTrackIndex]->keyframeCount - 1; i >= 0; i--)
if (_tracks[_videoTrackIndex]->keyframes[i] <= frame)
return _tracks[_videoTrackIndex]->keyframes[i];
-
+
// If none found, we'll assume the requested frame is a key frame
return frame;
}
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 05a20ecd8d..dce80eda2c 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -372,17 +372,11 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) {
_fileStream = stream;
- // Seek to the first frame
+ // Read in the Smacker header
_header.signature = _fileStream->readUint32BE();
- // No BINK support available
- if (_header.signature == MKTAG('B','I','K','i')) {
- delete _fileStream;
- _fileStream = 0;
+ if (_header.signature != MKTAG('S', 'M', 'K', '2') && _header.signature != MKTAG('S', 'M', 'K', '4'))
return false;
- }
-
- assert(_header.signature == MKTAG('S','M','K','2') || _header.signature == MKTAG('S','M','K','4'));
uint32 width = _fileStream->readUint32LE();
uint32 height = _fileStream->readUint32LE();