aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2011-05-11 00:30:02 -0400
committerMatthew Hoops2011-05-11 00:30:28 -0400
commita1d41da096c0bcf502a85919cb1cb1ee471719c5 (patch)
tree8c51419daa486f1d4833757db4715dadab6c3497
parentaccb0c2a5d0c9e7b353cda4b74f511a498ed8073 (diff)
parent33c3e19cea2a08fbf26ecbe940763e8ee1c37d28 (diff)
downloadscummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.gz
scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.tar.bz2
scummvm-rg350-a1d41da096c0bcf502a85919cb1cb1ee471719c5.zip
Merge remote branch 'upstream/master' into t7g-ios
Conflicts: audio/decoders/qdm2.h common/util.cpp engines/groovie/music.cpp engines/groovie/resource.h video/qt_decoder.cpp video/qt_decoder.h
-rw-r--r--.gitignore2
-rw-r--r--AUTHORS8
-rw-r--r--Makefile.common20
-rw-r--r--NEWS18
-rw-r--r--README2
-rw-r--r--audio/audiostream.cpp4
-rw-r--r--audio/audiostream.h4
-rw-r--r--audio/decoders/aac.cpp1
-rw-r--r--audio/decoders/adpcm.cpp76
-rw-r--r--audio/decoders/adpcm.h6
-rw-r--r--audio/decoders/adpcm_intern.h35
-rw-r--r--audio/decoders/aiff.cpp4
-rw-r--r--audio/decoders/aiff.h4
-rw-r--r--audio/decoders/flac.cpp1
-rw-r--r--audio/decoders/flac.h3
-rw-r--r--audio/decoders/iff_sound.cpp1
-rw-r--r--audio/decoders/iff_sound.h2
-rw-r--r--audio/decoders/mac_snd.cpp3
-rw-r--r--audio/decoders/mac_snd.h4
-rw-r--r--audio/decoders/mp3.cpp1
-rw-r--r--audio/decoders/mp3.h3
-rw-r--r--audio/decoders/qdm2.cpp3
-rw-r--r--audio/decoders/qdm2.h2
-rw-r--r--audio/decoders/quicktime.cpp1
-rw-r--r--audio/decoders/raw.cpp3
-rw-r--r--audio/decoders/raw.h6
-rw-r--r--audio/decoders/vag.h3
-rw-r--r--audio/decoders/voc.cpp2
-rw-r--r--audio/decoders/voc.h6
-rw-r--r--audio/decoders/vorbis.cpp6
-rw-r--r--audio/decoders/vorbis.h3
-rw-r--r--audio/decoders/wave.cpp3
-rw-r--r--audio/decoders/wave.h4
-rw-r--r--audio/fmopl.cpp1
-rw-r--r--audio/mididrv.cpp4
-rw-r--r--audio/mididrv.h7
-rw-r--r--audio/midiparser.cpp1
-rw-r--r--audio/midiparser.h1
-rw-r--r--audio/midiparser_smf.cpp2
-rw-r--r--audio/midiparser_xmidi.cpp2
-rw-r--r--audio/mixer.cpp57
-rw-r--r--audio/mixer.h23
-rw-r--r--audio/mixer_intern.h12
-rw-r--r--audio/mods/infogrames.cpp1
-rw-r--r--audio/mods/infogrames.h5
-rw-r--r--audio/mods/maxtrax.cpp2
-rw-r--r--audio/mods/module.cpp2
-rw-r--r--audio/mods/module.h6
-rw-r--r--audio/mods/protracker.cpp2
-rw-r--r--audio/mods/protracker.h4
-rw-r--r--audio/mods/rjp1.cpp4
-rw-r--r--audio/mods/rjp1.h4
-rw-r--r--audio/mods/soundfx.cpp3
-rw-r--r--audio/mods/soundfx.h4
-rw-r--r--audio/mods/tfmx.cpp2
-rw-r--r--audio/mpu401.h2
-rw-r--r--audio/musicplugin.h4
-rw-r--r--audio/null.cpp1
-rw-r--r--audio/rate.cpp1
-rw-r--r--audio/rate.h6
-rw-r--r--audio/rate_arm.cpp3
-rw-r--r--audio/softsynth/adlib.cpp376
-rw-r--r--audio/softsynth/eas.cpp3
-rw-r--r--audio/softsynth/fluidsynth.cpp3
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.cpp1
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_euphony.cpp13
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp1
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp2
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h2
-rw-r--r--audio/softsynth/mt32.cpp7
-rw-r--r--audio/softsynth/mt32/part.cpp4
-rw-r--r--audio/softsynth/mt32/part.h1
-rw-r--r--audio/softsynth/mt32/synth.cpp8
-rw-r--r--audio/softsynth/mt32/synth.h1
-rw-r--r--audio/softsynth/opl/dosbox.cpp1
-rw-r--r--audio/softsynth/opl/mame.cpp3
-rw-r--r--audio/softsynth/opl/mame.h1
-rw-r--r--audio/softsynth/pcspk.h1
-rw-r--r--audio/softsynth/sid.cpp29
-rw-r--r--audio/softsynth/sid.h12
-rw-r--r--audio/softsynth/ym2612.cpp4
-rw-r--r--backends/audiocd/sdl/sdl-audiocd.cpp1
-rw-r--r--backends/events/default/default-events.h4
-rw-r--r--backends/events/sdl/sdl-events.cpp3
-rw-r--r--backends/events/webossdl/webossdl-events.cpp18
-rw-r--r--backends/fs/amigaos4/amigaos4-fs-factory.cpp3
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp89
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.h113
-rw-r--r--backends/fs/n64/n64-fs-factory.cpp3
-rw-r--r--backends/fs/n64/n64-fs-factory.h1
-rw-r--r--backends/fs/n64/n64-fs.cpp55
-rw-r--r--backends/fs/n64/n64-fs.h80
-rw-r--r--backends/fs/posix/posix-fs-factory.cpp9
-rw-r--r--backends/fs/posix/posix-fs.cpp10
-rw-r--r--backends/fs/posix/posix-fs.h2
-rw-r--r--backends/fs/ps2/ps2-fs-factory.cpp3
-rw-r--r--backends/fs/ps2/ps2-fs-factory.h3
-rw-r--r--backends/fs/ps2/ps2-fs.cpp90
-rw-r--r--backends/fs/ps2/ps2-fs.h105
-rw-r--r--backends/fs/psp/psp-fs-factory.cpp25
-rw-r--r--backends/fs/psp/psp-fs.cpp68
-rw-r--r--backends/fs/psp/psp-fs.h72
-rw-r--r--backends/fs/symbian/symbian-fs-factory.cpp2
-rw-r--r--backends/fs/symbian/symbian-fs.cpp136
-rw-r--r--backends/fs/symbian/symbian-fs.h73
-rw-r--r--backends/fs/wii/wii-fs-factory.cpp5
-rw-r--r--backends/fs/wii/wii-fs.cpp58
-rw-r--r--backends/fs/wii/wii-fs.h76
-rw-r--r--backends/fs/windows/windows-fs-factory.cpp6
-rw-r--r--backends/fs/windows/windows-fs.cpp113
-rw-r--r--backends/fs/windows/windows-fs.h123
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp7
-rw-r--r--backends/graphics/gph/gph-graphics.cpp7
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp7
-rw-r--r--backends/graphics/opengl/gltexture.h3
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp33
-rw-r--r--backends/graphics/opengl/opengl-graphics.h2
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp5
-rw-r--r--backends/graphics/openpandora/op-graphics.cpp1
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp15
-rw-r--r--backends/graphics/sdl/sdl-graphics.h1
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.cpp1
-rw-r--r--backends/keymapper/hardware-key.h1
-rw-r--r--backends/keymapper/remap-dialog.cpp1
-rw-r--r--backends/keymapper/remap-dialog.h6
-rw-r--r--backends/midi/alsa.cpp12
-rw-r--r--backends/midi/camd.cpp16
-rw-r--r--backends/midi/coreaudio.cpp2
-rw-r--r--backends/midi/coremidi.cpp2
-rw-r--r--backends/midi/dmedia.cpp5
-rw-r--r--backends/midi/seq.cpp2
-rw-r--r--backends/midi/timidity.cpp6
-rw-r--r--backends/midi/windows.cpp2
-rw-r--r--backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp2
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp2
-rw-r--r--backends/mixer/wincesdl/wincesdl-mixer.cpp5
-rw-r--r--backends/modular-backend.cpp10
-rw-r--r--backends/module.mk149
-rw-r--r--backends/platform/android/android.cpp18
-rw-r--r--backends/platform/android/android.h1
-rw-r--r--backends/platform/android/asset-archive.cpp1
-rw-r--r--backends/platform/android/events.cpp25
-rw-r--r--backends/platform/android/gfx.cpp21
-rw-r--r--backends/platform/android/jni.cpp19
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/ScummVM.java2
-rw-r--r--backends/platform/android/texture.cpp33
-rw-r--r--backends/platform/dc/Makefile2
-rw-r--r--backends/platform/dc/dc-fs.cpp2
-rw-r--r--backends/platform/dc/dc.h18
-rw-r--r--backends/platform/dc/dcmain.cpp8
-rw-r--r--backends/platform/dc/display.cpp2
-rw-r--r--backends/platform/dc/dreamcast.mk4
-rw-r--r--backends/platform/dc/module.mk2
-rw-r--r--backends/platform/dc/plugins.cpp (renamed from backends/plugins/dc/dc-provider.cpp)47
-rw-r--r--backends/platform/dc/selector.cpp2
-rw-r--r--backends/platform/dc/vmsave.cpp5
-rw-r--r--backends/platform/dingux/main.cpp2
-rw-r--r--backends/platform/ds/arm9/source/fat/gba_nds_fat.c3
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp31
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h3
-rw-r--r--backends/platform/ds/ds.mk4
-rw-r--r--backends/platform/ds/makefile2
-rw-r--r--backends/platform/gph/gph-backend.cpp22
-rw-r--r--backends/platform/gph/gph-sdl.h1
-rw-r--r--backends/platform/iphone/osys_main.h3
-rw-r--r--backends/platform/iphone/osys_video.cpp6
-rw-r--r--backends/platform/n64/osys_n64.h3
-rw-r--r--backends/platform/n64/osys_n64_base.cpp38
-rw-r--r--backends/platform/n64/osys_n64_events.cpp15
-rwxr-xr-x[-rw-r--r--]backends/platform/n64/pad_rom.sh0
-rw-r--r--backends/platform/openpandora/op-backend.cpp17
-rw-r--r--backends/platform/openpandora/op-sdl.h1
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp6
-rw-r--r--backends/platform/ps2/Gs2dScreen.h2
-rw-r--r--backends/platform/ps2/irxboot.cpp2
-rw-r--r--backends/platform/ps2/ps2input.cpp2
-rw-r--r--backends/platform/ps2/ps2input.h4
-rw-r--r--backends/platform/ps2/ps2mutex.cpp2
-rw-r--r--backends/platform/ps2/ps2pad.cpp2
-rw-r--r--backends/platform/ps2/ps2time.cpp2
-rw-r--r--backends/platform/ps2/savefilemgr.cpp4
-rw-r--r--backends/platform/ps2/systemps2.cpp7
-rw-r--r--backends/platform/ps2/systemps2.h9
-rw-r--r--backends/platform/psp/README.PSP2
-rw-r--r--backends/platform/psp/cursor.cpp16
-rw-r--r--backends/platform/psp/default_display_client.cpp2
-rw-r--r--backends/platform/psp/display_client.cpp14
-rw-r--r--backends/platform/psp/mp3.cpp14
-rw-r--r--backends/platform/psp/mp3.h2
-rw-r--r--backends/platform/psp/osys_psp.cpp3
-rw-r--r--backends/platform/psp/osys_psp.h1
-rw-r--r--backends/platform/psp/portdefs.h6
-rw-r--r--backends/platform/psp/psp_main.cpp14
-rw-r--r--backends/platform/psp/trace.cpp13
-rw-r--r--backends/platform/samsungtv/main.cpp2
-rw-r--r--backends/platform/sdl/posix/posix.cpp4
-rw-r--r--backends/platform/sdl/sdl.cpp17
-rw-r--r--backends/platform/sdl/win32/win32.cpp88
-rw-r--r--backends/platform/sdl/win32/win32.h1
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl5
-rw-r--r--backends/platform/symbian/BuildPackageUpload_LocalSettings.pl9
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in5
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in5
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in5
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in5
-rw-r--r--backends/platform/symbian/mmp/scummvm_base.mmp.in4
-rw-r--r--backends/platform/symbian/mmp/scummvm_tsage.mmp.in64
-rw-r--r--backends/platform/symbian/src/portdefs.h5
-rw-r--r--backends/platform/symbian/src/vsnprintf.h805
-rw-r--r--backends/platform/webos/main.cpp2
-rw-r--r--backends/platform/webos/webos.mk105
-rw-r--r--backends/platform/wii/main.cpp4
-rw-r--r--backends/platform/wii/osystem.cpp7
-rw-r--r--backends/platform/wii/osystem.h2
-rw-r--r--backends/platform/wii/osystem_events.cpp2
-rw-r--r--backends/platform/wii/osystem_gfx.cpp6
-rw-r--r--backends/platform/wii/osystem_sfx.cpp2
-rw-r--r--backends/platform/wince/wince-sdl.cpp1
-rw-r--r--backends/plugins/dynamic-plugin.h1
-rw-r--r--backends/plugins/elf/memory-manager.cpp1
-rw-r--r--backends/plugins/sdl/sdl-provider.h2
-rw-r--r--backends/saves/default/default-saves.cpp8
-rw-r--r--backends/saves/posix/posix-saves.cpp6
-rw-r--r--backends/saves/psp/psp-saves.cpp14
-rw-r--r--backends/saves/savefile.cpp4
-rw-r--r--backends/timer/default/default-timer.h2
-rw-r--r--backends/timer/psp/timer.cpp14
-rw-r--r--backends/timer/sdl/sdl-timer.cpp2
-rw-r--r--backends/vkeybd/image-map.cpp2
-rw-r--r--backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml2
-rw-r--r--backends/vkeybd/virtual-keyboard-gui.cpp12
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.cpp2
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.h2
-rw-r--r--backends/vkeybd/virtual-keyboard.cpp5
-rw-r--r--backends/vkeybd/virtual-keyboard.h2
-rw-r--r--base/commandLine.cpp35
-rw-r--r--base/commandLine.h12
-rw-r--r--base/internal_revision.h.in6
-rw-r--r--base/internal_version.h8
-rw-r--r--base/internal_version.h.in6
-rw-r--r--base/main.cpp41
-rw-r--r--base/plugins.h10
-rw-r--r--common/EventRecorder.cpp1
-rw-r--r--common/archive.cpp2
-rw-r--r--common/archive.h1
-rw-r--r--common/bufferedstream.h1
-rw-r--r--common/config-file.cpp2
-rw-r--r--common/config-file.h6
-rw-r--r--common/config-manager.cpp3
-rw-r--r--common/dcl.cpp4
-rw-r--r--common/debug.cpp2
-rw-r--r--common/endian.h44
-rw-r--r--common/error.cpp89
-rw-r--r--common/error.h58
-rw-r--r--common/file.cpp3
-rw-r--r--common/file.h2
-rw-r--r--common/forbidden.h153
-rw-r--r--common/fs.cpp2
-rw-r--r--common/fs.h2
-rw-r--r--common/hashmap.h2
-rw-r--r--common/iff_container.h2
-rw-r--r--common/macresman.cpp125
-rw-r--r--common/macresman.h24
-rw-r--r--common/md5.cpp4
-rw-r--r--common/md5.h2
-rw-r--r--common/memstream.h1
-rw-r--r--common/quicktime.cpp1
-rw-r--r--common/scummsys.h322
-rw-r--r--common/stream.cpp10
-rw-r--r--common/stream.h4
-rw-r--r--common/substream.h22
-rw-r--r--common/system.cpp1
-rw-r--r--common/system.h26
-rw-r--r--common/textconsole.cpp1
-rw-r--r--common/textconsole.h2
-rw-r--r--common/translation.cpp2
-rw-r--r--common/translation.h4
-rw-r--r--common/unarj.cpp2
-rw-r--r--common/unarj.h3
-rw-r--r--common/unzip.cpp38
-rw-r--r--common/unzip.h3
-rw-r--r--common/util.cpp4
-rw-r--r--common/util.h1
-rw-r--r--common/winexe.h3
-rw-r--r--common/winexe_ne.h5
-rw-r--r--common/winexe_pe.cpp5
-rw-r--r--common/winexe_pe.h5
-rw-r--r--common/xmlparser.cpp8
-rw-r--r--common/xmlparser.h2
-rw-r--r--common/zlib.cpp3
-rwxr-xr-xconfigure170
-rw-r--r--devtools/create_drascula/staticdata.h2
-rw-r--r--devtools/create_lure/create_lure_dat.cpp2
-rw-r--r--devtools/create_lure/create_lure_dat.h4
-rw-r--r--devtools/create_project/codeblocks.cpp47
-rw-r--r--devtools/create_project/codeblocks/create_project.cbp1
-rw-r--r--devtools/create_project/config.h (renamed from backends/plugins/dc/dc-provider.h)28
-rw-r--r--devtools/create_project/create_project.cpp172
-rw-r--r--devtools/create_project/create_project.h44
-rw-r--r--devtools/create_project/msbuild.cpp230
-rw-r--r--devtools/create_project/msbuild.h5
-rw-r--r--devtools/create_project/msvc.cpp35
-rw-r--r--devtools/create_project/msvc.h12
-rw-r--r--devtools/create_project/msvc10/create_project.vcxproj2
-rw-r--r--devtools/create_project/msvc10/create_project.vcxproj.filters6
-rw-r--r--devtools/create_project/msvc8/create_project.vcproj8
-rw-r--r--devtools/create_project/msvc9/create_project.vcproj8
-rw-r--r--devtools/create_project/scripts/installer.vbs196
-rw-r--r--devtools/create_project/scripts/postbuild.cmd54
-rw-r--r--devtools/create_project/scripts/prebuild.cmd16
-rw-r--r--devtools/create_project/scripts/revision.vbs111
-rw-r--r--devtools/create_project/visualstudio.cpp127
-rw-r--r--devtools/create_project/visualstudio.h6
-rwxr-xr-xdevtools/credits.pl11
-rw-r--r--devtools/scumm-md5.txt1
-rwxr-xr-xdevtools/update-version.pl1
-rw-r--r--dists/android/AndroidManifest.xml2
-rw-r--r--dists/android/plugin-manifest.xml2
-rw-r--r--dists/engine-data/drascula.datbin218799 -> 218771 bytes
-rw-r--r--dists/iphone/Info.plist4
-rw-r--r--dists/irix/scummvm.spec2
-rw-r--r--dists/macosx/Info.plist6
-rw-r--r--dists/nsis/graphics/left.bmpbin0 -> 154542 bytes
-rw-r--r--dists/nsis/graphics/scummvm-install.icobin0 -> 15086 bytes
-rw-r--r--dists/nsis/scummvm.nsi351
-rw-r--r--dists/nsis/scummvm.nsi.in351
-rw-r--r--dists/redhat/scummvm-tools.spec2
-rw-r--r--dists/redhat/scummvm.spec2
-rw-r--r--dists/scummvm.rc52
-rw-r--r--dists/scummvm.rc.in44
-rwxr-xr-xdists/slackware/scummvm.SlackBuild2
-rw-r--r--dists/webos/mojo/appinfo.json6
-rw-r--r--dists/webos/mojo/scummvmrc-default4
-rwxr-xr-xdists/webos/mojo/start10
-rw-r--r--dists/wii/meta.xml2
-rw-r--r--dists/win32/ScummVM.iss82
-rw-r--r--engines/advancedDetector.cpp4
-rw-r--r--engines/advancedDetector.h12
-rw-r--r--engines/agi/agi.cpp1
-rw-r--r--engines/agi/agi.h14
-rw-r--r--engines/agi/detection.cpp4
-rw-r--r--engines/agi/graphics.cpp11
-rw-r--r--engines/agi/inv.cpp2
-rw-r--r--engines/agi/keyboard.cpp4
-rw-r--r--engines/agi/loader_v2.cpp2
-rw-r--r--engines/agi/loader_v3.cpp1
-rw-r--r--engines/agi/lzw.cpp2
-rw-r--r--engines/agi/menu.cpp2
-rw-r--r--engines/agi/objects.cpp2
-rw-r--r--engines/agi/op_cmd.cpp1
-rw-r--r--engines/agi/op_test.cpp6
-rw-r--r--engines/agi/picture.cpp8
-rw-r--r--engines/agi/preagi.cpp1
-rw-r--r--engines/agi/preagi_mickey.cpp1
-rw-r--r--engines/agi/preagi_troll.cpp1
-rw-r--r--engines/agi/preagi_winnie.cpp52
-rw-r--r--engines/agi/preagi_winnie.h2
-rw-r--r--engines/agi/predictive.cpp1
-rw-r--r--engines/agi/saveload.cpp25
-rw-r--r--engines/agi/sound.cpp2
-rw-r--r--engines/agi/sound_2gs.cpp1
-rw-r--r--engines/agi/sound_midi.cpp1
-rw-r--r--engines/agi/sound_sarien.cpp4
-rw-r--r--engines/agi/text.cpp4
-rw-r--r--engines/agi/wagparser.cpp1
-rw-r--r--engines/agi/words.cpp2
-rw-r--r--engines/agos/agos.cpp22
-rw-r--r--engines/agos/agos.h7
-rw-r--r--engines/agos/animation.cpp2
-rw-r--r--engines/agos/charset-fontdata.cpp1
-rw-r--r--engines/agos/debug.cpp1
-rw-r--r--engines/agos/debug.h2
-rw-r--r--engines/agos/detection.cpp1
-rw-r--r--engines/agos/draw.cpp1
-rw-r--r--engines/agos/event.cpp1
-rw-r--r--engines/agos/gfx.cpp1
-rw-r--r--engines/agos/icons.cpp4
-rw-r--r--engines/agos/items.cpp1
-rw-r--r--engines/agos/menus.cpp1
-rw-r--r--engines/agos/midi.cpp1
-rw-r--r--engines/agos/midi.h2
-rw-r--r--engines/agos/midiparser_s1d.cpp1
-rw-r--r--engines/agos/res.cpp1
-rw-r--r--engines/agos/res_snd.cpp1
-rw-r--r--engines/agos/rooms.cpp1
-rw-r--r--engines/agos/saveload.cpp1
-rw-r--r--engines/agos/script.cpp1
-rw-r--r--engines/agos/script_dp.cpp2
-rw-r--r--engines/agos/script_ff.cpp6
-rw-r--r--engines/agos/script_pn.cpp2
-rw-r--r--engines/agos/script_s1.cpp2
-rw-r--r--engines/agos/script_s2.cpp2
-rw-r--r--engines/agos/sound.cpp1
-rw-r--r--engines/agos/string.cpp1
-rw-r--r--engines/agos/string_pn.cpp2
-rw-r--r--engines/agos/subroutine.cpp1
-rw-r--r--engines/agos/vga.cpp1
-rw-r--r--engines/agos/vga_e2.cpp1
-rw-r--r--engines/agos/vga_ff.cpp4
-rw-r--r--engines/agos/vga_ww.cpp1
-rw-r--r--engines/agos/window.cpp1
-rw-r--r--engines/cine/anim.cpp1
-rw-r--r--engines/cine/bg.cpp1
-rw-r--r--engines/cine/cine.cpp4
-rw-r--r--engines/cine/detection.cpp1
-rw-r--r--engines/cine/gfx.cpp3
-rw-r--r--engines/cine/msg.cpp1
-rw-r--r--engines/cine/pal.cpp3
-rw-r--r--engines/cine/part.cpp1
-rw-r--r--engines/cine/saveload.cpp1
-rw-r--r--engines/cine/script_fw.cpp1
-rw-r--r--engines/cine/script_os.cpp1
-rw-r--r--engines/cine/sound.cpp2
-rw-r--r--engines/cine/sound.h2
-rw-r--r--engines/cine/texte.cpp4
-rw-r--r--engines/cine/various.cpp1
-rw-r--r--engines/cruise/actor.cpp2
-rw-r--r--engines/cruise/background.cpp2
-rw-r--r--engines/cruise/cruise.cpp5
-rw-r--r--engines/cruise/cruise.h1
-rw-r--r--engines/cruise/cruise_main.cpp1
-rw-r--r--engines/cruise/ctp.cpp2
-rw-r--r--engines/cruise/ctp.h2
-rw-r--r--engines/cruise/dataLoader.cpp1
-rw-r--r--engines/cruise/detection.cpp3
-rw-r--r--engines/cruise/font.cpp4
-rw-r--r--engines/cruise/font.h2
-rw-r--r--engines/cruise/function.cpp2
-rw-r--r--engines/cruise/gfxModule.cpp10
-rw-r--r--engines/cruise/gfxModule.h4
-rw-r--r--engines/cruise/menu.cpp1
-rw-r--r--engines/cruise/object.cpp2
-rw-r--r--engines/cruise/overlay.cpp1
-rw-r--r--engines/cruise/saveload.cpp1
-rw-r--r--engines/cruise/script.cpp1
-rw-r--r--engines/cruise/sound.cpp2
-rw-r--r--engines/dialogs.cpp12
-rw-r--r--engines/dialogs.h8
-rw-r--r--engines/draci/animation.cpp7
-rw-r--r--engines/draci/font.cpp30
-rw-r--r--engines/draci/font.h26
-rw-r--r--engines/draci/game.cpp36
-rw-r--r--engines/draci/game.h6
-rw-r--r--engines/draci/mouse.cpp6
-rw-r--r--engines/draci/music.cpp1
-rw-r--r--engines/draci/screen.cpp20
-rw-r--r--engines/draci/screen.h2
-rw-r--r--engines/draci/script.cpp8
-rw-r--r--engines/draci/script.h2
-rw-r--r--engines/draci/sound.cpp10
-rw-r--r--engines/draci/sprite.cpp10
-rw-r--r--engines/draci/sprite.h6
-rw-r--r--engines/draci/surface.cpp10
-rw-r--r--engines/draci/surface.h13
-rw-r--r--engines/draci/walking.cpp14
-rw-r--r--engines/draci/walking.h6
-rw-r--r--engines/drascula/converse.cpp2
-rw-r--r--engines/drascula/drascula.cpp1
-rw-r--r--engines/drascula/drascula.h4
-rw-r--r--engines/drascula/graphics.cpp64
-rw-r--r--engines/drascula/objects.cpp2
-rw-r--r--engines/drascula/palette.cpp2
-rw-r--r--engines/drascula/rooms.cpp4
-rw-r--r--engines/drascula/saveload.cpp2
-rw-r--r--engines/drascula/sound.cpp1
-rw-r--r--engines/engine.cpp27
-rw-r--r--engines/engine.h14
-rw-r--r--engines/game.cpp1
-rw-r--r--engines/game.h2
-rw-r--r--engines/gob/databases.cpp1
-rw-r--r--engines/gob/dataio.cpp6
-rw-r--r--engines/gob/dataio.h2
-rw-r--r--engines/gob/detection_tables.h28
-rw-r--r--engines/gob/draw_v2.cpp9
-rw-r--r--engines/gob/gob.cpp3
-rw-r--r--engines/gob/gob.h4
-rw-r--r--engines/gob/inter_v1.cpp2
-rw-r--r--engines/gob/inter_v4.cpp2
-rw-r--r--engines/gob/inter_v5.cpp3
-rw-r--r--engines/gob/inter_v6.cpp2
-rw-r--r--engines/gob/resources.h2
-rw-r--r--engines/gob/save/savefile.cpp2
-rw-r--r--engines/gob/save/savehandler.cpp4
-rw-r--r--engines/gob/save/saveload.cpp3
-rw-r--r--engines/gob/save/saveload_v6.cpp3
-rw-r--r--engines/gob/sound/adlib.cpp2
-rw-r--r--engines/gob/sound/bgatmosphere.cpp2
-rw-r--r--engines/gob/sound/cdrom.cpp1
-rw-r--r--engines/gob/sound/infogrames.cpp2
-rw-r--r--engines/gob/sound/sounddesc.cpp2
-rw-r--r--engines/gob/sound/soundmixer.cpp2
-rw-r--r--engines/gob/surface.cpp2
-rw-r--r--engines/gob/surface.h2
-rw-r--r--engines/gob/totfile.h2
-rw-r--r--engines/gob/util.cpp2
-rw-r--r--engines/gob/video.cpp1
-rw-r--r--engines/gob/videoplayer.cpp2
-rw-r--r--engines/groovie/cursor.cpp3
-rw-r--r--engines/groovie/cursor.h2
-rw-r--r--engines/groovie/debug.cpp2
-rw-r--r--engines/groovie/font.cpp4
-rw-r--r--engines/groovie/graphics.cpp8
-rw-r--r--engines/groovie/groovie.cpp2
-rw-r--r--engines/groovie/groovie.h2
-rw-r--r--engines/groovie/music.cpp3
-rw-r--r--engines/groovie/player.cpp2
-rw-r--r--engines/groovie/resource.cpp47
-rw-r--r--engines/groovie/resource.h9
-rw-r--r--engines/groovie/roq.cpp17
-rw-r--r--engines/groovie/script.cpp22
-rw-r--r--engines/groovie/script.h4
-rw-r--r--engines/groovie/vdx.cpp91
-rw-r--r--engines/groovie/vdx.h8
-rw-r--r--engines/hugo/detection.cpp1
-rw-r--r--engines/hugo/dialogs.cpp68
-rw-r--r--engines/hugo/dialogs.h6
-rw-r--r--engines/hugo/display.cpp6
-rw-r--r--engines/hugo/file.cpp12
-rw-r--r--engines/hugo/file_v1d.cpp2
-rw-r--r--engines/hugo/file_v1w.cpp2
-rw-r--r--engines/hugo/file_v2d.cpp10
-rw-r--r--engines/hugo/file_v3d.cpp2
-rw-r--r--engines/hugo/hugo.cpp16
-rw-r--r--engines/hugo/hugo.h4
-rw-r--r--engines/hugo/intro.cpp7
-rw-r--r--engines/hugo/inventory.cpp1
-rw-r--r--engines/hugo/mouse.cpp2
-rw-r--r--engines/hugo/object.cpp3
-rw-r--r--engines/hugo/object_v1d.cpp1
-rw-r--r--engines/hugo/object_v1w.cpp1
-rw-r--r--engines/hugo/object_v2d.cpp1
-rw-r--r--engines/hugo/object_v3d.cpp1
-rw-r--r--engines/hugo/parser.cpp11
-rw-r--r--engines/hugo/parser.h5
-rw-r--r--engines/hugo/parser_v1d.cpp1
-rw-r--r--engines/hugo/parser_v1w.cpp3
-rw-r--r--engines/hugo/parser_v2d.cpp3
-rw-r--r--engines/hugo/parser_v3d.cpp3
-rw-r--r--engines/hugo/route.cpp1
-rw-r--r--engines/hugo/schedule.cpp59
-rw-r--r--engines/hugo/sound.cpp2
-rw-r--r--engines/hugo/util.cpp3
-rw-r--r--engines/kyra/animator_hof.cpp2
-rw-r--r--engines/kyra/animator_lok.cpp5
-rw-r--r--engines/kyra/animator_mr.cpp2
-rw-r--r--engines/kyra/animator_tim.cpp5
-rw-r--r--engines/kyra/animator_v2.cpp3
-rw-r--r--engines/kyra/debugger.cpp7
-rw-r--r--engines/kyra/detection.cpp6
-rw-r--r--engines/kyra/gui.cpp2
-rw-r--r--engines/kyra/gui_hof.cpp8
-rw-r--r--engines/kyra/gui_lok.cpp9
-rw-r--r--engines/kyra/gui_lok.h1
-rw-r--r--engines/kyra/gui_lol.cpp4
-rw-r--r--engines/kyra/gui_mr.cpp5
-rw-r--r--engines/kyra/gui_v2.cpp2
-rw-r--r--engines/kyra/items_hof.cpp2
-rw-r--r--engines/kyra/items_lok.cpp8
-rw-r--r--engines/kyra/items_mr.cpp2
-rw-r--r--engines/kyra/kyra_hof.cpp7
-rw-r--r--engines/kyra/kyra_lok.cpp21
-rw-r--r--engines/kyra/kyra_lok.h4
-rw-r--r--engines/kyra/kyra_mr.cpp5
-rw-r--r--engines/kyra/kyra_v1.cpp15
-rw-r--r--engines/kyra/kyra_v1.h9
-rw-r--r--engines/kyra/kyra_v2.cpp7
-rw-r--r--engines/kyra/lol.cpp14
-rw-r--r--engines/kyra/lol.h5
-rw-r--r--engines/kyra/resource.cpp4
-rw-r--r--engines/kyra/saveload.cpp12
-rw-r--r--engines/kyra/saveload_hof.cpp12
-rw-r--r--engines/kyra/saveload_lok.cpp7
-rw-r--r--engines/kyra/saveload_lol.cpp3
-rw-r--r--engines/kyra/scene_hof.cpp4
-rw-r--r--engines/kyra/scene_lok.cpp6
-rw-r--r--engines/kyra/scene_lol.cpp2
-rw-r--r--engines/kyra/scene_mr.cpp3
-rw-r--r--engines/kyra/scene_v1.cpp1
-rw-r--r--engines/kyra/scene_v2.cpp3
-rw-r--r--engines/kyra/screen.cpp8
-rw-r--r--engines/kyra/screen_hof.cpp4
-rw-r--r--engines/kyra/screen_lok.cpp6
-rw-r--r--engines/kyra/screen_lol.cpp5
-rw-r--r--engines/kyra/screen_mr.cpp1
-rw-r--r--engines/kyra/script.cpp10
-rw-r--r--engines/kyra/script_hof.cpp7
-rw-r--r--engines/kyra/script_lok.cpp7
-rw-r--r--engines/kyra/script_lol.cpp3
-rw-r--r--engines/kyra/script_mr.cpp6
-rw-r--r--engines/kyra/script_tim.cpp4
-rw-r--r--engines/kyra/script_tim.h1
-rw-r--r--engines/kyra/script_v1.cpp2
-rw-r--r--engines/kyra/script_v2.cpp2
-rw-r--r--engines/kyra/seqplayer.cpp11
-rw-r--r--engines/kyra/sequences_hof.cpp6
-rw-r--r--engines/kyra/sequences_lok.cpp4
-rw-r--r--engines/kyra/sequences_lol.cpp3
-rw-r--r--engines/kyra/sequences_v2.cpp2
-rw-r--r--engines/kyra/sound.cpp7
-rw-r--r--engines/kyra/sound_adlib.cpp25
-rw-r--r--engines/kyra/sound_amiga.cpp5
-rw-r--r--engines/kyra/sound_lok.cpp4
-rw-r--r--engines/kyra/sound_lol.cpp4
-rw-r--r--engines/kyra/sound_towns.cpp9
-rw-r--r--engines/kyra/sprites.cpp12
-rw-r--r--engines/kyra/staticres.cpp9
-rw-r--r--engines/kyra/text.cpp6
-rw-r--r--engines/kyra/text_hof.cpp4
-rw-r--r--engines/kyra/text_lok.cpp5
-rw-r--r--engines/kyra/text_lol.cpp5
-rw-r--r--engines/kyra/text_lol.h4
-rw-r--r--engines/kyra/text_mr.cpp3
-rw-r--r--engines/kyra/timer.cpp4
-rw-r--r--engines/kyra/timer_lok.cpp4
-rw-r--r--engines/kyra/timer_lol.cpp3
-rw-r--r--engines/kyra/timer_mr.cpp2
-rw-r--r--engines/kyra/vqa.cpp6
-rw-r--r--engines/kyra/wsamovie.cpp11
-rw-r--r--engines/kyra/wsamovie.h4
-rw-r--r--engines/lastexpress/data/animation.cpp5
-rw-r--r--engines/lastexpress/data/archive.h3
-rw-r--r--engines/lastexpress/data/background.cpp1
-rw-r--r--engines/lastexpress/data/font.cpp2
-rw-r--r--engines/lastexpress/data/font.h2
-rw-r--r--engines/lastexpress/data/scene.cpp1
-rw-r--r--engines/lastexpress/data/scene.h6
-rw-r--r--engines/lastexpress/data/sequence.cpp3
-rw-r--r--engines/lastexpress/data/sequence.h2
-rw-r--r--engines/lastexpress/data/snd.cpp40
-rw-r--r--engines/lastexpress/data/snd.h4
-rw-r--r--engines/lastexpress/data/subtitle.cpp2
-rw-r--r--engines/lastexpress/entities/entity.h1
-rw-r--r--engines/lastexpress/game/inventory.cpp193
-rw-r--r--engines/lastexpress/game/inventory.h18
-rw-r--r--engines/lastexpress/game/logic.cpp28
-rw-r--r--engines/lastexpress/game/state.h8
-rw-r--r--engines/lastexpress/graphics.cpp13
-rw-r--r--engines/lastexpress/lastexpress.cpp3
-rw-r--r--engines/lastexpress/resource.cpp1
-rw-r--r--engines/lure/debugger.cpp4
-rw-r--r--engines/lure/decode.cpp6
-rw-r--r--engines/lure/disk.h2
-rw-r--r--engines/lure/fights.cpp6
-rw-r--r--engines/lure/hotspots.cpp28
-rw-r--r--engines/lure/hotspots.h6
-rw-r--r--engines/lure/lure.h2
-rw-r--r--engines/lure/luredefs.h14
-rw-r--r--engines/lure/memory.cpp1
-rw-r--r--engines/lure/menu.cpp36
-rw-r--r--engines/lure/palette.cpp4
-rw-r--r--engines/lure/res.cpp2
-rw-r--r--engines/lure/res_struct.cpp2
-rw-r--r--engines/lure/res_struct.h6
-rw-r--r--engines/lure/room.cpp6
-rw-r--r--engines/lure/screen.cpp8
-rw-r--r--engines/lure/sound.h1
-rw-r--r--engines/lure/surface.cpp88
-rw-r--r--engines/lure/surface.h16
-rw-r--r--engines/m4/actor.cpp3
-rw-r--r--engines/m4/animation.cpp4
-rw-r--r--engines/m4/compression.cpp1
-rw-r--r--engines/m4/console.cpp2
-rw-r--r--engines/m4/converse.cpp5
-rw-r--r--engines/m4/detection.cpp15
-rw-r--r--engines/m4/dialogs.cpp9
-rw-r--r--engines/m4/events.cpp2
-rw-r--r--engines/m4/font.cpp8
-rw-r--r--engines/m4/font.h4
-rw-r--r--engines/m4/globals.cpp2
-rw-r--r--engines/m4/graphics.cpp31
-rw-r--r--engines/m4/graphics.h33
-rw-r--r--engines/m4/gui.cpp13
-rw-r--r--engines/m4/m4.cpp12
-rw-r--r--engines/m4/m4_menus.cpp1
-rw-r--r--engines/m4/m4_scene.cpp15
-rw-r--r--engines/m4/m4_scene.h6
-rw-r--r--engines/m4/m4_views.cpp2
-rw-r--r--engines/m4/mads_anim.cpp4
-rw-r--r--engines/m4/mads_logic.cpp2
-rw-r--r--engines/m4/mads_menus.cpp22
-rw-r--r--engines/m4/mads_scene.cpp11
-rw-r--r--engines/m4/mads_views.cpp21
-rw-r--r--engines/m4/mads_views.h12
-rw-r--r--engines/m4/midi.cpp1
-rw-r--r--engines/m4/resource.cpp1
-rw-r--r--engines/m4/scene.cpp2
-rw-r--r--engines/m4/script.cpp1
-rw-r--r--engines/m4/sound.cpp1
-rw-r--r--engines/m4/sprite.cpp11
-rw-r--r--engines/m4/woodscript.cpp1
-rw-r--r--engines/m4/woodscript.h6
-rw-r--r--engines/m4/ws_sequence.cpp2
-rw-r--r--engines/made/database.cpp1
-rw-r--r--engines/made/graphics.cpp2
-rw-r--r--engines/made/made.cpp2
-rw-r--r--engines/made/music.cpp2
-rw-r--r--engines/made/pmvplayer.cpp2
-rw-r--r--engines/made/redreader.cpp1
-rw-r--r--engines/made/resource.cpp7
-rw-r--r--engines/made/resource.h1
-rw-r--r--engines/made/screen.cpp8
-rw-r--r--engines/made/script.h1
-rw-r--r--engines/made/scriptfuncs.cpp2
-rw-r--r--engines/made/scriptfuncs.h2
-rw-r--r--engines/metaengine.h4
-rw-r--r--engines/mohawk/bitmap.cpp22
-rw-r--r--engines/mohawk/console.cpp3
-rw-r--r--engines/mohawk/cstime.cpp5
-rw-r--r--engines/mohawk/cstime_cases.cpp2
-rw-r--r--engines/mohawk/cstime_game.cpp2
-rw-r--r--engines/mohawk/cstime_ui.cpp2
-rw-r--r--engines/mohawk/cstime_view.cpp2
-rw-r--r--engines/mohawk/cursors.cpp71
-rw-r--r--engines/mohawk/cursors.h14
-rw-r--r--engines/mohawk/detection.cpp5
-rw-r--r--engines/mohawk/detection_tables.h97
-rw-r--r--engines/mohawk/dialogs.cpp4
-rw-r--r--engines/mohawk/graphics.cpp17
-rw-r--r--engines/mohawk/graphics.h2
-rw-r--r--engines/mohawk/installer_archive.cpp2
-rw-r--r--engines/mohawk/installer_archive.h2
-rw-r--r--engines/mohawk/livingbooks.cpp8
-rw-r--r--engines/mohawk/livingbooks_code.cpp3
-rw-r--r--engines/mohawk/mohawk.cpp10
-rw-r--r--engines/mohawk/mohawk.h2
-rw-r--r--engines/mohawk/myst.cpp2
-rw-r--r--engines/mohawk/myst_areas.cpp4
-rw-r--r--engines/mohawk/myst_scripts.cpp2
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp4
-rw-r--r--engines/mohawk/myst_stacks/credits.cpp1
-rw-r--r--engines/mohawk/myst_stacks/dni.cpp2
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp3
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp2
-rw-r--r--engines/mohawk/myst_stacks/preview.cpp1
-rw-r--r--engines/mohawk/myst_stacks/selenitic.cpp7
-rw-r--r--engines/mohawk/myst_stacks/slides.cpp1
-rw-r--r--engines/mohawk/myst_stacks/stoneship.cpp4
-rw-r--r--engines/mohawk/myst_state.cpp2
-rw-r--r--engines/mohawk/myst_state.h2
-rw-r--r--engines/mohawk/resource.cpp1
-rw-r--r--engines/mohawk/riven.h1
-rw-r--r--engines/mohawk/riven_external.cpp1
-rw-r--r--engines/mohawk/riven_scripts.cpp1
-rw-r--r--engines/mohawk/riven_scripts.h1
-rw-r--r--engines/mohawk/sound.cpp3
-rw-r--r--engines/mohawk/video.cpp11
-rw-r--r--engines/mohawk/view.cpp2
-rw-r--r--engines/parallaction/balloons.cpp6
-rw-r--r--engines/parallaction/callables_br.cpp2
-rw-r--r--engines/parallaction/detection.cpp1
-rw-r--r--engines/parallaction/dialogue.cpp1
-rw-r--r--engines/parallaction/disk.cpp5
-rw-r--r--engines/parallaction/disk.h10
-rw-r--r--engines/parallaction/disk_br.cpp3
-rw-r--r--engines/parallaction/disk_ns.cpp3
-rw-r--r--engines/parallaction/exec_br.cpp2
-rw-r--r--engines/parallaction/exec_ns.cpp1
-rw-r--r--engines/parallaction/font.cpp1
-rw-r--r--engines/parallaction/gfxbase.cpp1
-rw-r--r--engines/parallaction/graphics.cpp6
-rw-r--r--engines/parallaction/gui.cpp2
-rw-r--r--engines/parallaction/gui_br.cpp3
-rw-r--r--engines/parallaction/gui_ns.cpp5
-rw-r--r--engines/parallaction/input.cpp7
-rw-r--r--engines/parallaction/inventory.cpp4
-rw-r--r--engines/parallaction/objects.cpp2
-rw-r--r--engines/parallaction/parallaction.cpp5
-rw-r--r--engines/parallaction/parallaction.h3
-rw-r--r--engines/parallaction/parallaction_br.cpp1
-rw-r--r--engines/parallaction/parallaction_ns.cpp1
-rw-r--r--engines/parallaction/parser.cpp2
-rw-r--r--engines/parallaction/parser_br.cpp1
-rw-r--r--engines/parallaction/parser_ns.cpp2
-rw-r--r--engines/parallaction/saveload.cpp3
-rw-r--r--engines/parallaction/sound_br.cpp1
-rw-r--r--engines/parallaction/sound_ns.cpp2
-rw-r--r--engines/queen/command.cpp2
-rw-r--r--engines/queen/cutaway.cpp1
-rw-r--r--engines/queen/display.cpp1
-rw-r--r--engines/queen/display.h3
-rw-r--r--engines/queen/graphics.cpp3
-rw-r--r--engines/queen/input.cpp1
-rw-r--r--engines/queen/journal.cpp1
-rw-r--r--engines/queen/logic.cpp3
-rw-r--r--engines/queen/midiadlib.cpp1
-rw-r--r--engines/queen/music.cpp2
-rw-r--r--engines/queen/queen.cpp1
-rw-r--r--engines/queen/queen.h2
-rw-r--r--engines/queen/resource.cpp1
-rw-r--r--engines/queen/sound.cpp1
-rw-r--r--engines/queen/sound.h2
-rw-r--r--engines/queen/talk.cpp3
-rw-r--r--engines/queen/walk.cpp1
-rw-r--r--engines/saga/gfx.cpp3
-rw-r--r--engines/saga/gfx.h1
-rw-r--r--engines/saga/interface.cpp14
-rw-r--r--engines/saga/interface.h2
-rw-r--r--engines/saga/introproc_saga2.cpp5
-rw-r--r--engines/saga/render.cpp2
-rw-r--r--engines/saga/saga.h1
-rw-r--r--engines/saga/saveload.cpp4
-rw-r--r--engines/saga/shorten.cpp3
-rw-r--r--engines/savestate.cpp1
-rw-r--r--engines/savestate.h2
-rw-r--r--engines/sci/console.cpp4
-rw-r--r--engines/sci/decompressor.cpp3
-rw-r--r--engines/sci/decompressor.h4
-rw-r--r--engines/sci/engine/kfile.cpp1
-rw-r--r--engines/sci/engine/kmisc.cpp3
-rw-r--r--engines/sci/engine/kmovement.cpp2
-rw-r--r--engines/sci/engine/ksound.cpp1
-rw-r--r--engines/sci/engine/kstring.cpp10
-rw-r--r--engines/sci/engine/kvideo.cpp9
-rw-r--r--engines/sci/engine/object.h1
-rw-r--r--engines/sci/engine/script.cpp2
-rw-r--r--engines/sci/engine/script_patches.cpp41
-rw-r--r--engines/sci/engine/state.h4
-rw-r--r--engines/sci/engine/vm.cpp2
-rw-r--r--engines/sci/engine/workarounds.cpp6
-rw-r--r--engines/sci/graphics/cursor.cpp52
-rw-r--r--engines/sci/graphics/fontsjis.h2
-rw-r--r--engines/sci/graphics/frameout.cpp12
-rw-r--r--engines/sci/graphics/maciconbar.h2
-rw-r--r--engines/sci/graphics/paint.cpp2
-rw-r--r--engines/sci/graphics/paint16.cpp14
-rw-r--r--engines/sci/graphics/paint32.cpp5
-rw-r--r--engines/sci/graphics/palette.cpp2
-rw-r--r--engines/sci/graphics/picture.cpp26
-rw-r--r--engines/sci/graphics/portrait.cpp4
-rw-r--r--engines/sci/graphics/screen.cpp12
-rw-r--r--engines/sci/graphics/screen.h39
-rw-r--r--engines/sci/graphics/transitions.cpp3
-rw-r--r--engines/sci/parser/grammar.cpp1
-rw-r--r--engines/sci/resource.cpp5
-rw-r--r--engines/sci/resource_audio.cpp1
-rw-r--r--engines/sci/resource_intern.h2
-rw-r--r--engines/sci/sci.cpp2
-rw-r--r--engines/sci/sound/drivers/adlib.cpp2
-rw-r--r--engines/sci/sound/drivers/amigamac.cpp25
-rw-r--r--engines/sci/sound/drivers/cms.cpp2
-rw-r--r--engines/sci/sound/drivers/fb01.cpp1
-rw-r--r--engines/sci/sound/drivers/midi.cpp4
-rw-r--r--engines/sci/sound/drivers/pcjr.cpp3
-rw-r--r--engines/sci/sound/soundcmd.cpp28
-rw-r--r--engines/sci/video/robot_decoder.cpp5
-rw-r--r--engines/sci/video/robot_decoder.h1
-rw-r--r--engines/sci/video/seq_decoder.cpp6
-rw-r--r--engines/sci/video/seq_decoder.h10
-rw-r--r--engines/scumm/charset.cpp47
-rw-r--r--engines/scumm/costume.cpp5
-rw-r--r--engines/scumm/cursor.cpp2
-rw-r--r--engines/scumm/debugger.cpp1
-rw-r--r--engines/scumm/detection.cpp6
-rw-r--r--engines/scumm/detection_tables.h5
-rw-r--r--engines/scumm/dialogs.h4
-rw-r--r--engines/scumm/file_nes.cpp1
-rw-r--r--engines/scumm/gfx.cpp97
-rw-r--r--engines/scumm/gfx.h4
-rw-r--r--engines/scumm/gfxARM.s8
-rw-r--r--engines/scumm/gfx_towns.cpp2
-rw-r--r--engines/scumm/he/cup_player_he.cpp1
-rw-r--r--engines/scumm/he/logic_he.cpp416
-rw-r--r--engines/scumm/he/logic_he.h42
-rw-r--r--engines/scumm/he/palette_he.cpp1
-rw-r--r--engines/scumm/he/resource_he.cpp47
-rw-r--r--engines/scumm/imuse/imuse_part.cpp2
-rw-r--r--engines/scumm/imuse/sysex_scumm.cpp1
-rw-r--r--engines/scumm/imuse_digi/dimuse.h2
-rw-r--r--engines/scumm/imuse_digi/dimuse_codecs.cpp2
-rw-r--r--engines/scumm/midiparser_ro.cpp1
-rw-r--r--engines/scumm/palette.cpp3
-rw-r--r--engines/scumm/player_mod.h2
-rw-r--r--engines/scumm/player_nes.h2
-rw-r--r--engines/scumm/player_pce.h1
-rw-r--r--engines/scumm/player_sid.cpp2
-rw-r--r--engines/scumm/player_v4a.h1
-rw-r--r--engines/scumm/proc3ARM.s64
-rw-r--r--engines/scumm/saveload.h4
-rw-r--r--engines/scumm/scumm-md5.h3
-rw-r--r--engines/scumm/scumm.cpp8
-rw-r--r--engines/scumm/scumm.h11
-rw-r--r--engines/scumm/smush/channel.cpp2
-rw-r--r--engines/scumm/smush/channel.h2
-rw-r--r--engines/scumm/smush/codec37.cpp1
-rw-r--r--engines/scumm/smush/codec47.cpp3
-rw-r--r--engines/scumm/smush/saud_channel.cpp1
-rw-r--r--engines/scumm/smush/smush_mixer.h2
-rw-r--r--engines/scumm/smush/smush_player.cpp1
-rw-r--r--engines/scumm/sound.cpp4
-rw-r--r--engines/scumm/util.cpp1
-rw-r--r--engines/sky/autoroute.cpp1
-rw-r--r--engines/sky/compact.cpp5
-rw-r--r--engines/sky/compact.h2
-rw-r--r--engines/sky/control.cpp5
-rw-r--r--engines/sky/control.h2
-rw-r--r--engines/sky/debug.cpp2
-rw-r--r--engines/sky/detection.cpp1
-rw-r--r--engines/sky/disk.cpp4
-rw-r--r--engines/sky/disk.h3
-rw-r--r--engines/sky/intro.cpp1
-rw-r--r--engines/sky/logic.cpp7
-rw-r--r--engines/sky/mouse.cpp1
-rw-r--r--engines/sky/music/adlibchannel.cpp1
-rw-r--r--engines/sky/music/gmchannel.cpp1
-rw-r--r--engines/sky/music/gmmusic.cpp1
-rw-r--r--engines/sky/music/mt32music.cpp1
-rw-r--r--engines/sky/music/musicbase.cpp1
-rw-r--r--engines/sky/screen.cpp49
-rw-r--r--engines/sky/screen.h11
-rw-r--r--engines/sky/sky.cpp1
-rw-r--r--engines/sky/sky.h6
-rw-r--r--engines/sky/skydefs.h4
-rw-r--r--engines/sky/sound.cpp2
-rw-r--r--engines/sky/struc.h6
-rw-r--r--engines/sky/text.cpp16
-rw-r--r--engines/sky/text.h8
-rw-r--r--engines/sword1/animation.cpp7
-rw-r--r--engines/sword1/control.cpp2
-rw-r--r--engines/sword1/control.h2
-rw-r--r--engines/sword1/detection.cpp2
-rw-r--r--engines/sword1/eventman.cpp1
-rw-r--r--engines/sword1/logic.cpp3
-rw-r--r--engines/sword1/memman.cpp1
-rw-r--r--engines/sword1/menu.cpp2
-rw-r--r--engines/sword1/mouse.h1
-rw-r--r--engines/sword1/music.cpp3
-rw-r--r--engines/sword1/objectman.cpp1
-rw-r--r--engines/sword1/resman.cpp9
-rw-r--r--engines/sword1/router.cpp1
-rw-r--r--engines/sword1/screen.cpp3
-rw-r--r--engines/sword1/sound.cpp3
-rw-r--r--engines/sword1/sound.h2
-rw-r--r--engines/sword1/sword1.cpp1
-rw-r--r--engines/sword1/sword1.h6
-rw-r--r--engines/sword1/text.cpp3
-rw-r--r--engines/sword2/animation.cpp2
-rw-r--r--engines/sword2/controls.cpp4
-rw-r--r--engines/sword2/events.cpp1
-rw-r--r--engines/sword2/function.cpp17
-rw-r--r--engines/sword2/header.h10
-rw-r--r--engines/sword2/icons.cpp20
-rw-r--r--engines/sword2/interpreter.cpp3
-rw-r--r--engines/sword2/layers.cpp3
-rw-r--r--engines/sword2/logic.cpp1
-rw-r--r--engines/sword2/logic.h2
-rw-r--r--engines/sword2/maketext.cpp39
-rw-r--r--engines/sword2/maketext.h12
-rw-r--r--engines/sword2/memory.cpp1
-rw-r--r--engines/sword2/mouse.cpp23
-rw-r--r--engines/sword2/music.cpp41
-rw-r--r--engines/sword2/object.h2
-rw-r--r--engines/sword2/palette.cpp27
-rw-r--r--engines/sword2/protocol.cpp4
-rw-r--r--engines/sword2/render.cpp16
-rw-r--r--engines/sword2/resman.cpp1
-rw-r--r--engines/sword2/resman.h2
-rw-r--r--engines/sword2/router.cpp7
-rw-r--r--engines/sword2/router.h2
-rw-r--r--engines/sword2/saveload.cpp1
-rw-r--r--engines/sword2/screen.cpp17
-rw-r--r--engines/sword2/screen.h6
-rw-r--r--engines/sword2/scroll.cpp2
-rw-r--r--engines/sword2/sound.cpp1
-rw-r--r--engines/sword2/sound.h1
-rw-r--r--engines/sword2/speech.cpp9
-rw-r--r--engines/sword2/sprite.cpp32
-rw-r--r--engines/sword2/startup.cpp1
-rw-r--r--engines/sword2/sword2.cpp1
-rw-r--r--engines/sword2/sync.cpp1
-rw-r--r--engines/sword25/detection.cpp2
-rw-r--r--engines/sword25/fmv/movieplayer.cpp8
-rw-r--r--engines/sword25/fmv/theora_decoder.cpp3
-rw-r--r--engines/sword25/fmv/theora_decoder.h3
-rw-r--r--engines/sword25/gfx/graphicengine.cpp45
-rw-r--r--engines/sword25/gfx/graphicengine.h14
-rw-r--r--engines/sword25/gfx/image/pngloader.cpp13
-rw-r--r--engines/sword25/gfx/image/pngloader.h9
-rw-r--r--engines/sword25/gfx/image/renderedimage.cpp85
-rw-r--r--engines/sword25/gfx/image/swimage.cpp4
-rw-r--r--engines/sword25/gfx/image/vectorimagerenderer.cpp11
-rw-r--r--engines/sword25/gfx/screenshot.cpp5
-rw-r--r--engines/sword25/gfx/text.cpp4
-rw-r--r--engines/sword25/kernel/filesystemutil.cpp3
-rw-r--r--engines/sword25/kernel/inputpersistenceblock.cpp2
-rw-r--r--engines/sword25/kernel/kernel.cpp4
-rw-r--r--engines/sword25/kernel/kernel.h1
-rw-r--r--engines/sword25/kernel/kernel_script.cpp117
-rw-r--r--engines/sword25/kernel/objectregistry.h1
-rw-r--r--engines/sword25/kernel/persistenceservice.cpp44
-rw-r--r--engines/sword25/kernel/resmanager.cpp15
-rw-r--r--engines/sword25/kernel/resmanager.h5
-rw-r--r--engines/sword25/script/luacallback.cpp2
-rw-r--r--engines/sword25/sfx/soundengine.cpp2
-rw-r--r--engines/sword25/sword25.cpp16
-rw-r--r--engines/sword25/sword25.h10
-rw-r--r--engines/sword25/util/pluto/Makefile29
-rw-r--r--engines/sword25/util/pluto/pdep/lauxlib.h174
-rw-r--r--engines/sword25/util/pluto/pdep/ldo.h57
-rw-r--r--engines/sword25/util/pluto/pdep/lfunc.h34
-rw-r--r--engines/sword25/util/pluto/pdep/lgc.h110
-rw-r--r--engines/sword25/util/pluto/pdep/llimits.h128
-rw-r--r--engines/sword25/util/pluto/pdep/lobject.h381
-rw-r--r--engines/sword25/util/pluto/pdep/lopcodes.h268
-rw-r--r--engines/sword25/util/pluto/pdep/lstate.h169
-rw-r--r--engines/sword25/util/pluto/pdep/lstring.h31
-rw-r--r--engines/sword25/util/pluto/pdep/ltm.h54
-rw-r--r--engines/sword25/util/pluto/pdep/lua.h388
-rw-r--r--engines/sword25/util/pluto/pdep/lzio.h2
-rw-r--r--engines/sword25/util/pluto/pdep/pdep.h21
-rw-r--r--engines/sword25/util/pluto/pptest.cpp95
-rw-r--r--engines/sword25/util/pluto/pptest.lua168
-rw-r--r--engines/sword25/util/pluto/puptest.cpp81
-rw-r--r--engines/sword25/util/pluto/puptest.lua93
-rw-r--r--engines/teenagent/actor.cpp1
-rw-r--r--engines/teenagent/animation.cpp1
-rw-r--r--engines/teenagent/callbacks.cpp2
-rw-r--r--engines/teenagent/console.h4
-rw-r--r--engines/teenagent/font.cpp4
-rw-r--r--engines/teenagent/font.h1
-rw-r--r--engines/teenagent/inventory.cpp1
-rw-r--r--engines/teenagent/music.cpp2
-rw-r--r--engines/teenagent/resources.cpp1
-rw-r--r--engines/teenagent/scene.cpp5
-rw-r--r--engines/teenagent/scene.h4
-rw-r--r--engines/teenagent/segment.cpp1
-rw-r--r--engines/teenagent/surface.cpp2
-rw-r--r--engines/teenagent/surface.h6
-rw-r--r--engines/teenagent/teenagent.cpp2
-rw-r--r--engines/testbed/detection.cpp2
-rw-r--r--engines/testbed/events.cpp7
-rw-r--r--engines/testbed/graphics.cpp9
-rw-r--r--engines/testbed/savegame.cpp6
-rw-r--r--engines/testbed/sound.cpp2
-rw-r--r--engines/testbed/testbed.cpp7
-rw-r--r--engines/testbed/testbed.h4
-rw-r--r--engines/testbed/testsuite.h5
-rw-r--r--engines/tinsel/actors.cpp35
-rw-r--r--engines/tinsel/actors.h2
-rw-r--r--engines/tinsel/adpcm.cpp7
-rw-r--r--engines/tinsel/anim.cpp1
-rw-r--r--engines/tinsel/background.cpp16
-rw-r--r--engines/tinsel/background.h4
-rw-r--r--engines/tinsel/bg.cpp3
-rw-r--r--engines/tinsel/bmv.cpp24
-rw-r--r--engines/tinsel/bmv.h4
-rw-r--r--engines/tinsel/dialogs.cpp46
-rw-r--r--engines/tinsel/dialogs.h2
-rw-r--r--engines/tinsel/drives.cpp4
-rw-r--r--engines/tinsel/faders.cpp68
-rw-r--r--engines/tinsel/faders.h2
-rw-r--r--engines/tinsel/font.cpp4
-rw-r--r--engines/tinsel/graphics.cpp50
-rw-r--r--engines/tinsel/graphics.h2
-rw-r--r--engines/tinsel/handle.cpp1
-rw-r--r--engines/tinsel/mareels.cpp1
-rw-r--r--engines/tinsel/move.cpp28
-rw-r--r--engines/tinsel/object.cpp10
-rw-r--r--engines/tinsel/object.h4
-rw-r--r--engines/tinsel/palette.cpp182
-rw-r--r--engines/tinsel/palette.h42
-rw-r--r--engines/tinsel/pcode.cpp1
-rw-r--r--engines/tinsel/pcode.h2
-rw-r--r--engines/tinsel/pdisplay.cpp24
-rw-r--r--engines/tinsel/pid.h6
-rw-r--r--engines/tinsel/polygons.cpp39
-rw-r--r--engines/tinsel/polygons.h4
-rw-r--r--engines/tinsel/rince.cpp11
-rw-r--r--engines/tinsel/rince.h8
-rw-r--r--engines/tinsel/saveload.cpp26
-rw-r--r--engines/tinsel/savescn.cpp4
-rw-r--r--engines/tinsel/scene.cpp3
-rw-r--r--engines/tinsel/sched.cpp1
-rw-r--r--engines/tinsel/scn.cpp3
-rw-r--r--engines/tinsel/sound.cpp24
-rw-r--r--engines/tinsel/strres.cpp1
-rw-r--r--engines/tinsel/sysvar.cpp6
-rw-r--r--engines/tinsel/sysvar.h4
-rw-r--r--engines/tinsel/text.cpp12
-rw-r--r--engines/tinsel/text.h8
-rw-r--r--engines/tinsel/timers.cpp2
-rw-r--r--engines/tinsel/timers.h2
-rw-r--r--engines/tinsel/tinlib.cpp43
-rw-r--r--engines/tinsel/tinlib.h2
-rw-r--r--engines/tinsel/tinsel.cpp14
-rw-r--r--engines/tinsel/tinsel.h4
-rw-r--r--engines/toon/anim.cpp3
-rw-r--r--engines/toon/audio.cpp2
-rw-r--r--engines/toon/character.cpp8
-rw-r--r--engines/toon/drew.cpp2
-rw-r--r--engines/toon/flux.cpp2
-rw-r--r--engines/toon/font.cpp10
-rw-r--r--engines/toon/hotspot.cpp2
-rw-r--r--engines/toon/movie.cpp11
-rw-r--r--engines/toon/path.cpp8
-rw-r--r--engines/toon/picture.cpp3
-rw-r--r--engines/toon/resource.cpp1
-rw-r--r--engines/toon/script.cpp3
-rw-r--r--engines/toon/script_func.cpp3
-rw-r--r--engines/toon/state.cpp2
-rw-r--r--engines/toon/text.cpp2
-rw-r--r--engines/toon/tools.cpp2
-rw-r--r--engines/toon/toon.cpp14
-rw-r--r--engines/toon/toon.h1
-rw-r--r--engines/touche/menu.cpp4
-rw-r--r--engines/touche/midi.h2
-rw-r--r--engines/touche/resource.cpp1
-rw-r--r--engines/touche/saveload.cpp1
-rw-r--r--engines/touche/touche.cpp9
-rw-r--r--engines/tsage/converse.cpp148
-rw-r--r--engines/tsage/converse.h30
-rw-r--r--engines/tsage/core.cpp857
-rw-r--r--engines/tsage/core.h223
-rw-r--r--engines/tsage/debugger.cpp302
-rw-r--r--engines/tsage/debugger.h8
-rw-r--r--engines/tsage/detection.cpp12
-rw-r--r--engines/tsage/detection_tables.h32
-rw-r--r--engines/tsage/dialogs.cpp98
-rw-r--r--engines/tsage/dialogs.h8
-rw-r--r--engines/tsage/events.cpp82
-rw-r--r--engines/tsage/events.h9
-rw-r--r--engines/tsage/globals.cpp60
-rw-r--r--engines/tsage/globals.h20
-rw-r--r--engines/tsage/graphics.cpp196
-rw-r--r--engines/tsage/graphics.h44
-rw-r--r--engines/tsage/module.mk1
-rw-r--r--engines/tsage/resources.cpp135
-rw-r--r--engines/tsage/resources.h41
-rw-r--r--engines/tsage/ringworld_demo.cpp58
-rw-r--r--engines/tsage/ringworld_demo.h52
-rw-r--r--engines/tsage/ringworld_logic.cpp527
-rw-r--r--engines/tsage/ringworld_logic.h74
-rw-r--r--engines/tsage/ringworld_scenes1.cpp523
-rw-r--r--engines/tsage/ringworld_scenes1.h59
-rw-r--r--engines/tsage/ringworld_scenes10.cpp589
-rw-r--r--engines/tsage/ringworld_scenes10.h21
-rw-r--r--engines/tsage/ringworld_scenes2.cpp58
-rw-r--r--engines/tsage/ringworld_scenes3.cpp412
-rw-r--r--engines/tsage/ringworld_scenes3.h33
-rw-r--r--engines/tsage/ringworld_scenes4.cpp4
-rw-r--r--engines/tsage/ringworld_scenes4.h2
-rw-r--r--engines/tsage/ringworld_scenes5.cpp972
-rw-r--r--engines/tsage/ringworld_scenes5.h69
-rw-r--r--engines/tsage/ringworld_scenes6.cpp173
-rw-r--r--engines/tsage/ringworld_scenes6.h8
-rw-r--r--engines/tsage/ringworld_scenes8.cpp744
-rw-r--r--engines/tsage/ringworld_scenes8.h11
-rw-r--r--engines/tsage/saveload.cpp87
-rw-r--r--engines/tsage/saveload.h36
-rw-r--r--engines/tsage/scenes.cpp61
-rw-r--r--engines/tsage/scenes.h7
-rw-r--r--engines/tsage/sound.cpp6
-rw-r--r--engines/tsage/sound.h2
-rw-r--r--engines/tsage/staticres.cpp3
-rw-r--r--engines/tsage/staticres.h4
-rw-r--r--engines/tsage/tsage.cpp30
-rw-r--r--engines/tsage/tsage.h10
-rw-r--r--engines/tucker/locations.cpp1
-rw-r--r--engines/tucker/resource.cpp1
-rw-r--r--engines/tucker/saveload.cpp1
-rw-r--r--engines/tucker/sequences.cpp3
-rw-r--r--engines/tucker/tucker.cpp7
-rw-r--r--graphics/VectorRenderer.cpp7
-rw-r--r--graphics/VectorRenderer.h7
-rw-r--r--graphics/VectorRendererSpec.cpp39
-rw-r--r--graphics/conversion.cpp1
-rw-r--r--graphics/conversion.h3
-rw-r--r--graphics/font.cpp10
-rw-r--r--graphics/font.h5
-rw-r--r--graphics/fontman.cpp1
-rw-r--r--graphics/fontman.h3
-rw-r--r--graphics/fonts/scummfont.cpp5
-rw-r--r--graphics/fonts/winfont.cpp11
-rw-r--r--graphics/fonts/winfont.h4
-rw-r--r--graphics/iff.cpp6
-rw-r--r--graphics/iff.h2
-rw-r--r--graphics/imagedec.cpp3
-rw-r--r--graphics/imagedec.h3
-rw-r--r--graphics/jpeg.cpp11
-rw-r--r--graphics/maccursor.cpp185
-rw-r--r--graphics/maccursor.h83
-rw-r--r--graphics/module.mk1
-rw-r--r--graphics/palette.h1
-rw-r--r--graphics/pict.cpp7
-rw-r--r--graphics/pict.h2
-rw-r--r--graphics/png.cpp77
-rw-r--r--graphics/png.h19
-rw-r--r--graphics/scaler/aspect.cpp5
-rw-r--r--graphics/scaler/intern.h10
-rw-r--r--graphics/scaler/scale2x.cpp1
-rw-r--r--graphics/scaler/scale3x.cpp1
-rw-r--r--graphics/scaler/scalebit.cpp1
-rw-r--r--graphics/scaler/thumbnail_intern.cpp19
-rw-r--r--graphics/sjis.cpp3
-rw-r--r--graphics/surface.cpp59
-rw-r--r--graphics/surface.h21
-rw-r--r--graphics/thumbnail.cpp11
-rw-r--r--graphics/wincursor.cpp5
-rw-r--r--graphics/wincursor.h6
-rw-r--r--gui/ThemeEngine.cpp63
-rw-r--r--gui/ThemeEngine.h16
-rw-r--r--gui/ThemeEval.cpp2
-rw-r--r--gui/ThemeEval.h2
-rw-r--r--gui/ThemeLayout.cpp6
-rw-r--r--gui/ThemeLayout.h5
-rw-r--r--gui/ThemeParser.cpp2
-rw-r--r--gui/Tooltip.cpp1
-rw-r--r--gui/Tooltip.h5
-rw-r--r--gui/about.cpp2
-rw-r--r--gui/about.h3
-rw-r--r--gui/browser.cpp1
-rw-r--r--gui/browser.h2
-rw-r--r--gui/chooser.cpp3
-rw-r--r--gui/chooser.h2
-rw-r--r--gui/console.cpp2
-rw-r--r--gui/credits.h8
-rw-r--r--gui/debugger.cpp1
-rw-r--r--gui/dialog.cpp5
-rw-r--r--gui/dialog.h6
-rw-r--r--gui/error.cpp4
-rw-r--r--gui/error.h2
-rw-r--r--gui/gui-manager.cpp4
-rw-r--r--gui/gui-manager.h7
-rw-r--r--gui/launcher.cpp4
-rw-r--r--gui/launcher.h5
-rw-r--r--gui/massadd.cpp14
-rw-r--r--gui/massadd.h2
-rw-r--r--gui/message.cpp1
-rw-r--r--gui/message.h2
-rw-r--r--gui/object.cpp3
-rw-r--r--gui/object.h4
-rw-r--r--gui/options.cpp16
-rw-r--r--gui/options.h14
-rw-r--r--gui/saveload.h4
-rw-r--r--gui/themebrowser.h2
-rw-r--r--gui/themes/scummmodern.zipbin198479 -> 198479 bytes
-rw-r--r--gui/themes/scummmodern/scummmodern_layout.stx2
-rw-r--r--gui/themes/translations.datbin189132 -> 201288 bytes
-rw-r--r--gui/widget.cpp17
-rw-r--r--gui/widget.h5
-rw-r--r--gui/widgets/editable.cpp4
-rw-r--r--gui/widgets/editable.h8
-rw-r--r--gui/widgets/edittext.cpp9
-rw-r--r--gui/widgets/edittext.h6
-rw-r--r--gui/widgets/list.cpp1
-rw-r--r--gui/widgets/popup.cpp2
-rw-r--r--gui/widgets/scrollbar.cpp7
-rw-r--r--gui/widgets/tab.cpp1
-rw-r--r--po/POTFILES1
-rw-r--r--po/ca_ES.po322
-rw-r--r--po/cs_CZ.po364
-rw-r--r--po/da_DA.po322
-rwxr-xr-x[-rw-r--r--]po/de_DE.po330
-rw-r--r--po/es_ES.po617
-rw-r--r--po/fr_FR.po361
-rw-r--r--po/hu_HU.po324
-rw-r--r--po/it_IT.po619
-rw-r--r--po/nb_NO.po324
-rw-r--r--po/nn_NO.po353
-rw-r--r--po/pl_PL.po324
-rw-r--r--po/pt_BR.po321
-rw-r--r--po/ru_RU.po322
-rw-r--r--po/scummvm.pot311
-rw-r--r--po/se_SE.po331
-rw-r--r--po/uk_UA.po323
-rw-r--r--ports.mk48
-rw-r--r--video/avi_decoder.cpp7
-rw-r--r--video/avi_decoder.h25
-rw-r--r--video/codecs/cdtoons.cpp8
-rw-r--r--video/codecs/cinepak.cpp8
-rw-r--r--video/codecs/cinepak.h10
-rw-r--r--video/codecs/indeo3.cpp12
-rw-r--r--video/codecs/mjpeg.cpp10
-rw-r--r--video/codecs/mjpeg.h12
-rw-r--r--video/codecs/msrle.cpp3
-rw-r--r--video/codecs/msvideo1.cpp4
-rw-r--r--video/codecs/qtrle.cpp4
-rw-r--r--video/codecs/rpza.cpp4
-rw-r--r--video/codecs/smc.cpp3
-rw-r--r--video/codecs/truemotion1.cpp10
-rw-r--r--video/coktel_decoder.cpp66
-rw-r--r--video/coktel_decoder.h15
-rw-r--r--video/dxa_decoder.cpp7
-rw-r--r--video/dxa_decoder.h10
-rw-r--r--video/flic_decoder.cpp9
-rw-r--r--video/flic_decoder.h5
-rw-r--r--video/mpeg_player.h2
-rw-r--r--video/qt_decoder.cpp10
-rw-r--r--video/qt_decoder.h7
-rw-r--r--video/smk_decoder.cpp4
-rw-r--r--video/smk_decoder.h9
-rw-r--r--video/video_decoder.cpp3
-rw-r--r--video/video_decoder.h15
1292 files changed, 16864 insertions, 13259 deletions
diff --git a/.gitignore b/.gitignore
index bff5ead245..906c6a8a83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,8 @@ lib*.a
/.cproject
/.settings
+/build
+
/backends/platform/dc/gui
/backends/platform/dc/graphics
/backends/platform/dc/sound
diff --git a/AUTHORS b/AUTHORS
index adc23e50ad..ca6342d836 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -183,6 +183,10 @@ ScummVM Team
Touche:
Gregory Montoir
+ TsAGE:
+ Paul Gilbert
+ Arnaud Boutonne
+
Tucker:
Gregory Montoir
@@ -417,7 +421,7 @@ Other contributions
David Jensen - SVG logo conversion
Jean Marc Gimenez - ScummVM logo
Raina - ScummVM forum buttons
- William Claydon - Skins for doxygen and wiki
+ William Claydon - Skins for doxygen, buildbot and wiki
Code contributions
------------------
@@ -555,7 +559,7 @@ Special thanks to
Drascula: The Vampire Strikes Back with us and his generosity with
freewaring the game.
- David P. Gray from Gray Design Associate for sharing the source code of
+ David P. Gray from Gray Design Associates for sharing the source code of
the Hugo trilogy.
Broken Sword 2.5 team for providing sources of their engine and their
diff --git a/Makefile.common b/Makefile.common
index 6646af8e8d..8aee2b6d6e 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -63,14 +63,15 @@ endif
ifneq ($(findstring $(MAKEFLAGS),s),s)
ifneq ($(VERBOSE_BUILD),1)
ifneq ($(VERBOSE_BUILD),yes)
-QUIET_CXX = @echo ' ' C++ ' ' $@;
-QUIET_AS = @echo ' ' AS ' ' $@;
-QUIET_NASM = @echo ' ' NASM ' ' $@;
-QUIET_AR = @echo ' ' AR ' ' $@;
-QUIET_RANLIB = @echo ' ' RANLIB ' ' $@;
-QUIET_PLUGIN = @echo ' ' PLUGIN ' ' $@;
-QUIET_LINK = @echo ' ' LINK ' ' $@;
-QUIET = @
+QUIET_CXX = @echo ' ' C++ ' ' $@;
+QUIET_AS = @echo ' ' AS ' ' $@;
+QUIET_NASM = @echo ' ' NASM ' ' $@;
+QUIET_AR = @echo ' ' AR ' ' $@;
+QUIET_RANLIB = @echo ' ' RANLIB ' ' $@;
+QUIET_PLUGIN = @echo ' ' PLUGIN ' ' $@;
+QUIET_LINK = @echo ' ' LINK ' ' $@;
+QUIET_WINDRES = @echo ' ' WINDRES '' $@;
+QUIET = @
endif
endif
endif
@@ -154,8 +155,7 @@ endif
# Get the current version information
######################################################################
-# AmigaOS4's grep has a problem with "./" in pathnames, so use cat.
-VERSION = $(shell cat "${srcdir}/base/internal_version.h" | grep SCUMMVM_VERSION | cut -d\" -f2)
+VERSION = $(shell grep SCUMMVM_VERSION "${srcdir}/base/internal_version.h" | cut -d\" -f2)
VER_MAJOR = $(shell echo $(VERSION) | cut -d. -f 1)
VER_MINOR = $(shell echo $(VERSION) | cut -d. -f 2)
VER_PATCH = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c1)
diff --git a/NEWS b/NEWS
index d2ab41c29d..26085c089e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,10 @@
For a more comprehensive changelog of the latest experimental code, see:
https://github.com/scummvm/scummvm/commits/
+1.4.0 (????-??-??)
+ SDL ports:
+ - Added support for OpenGL (GSoC Task).
+
1.3.0 (????-??-??)
New Games:
- Added support for Backyard Baseball.
@@ -9,10 +13,17 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added support for Playtoons: Bambou le Sauveur de la Jungle.
- Added support for Toonstruck.
- Added support for Living Books v1 and v2 games.
+ - Added support for Hugo's House of Horrors, Hugo 2: Whodunit?
+ and Hugo 3: Jungle of Doom.
+ - Added support for Amiga SCI games (except Conquests of the Longbow).
+ - Added support for Macintosh SCI1 games.
+
+ New Ports:
+ - Added WebOS port.
General
- - Added support for loadable modules on platforms without a dynamic loader.
- (GSoC Task)
+ - Added support for loadable modules on platforms without a dynamic
+ loader (GSoC Task).
- Added Danish translation.
- Added Norwegian Bokmaal translation.
- Added Norwegian Nynorsk translation.
@@ -91,7 +102,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Improved support for FM-TOWNS versions of games.
Sky:
- - Fixed crashes on sequences for several ports (Android, OpenGL, ...)
+ - Fixed crashes on sequences for several ports (Android, OpenGL, ...).
Teenagent:
- Closed memory leaks.
@@ -108,7 +119,6 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added workarounds for several issues present in the original game.
SDL ports:
- - Added support for OpenGL. (GSoC Task)
- Closed memory leaks in Mouse Surfaces.
Android port:
diff --git a/README b/README
index efb9a2a502..5f7c7ed2c6 100644
--- a/README
+++ b/README
@@ -885,11 +885,13 @@ Supported platforms include (but are not limited to):
Maemo (Nokia Internet tablets 770, N800, N810, N900)
Nintendo 64
Nintendo DS
+ Nintendo GameCube
Nintendo Wii
OS/2
PlayStation 2
PlayStation Portable
Symbian
+ WebOS
The Dreamcast port does not support The Curse of Monkey Island, nor The
Dig. The Nintendo DS port does not support Full Throttle, The Dig, or
diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp
index 0c41a38254..776f904e77 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -24,14 +24,14 @@
*/
#include "common/debug.h"
-#include "common/endian.h"
#include "common/file.h"
+#include "common/mutex.h"
+#include "common/textconsole.h"
#include "common/queue.h"
#include "common/util.h"
#include "audio/audiostream.h"
#include "audio/decoders/flac.h"
-#include "audio/mixer.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/vorbis.h"
diff --git a/audio/audiostream.h b/audio/audiostream.h
index cd6456cc70..22de21cb34 100644
--- a/audio/audiostream.h
+++ b/audio/audiostream.h
@@ -26,16 +26,14 @@
#ifndef SOUND_AUDIOSTREAM_H
#define SOUND_AUDIOSTREAM_H
-#include "common/util.h"
#include "common/scummsys.h"
+#include "common/str.h"
#include "common/types.h"
#include "audio/timestamp.h"
namespace Audio {
-class SeekableAudioStream;
-
/**
* Generic audio input stream. Subclasses of this are used to feed arbitrary
* sampled audio data into ScummVM's audio mixer.
diff --git a/audio/decoders/aac.cpp b/audio/decoders/aac.cpp
index fd9c4a075c..7949b5b561 100644
--- a/audio/decoders/aac.cpp
+++ b/audio/decoders/aac.cpp
@@ -29,6 +29,7 @@
#include "common/debug.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/audiostream.h"
diff --git a/audio/decoders/adpcm.cpp b/audio/decoders/adpcm.cpp
index ac18b244c5..a9284973d5 100644
--- a/audio/decoders/adpcm.cpp
+++ b/audio/decoders/adpcm.cpp
@@ -23,11 +23,12 @@
*
*/
-#include "common/endian.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
+#include "common/util.h"
#include "audio/decoders/adpcm.h"
#include "audio/decoders/adpcm_intern.h"
-#include "audio/audiostream.h"
namespace Audio {
@@ -201,60 +202,49 @@ int Apple_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) {
return samples[0] + samples[1];
}
+
#pragma mark -
-int MSIma_ADPCMStream::readBufferMSIMA1(int16 *buffer, const int numSamples) {
- int samples = 0;
- byte data;
+int MSIma_ADPCMStream::readBuffer(int16 *buffer, const int numSamples) {
+ // Need to write at least one sample per channel
+ assert((numSamples % _channels) == 0);
- assert(numSamples % 2 == 0);
+ int samples = 0;
while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
if (_blockPos[0] == _blockAlign) {
- // read block header
- _status.ima_ch[0].last = _stream->readSint16LE();
- _status.ima_ch[0].stepIndex = _stream->readSint16LE();
- _blockPos[0] = 4;
- }
+ for (int i = 0; i < _channels; i++) {
+ // read block header
+ _status.ima_ch[i].last = _stream->readSint16LE();
+ _status.ima_ch[i].stepIndex = _stream->readSint16LE();
+ }
- for (; samples < numSamples && _blockPos[0] < _blockAlign && !_stream->eos() && _stream->pos() < _endpos; samples += 2) {
- data = _stream->readByte();
- _blockPos[0]++;
- buffer[samples] = decodeIMA(_invertSamples ? (data >> 4) & 0x0f : data & 0x0f);
- buffer[samples + 1] = decodeIMA(_invertSamples ? data & 0x0f : (data >> 4) & 0x0f);
+ _blockPos[0] = _channels * 4;
}
- }
- return samples;
-}
+ // Decode a set of samples
+ for (int i = 0; i < _channels; i++) {
+ // The stream encodes four bytes per channel at a time
+ for (int j = 0; j < 4; j++) {
+ byte data = _stream->readByte();
+ _blockPos[0]++;
+ _buffer[i][j * 2] = decodeIMA(data & 0x0f, i);
+ _buffer[i][j * 2 + 1] = decodeIMA((data >> 4) & 0x0f, i);
+ _samplesLeft[i] += 2;
+ }
+ }
-// Microsoft as usual tries to implement it differently. This method
-// is used for stereo data.
-int MSIma_ADPCMStream::readBufferMSIMA2(int16 *buffer, const int numSamples) {
- int samples;
- uint32 data;
- int nibble;
- byte k;
-
- // TODO: Currently this implementation only supports
- // reading a multiple of 16 samples at once. We might
- // consider changing that so it could read an arbitrary
- // sample pair count.
- assert(numSamples % 16 == 0);
-
- for (samples = 0; samples < numSamples && !_stream->eos() && _stream->pos() < _endpos;) {
- for (int channel = 0; channel < 2; channel++) {
- data = _stream->readUint32LE();
-
- for (nibble = 0; nibble < 8; nibble++) {
- k = ((data & 0xf0000000) >> 28);
- buffer[samples + channel + nibble * 2] = decodeIMA(k);
- data <<= 4;
+ while (samples < numSamples && _samplesLeft[0] != 0) {
+ for (int i = 0; i < _channels; i++) {
+ buffer[samples] = _buffer[i][8 - _samplesLeft[i]];
+ _samplesLeft[i]--;
}
+
+ samples += _channels;
}
- samples += 16;
}
+
return samples;
}
@@ -449,8 +439,6 @@ RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, Dispo
return new Oki_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign);
case kADPCMMSIma:
return new MSIma_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign);
- case kADPCMMSImaLastExpress:
- return new MSIma_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign, true);
case kADPCMMS:
return new MS_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign);
case kADPCMDVI:
diff --git a/audio/decoders/adpcm.h b/audio/decoders/adpcm.h
index 7202d6bc9c..10344101e2 100644
--- a/audio/decoders/adpcm.h
+++ b/audio/decoders/adpcm.h
@@ -40,12 +40,13 @@
#include "common/scummsys.h"
#include "common/types.h"
-namespace Common { class SeekableReadStream; }
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
-class AudioStream;
class RewindableAudioStream;
// There are several types of ADPCM encoding, only some are supported here
@@ -56,7 +57,6 @@ class RewindableAudioStream;
enum typesADPCM {
kADPCMOki, // Dialogic/Oki ADPCM (aka VOX)
kADPCMMSIma, // Microsoft IMA ADPCM
- kADPCMMSImaLastExpress, // Microsoft IMA ADPCM (with inverted samples)
kADPCMMS, // Microsoft ADPCM
kADPCMDVI, // Intel DVI IMA ADPCM
kADPCMApple, // Apple QuickTime IMA ADPCM
diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h
index 2d56c9d468..f875bd88c7 100644
--- a/audio/decoders/adpcm_intern.h
+++ b/audio/decoders/adpcm_intern.h
@@ -24,7 +24,7 @@
*/
/**
- * Internal interfaces to the ADPCM encoders.
+ * Internal interfaces to the ADPCM decoders.
*
* These can be used to make custom ADPCM decoder subclasses,
* or to at least share some common data tables between various
@@ -37,6 +37,7 @@
#include "audio/audiostream.h"
#include "common/endian.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Audio {
@@ -52,7 +53,7 @@ protected:
uint32 _blockPos[2];
const int _rate;
- struct {
+ struct ADPCMStatus {
// OKI/IMA
struct {
int32 last;
@@ -148,24 +149,30 @@ public:
class MSIma_ADPCMStream : public Ima_ADPCMStream {
public:
- MSIma_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign, bool invertSamples = false)
- : Ima_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign), _invertSamples(invertSamples) {
+ MSIma_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign)
+ : Ima_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) {
+
if (blockAlign == 0)
- error("ADPCMStream(): blockAlign isn't specified for MS IMA ADPCM");
- }
+ error("MSIma_ADPCMStream(): blockAlign isn't specified");
+
+ if (blockAlign % (_channels * 4))
+ error("MSIma_ADPCMStream(): invalid blockAlign");
- virtual int readBuffer(int16 *buffer, const int numSamples) {
- if (_channels == 1)
- return readBufferMSIMA1(buffer, numSamples);
- else
- return readBufferMSIMA2(buffer, numSamples);
+ _samplesLeft[0] = 0;
+ _samplesLeft[1] = 0;
}
- int readBufferMSIMA1(int16 *buffer, const int numSamples);
- int readBufferMSIMA2(int16 *buffer, const int numSamples);
+ virtual int readBuffer(int16 *buffer, const int numSamples);
+
+ void reset() {
+ Ima_ADPCMStream::reset();
+ _samplesLeft[0] = 0;
+ _samplesLeft[1] = 0;
+ }
private:
- bool _invertSamples; // Some implementations invert the way samples are decoded
+ int16 _buffer[2][8];
+ int _samplesLeft[2];
};
class MS_ADPCMStream : public ADPCMStream {
diff --git a/audio/decoders/aiff.cpp b/audio/decoders/aiff.cpp
index 0f947752f6..957fb13638 100644
--- a/audio/decoders/aiff.cpp
+++ b/audio/decoders/aiff.cpp
@@ -32,12 +32,10 @@
*/
#include "common/endian.h"
-#include "common/util.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "audio/decoders/aiff.h"
-#include "audio/audiostream.h"
-#include "audio/mixer.h"
#include "audio/decoders/raw.h"
namespace Audio {
diff --git a/audio/decoders/aiff.h b/audio/decoders/aiff.h
index 06c56ecd38..dddbffb520 100644
--- a/audio/decoders/aiff.h
+++ b/audio/decoders/aiff.h
@@ -37,7 +37,9 @@
#include "common/scummsys.h"
#include "common/types.h"
-namespace Common { class SeekableReadStream; }
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/decoders/flac.cpp b/audio/decoders/flac.cpp
index 76b6d35419..fe15877ac6 100644
--- a/audio/decoders/flac.cpp
+++ b/audio/decoders/flac.cpp
@@ -32,6 +32,7 @@
#include "common/debug.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/audiostream.h"
diff --git a/audio/decoders/flac.h b/audio/decoders/flac.h
index 17f95ec1fb..69222f22a1 100644
--- a/audio/decoders/flac.h
+++ b/audio/decoders/flac.h
@@ -49,12 +49,11 @@
#ifdef USE_FLAC
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Audio {
-class AudioStream;
class SeekableAudioStream;
/**
diff --git a/audio/decoders/iff_sound.cpp b/audio/decoders/iff_sound.cpp
index 2ec189c586..8efe017e75 100644
--- a/audio/decoders/iff_sound.cpp
+++ b/audio/decoders/iff_sound.cpp
@@ -25,7 +25,6 @@
#include "audio/decoders/iff_sound.h"
#include "audio/audiostream.h"
-#include "audio/mixer.h"
#include "audio/decoders/raw.h"
#include "common/iff_container.h"
#include "common/func.h"
diff --git a/audio/decoders/iff_sound.h b/audio/decoders/iff_sound.h
index 4e53059380..4d26b32e71 100644
--- a/audio/decoders/iff_sound.h
+++ b/audio/decoders/iff_sound.h
@@ -33,7 +33,7 @@
#define SOUND_IFF_H
namespace Common {
- class ReadStream;
+class ReadStream;
}
namespace Audio {
diff --git a/audio/decoders/mac_snd.cpp b/audio/decoders/mac_snd.cpp
index 7c1a2f75f0..fc69988860 100644
--- a/audio/decoders/mac_snd.cpp
+++ b/audio/decoders/mac_snd.cpp
@@ -30,11 +30,10 @@
* We implement both type 1 and type 2 snd resources, but only those that are sampled
*/
-#include "common/util.h"
+#include "common/textconsole.h"
#include "common/stream.h"
#include "audio/decoders/mac_snd.h"
-#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
namespace Audio {
diff --git a/audio/decoders/mac_snd.h b/audio/decoders/mac_snd.h
index 198a61333e..bf6331a265 100644
--- a/audio/decoders/mac_snd.h
+++ b/audio/decoders/mac_snd.h
@@ -35,7 +35,9 @@
#include "common/scummsys.h"
#include "common/types.h"
-namespace Common { class SeekableReadStream; }
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/decoders/mp3.cpp b/audio/decoders/mp3.cpp
index 53d68fa9db..91bd49873a 100644
--- a/audio/decoders/mp3.cpp
+++ b/audio/decoders/mp3.cpp
@@ -29,6 +29,7 @@
#include "common/debug.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/audiostream.h"
diff --git a/audio/decoders/mp3.h b/audio/decoders/mp3.h
index 72bc6e1b3e..d3a5b70d45 100644
--- a/audio/decoders/mp3.h
+++ b/audio/decoders/mp3.h
@@ -50,12 +50,11 @@
#ifdef USE_MAD
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Audio {
-class AudioStream;
class SeekableAudioStream;
/**
diff --git a/audio/decoders/qdm2.cpp b/audio/decoders/qdm2.cpp
index d4f3b2f101..dbce8d2447 100644
--- a/audio/decoders/qdm2.cpp
+++ b/audio/decoders/qdm2.cpp
@@ -34,8 +34,9 @@
#include "audio/decoders/qdm2data.h"
#include "common/array.h"
+#include "common/debug.h"
#include "common/stream.h"
-#include "common/system.h"
+#include "common/textconsole.h"
namespace Audio {
diff --git a/audio/decoders/qdm2.h b/audio/decoders/qdm2.h
index 3d4b542de1..6988623dcb 100644
--- a/audio/decoders/qdm2.h
+++ b/audio/decoders/qdm2.h
@@ -30,7 +30,7 @@
#define AUDIO_QDM2_H
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Audio {
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 5115a20218..f82dc05b7c 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -27,6 +27,7 @@
#include "common/util.h"
#include "common/memstream.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/decoders/quicktime.h"
diff --git a/audio/decoders/raw.cpp b/audio/decoders/raw.cpp
index 8b833c7838..cf787f9b12 100644
--- a/audio/decoders/raw.cpp
+++ b/audio/decoders/raw.cpp
@@ -25,9 +25,10 @@
#include "common/endian.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
+#include "common/util.h"
#include "audio/audiostream.h"
-#include "audio/mixer.h"
#include "audio/decoders/raw.h"
namespace Audio {
diff --git a/audio/decoders/raw.h b/audio/decoders/raw.h
index 3e9426012c..23ed02182d 100644
--- a/audio/decoders/raw.h
+++ b/audio/decoders/raw.h
@@ -32,12 +32,12 @@
#include "common/list.h"
-namespace Common { class SeekableReadStream; }
-
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
-class AudioStream;
class SeekableAudioStream;
/**
diff --git a/audio/decoders/vag.h b/audio/decoders/vag.h
index cdf91a8ea1..4adc1d3dde 100644
--- a/audio/decoders/vag.h
+++ b/audio/decoders/vag.h
@@ -35,12 +35,11 @@
#define SOUND_VAG_H
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Audio {
-class AudioStream;
class RewindableAudioStream;
/**
diff --git a/audio/decoders/voc.cpp b/audio/decoders/voc.cpp
index b811a640ec..9c2dc4f337 100644
--- a/audio/decoders/voc.cpp
+++ b/audio/decoders/voc.cpp
@@ -27,9 +27,9 @@
#include "common/endian.h"
#include "common/util.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
-#include "audio/mixer.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/voc.h"
diff --git a/audio/decoders/voc.h b/audio/decoders/voc.h
index 82cc261f2c..38250dcf7a 100644
--- a/audio/decoders/voc.h
+++ b/audio/decoders/voc.h
@@ -41,8 +41,10 @@
#include "common/scummsys.h"
#include "common/types.h"
-namespace Common { class ReadStream; }
-namespace Common { class SeekableReadStream; }
+namespace Common {
+class ReadStream;
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/decoders/vorbis.cpp b/audio/decoders/vorbis.cpp
index dc37e852d3..63f7ba8207 100644
--- a/audio/decoders/vorbis.cpp
+++ b/audio/decoders/vorbis.cpp
@@ -32,15 +32,15 @@
#ifdef USE_VORBIS
-#include "common/debug.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/audiostream.h"
#ifdef USE_TREMOR
-#if defined(__GP32__) // custom libtremor locations
-#include <ivorbisfile.h>
+#ifdef USE_TREMOLO
+#include <tremolo/ivorbisfile.h>
#else
#include <tremor/ivorbisfile.h>
#endif
diff --git a/audio/decoders/vorbis.h b/audio/decoders/vorbis.h
index 7cc395cccb..51d0b82d5f 100644
--- a/audio/decoders/vorbis.h
+++ b/audio/decoders/vorbis.h
@@ -49,12 +49,11 @@
#ifdef USE_VORBIS
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Audio {
-class AudioStream;
class SeekableAudioStream;
/**
diff --git a/audio/decoders/wave.cpp b/audio/decoders/wave.cpp
index 1f0ddd8ceb..a64874887a 100644
--- a/audio/decoders/wave.cpp
+++ b/audio/decoders/wave.cpp
@@ -24,11 +24,10 @@
*/
#include "common/debug.h"
-#include "common/util.h"
+#include "common/textconsole.h"
#include "common/stream.h"
#include "audio/audiostream.h"
-#include "audio/mixer.h"
#include "audio/decoders/wave.h"
#include "audio/decoders/adpcm.h"
#include "audio/decoders/raw.h"
diff --git a/audio/decoders/wave.h b/audio/decoders/wave.h
index 2bdbe8f0b6..33c3e798a0 100644
--- a/audio/decoders/wave.h
+++ b/audio/decoders/wave.h
@@ -43,7 +43,9 @@
#include "common/scummsys.h"
#include "common/types.h"
-namespace Common { class SeekableReadStream; }
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp
index 1f61e16101..5952a987a7 100644
--- a/audio/fmopl.cpp
+++ b/audio/fmopl.cpp
@@ -28,6 +28,7 @@
#include "audio/softsynth/opl/mame.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "common/translation.h"
namespace OPL {
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index a1487ff69d..6cc3366847 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -23,14 +23,14 @@
*
*/
-#include "engines/engine.h"
#include "common/config-manager.h"
+#include "common/error.h"
#include "common/str.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/mididrv.h"
#include "audio/musicplugin.h"
-#include "common/translation.h"
const byte MidiDriver::_mt32ToGm[128] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
diff --git a/audio/mididrv.h b/audio/mididrv.h
index 8d6f942455..c6c5179051 100644
--- a/audio/mididrv.h
+++ b/audio/mididrv.h
@@ -27,15 +27,10 @@
#define SOUND_MIDIDRV_H
#include "common/scummsys.h"
+#include "common/str.h"
#include "common/timer.h"
class MidiChannel;
-class MusicDevice;
-
-namespace Audio {
- class Mixer;
-}
-namespace Common { class String; }
/**
* Music types that music drivers can implement and engines can rely on.
diff --git a/audio/midiparser.cpp b/audio/midiparser.cpp
index a6df6024cd..a1399d0c30 100644
--- a/audio/midiparser.cpp
+++ b/audio/midiparser.cpp
@@ -25,6 +25,7 @@
#include "audio/midiparser.h"
#include "audio/mididrv.h"
+#include "common/textconsole.h"
#include "common/util.h"
//////////////////////////////////////////////////
diff --git a/audio/midiparser.h b/audio/midiparser.h
index eeeee981e4..24f2ba7963 100644
--- a/audio/midiparser.h
+++ b/audio/midiparser.h
@@ -31,7 +31,6 @@
#include "common/scummsys.h"
#include "common/endian.h"
-class MidiParser;
class MidiDriver_BASE;
diff --git a/audio/midiparser_smf.cpp b/audio/midiparser_smf.cpp
index 9e4e8ed293..8ead95de4c 100644
--- a/audio/midiparser_smf.cpp
+++ b/audio/midiparser_smf.cpp
@@ -24,7 +24,7 @@
*/
#include "audio/midiparser.h"
-#include "audio/mididrv.h"
+#include "common/textconsole.h"
#include "common/util.h"
/**
diff --git a/audio/midiparser_xmidi.cpp b/audio/midiparser_xmidi.cpp
index edc7c7a943..1146084cde 100644
--- a/audio/midiparser_xmidi.cpp
+++ b/audio/midiparser_xmidi.cpp
@@ -24,7 +24,7 @@
*/
#include "audio/midiparser.h"
-#include "audio/mididrv.h"
+#include "common/textconsole.h"
#include "common/util.h"
/**
diff --git a/audio/mixer.cpp b/audio/mixer.cpp
index dc0287e3fb..4d23487e71 100644
--- a/audio/mixer.cpp
+++ b/audio/mixer.cpp
@@ -25,6 +25,7 @@
#include "common/util.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "audio/mixer_intern.h"
#include "audio/rate.h"
@@ -162,16 +163,11 @@ private:
MixerImpl::MixerImpl(OSystem *system, uint sampleRate)
- : _syst(system), _sampleRate(sampleRate), _mixerReady(false), _handleSeed(0) {
+ : _syst(system), _mutex(), _sampleRate(sampleRate), _mixerReady(false), _handleSeed(0), _soundTypeSettings() {
assert(sampleRate > 0);
- int i;
-
- for (i = 0; i < ARRAYSIZE(_volumeForSoundType); i++)
- _volumeForSoundType[i] = kMaxMixerVolume;
-
- for (i = 0; i != NUM_CHANNELS; i++)
+ for (int i = 0; i != NUM_CHANNELS; i++)
_channels[i] = 0;
}
@@ -322,6 +318,21 @@ void MixerImpl::stopHandle(SoundHandle handle) {
_channels[index] = 0;
}
+void MixerImpl::muteSoundType(SoundType type, bool mute) {
+ assert(0 <= type && type < ARRAYSIZE(_soundTypeSettings));
+ _soundTypeSettings[type].mute = mute;
+
+ for (int i = 0; i != NUM_CHANNELS; ++i) {
+ if (_channels[i] && _channels[i]->getType() == type)
+ _channels[i]->notifyGlobalVolChange();
+ }
+}
+
+bool MixerImpl::isSoundTypeMuted(SoundType type) const {
+ assert(0 <= type && type < ARRAYSIZE(_soundTypeSettings));
+ return _soundTypeSettings[type].mute;
+}
+
void MixerImpl::setChannelVolume(SoundHandle handle, byte volume) {
Common::StackLock lock(_mutex);
@@ -417,7 +428,7 @@ bool MixerImpl::hasActiveChannelOfType(SoundType type) {
}
void MixerImpl::setVolumeForSoundType(SoundType type, int volume) {
- assert(0 <= type && type < ARRAYSIZE(_volumeForSoundType));
+ assert(0 <= type && type < ARRAYSIZE(_soundTypeSettings));
// Check range
if (volume > kMaxMixerVolume)
@@ -429,7 +440,7 @@ void MixerImpl::setVolumeForSoundType(SoundType type, int volume) {
// scaling? See also Player_V2::setMasterVolume
Common::StackLock lock(_mutex);
- _volumeForSoundType[type] = volume;
+ _soundTypeSettings[type].volume = volume;
for (int i = 0; i != NUM_CHANNELS; ++i) {
if (_channels[i] && _channels[i]->getType() == type)
@@ -438,9 +449,9 @@ void MixerImpl::setVolumeForSoundType(SoundType type, int volume) {
}
int MixerImpl::getVolumeForSoundType(SoundType type) const {
- assert(0 <= type && type < ARRAYSIZE(_volumeForSoundType));
+ assert(0 <= type && type < ARRAYSIZE(_soundTypeSettings));
- return _volumeForSoundType[type];
+ return _soundTypeSettings[type].volume;
}
@@ -486,17 +497,21 @@ void Channel::updateChannelVolumes() {
// volume is in the range 0 - kMaxMixerVolume.
// Hence, the vol_l/vol_r values will be in that range, too
- int vol = _mixer->getVolumeForSoundType(_type) * _volume;
-
- if (_balance == 0) {
- _volL = vol / Mixer::kMaxChannelVolume;
- _volR = vol / Mixer::kMaxChannelVolume;
- } else if (_balance < 0) {
- _volL = vol / Mixer::kMaxChannelVolume;
- _volR = ((127 + _balance) * vol) / (Mixer::kMaxChannelVolume * 127);
+ if (!_mixer->isSoundTypeMuted(_type)) {
+ int vol = _mixer->getVolumeForSoundType(_type) * _volume;
+
+ if (_balance == 0) {
+ _volL = vol / Mixer::kMaxChannelVolume;
+ _volR = vol / Mixer::kMaxChannelVolume;
+ } else if (_balance < 0) {
+ _volL = vol / Mixer::kMaxChannelVolume;
+ _volR = ((127 + _balance) * vol) / (Mixer::kMaxChannelVolume * 127);
+ } else {
+ _volL = ((127 - _balance) * vol) / (Mixer::kMaxChannelVolume * 127);
+ _volR = vol / Mixer::kMaxChannelVolume;
+ }
} else {
- _volL = ((127 - _balance) * vol) / (Mixer::kMaxChannelVolume * 127);
- _volR = vol / Mixer::kMaxChannelVolume;
+ _volL = _volR = 0;
}
}
diff --git a/audio/mixer.h b/audio/mixer.h
index a048124ca3..5802abdd6b 100644
--- a/audio/mixer.h
+++ b/audio/mixer.h
@@ -27,20 +27,13 @@
#define SOUND_MIXER_H
#include "common/types.h"
-#include "common/mutex.h"
#include "common/noncopyable.h"
-#include "audio/timestamp.h"
-
-class OSystem;
-
-
namespace Audio {
class AudioStream;
class Channel;
-class Mixer;
-class MixerImpl;
+class Timestamp;
/**
* A SoundHandle instances corresponds to a specific sound
@@ -197,6 +190,20 @@ public:
virtual bool isSoundHandleActive(SoundHandle handle) = 0;
+ /**
+ * Set the mute state for a given sound type.
+ *
+ * @param type the sound type
+ * @param mute Whether to mute (= true) or not (= false).
+ */
+ virtual void muteSoundType(SoundType type, bool mute) = 0;
+
+ /**
+ * Query the mute state for a given sound type.
+ *
+ * @param type the sound type
+ */
+ virtual bool isSoundTypeMuted(SoundType type) const = 0;
/**
* Set the channel volume for the given handle.
diff --git a/audio/mixer_intern.h b/audio/mixer_intern.h
index dd2746e9ea..d7764e50d9 100644
--- a/audio/mixer_intern.h
+++ b/audio/mixer_intern.h
@@ -64,7 +64,14 @@ private:
bool _mixerReady;
uint32 _handleSeed;
- int _volumeForSoundType[4];
+ struct SoundTypeSettings {
+ SoundTypeSettings() : mute(false), volume(kMaxMixerVolume) {}
+
+ bool mute;
+ int volume;
+ };
+
+ SoundTypeSettings _soundTypeSettings[4];
Channel *_channels[NUM_CHANNELS];
@@ -97,6 +104,9 @@ public:
virtual bool isSoundHandleActive(SoundHandle handle);
+ virtual void muteSoundType(SoundType type, bool mute);
+ virtual bool isSoundTypeMuted(SoundType type) const;
+
virtual void setChannelVolume(SoundHandle handle, byte volume);
virtual void setChannelBalance(SoundHandle handle, int8 balance);
diff --git a/audio/mods/infogrames.cpp b/audio/mods/infogrames.cpp
index 27e42c637b..8bfffeacb6 100644
--- a/audio/mods/infogrames.cpp
+++ b/audio/mods/infogrames.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/file.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace Audio {
diff --git a/audio/mods/infogrames.h b/audio/mods/infogrames.h
index c7abebf24e..9787210e82 100644
--- a/audio/mods/infogrames.h
+++ b/audio/mods/infogrames.h
@@ -33,7 +33,10 @@
#define SOUND_MODS_INFOGRAMES_H
#include "audio/mods/paula.h"
-#include "common/stream.h"
+
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/mods/maxtrax.cpp b/audio/mods/maxtrax.cpp
index a577c72eed..0738966dab 100644
--- a/audio/mods/maxtrax.cpp
+++ b/audio/mods/maxtrax.cpp
@@ -24,10 +24,10 @@
*/
#include "common/scummsys.h"
-#include "common/endian.h"
#include "common/stream.h"
#include "common/util.h"
#include "common/debug.h"
+#include "common/textconsole.h"
#include "audio/mods/maxtrax.h"
diff --git a/audio/mods/module.cpp b/audio/mods/module.cpp
index 3dad3794f9..987b17bc8d 100644
--- a/audio/mods/module.cpp
+++ b/audio/mods/module.cpp
@@ -27,6 +27,8 @@
#include "common/util.h"
#include "common/endian.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
namespace Modules {
diff --git a/audio/mods/module.h b/audio/mods/module.h
index 550b63617e..c9b72bd2d6 100644
--- a/audio/mods/module.h
+++ b/audio/mods/module.h
@@ -26,7 +26,11 @@
#ifndef SOUND_MODS_MODULE_H
#define SOUND_MODS_MODULE_H
-#include "common/stream.h"
+#include "common/scummsys.h"
+
+namespace Common {
+class SeekableReadStream;
+}
namespace Modules {
diff --git a/audio/mods/protracker.cpp b/audio/mods/protracker.cpp
index 6051338900..f781920505 100644
--- a/audio/mods/protracker.cpp
+++ b/audio/mods/protracker.cpp
@@ -29,6 +29,8 @@
#include "audio/audiostream.h"
+#include "common/textconsole.h"
+
namespace Modules {
class ProtrackerStream : public ::Audio::Paula {
diff --git a/audio/mods/protracker.h b/audio/mods/protracker.h
index af722637c7..fa9895b81f 100644
--- a/audio/mods/protracker.h
+++ b/audio/mods/protracker.h
@@ -33,7 +33,9 @@
#ifndef SOUND_MODS_PROTRACKER_H
#define SOUND_MODS_PROTRACKER_H
-#include "common/stream.h"
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/mods/rjp1.cpp b/audio/mods/rjp1.cpp
index 957bbb933a..eaa99e6928 100644
--- a/audio/mods/rjp1.cpp
+++ b/audio/mods/rjp1.cpp
@@ -25,10 +25,12 @@
#include "common/debug.h"
#include "common/endian.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
+#include "common/util.h"
#include "audio/mods/paula.h"
#include "audio/mods/rjp1.h"
-#include "audio/audiostream.h"
namespace Audio {
diff --git a/audio/mods/rjp1.h b/audio/mods/rjp1.h
index e1960921b2..e3cb0b853d 100644
--- a/audio/mods/rjp1.h
+++ b/audio/mods/rjp1.h
@@ -32,7 +32,9 @@
#ifndef SOUND_MODS_RJP1_H
#define SOUND_MODS_RJP1_H
-#include "common/stream.h"
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/mods/soundfx.cpp b/audio/mods/soundfx.cpp
index 06a1e29514..44fdd65986 100644
--- a/audio/mods/soundfx.cpp
+++ b/audio/mods/soundfx.cpp
@@ -24,10 +24,11 @@
*/
#include "common/endian.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
#include "audio/mods/paula.h"
#include "audio/mods/soundfx.h"
-#include "audio/audiostream.h"
namespace Audio {
diff --git a/audio/mods/soundfx.h b/audio/mods/soundfx.h
index 089c19d292..9dd5240160 100644
--- a/audio/mods/soundfx.h
+++ b/audio/mods/soundfx.h
@@ -32,7 +32,9 @@
#ifndef SOUND_MODS_SOUNDFX_H
#define SOUND_MODS_SOUNDFX_H
-#include "common/stream.h"
+namespace Common {
+class SeekableReadStream;
+}
namespace Audio {
diff --git a/audio/mods/tfmx.cpp b/audio/mods/tfmx.cpp
index 8c69a75ebd..f7cfc50c10 100644
--- a/audio/mods/tfmx.cpp
+++ b/audio/mods/tfmx.cpp
@@ -26,8 +26,8 @@
#include "common/scummsys.h"
#include "common/endian.h"
#include "common/stream.h"
-#include "common/util.h"
#include "common/debug.h"
+#include "common/textconsole.h"
#include "audio/mods/tfmx.h"
diff --git a/audio/mpu401.h b/audio/mpu401.h
index 07e2817381..5f1a5108ac 100644
--- a/audio/mpu401.h
+++ b/audio/mpu401.h
@@ -34,8 +34,6 @@
//
////////////////////////////////////////
-class MidiDriver_MPU401;
-
class MidiChannel_MPU401 : public MidiChannel {
private:
diff --git a/audio/musicplugin.h b/audio/musicplugin.h
index da0e0ff816..53a2ae426d 100644
--- a/audio/musicplugin.h
+++ b/audio/musicplugin.h
@@ -29,6 +29,10 @@
#include "audio/mididrv.h"
#include "common/list.h"
+namespace Common {
+class Error;
+}
+
class MusicPluginObject;
/**
diff --git a/audio/null.cpp b/audio/null.cpp
index 152f5da03e..2066a6d048 100644
--- a/audio/null.cpp
+++ b/audio/null.cpp
@@ -22,6 +22,7 @@
* $Id$
*/
+#include "common/error.h"
#include "audio/null.h"
Common::Error NullMusicPlugin::createInstance(MidiDriver **mididriver, MidiDriver::DeviceHandle) const {
diff --git a/audio/rate.cpp b/audio/rate.cpp
index 1fcf0ade2e..fd52503b8c 100644
--- a/audio/rate.cpp
+++ b/audio/rate.cpp
@@ -35,6 +35,7 @@
#include "audio/rate.h"
#include "audio/mixer.h"
#include "common/frac.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Audio {
diff --git a/audio/rate.h b/audio/rate.h
index fb231e4c4a..af37994d02 100644
--- a/audio/rate.h
+++ b/audio/rate.h
@@ -27,13 +27,11 @@
#define SOUND_RATE_H
#include "common/scummsys.h"
-#include "engines/engine.h"
-
-class AudioStream;
-
namespace Audio {
+class AudioStream;
+
typedef int16 st_sample_t;
typedef uint16 st_volume_t;
typedef uint32 st_size_t;
diff --git a/audio/rate_arm.cpp b/audio/rate_arm.cpp
index 43172f64c8..1eb55d0dc3 100644
--- a/audio/rate_arm.cpp
+++ b/audio/rate_arm.cpp
@@ -48,6 +48,7 @@
#include "audio/rate.h"
#include "audio/mixer.h"
#include "common/util.h"
+#include "common/textconsole.h"
//#define DEBUG_RATECONV
@@ -129,13 +130,11 @@ SimpleRateConverter<stereo, reverseStereo>::SimpleRateConverter(st_rate_t inrate
sr.inLen = 0;
}
-extern "C" {
#ifndef IPHONE
#define ARM_SimpleRate_M _ARM_SimpleRate_M
#define ARM_SimpleRate_S _ARM_SimpleRate_S
#define ARM_SimpleRate_R _ARM_SimpleRate_R
#endif
-}
extern "C" st_sample_t *ARM_SimpleRate_M(
AudioStream &input,
diff --git a/audio/softsynth/adlib.cpp b/audio/softsynth/adlib.cpp
index 9e863471f0..9fec74c9d6 100644
--- a/audio/softsynth/adlib.cpp
+++ b/audio/softsynth/adlib.cpp
@@ -24,6 +24,11 @@
#include "audio/softsynth/emumidi.h"
#include "common/debug.h"
+#include "common/error.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+#include "common/types.h"
#include "common/util.h"
#include "audio/fmopl.h"
#include "audio/musicplugin.h"
@@ -66,8 +71,6 @@ struct AdLibInstrument {
byte flags_b;
InstrumentExtra extra_b;
byte duration;
-
- AdLibInstrument() { memset(this, 0, sizeof(AdLibInstrument)); }
} PACKED_STRUCT;
#include "common/pack-end.h"
@@ -112,6 +115,8 @@ public:
_owner = 0;
_allocated = false;
_channel = 0;
+
+ memset(&_part_instr, 0, sizeof(_part_instr));
}
MidiDriver *device();
@@ -301,185 +306,185 @@ static const byte note_to_f_num[] = {
242, 243, 245, 247, 249, 251, 252, 254
};
-static const byte map_gm_to_fm[128][30] = {
+static const AdLibInstrument map_gm_to_fm[128] = {
// 0x00
-{ 0xC2, 0xC5, 0x2B, 0x99, 0x58, 0xC2, 0x1F, 0x1E, 0xC8, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x23 },
-{ 0x22, 0x53, 0x0E, 0x8A, 0x30, 0x14, 0x06, 0x1D, 0x7A, 0x5C, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x06, 0x00, 0x1C, 0x79, 0x40, 0x02, 0x00, 0x4B, 0x79, 0x58, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC2, 0x89, 0x2A, 0x89, 0x49, 0xC2, 0x16, 0x1C, 0xB8, 0x7C, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x23 },
-{ 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x20, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x84, 0x40, 0x3B, 0x5A, 0x6F, 0x81, 0x0E, 0x3B, 0x5A, 0x7F, 0x0B, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0x7F, 0x01, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x8C, 0x80, 0x05, 0xEA, 0x59, 0x82, 0x0A, 0x3C, 0xAA, 0x64, 0x07, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x85, 0x40, 0x0D, 0xEC, 0x71, 0x84, 0x58, 0x3E, 0xCB, 0x7C, 0x01, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x8A, 0xC0, 0x0C, 0xDC, 0x50, 0x88, 0x58, 0x3D, 0xDA, 0x7C, 0x01, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC9, 0x40, 0x2B, 0x78, 0x42, 0xC2, 0x04, 0x4C, 0x8A, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x1A },
-{ 0x2A, 0x0E, 0x17, 0x89, 0x28, 0x22, 0x0C, 0x1B, 0x09, 0x70, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE7, 0x9B, 0x08, 0x08, 0x26, 0xE2, 0x06, 0x0A, 0x08, 0x70, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC5, 0x05, 0x00, 0xFC, 0x40, 0x84, 0x00, 0x00, 0xDC, 0x50, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x86, 0x40, 0x5D, 0x5A, 0x41, 0x81, 0x00, 0x0B, 0x5A, 0x7F, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
+{ 0xC2, 0xC5, 0x2B, 0x99, 0x58, 0xC2, 0x1F, 0x1E, 0xC8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x23 },
+{ 0x22, 0x53, 0x0E, 0x8A, 0x30, 0x14, 0x06, 0x1D, 0x7A, 0x5C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x06, 0x00, 0x1C, 0x79, 0x40, 0x02, 0x00, 0x4B, 0x79, 0x58, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC2, 0x89, 0x2A, 0x89, 0x49, 0xC2, 0x16, 0x1C, 0xB8, 0x7C, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x23 },
+{ 0xC2, 0x17, 0x3D, 0x6A, 0x00, 0xC4, 0x2E, 0x2D, 0xC9, 0x20, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x06, 0x1E, 0x1C, 0x99, 0x00, 0x02, 0x3A, 0x4C, 0x79, 0x00, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x84, 0x40, 0x3B, 0x5A, 0x6F, 0x81, 0x0E, 0x3B, 0x5A, 0x7F, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x84, 0x40, 0x3B, 0x5A, 0x63, 0x81, 0x00, 0x3B, 0x5A, 0x7F, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x8C, 0x80, 0x05, 0xEA, 0x59, 0x82, 0x0A, 0x3C, 0xAA, 0x64, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x85, 0x40, 0x0D, 0xEC, 0x71, 0x84, 0x58, 0x3E, 0xCB, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x8A, 0xC0, 0x0C, 0xDC, 0x50, 0x88, 0x58, 0x3D, 0xDA, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC9, 0x40, 0x2B, 0x78, 0x42, 0xC2, 0x04, 0x4C, 0x8A, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x1A },
+{ 0x2A, 0x0E, 0x17, 0x89, 0x28, 0x22, 0x0C, 0x1B, 0x09, 0x70, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE7, 0x9B, 0x08, 0x08, 0x26, 0xE2, 0x06, 0x0A, 0x08, 0x70, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC5, 0x05, 0x00, 0xFC, 0x40, 0x84, 0x00, 0x00, 0xDC, 0x50, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x86, 0x40, 0x5D, 0x5A, 0x41, 0x81, 0x00, 0x0B, 0x5A, 0x7F, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
// 0x10
-{ 0xED, 0x00, 0x7B, 0xC8, 0x40, 0xE1, 0x99, 0x4A, 0xE9, 0x7E, 0x07, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE8, 0x4F, 0x3A, 0xD7, 0x7C, 0xE2, 0x97, 0x49, 0xF9, 0x7D, 0x05, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE1, 0x10, 0x2F, 0xF7, 0x7D, 0xF3, 0x45, 0x8F, 0xC7, 0x62, 0x07, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x01, 0x8C, 0x9F, 0xDA, 0x70, 0xE4, 0x50, 0x9F, 0xDA, 0x6A, 0x09, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x08, 0xD5, 0x9D, 0xA5, 0x45, 0xE2, 0x3F, 0x9F, 0xD6, 0x49, 0x07, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE5, 0x0F, 0x7D, 0xB8, 0x2E, 0xA2, 0x0F, 0x7C, 0xC7, 0x61, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0x62, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x88, 0x9C, 0x50, 0x64, 0xE2, 0x18, 0x70, 0xC4, 0x7C, 0x0B, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x18 },
-{ 0x42, 0x55, 0x3E, 0xEB, 0x24, 0xD4, 0x08, 0x0D, 0xA9, 0x71, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x18 },
-{ 0xC2, 0x00, 0x2B, 0x17, 0x51, 0xC2, 0x1E, 0x4D, 0x97, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x19 },
-{ 0xC6, 0x01, 0x2D, 0xA7, 0x44, 0xC2, 0x06, 0x0E, 0xA7, 0x79, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC2, 0x0C, 0x06, 0x06, 0x55, 0xC2, 0x3F, 0x09, 0x86, 0x7D, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0A },
-{ 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0x59, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0x7F, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0x7D, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0B },
+{ 0xED, 0x00, 0x7B, 0xC8, 0x40, 0xE1, 0x99, 0x4A, 0xE9, 0x7E, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE8, 0x4F, 0x3A, 0xD7, 0x7C, 0xE2, 0x97, 0x49, 0xF9, 0x7D, 0x05, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE1, 0x10, 0x2F, 0xF7, 0x7D, 0xF3, 0x45, 0x8F, 0xC7, 0x62, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x01, 0x8C, 0x9F, 0xDA, 0x70, 0xE4, 0x50, 0x9F, 0xDA, 0x6A, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x08, 0xD5, 0x9D, 0xA5, 0x45, 0xE2, 0x3F, 0x9F, 0xD6, 0x49, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE5, 0x0F, 0x7D, 0xB8, 0x2E, 0xA2, 0x0F, 0x7C, 0xC7, 0x61, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xF2, 0x2A, 0x9F, 0xDB, 0x01, 0xE1, 0x04, 0x8F, 0xD7, 0x62, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x88, 0x9C, 0x50, 0x64, 0xE2, 0x18, 0x70, 0xC4, 0x7C, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x02, 0xA3, 0x0D, 0xDA, 0x01, 0xC2, 0x35, 0x5D, 0x58, 0x00, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x18 },
+{ 0x42, 0x55, 0x3E, 0xEB, 0x24, 0xD4, 0x08, 0x0D, 0xA9, 0x71, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x18 },
+{ 0xC2, 0x00, 0x2B, 0x17, 0x51, 0xC2, 0x1E, 0x4D, 0x97, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x19 },
+{ 0xC6, 0x01, 0x2D, 0xA7, 0x44, 0xC2, 0x06, 0x0E, 0xA7, 0x79, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC2, 0x0C, 0x06, 0x06, 0x55, 0xC2, 0x3F, 0x09, 0x86, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0A },
+{ 0xC2, 0x2E, 0x4F, 0x77, 0x00, 0xC4, 0x08, 0x0E, 0x98, 0x59, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC2, 0x30, 0x4F, 0xCA, 0x01, 0xC4, 0x0D, 0x0E, 0xB8, 0x7F, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC4, 0x29, 0x4F, 0xCA, 0x03, 0xC8, 0x0D, 0x0C, 0xB7, 0x7D, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0B },
// 0x20
-{ 0xC2, 0x40, 0x3C, 0x96, 0x58, 0xC4, 0xDE, 0x0E, 0xC7, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x20 },
-{ 0x31, 0x13, 0x2D, 0xD7, 0x3C, 0xE2, 0x18, 0x2E, 0xB8, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x22, 0x86, 0x0D, 0xD7, 0x50, 0xE4, 0x18, 0x5E, 0xB8, 0x7C, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x28 },
-{ 0xF2, 0x0A, 0x0D, 0xD7, 0x40, 0xE4, 0x1F, 0x5E, 0xB8, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xF2, 0x09, 0x4B, 0xD6, 0x48, 0xE4, 0x1F, 0x1C, 0xB8, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x28 },
-{ 0x62, 0x11, 0x0C, 0xE6, 0x3C, 0xE4, 0x1F, 0x0C, 0xC8, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x12, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x7D, 0xB8, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x13, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x5D, 0xB8, 0x7D, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xA2, 0x40, 0x5D, 0xBA, 0x3F, 0xE2, 0x00, 0x8F, 0xD8, 0x79, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x40, 0x3D, 0xDA, 0x3B, 0xE1, 0x00, 0x7E, 0xD8, 0x7A, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x62, 0x00, 0x6D, 0xFA, 0x5D, 0xE2, 0x00, 0x8F, 0xC8, 0x79, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE1, 0x00, 0x4E, 0xDB, 0x4A, 0xE3, 0x18, 0x6F, 0xE9, 0x7E, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE1, 0x00, 0x4E, 0xDB, 0x66, 0xE2, 0x00, 0x7F, 0xE9, 0x7E, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x02, 0x0F, 0x66, 0xAA, 0x51, 0x02, 0x64, 0x29, 0xF9, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x04 },
-{ 0x16, 0x4A, 0x04, 0xBA, 0x39, 0xC2, 0x58, 0x2D, 0xCA, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0x02, 0x00, 0x01, 0x7A, 0x79, 0x02, 0x3F, 0x28, 0xEA, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
+{ 0xC2, 0x40, 0x3C, 0x96, 0x58, 0xC4, 0xDE, 0x0E, 0xC7, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x20 },
+{ 0x31, 0x13, 0x2D, 0xD7, 0x3C, 0xE2, 0x18, 0x2E, 0xB8, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x22, 0x86, 0x0D, 0xD7, 0x50, 0xE4, 0x18, 0x5E, 0xB8, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x28 },
+{ 0xF2, 0x0A, 0x0D, 0xD7, 0x40, 0xE4, 0x1F, 0x5E, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xF2, 0x09, 0x4B, 0xD6, 0x48, 0xE4, 0x1F, 0x1C, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x28 },
+{ 0x62, 0x11, 0x0C, 0xE6, 0x3C, 0xE4, 0x1F, 0x0C, 0xC8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x12, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x7D, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x13, 0x3D, 0xE6, 0x34, 0xE4, 0x1F, 0x5D, 0xB8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xA2, 0x40, 0x5D, 0xBA, 0x3F, 0xE2, 0x00, 0x8F, 0xD8, 0x79, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x40, 0x3D, 0xDA, 0x3B, 0xE1, 0x00, 0x7E, 0xD8, 0x7A, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x62, 0x00, 0x6D, 0xFA, 0x5D, 0xE2, 0x00, 0x8F, 0xC8, 0x79, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE1, 0x00, 0x4E, 0xDB, 0x4A, 0xE3, 0x18, 0x6F, 0xE9, 0x7E, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE1, 0x00, 0x4E, 0xDB, 0x66, 0xE2, 0x00, 0x7F, 0xE9, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x02, 0x0F, 0x66, 0xAA, 0x51, 0x02, 0x64, 0x29, 0xF9, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
+{ 0x16, 0x4A, 0x04, 0xBA, 0x39, 0xC2, 0x58, 0x2D, 0xCA, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0x02, 0x00, 0x01, 0x7A, 0x79, 0x02, 0x3F, 0x28, 0xEA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
// 0x30
-{ 0x62, 0x53, 0x9C, 0xBA, 0x31, 0x62, 0x5B, 0xAD, 0xC9, 0x55, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xF2, 0x40, 0x6E, 0xDA, 0x49, 0xE2, 0x13, 0x8F, 0xF9, 0x7D, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x40, 0x8F, 0xFA, 0x50, 0xF2, 0x04, 0x7F, 0xFA, 0x7D, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x3D, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE6, 0x80, 0x9C, 0x99, 0x42, 0xE2, 0x04, 0x7D, 0x78, 0x60, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0x7C, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC3, 0x3F, 0x4B, 0xE9, 0x7E, 0xC1, 0x3F, 0x9B, 0xF9, 0x7F, 0x0B, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x06 },
-{ 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0x68, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xF2, 0x00, 0x8F, 0xFB, 0x50, 0xF6, 0x47, 0x8F, 0xE9, 0x68, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xF2, 0x00, 0xAF, 0x88, 0x58, 0xF2, 0x54, 0x6E, 0xC9, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x84, 0x4E, 0x78, 0x6C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x02, 0x9F, 0xB8, 0x48, 0x22, 0x89, 0x9F, 0xE8, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0x7C, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0x7D, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0x7C, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
+{ 0x62, 0x53, 0x9C, 0xBA, 0x31, 0x62, 0x5B, 0xAD, 0xC9, 0x55, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xF2, 0x40, 0x6E, 0xDA, 0x49, 0xE2, 0x13, 0x8F, 0xF9, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x40, 0x8F, 0xFA, 0x50, 0xF2, 0x04, 0x7F, 0xFA, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0xA0, 0xCE, 0x5B, 0x02, 0xE2, 0x32, 0x7F, 0xFB, 0x3D, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE6, 0x80, 0x9C, 0x99, 0x42, 0xE2, 0x04, 0x7D, 0x78, 0x60, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xEA, 0xA0, 0xAC, 0x67, 0x02, 0xE2, 0x00, 0x7C, 0x7A, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE7, 0x94, 0xAD, 0xB7, 0x03, 0xE2, 0x00, 0x7C, 0xBA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC3, 0x3F, 0x4B, 0xE9, 0x7E, 0xC1, 0x3F, 0x9B, 0xF9, 0x7F, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
+{ 0xB2, 0x20, 0xAD, 0xE9, 0x00, 0x62, 0x05, 0x8F, 0xC8, 0x68, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xF2, 0x00, 0x8F, 0xFB, 0x50, 0xF6, 0x47, 0x8F, 0xE9, 0x68, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xF2, 0x00, 0xAF, 0x88, 0x58, 0xF2, 0x54, 0x6E, 0xC9, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xF2, 0x2A, 0x9F, 0x98, 0x01, 0xE2, 0x84, 0x4E, 0x78, 0x6C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x02, 0x9F, 0xB8, 0x48, 0x22, 0x89, 0x9F, 0xE8, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x2A, 0x7F, 0xB8, 0x01, 0xE4, 0x00, 0x0D, 0xC5, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x28, 0x8E, 0xE8, 0x01, 0xF2, 0x00, 0x4D, 0xD6, 0x7D, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x62, 0x23, 0x8F, 0xEA, 0x00, 0xF2, 0x00, 0x5E, 0xD9, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
// 0x40
-{ 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0x7D, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x0F, 0x90, 0xF8, 0x78, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0x7D, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0x7D, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x62, 0x00, 0x8E, 0xC9, 0x3D, 0xE6, 0x00, 0x7E, 0xD8, 0x68, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x00, 0x5F, 0xF9, 0x48, 0xE6, 0x98, 0x8F, 0xF8, 0x7D, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x62, 0x0C, 0x6E, 0xD8, 0x3D, 0x2A, 0x06, 0x7D, 0xD8, 0x58, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x00, 0x7E, 0x89, 0x38, 0xE6, 0x84, 0x80, 0xF8, 0x68, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x80, 0x6C, 0xD9, 0x30, 0xE2, 0x00, 0x8D, 0xC8, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x80, 0x88, 0x48, 0x40, 0xE2, 0x0A, 0x7D, 0xA8, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x00, 0x77, 0xC5, 0x54, 0xE2, 0x00, 0x9E, 0xD7, 0x70, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x80, 0x86, 0xB9, 0x64, 0xE2, 0x05, 0x9F, 0xD7, 0x78, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x00, 0x68, 0x68, 0x56, 0xE2, 0x08, 0x9B, 0xB3, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x00, 0xA6, 0x87, 0x41, 0xE2, 0x0A, 0x7E, 0xC9, 0x7C, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x80, 0x9A, 0xB8, 0x48, 0xE2, 0x00, 0x9E, 0xF9, 0x60, 0x09, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x80, 0x8E, 0x64, 0x68, 0xE2, 0x28, 0x6F, 0x73, 0x7C, 0x01, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
+{ 0xB4, 0x26, 0x6E, 0x98, 0x01, 0x62, 0x00, 0x7D, 0xC8, 0x7D, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x2E, 0x20, 0xD9, 0x01, 0xF2, 0x0F, 0x90, 0xF8, 0x78, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x28, 0x7E, 0xF8, 0x01, 0xE2, 0x23, 0x8E, 0xE8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xB8, 0x28, 0x9E, 0x98, 0x01, 0x62, 0x00, 0x3D, 0xC8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x62, 0x00, 0x8E, 0xC9, 0x3D, 0xE6, 0x00, 0x7E, 0xD8, 0x68, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x00, 0x5F, 0xF9, 0x48, 0xE6, 0x98, 0x8F, 0xF8, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x62, 0x0C, 0x6E, 0xD8, 0x3D, 0x2A, 0x06, 0x7D, 0xD8, 0x58, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x00, 0x7E, 0x89, 0x38, 0xE6, 0x84, 0x80, 0xF8, 0x68, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x80, 0x6C, 0xD9, 0x30, 0xE2, 0x00, 0x8D, 0xC8, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x80, 0x88, 0x48, 0x40, 0xE2, 0x0A, 0x7D, 0xA8, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x00, 0x77, 0xC5, 0x54, 0xE2, 0x00, 0x9E, 0xD7, 0x70, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x80, 0x86, 0xB9, 0x64, 0xE2, 0x05, 0x9F, 0xD7, 0x78, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x00, 0x68, 0x68, 0x56, 0xE2, 0x08, 0x9B, 0xB3, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x00, 0xA6, 0x87, 0x41, 0xE2, 0x0A, 0x7E, 0xC9, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x80, 0x9A, 0xB8, 0x48, 0xE2, 0x00, 0x9E, 0xF9, 0x60, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x80, 0x8E, 0x64, 0x68, 0xE2, 0x28, 0x6F, 0x73, 0x7C, 0x01, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
// 0x50
-{ 0xE8, 0x00, 0x7D, 0x99, 0x54, 0xE6, 0x80, 0x80, 0xF8, 0x7C, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE6, 0x00, 0x9F, 0xB9, 0x6D, 0xE1, 0x00, 0x8F, 0xC8, 0x7D, 0x02, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x00, 0x09, 0x68, 0x4A, 0xE2, 0x2B, 0x9E, 0xF3, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC4, 0x00, 0x99, 0xE8, 0x3B, 0xE2, 0x25, 0x6F, 0x93, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE6, 0x00, 0x6F, 0xDA, 0x69, 0xE2, 0x05, 0x2F, 0xD8, 0x6A, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0x7C, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE3, 0x00, 0x0F, 0xF7, 0x7D, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x3C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE8, 0x40, 0x0D, 0x89, 0x7D, 0xE2, 0x17, 0x7E, 0xD9, 0x7C, 0x07, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE1, 0x00, 0xDF, 0x8A, 0x56, 0xE2, 0x5E, 0xCF, 0xBA, 0x7E, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE2, 0x00, 0x0B, 0x68, 0x60, 0xE2, 0x01, 0x9E, 0xB8, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xEA, 0x00, 0xAE, 0xAB, 0x49, 0xE2, 0x00, 0xAE, 0xBA, 0x6C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xEB, 0x80, 0x8C, 0xCB, 0x3A, 0xE2, 0x86, 0xAF, 0xCA, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE5, 0x40, 0xDB, 0x3B, 0x3C, 0xE2, 0x80, 0xBE, 0xCA, 0x71, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE4, 0x00, 0x9E, 0xAA, 0x3D, 0xE1, 0x43, 0x0F, 0xBA, 0x7E, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE7, 0x40, 0xEC, 0xCA, 0x44, 0xE2, 0x03, 0xBF, 0xBA, 0x66, 0x02, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
+{ 0xE8, 0x00, 0x7D, 0x99, 0x54, 0xE6, 0x80, 0x80, 0xF8, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE6, 0x00, 0x9F, 0xB9, 0x6D, 0xE1, 0x00, 0x8F, 0xC8, 0x7D, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x00, 0x09, 0x68, 0x4A, 0xE2, 0x2B, 0x9E, 0xF3, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC4, 0x00, 0x99, 0xE8, 0x3B, 0xE2, 0x25, 0x6F, 0x93, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE6, 0x00, 0x6F, 0xDA, 0x69, 0xE2, 0x05, 0x2F, 0xD8, 0x6A, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xEC, 0x60, 0x9D, 0xC7, 0x00, 0xE2, 0x21, 0x7F, 0xC9, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE3, 0x00, 0x0F, 0xF7, 0x7D, 0xE1, 0x3F, 0x0F, 0xA7, 0x01, 0x0D, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0xA9, 0x0F, 0xA8, 0x02, 0xE2, 0x3C, 0x5F, 0xDA, 0x3C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE8, 0x40, 0x0D, 0x89, 0x7D, 0xE2, 0x17, 0x7E, 0xD9, 0x7C, 0x07, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE1, 0x00, 0xDF, 0x8A, 0x56, 0xE2, 0x5E, 0xCF, 0xBA, 0x7E, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE2, 0x00, 0x0B, 0x68, 0x60, 0xE2, 0x01, 0x9E, 0xB8, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xEA, 0x00, 0xAE, 0xAB, 0x49, 0xE2, 0x00, 0xAE, 0xBA, 0x6C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xEB, 0x80, 0x8C, 0xCB, 0x3A, 0xE2, 0x86, 0xAF, 0xCA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE5, 0x40, 0xDB, 0x3B, 0x3C, 0xE2, 0x80, 0xBE, 0xCA, 0x71, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE4, 0x00, 0x9E, 0xAA, 0x3D, 0xE1, 0x43, 0x0F, 0xBA, 0x7E, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE7, 0x40, 0xEC, 0xCA, 0x44, 0xE2, 0x03, 0xBF, 0xBA, 0x66, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
// 0x60
-{ 0xEA, 0x00, 0x68, 0xB8, 0x48, 0xE2, 0x0A, 0x8E, 0xB8, 0x7C, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x61, 0x00, 0xBE, 0x99, 0x7E, 0xE3, 0x40, 0xCF, 0xCA, 0x7D, 0x09, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xCD, 0x00, 0x0B, 0x00, 0x48, 0xC2, 0x58, 0x0C, 0x00, 0x7C, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x1C },
-{ 0xE2, 0x00, 0x0E, 0x00, 0x52, 0xE2, 0x58, 0x5F, 0xD0, 0x7D, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xCC, 0x00, 0x7D, 0xDA, 0x40, 0xC2, 0x00, 0x5E, 0x9B, 0x58, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE9, 0xC0, 0xEE, 0xD8, 0x43, 0xE2, 0x05, 0xDD, 0xAA, 0x70, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xDA, 0x00, 0x8F, 0xAC, 0x4A, 0x22, 0x05, 0x8D, 0x8A, 0x75, 0x02, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x62, 0x8A, 0xCB, 0x7A, 0x74, 0xE6, 0x56, 0xAF, 0xDB, 0x70, 0x02, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xC2, 0x41, 0xAC, 0x5B, 0x5B, 0xC2, 0x80, 0x0D, 0xCB, 0x7D, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x12 },
-{ 0x75, 0x00, 0x0E, 0xCB, 0x5A, 0xE2, 0x1E, 0x0A, 0xC9, 0x7D, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x10 },
-{ 0x41, 0x00, 0x0E, 0xEA, 0x53, 0xC2, 0x00, 0x08, 0xCA, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x07 },
-{ 0xC1, 0x40, 0x0C, 0x59, 0x6A, 0xC2, 0x80, 0x3C, 0xAB, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0D },
-{ 0x4B, 0x00, 0x0A, 0xF5, 0x61, 0xC2, 0x19, 0x0C, 0xE9, 0x7C, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x07 },
-{ 0x62, 0x00, 0x7F, 0xD8, 0x54, 0xEA, 0x00, 0x8F, 0xD8, 0x7D, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
+{ 0xEA, 0x00, 0x68, 0xB8, 0x48, 0xE2, 0x0A, 0x8E, 0xB8, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x61, 0x00, 0xBE, 0x99, 0x7E, 0xE3, 0x40, 0xCF, 0xCA, 0x7D, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xCD, 0x00, 0x0B, 0x00, 0x48, 0xC2, 0x58, 0x0C, 0x00, 0x7C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x1C },
+{ 0xE2, 0x00, 0x0E, 0x00, 0x52, 0xE2, 0x58, 0x5F, 0xD0, 0x7D, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xCC, 0x00, 0x7D, 0xDA, 0x40, 0xC2, 0x00, 0x5E, 0x9B, 0x58, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE9, 0xC0, 0xEE, 0xD8, 0x43, 0xE2, 0x05, 0xDD, 0xAA, 0x70, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xDA, 0x00, 0x8F, 0xAC, 0x4A, 0x22, 0x05, 0x8D, 0x8A, 0x75, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x62, 0x8A, 0xCB, 0x7A, 0x74, 0xE6, 0x56, 0xAF, 0xDB, 0x70, 0x02, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xC2, 0x41, 0xAC, 0x5B, 0x5B, 0xC2, 0x80, 0x0D, 0xCB, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x12 },
+{ 0x75, 0x00, 0x0E, 0xCB, 0x5A, 0xE2, 0x1E, 0x0A, 0xC9, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
+{ 0x41, 0x00, 0x0E, 0xEA, 0x53, 0xC2, 0x00, 0x08, 0xCA, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
+{ 0xC1, 0x40, 0x0C, 0x59, 0x6A, 0xC2, 0x80, 0x3C, 0xAB, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0D },
+{ 0x4B, 0x00, 0x0A, 0xF5, 0x61, 0xC2, 0x19, 0x0C, 0xE9, 0x7C, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
+{ 0x62, 0x00, 0x7F, 0xD8, 0x54, 0xEA, 0x00, 0x8F, 0xD8, 0x7D, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0xE1, 0x00, 0x7F, 0xD9, 0x56, 0xE1, 0x00, 0x8F, 0xD8, 0x7E, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
// 0x70
-{ 0xCF, 0x40, 0x09, 0xEA, 0x54, 0xC4, 0x00, 0x0C, 0xDB, 0x64, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0xCF, 0x40, 0x0C, 0xAA, 0x54, 0xC4, 0x00, 0x18, 0xF9, 0x64, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0xC9, 0x0E, 0x88, 0xD9, 0x3E, 0xC2, 0x08, 0x1A, 0xEA, 0x6C, 0x0C, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 },
-{ 0x03, 0x00, 0x15, 0x00, 0x64, 0x02, 0x00, 0x08, 0x00, 0x7C, 0x09, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x01, 0x00, 0x47, 0xD7, 0x6C, 0x01, 0x3F, 0x0C, 0xFB, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x04 },
-{ 0x00, 0x00, 0x36, 0x67, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 },
-{ 0x02, 0x00, 0x36, 0x68, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 },
-{ 0xCB, 0x00, 0xAF, 0x00, 0x7E, 0xC0, 0x00, 0xC0, 0x06, 0x7F, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0F },
-{ 0x05, 0x0D, 0x80, 0xA6, 0x7F, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x04 },
-{ 0x0F, 0x00, 0x90, 0xFA, 0x68, 0x06, 0x00, 0xA7, 0x39, 0x54, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x06 },
-{ 0xC9, 0x15, 0xDD, 0xFF, 0x7C, 0x00, 0x00, 0xE7, 0xFC, 0x6C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x38 },
-{ 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x04 },
-{ 0x07, 0x80, 0x0B, 0xC8, 0x65, 0x02, 0x3F, 0x0C, 0xEA, 0x7C, 0x0F, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 },
-{ 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x08, 0x00, 0x0B, 0x3C, 0x7C, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 }
+{ 0xCF, 0x40, 0x09, 0xEA, 0x54, 0xC4, 0x00, 0x0C, 0xDB, 0x64, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0xCF, 0x40, 0x0C, 0xAA, 0x54, 0xC4, 0x00, 0x18, 0xF9, 0x64, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0xC9, 0x0E, 0x88, 0xD9, 0x3E, 0xC2, 0x08, 0x1A, 0xEA, 0x6C, 0x0C, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
+{ 0x03, 0x00, 0x15, 0x00, 0x64, 0x02, 0x00, 0x08, 0x00, 0x7C, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x01, 0x00, 0x47, 0xD7, 0x6C, 0x01, 0x3F, 0x0C, 0xFB, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
+{ 0x00, 0x00, 0x36, 0x67, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
+{ 0x02, 0x00, 0x36, 0x68, 0x7C, 0x01, 0x3F, 0x0E, 0xFA, 0x7C, 0x00, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
+{ 0xCB, 0x00, 0xAF, 0x00, 0x7E, 0xC0, 0x00, 0xC0, 0x06, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0F },
+{ 0x05, 0x0D, 0x80, 0xA6, 0x7F, 0x0B, 0x38, 0xA9, 0xD8, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
+{ 0x0F, 0x00, 0x90, 0xFA, 0x68, 0x06, 0x00, 0xA7, 0x39, 0x54, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
+{ 0xC9, 0x15, 0xDD, 0xFF, 0x7C, 0x00, 0x00, 0xE7, 0xFC, 0x6C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x38 },
+{ 0x48, 0x3C, 0x30, 0xF6, 0x03, 0x0A, 0x38, 0x97, 0xE8, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
+{ 0x07, 0x80, 0x0B, 0xC8, 0x65, 0x02, 0x3F, 0x0C, 0xEA, 0x7C, 0x0F, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
+{ 0x00, 0x21, 0x66, 0x40, 0x03, 0x00, 0x3F, 0x47, 0x00, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x08, 0x00, 0x0B, 0x3C, 0x7C, 0x08, 0x3F, 0x06, 0xF3, 0x00, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x00, 0x3F, 0x4C, 0xFB, 0x00, 0x00, 0x3F, 0x0A, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 }
};
-static byte gm_percussion_to_fm[39][30] = {
-{ 0x1A, 0x3F, 0x15, 0x05, 0x7C, 0x02, 0x21, 0x2B, 0xE4, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x06 },
-{ 0x11, 0x12, 0x04, 0x07, 0x7C, 0x02, 0x23, 0x0B, 0xE5, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 },
-{ 0x0A, 0x3F, 0x0B, 0x01, 0x7C, 0x1F, 0x1C, 0x46, 0xD0, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x01 },
-{ 0x00, 0x3F, 0x0F, 0x00, 0x7C, 0x10, 0x12, 0x07, 0x00, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x0F, 0x3F, 0x0B, 0x00, 0x7C, 0x1F, 0x0F, 0x19, 0xD0, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x00, 0x3F, 0x1F, 0x00, 0x7E, 0x1F, 0x16, 0x07, 0x00, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x1F, 0x4A, 0xD9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xFF, 0x7E, 0x00, 0xC7, 0x2D, 0xF7, 0x73, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x43, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xCF, 0x7E, 0x00, 0x45, 0x2A, 0xF8, 0x4B, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0C },
-{ 0x12, 0x3F, 0x06, 0x17, 0x7C, 0x03, 0x27, 0x0B, 0xE9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0xCF, 0x7F, 0x08, 0xCD, 0x7E, 0x00, 0x40, 0x1A, 0x69, 0x63, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0C },
-{ 0x13, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x17, 0x0A, 0xD9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0x15, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0xCF, 0x3F, 0x2B, 0xFB, 0x7E, 0xC0, 0x1E, 0x1A, 0xCA, 0x7F, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x10 },
-{ 0x17, 0x3F, 0x04, 0x09, 0x7C, 0x03, 0x22, 0x0D, 0xE9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0xCF, 0x3F, 0x0F, 0x5E, 0x7C, 0xC6, 0x13, 0x00, 0xCA, 0x7F, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0xCF, 0x3F, 0x7E, 0x9D, 0x7C, 0xC8, 0xC0, 0x0A, 0xBA, 0x74, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x06 },
-{ 0xCF, 0x3F, 0x4D, 0x9F, 0x7C, 0xC6, 0x00, 0x08, 0xDA, 0x5B, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x04 },
-{ 0xCF, 0x3F, 0x5D, 0xAA, 0x7A, 0xC0, 0xA4, 0x67, 0x99, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0xCF, 0x3F, 0x4A, 0xFD, 0x7C, 0xCF, 0x00, 0x59, 0xEA, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x0F, 0x18, 0x0A, 0xFA, 0x57, 0x06, 0x07, 0x06, 0x39, 0x7C, 0x0A, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0xCF, 0x3F, 0x2B, 0xFC, 0x7C, 0xCC, 0xC6, 0x0B, 0xEA, 0x7F, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x10 },
-{ 0x05, 0x1A, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x0C, 0xEA, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x07 },
-{ 0x04, 0x19, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x2C, 0xEA, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x04 },
-{ 0x04, 0x0A, 0x04, 0x00, 0x6C, 0x01, 0x07, 0x0D, 0xFA, 0x74, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x07 },
-{ 0x15, 0x14, 0x05, 0x00, 0x7D, 0x01, 0x07, 0x5C, 0xE9, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 },
-{ 0x10, 0x10, 0x05, 0x08, 0x7C, 0x01, 0x08, 0x0D, 0xEA, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x05 },
-{ 0x11, 0x00, 0x06, 0x87, 0x7F, 0x02, 0x40, 0x09, 0x59, 0x68, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x08 },
-{ 0x13, 0x26, 0x04, 0x6A, 0x7F, 0x01, 0x00, 0x08, 0x5A, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x08 },
-{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC4, 0x00, 0x18, 0xF9, 0x54, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC3, 0x00, 0x18, 0xF8, 0x54, 0x04, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0xCB, 0x3F, 0x8F, 0x00, 0x7E, 0xC5, 0x00, 0x98, 0xD6, 0x5F, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x0D },
-{ 0x0C, 0x18, 0x87, 0xB3, 0x7F, 0x19, 0x10, 0x55, 0x75, 0x7C, 0x0E, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x05, 0x11, 0x15, 0x00, 0x64, 0x02, 0x08, 0x08, 0x00, 0x5C, 0x09, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0x04, 0x08, 0x15, 0x00, 0x48, 0x01, 0x08, 0x08, 0x00, 0x60, 0x08, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x02 },
-{ 0xDA, 0x00, 0x53, 0x30, 0x68, 0x07, 0x1E, 0x49, 0xC4, 0x7E, 0x03, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 },
-{ 0x1C, 0x00, 0x07, 0xBC, 0x6C, 0x0C, 0x14, 0x0B, 0x6A, 0x7E, 0x0B, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x03 },
-{ 0x0A, 0x0E, 0x7F, 0x00, 0x7D, 0x13, 0x20, 0x28, 0x03, 0x7C, 0x06, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0x00 }
+static AdLibInstrument gm_percussion_to_fm[39] = {
+{ 0x1A, 0x3F, 0x15, 0x05, 0x7C, 0x02, 0x21, 0x2B, 0xE4, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
+{ 0x11, 0x12, 0x04, 0x07, 0x7C, 0x02, 0x23, 0x0B, 0xE5, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
+{ 0x0A, 0x3F, 0x0B, 0x01, 0x7C, 0x1F, 0x1C, 0x46, 0xD0, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x01 },
+{ 0x00, 0x3F, 0x0F, 0x00, 0x7C, 0x10, 0x12, 0x07, 0x00, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x0F, 0x3F, 0x0B, 0x00, 0x7C, 0x1F, 0x0F, 0x19, 0xD0, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x00, 0x3F, 0x1F, 0x00, 0x7E, 0x1F, 0x16, 0x07, 0x00, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x1F, 0x4A, 0xD9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0xCF, 0x7F, 0x08, 0xFF, 0x7E, 0x00, 0xC7, 0x2D, 0xF7, 0x73, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x12, 0x3F, 0x05, 0x06, 0x7C, 0x43, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0xCF, 0x7F, 0x08, 0xCF, 0x7E, 0x00, 0x45, 0x2A, 0xF8, 0x4B, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0C },
+{ 0x12, 0x3F, 0x06, 0x17, 0x7C, 0x03, 0x27, 0x0B, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0xCF, 0x7F, 0x08, 0xCD, 0x7E, 0x00, 0x40, 0x1A, 0x69, 0x63, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0C },
+{ 0x13, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x17, 0x0A, 0xD9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0x15, 0x3F, 0x05, 0x06, 0x7C, 0x03, 0x21, 0x0C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0xCF, 0x3F, 0x2B, 0xFB, 0x7E, 0xC0, 0x1E, 0x1A, 0xCA, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
+{ 0x17, 0x3F, 0x04, 0x09, 0x7C, 0x03, 0x22, 0x0D, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0xCF, 0x3F, 0x0F, 0x5E, 0x7C, 0xC6, 0x13, 0x00, 0xCA, 0x7F, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0xCF, 0x3F, 0x7E, 0x9D, 0x7C, 0xC8, 0xC0, 0x0A, 0xBA, 0x74, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x06 },
+{ 0xCF, 0x3F, 0x4D, 0x9F, 0x7C, 0xC6, 0x00, 0x08, 0xDA, 0x5B, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
+{ 0xCF, 0x3F, 0x5D, 0xAA, 0x7A, 0xC0, 0xA4, 0x67, 0x99, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0xCF, 0x3F, 0x4A, 0xFD, 0x7C, 0xCF, 0x00, 0x59, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x0F, 0x18, 0x0A, 0xFA, 0x57, 0x06, 0x07, 0x06, 0x39, 0x7C, 0x0A, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0xCF, 0x3F, 0x2B, 0xFC, 0x7C, 0xCC, 0xC6, 0x0B, 0xEA, 0x7F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x10 },
+{ 0x05, 0x1A, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x0C, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
+{ 0x04, 0x19, 0x04, 0x00, 0x7C, 0x12, 0x10, 0x2C, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x04 },
+{ 0x04, 0x0A, 0x04, 0x00, 0x6C, 0x01, 0x07, 0x0D, 0xFA, 0x74, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x07 },
+{ 0x15, 0x14, 0x05, 0x00, 0x7D, 0x01, 0x07, 0x5C, 0xE9, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
+{ 0x10, 0x10, 0x05, 0x08, 0x7C, 0x01, 0x08, 0x0D, 0xEA, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x05 },
+{ 0x11, 0x00, 0x06, 0x87, 0x7F, 0x02, 0x40, 0x09, 0x59, 0x68, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x08 },
+{ 0x13, 0x26, 0x04, 0x6A, 0x7F, 0x01, 0x00, 0x08, 0x5A, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x08 },
+{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC4, 0x00, 0x18, 0xF9, 0x54, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0xCF, 0x4E, 0x0C, 0xAA, 0x50, 0xC3, 0x00, 0x18, 0xF8, 0x54, 0x04, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0xCB, 0x3F, 0x8F, 0x00, 0x7E, 0xC5, 0x00, 0x98, 0xD6, 0x5F, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x0D },
+{ 0x0C, 0x18, 0x87, 0xB3, 0x7F, 0x19, 0x10, 0x55, 0x75, 0x7C, 0x0E, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x05, 0x11, 0x15, 0x00, 0x64, 0x02, 0x08, 0x08, 0x00, 0x5C, 0x09, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0x04, 0x08, 0x15, 0x00, 0x48, 0x01, 0x08, 0x08, 0x00, 0x60, 0x08, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x02 },
+{ 0xDA, 0x00, 0x53, 0x30, 0x68, 0x07, 0x1E, 0x49, 0xC4, 0x7E, 0x03, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 },
+{ 0x1C, 0x00, 0x07, 0xBC, 0x6C, 0x0C, 0x14, 0x0B, 0x6A, 0x7E, 0x0B, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x03 },
+{ 0x0A, 0x0E, 0x7F, 0x00, 0x7D, 0x13, 0x20, 0x28, 0x03, 0x7C, 0x06, 0, { 0,0,0,0,0,0,0,0 }, 0, { 0,0,0,0,0,0,0,0 }, 0x00 }
};
static const byte gm_percussion_lookup[128] = {
@@ -611,7 +616,7 @@ private:
void adlib_note_on(int chan, byte note, int mod);
void adlib_note_on_ex(int chan, byte note, int mod);
int adlib_get_reg_value_param(int chan, byte data);
- void adlib_setup_channel(int chan, AdLibInstrument * instr, byte vol_1, byte vol_2);
+ void adlib_setup_channel(int chan, AdLibInstrument *instr, byte vol_1, byte vol_2);
byte adlib_get_reg_value(byte reg) {
return _adlib_reg_cache[reg];
}
@@ -622,16 +627,16 @@ private:
AdLibVoice *allocate_voice(byte pri);
- void mc_off(AdLibVoice * voice);
+ void mc_off(AdLibVoice *voice);
static void link_mc(AdLibPart *part, AdLibVoice *voice);
- void mc_inc_stuff(AdLibVoice *voice, Struct10 * s10, Struct11 * s11);
- void mc_init_stuff(AdLibVoice *voice, Struct10 * s10, Struct11 * s11, byte flags,
- InstrumentExtra * ie);
+ void mc_inc_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11);
+ void mc_init_stuff(AdLibVoice *voice, Struct10 *s10, Struct11 *s11, byte flags,
+ InstrumentExtra *ie);
- void struct10_init(Struct10 * s10, InstrumentExtra * ie);
- static byte struct10_ontimer(Struct10 * s10, Struct11 * s11);
- static void struct10_setup(Struct10 * s10);
+ void struct10_init(Struct10 *s10, InstrumentExtra *ie);
+ static byte struct10_ontimer(Struct10 *s10, Struct11 *s11);
+ static void struct10_setup(Struct10 *s10);
static int random_nr(int a);
void mc_key_on(AdLibVoice *voice, AdLibInstrument *instr, byte note, byte velocity);
};
@@ -671,12 +676,14 @@ void AdLibPart::programChange(byte program) {
if (program > 127)
return;
+/*
uint i;
uint count = 0;
for (i = 0; i < ARRAYSIZE(map_gm_to_fm[0]); ++i)
count += map_gm_to_fm[program][i];
if (!count)
- warning("No AdLib instrument defined for GM program %d", (int) program);
+ warning("No AdLib instrument defined for GM program %d", (int)program);
+*/
_program = program;
memcpy(&_part_instr, &map_gm_to_fm[program], sizeof(AdLibInstrument));
}
@@ -785,8 +792,7 @@ void AdLibPart::allNotesOff() {
void AdLibPart::sysEx_customInstrument(uint32 type, const byte *instr) {
if (type == 'ADL ') {
- AdLibInstrument *i = &_part_instr;
- memcpy(i, instr, sizeof(AdLibInstrument));
+ memcpy(&_part_instr, instr, sizeof(AdLibInstrument));
}
}
@@ -835,7 +841,7 @@ void AdLibPercussionChannel::noteOn(byte note, byte velocity) {
// Use the default GM to FM mapping as a fallback as a fallback
byte key = gm_percussion_lookup[note];
if (key != 0xFF)
- inst = (AdLibInstrument *)&gm_percussion_to_fm[key];
+ inst = &gm_percussion_to_fm[key];
}
if (!inst) {
@@ -1477,8 +1483,8 @@ void MidiDriver_ADLIB::adlib_note_on_ex(int chan, byte note, int mod)
adlib_playnote(chan, code);
}
-void MidiDriver_ADLIB::mc_init_stuff(AdLibVoice *voice, Struct10 * s10,
- Struct11 * s11, byte flags, InstrumentExtra * ie) {
+void MidiDriver_ADLIB::mc_init_stuff(AdLibVoice *voice, Struct10 *s10,
+ Struct11 *s11, byte flags, InstrumentExtra *ie) {
AdLibPart *part = voice->_part;
s11->modify_val = 0;
s11->flag0x40 = flags & 0x40;
diff --git a/audio/softsynth/eas.cpp b/audio/softsynth/eas.cpp
index 0339492f5d..7d17655d20 100644
--- a/audio/softsynth/eas.cpp
+++ b/audio/softsynth/eas.cpp
@@ -30,8 +30,11 @@
#include "common/debug.h"
#include "common/endian.h"
+#include "common/textconsole.h"
+#include "common/error.h"
#include "common/file.h"
#include "common/config-manager.h"
+#include "common/system.h"
#include "audio/audiostream.h"
#include "audio/mpu401.h"
#include "audio/musicplugin.h"
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
index f6f66ce5e8..a4877a4ec1 100644
--- a/audio/softsynth/fluidsynth.cpp
+++ b/audio/softsynth/fluidsynth.cpp
@@ -27,6 +27,9 @@
#ifdef USE_FLUIDSYNTH
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
#include "audio/softsynth/emumidi.h"
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.cpp b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
index e019aa2481..7b6658ab3a 100644
--- a/audio/softsynth/fmtowns_pc98/towns_audio.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
@@ -25,6 +25,7 @@
#include "audio/softsynth/fmtowns_pc98/towns_audio.h"
#include "common/endian.h"
+#include "common/util.h"
#include "backends/audiocd/audiocd.h"
diff --git a/audio/softsynth/fmtowns_pc98/towns_euphony.cpp b/audio/softsynth/fmtowns_pc98/towns_euphony.cpp
index 7c071c43fb..cd3a348b85 100644
--- a/audio/softsynth/fmtowns_pc98/towns_euphony.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_euphony.cpp
@@ -25,6 +25,8 @@
#include "audio/softsynth/fmtowns_pc98/towns_euphony.h"
#include "common/endian.h"
+#include "common/util.h"
+#include "common/textconsole.h"
TownsEuphonyDriver::TownsEuphonyDriver(Audio::Mixer *mixer) : _activeChannels(0), _sustainChannels(0),
_assignedChannels(0), _paraCount(0), _command(0), _tEnable(0), _tMode(0), _tOrdr(0), _tLevel(0),
@@ -40,6 +42,7 @@ TownsEuphonyDriver::~TownsEuphonyDriver() {
delete[] _activeChannels;
delete[] _sustainChannels;
delete[] _assignedChannels;
+ delete[] _eventBuffer;
delete[] _tEnable;
delete[] _tMode;
delete[] _tOrdr;
@@ -51,6 +54,16 @@ bool TownsEuphonyDriver::init() {
if (!_intf->init())
return false;
+ delete[] _activeChannels;
+ delete[] _sustainChannels;
+ delete[] _assignedChannels;
+ delete[] _eventBuffer;
+ delete[] _tEnable;
+ delete[] _tMode;
+ delete[] _tOrdr;
+ delete[] _tLevel;
+ delete[] _tTranspose;
+
_activeChannels = new int8[16];
_sustainChannels = new int8[16];
_assignedChannels = new ActiveChannel[128];
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
index 79fd95ea0d..a551276ab1 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
@@ -25,6 +25,7 @@
#include "audio/softsynth/fmtowns_pc98/towns_pc98_driver.h"
#include "common/endian.h"
+#include "common/textconsole.h"
class TownsPC98_MusicChannel {
public:
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
index 67de8fa026..9d3751a0cc 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
@@ -25,6 +25,8 @@
#include "audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h"
#include "common/endian.h"
+#include "common/textconsole.h"
+#include "common/util.h"
class TownsPC98_FmSynthOperator {
public:
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
index 18cca56e29..2b916b2cdc 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.h
@@ -28,7 +28,7 @@
#include "audio/audiostream.h"
#include "audio/mixer.h"
-#include "common/list.h"
+#include "common/mutex.h"
#ifdef __DS__
/* This disables the rhythm channel when emulating the PC-98 type 86 sound card.
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index dd2c7e2121..5371be60b3 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -34,15 +34,20 @@
#include "common/config-manager.h"
#include "common/debug.h"
+#include "common/error.h"
#include "common/events.h"
#include "common/file.h"
#include "common/system.h"
#include "common/util.h"
#include "common/archive.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#include "graphics/fontman.h"
#include "graphics/surface.h"
+#include "graphics/pixelformat.h"
+#include "graphics/palette.h"
+#include "graphics/font.h"
class MidiChannel_MT32 : public MidiChannel_MPU401 {
void effectLevel(byte value) { }
@@ -346,7 +351,7 @@ void MidiDriver_MT32::send(uint32 b) {
void MidiDriver_MT32::setPitchBendRange(byte channel, uint range) {
if (range > 24) {
- printf("setPitchBendRange() called with range > 24: %d", range);
+ warning("setPitchBendRange() called with range > 24: %d", range);
}
byte benderRangeSysex[9];
benderRangeSysex[0] = 0x41; // Roland
diff --git a/audio/softsynth/mt32/part.cpp b/audio/softsynth/mt32/part.cpp
index eb087f7ea0..9f9269cba5 100644
--- a/audio/softsynth/mt32/part.cpp
+++ b/audio/softsynth/mt32/part.cpp
@@ -100,7 +100,7 @@ void RhythmPart::setBend(unsigned int midiBend) {
}
void Part::setBend(unsigned int midiBend) {
- // FIXME:KG: Slightly unbalanced increments, but I wanted min -1.0, centre 0.0 and max 1.0
+ // FIXME:KG: Slightly unbalanced increments, but I wanted min -1.0, center 0.0 and max 1.0
if (midiBend <= 0x2000) {
bend = ((signed int)midiBend - 0x2000) / (float)0x2000;
} else {
@@ -413,7 +413,7 @@ void RhythmPart::setPan(unsigned int midiPan)
}
void Part::setPan(unsigned int midiPan) {
- // FIXME:KG: Tweaked this a bit so that we have a left 100%, centre and right 100%
+ // FIXME:KG: Tweaked this a bit so that we have a left 100%, center and right 100%
// (But this makes the range somewhat skewed)
// Check against the real thing
// NOTE: Panning is inverted compared to GM.
diff --git a/audio/softsynth/mt32/part.h b/audio/softsynth/mt32/part.h
index 54c4999653..967298258c 100644
--- a/audio/softsynth/mt32/part.h
+++ b/audio/softsynth/mt32/part.h
@@ -24,7 +24,6 @@
namespace MT32Emu {
-class PartialManager;
class Synth;
class Part {
diff --git a/audio/softsynth/mt32/synth.cpp b/audio/softsynth/mt32/synth.cpp
index 16460795a5..112527cc71 100644
--- a/audio/softsynth/mt32/synth.cpp
+++ b/audio/softsynth/mt32/synth.cpp
@@ -19,14 +19,18 @@
* IN THE SOFTWARE.
*/
+// FIXME: Avoid using printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
+// FIXME: Avoid using vprintf
+#define FORBIDDEN_SYMBOL_EXCEPTION_vprintf
+
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "mt32emu.h"
-#include "common/str.h"
-
#if defined(MACOSX) || defined(SOLARIS) || defined(__MINGW32__)
// Older versions of Mac OS X didn't supply a powf function, so using it
// will cause a binary incompatibility when trying to run a binary built
diff --git a/audio/softsynth/mt32/synth.h b/audio/softsynth/mt32/synth.h
index 3fc303d322..edda446287 100644
--- a/audio/softsynth/mt32/synth.h
+++ b/audio/softsynth/mt32/synth.h
@@ -29,7 +29,6 @@ class revmodel;
namespace MT32Emu {
class File;
-class TableInitialiser;
class Partial;
class PartialManager;
class Part;
diff --git a/audio/softsynth/opl/dosbox.cpp b/audio/softsynth/opl/dosbox.cpp
index 29993ce3d8..7a494d70ec 100644
--- a/audio/softsynth/opl/dosbox.cpp
+++ b/audio/softsynth/opl/dosbox.cpp
@@ -36,6 +36,7 @@
#include "common/system.h"
#include "common/scummsys.h"
+#include "common/util.h"
#include <math.h>
#include <string.h>
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp
index b4bbcb5ab3..5d790f924f 100644
--- a/audio/softsynth/opl/mame.cpp
+++ b/audio/softsynth/opl/mame.cpp
@@ -33,6 +33,9 @@
#include "mame.h"
+#include "common/textconsole.h"
+#include "common/util.h"
+
#if defined (_WIN32_WCE) || defined (__SYMBIAN32__) || defined(__GP32__) || defined(GP2X) || defined (__MAEMO__) || defined(__DS__) || defined (__MINT__) || defined(__N64__)
#include "common/config-manager.h"
#endif
diff --git a/audio/softsynth/opl/mame.h b/audio/softsynth/opl/mame.h
index 58ef5f18dc..4314aa6dba 100644
--- a/audio/softsynth/opl/mame.h
+++ b/audio/softsynth/opl/mame.h
@@ -30,7 +30,6 @@
#define SOUND_SOFTSYNTH_OPL_MAME_H
#include "common/scummsys.h"
-#include "common/util.h"
#include "common/random.h"
#include "audio/fmopl.h"
diff --git a/audio/softsynth/pcspk.h b/audio/softsynth/pcspk.h
index c0d85bbceb..8f01fa852b 100644
--- a/audio/softsynth/pcspk.h
+++ b/audio/softsynth/pcspk.h
@@ -26,7 +26,6 @@
#define SOUND_SOFTSYNTH_PCSPK_H
#include "audio/audiostream.h"
-#include "audio/mixer.h"
#include "common/mutex.h"
namespace Audio {
diff --git a/audio/softsynth/sid.cpp b/audio/softsynth/sid.cpp
index 241766fa0a..40dc50e972 100644
--- a/audio/softsynth/sid.cpp
+++ b/audio/softsynth/sid.cpp
@@ -32,7 +32,6 @@
#include "sid.h"
#include "audio/null.h"
-#include <math.h>
namespace Resid {
@@ -110,7 +109,7 @@ void WaveformGenerator::reset() {
msb_rising = false;
}
-RESID_INLINE void WaveformGenerator::clock(cycle_count delta_t) {
+RESID_INLINE void WaveformGenerator::updateClock(cycle_count delta_t) {
// No operation if test bit is set.
if (test) {
return;
@@ -165,10 +164,10 @@ RESID_INLINE void WaveformGenerator::clock(cycle_count delta_t) {
/**
* Synchronize oscillators.
- * This must be done after all the oscillators have been clock()'ed since the
+ * This must be done after all the oscillators have been updateClock()'ed since the
* oscillators operate in parallel.
* Note that the oscillators must be clocked exactly on the cycle when the
- * MSB is set high for hard sync to operate correctly. See SID::clock().
+ * MSB is set high for hard sync to operate correctly. See SID::updateClock().
*/
RESID_INLINE void WaveformGenerator::synchronize() {
// A special case occurs when a sync source is synced itself on the same
@@ -592,7 +591,7 @@ void Filter::set_Q() {
_1024_div_Q = static_cast<sound_sample>(1024.0/(0.707 + 1.0*res/0x0f));
}
-RESID_INLINE void Filter::clock(cycle_count delta_t,
+RESID_INLINE void Filter::updateClock(cycle_count delta_t,
sound_sample voice1,
sound_sample voice2,
sound_sample voice3)
@@ -888,7 +887,7 @@ reg8 EnvelopeGenerator::readENV() {
return output();
}
-RESID_INLINE void EnvelopeGenerator::clock(cycle_count delta_t) {
+RESID_INLINE void EnvelopeGenerator::updateClock(cycle_count delta_t) {
// Check for ADSR delay bug.
// If the rate counter comparison value is set below the current value of the
// rate counter, the counter will continue counting up until it wraps around
@@ -1027,7 +1026,7 @@ void ExternalFilter::reset() {
Vo = 0;
}
-RESID_INLINE void ExternalFilter::clock(cycle_count delta_t, sound_sample Vi) {
+RESID_INLINE void ExternalFilter::updateClock(cycle_count delta_t, sound_sample Vi) {
// This is handy for testing.
if (!enabled) {
// Remove maximum DC level since there is no filter to do it.
@@ -1317,7 +1316,7 @@ bool SID::set_sampling_parameters(double clock_freq,
return true;
}
-void SID::clock(cycle_count delta_t) {
+void SID::updateClock(cycle_count delta_t) {
int i;
if (delta_t <= 0) {
@@ -1333,7 +1332,7 @@ void SID::clock(cycle_count delta_t) {
// Clock amplitude modulators.
for (i = 0; i < 3; i++) {
- voice[i].envelope.clock(delta_t);
+ voice[i].envelope.updateClock(delta_t);
}
// Clock and synchronize oscillators.
@@ -1373,7 +1372,7 @@ void SID::clock(cycle_count delta_t) {
// Clock oscillators.
for (i = 0; i < 3; i++) {
- voice[i].wave.clock(delta_t_min);
+ voice[i].wave.updateClock(delta_t_min);
}
// Synchronize oscillators.
@@ -1385,11 +1384,11 @@ void SID::clock(cycle_count delta_t) {
}
// Clock filter.
- filter.clock(delta_t,
+ filter.updateClock(delta_t,
voice[0].output(), voice[1].output(), voice[2].output());
// Clock external filter.
- extfilt.clock(delta_t, filter.output());
+ extfilt.updateClock(delta_t, filter.output());
}
@@ -1397,7 +1396,7 @@ void SID::clock(cycle_count delta_t) {
* SID clocking with audio sampling.
* Fixpoint arithmetics is used.
*/
-int SID::clock(cycle_count& delta_t, short* buf, int n, int interleave) {
+int SID::updateClock(cycle_count& delta_t, short* buf, int n, int interleave) {
int s = 0;
for (;;) {
@@ -1409,13 +1408,13 @@ int SID::clock(cycle_count& delta_t, short* buf, int n, int interleave) {
if (s >= n) {
return s;
}
- clock(delta_t_sample);
+ updateClock(delta_t_sample);
delta_t -= delta_t_sample;
sample_offset = (next_sample_offset & FIXP_MASK) - (1 << (FIXP_SHIFT - 1));
buf[s++*interleave] = output();
}
- clock(delta_t);
+ updateClock(delta_t);
sample_offset -= delta_t << FIXP_SHIFT;
delta_t = 0;
return s;
diff --git a/audio/softsynth/sid.h b/audio/softsynth/sid.h
index c78f538441..d6e402dc3b 100644
--- a/audio/softsynth/sid.h
+++ b/audio/softsynth/sid.h
@@ -60,7 +60,7 @@ public:
void set_sync_source(WaveformGenerator*);
- void clock(cycle_count delta_t);
+ void updateClock(cycle_count delta_t);
void synchronize();
void reset();
@@ -133,7 +133,7 @@ public:
void enable_filter(bool enable);
- void clock(cycle_count delta_t,
+ void updateClock(cycle_count delta_t,
sound_sample voice1, sound_sample voice2, sound_sample voice3);
void reset();
@@ -201,7 +201,7 @@ public:
enum State { ATTACK, DECAY_SUSTAIN, RELEASE };
- void clock(cycle_count delta_t);
+ void updateClock(cycle_count delta_t);
void reset();
void writeCONTROL_REG(reg8);
@@ -246,7 +246,7 @@ public:
void enable_filter(bool enable);
void set_sampling_parameter(double pass_freq);
- void clock(cycle_count delta_t, sound_sample Vi);
+ void updateClock(cycle_count delta_t, sound_sample Vi);
void reset();
// Audio output (20 bits).
@@ -312,8 +312,8 @@ public:
double sample_freq, double pass_freq = -1,
double filter_scale = 0.97);
- void clock(cycle_count delta_t);
- int clock(cycle_count& delta_t, short* buf, int n, int interleave = 1);
+ void updateClock(cycle_count delta_t);
+ int updateClock(cycle_count& delta_t, short* buf, int n, int interleave = 1);
void reset();
// Read/write registers.
diff --git a/audio/softsynth/ym2612.cpp b/audio/softsynth/ym2612.cpp
index 6b3c2aab73..162c92f05a 100644
--- a/audio/softsynth/ym2612.cpp
+++ b/audio/softsynth/ym2612.cpp
@@ -27,7 +27,11 @@
#include "audio/softsynth/ym2612.h"
#include "common/util.h"
#include "audio/musicplugin.h"
+#include "common/error.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "common/translation.h"
+#include "common/types.h"
////////////////////////////////////////
//
diff --git a/backends/audiocd/sdl/sdl-audiocd.cpp b/backends/audiocd/sdl/sdl-audiocd.cpp
index 4136c34403..82c9549a57 100644
--- a/backends/audiocd/sdl/sdl-audiocd.cpp
+++ b/backends/audiocd/sdl/sdl-audiocd.cpp
@@ -27,6 +27,7 @@
#if defined(SDL_BACKEND)
+#include "common/textconsole.h"
#include "backends/audiocd/sdl/sdl-audiocd.h"
SdlAudioCDManager::SdlAudioCDManager()
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index 06db1dc027..73dc60695b 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -31,10 +31,10 @@
namespace Common {
#ifdef ENABLE_KEYMAPPER
- class Keymapper;
+class Keymapper;
#endif
#ifdef ENABLE_VKEYBD
- class VirtualKeyboard;
+class VirtualKeyboard;
#endif
}
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index ce846a0836..6e343b63f5 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -31,6 +31,7 @@
#include "backends/platform/sdl/sdl.h"
#include "backends/graphics/graphics.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
// FIXME move joystick defines out and replace with confile file options
// we should really allow users to map any key to a joystick button
@@ -65,7 +66,7 @@ SdlEventSource::SdlEventSource()
// Enable joystick
if (SDL_NumJoysticks() > 0) {
- printf("Using joystick: %s\n", SDL_JoystickName(0));
+ debug("Using joystick: %s", SDL_JoystickName(0));
_joystick = SDL_JoystickOpen(joystick_num);
}
}
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
index fd9628995d..3f3efe9e2a 100644
--- a/backends/events/webossdl/webossdl-events.cpp
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -25,7 +25,11 @@
#ifdef WEBOS
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "common/scummsys.h"
+#include "common/system.h"
#include "sys/time.h"
#include "time.h"
@@ -35,9 +39,6 @@
// Inidicates if gesture area is pressed down or not.
static bool gestureDown = false;
-// The timestamp when gesture area was pressed down.
-static int gestureDownTime = 0;
-
// The timestamp when screen was pressed down.
static int screenDownTime = 0;
@@ -91,6 +92,8 @@ 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;
}
@@ -107,10 +110,17 @@ bool WebOSSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
// Handle gesture area tap.
if (ev.key.keysym.sym == SDLK_WORLD_71) {
gestureDown = true;
- gestureDownTime = getMillis();
return true;
}
+ // Ensure that ALT key (Gesture down) is ignored when back or forward
+ // gesture is detected. This is needed for WebOS 1 which releases the
+ // gesture tap AFTER the backward gesture event and not BEFORE (Like
+ // WebOS 2).
+ if (ev.key.keysym.sym == 27 || ev.key.keysym.sym == 229) {
+ gestureDown = false;
+ }
+
// Call original SDL key handler.
return SdlEventSource::handleKeyDown(ev, event);
}
diff --git a/backends/fs/amigaos4/amigaos4-fs-factory.cpp b/backends/fs/amigaos4/amigaos4-fs-factory.cpp
index 2c7dc61278..51c2c294d4 100644
--- a/backends/fs/amigaos4/amigaos4-fs-factory.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs-factory.cpp
@@ -23,8 +23,9 @@
*/
#if defined(__amigaos4__)
+
#include "backends/fs/amigaos4/amigaos4-fs-factory.h"
-#include "backends/fs/amigaos4/amigaos4-fs.cpp"
+#include "backends/fs/amigaos4/amigaos4-fs.h"
AbstractFSNode *AmigaOSFilesystemFactory::makeRootFileNode() const {
return new AmigaOSFilesystemNode();
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 8a57a3cf1c..4f763ef9e8 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -23,97 +23,16 @@
*/
#if defined(__amigaos4__)
-#ifdef __USE_INLINE__
-#undef __USE_INLINE__
-#endif
-
-#include <proto/exec.h>
-#include <proto/dos.h>
-#include <stdio.h>
-
-#ifndef USE_NEWLIB
-#include <strings.h>
-#endif
+#include "backends/fs/amigaos4/amigaos4-fs.h"
+#include "backends/fs/stdiostream.h"
#include "common/debug.h"
#include "common/util.h"
-#include "backends/fs/abstract-fs.h"
-#include "backends/fs/stdiostream.h"
#define ENTER() /* debug(6, "Enter") */
#define LEAVE() /* debug(6, "Leave") */
/**
- * Implementation of the ScummVM file system API.
- *
- * Parts of this class are documented in the base interface class, AbstractFSNode.
- */
-class AmigaOSFilesystemNode : public AbstractFSNode {
-protected:
- BPTR _pFileLock;
- Common::String _sDisplayName;
- Common::String _sPath;
- bool _bIsDirectory;
- bool _bIsValid;
- uint32 _nProt;
-
- /**
- * Creates a list with all the volumes present in the root node.
- */
- virtual AbstractFSList listVolumes() const;
-
-public:
- /**
- * Creates an AmigaOSFilesystemNode with the root node as path.
- */
- AmigaOSFilesystemNode();
-
- /**
- * Creates an AmigaOSFilesystemNode for a given path.
- *
- * @param path Common::String with the path the new node should point to.
- */
- AmigaOSFilesystemNode(const Common::String &p);
-
- /**
- * Creates an AmigaOSFilesystemNode given its lock and display name
- *
- * @param pLock BPTR to the lock.
- * @param pDisplayName name to be used for display, in case not supplied the FilePart() of the filename will be used.
- *
- * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private
- */
- AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0);
-
- /**
- * Copy constructor.
- *
- * @note Needed because it duplicates the file lock
- */
- AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node);
-
- /**
- * Destructor.
- */
- virtual ~AmigaOSFilesystemNode();
-
- virtual bool exists() const;
- virtual Common::String getDisplayName() const { return _sDisplayName; };
- virtual Common::String getName() const { return _sDisplayName; };
- virtual Common::String getPath() const { return _sPath; };
- virtual bool isDirectory() const { return _bIsDirectory; };
- virtual bool isReadable() const;
- virtual bool isWritable() const;
-
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
-};
-
-/**
* Returns the last component of a given path.
*
* @param str Common::String containing the path.
@@ -497,11 +416,11 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
}
Common::SeekableReadStream *AmigaOSFilesystemNode::createReadStream() {
- return StdioStream::makeFromPath(getPath().c_str(), false);
+ return StdioStream::makeFromPath(getPath(), false);
}
Common::WriteStream *AmigaOSFilesystemNode::createWriteStream() {
- return StdioStream::makeFromPath(getPath().c_str(), true);
+ return StdioStream::makeFromPath(getPath(), true);
}
#endif //defined(__amigaos4__)
diff --git a/backends/fs/amigaos4/amigaos4-fs.h b/backends/fs/amigaos4/amigaos4-fs.h
new file mode 100644
index 0000000000..83188f89f1
--- /dev/null
+++ b/backends/fs/amigaos4/amigaos4-fs.h
@@ -0,0 +1,113 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 AMIGAOS_FILESYSTEM_H
+#define AMIGAOS_FILESYSTEM_H
+
+#ifdef __USE_INLINE__
+#undef __USE_INLINE__
+#endif
+
+#include <proto/exec.h>
+#include <proto/dos.h>
+#include <stdio.h>
+
+#ifndef USE_NEWLIB
+#include <strings.h>
+#endif
+
+#include "backends/fs/abstract-fs.h"
+
+/**
+ * Implementation of the ScummVM file system API.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class AmigaOSFilesystemNode : public AbstractFSNode {
+protected:
+ BPTR _pFileLock;
+ Common::String _sDisplayName;
+ Common::String _sPath;
+ bool _bIsDirectory;
+ bool _bIsValid;
+ uint32 _nProt;
+
+ /**
+ * Creates a list with all the volumes present in the root node.
+ */
+ virtual AbstractFSList listVolumes() const;
+
+public:
+ /**
+ * Creates an AmigaOSFilesystemNode with the root node as path.
+ */
+ AmigaOSFilesystemNode();
+
+ /**
+ * Creates an AmigaOSFilesystemNode for a given path.
+ *
+ * @param path Common::String with the path the new node should point to.
+ */
+ AmigaOSFilesystemNode(const Common::String &p);
+
+ /**
+ * Creates an AmigaOSFilesystemNode given its lock and display name
+ *
+ * @param pLock BPTR to the lock.
+ * @param pDisplayName name to be used for display, in case not supplied the FilePart() of the filename will be used.
+ *
+ * @note This shouldn't even be public as it's only internally, at best it should have been protected if not private
+ */
+ AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0);
+
+ /**
+ * Copy constructor.
+ *
+ * @note Needed because it duplicates the file lock
+ */
+ AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node);
+
+ /**
+ * Destructor.
+ */
+ virtual ~AmigaOSFilesystemNode();
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const { return _sDisplayName; };
+ virtual Common::String getName() const { return _sDisplayName; };
+ virtual Common::String getPath() const { return _sPath; };
+ virtual bool isDirectory() const { return _bIsDirectory; };
+ virtual bool isReadable() const;
+ virtual bool isWritable() const;
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+};
+
+
+#endif
diff --git a/backends/fs/n64/n64-fs-factory.cpp b/backends/fs/n64/n64-fs-factory.cpp
index 7e314693b8..e362e3214a 100644
--- a/backends/fs/n64/n64-fs-factory.cpp
+++ b/backends/fs/n64/n64-fs-factory.cpp
@@ -25,9 +25,10 @@
#ifdef __N64__
#include <n64utils.h>
+#include <romfs.h>
#include "backends/fs/n64/n64-fs-factory.h"
-#include "backends/fs/n64/n64-fs.cpp"
+#include "backends/fs/n64/n64-fs.h"
AbstractFSNode *N64FilesystemFactory::makeRootFileNode() const {
return new N64FilesystemNode();
diff --git a/backends/fs/n64/n64-fs-factory.h b/backends/fs/n64/n64-fs-factory.h
index 915153c6f8..35bad9600a 100644
--- a/backends/fs/n64/n64-fs-factory.h
+++ b/backends/fs/n64/n64-fs-factory.h
@@ -25,7 +25,6 @@
#ifndef N64_FILESYSTEM_FACTORY_H
#define N64_FILESYSTEM_FACTORY_H
-#include <romfs.h>
#include "backends/fs/fs-factory.h"
/**
diff --git a/backends/fs/n64/n64-fs.cpp b/backends/fs/n64/n64-fs.cpp
index 4def84afcd..e712c198a9 100644
--- a/backends/fs/n64/n64-fs.cpp
+++ b/backends/fs/n64/n64-fs.cpp
@@ -22,65 +22,18 @@
#ifdef __N64__
-#include "backends/fs/abstract-fs.h"
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+#include "backends/fs/n64/n64-fs.h"
#include "backends/fs/n64/romfsstream.h"
+#include <romfs.h>
#include <sys/param.h>
#include <unistd.h>
#include <n64utils.h>
#define ROOT_PATH "/"
-/**
- * Implementation of the ScummVM file system API based on N64 Hkz romfs.
- *
- * Parts of this class are documented in the base interface class, AbstractFSNode.
- */
-class N64FilesystemNode : public AbstractFSNode {
-protected:
- Common::String _displayName;
- Common::String _path;
- bool _isDirectory;
- bool _isValid;
-
-public:
- /**
- * Creates a N64FilesystemNode with the root node as path.
- */
- N64FilesystemNode();
-
- /**
- * Creates a N64FilesystemNode for a given path.
- *
- * @param path Common::String with the path the new node should point to.
- * @param verify true if the isValid and isDirectory flags should be verified during the construction.
- */
- N64FilesystemNode(const Common::String &p, bool verify = true);
-
- virtual bool exists() const;
- virtual Common::String getDisplayName() const {
- return _displayName;
- }
- virtual Common::String getName() const {
- return _displayName;
- }
- virtual Common::String getPath() const {
- return _path;
- }
- virtual bool isDirectory() const {
- return _isDirectory;
- }
- virtual bool isReadable() const;
- virtual bool isWritable() const;
-
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
-};
-
N64FilesystemNode::N64FilesystemNode() {
_isDirectory = true;
_displayName = "Root";
diff --git a/backends/fs/n64/n64-fs.h b/backends/fs/n64/n64-fs.h
new file mode 100644
index 0000000000..3a5dd375b9
--- /dev/null
+++ b/backends/fs/n64/n64-fs.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.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef N64_FILESYSTEM_H
+#define N64_FILESYSTEM_H
+
+#include "backends/fs/abstract-fs.h"
+
+/**
+ * Implementation of the ScummVM file system API based on N64 Hkz romfs.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class N64FilesystemNode : public AbstractFSNode {
+protected:
+ Common::String _displayName;
+ Common::String _path;
+ bool _isDirectory;
+ bool _isValid;
+
+public:
+ /**
+ * Creates a N64FilesystemNode with the root node as path.
+ */
+ N64FilesystemNode();
+
+ /**
+ * Creates a N64FilesystemNode for a given path.
+ *
+ * @param path Common::String with the path the new node should point to.
+ * @param verify true if the isValid and isDirectory flags should be verified during the construction.
+ */
+ N64FilesystemNode(const Common::String &p, bool verify = true);
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const {
+ return _displayName;
+ }
+ virtual Common::String getName() const {
+ return _displayName;
+ }
+ virtual Common::String getPath() const {
+ return _path;
+ }
+ virtual bool isDirectory() const {
+ return _isDirectory;
+ }
+ virtual bool isReadable() const;
+ virtual bool isWritable() const;
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+};
+
+#endif
diff --git a/backends/fs/posix/posix-fs-factory.cpp b/backends/fs/posix/posix-fs-factory.cpp
index df21d41dda..639f57ac06 100644
--- a/backends/fs/posix/posix-fs-factory.cpp
+++ b/backends/fs/posix/posix-fs-factory.cpp
@@ -23,8 +23,15 @@
*/
#if defined(UNIX)
+
+// 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.
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+
#include "backends/fs/posix/posix-fs-factory.h"
-#include "backends/fs/posix/posix-fs.cpp"
+#include "backends/fs/posix/posix-fs.h"
AbstractFSNode *POSIXFilesystemFactory::makeRootFileNode() const {
return new POSIXFilesystemNode("/");
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index b218e9dd59..34edb78504 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -24,6 +24,12 @@
#if defined(UNIX)
+// 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.
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+
#include "backends/fs/posix/posix-fs.h"
#include "backends/fs/stdiostream.h"
#include "common/algorithm.h"
@@ -238,11 +244,11 @@ AbstractFSNode *POSIXFilesystemNode::getParent() const {
}
Common::SeekableReadStream *POSIXFilesystemNode::createReadStream() {
- return StdioStream::makeFromPath(getPath().c_str(), false);
+ return StdioStream::makeFromPath(getPath(), false);
}
Common::WriteStream *POSIXFilesystemNode::createWriteStream() {
- return StdioStream::makeFromPath(getPath().c_str(), true);
+ return StdioStream::makeFromPath(getPath(), true);
}
#endif //#if defined(UNIX)
diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h
index 859e8973b3..003a0b38d0 100644
--- a/backends/fs/posix/posix-fs.h
+++ b/backends/fs/posix/posix-fs.h
@@ -83,4 +83,4 @@ private:
virtual void setFlags();
};
-#endif /*POSIX_FILESYSTEM_H*/
+#endif
diff --git a/backends/fs/ps2/ps2-fs-factory.cpp b/backends/fs/ps2/ps2-fs-factory.cpp
index 8b5202bff4..9e7ec3fa10 100644
--- a/backends/fs/ps2/ps2-fs-factory.cpp
+++ b/backends/fs/ps2/ps2-fs-factory.cpp
@@ -28,7 +28,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "backends/fs/ps2/ps2-fs-factory.h"
-#include "backends/fs/ps2/ps2-fs.cpp"
+#include "backends/fs/ps2/ps2-fs.h"
DECLARE_SINGLETON(Ps2FilesystemFactory);
@@ -43,4 +43,5 @@ AbstractFSNode *Ps2FilesystemFactory::makeCurrentDirectoryFileNode() const {
AbstractFSNode *Ps2FilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new Ps2FilesystemNode(path, true);
}
+
#endif
diff --git a/backends/fs/ps2/ps2-fs-factory.h b/backends/fs/ps2/ps2-fs-factory.h
index 3a1dec252d..f193982d6b 100644
--- a/backends/fs/ps2/ps2-fs-factory.h
+++ b/backends/fs/ps2/ps2-fs-factory.h
@@ -39,9 +39,6 @@ public:
virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
-protected:
- Ps2FilesystemFactory() {};
-
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 0968ecc9d3..24cc6bd30a 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -22,7 +22,14 @@
* $Id$
*/
-#include "backends/fs/abstract-fs.h"
+#if defined(__PLAYSTATION2__)
+
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+
+#include "backends/fs/ps2/ps2-fs.h"
+
#include <kernel.h>
#include <stdio.h>
#include <stdlib.h>
@@ -40,81 +47,6 @@
extern AsyncFio fio;
extern OSystem_PS2 *g_systemPs2;
-/**
- * Implementation of the ScummVM file system API based on the Ps2SDK.
- *
- * Parts of this class are documented in the base interface class, AbstractFSNode.
- */
-class Ps2FilesystemNode : public AbstractFSNode {
-
-friend class Ps2FilesystemFactory;
-
-protected:
- Common::String _displayName;
- Common::String _path;
- bool _isDirectory;
- bool _isRoot;
- bool _isHere;
- bool _verified;
-
-private:
- const char *getDeviceDescription() const;
- void doverify();
-
-public:
- /**
- * Creates a PS2FilesystemNode with the root node as path.
- */
- Ps2FilesystemNode();
-
- /**
- * Creates a PS2FilesystemNode for a given path.
- *
- * @param path Common::String with the path the new node should point to.
- */
- Ps2FilesystemNode(const Common::String &path);
- Ps2FilesystemNode(const Common::String &path, bool verify);
-
- /**
- * Copy constructor.
- */
- Ps2FilesystemNode(const Ps2FilesystemNode *node);
-
- virtual Common::String getDisplayName() const { return _displayName; }
- virtual Common::String getName() const { return _displayName; }
- virtual Common::String getPath() const { return _path; }
-
- virtual bool exists() const {
- // printf("%s : is %d\n", _path.c_str(), _isHere);
- return _isHere;
- }
-
- virtual bool isDirectory() const {
- // printf("%s : dir %d\n", _path.c_str(), _isDirectory);
- return _isDirectory;
- }
-
- virtual bool isReadable() const {
- return _isHere;
- }
-
- virtual bool isWritable() const {
- if (strncmp(_path.c_str(), "cdfs", 4)==0)
- return false;
- return true; // exists(); // creating ?
- }
-
- virtual AbstractFSNode *clone() const { return new Ps2FilesystemNode(this); }
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
-
- int getDev() { return 0; };
-};
-
const char *_lastPathComponent(const Common::String &str) {
if (str.empty())
return "";
@@ -502,10 +434,12 @@ const char *Ps2FilesystemNode::getDeviceDescription() const {
}
Common::SeekableReadStream *Ps2FilesystemNode::createReadStream() {
- Common::SeekableReadStream *ss = PS2FileStream::makeFromPath(getPath().c_str(), false);
+ Common::SeekableReadStream *ss = PS2FileStream::makeFromPath(getPath(), false);
return ss;
}
Common::WriteStream *Ps2FilesystemNode::createWriteStream() {
- return PS2FileStream::makeFromPath(getPath().c_str(), true);
+ return PS2FileStream::makeFromPath(getPath(), true);
}
+
+#endif
diff --git a/backends/fs/ps2/ps2-fs.h b/backends/fs/ps2/ps2-fs.h
new file mode 100644
index 0000000000..0c37ceeb91
--- /dev/null
+++ b/backends/fs/ps2/ps2-fs.h
@@ -0,0 +1,105 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 PS2_FILESYSTEM_H
+#define PS2_FILESYSTEM_H
+
+#include "backends/fs/abstract-fs.h"
+
+/**
+ * Implementation of the ScummVM file system API based on the Ps2SDK.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class Ps2FilesystemNode : public AbstractFSNode {
+
+friend class Ps2FilesystemFactory;
+
+protected:
+ Common::String _displayName;
+ Common::String _path;
+ bool _isDirectory;
+ bool _isRoot;
+ bool _isHere;
+ bool _verified;
+
+private:
+ const char *getDeviceDescription() const;
+ void doverify();
+
+public:
+ /**
+ * Creates a PS2FilesystemNode with the root node as path.
+ */
+ Ps2FilesystemNode();
+
+ /**
+ * Creates a PS2FilesystemNode for a given path.
+ *
+ * @param path Common::String with the path the new node should point to.
+ */
+ Ps2FilesystemNode(const Common::String &path);
+ Ps2FilesystemNode(const Common::String &path, bool verify);
+
+ /**
+ * Copy constructor.
+ */
+ Ps2FilesystemNode(const Ps2FilesystemNode *node);
+
+ virtual Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
+
+ virtual bool exists() const {
+ // printf("%s : is %d\n", _path.c_str(), _isHere);
+ return _isHere;
+ }
+
+ virtual bool isDirectory() const {
+ // printf("%s : dir %d\n", _path.c_str(), _isDirectory);
+ return _isDirectory;
+ }
+
+ virtual bool isReadable() const {
+ return _isHere;
+ }
+
+ virtual bool isWritable() const {
+ if (strncmp(_path.c_str(), "cdfs", 4)==0)
+ return false;
+ return true; // exists(); // creating ?
+ }
+
+ virtual AbstractFSNode *clone() const { return new Ps2FilesystemNode(this); }
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+
+ int getDev() { return 0; };
+};
+
+#endif
diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp
index 7ed84de034..aee541d12a 100644
--- a/backends/fs/psp/psp-fs-factory.cpp
+++ b/backends/fs/psp/psp-fs-factory.cpp
@@ -23,8 +23,28 @@
*/
#if defined(__PSP__)
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
#include "backends/fs/psp/psp-fs-factory.h"
-#include "backends/fs/psp/psp-fs.cpp"
+#include "backends/fs/psp/psp-fs.h"
+#include "backends/platform/psp/powerman.h"
+
+#include <unistd.h>
DECLARE_SINGLETON(PSPFilesystemFactory);
@@ -34,7 +54,7 @@ AbstractFSNode *PSPFilesystemFactory::makeRootFileNode() const {
AbstractFSNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const {
char buf[MAXPATHLEN];
- char * ret = 0;
+ char *ret = 0;
PowerMan.beginCriticalSection();
ret = getcwd(buf, MAXPATHLEN);
@@ -46,4 +66,5 @@ AbstractFSNode *PSPFilesystemFactory::makeCurrentDirectoryFileNode() const {
AbstractFSNode *PSPFilesystemFactory::makeFileNodePath(const Common::String &path) const {
return new PSPFilesystemNode(path, true);
}
+
#endif
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 16a0e9cd5b..908430b2f9 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -22,12 +22,32 @@
* $Id$
*/
-#ifdef __PSP__
+#if defined(__PSP__)
-#include "engines/engine.h"
-#include "backends/fs/abstract-fs.h"
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+
+#include "backends/fs/psp/psp-fs.h"
#include "backends/fs/psp/psp-stream.h"
#include "common/bufferedstream.h"
+#include "engines/engine.h"
#include <sys/stat.h>
#include <unistd.h>
@@ -41,48 +61,6 @@
//#define __PSP_DEBUG_PRINT__ /* For debug printouts */
#include "backends/platform/psp/trace.h"
-/**
- * Implementation of the ScummVM file system API based on PSPSDK API.
- *
- * Parts of this class are documented in the base interface class, AbstractFSNode.
- */
-class PSPFilesystemNode : public AbstractFSNode {
-protected:
- Common::String _displayName;
- Common::String _path;
- bool _isDirectory;
- bool _isValid;
-
-public:
- /**
- * Creates a PSPFilesystemNode with the root node as path.
- */
- PSPFilesystemNode();
-
- /**
- * Creates a PSPFilesystemNode for a given path.
- *
- * @param path Common::String with the path the new node should point to.
- * @param verify true if the isValid and isDirectory flags should be verified during the construction.
- */
- PSPFilesystemNode(const Common::String &p, bool verify = true);
-
- virtual bool exists() const;
- virtual Common::String getDisplayName() const { return _displayName; }
- virtual Common::String getName() const { return _displayName; }
- virtual Common::String getPath() const { return _path; }
- virtual bool isDirectory() const { return _isDirectory; }
- virtual bool isReadable() const;
- virtual bool isWritable() const;
-
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
-};
-
PSPFilesystemNode::PSPFilesystemNode() {
_isDirectory = true;
_displayName = "Root";
diff --git a/backends/fs/psp/psp-fs.h b/backends/fs/psp/psp-fs.h
new file mode 100644
index 0000000000..12d2c540c0
--- /dev/null
+++ b/backends/fs/psp/psp-fs.h
@@ -0,0 +1,72 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef PSP_FILESYSTEM_H
+#define PSP_FILESYSTEM_H
+
+#include "backends/fs/abstract-fs.h"
+
+/**
+ * Implementation of the ScummVM file system API based on PSPSDK API.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class PSPFilesystemNode : public AbstractFSNode {
+protected:
+ Common::String _displayName;
+ Common::String _path;
+ bool _isDirectory;
+ bool _isValid;
+
+public:
+ /**
+ * Creates a PSPFilesystemNode with the root node as path.
+ */
+ PSPFilesystemNode();
+
+ /**
+ * Creates a PSPFilesystemNode for a given path.
+ *
+ * @param path Common::String with the path the new node should point to.
+ * @param verify true if the isValid and isDirectory flags should be verified during the construction.
+ */
+ PSPFilesystemNode(const Common::String &p, bool verify = true);
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
+ virtual bool isDirectory() const { return _isDirectory; }
+ virtual bool isReadable() const;
+ virtual bool isWritable() const;
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+};
+
+#endif
diff --git a/backends/fs/symbian/symbian-fs-factory.cpp b/backends/fs/symbian/symbian-fs-factory.cpp
index c70a67f339..9afacfebf5 100644
--- a/backends/fs/symbian/symbian-fs-factory.cpp
+++ b/backends/fs/symbian/symbian-fs-factory.cpp
@@ -24,7 +24,7 @@
#if defined(__SYMBIAN32__)
#include "backends/fs/symbian/symbian-fs-factory.h"
-#include "backends/fs/symbian/symbian-fs.cpp"
+#include "backends/fs/symbian/symbian-fs.h"
AbstractFSNode *SymbianFilesystemFactory::makeRootFileNode() const {
return new SymbianFilesystemNode(true);
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 5d4951e269..b8fc5e19f6 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -23,7 +23,8 @@
*/
#if defined (__SYMBIAN32__)
-#include "backends/fs/abstract-fs.h"
+
+#include "backends/fs/symbian/symbian-fs.h"
#include "backends/fs/symbian/symbianstream.h"
#include "backends/platform/symbian/src/symbianos.h"
@@ -35,66 +36,11 @@
#define KDriveLabelSize 30
/**
- * Implementation of the ScummVM file system API based on POSIX.
- *
- * Parts of this class are documented in the base interface class, AbstractFSNode.
- */
-class SymbianFilesystemNode : public AbstractFSNode {
-protected:
- Common::String _displayName;
- Common::String _path;
- TBool _isDirectory;
- TBool _isValid;
- TBool _isPseudoRoot;
-public:
- /**
- * Creates a SymbianFilesystemNode with the root node as path.
- *
- * @param aIsRoot true if the node will be a pseudo root, false otherwise.
- */
- SymbianFilesystemNode(bool aIsRoot);
-
- /**
- * Creates a SymbianFilesystemNode for a given path.
- *
- * @param path Common::String with the path the new node should point to.
- */
- SymbianFilesystemNode(const Common::String &path);
-
- virtual bool exists() const {
- TFileName fname;
- TPtrC8 ptr((const unsigned char*) _path.c_str(), _path.size());
- fname.Copy(ptr);
- TBool fileExists = BaflUtils::FileExists(static_cast<OSystem_SDL_Symbian*> (g_system)->FsSession(), fname);
- if (!fileExists) {
- TParsePtrC parser(fname);
- if (parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) {
- fileExists = ETrue;
- }
- }
- return fileExists;
- }
- virtual Common::String getDisplayName() const { return _displayName; }
- virtual Common::String getName() const { return _displayName; }
- virtual Common::String getPath() const { return _path; }
- virtual bool isDirectory() const { return _isDirectory; }
- virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; } //FIXME: this is just a stub
- virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; } //FIXME: this is just a stub
-
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
-};
-
-/**
* Fixes the path by changing all slashes to backslashes.
*
* @param path Common::String with the path to be fixed.
*/
-static void fixFilePath(Common::String& aPath){
+static void fixFilePath(Common::String &aPath){
TInt len = aPath.size();
for (TInt index = 0; index < len; index++) {
@@ -106,18 +52,15 @@ static void fixFilePath(Common::String& aPath){
SymbianFilesystemNode::SymbianFilesystemNode(bool aIsRoot) {
_path = "";
- _isValid = ETrue;
- _isDirectory = ETrue;
+ _isValid = true;
+ _isDirectory = true;
_isPseudoRoot = aIsRoot;
_displayName = "Root";
}
SymbianFilesystemNode::SymbianFilesystemNode(const Common::String &path) {
- if (path.size() == 0)
- _isPseudoRoot = ETrue;
- else
- _isPseudoRoot = EFalse;
+ _isPseudoRoot = path.empty();
_path = path;
@@ -131,18 +74,41 @@ SymbianFilesystemNode::SymbianFilesystemNode(const Common::String &path) {
fname.Copy(ptr);
if (static_cast<OSystem_SDL_Symbian*>(g_system)->FsSession().Entry(fname, fileAttribs) == KErrNone) {
- _isValid = ETrue;
+ _isValid = true;
_isDirectory = fileAttribs.IsDir();
} else {
- _isValid = ETrue;
- _isDirectory = EFalse;
+ _isValid = true;
+ _isDirectory = false;
TParsePtrC parser(fname);
if (parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) {
- _isDirectory = ETrue;
+ _isDirectory = true;
}
}
}
+bool SymbianFilesystemNode::exists() const {
+ TFileName fname;
+ TPtrC8 ptr((const unsigned char*) _path.c_str(), _path.size());
+ fname.Copy(ptr);
+ bool fileExists = BaflUtils::FileExists(static_cast<OSystem_SDL_Symbian*> (g_system)->FsSession(), fname);
+ if (!fileExists) {
+ TParsePtrC parser(fname);
+ if (parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) {
+ fileExists = true;
+ }
+ }
+ return fileExists;
+}
+
+bool SymbianFilesystemNode::isReadable() const {
+ return access(_path.c_str(), R_OK) == 0;
+}
+
+bool SymbianFilesystemNode::isWritable() const {
+ return access(_path.c_str(), W_OK) == 0;
+}
+
+
AbstractFSNode *SymbianFilesystemNode::getChild(const Common::String &n) const {
assert(_isDirectory);
Common::String newPath(_path);
@@ -191,9 +157,9 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
SymbianFilesystemNode entry(false);
entry._displayName = (char*) driveString8.PtrZ(); // drive_name
- entry._isDirectory = ETrue;
- entry._isValid = ETrue;
- entry._isPseudoRoot = EFalse;
+ entry._isDirectory = true;
+ entry._isValid = true;
+ entry._isPseudoRoot = false;
entry._path = path;
myList.push_back(new SymbianFilesystemNode(entry));
}
@@ -209,20 +175,20 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
if (static_cast<OSystem_SDL_Symbian*>(g_system)->FsSession().GetDir(fname, KEntryAttNormal|KEntryAttDir, 0, dirPtr) == KErrNone) {
CleanupStack::PushL(dirPtr);
- TInt cnt=dirPtr->Count();
- for (TInt loop=0;loop<cnt;loop++) {
- TEntry fileentry=(*dirPtr)[loop];
+ TInt cnt = dirPtr->Count();
+ for (TInt loop = 0; loop < cnt; loop++) {
+ TEntry fileentry = (*dirPtr)[loop];
nameBuf.Copy(fileentry.iName);
- SymbianFilesystemNode entry(EFalse);
- entry._isPseudoRoot = EFalse;
+ SymbianFilesystemNode entry(false);
+ entry._isPseudoRoot = false;
- entry._displayName =(char*) nameBuf.PtrZ();
+ entry._displayName =(char *)nameBuf.PtrZ();
entry._path = _path;
if (entry._path.lastChar() != '\\')
entry._path+= '\\';
- entry._path +=(char*) nameBuf.PtrZ();
+ entry._path +=(char *)nameBuf.PtrZ();
entry._isDirectory = fileentry.IsDir();
// Honor the chosen mode
@@ -245,29 +211,27 @@ AbstractFSNode *SymbianFilesystemNode::getParent() const {
// Root node is its own parent. Still we can't just return this
// as the GUI code will call delete on the old node.
if (!_isPseudoRoot && _path.size() > 3) {
- p = new SymbianFilesystemNode(EFalse);
+ p = new SymbianFilesystemNode(false);
const char *start = _path.c_str();
const char *end = lastPathComponent(_path, '\\');
p->_path = Common::String(start, end - start);
- p->_isValid = ETrue;
- p->_isDirectory = ETrue;
+ p->_isValid = true;
+ p->_isDirectory = true;
p->_displayName = lastPathComponent(p->_path, '\\');
- }
- else
- {
- p = new SymbianFilesystemNode(ETrue);
+ } else {
+ p = new SymbianFilesystemNode(true);
}
return p;
}
Common::SeekableReadStream *SymbianFilesystemNode::createReadStream() {
- return SymbianStdioStream::makeFromPath(getPath().c_str(), false);
+ return SymbianStdioStream::makeFromPath(getPath(), false);
}
Common::WriteStream *SymbianFilesystemNode::createWriteStream() {
- return SymbianStdioStream::makeFromPath(getPath().c_str(), true);
+ return SymbianStdioStream::makeFromPath(getPath(), true);
}
#endif //#if defined (__SYMBIAN32__)
diff --git a/backends/fs/symbian/symbian-fs.h b/backends/fs/symbian/symbian-fs.h
new file mode 100644
index 0000000000..9b0e80c3d6
--- /dev/null
+++ b/backends/fs/symbian/symbian-fs.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.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef SYMBIAN_FILESYSTEM_H
+#define SYMBIAN_FILESYSTEM_H
+
+#include "backends/fs/abstract-fs.h"
+
+/**
+ * Implementation of the ScummVM file system API based on POSIX.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class SymbianFilesystemNode : public AbstractFSNode {
+protected:
+ Common::String _displayName;
+ Common::String _path;
+ bool _isDirectory;
+ bool _isValid;
+ bool _isPseudoRoot;
+public:
+ /**
+ * Creates a SymbianFilesystemNode with the root node as path.
+ *
+ * @param aIsRoot true if the node will be a pseudo root, false otherwise.
+ */
+ SymbianFilesystemNode(bool aIsRoot);
+
+ /**
+ * Creates a SymbianFilesystemNode for a given path.
+ *
+ * @param path Common::String with the path the new node should point to.
+ */
+ SymbianFilesystemNode(const Common::String &path);
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
+ virtual bool isDirectory() const { return _isDirectory; }
+ virtual bool isReadable() const;
+ virtual bool isWritable() const;
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+};
+
+#endif
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp
index 6a11d7d12e..34cde8ef46 100644
--- a/backends/fs/wii/wii-fs-factory.cpp
+++ b/backends/fs/wii/wii-fs-factory.cpp
@@ -22,10 +22,13 @@
#if defined(__WII__)
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+
#include <unistd.h>
#include "backends/fs/wii/wii-fs-factory.h"
-#include "backends/fs/wii/wii-fs.cpp"
+#include "backends/fs/wii/wii-fs.h"
#ifdef USE_WII_DI
#include <di/di.h>
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index e6ba2a4aa0..eb631df1bf 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -22,7 +22,13 @@
#if defined(__WII__)
-#include "backends/fs/abstract-fs.h"
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+
+#include "backends/fs/wii/wii-fs.h"
+#include "backends/fs/wii/wii-fs-factory.h"
#include "backends/fs/stdiostream.h"
#include <sys/iosupport.h>
@@ -34,52 +40,6 @@
#include <gctypes.h>
-/**
- * Implementation of the ScummVM file system API based on Wii.
- *
- * Parts of this class are documented in the base interface class, AbstractFSNode.
- */
-class WiiFilesystemNode : public AbstractFSNode {
-protected:
- Common::String _displayName;
- Common::String _path;
- bool _exists, _isDirectory, _isReadable, _isWritable;
-
- virtual void initRootNode();
- virtual bool getDevopChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual void setFlags(const struct stat *st);
- virtual void clearFlags();
-
-public:
- /**
- * Creates a WiiFilesystemNode with the root node as path.
- */
- WiiFilesystemNode();
-
- /**
- * Creates a WiiFilesystemNode for a given path.
- *
- * @param path Common::String with the path the new node should point to.
- */
- WiiFilesystemNode(const Common::String &path);
- WiiFilesystemNode(const Common::String &p, const struct stat *st);
-
- virtual bool exists() const;
- virtual Common::String getDisplayName() const { return _displayName; }
- virtual Common::String getName() const { return _displayName; }
- virtual Common::String getPath() const { return _path; }
- virtual bool isDirectory() const { return _isDirectory; }
- virtual bool isReadable() const { return _isReadable; }
- virtual bool isWritable() const { return _isWritable; }
-
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
-};
-
// gets all registered devoptab devices
bool WiiFilesystemNode::getDevopChildren(AbstractFSList &list, ListMode mode, bool hidden) const {
u8 i;
@@ -234,11 +194,11 @@ AbstractFSNode *WiiFilesystemNode::getParent() const {
}
Common::SeekableReadStream *WiiFilesystemNode::createReadStream() {
- return StdioStream::makeFromPath(getPath().c_str(), false);
+ return StdioStream::makeFromPath(getPath(), false);
}
Common::WriteStream *WiiFilesystemNode::createWriteStream() {
- return StdioStream::makeFromPath(getPath().c_str(), true);
+ return StdioStream::makeFromPath(getPath(), true);
}
#endif //#if defined(__WII__)
diff --git a/backends/fs/wii/wii-fs.h b/backends/fs/wii/wii-fs.h
new file mode 100644
index 0000000000..fd160624ca
--- /dev/null
+++ b/backends/fs/wii/wii-fs.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.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef WII_FILESYSTEM_H
+#define WII_FILESYSTEM_H
+
+#include "backends/fs/abstract-fs.h"
+
+/**
+ * Implementation of the ScummVM file system API based on Wii.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class WiiFilesystemNode : public AbstractFSNode {
+protected:
+ Common::String _displayName;
+ Common::String _path;
+ bool _exists, _isDirectory, _isReadable, _isWritable;
+
+ virtual void initRootNode();
+ virtual bool getDevopChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual void setFlags(const struct stat *st);
+ virtual void clearFlags();
+
+public:
+ /**
+ * Creates a WiiFilesystemNode with the root node as path.
+ */
+ WiiFilesystemNode();
+
+ /**
+ * Creates a WiiFilesystemNode for a given path.
+ *
+ * @param path Common::String with the path the new node should point to.
+ */
+ WiiFilesystemNode(const Common::String &path);
+ WiiFilesystemNode(const Common::String &p, const struct stat *st);
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
+ virtual bool isDirectory() const { return _isDirectory; }
+ virtual bool isReadable() const { return _isReadable; }
+ virtual bool isWritable() const { return _isWritable; }
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+};
+
+#endif
diff --git a/backends/fs/windows/windows-fs-factory.cpp b/backends/fs/windows/windows-fs-factory.cpp
index ae9485a121..0b240bcbcf 100644
--- a/backends/fs/windows/windows-fs-factory.cpp
+++ b/backends/fs/windows/windows-fs-factory.cpp
@@ -22,13 +22,13 @@
* $Id$
*/
+#if defined(WIN32)
+
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
-#if defined(WIN32)
-
#include "backends/fs/windows/windows-fs-factory.h"
-#include "backends/fs/windows/windows-fs.cpp"
+#include "backends/fs/windows/windows-fs.h"
AbstractFSNode *WindowsFilesystemFactory::makeRootFileNode() const {
return new WindowsFilesystemNode();
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 00f72773c3..8345c9d7b4 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -22,23 +22,13 @@
* $Id$
*/
-#ifdef WIN32
+#if defined(WIN32)
-#if defined(ARRAYSIZE)
-#undef ARRAYSIZE
-#endif
-#include <windows.h>
-// winnt.h defines ARRAYSIZE, but we want our own one...
-#undef ARRAYSIZE
-#ifdef _WIN32_WCE
-#undef GetCurrentDirectory
-#endif
-#include "backends/fs/abstract-fs.h"
+// Disable symbol overrides so that we can use system headers.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
+#include "backends/fs/windows/windows-fs.h"
#include "backends/fs/stdiostream.h"
-#include <io.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <tchar.h>
// F_OK, R_OK and W_OK are not defined under MSVC, so we define them here
// For more information on the modes used by MSVC, check:
@@ -55,84 +45,17 @@
#define W_OK 2
#endif
-/**
- * Implementation of the ScummVM file system API based on Windows API.
- *
- * Parts of this class are documented in the base interface class, AbstractFSNode.
- */
-class WindowsFilesystemNode : public AbstractFSNode {
-protected:
- Common::String _displayName;
- Common::String _path;
- bool _isDirectory;
- bool _isPseudoRoot;
- bool _isValid;
-
-public:
- /**
- * Creates a WindowsFilesystemNode with the root node as path.
- *
- * In regular windows systems, a virtual root path is used "".
- * In windows CE, the "\" root is used instead.
- */
- WindowsFilesystemNode();
-
- /**
- * Creates a WindowsFilesystemNode for a given path.
- *
- * Examples:
- * path=c:\foo\bar.txt, currentDir=false -> c:\foo\bar.txt
- * path=c:\foo\bar.txt, currentDir=true -> current directory
- * path=NULL, currentDir=true -> current directory
- *
- * @param path Common::String with the path the new node should point to.
- * @param currentDir if true, the path parameter will be ignored and the resulting node will point to the current directory.
- */
- WindowsFilesystemNode(const Common::String &path, const bool currentDir);
-
- virtual bool exists() const { return _access(_path.c_str(), F_OK) == 0; }
- virtual Common::String getDisplayName() const { return _displayName; }
- virtual Common::String getName() const { return _displayName; }
- virtual Common::String getPath() const { return _path; }
- virtual bool isDirectory() const { return _isDirectory; }
- virtual bool isReadable() const { return _access(_path.c_str(), R_OK) == 0; }
- virtual bool isWritable() const { return _access(_path.c_str(), W_OK) == 0; }
-
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
-
-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.
- */
- static void addFile(AbstractFSList &list, ListMode mode, const char *base, WIN32_FIND_DATA* find_data);
-
- /**
- * Converts a Unicode string to Ascii format.
- *
- * @param str Common::String to convert from Unicode to Ascii.
- * @return str in Ascii format.
- */
- static char *toAscii(TCHAR *str);
-
- /**
- * Converts an Ascii string to Unicode format.
- *
- * @param str Common::String to convert from Ascii to Unicode.
- * @return str in Unicode format.
- */
- static const TCHAR* toUnicode(const char *str);
-};
+bool WindowsFilesystemNode::exists() const {
+ return _access(_path.c_str(), F_OK) == 0;
+}
+
+bool WindowsFilesystemNode::isReadable() const {
+ return _access(_path.c_str(), R_OK) == 0;
+}
+
+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) {
WindowsFilesystemNode entry;
@@ -314,11 +237,11 @@ AbstractFSNode *WindowsFilesystemNode::getParent() const {
}
Common::SeekableReadStream *WindowsFilesystemNode::createReadStream() {
- return StdioStream::makeFromPath(getPath().c_str(), false);
+ return StdioStream::makeFromPath(getPath(), false);
}
Common::WriteStream *WindowsFilesystemNode::createWriteStream() {
- return StdioStream::makeFromPath(getPath().c_str(), true);
+ return StdioStream::makeFromPath(getPath(), true);
}
#endif //#ifdef WIN32
diff --git a/backends/fs/windows/windows-fs.h b/backends/fs/windows/windows-fs.h
new file mode 100644
index 0000000000..8e4880ce23
--- /dev/null
+++ b/backends/fs/windows/windows-fs.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.
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef WINDOWS_FILESYSTEM_H
+#define WINDOWS_FILESYSTEM_H
+
+#include "backends/fs/abstract-fs.h"
+
+#if defined(ARRAYSIZE)
+#undef ARRAYSIZE
+#endif
+#include <windows.h>
+// winnt.h defines ARRAYSIZE, but we want our own one...
+#undef ARRAYSIZE
+#ifdef _WIN32_WCE
+#undef GetCurrentDirectory
+#endif
+#include <io.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <tchar.h>
+
+/**
+ * Implementation of the ScummVM file system API based on Windows API.
+ *
+ * Parts of this class are documented in the base interface class, AbstractFSNode.
+ */
+class WindowsFilesystemNode : public AbstractFSNode {
+protected:
+ Common::String _displayName;
+ Common::String _path;
+ bool _isDirectory;
+ bool _isPseudoRoot;
+ bool _isValid;
+
+public:
+ /**
+ * Creates a WindowsFilesystemNode with the root node as path.
+ *
+ * In regular windows systems, a virtual root path is used "".
+ * In windows CE, the "\" root is used instead.
+ */
+ WindowsFilesystemNode();
+
+ /**
+ * Creates a WindowsFilesystemNode for a given path.
+ *
+ * Examples:
+ * path=c:\foo\bar.txt, currentDir=false -> c:\foo\bar.txt
+ * path=c:\foo\bar.txt, currentDir=true -> current directory
+ * path=NULL, currentDir=true -> current directory
+ *
+ * @param path Common::String with the path the new node should point to.
+ * @param currentDir if true, the path parameter will be ignored and the resulting node will point to the current directory.
+ */
+ WindowsFilesystemNode(const Common::String &path, const bool currentDir);
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
+ virtual bool isDirectory() const { return _isDirectory; }
+ virtual bool isReadable() const;
+ virtual bool isWritable() const;
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
+
+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.
+ */
+ static void addFile(AbstractFSList &list, ListMode mode, const char *base, WIN32_FIND_DATA* find_data);
+
+ /**
+ * Converts a Unicode string to Ascii format.
+ *
+ * @param str Common::String to convert from Unicode to Ascii.
+ * @return str in Ascii format.
+ */
+ static char *toAscii(TCHAR *str);
+
+ /**
+ * Converts an Ascii string to Unicode format.
+ *
+ * @param str Common::String to convert from Ascii to Unicode.
+ * @return str in Unicode format.
+ */
+ static const TCHAR* toUnicode(const char *str);
+};
+
+#endif
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index 3c043ca986..4e2aee3a3b 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -31,6 +31,7 @@
#include "backends/events/dinguxsdl/dinguxsdl-events.h"
#include "graphics/scaler/aspect.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{"1x", "Standard", GFX_NORMAL},
@@ -437,14 +438,14 @@ bool DINGUXSdlGraphicsManager::loadGFXMode() {
_videoMode.aspectRatioCorrection = false;
}
- fprintf(stdout, "Game ScreenMode = %d*%d\n", _videoMode.screenWidth, _videoMode.screenHeight);
+ debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight);
if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) {
_videoMode.aspectRatioCorrection = false;
setGraphicsMode(GFX_HALF);
- fprintf(stdout, "GraphicsMode set to HALF\n");
+ debug("GraphicsMode set to HALF");
} else {
setGraphicsMode(GFX_NORMAL);
- fprintf(stdout, "GraphicsMode set to NORMAL\n");
+ debug("GraphicsMode set to NORMAL");
}
if ((_videoMode.mode == GFX_HALF) && !_overlayVisible) {
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index 4f2185ef4b..b407bf1faf 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -28,6 +28,7 @@
#include "backends/events/gph/gph-events.h"
#include "graphics/scaler/aspect.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
static const OSystem::GraphicsMode s_supportedGraphicsModes[] = {
{"1x", "Standard", GFX_NORMAL},
@@ -444,14 +445,14 @@ bool GPHGraphicsManager::loadGFXMode() {
_videoMode.aspectRatioCorrection = false;
}
- fprintf(stdout, "Game ScreenMode = %d*%d\n", _videoMode.screenWidth, _videoMode.screenHeight);
+ debug("Game ScreenMode = %d*%d", _videoMode.screenWidth, _videoMode.screenHeight);
if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) {
_videoMode.aspectRatioCorrection = false;
setGraphicsMode(GFX_HALF);
- fprintf(stdout, "GraphicsMode set to HALF\n");
+ debug("GraphicsMode set to HALF");
} else {
setGraphicsMode(GFX_NORMAL);
- fprintf(stdout, "GraphicsMode set to NORMAL\n");
+ debug("GraphicsMode set to NORMAL");
}
if ((_videoMode.mode == GFX_HALF) && !_overlayVisible) {
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index c2dcb7f587..7d1809f4ac 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -30,6 +30,7 @@
#include "backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h"
#include "backends/events/linuxmotosdl/linuxmotosdl-events.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
#include "graphics/font.h"
#include "graphics/fontman.h"
#include "graphics/scaler.h"
@@ -143,14 +144,14 @@ void LinuxmotoSdlGraphicsManager::initSize(uint w, uint h) {
}
bool LinuxmotoSdlGraphicsManager::loadGFXMode() {
- printf("Game ScreenMode = %d*%d\n",_videoMode.screenWidth, _videoMode.screenHeight);
+ debug("Game ScreenMode = %d*%d",_videoMode.screenWidth, _videoMode.screenHeight);
if (_videoMode.screenWidth > 320 || _videoMode.screenHeight > 240) {
_videoMode.aspectRatioCorrection = false;
setGraphicsMode(GFX_HALF);
- printf("GraphicsMode set to HALF\n");
+ debug("GraphicsMode set to HALF");
} else {
setGraphicsMode(GFX_NORMAL);
- printf("GraphicsMode set to NORMAL\n");
+ debug("GraphicsMode set to NORMAL");
}
if (_videoMode.mode == GFX_HALF && !_overlayVisible) {
_videoMode.overlayWidth = 320;
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index e7951a0c96..238b035425 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -42,9 +42,6 @@
#include "graphics/surface.h"
-#include "common/rect.h"
-#include "common/array.h"
-
/**
* OpenGL texture manager class
*/
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 4ac2747d25..b85cac809e 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -32,6 +32,7 @@
#include "common/config-manager.h"
#include "common/file.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#ifdef USE_OSD
#include "common/tokenizer.h"
@@ -355,9 +356,9 @@ void OpenGLGraphicsManager::copyRectToScreen(const byte *buf, int pitch, int x,
// Copy buffer data to game screen internal buffer
const byte *src = buf;
- byte *dst = (byte *)_screenData.pixels + y * _screenData.pitch + x * _screenData.bytesPerPixel;
+ byte *dst = (byte *)_screenData.pixels + y * _screenData.pitch + x * _screenData.format.bytesPerPixel;
for (int i = 0; i < h; i++) {
- memcpy(dst, src, w * _screenData.bytesPerPixel);
+ memcpy(dst, src, w * _screenData.format.bytesPerPixel);
src += pitch;
dst += _screenData.pitch;
}
@@ -466,7 +467,7 @@ void OpenGLGraphicsManager::clearOverlay() {
}
void OpenGLGraphicsManager::grabOverlay(OverlayColor *buf, int pitch) {
- assert(_overlayData.bytesPerPixel == sizeof(buf[0]));
+ assert(_overlayData.format.bytesPerPixel == sizeof(buf[0]));
const byte *src = (byte *)_overlayData.pixels;
for (int i = 0; i < _overlayData.h; i++) {
// Copy overlay data to buffer
@@ -519,7 +520,7 @@ void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch
const byte *src = (const byte *)buf;
byte *dst = (byte *)_overlayData.pixels + y * _overlayData.pitch;
for (int i = 0; i < h; i++) {
- memcpy(dst + x * _overlayData.bytesPerPixel, src, w * _overlayData.bytesPerPixel);
+ memcpy(dst + x * _overlayData.format.bytesPerPixel, src, w * _overlayData.format.bytesPerPixel);
src += pitch * sizeof(buf[0]);
dst += _overlayData.pitch;
}
@@ -616,8 +617,8 @@ void OpenGLGraphicsManager::setMouseCursor(const byte *buf, uint w, uint h, int
// Allocate space for cursor data
if (_cursorData.w != w || _cursorData.h != h ||
- _cursorData.bytesPerPixel != _cursorFormat.bytesPerPixel)
- _cursorData.create(w, h, _cursorFormat.bytesPerPixel);
+ _cursorData.format.bytesPerPixel != _cursorFormat.bytesPerPixel)
+ _cursorData.create(w, h, _cursorFormat);
// Save cursor data
memcpy(_cursorData.pixels, buf, h * _cursorData.pitch);
@@ -699,13 +700,13 @@ void OpenGLGraphicsManager::refreshGameScreen() {
int w = _screenDirtyRect.width();
int h = _screenDirtyRect.height();
- if (_screenData.bytesPerPixel == 1) {
+ if (_screenData.format.bytesPerPixel == 1) {
// Create a temporary RGB888 surface
byte *surface = new byte[w * h * 3];
// Convert the paletted buffer to RGB888
const byte *src = (byte *)_screenData.pixels + y * _screenData.pitch;
- src += x * _screenData.bytesPerPixel;
+ src += x * _screenData.format.bytesPerPixel;
byte *dst = surface;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
@@ -725,7 +726,7 @@ void OpenGLGraphicsManager::refreshGameScreen() {
} else {
// Update the texture
_gameTexture->updateBuffer((byte *)_screenData.pixels + y * _screenData.pitch +
- x * _screenData.bytesPerPixel, _screenData.pitch, x, y, w, h);
+ x * _screenData.format.bytesPerPixel, _screenData.pitch, x, y, w, h);
}
_screenNeedsRedraw = false;
@@ -741,13 +742,13 @@ void OpenGLGraphicsManager::refreshOverlay() {
int w = _overlayDirtyRect.width();
int h = _overlayDirtyRect.height();
- if (_overlayData.bytesPerPixel == 1) {
+ if (_overlayData.format.bytesPerPixel == 1) {
// Create a temporary RGB888 surface
byte *surface = new byte[w * h * 3];
// Convert the paletted buffer to RGB888
const byte *src = (byte *)_overlayData.pixels + y * _overlayData.pitch;
- src += x * _overlayData.bytesPerPixel;
+ src += x * _overlayData.format.bytesPerPixel;
byte *dst = surface;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
@@ -767,7 +768,7 @@ void OpenGLGraphicsManager::refreshOverlay() {
} else {
// Update the texture
_overlayTexture->updateBuffer((byte *)_overlayData.pixels + y * _overlayData.pitch +
- x * _overlayData.bytesPerPixel, _overlayData.pitch, x, y, w, h);
+ x * _overlayData.format.bytesPerPixel, _overlayData.pitch, x, y, w, h);
}
_overlayNeedsRedraw = false;
@@ -1175,9 +1176,9 @@ void OpenGLGraphicsManager::loadTextures() {
_oldVideoMode.screenHeight != _videoMode.screenHeight)
_screenData.create(_videoMode.screenWidth, _videoMode.screenHeight,
#ifdef USE_RGB_COLOR
- _screenFormat.bytesPerPixel
+ _screenFormat
#else
- 1
+ Graphics::PixelFormat::createFormatCLUT8()
#endif
);
@@ -1185,7 +1186,7 @@ void OpenGLGraphicsManager::loadTextures() {
if (_oldVideoMode.overlayWidth != _videoMode.overlayWidth ||
_oldVideoMode.overlayHeight != _videoMode.overlayHeight)
_overlayData.create(_videoMode.overlayWidth, _videoMode.overlayHeight,
- _overlayFormat.bytesPerPixel);
+ _overlayFormat);
_screenNeedsRedraw = true;
_overlayNeedsRedraw = true;
@@ -1387,7 +1388,7 @@ void OpenGLGraphicsManager::updateOSD() {
const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kOSDFont);
if (_osdSurface.w != _osdTexture->getWidth() || _osdSurface.h != _osdTexture->getHeight())
- _osdSurface.create(_osdTexture->getWidth(), _osdTexture->getHeight(), 2);
+ _osdSurface.create(_osdTexture->getWidth(), _osdTexture->getHeight(), _overlayFormat);
else
// Clear everything
memset(_osdSurface.pixels, 0, _osdSurface.h * _osdSurface.pitch);
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 374f1c196e..1725817730 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -28,7 +28,9 @@
#include "backends/graphics/opengl/gltexture.h"
#include "backends/graphics/graphics.h"
+#include "common/array.h"
#include "common/events.h"
+#include "graphics/pixelformat.h"
// Uncomment this to enable the 'on screen display' code.
#define USE_OSD 1
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index b9022af120..fe86dd2098 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -30,6 +30,7 @@
#include "backends/graphics/openglsdl/openglsdl-graphics.h"
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager()
:
@@ -487,9 +488,9 @@ bool OpenGLSdlGraphicsManager::notifyEvent(const Common::Event &event) {
SDL_RWclose(file);
}
if (saveScreenshot(filename))
- printf("Saved '%s'\n", filename);
+ debug("Saved screenshot '%s'", filename);
else
- printf("Could not save screenshot!\n");
+ warning("Could not save screenshot");
return true;
}
}
diff --git a/backends/graphics/openpandora/op-graphics.cpp b/backends/graphics/openpandora/op-graphics.cpp
index ab6974ba5f..20ee5dfc36 100644
--- a/backends/graphics/openpandora/op-graphics.cpp
+++ b/backends/graphics/openpandora/op-graphics.cpp
@@ -28,7 +28,6 @@
#include "backends/events/openpandora/op-events.h"
#include "backends/platform/openpandora/op-sdl.h"
#include "common/mutex.h"
-#include "common/translation.h"
#include "common/util.h"
#include "graphics/scaler/aspect.h"
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 67b979a830..3ae9597f1c 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -32,6 +32,7 @@
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#include "common/util.h"
#ifdef USE_RGB_COLOR
@@ -1287,9 +1288,9 @@ Graphics::Surface *SdlGraphicsManager::lockScreen() {
_framebuffer.h = _screen->h;
_framebuffer.pitch = _screen->pitch;
#ifdef USE_RGB_COLOR
- _framebuffer.bytesPerPixel = _screenFormat.bytesPerPixel;
+ _framebuffer.format = _screenFormat;
#else
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
#endif
return &_framebuffer;
@@ -2054,7 +2055,11 @@ void SdlGraphicsManager::displayMessageOnOSD(const char *msg) {
dst.w = _osdSurface->w;
dst.h = _osdSurface->h;
dst.pitch = _osdSurface->pitch;
- dst.bytesPerPixel = _osdSurface->format->BytesPerPixel;
+ dst.format = Graphics::PixelFormat(_osdSurface->format->BytesPerPixel,
+ 8 - _osdSurface->format->Rloss, 8 - _osdSurface->format->Gloss,
+ 8 - _osdSurface->format->Bloss, 8 - _osdSurface->format->Aloss,
+ _osdSurface->format->Rshift, _osdSurface->format->Gshift,
+ _osdSurface->format->Bshift, _osdSurface->format->Ashift);
// The font we are going to use:
const Graphics::Font *font = FontMan.getFontByUsage(Graphics::FontManager::kOSDFont);
@@ -2274,9 +2279,9 @@ bool SdlGraphicsManager::notifyEvent(const Common::Event &event) {
SDL_RWclose(file);
}
if (saveScreenshot(filename))
- printf("Saved '%s'\n", filename);
+ debug("Saved screenshot '%s'", filename);
else
- printf("Could not save screenshot!\n");
+ warning("Could not save screenshot");
return true;
}
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index f467c38d5f..4895b240b0 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -27,6 +27,7 @@
#define BACKENDS_GRAPHICS_SDL_H
#include "backends/graphics/graphics.h"
+#include "graphics/pixelformat.h"
#include "graphics/scaler.h"
#include "common/events.h"
#include "common/system.h"
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp
index 37c6624560..b15f86e8fe 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.cpp
+++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp
@@ -28,6 +28,7 @@
#ifdef _WIN32_WCE
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#include "common/mutex.h"
diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h
index 7c608a53fc..b6d9dbf042 100644
--- a/backends/keymapper/hardware-key.h
+++ b/backends/keymapper/hardware-key.h
@@ -31,6 +31,7 @@
#ifdef ENABLE_KEYMAPPER
#include "backends/keymapper/types.h"
+#include "common/textconsole.h"
namespace Common {
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp
index 2f913055fc..8edc26a526 100644
--- a/backends/keymapper/remap-dialog.cpp
+++ b/backends/keymapper/remap-dialog.cpp
@@ -26,6 +26,7 @@
#ifdef ENABLE_KEYMAPPER
+#include "common/system.h"
#include "gui/gui-manager.h"
#include "gui/widgets/popup.h"
#include "gui/widgets/scrollbar.h"
diff --git a/backends/keymapper/remap-dialog.h b/backends/keymapper/remap-dialog.h
index 2c0e79a79d..5721d368a4 100644
--- a/backends/keymapper/remap-dialog.h
+++ b/backends/keymapper/remap-dialog.h
@@ -33,8 +33,10 @@
#include "gui/dialog.h"
namespace GUI {
- class PopupWidget;
- class ScrollBarWidget;
+class ButtonWidget;
+class PopUpWidget;
+class ScrollBarWidget;
+class StaticTextWidget;
}
namespace Common {
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp
index 2257f60e27..bc8fab6a56 100644
--- a/backends/midi/alsa.cpp
+++ b/backends/midi/alsa.cpp
@@ -30,6 +30,8 @@
#if defined(USE_ALSA)
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
@@ -181,6 +183,11 @@ void MidiDriver_ALSA::close() {
}
void MidiDriver_ALSA::send(uint32 b) {
+ if (!_isOpen) {
+ warning("MidiDriver_ALSA: Got event while not open");
+ return;
+ }
+
unsigned int midiCmd[4];
ev.type = SND_SEQ_EVENT_OSS;
@@ -254,6 +261,11 @@ void MidiDriver_ALSA::send(uint32 b) {
}
void MidiDriver_ALSA::sysEx(const byte *msg, uint16 length) {
+ if (!_isOpen) {
+ warning("MidiDriver_ALSA: Got SysEx while not open");
+ return;
+ }
+
unsigned char buf[266];
assert(length + 2 <= ARRAYSIZE(buf));
diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp
index ee3baaadd2..aafc7347f0 100644
--- a/backends/midi/camd.cpp
+++ b/backends/midi/camd.cpp
@@ -29,6 +29,8 @@
#if defined(__amigaos4__)
+#include "common/textconsole.h"
+#include "common/error.h"
#include "common/endian.h"
#include "common/util.h"
#include "audio/musicplugin.h"
@@ -114,11 +116,21 @@ void MidiDriver_CAMD::close() {
}
void MidiDriver_CAMD::send(uint32 b) {
+ if (!_isOpen) {
+ warning("MidiDriver_CAMD: Got event while not open");
+ return;
+ }
+
ULONG data = READ_LE_UINT32(&b);
_ICamd->PutMidi(_midi_link, data);
}
void MidiDriver_CAMD::sysEx(const byte *msg, uint16 length) {
+ if (!_isOpen) {
+ warning("MidiDriver_CAMD: Got SysEx while not open");
+ return;
+ }
+
unsigned char buf[266];
assert(length + 2 <= ARRAYSIZE(buf));
@@ -135,8 +147,8 @@ void MidiDriver_CAMD::sysEx(const byte *msg, uint16 length) {
char *MidiDriver_CAMD::getDevice() {
char *retname = NULL;
- APTR key;
- if (key = _ICamd->LockCAMD(CD_Linkages)) {
+ APTR key = _ICamd->LockCAMD(CD_Linkages);
+ if (key != NULL) {
struct MidiCluster *cluster = _ICamd->NextCluster(NULL);
while (cluster && !retname) {
diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp
index 0158cc4a1d..52d32cb5e3 100644
--- a/backends/midi/coreaudio.cpp
+++ b/backends/midi/coreaudio.cpp
@@ -41,6 +41,8 @@
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp
index 9123c9bc8c..87cd6307ba 100644
--- a/backends/midi/coremidi.cpp
+++ b/backends/midi/coremidi.cpp
@@ -30,6 +30,8 @@
#ifdef MACOSX
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp
index c4c1968354..ba6d58d52d 100644
--- a/backends/midi/dmedia.cpp
+++ b/backends/midi/dmedia.cpp
@@ -34,9 +34,10 @@
#if defined(IRIX)
-#include "common/scummsys.h"
-#include "common/util.h"
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
+#include "common/util.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp
index 7cd7f0a38e..b90a9b19e0 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -35,6 +35,8 @@
#if defined(USE_SEQ_MIDI)
+#include "common/error.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp
index c01b9bbef7..84d2846eda 100644
--- a/backends/midi/timidity.cpp
+++ b/backends/midi/timidity.cpp
@@ -41,13 +41,13 @@
#if defined(USE_TIMIDITY)
-#include "common/util.h"
#include "common/endian.h"
+#include "common/error.h"
#include "common/str.h"
+#include "common/textconsole.h"
#include "audio/musicplugin.h"
#include "audio/mpu401.h"
-#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
@@ -560,4 +560,4 @@ Common::Error TimidityMusicPlugin::createInstance(MidiDriver **mididriver, MidiD
REGISTER_PLUGIN_STATIC(TIMIDITY, PLUGIN_TYPE_MUSIC, TimidityMusicPlugin);
//#endif
-#endif // defined (UNIX)
+#endif // defined (USE_TIMIDITY)
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp
index aad7f48d94..292bbea79e 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -38,6 +38,8 @@
#include "audio/mpu401.h"
#include "common/config-manager.h"
#include "common/translation.h"
+#include "common/textconsole.h"
+#include "common/error.h"
#include <mmsystem.h>
diff --git a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
index 6b0074862e..93c779ea5f 100644
--- a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
+++ b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
@@ -23,7 +23,7 @@
*
*/
-#if defined(MACOSX) || defined(GP2X)
+#if defined(MACOSX) || defined(GP2X) || defined(CAANOO) || defined(GP2XWIZ)
#include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h"
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index fa2bf3e232..90629954c5 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -26,8 +26,10 @@
#if defined(SDL_BACKEND)
#include "backends/mixer/sdl/sdl-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
diff --git a/backends/mixer/wincesdl/wincesdl-mixer.cpp b/backends/mixer/wincesdl/wincesdl-mixer.cpp
index fb8a7d10c7..17cf0ced49 100644
--- a/backends/mixer/wincesdl/wincesdl-mixer.cpp
+++ b/backends/mixer/wincesdl/wincesdl-mixer.cpp
@@ -32,14 +32,19 @@
#include "backends/platform/wince/wince-sdl.h"
#include "backends/mixer/wincesdl/wincesdl-mixer.h"
#include "common/system.h"
+#include "common/textconsole.h"
#ifdef USE_VORBIS
#ifndef USE_TREMOR
#include <vorbis/vorbisfile.h>
#else
+#ifdef USE_TREMOLO
+#include <tremolo/ivorbisfile.h>
+#else
#include <tremor/ivorbisfile.h>
#endif
#endif
+#endif
#define SAMPLES_PER_SEC_OLD 11025
#define SAMPLES_PER_SEC_NEW 22050
diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index 19cba89af3..b691250289 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -26,12 +26,14 @@
#include "backends/modular-backend.h"
#include "backends/fs/fs-factory.h"
-#include "backends/events/default/default-events.h"
-#include "backends/audiocd/default/default-audiocd.h"
-#include "backends/mutex/null/null-mutex.h"
-#include "backends/graphics/null/null-graphics.h"
+#include "backends/audiocd/audiocd.h"
+#include "backends/graphics/graphics.h"
+#include "backends/mutex/mutex.h"
+#include "audio/mixer.h"
+#include "common/events.h"
#include "gui/message.h"
+#include "graphics/pixelformat.h"
ModularBackend::ModularBackend()
:
diff --git a/backends/module.mk b/backends/module.mk
index 426409ab73..c665b66e39 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -4,103 +4,142 @@ MODULE_OBJS := \
base-backend.o \
modular-backend.o \
audiocd/default/default-audiocd.o \
- audiocd/sdl/sdl-audiocd.o \
events/default/default-events.o \
- events/dinguxsdl/dinguxsdl-events.o \
- events/gp2xsdl/gp2xsdl-events.o \
- events/gph/gph-events.o \
- events/linuxmotosdl/linuxmotosdl-events.o \
- events/openpandora/op-events.o \
- events/samsungtvsdl/samsungtvsdl-events.o \
- events/sdl/sdl-events.o \
- events/symbiansdl/symbiansdl-events.o \
- events/webossdl/webossdl-events.o \
- events/wincesdl/wincesdl-events.o \
fs/abstract-fs.o \
fs/stdiostream.o \
- fs/amigaos4/amigaos4-fs-factory.o \
- fs/posix/posix-fs-factory.o \
- fs/symbian/symbian-fs-factory.o \
- fs/windows/windows-fs-factory.o \
- graphics/dinguxsdl/dinguxsdl-graphics.o \
- graphics/gp2xsdl/gp2xsdl-graphics.o \
- graphics/gph/gph-graphics.o \
- graphics/linuxmotosdl/linuxmotosdl-graphics.o \
graphics/opengl/glerrorcheck.o \
graphics/opengl/gltexture.o \
graphics/opengl/opengl-graphics.o \
graphics/openglsdl/openglsdl-graphics.o \
- graphics/openpandora/op-graphics.o \
- graphics/sdl/sdl-graphics.o \
- graphics/symbiansdl/symbiansdl-graphics.o \
- graphics/wincesdl/wincesdl-graphics.o \
keymapper/action.o \
keymapper/keymap.o \
keymapper/keymapper.o \
keymapper/remap-dialog.o \
log/log.o \
midi/alsa.o \
- midi/camd.o \
- midi/coreaudio.o \
- midi/coremidi.o \
+ midi/dmedia.o \
midi/seq.o \
midi/stmidi.o \
midi/timidity.o \
- midi/dmedia.o \
- midi/windows.o \
- mixer/doublebuffersdl/doublebuffersdl-mixer.o \
- mixer/sdl/sdl-mixer.o \
- mixer/symbiansdl/symbiansdl-mixer.o \
- mixer/wincesdl/wincesdl-mixer.o \
- mutex/sdl/sdl-mutex.o \
- plugins/elf/elf-loader.o \
- plugins/elf/mips-loader.o \
- plugins/elf/shorts-segment-manager.o \
- plugins/elf/ppc-loader.o \
plugins/elf/arm-loader.o \
+ plugins/elf/elf-loader.o \
plugins/elf/elf-provider.o \
plugins/elf/memory-manager.o \
+ plugins/elf/mips-loader.o \
+ plugins/elf/ppc-loader.o \
+ plugins/elf/shorts-segment-manager.o \
plugins/elf/version.o \
- plugins/posix/posix-provider.o \
- plugins/sdl/sdl-provider.o \
- plugins/win32/win32-provider.o \
saves/savefile.o \
saves/default/default-saves.o \
- saves/posix/posix-saves.o \
timer/default/default-timer.o \
- timer/sdl/sdl-timer.o \
vkeybd/image-map.o \
vkeybd/polygon.o \
vkeybd/virtual-keyboard.o \
vkeybd/virtual-keyboard-gui.o \
vkeybd/virtual-keyboard-parser.o
-ifeq ($(BACKEND),dc)
+# SDL specific source files.
+# We cannot just check $BACKEND = sdl, as various other backends
+# derive from the SDL backend, and they all need the following files.
+# TODO: Add SDL_BACKEND to config.mk; this would match the fact that
+# we also add -DSDL_BACKEND to the DEFINES.
+# However, the latter is only done for *most* SDL based stuff, not always
+# so we really should unify the relevant code in configure.
+MODULE_OBJS += \
+ audiocd/sdl/sdl-audiocd.o \
+ events/sdl/sdl-events.o \
+ graphics/sdl/sdl-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
+
+ifdef UNIX
+MODULE_OBJS += \
+ fs/posix/posix-fs.o \
+ fs/posix/posix-fs-factory.o \
+ plugins/posix/posix-provider.o \
+ saves/posix/posix-saves.o
+endif
+
+ifdef MACOSX
+MODULE_OBJS += \
+ midi/coreaudio.o \
+ midi/coremidi.o
+endif
+
+ifdef WIN32
MODULE_OBJS += \
- plugins/dc/dc-provider.o
+ fs/windows/windows-fs.o \
+ fs/windows/windows-fs-factory.o \
+ midi/windows.o \
+ plugins/win32/win32-provider.o
+endif
+
+ifdef AMIGAOS
+MODULE_OBJS += \
+ fs/amigaos4/amigaos4-fs.o \
+ fs/amigaos4/amigaos4-fs-factory.o \
+ midi/camd.o
endif
ifeq ($(BACKEND),ds)
MODULE_OBJS += \
- fs/ds/ds-fs-factory.o \
fs/ds/ds-fs.o \
+ fs/ds/ds-fs-factory.o \
plugins/ds/ds-provider.o
endif
+ifeq ($(BACKEND),dingux)
+MODULE_OBJS += \
+ events/dinguxsdl/dinguxsdl-events.o \
+ graphics/dinguxsdl/dinguxsdl-graphics.o
+endif
+
+ifeq ($(BACKEND),gph)
+MODULE_OBJS += \
+ events/gph/gph-events.o \
+ graphics/gph/gph-graphics.o
+endif
+
+# TODO/FIXME: The gp2xsdl files are only compiled if GP2X_OLD is defined,
+# which currently is never the case (unless the user manually requests it).
+# ifeq ($(BACKEND),gp2x)
+# MODULE_OBJS += \
+# events/gp2xsdl/gp2xsdl-events.o \
+# graphics/gp2xsdl/gp2xsdl-graphics.o
+# endif
+
+ifeq ($(BACKEND),linuxmoto)
+MODULE_OBJS += \
+ events/linuxmotosdl/linuxmotosdl-events.o \
+ graphics/linuxmotosdl/linuxmotosdl-graphics.o
+endif
+
ifeq ($(BACKEND),n64)
MODULE_OBJS += \
+ fs/n64/n64-fs.o \
fs/n64/n64-fs-factory.o \
fs/n64/romfsstream.o
endif
+ifeq ($(BACKEND),openpandora)
+MODULE_OBJS += \
+ events/openpandora/op-events.o \
+ graphics/openpandora/op-graphics.o
+endif
+
ifeq ($(BACKEND),ps2)
MODULE_OBJS += \
+ fs/ps2/ps2-fs.o \
fs/ps2/ps2-fs-factory.o \
plugins/ps2/ps2-provider.o
endif
ifeq ($(BACKEND),psp)
MODULE_OBJS += \
+ fs/psp/psp-fs.o \
fs/psp/psp-fs-factory.o \
fs/psp/psp-stream.o \
plugins/psp/psp-provider.o \
@@ -108,8 +147,28 @@ MODULE_OBJS += \
timer/psp/timer.o
endif
+ifeq ($(BACKEND),samsungstv)
+MODULE_OBJS += \
+ events/samsungtvsdl/samsungtvsdl-events.o
+endif
+
+ifeq ($(BACKEND),webos)
+MODULE_OBJS += \
+ events/webossdl/webossdl-events.o
+endif
+
+ifeq ($(BACKEND),wince)
+MODULE_OBJS += \
+ events/wincesdl/wincesdl-events.o \
+ fs/windows/windows-fs.o \
+ fs/windows/windows-fs-factory.o \
+ graphics/wincesdl/wincesdl-graphics.o \
+ mixer/wincesdl/wincesdl-mixer.o
+endif
+
ifeq ($(BACKEND),wii)
MODULE_OBJS += \
+ fs/wii/wii-fs.o \
fs/wii/wii-fs-factory.o \
plugins/wii/wii-provider.o
endif
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index bbfdb06b8d..b1d0727d1f 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -25,6 +25,23 @@
#if defined(__ANDROID__)
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+// __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+// __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/system_properties.h>
@@ -32,6 +49,7 @@
#include <unistd.h>
#include "common/util.h"
+#include "common/textconsole.h"
#include "common/rect.h"
#include "common/queue.h"
#include "common/mutex.h"
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 6eebdb97d9..109d252a99 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -31,6 +31,7 @@
#include "common/fs.h"
#include "common/archive.h"
#include "audio/mixer_intern.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "backends/base-backend.h"
#include "backends/plugins/posix/posix-provider.h"
diff --git a/backends/platform/android/asset-archive.cpp b/backends/platform/android/asset-archive.cpp
index 8e95029894..7c21b35281 100644
--- a/backends/platform/android/asset-archive.cpp
+++ b/backends/platform/android/asset-archive.cpp
@@ -35,6 +35,7 @@
#include "common/util.h"
#include "common/archive.h"
#include "common/debug.h"
+#include "common/textconsole.h"
#include "backends/platform/android/jni.h"
#include "backends/platform/android/asset-archive.h"
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 09466b4d2f..0d74e1c524 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -25,6 +25,23 @@
#if defined(__ANDROID__)
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+// __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+// __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "common/events.h"
#include "backends/platform/android/android.h"
@@ -444,8 +461,12 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
if (arg4 & JMETA_SHIFT)
e.kbd.flags |= Common::KBD_SHIFT;
- if (arg4 & JMETA_ALT)
- e.kbd.flags |= Common::KBD_ALT;
+ // JMETA_ALT is Fn on physical keyboards!
+ // when mapping this to ALT - as we know it from PC keyboards - all
+ // Fn combos will be broken (like Fn+q, which needs to end as 1 and
+ // not ALT+1). Do not want.
+ //if (arg4 & JMETA_ALT)
+ // e.kbd.flags |= Common::KBD_ALT;
if (arg4 & (JMETA_SYM | JMETA_CTRL))
e.kbd.flags |= Common::KBD_CTRL;
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index 86232030ff..ebce58e291 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -25,6 +25,23 @@
#if defined(__ANDROID__)
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+// __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+// __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "common/endian.h"
#include "graphics/conversion.h"
@@ -628,13 +645,13 @@ void OSystem_Android::grabOverlay(OverlayColor *buf, int pitch) {
GLTHREADCHECK;
const Graphics::Surface *surface = _overlay_texture->surface_const();
- assert(surface->bytesPerPixel == sizeof(buf[0]));
+ assert(surface->format.bytesPerPixel == sizeof(buf[0]));
const byte *src = (const byte *)surface->pixels;
uint h = surface->h;
do {
- memcpy(buf, src, surface->w * surface->bytesPerPixel);
+ memcpy(buf, src, surface->w * surface->format.bytesPerPixel);
src += surface->pitch;
// This 'pitch' is pixels not bytes
buf += pitch;
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index 08a1491998..13aef11fa2 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -25,9 +25,28 @@
#if defined(__ANDROID__)
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+// __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+// __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "base/main.h"
#include "base/version.h"
#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#include "engines/engine.h"
#include "backends/platform/android/android.h"
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
index 8bf40ac553..c4de6d62f8 100644
--- a/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
+++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVM.java
@@ -35,7 +35,7 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
private String[] _args;
- final private native void create(AssetManager _asset_manager,
+ final private native void create(AssetManager asset_manager,
EGL10 egl, EGLDisplay egl_display,
AudioTrack audio_track,
int sample_rate, int buffer_size);
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index a6b28ca485..c830676c07 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -25,6 +25,23 @@
#if defined(__ANDROID__)
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+// __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+// __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "base/main.h"
#include "graphics/surface.h"
@@ -147,7 +164,7 @@ void GLESBaseTexture::setLinearFilter(bool value) {
void GLESBaseTexture::allocBuffer(GLuint w, GLuint h) {
_surface.w = w;
_surface.h = h;
- _surface.bytesPerPixel = _pixelFormat.bytesPerPixel;
+ _surface.format = _pixelFormat;
if (w == _texture_width && h == _texture_height)
return;
@@ -241,14 +258,14 @@ void GLESTexture::allocBuffer(GLuint w, GLuint h) {
delete[] _buf;
delete[] _pixels;
- _pixels = new byte[w * h * _surface.bytesPerPixel];
+ _pixels = new byte[w * h * _surface.format.bytesPerPixel];
assert(_pixels);
_surface.pixels = _pixels;
fillBuffer(0);
- _buf = new byte[w * h * _surface.bytesPerPixel];
+ _buf = new byte[w * h * _surface.format.bytesPerPixel];
assert(_buf);
}
@@ -257,10 +274,10 @@ void GLESTexture::updateBuffer(GLuint x, GLuint y, GLuint w, GLuint h,
setDirtyRect(Common::Rect(x, y, x + w, y + h));
const byte *src = (const byte *)buf;
- byte *dst = _pixels + y * _surface.pitch + x * _surface.bytesPerPixel;
+ byte *dst = _pixels + y * _surface.pitch + x * _surface.format.bytesPerPixel;
do {
- memcpy(dst, src, w * _surface.bytesPerPixel);
+ memcpy(dst, src, w * _surface.format.bytesPerPixel);
dst += _surface.pitch;
src += pitch_buf;
} while (--h);
@@ -301,10 +318,10 @@ void GLESTexture::drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
_tex = _buf;
byte *src = _pixels + _dirty_rect.top * _surface.pitch +
- _dirty_rect.left * _surface.bytesPerPixel;
+ _dirty_rect.left * _surface.format.bytesPerPixel;
byte *dst = _buf;
- uint16 l = dwidth * _surface.bytesPerPixel;
+ uint16 l = dwidth * _surface.format.bytesPerPixel;
for (uint16 i = 0; i < dheight; ++i) {
memcpy(dst, src, l);
@@ -373,7 +390,7 @@ void GLESFakePaletteTexture::allocBuffer(GLuint w, GLuint h) {
GLESBaseTexture::allocBuffer(w, h);
- _surface.bytesPerPixel = 1;
+ _surface.format = Graphics::PixelFormat::createFormatCLUT8();
_surface.pitch = w;
if (_surface.w == oldw && _surface.h == oldh) {
diff --git a/backends/platform/dc/Makefile b/backends/platform/dc/Makefile
index 637f474b4b..11d9421a0a 100644
--- a/backends/platform/dc/Makefile
+++ b/backends/platform/dc/Makefile
@@ -65,7 +65,7 @@ ENABLE_TOUCHE = $(ENABLED)
ENABLE_TUCKER = $(ENABLED)
OBJS := dcmain.o time.o display.o audio.o input.o selector.o icon.o \
- label.o vmsave.o softkbd.o dcloader.o cache.o dc-fs.o
+ label.o vmsave.o softkbd.o dcloader.o cache.o dc-fs.o plugins.o
MODULE_DIRS += ./
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index e21a12fa33..a024b5d70d 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -22,6 +22,8 @@
* $Id$
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
#include "dc.h"
#include "backends/fs/abstract-fs.h"
#include "backends/fs/stdiostream.h"
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index 76c4b8cfd2..060eff2b48 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -26,11 +26,15 @@
#include "backends/base-backend.h"
#include <graphics/surface.h>
#include <graphics/colormasks.h>
+#include <graphics/palette.h>
#include <ronin/soundcommon.h>
#include "backends/timer/default/default-timer.h"
#include "backends/audiocd/default/default-audiocd.h"
#include "backends/fs/fs-factory.h"
#include "audio/mixer_intern.h"
+#ifdef DYNAMIC_MODULES
+#include "backends/plugins/dynamic-plugin.h"
+#endif
#define NUM_BUFFERS 4
#define SOUND_BUFFER_SHIFT 3
@@ -69,7 +73,11 @@ class DCCDManager : public DefaultAudioCDManager {
void updateCD();
};
-class OSystem_Dreamcast : private DCHardware, public BaseBackend, public PaletteManager, public FilesystemFactory {
+class OSystem_Dreamcast : private DCHardware, public BaseBackend, public PaletteManager, public FilesystemFactory
+#ifdef DYNAMIC_MODULES
+ , public FilePluginProvider
+#endif
+ {
public:
OSystem_Dreamcast();
@@ -250,6 +258,14 @@ public:
void logMessage(LogMessageType::Type type, const char *message);
Common::String getSystemLanguage() const;
+
+#ifdef DYNAMIC_MODULES
+ class DCPlugin;
+
+ protected:
+ Plugin* createPlugin(const Common::FSNode &node) const;
+ bool isPluginFilename(const Common::FSNode &node) const;
+#endif
};
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index bbd4f994f7..a3a1200178 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -23,6 +23,11 @@
*
*/
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <common/scummsys.h>
#include <engines/engine.h>
#include <base/main.h>
@@ -33,7 +38,6 @@
#include <common/config-manager.h>
#include <common/memstream.h>
-#include "backends/plugins/dc/dc-provider.h"
#include "audio/mixer_intern.h"
@@ -336,7 +340,7 @@ int main()
g_system = &osys_dc;
#ifdef DYNAMIC_MODULES
- PluginManager::instance().addPluginProvider(new DCPluginProvider());
+ PluginManager::instance().addPluginProvider(&osys_dc);
#endif
scummvm_main(argc, argv);
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index b297022775..78fa2182dc 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -720,7 +720,7 @@ Graphics::Surface *OSystem_Dreamcast::lockScreen()
_framebuffer.w = _screen_w;
_framebuffer.h = _screen_h;
_framebuffer.pitch = SCREEN_W*2;
- _framebuffer.bytesPerPixel = (_screenFormat == 0? 1 : 2);
+ _framebuffer.format = screenFormats[_screenFormat];
return &_framebuffer;
}
diff --git a/backends/platform/dc/dreamcast.mk b/backends/platform/dc/dreamcast.mk
index 8651a2936c..666e03eece 100644
--- a/backends/platform/dc/dreamcast.mk
+++ b/backends/platform/dc/dreamcast.mk
@@ -35,3 +35,7 @@ ip.txt : $(srcdir)/backends/platform/dc/ip.txt.in
ver="V$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)"; fi; \
sed -e 's/[@]VERSION[@]/'"$$ver"/ -e 's/[@]DATE[@]/$(shell date '+%Y%m%d')/' < $< > $@
+
+dcdist : dist
+ mkdir -p dcdist/scummvm
+ cp scummvm.elf SCUMMVM.BIN IP.BIN *.PLG dcdist/scummvm/
diff --git a/backends/platform/dc/module.mk b/backends/platform/dc/module.mk
index c52ca1a474..9ab287c080 100644
--- a/backends/platform/dc/module.mk
+++ b/backends/platform/dc/module.mk
@@ -1,7 +1,7 @@
MODULE := backends/platform/dc
MODULE_OBJS := dcmain.o time.o display.o audio.o input.o selector.o icon.o \
- label.o vmsave.o softkbd.o dcloader.o cache.o dc-fs.o
+ label.o vmsave.o softkbd.o dcloader.o cache.o dc-fs.o plugins.o
# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
diff --git a/backends/plugins/dc/dc-provider.cpp b/backends/platform/dc/plugins.cpp
index 86ef68828c..44b8960513 100644
--- a/backends/plugins/dc/dc-provider.cpp
+++ b/backends/platform/dc/plugins.cpp
@@ -25,16 +25,50 @@
#include "common/scummsys.h"
-#if defined(DYNAMIC_MODULES) && defined(__DC__)
+#if defined(DYNAMIC_MODULES)
-#include "backends/plugins/dc/dc-provider.h"
#include "backends/plugins/dynamic-plugin.h"
#include "common/fs.h"
#include "dcloader.h"
+extern void draw_solid_quad(float x1, float y1, float x2, float y2,
+ int c0, int c1, int c2, int c3);
+
+static void drawPluginProgress(const Common::String &filename)
+{
+ ta_sync();
+ void *mark = ta_txmark();
+ const char *fn = filename.c_str();
+ Label lab1, lab2, lab3;
+ char buf[32];
+ unsigned memleft = 0x8cf00000-((unsigned)sbrk(0));
+ float ffree = memleft*(1.0/(16<<20));
+ int fcol = (memleft < (1<<20)? 0xffff0000:
+ (memleft < (4<<20)? 0xffffff00: 0xff00ff00));
+ snprintf(buf, sizeof(buf), "%dK free memory", memleft>>10);
+ if (fn[0] == '/') fn++;
+ lab1.create_texture("Loading plugins, please wait...");
+ lab2.create_texture(fn);
+ lab3.create_texture(buf);
+ 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,
+ 0xff202020, 0xff202020, 0xff202020, 0xff202020);
+ draw_solid_quad(85.0, 275.0, 85.0+470.0*ffree, 295.0,
+ fcol, fcol, fcol, fcol);
+ ta_commit_end();
+ lab1.draw(100.0, 150.0, 0xffffffff);
+ lab2.draw(100.0, 190.0, 0xffaaffaa);
+ lab3.draw(100.0, 230.0, 0xffffffff);
+ ta_commit_frame();
+ ta_sync();
+ ta_txrelease(mark);
+}
+
-class DCPlugin : public DynamicPlugin {
+class OSystem_Dreamcast::DCPlugin : public DynamicPlugin {
protected:
void *_dlHandle;
@@ -59,6 +93,7 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
+ drawPluginProgress(_filename);
_dlHandle = dlopen(_filename.c_str(), RTLD_LAZY);
if (!_dlHandle) {
@@ -85,11 +120,11 @@ public:
};
-Plugin* DCPluginProvider::createPlugin(const Common::FSNode &node) const {
+Plugin* OSystem_Dreamcast::createPlugin(const Common::FSNode &node) const {
return new DCPlugin(node.getPath());
}
-bool DCPluginProvider::isPluginFilename(const Common::FSNode &node) const {
+bool OSystem_Dreamcast::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
Common::String filename = node.getName();
if (!filename.hasSuffix(".PLG"))
@@ -98,4 +133,4 @@ bool DCPluginProvider::isPluginFilename(const Common::FSNode &node) const {
return true;
}
-#endif // defined(DYNAMIC_MODULES) && defined(__DC__)
+#endif // defined(DYNAMIC_MODULES)
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 8fd12d66bf..77f34394a1 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+
#include <common/scummsys.h>
#include <engines/engine.h>
#include <engines/metaengine.h>
diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp
index 6c8289684f..63e345efbe 100644
--- a/backends/platform/dc/vmsave.cpp
+++ b/backends/platform/dc/vmsave.cpp
@@ -23,6 +23,11 @@
*
*/
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_fprintf
+
#include <common/scummsys.h>
#include "engines/engine.h"
#include "dc.h"
diff --git a/backends/platform/dingux/main.cpp b/backends/platform/dingux/main.cpp
index c5dccc5f50..cf25e1cb42 100644
--- a/backends/platform/dingux/main.cpp
+++ b/backends/platform/dingux/main.cpp
@@ -30,8 +30,6 @@
#if defined(DINGUX)
-#include <unistd.h>
-
int main(int argc, char* argv[]) {
g_system = new OSystem_SDL_Dingux();
diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
index 7f0757ef53..698590418c 100644
--- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
+++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
@@ -18,6 +18,9 @@
//---------------------------------------------------------------
// Includes
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "gba_nds_fat.h"
#include "disc_io.h"
#include <string.h>
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 3ad92b4355..462990cb32 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -20,6 +20,9 @@
*/
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "common/scummsys.h"
#include "common/system.h"
@@ -243,7 +246,7 @@ void OSystem_DS::setCursorPalette(const byte *colors, uint start, uint num) {
}
bool OSystem_DS::grabRawScreen(Graphics::Surface *surf) {
- surf->create(DS::getGameWidth(), DS::getGameHeight(), 1);
+ surf->create(DS::getGameWidth(), DS::getGameHeight(), Graphics::PixelFormat::createFormatCLUT8());
// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
@@ -259,13 +262,13 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface *surf) {
return true;
}
-void OSystem_DS::grabPalette(unsigned char *colours, uint start, uint num) {
+void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {
// consolePrintf("Grabpalette");
for (unsigned int r = start; r < start + num; r++) {
- *colours++ = (BG_PALETTE[r] & 0x001F) << 3;
- *colours++ = (BG_PALETTE[r] & 0x03E0) >> 5 << 3;
- *colours++ = (BG_PALETTE[r] & 0x7C00) >> 10 << 3;
+ *colors++ = (BG_PALETTE[r] & 0x001F) << 3;
+ *colors++ = (BG_PALETTE[r] & 0x03E0) >> 5 << 3;
+ *colors++ = (BG_PALETTE[r] & 0x7C00) >> 10 << 3;
}
}
@@ -756,7 +759,7 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() {
_framebuffer.w = DS::getGameWidth();
_framebuffer.h = DS::getGameHeight();
_framebuffer.pitch = DS::getGameWidth();
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
} else {
@@ -781,7 +784,7 @@ Graphics::Surface *OSystem_DS::createTempFrameBuffer() {
_framebuffer.w = width;
_framebuffer.h = height;
_framebuffer.pitch = width;
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
}
@@ -849,16 +852,16 @@ Common::WriteStream *OSystem_DS::createConfigWriteStream() {
return file.createWriteStream();
}
-u16 OSystem_DS::applyGamma(u16 colour) {
+u16 OSystem_DS::applyGamma(u16 color) {
// Attempt to do gamma correction (or something like it) to palette entries
// to improve the contrast of the image on the original DS screen.
- // Split the colour into it's component channels
- int r = colour & 0x001F;
- int g = (colour & 0x03E0) >> 5;
- int b = (colour & 0x7C00) >> 10;
+ // Split the color into it's component channels
+ int r = color & 0x001F;
+ int g = (color & 0x03E0) >> 5;
+ int b = (color & 0x7C00) >> 10;
- // Caluclate the scaling factor for this colour based on it's brightness
+ // Caluclate the scaling factor for this color based on it's brightness
int scale = ((23 - ((r + g + b) >> 2)) * _gammaValue) >> 3;
// Scale the three components by the scaling factor, with clamping
@@ -871,7 +874,7 @@ u16 OSystem_DS::applyGamma(u16 colour) {
b = b + ((b * scale) >> 4);
if (b > 31) b = 31;
- // Stick them back together into a 555 colour value
+ // Stick them back together into a 555 color value
return 0x8000 | r | (g << 5) | (b << 10);
}
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index 7feed7541f..b745b4dc6e 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -36,6 +36,7 @@
#include "audio/mixer_intern.h"
#include "graphics/surface.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
class OSystem_DS : public BaseBackend, public PaletteManager {
protected:
@@ -183,7 +184,7 @@ public:
Common::WriteStream *createConfigWriteStream();
Common::SeekableReadStream *createConfigReadStream();
- u16 applyGamma(u16 colour);
+ u16 applyGamma(u16 color);
void setGammaValue(int gamma) { _gammaValue = gamma; }
void engineDone();
diff --git a/backends/platform/ds/ds.mk b/backends/platform/ds/ds.mk
index a9ed3e0096..654475e1f3 100644
--- a/backends/platform/ds/ds.mk
+++ b/backends/platform/ds/ds.mk
@@ -170,10 +170,10 @@ dsclean:
# HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX
# as soon as possible.
-CC := $(DEVKITARM)/bin/arm-eabi-gcc
+CC := $(DEVKITPRO)/devkitARM/bin/arm-eabi-gcc
# HACK/TODO: Pointer to objcopy. This should really be set by configure
-OBJCOPY := $(DEVKITARM)/bin/arm-eabi-objcopy
+OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-eabi-objcopy
#
# Set various flags
diff --git a/backends/platform/ds/makefile b/backends/platform/ds/makefile
index 58d6fd4c02..e24a36ef81 100644
--- a/backends/platform/ds/makefile
+++ b/backends/platform/ds/makefile
@@ -3,7 +3,7 @@
-export PATH := $(DEVKITARM)/bin:$(PATH)
+export PATH := $(DEVKITPRO)/devkitARM/bin:$(PATH)
export portdir = $(CURDIR)/arm9
export srcdir = $(CURDIR)/../../..
diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp
index 0432974246..375ee37378 100644
--- a/backends/platform/gph/gph-backend.cpp
+++ b/backends/platform/gph/gph-backend.cpp
@@ -26,23 +26,23 @@
#include "backends/platform/sdl/sdl-sys.h"
// #include "backends/platform/gph/gph-options.h"
-#include "backends/platform/gph/gph-sdl.h"
+#include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h"
#include "backends/platform/gph/gph-hw.h"
+#include "backends/platform/gph/gph-sdl.h"
#include "backends/plugins/posix/posix-provider.h"
+#include "backends/saves/default/default-saves.h"
+#include "backends/timer/default/default-timer.h"
+
#include "base/main.h"
#include "common/archive.h"
#include "common/config-manager.h"
#include "common/debug.h"
#include "common/events.h"
-#include "common/util.h"
-
#include "common/file.h"
-#include "base/main.h"
-
-#include "backends/saves/default/default-saves.h"
+#include "common/textconsole.h"
+#include "common/util.h"
-#include "backends/timer/default/default-timer.h"
#include "audio/mixer_intern.h"
#include <stdio.h>
@@ -67,6 +67,14 @@ void OSystem_GPH::initBackend() {
_graphicsManager = new GPHGraphicsManager(_eventSource);
}
+ // Create the mixer manager
+ if (_mixer == 0) {
+ _mixerManager = new DoubleBufferSDLMixerManager();
+
+ // Setup and start mixer
+ _mixerManager->init();
+ }
+
/* Setup default save path to be workingdir/saves */
char savePath[PATH_MAX+1];
diff --git a/backends/platform/gph/gph-sdl.h b/backends/platform/gph/gph-sdl.h
index 51c609d29e..68a641eed7 100644
--- a/backends/platform/gph/gph-sdl.h
+++ b/backends/platform/gph/gph-sdl.h
@@ -32,7 +32,6 @@
#include "backends/events/gph/gph-events.h"
#define __GP2XWIZ__
-#define MIXER_DOUBLE_BUFFERING 1
#ifndef PATH_MAX
#define PATH_MAX 255
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 5e88510980..79f596632f 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -30,6 +30,7 @@
#include "audio/mixer_intern.h"
#include "backends/fs/posix/posix-fs-factory.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include <AudioToolbox/AudioQueue.h>
@@ -81,7 +82,7 @@ protected:
bool _mouseVisible;
byte *_mouseBuf;
- byte _mouseKeyColour;
+ byte _mouseKeyColor;
uint _mouseWidth, _mouseHeight;
uint _mouseX, _mouseY;
int _mouseHotspotX, _mouseHotspotY;
diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp
index d67d38932a..a10efeff40 100644
--- a/backends/platform/iphone/osys_video.cpp
+++ b/backends/platform/iphone/osys_video.cpp
@@ -312,7 +312,7 @@ void OSystem_IPHONE::drawMouseCursorOnRectUpdate(const Common::Rect& updatedRect
uint16 *dst = &_fullscreen[top * _screenWidth + left];
for (int y = displayHeight; y > srcY; y--) {
for (int x = displayWidth; x > srcX; x--) {
- if (*src != _mouseKeyColour)
+ if (*src != _mouseKeyColor)
*dst = _palette[*src];
dst++;
src++;
@@ -334,7 +334,7 @@ Graphics::Surface *OSystem_IPHONE::lockScreen() {
_framebuffer.w = _screenWidth;
_framebuffer.h = _screenHeight;
_framebuffer.pitch = _screenWidth;
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
return &_framebuffer;
}
@@ -497,7 +497,7 @@ void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
_mouseHotspotX = hotspotX;
_mouseHotspotY = hotspotY;
- _mouseKeyColour = (byte)keycolor;
+ _mouseKeyColor = (byte)keycolor;
memcpy(_mouseBuf, buf, w * h);
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index 2daa41a9f6..b9acb7c76c 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -37,6 +37,7 @@
#include "graphics/surface.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include "graphics/pixelformat.h"
#include "audio/mixer_intern.h"
@@ -128,7 +129,7 @@ protected:
volatile int _mouseMaxX, _mouseMaxY;
int _mouseHotspotX, _mouseHotspotY;
- uint8 _controllerPort;
+ int8 _controllerPort;
int8 _mousePort;
bool _controllerHasRumble; // Gets enabled if rumble-pak is detected
diff --git a/backends/platform/n64/osys_n64_base.cpp b/backends/platform/n64/osys_n64_base.cpp
index 54eab0fd52..ae8d23d3e2 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -32,6 +32,8 @@
#include "framfs_save_manager.h"
#include "backends/fs/n64/n64-fs-factory.h"
+typedef unsigned long long uint64;
+
extern uint8 _romfs; // Defined by linker (used to calculate position of romfs image)
inline uint16 colRGB888toBGR555(byte r, byte g, byte b);
@@ -90,9 +92,9 @@ OSystem_N64::OSystem_N64() {
_shakeOffset = 0;
// Allocate memory for offscreen buffers
- _offscreen_hic = (uint16*)memalign(8, _screenWidth * _screenHeight * 2);
- _offscreen_pal = (uint8*)memalign(8, _screenWidth * _screenHeight);
- _overlayBuffer = (uint16*)memalign(8, _overlayWidth * _overlayHeight * sizeof(OverlayColor));
+ _offscreen_hic = (uint16 *)memalign(8, _screenWidth * _screenHeight * 2);
+ _offscreen_pal = (uint8 *)memalign(8, _screenWidth * _screenHeight);
+ _overlayBuffer = (uint16 *)memalign(8, _overlayWidth * _overlayHeight * sizeof(OverlayColor));
_cursor_pal = NULL;
_cursor_hic = NULL;
@@ -111,9 +113,9 @@ OSystem_N64::OSystem_N64() {
_graphicMode = OVERS_NTSC_340X240;
// Clear palette array
- _screenPalette = (uint16*)memalign(8, 256 * sizeof(uint16));
+ _screenPalette = (uint16 *)memalign(8, 256 * sizeof(uint16));
#ifndef N64_EXTREME_MEMORY_SAVING
- _screenExactPalette = (uint8*)memalign(8, 256 * 3);
+ _screenExactPalette = (uint8 *)memalign(8, 256 * 3);
memset(_screenExactPalette, 0, 256 * 3);
#endif
memset(_screenPalette, 0, 256 * sizeof(uint16));
@@ -125,7 +127,7 @@ OSystem_N64::OSystem_N64() {
_audioEnabled = false;
// Initialize ROMFS access interface
- initRomFSmanager((uint8*)(((uint32)&_romfs + (uint32)0xc00) | (uint32)0xB0000000));
+ initRomFSmanager((uint8 *)(((uint32)&_romfs + (uint32)0xc00) | (uint32)0xB0000000));
_mouseVisible = false;
@@ -374,7 +376,7 @@ void OSystem_N64::rebuildOffscreenGameBuffer(void) {
for (int h = 0; h < _gameHeight; h++) {
for (int w = 0; w < _gameWidth; w += 4) {
- four_col_pal = *(uint32*)(_offscreen_pal + ((h * _screenWidth) + w));
+ four_col_pal = *(uint32 *)(_offscreen_pal + ((h * _screenWidth) + w));
four_col_hi = 0;
four_col_hi |= (uint64)_screenPalette[((four_col_pal >> 24) & 0xFF)] << 48;
@@ -383,7 +385,7 @@ void OSystem_N64::rebuildOffscreenGameBuffer(void) {
four_col_hi |= (uint64)_screenPalette[((four_col_pal >> 0) & 0xFF)] << 0;
// Save the converted pixels into hicolor buffer
- *(uint64*)((_offscreen_hic) + (h * _screenWidth) + w) = four_col_hi;
+ *(uint64 *)((_offscreen_hic) + (h * _screenWidth) + w) = four_col_hi;
}
}
}
@@ -520,7 +522,7 @@ void OSystem_N64::updateScreen() {
// Obtain the framebuffer
while (!(_dc = lockDisplay()));
- uint16 *overlay_framebuffer = (uint16*)_dc->conf.framebuffer; // Current screen framebuffer
+ uint16 *overlay_framebuffer = (uint16 *)_dc->conf.framebuffer; // Current screen framebuffer
uint16 *game_framebuffer = overlay_framebuffer + (_frameBufferWidth * skip_lines * 2); // Skip some lines to center the image vertically
uint16 currentHeight, currentWidth;
@@ -532,8 +534,8 @@ void OSystem_N64::updateScreen() {
tmpDst = game_framebuffer;
tmpSrc = _offscreen_hic + (_shakeOffset * _screenWidth);
for (currentHeight = _shakeOffset; currentHeight < _gameHeight; currentHeight++) {
- uint64 *game_dest = (uint64*)(tmpDst + skip_pixels + _offscrPixels);
- uint64 *game_src = (uint64*)tmpSrc;
+ uint64 *game_dest = (uint64 *)(tmpDst + skip_pixels + _offscrPixels);
+ uint64 *game_src = (uint64 *)tmpSrc;
// With uint64 we copy 4 pixels at a time
for (currentWidth = 0; currentWidth < _gameWidth; currentWidth += 4) {
@@ -552,8 +554,8 @@ void OSystem_N64::updateScreen() {
tmpDst = overlay_framebuffer;
tmpSrc = _overlayBuffer;
for (currentHeight = 0; currentHeight < _overlayHeight; currentHeight++) {
- uint64 *over_dest = (uint64*)(tmpDst + _offscrPixels);
- uint64 *over_src = (uint64*)tmpSrc;
+ uint64 *over_dest = (uint64 *)(tmpDst + _offscrPixels);
+ uint64 *over_src = (uint64 *)tmpSrc;
// Copy 4 pixels at a time
for (currentWidth = 0; currentWidth < _overlayWidth; currentWidth += 4) {
@@ -610,7 +612,7 @@ Graphics::Surface *OSystem_N64::lockScreen() {
_framebuffer.w = _gameWidth;
_framebuffer.h = _gameHeight;
_framebuffer.pitch = _screenWidth;
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
return &_framebuffer;
}
@@ -790,8 +792,8 @@ void OSystem_N64::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
}
if (!_cursor_pal) {
- _cursor_pal = (uint8*)malloc(w * h);
- _cursor_hic = (uint16*)malloc(w * h * sizeof(uint16));
+ _cursor_pal = (uint8 *)malloc(w * h);
+ _cursor_hic = (uint16 *)malloc(w * h * sizeof(uint16));
}
_cursorWidth = w;
@@ -907,10 +909,10 @@ void OSystem_N64::setupMixer(void) {
/* Check all controller ports for a compatible input adapter. */
void OSystem_N64::detectControllers(void) {
- controller_data_status *ctrl_status = (controller_data_status*)memalign(8, sizeof(controller_data_status));
+ controller_data_status *ctrl_status = (controller_data_status *)memalign(8, sizeof(controller_data_status));
controller_Read_Status(ctrl_status);
- _controllerPort = 0; // Use first controller as default
+ _controllerPort = -1; // Default no controller
_mousePort = -1; // Default no mouse
for (int8 ctrl_port = 3; ctrl_port >= 0; ctrl_port--) {
// Found a standard pad, use this by default.
diff --git a/backends/platform/n64/osys_n64_events.cpp b/backends/platform/n64/osys_n64_events.cpp
index 22b9addbfb..69c854750c 100644
--- a/backends/platform/n64/osys_n64_events.cpp
+++ b/backends/platform/n64/osys_n64_events.cpp
@@ -94,8 +94,13 @@ void OSystem_N64::readControllerAnalogInput(void) {
// Read current controller status
controller_Read_Buttons(&_ctrlData);
- pad_analogX = (_ctrlData.c[_controllerPort].throttle >> 8) & 0xFF;
- pad_analogY = (_ctrlData.c[_controllerPort].throttle >> 0) & 0xFF;
+ pad_analogX = 0;
+ pad_analogY = 0;
+
+ if (_controllerPort >= 0) {
+ pad_analogX = (_ctrlData.c[_controllerPort].throttle >> 8) & 0xFF;
+ pad_analogY = (_ctrlData.c[_controllerPort].throttle >> 0) & 0xFF;
+ }
pad_mouseX = 0;
pad_mouseY = 0;
@@ -157,9 +162,11 @@ bool OSystem_N64::pollEvent(Common::Event &event) {
static uint16 oldButtons = 0; // old button data... used for button press/release
static uint16 oldMouseButtons = 0;
- uint16 newButtons = _ctrlData.c[_controllerPort].buttons; // Read from controller
+ 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/n64/pad_rom.sh b/backends/platform/n64/pad_rom.sh
index 085203306f..085203306f 100644..100755
--- a/backends/platform/n64/pad_rom.sh
+++ b/backends/platform/n64/pad_rom.sh
diff --git a/backends/platform/openpandora/op-backend.cpp b/backends/platform/openpandora/op-backend.cpp
index 5b333929c9..4c29636e40 100644
--- a/backends/platform/openpandora/op-backend.cpp
+++ b/backends/platform/openpandora/op-backend.cpp
@@ -26,20 +26,17 @@
#include "backends/platform/openpandora/op-sdl.h"
#include "base/main.h"
+#include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h"
#include "backends/saves/default/default-saves.h"
+#include "backends/timer/default/default-timer.h"
#include "common/archive.h"
#include "common/config-manager.h"
#include "common/debug.h"
#include "common/events.h"
-#include "common/util.h"
-
#include "common/file.h"
-#include "base/main.h"
-
-#include "backends/saves/default/default-saves.h"
+#include "common/util.h"
-#include "backends/timer/default/default-timer.h"
#include "audio/mixer_intern.h"
#include <stdio.h>
@@ -78,6 +75,14 @@ void OSystem_OP::initBackend() {
// }
//
+ // Create the mixer manager
+ if (_mixer == 0) {
+ _mixerManager = new DoubleBufferSDLMixerManager();
+
+ // Setup and start mixer
+ _mixerManager->init();
+ }
+
/* Setup default save path to be workingdir/saves */
char savePath[PATH_MAX+1];
diff --git a/backends/platform/openpandora/op-sdl.h b/backends/platform/openpandora/op-sdl.h
index 93c82ca397..9d92472b17 100644
--- a/backends/platform/openpandora/op-sdl.h
+++ b/backends/platform/openpandora/op-sdl.h
@@ -32,7 +32,6 @@
#include "backends/graphics/openpandora/op-graphics.h"
#define __OPENPANDORA__
-#define MIXER_DOUBLE_BUFFERING 1
#ifndef PATH_MAX
#define PATH_MAX 255
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index a460b919fd..c228a12b26 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "Gs2dScreen.h"
#include <kernel.h>
#include <malloc.h>
@@ -398,7 +400,7 @@ Graphics::Surface *Gs2dScreen::lockScreen() {
_framebuffer.w = _width;
_framebuffer.h = _height;
_framebuffer.pitch = _width; // -not- _pitch; ! It's EE mem, not Tex
- _framebuffer.bytesPerPixel = 1;
+ _framebuffer.format = Graphics::PixelFormat::createFormatCLUT8();
return &_framebuffer;
}
@@ -441,7 +443,7 @@ void Gs2dScreen::grabPalette(uint8 *pal, uint8 start, uint16 num) {
void Gs2dScreen::grabScreen(Graphics::Surface *surf) {
assert(surf);
WaitSema(g_DmacSema);
- surf->create(_width, _height, 1);
+ surf->create(_width, _height, Graphics::PixelFormat::createFormatCLUT8());
memcpy(surf->pixels, _screenBuf, _width * _height);
SignalSema(g_DmacSema);
}
diff --git a/backends/platform/ps2/Gs2dScreen.h b/backends/platform/ps2/Gs2dScreen.h
index 358e717cbe..6e842b3f55 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -46,7 +46,7 @@ enum GsInterlace {
namespace Graphics {
- struct Surface;
+struct Surface;
}
class Gs2dScreen {
diff --git a/backends/platform/ps2/irxboot.cpp b/backends/platform/ps2/irxboot.cpp
index 5ab7823e63..cc23df6575 100644
--- a/backends/platform/ps2/irxboot.cpp
+++ b/backends/platform/ps2/irxboot.cpp
@@ -73,7 +73,7 @@ PS2Device detectBootPath(const char *elfPath, char *bootPath) {
PS2Device device = _getDev(elfPath);
- printf("elf path: %s, device %d\n", elfPath, device);
+ sioprintf("elf path: %s, device %d\n", elfPath, device);
strcpy(bootPath, elfPath);
diff --git a/backends/platform/ps2/ps2input.cpp b/backends/platform/ps2/ps2input.cpp
index 964a773f7e..6da21172ad 100644
--- a/backends/platform/ps2/ps2input.cpp
+++ b/backends/platform/ps2/ps2input.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <kernel.h>
#include <malloc.h>
#include <assert.h>
diff --git a/backends/platform/ps2/ps2input.h b/backends/platform/ps2/ps2input.h
index 266f408809..eca5950113 100644
--- a/backends/platform/ps2/ps2input.h
+++ b/backends/platform/ps2/ps2input.h
@@ -32,6 +32,10 @@
class OSystem_PS2;
class Ps2Pad;
+namespace Common {
+struct Event;
+}
+
class Ps2Input {
public:
Ps2Input(OSystem_PS2 *system, bool mouseLoaded, bool kbdLoaded);
diff --git a/backends/platform/ps2/ps2mutex.cpp b/backends/platform/ps2/ps2mutex.cpp
index fe76202f32..974cf00f56 100644
--- a/backends/platform/ps2/ps2mutex.cpp
+++ b/backends/platform/ps2/ps2mutex.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "backends/platform/ps2/systemps2.h"
void OSystem_PS2::initMutexes(void) {
diff --git a/backends/platform/ps2/ps2pad.cpp b/backends/platform/ps2/ps2pad.cpp
index 3d285eedd5..090a5f2a35 100644
--- a/backends/platform/ps2/ps2pad.cpp
+++ b/backends/platform/ps2/ps2pad.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <kernel.h>
#include <malloc.h>
#include <assert.h>
diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp
index 4da8420478..4c682cb9f2 100644
--- a/backends/platform/ps2/ps2time.cpp
+++ b/backends/platform/ps2/ps2time.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include "backends/platform/ps2/systemps2.h"
#include "backends/platform/ps2/ps2debug.h"
#include "eecodyvdfs.h"
diff --git a/backends/platform/ps2/savefilemgr.cpp b/backends/platform/ps2/savefilemgr.cpp
index a4b3ddb971..459920c34a 100644
--- a/backends/platform/ps2/savefilemgr.cpp
+++ b/backends/platform/ps2/savefilemgr.cpp
@@ -23,6 +23,10 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
#include "common/config-manager.h"
#include "common/zlib.h"
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 77de74eb5b..aed2378faf 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -568,6 +568,11 @@ void OSystem_PS2::updateScreen(void) {
_screen->updateScreen();
}
+void OSystem_PS2::displayMessageOnOSD(const char *msg) {
+ /* TODO : check */
+ printf("displayMessageOnOSD: %s\n", msg);
+}
+
uint32 OSystem_PS2::getMillis(void) {
return msecCount;
}
@@ -727,7 +732,7 @@ void OSystem_PS2::msgPrintf(int millis, const char *format, ...) {
int maxWidth = 0;
Graphics::Surface surf;
- surf.create(300, 200, 1);
+ surf.create(300, 200, Graphics::PixelFormat::createFormatCLUT8());
char *lnSta = resStr;
while (*lnSta && (posY < 180)) {
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index 37575f399f..26e3105cd9 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -28,6 +28,7 @@
#include "common/system.h"
#include "backends/base-backend.h"
+#include "graphics/palette.h"
class DefaultTimerManager;
class DefaultSaveFileManager;
@@ -47,11 +48,11 @@ struct Ps2Mutex {
};
namespace Common {
- class TimerManager;
+class TimerManager;
};
namespace Audio {
- class MixerImpl;
+class MixerImpl;
};
class OSystem_PS2 : public BaseBackend, public PaletteManager {
@@ -78,9 +79,7 @@ public:
virtual Graphics::Surface *lockScreen();
virtual void unlockScreen();
virtual void updateScreen();
- /* TODO : check */
- virtual void displayMessageOnOSD(const char *msg) { printf("displayMessageOnOSD: %s\n", msg); };
- /* */
+ virtual void displayMessageOnOSD(const char *msg);
virtual void showOverlay();
virtual void hideOverlay();
diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP
index b520022033..dcfa30898c 100644
--- a/backends/platform/psp/README.PSP
+++ b/backends/platform/psp/README.PSP
@@ -1,4 +1,4 @@
-ScummVM-PSP 1.3.0git README
+ScummVM-PSP 1.4.0git README
==============================================================================
Installation
diff --git a/backends/platform/psp/cursor.cpp b/backends/platform/psp/cursor.cpp
index cf879e095a..420b0398c3 100644
--- a/backends/platform/psp/cursor.cpp
+++ b/backends/platform/psp/cursor.cpp
@@ -327,8 +327,20 @@ 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
+ // transparent.
+ _renderer.setColorTest(true);
+
+ // Alpha blending is not strictly required, but makes the cursor look
+ // much better
_renderer.setAlphaBlending(true);
- _renderer.setAlphaReverse(true); // We can't change all alpha values, so just reverse
- _renderer.setColorTest(true); // Color test to make our key color transparent
+
+ // 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)
+ _renderer.setAlphaReverse(true);
+ else
+ _renderer.setAlphaReverse(false);
}
}
diff --git a/backends/platform/psp/default_display_client.cpp b/backends/platform/psp/default_display_client.cpp
index bb42406c3e..34b1a70711 100644
--- a/backends/platform/psp/default_display_client.cpp
+++ b/backends/platform/psp/default_display_client.cpp
@@ -199,7 +199,7 @@ Graphics::Surface *Screen::lockAndGetForEditing() {
_frameBuffer.w = _buffer.getSourceWidth();
_frameBuffer.h = _buffer.getSourceHeight();
_frameBuffer.pitch = _buffer.getBytesPerPixel() * _buffer.getWidth();
- _frameBuffer.bytesPerPixel = _buffer.getBytesPerPixel();
+ _frameBuffer.format = _pixelFormat;
// We'll set to dirty once we unlock the screen
return &_frameBuffer;
diff --git a/backends/platform/psp/display_client.cpp b/backends/platform/psp/display_client.cpp
index 76b4a28e4a..d43e876a17 100644
--- a/backends/platform/psp/display_client.cpp
+++ b/backends/platform/psp/display_client.cpp
@@ -23,6 +23,20 @@
*
*/
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <pspgu.h>
#include <pspkerneltypes.h>
#include <pspdisplay.h>
diff --git a/backends/platform/psp/mp3.cpp b/backends/platform/psp/mp3.cpp
index 54476dabfd..fd686513af 100644
--- a/backends/platform/psp/mp3.cpp
+++ b/backends/platform/psp/mp3.cpp
@@ -23,12 +23,26 @@
*
*/
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#include "common/debug.h"
#include "common/stream.h"
#include "common/util.h"
#include "common/singleton.h"
#include "common/mutex.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
diff --git a/backends/platform/psp/mp3.h b/backends/platform/psp/mp3.h
index 1d2fe5ec2f..95491d5788 100644
--- a/backends/platform/psp/mp3.h
+++ b/backends/platform/psp/mp3.h
@@ -30,7 +30,7 @@
#include "common/scummsys.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Audio {
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index bb7c1ff7d5..e2a8a88c57 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -23,6 +23,9 @@
*
*/
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#include <pspuser.h>
#include <pspgu.h>
#include <pspdisplay.h>
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index 051449d4a0..1e4aea70d3 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -29,6 +29,7 @@
#include "common/scummsys.h"
#include "graphics/surface.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include "audio/mixer_intern.h"
#include "backends/base-backend.h"
#include "backends/fs/psp/psp-fs-factory.h"
diff --git a/backends/platform/psp/portdefs.h b/backends/platform/psp/portdefs.h
index bf7ed41e25..dae9b5d49e 100644
--- a/backends/platform/psp/portdefs.h
+++ b/backends/platform/psp/portdefs.h
@@ -26,6 +26,12 @@
#ifndef PORTDEFS_H
#define PORTDEFS_H
+// FIXME: This file is only used when building using the file
+// backends/platform/psp/Makefile, but not when building using configure
+// && make. So either -DNONSTANDARD_PORT needs to be added to the PSP
+// configure rules, or it should be removed from the aforementioned
+// Makefile.
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp
index d24c614e33..b85467f788 100644
--- a/backends/platform/psp/psp_main.cpp
+++ b/backends/platform/psp/psp_main.cpp
@@ -23,6 +23,20 @@
*
*/
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#define USERSPACE_ONLY //don't use kernel mode features
#ifndef USERSPACE_ONLY
diff --git a/backends/platform/psp/trace.cpp b/backends/platform/psp/trace.cpp
index 74c2f64300..92ee7b669e 100644
--- a/backends/platform/psp/trace.cpp
+++ b/backends/platform/psp/trace.cpp
@@ -23,6 +23,19 @@
*
*/
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#include <pspkernel.h>
#include <pspdebug.h>
diff --git a/backends/platform/samsungtv/main.cpp b/backends/platform/samsungtv/main.cpp
index 3beb97165f..a1962dd904 100644
--- a/backends/platform/samsungtv/main.cpp
+++ b/backends/platform/samsungtv/main.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
#include "backends/platform/samsungtv/samsungtv.h"
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index 71a88265a0..2208f7c351 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -23,6 +23,9 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h //On IRIX, sys/stat.h includes sys/time.h
+
#include "common/scummsys.h"
#ifdef UNIX
@@ -34,6 +37,7 @@
#include <errno.h>
#include <sys/stat.h>
+
OSystem_POSIX::OSystem_POSIX(Common::String baseConfigName)
:
_baseConfigName(baseConfigName) {
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index d6e79248f9..e6ca423f61 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -32,6 +34,7 @@
#include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h"
#include "common/EventRecorder.h"
+#include "common/textconsole.h"
#include "backends/saves/default/default-saves.h"
#include "backends/audiocd/sdl/sdl-audiocd.h"
@@ -378,7 +381,11 @@ void OSystem_SDL::setupIcon() {
unsigned int rgba[256];
unsigned int *icon;
- sscanf(scummvm_icon[0], "%d %d %d %d", &w, &h, &ncols, &nbytes);
+ 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)) {
warning("Could not load the built-in icon (%d %d %d %d)", w, h, ncols, nbytes);
return;
@@ -393,13 +400,17 @@ void OSystem_SDL::setupIcon() {
unsigned char code;
char color[32];
unsigned int col;
- sscanf(scummvm_icon[1 + i], "%c c %s", &code, color);
+ 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]);
+ }
if (!strcmp(color, "None"))
col = 0x00000000;
else if (!strcmp(color, "black"))
col = 0xFF000000;
else if (color[0] == '#') {
- sscanf(color + 1, "%06x", &col);
+ if (sscanf(color + 1, "%06x", &col) != 1) {
+ warning("Wrong format of color (%s)", color + 1);
+ }
col |= 0xFF000000;
} else {
warning("Could not load the built-in icon (%d %s - %s) ", code, color, scummvm_icon[1 + i]);
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index 9459263ae2..d6a39ff48f 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -27,6 +27,8 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#ifdef WIN32
@@ -37,6 +39,8 @@
#include "backends/platform/sdl/win32/win32.h"
#include "backends/fs/windows/windows-fs-factory.h"
+#include "common/memstream.h"
+
#define DEFAULT_CONFIG_FILE "scummvm.ini"
//#define HIDE_CONSOLE
@@ -168,4 +172,88 @@ Common::WriteStream *OSystem_Win32::createLogFile() {
}
}
+namespace {
+
+class Win32ResourceArchive : public Common::Archive {
+ friend BOOL CALLBACK EnumResNameProc(HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG_PTR lParam);
+public:
+ Win32ResourceArchive();
+
+ virtual bool hasFile(const Common::String &name);
+ virtual int listMembers(Common::ArchiveMemberList &list);
+ virtual Common::ArchiveMemberPtr getMember(const Common::String &name);
+ virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const;
+private:
+ typedef Common::List<Common::String> FilenameList;
+
+ FilenameList _files;
+};
+
+BOOL CALLBACK EnumResNameProc(HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG_PTR lParam) {
+ if (IS_INTRESOURCE(lpszName))
+ return TRUE;
+
+ Win32ResourceArchive *arch = (Win32ResourceArchive *)lParam;
+ arch->_files.push_back(lpszName);
+ return TRUE;
+}
+
+Win32ResourceArchive::Win32ResourceArchive() {
+ EnumResourceNames(NULL, MAKEINTRESOURCE(256), &EnumResNameProc, (LONG_PTR)this);
+}
+
+bool Win32ResourceArchive::hasFile(const Common::String &name) {
+ for (FilenameList::const_iterator i = _files.begin(); i != _files.end(); ++i) {
+ if (i->equalsIgnoreCase(name))
+ return true;
+ }
+
+ return false;
+}
+
+int Win32ResourceArchive::listMembers(Common::ArchiveMemberList &list) {
+ int count = 0;
+
+ for (FilenameList::const_iterator i = _files.begin(); i != _files.end(); ++i, ++count)
+ list.push_back(Common::ArchiveMemberPtr(new Common::GenericArchiveMember(*i, this)));
+
+ return count;
+}
+
+Common::ArchiveMemberPtr Win32ResourceArchive::getMember(const Common::String &name) {
+ return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this));
+}
+
+Common::SeekableReadStream *Win32ResourceArchive::createReadStreamForMember(const Common::String &name) const {
+ HRSRC resource = FindResource(NULL, name.c_str(), MAKEINTRESOURCE(256));
+
+ if (resource == NULL)
+ return 0;
+
+ HGLOBAL handle = LoadResource(NULL, resource);
+
+ if (handle == NULL)
+ return 0;
+
+ const byte *data = (const byte *)LockResource(handle);
+
+ if (data == NULL)
+ return 0;
+
+ uint32 size = SizeofResource(NULL, resource);
+
+ if (size == 0)
+ return 0;
+
+ return new Common::MemoryReadStream(data, size);
+}
+
+} // End of anonymous namespace
+
+void OSystem_Win32::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
+ s.add("Win32Res", new Win32ResourceArchive());
+
+ OSystem_SDL::addSysArchivesToSearchSet(s, priority);
+}
+
#endif
diff --git a/backends/platform/sdl/win32/win32.h b/backends/platform/sdl/win32/win32.h
index 8379c49437..25cb6bfbba 100644
--- a/backends/platform/sdl/win32/win32.h
+++ b/backends/platform/sdl/win32/win32.h
@@ -32,6 +32,7 @@ class OSystem_Win32 : public OSystem_SDL {
public:
virtual void init();
+ virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
protected:
virtual Common::String getDefaultConfigFileName();
virtual Common::WriteStream *createLogFile();
diff --git a/backends/platform/symbian/AdaptAllMMPs.pl b/backends/platform/symbian/AdaptAllMMPs.pl
index 921f384c65..dbced3126a 100644
--- a/backends/platform/symbian/AdaptAllMMPs.pl
+++ b/backends/platform/symbian/AdaptAllMMPs.pl
@@ -36,6 +36,7 @@ chdir("../../../");
"mmp/scummvm_hugo.mmp",
"mmp/scummvm_toon.mmp",
"mmp/scummvm_lastexpress.mmp",
+ "mmp/scummvm_tsage.mmp",
# Target Platform Project Files
"S60/ScummVM_S60.mmp",
"S60v3/ScummVM_S60v3.mmp",
@@ -111,7 +112,8 @@ ParseModule("_base", "base", \@section_empty); # now in ./TRG/ScummVM_TRG.mmp,
ParseModule("_base", "common", \@section_empty);
ParseModule("_base", "gui", \@section_empty, \@excludes_gui);
ParseModule("_base", "graphics", \@section_empty, \@excludes_graphics);
-ParseModule("_base", "sound", \@section_empty, \@excludes_snd);
+ParseModule("_base", "audio", \@section_empty, \@excludes_snd);
+ParseModule("_base", "video", \@section_empty);
chdir("engines/");
ParseModule("_scumm", "scumm", \@sections_scumm, \@excludes_scumm );
@@ -142,6 +144,7 @@ ParseModule("_mohawk" ,"mohawk", \@section_empty);
ParseModule("_hugo" ,"hugo", \@section_empty);
ParseModule("_toon" ,"toon", \@section_empty);
ParseModule("_lastexpress","lastexpress", \@section_empty);
+ParseModule("_tsage","tsage", \@section_empty);
print "
=======================================================================================
Done. Enjoy :P
diff --git a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
index 5c127afaa0..cb1c508fa1 100644
--- a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
+++ b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
@@ -4,7 +4,7 @@
@WorkingEngines = qw(
scumm agos sky queen gob groovie saga drascula
kyra lure agi touche parallaction cine
- cruise made m4 tinsel tucker sword1 sword2 draci sci teenagent mohawk hugo toon lastexpress
+ cruise made m4 tinsel tucker sword1 sword2 draci sci teenagent mohawk hugo toon lastexpress tsage
);
@WorkingEngines_1st = qw(
@@ -14,9 +14,10 @@
);
@WorkingEngines_2nd = qw(
- agos sky gob
- kyra lure agi tinsel
- sword1 sword2 draci sci teenagent hugo toon
+ agos sky gob kyra lure
+ agi tinsel sword1 sword2
+ draci sci teenagent hugo toon
+ tsage
);
@TestingEngines = qw(
diff --git a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
index 12b4cb3610..4e0a66793c 100644
--- a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
@@ -63,8 +63,8 @@ START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
SOURCEPATH ..\res
// Source Color-depth Source-bitmap-list
-// c denotes whether the bitmap is a colour bitmap and the digits represent the
-// colour-depth of the bitmap and the bitmap mask respectively
+// c denotes whether the bitmap is a color bitmap and the digits represent the
+// color-depth of the bitmap and the bitmap mask respectively
SOURCE c24 ScummSmall.bmp
SOURCE 8 ScummSmallMask.bmp
SOURCE c24 ScummLarge.bmp
@@ -119,6 +119,7 @@ SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
+SOURCE backends\fs\symbian\symbian-fs.cpp
SOURCE backends\fs\symbian\symbian-fs-factory.cpp
SOURCE backends\platform\symbian\src\SymbianOS.cpp
SOURCE backends\platform\symbian\src\SymbianActions.cpp
diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
index 9af6535b22..1929723fb6 100644
--- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
@@ -63,8 +63,8 @@ START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
SOURCEPATH ..\res
// Source Color-depth Source-bitmap-list
-// c denotes whether the bitmap is a colour bitmap and the digits represent the
-// colour-depth of the bitmap and the bitmap mask respectively
+// c denotes whether the bitmap is a color bitmap and the digits represent the
+// color-depth of the bitmap and the bitmap mask respectively
SOURCE c24 ScummSmall.bmp
SOURCE 8 ScummSmallMask.bmp
SOURCE c24 ScummLarge.bmp
@@ -119,6 +119,7 @@ SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
+SOURCE backends\fs\symbian\symbian-fs.cpp
SOURCE backends\fs\symbian\symbian-fs-factory.cpp
SOURCE backends\platform\symbian\src\SymbianOS.cpp
SOURCE backends\platform\symbian\src\SymbianActions.cpp
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
index 3fab5cc2b7..f5bdaac237 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
@@ -64,8 +64,8 @@ START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
SOURCEPATH ..\res
// Source Color-depth Source-bitmap-list
-// c denotes whether the bitmap is a colour bitmap and the digits represent the
-// colour-depth of the bitmap and the bitmap mask respectively
+// c denotes whether the bitmap is a color bitmap and the digits represent the
+// color-depth of the bitmap and the bitmap mask respectively
SOURCE c24 ScummSmall.bmp
SOURCE 8 ScummSmallMask.bmp
SOURCE c24 ScummLarge.bmp
@@ -117,6 +117,7 @@ SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
+SOURCE backends\fs\symbian\symbian-fs.cpp
SOURCE backends\fs\symbian\symbian-fs-factory.cpp
SOURCE backends\platform\symbian\src\SymbianOS.cpp
SOURCE backends\platform\symbian\src\SymbianActions.cpp
diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
index 31dfc36399..2354161e47 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
@@ -64,8 +64,8 @@ START BITMAP ScummVM.mbm
TARGETPATH \Resource\Apps
SOURCEPATH ..\res
// Source Color-depth Source-bitmap-list
-// c denotes whether the bitmap is a colour bitmap and the digits represent the
-// colour-depth of the bitmap and the bitmap mask respectively
+// c denotes whether the bitmap is a color bitmap and the digits represent the
+// color-depth of the bitmap and the bitmap mask respectively
SOURCE c24 ScummSmall.bmp
SOURCE 8 ScummSmallMask.bmp
SOURCE c24 ScummLarge.bmp
@@ -117,6 +117,7 @@ SOURCE backends\platform\sdl\hardwarekeys.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\audiocd\sdl\sdl-audiocd.cpp
SOURCE backends\audiocd\default\default-audiocd.cpp
+SOURCE backends\fs\symbian\symbian-fs.cpp
SOURCE backends\fs\symbian\symbian-fs-factory.cpp
SOURCE backends\platform\symbian\src\SymbianOS.cpp
SOURCE backends\platform\symbian\src\SymbianActions.cpp
diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in
index b3bfbab530..2b74bca42b 100644
--- a/backends/platform/symbian/mmp/scummvm_base.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in
@@ -96,11 +96,11 @@ SOURCEPATH ..\..\..\..\gui
//SOURCE Actions.cpp
SOURCEPATH ..\..\..\..\audio
-//START_AUTO_OBJECTS_SOUND_//
+//START_AUTO_OBJECTS_AUDIO_//
// empty base file, will be updated by Perl build scripts
-//STOP_AUTO_OBJECTS_SOUND_//
+//STOP_AUTO_OBJECTS_AUDIO_//
SOURCE softsynth\fmtowns_pc98\towns_pc98_fmsynth.cpp // Included since its excluded by filter
#if defined (WINS)
diff --git a/backends/platform/symbian/mmp/scummvm_tsage.mmp.in b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
new file mode 100644
index 0000000000..8265d9e772
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
@@ -0,0 +1,64 @@
+/* ScummVM - Graphic Adventure Engine
+ * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
+ * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
+ * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
+ * Copyright (C) 2005-2011 The ScummVM project
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+//
+// EPOC MMP makefile project for ScummVM
+//
+
+// *** Definitions
+
+TARGET scummvm_tsage.lib
+TARGETTYPE lib
+OPTION MSVC /QIfist /Ob1 /Oy /GF // /QIfist disables use of __ftol2 to avoid linker probs with MS libc: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcrefQIfistSuppress_ftol.asp
+OPTION GCC -Wno-multichar -Wno-reorder // don't optimize for ARM, platform way too sensitive for that :( just turn off some common warnings
+OPTION GCCE -Wno-multichar -Wno-reorder -Wno-unused -Wno-format -fsigned-char
+ALWAYS_BUILD_AS_ARM
+
+//START_AUTO_MACROS_SLAVE//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_MACROS_SLAVE//
+
+// *** SOURCE files
+
+SOURCEPATH ..\..\..\..\engines\tsage
+
+//START_AUTO_OBJECTS_TSAGE_//
+
+ // empty base file, will be updated by Perl build scripts
+
+//STOP_AUTO_OBJECTS_TSAGE_//
+
+// *** Include paths
+
+USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\.. ..\..\..\..\common ..\..\..\..\gui ..\..\..\..\audio ..\src
+SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h
index 1c5de2d43c..e8a620475e 100644
--- a/backends/platform/symbian/src/portdefs.h
+++ b/backends/platform/symbian/src/portdefs.h
@@ -35,6 +35,11 @@
#include <e32std.h>
#include <math.h>
+/* define pi */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif /* M_PI */
+
#define DISABLE_COMMAND_LINE
#if defined(USE_TREMOR) && !defined(USE_VORBIS)
diff --git a/backends/platform/symbian/src/vsnprintf.h b/backends/platform/symbian/src/vsnprintf.h
index 5a9c836ea3..6e75719d55 100644
--- a/backends/platform/symbian/src/vsnprintf.h
+++ b/backends/platform/symbian/src/vsnprintf.h
@@ -1,8 +1,11 @@
/*
- * This is the vsnprintf for scummvm/symbian implementation from the original snprintf.c,
- * all support functions has been removed and vsnprintf renamed to symbian_vsnprintf
+ * This is the vsnprintf for scummvm/symbian implementation from the original
+ * snprintf.c, all support functions has been removed and vsnprintf renamed to
+ * symbian_vsnprintf
+ * According to the homepage this function may be licensed under either the
+ * Frontier Artistic License or the GPL.
+ *
* snprintf.c - a portable implementation of snprintf
- * According to the homepage this function could be licensed as either Frontier Aritistic or GPL.
*
* AUTHOR
* Mark Martinec <mark.martinec@ijs.si>, April 1999.
@@ -244,13 +247,14 @@ int symbian_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) {
/* if (str_l < str_m) str[str_l++] = *p++; -- this would be sufficient */
/* but the following code achieves better performance for cases
* where format string is long and contains few conversions */
- const char *q = strchr(p+1,'%');
- size_t n = !q ? strlen(p) : (q-p);
+ const char *q = strchr(p + 1, '%');
+ size_t n = !q ? strlen(p) : (q - p);
if (str_l < str_m) {
- size_t avail = str_m-str_l;
- fast_memcpy(str+str_l, p, (n>avail?avail:n));
+ size_t avail = str_m - str_l;
+ fast_memcpy(str + str_l, p, (n > avail ? avail : n));
}
- p += n; str_l += n;
+ p += n;
+ str_l += n;
} else {
const char *starting_p;
size_t min_field_width = 0, precision = 0;
@@ -262,398 +266,453 @@ int symbian_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap) {
char tmp[32];/* temporary buffer for simple numeric->string conversion */
const char *str_arg; /* string address in case of string argument */
- size_t str_arg_l; /* natural field width of arg without padding
+ size_t str_arg_l; /* natural field width of arg without padding
and sign */
- unsigned char uchar_arg;
- /* unsigned char argument value - only defined for c conversion.
- N.B. standard explicitly states the char argument for
- the c conversion is unsigned */
+ unsigned char uchar_arg;
+ /* unsigned char argument value - only defined for c conversion.
+ N.B. standard explicitly states the char argument for
+ the c conversion is unsigned */
- size_t number_of_zeros_to_pad = 0;
- /* number of zeros to be inserted for numeric conversions
- as required by the precision or minimal field width */
+ size_t number_of_zeros_to_pad = 0;
+ /* number of zeros to be inserted for numeric conversions
+ as required by the precision or minimal field width */
- size_t zero_padding_insertion_ind = 0;
- /* index into tmp where zero padding is to be inserted */
+ size_t zero_padding_insertion_ind = 0;
+ /* index into tmp where zero padding is to be inserted */
- char fmt_spec = '\0';
- /* current conversion specifier character */
+ char fmt_spec = '\0';
+ /* current conversion specifier character */
- str_arg = credits;/* just to make compiler happy (defined but not used)*/
- str_arg = NULL;
- starting_p = p; p++; /* skip '%' */
- /* parse flags */
- while (*p == '0' || *p == '-' || *p == '+' ||
- *p == ' ' || *p == '#' || *p == '\'') {
- switch (*p) {
- case '0': zero_padding = 1; break;
- case '-': justify_left = 1; break;
- case '+': force_sign = 1; space_for_positive = 0; break;
- case ' ': force_sign = 1;
- /* If both the ' ' and '+' flags appear, the ' ' flag should be ignored */
- break;
- case '#': alternate_form = 1; break;
- case '\'': break;
- }
- p++;
- }
- /* If the '0' and '-' flags both appear, the '0' flag should be ignored. */
+ str_arg = credits;/* just to make compiler happy (defined but not used)*/
+ str_arg = NULL;
+ starting_p = p;
+ p++; /* skip '%' */
+ /* parse flags */
+ while (*p == '0' || *p == '-' || *p == '+' ||
+ *p == ' ' || *p == '#' || *p == '\'') {
+ switch (*p) {
+ case '0':
+ zero_padding = 1;
+ break;
+ case '-':
+ justify_left = 1;
+ break;
+ case '+':
+ force_sign = 1;
+ space_for_positive = 0;
+ break;
+ case ' ':
+ force_sign = 1;
+ /* If both the ' ' and '+' flags appear, the ' ' flag should be ignored */
+ break;
+ case '#':
+ alternate_form = 1;
+ break;
+ case '\'':
+ break;
+ }
+ p++;
+ }
+ /* If the '0' and '-' flags both appear, the '0' flag should be ignored. */
- /* parse field width */
- if (*p == '*') {
- int j;
- p++; j = va_arg(ap, int);
- if (j >= 0) min_field_width = j;
- else { min_field_width = -j; justify_left = 1; }
- } else if (isdigit((int)(*p))) {
- /* size_t could be wider than unsigned int;
- make sure we treat argument like common implementations do */
- unsigned int uj = *p++ - '0';
- while (isdigit((int)(*p))) uj = 10*uj + (unsigned int)(*p++ - '0');
- min_field_width = uj;
- }
- /* parse precision */
- if (*p == '.') {
- p++; precision_specified = 1;
- if (*p == '*') {
- int j = va_arg(ap, int);
- p++;
- if (j >= 0) precision = j;
- else {
- precision_specified = 0; precision = 0;
- /* NOTE:
- * Solaris 2.6 man page claims that in this case the precision
- * should be set to 0. Digital Unix 4.0, HPUX 10 and BSD man page
- * claim that this case should be treated as unspecified precision,
- * which is what we do here.
- */
- }
- } else if (isdigit((int)(*p))) {
- /* size_t could be wider than unsigned int;
- make sure we treat argument like common implementations do */
- unsigned int uj = *p++ - '0';
- while (isdigit((int)(*p))) uj = 10*uj + (unsigned int)(*p++ - '0');
- precision = uj;
- }
- }
- /* parse 'h', 'l' and 'll' length modifiers */
- if (*p == 'h' || *p == 'l') {
- length_modifier = *p; p++;
- if (length_modifier == 'l' && *p == 'l') { /* double l = long long */
+ /* parse field width */
+ if (*p == '*') {
+ int j;
+ p++;
+ j = va_arg(ap, int);
+ if (j >= 0) min_field_width = j;
+ else { min_field_width = -j; justify_left = 1; }
+ } else if (isdigit((int)(*p))) {
+ /* size_t could be wider than unsigned int;
+ make sure we treat argument like common implementations do */
+ unsigned int uj = *p++ - '0';
+ while (isdigit((int)(*p))) uj = 10 * uj + (unsigned int)(*p++ - '0');
+ min_field_width = uj;
+ }
+ /* parse precision */
+ if (*p == '.') {
+ p++;
+ precision_specified = 1;
+ if (*p == '*') {
+ int j = va_arg(ap, int);
+ p++;
+ if (j >= 0) precision = j;
+ else {
+ precision_specified = 0;
+ precision = 0;
+ /* NOTE:
+ * Solaris 2.6 man page claims that in this case the precision
+ * should be set to 0. Digital Unix 4.0, HPUX 10 and BSD man page
+ * claim that this case should be treated as unspecified precision,
+ * which is what we do here.
+ */
+ }
+ } else if (isdigit((int)(*p))) {
+ /* size_t could be wider than unsigned int;
+ make sure we treat argument like common implementations do */
+ unsigned int uj = *p++ - '0';
+ while (isdigit((int)(*p))) uj = 10 * uj + (unsigned int)(*p++ - '0');
+ precision = uj;
+ }
+ }
+ /* parse 'h', 'l' and 'll' length modifiers */
+ if (*p == 'h' || *p == 'l') {
+ length_modifier = *p;
+ p++;
+ if (length_modifier == 'l' && *p == 'l') { /* double l = long long */
#ifdef SNPRINTF_LONGLONG_SUPPORT
- length_modifier = '2'; /* double l encoded as '2' */
+ length_modifier = '2'; /* double l encoded as '2' */
#else
- length_modifier = 'l'; /* treat it as a single 'l' */
+ length_modifier = 'l'; /* treat it as a single 'l' */
#endif
- p++;
- }
- }
- fmt_spec = *p;
- /* common synonyms: */
- switch (fmt_spec) {
- case 'i': fmt_spec = 'd'; break;
- case 'D': fmt_spec = 'd'; length_modifier = 'l'; break;
- case 'U': fmt_spec = 'u'; length_modifier = 'l'; break;
- case 'O': fmt_spec = 'o'; length_modifier = 'l'; break;
- default: break;
- }
- /* get parameter value, do initial processing */
- switch (fmt_spec) {
- case '%': /* % behaves similar to 's' regarding flags and field widths */
- case 'c': /* c behaves similar to 's' regarding flags and field widths */
- case 's':
- length_modifier = '\0'; /* wint_t and wchar_t not supported */
- /* the result of zero padding flag with non-numeric conversion specifier*/
- /* is undefined. Solaris and HPUX 10 does zero padding in this case, */
- /* Digital Unix and Linux does not. */
- zero_padding = 0; /* turn zero padding off for string conversions */
- str_arg_l = 1;
- switch (fmt_spec) {
- case '%':
- str_arg = p; break;
- case 'c': {
- int j = va_arg(ap, int);
- uchar_arg = (unsigned char) j; /* standard demands unsigned char */
- str_arg = (const char *) &uchar_arg;
- break;
- }
- case 's':
- str_arg = va_arg(ap, const char *);
- if (!str_arg) str_arg_l = 0;
- /* make sure not to address string beyond the specified precision !!! */
- else if (!precision_specified) str_arg_l = strlen(str_arg);
- /* truncate string if necessary as requested by precision */
- else if (precision == 0) str_arg_l = 0;
- else {
- /* memchr on HP does not like n > 2^31 !!! */
- const char *q = (const char*) memchr(str_arg, '\0',
- precision <= 0x7fffffff ? precision : 0x7fffffff);
- str_arg_l = !q ? precision : (q-str_arg);
- }
- break;
- default: break;
- }
- break;
- case 'd': case 'u': case 'o': case 'x': case 'X': case 'p': {
- /* NOTE: the u, o, x, X and p conversion specifiers imply
- the value is unsigned; d implies a signed value */
+ p++;
+ }
+ }
+ fmt_spec = *p;
+ /* common synonyms: */
+ switch (fmt_spec) {
+ case 'i':
+ fmt_spec = 'd';
+ break;
+ case 'D':
+ fmt_spec = 'd';
+ length_modifier = 'l';
+ break;
+ case 'U':
+ fmt_spec = 'u';
+ length_modifier = 'l';
+ break;
+ case 'O':
+ fmt_spec = 'o';
+ length_modifier = 'l';
+ break;
+ default:
+ break;
+ }
+ /* get parameter value, do initial processing */
+ switch (fmt_spec) {
+ case '%': /* % behaves similar to 's' regarding flags and field widths */
+ case 'c': /* c behaves similar to 's' regarding flags and field widths */
+ case 's':
+ length_modifier = '\0'; /* wint_t and wchar_t not supported */
+ /* the result of zero padding flag with non-numeric conversion specifier*/
+ /* is undefined. Solaris and HPUX 10 does zero padding in this case, */
+ /* Digital Unix and Linux does not. */
+ zero_padding = 0; /* turn zero padding off for string conversions */
+ str_arg_l = 1;
+ switch (fmt_spec) {
+ case '%':
+ str_arg = p;
+ break;
+ case 'c': {
+ int j = va_arg(ap, int);
+ uchar_arg = (unsigned char) j; /* standard demands unsigned char */
+ str_arg = (const char *) & uchar_arg;
+ break;
+ }
+ case 's':
+ str_arg = va_arg(ap, const char *);
+ if (!str_arg) str_arg_l = 0;
+ /* make sure not to address string beyond the specified precision !!! */
+ else if (!precision_specified) str_arg_l = strlen(str_arg);
+ /* truncate string if necessary as requested by precision */
+ else if (precision == 0) str_arg_l = 0;
+ else {
+ /* memchr on HP does not like n > 2^31 !!! */
+ const char *q = (const char*) memchr(str_arg, '\0',
+ precision <= 0x7fffffff ? precision : 0x7fffffff);
+ str_arg_l = !q ? precision : (q - str_arg);
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+ case 'd':
+ case 'u':
+ case 'o':
+ case 'x':
+ case 'X':
+ case 'p': {
+ /* NOTE: the u, o, x, X and p conversion specifiers imply
+ the value is unsigned; d implies a signed value */
- int arg_sign = 0;
- /* 0 if numeric argument is zero (or if pointer is NULL for 'p'),
- +1 if greater than zero (or nonzero for unsigned arguments),
- -1 if negative (unsigned argument is never negative) */
+ int arg_sign = 0;
+ /* 0 if numeric argument is zero (or if pointer is NULL for 'p'),
+ +1 if greater than zero (or nonzero for unsigned arguments),
+ -1 if negative (unsigned argument is never negative) */
- int int_arg = 0; unsigned int uint_arg = 0;
- /* only defined for length modifier h, or for no length modifiers */
+ int int_arg = 0;
+ unsigned int uint_arg = 0;
+ /* only defined for length modifier h, or for no length modifiers */
- long int long_arg = 0; unsigned long int ulong_arg = 0;
- /* only defined for length modifier l */
+ long int long_arg = 0;
+ unsigned long int ulong_arg = 0;
+ /* only defined for length modifier l */
- void *ptr_arg = NULL;
- /* pointer argument value -only defined for p conversion */
+ void *ptr_arg = NULL;
+ /* pointer argument value -only defined for p conversion */
#ifdef SNPRINTF_LONGLONG_SUPPORT
- long long int long_long_arg = 0;
- unsigned long long int ulong_long_arg = 0;
- /* only defined for length modifier ll */
+ long long int long_long_arg = 0;
+ unsigned long long int ulong_long_arg = 0;
+ /* only defined for length modifier ll */
#endif
- if (fmt_spec == 'p') {
- /* HPUX 10: An l, h, ll or L before any other conversion character
- * (other than d, i, u, o, x, or X) is ignored.
- * Digital Unix:
- * not specified, but seems to behave as HPUX does.
- * Solaris: If an h, l, or L appears before any other conversion
- * specifier (other than d, i, u, o, x, or X), the behavior
- * is undefined. (Actually %hp converts only 16-bits of address
- * and %llp treats address as 64-bit data which is incompatible
- * with (void *) argument on a 32-bit system).
- */
- length_modifier = '\0';
- ptr_arg = va_arg(ap, void *);
- if (ptr_arg != NULL) arg_sign = 1;
- } else if (fmt_spec == 'd') { /* signed */
- switch (length_modifier) {
- case '\0':
- case 'h':
- /* It is non-portable to specify a second argument of char or short
- * to va_arg, because arguments seen by the called function
- * are not char or short. C converts char and short arguments
- * to int before passing them to a function.
- */
- int_arg = va_arg(ap, int);
- if (int_arg > 0) arg_sign = 1;
- else if (int_arg < 0) arg_sign = -1;
- break;
- case 'l':
- long_arg = va_arg(ap, long int);
- if (long_arg > 0) arg_sign = 1;
- else if (long_arg < 0) arg_sign = -1;
- break;
+ if (fmt_spec == 'p') {
+ /* HPUX 10: An l, h, ll or L before any other conversion character
+ * (other than d, i, u, o, x, or X) is ignored.
+ * Digital Unix:
+ * not specified, but seems to behave as HPUX does.
+ * Solaris: If an h, l, or L appears before any other conversion
+ * specifier (other than d, i, u, o, x, or X), the behavior
+ * is undefined. (Actually %hp converts only 16-bits of address
+ * and %llp treats address as 64-bit data which is incompatible
+ * with (void *) argument on a 32-bit system).
+ */
+ length_modifier = '\0';
+ ptr_arg = va_arg(ap, void *);
+ if (ptr_arg != NULL) arg_sign = 1;
+ } else if (fmt_spec == 'd') { /* signed */
+ switch (length_modifier) {
+ case '\0':
+ case 'h':
+ /* It is non-portable to specify a second argument of char or short
+ * to va_arg, because arguments seen by the called function
+ * are not char or short. C converts char and short arguments
+ * to int before passing them to a function.
+ */
+ int_arg = va_arg(ap, int);
+ if (int_arg > 0) arg_sign = 1;
+ else if (int_arg < 0) arg_sign = -1;
+ break;
+ case 'l':
+ long_arg = va_arg(ap, long int);
+ if (long_arg > 0) arg_sign = 1;
+ else if (long_arg < 0) arg_sign = -1;
+ break;
#ifdef SNPRINTF_LONGLONG_SUPPORT
- case '2':
- long_long_arg = va_arg(ap, long long int);
- if (long_long_arg > 0) arg_sign = 1;
- else if (long_long_arg < 0) arg_sign = -1;
- break;
+ case '2':
+ long_long_arg = va_arg(ap, long long int);
+ if (long_long_arg > 0) arg_sign = 1;
+ else if (long_long_arg < 0) arg_sign = -1;
+ break;
#endif
- }
- } else { /* unsigned */
- switch (length_modifier) {
- case '\0':
- case 'h':
- uint_arg = va_arg(ap, unsigned int);
- if (uint_arg) arg_sign = 1;
- break;
- case 'l':
- ulong_arg = va_arg(ap, unsigned long int);
- if (ulong_arg) arg_sign = 1;
- break;
+ }
+ } else { /* unsigned */
+ switch (length_modifier) {
+ case '\0':
+ case 'h':
+ uint_arg = va_arg(ap, unsigned int);
+ if (uint_arg) arg_sign = 1;
+ break;
+ case 'l':
+ ulong_arg = va_arg(ap, unsigned long int);
+ if (ulong_arg) arg_sign = 1;
+ break;
#ifdef SNPRINTF_LONGLONG_SUPPORT
- case '2':
- ulong_long_arg = va_arg(ap, unsigned long long int);
- if (ulong_long_arg) arg_sign = 1;
- break;
+ case '2':
+ ulong_long_arg = va_arg(ap, unsigned long long int);
+ if (ulong_long_arg) arg_sign = 1;
+ break;
#endif
- }
- }
- str_arg = tmp; str_arg_l = 0;
- /* NOTE:
- * For d, i, u, o, x, and X conversions, if precision is specified,
- * the '0' flag should be ignored. This is so with Solaris 2.6,
- * Digital UNIX 4.0, HPUX 10, Linux, FreeBSD, NetBSD; but not with Perl.
- */
- if (precision_specified) zero_padding = 0;
- if (fmt_spec == 'd') {
- if (force_sign && arg_sign >= 0)
- tmp[str_arg_l++] = space_for_positive ? ' ' : '+';
- /* leave negative numbers for sprintf to handle,
- to avoid handling tricky cases like (short int)(-32768) */
- } else if (alternate_form) {
- if (arg_sign != 0 && (fmt_spec == 'x' || fmt_spec == 'X') )
- { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = fmt_spec; }
- /* alternate form should have no effect for p conversion, but ... */
- }
- zero_padding_insertion_ind = str_arg_l;
- if (!precision_specified) precision = 1; /* default precision is 1 */
- if (precision == 0 && arg_sign == 0
- ) {
- /* converted to null string */
- /* When zero value is formatted with an explicit precision 0,
- the resulting formatted string is empty (d, i, u, o, x, X, p). */
- } else {
- char f[5]; int f_l = 0;
- f[f_l++] = '%'; /* construct a simple format string for sprintf */
- if (!length_modifier) { }
- else if (length_modifier=='2') { f[f_l++] = 'l'; f[f_l++] = 'l'; }
- else f[f_l++] = length_modifier;
- f[f_l++] = fmt_spec; f[f_l++] = '\0';
- if (fmt_spec == 'p') str_arg_l += sprintf(tmp+str_arg_l, f, ptr_arg);
- else if (fmt_spec == 'd') { /* signed */
- switch (length_modifier) {
- case '\0':
- case 'h': str_arg_l+=sprintf(tmp+str_arg_l, f, int_arg); break;
- case 'l': str_arg_l+=sprintf(tmp+str_arg_l, f, long_arg); break;
+ }
+ }
+ str_arg = tmp;
+ str_arg_l = 0;
+ /* NOTE:
+ * For d, i, u, o, x, and X conversions, if precision is specified,
+ * the '0' flag should be ignored. This is so with Solaris 2.6,
+ * Digital UNIX 4.0, HPUX 10, Linux, FreeBSD, NetBSD; but not with Perl.
+ */
+ if (precision_specified) zero_padding = 0;
+ if (fmt_spec == 'd') {
+ if (force_sign && arg_sign >= 0)
+ tmp[str_arg_l++] = space_for_positive ? ' ' : '+';
+ /* leave negative numbers for sprintf to handle,
+ to avoid handling tricky cases like (short int)(-32768) */
+ } else if (alternate_form) {
+ if (arg_sign != 0 && (fmt_spec == 'x' || fmt_spec == 'X'))
+ { tmp[str_arg_l++] = '0'; tmp[str_arg_l++] = fmt_spec; }
+ /* alternate form should have no effect for p conversion, but ... */
+ }
+ zero_padding_insertion_ind = str_arg_l;
+ if (!precision_specified) precision = 1; /* default precision is 1 */
+ if (precision == 0 && arg_sign == 0
+ ) {
+ /* converted to null string */
+ /* When zero value is formatted with an explicit precision 0,
+ the resulting formatted string is empty (d, i, u, o, x, X, p). */
+ } else {
+ char f[5];
+ int f_l = 0;
+ f[f_l++] = '%'; /* construct a simple format string for sprintf */
+ if (!length_modifier) { } else if (length_modifier == '2') { f[f_l++] = 'l'; f[f_l++] = 'l'; } else f[f_l++] = length_modifier;
+ f[f_l++] = fmt_spec;
+ f[f_l++] = '\0';
+ if (fmt_spec == 'p') str_arg_l += sprintf(tmp + str_arg_l, f, ptr_arg);
+ else if (fmt_spec == 'd') { /* signed */
+ switch (length_modifier) {
+ case '\0':
+ case 'h':
+ str_arg_l += sprintf(tmp + str_arg_l, f, int_arg);
+ break;
+ case 'l':
+ str_arg_l += sprintf(tmp + str_arg_l, f, long_arg);
+ break;
#ifdef SNPRINTF_LONGLONG_SUPPORT
- case '2': str_arg_l+=sprintf(tmp+str_arg_l,f,long_long_arg); break;
+ case '2':
+ str_arg_l += sprintf(tmp + str_arg_l, f, long_long_arg);
+ break;
#endif
- }
- } else { /* unsigned */
- switch (length_modifier) {
- case '\0':
- case 'h': str_arg_l+=sprintf(tmp+str_arg_l, f, uint_arg); break;
- case 'l': str_arg_l+=sprintf(tmp+str_arg_l, f, ulong_arg); break;
+ }
+ } else { /* unsigned */
+ switch (length_modifier) {
+ case '\0':
+ case 'h':
+ str_arg_l += sprintf(tmp + str_arg_l, f, uint_arg);
+ break;
+ case 'l':
+ str_arg_l += sprintf(tmp + str_arg_l, f, ulong_arg);
+ break;
#ifdef SNPRINTF_LONGLONG_SUPPORT
- case '2': str_arg_l+=sprintf(tmp+str_arg_l,f,ulong_long_arg);break;
+ case '2':
+ str_arg_l += sprintf(tmp + str_arg_l, f, ulong_long_arg);
+ break;
#endif
- }
- }
- /* include the optional minus sign and possible "0x"
- in the region before the zero padding insertion point */
- if (zero_padding_insertion_ind < str_arg_l &&
- tmp[zero_padding_insertion_ind] == '-') {
- zero_padding_insertion_ind++;
- }
- if (zero_padding_insertion_ind+1 < str_arg_l &&
- tmp[zero_padding_insertion_ind] == '0' &&
- (tmp[zero_padding_insertion_ind+1] == 'x' ||
- tmp[zero_padding_insertion_ind+1] == 'X') ) {
- zero_padding_insertion_ind += 2;
- }
- }
- { size_t num_of_digits = str_arg_l - zero_padding_insertion_ind;
- if (alternate_form && fmt_spec == 'o'
- /* unless zero is already the first character */
- && !(zero_padding_insertion_ind < str_arg_l
- && tmp[zero_padding_insertion_ind] == '0')
- ) { /* assure leading zero for alternate-form octal numbers */
- if (!precision_specified || precision < num_of_digits+1) {
- /* precision is increased to force the first character to be zero,
- except if a zero value is formatted with an explicit precision
- of zero */
- precision = num_of_digits+1; precision_specified = 1;
- }
- }
- /* zero padding to specified precision? */
- if (num_of_digits < precision)
- number_of_zeros_to_pad = precision - num_of_digits;
- }
- /* zero padding to specified minimal field width? */
- if (!justify_left && zero_padding) {
- int n = min_field_width - (str_arg_l+number_of_zeros_to_pad);
- if (n > 0) number_of_zeros_to_pad += n;
- }
- break;
- }
- default: /* unrecognized conversion specifier, keep format string as-is*/
- zero_padding = 0; /* turn zero padding off for non-numeric convers. */
- justify_left = 1; min_field_width = 0; /* reset flags */
- /* discard the unrecognized conversion, just keep *
- * the unrecognized conversion character */
- str_arg = p; str_arg_l = 0;
- if (*p) str_arg_l++; /* include invalid conversion specifier unchanged
+ }
+ }
+ /* include the optional minus sign and possible "0x"
+ in the region before the zero padding insertion point */
+ if (zero_padding_insertion_ind < str_arg_l &&
+ tmp[zero_padding_insertion_ind] == '-') {
+ zero_padding_insertion_ind++;
+ }
+ if (zero_padding_insertion_ind + 1 < str_arg_l &&
+ tmp[zero_padding_insertion_ind] == '0' &&
+ (tmp[zero_padding_insertion_ind+1] == 'x' ||
+ tmp[zero_padding_insertion_ind+1] == 'X')) {
+ zero_padding_insertion_ind += 2;
+ }
+ }
+ {
+ size_t num_of_digits = str_arg_l - zero_padding_insertion_ind;
+ if (alternate_form && fmt_spec == 'o'
+ /* unless zero is already the first character */
+ && !(zero_padding_insertion_ind < str_arg_l
+ && tmp[zero_padding_insertion_ind] == '0')
+ ) { /* assure leading zero for alternate-form octal numbers */
+ if (!precision_specified || precision < num_of_digits + 1) {
+ /* precision is increased to force the first character to be zero,
+ except if a zero value is formatted with an explicit precision
+ of zero */
+ precision = num_of_digits + 1;
+ precision_specified = 1;
+ }
+ }
+ /* zero padding to specified precision? */
+ if (num_of_digits < precision)
+ number_of_zeros_to_pad = precision - num_of_digits;
+ }
+ /* zero padding to specified minimal field width? */
+ if (!justify_left && zero_padding) {
+ int n = min_field_width - (str_arg_l + number_of_zeros_to_pad);
+ if (n > 0) number_of_zeros_to_pad += n;
+ }
+ break;
+ }
+ default: /* unrecognized conversion specifier, keep format string as-is*/
+ zero_padding = 0; /* turn zero padding off for non-numeric convers. */
+ justify_left = 1;
+ min_field_width = 0; /* reset flags */
+ /* discard the unrecognized conversion, just keep *
+ * the unrecognized conversion character */
+ str_arg = p;
+ str_arg_l = 0;
+ if (*p) str_arg_l++; /* include invalid conversion specifier unchanged
if not at end-of-string */
- break;
- }
- if (*p) p++; /* step over the just processed conversion specifier */
- /* insert padding to the left as requested by min_field_width;
- this does not include the zero padding in case of numerical conversions*/
- if (!justify_left) { /* left padding with blank or zero */
- int n = min_field_width - (str_arg_l+number_of_zeros_to_pad);
- if (n > 0) {
- if (str_l < str_m) {
- size_t avail = str_m-str_l;
- fast_memset(str+str_l, (zero_padding?'0':' '), (n>avail?avail:n));
- }
- str_l += n;
- }
- }
- /* zero padding as requested by the precision or by the minimal field width
- * for numeric conversions required? */
- if (number_of_zeros_to_pad <= 0) {
- /* will not copy first part of numeric right now, *
- * force it to be copied later in its entirety */
- zero_padding_insertion_ind = 0;
- } else {
- /* insert first part of numerics (sign or '0x') before zero padding */
- int n = zero_padding_insertion_ind;
- if (n > 0) {
- if (str_l < str_m) {
- size_t avail = str_m-str_l;
- fast_memcpy(str+str_l, str_arg, (n>avail?avail:n));
- }
- str_l += n;
- }
- /* insert zero padding as requested by the precision or min field width */
- n = number_of_zeros_to_pad;
- if (n > 0) {
- if (str_l < str_m) {
- size_t avail = str_m-str_l;
- fast_memset(str+str_l, '0', (n>avail?avail:n));
- }
- str_l += n;
- }
- }
- /* insert formatted string
- * (or as-is conversion specifier for unknown conversions) */
- { int n = str_arg_l - zero_padding_insertion_ind;
- if (n > 0) {
- if (str_l < str_m) {
- size_t avail = str_m-str_l;
- fast_memcpy(str+str_l, str_arg+zero_padding_insertion_ind,
- (n>avail?avail:n));
- }
- str_l += n;
- }
- }
- /* insert right padding */
- if (justify_left) { /* right blank padding to the field width */
- int n = min_field_width - (str_arg_l+number_of_zeros_to_pad);
- if (n > 0) {
- if (str_l < str_m) {
- size_t avail = str_m-str_l;
- fast_memset(str+str_l, ' ', (n>avail?avail:n));
- }
- str_l += n;
- }
- }
- }
- }
- if (str_m > 0) { /* make sure the string is null-terminated
+ break;
+ }
+ if (*p) p++; /* step over the just processed conversion specifier */
+ /* insert padding to the left as requested by min_field_width;
+ this does not include the zero padding in case of numerical conversions*/
+ if (!justify_left) { /* left padding with blank or zero */
+ int n = min_field_width - (str_arg_l + number_of_zeros_to_pad);
+ if (n > 0) {
+ if (str_l < str_m) {
+ size_t avail = str_m - str_l;
+ fast_memset(str + str_l, (zero_padding ? '0' : ' '), (n > avail ? avail : n));
+ }
+ str_l += n;
+ }
+ }
+ /* zero padding as requested by the precision or by the minimal field width
+ * for numeric conversions required? */
+ if (number_of_zeros_to_pad <= 0) {
+ /* will not copy first part of numeric right now, *
+ * force it to be copied later in its entirety */
+ zero_padding_insertion_ind = 0;
+ } else {
+ /* insert first part of numerics (sign or '0x') before zero padding */
+ int n = zero_padding_insertion_ind;
+ if (n > 0) {
+ if (str_l < str_m) {
+ size_t avail = str_m - str_l;
+ fast_memcpy(str + str_l, str_arg, (n > avail ? avail : n));
+ }
+ str_l += n;
+ }
+ /* insert zero padding as requested by the precision or min field width */
+ n = number_of_zeros_to_pad;
+ if (n > 0) {
+ if (str_l < str_m) {
+ size_t avail = str_m - str_l;
+ fast_memset(str + str_l, '0', (n > avail ? avail : n));
+ }
+ str_l += n;
+ }
+ }
+ /* insert formatted string
+ * (or as-is conversion specifier for unknown conversions) */
+ {
+ int n = str_arg_l - zero_padding_insertion_ind;
+ if (n > 0) {
+ if (str_l < str_m) {
+ size_t avail = str_m - str_l;
+ fast_memcpy(str + str_l, str_arg + zero_padding_insertion_ind,
+ (n > avail ? avail : n));
+ }
+ str_l += n;
+ }
+ }
+ /* insert right padding */
+ if (justify_left) { /* right blank padding to the field width */
+ int n = min_field_width - (str_arg_l + number_of_zeros_to_pad);
+ if (n > 0) {
+ if (str_l < str_m) {
+ size_t avail = str_m - str_l;
+ fast_memset(str + str_l, ' ', (n > avail ? avail : n));
+ }
+ str_l += n;
+ }
+ }
+ }
+ }
+ if (str_m > 0) { /* make sure the string is null-terminated
even at the expense of overwriting the last character
(shouldn't happen, but just in case) */
- str[str_l <= str_m-1 ? str_l : str_m-1] = '\0';
- }
- /* Return the number of characters formatted (excluding trailing null
- * character), that is, the number of characters that would have been
- * written to the buffer if it were large enough.
- *
- * The value of str_l should be returned, but str_l is of unsigned type
- * size_t, and snprintf is int, possibly leading to an undetected
- * integer overflow, resulting in a negative return value, which is illegal.
- * Both XSH5 and ISO C99 (at least the draft) are silent on this issue.
- * Should errno be set to EOVERFLOW and EOF returned in this case???
- */
- return (int) str_l;
+ str[str_l <= str_m-1 ? str_l : str_m-1] = '\0';
+ }
+ /* Return the number of characters formatted (excluding trailing null
+ * character), that is, the number of characters that would have been
+ * written to the buffer if it were large enough.
+ *
+ * The value of str_l should be returned, but str_l is of unsigned type
+ * size_t, and snprintf is int, possibly leading to an undetected
+ * integer overflow, resulting in a negative return value, which is illegal.
+ * Both XSH5 and ISO C99 (at least the draft) are silent on this issue.
+ * Should errno be set to EOVERFLOW and EOF returned in this case???
+ */
+ return (int) str_l;
}
int symbian_snprintf(char *text, size_t maxlen, const char *fmt, ...) {
diff --git a/backends/platform/webos/main.cpp b/backends/platform/webos/main.cpp
index bbf55c6efd..eefdd30496 100644
--- a/backends/platform/webos/main.cpp
+++ b/backends/platform/webos/main.cpp
@@ -23,6 +23,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
#include "backends/platform/webos/webos.h"
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
index 885c9eb90e..37223ac56c 100644
--- a/backends/platform/webos/webos.mk
+++ b/backends/platform/webos/webos.mk
@@ -1,23 +1,96 @@
# WebOS specific build targets
+# ============================================================================
+#
+# Build instructions:
+#
+# 1. Install the WebOS SDK and PDK and setup the environment variables
+# WEBOS_SDK and WEBOS_PDK accordingly.
+#
+# 2. Cross-compile zlib, flac, mad and tremor and install it into the PDK.
+#
+# 3. Prepare the ScummVM source for a webOS build:
+# $ ./configure --host=webos --enable-plugins --default-dynamic \
+# --enable-release
+#
+# 4. Create the package:
+# $ make package
+#
+# The package is now in the "portdist" folder.
+#
+# See http://wiki.scummvm.org/index.php/Compiling_ScummVM/WebOS for
+# more detailed build instructions.
+#
+#
+# Palm App catalog instructions:
+#
+# VER_PACKAGE must be set to a number which is higher than the currently
+# used package version in the app catalog. So when creating an updated
+# package for ScummVM 1.3.9 and the current ScummVM package in the app
+# catalog is version 1.3.0902 then you must specify VER_PACKAGE=3 to create
+# the ScummVM package with version 1.3.0903. Yeah, I know that's ugly but
+# WebOS package version numbers are restricted to three numeric components.
+#
+# As long as Palm doesn't support Team-maintained apps the uploaded packages
+# MUST NOT be packaged with the default "org.scummvm" base id. Instead apps
+# must be uploaded with a user-specific base id. A good practice is using
+# the github user as base id: com.github.<username>. It is also necessary
+# to use a user-specific app name when submitting the created package to the
+# Palm app catalog. Use "ScummVM (<username>)" instead of "ScummVM" and
+# "ScummVM Beta (<username>)" instead of "ScummVM Beta".
+#
+# The app id is automatically parsed from the installation prefix. So add a
+# configure parameter like this to prepare a build of a package for the Palm
+# App Catalog:
+#
+# --prefix=/media/cryptofs/apps/usr/palm/applications/com.github.kayahr.scummvm
+#
+# To build a package for the Palm Beta App Catalog add "-beta" to the prefix:
+#
+# --prefix=/media/cryptofs/apps/usr/palm/applications/com.github.kayahr.scummvm-beta
+# ============================================================================
+
+# Increment this number when the packaging of the app has been changed while
+# ScummVM itself has the same version as before. The number can be reset to
+# 1 when the ScummVM version is increased.
+VER_PACKAGE = 5
PATH_DIST = $(srcdir)/dists/webos
PATH_MOJO = $(PATH_DIST)/mojo
+APP_ID = $(shell basename $(prefix))
+APP_VERSION = $(shell printf "%d.%d.%02d%02d" $(VER_MAJOR) $(VER_MINOR) $(VER_PATCH) $(VER_PACKAGE))
+DESTDIR ?= staging
+PORTDISTDIR ?= portdist
+
+install: all
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(prefix)"
+ $(QUIET)$(INSTALL) -m 0644 -t "$(DESTDIR)$(prefix)/" "$(PATH_MOJO)/"*
+ $(QUIET)$(INSTALL) -m 0755 "$(PATH_MOJO)/start" "$(DESTDIR)$(prefix)/"
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(bindir)"
+ $(QUIET)$(INSTALL) -c -m 755 "./$(EXECUTABLE)" "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
+ $(QUIET)$(STRIP) "$(DESTDIR)$(bindir)/$(EXECUTABLE)"
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(docdir)"
+ $(QUIET)$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) "$(DESTDIR)$(docdir)"
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(datadir)"
+ $(QUIET)$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) "$(DESTDIR)$(datadir)/"
+ifdef DYNAMIC_MODULES
+ $(QUIET)$(INSTALL) -d "$(DESTDIR)$(libdir)/"
+ $(QUIET)$(INSTALL) -c -m 644 $(PLUGINS) "$(DESTDIR)$(libdir)/"
+ $(QUIET)$(STRIP) "$(DESTDIR)$(libdir)/"*
+endif
+ $(QUIET)sed -i s/'APP_VERSION'/'$(APP_VERSION)'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ $(QUIET)sed -i s/'APP_ID'/'$(APP_ID)'/ "$(DESTDIR)$(prefix)/appinfo.json"
+ifneq (,$(findstring -beta,$(APP_ID)))
+ $(QUIET)sed -i s/'APP_TITLE'/'ScummVM Beta'/ "$(DESTDIR)$(prefix)/appinfo.json"
+else
+ $(QUIET)sed -i s/'APP_TITLE'/'ScummVM'/ "$(DESTDIR)$(prefix)/appinfo.json"
+endif
-STAGING_DIR=STAGING/org.scummvm.scummvm
+uninstall:
+ $(QUIET)$(RM_REC) "$(DESTDIR)$(prefix)"
-webosrelease:
- rm -rf $(STAGING_DIR)
- rm -f *.ipk
- mkdir -p $(STAGING_DIR)
- mkdir -p $(STAGING_DIR)/bin
- mkdir -p $(STAGING_DIR)/lib
- mkdir -p $(STAGING_DIR)/share/scummvm
- cp -f $(PATH_MOJO)/* $(STAGING_DIR)
- cp -f gui/themes/translations.dat $(STAGING_DIR)/share/scummvm
- cp -f gui/themes/scummmodern.zip $(STAGING_DIR)/share/scummvm
- cp -f scummvm $(STAGING_DIR)/bin
- $(STRIP) $(STAGING_DIR)/bin/scummvm
- $(WEBOS_SDK)/bin/palm-package $(STAGING_DIR)
- rm -rf STAGING
+package: uninstall install
+ $(QUIET)$(RM_REC) "$(PORTDISTDIR)"
+ $(QUIET)$(MKDIR) "$(PORTDISTDIR)"
+ $(QUIET)$(WEBOS_SDK)/bin/palm-package --use-v1-format "$(DESTDIR)$(prefix)" -o "$(PORTDISTDIR)"
-.PHONY: webosrelease
+.PHONY: install uninstall package
diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp
index aa688534fc..3965f51b7f 100644
--- a/backends/platform/wii/main.cpp
+++ b/backends/platform/wii/main.cpp
@@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp
index 2aefe48f0c..401b19b0e1 100644
--- a/backends/platform/wii/osystem.cpp
+++ b/backends/platform/wii/osystem.cpp
@@ -19,6 +19,12 @@
* 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
+
#include <unistd.h>
#include <ogc/conf.h>
@@ -26,6 +32,7 @@
#include <ogc/lwp_watchdog.h>
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "backends/fs/wii/wii-fs-factory.h"
#include "osystem.h"
diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h
index 3c992b8bdc..0db5f92fff 100644
--- a/backends/platform/wii/osystem.h
+++ b/backends/platform/wii/osystem.h
@@ -24,7 +24,6 @@
#include <gctypes.h>
#include <gccore.h>
-#include <ogcsys.h>
#include <gxflux/gfx.h>
@@ -36,6 +35,7 @@
#include "backends/saves/default/default-saves.h"
#include "backends/timer/default/default-timer.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "audio/mixer_intern.h"
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index 5d0bca453f..8e51bbc673 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <unistd.h>
#include <malloc.h>
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index cb9a8c72e9..b44c1270f5 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <malloc.h>
#include <gxflux/gfx_con.h>
@@ -537,10 +539,10 @@ Graphics::Surface *OSystem_Wii::lockScreen() {
_surface.h = _gameHeight;
#ifdef USE_RGB_COLOR
_surface.pitch = _gameWidth * _pfGame.bytesPerPixel;
- _surface.bytesPerPixel = _pfGame.bytesPerPixel;
+ _surface.format = _pfGame;
#else
_surface.pitch = _gameWidth;
- _surface.bytesPerPixel = 1;
+ _surface.format = Graphics::PixelFormat::createFormatCLUT8();
#endif
return &_surface;
diff --git a/backends/platform/wii/osystem_sfx.cpp b/backends/platform/wii/osystem_sfx.cpp
index 33397f0a93..acab6df7e1 100644
--- a/backends/platform/wii/osystem_sfx.cpp
+++ b/backends/platform/wii/osystem_sfx.cpp
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <malloc.h>
#include "osystem.h"
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index b829686cb0..b54aebe6bd 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -33,6 +33,7 @@
#include "common/debug.h"
#include "common/events.h"
#include "common/util.h"
+#include "common/textconsole.h"
#include "common/timer.h"
#include "common/translation.h"
diff --git a/backends/plugins/dynamic-plugin.h b/backends/plugins/dynamic-plugin.h
index 32d411656c..775e887105 100644
--- a/backends/plugins/dynamic-plugin.h
+++ b/backends/plugins/dynamic-plugin.h
@@ -27,6 +27,7 @@
#define BACKENDS_PLUGINS_DYNAMICPLUGIN_H
#include "base/plugins.h"
+#include "common/textconsole.h"
class DynamicPlugin : public Plugin {
diff --git a/backends/plugins/elf/memory-manager.cpp b/backends/plugins/elf/memory-manager.cpp
index b2ac497771..d32ac2da28 100644
--- a/backends/plugins/elf/memory-manager.cpp
+++ b/backends/plugins/elf/memory-manager.cpp
@@ -28,6 +28,7 @@
#if defined(DYNAMIC_MODULES) && defined(USE_ELF_LOADER)
#include "backends/plugins/elf/memory-manager.h"
+#include "common/debug.h"
#include "common/util.h"
#include <malloc.h>
diff --git a/backends/plugins/sdl/sdl-provider.h b/backends/plugins/sdl/sdl-provider.h
index b546b028a2..350261a37f 100644
--- a/backends/plugins/sdl/sdl-provider.h
+++ b/backends/plugins/sdl/sdl-provider.h
@@ -35,6 +35,6 @@ protected:
Plugin* createPlugin(const Common::FSNode &node) const;
};
-#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
+#endif // defined(DYNAMIC_MODULES) && defined(SDL_BACKEND)
#endif
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 0e16f165b3..75e10cf810 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -60,7 +60,7 @@ void DefaultSaveFileManager::checkPath(const Common::FSNode &dir) {
Common::StringArray DefaultSaveFileManager::listSavefiles(const Common::String &pattern) {
Common::String savePathName = getSavePath();
checkPath(Common::FSNode(savePathName));
- if (getError() != Common::kNoError)
+ if (getError().getCode() != Common::kNoError)
return Common::StringArray();
// recreate FSNode since checkPath may have changed/created the directory
@@ -84,7 +84,7 @@ Common::InSaveFile *DefaultSaveFileManager::openForLoading(const Common::String
// Ensure that the savepath is valid. If not, generate an appropriate error.
Common::String savePathName = getSavePath();
checkPath(Common::FSNode(savePathName));
- if (getError() != Common::kNoError)
+ if (getError().getCode() != Common::kNoError)
return 0;
// recreate FSNode since checkPath may have changed/created the directory
@@ -104,7 +104,7 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String
// Ensure that the savepath is valid. If not, generate an appropriate error.
Common::String savePathName = getSavePath();
checkPath(Common::FSNode(savePathName));
- if (getError() != Common::kNoError)
+ if (getError().getCode() != Common::kNoError)
return 0;
// recreate FSNode since checkPath may have changed/created the directory
@@ -121,7 +121,7 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String
bool DefaultSaveFileManager::removeSavefile(const Common::String &filename) {
Common::String savePathName = getSavePath();
checkPath(Common::FSNode(savePathName));
- if (getError() != Common::kNoError)
+ if (getError().getCode() != Common::kNoError)
return false;
// recreate FSNode since checkPath may have changed/created the directory
diff --git a/backends/saves/posix/posix-saves.cpp b/backends/saves/posix/posix-saves.cpp
index 866cd912e5..3a8e5e998e 100644
--- a/backends/saves/posix/posix-saves.cpp
+++ b/backends/saves/posix/posix-saves.cpp
@@ -23,6 +23,11 @@
*
*/
+
+// Enable mkdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h //On IRIX, sys/stat.h includes sys/time.h
+
#include "common/scummsys.h"
#if defined(UNIX) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
@@ -31,6 +36,7 @@
#include "common/config-manager.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include <stdio.h>
#include <string.h>
diff --git a/backends/saves/psp/psp-saves.cpp b/backends/saves/psp/psp-saves.cpp
index 66c63dfdea..5752d2fa5f 100644
--- a/backends/saves/psp/psp-saves.cpp
+++ b/backends/saves/psp/psp-saves.cpp
@@ -23,6 +23,20 @@
*
*/
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "common/scummsys.h"
#ifdef __PSP__
diff --git a/backends/saves/savefile.cpp b/backends/saves/savefile.cpp
index 7b7d6b0c0c..9888146049 100644
--- a/backends/saves/savefile.cpp
+++ b/backends/saves/savefile.cpp
@@ -25,9 +25,7 @@
#include "common/util.h"
#include "common/savefile.h"
-
-#include <stdio.h>
-#include <string.h>
+#include "common/str.h"
namespace Common {
diff --git a/backends/timer/default/default-timer.h b/backends/timer/default/default-timer.h
index a4c7385ef9..9a353f58c3 100644
--- a/backends/timer/default/default-timer.h
+++ b/backends/timer/default/default-timer.h
@@ -28,8 +28,6 @@
#include "common/timer.h"
#include "common/mutex.h"
-class OSystem;
-
struct TimerSlot;
class DefaultTimerManager : public Common::TimerManager {
diff --git a/backends/timer/psp/timer.cpp b/backends/timer/psp/timer.cpp
index 746ff97197..9e36b43490 100644
--- a/backends/timer/psp/timer.cpp
+++ b/backends/timer/psp/timer.cpp
@@ -23,6 +23,20 @@
*
*/
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+// __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+// __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "common/scummsys.h"
#if defined (__PSP__)
diff --git a/backends/timer/sdl/sdl-timer.cpp b/backends/timer/sdl/sdl-timer.cpp
index 0a4cd428de..647ddba2d3 100644
--- a/backends/timer/sdl/sdl-timer.cpp
+++ b/backends/timer/sdl/sdl-timer.cpp
@@ -30,6 +30,8 @@
#include "backends/timer/sdl/sdl-timer.h"
+#include "common/textconsole.h"
+
static Uint32 timer_handler(Uint32 interval, void *param) {
((DefaultTimerManager *)param)->handler();
return interval;
diff --git a/backends/vkeybd/image-map.cpp b/backends/vkeybd/image-map.cpp
index b0a77b5220..f4b4541d7e 100644
--- a/backends/vkeybd/image-map.cpp
+++ b/backends/vkeybd/image-map.cpp
@@ -27,6 +27,8 @@
#ifdef ENABLE_VKEYBD
+#include "common/textconsole.h"
+
#include "backends/vkeybd/image-map.h"
#include "backends/vkeybd/polygon.h"
diff --git a/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml b/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml
index 86f39d3d4d..85a27c71ca 100644
--- a/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml
+++ b/backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<keyboard initial_mode="lowercase" v_align="bottom" h_align="centre">
+<keyboard initial_mode="lowercase" v_align="bottom" h_align="center">
<!-- coords key = "start x, start y, end x, end y" -->
<!-- Lowercase -->
<mode name="lowercase" resolutions="320x240,640x480">
diff --git a/backends/vkeybd/virtual-keyboard-gui.cpp b/backends/vkeybd/virtual-keyboard-gui.cpp
index c5ab39e46b..9ffda6e3a7 100644
--- a/backends/vkeybd/virtual-keyboard-gui.cpp
+++ b/backends/vkeybd/virtual-keyboard-gui.cpp
@@ -36,7 +36,7 @@
namespace Common {
static void blit(Graphics::Surface *surf_dst, Graphics::Surface *surf_src, int16 x, int16 y, OverlayColor transparent) {
- if (surf_dst->bytesPerPixel != sizeof(OverlayColor) || surf_src->bytesPerPixel != sizeof(OverlayColor))
+ if (surf_dst->format.bytesPerPixel != sizeof(OverlayColor) || surf_src->format.bytesPerPixel != sizeof(OverlayColor))
return;
const OverlayColor *src = (const OverlayColor *)surf_src->pixels;
@@ -133,7 +133,7 @@ void VirtualKeyboardGUI::setupDisplayArea(Rect& r, OverlayColor forecolor) {
_dispI = 0;
_dispForeColor = forecolor;
_dispBackColor = _dispForeColor + 0xFF;
- _dispSurface.create(r.width(), _dispFont->getFontHeight(), sizeof(OverlayColor));
+ _dispSurface.create(r.width(), _dispFont->getFontHeight(), _system->getOverlayFormat());
_dispSurface.fillRect(Rect(_dispSurface.w, _dispSurface.h), _dispBackColor);
_displayEnabled = true;
}
@@ -163,7 +163,7 @@ void VirtualKeyboardGUI::run() {
_system->showOverlay();
_system->clearOverlay();
}
- _overlayBackup.create(_screenW, _screenH, sizeof(OverlayColor));
+ _overlayBackup.create(_screenW, _screenH, _system->getOverlayFormat());
_system->grabOverlay((OverlayColor*)_overlayBackup.pixels, _overlayBackup.w);
setupCursor();
@@ -203,7 +203,7 @@ void VirtualKeyboardGUI::moveToDefaultPosition()
case VirtualKeyboard::kAlignLeft:
x = 0;
break;
- case VirtualKeyboard::kAlignCentre:
+ case VirtualKeyboard::kAlignCenter:
x = (_screenW - kbdW) / 2;
break;
case VirtualKeyboard::kAlignRight:
@@ -265,7 +265,7 @@ void VirtualKeyboardGUI::screenChanged() {
_screenW = newScreenW;
_screenH = newScreenH;
- _overlayBackup.create(_screenW, _screenH, sizeof(OverlayColor));
+ _overlayBackup.create(_screenW, _screenH, _system->getOverlayFormat());
_system->grabOverlay((OverlayColor*)_overlayBackup.pixels, _overlayBackup.w);
if (!_kbd->checkModeResolutions()) {
@@ -358,7 +358,7 @@ void VirtualKeyboardGUI::redraw() {
if (w <= 0 || h <= 0) return;
Graphics::Surface surf;
- surf.create(w, h, sizeof(OverlayColor));
+ surf.create(w, h, _system->getOverlayFormat());
OverlayColor *dst = (OverlayColor *)surf.pixels;
const OverlayColor *src = (OverlayColor *) _overlayBackup.getBasePtr(_dirtyRect.left, _dirtyRect.top);
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp
index a81258b25f..3ebdfdc653 100644
--- a/backends/vkeybd/virtual-keyboard-parser.cpp
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp
@@ -84,7 +84,7 @@ bool VirtualKeyboardParser::parserCallback_keyboard(ParserNode *node) {
if (h.equalsIgnoreCase("left"))
_keyboard->_hAlignment = VirtualKeyboard::kAlignLeft;
else if (h.equalsIgnoreCase("centre") || h.equalsIgnoreCase("center"))
- _keyboard->_hAlignment = VirtualKeyboard::kAlignCentre;
+ _keyboard->_hAlignment = VirtualKeyboard::kAlignCenter;
else if (h.equalsIgnoreCase("right"))
_keyboard->_hAlignment = VirtualKeyboard::kAlignRight;
}
diff --git a/backends/vkeybd/virtual-keyboard-parser.h b/backends/vkeybd/virtual-keyboard-parser.h
index 9723744dc4..1327008a80 100644
--- a/backends/vkeybd/virtual-keyboard-parser.h
+++ b/backends/vkeybd/virtual-keyboard-parser.h
@@ -51,7 +51,7 @@ keyboard layouts for different screen resolutions.
** Example keyboard pack description file **
********************************************
-<keyboard modes="normal,caps" initial_mode="normal" v_align="bottom" h_align="centre">
+<keyboard modes="normal,caps" initial_mode="normal" v_align="bottom" h_align="center">
<mode name="normal" resolutions="640x400,320x200">
<layout resolution="640x400" bitmap="normal_640x400.bmp" transparent_color="255,0,255">
<map>
diff --git a/backends/vkeybd/virtual-keyboard.cpp b/backends/vkeybd/virtual-keyboard.cpp
index 31fde8c0fa..e1a25474e7 100644
--- a/backends/vkeybd/virtual-keyboard.cpp
+++ b/backends/vkeybd/virtual-keyboard.cpp
@@ -33,6 +33,7 @@
#include "backends/vkeybd/virtual-keyboard-parser.h"
#include "backends/vkeybd/keycode-descriptions.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "common/unzip.h"
#define KEY_START_CHAR ('[')
@@ -71,7 +72,7 @@ void VirtualKeyboard::reset() {
deleteEvents();
_modes.clear();
_initialMode = _currentMode = 0;
- _hAlignment = kAlignCentre;
+ _hAlignment = kAlignCenter;
_vAlignment = kAlignBottom;
_keyQueue.clear();
_loaded = false;
@@ -136,7 +137,7 @@ bool VirtualKeyboard::loadKeyboardPack(const String &packName) {
_loaded = _parser->parse();
if (_loaded) {
- printf("Keyboard pack '%s' loaded successfully!\n", packName.c_str());
+ debug("Keyboard pack '%s' loaded successfully", packName.c_str());
} else {
warning("Error parsing the keyboard pack '%s'", packName.c_str());
diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h
index db94cbe476..169cd67833 100644
--- a/backends/vkeybd/virtual-keyboard.h
+++ b/backends/vkeybd/virtual-keyboard.h
@@ -134,7 +134,7 @@ protected:
enum HorizontalAlignment {
kAlignLeft,
- kAlignCentre,
+ kAlignCenter,
kAlignRight
};
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index f920dd0170..05e1d2c131 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -23,6 +23,9 @@
*
*/
+// FIXME: Avoid using printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "engines/metaengine.h"
#include "base/commandLine.h"
#include "base/plugins.h"
@@ -30,6 +33,7 @@
#include "common/config-manager.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/fs.h"
#include "gui/ThemeEngine.h"
@@ -262,7 +266,7 @@ void registerDefaults() {
#define DO_OPTION_INT(shortCmd, longCmd) \
DO_OPTION(shortCmd, longCmd) \
char *endptr = 0; \
- int intValue; intValue = (int)strtol(option, &endptr, 0); \
+ strtol(option, &endptr, 0); \
if (endptr == NULL || *endptr != 0) usage("--%s: Invalid number '%s'", longCmd, option);
// Use this for boolean options; this distinguishes between "-x" and "-X",
@@ -641,29 +645,30 @@ static Common::Error listSaves(const char *target) {
GameDescriptor game = EngineMan.findGame(gameid, &plugin);
if (!plugin) {
- warning("Could not find any plugin to handle target '%s' (gameid '%s')", target, gameid.c_str());
- return Common::kPluginNotFound;
+ return Common::Error(Common::kEnginePluginNotFound,
+ Common::String::format("target '%s', gameid '%s", target, gameid.c_str()));
}
if (!(*plugin)->hasFeature(MetaEngine::kSupportsListSaves)) {
// TODO: Include more info about the target (desc, engine name, ...) ???
- printf("ScummVM does not support listing save states for target '%s' (gameid '%s') .\n", target, gameid.c_str());
- result = Common::kPluginNotSupportSaves;
+ return Common::Error(Common::kEnginePluginNotSupportSaves,
+ Common::String::format("target '%s', gameid '%s", target, gameid.c_str()));
} else {
// Query the plugin for a list of savegames
SaveStateList saveList = (*plugin)->listSaves(target);
- // TODO: Include more info about the target (desc, engine name, ...) ???
- printf("Saves for target '%s' (gameid '%s'):\n", target, gameid.c_str());
- printf(" Slot Description \n"
- " ---- ------------------------------------------------------\n");
-
- if (saveList.size() == 0)
- result = Common::kNoSavesError;
+ if (saveList.size() > 0) {
+ // TODO: Include more info about the target (desc, engine name, ...) ???
+ printf("Save states for target '%s' (gameid '%s'):\n", target, gameid.c_str());
+ printf(" Slot Description \n"
+ " ---- ------------------------------------------------------\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());
- // TODO: Could also iterate over the full hashmap, printing all key-value pairs
+ for (SaveStateList::const_iterator x = saveList.begin(); x != saveList.end(); ++x) {
+ printf(" %-4s %s\n", x->save_slot().c_str(), x->description().c_str());
+ // TODO: Could also iterate over the full hashmap, printing all key-value pairs
+ }
+ } else {
+ printf("There are no save states for target '%s' (gameid '%s'):\n", target, gameid.c_str());
}
}
diff --git a/base/commandLine.h b/base/commandLine.h
index c7e8d8b0d0..6205c914e0 100644
--- a/base/commandLine.h
+++ b/base/commandLine.h
@@ -23,11 +23,15 @@
*
*/
-#ifndef BASE_OPTIONS_H
-#define BASE_OPTIONS_H
+#ifndef COMMON_COMMAND_LINE_H
+#define COMMON_COMMAND_LINE_H
-#include "common/str.h"
-#include "common/config-manager.h"
+#include "common/hash-str.h"
+
+namespace Common {
+class Error;
+class String;
+}
namespace Base {
diff --git a/base/internal_revision.h.in b/base/internal_revision.h.in
new file mode 100644
index 0000000000..63f58a4b77
--- /dev/null
+++ b/base/internal_revision.h.in
@@ -0,0 +1,6 @@
+#ifndef SCUMMVM_INTERNAL_REVISION_H
+#define SCUMMVM_INTERNAL_REVISION_H
+
+#define SCUMMVM_REVISION "@REVISION@"
+
+#endif
diff --git a/base/internal_version.h b/base/internal_version.h
index fc7b5350f5..bb25bce4e4 100644
--- a/base/internal_version.h
+++ b/base/internal_version.h
@@ -2,6 +2,12 @@
#error This file may only be included by base/version.cpp
#endif
+// Reads revision number from file
+// (this is used when building with Visual Studio)
+#ifdef SCUMMVM_INTERNAL_REVISION
+#include "internal_revision.h"
+#endif
+
#ifdef RELEASE_BUILD
#undef SCUMMVM_REVISION
#endif
@@ -10,4 +16,4 @@
#define SCUMMVM_REVISION
#endif
-#define SCUMMVM_VERSION "1.3.0git" SCUMMVM_REVISION
+#define SCUMMVM_VERSION "1.4.0git" SCUMMVM_REVISION
diff --git a/base/internal_version.h.in b/base/internal_version.h.in
index 5eb3c904ee..e2b46f54ce 100644
--- a/base/internal_version.h.in
+++ b/base/internal_version.h.in
@@ -2,6 +2,12 @@
#error This file may only be included by base/version.cpp
#endif
+// Reads revision number from file
+// (this is used when building with Visual Studio)
+#ifdef SCUMMVM_INTERNAL_REVISION
+#include "internal_revision.h"
+#endif
+
#ifdef RELEASE_BUILD
#undef SCUMMVM_REVISION
#endif
diff --git a/base/main.cpp b/base/main.cpp
index 65aa0ab43f..b34eb6966a 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -31,6 +31,9 @@
* of almost all the classes, methods and variables, and how they interact.
*/
+// FIXME: Avoid using printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "engines/engine.h"
#include "engines/metaengine.h"
#include "base/commandLine.h"
@@ -43,14 +46,13 @@
#include "common/debug-channels.h" /* for debug manager */
#include "common/events.h"
#include "common/EventRecorder.h"
-#include "common/file.h"
#include "common/fs.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/tokenizer.h"
#include "common/translation.h"
#include "gui/gui-manager.h"
-#include "gui/message.h"
#include "gui/error.h"
#include "audio/mididrv.h"
@@ -111,13 +113,12 @@ static const EnginePlugin *detectPlugin() {
if (plugin == 0) {
printf("failed\n");
warning("%s is an invalid gameid. Use the --list-games option to list supported gameid", gameid.c_str());
- return 0;
} else {
printf("%s\n", plugin->getName());
- }
- // FIXME: Do we really need this one?
- printf(" Starting '%s'\n", game.description().c_str());
+ // FIXME: Do we really need this one?
+ printf(" Starting '%s'\n", game.description().c_str());
+ }
return plugin;
}
@@ -131,24 +132,20 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
// Verify that the game path refers to an actual directory
if (!(dir.exists() && dir.isDirectory()))
- err = Common::kInvalidPathError;
+ err = Common::kPathNotDirectory;
// Create the game engine
- if (err == Common::kNoError)
+ if (err.getCode() == Common::kNoError)
err = (*plugin)->createInstance(&system, &engine);
// Check for errors
- if (!engine || err != Common::kNoError) {
-
- // TODO: An errorDialog for this and engine related errors is displayed already in the scummvm_main function
- // Is a separate dialog here still required?
-
- //GUI::displayErrorDialog("ScummVM could not find any game in the specified directory!");
- const char *errMsg = _(Common::errorToString(err));
+ if (!engine || err.getCode() != Common::kNoError) {
+ // Print a warning; note that scummvm_main will also
+ // display an error dialog, so we don't have to do this here.
warning("%s failed to instantiate engine: %s (target '%s', path '%s')",
plugin->getName(),
- errMsg,
+ err.getDesc().c_str(),
ConfMan.getActiveDomainName().c_str(),
dir.getPath().c_str()
);
@@ -355,8 +352,12 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
Common::Error res;
// TODO: deal with settings that require plugins to be loaded
- if ((res = Base::processSettings(command, settings)) != Common::kArgumentNotProcessed)
- return res;
+ res = Base::processSettings(command, settings);
+ if (res.getCode() != Common::kArgumentNotProcessed) {
+ if (res.getCode() != Common::kNoError)
+ warning("%s", res.getDesc().c_str());
+ return res.getCode();
+ }
// Init the backend. Must take place after all config data (including
// the command line params) was read.
@@ -430,14 +431,14 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
#endif
// Did an error occur ?
- if (result != Common::kNoError) {
+ if (result.getCode() != Common::kNoError) {
// Shows an informative error dialog if starting the selected game failed.
GUI::displayErrorDialog(result, _("Error running game:"));
}
// Quit unless an error occurred, or Return to launcher was requested
#ifndef FORCE_RTL
- if (result == 0 && !g_system->getEventManager()->shouldRTL())
+ if (result.getCode() == Common::kNoError && !g_system->getEventManager()->shouldRTL())
break;
#endif
// Reset RTL flag in case we want to load another engine
diff --git a/base/plugins.h b/base/plugins.h
index 976e606a8b..d8f1cb96ee 100644
--- a/base/plugins.h
+++ b/base/plugins.h
@@ -27,16 +27,10 @@
#define BASE_PLUGINS_H
#include "common/array.h"
-#include "common/error.h"
-#include "common/singleton.h"
-#include "common/util.h"
+#include "common/fs.h"
+#include "common/str.h"
#include "backends/plugins/elf/version.h"
-namespace Common {
- class FSList;
- class FSNode;
-}
-
/**
* @page pagePlugins An overview of the ScummVM plugin system
diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp
index 1dedbb5059..d2ad4bc475 100644
--- a/common/EventRecorder.cpp
+++ b/common/EventRecorder.cpp
@@ -28,6 +28,7 @@
#include "common/config-manager.h"
#include "common/random.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
DECLARE_SINGLETON(Common::EventRecorder);
diff --git a/common/archive.cpp b/common/archive.cpp
index c65408b56e..c2c9c8e702 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -25,8 +25,8 @@
#include "common/archive.h"
#include "common/fs.h"
-#include "common/util.h"
#include "common/system.h"
+#include "common/textconsole.h"
namespace Common {
diff --git a/common/archive.h b/common/archive.h
index c12ca79be0..375136fa15 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -27,7 +27,6 @@
#define COMMON_ARCHIVE_H
#include "common/str.h"
-#include "common/hash-str.h"
#include "common/list.h"
#include "common/ptr.h"
#include "common/singleton.h"
diff --git a/common/bufferedstream.h b/common/bufferedstream.h
index dc074422bb..bb09e77d1d 100644
--- a/common/bufferedstream.h
+++ b/common/bufferedstream.h
@@ -27,6 +27,7 @@
#define COMMON_BUFFEREDSTREAM_H
#include "common/stream.h"
+#include "common/types.h"
namespace Common {
diff --git a/common/config-file.cpp b/common/config-file.cpp
index 878d29301f..cd8f0989fc 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -27,7 +27,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/system.h"
-#include "common/util.h"
+#include "common/textconsole.h"
#define MAXLINELEN 256
diff --git a/common/config-file.h b/common/config-file.h
index 2f7d9cb650..231162fb3c 100644
--- a/common/config-file.h
+++ b/common/config-file.h
@@ -26,13 +26,15 @@
#ifndef COMMON_CONFIG_FILE_H
#define COMMON_CONFIG_FILE_H
-#include "common/config-manager.h"
+#include "common/hash-str.h"
#include "common/list.h"
#include "common/str.h"
-#include "common/stream.h"
namespace Common {
+class SeekableReadStream;
+class WriteStream;
+
/**
* This class allows reading/writing INI style config files.
* It is used by the ConfigManager for storage, but can also
diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index 77c918dcae..5f5c14f8de 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -24,10 +24,11 @@
*/
#include "common/config-manager.h"
+#include "common/debug.h"
#include "common/file.h"
#include "common/fs.h"
-#include "common/util.h"
#include "common/system.h"
+#include "common/textconsole.h"
DECLARE_SINGLETON(Common::ConfigManager);
diff --git a/common/dcl.cpp b/common/dcl.cpp
index ef45bc92ba..efe1de0415 100644
--- a/common/dcl.cpp
+++ b/common/dcl.cpp
@@ -25,11 +25,9 @@
#include "common/dcl.h"
#include "common/debug.h"
-#include "common/debug-channels.h"
-#include "common/endian.h"
#include "common/memstream.h"
#include "common/stream.h"
-#include "common/util.h"
+#include "common/textconsole.h"
namespace Common {
diff --git a/common/debug.cpp b/common/debug.cpp
index c87d195b76..a8711055fd 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -24,8 +24,8 @@
#include "common/debug.h"
#include "common/debug-channels.h"
-#include "common/util.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include <stdarg.h> // For va_list etc.
diff --git a/common/endian.h b/common/endian.h
index e6c39d3a4c..c645243654 100644
--- a/common/endian.h
+++ b/common/endian.h
@@ -149,51 +149,57 @@
*/
#define MKTAG(a0,a1,a2,a3) ((uint32)((a3) | ((a2) << 8) | ((a1) << 16) | ((a0) << 24)))
-// Functions for reading/writing native Integers,
-// this transparently handles the need for alignment
-
-#if !defined(SCUMM_NEED_ALIGNMENT)
+// Functions for reading/writing native integers.
+// They also transparently handle the need for alignment.
+
+// Test for GCC >= 4.0. These implementations will automatically use
+// CPU-specific instructions for unaligned data when they are available (eg.
+// MIPS). See also this email thread on scummvm-devel for details:
+// <http://thread.gmane.org/gmane.games.devel.scummvm/8063>
+//
+// Moreover, we activate this code for GCC >= 3.3 but *only* if unaligned access
+// is allowed.
+#if defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3 && !defined(SCUMM_NEED_ALIGNMENT)))
FORCEINLINE uint16 READ_UINT16(const void *ptr) {
- return *(const uint16 *)(ptr);
+ struct Unaligned16 { uint16 val; } __attribute__ ((__packed__, __may_alias__));
+ return ((const Unaligned16 *)ptr)->val;
}
FORCEINLINE uint32 READ_UINT32(const void *ptr) {
- return *(const uint32 *)(ptr);
+ struct Unaligned32 { uint32 val; } __attribute__ ((__packed__, __may_alias__));
+ return ((const Unaligned32 *)ptr)->val;
}
FORCEINLINE void WRITE_UINT16(void *ptr, uint16 value) {
- *(uint16 *)(ptr) = value;
+ struct Unaligned16 { uint16 val; } __attribute__ ((__packed__, __may_alias__));
+ ((Unaligned16 *)ptr)->val = value;
}
FORCEINLINE void WRITE_UINT32(void *ptr, uint32 value) {
- *(uint32 *)(ptr) = value;
+ struct Unaligned32 { uint32 val; } __attribute__ ((__packed__, __may_alias__));
+ ((Unaligned32 *)ptr)->val = value;
}
-// test for GCC >= 4.0. these implementations will automatically use CPU-specific
-// instructions for unaligned data when they are available (eg. MIPS)
-#elif defined(__GNUC__) && (__GNUC__ >= 4)
+#elif !defined(SCUMM_NEED_ALIGNMENT)
FORCEINLINE uint16 READ_UINT16(const void *ptr) {
- struct Unaligned16 { uint16 val; } __attribute__ ((__packed__, __may_alias__));
- return ((const Unaligned16 *)ptr)->val;
+ return *(const uint16 *)(ptr);
}
FORCEINLINE uint32 READ_UINT32(const void *ptr) {
- struct Unaligned32 { uint32 val; } __attribute__ ((__packed__, __may_alias__));
- return ((const Unaligned32 *)ptr)->val;
+ return *(const uint32 *)(ptr);
}
FORCEINLINE void WRITE_UINT16(void *ptr, uint16 value) {
- struct Unaligned16 { uint16 val; } __attribute__ ((__packed__, __may_alias__));
- ((Unaligned16 *)ptr)->val = value;
+ *(uint16 *)(ptr) = value;
}
FORCEINLINE void WRITE_UINT32(void *ptr, uint32 value) {
- struct Unaligned32 { uint32 val; } __attribute__ ((__packed__, __may_alias__));
- ((Unaligned32 *)ptr)->val = value;
+ *(uint32 *)(ptr) = value;
}
+
// use software fallback by loading each byte explicitely
#else
diff --git a/common/error.cpp b/common/error.cpp
index 6d1e349287..b07e5ebd74 100644
--- a/common/error.cpp
+++ b/common/error.cpp
@@ -24,51 +24,68 @@
*/
#include "common/error.h"
-#include "common/util.h"
#include "common/translation.h"
namespace Common {
/**
- * Error Table: Maps error codes to their default descriptions
+ * Maps an error code to equivalent string description.
+ *
+ * @param errorCode error code to be converted
+ * @return a pointer to string description of the error
*/
-
-struct ErrorMessage {
- Error error;
- const char *errMsg;
-};
-
-static const ErrorMessage _errMsgTable[] = {
- { kInvalidPathError, _s("Invalid Path") },
- { kNoGameDataFoundError, _s("Game Data not found") },
- { kUnsupportedGameidError, _s("Game Id not supported") },
- { kUnsupportedColorMode, _s("Unsupported Color Mode") },
-
- { kReadPermissionDenied, _s("Read permission denied") },
- { kWritePermissionDenied, _s("Write permission denied") },
-
- // The following three overlap a bit with kInvalidPathError and each other. Which to keep?
- { kPathDoesNotExist, _s("Path not exists") },
- { kPathNotDirectory, _s("Path not a directory") },
- { kPathNotFile, _s("Path not a file") },
-
- { kCreatingFileFailed, _s("Cannot create file") },
- { kReadingFailed, _s("Reading failed") },
- { kWritingFailed, _s("Writing data failed") },
-
- { kUnknownError, _s("Unknown Error") }
-};
-
-const char *errorToString(Error error) {
-
- for (int i = 0; i < ARRAYSIZE(_errMsgTable); i++) {
- if (error == _errMsgTable[i].error) {
- return _errMsgTable[i].errMsg;
- }
+static String errorToString(ErrorCode errorCode) {
+ switch (errorCode) {
+ case kNoError:
+ return _s("No error");
+ case kNoGameDataFoundError:
+ return _s("Game data not found");
+ case kUnsupportedGameidError:
+ return _s("Game id not supported");
+ case kUnsupportedColorMode:
+ return _s("Unsupported color mode");
+
+ case kReadPermissionDenied:
+ return _s("Read permission denied");
+ case kWritePermissionDenied:
+ return _s("Write permission denied");
+
+ case kPathDoesNotExist:
+ return _s("Path does not exist");
+ case kPathNotDirectory:
+ return _s("Path not a directory");
+ case kPathNotFile:
+ return _s("Path not a file");
+
+ case kCreatingFileFailed:
+ return _s("Cannot create file");
+ case kReadingFailed:
+ return _s("Reading data failed");
+ case kWritingFailed:
+ return _s("Writing data failed");
+
+ case kEnginePluginNotFound:
+ return _s("Could not find suitable engine plugin");
+ case kEnginePluginNotSupportSaves:
+ return _s("Engine plugin does not support save states");
+
+ case kArgumentNotProcessed:
+ return _s("Command line argument not processed");
+
+ case kUnknownError:
+ default:
+ return _s("Unknown error");
}
+}
- return _("Unknown Error");
+Error::Error(ErrorCode code)
+ : _code(code), _desc(errorToString(code)) {
}
+Error::Error(ErrorCode code, const String &desc)
+ : _code(code), _desc(errorToString(code) + " (" + desc + ")") {
+}
+
+
} // End of namespace Common
diff --git a/common/error.h b/common/error.h
index 58343114a2..1ffbba723a 100644
--- a/common/error.h
+++ b/common/error.h
@@ -26,6 +26,8 @@
#ifndef COMMON_ERROR_H
#define COMMON_ERROR_H
+#include "common/str.h"
+
namespace Common {
/**
@@ -37,15 +39,13 @@ namespace Common {
/**
* Error codes which may be reported by plugins under various circumstances.
*
- * @todo Clarify the names; add more codes, resp. verify all existing ones are acutally useful.
- * Also, try to avoid overlap.
- * @todo Maybe introduce a naming convention? E.g. k-NOUN/ACTION-CONDITION-Error, so
- * kPathInvalidError would be correct, but these would not be: kInvalidPath,
- * kPathInvalid, kPathIsInvalid, kInvalidPathError
+ * @note Error names should follow the pattern k-NOUN/ACTION-CONDITION-Error.
+ * So kPathInvalidError would be correct, but these would not be:
+ * kInvalidPath, kPathInvalid, kPathIsInvalid, kInvalidPathError.
+ * @todo Adjust all error codes to comply with these conventions.
*/
-enum Error {
+enum ErrorCode {
kNoError = 0, ///< No error occurred
- kInvalidPathError, ///< Engine initialization: Invalid game path was passed
kNoGameDataFoundError, ///< Engine initialization: No game data was found in the specified location
kUnsupportedGameidError, ///< Engine initialization: Gameid not supported by this (Meta)Engine
kUnsupportedColorMode, ///< Engine initialization: Engine does not support backend's color mode
@@ -54,7 +54,6 @@ enum Error {
kReadPermissionDenied, ///< Unable to read data due to missing read permission
kWritePermissionDenied, ///< Unable to write data due to missing write permission
- // The following three overlap a bit with kInvalidPathError and each other. Which to keep?
kPathDoesNotExist, ///< The specified path does not exist
kPathNotDirectory, ///< The specified path does not point to a directory
kPathNotFile, ///< The specified path does not point to a file
@@ -64,21 +63,48 @@ enum Error {
kWritingFailed, ///< Failure to write data -- disk full?
// The following are used by --list-saves
- kPluginNotFound, ///< Failed to find plugin to handle tager
- kPluginNotSupportSaves, ///< Failed if plugin does not support saves
- kNoSavesError, ///< There are no saves to show
+ kEnginePluginNotFound, ///< Failed to find plugin to handle target
+ kEnginePluginNotSupportSaves, ///< Failed if plugin does not support listing save states
kArgumentNotProcessed, ///< Used in command line parsing
+
kUnknownError ///< Catch-all error, used if no other error code matches
};
/**
- * Maps an error code to equivalent string description.
- *
- * @param error error code to be converted
- * @return a pointer to string description of the error
+ * An Error instance pairs an error code with string description providing more
+ * details about the error. For every error code, a default description is
+ * provided, but it is possible to optionally augment that description with
+ * extra information when creating a new Error instance.
*/
-const char *errorToString(Error error);
+class Error {
+protected:
+ ErrorCode _code;
+ String _desc;
+public:
+ /**
+ * Construct a new Error with the specified error code and the default
+ * error message.
+ */
+ Error(ErrorCode code = kUnknownError);
+
+ /**
+ * Construct a new Error with the specified error code and an augmented
+ * error message. Specifically, the provided extra text is suitably
+ * appended to the default message.
+ */
+ Error(ErrorCode code, const String &extra);
+
+ /**
+ * Get the description of this error.
+ */
+ const String &getDesc() const { return _desc; }
+
+ /**
+ * Get the error code of this error.
+ */
+ ErrorCode getCode() const { return _code; }
+};
} // End of namespace Common
diff --git a/common/file.cpp b/common/file.cpp
index dec0f2a953..485255bbdb 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -27,8 +27,7 @@
#include "common/debug.h"
#include "common/file.h"
#include "common/fs.h"
-#include "common/util.h"
-#include "common/system.h"
+#include "common/textconsole.h"
namespace Common {
diff --git a/common/file.h b/common/file.h
index d28cd9c308..c3805baed7 100644
--- a/common/file.h
+++ b/common/file.h
@@ -27,6 +27,7 @@
#define COMMON_FILE_H
#include "common/scummsys.h"
+#include "common/fs.h"
#include "common/noncopyable.h"
#include "common/str.h"
#include "common/stream.h"
@@ -34,7 +35,6 @@
namespace Common {
class Archive;
-class FSNode;
/**
* TODO: vital to document this core class properly!!! For both users and implementors
diff --git a/common/forbidden.h b/common/forbidden.h
index 92e662ccc6..af22b2ee21 100644
--- a/common/forbidden.h
+++ b/common/forbidden.h
@@ -41,18 +41,22 @@
#ifndef FORBIDDEN_SYMBOL_ALLOW_ALL
+// Make sure scummsys.h is always included first
+#include "common/scummsys.h"
+
+
/**
* The garbage string to use as replacement for forbidden symbols.
*
* The reason for this particular string is the following:
- * By including a space and "!" we try to ensure a compiler error.
- * By using the words "forbidden symbol" we try to make it a bit
- * clearer what is causing the error.
+ * By including a space and some non-alphanumeric symbols we trigger
+ * a compiler error. By including the words "forbidden symbol" (which
+ * the compiler will hopefully print along with its own error message),
+ * we try to make clear what is causing the error.
*/
-#define FORBIDDEN_SYMBOL_REPLACEMENT FORBIDDEN SYMBOL!
+#define FORBIDDEN_SYMBOL_REPLACEMENT FORBIDDEN SYMBOL !%*
-/*
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_printf
#undef printf
#define printf FORBIDDEN_SYMBOL_REPLACEMENT
@@ -62,7 +66,16 @@
#undef fprintf
#define fprintf FORBIDDEN_SYMBOL_REPLACEMENT
#endif
-*/
+
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_vprintf
+#undef vprintf
+#define vprintf FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
+
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_vfprintf
+#undef vfprintf
+#define vfprintf FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
#ifndef FORBIDDEN_SYMBOL_EXCEPTION_FILE
#undef FILE
@@ -131,29 +144,119 @@
#endif
-/*
-time_t
-
-time
-
-difftime
-
-mktime
-
-localtime
-
-clock
-
-gmtime
+//
+// Disable various symbols from time.h
+//
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+ /*
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_time_t
+ #undef time_t
+ #define time_t FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+ */
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_asctime
+ #undef asctime
+ #define asctime(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_clock
+ #undef clock
+ #define clock() FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_ctime
+ #undef ctime
+ #define ctime(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_difftime
+ #undef difftime
+ #define difftime(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_getdate
+ #undef getdate
+ #define getdate(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_gmtime
+ #undef gmtime
+ #define gmtime(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_localtime
+ #undef localtime
+ #define localtime(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_mktime
+ #undef mktime
+ #define mktime(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_time
+ #undef time
+ #define time(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+#endif // FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+//
+// Disable various symbols from unistd.h
+//
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_chdir
+ #undef chdir
+ #define chdir(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+ #undef getcwd
+ #define getcwd(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_getwd
+ #undef getwd
+ #define getwd(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+ #ifndef FORBIDDEN_SYMBOL_EXCEPTION_unlink
+ #undef unlink
+ #define unlink(a) FORBIDDEN_SYMBOL_REPLACEMENT
+ #endif
+
+#endif // FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+#undef mkdir
+#define mkdir(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
-system
+/*
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_setlocale
+#undef setlocale
+#define setlocale(a,b) FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
+*/
-remove
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_setvbuf
+#undef setvbuf
+#define setvbuf(a,b,c,d) FORBIDDEN_SYMBOL_REPLACEMENT
+#endif
-setlocale
+/*
+ * We also would like to disable the following symbols;
+ * however, these are also frequently used in regular code,
+ * e.g. for method names, so we don't override them.
+ * - read
+ * - remove
+ * - write
+ * - ...
+ */
-setvbuf
-*/
#endif
diff --git a/common/fs.cpp b/common/fs.cpp
index 87067df2cc..d3cdc0697f 100644
--- a/common/fs.cpp
+++ b/common/fs.cpp
@@ -22,8 +22,8 @@
* $Id$
*/
-#include "common/util.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "backends/fs/abstract-fs.h"
#include "backends/fs/fs-factory.h"
diff --git a/common/fs.h b/common/fs.h
index 6b20a05013..f93c11159e 100644
--- a/common/fs.h
+++ b/common/fs.h
@@ -27,6 +27,8 @@
#include "common/array.h"
#include "common/archive.h"
+#include "common/hash-str.h"
+#include "common/hashmap.h"
#include "common/ptr.h"
#include "common/str.h"
diff --git a/common/hashmap.h b/common/hashmap.h
index 233d7f5b16..907a107163 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -47,8 +47,6 @@
#include "common/func.h"
-#include "common/str.h"
-#include "common/util.h"
#ifdef DEBUG_HASH_COLLISIONS
#include "common/debug.h"
diff --git a/common/iff_container.h b/common/iff_container.h
index 01fc8017a9..43a551a239 100644
--- a/common/iff_container.h
+++ b/common/iff_container.h
@@ -29,7 +29,7 @@
#include "common/endian.h"
#include "common/func.h"
#include "common/stream.h"
-#include "common/util.h"
+#include "common/textconsole.h"
namespace Common {
diff --git a/common/macresman.cpp b/common/macresman.cpp
index e7d4a30789..0ecb430532 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -31,7 +31,7 @@
#include "common/macresman.h"
#include "common/md5.h"
#include "common/substream.h"
-#include "common/memstream.h"
+#include "common/textconsole.h"
#ifdef MACOSX
#include "common/config-manager.h"
@@ -550,127 +550,4 @@ void MacResManager::readMap() {
}
}
-void MacResManager::convertCrsrCursor(SeekableReadStream *data, byte **cursor, int &w, int &h, int &hotspotX,
- int &hotspotY, int &keycolor, bool colored, byte **palette, int &palSize) {
-
- data->readUint16BE(); // type
- data->readUint32BE(); // offset to pixel map
- data->readUint32BE(); // offset to pixel data
- data->readUint32BE(); // expanded cursor data
- data->readUint16BE(); // expanded data depth
- data->readUint32BE(); // reserved
-
- // Grab B/W icon data
- *cursor = new byte[16 * 16];
- for (int i = 0; i < 32; i++) {
- byte imageByte = data->readByte();
- for (int b = 0; b < 8; b++)
- cursor[0][i * 8 + b] = (byte)((imageByte & (0x80 >> b)) > 0 ? 0x0F : 0x00);
- }
-
- // Apply mask data
- for (int i = 0; i < 32; i++) {
- byte imageByte = data->readByte();
- for (int b = 0; b < 8; b++)
- if ((imageByte & (0x80 >> b)) == 0)
- cursor[0][i * 8 + b] = 0xff;
- }
-
- hotspotY = data->readUint16BE();
- hotspotX = data->readUint16BE();
- w = h = 16;
- keycolor = 0xff;
-
- // Use b/w cursor on backends which don't support cursor palettes
- if (!colored)
- return;
-
- data->readUint32BE(); // reserved
- data->readUint32BE(); // cursorID
-
- // Color version of cursor
- data->readUint32BE(); // baseAddr
-
- // Keep only lowbyte for now
- data->readByte();
- int iconRowBytes = data->readByte();
-
- if (!iconRowBytes)
- return;
-
- int iconBounds[4];
- iconBounds[0] = data->readUint16BE();
- iconBounds[1] = data->readUint16BE();
- iconBounds[2] = data->readUint16BE();
- iconBounds[3] = data->readUint16BE();
-
- data->readUint16BE(); // pmVersion
- data->readUint16BE(); // packType
- data->readUint32BE(); // packSize
-
- data->readUint32BE(); // hRes
- data->readUint32BE(); // vRes
-
- data->readUint16BE(); // pixelType
- data->readUint16BE(); // pixelSize
- data->readUint16BE(); // cmpCount
- data->readUint16BE(); // cmpSize
-
- data->readUint32BE(); // planeByte
- data->readUint32BE(); // pmTable
- data->readUint32BE(); // reserved
-
- // Pixel data for cursor
- int iconDataSize = iconRowBytes * (iconBounds[3] - iconBounds[1]);
- byte *iconData = new byte[iconDataSize];
- data->read(iconData, iconDataSize);
-
- // Color table
- data->readUint32BE(); // ctSeed
- data->readUint16BE(); // ctFlag
- uint16 ctSize = data->readUint16BE() + 1;
-
- *palette = new byte[ctSize * 3];
-
- // Read just high byte of 16-bit color
- for (int c = 0; c < ctSize; c++) {
- // We just use indices 0..ctSize, so ignore color ID
- data->readUint16BE(); // colorID[c]
-
- palette[0][c * 3 + 0] = data->readByte();
- data->readByte();
-
- palette[0][c * 3 + 1] = data->readByte();
- data->readByte();
-
- palette[0][c * 3 + 2] = data->readByte();
- data->readByte();
- }
-
- palSize = ctSize;
-
- int pixelsPerByte = (iconBounds[2] - iconBounds[0]) / iconRowBytes;
- int bpp = 8 / pixelsPerByte;
-
- // build a mask to make sure the pixels are properly shifted out
- int bitmask = 0;
- for (int m = 0; m < bpp; m++) {
- bitmask <<= 1;
- bitmask |= 1;
- }
-
- // Extract pixels from bytes
- for (int j = 0; j < iconDataSize; j++)
- for (int b = 0; b < pixelsPerByte; b++) {
- int idx = j * pixelsPerByte + (pixelsPerByte - 1 - b);
-
- if (cursor[0][idx] != 0xff) // if mask is not there
- cursor[0][idx] = (byte)((iconData[j] >> (b * bpp)) & bitmask);
- }
-
- delete[] iconData;
-
- assert(data->size() - data->pos() == 0);
-}
-
} // End of namespace Common
diff --git a/common/macresman.h b/common/macresman.h
index 2ad0b608a1..f588d8f853 100644
--- a/common/macresman.h
+++ b/common/macresman.h
@@ -33,15 +33,14 @@
*/
#include "common/array.h"
-#include "common/file.h"
+#include "common/fs.h"
+#include "common/str.h"
#ifndef COMMON_MACRESMAN_H
#define COMMON_MACRESMAN_H
namespace Common {
-class FSNode;
-
typedef Array<uint16> MacResIDArray;
typedef Array<uint32> MacResTagArray;
@@ -153,25 +152,6 @@ public:
String getBaseFileName() const { return _baseFileName; }
/**
- * Convert cursor from crsr format to format suitable for feeding to CursorMan
- * @param data Pointer to the cursor datax
- * @param cursor Pointer to memory where result cursor will be stored. The memory
- * block will be malloc()'ed
- * @param w Pointer to int where the cursor width will be stored
- * @param h Pointer to int where the cursor height will be stored
- * @param hotspotX Storage for cursor hotspot X coordinate
- * @param hotspotY Storage for cursor hotspot Y coordinate
- * @param keycolor Pointer to int where the transpared color value will be stored
- * @param colored If set to true then colored cursor will be returned (if any).
- * b/w version will be used otherwise
- * @param palette Pointer to memory where the cursor palette will be stored.
- * The memory will be malloc()'ed
- * @param palSize Pointer to integer where the palette size will be stored.
- */
- static void convertCrsrCursor(SeekableReadStream *data, byte **cursor, int &w, int &h, int &hotspotX,
- int &hotspotY, int &keycolor, bool colored, byte **palette, int &palSize);
-
- /**
* Return list of resource IDs with specified type ID
*/
MacResIDArray getResIDArray(uint32 typeID);
diff --git a/common/md5.cpp b/common/md5.cpp
index e4736e85ca..bea9ca0dc5 100644
--- a/common/md5.cpp
+++ b/common/md5.cpp
@@ -28,10 +28,10 @@
* this program is licensed under the GPL.
*/
-#include "common/file.h"
-#include "common/fs.h"
#include "common/md5.h"
#include "common/endian.h"
+#include "common/str.h"
+#include "common/stream.h"
namespace Common {
diff --git a/common/md5.h b/common/md5.h
index 29f3aeeb4c..e613028a5e 100644
--- a/common/md5.h
+++ b/common/md5.h
@@ -26,11 +26,11 @@
#define COMMON_MD5_H
#include "common/scummsys.h"
-#include "common/str.h"
namespace Common {
class ReadStream;
+class String;
/**
* Compute the MD5 checksum of the content of the given ReadStream.
diff --git a/common/memstream.h b/common/memstream.h
index 13b8e26e8a..ac42e1bad9 100644
--- a/common/memstream.h
+++ b/common/memstream.h
@@ -27,6 +27,7 @@
#define COMMON_MEMSTREAM_H
#include "common/stream.h"
+#include "common/types.h"
namespace Common {
diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index 207a2dd5e3..cf50584cc6 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -36,6 +36,7 @@
#include "common/macresman.h"
#include "common/memstream.h"
#include "common/quicktime.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "common/zlib.h"
diff --git a/common/scummsys.h b/common/scummsys.h
index 6554c70163..8ba983fd6c 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -110,9 +110,19 @@
#include "config.h"
#endif
-// make sure we really are compiling for WIN32
-#ifndef WIN32
-#undef _MSC_VER
+//
+// Define scumm_stricmp and scumm_strnicmp
+//
+#if defined(_WIN32_WCE) || defined(_MSC_VER)
+ #define scumm_stricmp stricmp
+ #define scumm_strnicmp _strnicmp
+ #define snprintf _snprintf
+#elif defined(__MINGW32__) || defined(__GP32__) || defined(__DS__)
+ #define scumm_stricmp stricmp
+ #define scumm_strnicmp strnicmp
+#else
+ #define scumm_stricmp strcasecmp
+ #define scumm_strnicmp strncasecmp
#endif
@@ -126,20 +136,10 @@
// - Define this on a big endian target
// SCUMM_NEED_ALIGNMENT
// - Define this if your system has problems reading e.g. an int32 from an odd address
-// SCUMMVM_DONT_DEFINE_TYPES
-// - Define this if you need to provide your own typedefs, e.g. because your
-// system headers conflict with our typenames, or because you have odd
-// type requirements.
// SMALL_SCREEN_DEVICE
// - ...
// ...
-// We define all types in config.h, so we don't want to typedef those types
-// here again!
-#ifdef HAVE_CONFIG_H
-#define SCUMMVM_DONT_DEFINE_TYPES
-#endif
-
//
// By default we try to use pragma push/pop to ensure various structs we use
@@ -155,203 +155,75 @@
#define SCUMMVM_USE_PRAGMA_PACK
-#if defined(__SYMBIAN32__)
+#if defined(HAVE_CONFIG_H)
+ // All settings should have been set in config.h
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
+#elif defined(__SYMBIAN32__)
#define SCUMM_LITTLE_ENDIAN
#define SCUMM_NEED_ALIGNMENT
- #define SMALL_SCREEN_DEVICE
-
- // Enable Symbians own datatypes
- // This is done for two reasons
- // a) uint is already defined by Symbians libc component
- // b) Symbian is using its "own" datatyping, and the Scummvm port
- // should follow this to ensure the best compability possible.
- #define SCUMMVM_DONT_DEFINE_TYPES
- typedef unsigned char byte;
-
- typedef unsigned char uint8;
- typedef signed char int8;
-
- typedef unsigned short int uint16;
- typedef signed short int int16;
-
- typedef unsigned long int uint32;
- typedef signed long int int32;
-
#elif defined(_WIN32_WCE)
- #define scumm_stricmp stricmp
- #define scumm_strnicmp _strnicmp
- #define snprintf _snprintf
-
#define SCUMM_LITTLE_ENDIAN
- #ifndef __GNUC__
- #define FORCEINLINE __forceinline
- #define NORETURN_PRE __declspec(noreturn)
- #endif
- #define PLUGIN_EXPORT __declspec(dllexport)
-
- #if _WIN32_WCE < 300
- #define SMALL_SCREEN_DEVICE
- #endif
-
#elif defined(_MSC_VER)
- #define scumm_stricmp stricmp
- #define scumm_strnicmp _strnicmp
- #define snprintf _snprintf
-
#define SCUMM_LITTLE_ENDIAN
- #define FORCEINLINE __forceinline
- #define NORETURN_PRE __declspec(noreturn)
- #define PLUGIN_EXPORT __declspec(dllexport)
-
-
#elif defined(__MINGW32__)
- #define scumm_stricmp stricmp
- #define scumm_strnicmp strnicmp
-
#define SCUMM_LITTLE_ENDIAN
- #define PLUGIN_EXPORT __declspec(dllexport)
-
-#elif defined(UNIX)
-
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
+#elif defined(SDL_BACKEND)
+ /* need this for the SDL_BYTEORDER define */
+ #include <SDL_byteorder.h>
- #ifndef CONFIG_H
- /* need this for the SDL_BYTEORDER define */
- #include <SDL_byteorder.h>
-
- #if SDL_BYTEORDER == SDL_LIL_ENDIAN
- #define SCUMM_LITTLE_ENDIAN
- #elif SDL_BYTEORDER == SDL_BIG_ENDIAN
- #define SCUMM_BIG_ENDIAN
- #else
- #error Neither SDL_BIG_ENDIAN nor SDL_LIL_ENDIAN is set.
- #endif
- #endif
-
- // You need to set this manually if necessary
-// #define SCUMM_NEED_ALIGNMENT
-
- // Very BAD hack following, used to avoid triggering an assert in uClibc dingux library
- // "toupper" when pressing keyboard function keys.
- #if defined(DINGUX)
- #undef toupper
- #define toupper(c) (((c & 0xFF) >= 97) && ((c & 0xFF) <= 122) ? ((c & 0xFF) - 32) : (c & 0xFF))
+ #if SDL_BYTEORDER == SDL_LIL_ENDIAN
+ #define SCUMM_LITTLE_ENDIAN
+ #elif SDL_BYTEORDER == SDL_BIG_ENDIAN
+ #define SCUMM_BIG_ENDIAN
+ #else
+ #error Neither SDL_BIG_ENDIAN nor SDL_LIL_ENDIAN is set.
#endif
#elif defined(__DC__)
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
-
#define SCUMM_LITTLE_ENDIAN
#define SCUMM_NEED_ALIGNMENT
#elif defined(__GP32__)
- #define scumm_stricmp stricmp
- #define scumm_strnicmp strnicmp
-
#define SCUMM_LITTLE_ENDIAN
#define SCUMM_NEED_ALIGNMENT
- // Override typenames. uint is already defined by system header files.
- #define SCUMMVM_DONT_DEFINE_TYPES
- typedef unsigned char byte;
-
- typedef unsigned char uint8;
- typedef signed char int8;
-
- typedef unsigned short int uint16;
- typedef signed short int int16;
-
- typedef unsigned long int uint32;
- typedef signed long int int32;
-
#elif defined(__PLAYSTATION2__)
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
-
#define SCUMM_LITTLE_ENDIAN
#define SCUMM_NEED_ALIGNMENT
#elif defined(__N64__)
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
-
#define SCUMM_BIG_ENDIAN
#define SCUMM_NEED_ALIGNMENT
- #define STRINGBUFLEN 256
-
- #define SCUMMVM_DONT_DEFINE_TYPES
- typedef unsigned char byte;
-
- typedef unsigned char uint8;
- typedef signed char int8;
-
- typedef unsigned short int uint16;
- typedef signed short int int16;
-
- typedef unsigned int uint32;
- typedef signed int int32;
-
- typedef unsigned long long uint64;
- typedef signed long long int64;
-
#elif defined(__PSP__)
- #include <malloc.h>
- #include "backends/platform/psp/memory.h"
-
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
-
#define SCUMM_LITTLE_ENDIAN
#define SCUMM_NEED_ALIGNMENT
- /* to make an efficient, inlined memcpy implementation */
- #define memcpy(dst, src, size) psp_memcpy(dst, src, size)
-
#elif defined(__amigaos4__)
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
-
#define SCUMM_BIG_ENDIAN
#define SCUMM_NEED_ALIGNMENT
-#elif defined (__DS__)
-
- #define scumm_stricmp stricmp
- #define scumm_strnicmp strnicmp
+#elif defined(__DS__)
#define SCUMM_NEED_ALIGNMENT
#define SCUMM_LITTLE_ENDIAN
- #define SCUMMVM_DONT_DEFINE_TYPES
-
- #define STRINGBUFLEN 256
-// #define printf(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__)
-
#elif defined(__WII__)
- #define scumm_stricmp strcasecmp
- #define scumm_strnicmp strncasecmp
-
#define SCUMM_BIG_ENDIAN
#define SCUMM_NEED_ALIGNMENT
@@ -362,47 +234,96 @@
//
-// GCC specific stuff
+// Some more system specific settings.
+// TODO/FIXME: All of these should be moved to backend specific files (such as portdefs.h)
//
-#if defined(__GNUC__)
- #define NORETURN_POST __attribute__((__noreturn__))
- #define PACKED_STRUCT __attribute__((__packed__))
- #define GCC_PRINTF(x,y) __attribute__((__format__(printf, x, y)))
+#if defined(__SYMBIAN32__)
- #if !defined(FORCEINLINE) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
- #define FORCEINLINE inline __attribute__((__always_inline__))
+ #define SMALL_SCREEN_DEVICE
+
+#elif defined(_WIN32_WCE)
+
+ #if _WIN32_WCE < 300
+ #define SMALL_SCREEN_DEVICE
#endif
-#elif defined(__INTEL_COMPILER)
- #define NORETURN_POST __attribute__((__noreturn__))
- #define PACKED_STRUCT __attribute__((__packed__))
- #define GCC_PRINTF(x,y) __attribute__((__format__(printf, x, y)))
-#else
- #define PACKED_STRUCT
- #define GCC_PRINTF(x,y)
+
+#elif defined(DINGUX)
+
+ // Very BAD hack following, used to avoid triggering an assert in uClibc dingux library
+ // "toupper" when pressing keyboard function keys.
+ #undef toupper
+ #define toupper(c) (((c & 0xFF) >= 97) && ((c & 0xFF) <= 122) ? ((c & 0xFF) - 32) : (c & 0xFF))
+
+#elif defined(__PSP__)
+
+ #include <malloc.h>
+ #include "backends/platform/psp/memory.h"
+
+ /* to make an efficient, inlined memcpy implementation */
+ #define memcpy(dst, src, size) psp_memcpy(dst, src, size)
+
#endif
//
// Fallbacks / default values for various special macros
//
+#ifndef GCC_PRINTF
+ #if defined(__GNUC__) || defined(__INTEL_COMPILER)
+ #define GCC_PRINTF(x,y) __attribute__((__format__(__printf__, x, y)))
+ #else
+ #define GCC_PRINTF(x,y)
+ #endif
+#endif
+
+#ifndef PACKED_STRUCT
+ #if defined(__GNUC__) || defined(__INTEL_COMPILER)
+ #define PACKED_STRUCT __attribute__((__packed__))
+ #else
+ #define PACKED_STRUCT
+ #endif
+#endif
+
#ifndef FORCEINLINE
-#define FORCEINLINE inline
+ #if defined(_MSC_VER)
+ #define FORCEINLINE __forceinline
+ #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
+ #define FORCEINLINE inline __attribute__((__always_inline__))
+ #else
+ #define FORCEINLINE inline
+ #endif
#endif
#ifndef PLUGIN_EXPORT
-#define PLUGIN_EXPORT
+ #if defined(_MSC_VER) || defined(_WIN32_WCE) || defined(__MINGW32__)
+ #define PLUGIN_EXPORT __declspec(dllexport)
+ #else
+ #define PLUGIN_EXPORT
+ #endif
#endif
#ifndef NORETURN_PRE
-#define NORETURN_PRE
+ #if defined(_MSC_VER)
+ #define NORETURN_PRE __declspec(noreturn)
+ #else
+ #define NORETURN_PRE
+ #endif
#endif
#ifndef NORETURN_POST
-#define NORETURN_POST
+ #if defined(__GNUC__) || defined(__INTEL_COMPILER)
+ #define NORETURN_POST __attribute__((__noreturn__))
+ #else
+ #define NORETURN_POST
+ #endif
#endif
#ifndef STRINGBUFLEN
-#define STRINGBUFLEN 1024
+ #if defined(__N64__) || defined(__DS__)
+ #define STRINGBUFLEN 256
+ #else
+ #define STRINGBUFLEN 1024
+ #endif
#endif
#ifndef MAXPATHLEN
@@ -411,9 +332,60 @@
//
-// Typedef our system types unless SCUMMVM_DONT_DEFINE_TYPES is set.
+// Typedef our system types
//
-#ifndef SCUMMVM_DONT_DEFINE_TYPES
+#if !defined(HAVE_CONFIG_H) && defined(__SYMBIAN32__)
+
+ // Enable Symbians own datatypes
+ // This is done for two reasons
+ // a) uint is already defined by Symbians libc component
+ // b) Symbian is using its "own" datatyping, and the Scummvm port
+ // should follow this to ensure the best compability possible.
+ typedef unsigned char byte;
+
+ typedef unsigned char uint8;
+ typedef signed char int8;
+
+ typedef unsigned short int uint16;
+ typedef signed short int int16;
+
+ typedef unsigned long int uint32;
+ typedef signed long int int32;
+
+#elif !defined(HAVE_CONFIG_H) && defined(__GP32__)
+
+ // Override typenames. uint is already defined by system header files.
+ typedef unsigned char byte;
+
+ typedef unsigned char uint8;
+ typedef signed char int8;
+
+ typedef unsigned short int uint16;
+ typedef signed short int int16;
+
+ typedef unsigned long int uint32;
+ typedef signed long int int32;
+
+#elif !defined(HAVE_CONFIG_H) && defined(__N64__)
+
+ typedef unsigned char byte;
+
+ typedef unsigned char uint8;
+ typedef signed char int8;
+
+ typedef unsigned short int uint16;
+ typedef signed short int int16;
+
+ typedef unsigned int uint32;
+ typedef signed int int32;
+
+#elif !defined(HAVE_CONFIG_H) && defined(__DS__)
+
+ // Do nothing, the SDK defines all types we need in nds/ndstypes.h,
+ // which we include in our portsdef.h
+
+#else
+
typedef unsigned char byte;
typedef unsigned char uint8;
typedef signed char int8;
diff --git a/common/stream.cpp b/common/stream.cpp
index c0783b2352..a785ac5164 100644
--- a/common/stream.cpp
+++ b/common/stream.cpp
@@ -26,9 +26,7 @@
#include "common/stream.h"
#include "common/memstream.h"
#include "common/substream.h"
-#include "common/bufferedstream.h"
#include "common/str.h"
-#include "common/util.h"
namespace Common {
@@ -205,7 +203,6 @@ uint32 SubReadStream::read(void *dataPtr, uint32 dataSize) {
}
dataSize = _parentStream->read(dataPtr, dataSize);
- _eos |= _parentStream->eos();
_pos += dataSize;
return dataSize;
@@ -245,6 +242,13 @@ bool SeekableSubReadStream::seek(int32 offset, int whence) {
return ret;
}
+uint32 SafeSubReadStream::read(void *dataPtr, uint32 dataSize) {
+ // Make sure the parent stream is at the right position
+ seek(0, SEEK_CUR);
+
+ return SeekableSubReadStream::read(dataPtr, dataSize);
+}
+
#pragma mark -
diff --git a/common/stream.h b/common/stream.h
index 65b4971a72..530b50e431 100644
--- a/common/stream.h
+++ b/common/stream.h
@@ -26,12 +26,12 @@
#ifndef COMMON_STREAM_H
#define COMMON_STREAM_H
-#include "common/types.h"
#include "common/endian.h"
+#include "common/scummsys.h"
+#include "common/str.h"
namespace Common {
-class String;
class SeekableReadStream;
/**
diff --git a/common/substream.h b/common/substream.h
index dc49ce9ecf..8b83dbda2e 100644
--- a/common/substream.h
+++ b/common/substream.h
@@ -27,6 +27,7 @@
#define COMMON_SUBSTREAM_H
#include "common/stream.h"
+#include "common/types.h"
namespace Common {
@@ -59,7 +60,7 @@ public:
delete _parentStream;
}
- virtual bool eos() const { return _eos; }
+ virtual bool eos() const { return _eos | _parentStream->eos(); }
virtual bool err() const { return _parentStream->err(); }
virtual void clearErr() { _eos = false; _parentStream->clearErr(); }
virtual uint32 read(void *dataPtr, uint32 dataSize);
@@ -101,6 +102,25 @@ public:
}
};
+/**
+ * A seekable substream that removes the exclusivity demand required by the
+ * normal SeekableSubReadStream, at the cost of seek()ing the parent stream
+ * before each read().
+ *
+ * More than one SafeSubReadStream to the same parent stream can be used
+ * at the same time; they won't mess up each other. They will, however,
+ * reposition the parent stream, so don't depend on its position to be
+ * the same after a read() or seek() on one of its SafeSubReadStream.
+ */
+class SafeSubReadStream : public SeekableSubReadStream {
+public:
+ SafeSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end, DisposeAfterUse::Flag disposeParentStream = DisposeAfterUse::NO) :
+ SeekableSubReadStream(parentStream, begin, end, disposeParentStream) {
+ }
+
+ virtual uint32 read(void *dataPtr, uint32 dataSize);
+};
+
} // End of namespace Common
diff --git a/common/system.cpp b/common/system.cpp
index 1ec7c14617..4e902bcb14 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -28,6 +28,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/system.h"
+#include "common/str.h"
#ifdef __PLAYSTATION2__
// for those replaced fopen/fread/etc functions
diff --git a/common/system.h b/common/system.h
index c487e727a8..540ffde5a5 100644
--- a/common/system.h
+++ b/common/system.h
@@ -28,29 +28,27 @@
#include "common/scummsys.h"
#include "common/noncopyable.h"
-#include "common/rect.h"
#include "common/list.h" // For OSystem::getSupportedFormats()
-
-#include "graphics/palette.h" // for PaletteManager
#include "graphics/pixelformat.h"
namespace Audio {
- class Mixer;
+class Mixer;
}
namespace Graphics {
- struct Surface;
+struct Surface;
}
namespace Common {
- struct Event;
- class EventManager;
- class SaveFileManager;
- class SearchSet;
- class TimerManager;
- class SeekableReadStream;
- class WriteStream;
- class HardwareKeySet;
+class EventManager;
+struct Rect;
+class SaveFileManager;
+class SearchSet;
+class String;
+class TimerManager;
+class SeekableReadStream;
+class WriteStream;
+class HardwareKeySet;
}
class AudioCDManager;
@@ -363,7 +361,7 @@ public:
/**
* Determine which graphics mode is currently active.
- * @return the active graphics mode
+ * @return the ID of the active graphics mode
*/
virtual int getGraphicsMode() const = 0;
diff --git a/common/textconsole.cpp b/common/textconsole.cpp
index 9c72699914..8d62cd4cb2 100644
--- a/common/textconsole.cpp
+++ b/common/textconsole.cpp
@@ -24,6 +24,7 @@
#include "common/textconsole.h"
#include "common/system.h"
+#include "common/str.h"
namespace Common {
diff --git a/common/textconsole.h b/common/textconsole.h
index 963d674c3b..5a535f3206 100644
--- a/common/textconsole.h
+++ b/common/textconsole.h
@@ -66,8 +66,6 @@ void NORETURN_PRE error(const char *s, ...) GCC_PRINTF(1, 2) NORETURN_POST;
#ifdef DISABLE_TEXT_CONSOLE
-inline int printf(const char *s, ...) { return 0; }
-
inline void warning(const char *s, ...) {}
#else
diff --git a/common/translation.cpp b/common/translation.cpp
index 407da2c883..5494849f4c 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -32,11 +32,11 @@
#define TRANSLATIONS_DAT_VER 2
#include "common/translation.h"
-#include "common/archive.h"
#include "common/config-manager.h"
#include "common/file.h"
#include "common/fs.h"
#include "common/system.h"
+#include "common/textconsole.h"
#ifdef USE_TRANSLATION
diff --git a/common/translation.h b/common/translation.h
index 523f2f4de7..f8183b6350 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -25,6 +25,9 @@
#ifndef COMMON_TRANSLATION_H
#define COMMON_TRANSLATION_H
+#include "common/array.h"
+#include "common/fs.h"
+#include "common/str.h"
#include "common/singleton.h"
#include "common/str-array.h"
@@ -33,7 +36,6 @@
namespace Common {
class File;
-class FSNode;
enum TranslationIDs {
kTranslationAutodetectId = 0,
diff --git a/common/unarj.cpp b/common/unarj.cpp
index 2c4225f393..4bda7ac753 100644
--- a/common/unarj.cpp
+++ b/common/unarj.cpp
@@ -30,12 +30,12 @@
#include "common/scummsys.h"
#include "common/archive.h"
#include "common/debug.h"
-#include "common/util.h"
#include "common/unarj.h"
#include "common/file.h"
#include "common/hash-str.h"
#include "common/memstream.h"
#include "common/bufferedstream.h"
+#include "common/textconsole.h"
namespace Common {
diff --git a/common/unarj.h b/common/unarj.h
index fa7d388542..fe23ba5694 100644
--- a/common/unarj.h
+++ b/common/unarj.h
@@ -32,10 +32,11 @@
#ifndef COMMON_UNARJ_H
#define COMMON_UNARJ_H
+#include "common/str.h"
+
namespace Common {
class Archive;
-class String;
/**
* This factory method creates an Archive instance corresponding to the content
diff --git a/common/unzip.cpp b/common/unzip.cpp
index cd5d37f4bd..d56893f3cd 100644
--- a/common/unzip.cpp
+++ b/common/unzip.cpp
@@ -68,6 +68,8 @@
PkWare has also a specification at :
ftp://ftp.pkware.com/probdesc.zip */
+// Disable symbol overrides so that we can use zlib.h
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
@@ -105,7 +107,6 @@ typedef struct {
#include "common/fs.h"
#include "common/unzip.h"
-#include "common/file.h"
#include "common/memstream.h"
#include "common/hashmap.h"
@@ -1470,11 +1471,13 @@ int ZipArchive::listMembers(Common::ArchiveMemberList &list) {
while (err == UNZ_OK) {
char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
- unzGetCurrentFileInfo(_zipFile, NULL,
- szCurrentFileName, sizeof(szCurrentFileName)-1,
- NULL, 0, NULL, 0);
- list.push_back(ArchiveMemberList::value_type(new GenericArchiveMember(szCurrentFileName, this)));
- matches++;
+ if (unzGetCurrentFileInfo(_zipFile, NULL,
+ szCurrentFileName, sizeof(szCurrentFileName)-1,
+ NULL, 0, NULL, 0) == UNZ_OK) {
+ list.push_back(ArchiveMemberList::value_type(new GenericArchiveMember(szCurrentFileName, this)));
+ matches++;
+ }
+
err = unzGoToNextFile(_zipFile);
}
@@ -1493,18 +1496,31 @@ Common::SeekableReadStream *ZipArchive::createReadStreamForMember(const Common::
return 0;
unz_file_info fileInfo;
- unzOpenCurrentFile(_zipFile);
- unzGetCurrentFileInfo(_zipFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0);
+ if (unzOpenCurrentFile(_zipFile) != UNZ_OK)
+ return 0;
+
+ if (unzGetCurrentFileInfo(_zipFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0) != UNZ_OK)
+ return 0;
+
byte *buffer = (byte *)malloc(fileInfo.uncompressed_size);
assert(buffer);
- unzReadCurrentFile(_zipFile, buffer, fileInfo.uncompressed_size);
- unzCloseCurrentFile(_zipFile);
+
+ if (unzReadCurrentFile(_zipFile, buffer, fileInfo.uncompressed_size) != (int)fileInfo.uncompressed_size) {
+ free(buffer);
+ return 0;
+ }
+
+ if (unzCloseCurrentFile(_zipFile) != UNZ_OK) {
+ free(buffer);
+ return 0;
+ }
+
return new Common::MemoryReadStream(buffer, fileInfo.uncompressed_size, DisposeAfterUse::YES);
// FIXME: instead of reading all into a memory stream, we could
// instead create a new ZipStream class. But then we have to be
// careful to handle the case where the client code opens multiple
- // files in the archive and tries to use them indepenendtly.
+ // files in the archive and tries to use them independently.
}
Archive *makeZipArchive(const String &name) {
diff --git a/common/unzip.h b/common/unzip.h
index c460840f12..fe7acdcc54 100644
--- a/common/unzip.h
+++ b/common/unzip.h
@@ -25,12 +25,13 @@
#ifndef COMMON_UNZIP_H
#define COMMON_UNZIP_H
+#include "common/str.h"
+
namespace Common {
class Archive;
class FSNode;
class SeekableReadStream;
-class String;
/**
* This factory method creates an Archive instance corresponding to the content
diff --git a/common/util.cpp b/common/util.cpp
index 06954ac441..22cf33b130 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -23,9 +23,9 @@
*/
#include "common/util.h"
-#include "common/system.h"
#include "common/translation.h"
#include "common/config-manager.h"
+#include "common/debug.h"
namespace Common {
@@ -213,7 +213,7 @@ const PlatformDescription g_platforms[] = {
{ "segacd", "segacd", "sega", "SegaCD", kPlatformSegaCD },
{ "windows", "win", "win", "Windows", kPlatformWindows },
{ "playstation", "psx", "psx", "Sony PlayStation", kPlatformPSX },
- { "cdi", "cdi", "cdi", "Phillips CD-i", kPlatformCDi },
+ { "cdi", "cdi", "cdi", "Philips CD-i", kPlatformCDi },
{ "ios", "ios", "ios", "Apple iOS", kPlatformIOS },
{ 0, 0, 0, "Default", kPlatformUnknown }
diff --git a/common/util.h b/common/util.h
index e0bded2f54..3af9b49086 100644
--- a/common/util.h
+++ b/common/util.h
@@ -26,7 +26,6 @@
#define COMMON_UTIL_H
#include "common/scummsys.h"
-#include "common/textconsole.h"
#include "common/str.h"
diff --git a/common/winexe.h b/common/winexe.h
index af0d70c555..ce2f19cb81 100644
--- a/common/winexe.h
+++ b/common/winexe.h
@@ -27,11 +27,10 @@
#define COMMON_WINEXE_H
#include "common/hash-str.h"
+#include "common/str.h"
namespace Common {
-class String;
-
class WinResourceID {
public:
WinResourceID() { _idType = kIDTypeNull; }
diff --git a/common/winexe_ne.h b/common/winexe_ne.h
index c1d04080ba..2988132040 100644
--- a/common/winexe_ne.h
+++ b/common/winexe_ne.h
@@ -26,15 +26,14 @@
#ifndef COMMON_WINEXE_NE_H
#define COMMON_WINEXE_NE_H
-#include "common/array.h"
#include "common/list.h"
+#include "common/str.h"
#include "common/winexe.h"
namespace Common {
-class MemoryReadStream;
+template<class T> class Array;
class SeekableReadStream;
-class String;
/** The default Windows resources. */
enum NEResourceType {
diff --git a/common/winexe_pe.cpp b/common/winexe_pe.cpp
index 17db004bfc..6bb831b9c6 100644
--- a/common/winexe_pe.cpp
+++ b/common/winexe_pe.cpp
@@ -23,9 +23,10 @@
*
*/
+#include "common/array.h"
#include "common/debug.h"
+#include "common/endian.h"
#include "common/file.h"
-#include "common/memstream.h"
#include "common/str.h"
#include "common/stream.h"
#include "common/winexe_pe.h"
@@ -123,7 +124,7 @@ void PEResources::parseResourceLevel(Section &section, uint32 offset, int level)
uint16 namedEntryCount = _exe->readUint16LE();
uint16 intEntryCount = _exe->readUint16LE();
- for (uint32 i = 0; i < namedEntryCount + intEntryCount; i++) {
+ for (uint32 i = 0; i < (uint32)(namedEntryCount + intEntryCount); i++) {
uint32 value = _exe->readUint32LE();
WinResourceID id;
diff --git a/common/winexe_pe.h b/common/winexe_pe.h
index 5298e993ad..60c4adb916 100644
--- a/common/winexe_pe.h
+++ b/common/winexe_pe.h
@@ -26,14 +26,15 @@
#ifndef COMMON_WINEXE_PE_H
#define COMMON_WINEXE_PE_H
-#include "common/array.h"
+#include "common/hash-str.h"
#include "common/hashmap.h"
+#include "common/str.h"
#include "common/winexe.h"
namespace Common {
+template<class T> class Array;
class SeekableReadStream;
-class String;
/** The default Windows PE resources. */
enum PEResourceType {
diff --git a/common/xmlparser.cpp b/common/xmlparser.cpp
index b53a9a33c2..e2e1dbdfc7 100644
--- a/common/xmlparser.cpp
+++ b/common/xmlparser.cpp
@@ -23,8 +23,14 @@
*
*/
+// FIXME: Avoid using fprintf
+#define FORBIDDEN_SYMBOL_EXCEPTION_fprintf
+
+// FIXME: Avoid using vfprintf
+#define FORBIDDEN_SYMBOL_EXCEPTION_vfprintf
+
+
#include "common/xmlparser.h"
-#include "common/util.h"
#include "common/archive.h"
#include "common/fs.h"
#include "common/memstream.h"
diff --git a/common/xmlparser.h b/common/xmlparser.h
index ec8f371681..c456fd0826 100644
--- a/common/xmlparser.h
+++ b/common/xmlparser.h
@@ -29,6 +29,7 @@
#include "common/scummsys.h"
#include "common/types.h"
+#include "common/fs.h"
#include "common/list.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
@@ -37,7 +38,6 @@
namespace Common {
-class FSNode;
class SeekableReadStream;
#define MAX_XML_DEPTH 8
diff --git a/common/zlib.cpp b/common/zlib.cpp
index 98ecc10c1d..96e9f8cb15 100644
--- a/common/zlib.cpp
+++ b/common/zlib.cpp
@@ -23,6 +23,9 @@
*
*/
+// Disable symbol overrides so that we can use zlib.h
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "common/zlib.h"
#include "common/util.h"
#include "common/stream.h"
diff --git a/configure b/configure
index 297e41e7b3..0eec7cd546 100755
--- a/configure
+++ b/configure
@@ -88,7 +88,7 @@ add_engine drascula "Drascula: The Vampire Strikes Back" yes
add_engine gob "Gobli*ns" yes
add_engine groovie "Groovie" yes "groovie2"
add_engine groovie2 "Groovie 2 games" no
-add_engine hugo "Hugo Trilogy" no
+add_engine hugo "Hugo Trilogy" yes
add_engine kyra "Legend of Kyrandia" yes "lol"
add_engine lol "Lands of Lore" no
add_engine lastexpress "The Last Express" no
@@ -125,6 +125,7 @@ add_engine tucker "Bud Tucker in Double Trouble" yes
# Default lib behaviour yes/no/auto
_vorbis=auto
_tremor=auto
+_tremolo=no
_flac=auto
_mad=auto
_alsa=auto
@@ -147,6 +148,7 @@ _text_console=no
_mt32emu=yes
_build_scalers=yes
_build_hq_scalers=yes
+_arm_asm=no
_indeo3=auto
_enable_prof=no
_unix=no
@@ -172,7 +174,7 @@ _strip=strip
_ar="ar cru"
_as="as"
_windres=windres
-_win32path="C:/scummvm"
+_win32path="build/x86"
_aos4path="Games:ScummVM"
_staticlibpath=/sw
_sdlconfig=sdl-config
@@ -251,12 +253,7 @@ EOF
}
gcc_get_define() {
- # Note: The AmigaOS compiler doesn't like the "-" input file, so a real file
- # is used instead
- rm -f $TMPC
- touch $TMPC
- $CXX -dM -E $TMPC | fgrep "$1" | head -n1 | cut -d ' ' -f 3-
- rm -f $TMPC
+ echo "" | $CXX -dM -E - | fgrep "$1" | head -n1 | cut -d ' ' -f 3-
}
#
@@ -657,7 +654,7 @@ Configuration:
-h, --help display this help and exit
--backend=BACKEND backend to build (android, dc, dingux, ds, gp2x, gph,
iphone, linuxmoto, maemo, n64, null, openpandora, ps2,
- psp, samsungtv, sdl, symbian, webos, wii, wince) [sdl]
+ psp, samsungtv, sdl, webos, wii, wince) [sdl]
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -705,7 +702,8 @@ Special configuration feature:
wince for Windows CE
Game engines:
- --enable-all-engines enable all engines
+ --enable-all-engines enable all engines, including those which are
+ broken or unsupported
--disable-all-engines disable all engines
$engines_help
Optional Features:
@@ -1151,6 +1149,16 @@ webos)
_host_os=webos
_host_cpu=arm
_host_alias=arm-none-linux-gnueabi
+ # The prefix is always the same on WebOS 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=/media/cryptofs/apps/usr/palm/applications/org.scummvm.scummvm
+ # WebOS apps are installed into app-specific directories. The
+ # default directory structure of ScummVM makes no sense here so we
+ # hardcode WebOS specific directories here.
+ datarootdir='${prefix}/data'
+ datadir='${datarootdir}'
+ docdir='${prefix}/doc'
;;
wii)
_host_os=wii
@@ -1527,8 +1535,7 @@ echo_n "Checking hosttype... "
echo $_host_os
case $_host_os in
amigaos*)
- CXXFLAGS="$CXXFLAGS -mcrt=newlib -mstrict-align -mcpu=750 -mtune=7400"
- LDFLAGS="$LDFLAGS -mcrt=newlib -use-dynld -L/sdk/local/newlib/lib"
+ LDFLAGS="$LDFLAGS -use-dynld -L/sdk/local/newlib/lib"
# We have to use 'long' for our 4 byte typedef because AmigaOS already typedefs (u)int32
# as (unsigned) long, and consequently we'd get a compiler error otherwise.
type_4_byte='long'
@@ -1600,9 +1607,9 @@ case $_host_os in
if test "$_dynamic_modules" = no ; then
LDFLAGS="$LDFLAGS -Wl,--gc-sections"
else
- LDFLAGS="$LDFLAGS -Wl,--no-gc-sections"
- # TODO automate this required 2 step linking phase
- # LDFLAGS="$LDFLAGS -Wl,--retain-symbols-file,ds.syms"
+ LDFLAGS="$LDFLAGS -Wl,--no-gc-sections"
+ # TODO automate this required 2 step linking phase
+ # LDFLAGS="$LDFLAGS -Wl,--retain-symbols-file,ds.syms"
fi
LDFLAGS="$LDFLAGS -L$DEVKITPRO/libnds/lib"
LIBS="$LIBS -lnds9"
@@ -1649,7 +1656,7 @@ case $_host_os in
mingw*)
DEFINES="$DEFINES -DWIN32 -D__USE_MINGW_ANSI_STDIO=0"
LIBS="$LIBS -lmingw32 -lwinmm"
- OBJS="$OBJS scummvmico.o"
+ OBJS="$OBJS scummvmwinres.o"
add_line_to_config_mk 'WIN32 = 1'
;;
mint*)
@@ -1680,6 +1687,9 @@ case $_host_os in
_unix=yes
;;
webos)
+ CXXFLAGS="$CXXFLAGS -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL -I$WEBOS_PDK/device/usr/include"
+ # These compiler options are needed to support the Palm Pixi
+ CXXFLAGS="$CXXFLAGS -mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp"
LDFLAGS="$LDFLAGS -L$WEBOS_PDK/device/lib -L$WEBOS_PDK/device/usr/lib"
LDFLAGS="$LDFLAGS -Wl,--allow-shlib-undefined"
LDFLAGS="$LDFLAGS --sysroot=$WEBOS_PDK/arm-gcc/sysroot"
@@ -1722,13 +1732,9 @@ if test -n "$_host"; then
LDFLAGS="$LDFLAGS -shared -Wl,-Bsymbolic,--no-undefined"
HOSTEXEPRE=lib
HOSTEXEEXT=.so
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
_backend="android"
_port_mk="backends/platform/android/android.mk"
+ _arm_asm=yes
_build_scalers=no
_seq_midi=no
_mt32emu=no
@@ -1737,11 +1743,7 @@ if test -n "$_host"; then
arm-linux|arm*-linux-gnueabi|arm-*-linux)
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
;;
arm-riscos|linupy)
DEFINES="$DEFINES -DLINUPY"
@@ -1765,11 +1767,7 @@ if test -n "$_host"; then
ASFLAGS="$ASFLAGS"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="gph"
_build_hq_scalers=no
_vkeybd=yes
@@ -1817,11 +1815,7 @@ if test -n "$_host"; then
DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU"
DEFINES="$DEFINES -DDISABLE_COMMAND_LINE"
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
add_line_to_config_h '#define DISABLE_TEXT_CONSOLE'
_backend="ds"
_build_scalers=no
@@ -1855,11 +1849,7 @@ if test -n "$_host"; then
LDFLAGS="$LDFLAGS -static"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="gph"
_build_hq_scalers=no
_vkeybd=yes
@@ -1879,11 +1869,7 @@ if test -n "$_host"; then
ASFLAGS="$ASFLAGS -mfloat-abi=soft"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="gph"
_build_hq_scalers=no
_vkeybd=yes
@@ -1896,8 +1882,7 @@ if test -n "$_host"; then
DEFINES="$DEFINES -DIPHONE"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
+ _arm_asm=yes
_backend="iphone"
_build_hq_scalers=no
_seq_midi=no
@@ -1928,11 +1913,7 @@ if test -n "$_host"; then
ASFLAGS="$ASFLAGS -mfpu=vfp"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="linuxmoto"
_build_hq_scalers=no
_mt32emu=no
@@ -1945,11 +1926,7 @@ if test -n "$_host"; then
ASFLAGS="$ASFLAGS -mfpu=vfp"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="linuxmoto"
_build_hq_scalers=no
_mt32emu=no
@@ -2000,11 +1977,7 @@ if test -n "$_host"; then
ASFLAGS="$ASFLAGS -mfloat-abi=soft"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="openpandora"
_build_hq_scalers=yes
_vkeybd=no
@@ -2014,6 +1987,7 @@ if test -n "$_host"; then
;;
ppc-amigaos)
_endian=big
+ # AmigaOS exec allocates memory always in an aligned way
_need_memalign=yes
;;
ps2)
@@ -2059,11 +2033,7 @@ if test -n "$_host"; then
HOSTEXEEXT=".so"
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="samsungtv"
_mt32emu=no
_vkeybd=yes
@@ -2071,11 +2041,7 @@ if test -n "$_host"; then
webos)
_unix=yes
_need_memalign=yes
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
_backend="webos"
_port_mk="backends/platform/webos/webos.mk"
_build_scalers=no
@@ -2103,12 +2069,8 @@ if test -n "$_host"; then
wince)
LDFLAGS="$LDFLAGS -Wl,-Map,scummvm.exe.map -Wl,--stack,65536"
_need_memalign=yes
- add_line_to_config_mk 'USE_TREMOLO = 1'
- add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1'
- add_line_to_config_mk 'USE_ARM_GFX_ASM = 1'
- add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1'
- add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
+ _arm_asm=yes
+ _tremolo=yes
_backend="wince"
_mt32emu=no
_port_mk="backends/platform/wince/wince.mk"
@@ -2336,7 +2298,7 @@ POST_OBJS_FLAGS := -Wl,-no-whole-archive
LIBS += -ldl
'
;;
- linux* | webos)
+ linux*)
_def_plugin='
#define PLUGIN_PREFIX "lib"
#define PLUGIN_SUFFIX ".so"
@@ -2386,6 +2348,24 @@ LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/psp/main_prog.ld
PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/psp/plugin.ld -lstdc++ -lc
'
;;
+ webos)
+_def_plugin='
+#define PLUGIN_PREFIX "lib"
+#define PLUGIN_SUFFIX ".so"
+'
+_mak_plugins='
+DYNAMIC_MODULES := 1
+PLUGIN_PREFIX := lib
+PLUGIN_SUFFIX := .so
+PLUGIN_EXTRA_DEPS =
+CXXFLAGS += -DDYNAMIC_MODULES
+CXXFLAGS += -fpic
+PLUGIN_LDFLAGS += -shared $(LDFLAGS)
+PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive
+POST_OBJS_FLAGS := -Wl,-no-whole-archive
+LIBS += -ldl
+'
+ ;;
*)
_dynamic_modules=no
_mak_plugins=
@@ -2438,6 +2418,15 @@ define_in_config_if_yes "$_build_scalers" 'USE_SCALERS'
define_in_config_if_yes "$_build_hq_scalers" 'USE_HQ_SCALERS'
#
+# Check whether to use optimized ARM asm
+#
+define_in_config_if_yes "$_arm_asm" 'USE_ARM_SCALER_ASM'
+define_in_config_if_yes "$_arm_asm" 'USE_ARM_SOUND_ASM'
+define_in_config_if_yes "$_arm_asm" 'USE_ARM_SMUSH_ASM'
+define_in_config_if_yes "$_arm_asm" 'USE_ARM_GFX_ASM'
+define_in_config_if_yes "$_arm_asm" 'USE_ARM_COSTUME_ASM'
+
+#
# Check whether to compile the Indeo3 decoder
#
if test "$_indeo3" = auto ; then
@@ -2482,6 +2471,10 @@ echo "$_vorbis"
# Check for Tremor
#
echocheck "Tremor"
+if test "$_tremolo" = yes ; then
+ _tremor=yes
+fi
+
if test "$_tremor" = auto ; then
_tremor=no
cat > $TMPC << EOF
@@ -2494,7 +2487,12 @@ fi
if test "$_tremor" = yes && test "$_vorbis" = no; then
add_line_to_config_h '#define USE_TREMOR'
add_line_to_config_h '#define USE_VORBIS'
- LIBS="$LIBS $TREMOR_LIBS -lvorbisidec"
+ if test "$_tremolo" = yes ; then
+ add_line_to_config_h '#define USE_TREMOLO'
+ LIBS="$LIBS $TREMOR_LIBS -ltremolo"
+ else
+ LIBS="$LIBS $TREMOR_LIBS -lvorbisidec"
+ fi
INCLUDES="$INCLUDES $TREMOR_CFLAGS"
else
if test "$_vorbis" = yes; then
@@ -2989,6 +2987,11 @@ case $_backend in
# Add ../plugins as a path so plugins can be found when running from a .PND.
DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"../plugins\\\""
;;
+ webos)
+ # The WebOS app wants the plugins in the "lib" directory
+ # without a scummvm sub directory.
+ DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir\\\""
+ ;;
*)
DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir/scummvm\\\""
;;
@@ -3137,6 +3140,7 @@ case $_backend in
INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`"
LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`"
LDFLAGS="$LDFLAGS"
+ DEFINES="$DEFINES -DSDL_BACKEND"
;;
ps2)
# TODO ps2
@@ -3167,8 +3171,8 @@ case $_backend in
DEFINES="$DEFINES -DSDL_BACKEND"
;;
webos)
- INCLUDES="$INCLUDES -I$WEBOS_PDK/include -I$WEBOS_PDK/include/SDL -I$WEBOS_PDK/device/usr/include"
- LIBS="$LIBS -lSDL -lpdl"
+ # There is no sdl-config in the WebOS PDK so we don't use find_sdlconfig here.
+ LIBS="$LIBS -lSDL"
DEFINES="$DEFINES -DSDL_BACKEND -DWEBOS"
MODULES="$MODULES backends/platform/sdl"
;;
diff --git a/devtools/create_drascula/staticdata.h b/devtools/create_drascula/staticdata.h
index 51ed995884..f45af487b1 100644
--- a/devtools/create_drascula/staticdata.h
+++ b/devtools/create_drascula/staticdata.h
@@ -6041,7 +6041,7 @@ const char *_texthis[NUM_LANGS][NUM_TEXTHIS] = {
},
{
"",
- "Vor einer langen Zeit scheint Drascula Von Brauns Frau getoetet zu haben und als Von Braun sich dann den Grafen vorknoepfen wollte, begann er damit, alles, was er ueber Vampire finden konnte, in Erfahrung zu bringen.",
+ "Vor langer Zeit scheint Drascula Von Brauns Frau getoetet zu haben. Um sich den Grafen vorzuknoepfen, fing Von Braun an, alles, was er ueber Vampire finden konnte, in Erfahrung zu bringen.",
"Als er glaubte, er sei bereit, ging er hoch zum Schloss und hatte eine aeusserst gewaltsame Auseinandersetzung mit Drascula.",
"Niemand weiss, was genau dort passierte. Obwohl Von Braun verlor, konnte Drascula ihn nicht toeten.",
"Von Braun fuehlte sich durch seine Niederlage gedemuetigt. Er rannte vom Schloss fort und wagte es nie wieder, Drascula gegenueberzutreten."
diff --git a/devtools/create_lure/create_lure_dat.cpp b/devtools/create_lure/create_lure_dat.cpp
index ad883b808f..4964b26903 100644
--- a/devtools/create_lure/create_lure_dat.cpp
+++ b/devtools/create_lure/create_lure_dat.cpp
@@ -503,7 +503,7 @@ void read_hotspot_data(byte *&data, uint16 &totalSize) {
r->tickSequenceOffset = entry.tickSequenceOffset;
r->layer = entry.layer;
- r->colourOffset = entry.colourOffset;
+ r->colorOffset = entry.colorOffset;
r->hotspotScriptOffset = entry.hotspotScriptOffset;
r->talkScriptOffset = entry.talkScriptOffset;
r->flags = entry.flags;
diff --git a/devtools/create_lure/create_lure_dat.h b/devtools/create_lure/create_lure_dat.h
index 4743f6ac3f..23090072bd 100644
--- a/devtools/create_lure/create_lure_dat.h
+++ b/devtools/create_lure/create_lure_dat.h
@@ -125,7 +125,7 @@ struct HotspotResource {
uint16 yCorrection;
uint16 tickTimeout;
uint16 animOffset;
- byte colourOffset;
+ byte colorOffset;
uint16 hotspotScriptOffset;
byte unused1[7];
uint16 talkScriptOffset;
@@ -166,7 +166,7 @@ struct HotspotResourceOutput {
uint16 walkY;
int8 talkX;
int8 talkY;
- uint16 colourOffset;
+ uint16 colorOffset;
uint16 animRecordId;
uint16 hotspotScriptOffset;
uint16 talkScriptOffset;
diff --git a/devtools/create_project/codeblocks.cpp b/devtools/create_project/codeblocks.cpp
index d803fb0a37..8ca139e515 100644
--- a/devtools/create_project/codeblocks.cpp
+++ b/devtools/create_project/codeblocks.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "config.h"
#include "codeblocks.h"
#include <fstream>
@@ -34,20 +35,20 @@ CodeBlocksProvider::CodeBlocksProvider(StringList &global_warnings, std::map<std
}
void CodeBlocksProvider::createWorkspace(const BuildSetup &setup) {
- std::ofstream workspace((setup.outputDir + '/' + "scummvm.workspace").c_str());
+ std::ofstream workspace((setup.outputDir + '/' + PROJECT_NAME + ".workspace").c_str());
if (!workspace)
- error("Could not open \"" + setup.outputDir + '/' + "scummvm.workspace\" for writing");
+ error("Could not open \"" + setup.outputDir + '/' + PROJECT_NAME + ".workspace\" for writing");
workspace << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n"
"<CodeBlocks_workspace_file>\n";
- workspace << "\t<Workspace title=\"ScummVM\">\n";
+ workspace << "\t<Workspace title=\"" << PROJECT_DESCRIPTION << "\">\n";
writeReferences(workspace);
// Note we assume that the UUID map only includes UUIDs for enabled engines!
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
- if (i->first == "scummvm")
+ if (i->first == PROJECT_NAME)
continue;
workspace << "\t\t<Project filename=\"" << i->first << ".cbp\" />\n";
@@ -59,7 +60,7 @@ void CodeBlocksProvider::createWorkspace(const BuildSetup &setup) {
// HACK We need to pre-process library names
// since the MSVC and mingw precompiled
-// librarie have different names :(
+// libraries have different names :(
std::string processLibraryName(std::string name) {
// Remove "_static" in lib name
size_t pos = name.find("_static");
@@ -90,16 +91,16 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
"\t\t<Option compiler=\"gcc\" />\n"
"\t\t<Build>\n";
- if (name == "scummvm") {
+ if (name == PROJECT_NAME) {
std::string libraries;
for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i)
libraries += processLibraryName(*i) + ".a;";
project << "\t\t\t<Target title=\"default\">\n"
- "\t\t\t\t<Option output=\"scummvm\\scummvm\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
- "\t\t\t\t<Option object_output=\"scummvm\" />\n"
- "\t\t\t\t<Option external_deps=\"" << libraries /* + list of engines scummvm\engines\name\name.a */ << "\" />\n"
+ "\t\t\t\t<Option output=\"" << PROJECT_NAME << "\\" << PROJECT_NAME << "\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
+ "\t\t\t\t<Option object_output=\"" << PROJECT_NAME << "\" />\n"
+ "\t\t\t\t<Option external_deps=\"" << libraries /* + list of engines engines\name\name.a */ << "\" />\n"
"\t\t\t\t<Option type=\"1\" />\n"
"\t\t\t\t<Option compiler=\"gcc\" />\n"
"\t\t\t\t<Option parameters=\"-d 8 --debugflags=parser\" />\n"
@@ -112,8 +113,8 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
writeWarnings(name, project);
writeDefines(setup.defines, project);
- project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)include\" />\n"
- "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)include\\SDL\" />\n"
+ project << "\t\t\t\t\t<Add directory=\"$(" << LIBS_DEFINE << ")include\" />\n"
+ "\t\t\t\t\t<Add directory=\"$(" << LIBS_DEFINE << ")include\\SDL\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\\engines\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\\common\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\" />\n"
@@ -127,21 +128,21 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
project << "\t\t\t\t\t<Add library=\"" << processLibraryName(*i) << "\" />\n";
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
- if (i->first == "scummvm")
+ if (i->first == PROJECT_NAME)
continue;
- project << "\t\t\t\t\t<Add library=\"scummvm\\engines\\" << i->first << "\\lib" << i->first << ".a\" />\n";
+ project << "\t\t\t\t\t<Add library=\"" << PROJECT_NAME << "\\engines\\" << i->first << "\\lib" << i->first << ".a\" />\n";
}
- project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)lib\\mingw\" />\n"
- "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)lib\" />\n"
+ project << "\t\t\t\t\t<Add directory=\"$(" << LIBS_DEFINE << ")lib\\mingw\" />\n"
+ "\t\t\t\t\t<Add directory=\"$(" << LIBS_DEFINE << ")lib\" />\n"
"\t\t\t\t</Linker>\n";
//////////////////////////////////////////////////////////////////////////
// Resource compiler
project << "\t\t\t\t<ResourceCompiler>\n"
"\t\t\t\t\t<Add directory=\"..\\..\\dists\" />\n"
- "\t\t\t\t\t<Add directory=\"..\\..\\..\\scummvm\" />\n"
+ "\t\t\t\t\t<Add directory=\"..\\..\\..\\" << PROJECT_NAME << "\" />\n"
"\t\t\t\t</ResourceCompiler>\n"
"\t\t\t</Target>\n"
"\t\t</Build>\n";
@@ -150,9 +151,9 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
} else {
project << "\t\t\t<Target title=\"default\">\n"
- "\t\t\t\t<Option output=\"scummvm\\engines\\" << name << "\\lib" << name << "\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
+ "\t\t\t\t<Option output=\"" << PROJECT_NAME << "\\engines\\" << name << "\\lib" << name << "\" prefix_auto=\"1\" extension_auto=\"1\" />\n"
"\t\t\t\t<Option working_dir=\"\" />\n"
- "\t\t\t\t<Option object_output=\"scummvm\" />\n"
+ "\t\t\t\t<Option object_output=\"" << PROJECT_NAME << "\" />\n"
"\t\t\t\t<Option type=\"2\" />\n"
"\t\t\t\t<Option compiler=\"gcc\" />\n"
"\t\t\t\t<Option createDefFile=\"1\" />\n"
@@ -163,11 +164,11 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
project << "\t\t\t\t\t<Add option=\"-g\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\\engines\" />\n"
- "\t\t\t\t\t<Add directory=\"..\\..\\..\\scummvm\" />\n";
+ "\t\t\t\t\t<Add directory=\"..\\..\\..\\" << PROJECT_NAME << "\" />\n";
// Sword2.5 engine needs theora and vorbis includes
if (name == "sword25")
- project << "\t\t\t\t\t<Add directory=\"$(SCUMMVM_LIBS)include\" />\n";
+ project << "\t\t\t\t\t<Add directory=\"$(" << LIBS_DEFINE << ")include\" />\n";
project << "\t\t\t\t</Compiler>\n"
"\t\t\t</Target>\n"
@@ -233,7 +234,7 @@ void CodeBlocksProvider::writeFileListToProject(const FileNode &dir, std::ofstre
"\t\t</Unit>\n";
} else if (ext == "asm") {
projectFile << "\t\t<Unit filename=\"" << convertPathToWin(filePrefix + node->name) << "\">\n"
- "\t\t\t<Option compiler=\"gcc\" use=\"1\" buildCommand=\"$(SCUMMVM_LIBS)bin/nasm.exe -f win32 -g $file -o $object\" />"
+ "\t\t\t<Option compiler=\"gcc\" use=\"1\" buildCommand=\"$(" << LIBS_DEFINE << ")bin/nasm.exe -f win32 -g $file -o $object\" />"
"\t\t</Unit>\n";
} else {
projectFile << "\t\t<Unit filename=\"" << convertPathToWin(filePrefix + node->name) << "\" />\n";
@@ -243,10 +244,10 @@ void CodeBlocksProvider::writeFileListToProject(const FileNode &dir, std::ofstre
}
void CodeBlocksProvider::writeReferences(std::ofstream &output) {
- output << "\t\t<Project filename=\"scummvm.cbp\" active=\"1\">\n";
+ output << "\t\t<Project filename=\"" << PROJECT_NAME << ".cbp\" active=\"1\">\n";
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
- if (i->first == "scummvm")
+ if (i->first == " << PROJECT_NAME << ")
continue;
output << "\t\t\t<Depends filename=\"" << i->first << ".cbp\" />\n";
diff --git a/devtools/create_project/codeblocks/create_project.cbp b/devtools/create_project/codeblocks/create_project.cbp
index 9078ddcd51..25b12d8cc2 100644
--- a/devtools/create_project/codeblocks/create_project.cbp
+++ b/devtools/create_project/codeblocks/create_project.cbp
@@ -36,6 +36,7 @@
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
+ <Unit filename="..\config.h" />
<Unit filename="..\codeblocks.cpp" />
<Unit filename="..\codeblocks.h" />
<Unit filename="..\create_project.cpp" />
diff --git a/backends/plugins/dc/dc-provider.h b/devtools/create_project/config.h
index 55413ade5a..1609e9e99a 100644
--- a/backends/plugins/dc/dc-provider.h
+++ b/devtools/create_project/config.h
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -23,20 +23,16 @@
*
*/
-#ifndef BACKENDS_PLUGINS_DC_H
-#define BACKENDS_PLUGINS_DC_H
-
-#include "base/plugins.h"
-
-#if defined(DYNAMIC_MODULES) && defined(__DC__)
-
-class DCPluginProvider : public FilePluginProvider {
-protected:
- Plugin* createPlugin(const Common::FSNode &node) const;
+#ifndef TOOLS_CREATE_PROJECT_CONFIG_H
+#define TOOLS_CREATE_PROJECT_CONFIG_H
- bool isPluginFilename(const Common::FSNode &node) const;
-};
+#define PROJECT_DESCRIPTION "ScummVM" // Used in console output and build configuration
+#define PROJECT_NAME "scummvm" // Used for folders, icons, resources and project/solution name
+#define LIBS_DEFINE "SCUMMVM_LIBS" // Name of the include environment variable
+#define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION"
-#endif // defined(DYNAMIC_MODULES) && defined(__DC__)
+#define HAS_VIDEO_FOLDER 1
+//#define ADDITIONAL_LIBRARY ""
+#define NEEDS_RTTI 0
-#endif
+#endif // TOOLS_CREATE_PROJECT_CONFIG_H
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index b896e85131..de82dd1698 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -29,6 +29,7 @@
#undef main
#endif // main
+#include "config.h"
#include "create_project.h"
#include "codeblocks.h"
@@ -150,7 +151,7 @@ int main(int argc, char *argv[]) {
using std::cout;
for (int i = 2; i < argc; ++i) {
if (!std::strcmp(argv[i], "--list-engines")) {
- cout << " The following enables are available in the ScummVM source distribution\n"
+ cout << " The following enables are available in the " PROJECT_DESCRIPTION " source distribution\n"
" located at \"" << srcDir << "\":\n";
cout << " state | name | description\n\n";
@@ -244,6 +245,9 @@ int main(int argc, char *argv[]) {
} else if (!std::strcmp(argv[i], "--build-events")) {
setup.runBuildEvents = true;
+ } else if (!std::strcmp(argv[i], "--installer")) {
+ setup.runBuildEvents = true;
+ setup.createInstaller = true;
} else {
std::cerr << "ERROR: Unknown parameter \"" << argv[i] << "\"\n";
return -1;
@@ -289,20 +293,17 @@ int main(int argc, char *argv[]) {
setup.libraries.push_back("sdl");
setup.libraries.push_back("winmm");
-// Initialize global & project-specific warnings
-#define SET_GLOBAL_WARNINGS(...) \
- { \
- std::string global[PP_NARG(__VA_ARGS__)] = { __VA_ARGS__ }; \
- globalWarnings.assign(global, global + (sizeof(global) / sizeof(global[0]))); \
- }
-
-#define SET_WARNINGS(name, ...) \
- { \
- std::string project[PP_NARG(__VA_ARGS__)] = { __VA_ARGS__ }; \
- projectWarnings[name].assign(project, project + (sizeof(project) / sizeof(project[0]))); \
- }
+ // Add additional project-specific library
+#ifdef ADDITIONAL_LIBRARY
+ setup.libraries.push_back(ADDITIONAL_LIBRARY);
+#endif
// List of global warnings and map of project-specific warnings
+ // FIXME: As shown below these two structures have different behavior for
+ // Code::Blocks and MSVC. In Code::Blocks this is used to enable *and*
+ // disable certain warnings (and some other not warning related flags
+ // actually...). While in MSVC this is solely for disabling warnings.
+ // That is really not nice. We should consider a nicer way of doing this.
StringList globalWarnings;
std::map<std::string, StringList> projectWarnings;
@@ -336,9 +337,23 @@ int main(int argc, char *argv[]) {
//
////////////////////////////////////////////////////////////////////////////
- SET_GLOBAL_WARNINGS("-Wall", "-Wno-long-long", "-Wno-multichar", "-Wno-unknown-pragmas", "-Wno-reorder",
- "-Wpointer-arith", "-Wcast-qual", "-Wcast-align", "-Wshadow", "-Wimplicit",
- "-Wnon-virtual-dtor", "-Wwrite-strings", "-fno-rtti", "-fno-exceptions", "-fcheck-new");
+ globalWarnings.push_back("-Wall");
+ globalWarnings.push_back("-Wno-long-long");
+ globalWarnings.push_back("-Wno-multichar");
+ globalWarnings.push_back("-Wno-unknown-pragmas");
+ globalWarnings.push_back("-Wno-reorder");
+ globalWarnings.push_back("-Wpointer-arith");
+ globalWarnings.push_back("-Wcast-qual");
+ globalWarnings.push_back("-Wcast-align");
+ globalWarnings.push_back("-Wshadow");
+ globalWarnings.push_back("-Wimplicit");
+ globalWarnings.push_back("-Wnon-virtual-dtor");
+ globalWarnings.push_back("-Wwrite-strings");
+ // The following are not warnings at all... We should consider adding them to
+ // a different list of parameters.
+ globalWarnings.push_back("-fno-rtti");
+ globalWarnings.push_back("-fno-exceptions");
+ globalWarnings.push_back("-fcheck-new");
provider = new CreateProjectTool::CodeBlocksProvider(globalWarnings, projectWarnings);
@@ -415,12 +430,35 @@ int main(int argc, char *argv[]) {
//
////////////////////////////////////////////////////////////////////////////
- SET_GLOBAL_WARNINGS("4068", "4100", "4103", "4127", "4244", "4250", "4310", "4351", "4512", "4702", "4706", "4800", "4996", "6204", "6211", "6385", "6386");
- SET_WARNINGS("agi", "4510", "4610");
- SET_WARNINGS("agos", "4511");
- SET_WARNINGS("lure", "4189", "4355");
- SET_WARNINGS("kyra", "4355");
- SET_WARNINGS("m4", "4355");
+ globalWarnings.push_back("4068");
+ globalWarnings.push_back("4100");
+ globalWarnings.push_back("4103");
+ globalWarnings.push_back("4127");
+ globalWarnings.push_back("4244");
+ globalWarnings.push_back("4250");
+ globalWarnings.push_back("4310");
+ globalWarnings.push_back("4351");
+ globalWarnings.push_back("4512");
+ globalWarnings.push_back("4702");
+ globalWarnings.push_back("4706");
+ globalWarnings.push_back("4800");
+ globalWarnings.push_back("4996");
+ globalWarnings.push_back("6204");
+ globalWarnings.push_back("6211");
+ globalWarnings.push_back("6385");
+ globalWarnings.push_back("6386");
+
+ projectWarnings["agi"].push_back("4510");
+ projectWarnings["agi"].push_back("4610");
+
+ projectWarnings["agos"].push_back("4511");
+
+ projectWarnings["lure"].push_back("4189");
+ projectWarnings["lure"].push_back("4355");
+
+ projectWarnings["kyra"].push_back("4355");
+
+ projectWarnings["m4"].push_back("4355");
if (msvcVersion == 8 || msvcVersion == 9)
provider = new CreateProjectTool::VisualStudioProvider(globalWarnings, projectWarnings, msvcVersion);
@@ -456,7 +494,7 @@ void displayHelp(const char *exe) {
cout << "Usage:\n"
<< exe << " path\\to\\source [optional options]\n"
<< "\n"
- << " Creates project files for the ScummVM source located at \"path\\to\\source\".\n"
+ << " Creates project files for the " PROJECT_DESCRIPTION " source located at \"path\\to\\source\".\n"
" The project files will be created in the directory where tool is run from and\n"
" will include \"path\\to\\source\" for relative file paths, thus be sure that you\n"
" pass a relative file path like \"..\\..\\trunk\".\n"
@@ -481,15 +519,17 @@ void displayHelp(const char *exe) {
" The default is \"9\", thus \"Visual Studio 2008\"\n"
" --build-events Run custom build events as part of the build\n"
" (default: false)\n"
+ " --installer Create NSIS installer after the build (implies --build-events)\n"
+ " (default: false)\n"
"\n"
- "ScummVM engine settings:\n"
+ "Engines settings:\n"
" --list-engines list all available engines and their default state\n"
" --enable-engine enable building of the engine with the name \"engine\"\n"
" --disable-engine disable building of the engine with the name \"engine\"\n"
" --enable-all-engines enable building of all engines\n"
" --disable-all-engines disable building of all engines\n"
"\n"
- "ScummVM optional feature settings:\n"
+ "Optional features settings:\n"
" --enable-name enable inclusion of the feature \"name\"\n"
" --disable-name disable inclusion of the feature \"name\"\n"
"\n"
@@ -686,25 +726,26 @@ TokenList tokenize(const std::string &input) {
namespace {
const Feature s_features[] = {
// Libraries
- { "libz", "USE_ZLIB", "zlib", true, "zlib (compression) support" },
- { "mad", "USE_MAD", "libmad", true, "libmad (MP3) support" },
+ { "libz", "USE_ZLIB", "zlib", true, "zlib (compression) support" },
+ { "mad", "USE_MAD", "libmad", true, "libmad (MP3) support" },
{ "vorbis", "USE_VORBIS", "libvorbisfile_static libvorbis_static libogg_static", true, "Ogg Vorbis support" },
- { "flac", "USE_FLAC", "libFLAC_static", true, "FLAC support" },
- { "png", "USE_PNG", "libpng", true, "libpng support" },
- { "theora", "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" },
- { "mpeg2", "USE_MPEG2", "libmpeg2", false, "mpeg2 codec for cutscenes" },
-
- // ScummVM feature flags
- { "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.
+ { "flac", "USE_FLAC", "libFLAC_static", true, "FLAC support" },
+ { "png", "USE_PNG", "libpng", true, "libpng support" },
+ { "theora", "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" },
+ { "mpeg2", "USE_MPEG2", "libmpeg2", false, "mpeg2 codec for cutscenes" },
+
+ // Feature flags
+ { "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" },
- { "indeo3", "USE_INDEO3", "", true, "Indeo3 codec support"},
- { "translation", "USE_TRANSLATION", "", true, "Translation support" },
- { "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there
- // is just no current way of properly detecting this...
+ { "indeo3", "USE_INDEO3", "", true, "Indeo3 codec 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
+ // is just no current way of properly detecting this...
};
} // End of anonymous namespace
@@ -791,9 +832,10 @@ bool producesObjectFile(const std::string &fileName) {
* Checks whether the give file in the specified directory is present in the given
* file list.
*
- * This function does as special match against the file list. It will not take file
- * extensions into consideration, when the extension of a file in the specified
- * directory is one of "h", "cpp", "c" or "asm".
+ * This function does as special match against the file list. Object files (.o) are
+ * excluded by default and it will not take file extensions into consideration,
+ * when the extension of a file in the specified directory is one of "h", "cpp",
+ * "c" or "asm".
*
* @param dir Parent directory of the file.
* @param fileName File name to match.
@@ -823,7 +865,9 @@ bool isInList(const std::string &dir, const std::string &fileName, const StringL
}
const std::string lastPathComponent = getLastPathComponent(*i);
- if (!producesObjectFile(fileName) && extensionName != "h") {
+ if (extensionName == "o") {
+ return false;
+ } else if (!producesObjectFile(fileName) && extensionName != "h") {
if (fileName == lastPathComponent)
return true;
} else {
@@ -977,7 +1021,7 @@ void ProjectProvider::createProject(const BuildSetup &setup) {
_uuidMap = createUUIDMap(setup);
// We also need to add the UUID of the main project file.
- const std::string svmUUID = _uuidMap["scummvm"] = createUUID();
+ const std::string svmUUID = _uuidMap[PROJECT_NAME] = createUUID();
// Create Solution/Workspace file
createWorkspace(setup);
@@ -986,7 +1030,7 @@ void ProjectProvider::createProject(const BuildSetup &setup) {
// Create engine project files
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
- if (i->first == "scummvm")
+ if (i->first == PROJECT_NAME)
continue;
in.clear(); ex.clear();
@@ -996,10 +1040,10 @@ void ProjectProvider::createProject(const BuildSetup &setup) {
createProjectFile(i->first, i->second, setup, moduleDir, in, ex);
}
- // Last but not least create the main ScummVM project file.
+ // Last but not least create the main project file.
in.clear(); ex.clear();
- // File list for the ScummVM project file
+ // File list for the Project file
createModuleList(setup.srcDir + "/backends", setup.defines, in, ex);
createModuleList(setup.srcDir + "/backends/platform/sdl", setup.defines, in, ex);
createModuleList(setup.srcDir + "/base", setup.defines, in, ex);
@@ -1009,11 +1053,13 @@ void ProjectProvider::createProject(const BuildSetup &setup) {
createModuleList(setup.srcDir + "/gui", setup.defines, in, ex);
createModuleList(setup.srcDir + "/audio", setup.defines, in, ex);
createModuleList(setup.srcDir + "/audio/softsynth/mt32", setup.defines, in, ex);
+#if HAS_VIDEO_FOLDER
createModuleList(setup.srcDir + "/video", setup.defines, in, ex);
+#endif
// Resource files
- in.push_back(setup.srcDir + "/icons/scummvm.ico");
- in.push_back(setup.srcDir + "/dists/scummvm.rc");
+ in.push_back(setup.srcDir + "/icons/" + PROJECT_NAME + ".ico");
+ in.push_back(setup.srcDir + "/dists/" + PROJECT_NAME + ".rc");
// Various text files
in.push_back(setup.srcDir + "/AUTHORS");
@@ -1024,8 +1070,8 @@ void ProjectProvider::createProject(const BuildSetup &setup) {
in.push_back(setup.srcDir + "/README");
in.push_back(setup.srcDir + "/TODO");
- // Create the scummvm project file.
- createProjectFile("scummvm", svmUUID, setup, setup.srcDir, in, ex);
+ // Create the main project file.
+ createProjectFile(PROJECT_NAME, svmUUID, setup, setup.srcDir, in, ex);
// Create other misc. build files
createOtherBuildFiles(setup);
@@ -1179,10 +1225,20 @@ void ProjectProvider::createModuleList(const std::string &moduleDir, const Strin
tokens = tokenize(line);
i = tokens.begin();
} else {
- if (shouldInclude.top())
- includeList.push_back(moduleDir + "/" + unifyPath(*i));
- else
- excludeList.push_back(moduleDir + "/" + unifyPath(*i));
+ const std::string filename = moduleDir + "/" + unifyPath(*i);
+
+ if (shouldInclude.top()) {
+ // In case we should include a file, we need to make
+ // sure it is not in the exclude list already. If it
+ // is we just drop it from the exclude list.
+ excludeList.remove(filename);
+
+ includeList.push_back(filename);
+ } else if (std::find(includeList.begin(), includeList.end(), filename) == includeList.end()) {
+ // We only add the file to the exclude list in case it
+ // has not yet been added to the include list.
+ excludeList.push_back(filename);
+ }
++i;
}
}
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 8c4b8c7d23..e4ccd7313a 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -32,34 +32,6 @@
#include <cassert>
-// The PP_NARG macro returns the number of arguments that have been passed to it.
-#define PP_NARG(...) \
- PP_NARG_(__VA_ARGS__,PP_RSEQ_N())
-#define PP_NARG_(...) \
- PP_ARG_N(__VA_ARGS__)
-#define PP_ARG_N( \
- _1, _2, _3, _4, _5, _6, _7, _8, _9,_10, \
- _11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \
- _21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \
- _31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \
- _41,_42,_43,_44,_45,_46,_47,_48,_49,_50, \
- _51,_52,_53,_54,_55,_56,_57,_58,_59,_60, \
- _61,_62,_63,N,...) N
-#define PP_RSEQ_N() \
- 63,62,61,60, \
- 59,58,57,56,55,54,53,52,51,50, \
- 49,48,47,46,45,44,43,42,41,40, \
- 39,38,37,36,35,34,33,32,31,30, \
- 29,28,27,26,25,24,23,22,21,20, \
- 19,18,17,16,15,14,13,12,11,10, \
- 9,8,7,6,5,4,3,2,1,0
-
-#define SET_VALUES(list, ...) \
- { \
- std::string values[PP_NARG(__VA_ARGS__)] = { __VA_ARGS__ }; \
- list.assign(values, values + (sizeof(values) / sizeof(values[0]))); \
- }
-
typedef std::list<std::string> StringList;
/**
@@ -105,13 +77,13 @@ struct EngineDesc {
typedef std::list<EngineDesc> EngineDescList;
/**
- * This function parses the ScummVM configure file and creates a list
+ * This function parses the project configure file and creates a list
* of available engines.
*
* It will also automatically setup the default build state (enabled
* or disabled) to the state specified in the "configure" file.
*
- * @param srcDir Path to the root of the ScummVM source.
+ * @param srcDir Path to the root of the project source.
* @return List of available engines.
*/
EngineDescList parseConfigure(const std::string &srcDir);
@@ -206,11 +178,11 @@ bool setFeatureBuildState(const std::string &name, FeatureList &features, bool e
* Structure to describe a build setup.
*
* This includes various information about which engines to
- * enable, which features should be built into ScummVM.
- * It also contains the path to the ScummVM souce root.
+ * enable, which features should be built into the main executable.
+ * It also contains the path to the project source root.
*/
struct BuildSetup {
- std::string srcDir; ///< Path to the ScummVM sources.
+ std::string srcDir; ///< Path to the sources.
std::string filePrefix; ///< Prefix for the relative path arguments in the project files.
std::string outputDir; ///< Path where to put the MSVC project files.
@@ -220,10 +192,12 @@ struct BuildSetup {
StringList defines; ///< List of all defines for the build.
StringList libraries; ///< List of all external libraries required for the build.
- bool runBuildEvents;
+ bool runBuildEvents; ///< Run build events as part of the build (generate revision number and copy engine/theme data & needed files to the build folder
+ bool createInstaller; ///< Create NSIS installer after the build
BuildSetup() {
- runBuildEvents = false;
+ runBuildEvents = false;
+ createInstaller = false;
}
};
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 73511218b4..f9a2e936f0 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -23,10 +23,10 @@
*
*/
+#include "config.h"
#include "msbuild.h"
#include <fstream>
-
#include <algorithm>
namespace CreateProjectTool {
@@ -52,22 +52,29 @@ int MSBuildProvider::getVisualStudioVersion() {
return 2010;
}
-#define OUTPUT_CONFIGURATION_MSBUILD(config, platform) \
- (project << "\t\t<ProjectConfiguration Include=\"" << config << "|" << platform << "\">\n" \
- "\t\t\t<Configuration>" << config << "</Configuration>\n" \
- "\t\t\t<Platform>" << platform << "</Platform>\n" \
- "\t\t</ProjectConfiguration>\n")
+namespace {
+
+inline void outputConfiguration(std::ostream &project, const std::string &config, const std::string &platform) {
+ project << "\t\t<ProjectConfiguration Include=\"" << config << "|" << platform << "\">\n"
+ "\t\t\t<Configuration>" << config << "</Configuration>\n"
+ "\t\t\t<Platform>" << platform << "</Platform>\n"
+ "\t\t</ProjectConfiguration>\n";
+}
+
+inline void outputConfigurationType(std::ostream &project, const std::string &name, const std::string &config) {
+ project << "\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"Configuration\">\n"
+ "\t\t<ConfigurationType>" << (name == PROJECT_NAME ? "Application" : "StaticLibrary") << "</ConfigurationType>\n"
+ "\t</PropertyGroup>\n";
+}
-#define OUTPUT_CONFIGURATION_TYPE_MSBUILD(config) \
- (project << "\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"Configuration\">\n" \
- "\t\t<ConfigurationType>" << (name == "scummvm" ? "Application" : "StaticLibrary") << "</ConfigurationType>\n" \
- "\t</PropertyGroup>\n")
+inline void outputProperties(std::ostream &project, const std::string &config, const std::string &properties) {
+ project << "\t<ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"PropertySheets\">\n"
+ "\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n"
+ "\t\t<Import Project=\"" << properties << "\" />\n"
+ "\t</ImportGroup>\n";
+}
-#define OUTPUT_PROPERTIES_MSBUILD(config, properties) \
- (project << "\t<ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"PropertySheets\">\n" \
- "\t\t<Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n" \
- "\t\t<Import Project=\"" << properties << "\" />\n" \
- "\t</ImportGroup>\n")
+} // End of anonymous namespace
void MSBuildProvider::createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir,
const StringList &includeList, const StringList &excludeList) {
@@ -80,12 +87,12 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
"<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
"\t<ItemGroup Label=\"ProjectConfigurations\">\n";
- OUTPUT_CONFIGURATION_MSBUILD("Debug", "Win32");
- OUTPUT_CONFIGURATION_MSBUILD("Debug", "x64");
- OUTPUT_CONFIGURATION_MSBUILD("Analysis", "Win32");
- OUTPUT_CONFIGURATION_MSBUILD("Analysis", "x64");
- OUTPUT_CONFIGURATION_MSBUILD("Release", "Win32");
- OUTPUT_CONFIGURATION_MSBUILD("Release", "x64");
+ outputConfiguration(project, "Debug", "Win32");
+ outputConfiguration(project, "Debug", "x64");
+ outputConfiguration(project, "Analysis", "Win32");
+ outputConfiguration(project, "Analysis", "x64");
+ outputConfiguration(project, "Release", "Win32");
+ outputConfiguration(project, "Release", "x64");
project << "\t</ItemGroup>\n";
@@ -99,23 +106,23 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
// Shared configuration
project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n";
- OUTPUT_CONFIGURATION_TYPE_MSBUILD("Release|Win32");
- OUTPUT_CONFIGURATION_TYPE_MSBUILD("Analysis|Win32");
- OUTPUT_CONFIGURATION_TYPE_MSBUILD("Debug|Win32");
- OUTPUT_CONFIGURATION_TYPE_MSBUILD("Release|x64");
- OUTPUT_CONFIGURATION_TYPE_MSBUILD("Analysis|x64");
- OUTPUT_CONFIGURATION_TYPE_MSBUILD("Debug|x64");
+ outputConfigurationType(project, name, "Release|Win32");
+ outputConfigurationType(project, name, "Analysis|Win32");
+ outputConfigurationType(project, name, "Debug|Win32");
+ outputConfigurationType(project, name, "Release|x64");
+ outputConfigurationType(project, name, "Analysis|x64");
+ outputConfigurationType(project, name, "Debug|x64");
project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n"
"\t<ImportGroup Label=\"ExtensionSettings\">\n"
"\t</ImportGroup>\n";
- OUTPUT_PROPERTIES_MSBUILD("Release|Win32", "ScummVM_Release.props");
- OUTPUT_PROPERTIES_MSBUILD("Analysis|Win32", "ScummVM_Analysis.props");
- OUTPUT_PROPERTIES_MSBUILD("Debug|Win32", "ScummVM_Debug.props");
- OUTPUT_PROPERTIES_MSBUILD("Release|x64", "ScummVM_Release64.props");
- OUTPUT_PROPERTIES_MSBUILD("Analysis|x64", "ScummVM_Analysis64.props");
- OUTPUT_PROPERTIES_MSBUILD("Debug|x64", "ScummVM_Debug64.props");
+ outputProperties(project, "Release|Win32", PROJECT_DESCRIPTION "_Release.props");
+ outputProperties(project, "Analysis|Win32", PROJECT_DESCRIPTION "_Analysis.props");
+ outputProperties(project, "Debug|Win32", PROJECT_DESCRIPTION "_Debug.props");
+ outputProperties(project, "Release|x64", PROJECT_DESCRIPTION "_Release64.props");
+ outputProperties(project, "Analysis|x64", PROJECT_DESCRIPTION "_Analysis64.props");
+ outputProperties(project, "Debug|x64", PROJECT_DESCRIPTION "_Debug64.props");
project << "\t<PropertyGroup Label=\"UserMacros\" />\n";
@@ -140,8 +147,8 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
else
addFilesToProject(moduleDir, project, includeList, excludeList, setup.filePrefix);
- // Output references for scummvm project
- if (name == "scummvm")
+ // Output references for the main project
+ if (name == PROJECT_NAME)
writeReferences(project);
project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n"
@@ -153,21 +160,6 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
createFiltersFile(setup, name);
}
-#define OUTPUT_FILTER_MSBUILD(files, action) \
- if (!files.empty()) { \
- filters << "\t<ItemGroup>\n"; \
- for (std::list<FileEntry>::const_iterator entry = files.begin(); entry != files.end(); ++entry) { \
- if ((*entry).filter != "") { \
- filters << "\t\t<" action " Include=\"" << (*entry).path << "\">\n" \
- "\t\t\t<Filter>" << (*entry).filter << "</Filter>\n" \
- "\t\t</" action ">\n"; \
- } else { \
- filters << "\t\t<" action " Include=\"" << (*entry).path << "\" />\n"; \
- } \
- } \
- filters << "\t</ItemGroup>\n"; \
- }
-
void MSBuildProvider::createFiltersFile(const BuildSetup &setup, const std::string &name) {
// No filters => no need to create a filter file
if (_filters.empty())
@@ -199,20 +191,36 @@ void MSBuildProvider::createFiltersFile(const BuildSetup &setup, const std::stri
filters << "\t</ItemGroup>\n";
// Output files
- OUTPUT_FILTER_MSBUILD(_compileFiles, "ClCompile")
- OUTPUT_FILTER_MSBUILD(_includeFiles, "ClInclude")
- OUTPUT_FILTER_MSBUILD(_otherFiles, "None")
- OUTPUT_FILTER_MSBUILD(_resourceFiles, "ResourceCompile")
- OUTPUT_FILTER_MSBUILD(_asmFiles, "CustomBuild")
+ outputFilter(filters, _compileFiles, "ClCompile");
+ outputFilter(filters, _includeFiles, "ClInclude");
+ outputFilter(filters, _otherFiles, "None");
+ outputFilter(filters, _resourceFiles, "ResourceCompile");
+ outputFilter(filters, _asmFiles, "CustomBuild");
filters << "</Project>";
}
+void MSBuildProvider::outputFilter(std::ostream &filters, const FileEntries &files, const std::string &action) {
+ if (!files.empty()) {
+ filters << "\t<ItemGroup>\n";
+ for (FileEntries::const_iterator entry = files.begin(), end = files.end(); entry != end; ++entry) {
+ if ((*entry).filter != "") {
+ filters << "\t\t<" << action << " Include=\"" << (*entry).path << "\">\n"
+ "\t\t\t<Filter>" << (*entry).filter << "</Filter>\n"
+ "\t\t</" << action << ">\n";
+ } else {
+ filters << "\t\t<" << action << " Include=\"" << (*entry).path << "\" />\n";
+ }
+ }
+ filters << "\t</ItemGroup>\n";
+ }
+}
+
void MSBuildProvider::writeReferences(std::ofstream &output) {
output << "\t<ItemGroup>\n";
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
- if (i->first == "scummvm")
+ if (i->first == PROJECT_NAME)
continue;
output << "\t<ProjectReference Include=\"" << i->first << ".vcxproj\">\n"
@@ -230,7 +238,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
std::map<std::string, StringList>::iterator warningsIterator = _projectWarnings.find(name);
// Nothing to add here, move along!
- if (name != "scummvm" && name != "sword25" && name != "tinsel" && warningsIterator == _projectWarnings.end())
+ if (name != PROJECT_NAME && name != "sword25" && name != "tinsel" && name != "grim" && warningsIterator == _projectWarnings.end())
return;
std::string warnings = "";
@@ -242,7 +250,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
"\t\t<ClCompile>\n";
// Compile configuration
- if (name == "scummvm" || name == "sword25") {
+ if (name == PROJECT_NAME || name == "sword25" || name == "grim") {
project << "\t\t\t<DisableLanguageExtensions>false</DisableLanguageExtensions>\n";
} else {
if (name == "tinsel" && !isRelease)
@@ -254,31 +262,28 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
project << "\t\t</ClCompile>\n";
- // Link configuration for scummvm project
- if (name == "scummvm") {
+ // Link configuration for main project
+ if (name == PROJECT_NAME) {
std::string libraries;
for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i)
libraries += *i + ".lib;";
project << "\t\t<Link>\n"
- "\t\t\t<OutputFile>$(OutDir)scummvm.exe</OutputFile>\n"
+ "\t\t\t<OutputFile>$(OutDir)" << PROJECT_NAME << ".exe</OutputFile>\n"
"\t\t\t<AdditionalDependencies>" << libraries << "%(AdditionalDependencies)</AdditionalDependencies>\n"
"\t\t</Link>\n";
if (setup.runBuildEvents) {
- // Only generate revision number in debug builds
- if (!isRelease) {
- project << "\t\t<PreBuildEvent>\n"
- "\t\t\t<Message>Generate internal_version.h</Message>\n"
- "\t\t\t<Command>" << getPreBuildEvent() << "</Command>\n"
- "\t\t</PreBuildEvent>\n";
- }
+ project << "\t\t<PreBuildEvent>\n"
+ "\t\t\t<Message>Generate revision</Message>\n"
+ "\t\t\t<Command>" << getPreBuildEvent() << "</Command>\n"
+ "\t\t</PreBuildEvent>\n";
// Copy data files to the build folder
project << "\t\t<PostBuildEvent>\n"
"\t\t\t<Message>Copy data files to the build folder</Message>\n"
- "\t\t\t<Command>" << getPostBuildEvent(isWin32) << "</Command>\n"
+ "\t\t\t<Command>" << getPostBuildEvent(isWin32, setup.createInstaller) << "</Command>\n"
"\t\t</PostBuildEvent>\n";
}
}
@@ -286,7 +291,7 @@ void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::s
project << "\t</ItemDefinitionGroup>\n";
}
-void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix) {
+void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) {
std::string warnings;
for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i)
@@ -296,14 +301,18 @@ void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits,
for (StringList::const_iterator i = defines.begin(); i != defines.end(); ++i)
definesList += *i + ';';
+ // Add define to include revision header
+ if (runBuildEvents)
+ definesList += REVISION_DEFINE ";";
+
properties << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
"\t<PropertyGroup>\n"
- "\t\t<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\n"
- "\t\t<_PropertySheetDisplayName>ScummVM_Global</_PropertySheetDisplayName>\n"
- "\t\t<ExecutablePath>$(SCUMMVM_LIBS)\\bin;$(ExecutablePath)</ExecutablePath>\n"
- "\t\t<LibraryPath>$(SCUMMVM_LIBS)\\lib\\" << (bits == 32 ? "x86" : "x64") << ";$(LibraryPath)</LibraryPath>\n"
- "\t\t<IncludePath>$(SCUMMVM_LIBS)\\include;$(IncludePath)</IncludePath>\n"
+ "\t\t<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\n"
+ "\t\t<_PropertySheetDisplayName>" << PROJECT_DESCRIPTION << "_Global</_PropertySheetDisplayName>\n"
+ "\t\t<ExecutablePath>$(" << LIBS_DEFINE << ")\\bin;$(ExecutablePath)</ExecutablePath>\n"
+ "\t\t<LibraryPath>$(" << LIBS_DEFINE << ")\\lib\\" << (bits == 32 ? "x86" : "x64") << ";$(LibraryPath)</LibraryPath>\n"
+ "\t\t<IncludePath>$(" << LIBS_DEFINE << ")\\include;$(IncludePath)</IncludePath>\n"
"\t\t<OutDir>$(Configuration)" << bits << "\\</OutDir>\n"
"\t\t<IntDir>$(Configuration)" << bits << "/$(ProjectName)\\</IntDir>\n"
"\t</PropertyGroup>\n"
@@ -311,11 +320,17 @@ void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits,
"\t\t<ClCompile>\n"
"\t\t\t<DisableLanguageExtensions>true</DisableLanguageExtensions>\n"
"\t\t\t<DisableSpecificWarnings>" << warnings << ";%(DisableSpecificWarnings)</DisableSpecificWarnings>\n"
- "\t\t\t<AdditionalIncludeDirectories>$(SCUMMVM_LIBS)\\include;" << prefix << ";" << prefix << "\\engines;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
+ "\t\t\t<AdditionalIncludeDirectories>$(" << LIBS_DEFINE << ")\\include;" << prefix << ";" << prefix << "\\engines;$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
"\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
- "\t\t\t<ExceptionHandling></ExceptionHandling>\n"
- "\t\t\t<RuntimeTypeInfo>false</RuntimeTypeInfo>\n"
- "\t\t\t<WarningLevel>Level4</WarningLevel>\n"
+ "\t\t\t<ExceptionHandling></ExceptionHandling>\n";
+
+#if NEEDS_RTTI
+ properties << "\t\t\t<RuntimeTypeInfo>true</RuntimeTypeInfo>\n";
+#else
+ properties << "\t\t\t<RuntimeTypeInfo>false</RuntimeTypeInfo>\n";
+#endif
+
+ properties << "\t\t\t<WarningLevel>Level4</WarningLevel>\n"
"\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n"
"\t\t\t<CompileAs>Default</CompileAs>\n"
"\t\t</ClCompile>\n"
@@ -325,7 +340,6 @@ void MSBuildProvider::outputGlobalPropFile(std::ofstream &properties, int bits,
"\t\t\t<EntryPointSymbol>WinMainCRTStartup</EntryPointSymbol>\n"
"\t\t</Link>\n"
"\t\t<ResourceCompile>\n"
- "\t\t\t<PreprocessorDefinitions>HAS_INCLUDE_SET;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
"\t\t\t<AdditionalIncludeDirectories>" << prefix << ";%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
"\t\t</ResourceCompile>\n"
"\t</ItemDefinitionGroup>\n"
@@ -338,18 +352,18 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b
const std::string outputType = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug"));
const std::string outputBitness = (isWin32 ? "32" : "64");
- std::ofstream properties((setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
+ std::ofstream properties((setup.outputDir + '/' + PROJECT_DESCRIPTION "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
if (!properties)
- error("Could not open \"" + setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
+ error("Could not open \"" + setup.outputDir + '/' + PROJECT_DESCRIPTION "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
properties << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
"\t<ImportGroup Label=\"PropertySheets\">\n"
- "\t\t<Import Project=\"ScummVM_Global" << (isWin32 ? "" : "64") << ".props\" />\n"
+ "\t\t<Import Project=\"" << PROJECT_DESCRIPTION << "_Global" << (isWin32 ? "" : "64") << ".props\" />\n"
"\t</ImportGroup>\n"
"\t<PropertyGroup>\n"
- "\t\t<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\n"
- "\t\t<_PropertySheetDisplayName>ScummVM_" << outputType << outputBitness << "</_PropertySheetDisplayName>\n"
+ "\t\t<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\n"
+ "\t\t<_PropertySheetDisplayName>" << PROJECT_DESCRIPTION << "_" << outputType << outputBitness << "</_PropertySheetDisplayName>\n"
"\t\t<LinkIncremental>" << (isRelease ? "false" : "true") << "</LinkIncremental>\n"
"\t</PropertyGroup>\n"
"\t<ItemDefinitionGroup>\n"
@@ -391,19 +405,6 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b
properties.close();
}
-#define OUTPUT_NASM_COMMAND_MSBUILD(config) \
- projectFile << "\t\t\t<Command Condition=\"'$(Configuration)|$(Platform)'=='" << config << "|Win32'\">nasm.exe -f win32 -g -o \"$(IntDir)" << (isDuplicate ? (*entry).prefix : "") << "%(Filename).obj\" \"%(FullPath)\"</Command>\n" \
- "\t\t\t<Outputs Condition=\"'$(Configuration)|$(Platform)'=='" << config << "|Win32'\">$(IntDir)" << (isDuplicate ? (*entry).prefix : "") << "%(Filename).obj;%(Outputs)</Outputs>\n";
-
-#define OUPUT_FILES_MSBUILD(files, action) \
- if (!files.empty()) { \
- projectFile << "\t<ItemGroup>\n"; \
- for (std::list<FileEntry>::const_iterator entry = files.begin(); entry != files.end(); ++entry) { \
- projectFile << "\t\t<" action " Include=\"" << (*entry).path << "\" />\n"; \
- } \
- projectFile << "\t</ItemGroup>\n"; \
- }
-
bool hasEnding(std::string const &fullString, std::string const &ending) {
if (fullString.length() > ending.length()) {
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
@@ -412,6 +413,14 @@ bool hasEnding(std::string const &fullString, std::string const &ending) {
}
}
+namespace {
+
+inline void outputNasmCommand(std::ostream &projectFile, const std::string &config, const std::string &prefix) {
+ projectFile << "\t\t\t<Command Condition=\"'$(Configuration)|$(Platform)'=='" << config << "|Win32'\">nasm.exe -f win32 -g -o \"$(IntDir)" << prefix << "%(Filename).obj\" \"%(FullPath)\"</Command>\n"
+ "\t\t\t<Outputs Condition=\"'$(Configuration)|$(Platform)'=='" << config << "|Win32'\">$(IntDir)" << prefix << "%(Filename).obj;%(Outputs)</Outputs>\n";
+}
+
+} // End of anonymous namespace
void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int, const StringList &duplicate,
const std::string &objPrefix, const std::string &filePrefix) {
@@ -439,9 +448,6 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
projectFile << "\t\t<ClCompile Include=\"" << (*entry).path << "\">\n"
"\t\t\t<ObjectFileName>$(IntDir)" << (*entry).prefix << "%(Filename).obj</ObjectFileName>\n";
- if (hasEnding((*entry).path, "base\\version.cpp"))
- projectFile << "\t\t\t<PreprocessorDefinitions Condition=\"'$(Configuration)'=='Debug'\">SCUMMVM_REVISION#&quot; $(SCUMMVM_REVISION_STRING)&quot;;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n";
-
projectFile << "\t\t</ClCompile>\n";
} else {
projectFile << "\t\t<ClCompile Include=\"" << (*entry).path << "\" />\n";
@@ -451,9 +457,9 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
}
// Output include, other and resource files
- OUPUT_FILES_MSBUILD(_includeFiles, "ClInclude")
- OUPUT_FILES_MSBUILD(_otherFiles, "None")
- OUPUT_FILES_MSBUILD(_resourceFiles, "ResourceCompile")
+ outputFiles(projectFile, _includeFiles, "ClInclude");
+ outputFiles(projectFile, _otherFiles, "None");
+ outputFiles(projectFile, _resourceFiles, "ResourceCompile");
// Output asm files
if (!_asmFiles.empty()) {
@@ -465,9 +471,9 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
projectFile << "\t\t<CustomBuild Include=\"" << (*entry).path << "\">\n"
"\t\t\t<FileType>Document</FileType>\n";
- OUTPUT_NASM_COMMAND_MSBUILD("Debug")
- OUTPUT_NASM_COMMAND_MSBUILD("Analysis")
- OUTPUT_NASM_COMMAND_MSBUILD("Release")
+ outputNasmCommand(projectFile, "Debug", (isDuplicate ? (*entry).prefix : ""));
+ outputNasmCommand(projectFile, "Analysis", (isDuplicate ? (*entry).prefix : ""));
+ outputNasmCommand(projectFile, "Release", (isDuplicate ? (*entry).prefix : ""));
projectFile << "\t\t</CustomBuild>\n";
}
@@ -475,6 +481,16 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
}
}
+void MSBuildProvider::outputFiles(std::ostream &projectFile, const FileEntries &files, const std::string &action) {
+ if (!files.empty()) {
+ projectFile << "\t<ItemGroup>\n";
+ for (FileEntries::const_iterator entry = files.begin(), end = files.end(); entry != end; ++entry) {
+ projectFile << "\t\t<" << action << " Include=\"" << (*entry).path << "\" />\n";
+ }
+ projectFile << "\t</ItemGroup>\n";
+ }
+}
+
void MSBuildProvider::computeFileList(const FileNode &dir, const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix) {
for (FileNode::NodeList::const_iterator i = dir.children.begin(); i != dir.children.end(); ++i) {
const FileNode *node = *i;
diff --git a/devtools/create_project/msbuild.h b/devtools/create_project/msbuild.h
index fa5311734b..98bb65e19b 100644
--- a/devtools/create_project/msbuild.h
+++ b/devtools/create_project/msbuild.h
@@ -45,7 +45,7 @@ protected:
void writeReferences(std::ofstream &output);
- void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix);
+ void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents);
void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis);
@@ -75,6 +75,9 @@ private:
void computeFileList(const FileNode &dir, const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
void createFiltersFile(const BuildSetup &setup, const std::string &name);
+
+ void outputFilter(std::ostream &filters, const FileEntries &files, const std::string &action);
+ void outputFiles(std::ostream &projectFile, const FileEntries &files, const std::string &action);
};
} // End of CreateProjectTool namespace
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index e2fff59c46..af3aa4a519 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -23,10 +23,10 @@
*
*/
+#include "config.h"
#include "msvc.h"
#include <fstream>
-
#include <algorithm>
namespace CreateProjectTool {
@@ -39,23 +39,23 @@ MSVCProvider::MSVCProvider(StringList &global_warnings, std::map<std::string, St
}
void MSVCProvider::createWorkspace(const BuildSetup &setup) {
- UUIDMap::const_iterator svmUUID = _uuidMap.find("scummvm");
+ UUIDMap::const_iterator svmUUID = _uuidMap.find(PROJECT_NAME);
if (svmUUID == _uuidMap.end())
- error("No UUID for \"scummvm\" project created");
+ error("No UUID for \"" PROJECT_NAME "\" project created");
const std::string svmProjectUUID = svmUUID->second;
assert(!svmProjectUUID.empty());
std::string solutionUUID = createUUID();
- std::ofstream solution((setup.outputDir + '/' + "scummvm.sln").c_str());
+ std::ofstream solution((setup.outputDir + '/' + PROJECT_NAME ".sln").c_str());
if (!solution)
- error("Could not open \"" + setup.outputDir + '/' + "scummvm.sln\" for writing");
+ error("Could not open \"" + setup.outputDir + '/' + PROJECT_NAME ".sln\" for writing");
solution << "Microsoft Visual Studio Solution File, Format Version " << _version + 1 << ".00\n";
solution << "# Visual Studio " << getVisualStudioVersion() << "\n";
- solution << "Project(\"{" << solutionUUID << "}\") = \"scummvm\", \"scummvm" << getProjectExtension() << "\", \"{" << svmProjectUUID << "}\"\n";
+ solution << "Project(\"{" << solutionUUID << "}\") = \"" << PROJECT_NAME << "\", \"" << PROJECT_NAME << getProjectExtension() << "\", \"{" << svmProjectUUID << "}\"\n";
// Project dependencies are moved to vcxproj files in Visual Studio 2010
if (_version < 10)
@@ -65,7 +65,7 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
// Note we assume that the UUID map only includes UUIDs for enabled engines!
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
- if (i->first == "scummvm")
+ if (i->first == PROJECT_NAME)
continue;
solution << "Project(\"{" << solutionUUID << "}\") = \"" << i->first << "\", \"" << i->first << getProjectExtension() << "\", \"{" << i->second << "}\"\n"
@@ -120,16 +120,16 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {
}
void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
- std::ofstream properties((setup.outputDir + '/' + "ScummVM_Global" + getPropertiesExtension()).c_str());
+ std::ofstream properties((setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global" + getPropertiesExtension()).c_str());
if (!properties)
- error("Could not open \"" + setup.outputDir + '/' + "ScummVM_Global" + getPropertiesExtension() + "\" for writing");
+ error("Could not open \"" + setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global" + getPropertiesExtension() + "\" for writing");
- outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix));
+ outputGlobalPropFile(properties, 32, setup.defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
properties.close();
- properties.open((setup.outputDir + '/' + "ScummVM_Global64" + getPropertiesExtension()).c_str());
+ properties.open((setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global64" + getPropertiesExtension()).c_str());
if (!properties)
- error("Could not open \"" + setup.outputDir + '/' + "ScummVM_Global64" + getPropertiesExtension() + "\" for writing");
+ error("Could not open \"" + setup.outputDir + '/' + PROJECT_DESCRIPTION "_Global64" + getPropertiesExtension() + "\" for writing");
// HACK: We must disable the "nasm" feature for x64. To achieve that we must duplicate the feature list and
// recreate a define list.
@@ -143,7 +143,7 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
x64Defines.push_back("WIN32");
x64Defines.push_back("SDL_BACKEND");
- outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix));
+ outputGlobalPropFile(properties, 64, x64Defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
}
std::string MSVCProvider::getPreBuildEvent() const {
@@ -152,13 +152,13 @@ std::string MSVCProvider::getPreBuildEvent() const {
cmdLine = "@echo off\n"
"echo Executing Pre-Build script...\n"
"echo.\n"
- "@call &quot;$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd&quot; &quot;$(SolutionDir)/../..&quot;\n"
+ "@call &quot;$(SolutionDir)../../devtools/create_project/scripts/prebuild.cmd&quot; &quot;$(SolutionDir)/../..&quot; &quot;$(TargetDir)&quot;\n"
"EXIT /B0";
return cmdLine;
}
-std::string MSVCProvider::getPostBuildEvent(bool isWin32) const {
+std::string MSVCProvider::getPostBuildEvent(bool isWin32, bool createInstaller) const {
std::string cmdLine = "";
cmdLine = "@echo off\n"
@@ -168,6 +168,11 @@ std::string MSVCProvider::getPostBuildEvent(bool isWin32) const {
cmdLine += (isWin32) ? "x86" : "x64";
+ cmdLine += " %SCUMMVM_LIBS% ";
+
+ // Specify if installer needs to be built or not
+ cmdLine += (createInstaller ? "1" : "0");
+
cmdLine += "\n"
"EXIT /B0";
diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h
index f41ecc3aba..6c8ac33a76 100644
--- a/devtools/create_project/msvc.h
+++ b/devtools/create_project/msvc.h
@@ -59,8 +59,9 @@ protected:
* @param bits Number of bits the platform supports.
* @param defines Defines the platform needs to have set.
* @param prefix File prefix, used to add additional include paths.
+ * @param runBuildEvents true if generating a revision number, false otherwise
*/
- virtual void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix) = 0;
+ virtual void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) = 0;
/**
* Generates the project properties for debug and release settings.
@@ -88,11 +89,14 @@ protected:
std::string getPreBuildEvent() const;
/**
- * Get the command line for copying data files to the build directory
+ * Get the command line for copying data files to the build directory.
*
- * @param isWin32 Bitness of property file
+ * @param isWin32 Bitness of property file.
+ * @param createInstaller true to NSIS create installer
+ *
+ * @return The post build event.
*/
- std::string getPostBuildEvent(bool isWin32) const;
+ std::string getPostBuildEvent(bool isWin32, bool createInstaller) const;
};
} // End of CreateProjectTool namespace
diff --git a/devtools/create_project/msvc10/create_project.vcxproj b/devtools/create_project/msvc10/create_project.vcxproj
index 532d6dba29..bf5e415b5d 100644
--- a/devtools/create_project/msvc10/create_project.vcxproj
+++ b/devtools/create_project/msvc10/create_project.vcxproj
@@ -101,12 +101,14 @@ xcopy /Y $(TargetPath) $(SolutionDir)\..\..\..\dists\codeblocks\</Command>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\codeblocks.h" />
+ <ClInclude Include="..\config.h" />
<ClInclude Include="..\create_project.h" />
<ClInclude Include="..\msbuild.h" />
<ClInclude Include="..\msvc.h" />
<ClInclude Include="..\visualstudio.h" />
</ItemGroup>
<ItemGroup>
+ <None Include="..\scripts\installer.vbs" />
<None Include="..\scripts\postbuild.cmd" />
<None Include="..\scripts\prebuild.cmd" />
<None Include="..\scripts\revision.vbs" />
diff --git a/devtools/create_project/msvc10/create_project.vcxproj.filters b/devtools/create_project/msvc10/create_project.vcxproj.filters
index 7922e1e6f7..b5e870824e 100644
--- a/devtools/create_project/msvc10/create_project.vcxproj.filters
+++ b/devtools/create_project/msvc10/create_project.vcxproj.filters
@@ -27,6 +27,9 @@
<ClInclude Include="..\visualstudio.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="..\config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\codeblocks.cpp">
@@ -55,5 +58,8 @@
<None Include="..\scripts\postbuild.cmd">
<Filter>scripts</Filter>
</None>
+ <None Include="..\scripts\installer.vbs">
+ <Filter>scripts</Filter>
+ </None>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/devtools/create_project/msvc8/create_project.vcproj b/devtools/create_project/msvc8/create_project.vcproj
index bc3b2437ac..639b23d6e7 100644
--- a/devtools/create_project/msvc8/create_project.vcproj
+++ b/devtools/create_project/msvc8/create_project.vcproj
@@ -199,6 +199,10 @@
>
</File>
<File
+ RelativePath="..\config.h"
+ >
+ </File>
+ <File
RelativePath="..\msvc.h"
>
</File>
@@ -228,6 +232,10 @@
RelativePath="..\scripts\revision.vbs"
>
</File>
+ <File
+ RelativePath="..\scripts\installer.vbs"
+ >
+ </File>
</Filter>
</Files>
<Globals>
diff --git a/devtools/create_project/msvc9/create_project.vcproj b/devtools/create_project/msvc9/create_project.vcproj
index c89b88a1c9..f56cbd711c 100644
--- a/devtools/create_project/msvc9/create_project.vcproj
+++ b/devtools/create_project/msvc9/create_project.vcproj
@@ -200,6 +200,10 @@
>
</File>
<File
+ RelativePath="..\config.h"
+ >
+ </File>
+ <File
RelativePath="..\msvc.h"
>
</File>
@@ -229,6 +233,10 @@
RelativePath="..\scripts\revision.vbs"
>
</File>
+ <File
+ RelativePath="..\scripts\installer.vbs"
+ >
+ </File>
</Filter>
</Files>
<Globals>
diff --git a/devtools/create_project/scripts/installer.vbs b/devtools/create_project/scripts/installer.vbs
new file mode 100644
index 0000000000..6bcd794bef
--- /dev/null
+++ b/devtools/create_project/scripts/installer.vbs
@@ -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, version 2
+' of the License.
+'
+' This program is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU General Public License for more details.
+'
+' You should have received a copy of the GNU General Public License
+' along with this program; if not, write to the Free Software
+' Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+'
+'/
+
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' This script calls the makensis tool to generate a NSIS Windows installer for ScummVM
+'
+' It tries to read the NSIS installation folder from the registry and then calls the
+' command line script compiler to create the installer.
+'
+' This is called from the postbuild.cmd batch file
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+'================================================================
+' TODO: Reduce duplication with revision.vbs script
+' (ReadRegistryKey and ParseCommandLine are identical)
+'================================================================
+
+Option Explicit
+
+Dim FSO : Set FSO = CreateObject("Scripting.FileSystemObject")
+Dim WshShell : Set WshShell = CreateObject("WScript.Shell")
+
+' Folders
+Dim rootFolder : rootFolder = ""
+Dim targetFolder : targetFolder = ""
+Dim arch : arch = ""
+
+' Parse our command line arguments
+If ParseCommandLine() Then
+ CreateInstaller()
+End If
+
+'////////////////////////////////////////////////////////////////
+'// Installer creation
+'////////////////////////////////////////////////////////////////
+Sub CreateInstaller()
+ ' Get nsis installation folder
+ Dim nsisPath : nsisPath = GetNSISPath()
+ If (nsisPath = "") Then
+ Exit Sub
+ End If
+
+ ' Preprocess architecture
+ Select Case arch
+ Case "x86"
+ arch = "win32"
+
+ Case "x64"
+ arch = "win64"
+ End Select
+
+ ' Build command line
+ Dim commandLine : commandLine = """" & nsisPath & "\makensis.exe"" /V2" & _
+ " /Dtop_srcdir=""" & rootFolder & """" & _
+ " /Dbuild_dir=""" & targetFolder & """" & _
+ " /Dtext_dir=""" & targetFolder & """" & _
+ " /DARCH=""" & arch & """" & _
+ " """ & rootFolder & "\dists\nsis\scummvm.nsi"""
+
+ Dim oExec: Set oExec = WshShell.Exec(commandline)
+ If Err.Number <> 0 Then
+ Wscript.StdErr.WriteLine "Error running makensis.exe!"
+ Exit Sub
+ End If
+
+ ' Wait till the application is finished ...
+ Dim ostdOut : Set oStdOut = oExec.StdOut
+ Do While oExec.Status = 0
+ If Not ostdOut.AtEndOfStream Then
+ Wscript.StdErr.WriteLine ostdOut.ReadAll
+ End If
+
+ WScript.Sleep 100
+ Loop
+
+ If oExec.ExitCode <> 0 Then
+ Wscript.StdErr.WriteLine "Error while creating installer!"
+ Exit Sub
+ End If
+End Sub
+
+Function GetNSISPath()
+ ' Get the directory where NSIS (should) reside(s)
+ Dim sNSIS
+
+ ' First, try with 32-bit architecture
+ sNSIS = ReadRegistryKey("HKLM", "SOFTWARE\NSIS", "", 32)
+
+ If sNSIS = "" Or IsNull(sNSIS) Then
+ ' No 32-bit version of TortoiseSVN installed, try 64-bit version (doesn't hurt on 32-bit machines, it returns nothing or is ignored)
+ sNSIS = ReadRegistryKey("HKLM", "SOFTWARE\NSIS", "", 64)
+ End If
+
+ ' Check if Tortoise is present
+ If sNSIS = "" Then
+ Wscript.StdErr.WriteLine "NSIS not installed!"
+ Exit Function
+ End If
+
+ GetNSISPath = sNSIS
+End Function
+
+'////////////////////////////////////////////////////////////////
+'// Utilities
+'////////////////////////////////////////////////////////////////
+Function ParseCommandLine()
+ ParseCommandLine = True
+
+ If Wscript.Arguments.Count <> 3 Then
+ Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 3)"
+
+ ParseCommandLine = False
+ Exit Function
+ End If
+
+ ' Get our arguments
+ rootFolder = Wscript.Arguments.Item(0)
+ targetFolder = Wscript.Arguments.Item(1)
+ arch = Wscript.Arguments.Item(2)
+
+ ' Check that the folders are valid
+ If Not FSO.FolderExists(rootFolder) Then
+ Wscript.StdErr.WriteLine "[Error] Invalid root folder (" & rootFolder & ")"
+
+ ParseCommandLine = False
+ Exit Function
+ End If
+
+ If Not FSO.FolderExists(targetFolder) Then
+ Wscript.StdErr.WriteLine "[Error] Invalid target folder (" & targetFolder & ")"
+
+ ParseCommandLine = False
+ Exit Function
+ End If
+
+ ' Set absolute paths
+ rootFolder = FSO.GetAbsolutePathName(rootFolder)
+ targetFolder = FSO.GetAbsolutePathName(targetFolder)
+End Function
+
+Function ReadRegistryKey(shive, subkey, valuename, architecture)
+ Dim hiveKey, objCtx, objLocator, objServices, objReg, Inparams, Outparams
+
+ ' First, get the Registry Provider for the requested architecture
+ Set objCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
+ objCtx.Add "__ProviderArchitecture", architecture ' Must be 64 of 32
+ Set objLocator = CreateObject("Wbemscripting.SWbemLocator")
+ Set objServices = objLocator.ConnectServer("","root\default","","",,,,objCtx)
+ Set objReg = objServices.Get("StdRegProv")
+
+ ' Check the hive and give it the right value
+ Select Case shive
+ Case "HKCR", "HKEY_CLASSES_ROOT"
+ hiveKey = &h80000000
+ Case "HKCU", "HKEY_CURRENT_USER"
+ hiveKey = &H80000001
+ Case "HKLM", "HKEY_LOCAL_MACHINE"
+ hiveKey = &h80000002
+ Case "HKU", "HKEY_USERS"
+ hiveKey = &h80000003
+ Case "HKCC", "HKEY_CURRENT_CONFIG"
+ hiveKey = &h80000005
+ Case "HKDD", "HKEY_DYN_DATA" ' Only valid for Windows 95/98
+ hiveKey = &h80000006
+ Case Else
+ MsgBox "Hive not valid (ReadRegistryKey)"
+ End Select
+
+ Set Inparams = objReg.Methods_("GetStringValue").Inparameters
+ Inparams.Hdefkey = hiveKey
+ Inparams.Ssubkeyname = subkey
+ Inparams.Svaluename = valuename
+ Set Outparams = objReg.ExecMethod_("GetStringValue", Inparams,,objCtx)
+
+ ReadRegistryKey = Outparams.SValue
+End Function
diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd
index 5c2bd8a1ad..e78861463a 100644
--- a/devtools/create_project/scripts/postbuild.cmd
+++ b/devtools/create_project/scripts/postbuild.cmd
@@ -1,35 +1,55 @@
-REM @echo off
+@echo off
REM ---------------------------------------------------------------
REM -- Post-Build Script
REM ---------------------------------------------------------------
REM
REM Copy engine data, themes, translation and required dlls to the
-REM output folder.
+REM output folder and optionally create an installer
REM
REM Expected parameters
REM Root folder
REM Output folder
REM Architecture
+REM Libs folder
+REM Installer ("1" to build, "0" to skip)
-if "%~1"=="" goto error_input
+if "%~1"=="" goto error_root
if "%~2"=="" goto error_output
if "%~3"=="" goto error_arch
+if "%~4"=="" goto error_libs
+if "%~5"=="" goto error_installer
echo Copying data files
echo.
-REM Copy files
-xcopy /F /Y "%~1/dists/engine-data/*.dat" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/dists/engine-data/*.tbl" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/dists/engine-data/*.cpt" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/dists/engine-data/README" %~2 > NUL 2>&1
-xcopy /F /Y "%~1/gui/themes/*.zip" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/AUTHORS" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYING.GPL" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYING" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYING.LGPL" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/COPYRIGHT" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/NEWS" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/README" %~2 > NUL 2>&1
+
+xcopy /F /Y "%~1/dists/engine-data/*.dat" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/dists/engine-data/*.tbl" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/dists/engine-data/*.cpt" %~2 > NUL 2>&1
+xcopy /F /Y "%~1/gui/themes/*.zip" %~2 > NUL 2>&1
xcopy /F /Y "%~1/gui/themes/translations.dat" %~2 > NUL 2>&1
-xcopy /F /Y "%SCUMMVM_LIBS%/lib/%~3/SDL.dll" %~2 > NUL 2>&1
+xcopy /F /Y "%~4/lib/%~3/SDL.dll" %~2 > NUL 2>&1
+xcopy /F /Y "%~4/README-SDL" %~2 > NUL 2>&1
+
+xcopy /F /Y "%~1/backends/vkeybd/packs/vkeybd_default.zip" %~2 > NUL 2>&1
+
+if "%~5"=="0" goto done
+
+echo Running installer script
+echo.
+@call cscript "%~1/devtools/create_project/scripts/installer.vbs" %~1 %~2 %~3 1>NUL
+if not %errorlevel% == 0 goto error_script
goto done
-:error_output
+:error_root
echo Invalid root folder (%~1)!
goto done
@@ -41,5 +61,17 @@ goto done
echo Invalid arch parameter (was: %~3, allowed: x86, x64)!
goto done
+:error_libs
+echo Invalid libs folder (%~4)!
+goto done
+
+:error_installer
+echo Invalid installer parameter. Should be "0" or "1" (was %~5)!
+goto done
+
+:error_script:
+echo An error occured while running the installer script!
+goto done
+
:done
exit /B0
diff --git a/devtools/create_project/scripts/prebuild.cmd b/devtools/create_project/scripts/prebuild.cmd
index b824f0d5a0..dd4d12a851 100644
--- a/devtools/create_project/scripts/prebuild.cmd
+++ b/devtools/create_project/scripts/prebuild.cmd
@@ -4,22 +4,28 @@ REM ---------------------------------------------------------------
REM -- Pre-Build Script
REM ---------------------------------------------------------------
REM
-REM Generate file with proper revision number
+REM Generate file with revision number
REM
REM Expected parameters
-REM Root folder
+REM Root folder (the source root folder)
+REM Target folder (the build output folder, will be used to copy internal_revision.h)
-if "%~1"=="" goto error_input
+if "%~1"=="" goto error_root
+if "%~2"=="" goto error_target
REM Run the revision script
-@call cscript "%~1/devtools/create_project/scripts/revision.vbs" %~1 1>NUL
+@call cscript "%~1/devtools/create_project/scripts/revision.vbs" %~1 %~2 1>NUL
if not %errorlevel% == 0 goto error_script
goto done
-:error_output
+:error_root
echo Invalid root folder (%~1)!
goto done
+:error_target
+echo Invalid target folder (%~2)!
+goto done
+
:error_script:
echo An error occured while running the revision script!
diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs
index 851185371b..3e1212521c 100644
--- a/devtools/create_project/scripts/revision.vbs
+++ b/devtools/create_project/scripts/revision.vbs
@@ -23,6 +23,21 @@
'
'/
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' This script tries to determine a revision number based on the current working tree
+' by trying revision control tools in the following order:
+' - git (with hg-git detection)
+' - mercurial
+' - TortoiseSVN
+' - SVN
+'
+' It then writes a new header file to be included during build, with the revision
+' information, the current branch, the revision control system (when not git) and
+' a flag when the tree is dirty.
+'
+' This is called from the prebuild.cmd batch file
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
Option Explicit
' Working copy check priority:
@@ -35,6 +50,7 @@ Dim WshShell : Set WshShell = CreateObject("WScript.Shell")
' Folders
Dim rootFolder : rootFolder = ""
+Dim targetFolder : targetFolder = ""
' Info variables
Dim tool : tool = ""
@@ -81,27 +97,33 @@ Sub DetermineRevision()
End If
End If
End If
-
- Wscript.StdErr.WriteLine "Found revision " & revision & " on branch " & branch & vbCrLf
-
+
+ Dim outputInfo : outputInfo = "Found revision " & revision & " on branch " & branch
+
' Setup our revision string
- Dim revisionString : revisionString = "r" & revision
+ Dim revisionString : revisionString = revision
If (modified) Then
- revisionString = revisionString & " M"
+ revisionString = revisionString & "-dirty"
+ outputInfo = outputInfo & " (dirty)"
End If
' If we are not on trunk, add the branch name to the revision string
- If (branch <> "trunk" And branch <> "") Then
- revisionString = revisionString & " (" & branch & ")"
+ If (branch <> "trunk" And branch <> "master" And branch <> "") Then
+ revisionString = revisionString & "(" & branch & ")"
End If
- ' Add the DVCS name at the end
- revisionString = revisionString & " - " & tool
+ ' Add the DVCS name at the end (when not git)
+ If (tool <> "git") Then
+ revisionString = revisionString & "-" & tool
+ outputInfo = outputInfo & " using " & tool
+ End If
+
+ Wscript.StdErr.WriteLine outputInfo & vbCrLf
- ' Setup an environment variable with the revision string
- Dim Env: Set Env = WshShell.Environment("User")
- Env.item("SCUMMVM_REVISION_STRING") = revisionString
+ ' Output revision header file
+ FSO.CopyFile rootFolder & "\\base\\internal_revision.h.in", targetFolder & "\\internal_revision.h"
+ FindReplaceInFile targetFolder & "\\internal_revision.h", "@REVISION@", revisionString
End Sub
Function DetermineTortoiseSVNVersion()
@@ -210,10 +232,11 @@ Function DetermineGitVersion()
Err.Clear
On Error Resume Next
DetermineGitVersion = False
+ Dim line
Wscript.StdErr.Write " Git... "
tool = "git"
- ' First check if we have both a .git & .svn folders (in case hg-git has been set up to have the git folder at the working copy level)
+ ' First check if we have both a .git & .hg folders (in case hg-git has been set up to have the git folder at the working copy level)
If FSO.FolderExists(rootFolder & "/.git") And FSO.FolderExists(rootFolder & "/.hg") Then
Wscript.StdErr.WriteLine "Mercurial clone with git repository in tree!"
Exit Function
@@ -247,10 +270,10 @@ Function DetermineGitVersion()
End If
' Get the version hash
- Dim hash: hash = oExec.StdOut.ReadLine()
+ Dim hash : hash = oExec.StdOut.ReadLine()
' Make sure index is in sync with disk
- Set oExec = WshShell.Exec(gitPath & "update-index --refresh")
+ Set oExec = WshShell.Exec(gitPath & "update-index --refresh --unmerged")
If Err.Number = 0 Then
' Wait till the application is finished ...
Do While oExec.Status = 0
@@ -258,7 +281,7 @@ Function DetermineGitVersion()
Loop
End If
- Set oExec = WshShell.Exec(gitPath & "diff-index --exit-code --quiet HEAD " & rootFolder)
+ Set oExec = WshShell.Exec(gitPath & "diff-index --quiet HEAD " & rootFolder)
If oExec.ExitCode <> 0 Then
Wscript.StdErr.WriteLine "Error parsing git revision!"
Exit Function
@@ -276,36 +299,26 @@ Function DetermineGitVersion()
' Get branch name
Set oExec = WshShell.Exec(gitPath & "symbolic-ref HEAD")
If Err.Number = 0 Then
- Dim line: line = oExec.StdOut.ReadLine()
+ line = oExec.StdOut.ReadLine()
line = Mid(line, InStrRev(line, "/") + 1)
If line <> "master" Then
branch = line
End If
End If
- ' Check for svn clones
- Set oExec = WshShell.Exec(gitPath & "log --pretty=format:%s --grep=" & Chr(34) & "^(svn r[0-9]*)" & Chr(34) & " -1 " & rootFolder)
- if Err.Number = 0 Then
- revision = Mid(oExec.StdOut.ReadLine(), 7)
- revision = Mid(revision, 1, InStr(revision, ")") - 1)
- tool = "svn-git"
- End If
-
- ' No revision? Maybe it is a custom git-svn clone
- If revision = "" Then
- Err.Clear
- Set oExec = WshShell.Exec(gitPath & "log --pretty=format:%b --grep=" & Chr(34) & "git-svn-id:.*@[0-9]*" & Chr(34) & " -1 " & rootFolder)
- If Err.Number = 0 Then
- revision = oExec.StdOut.ReadLine()
- revision = Mid(revision, InStr(revision, "@") + 1)
- revision = Mid(revision, 1, InStr(revision, " ") - 1)
- tool = "svn-git"
+ ' Get revision description
+ Set oExec = WshShell.Exec(gitPath & "describe --match desc/*")
+ If Err.Number = 0 Then
+ line = oExec.StdOut.ReadLine()
+ line = Mid(line, InStr(line, "-") + 1)
+ If line <> "" Then
+ revision = line
End If
End If
- ' Fallback to abbreviated revision number
+ ' Fallback to abbreviated revision number if needed
If revision = "" Then
- revision = Mid(hash, 1, 8)
+ revision = Mid(hash, 1, 7)
End If
DetermineGitVersion = True
@@ -385,8 +398,8 @@ End Function
Function ParseCommandLine()
ParseCommandLine = True
- If Wscript.Arguments.Count <> 1 Then
- Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 1)"
+ If Wscript.Arguments.Count <> 2 Then
+ Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 2)"
ParseCommandLine = False
Exit Function
@@ -394,6 +407,7 @@ Function ParseCommandLine()
' Get our arguments
rootFolder = Wscript.Arguments.Item(0)
+ targetFolder = Wscript.Arguments.Item(1)
' Check that the folders are valid
If Not FSO.FolderExists(rootFolder) Then
@@ -403,8 +417,16 @@ Function ParseCommandLine()
Exit Function
End If
- ' Set absolute path
+ If Not FSO.FolderExists(targetFolder) Then
+ Wscript.StdErr.WriteLine "[Error] Invalid target folder (" & targetFolder & ")"
+
+ ParseCommandLine = False
+ Exit Function
+ End If
+
+ ' Set absolute paths
rootFolder = FSO.GetAbsolutePathName(rootFolder)
+ targetFolder = FSO.GetAbsolutePathName(targetFolder)
End Function
Function ReadRegistryKey(shive, subkey, valuename, architecture)
@@ -443,3 +465,14 @@ Function ReadRegistryKey(shive, subkey, valuename, architecture)
ReadRegistryKey = Outparams.SValue
End Function
+
+Sub FindReplaceInFile(filename, to_find, replacement)
+ Dim file, data
+ Set file = FSO.OpenTextFile(filename, 1, 0, 0)
+ data = file.ReadAll
+ file.Close
+ data = Replace(data, to_find, replacement)
+ Set file = FSO.CreateTextFile(filename, -1, 0)
+ file.Write data
+ file.Close
+End Sub
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 2b7c8908cb..8642f071ff 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -23,10 +23,10 @@
*
*/
+#include "config.h"
#include "visualstudio.h"
#include <fstream>
-
#include <algorithm>
namespace CreateProjectTool {
@@ -54,39 +54,7 @@ int VisualStudioProvider::getVisualStudioVersion() {
if (_version == 8)
return 2005;
- error("Unsupported version passed to createScummVMSolution");
-}
-
-#define OUTPUT_CONFIGURATION_SCUMMVM(config, platform, props) { \
- project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \
- "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" \
- "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" \
- "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" \
- "\t\t\t/>\n" \
- "\t\t</Configuration>\n"; \
-}
-
-#define OUTPUT_CONFIGURATION_SCUMMVM_DEBUG(config, platform, props, isWin32) { \
- project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \
- "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" \
- "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" \
- "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" \
- "\t\t\t/>\n"; \
- if (setup.runBuildEvents) { \
- project << "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n" \
- "\t\t\t\tCommandLine=\"" << getPreBuildEvent() << "\"\n" \
- "\t\t\t/>\n" \
- "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n" \
- "\t\t\t\tCommandLine=\"" << getPostBuildEvent(isWin32) << "\"\n" \
- "\t\t\t/>\n"; \
- } \
- project << "\t\t</Configuration>\n"; \
-}
-
-#define OUTPUT_CONFIGURATION(config, platform, props) { \
- project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \
- "\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n" \
- "\t\t</Configuration>\n"; \
+ error("Unsupported version passed to getVisualStudioVersion");
}
void VisualStudioProvider::createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir,
@@ -118,24 +86,24 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
// Check for project-specific warnings:
std::map< std::string, std::list<std::string> >::iterator warningsIterator = _projectWarnings.find(name);
- if (name == "scummvm") {
+ if (name == PROJECT_NAME) {
std::string libraries;
for (StringList::const_iterator i = setup.libraries.begin(); i != setup.libraries.end(); ++i)
libraries += ' ' + *i + ".lib";
// Win32
- OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "Win32", "", true);
- OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "Win32", "", true);
- OUTPUT_CONFIGURATION_SCUMMVM("Release", "Win32", "");
+ outputConfiguration(project, setup, libraries, "Debug", "Win32", "", true);
+ outputConfiguration(project, setup, libraries, "Analysis", "Win32", "", true);
+ outputConfiguration(project, setup, libraries, "Release", "Win32", "", true);
// x64
// For 'x64' we must disable NASM support. Usually we would need to disable the "nasm" feature for that and
// re-create the library list, BUT since NASM doesn't link any additional libraries, we can just use the
// libraries list created for IA-32. If that changes in the future, we need to adjust this part!
- OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "x64", "64", true);
- OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "x64", "64", true);
- OUTPUT_CONFIGURATION_SCUMMVM("Release", "x64", "64");
+ outputConfiguration(project, setup, libraries, "Debug", "x64", "64", false);
+ outputConfiguration(project, setup, libraries, "Analysis", "x64", "64", false);
+ outputConfiguration(project, setup, libraries, "Release", "x64", "64", false);
} else {
std::string warnings = "";
@@ -147,14 +115,15 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
toolConfig = (!warnings.empty() ? "DisableSpecificWarnings=\"" + warnings + "\"" : "");
toolConfig += (name == "tinsel" ? "DebugInformationFormat=\"3\" " : "");
toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : "");
+ toolConfig += (name == "grim" ? "DisableLanguageExtensions=\"false\" " : "");
// Win32
- OUTPUT_CONFIGURATION("Debug", "Win32", "");
- OUTPUT_CONFIGURATION("Analysis", "Win32", "");
- OUTPUT_CONFIGURATION("Release", "Win32", "");
- OUTPUT_CONFIGURATION("Debug", "x64", "64");
- OUTPUT_CONFIGURATION("Analysis", "x64", "64");
- OUTPUT_CONFIGURATION("Release", "x64", "64");
+ outputConfiguration(project, toolConfig, "Debug", "Win32", "");
+ outputConfiguration(project, toolConfig, "Analysis", "Win32", "");
+ outputConfiguration(project, toolConfig, "Release", "Win32", "");
+ outputConfiguration(project, toolConfig, "Debug", "x64", "64");
+ outputConfiguration(project, toolConfig, "Analysis", "x64", "64");
+ outputConfiguration(project, toolConfig, "Release", "x64", "64");
}
project << "\t</Configurations>\n"
@@ -176,11 +145,38 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
"</VisualStudioProject>\n";
}
+void VisualStudioProvider::outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const std::string &platform, const std::string &props, const bool isWin32) {
+ project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\" << PROJECT_DESCRIPTION << "_" << config << props << ".vsprops\">\n"
+ "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n"
+ "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/" << PROJECT_NAME << ".exe\"\n"
+ "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n"
+ "\t\t\t/>\n";
+ outputBuildEvents(project, setup, isWin32);
+ project << "\t\t</Configuration>\n";
+}
+
+void VisualStudioProvider::outputConfiguration(std::ostream &project, const std::string &toolConfig, const std::string &config, const std::string &platform, const std::string &props) {
+ project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\" << PROJECT_DESCRIPTION << "_" << config << props << ".vsprops\">\n"
+ "\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n"
+ "\t\t</Configuration>\n";
+}
+
+void VisualStudioProvider::outputBuildEvents(std::ostream &project, const BuildSetup &setup, const bool isWin32) {
+ if (setup.runBuildEvents) {
+ project << "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n"
+ "\t\t\t\tCommandLine=\"" << getPreBuildEvent() << "\"\n"
+ "\t\t\t/>\n"
+ "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n"
+ "\t\t\t\tCommandLine=\"" << getPostBuildEvent(isWin32, setup.createInstaller) << "\"\n"
+ "\t\t\t/>\n";
+ }
+}
+
void VisualStudioProvider::writeReferences(std::ofstream &output) {
output << "\tProjectSection(ProjectDependencies) = postProject\n";
for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) {
- if (i->first == "scummvm")
+ if (i->first == PROJECT_NAME)
continue;
output << "\t\t{" << i->second << "} = {" << i->second << "}\n";
@@ -189,7 +185,7 @@ void VisualStudioProvider::writeReferences(std::ofstream &output) {
output << "\tEndProjectSection\n";
}
-void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix) {
+void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents) {
std::string warnings;
for (StringList::const_iterator i = _globalWarnings.begin(); i != _globalWarnings.end(); ++i)
warnings += *i + ';';
@@ -201,11 +197,15 @@ void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int b
definesList += *i;
}
+ // Add define to include revision header
+ if (runBuildEvents)
+ definesList += REVISION_DEFINE ";";
+
properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
"<VisualStudioPropertySheet\n"
"\tProjectType=\"Visual C++\"\n"
"\tVersion=\"8.00\"\n"
- "\tName=\"ScummVM_Global\"\n"
+ "\tName=\"" << PROJECT_DESCRIPTION << "_Global\"\n"
"\tOutputDirectory=\"$(ConfigurationName)" << bits << "\"\n"
"\tIntermediateDirectory=\"$(ConfigurationName)" << bits << "/$(ProjectName)\"\n"
"\t>\n"
@@ -213,11 +213,17 @@ void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int b
"\t\tName=\"VCCLCompilerTool\"\n"
"\t\tDisableLanguageExtensions=\"true\"\n"
"\t\tDisableSpecificWarnings=\"" << warnings << "\"\n"
- "\t\tAdditionalIncludeDirectories=\"" << prefix << ";" << prefix << "\\engines;$(SCUMMVM_LIBS)\\include\"\n"
+ "\t\tAdditionalIncludeDirectories=\"" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;$(TargetDir)\"\n"
"\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
- "\t\tExceptionHandling=\"0\"\n"
- "\t\tRuntimeTypeInfo=\"false\"\n"
- "\t\tWarningLevel=\"4\"\n"
+ "\t\tExceptionHandling=\"0\"\n";
+
+#if NEEDS_RTTI
+ properties << "\t\tRuntimeTypeInfo=\"true\"\n";
+#else
+ properties << "\t\tRuntimeTypeInfo=\"false\"\n";
+#endif
+
+ properties << "\t\tWarningLevel=\"4\"\n"
"\t\tWarnAsError=\"false\"\n"
"\t\tCompileAs=\"0\"\n"
"\t\t/>\n"
@@ -230,11 +236,10 @@ void VisualStudioProvider::outputGlobalPropFile(std::ofstream &properties, int b
"\t\tIgnoreDefaultLibraryNames=\"\"\n"
"\t\tSubSystem=\"1\"\n"
"\t\tEntryPointSymbol=\"WinMainCRTStartup\"\n"
- "\t\tAdditionalLibraryDirectories=\"$(SCUMMVM_LIBS)\\lib\\" << ((bits == 32) ? "x86" : "x64") << "\"\n"
+ "\t\tAdditionalLibraryDirectories=\"$(" << LIBS_DEFINE << ")\\lib\\" << ((bits == 32) ? "x86" : "x64") << "\"\n"
"\t/>\n"
"\t<Tool\n"
"\t\tName=\"VCResourceCompilerTool\"\n"
- "\t\tPreprocessorDefinitions=\"HAS_INCLUDE_SET\"\n"
"\t\tAdditionalIncludeDirectories=\"" << prefix << "\"\n"
"\t/>\n"
"</VisualStudioPropertySheet>\n";
@@ -246,16 +251,16 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
const std::string outputType = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug"));
const std::string outputBitness = (isWin32 ? "32" : "64");
- std::ofstream properties((setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
+ std::ofstream properties((setup.outputDir + '/' + PROJECT_DESCRIPTION "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
if (!properties)
- error("Could not open \"" + setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
+ error("Could not open \"" + setup.outputDir + '/' + PROJECT_DESCRIPTION "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
"<VisualStudioPropertySheet\n"
"\tProjectType=\"Visual C++\"\n"
"\tVersion=\"8.00\"\n"
- "\tName=\"ScummVM_" << outputType << outputBitness << "\"\n"
- "\tInheritedPropertySheets=\".\\ScummVM_Global" << (isWin32 ? "" : "64") << ".vsprops\"\n"
+ "\tName=\"" << PROJECT_DESCRIPTION << "_" << outputType << outputBitness << "\"\n"
+ "\tInheritedPropertySheets=\".\\" << PROJECT_DESCRIPTION << "_Global" << (isWin32 ? "" : "64") << ".vsprops\"\n"
"\t>\n"
"\t<Tool\n"
"\t\tName=\"VCCLCompilerTool\"\n";
@@ -282,7 +287,7 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
"\t\tRuntimeLibrary=\"1\"\n"
"\t\tEnableFunctionLevelLinking=\"true\"\n"
"\t\tWarnAsError=\"false\"\n"
- "\t\tDebugInformationFormat=\"" << (isWin32 ? "4" : "3") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
+ "\t\tDebugInformationFormat=\"" << (isWin32 ? "4" : "3") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
"\t\tAdditionalOption=\"" << (enableAnalysis ? "/analyze" : "") << "\"\n"
"\t/>\n"
"\t<Tool\n"
diff --git a/devtools/create_project/visualstudio.h b/devtools/create_project/visualstudio.h
index 0cf572429b..0e4b441e63 100644
--- a/devtools/create_project/visualstudio.h
+++ b/devtools/create_project/visualstudio.h
@@ -43,13 +43,17 @@ protected:
void writeReferences(std::ofstream &output);
- void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix);
+ void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents);
void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis);
const char *getProjectExtension();
const char *getPropertiesExtension();
int getVisualStudioVersion();
+
+ void outputConfiguration(std::ostream &project, const BuildSetup &setup, const std::string &libraries, const std::string &config, const std::string &platform, const std::string &props, const bool isWin32);
+ void outputConfiguration(std::ostream &project, const std::string &toolConfig, const std::string &config, const std::string &platform, const std::string &props);
+ void outputBuildEvents(std::ostream &project, const BuildSetup &setup, const bool isWin32);
};
} // End of CreateProjectTool namespace
diff --git a/devtools/credits.pl b/devtools/credits.pl
index 075d7b03db..c45f16eec9 100755
--- a/devtools/credits.pl
+++ b/devtools/credits.pl
@@ -695,6 +695,11 @@ begin_credits("Credits");
add_person("Gregory Montoir", "cyx", "");
end_section();
+ begin_section("TsAGE");
+ add_person("Paul Gilbert", "dreammaster", "");
+ add_person("Arnaud Boutonn&eacute;", "Strangerke", "");
+ end_section();
+
begin_section("Tucker");
add_person("Gregory Montoir", "cyx", "");
end_section();
@@ -955,7 +960,7 @@ begin_credits("Credits");
add_person("Eugene Sandulenko", "sev", "");
end_section();
begin_section("Spanish");
- add_person("Tom&aacute;s Maidagan", "Truido", "");
+ add_person("Tom&aacute;s Maidagan", "", "");
end_section();
begin_section("Swedish");
add_person("Hampus Flink", "", "");
@@ -972,7 +977,7 @@ begin_credits("Credits");
add_person("David Jensen", "Tyst", "SVG logo conversion");
add_person("Jean Marc Gimenez", "", "ScummVM logo");
add_person("", "Raina", "ScummVM forum buttons");
- add_person("William Claydon", "billwashere", "Skins for doxygen and wiki");
+ add_person("William Claydon", "billwashere", "Skins for doxygen, buildbot and wiki");
end_persons();
end_section();
@@ -1113,7 +1118,7 @@ begin_credits("Credits");
"freewaring the game.");
add_paragraph(
- "David P. Gray from Gray Design Associate for sharing the source code ".
+ "David P. Gray from Gray Design Associates for sharing the source code ".
"of the Hugo trilogy.");
add_paragraph(
diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt
index 60fc615057..e9e155925e 100644
--- a/devtools/scumm-md5.txt
+++ b/devtools/scumm-md5.txt
@@ -466,6 +466,7 @@ fbear Fatty Bear's Birthday Surprise
fbpack Fatty Bear's Fun Pack
e01acc8c12ef44e8f778fe87e5f90f4e -1 en 3DO - - - sev
c9717ee6059f1e43b768b464493d2fba -1 jp 3DO - - - clone2727
+ 4cfd3fda4a4e6e64a1fc488eba973b7a -1 en DOS - - - velocity37
f06e66fd45b2f8b0f4a2833ff4476050 -1 he DOS - - - sev
freddi Freddi Fish 1: The Case of the Missing Kelp Seeds
diff --git a/devtools/update-version.pl b/devtools/update-version.pl
index 91e9e2492b..788cbc7e40 100755
--- a/devtools/update-version.pl
+++ b/devtools/update-version.pl
@@ -39,6 +39,7 @@ my @subs_files = qw(
dists/macosx/Info.plist
dists/iphone/Info.plist
dists/irix/scummvm.spec
+ dists/nsis/scummvm.nsi
dists/wii/meta.xml
dists/android/AndroidManifest.xml
dists/android/plugin-manifest.xml
diff --git a/dists/android/AndroidManifest.xml b/dists/android/AndroidManifest.xml
index cae1f369e7..1bc784cc4c 100644
--- a/dists/android/AndroidManifest.xml
+++ b/dists/android/AndroidManifest.xml
@@ -4,7 +4,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.inodes.gus.scummvm"
android:versionCode="@ANDROID_VERSIONCODE@"
- android:versionName="1.3.0git"
+ android:versionName="1.4.0git"
android:installLocation="preferExternal">
<!-- This version works on Android 1.5 (SDK 3) and newer, but we
diff --git a/dists/android/plugin-manifest.xml b/dists/android/plugin-manifest.xml
index 2442d3f32a..3fd9e393d0 100644
--- a/dists/android/plugin-manifest.xml
+++ b/dists/android/plugin-manifest.xml
@@ -3,7 +3,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.inodes.gus.scummvm.plugin.@PLUGIN_NAME@"
android:versionCode="@PLUGIN_VERSION_CODE@"
- android:versionName="1.3.0git"
+ android:versionName="1.4.0git"
android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="8" />
diff --git a/dists/engine-data/drascula.dat b/dists/engine-data/drascula.dat
index feecda80a2..0938ef4a9a 100644
--- a/dists/engine-data/drascula.dat
+++ b/dists/engine-data/drascula.dat
Binary files differ
diff --git a/dists/iphone/Info.plist b/dists/iphone/Info.plist
index f18cc61ede..e57989a7c3 100644
--- a/dists/iphone/Info.plist
+++ b/dists/iphone/Info.plist
@@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.3.0git</string>
+ <string>1.4.0git</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.3.0git</string>
+ <string>1.4.0git</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIconFiles</key>
diff --git a/dists/irix/scummvm.spec b/dists/irix/scummvm.spec
index b6b1524a42..141d37070f 100644
--- a/dists/irix/scummvm.spec
+++ b/dists/irix/scummvm.spec
@@ -1,5 +1,5 @@
product scummvm
- id "ScummVM 1.3.0git"
+ id "ScummVM 1.4.0git"
image sw
id "software"
version 18
diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist
index 9e19926f3f..20081ccc80 100644
--- a/dists/macosx/Info.plist
+++ b/dists/macosx/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>scummvm</string>
<key>CFBundleGetInfoString</key>
- <string>1.3.0git, Copyright 2001-2011 The ScummVM team</string>
+ <string>1.4.0git, Copyright 2001-2011 The ScummVM team</string>
<key>CFBundleIconFile</key>
<string>scummvm.icns</string>
<key>CFBundleIdentifier</key>
@@ -21,9 +21,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.3.0git</string>
+ <string>1.4.0git</string>
<key>CFBundleVersion</key>
- <string>1.3.0git</string>
+ <string>1.4.0git</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
diff --git a/dists/nsis/graphics/left.bmp b/dists/nsis/graphics/left.bmp
new file mode 100644
index 0000000000..8b31d7d09a
--- /dev/null
+++ b/dists/nsis/graphics/left.bmp
Binary files differ
diff --git a/dists/nsis/graphics/scummvm-install.ico b/dists/nsis/graphics/scummvm-install.ico
new file mode 100644
index 0000000000..b8b118c7bd
--- /dev/null
+++ b/dists/nsis/graphics/scummvm-install.ico
Binary files differ
diff --git a/dists/nsis/scummvm.nsi b/dists/nsis/scummvm.nsi
new file mode 100644
index 0000000000..aeabcca039
--- /dev/null
+++ b/dists/nsis/scummvm.nsi
@@ -0,0 +1,351 @@
+# ScummVM - Graphic Adventure Engine
+#
+# ScummVM is the legal property of its developers, whose names
+# are too numerous to list here. Please refer to the COPYRIGHT
+# file distributed with this source distribution.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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 _DEBUG
+
+Name ScummVM
+
+# Included files
+!include MUI2.nsh
+
+#########################################################################################
+# Command line options
+#########################################################################################
+
+#!define top_srcdir ""
+#!define build_dir ""
+#!define text_dir ""
+#!define ARCH "" ;(optional, defaults to win32)
+
+# Check parameters
+!ifndef top_srcdir
+ !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)!"
+!endif
+
+!ifndef ARCH
+ !warning "ARCH has not been defined, defaulting to 'win32'"
+ !define ARCH "win32"
+!endif
+
+#########################################################################################
+# Folders
+#########################################################################################
+!define engine_data "${top_srcdir}\dists\engine-data"
+!define theme_data "${top_srcdir}\gui\themes"
+
+#########################################################################################
+# General Symbol Definitions
+#########################################################################################
+!define REGKEY "Software\$(^Name)\$(^Name)"
+!define VERSION "1.4.0git"
+!define COMPANY "ScummVM Team"
+!define URL "http://scummvm.org/"
+!define DESCRIPTION "ScummVM Installer. Look! A three headed monkey (TM)!"
+!define COPYRIGHT "Copyright Љ 2001-2011 The ScummVM Team"
+
+#########################################################################################
+# Installer configuration
+#########################################################################################
+OutFile ${build_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}
+ ; because lang strings aren't initialized at the point InstallDirRegKey is called
+
+CRCCheck on
+XPStyle on
+#TargetMinimalOS 5.0 ; Minimal version of windows for installer: Windows 2000 or more recent
+ ; (will build unicode installer with NSIS 2.50+)
+
+VIProductVersion 1.4.0.0
+VIAddVersionKey ProductName $(^Name)
+VIAddVersionKey ProductVersion "${VERSION}"
+VIAddVersionKey CompanyName "${COMPANY}"
+VIAddVersionKey CompanyWebsite "${URL}"
+VIAddVersionKey FileVersion "${VERSION}"
+VIAddVersionKey FileDescription "${DESCRIPTION}"
+VIAddVersionKey LegalCopyright "${COPYRIGHT}"
+
+BrandingText "$(^Name) ${VERSION}" ; Change branding text on the installer to show our name and version instead of NSIS's
+
+# Show Details when installing/uninstalling files
+ShowInstDetails show
+ShowUninstDetails show
+
+!ifdef _DEBUG
+ SetCompress off ; for debugging the installer, lzma takes forever
+ RequestExecutionLevel user
+!else
+ SetCompressor /FINAL /SOLID lzma
+ SetCompressorDictSize 64
+ RequestExecutionLevel admin ; for installation into program files folders
+!endif
+
+#########################################################################################
+# MUI Symbol Definitions
+#########################################################################################
+!define MUI_WELCOMEFINISHPAGE_BITMAP "graphics\left.bmp"
+!define MUI_ICON "graphics\scummvm-install.ico"
+!define MUI_UNICON "graphics\scummvm-install.ico"
+
+#Start menu
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKCU
+!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER $(^Name)
+
+# Finish page
+!define MUI_FINISHPAGE_RUN "$INSTDIR\scummvm.exe"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
+!define MUI_FINISHPAGE_RUN_NOTCHECKED
+!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+
+!define MUI_LICENSEPAGE_RADIOBUTTONS
+
+!define MUI_FINISHPAGE_NOAUTOCLOSE
+!define MUI_UNFINISHPAGE_NOAUTOCLOSE
+
+#########################################################################################
+# Installer pages
+#########################################################################################
+# Variables
+Var StartMenuGroup
+
+;Remember the installer language
+!define MUI_LANGDLL_REGISTRY_ROOT HKCU
+!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY}
+!define MUI_LANGDLL_REGISTRY_VALUENAME "InstallerLanguage"
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE ${top_srcdir}\COPYING
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+# Installer languages
+!insertmacro MUI_LANGUAGE "English" ;first language is the default language
+
+!ifndef _DEBUG ; Skip other languages when building debug builds
+;!insertmacro MUI_LANGUAGE "Afrikaans"
+;!insertmacro MUI_LANGUAGE "Albanian"
+;!insertmacro MUI_LANGUAGE "Arabic"
+;!insertmacro MUI_LANGUAGE "Belarusian"
+;!insertmacro MUI_LANGUAGE "Bosnian"
+;!insertmacro MUI_LANGUAGE "Breton"
+;!insertmacro MUI_LANGUAGE "Bulgarian"
+!insertmacro MUI_LANGUAGE "Catalan"
+;!insertmacro MUI_LANGUAGE "Croatian"
+!insertmacro MUI_LANGUAGE "Czech"
+!insertmacro MUI_LANGUAGE "Danish"
+;!insertmacro MUI_LANGUAGE "Dutch"
+;!insertmacro MUI_LANGUAGE "Esperanto"
+;!insertmacro MUI_LANGUAGE "Estonian"
+;!insertmacro MUI_LANGUAGE "Farsi"
+;!insertmacro MUI_LANGUAGE "Finnish"
+!insertmacro MUI_LANGUAGE "French"
+;!insertmacro MUI_LANGUAGE "Galician"
+!insertmacro MUI_LANGUAGE "German"
+;!insertmacro MUI_LANGUAGE "Greek"
+;!insertmacro MUI_LANGUAGE "Hebrew"
+!insertmacro MUI_LANGUAGE "Hungarian"
+;!insertmacro MUI_LANGUAGE "Icelandic"
+;!insertmacro MUI_LANGUAGE "Indonesian"
+;!insertmacro MUI_LANGUAGE "Irish"
+!insertmacro MUI_LANGUAGE "Italian"
+;!insertmacro MUI_LANGUAGE "Japanese"
+;!insertmacro MUI_LANGUAGE "Korean"
+;!insertmacro MUI_LANGUAGE "Kurdish"
+;!insertmacro MUI_LANGUAGE "Latvian"
+;!insertmacro MUI_LANGUAGE "Lithuanian"
+;!insertmacro MUI_LANGUAGE "Luxembourgish"
+;!insertmacro MUI_LANGUAGE "Macedonian"
+;!insertmacro MUI_LANGUAGE "Malay"
+;!insertmacro MUI_LANGUAGE "Mongolian"
+!insertmacro MUI_LANGUAGE "Norwegian"
+!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
+!insertmacro MUI_LANGUAGE "Polish"
+;!insertmacro MUI_LANGUAGE "Portuguese"
+!insertmacro MUI_LANGUAGE "PortugueseBR"
+;!insertmacro MUI_LANGUAGE "Romanian"
+!insertmacro MUI_LANGUAGE "Russian"
+;!insertmacro MUI_LANGUAGE "Serbian"
+;!insertmacro MUI_LANGUAGE "SerbianLatin"
+;!insertmacro MUI_LANGUAGE "SimpChinese"
+;!insertmacro MUI_LANGUAGE "Slovak"
+;!insertmacro MUI_LANGUAGE "Slovenian"
+!insertmacro MUI_LANGUAGE "Spanish"
+;!insertmacro MUI_LANGUAGE "SpanishInternational"
+!insertmacro MUI_LANGUAGE "Swedish"
+;!insertmacro MUI_LANGUAGE "Thai"
+;!insertmacro MUI_LANGUAGE "TradChinese"
+;!insertmacro MUI_LANGUAGE "Turkish"
+!insertmacro MUI_LANGUAGE "Ukrainian"
+;!insertmacro MUI_LANGUAGE "Uzbek"
+!endif
+
+;Reserve Files (will make sure the file will be stored first in the data block
+; making the installer start faster when compressing in solid mode)
+!insertmacro MUI_RESERVEFILE_LANGDLL
+
+#########################################################################################
+# Installer sections
+#########################################################################################
+Section "ScummVM" SecMain
+ 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"
+
+ # Engine data
+ File "${engine_data}\drascula.dat"
+ File "${engine_data}\hugo.dat"
+ File "${engine_data}\kyra.dat"
+ File "${engine_data}\lure.dat"
+ File "${engine_data}\m4.dat"
+ File "${engine_data}\queen.tbl"
+ File "${engine_data}\sky.cpt"
+ File "${engine_data}\teenagent.dat"
+ File "${engine_data}\toon.dat"
+
+ File "${top_srcdir}\dists\pred.dic"
+
+ # Themes
+ File "${theme_data}\scummclassic.zip"
+ File "${theme_data}\scummmodern.zip"
+ File "${theme_data}\translations.dat"
+
+ # Main exe and dlls
+ File "${build_dir}\scummvm.exe"
+ File "${build_dir}\SDL.dll"
+
+ WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder
+SectionEnd
+
+# Write Start menu entries and uninstaller
+Section -post SecMainPost
+ SetOutPath $INSTDIR
+ WriteUninstaller $INSTDIR\uninstall.exe
+ !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\Readme.lnk" $INSTDIR\README.txt
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
+ !insertmacro MUI_STARTMENU_WRITE_END
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" InstallLocation $INSTDIR
+ WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
+ WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
+SectionEnd
+
+# Installer functions
+Function .onInit
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+!ifdef _DEBUG && NSIS_CONFIG_LOG
+ LogSet on ; Will write a log file to the install folder (when using the special NSIS logging build)
+!endif
+FunctionEnd
+
+#########################################################################################
+# Uninstaller sections
+#########################################################################################
+Section -un.Main SecUninstall
+ Delete /REBOOTOK $INSTDIR\AUTHORS.txt
+ Delete /REBOOTOK $INSTDIR\COPYING.txt
+ Delete /REBOOTOK $INSTDIR\COPYING.LGPL.txt
+ Delete /REBOOTOK $INSTDIR\COPYRIGHT.txt
+ Delete /REBOOTOK $INSTDIR\NEWS.txt
+ Delete /REBOOTOK $INSTDIR\README.txt
+ Delete /REBOOTOK $INSTDIR\README-SDL.txt
+
+ Delete /REBOOTOK $INSTDIR\drascula.dat
+ Delete /REBOOTOK $INSTDIR\hugo.dat
+ Delete /REBOOTOK $INSTDIR\kyra.dat
+ Delete /REBOOTOK $INSTDIR\lure.dat
+ Delete /REBOOTOK $INSTDIR\m4.dat
+ Delete /REBOOTOK $INSTDIR\queen.tbl
+ Delete /REBOOTOK $INSTDIR\sky.cpt
+ Delete /REBOOTOK $INSTDIR\teenagent.dat
+ Delete /REBOOTOK $INSTDIR\toon.dat
+
+ Delete /REBOOTOK $INSTDIR\pred.dic
+
+ Delete /REBOOTOK $INSTDIR\scummclassic.zip
+ Delete /REBOOTOK $INSTDIR\scummmodern.zip
+ Delete /REBOOTOK $INSTDIR\translations.dat
+
+ Delete /REBOOTOK $INSTDIR\scummvm.exe
+ Delete /REBOOTOK $INSTDIR\SDL.dll
+SectionEnd
+
+Section -un.post SecUninstallPost
+ # Remove start menu entries
+ SetShellVarContext all
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Readme.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
+ RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
+
+ Delete /REBOOTOK $INSTDIR\uninstall.exe
+
+ DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
+ DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
+ DeleteRegValue HKCU "${REGKEY}" InstallPath
+ DeleteRegValue HKCU "${REGKEY}" InstallerLanguage
+ DeleteRegKey /IfEmpty HKCU "${REGKEY}"
+
+ RmDir $INSTDIR ; will only remove if empty (pass /r flag for recursive behavior)
+ Push $R0
+ StrCpy $R0 $StartMenuGroup 1
+ StrCmp $R0 ">" no_smgroup
+no_smgroup:
+ Pop $R0
+SectionEnd
+
+# Uninstaller functions
+Function un.onInit
+ !insertmacro MUI_UNGETLANGUAGE
+ ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+FunctionEnd
diff --git a/dists/nsis/scummvm.nsi.in b/dists/nsis/scummvm.nsi.in
new file mode 100644
index 0000000000..766a20633f
--- /dev/null
+++ b/dists/nsis/scummvm.nsi.in
@@ -0,0 +1,351 @@
+# ScummVM - Graphic Adventure Engine
+#
+# ScummVM is the legal property of its developers, whose names
+# are too numerous to list here. Please refer to the COPYRIGHT
+# file distributed with this source distribution.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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 _DEBUG
+
+Name ScummVM
+
+# Included files
+!include MUI2.nsh
+
+#########################################################################################
+# Command line options
+#########################################################################################
+
+#!define top_srcdir ""
+#!define build_dir ""
+#!define text_dir ""
+#!define ARCH "" ;(optional, defaults to win32)
+
+# Check parameters
+!ifndef top_srcdir
+ !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)!"
+!endif
+
+!ifndef ARCH
+ !warning "ARCH has not been defined, defaulting to 'win32'"
+ !define ARCH "win32"
+!endif
+
+#########################################################################################
+# Folders
+#########################################################################################
+!define engine_data "${top_srcdir}\dists\engine-data"
+!define theme_data "${top_srcdir}\gui\themes"
+
+#########################################################################################
+# General Symbol Definitions
+#########################################################################################
+!define REGKEY "Software\$(^Name)\$(^Name)"
+!define VERSION "@VERSION@"
+!define COMPANY "ScummVM Team"
+!define URL "http://scummvm.org/"
+!define DESCRIPTION "ScummVM Installer. Look! A three headed monkey (TM)!"
+!define COPYRIGHT "Copyright Љ 2001-2011 The ScummVM Team"
+
+#########################################################################################
+# Installer configuration
+#########################################################################################
+OutFile ${build_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}
+ ; because lang strings aren't initialized at the point InstallDirRegKey is called
+
+CRCCheck on
+XPStyle on
+#TargetMinimalOS 5.0 ; Minimal version of windows for installer: Windows 2000 or more recent
+ ; (will build unicode installer with NSIS 2.50+)
+
+VIProductVersion @VER_MAJOR@.@VER_MINOR@.@VER_PATCH@.0
+VIAddVersionKey ProductName $(^Name)
+VIAddVersionKey ProductVersion "${VERSION}"
+VIAddVersionKey CompanyName "${COMPANY}"
+VIAddVersionKey CompanyWebsite "${URL}"
+VIAddVersionKey FileVersion "${VERSION}"
+VIAddVersionKey FileDescription "${DESCRIPTION}"
+VIAddVersionKey LegalCopyright "${COPYRIGHT}"
+
+BrandingText "$(^Name) ${VERSION}" ; Change branding text on the installer to show our name and version instead of NSIS's
+
+# Show Details when installing/uninstalling files
+ShowInstDetails show
+ShowUninstDetails show
+
+!ifdef _DEBUG
+ SetCompress off ; for debugging the installer, lzma takes forever
+ RequestExecutionLevel user
+!else
+ SetCompressor /FINAL /SOLID lzma
+ SetCompressorDictSize 64
+ RequestExecutionLevel admin ; for installation into program files folders
+!endif
+
+#########################################################################################
+# MUI Symbol Definitions
+#########################################################################################
+!define MUI_WELCOMEFINISHPAGE_BITMAP "graphics\left.bmp"
+!define MUI_ICON "graphics\scummvm-install.ico"
+!define MUI_UNICON "graphics\scummvm-install.ico"
+
+#Start menu
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKCU
+!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY}
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER $(^Name)
+
+# Finish page
+!define MUI_FINISHPAGE_RUN "$INSTDIR\scummvm.exe"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
+!define MUI_FINISHPAGE_RUN_NOTCHECKED
+!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
+
+!define MUI_LICENSEPAGE_RADIOBUTTONS
+
+!define MUI_FINISHPAGE_NOAUTOCLOSE
+!define MUI_UNFINISHPAGE_NOAUTOCLOSE
+
+#########################################################################################
+# Installer pages
+#########################################################################################
+# Variables
+Var StartMenuGroup
+
+;Remember the installer language
+!define MUI_LANGDLL_REGISTRY_ROOT HKCU
+!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY}
+!define MUI_LANGDLL_REGISTRY_VALUENAME "InstallerLanguage"
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE ${top_srcdir}\COPYING
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+# Installer languages
+!insertmacro MUI_LANGUAGE "English" ;first language is the default language
+
+!ifndef _DEBUG ; Skip other languages when building debug builds
+;!insertmacro MUI_LANGUAGE "Afrikaans"
+;!insertmacro MUI_LANGUAGE "Albanian"
+;!insertmacro MUI_LANGUAGE "Arabic"
+;!insertmacro MUI_LANGUAGE "Belarusian"
+;!insertmacro MUI_LANGUAGE "Bosnian"
+;!insertmacro MUI_LANGUAGE "Breton"
+;!insertmacro MUI_LANGUAGE "Bulgarian"
+!insertmacro MUI_LANGUAGE "Catalan"
+;!insertmacro MUI_LANGUAGE "Croatian"
+!insertmacro MUI_LANGUAGE "Czech"
+!insertmacro MUI_LANGUAGE "Danish"
+;!insertmacro MUI_LANGUAGE "Dutch"
+;!insertmacro MUI_LANGUAGE "Esperanto"
+;!insertmacro MUI_LANGUAGE "Estonian"
+;!insertmacro MUI_LANGUAGE "Farsi"
+;!insertmacro MUI_LANGUAGE "Finnish"
+!insertmacro MUI_LANGUAGE "French"
+;!insertmacro MUI_LANGUAGE "Galician"
+!insertmacro MUI_LANGUAGE "German"
+;!insertmacro MUI_LANGUAGE "Greek"
+;!insertmacro MUI_LANGUAGE "Hebrew"
+!insertmacro MUI_LANGUAGE "Hungarian"
+;!insertmacro MUI_LANGUAGE "Icelandic"
+;!insertmacro MUI_LANGUAGE "Indonesian"
+;!insertmacro MUI_LANGUAGE "Irish"
+!insertmacro MUI_LANGUAGE "Italian"
+;!insertmacro MUI_LANGUAGE "Japanese"
+;!insertmacro MUI_LANGUAGE "Korean"
+;!insertmacro MUI_LANGUAGE "Kurdish"
+;!insertmacro MUI_LANGUAGE "Latvian"
+;!insertmacro MUI_LANGUAGE "Lithuanian"
+;!insertmacro MUI_LANGUAGE "Luxembourgish"
+;!insertmacro MUI_LANGUAGE "Macedonian"
+;!insertmacro MUI_LANGUAGE "Malay"
+;!insertmacro MUI_LANGUAGE "Mongolian"
+!insertmacro MUI_LANGUAGE "Norwegian"
+!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
+!insertmacro MUI_LANGUAGE "Polish"
+;!insertmacro MUI_LANGUAGE "Portuguese"
+!insertmacro MUI_LANGUAGE "PortugueseBR"
+;!insertmacro MUI_LANGUAGE "Romanian"
+!insertmacro MUI_LANGUAGE "Russian"
+;!insertmacro MUI_LANGUAGE "Serbian"
+;!insertmacro MUI_LANGUAGE "SerbianLatin"
+;!insertmacro MUI_LANGUAGE "SimpChinese"
+;!insertmacro MUI_LANGUAGE "Slovak"
+;!insertmacro MUI_LANGUAGE "Slovenian"
+!insertmacro MUI_LANGUAGE "Spanish"
+;!insertmacro MUI_LANGUAGE "SpanishInternational"
+!insertmacro MUI_LANGUAGE "Swedish"
+;!insertmacro MUI_LANGUAGE "Thai"
+;!insertmacro MUI_LANGUAGE "TradChinese"
+;!insertmacro MUI_LANGUAGE "Turkish"
+!insertmacro MUI_LANGUAGE "Ukrainian"
+;!insertmacro MUI_LANGUAGE "Uzbek"
+!endif
+
+;Reserve Files (will make sure the file will be stored first in the data block
+; making the installer start faster when compressing in solid mode)
+!insertmacro MUI_RESERVEFILE_LANGDLL
+
+#########################################################################################
+# Installer sections
+#########################################################################################
+Section "ScummVM" SecMain
+ 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"
+
+ # Engine data
+ File "${engine_data}\drascula.dat"
+ File "${engine_data}\hugo.dat"
+ File "${engine_data}\kyra.dat"
+ File "${engine_data}\lure.dat"
+ File "${engine_data}\m4.dat"
+ File "${engine_data}\queen.tbl"
+ File "${engine_data}\sky.cpt"
+ File "${engine_data}\teenagent.dat"
+ File "${engine_data}\toon.dat"
+
+ File "${top_srcdir}\dists\pred.dic"
+
+ # Themes
+ File "${theme_data}\scummclassic.zip"
+ File "${theme_data}\scummmodern.zip"
+ File "${theme_data}\translations.dat"
+
+ # Main exe and dlls
+ File "${build_dir}\scummvm.exe"
+ File "${build_dir}\SDL.dll"
+
+ WriteRegStr HKCU "${REGKEY}" InstallPath "$INSTDIR" ; Store installation folder
+SectionEnd
+
+# Write Start menu entries and uninstaller
+Section -post SecMainPost
+ SetOutPath $INSTDIR
+ WriteUninstaller $INSTDIR\uninstall.exe
+ !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\Readme.lnk" $INSTDIR\README.txt
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
+ !insertmacro MUI_STARTMENU_WRITE_END
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe
+ WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" InstallLocation $INSTDIR
+ WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
+ WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
+SectionEnd
+
+# Installer functions
+Function .onInit
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+!ifdef _DEBUG && NSIS_CONFIG_LOG
+ LogSet on ; Will write a log file to the install folder (when using the special NSIS logging build)
+!endif
+FunctionEnd
+
+#########################################################################################
+# Uninstaller sections
+#########################################################################################
+Section -un.Main SecUninstall
+ Delete /REBOOTOK $INSTDIR\AUTHORS.txt
+ Delete /REBOOTOK $INSTDIR\COPYING.txt
+ Delete /REBOOTOK $INSTDIR\COPYING.LGPL.txt
+ Delete /REBOOTOK $INSTDIR\COPYRIGHT.txt
+ Delete /REBOOTOK $INSTDIR\NEWS.txt
+ Delete /REBOOTOK $INSTDIR\README.txt
+ Delete /REBOOTOK $INSTDIR\README-SDL.txt
+
+ Delete /REBOOTOK $INSTDIR\drascula.dat
+ Delete /REBOOTOK $INSTDIR\hugo.dat
+ Delete /REBOOTOK $INSTDIR\kyra.dat
+ Delete /REBOOTOK $INSTDIR\lure.dat
+ Delete /REBOOTOK $INSTDIR\m4.dat
+ Delete /REBOOTOK $INSTDIR\queen.tbl
+ Delete /REBOOTOK $INSTDIR\sky.cpt
+ Delete /REBOOTOK $INSTDIR\teenagent.dat
+ Delete /REBOOTOK $INSTDIR\toon.dat
+
+ Delete /REBOOTOK $INSTDIR\pred.dic
+
+ Delete /REBOOTOK $INSTDIR\scummclassic.zip
+ Delete /REBOOTOK $INSTDIR\scummmodern.zip
+ Delete /REBOOTOK $INSTDIR\translations.dat
+
+ Delete /REBOOTOK $INSTDIR\scummvm.exe
+ Delete /REBOOTOK $INSTDIR\SDL.dll
+SectionEnd
+
+Section -un.post SecUninstallPost
+ # Remove start menu entries
+ SetShellVarContext all
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Readme.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk"
+ RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
+
+ Delete /REBOOTOK $INSTDIR\uninstall.exe
+
+ DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
+ DeleteRegValue HKCU "${REGKEY}" StartMenuGroup
+ DeleteRegValue HKCU "${REGKEY}" InstallPath
+ DeleteRegValue HKCU "${REGKEY}" InstallerLanguage
+ DeleteRegKey /IfEmpty HKCU "${REGKEY}"
+
+ RmDir $INSTDIR ; will only remove if empty (pass /r flag for recursive behavior)
+ Push $R0
+ StrCpy $R0 $StartMenuGroup 1
+ StrCmp $R0 ">" no_smgroup
+no_smgroup:
+ Pop $R0
+SectionEnd
+
+# Uninstaller functions
+Function un.onInit
+ !insertmacro MUI_UNGETLANGUAGE
+ ReadRegStr $INSTDIR HKCU "${REGKEY}" InstallPath
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+FunctionEnd
diff --git a/dists/redhat/scummvm-tools.spec b/dists/redhat/scummvm-tools.spec
index b034e4479e..72b1ac701f 100644
--- a/dists/redhat/scummvm-tools.spec
+++ b/dists/redhat/scummvm-tools.spec
@@ -7,7 +7,7 @@
# Prologue information
#------------------------------------------------------------------------------
Name : scummvm-tools
-Version : 1.3.0git
+Version : 1.4.0git
Release : 1
Summary : ScummVM-related tools
Group : Interpreters
diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec
index d0d273fc66..777e0afc8a 100644
--- a/dists/redhat/scummvm.spec
+++ b/dists/redhat/scummvm.spec
@@ -7,7 +7,7 @@
# Prologue information
#------------------------------------------------------------------------------
Name : scummvm
-Version : 1.3.0git
+Version : 1.4.0git
Release : 1
Summary : Graphic adventure game interpreter
Group : Interpreters
diff --git a/dists/scummvm.rc b/dists/scummvm.rc
index 61981b30c5..109437305c 100644
--- a/dists/scummvm.rc
+++ b/dists/scummvm.rc
@@ -1,14 +1,52 @@
#include "winresrc.h"
-#if defined (__MINGW32__) || defined(__CYGWIN32__) || defined(HAS_INCLUDE_SET)
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define FILE 256
+
IDI_ICON ICON DISCARDABLE "icons/scummvm.ico"
-#else
-IDI_ICON ICON DISCARDABLE "../../icons/scummvm.ico"
+
+scummmodern.zip FILE "gui/themes/scummmodern.zip"
+#ifdef USE_TRANSLATION
+translations.dat FILE "gui/themes/translations.dat"
+#endif
+
+#if ENABLE_DRASCULA == STATIC_PLUGIN
+drascula.dat FILE "dists/engine-data/drascula.dat"
+#endif
+#if ENABLE_HUGO == STATIC_PLUGIN
+hugo.dat FILE "dists/engine-data/hugo.dat"
+#endif
+#if ENABLE_KYRA == STATIC_PLUGIN
+kyra.dat FILE "dists/engine-data/kyra.dat"
+#endif
+#if ENABLE_LURE == STATIC_PLUGIN
+lure.dat FILE "dists/engine-data/lure.dat"
+#endif
+#if ENABLE_M4 == STATIC_PLUGIN
+m4.dat FILE "dists/engine-data/m4.dat"
+#endif
+#if ENABLE_QUEEN == STATIC_PLUGIN
+queen.tbl FILE "dists/engine-data/queen.tbl"
+#endif
+#if ENABLE_SKY == STATIC_PLUGIN
+sky.cpt FILE "dists/engine-data/sky.cpt"
+#endif
+#if ENABLE_TEENAGENT == STATIC_PLUGIN
+teenagent.dat FILE "dists/engine-data/teenagent.dat"
+#endif
+#if ENABLE_TOON == STATIC_PLUGIN
+toon.dat FILE "dists/engine-data/toon.dat"
+#endif
+#if ENABLE_AGI == STATIC_PLUGIN
+pred.dic FILE "dists/pred.dic"
#endif
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,3,0,0
- PRODUCTVERSION 1,3,0,0
+ FILEVERSION 1,4,0,0
+ PRODUCTVERSION 1,4,0,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
@@ -25,13 +63,13 @@ BEGIN
BEGIN
VALUE "Comments", "Look! A three headed monkey (TM)! .. Nice use of the TM!\0"
VALUE "FileDescription", "http://www.scummvm.org/\0"
- VALUE "FileVersion", "1.3.0git\0"
+ VALUE "FileVersion", "1.4.0git\0"
VALUE "InternalName", "scummvm\0"
VALUE "LegalCopyright", "Copyright Љ 2001-2011 The ScummVM Team\0"
VALUE "LegalTrademarks", "'SCUMM', and all SCUMM games are a TM of LucasArts. Simon The Sorcerer is a TM of AdventureSoft. Beneath a Steel Sky and Broken Sword are a TM of Revolution. Flight of the Amazon Queen is a TM of John Passfield and Steve Stamatiadis. \0"
VALUE "OriginalFilename", "scummvm.exe\0"
VALUE "ProductName", "ScummVM\0"
- VALUE "ProductVersion", "1.3.0git\0"
+ VALUE "ProductVersion", "1.4.0git\0"
END
END
diff --git a/dists/scummvm.rc.in b/dists/scummvm.rc.in
index a0fcf82dbb..c043ce1644 100644
--- a/dists/scummvm.rc.in
+++ b/dists/scummvm.rc.in
@@ -1,9 +1,47 @@
#include "winresrc.h"
-#if defined (__MINGW32__) || defined(__CYGWIN32__) || defined(HAS_INCLUDE_SET)
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define FILE 256
+
IDI_ICON ICON DISCARDABLE "icons/scummvm.ico"
-#else
-IDI_ICON ICON DISCARDABLE "../../icons/scummvm.ico"
+
+scummmodern.zip FILE "gui/themes/scummmodern.zip"
+#ifdef USE_TRANSLATION
+translations.dat FILE "gui/themes/translations.dat"
+#endif
+
+#if ENABLE_DRASCULA == STATIC_PLUGIN
+drascula.dat FILE "dists/engine-data/drascula.dat"
+#endif
+#if ENABLE_HUGO == STATIC_PLUGIN
+hugo.dat FILE "dists/engine-data/hugo.dat"
+#endif
+#if ENABLE_KYRA == STATIC_PLUGIN
+kyra.dat FILE "dists/engine-data/kyra.dat"
+#endif
+#if ENABLE_LURE == STATIC_PLUGIN
+lure.dat FILE "dists/engine-data/lure.dat"
+#endif
+#if ENABLE_M4 == STATIC_PLUGIN
+m4.dat FILE "dists/engine-data/m4.dat"
+#endif
+#if ENABLE_QUEEN == STATIC_PLUGIN
+queen.tbl FILE "dists/engine-data/queen.tbl"
+#endif
+#if ENABLE_SKY == STATIC_PLUGIN
+sky.cpt FILE "dists/engine-data/sky.cpt"
+#endif
+#if ENABLE_TEENAGENT == STATIC_PLUGIN
+teenagent.dat FILE "dists/engine-data/teenagent.dat"
+#endif
+#if ENABLE_TOON == STATIC_PLUGIN
+toon.dat FILE "dists/engine-data/toon.dat"
+#endif
+#if ENABLE_AGI == STATIC_PLUGIN
+pred.dic FILE "dists/pred.dic"
#endif
VS_VERSION_INFO VERSIONINFO
diff --git a/dists/slackware/scummvm.SlackBuild b/dists/slackware/scummvm.SlackBuild
index 0e5436b85e..71f4818e7e 100755
--- a/dists/slackware/scummvm.SlackBuild
+++ b/dists/slackware/scummvm.SlackBuild
@@ -9,7 +9,7 @@ if [ "$TMP" = "" ]; then
fi
PKG=$TMP/package-scummvm
-VERSION=1.3.0git
+VERSION=1.4.0git
ARCH=i486
BUILD=1
diff --git a/dists/webos/mojo/appinfo.json b/dists/webos/mojo/appinfo.json
index 00762c9410..b3163a4e95 100644
--- a/dists/webos/mojo/appinfo.json
+++ b/dists/webos/mojo/appinfo.json
@@ -1,10 +1,10 @@
{
- "id": "org.scummvm.scummvm",
- "version": "1.3.0001",
+ "id": "APP_ID",
+ "version": "APP_VERSION",
"vendor": "ScummVM Team",
"type": "pdk",
"main": "start",
- "title": "ScummVM",
+ "title": "APP_TITLE",
"icon": "icon.png",
"requiredMemory": 64
}
diff --git a/dists/webos/mojo/scummvmrc-default b/dists/webos/mojo/scummvmrc-default
index d29a0fc6db..aefc5fda98 100644
--- a/dists/webos/mojo/scummvmrc-default
+++ b/dists/webos/mojo/scummvmrc-default
@@ -17,11 +17,7 @@ aspect_ratio=false
speech_mute=false
enable_gs=false
browser_lastpath=/media/internal/ScummVM/Games
-themepath=/media/internal/ScummVM/Themes
savepath=/media/internal/ScummVM/Saves
-extrapath=/media/internal/ScummVM/Extras
-pluginspath=/media/internal/ScummVM/Plugins
-vkeybdpath=/media/cryptofs/apps/usr/palm/applications/org.scummvm.scummvm/share/scummvm
[keymapper]
keymap_global_MEN=FORWARD
diff --git a/dists/webos/mojo/start b/dists/webos/mojo/start
index 3bdb9a59d8..446ce83f1d 100755
--- a/dists/webos/mojo/start
+++ b/dists/webos/mojo/start
@@ -4,14 +4,10 @@
APPDIR=$(readlink -f $(dirname $0))
SCUMMVMDIR=/media/internal/ScummVM
-
# Create the initial ScummVM directory structure
mkdir -p $SCUMMVMDIR/Games
mkdir -p $SCUMMVMDIR/Saves
mkdir -p $SCUMMVMDIR/Screenshots
-mkdir -p $SCUMMVMDIR/Themes
-mkdir -p $SCUMMVMDIR/Extras
-mkdir -p $SCUMMVMDIR/Plugins
# Install default configuration file if not already present
if [ ! -f $SCUMMVMDIR/scummvmrc ]
@@ -19,14 +15,8 @@ then
cp $APPDIR/scummvmrc-default $SCUMMVMDIR/scummvmrc
fi
-# Copy themes to theme directory
-cp -f $APPDIR/share/scummvm/*.zip $SCUMMVMDIR/Themes
-
# Change into the screenshots directory so screenshots are saved there
cd $SCUMMVMDIR/Screenshots
-# Set library path so the app finds its custom shared libraries
-export LD_LIBRARY_PATH=$APPDIR/lib
-
# Run the game
exec $APPDIR/bin/scummvm -c $SCUMMVMDIR/scummvmrc
diff --git a/dists/wii/meta.xml b/dists/wii/meta.xml
index 562d0982f5..68460c4721 100644
--- a/dists/wii/meta.xml
+++ b/dists/wii/meta.xml
@@ -2,7 +2,7 @@
<app version="1">
<name>ScummVM</name>
<coder>The ScummVM Team</coder>
- <version>1.3.0git@REVISION@</version>
+ <version>1.4.0git@REVISION@</version>
<release_date>@TIMESTAMP@</release_date>
<short_description>Point &amp; Click Adventures</short_description>
<long_description>ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed!
diff --git a/dists/win32/ScummVM.iss b/dists/win32/ScummVM.iss
new file mode 100644
index 0000000000..00f4868e60
--- /dev/null
+++ b/dists/win32/ScummVM.iss
@@ -0,0 +1,82 @@
+[Setup]
+DefaultDirName={pf}\ScummVM
+AppCopyright=2011
+AppName=ScummVM
+AppVerName=ScummVM Git
+DefaultGroupName=ScummVM
+AllowNoIcons=true
+AlwaysUsePersonalGroup=false
+EnableDirDoesntExistWarning=false
+Compression=lzma
+OutputDir=C:\ScummVM
+OutputBaseFilename=scummvm-win32
+DisableStartupPrompt=true
+AppendDefaultDirName=false
+SolidCompression=true
+DirExistsWarning=no
+SetupIconFile=scummvm.ico
+ShowLanguageDialog=yes
+LanguageDetectionMethod=uilanguage
+
+[Languages]
+Name: en; MessagesFile: compiler:Default.isl
+Name: eu; MessagesFile: compiler:Languages\Basque.isl
+Name: br; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
+Name: ca; MessagesFile: compiler:Languages\Catalan.isl
+Name: cz; MessagesFile: compiler:Languages\Czech.isl
+Name: da; MessagesFile: compiler:Languages\Danish.isl
+Name: nl; MessagesFile: compiler:Languages\Dutch.isl
+Name: fi; MessagesFile: compiler:Languages\Finnish.isl
+Name: fr; MessagesFile: compiler:Languages\French.isl
+Name: de; MessagesFile: compiler:Languages\German.isl
+Name: he; MessagesFile: compiler:Languages\Hebrew.isl
+Name: hu; MessagesFile: compiler:Languages\Hungarian.isl
+Name: it; MessagesFile: compiler:Languages\Italian.isl
+Name: ja; MessagesFile: compiler:Languages\Japanese.isl
+Name: nb; MessagesFile: compiler:Languages\Norwegian.isl
+Name: pl; MessagesFile: compiler:Languages\Polish.isl
+Name: pt; MessagesFile: compiler:Languages\Portuguese.isl
+Name: ru; MessagesFile: compiler:Languages\Russian.isl
+Name: sk; MessagesFile: compiler:Languages\Slovak.isl
+Name: sl; MessagesFile: compiler:Languages\Slovenian.isl
+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}\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
+Name: {group}\Copyright; Filename: {app}\COPYRIGHT.txt; WorkingDir: {app}; Comment: COPYRIGHT; Flags: createonlyiffileexists
+Name: {group}\Readme; Filename: {app}\README.txt; WorkingDir: {app}; Comment: README; Flags: createonlyiffileexists
+Name: {group}\News; Filename: {app}\NEWS.txt; WorkingDir: {app}; Comment: NEWS; Flags: createonlyiffileexists
+
+[Run]
+Filename: {app}\scummvm.exe; Flags: nowait skipifdoesntexist postinstall skipifsilent; Description: Launch ScummVM
+
+[UninstallDelete]
+Type: files; Name: {app}\ISTool.url
+
+[Files]
+Source: AUTHORS.txt; DestDir: {app}; Flags: ignoreversion
+Source: COPYING.txt; DestDir: {app}; Flags: ignoreversion
+Source: COPYING.LGPL.txt; DestDir: {app}; Flags: ignoreversion
+Source: COPYRIGHT.txt; DestDir: {app}; Flags: ignoreversion
+Source: NEWS.txt; DestDir: {app}; Flags: ignoreversion
+Source: README.txt; DestDir: {app}; Flags: ignoreversion isreadme
+Source: README-SDL.txt; DestDir: {app}; Flags: ignoreversion
+Source: scummvm.exe; DestDir: {app}; Flags: ignoreversion
+Source: SDL.dll; DestDir: {app}
+Source: scummclassic.zip; DestDir: {app}; Flags: ignoreversion
+Source: scummmodern.zip; DestDir: {app}; Flags: ignoreversion
+Source: drascula.dat; DestDir: {app}; Flags: ignoreversion
+Source: hugo.dat; DestDir: {app}; Flags: ignoreversion
+Source: kyra.dat; DestDir: {app}; Flags: ignoreversion
+Source: lure.dat; DestDir: {app}; Flags: ignoreversion
+Source: m4.dat; DestDir: {app}; Flags: ignoreversion
+Source: pred.dic; DestDir: {app}; Flags: ignoreversion
+Source: queen.tbl; DestDir: {app}; Flags: ignoreversion
+Source: sky.cpt; DestDir: {app}; Flags: ignoreversion
+Source: teenagent.dat; DestDir: {app}; Flags: ignoreversion
+Source: toon.dat; DestDir: {app}; Flags: ignoreversion
+Source: translations.dat; DestDir: {app}; Flags: ignoreversion
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index bf152ce90a..8170452102 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -23,7 +23,8 @@
*
*/
-#include "base/plugins.h"
+// FIXME: Avoid using printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#include "common/debug.h"
#include "common/util.h"
@@ -32,6 +33,7 @@
#include "common/macresman.h"
#include "common/md5.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "engines/advancedDetector.h"
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 515127b23d..757fb12f33 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -25,11 +25,13 @@
#ifndef ENGINES_ADVANCED_DETECTOR_H
#define ENGINES_ADVANCED_DETECTOR_H
-#include "common/fs.h"
-#include "common/error.h"
-
#include "engines/metaengine.h"
+namespace Common {
+class Error;
+class FSList;
+}
+
struct ADGameFileDescription {
const char *fileName;
@@ -62,8 +64,8 @@ struct ADGameDescription {
Common::Platform platform;
/**
- * A bitmask of extra flags. The top 8 bits are reserved for generic flags
- * defined in the ADGameFlags. This leaves 24 flags to be used by client
+ * A bitmask of extra flags. The top 16 bits are reserved for generic flags
+ * defined in the ADGameFlags. This leaves 16 bits to be used by client
* code.
*/
uint32 flags;
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 632587f7f7..a69d19f06c 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -32,6 +32,7 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/random.h"
+#include "common/textconsole.h"
#include "engines/util.h"
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index df19f55b52..c71a0ebf64 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -27,9 +27,10 @@
#define AGI_H
#include "common/scummsys.h"
-#include "common/endian.h"
+#include "common/error.h"
#include "common/util.h"
#include "common/file.h"
+#include "common/rect.h"
#include "common/stack.h"
#include "common/system.h"
@@ -45,7 +46,9 @@
#include "agi/sound.h"
-namespace Common { class RandomSource; }
+namespace Common {
+class RandomSource;
+}
/**
* This is the namespace of the AGI engine.
@@ -92,7 +95,7 @@ typedef signed int Err;
#define CRYPT_KEY_SIERRA "Avis Durgan"
#define CRYPT_KEY_AGDS "Alex Simkin"
-#define MSG_BOX_COLOUR 0x0f // White
+#define MSG_BOX_COLOR 0x0f // White
#define MSG_BOX_TEXT 0x00 // Black
#define MSG_BOX_LINE 0x04 // Red
#define BUTTON_BORDER 0x00 // Black
@@ -693,7 +696,6 @@ public:
class GfxMgr;
class SpritesMgr;
class Menu;
-class SearchTree;
// Image stack support
struct ImageStackElement {
@@ -727,7 +729,7 @@ protected:
virtual Common::Error run() {
Common::Error err;
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
@@ -935,7 +937,7 @@ public:
private:
// Some submethods of testIfCode
uint8 testObjRight(uint8, uint8, uint8, uint8, uint8);
- uint8 testObjCentre(uint8, uint8, uint8, uint8, uint8);
+ uint8 testObjCenter(uint8, uint8, uint8, uint8, uint8);
uint8 testObjInBox(uint8, uint8, uint8, uint8, uint8);
uint8 testPosn(uint8, uint8, uint8, uint8, uint8);
uint8 testSaid(uint8, uint8 *);
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 0a53f0c4f4..fb92344de2 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -23,12 +23,16 @@
*
*/
+// FIXME: Avoid using printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "base/plugins.h"
#include "engines/advancedDetector.h"
#include "common/config-manager.h"
#include "common/file.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "graphics/thumbnail.h"
#include "graphics/surface.h"
diff --git a/engines/agi/graphics.cpp b/engines/agi/graphics.cpp
index 58982a2931..f0d38761d0 100644
--- a/engines/agi/graphics.cpp
+++ b/engines/agi/graphics.cpp
@@ -24,9 +24,10 @@
*/
#include "common/file.h"
-
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "agi/agi.h"
#include "agi/graphics.h"
@@ -685,14 +686,14 @@ void GfxMgr::drawFrame(int x1, int y1, int x2, int y2, int c1, int c2) {
}
}
-void GfxMgr::drawBox(int x1, int y1, int x2, int y2, int colour1, int colour2, int m) {
+void GfxMgr::drawBox(int x1, int y1, int x2, int y2, int color1, int color2, int m) {
x1 += m;
y1 += m;
x2 -= m;
y2 -= m;
- drawRectangle(x1, y1, x2, y2, colour1);
- drawFrame(x1 + 2, y1 + 2, x2 - 2, y2 - 2, colour2, colour2);
+ drawRectangle(x1, y1, x2, y2, color1);
+ drawFrame(x1 + 2, y1 + 2, x2 - 2, y2 - 2, color2, color2);
flushBlock(x1, y1, x2, y2);
}
@@ -752,7 +753,7 @@ void GfxMgr::rawDrawButton(int x, int y, const char *s, int fgcolor, int bgcolor
// Draw a filled rectangle that's larger than the button. Used for drawing
// a border around the button as the button itself is drawn after this.
- drawRectangle(x1, y1, x2, y2, border ? BUTTON_BORDER : MSG_BOX_COLOUR);
+ drawRectangle(x1, y1, x2, y2, border ? BUTTON_BORDER : MSG_BOX_COLOR);
while (*s) {
putTextCharacter(0, x + textOffset, y + textOffset, *s++, fgcolor, bgcolor);
diff --git a/engines/agi/inv.cpp b/engines/agi/inv.cpp
index 46dfcb2b43..f1d9523887 100644
--- a/engines/agi/inv.cpp
+++ b/engines/agi/inv.cpp
@@ -66,7 +66,7 @@ namespace Agi {
#define SELECT_MSG_RU "ENTER - \xa2\xeb\xa1\xe0\xa0\xe2\xec, ESC - \xae\xe2\xac\xa5\xad\xa8\xe2\xec."
void AgiEngine::printItem(int n, int fg, int bg) {
- printText(objectName(_intobj[n]), 0, n % 2 ? 39 - strlen(objectName(_intobj[n])) : 1,
+ printText(objectName(_intobj[n]), 0, ((n % 2) ? 39 - strlen(objectName(_intobj[n])) : 1),
(n / 2) + 2, 40, fg, bg);
}
diff --git a/engines/agi/keyboard.cpp b/engines/agi/keyboard.cpp
index 344654128d..95211f8e3c 100644
--- a/engines/agi/keyboard.cpp
+++ b/engines/agi/keyboard.cpp
@@ -279,7 +279,7 @@ void AgiEngine::handleGetstring(int key) {
void AgiEngine::handleKeys(int key) {
uint8 *p = NULL;
int c = 0;
- static uint8 formattedEntry[256];
+ static uint8 formattedEntry[40];
int l = _game.lineUserInput;
int fg = _game.colorFg, bg = _game.colorBg;
int promptLength = strlen(agiSprintf(_game.strings[0]));
@@ -298,7 +298,7 @@ void AgiEngine::handleKeys(int key) {
;
// Copy to internal buffer
- for (; *p; p++) {
+ for (; *p && c < 40-1; p++) {
// Squash spaces
if (*p == 0x20 && *(p + 1) == 0x20) {
p++;
diff --git a/engines/agi/loader_v2.cpp b/engines/agi/loader_v2.cpp
index 8780e1dab8..0141a61065 100644
--- a/engines/agi/loader_v2.cpp
+++ b/engines/agi/loader_v2.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "agi/agi.h"
namespace Agi {
diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp
index 18ea4cae7d..025e755c8b 100644
--- a/engines/agi/loader_v3.cpp
+++ b/engines/agi/loader_v3.cpp
@@ -28,6 +28,7 @@
#include "common/config-manager.h"
#include "common/fs.h"
+#include "common/textconsole.h"
namespace Agi {
diff --git a/engines/agi/lzw.cpp b/engines/agi/lzw.cpp
index f645cb16d3..495d6458da 100644
--- a/engines/agi/lzw.cpp
+++ b/engines/agi/lzw.cpp
@@ -36,6 +36,8 @@
#include "agi/agi.h"
#include "agi/lzw.h"
+#include "common/textconsole.h"
+
namespace Agi {
diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp
index 5ec4908e4a..b62bcd9ad8 100644
--- a/engines/agi/menu.cpp
+++ b/engines/agi/menu.cpp
@@ -117,7 +117,7 @@ void Menu::drawMenuOptionHilite(int hMenu, int vMenu) {
AgiMenuOption *d = getMenuOption(hMenu, vMenu);
// Disabled menu items are "greyed out" with a checkerboard effect,
- // rather than having a different colour. -- dsymonds
+ // rather than having a different color. -- dsymonds
_vm->printText(d->text, 0, m->wincol + 1, vMenu + 2, m->width + 2,
MENU_BG, MENU_FG, !d->enabled);
}
diff --git a/engines/agi/objects.cpp b/engines/agi/objects.cpp
index d942a2b538..bea53d7fa4 100644
--- a/engines/agi/objects.cpp
+++ b/engines/agi/objects.cpp
@@ -25,6 +25,8 @@
#include "agi/agi.h"
+#include "common/textconsole.h"
+
namespace Agi {
int AgiEngine::allocObjects(int n) {
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 2ea53e57ad..e1f99456e8 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -32,6 +32,7 @@
#include "agi/menu.h"
#include "common/random.h"
+#include "common/textconsole.h"
namespace Agi {
diff --git a/engines/agi/op_test.cpp b/engines/agi/op_test.cpp
index ab4f6cadc5..f5234d4e6c 100644
--- a/engines/agi/op_test.cpp
+++ b/engines/agi/op_test.cpp
@@ -132,8 +132,8 @@ uint8 AgiEngine::testObjInBox(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
v->yPos >= y1 && v->xPos + v->xSize - 1 <= x2 && v->yPos <= y2;
}
-// if n is in centre of box
-uint8 AgiEngine::testObjCentre(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
+// if n is in center of box
+uint8 AgiEngine::testObjCenter(uint8 n, uint8 x1, uint8 y1, uint8 x2, uint8 y2) {
VtEntry *v = &_game.viewTable[n];
return v->xPos + v->xSize / 2 >= x1 &&
@@ -311,7 +311,7 @@ int AgiEngine::testIfCode(int lognum) {
ec = testObjInBox(p[0], p[1], p[2], p[3], p[4]);
break;
case 0x11:
- ec = testObjCentre(p[0], p[1], p[2], p[3], p[4]);
+ ec = testObjCenter(p[0], p[1], p[2], p[3], p[4]);
break;
case 0x12:
ec = testObjRight(p[0], p[1], p[2], p[3], p[4]);
diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp
index 47b72cc8c6..8951fc81df 100644
--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -26,6 +26,8 @@
#include "agi/agi.h"
#include "agi/graphics.h"
+#include "common/textconsole.h"
+
namespace Agi {
PictureMgr::PictureMgr(AgiBase *agi, GfxMgr *gfx) {
@@ -601,7 +603,7 @@ void PictureMgr::drawPicture() {
_patCode = nextByte();
plotBrush();
break;
- case 0xf0: // set colour on screen (AGI pic v2)
+ case 0xf0: // set color on screen (AGI pic v2)
if (_pictureVersion == AGIPIC_V15)
break;
@@ -615,7 +617,7 @@ void PictureMgr::drawPicture() {
_scrColor &= 0xF; // for v3 drawing diff
_scrOn = true;
_priOn = false;
- } else if (_pictureVersion == AGIPIC_V15) { // set colour on screen
+ } else if (_pictureVersion == AGIPIC_V15) { // set color on screen
_scrColor = nextByte();
_scrColor &= 0xF;
_scrOn = true;
@@ -623,7 +625,7 @@ void PictureMgr::drawPicture() {
_scrOn = false;
}
break;
- case 0xf2: // set colour on priority (AGI pic v2)
+ case 0xf2: // set color on priority (AGI pic v2)
if (_pictureVersion == AGIPIC_V15)
break;
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index 7457a317c2..c51c53e76e 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -26,6 +26,7 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/random.h"
+#include "common/textconsole.h"
#include "audio/mididrv.h"
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index 10ca797587..64fc4e9ae5 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -25,6 +25,7 @@
#include "common/events.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp
index 4e87c8063c..76849949c7 100644
--- a/engines/agi/preagi_troll.cpp
+++ b/engines/agi/preagi_troll.cpp
@@ -28,6 +28,7 @@
#include "agi/graphics.h"
#include "common/events.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index e97c144872..ef35a0b4e0 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -32,6 +32,7 @@
#include "common/events.h"
#include "common/memstream.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
namespace Agi {
@@ -216,15 +217,9 @@ int Winnie::getObjInRoom(int iRoom) {
return 0;
}
-#define setTakeDrop() {\
- if (getObjInRoom(_room))\
- fCanSel[IDI_WTP_SEL_TAKE] = true;\
- else\
- fCanSel[IDI_WTP_SEL_TAKE] = false;\
- if (_game.iObjHave)\
- fCanSel[IDI_WTP_SEL_DROP] = true;\
- else\
- fCanSel[IDI_WTP_SEL_DROP] = false;\
+void Winnie::setTakeDrop(int fCanSel[]) {
+ fCanSel[IDI_WTP_SEL_TAKE] = getObjInRoom(_room);
+ fCanSel[IDI_WTP_SEL_DROP] = _game.iObjHave;
}
void Winnie::setFlag(int iFlag) {
@@ -280,7 +275,7 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
fCanSel[IDI_WTP_SEL_EAST] = fCanSel[IDI_WTP_SEL_WEST] = true;
// check if object in room or player carrying one
- setTakeDrop();
+ setTakeDrop(fCanSel);
// check which rows have a menu option
for (iSel = 0; iSel < IDI_WTP_MAX_OPTION; iSel++) {
@@ -366,11 +361,11 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
break;
case IDI_WTP_SEL_TAKE:
takeObj(_room);
- setTakeDrop();
+ setTakeDrop(fCanSel);
break;
case IDI_WTP_SEL_DROP:
dropObj(_room);
- setTakeDrop();
+ setTakeDrop(fCanSel);
break;
}
}
@@ -795,13 +790,12 @@ void Winnie::getMenuMouseSel(int *iSel, int fCanSel[], int x, int y) {
}
}
-#define makeSel() {\
- if (fCanSel[*iSel]) {\
- return;\
- } else {\
- keyHelp();\
- clrMenuSel(iSel, fCanSel);\
- }\
+void Winnie::makeSel(int *iSel, int fCanSel[]) {
+ if (fCanSel[*iSel])
+ return;
+
+ keyHelp();
+ clrMenuSel(iSel, fCanSel);
}
void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) {
@@ -843,22 +837,22 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) {
// Click to move
if (fCanSel[IDI_WTP_SEL_NORTH] && hotspotNorth.contains(event.mouse.x, event.mouse.y)) {
*iSel = IDI_WTP_SEL_NORTH;
- makeSel();
+ makeSel(iSel, fCanSel);
_vm->_gfx->setCursorPalette(false);
return;
} else if (fCanSel[IDI_WTP_SEL_SOUTH] && hotspotSouth.contains(event.mouse.x, event.mouse.y)) {
*iSel = IDI_WTP_SEL_SOUTH;
- makeSel();
+ makeSel(iSel, fCanSel);
_vm->_gfx->setCursorPalette(false);
return;
} else if (fCanSel[IDI_WTP_SEL_WEST] && hotspotWest.contains(event.mouse.x, event.mouse.y)) {
*iSel = IDI_WTP_SEL_WEST;
- makeSel();
+ makeSel(iSel, fCanSel);
_vm->_gfx->setCursorPalette(false);
return;
} else if (fCanSel[IDI_WTP_SEL_EAST] && hotspotEast.contains(event.mouse.x, event.mouse.y)) {
*iSel = IDI_WTP_SEL_EAST;
- makeSel();
+ makeSel(iSel, fCanSel);
_vm->_gfx->setCursorPalette(false);
return;
} else {
@@ -943,31 +937,31 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) {
break;
case Common::KEYCODE_n:
*iSel = IDI_WTP_SEL_NORTH;
- makeSel();
+ makeSel(iSel, fCanSel);
break;
case Common::KEYCODE_s:
if (event.kbd.flags & Common::KBD_CTRL) {
_vm->flipflag(fSoundOn);
} else {
*iSel = IDI_WTP_SEL_SOUTH;
- makeSel();
+ makeSel(iSel, fCanSel);
}
break;
case Common::KEYCODE_e:
*iSel = IDI_WTP_SEL_EAST;
- makeSel();
+ makeSel(iSel, fCanSel);
break;
case Common::KEYCODE_w:
*iSel = IDI_WTP_SEL_WEST;
- makeSel();
+ makeSel(iSel, fCanSel);
break;
case Common::KEYCODE_t:
*iSel = IDI_WTP_SEL_TAKE;
- makeSel();
+ makeSel(iSel, fCanSel);
break;
case Common::KEYCODE_d:
*iSel = IDI_WTP_SEL_DROP;
- makeSel();
+ makeSel(iSel, fCanSel);
break;
case Common::KEYCODE_RETURN:
switch (*iSel) {
diff --git a/engines/agi/preagi_winnie.h b/engines/agi/preagi_winnie.h
index 5a5472feb0..0187d80326 100644
--- a/engines/agi/preagi_winnie.h
+++ b/engines/agi/preagi_winnie.h
@@ -342,6 +342,8 @@ private:
void saveGame();
void loadGame();
void dropObjRnd();
+ void setTakeDrop(int[]);
+ void makeSel(int*, int[]);
void wind();
void mist();
diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp
index 0230b9bd74..96ad78ace5 100644
--- a/engines/agi/predictive.cpp
+++ b/engines/agi/predictive.cpp
@@ -28,6 +28,7 @@
#include "agi/keyboard.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#ifdef __DS__
#include "wordcompletion.h"
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 9194cc642c..c8df726fc7 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -31,6 +31,7 @@
#include "common/file.h"
#include "common/config-manager.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "graphics/thumbnail.h"
#include "graphics/surface.h"
@@ -597,7 +598,7 @@ int AgiEngine::selectSlot() {
int hm = 1, vm = 3; // box margins
int xmin, xmax, slotClicked;
char desc[NUM_VISIBLE_SLOTS][40];
- int textCentre, buttonLength, buttonX[2], buttonY;
+ int textCenter, buttonLength, buttonX[2], buttonY;
const char *buttonText[] = { " OK ", "Cancel", NULL };
_noSaveLoadAllowed = true;
@@ -606,10 +607,10 @@ int AgiEngine::selectSlot() {
getSavegameDescription(_firstSlot + i, desc[i]);
}
- textCentre = GFX_WIDTH / CHAR_LINES / 2;
+ textCenter = GFX_WIDTH / CHAR_LINES / 2;
buttonLength = 6;
- buttonX[0] = (textCentre - 3 * buttonLength / 2) * CHAR_COLS;
- buttonX[1] = (textCentre + buttonLength / 2) * CHAR_COLS;
+ buttonX[0] = (textCenter - 3 * buttonLength / 2) * CHAR_COLS;
+ buttonX[1] = (textCenter + buttonLength / 2) * CHAR_COLS;
buttonY = (vm + 17) * CHAR_LINES;
for (i = 0; i < 2; i++)
@@ -642,8 +643,8 @@ int AgiEngine::selectSlot() {
for (i = 0; i < NUM_VISIBLE_SLOTS; i++) {
sprintf(dstr, "[%2d. %-28.28s]", i + _firstSlot, desc[i]);
printText(dstr, 0, hm + 1, vm + 4 + i,
- (40 - 2 * hm) - 1, i == active ? MSG_BOX_COLOUR : MSG_BOX_TEXT,
- i == active ? MSG_BOX_TEXT : MSG_BOX_COLOUR);
+ (40 - 2 * hm) - 1, i == active ? MSG_BOX_COLOR : MSG_BOX_TEXT,
+ i == active ? MSG_BOX_TEXT : MSG_BOX_COLOR);
}
char upArrow[] = "^";
@@ -651,11 +652,11 @@ int AgiEngine::selectSlot() {
char scrollBar[] = " ";
for (i = 1; i < NUM_VISIBLE_SLOTS - 1; i++)
- printText(scrollBar, 35, hm + 1, vm + 4 + i, 1, MSG_BOX_COLOUR, 7, true);
+ printText(scrollBar, 35, hm + 1, vm + 4 + i, 1, MSG_BOX_COLOR, 7, true);
printText(upArrow, 35, hm + 1, vm + 4, 1, 8, 7);
printText(downArrow, 35, hm + 1, vm + 4 + NUM_VISIBLE_SLOTS - 1, 1, 8, 7);
- printText(scrollBar, 35, hm + 1, vm + 4 + sbPos, 1, MSG_BOX_COLOUR, MSG_BOX_TEXT);
+ printText(scrollBar, 35, hm + 1, vm + 4 + sbPos, 1, MSG_BOX_COLOR, MSG_BOX_TEXT);
oldActive = active;
oldFirstSlot = _firstSlot;
@@ -808,7 +809,7 @@ int AgiEngine::saveGameDialog() {
do {
drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp);
printText("Select a slot in which you wish to\nsave the game:",
- 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR);
+ 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOR);
slot = selectSlot();
if (slot + _firstSlot == 0)
messageBox("That slot is for Autosave only.");
@@ -819,7 +820,7 @@ int AgiEngine::saveGameDialog() {
drawWindow(hp, vp + 5 * CHAR_LINES, GFX_WIDTH - hp,
GFX_HEIGHT - vp - 9 * CHAR_LINES);
printText("Enter a description for this game:",
- 0, hm + 1, vm + 6, w, MSG_BOX_TEXT, MSG_BOX_COLOUR);
+ 0, hm + 1, vm + 6, w, MSG_BOX_TEXT, MSG_BOX_COLOR);
_gfx->drawRectangle(3 * CHAR_COLS, 11 * CHAR_LINES - 1,
37 * CHAR_COLS, 12 * CHAR_LINES, MSG_BOX_TEXT);
_gfx->flushBlock(3 * CHAR_COLS, 11 * CHAR_LINES - 1,
@@ -844,7 +845,7 @@ int AgiEngine::saveGameDialog() {
for (numChars = 0; numChars < 28 && name[numChars]; numChars++)
handleGetstring(name[numChars]);
- _gfx->printCharacter(numChars + 3, 11, _game.cursorChar, MSG_BOX_COLOUR, MSG_BOX_TEXT);
+ _gfx->printCharacter(numChars + 3, 11, _game.cursorChar, MSG_BOX_COLOR, MSG_BOX_TEXT);
do {
mainCycle();
} while (_game.inputMode == INPUT_GETSTRING);
@@ -902,7 +903,7 @@ int AgiEngine::loadGameDialog() {
drawWindow(hp, vp, GFX_WIDTH - hp, GFX_HEIGHT - vp);
printText("Select a game which you wish to\nrestore:",
- 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOUR);
+ 0, hm + 1, vm + 1, w, MSG_BOX_TEXT, MSG_BOX_COLOR);
slot = selectSlot();
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index b215822917..b40cef67ef 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -31,6 +31,8 @@
#include "agi/sound_sarien.h"
#include "agi/sound_pcjr.h"
+#include "common/textconsole.h"
+
namespace Agi {
//
diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp
index 11bf5a9034..f5758ed140 100644
--- a/engines/agi/sound_2gs.cpp
+++ b/engines/agi/sound_2gs.cpp
@@ -28,6 +28,7 @@
#include "common/md5.h"
#include "common/memstream.h"
#include "common/str-array.h"
+#include "common/textconsole.h"
#include "agi/agi.h"
#include "agi/sound_2gs.h"
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp
index 986715721f..997c1edd6b 100644
--- a/engines/agi/sound_midi.cpp
+++ b/engines/agi/sound_midi.cpp
@@ -49,6 +49,7 @@
#include "common/file.h"
#include "common/memstream.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "agi/agi.h"
diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp
index 4ed7f8d029..6f2f3c5ad3 100644
--- a/engines/agi/sound_sarien.cpp
+++ b/engines/agi/sound_sarien.cpp
@@ -23,11 +23,7 @@
*
*/
-#include "common/md5.h"
-#include "common/config-manager.h"
-#include "common/fs.h"
#include "common/random.h"
-#include "common/str-array.h"
#include "audio/mididrv.h"
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index af3881170a..f85c4c1cdd 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -166,7 +166,7 @@ void AgiEngine::blitTextbox(const char *p, int y, int x, int len) {
drawWindow(xoff, yoff, xoff + w - 1, yoff + h - 1);
printText2(2, msg, 0, CHAR_COLS + xoff, CHAR_LINES + yoff,
- len + 1, MSG_BOX_TEXT, MSG_BOX_COLOUR);
+ len + 1, MSG_BOX_TEXT, MSG_BOX_COLOR);
free(msg);
@@ -730,7 +730,7 @@ void AgiEngine::drawWindow(int x1, int y1, int x2, int y2) {
debugC(4, kDebugLevelText, "x1=%d, y1=%d, x2=%d, y2=%d", x1, y1, x2, y2);
_gfx->saveBlock(x1, y1, x2, y2, _game.window.buffer);
- _gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOUR, MSG_BOX_LINE, 2);
+ _gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOR, MSG_BOX_LINE, 2);
}
} // End of namespace Agi
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index 22de66712d..fab3b5cf50 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -27,6 +27,7 @@
#include "common/util.h"
#include "common/fs.h"
#include "common/debug.h"
+#include "common/textconsole.h"
#include "agi/wagparser.h"
diff --git a/engines/agi/words.cpp b/engines/agi/words.cpp
index c48ed90ad8..d8596dec97 100644
--- a/engines/agi/words.cpp
+++ b/engines/agi/words.cpp
@@ -29,6 +29,8 @@
#include "agi/agi.h"
+#include "common/textconsole.h"
+
namespace Agi {
static uint8 *words; // words in the game
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 498c7e4961..56501b5294 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -25,9 +25,9 @@
#include "common/config-manager.h"
#include "common/EventRecorder.h"
-#include "common/events.h"
#include "common/file.h"
#include "common/fs.h"
+#include "common/textconsole.h"
#include "common/system.h"
#include "engines/util.h"
@@ -35,14 +35,12 @@
#include "agos/debugger.h"
#include "agos/intern.h"
#include "agos/agos.h"
-#include "agos/vga.h"
#include "backends/audiocd/audiocd.h"
#include "graphics/surface.h"
#include "audio/mididrv.h"
-#include "audio/mods/protracker.h"
namespace AGOS {
@@ -568,33 +566,33 @@ Common::Error AGOSEngine::init() {
// allocate buffers
_backGroundBuf = new Graphics::Surface();
- _backGroundBuf->create(_screenWidth, _screenHeight, 1);
+ _backGroundBuf->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8());
if (getGameType() == GType_FF || getGameType() == GType_PP) {
_backBuf = new Graphics::Surface();
- _backBuf->create(_screenWidth, _screenHeight, 1);
+ _backBuf->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8());
_scaleBuf = new Graphics::Surface();
- _scaleBuf->create(_screenWidth, _screenHeight, 1);
+ _scaleBuf->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8());
}
if (getGameType() == GType_SIMON2) {
_window4BackScn = new Graphics::Surface();
- _window4BackScn->create(_screenWidth, _screenHeight, 1);
+ _window4BackScn->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8());
} else if (getGameType() == GType_SIMON1) {
_window4BackScn = new Graphics::Surface();
- _window4BackScn->create(_screenWidth, 134, 1);
+ _window4BackScn->create(_screenWidth, 134, Graphics::PixelFormat::createFormatCLUT8());
} else if (getGameType() == GType_WW || getGameType() == GType_ELVIRA2) {
_window4BackScn = new Graphics::Surface();
- _window4BackScn->create(224, 127, 1);
+ _window4BackScn->create(224, 127, Graphics::PixelFormat::createFormatCLUT8());
} else if (getGameType() == GType_ELVIRA1) {
_window4BackScn = new Graphics::Surface();
if (getPlatform() == Common::kPlatformAmiga && (getFeatures() & GF_DEMO)) {
- _window4BackScn->create(224, 196, 1);
+ _window4BackScn->create(224, 196, Graphics::PixelFormat::createFormatCLUT8());
} else {
- _window4BackScn->create(224, 144, 1);
+ _window4BackScn->create(224, 144, Graphics::PixelFormat::createFormatCLUT8());
}
_window6BackScn = new Graphics::Surface();
- _window6BackScn->create(48, 80, 1);
+ _window6BackScn->create(48, 80, Graphics::PixelFormat::createFormatCLUT8());
}
setupGame();
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index bf51b31c43..aecf2437a7 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -29,6 +29,7 @@
#include "engines/engine.h"
#include "common/array.h"
+#include "common/error.h"
#include "common/keyboard.h"
#include "common/random.h"
#include "common/rect.h"
@@ -186,7 +187,7 @@ class AGOSEngine : public Engine {
virtual Common::Error run() {
Common::Error err;
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
@@ -1140,7 +1141,7 @@ protected:
int getScale(int16 y, int16 x);
void checkScrollX(int16 x, int16 xpos);
void checkScrollY(int16 y, int16 ypos);
- void centreScroll();
+ void centerScroll();
virtual void clearVideoWindow(uint16 windowNum, uint16 color);
void clearVideoBackGround(uint16 windowNum, uint16 color);
@@ -1921,7 +1922,7 @@ public:
void off_mouseOff();
void off_loadVideo();
void off_playVideo();
- void off_centreScroll();
+ void off_centerScroll();
void off_resetPVCount();
void off_setPathValues();
void off_stopClock();
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index acdc0084c4..ee47f62a58 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -31,8 +31,10 @@
#include "common/events.h"
#include "common/file.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "agos/animation.h"
diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp
index a477b3dedc..a131bb841b 100644
--- a/engines/agos/charset-fontdata.cpp
+++ b/engines/agos/charset-fontdata.cpp
@@ -26,6 +26,7 @@
#include "common/system.h"
+#include "common/textconsole.h"
#include "agos/agos.h"
#include "agos/intern.h"
diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp
index d0dc8cc42e..bb27557a6b 100644
--- a/engines/agos/debug.cpp
+++ b/engines/agos/debug.cpp
@@ -27,6 +27,7 @@
#include "common/file.h"
+#include "common/textconsole.h"
#include "agos/debug.h"
#include "agos/agos.h"
diff --git a/engines/agos/debug.h b/engines/agos/debug.h
index 38674de765..5865065ac3 100644
--- a/engines/agos/debug.h
+++ b/engines/agos/debug.h
@@ -2058,7 +2058,7 @@ static const char *const feeblefiles_opcodeNameTable[256] = {
"W|UNLOAD_ZONE",
NULL,
"|UNFREEZE_ZONES",
- "|CENTRE_SCROLL",
+ "|CENTER_SCROLL",
/* 188 */
"BSJ|STRING2_IS",
"|CLEAR_MARKS",
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index 646e63dacf..c8c70c0ecc 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -29,6 +29,7 @@
#include "common/config-manager.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "agos/intern.h"
#include "agos/agos.h"
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index 317c68d31a..6b9f65ee2b 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -28,6 +28,7 @@
#include "common/system.h"
#include "graphics/surface.h"
+#include "graphics/palette.h"
#include "agos/agos.h"
#include "agos/intern.h"
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index fc0b4f96cd..8799dbaa28 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -32,6 +32,7 @@
#include "common/events.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "backends/audiocd/audiocd.h"
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index 710c9ddd7e..4c998dfa5f 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -26,6 +26,7 @@
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp
index ca603db1fa..39a7705c54 100644
--- a/engines/agos/icons.cpp
+++ b/engines/agos/icons.cpp
@@ -25,9 +25,9 @@
-#include "common/system.h"
-
#include "common/file.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 81da5264ba..5d1523bbd5 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -26,6 +26,7 @@
#include "common/file.h"
+#include "common/textconsole.h"
#include "agos/intern.h"
#include "agos/agos.h"
diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp
index 5629a1dca6..2b103a75cb 100644
--- a/engines/agos/menus.cpp
+++ b/engines/agos/menus.cpp
@@ -27,6 +27,7 @@
#include "common/file.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index a37c96a787..26e2f2c736 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -28,6 +28,7 @@
#include "common/config-manager.h"
#include "common/file.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "agos/agos.h"
diff --git a/engines/agos/midi.h b/engines/agos/midi.h
index ad69a3ddde..40f54dbaf0 100644
--- a/engines/agos/midi.h
+++ b/engines/agos/midi.h
@@ -31,7 +31,7 @@
#include "common/mutex.h"
namespace Common {
- class File;
+class File;
}
namespace AGOS {
diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp
index 156dc6ecaa..f96518b5e9 100644
--- a/engines/agos/midiparser_s1d.cpp
+++ b/engines/agos/midiparser_s1d.cpp
@@ -25,6 +25,7 @@
#include "common/debug.h"
#include "common/util.h"
+#include "common/textconsole.h"
#include "audio/mididrv.h"
#include "audio/midiparser.h"
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index b8409669ee..0e818963e2 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -28,6 +28,7 @@
#include "common/file.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "agos/agos.h"
diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp
index fe09e746ff..34deff37ab 100644
--- a/engines/agos/res_snd.cpp
+++ b/engines/agos/res_snd.cpp
@@ -26,6 +26,7 @@
#include "common/config-manager.h"
#include "common/file.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "agos/intern.h"
#include "agos/agos.h"
diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp
index a2eff06fcc..0993197594 100644
--- a/engines/agos/rooms.cpp
+++ b/engines/agos/rooms.cpp
@@ -26,6 +26,7 @@
#include "common/file.h"
+#include "common/textconsole.h"
#include "agos/agos.h"
#include "agos/intern.h"
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index eefa2460ec..d6f25814bb 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -26,6 +26,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#include "gui/about.h"
diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp
index 90992b52fe..94a3f371cc 100644
--- a/engines/agos/script.cpp
+++ b/engines/agos/script.cpp
@@ -28,6 +28,7 @@
#include "common/system.h"
+#include "common/textconsole.h"
#include "agos/animation.h"
#include "agos/agos.h"
diff --git a/engines/agos/script_dp.cpp b/engines/agos/script_dp.cpp
index 57610017a1..6eb3ca4779 100644
--- a/engines/agos/script_dp.cpp
+++ b/engines/agos/script_dp.cpp
@@ -271,7 +271,7 @@ void AGOSEngine_DIMP::setupOpcodes() {
OPCODE(os1_unloadZone),
OPCODE(o_invalid),
OPCODE(os1_unfreezeZones),
- OPCODE(off_centreScroll),
+ OPCODE(off_centerScroll),
/* 188 */
OPCODE(os2_isShortText),
OPCODE(os2_clearMarks),
diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp
index dbd89cebf5..8dfee7f7c7 100644
--- a/engines/agos/script_ff.cpp
+++ b/engines/agos/script_ff.cpp
@@ -272,7 +272,7 @@ void AGOSEngine_Feeble::setupOpcodes() {
OPCODE(os1_unloadZone),
OPCODE(o_invalid),
OPCODE(os1_unfreezeZones),
- OPCODE(off_centreScroll),
+ OPCODE(off_centerScroll),
/* 188 */
OPCODE(os2_isShortText),
OPCODE(os2_clearMarks),
@@ -590,9 +590,9 @@ void AGOSEngine_Feeble::off_playVideo() {
}
}
-void AGOSEngine_Feeble::off_centreScroll() {
+void AGOSEngine_Feeble::off_centerScroll() {
// 187
- centreScroll();
+ centerScroll();
}
void AGOSEngine_Feeble::off_resetPVCount() {
diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp
index 909c051362..b8ba7fb015 100644
--- a/engines/agos/script_pn.cpp
+++ b/engines/agos/script_pn.cpp
@@ -26,6 +26,8 @@
#include "agos/agos.h"
#include "agos/vga.h"
+#include "common/textconsole.h"
+
namespace AGOS {
enum {
diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp
index 05a725cb50..dab0302631 100644
--- a/engines/agos/script_s1.cpp
+++ b/engines/agos/script_s1.cpp
@@ -26,6 +26,8 @@
#include "common/system.h"
+#include "graphics/palette.h"
+
#include "agos/agos.h"
#ifdef _WIN32_WCE
diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp
index dd525163c7..a0b14525f2 100644
--- a/engines/agos/script_s2.cpp
+++ b/engines/agos/script_s2.cpp
@@ -27,6 +27,8 @@
#include "agos/agos.h"
+#include "common/textconsole.h"
+
namespace AGOS {
#define OPCODE(x) _OPCODE(AGOSEngine_Simon2, x)
diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp
index 35301793bf..25d861acb5 100644
--- a/engines/agos/sound.cpp
+++ b/engines/agos/sound.cpp
@@ -25,6 +25,7 @@
#include "common/file.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "agos/agos.h"
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index bda605a84a..1152d6ed04 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -26,6 +26,7 @@
#include "common/file.h"
+#include "common/textconsole.h"
#include "gui/about.h"
#include "gui/message.h"
diff --git a/engines/agos/string_pn.cpp b/engines/agos/string_pn.cpp
index a4e40d8306..92d85ab96c 100644
--- a/engines/agos/string_pn.cpp
+++ b/engines/agos/string_pn.cpp
@@ -26,6 +26,8 @@
#include "agos/agos.h"
#include "agos/intern.h"
+#include "common/textconsole.h"
+
namespace AGOS {
uint32 AGOSEngine_PN::ftext(uint32 base, int n) {
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index 733d40e52d..bd07596a46 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -26,6 +26,7 @@
#include "common/file.h"
+#include "common/textconsole.h"
#include "agos/agos.h"
#include "agos/intern.h"
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 83ee05036c..6c07db13c1 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -31,6 +31,7 @@
#include "agos/vga.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp
index b0431db801..9e163ba91f 100644
--- a/engines/agos/vga_e2.cpp
+++ b/engines/agos/vga_e2.cpp
@@ -32,6 +32,7 @@
#include "common/system.h"
#include "graphics/surface.h"
+#include "graphics/palette.h"
namespace AGOS {
diff --git a/engines/agos/vga_ff.cpp b/engines/agos/vga_ff.cpp
index 38a3479292..14a1c60ae5 100644
--- a/engines/agos/vga_ff.cpp
+++ b/engines/agos/vga_ff.cpp
@@ -201,7 +201,7 @@ void AGOSEngine::vc78_computeXY() {
if (getGameType() == GType_FF) {
setBitFlag(85, false);
if (getBitFlag(74)) {
- centreScroll();
+ centerScroll();
}
}
}
@@ -348,7 +348,7 @@ void AGOSEngine::checkScrollY(int16 y, int16 ypos) {
}
}
-void AGOSEngine::centreScroll() {
+void AGOSEngine::centerScroll() {
int16 x, y, tmp;
if (_scrollXMax != 0) {
diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp
index 8aecd3448a..08b2cee303 100644
--- a/engines/agos/vga_ww.cpp
+++ b/engines/agos/vga_ww.cpp
@@ -32,6 +32,7 @@
#include "common/system.h"
#include "graphics/surface.h"
+#include "graphics/palette.h"
namespace AGOS {
diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp
index a03c7e178a..08680c9e45 100644
--- a/engines/agos/window.cpp
+++ b/engines/agos/window.cpp
@@ -26,6 +26,7 @@
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp
index 14b8de9e39..6b4b29dcfe 100644
--- a/engines/cine/anim.cpp
+++ b/engines/cine/anim.cpp
@@ -29,6 +29,7 @@
#include "common/endian.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/anim.h"
diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp
index b3171de918..22fd28a99c 100644
--- a/engines/cine/bg.cpp
+++ b/engines/cine/bg.cpp
@@ -26,6 +26,7 @@
#include "common/endian.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/various.h"
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 54d113d69c..8104ad38cd 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -23,13 +23,9 @@
*
*/
-#include "common/events.h"
#include "common/EventRecorder.h"
-#include "common/file.h"
-#include "common/savefile.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
-#include "common/system.h"
#include "engines/util.h"
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index 9dfa2f71ea..058c1a1140 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -27,6 +27,7 @@
#include "engines/advancedDetector.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/various.h"
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index 3970d88117..18feacd08b 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -30,8 +30,9 @@
#include "cine/pal.h"
#include "common/endian.h"
-#include "common/system.h"
#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp
index a01afd147b..3d58d6ddcd 100644
--- a/engines/cine/msg.cpp
+++ b/engines/cine/msg.cpp
@@ -25,6 +25,7 @@
#include "common/debug.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "cine/msg.h"
#include "cine/various.h"
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp
index 3c8ffc295b..0f52600db5 100644
--- a/engines/cine/pal.cpp
+++ b/engines/cine/pal.cpp
@@ -27,6 +27,9 @@
#include "cine/various.h"
#include "cine/pal.h"
#include "common/system.h" // For g_system->getPaletteManager()->setPalette
+#include "common/textconsole.h"
+
+#include "graphics/palette.h"
namespace Cine {
diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp
index f5c9402388..17ef01948c 100644
--- a/engines/cine/part.cpp
+++ b/engines/cine/part.cpp
@@ -25,6 +25,7 @@
#include "common/debug.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/unpack.h"
diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp
index 4911f78da9..1fc2a8b2fd 100644
--- a/engines/cine/saveload.cpp
+++ b/engines/cine/saveload.cpp
@@ -25,6 +25,7 @@
#include "common/debug.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/bg_list.h"
diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp
index ffbee3d389..674bf4dd86 100644
--- a/engines/cine/script_fw.cpp
+++ b/engines/cine/script_fw.cpp
@@ -28,6 +28,7 @@
*/
#include "common/endian.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/bg_list.h"
diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp
index 9ee3a892a9..aa2c8c33ac 100644
--- a/engines/cine/script_os.cpp
+++ b/engines/cine/script_os.cpp
@@ -28,6 +28,7 @@
*/
#include "common/endian.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/bg_list.h"
diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp
index f0c0668e33..414761159b 100644
--- a/engines/cine/sound.cpp
+++ b/engines/cine/sound.cpp
@@ -26,6 +26,8 @@
#include "common/endian.h"
#include "common/file.h"
#include "common/memstream.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "cine/cine.h"
#include "cine/sound.h"
diff --git a/engines/cine/sound.h b/engines/cine/sound.h
index e9a797989e..7b506ab5f3 100644
--- a/engines/cine/sound.h
+++ b/engines/cine/sound.h
@@ -30,7 +30,7 @@
#include "audio/mixer.h"
namespace Audio {
- class AudioStream;
+class AudioStream;
}
namespace Cine {
diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp
index 9dbfa315d9..fb6818d690 100644
--- a/engines/cine/texte.cpp
+++ b/engines/cine/texte.cpp
@@ -23,8 +23,10 @@
*
*/
-#include "cine/cine.h"
#include "common/file.h"
+#include "common/textconsole.h"
+
+#include "cine/cine.h"
#include "cine/various.h"
namespace Cine {
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index 5b8663606e..fdc7a28867 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -26,6 +26,7 @@
#include "common/endian.h"
#include "common/events.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index 9cbc3dd9ae..2c83aff743 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "cruise/cruise.h"
#include "cruise/staticres.h"
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp
index edd52d3b4a..7c63c155d3 100644
--- a/engines/cruise/background.cpp
+++ b/engines/cruise/background.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "cruise/cruise_main.h"
namespace Cruise {
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 2c5659c4d9..9712bd9439 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -23,13 +23,10 @@
*
*/
-#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/file.h"
-#include "common/savefile.h"
-#include "common/config-manager.h"
#include "common/debug-channels.h"
-#include "common/system.h"
+#include "common/textconsole.h"
#include "engines/util.h"
diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h
index ad3bb20ca1..8d03d47327 100644
--- a/engines/cruise/cruise.h
+++ b/engines/cruise/cruise.h
@@ -31,7 +31,6 @@
#include "common/random.h"
#include "engines/engine.h"
-#include "engines/game.h"
#include "cruise/cruise_main.h"
#include "cruise/debugger.h"
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index b1d7a594fe..e2f2d7468e 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/events.h"
#include "common/system.h" // for g_system->getEventManager()
+#include "common/textconsole.h"
#include "cruise/cruise.h"
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp
index 4f6c21e0e4..f1223c12e6 100644
--- a/engines/cruise/ctp.cpp
+++ b/engines/cruise/ctp.cpp
@@ -167,7 +167,7 @@ void makeCtStruct(Common::Array<CtStruct> &lst, int16 table[][40], int num, int
}
ct.num = num;
- ct.colour = walkboxColor[num];
+ ct.color = walkboxColor[num];
ct.bounds.left = minX;
ct.bounds.right = maxX;
ct.bounds.top = minY;
diff --git a/engines/cruise/ctp.h b/engines/cruise/ctp.h
index 3c6c9582cc..0aec9c52d8 100644
--- a/engines/cruise/ctp.h
+++ b/engines/cruise/ctp.h
@@ -57,7 +57,7 @@ class CtStruct {
public:
CtStruct *next;
int16 num;
- int16 colour;
+ int16 color;
Common::Rect bounds;
Common::Array<CtEntry> slices;
};
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index b9e4ca8bc9..3ccd1689b8 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -26,6 +26,7 @@
#include "cruise/cruise_main.h"
#include "common/endian.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace Cruise {
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index e43fadf598..63d7328e78 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -27,6 +27,7 @@
#include "base/plugins.h"
#include "common/savefile.h"
+#include "common/system.h"
#include "engines/advancedDetector.h"
#include "cruise/cruise.h"
@@ -74,7 +75,7 @@ static const CRUISEGameDescription gameDescriptions[] = {
{
{
"cruise",
- "16 colours",
+ "16 colors",
AD_ENTRY1("D1", "cd29a4cd9162076e9a18495fe56a48f3"),
Common::EN_GRB,
Common::kPlatformPC,
diff --git a/engines/cruise/font.cpp b/engines/cruise/font.cpp
index 3a609cb8d4..2bf36bbdbd 100644
--- a/engines/cruise/font.cpp
+++ b/engines/cruise/font.cpp
@@ -266,13 +266,13 @@ int32 prepareWordRender(int32 inRightBorder_X, int16 wordSpacingWidth,
return counter;
}
-void drawString(int32 x, int32 y, const char *string, uint8 *buffer, uint8 fontColour, int32 rightBorder_X) {
+void drawString(int32 x, int32 y, const char *string, uint8 *buffer, uint8 fontColor, int32 rightBorder_X) {
// Get the rendered text to display
gfxEntryStruct *s = renderText(rightBorder_X, string);
// Draw the message
- drawMessage(s, x, y, rightBorder_X - x, fontColour, buffer);
+ drawMessage(s, x, y, rightBorder_X - x, fontColor, buffer);
// Free the data
delete s->imagePtr;
diff --git a/engines/cruise/font.h b/engines/cruise/font.h
index 849c074ac5..17bb4372cf 100644
--- a/engines/cruise/font.h
+++ b/engines/cruise/font.h
@@ -66,7 +66,7 @@ void renderWord(uint8 *fontPtr_Data, uint8 *outBufferPtr,
int32 drawPosPixel_X, int32 heightOff, int32 height, int32 param4,
int32 stringRenderBufferSize, int32 width, int32 charWidth);
gfxEntryStruct *renderText(int inRightBorder_X, const char *string);
-void drawString(int32 x, int32 y, const char *string, uint8 * buffer, uint8 fontColour,
+void drawString(int32 x, int32 y, const char *string, uint8 * buffer, uint8 fontColor,
int32 inRightBorder_X);
void freeGfx(gfxEntryStruct *pGfx);
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 0b25ee59c1..75b90f7ec8 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -28,6 +28,8 @@
#include "cruise/cell.h"
#include "cruise/sound.h"
#include "cruise/staticres.h"
+
+#include "common/textconsole.h"
#include "common/util.h"
namespace Cruise {
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index f9ab193399..4d48c2c466 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -29,6 +29,8 @@
#include "common/list.h"
#include "common/rect.h"
+#include "graphics/palette.h"
+
#include "cruise/cruise.h"
#include "cruise/cruise_main.h"
@@ -203,7 +205,7 @@ void gfxModuleData_gfxWaitVSync() {
void gfxModuleData_flip() {
}
-void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int colour) {
+void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int color) {
int xp, yp;
for (yp = 0; yp < height; ++yp) {
@@ -216,7 +218,7 @@ void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, i
int yDest = y + yp;
if ((v != 0) && (xDest >= 0) && (yDest >= 0) && (xDest < 320) && (yDest < 200))
- *destP = (v == 1) ? 0 : colour;
+ *destP = (v == 1) ? 0 : color;
}
}
}
@@ -324,10 +326,10 @@ void flip() {
g_system->updateScreen();
}
-void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 colour) {
+void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 color) {
for (int y = y1; y < y2; ++y) {
byte *p = &gfxModuleData.pPage00[y * 320 + x1];
- Common::set_to(p, p + (x2 - x1), colour);
+ Common::set_to(p, p + (x2 - x1), color);
}
}
diff --git a/engines/cruise/gfxModule.h b/engines/cruise/gfxModule.h
index 1dbc5afc9b..1ca2581af5 100644
--- a/engines/cruise/gfxModule.h
+++ b/engines/cruise/gfxModule.h
@@ -55,7 +55,7 @@ void gfxModuleData_flip();
void gfxModuleData_updatePalette();
void gfxModuleData_updateScreen();
-void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int colour);
+void gfxCopyRect(const uint8 *sourceBuffer, int width, int height, byte *dest, int x, int y, int color);
void gfxModuleData_gfxCopyScreen(const uint8 *sourcePtr, uint8 *destPtr);
void convertGfxFromMode4(const uint8 *sourcePtr, int width, int height, uint8 *destPtr);
void convertGfxFromMode5(const uint8 *sourcePtr, int width, int height, uint8 *destPtr);
@@ -67,7 +67,7 @@ void gfxModuleData_setPalEntries(const byte *ptr, int start, int num);
void gfxModuleData_setPal256(const byte *ptr);
void gfxModuleData_addDirtyRect(const Common::Rect &r);
void flip();
-void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 colour);
+void drawSolidBox(int32 x1, int32 y1, int32 x2, int32 y2, uint8 color);
void resetBitmap(uint8 *dataPtr, int32 dataSize);
void switchBackground(const byte *newBg);
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index a722b947ff..36689ca0e3 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -29,6 +29,7 @@
#include "engines/metaengine.h"
#include "gui/saveload.h"
+#include "common/system.h"
#include "common/translation.h"
namespace Cruise {
diff --git a/engines/cruise/object.cpp b/engines/cruise/object.cpp
index 864491605f..8e2be0cf13 100644
--- a/engines/cruise/object.cpp
+++ b/engines/cruise/object.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "cruise/cruise_main.h"
namespace Cruise {
diff --git a/engines/cruise/overlay.cpp b/engines/cruise/overlay.cpp
index 9a77891deb..b7a0293f33 100644
--- a/engines/cruise/overlay.cpp
+++ b/engines/cruise/overlay.cpp
@@ -24,6 +24,7 @@
*/
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "cruise/cruise.h"
#include "cruise/cruise_main.h"
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index a1a306705e..6e75088d45 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -30,6 +30,7 @@
#include "common/serializer.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/scaler.h"
#include "graphics/thumbnail.h"
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp
index aae4dba475..d6ff784644 100644
--- a/engines/cruise/script.cpp
+++ b/engines/cruise/script.cpp
@@ -26,6 +26,7 @@
#include "cruise/cruise.h"
#include "cruise/cruise_main.h"
#include "common/endian.h"
+#include "common/textconsole.h"
namespace Cruise {
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index 2826a34351..322f808439 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -24,6 +24,8 @@
*/
#include "common/endian.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "cruise/cruise.h"
#include "cruise/cruise_main.h"
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 18c184e568..7e1f29271e 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -25,21 +25,21 @@
#include "base/version.h"
#include "common/config-manager.h"
-#include "common/savefile.h"
-#include "common/system.h"
#include "common/events.h"
+#include "common/str.h"
+#include "common/system.h"
#include "common/translation.h"
-#include "graphics/scaler.h"
-
#include "gui/about.h"
#include "gui/gui-manager.h"
-#include "gui/launcher.h"
-#include "gui/widgets/list.h"
#include "gui/message.h"
#include "gui/options.h"
#include "gui/saveload.h"
+#include "gui/ThemeEngine.h"
#include "gui/ThemeEval.h"
+#include "gui/widget.h"
+
+#include "graphics/font.h"
#include "engines/dialogs.h"
#include "engines/engine.h"
diff --git a/engines/dialogs.h b/engines/dialogs.h
index 6e5338b317..587e91a2bb 100644
--- a/engines/dialogs.h
+++ b/engines/dialogs.h
@@ -25,15 +25,15 @@
#ifndef GLOBAL_DIALOGS_H
#define GLOBAL_DIALOGS_H
-#include "common/str.h"
#include "gui/dialog.h"
class Engine;
namespace GUI {
- class ButtonWidget;
- class GraphicsWidget;
- class SaveLoadChooser;
+class ButtonWidget;
+class CommandSender;
+class GraphicsWidget;
+class SaveLoadChooser;
}
class MainMenuDialog : public GUI::Dialog {
diff --git a/engines/draci/animation.cpp b/engines/draci/animation.cpp
index d7582ec31d..f2f1727fdd 100644
--- a/engines/draci/animation.cpp
+++ b/engines/draci/animation.cpp
@@ -32,6 +32,7 @@
#include "draci/surface.h"
#include "common/memstream.h"
+#include "common/system.h"
namespace Draci {
@@ -359,7 +360,7 @@ void AnimationManager::insert(Animation *anim, bool allocateIndex) {
}
void AnimationManager::drawScene(Surface *surf) {
- // Fill the screen with colour zero since some rooms may rely on the screen being black
+ // Fill the screen with color zero since some rooms may rely on the screen being black
_vm->_screen->getSurface()->fill(0);
sortAnimations();
@@ -498,8 +499,8 @@ const Animation *AnimationManager::getTopAnimation(int x, int y) const {
Animation *retval = NULL;
- // Get transparent colour for the current screen
- const int transparent = _vm->_screen->getSurface()->getTransparentColour();
+ // Get transparent color for the current screen
+ const int transparent = _vm->_screen->getSurface()->getTransparentColor();
for (it = _animations.reverse_begin(); it != _animations.end(); --it) {
diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp
index 688458f3d4..d869d046f3 100644
--- a/engines/draci/font.cpp
+++ b/engines/draci/font.cpp
@@ -125,7 +125,7 @@ uint8 Font::getCharWidth(uint8 chr) const {
* @param ty Vertical offset on the surface
*/
-void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) const {
+void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_color) const {
assert(dst != NULL);
assert(tx >= 0);
assert(ty >= 0);
@@ -147,39 +147,39 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) co
int ySpaceLeft = dst->h - ty - 1;
int yPixelsToDraw = (_fontHeight < ySpaceLeft) ? _fontHeight : ySpaceLeft;
- int _transparent = dst->getTransparentColour();
+ int _transparent = dst->getTransparentColor();
for (int y = 0; y < yPixelsToDraw; ++y) {
for (int x = 0; x <= xPixelsToDraw; ++x) {
int curr = y * _maxCharWidth + x;
- int colour = _charData[charOffset + curr];
+ int color = _charData[charOffset + curr];
// If pixel is transparent, skip it
- if (colour == _transparent)
+ if (color == _transparent)
continue;
- // Replace colour with font colours
- switch (colour) {
+ // Replace color with font colors
+ switch (color) {
case 254:
- colour = with_colour;
+ color = with_color;
break;
case 253:
- colour = kFontColour2;
+ color = kFontColor2;
break;
case 252:
- colour = kFontColour3;
+ color = kFontColor3;
break;
case 251:
- colour = kFontColour4;
+ color = kFontColor4;
break;
}
// Paint the pixel
- ptr[x] = colour;
+ ptr[x] = color;
}
// Advance to next row
@@ -198,8 +198,8 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) co
* @param spacing Space to leave between individual characters. Defaults to 0.
*/
void Font::drawString(Surface *dst, const byte *str, uint len,
- int x, int y, int with_colour, int spacing, bool markDirty) const {
- drawString(dst, Common::String((const char *)str, len), x, y, with_colour, spacing, markDirty);
+ int x, int y, int with_color, int spacing, bool markDirty) const {
+ drawString(dst, Common::String((const char *)str, len), x, y, with_color, spacing, markDirty);
}
/**
@@ -213,7 +213,7 @@ void Font::drawString(Surface *dst, const byte *str, uint len,
*/
void Font::drawString(Surface *dst, const Common::String &str,
- int x, int y, int with_colour, int spacing, bool markDirty) const {
+ int x, int y, int with_color, int spacing, bool markDirty) const {
assert(dst != NULL);
assert(x >= 0);
assert(y >= 0);
@@ -238,7 +238,7 @@ void Font::drawString(Surface *dst, const Common::String &str,
break;
}
- drawChar(dst, str[i], curx, cury, with_colour);
+ drawChar(dst, str[i], curx, cury, with_color);
curx += getCharWidth(str[i]) + spacing;
}
diff --git a/engines/draci/font.h b/engines/draci/font.h
index 010de66e2c..0ccc900465 100644
--- a/engines/draci/font.h
+++ b/engines/draci/font.h
@@ -36,19 +36,19 @@ extern const char * const kFontBig;
class Surface;
/**
- * Default font colours. They all seem to remain constant except for the
+ * Default font colors. They all seem to remain constant except for the
* first one which varies depending on the character speaking.
- * kOverFontColour is set to transparent.
+ * kOverFontColor is set to transparent.
*/
enum {
- kFontColour1 = 2,
- kFontColour2 = 0,
- kFontColour3 = 3,
- kFontColour4 = 4,
- kOverFontColour = 255,
- kTitleColour = 255,
- kLineActiveColour = 254,
- kLineInactiveColour = 255
+ kFontColor1 = 2,
+ kFontColor2 = 0,
+ kFontColor3 = 3,
+ kFontColor4 = 4,
+ kOverFontColor = 255,
+ kTitleColor = 255,
+ kLineActiveColor = 254,
+ kLineInactiveColor = 255
};
/**
@@ -64,12 +64,12 @@ public:
uint8 getFontHeight() const { return _fontHeight; }
uint8 getMaxCharWidth() const { return _maxCharWidth; }
uint8 getCharWidth(byte chr) const;
- void drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_colour) const;
+ void drawChar(Surface *dst, uint8 chr, int tx, int ty, int with_color) const;
- void drawString(Surface *dst, const byte *str, uint len, int x, int y, int with_colour,
+ void drawString(Surface *dst, const byte *str, uint len, int x, int y, int with_color,
int spacing, bool markDirty) const;
void drawString(Surface *dst, const Common::String &str,
- int x, int y, int with_colour, int spacing, bool markDirty) const;
+ int x, int y, int with_color, int spacing, bool markDirty) const;
uint getStringWidth(const Common::String &str, int spacing) const;
uint getStringHeight(const Common::String &str) const;
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index 060ee41077..e19ec67810 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -47,9 +47,9 @@ static const char *dialoguePath = "ROZH";
static double real_to_double(byte real[6]);
enum {
- kWalkingMapOverlayColour = 2,
- kWalkingShortestPathOverlayColour = 120,
- kWalkingObliquePathOverlayColour = 73
+ kWalkingMapOverlayColor = 2,
+ kWalkingShortestPathOverlayColor = 120,
+ kWalkingObliquePathOverlayColor = 73
};
Game::Game(DraciEngine *vm) : _vm(vm), _walkingState(vm) {
@@ -69,7 +69,7 @@ Game::Game(DraciEngine *vm) : _vm(vm), _walkingState(vm) {
for (i = 0; i < numPersons; ++i) {
_persons[i]._x = personData.readUint16LE();
_persons[i]._y = personData.readUint16LE();
- _persons[i]._fontColour = personData.readByte();
+ _persons[i]._fontColor = personData.readByte();
}
// Read in dialogue offsets
@@ -217,12 +217,12 @@ void Game::init() {
// Initialize animation for object / room titles
_titleAnim = new Animation(_vm, kTitleText, 257, true);
- _titleAnim->addFrame(new Text("", _vm->_smallFont, kTitleColour, 0, 0, 0), NULL);
+ _titleAnim->addFrame(new Text("", _vm->_smallFont, kTitleColor, 0, 0, 0), NULL);
_vm->_anims->insert(_titleAnim, false);
// Initialize animation for speech text
Animation *speechAnim = new Animation(_vm, kSpeechText, 257, true);
- speechAnim->addFrame(new Text("", _vm->_bigFont, kFontColour1, 0, 0, 0), NULL);
+ speechAnim->addFrame(new Text("", _vm->_bigFont, kFontColor1, 0, 0, 0), NULL);
_vm->_anims->insert(speechAnim, false);
// Initialize inventory animation. _iconsArchive is never flushed.
@@ -236,7 +236,7 @@ void Game::init() {
for (uint i = 0; i < kDialogueLines; ++i) {
_dialogueAnims[i] = new Animation(_vm, kDialogueLinesID - i, 254, true);
- _dialogueAnims[i]->addFrame(new Text("", _vm->_smallFont, kLineInactiveColour, 0, 0, 0), NULL);
+ _dialogueAnims[i]->addFrame(new Text("", _vm->_smallFont, kLineInactiveColor, 0, 0, 0), NULL);
_dialogueAnims[i]->setRelative(1,
kScreenHeight - (i + 1) * _vm->_smallFont->getFontHeight());
@@ -418,9 +418,9 @@ void Game::handleDialogueLoop() {
text = reinterpret_cast<Text *>(_dialogueAnims[i]->getCurrentFrame());
if (_animUnderCursor == _dialogueAnims[i]) {
- text->setColour(kLineActiveColour);
+ text->setColor(kLineActiveColor);
} else {
- text->setColour(kLineInactiveColour);
+ text->setColor(kLineInactiveColor);
}
}
@@ -442,7 +442,7 @@ void Game::fadePalette(bool fading_out) {
}
for (int i = 1; i <= kBlackFadingIterations; ++i) {
_vm->_system->delayMillis(kBlackFadingTimeUnit);
- _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColours, i, kBlackFadingIterations);
+ _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColors, i, kBlackFadingIterations);
_vm->_screen->copyToScreen();
}
}
@@ -454,7 +454,7 @@ void Game::advanceAnimationsAndTestLoopExit() {
--_fadePhase;
const byte *startPal = _currentRoom._palette >= 0 ? _vm->_paletteArchive->getFile(_currentRoom._palette)->_data : NULL;
const byte *endPal = getScheduledPalette() >= 0 ? _vm->_paletteArchive->getFile(getScheduledPalette())->_data : NULL;
- _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColours, _fadePhases - _fadePhase, _fadePhases);
+ _vm->_screen->interpolatePalettes(startPal, endPal, 0, kNumColors, _fadePhases - _fadePhase, _fadePhases);
if (_fadePhase == 0) {
if (_loopSubstatus == kInnerWhileFade) {
setExitLoop(true);
@@ -997,7 +997,7 @@ int Game::dialogueDraw() {
dialogueLine = reinterpret_cast<Text *>(anim->getCurrentFrame());
dialogueLine->setText(_dialogueBlocks[i]._title);
- dialogueLine->setColour(kLineInactiveColour);
+ dialogueLine->setColor(kLineInactiveColor);
_lines[_dialogueLinesNum] = i;
_dialogueLinesNum++;
}
@@ -1114,8 +1114,8 @@ int Game::playHeroAnimation(int anim_index) {
return anim->currentFrameNum();
}
-void Game::redrawWalkingPath(Animation *anim, byte colour, const WalkingPath &path) {
- Sprite *ov = _walkingMap.newOverlayFromPath(path, colour);
+void Game::redrawWalkingPath(Animation *anim, byte color, const WalkingPath &path) {
+ Sprite *ov = _walkingMap.newOverlayFromPath(path, color);
delete anim->getFrame(0);
anim->replaceFrame(0, ov, NULL);
anim->markDirtyRect(_vm->_screen->getSurface());
@@ -1148,8 +1148,8 @@ void Game::walkHero(int x, int y, SightDirection dir) {
_walkingMap.obliquePath(shortestPath, &obliquePath);
debugC(2, kDraciWalkingDebugLevel, "Walking path lengths: shortest=%d oblique=%d", shortestPath.size(), obliquePath.size());
if (_vm->_showWalkingMap) {
- redrawWalkingPath(_walkingShortestPathOverlay, kWalkingShortestPathOverlayColour, shortestPath);
- redrawWalkingPath(_walkingObliquePathOverlay, kWalkingObliquePathOverlayColour, obliquePath);
+ redrawWalkingPath(_walkingShortestPathOverlay, kWalkingShortestPathOverlayColor, shortestPath);
+ redrawWalkingPath(_walkingObliquePathOverlay, kWalkingObliquePathOverlayColor, obliquePath);
}
// Start walking. Walking will be gradually advanced by
@@ -1211,7 +1211,7 @@ void Game::loadWalkingMap(int mapID) {
f = _vm->_walkingMapsArchive->getFile(mapID);
_walkingMap.load(f->_data, f->_length);
- Sprite *ov = _walkingMap.newOverlayFromMap(kWalkingMapOverlayColour);
+ Sprite *ov = _walkingMap.newOverlayFromMap(kWalkingMapOverlayColor);
delete _walkingMapOverlay->getFrame(0);
_walkingMapOverlay->replaceFrame(0, ov, NULL);
_walkingMapOverlay->markDirtyRect(_vm->_screen->getSurface());
@@ -1385,7 +1385,7 @@ void Game::enterNewRoom() {
loadOverlays();
// Draw the scene with the black palette and slowly fade into the right palette.
- _vm->_screen->setPalette(NULL, 0, kNumColours);
+ _vm->_screen->setPalette(NULL, 0, kNumColors);
_vm->_anims->drawScene(_vm->_screen->getSurface());
_vm->_screen->copyToScreen();
fadePalette(false);
diff --git a/engines/draci/game.h b/engines/draci/game.h
index 21baaed5cc..0b5b3a03cc 100644
--- a/engines/draci/game.h
+++ b/engines/draci/game.h
@@ -31,7 +31,7 @@
#include "draci/walking.h"
namespace Common {
- class Serializer;
+class Serializer;
}
namespace Draci {
@@ -145,7 +145,7 @@ public:
struct Person {
uint _x, _y;
- byte _fontColour;
+ byte _fontColor;
};
struct Dialogue {
@@ -348,7 +348,7 @@ private:
void enterNewRoom();
void initWalkingOverlays();
void loadRoomObjects();
- void redrawWalkingPath(Animation *anim, byte colour, const WalkingPath &path);
+ void redrawWalkingPath(Animation *anim, byte color, const WalkingPath &path);
DraciEngine *_vm;
diff --git a/engines/draci/mouse.cpp b/engines/draci/mouse.cpp
index 14d1162fed..5853d15d21 100644
--- a/engines/draci/mouse.cpp
+++ b/engines/draci/mouse.cpp
@@ -106,14 +106,14 @@ void Mouse::setCursorType(CursorType cur) {
f = _vm->_iconsArchive->getFile(cur);
Sprite sp(f->_data, f->_length, 0, 0, true);
- CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColours);
+ CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColors);
CursorMan.replaceCursor(sp.getBuffer(), sp.getWidth(), sp.getHeight(),
sp.getWidth() / 2, sp.getHeight() / 2, 255);
}
void Mouse::loadItemCursor(const GameItem *item, bool highlighted) {
const int itemID = item->_absNum;
- const int archiveIndex = 2 * itemID + highlighted;
+ const int archiveIndex = 2 * itemID + (highlighted ? 1 : 0);
CursorType newCursor = static_cast<CursorType> (kItemCursor + archiveIndex);
if (newCursor == getCursorType()) {
return;
@@ -124,7 +124,7 @@ void Mouse::loadItemCursor(const GameItem *item, bool highlighted) {
f = _vm->_itemImagesArchive->getFile(archiveIndex);
Sprite sp(f->_data, f->_length, 0, 0, true);
- CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColours);
+ CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColors);
CursorMan.replaceCursor(sp.getBuffer(), sp.getWidth(), sp.getHeight(),
sp.getWidth() / 2, sp.getHeight() / 2, 255);
}
diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp
index 750410b329..1d725ebb15 100644
--- a/engines/draci/music.cpp
+++ b/engines/draci/music.cpp
@@ -29,6 +29,7 @@
#include "audio/mididrv.h"
#include "audio/midiparser.h"
#include "common/config-manager.h"
+#include "common/debug.h"
#include "common/file.h"
#include "draci/draci.h"
diff --git a/engines/draci/screen.cpp b/engines/draci/screen.cpp
index dbe3fd98b8..ab9c49c63a 100644
--- a/engines/draci/screen.cpp
+++ b/engines/draci/screen.cpp
@@ -26,6 +26,8 @@
#include "common/memstream.h"
#include "common/system.h"
+#include "graphics/palette.h"
+
#include "draci/draci.h"
#include "draci/screen.h"
#include "draci/surface.h"
@@ -36,12 +38,12 @@ namespace Draci {
Screen::Screen(DraciEngine *vm) : _vm(vm) {
_surface = new Surface(kScreenWidth, kScreenHeight);
- _palette = new byte[3 * kNumColours];
- _blackPalette = new byte[3 * kNumColours];
- for (int i = 0; i < 3 * kNumColours; ++i) {
+ _palette = new byte[3 * kNumColors];
+ _blackPalette = new byte[3 * kNumColors];
+ for (int i = 0; i < 3 * kNumColors; ++i) {
_blackPalette[i] = 0;
}
- setPalette(NULL, 0, kNumColours);
+ setPalette(NULL, 0, kNumColors);
this->clearScreen();
}
@@ -54,11 +56,11 @@ Screen::~Screen() {
/**
* @brief Sets a part of the palette
* @param data Pointer to a buffer containing new palette data
- * start Index of the colour where replacement should start
- * num Number of colours to replace
+ * start Index of the color where replacement should start
+ * num Number of colors to replace
*/
void Screen::setPalette(const byte *data, uint16 start, uint16 num) {
- Common::MemoryReadStream pal(data ? data : _blackPalette, 3 * kNumColours);
+ Common::MemoryReadStream pal(data ? data : _blackPalette, 3 * kNumColors);
pal.seek(start * 3);
// Copy the palette
@@ -78,8 +80,8 @@ void Screen::setPalette(const byte *data, uint16 start, uint16 num) {
}
void Screen::interpolatePalettes(const byte *first, const byte *second, uint16 start, uint16 num, int index, int number) {
- Common::MemoryReadStream firstPal(first ? first : _blackPalette, 3 * kNumColours);
- Common::MemoryReadStream secondPal(second ? second : _blackPalette, 3 * kNumColours);
+ Common::MemoryReadStream firstPal(first ? first : _blackPalette, 3 * kNumColors);
+ Common::MemoryReadStream secondPal(second ? second : _blackPalette, 3 * kNumColors);
firstPal.seek(start * 3);
secondPal.seek(start * 3);
diff --git a/engines/draci/screen.h b/engines/draci/screen.h
index dc1aca092d..e4e910475a 100644
--- a/engines/draci/screen.h
+++ b/engines/draci/screen.h
@@ -33,7 +33,7 @@ namespace Draci {
enum ScreenParameters {
kScreenWidth = 320,
kScreenHeight = 200,
- kNumColours = 256,
+ kNumColors = 256,
kDefaultTransparent = 255
};
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index 2a27541ad9..a7ce8b27d9 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -716,14 +716,14 @@ void Script::talk(const Common::Array<int> &params) {
SoundSample *sample = _vm->_sound->isMutedVoice()
? NULL : _vm->_dubbingArchive->getSample(sentenceID, 0);
- // Set the string and text colour
+ // Set the string and text color
surface->markDirtyRect(speechFrame->getRect(kNoDisplacement));
if (_vm->_sound->showSubtitles() || !sample) {
speechFrame->setText(Common::String((const char *)f->_data+1, f->_length-1));
} else {
speechFrame->setText("");
}
- speechFrame->setColour(person->_fontColour);
+ speechFrame->setColor(person->_fontColor);
speechFrame->repeatedlySplitLongLines(kScreenWidth);
// Speak the dubbing if possible
@@ -873,11 +873,11 @@ void Script::fadePalettePlay(const Common::Array<int> &params) {
void Script::setPalette(const Common::Array<int> &params) {
if (_vm->_game->getScheduledPalette() == -1) {
- _vm->_screen->setPalette(NULL, 0, kNumColours);
+ _vm->_screen->setPalette(NULL, 0, kNumColors);
} else {
const BAFile *f;
f = _vm->_paletteArchive->getFile(_vm->_game->getScheduledPalette());
- _vm->_screen->setPalette(f->_data, 0, kNumColours);
+ _vm->_screen->setPalette(f->_data, 0, kNumColors);
}
// Immediately update the palette
_vm->_screen->copyToScreen();
diff --git a/engines/draci/script.h b/engines/draci/script.h
index e81691204e..a75f6bcbc3 100644
--- a/engines/draci/script.h
+++ b/engines/draci/script.h
@@ -30,7 +30,7 @@
#include "common/stream.h"
namespace Common {
- class ReadStream;
+class ReadStream;
}
namespace Draci {
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index c8646fff67..ab2479f811 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -29,6 +29,7 @@
#include "common/file.h"
#include "common/str.h"
#include "common/substream.h"
+#include "common/textconsole.h"
#include "common/memstream.h"
#include "common/unzip.h"
@@ -417,15 +418,16 @@ void Sound::setVolume() {
} else {
_muteSound = _muteVoice = true;
}
+
if (ConfMan.getBool("mute")) {
_muteSound = _muteVoice = true;
}
- const int soundVolume = _muteSound ? 0: ConfMan.getInt("sfx_volume");
- const int speechVolume = _muteVoice ? 0 : ConfMan.getInt("speech_volume");
+ _mixer->muteSoundType(Audio::Mixer::kSFXSoundType, _muteSound);
+ _mixer->muteSoundType(Audio::Mixer::kSpeechSoundType, _muteVoice);
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolume);
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, speechVolume);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
}
} // End of namespace Draci
diff --git a/engines/draci/sprite.cpp b/engines/draci/sprite.cpp
index 65c6e21ee4..b4296375f2 100644
--- a/engines/draci/sprite.cpp
+++ b/engines/draci/sprite.cpp
@@ -144,7 +144,7 @@ void Sprite::drawReScaled(Surface *surface, bool markDirty, const Displacement &
// Get pointers to source and destination buffers
byte *dst = (byte *)surface->getBasePtr(clippedDestRect.left, clippedDestRect.top);
- const int transparent = surface->getTransparentColour();
+ const int transparent = surface->getTransparentColor();
// Calculate how many rows and columns we need to draw
const int rows = clippedDestRect.height();
@@ -212,7 +212,7 @@ void Sprite::draw(Surface *surface, bool markDirty, int relX, int relY) const {
const byte *src = _data + croppedBy.y * _width +
(!_mirror ? croppedBy.x : _width - 1 - croppedBy.x);
- const int transparent = surface->getTransparentColour();
+ const int transparent = surface->getTransparentColor();
// Calculate how many rows and columns we need to draw
const int rows = clippedDestRect.height();
@@ -252,7 +252,7 @@ Common::Rect Sprite::getRect(const Displacement &displacement) const {
_y + displacement.relY + scummvm_lround(_scaledHeight * displacement.extraScaleY));
}
-Text::Text(const Common::String &str, const Font *font, byte fontColour,
+Text::Text(const Common::String &str, const Font *font, byte fontColor,
int x, int y, uint spacing) {
_x = x;
_y = y;
@@ -268,7 +268,7 @@ Text::Text(const Common::String &str, const Font *font, byte fontColour,
}
_spacing = spacing;
- _colour = fontColour;
+ _color = fontColor;
_font = font;
@@ -294,7 +294,7 @@ void Text::setText(const Common::String &str) {
}
void Text::draw(Surface *surface, bool markDirty, int relX, int relY) const {
- _font->drawString(surface, _text, _x + relX, _y + relY, _colour, _spacing, true);
+ _font->drawString(surface, _text, _x + relX, _y + relY, _color, _spacing, true);
}
Common::Rect Text::getRect(const Displacement &displacement) const {
diff --git a/engines/draci/sprite.h b/engines/draci/sprite.h
index ddc56ecd80..15e1cf80ca 100644
--- a/engines/draci/sprite.h
+++ b/engines/draci/sprite.h
@@ -139,12 +139,12 @@ private:
class Text : public Drawable {
public:
- Text(const Common::String &str, const Font *font, byte fontColour,
+ Text(const Common::String &str, const Font *font, byte fontColor,
int x, int y, uint spacing);
~Text() {}
void setText(const Common::String &str);
- void setColour(byte fontColour) { _colour = fontColour; }
+ void setColor(byte fontColor) { _color = fontColor; }
void setSpacing(uint spacing) { _spacing = spacing; }
void setFont(const Font *font);
@@ -165,7 +165,7 @@ private:
Common::String _text;
uint _length;
- uint8 _colour;
+ uint8 _color;
uint _spacing;
const Font *_font;
};
diff --git a/engines/draci/surface.cpp b/engines/draci/surface.cpp
index 1c7ecfb23b..37a76dbe0e 100644
--- a/engines/draci/surface.cpp
+++ b/engines/draci/surface.cpp
@@ -29,9 +29,9 @@
namespace Draci {
Surface::Surface(int width, int height) {
- this->create(width, height, 1);
+ this->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
this->markClean();
- _transparentColour = kDefaultTransparent;
+ _transparentColor = kDefaultTransparent;
}
Surface::~Surface() {
@@ -80,12 +80,12 @@ void Surface::markClean() {
}
/**
- * @brief Fills the surface with the specified colour
+ * @brief Fills the surface with the specified color
*/
-void Surface::fill(uint colour) {
+void Surface::fill(uint color) {
byte *ptr = (byte *)getBasePtr(0, 0);
- memset(ptr, colour, w * h);
+ memset(ptr, color, w * h);
}
/**
diff --git a/engines/draci/surface.h b/engines/draci/surface.h
index a5c9ddb597..cb15ecebe4 100644
--- a/engines/draci/surface.h
+++ b/engines/draci/surface.h
@@ -27,6 +27,7 @@
#define DRACI_SURFACE_H
#include "common/list.h"
+#include "common/rect.h"
#include "graphics/surface.h"
namespace Draci {
@@ -43,18 +44,18 @@ public:
void markDirty();
void markClean();
bool needsFullUpdate() const { return _fullUpdate; }
- uint getTransparentColour() const { return _transparentColour; }
- void setTransparentColour(uint colour) { _transparentColour = colour; }
- void fill(uint colour);
+ uint getTransparentColor() const { return _transparentColor; }
+ void setTransparentColor(uint color) { _transparentColor = color; }
+ void fill(uint color);
uint putAboveY(int y, int height) const;
uint centerOnX(int x, int width) const;
Common::Rect getDimensions() const { return Common::Rect(w, h); }
private:
- /** The current transparent colour of the surface. See getTransparentColour() and
- * setTransparentColour().
+ /** The current transparent color of the surface. See getTransparentColor() and
+ * setTransparentColor().
*/
- uint _transparentColour;
+ uint _transparentColor;
/** Set when the surface is scheduled for a full update.
* See markDirty(), markClean(). Accessed via needsFullUpdate().
diff --git a/engines/draci/walking.cpp b/engines/draci/walking.cpp
index c6f9a58a85..d72e50be07 100644
--- a/engines/draci/walking.cpp
+++ b/engines/draci/walking.cpp
@@ -58,7 +58,7 @@ bool WalkingMap::isWalkable(const Common::Point &p) const {
return getPixel(p.x / _deltaX, p.y / _deltaY);
}
-Sprite *WalkingMap::newOverlayFromMap(byte colour) const {
+Sprite *WalkingMap::newOverlayFromMap(byte color) const {
// HACK: Create a visible overlay from the walking map so we can test it
byte *wlk = new byte[_realWidth * _realHeight];
memset(wlk, 255, _realWidth * _realHeight);
@@ -66,7 +66,7 @@ Sprite *WalkingMap::newOverlayFromMap(byte colour) const {
for (int i = 0; i < _mapWidth; ++i) {
for (int j = 0; j < _mapHeight; ++j) {
if (getPixel(i, j)) {
- drawOverlayRectangle(Common::Point(i, j), colour, wlk);
+ drawOverlayRectangle(Common::Point(i, j), color, wlk);
}
}
}
@@ -285,7 +285,7 @@ void WalkingMap::obliquePath(const WalkingPath& path, WalkingPath *obliquedPath)
while (managedToOblique(obliquedPath)) {}
}
-Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte colour) const {
+Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte color) const {
// HACK: Create a visible overlay from the walking map so we can test it
byte *wlk = new byte[_realWidth * _realHeight];
memset(wlk, 255, _realWidth * _realHeight);
@@ -297,14 +297,14 @@ Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte colour) con
// Draw only points in the interval [v1, v2). These half-open
// half-closed intervals connect all the way to the last point.
for (int step = 0; step < steps; ++step) {
- drawOverlayRectangle(interpolate(v1, v2, step, steps), colour, wlk);
+ drawOverlayRectangle(interpolate(v1, v2, step, steps), color, wlk);
}
}
// Draw the last point. This works also when the path has no segment,
// but just one point.
if (path.size() > 0) {
const Common::Point &vLast = path[path.size()-1];
- drawOverlayRectangle(vLast, colour, wlk);
+ drawOverlayRectangle(vLast, color, wlk);
}
Sprite *ov = new Sprite(_realWidth, _realHeight, wlk, 0, 0, false);
@@ -313,10 +313,10 @@ Sprite *WalkingMap::newOverlayFromPath(const WalkingPath &path, byte colour) con
return ov;
}
-void WalkingMap::drawOverlayRectangle(const Common::Point &p, byte colour, byte *buf) const {
+void WalkingMap::drawOverlayRectangle(const Common::Point &p, byte color, byte *buf) const {
for (int i = 0; i < _deltaX; ++i) {
for (int j = 0; j < _deltaY; ++j) {
- buf[(p.y * _deltaY + j) * _realWidth + (p.x * _deltaX + i)] = colour;
+ buf[(p.y * _deltaY + j) * _realWidth + (p.x * _deltaX + i)] = color;
}
}
}
diff --git a/engines/draci/walking.h b/engines/draci/walking.h
index 55b39792f1..d6c7f0691d 100644
--- a/engines/draci/walking.h
+++ b/engines/draci/walking.h
@@ -45,12 +45,12 @@ public:
bool getPixel(int x, int y) const;
bool isWalkable(const Common::Point &p) const;
- Sprite *newOverlayFromMap(byte colour) const;
+ Sprite *newOverlayFromMap(byte color) const;
Common::Point findNearestWalkable(int x, int y) const;
bool findShortestPath(Common::Point p1, Common::Point p2, WalkingPath *path) const;
void obliquePath(const WalkingPath& path, WalkingPath *obliquedPath);
- Sprite *newOverlayFromPath(const WalkingPath &path, byte colour) const;
+ Sprite *newOverlayFromPath(const WalkingPath &path, byte color) const;
Common::Point getDelta() const { return Common::Point(_deltaX, _deltaY); }
static int pointsBetween(const Common::Point &p1, const Common::Point &p2);
@@ -68,7 +68,7 @@ private:
// 4 possible directions to walk from a pixel.
static const int kDirections[][2];
- void drawOverlayRectangle(const Common::Point &p, byte colour, byte *buf) const;
+ void drawOverlayRectangle(const Common::Point &p, byte color, byte *buf) const;
bool lineIsCovered(const Common::Point &p1, const Common::Point &p2) const;
// Returns true if the number of vertices on the path was decreased.
diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp
index d0906fdf55..dcd93d84d7 100644
--- a/engines/drascula/converse.cpp
+++ b/engines/drascula/converse.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "drascula/drascula.h"
namespace Drascula {
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 19395dcd3f..470f28ccff 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -29,6 +29,7 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "backends/audiocd/audiocd.h"
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index ac3f86b9ba..b70384614f 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -573,8 +573,8 @@ public:
void enterName();
bool soundIsActive();
void waitFrameSSN();
- void mixVideo(byte *OldScreen, byte *NewScreen);
- void decodeRLE(byte *BufferRLE, byte *MiVideoRLE);
+ void mixVideo(byte *OldScreen, byte *NewScreen, uint16 oldPitch);
+ void decodeRLE(byte *BufferRLE, byte *MiVideoRLE, uint16 pitch = 320);
void decodeOffset(byte *BufferOFF, byte *MiVideoOFF, int length);
int playFrameSSN(Common::SeekableReadStream *stream);
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index 9c5f3dc12a..0811fbede1 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -25,8 +25,9 @@
#include "drascula/drascula.h"
#include "graphics/surface.h"
-#include "common/stream.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
namespace Drascula {
@@ -133,14 +134,18 @@ void DrasculaEngine::showFrame(Common::SeekableReadStream *stream, bool firstFra
}
byte *prevFrame = (byte *)malloc(64000);
- byte *screenBuffer = (byte *)_system->lockScreen()->pixels;
- memcpy(prevFrame, screenBuffer, 64000);
+ Graphics::Surface *screenSurf = _system->lockScreen();
+ byte *screenBuffer = (byte *)screenSurf->pixels;
+ uint16 screenPitch = screenSurf->pitch;
+ for (int y = 0; y < 200; y++) {
+ memcpy(prevFrame+y*320, screenBuffer+y*screenPitch, 320);
+ }
- decodeRLE(pcxData, screenBuffer);
+ decodeRLE(pcxData, screenBuffer, screenPitch);
free(pcxData);
if (!firstFrame)
- mixVideo(screenBuffer, prevFrame);
+ mixVideo(screenBuffer, prevFrame, screenPitch);
_system->unlockScreen();
_system->updateScreen();
@@ -445,7 +450,9 @@ void DrasculaEngine::screenSaver() {
int x1_, y1_, off1, off2;
- byte *screenBuffer = (byte *)_system->lockScreen()->pixels;
+ Graphics::Surface *screenSurf = _system->lockScreen();
+ byte *screenBuffer = (byte *)screenSurf->pixels;
+ uint16 screenPitch = screenSurf->pitch;
for (int i = 0; i < 200; i++) {
for (int j = 0; j < 320; j++) {
x1_ = j + tempRow[i];
@@ -463,7 +470,7 @@ void DrasculaEngine::screenSaver() {
y1_ = checkWrapY(y1_);
off2 = 320 * y1_ + x1_;
- screenBuffer[320 * i + j] = ghost[bgSurface[off2] + (copia[off1] << 8)];
+ screenBuffer[screenPitch * i + j] = ghost[bgSurface[off2] + (copia[off1] << 8)];
}
}
@@ -532,11 +539,14 @@ int DrasculaEngine::playFrameSSN(Common::SeekableReadStream *stream) {
free(BufferSSN);
waitFrameSSN();
- byte *screenBuffer = (byte *)_system->lockScreen()->pixels;
+ Graphics::Surface *screenSurf = _system->lockScreen();
+ byte *screenBuffer = (byte *)screenSurf->pixels;
+ uint16 screenPitch = screenSurf->pitch;
if (FrameSSN)
- mixVideo(screenBuffer, screenSurface);
+ mixVideo(screenBuffer, screenSurface, screenPitch);
else
- memcpy(screenBuffer, screenSurface, 64000);
+ for (int y = 0; y < 200; y++)
+ memcpy(screenBuffer+y*screenPitch, screenSurface+y*320, 320);
_system->unlockScreen();
_system->updateScreen();
@@ -548,11 +558,14 @@ int DrasculaEngine::playFrameSSN(Common::SeekableReadStream *stream) {
decodeOffset(BufferSSN, screenSurface, length);
free(BufferSSN);
waitFrameSSN();
- byte *screenBuffer = (byte *)_system->lockScreen()->pixels;
+ Graphics::Surface *screenSurf = _system->lockScreen();
+ byte *screenBuffer = (byte *)screenSurf->pixels;
+ uint16 screenPitch = screenSurf->pitch;
if (FrameSSN)
- mixVideo(screenBuffer, screenSurface);
+ mixVideo(screenBuffer, screenSurface, screenPitch);
else
- memcpy(screenBuffer, screenSurface, 64000);
+ for (int y = 0; y < 200; y++)
+ memcpy(screenBuffer+y*screenPitch, screenSurface+y*320, 320);
_system->unlockScreen();
_system->updateScreen();
@@ -588,11 +601,12 @@ void DrasculaEngine::decodeOffset(byte *BufferOFF, byte *MiVideoOFF, int length)
}
}
-void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr) {
+ void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr, uint16 pitch) {
bool stopProcessing = false;
byte pixel;
uint repeat;
- int curByte = 0;
+ int curByte = 0, curLine = 0;
+ pitch -= 320;
while (!stopProcessing) {
pixel = *srcPtr++;
@@ -603,17 +617,25 @@ void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr) {
}
for (uint j = 0; j < repeat; j++) {
*dstPtr++ = pixel;
- if (++curByte >= 64000) {
- stopProcessing = true;
- break;
+ if (++curByte >= 320) {
+ curByte = 0;
+ dstPtr += pitch;
+ if (++curLine >= 200) {
+ stopProcessing = true;
+ break;
+ }
}
}
}
}
-void DrasculaEngine::mixVideo(byte *OldScreen, byte *NewScreen) {
- for (int x = 0; x < 64000; x++)
- OldScreen[x] ^= NewScreen[x];
+void DrasculaEngine::mixVideo(byte *OldScreen, byte *NewScreen, uint16 oldPitch) {
+ for (int y = 0; y < 200; y++) {
+ for (int x = 0; x < 320; x++)
+ OldScreen[x] ^= NewScreen[x];
+ OldScreen += oldPitch;
+ NewScreen += 320;
+ }
}
void DrasculaEngine::waitFrameSSN() {
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index 6b507abc65..630eb08d3c 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "drascula/drascula.h"
namespace Drascula {
diff --git a/engines/drascula/palette.cpp b/engines/drascula/palette.cpp
index b521c0313b..a75e72e249 100644
--- a/engines/drascula/palette.cpp
+++ b/engines/drascula/palette.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "graphics/palette.h"
+
#include "drascula/drascula.h"
namespace Drascula {
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index 7744374518..35d4eedb5d 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -24,6 +24,7 @@
*/
#include "common/array.h"
+#include "common/textconsole.h"
#include "drascula/drascula.h"
@@ -140,6 +141,9 @@ void DrasculaEngine::setupRoomsTable() {
}
void DrasculaEngine::freeRoomsTable() {
+ if (_roomHandlers == 0)
+ return;
+
for (uint32 i = 0; i < _roomHandlers->roomParsers.size(); i++)
delete _roomHandlers->roomParsers[i];
_roomHandlers->roomParsers.clear();
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index db67409890..eacbe6756d 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "drascula/drascula.h"
namespace Drascula {
diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp
index 48e7492b11..5cb1c4486a 100644
--- a/engines/drascula/sound.cpp
+++ b/engines/drascula/sound.cpp
@@ -29,6 +29,7 @@
#include "audio/decoders/voc.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "backends/audiocd/audiocd.h"
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 0e5e58bc72..2c1d3a732c 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -22,6 +22,8 @@
* $Id$
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -32,25 +34,26 @@
#include "engines/engine.h"
#include "engines/dialogs.h"
-#include "engines/metaengine.h"
-#include "engines/util.h"
#include "common/config-manager.h"
-#include "common/debug.h"
#include "common/events.h"
#include "common/file.h"
-#include "common/timer.h"
-#include "common/savefile.h"
#include "common/system.h"
#include "common/str.h"
+#include "common/error.h"
+#include "common/list.h"
+#include "common/list_intern.h"
+#include "common/scummsys.h"
+#include "common/textconsole.h"
#include "gui/debugger.h"
+#include "gui/dialog.h"
#include "gui/message.h"
-#include "gui/gui-manager.h"
#include "audio/mixer.h"
#include "graphics/cursorman.h"
+#include "graphics/pixelformat.h"
#ifdef _WIN32_WCE
extern bool isSmartphone();
@@ -439,10 +442,14 @@ void Engine::syncSoundSettings() {
if (ConfMan.hasKey("mute"))
mute = ConfMan.getBool("mute");
- _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, (mute ? 0 : Audio::Mixer::kMaxMixerVolume));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, (mute ? 0 : soundVolumeMusic));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, (mute ? 0 : soundVolumeSFX));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, (mute ? 0 : soundVolumeSpeech));
+ _mixer->muteSoundType(Audio::Mixer::kPlainSoundType, mute);
+ _mixer->muteSoundType(Audio::Mixer::kMusicSoundType, mute);
+ _mixer->muteSoundType(Audio::Mixer::kSFXSoundType, mute);
+ _mixer->muteSoundType(Audio::Mixer::kSpeechSoundType, mute);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, Audio::Mixer::kMaxMixerVolume);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSFX);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, soundVolumeSpeech);
}
void Engine::flipMute() {
diff --git a/engines/engine.h b/engines/engine.h
index 168a1dc2a0..b7afc0f09d 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -26,22 +26,22 @@
#define ENGINES_ENGINE_H
#include "common/scummsys.h"
-#include "common/error.h"
#include "common/str.h"
class OSystem;
namespace Audio {
- class Mixer;
+class Mixer;
}
namespace Common {
- class EventManager;
- class SaveFileManager;
- class TimerManager;
+class Error;
+class EventManager;
+class SaveFileManager;
+class TimerManager;
}
namespace GUI {
- class Debugger;
- class Dialog;
+class Debugger;
+class Dialog;
}
/**
diff --git a/engines/game.cpp b/engines/game.cpp
index dea6d37485..a27080cbf8 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -24,7 +24,6 @@
*/
#include "engines/game.h"
-#include "base/plugins.h"
const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list) {
diff --git a/engines/game.h b/engines/game.h
index 3e5d7f262c..c9a3b25853 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -28,6 +28,8 @@
#include "common/array.h"
#include "common/hash-str.h"
+#include "common/str.h"
+#include "common/util.h"
/**
* A simple structure used to map gameids (like "monkey", "sword1", ...) to
diff --git a/engines/gob/databases.cpp b/engines/gob/databases.cpp
index 66a711e46e..94f641db4e 100644
--- a/engines/gob/databases.cpp
+++ b/engines/gob/databases.cpp
@@ -24,6 +24,7 @@
*/
#include "common/file.h"
+#include "common/textconsole.h"
#include "gob/databases.h"
diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp
index 78fc0ab3c1..aa2743b5ed 100644
--- a/engines/gob/dataio.cpp
+++ b/engines/gob/dataio.cpp
@@ -26,6 +26,7 @@
#include "common/endian.h"
#include "common/types.h"
#include "common/memstream.h"
+#include "common/substream.h"
#include "gob/gob.h"
#include "gob/dataio.h"
@@ -345,9 +346,8 @@ Common::SeekableReadStream *DataIO::getFile(File &file) {
if (!file.archive->file.seek(file.offset))
return 0;
- Common::SeekableReadStream *rawData = file.archive->file.readStream(file.size);
- if (!rawData)
- return 0;
+ Common::SeekableReadStream *rawData =
+ new Common::SafeSubReadStream(&file.archive->file, file.offset, file.offset + file.size);
if (!file.packed)
return rawData;
diff --git a/engines/gob/dataio.h b/engines/gob/dataio.h
index 6e12d15af8..f2b39aed09 100644
--- a/engines/gob/dataio.h
+++ b/engines/gob/dataio.h
@@ -33,7 +33,7 @@
#include "common/file.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Gob {
diff --git a/engines/gob/detection_tables.h b/engines/gob/detection_tables.h
index b12fb81be1..832300f785 100644
--- a/engines/gob/detection_tables.h
+++ b/engines/gob/detection_tables.h
@@ -2278,6 +2278,20 @@ static const GOBGameDescription gameDescriptions[] = {
kFeaturesAdLib,
"disk0.stk", 0, 0
},
+ { // Supplied by alex86r in bug report #3297633
+ {
+ "fascination",
+ "VGA 3 disks edition",
+ AD_ENTRY1s("disk0.stk", "ab3dfdce43917bc806812959d692fc8f", 1061929),
+ IT_ITA,
+ kPlatformPC,
+ ADGF_NO_FLAGS,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypeFascination,
+ kFeaturesAdLib,
+ "disk0.stk", 0, 0
+ },
{
{
"fascination",
@@ -3779,6 +3793,20 @@ static const GOBGameDescription gameDescriptions[] = {
kFeatures640x480 | kFeaturesTrueColor,
0, 0, 0
},
+ { // Supplied by alex86r in bug report #3297602
+ {
+ "urban",
+ "",
+ AD_ENTRY1s("intro.stk", "4e4a3c017fe5475353bf94c455fe3efd", 1253448),
+ IT_ITA,
+ kPlatformPC,
+ ADGF_NO_FLAGS,
+ GUIO_NOSUBTITLES | GUIO_NOSPEECH
+ },
+ kGameTypeUrban,
+ kFeatures640x480 | kFeaturesTrueColor,
+ 0, 0, 0
+ },
{ // Supplied by goodoldgeorg in bug report #2770340
{
"urban",
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp
index 15a8f7ff8e..c07f8de69d 100644
--- a/engines/gob/draw_v2.cpp
+++ b/engines/gob/draw_v2.cpp
@@ -899,17 +899,12 @@ void Draw_v2::spriteOperation(int16 operation) {
_spriteTop = spriteTop;
_spriteRight = spriteRight;
_spriteBottom = spriteBottom;
- _destSpriteX = destSpriteX;
+ if (operation != DRAW_PRINTTEXT)
+ _destSpriteX = destSpriteX;
_destSpriteY = destSpriteY;
_destSurface = destSurface;
_sourceSurface = sourceSurface;
- if (operation == DRAW_PRINTTEXT) {
- len = _fonts[_fontIndex]->getCharWidth();
- adjustCoords(1, &len, 0);
- _destSpriteX += len * strlen(_textToPrint);
- }
-
if ((_renderFlags & RENDERFLAG_USEDELTAS) && !deltaVeto) {
if (_sourceSurface == kBackSurface) {
_spriteLeft -= _backDeltaX;
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 12914163c2..3d697d3693 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -24,14 +24,11 @@
*/
#include "common/debug-channels.h"
-#include "common/endian.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
#include "backends/audiocd/audiocd.h"
#include "base/plugins.h"
#include "common/config-manager.h"
-#include "common/md5.h"
#include "audio/mididrv.h"
#include "gui/gui-manager.h"
diff --git a/engines/gob/gob.h b/engines/gob/gob.h
index 9bdbed45cf..4a928747b0 100644
--- a/engines/gob/gob.h
+++ b/engines/gob/gob.h
@@ -30,12 +30,14 @@
#include "common/system.h"
#include "common/savefile.h"
+#include "graphics/pixelformat.h"
+
#include "engines/engine.h"
#include "gob/console.h"
namespace GUI {
- class StaticTextWidget;
+class StaticTextWidget;
}
/**
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 262fdc8045..8f1ff4c73f 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -23,9 +23,7 @@
*
*/
-#include "common/endian.h"
#include "common/str.h"
-#include "common/file.h"
#include "gob/gob.h"
#include "gob/inter.h"
diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp
index 778387e52d..1da92b3766 100644
--- a/engines/gob/inter_v4.cpp
+++ b/engines/gob/inter_v4.cpp
@@ -23,9 +23,7 @@
*
*/
-#include "common/endian.h"
#include "common/str.h"
-#include "common/file.h"
#include "gob/gob.h"
#include "gob/inter.h"
diff --git a/engines/gob/inter_v5.cpp b/engines/gob/inter_v5.cpp
index 85b213ae66..f5e87bb936 100644
--- a/engines/gob/inter_v5.cpp
+++ b/engines/gob/inter_v5.cpp
@@ -23,9 +23,6 @@
*
*/
-#include "common/endian.h"
-#include "common/file.h"
-
#include "gui/message.h"
#include "gob/gob.h"
diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp
index 06a06f4fb6..53ebfe7513 100644
--- a/engines/gob/inter_v6.cpp
+++ b/engines/gob/inter_v6.cpp
@@ -23,9 +23,7 @@
*
*/
-#include "common/endian.h"
#include "common/str.h"
-#include "common/file.h"
#include "graphics/dither.h"
#include "gob/gob.h"
diff --git a/engines/gob/resources.h b/engines/gob/resources.h
index 9921dc6e76..dec64f6b7c 100644
--- a/engines/gob/resources.h
+++ b/engines/gob/resources.h
@@ -29,7 +29,7 @@
#include "common/str.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Gob {
diff --git a/engines/gob/save/savefile.cpp b/engines/gob/save/savefile.cpp
index d472ef600b..45cd2a2b7d 100644
--- a/engines/gob/save/savefile.cpp
+++ b/engines/gob/save/savefile.cpp
@@ -336,7 +336,7 @@ bool SavePartSprite::read(Common::ReadStream &stream) {
// If it's in the current format, the true color flag has to be the same too
if (!_oldFormat)
- if (stream.readByte() != _trueColor)
+ if ((stream.readByte() != 0) != _trueColor)
return false;
// Sprite data
diff --git a/engines/gob/save/savehandler.cpp b/engines/gob/save/savehandler.cpp
index 8cb8274402..21102ae786 100644
--- a/engines/gob/save/savehandler.cpp
+++ b/engines/gob/save/savehandler.cpp
@@ -113,8 +113,8 @@ void SlotFileIndexed::buildIndex(byte *buffer, SavePartInfo &info,
if (setLongest) {
uint32 slot0Len;
for (slot0Len = strlen((const char *) bufferStart); slot0Len < longest; slot0Len++)
- buffer[slot0Len] = ' ';
- buffer[slot0Len] = '\0';
+ bufferStart[slot0Len] = ' ';
+ bufferStart[slot0Len] = '\0';
}
}
diff --git a/engines/gob/save/saveload.cpp b/engines/gob/save/saveload.cpp
index 3508e58f16..e490509914 100644
--- a/engines/gob/save/saveload.cpp
+++ b/engines/gob/save/saveload.cpp
@@ -23,9 +23,6 @@
*
*/
-#include "common/endian.h"
-#include "common/savefile.h"
-
#include "gob/gob.h"
#include "gob/save/saveload.h"
#include "gob/global.h"
diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp
index 37ac08ebea..248fe0a93f 100644
--- a/engines/gob/save/saveload_v6.cpp
+++ b/engines/gob/save/saveload_v6.cpp
@@ -284,6 +284,9 @@ SaveLoad_v6::GameHandler::GameHandler(GobEngine *vm, const char *target,
SaveLoad_v6::GameHandler::~GameHandler() {
delete _slotFile;
+
+ delete _reader;
+ delete _writer;
}
int32 SaveLoad_v6::GameHandler::getSize() {
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp
index f070bf14fa..4244df68e5 100644
--- a/engines/gob/sound/adlib.cpp
+++ b/engines/gob/sound/adlib.cpp
@@ -23,8 +23,10 @@
*
*/
+#include "common/debug.h"
#include "common/file.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "gob/gob.h"
#include "gob/sound/adlib.h"
diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp
index 8850a727d3..b351d92275 100644
--- a/engines/gob/sound/bgatmosphere.cpp
+++ b/engines/gob/sound/bgatmosphere.cpp
@@ -23,8 +23,6 @@
*
*/
-#include "common/system.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
#include "gob/sound/bgatmosphere.h"
diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp
index 4f3d783046..217aa9c18e 100644
--- a/engines/gob/sound/cdrom.cpp
+++ b/engines/gob/sound/cdrom.cpp
@@ -25,6 +25,7 @@
#include "common/endian.h"
#include "common/str.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "backends/audiocd/audiocd.h"
diff --git a/engines/gob/sound/infogrames.cpp b/engines/gob/sound/infogrames.cpp
index 6377b4e798..9fb7410740 100644
--- a/engines/gob/sound/infogrames.cpp
+++ b/engines/gob/sound/infogrames.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "gob/sound/infogrames.h"
namespace Gob {
diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp
index d33ea89147..cc1c6b1f6b 100644
--- a/engines/gob/sound/sounddesc.cpp
+++ b/engines/gob/sound/sounddesc.cpp
@@ -25,6 +25,8 @@
#include "common/util.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
+
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/wave.h"
diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp
index b6082c577c..3b6b2e5d52 100644
--- a/engines/gob/sound/soundmixer.cpp
+++ b/engines/gob/sound/soundmixer.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/util.h"
+
#include "gob/sound/soundmixer.h"
#include "gob/sound/sounddesc.h"
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index c3e8cd9ff5..7bd8aae597 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -31,6 +31,8 @@
#include "common/frac.h"
#include "graphics/primitives.h"
+#include "graphics/pixelformat.h"
+#include "graphics/surface.h"
namespace Gob {
diff --git a/engines/gob/surface.h b/engines/gob/surface.h
index 3dea18e36e..b84927af70 100644
--- a/engines/gob/surface.h
+++ b/engines/gob/surface.h
@@ -34,7 +34,7 @@
#include "graphics/iff.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Gob {
diff --git a/engines/gob/totfile.h b/engines/gob/totfile.h
index 211232f870..ce467425e2 100644
--- a/engines/gob/totfile.h
+++ b/engines/gob/totfile.h
@@ -29,7 +29,7 @@
#include "common/str.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Gob {
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index 4d51b3d61f..787f85175a 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -36,6 +36,8 @@
#include "common/events.h"
+#include "graphics/palette.h"
+
namespace Gob {
Util::Util(GobEngine *vm) : _vm(vm) {
diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp
index 444ff8ed9e..1d74a07bfc 100644
--- a/engines/gob/video.cpp
+++ b/engines/gob/video.cpp
@@ -29,6 +29,7 @@
#include "graphics/cursorman.h"
#include "graphics/fontman.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "gob/gob.h"
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 8222c99ef3..de149c9787 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -720,7 +720,7 @@ bool VideoPlayer::copyFrame(int slot, Surface &dest,
if (!surface)
return false;
- Surface src(surface->w, surface->h, surface->bytesPerPixel, (byte *)surface->pixels);
+ Surface src(surface->w, surface->h, surface->format.bytesPerPixel, (byte *)surface->pixels);
dest.blit(src, left, top, left + width - 1, top + height - 1, x, y, transp);
return true;
diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp
index db4134ccb0..8b62b829e1 100644
--- a/engines/groovie/cursor.cpp
+++ b/engines/groovie/cursor.cpp
@@ -26,8 +26,11 @@
#include "groovie/cursor.h"
#include "groovie/groovie.h"
+#include "common/debug.h"
#include "common/archive.h"
+#include "common/file.h"
#include "common/macresman.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
namespace Groovie {
diff --git a/engines/groovie/cursor.h b/engines/groovie/cursor.h
index 7a1f3ccc0e..e40dc0c486 100644
--- a/engines/groovie/cursor.h
+++ b/engines/groovie/cursor.h
@@ -30,7 +30,7 @@
#include "common/system.h"
namespace Common {
- class MacResManager;
+class MacResManager;
}
namespace Groovie {
diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp
index bd4b671e11..0b70e4f83a 100644
--- a/engines/groovie/debug.cpp
+++ b/engines/groovie/debug.cpp
@@ -31,6 +31,8 @@
#include "common/debug-channels.h"
#include "common/system.h"
+#include "graphics/palette.h"
+
namespace Groovie {
Debugger::Debugger(GroovieEngine *vm) :
diff --git a/engines/groovie/font.cpp b/engines/groovie/font.cpp
index 92ebcce298..13d0df0005 100644
--- a/engines/groovie/font.cpp
+++ b/engines/groovie/font.cpp
@@ -23,6 +23,10 @@
*
*/
+#include "common/array.h"
+#include "common/textconsole.h"
+#include "graphics/surface.h"
+
#include "groovie/font.h"
namespace Groovie {
diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp
index 3ceeeb6018..71ee231b80 100644
--- a/engines/groovie/graphics.cpp
+++ b/engines/groovie/graphics.cpp
@@ -25,15 +25,19 @@
#include "groovie/graphics.h"
#include "groovie/groovie.h"
+
+#include "common/rect.h"
#include "common/system.h"
+#include "graphics/palette.h"
+
namespace Groovie {
GraphicsMan::GraphicsMan(GroovieEngine *vm) :
_vm(vm), _changed(false), _fading(0) {
// Create the game surfaces
- _foreground.create(640, 320, _vm->_pixelFormat.bytesPerPixel);
- _background.create(640, 320, _vm->_pixelFormat.bytesPerPixel);
+ _foreground.create(640, 320, _vm->_pixelFormat);
+ _background.create(640, 320, _vm->_pixelFormat);
}
GraphicsMan::~GraphicsMan() {
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 552aec6128..71b83b9baa 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -35,7 +35,9 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/events.h"
+#include "common/file.h"
#include "common/macresman.h"
+#include "common/textconsole.h"
#include "backends/audiocd/audiocd.h"
#include "engines/util.h"
diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h
index bd376db0d2..6f1e5bb52e 100644
--- a/engines/groovie/groovie.h
+++ b/engines/groovie/groovie.h
@@ -33,7 +33,7 @@
#include "graphics/pixelformat.h"
namespace Common {
- class MacResManager;
+class MacResManager;
}
/**
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index b6ef5d277c..20353f4276 100644
--- a/engines/groovie/music.cpp
+++ b/engines/groovie/music.cpp
@@ -29,8 +29,11 @@
#include "backends/audiocd/audiocd.h"
#include "common/config-manager.h"
+#include "common/debug.h"
+#include "common/file.h"
#include "common/macresman.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/midiparser.h"
#include "audio/decoders/mp3.h"
diff --git a/engines/groovie/player.cpp b/engines/groovie/player.cpp
index 92590d420c..090d99e768 100644
--- a/engines/groovie/player.cpp
+++ b/engines/groovie/player.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "groovie/player.h"
#include "groovie/groovie.h"
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp
index 2cb571b4cc..5701f3a73d 100644
--- a/engines/groovie/resource.cpp
+++ b/engines/groovie/resource.cpp
@@ -24,8 +24,11 @@
*/
#include "common/archive.h"
+#include "common/debug.h"
+#include "common/file.h"
#include "common/macresman.h"
#include "common/substream.h"
+#include "common/textconsole.h"
#include "groovie/resource.h"
#include "groovie/groovie.h"
@@ -92,7 +95,7 @@ ResMan_t7g::ResMan_t7g(Common::MacResManager *macResFork) : _macResFork(macResFo
}
}
-uint16 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
+uint32 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
// Get the name of the RL file
Common::String rlFileName(t7g_gjds[_lastGjd]);
rlFileName += ".rl";
@@ -110,7 +113,7 @@ uint16 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
if (!rlFile)
error("Groovie::Resource: Couldn't open %s", rlFileName.c_str());
- uint16 resNum;
+ uint32 resNum;
bool found = false;
for (resNum = 0; !found && !rlFile->err() && !rlFile->eos(); resNum++) {
// Read the resource name
@@ -134,7 +137,7 @@ uint16 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
// Verify we really found the resource
if (!found) {
error("Groovie::Resource: Couldn't find resource %s in %s", name.c_str(), rlFileName.c_str());
- return (uint16)-1;
+ return (uint32)-1;
}
return (_lastGjd << 10) | (resNum - 1);
@@ -218,8 +221,42 @@ ResMan_v2::ResMan_v2() {
indexfile.close();
}
-uint16 ResMan_v2::getRef(Common::String name, Common::String scriptname) {
- return 0;
+uint32 ResMan_v2::getRef(Common::String name, Common::String scriptname) {
+ // Open the RL file
+ Common::File rlFile;
+ if (!rlFile.open("dir.rl")) {
+ error("Groovie::Resource: Couldn't open dir.rl");
+ return false;
+ }
+
+ uint32 resNum;
+ bool found = false;
+ for (resNum = 0; !found && !rlFile.err() && !rlFile.eos(); resNum++) {
+ // Seek past metadata
+ rlFile.seek(14, SEEK_CUR);
+
+ // Read the resource name
+ char readname[18];
+ rlFile.read(readname, 18);
+
+ // Test whether it's the resource we're searching
+ Common::String resname(readname, 18);
+ if (resname.hasPrefix(name.c_str())) {
+ debugC(2, kGroovieDebugResource | kGroovieDebugAll, "Groovie::Resource: Resource %12s matches %s", readname, name.c_str());
+ found = true;
+ }
+ }
+
+ // Close the RL file
+ rlFile.close();
+
+ // Verify we really found the resource
+ if (!found) {
+ error("Groovie::Resource: Couldn't find resource %s", name.c_str());
+ return (uint32)-1;
+ }
+
+ return resNum;
}
bool ResMan_v2::getResInfo(uint32 fileRef, ResInfo &resInfo) {
diff --git a/engines/groovie/resource.h b/engines/groovie/resource.h
index c87658999a..0a9a03b42c 100644
--- a/engines/groovie/resource.h
+++ b/engines/groovie/resource.h
@@ -27,7 +27,7 @@
#define GROOVIE_RESOURCE_H
namespace Common {
- class MacResManager;
+class MacResManager;
}
namespace Groovie {
@@ -44,7 +44,8 @@ public:
virtual ~ResMan() {}
Common::SeekableReadStream *open(uint32 fileRef);
- virtual uint16 getRef(Common::String name, Common::String scriptname = "") = 0;
+
+ virtual uint32 getRef(Common::String name, Common::String scriptname = "") = 0;
virtual bool getResInfo(uint32 fileRef, ResInfo &resInfo) = 0;
protected:
@@ -58,7 +59,7 @@ public:
ResMan_t7g(Common::MacResManager *macResFork = 0);
~ResMan_t7g() {}
- uint16 getRef(Common::String name, Common::String scriptname);
+ uint32 getRef(Common::String name, Common::String scriptname);
bool getResInfo(uint32 fileRef, ResInfo &resInfo);
private:
@@ -70,7 +71,7 @@ public:
ResMan_v2();
~ResMan_v2() {}
- uint16 getRef(Common::String name, Common::String scriptname);
+ uint32 getRef(Common::String name, Common::String scriptname);
bool getResInfo(uint32 fileRef, ResInfo &resInfo);
};
diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp
index 4d7157c797..be9c4f6921 100644
--- a/engines/groovie/roq.cpp
+++ b/engines/groovie/roq.cpp
@@ -30,7 +30,11 @@
#include "groovie/graphics.h"
#include "groovie/groovie.h"
+#include "common/debug.h"
+#include "common/textconsole.h"
+
#include "graphics/jpeg.h"
+#include "graphics/palette.h"
#ifdef USE_RGB_COLOR
// Required for the YUV to RGB conversion
@@ -175,7 +179,7 @@ void ROQPlayer::buildShowBuf() {
// Skip to the next pixel
out += _vm->_pixelFormat.bytesPerPixel;
if (!(x % _scaleX))
- in += _currBuf->bytesPerPixel;
+ in += _currBuf->format.bytesPerPixel;
}
#ifdef DITHER
_dither->nextLine();
@@ -328,8 +332,13 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) {
_prevBuf->free();
// Allocate new buffers
- _currBuf->create(width, height, 3);
- _prevBuf->create(width, height, 3);
+ // These buffers use YUV data, since we can not describe it with a
+ // PixelFormat struct we just add some dummy PixelFormat with the
+ // correct bytes per pixel value. Since the surfaces are only used
+ // internally and no code assuming RGB data is present is used on
+ // them it should be just fine.
+ _currBuf->create(width, height, Graphics::PixelFormat(3, 0, 0, 0, 0, 0, 0, 0, 0));
+ _prevBuf->create(width, height, Graphics::PixelFormat(3, 0, 0, 0, 0, 0, 0, 0, 0));
// Clear the buffers with black YUV values
byte *ptr1 = (byte *)_currBuf->getBasePtr(0, 0);
@@ -697,7 +706,7 @@ void ROQPlayer::copy(byte size, int destx, int desty, int offx, int offy) {
for (int i = 0; i < size; i++) {
// Copy the current line
- memcpy(dst, src, size * _currBuf->bytesPerPixel);
+ memcpy(dst, src, size * _currBuf->format.bytesPerPixel);
// Move to the beginning of the next line
dst += _currBuf->pitch;
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index e68003f72e..5c9f119d81 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -37,8 +37,11 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/EventRecorder.h"
+#include "common/file.h"
#include "common/macresman.h"
+#include "gui/message.h"
+
#define NUM_OPCODES 90
namespace Groovie {
@@ -65,7 +68,9 @@ static void debugScript(int level, bool nl, const char *s, ...) {
Script::Script(GroovieEngine *vm, EngineVersion version) :
_code(NULL), _savedCode(NULL), _stacktop(0), _debugger(NULL), _vm(vm),
- _videoFile(NULL), _videoRef(0), _staufsMove(NULL), _lastCursor(0xff) {
+ _videoFile(NULL), _videoRef(0), _staufsMove(NULL), _lastCursor(0xff),
+ _version(version) {
+
// Initialize the opcode set depending on the engine version
switch (version) {
case kGroovieT7G:
@@ -320,7 +325,7 @@ uint8 Script::readScriptChar(bool allow7C, bool limitVal, bool limitVar) {
return result;
}
-uint16 Script::getVideoRefString() {
+uint32 Script::getVideoRefString() {
Common::String str;
byte c;
@@ -412,6 +417,13 @@ void Script::savegame(uint slot) {
char newchar;
Common::OutSaveFile *file = SaveLoad::openForSaving(ConfMan.getActiveDomainName(), slot);
+ if (!file) {
+ debugC(9, kGroovieDebugScript, "Save file pointer is null");
+ GUI::MessageDialog dialog("Failed to save game", "OK");
+ dialog.runModal();
+ return;
+ }
+
// Saving the variables. It is endian safe because they're byte variables
file->write(_variables, 0x400);
delete file;
@@ -722,7 +734,7 @@ void Script::o_hotspot_center() {
debugScript(5, true, "HOTSPOT-CENTER @0x%04X", address);
- // Mark the centremost 240 pixels of the game area
+ // Mark the centermost 240 pixels of the game area
Common::Rect rect(200, 80, 440, 400);
hotspot(rect, address, 0);
}
@@ -1020,7 +1032,7 @@ void Script::o_add() {
void Script::o_videofromstring1() {
uint16 instStart = _currentInstruction;
- uint16 fileref = getVideoRefString();
+ uint32 fileref = getVideoRefString();
// Show the debug information just when starting the playback
if (fileref != _videoRef) {
@@ -1036,7 +1048,7 @@ void Script::o_videofromstring1() {
void Script::o_videofromstring2() {
uint16 instStart = _currentInstruction;
- uint16 fileref = getVideoRefString();
+ uint32 fileref = getVideoRefString();
// Show the debug information just when starting the playback
if (fileref != _videoRef) {
diff --git a/engines/groovie/script.h b/engines/groovie/script.h
index 2360d45744..c5ad6da78b 100644
--- a/engines/groovie/script.h
+++ b/engines/groovie/script.h
@@ -77,6 +77,8 @@ private:
bool _firstbit;
uint8 _lastCursor;
+ EngineVersion _version;
+
// Script filename (for debugging purposes)
Common::String _scriptFile;
Common::String _savedScriptFile;
@@ -138,7 +140,7 @@ private:
uint16 readScript8or16bits();
uint8 readScriptChar(bool allow7C, bool limitVal, bool limitVar);
uint8 readScriptVar();
- uint16 getVideoRefString();
+ uint32 getVideoRefString();
bool hotspot(Common::Rect rect, uint16 addr, uint8 cursor);
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index 61e5e3f6d7..b6f06d7011 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -28,9 +28,12 @@
#include "groovie/groovie.h"
#include "groovie/lzss.h"
+#include "common/debug.h"
#include "common/debug-channels.h"
+#include "common/textconsole.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
+#include "graphics/palette.h"
#define TILE_SIZE 4 // Size of each tile on the image: only ever seen 4 so far
#define VDX_IDENT 0x9267 // 37479
@@ -70,7 +73,7 @@ uint16 VDXPlayer::loadInternal() {
}
// Flags:
// - 1 Puzzle piece? Skip palette, don't redraw full screen, draw still to b/ack buffer
- // - 2 Transparent colour is 0xFF
+ // - 2 Transparent color is 0xFF
// - 5 Skip still chunks
// - 7
// - 8 Just show the first frame
@@ -256,26 +259,26 @@ void VDXPlayer::getDelta(Common::ReadStream *in) {
uint16 currentLine = 0;
uint32 offset = 0;
while (!in->eos()) {
- byte colours[16];
+ byte colors[16];
if (currOpCode < 0x60) {
param1 = in->readByte();
param2 = in->readByte();
- expandColourMap(colours, vdxBlockMapLookup[currOpCode], param1, param2);
- decodeBlockDelta(offset, colours, 640);
+ expandColorMap(colors, vdxBlockMapLookup[currOpCode], param1, param2);
+ decodeBlockDelta(offset, colors, 640);
offset += TILE_SIZE;
} else if (currOpCode > 0x7f) {
param1 = in->readByte();
param2 = in->readByte();
param3 = in->readByte();
- expandColourMap(colours, (param1 << 8) + currOpCode, param2, param3);
- decodeBlockDelta(offset, colours, 640);
+ expandColorMap(colors, (param1 << 8) + currOpCode, param2, param3);
+ decodeBlockDelta(offset, colors, 640);
offset += TILE_SIZE;
} else switch (currOpCode) {
- case 0x60: /* Fill tile with the 16 colours given as parameters */
+ case 0x60: /* Fill tile with the 16 colors given as parameters */
for (l = 0; l < 16; l++) {
- colours[l] = in->readByte();
+ colors[l] = in->readByte();
}
- decodeBlockDelta(offset, colours, 640);
+ decodeBlockDelta(offset, colors, 640);
offset += TILE_SIZE;
break;
case 0x61: /* Skip to the end of this line, next block is start of next */
@@ -304,14 +307,14 @@ void VDXPlayer::getDelta(Common::ReadStream *in) {
case 0x72:
case 0x73:
case 0x74:
- case 0x75: /* Next param1 blocks are filled with colour param2 */
+ case 0x75: /* Next param1 blocks are filled with color param2 */
param1 = currOpCode - 0x6b;
param2 = in->readByte();
for (l = 0; l < 16; l++) {
- colours[l] = param2;
+ colors[l] = param2;
}
for (k = 0; k < param1; k++) {
- decodeBlockDelta(offset, colours, 640);
+ decodeBlockDelta(offset, colors, 640);
offset += TILE_SIZE;
}
break;
@@ -324,14 +327,14 @@ void VDXPlayer::getDelta(Common::ReadStream *in) {
case 0x7c:
case 0x7d:
case 0x7e:
- case 0x7f: /* Next bytes contain colours to fill the next param1 blocks in the current line*/
+ case 0x7f: /* Next bytes contain colors to fill the next param1 blocks in the current line*/
param1 = currOpCode - 0x75;
for (k = 0; k < param1; k++) {
param2 = in->readByte();
for (l = 0; l < 16; l++) {
- colours[l] = param2;
+ colors[l] = param2;
}
- decodeBlockDelta(offset, colours, 640);
+ decodeBlockDelta(offset, colors, 640);
offset += TILE_SIZE;
}
break;
@@ -349,8 +352,8 @@ void VDXPlayer::getStill(Common::ReadStream *in) {
debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::VDX: numYTiles=%d", numYTiles);
// It's skipped in the original:
- uint16 colourDepth = in->readUint16LE();
- debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::VDX: colourDepth=%d", colourDepth);
+ uint16 colorDepth = in->readUint16LE();
+ debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::VDX: colorDepth=%d", colorDepth);
uint16 imageWidth = TILE_SIZE * numXTiles;
@@ -383,15 +386,15 @@ void VDXPlayer::getStill(Common::ReadStream *in) {
// Skip the frame when flag 5 is set, unless flag 1 is set
if (!_flagFive || _flagOne) {
- byte colours[16];
+ byte colors[16];
for (uint16 j = 0; j < numYTiles; j++) {
byte *currentTile = buf + j * TILE_SIZE * imageWidth;
for (uint16 i = numXTiles; i; i--) {
- uint8 colour1 = in->readByte();
- uint8 colour0 = in->readByte();
- uint16 colourMap = in->readUint16LE();
- expandColourMap(colours, colourMap, colour1, colour0);
- decodeBlockStill(currentTile, colours, 640, mask);
+ uint8 color1 = in->readByte();
+ uint8 color0 = in->readByte();
+ uint16 colorMap = in->readUint16LE();
+ expandColorMap(colors, colorMap, color1, color0);
+ decodeBlockStill(currentTile, colors, 640, mask);
currentTile += TILE_SIZE;
}
@@ -430,22 +433,22 @@ void VDXPlayer::getStill(Common::ReadStream *in) {
}
}
-void VDXPlayer::expandColourMap(byte *out, uint16 colourMap, uint8 colour1, uint8 colour0) {
+void VDXPlayer::expandColorMap(byte *out, uint16 colorMap, uint8 color1, uint8 color0) {
// It's a bit faster to start from the end
out += 16;
for (int i = 16; i; i--) {
- // Set the corresponding colour
+ // Set the corresponding color
// The following is an optimized version of:
- // *--out = (colourMap & 1) ? colour1 : colour0;
- uint8 selector = -(colourMap & 1);
- *--out = (selector & colour1) | (~selector & colour0);
+ // *--out = (colorMap & 1) ? color1 : color0;
+ uint8 selector = -(colorMap & 1);
+ *--out = (selector & color1) | (~selector & color0);
- // Update the flag map to test the next colour
- colourMap >>= 1;
+ // Update the flag map to test the next color
+ colorMap >>= 1;
}
}
-void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, uint8 mask) {
+void VDXPlayer::decodeBlockStill(byte *buf, byte *colors, uint16 imageWidth, uint8 mask) {
assert(TILE_SIZE == 4);
for (int y = TILE_SIZE; y; y--) {
@@ -453,15 +456,15 @@ void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, ui
// TODO: optimize with bit logic?
for (int x = 0; x < TILE_SIZE; x++) {
// 0xff pixels don't modify the buffer
- if (*colours != 0xff) {
- // Write the colour
- *buf = *colours | mask;
+ if (*colors != 0xff) {
+ // Write the color
+ *buf = *colors | mask;
// Note: if the mask is 0, it paints the image
// else, it paints the image's mask using 0xff
}
- // Point to the next colour
- colours++;
+ // Point to the next color
+ colors++;
// Point to the next pixel
buf++;
@@ -470,8 +473,8 @@ void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, ui
// Point to the start of the next line
buf += imageWidth - TILE_SIZE;
} else {
- *((uint32 *)buf) = *((uint32 *)colours);
- colours += 4;
+ *((uint32 *)buf) = *((uint32 *)colors);
+ colors += 4;
// Point to the start of the next line
buf += imageWidth;
@@ -479,7 +482,7 @@ void VDXPlayer::decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, ui
}
}
-void VDXPlayer::decodeBlockDelta(uint32 offset, byte *colours, uint16 imageWidth) {
+void VDXPlayer::decodeBlockDelta(uint32 offset, byte *colors, uint16 imageWidth) {
assert(TILE_SIZE == 4);
byte *dest;
@@ -506,19 +509,19 @@ void VDXPlayer::decodeBlockDelta(uint32 offset, byte *colours, uint16 imageWidth
for (int x = 0; x < TILE_SIZE; x++) {
// TODO: this can probably be optimized with bit logic
if (fgBuf[x] != 0xff) {
- if (*colours == 0xff) {
+ if (*colors == 0xff) {
dest[x] = fgBuf[x];
} else {
- dest[x] = *colours;
+ dest[x] = *colors;
}
}
- colours++;
+ colors++;
}
fgBuf += imageWidth;
} else {
// Paint directly
- *((uint32 *)dest) = *((uint32 *)colours);
- colours += 4;
+ *((uint32 *)dest) = *((uint32 *)colors);
+ colors += 4;
}
// Move to the next line
diff --git a/engines/groovie/vdx.h b/engines/groovie/vdx.h
index 0b29493108..31c7606cb7 100644
--- a/engines/groovie/vdx.h
+++ b/engines/groovie/vdx.h
@@ -29,7 +29,7 @@
#include "groovie/player.h"
namespace Common {
- class ReadStream;
+class ReadStream;
}
namespace Groovie {
@@ -73,9 +73,9 @@ private:
void getStill(Common::ReadStream *in);
void getDelta(Common::ReadStream *in);
- void expandColourMap(byte *out, uint16 colourMap, uint8 colour1, uint8 colour0);
- void decodeBlockStill(byte *buf, byte *colours, uint16 imageWidth, uint8 mask);
- void decodeBlockDelta(uint32 offset, byte *colours, uint16 imageWidth);
+ void expandColorMap(byte *out, uint16 colorMap, uint8 color1, uint8 color0);
+ void decodeBlockStill(byte *buf, byte *colors, uint16 imageWidth, uint8 mask);
+ void decodeBlockDelta(uint32 offset, byte *colors, uint16 imageWidth);
void chunkSound(Common::ReadStream *in);
void setPalette(uint8 *palette);
void fadeIn(uint8 *palette);
diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp
index e862e339ce..95302c9235 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -26,6 +26,7 @@
#include "engines/advancedDetector.h"
#include "common/system.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "graphics/thumbnail.h"
#include "graphics/surface.h"
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index ead432c5df..f0dc84eae8 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -26,6 +26,7 @@
#include "common/substream.h"
#include "graphics/imagedec.h"
#include "gui/gui-manager.h"
+#include "gui/ThemeEval.h"
#include "hugo/hugo.h"
#include "hugo/display.h"
@@ -132,7 +133,7 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) {
Common::SeekableSubReadStream stream(&in, filPos, filPos + bmpSize);
arrayBmp[i * 2] = Graphics::ImageDecoder::loadFile(stream, g_system->getOverlayFormat());
arrayBmp[i * 2 + 1] = new Graphics::Surface();
- arrayBmp[i * 2 + 1]->create(arrayBmp[i * 2]->w * 2, arrayBmp[i * 2]->h * 2, arrayBmp[i * 2]->bytesPerPixel);
+ 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;
@@ -140,12 +141,12 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) {
src = (byte *)arrayBmp[i * 2]->getBasePtr(0, j);
dst = (byte *)arrayBmp[i * 2 + 1]->getBasePtr(0, j * 2);
for (int k = arrayBmp[i * 2]->w; k > 0; k--) {
- for (int m = arrayBmp[i * 2]->bytesPerPixel; m > 0; m--) {
+ for (int m = arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) {
*dst++ = *src++;
}
- src -= arrayBmp[i * 2]->bytesPerPixel;
+ src -= arrayBmp[i * 2]->format.bytesPerPixel;
- for (int m = arrayBmp[i * 2]->bytesPerPixel; m > 0; m--) {
+ for (int m = arrayBmp[i * 2]->format.bytesPerPixel; m > 0; m--) {
*dst++ = *src++;
}
}
@@ -164,7 +165,8 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d
switch (command) {
case kCmdWhat:
close();
- _vm->_file->instructions();
+ _vm->getGameStatus().helpFl = true;
+
break;
case kCmdMusic:
_vm->_sound->toggleMusic();
@@ -231,12 +233,52 @@ void TopMenu::handleMouseUp(int x, int y, int button, int clickCount) {
}
EntryDialog::EntryDialog(const Common::String &title, const Common::String &buttonLabel, const Common::String &defaultValue) : GUI::Dialog(20, 20, 100, 50) {
- new GUI::StaticTextWidget(this, 0, 0, 10, 10, title, Graphics::kTextAlignCenter);
-
- _text = new GUI::EditTextWidget(this, 0, 0, 50, 10, "");
+ const int screenW = g_system->getOverlayWidth();
+ const int screenH = g_system->getOverlayHeight();
+
+ int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
+ int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
+
+ // First, determine the size the dialog needs. For this we have to break
+ // down the string into lines, and taking the maximum of their widths.
+ // Using this, and accounting for the space the button(s) need, we can set
+ // the real size of the dialog
+ Common::Array<Common::String> lines;
+ int lineCount, buttonPos;
+ int maxlineWidth = g_gui.getFont().wordWrapText(title, screenW - 2 * 30, lines);
+
+ // Calculate the desired dialog size (maxing out at 300*180 for now)
+ _w = MAX(maxlineWidth, buttonWidth) + 20;
+
+ lineCount = lines.size();
+
+ _h = 16 + buttonHeight + 8;
+
+ // Limit the number of lines so that the dialog still fits on the screen.
+ if (lineCount > (screenH - 20 - _h) / kLineHeight) {
+ lineCount = (screenH - 20 - _h) / kLineHeight;
+ }
+ _h += lineCount * kLineHeight;
+
+ // Center the dialog
+ _x = (screenW - _w) / 2;
+ _y = (screenH - _h) / 2;
+
+ // Each line is represented by one static text item.
+ for (int i = 0; i < lineCount; i++) {
+ new GUI::StaticTextWidget(this, 10, 10 + i * kLineHeight, maxlineWidth, kLineHeight,
+ lines[i], Graphics::kTextAlignCenter);
+ }
+
+ _text = new GUI::EditTextWidget(this, 10, 10 + lineCount * (kLineHeight + 1), _w - 20, kLineHeight, "", "", 0, kCmdFinishEdit);
_text->setEditString(defaultValue);
- new GUI::ButtonWidget(this, 20, 20, 30, 10, buttonLabel, 0, kCmdButton);
+ _h += kLineHeight + 5;
+
+ buttonPos = (_w - buttonWidth) / 2;
+
+ new GUI::ButtonWidget(this, buttonPos, _h - buttonHeight - 8, buttonWidth, buttonHeight, buttonLabel, 0, kCmdButton, Common::ASCII_RETURN); // Confirm dialog
+
}
EntryDialog::~EntryDialog() {
@@ -245,6 +287,7 @@ EntryDialog::~EntryDialog() {
void EntryDialog::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 data) {
switch (command) {
case kCmdButton:
+ case kCmdFinishEdit:
close();
break;
default:
@@ -252,11 +295,4 @@ void EntryDialog::handleCommand(GUI::CommandSender *sender, uint32 command, uint
}
}
-void EntryDialog::reflowLayout() {
-}
-
-void EntryDialog::init() {
-}
-
-
} // End of namespace Hugo
diff --git a/engines/hugo/dialogs.h b/engines/hugo/dialogs.h
index f870414a93..56dbd41f81 100644
--- a/engines/hugo/dialogs.h
+++ b/engines/hugo/dialogs.h
@@ -67,7 +67,8 @@ enum {
kCmdInvent = 'INVT',
// EntryDialog commands
- kCmdButton = 'BTNP'
+ kCmdButton = 'BTNP',
+ kCmdFinishEdit = 'FNSH'
};
class TopMenu : public GUI::Dialog {
@@ -105,14 +106,11 @@ public:
EntryDialog(const Common::String &title, const Common::String &buttonLabel, const Common::String &defaultValue);
virtual ~EntryDialog();
- void reflowLayout();
void handleCommand(GUI::CommandSender *sender, uint32 command, uint32 data);
const Common::String &getEditString() const { return _text->getEditString(); }
protected:
- void init();
-
GUI::EditTextWidget *_text;
};
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index 333eb59707..af4d094ceb 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -32,8 +32,11 @@
// Display.c - DIB related code for HUGOWIN
+#include "common/debug.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "hugo/hugo.h"
#include "hugo/display.h"
@@ -507,6 +510,9 @@ void Screen::drawStatusText() {
sdx = stringLength(_vm->_scoreLine);
posY = 0;
+
+ //Display a black behind the score line
+ _vm->_screen->drawRectangle(true, 0, 0, kXPix, 8, _TBLACK);
writeStr(posX, posY, _vm->_scoreLine, _TCYAN);
displayList(kDisplayAdd, posX, posY, sdx, sdy);
}
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index a0e3ff05ce..ba4e420111 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -30,8 +30,10 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "common/config-manager.h"
#include "graphics/thumbnail.h"
#include "gui/saveload.h"
@@ -298,7 +300,11 @@ sound_pt FileManager::getSound(const int16 sound, uint16 *size) {
}
if (!has_read_header) {
- if (fp.read(s_hdr, sizeof(s_hdr)) != sizeof(s_hdr))
+ for (int i = 0; i < kMaxSounds; i++) {
+ s_hdr[i].size = fp.readUint16LE();
+ s_hdr[i].offset = fp.readUint32LE();
+ }
+ if (fp.err())
error("Wrong sound file format");
has_read_header = true;
}
@@ -400,7 +406,7 @@ bool FileManager::saveGame(const int16 slot, const Common::String &descrip) {
out->writeByte((gameStatus.gameOverFl) ? 1 : 0);
// Save screen states
- for (int i = 0; i < _vm->_numScreens; i++)
+ for (int i = 0; i < _vm->_numStates; i++)
out->writeByte(_vm->_screenStates[i]);
_vm->_scheduler->saveSchedulerData(out);
@@ -497,7 +503,7 @@ bool FileManager::restoreGame(const int16 slot) {
gameStatus.storyModeFl = (in->readByte() == 1);
_vm->_mouse->setJumpExitFl(in->readByte() == 1);
gameStatus.gameOverFl = (in->readByte() == 1);
- for (int i = 0; i < _vm->_numScreens; i++)
+ for (int i = 0; i < _vm->_numStates; i++)
_vm->_screenStates[i] = in->readByte();
_vm->_scheduler->restoreSchedulerData(in);
diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp
index 48f274e88a..021969f306 100644
--- a/engines/hugo/file_v1d.cpp
+++ b/engines/hugo/file_v1d.cpp
@@ -30,7 +30,9 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
#include "hugo/file.h"
diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp
index dbb093752a..4f327b3095 100644
--- a/engines/hugo/file_v1w.cpp
+++ b/engines/hugo/file_v1w.cpp
@@ -30,7 +30,9 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
#include "hugo/file.h"
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index ffadd17481..0ad89e987e 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -30,7 +30,9 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
#include "hugo/file.h"
@@ -167,10 +169,10 @@ const char *FileManager_v2d::fetchString(const int index) {
// Get offset to string[index] (and next for length calculation)
_stringArchive.seek((uint32)index * sizeof(uint32), SEEK_SET);
- uint32 off1, off2;
- if (_stringArchive.read((char *)&off1, sizeof(uint32)) == 0)
- error("An error has occurred: bad String offset");
- if (_stringArchive.read((char *)&off2, sizeof(uint32)) == 0)
+
+ uint32 off1 = _stringArchive.readUint32LE();
+ uint32 off2 = _stringArchive.readUint32LE();
+ if (!off1 || !off2)
error("An error has occurred: bad String offset");
// Check size of string
diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp
index 2f3e5af3f0..6370fffa4d 100644
--- a/engines/hugo/file_v3d.cpp
+++ b/engines/hugo/file_v3d.cpp
@@ -30,7 +30,9 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
#include "hugo/file.h"
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index ba87f58150..a872a97bae 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -25,13 +25,14 @@
#include "common/system.h"
#include "common/random.h"
+#include "common/error.h"
#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/debug-channels.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
-#include "hugo/game.h"
#include "hugo/file.h"
#include "hugo/schedule.h"
#include "hugo/display.h"
@@ -53,7 +54,7 @@ HugoEngine *HugoEngine::s_Engine = 0;
HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(syst), _gameDescription(gd),
_hero(0), _heroImage(0), _defltTunes(0), _numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0),
- _screenStates(0), _score(0), _maxscore(0), _lastTime(0), _curTime(0), _episode(0)
+ _screenStates(0), _numStates(0), _score(0), _maxscore(0), _lastTime(0), _curTime(0), _episode(0)
{
_system = syst;
DebugMan.addDebugChannel(kDebugSchedule, "Schedule", "Script Schedule debug level");
@@ -298,6 +299,10 @@ Common::Error HugoEngine::run() {
break;
}
}
+ if (_status.helpFl) {
+ _status.helpFl = false;
+ _file->instructions();
+ }
_mouse->mouseHandler(); // Mouse activity - adds to display list
_screen->displayList(kDisplayDisplay); // Blit the display list to screen
@@ -323,9 +328,6 @@ void HugoEngine::initMachine() {
*/
void HugoEngine::runMachine() {
status_t &gameStatus = getGameStatus();
- // Don't process if we're in a textbox
- if (gameStatus.textBoxFl)
- return;
// Don't process if gameover
if (gameStatus.gameOverFl)
@@ -463,6 +465,7 @@ bool HugoEngine::loadHugoDat() {
for (int varnt = 0; varnt < _numVariant; varnt++) {
numElem = in.readUint16BE();
if (varnt == _gameVariant) {
+ _numStates = numElem;
_screenStates = (byte *)malloc(sizeof(byte) * numElem);
memset(_screenStates, 0, sizeof(_screenStates));
}
@@ -530,13 +533,13 @@ void HugoEngine::initStatus() {
debugC(1, kDebugEngine, "initStatus");
_status.storyModeFl = false; // Not in story mode
_status.gameOverFl = false; // Hero not knobbled yet
- _status.textBoxFl = false; // Not processing a text box
_status.lookFl = false; // Toolbar "look" button
_status.recallFl = false; // Toolbar "recall" button
_status.newScreenFl = false; // Screen not just loaded
_status.godModeFl = false; // No special cheats allowed
_status.doQuitFl = false;
_status.skipIntroFl = false;
+ _status.helpFl = false;
// Initialize every start of new game
_status.tick = 0; // Tick count
@@ -553,6 +556,7 @@ void HugoEngine::initStatus() {
// _status.screenWidth = 0; // Desktop screen width
// _status.saveTick = 0; // Time of last save
// _status.saveSlot = 0; // Slot to save/restore game
+// _status.textBoxFl = false; // Not processing a text box
}
/**
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index ed021f5cd6..b2d241f241 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -176,13 +176,13 @@ struct HugoGameDescription;
struct status_t { // Game status (not saved)
bool storyModeFl; // Game is telling story - no commands
bool gameOverFl; // Game is over - hero knobbled
- bool textBoxFl; // Game is (halted) in text box
bool lookFl; // Toolbar "look" button pressed
bool recallFl; // Toolbar "recall" button pressed
bool newScreenFl; // New screen just loaded in dib_a
bool godModeFl; // Allow DEBUG features in live version
bool doQuitFl;
bool skipIntroFl;
+ bool helpFl;
uint32 tick; // Current time in ticks
vstate_t viewState; // View state machine
int16 song; // Current song
@@ -194,6 +194,7 @@ struct status_t { // Game status (not saved)
// bool helpFl; // Calling WinHelp (don't disable music)
// bool mmtimeFl; // Multimedia timer supported
// bool demoFl; // Game is in demo mode
+// bool textBoxFl; // Game is (halted) in text box
// int16 screenWidth; // Desktop screen width
// int16 saveSlot; // Current slot to save/restore game
// int16 cx, cy; // Cursor position (dib coords)
@@ -238,6 +239,7 @@ public:
int8 _soundTest;
int8 _tunesNbr;
uint16 _numScreens;
+ uint16 _numStates;
int8 _normalTPS; // Number of ticks (frames) per second.
// 8 for Win versions, 9 for DOS versions
object_t *_hero;
diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp
index 63e81924c4..c31d76abd0 100644
--- a/engines/hugo/intro.cpp
+++ b/engines/hugo/intro.cpp
@@ -31,6 +31,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
#include "hugo/intro.h"
@@ -93,7 +94,7 @@ void intro_v1d::introInit() {
surf.h = 200;
surf.pixels = _vm->_screen->getFrontBuffer();
surf.pitch = 320;
- surf.bytesPerPixel = 1;
+ surf.format = Graphics::PixelFormat::createFormatCLUT8();
_vm->_screen->displayList(kDisplayInit);
}
@@ -247,7 +248,7 @@ void intro_v2d::introInit() {
surf.h = 200;
surf.pixels = _vm->_screen->getFrontBuffer();
surf.pitch = 320;
- surf.bytesPerPixel = 1;
+ surf.format = Graphics::PixelFormat::createFormatCLUT8();
char buffer[128];
@@ -293,7 +294,7 @@ void intro_v3d::introInit() {
surf.h = 200;
surf.pixels = _vm->_screen->getFrontBuffer();
surf.pitch = 320;
- surf.bytesPerPixel = 1;
+ surf.format = Graphics::PixelFormat::createFormatCLUT8();
char buffer[128];
if (_vm->_boot.registered)
diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp
index ab58e386ba..45893f6965 100644
--- a/engines/hugo/inventory.cpp
+++ b/engines/hugo/inventory.cpp
@@ -30,6 +30,7 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
#include "hugo/hugo.h"
diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp
index 1b2dd588b8..c02908e579 100644
--- a/engines/hugo/mouse.cpp
+++ b/engines/hugo/mouse.cpp
@@ -32,6 +32,7 @@
// mouse.cpp : Handle all mouse activity
+#include "common/debug.h"
#include "common/system.h"
#include "hugo/hugo.h"
@@ -363,6 +364,7 @@ void MouseHandler::readHotspot(Common::ReadStream &in, hotspot_t &hotspot) {
void MouseHandler::loadHotspots(Common::ReadStream &in) {
hotspot_t *wrkHotspots = 0;
hotspot_t tmp;
+ memset(&tmp, 0, sizeof(tmp));
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
int numRows = in.readUint16BE();
if (varnt == _vm->_gameVariant)
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index 0a52a0f62d..acf9f6e50c 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -30,8 +30,7 @@
*
*/
-#include "common/system.h"
-#include "common/random.h"
+#include "common/debug.h"
#include "hugo/hugo.h"
#include "hugo/game.h"
diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp
index a8edb45746..95bedf4fa2 100644
--- a/engines/hugo/object_v1d.cpp
+++ b/engines/hugo/object_v1d.cpp
@@ -30,6 +30,7 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
#include "common/random.h"
diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp
index f3ba793a3b..54becd8234 100644
--- a/engines/hugo/object_v1w.cpp
+++ b/engines/hugo/object_v1w.cpp
@@ -30,6 +30,7 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
#include "common/random.h"
diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp
index b3c49262ad..7c47bf4f92 100644
--- a/engines/hugo/object_v2d.cpp
+++ b/engines/hugo/object_v2d.cpp
@@ -30,6 +30,7 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
#include "common/random.h"
diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp
index 2c6fc5d99d..3ff6c56ad3 100644
--- a/engines/hugo/object_v3d.cpp
+++ b/engines/hugo/object_v3d.cpp
@@ -30,6 +30,7 @@
*
*/
+#include "common/debug.h"
#include "common/system.h"
#include "common/random.h"
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index feee4cbadd..29a1d5efa3 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -30,12 +30,8 @@
*
*/
-#include "common/system.h"
#include "common/events.h"
-
-#include "common/random.h"
-#include "common/EventRecorder.h"
-#include "common/debug-channels.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
#include "hugo/display.h"
@@ -87,6 +83,7 @@ void Parser::readCmd(Common::ReadStream &in, cmd &curCmd) {
*/
void Parser::loadCmdList(Common::ReadStream &in) {
cmd tmpCmd;
+ memset(&tmpCmd, 0, sizeof(tmpCmd));
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
uint16 numElem = in.readUint16BE();
if (varnt == _vm->_gameVariant) {
@@ -119,6 +116,7 @@ void Parser::readBG(Common::ReadStream &in, background_t &curBG) {
*/
void Parser::loadBackgroundObjects(Common::ReadStream &in) {
background_t tmpBG;
+ memset(&tmpBG, 0, sizeof(tmpBG));
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
uint16 numElem = in.readUint16BE();
@@ -145,6 +143,7 @@ void Parser::loadBackgroundObjects(Common::ReadStream &in) {
void Parser::loadCatchallList(Common::ReadStream &in) {
background_t *wrkCatchallList = 0;
background_t tmpBG;
+ memset(&tmpBG, 0, sizeof(tmpBG));
for (int varnt = 0; varnt < _vm->_numVariant; varnt++) {
uint16 numElem = in.readUint16BE();
@@ -337,7 +336,7 @@ void Parser::keyHandler(Common::Event event) {
break;
case Common::KEYCODE_F1: // User Help (DOS)
if (_checkDoubleF1Fl)
- _vm->_file->instructions();
+ gameStatus.helpFl = true;
else
_vm->_screen->userHelp();
_checkDoubleF1Fl = !_checkDoubleF1Fl;
diff --git a/engines/hugo/parser.h b/engines/hugo/parser.h
index dd9244ba93..b00b8d5c43 100644
--- a/engines/hugo/parser.h
+++ b/engines/hugo/parser.h
@@ -32,6 +32,11 @@
#ifndef HUGO_PARSER_H
#define HUGO_PARSER_H
+
+namespace Common {
+struct Event;
+}
+
namespace Hugo {
enum seqTextParser {
diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp
index de18427d93..b2e515fd42 100644
--- a/engines/hugo/parser_v1d.cpp
+++ b/engines/hugo/parser_v1d.cpp
@@ -32,6 +32,7 @@
// parser.c - handles all keyboard/command input
+#include "common/debug.h"
#include "common/system.h"
#include "hugo/hugo.h"
diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp
index 305fb995e1..a39063357b 100644
--- a/engines/hugo/parser_v1w.cpp
+++ b/engines/hugo/parser_v1w.cpp
@@ -32,8 +32,7 @@
// parser.c - handles all keyboard/command input
-#include "common/system.h"
-#include "common/events.h"
+#include "common/debug.h"
#include "hugo/hugo.h"
#include "hugo/parser.h"
diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp
index d6f2adfedc..6233f11c29 100644
--- a/engines/hugo/parser_v2d.cpp
+++ b/engines/hugo/parser_v2d.cpp
@@ -32,6 +32,7 @@
// parser.c - handles all keyboard/command input
+#include "common/debug.h"
#include "common/system.h"
#include "hugo/hugo.h"
@@ -121,7 +122,6 @@ void Parser_v2d::lineHandler() {
// SAVE/RESTORE
if (!strcmp("save", _vm->_line)) {
- _vm->_config.soundFl = false;
if (gameStatus.gameOverFl)
_vm->gameOverMsg();
else
@@ -130,7 +130,6 @@ void Parser_v2d::lineHandler() {
}
if (!strcmp("restore", _vm->_line)) {
- _vm->_config.soundFl = false;
_vm->_file->restoreGame(-1);
return;
}
diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp
index f08d472240..8c4946c534 100644
--- a/engines/hugo/parser_v3d.cpp
+++ b/engines/hugo/parser_v3d.cpp
@@ -32,6 +32,7 @@
// parser.c - handles all keyboard/command input
+#include "common/debug.h"
#include "common/system.h"
#include "hugo/hugo.h"
@@ -123,7 +124,6 @@ void Parser_v3d::lineHandler() {
// SAVE/RESTORE
if (!strcmp("save", _vm->_line)) {
- _vm->_config.soundFl = false;
if (gameStatus.gameOverFl)
_vm->gameOverMsg();
else
@@ -132,7 +132,6 @@ void Parser_v3d::lineHandler() {
}
if (!strcmp("restore", _vm->_line)) {
- _vm->_config.soundFl = false;
_vm->_file->restoreGame(-1);
return;
}
diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp
index 76ec583857..68b659cd3f 100644
--- a/engines/hugo/route.cpp
+++ b/engines/hugo/route.cpp
@@ -32,6 +32,7 @@
// Find shortest route from hero to destination
+#include "common/debug.h"
#include "common/system.h"
#include "hugo/hugo.h"
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index 45a2b77826..0e91124a7e 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -32,7 +32,9 @@
// This module contains all the scheduling and timing stuff
+#include "common/debug.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "hugo/hugo.h"
#include "hugo/schedule.h"
@@ -1143,6 +1145,10 @@ void Scheduler::insertAction(act *action) {
case AGSCHEDULE:
curEvent->localActionFl = false; // Lasts over a new screen
break;
+ // Workaround: When dying, switch to storyMode in order to block the keyboard.
+ case GAMEOVER:
+ _vm->getGameStatus().storyModeFl = true;
+ // No break on purpose
default:
curEvent->localActionFl = true; // Rest are for current screen only
break;
@@ -1529,28 +1535,22 @@ void Scheduler_v1d::runScheduler() {
}
void Scheduler_v1d::promptAction(act *action) {
- Utils::promptBox(_vm->_file->fetchString(action->a3.promptIndex));
-
- warning("STUB: doAction(act3)");
- // TODO: The answer of the player is not handled currently! Once it'll be read in the messageBox, uncomment this block
-#if 0
- char response[256];
- // TODO: Put user input in response
-
- Utils::strlwr(response);
- if (action->a3.encodedFl) {
- warning("Encrypted flag set");
- decodeString(response);
- }
+ Common::String response;
+
+ response = Utils::promptBox(_vm->_file->fetchString(action->a3.promptIndex));
+
+ response.toLowercase();
+
+ char resp[256];
+ strncpy(resp, response.c_str(), 256);
+
+ if (action->a3.encodedFl)
+ decodeString(resp);
- if (strstr(response, _vm->_file->fetchString(action->a3.responsePtr[0]))
+ if (strstr(resp, _vm->_file->fetchString(action->a3.responsePtr[0])))
insertActionList(action->a3.actPassIndex);
else
insertActionList(action->a3.actFailIndex);
-#endif
-
- // HACK: As the answer is not read, currently it's always considered correct
- insertActionList(action->a3.actPassIndex);
}
/**
@@ -1578,19 +1578,22 @@ const char *Scheduler_v2d::getCypher() const {
}
void Scheduler_v2d::promptAction(act *action) {
- Utils::promptBox(_vm->_file->fetchString(action->a3.promptIndex));
- warning("STUB: doAction(act3), expecting answer %s", _vm->_file->fetchString(action->a3.responsePtr[0]));
+ Common::String response;
+
+ response = Utils::promptBox(_vm->_file->fetchString(action->a3.promptIndex));
+ response.toLowercase();
- // TODO: The answer of the player is not handled currently! Once it'll be read in the messageBox, uncomment this block
-#if 0
- char *response = Utils::Box(BOX_PROMPT, "%s", _vm->_file->fetchString(action->a3.promptIndex));
+ debug(1, "doAction(act3), expecting answer %s", _vm->_file->fetchString(action->a3.responsePtr[0]));
bool found = false;
- char *tmpStr; // General purpose string ptr
+ const char *tmpStr; // General purpose string ptr
- for (dx = 0; !found && (action->a3.responsePtr[dx] != -1); dx++) {
+ char resp[256];
+ strncpy(resp, response.c_str(), 256);
+
+ for (int dx = 0; !found && (action->a3.responsePtr[dx] != -1); dx++) {
tmpStr = _vm->_file->fetchString(action->a3.responsePtr[dx]);
- if (strstr(Utils::strlwr(response) , tmpStr))
+ if (strstr(Utils::strlwr(resp), tmpStr))
found = true;
}
@@ -1598,10 +1601,6 @@ void Scheduler_v2d::promptAction(act *action) {
insertActionList(action->a3.actPassIndex);
else
insertActionList(action->a3.actFailIndex);
-#endif
-
- // HACK: As the answer is not read, currently it's always considered correct
- insertActionList(action->a3.actPassIndex);
}
/**
diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp
index 24359a2c54..d657eb96a6 100644
--- a/engines/hugo/sound.cpp
+++ b/engines/hugo/sound.cpp
@@ -32,7 +32,9 @@
// sound.c - sound effects and music support
+#include "common/debug.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/config-manager.h"
#include "audio/decoders/raw.h"
diff --git a/engines/hugo/util.cpp b/engines/hugo/util.cpp
index 044b58e986..6846bc98af 100644
--- a/engines/hugo/util.cpp
+++ b/engines/hugo/util.cpp
@@ -104,6 +104,9 @@ Common::String promptBox(const Common::String &msg) {
return Common::String();
EntryDialog dialog(msg, "OK", "");
+
+ dialog.runModal();
+
return dialog.getEditString();
}
diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp
index e1471239da..a563bc2b4f 100644
--- a/engines/kyra/animator_hof.cpp
+++ b/engines/kyra/animator_hof.cpp
@@ -26,7 +26,7 @@
#include "kyra/kyra_hof.h"
#include "kyra/wsamovie.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/animator_lok.cpp b/engines/kyra/animator_lok.cpp
index b906d3a724..452d5e8062 100644
--- a/engines/kyra/animator_lok.cpp
+++ b/engines/kyra/animator_lok.cpp
@@ -23,16 +23,13 @@
*
*/
-#include "common/endian.h"
-
#include "kyra/kyra_lok.h"
#include "kyra/screen.h"
#include "kyra/animator_lok.h"
#include "kyra/sprites.h"
-#include "common/system.h"
-
namespace Kyra {
+
Animator_LoK::Animator_LoK(KyraEngine_LoK *vm, OSystem *system) {
_vm = vm;
_screen = vm->screen();
diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp
index e6daba7aeb..47c0e3b03a 100644
--- a/engines/kyra/animator_mr.cpp
+++ b/engines/kyra/animator_mr.cpp
@@ -27,6 +27,8 @@
#include "kyra/resource.h"
#include "kyra/wsamovie.h"
+#include "common/system.h"
+
namespace Kyra {
void KyraEngine_MR::restorePage3() {
diff --git a/engines/kyra/animator_tim.cpp b/engines/kyra/animator_tim.cpp
index 0290b2aa7f..fa42042bef 100644
--- a/engines/kyra/animator_tim.cpp
+++ b/engines/kyra/animator_tim.cpp
@@ -23,9 +23,6 @@
*
*/
-#include "common/endian.h"
-#include "common/system.h"
-
#include "kyra/script_tim.h"
#include "kyra/wsamovie.h"
#include "kyra/screen_lol.h"
@@ -36,6 +33,8 @@
#include "kyra/screen_v2.h"
#endif
+#include "common/system.h"
+
namespace Kyra {
#ifdef ENABLE_LOL
diff --git a/engines/kyra/animator_v2.cpp b/engines/kyra/animator_v2.cpp
index b06dffd36f..07ff4456e5 100644
--- a/engines/kyra/animator_v2.cpp
+++ b/engines/kyra/animator_v2.cpp
@@ -25,9 +25,6 @@
#include "kyra/kyra_v2.h"
#include "kyra/screen_v2.h"
-#include "kyra/wsamovie.h"
-
-#include "common/endian.h"
namespace Kyra {
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 301271ad3c..066648b96f 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -23,18 +23,15 @@
*
*/
-
-#include "common/config-manager.h"
-#include "common/system.h"
#include "kyra/debugger.h"
#include "kyra/kyra_lok.h"
-#include "kyra/kyra_v2.h"
#include "kyra/kyra_hof.h"
-#include "kyra/screen.h"
#include "kyra/timer.h"
#include "kyra/resource.h"
#include "kyra/lol.h"
+#include "common/system.h"
+
namespace Kyra {
Debugger::Debugger(KyraEngine_v1 *vm)
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 6c111a6601..87cda9f3b6 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -22,17 +22,17 @@
* $Id$
*/
-#include "kyra/kyra_v1.h"
#include "kyra/kyra_lok.h"
#include "kyra/lol.h"
#include "kyra/kyra_hof.h"
#include "kyra/kyra_mr.h"
-
#include "common/config-manager.h"
-#include "engines/advancedDetector.h"
+#include "common/system.h"
#include "common/savefile.h"
+#include "engines/advancedDetector.h"
+
#include "base/plugins.h"
struct KYRAGameDescription {
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index ff7bf233d2..849b65a24b 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -25,11 +25,11 @@
#include "kyra/gui.h"
-#include "kyra/screen.h"
#include "kyra/text.h"
#include "kyra/wsamovie.h"
#include "common/savefile.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index 56971e563c..26e0d8f18a 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -23,15 +23,13 @@
*
*/
-#include "kyra/kyra_v1.h"
+#include "kyra/gui_hof.h"
#include "kyra/kyra_hof.h"
-#include "kyra/screen.h"
-#include "kyra/wsamovie.h"
#include "kyra/timer.h"
-#include "kyra/sound.h"
#include "kyra/resource.h"
+#include "kyra/sound.h"
-#include "common/savefile.h"
+#include "common/system.h"
#include "graphics/scaler.h"
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index 3560478a1b..c31cbe3db2 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -23,18 +23,13 @@
*
*/
+#include "kyra/gui_lok.h"
#include "kyra/kyra_lok.h"
-#include "kyra/screen.h"
-#include "kyra/script.h"
-#include "kyra/text.h"
#include "kyra/animator_lok.h"
-#include "kyra/sound.h"
-#include "kyra/gui_lok.h"
+#include "kyra/text.h"
#include "kyra/timer.h"
#include "kyra/util.h"
-#include "kyra/item.h"
-#include "common/config-manager.h"
#include "common/savefile.h"
#include "common/system.h"
diff --git a/engines/kyra/gui_lok.h b/engines/kyra/gui_lok.h
index e846933741..084a798de4 100644
--- a/engines/kyra/gui_lok.h
+++ b/engines/kyra/gui_lok.h
@@ -27,6 +27,7 @@
#define KYRA_GUI_LOK_H
#include "kyra/gui.h"
+#include "kyra/screen_lok.h"
namespace Kyra {
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 07fbf1664d..2625347d50 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -25,13 +25,15 @@
#ifdef ENABLE_LOL
+#include "kyra/gui_lol.h"
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
-#include "kyra/gui_lol.h"
#include "kyra/resource.h"
#include "kyra/util.h"
+#include "kyra/sound.h"
#include "common/savefile.h"
+#include "common/system.h"
#include "common/config-manager.h"
#include "graphics/scaler.h"
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index 6bdecfc3b8..6eca24fd46 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -26,12 +26,11 @@
#include "kyra/gui_mr.h"
#include "kyra/kyra_mr.h"
#include "kyra/text_mr.h"
-#include "kyra/wsamovie.h"
#include "kyra/resource.h"
-#include "kyra/sound.h"
#include "kyra/timer.h"
+#include "kyra/sound.h"
-#include "common/savefile.h"
+#include "common/system.h"
#include "graphics/scaler.h"
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 2247a0ca2e..01922de7cf 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -24,12 +24,12 @@
*/
#include "kyra/gui_v2.h"
-#include "kyra/kyra_v2.h"
#include "kyra/screen_v2.h"
#include "kyra/text.h"
#include "kyra/util.h"
#include "common/savefile.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp
index 6a78a77c23..d460698272 100644
--- a/engines/kyra/items_hof.cpp
+++ b/engines/kyra/items_hof.cpp
@@ -25,6 +25,8 @@
#include "kyra/kyra_hof.h"
+#include "common/system.h"
+
namespace Kyra {
int KyraEngine_HoF::checkItemCollision(int x, int y) {
diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp
index 322314e3ad..ed1299d239 100644
--- a/engines/kyra/items_lok.cpp
+++ b/engines/kyra/items_lok.cpp
@@ -24,17 +24,9 @@
*/
#include "kyra/kyra_lok.h"
-#include "kyra/seqplayer.h"
-#include "kyra/screen.h"
-#include "kyra/resource.h"
-#include "kyra/sound.h"
-#include "kyra/sprites.h"
-#include "kyra/wsamovie.h"
#include "kyra/animator_lok.h"
-#include "kyra/text.h"
#include "common/system.h"
-#include "common/savefile.h"
namespace Kyra {
diff --git a/engines/kyra/items_mr.cpp b/engines/kyra/items_mr.cpp
index 2bc268ace3..5659876307 100644
--- a/engines/kyra/items_mr.cpp
+++ b/engines/kyra/items_mr.cpp
@@ -26,6 +26,8 @@
#include "kyra/kyra_mr.h"
#include "kyra/timer.h"
+#include "common/system.h"
+
namespace Kyra {
void KyraEngine_MR::removeTrashItems() {
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index c73792ef8e..de6aa55b08 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -23,18 +23,13 @@
*
*/
-#include "kyra/kyra_v1.h"
#include "kyra/kyra_hof.h"
-#include "kyra/screen.h"
#include "kyra/resource.h"
-#include "kyra/wsamovie.h"
-#include "kyra/sound.h"
-#include "kyra/script.h"
-#include "kyra/script_tim.h"
#include "kyra/text_hof.h"
#include "kyra/timer.h"
#include "kyra/debugger.h"
#include "kyra/util.h"
+#include "kyra/sound.h"
#include "common/system.h"
#include "common/config-manager.h"
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index d7ec6ada71..a04c28cad8 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -24,26 +24,19 @@
*/
#include "kyra/kyra_lok.h"
-
-#include "common/file.h"
-#include "common/system.h"
-#include "common/savefile.h"
-#include "common/config-manager.h"
-#include "common/debug-channels.h"
-
-#include "gui/message.h"
-
#include "kyra/resource.h"
-#include "kyra/screen.h"
-#include "kyra/script.h"
#include "kyra/seqplayer.h"
-#include "kyra/sound.h"
#include "kyra/sprites.h"
-#include "kyra/wsamovie.h"
#include "kyra/animator_lok.h"
-#include "kyra/text.h"
#include "kyra/debugger.h"
#include "kyra/timer.h"
+#include "kyra/sound.h"
+
+#include "common/system.h"
+#include "common/config-manager.h"
+#include "common/debug-channels.h"
+
+#include "gui/message.h"
namespace Kyra {
diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h
index d1ff24ad85..cfa231e2d0 100644
--- a/engines/kyra/kyra_lok.h
+++ b/engines/kyra/kyra_lok.h
@@ -32,6 +32,10 @@
#include "kyra/gui_lok.h"
#include "kyra/item.h"
+namespace Graphics {
+struct Surface;
+}
+
namespace Kyra {
class Movie;
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 65e78448a5..570ebe0bab 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -23,18 +23,15 @@
*
*/
-#include "kyra/kyra_v1.h"
#include "kyra/kyra_mr.h"
-#include "kyra/screen_mr.h"
#include "kyra/wsamovie.h"
-#include "kyra/sound.h"
#include "kyra/text_mr.h"
#include "kyra/vqa.h"
-#include "kyra/gui.h"
#include "kyra/timer.h"
#include "kyra/debugger.h"
#include "kyra/gui_mr.h"
#include "kyra/resource.h"
+#include "kyra/sound.h"
#include "common/system.h"
#include "common/config-manager.h"
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 3a5d21196b..fb56e4a62a 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -23,22 +23,17 @@
*
*/
-#include "common/config-manager.h"
-#include "common/debug-channels.h"
-#include "common/EventRecorder.h"
-
-#include "audio/mididrv.h"
-#include "audio/mixer.h"
-
#include "kyra/kyra_v1.h"
#include "kyra/sound_intern.h"
#include "kyra/resource.h"
-#include "kyra/screen.h"
-#include "kyra/text.h"
#include "kyra/timer.h"
-#include "kyra/script.h"
#include "kyra/debugger.h"
+#include "common/error.h"
+#include "common/config-manager.h"
+#include "common/debug-channels.h"
+#include "common/EventRecorder.h"
+
namespace Kyra {
KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index cf51774b0f..08dc831dd9 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -29,10 +29,10 @@
#include "engines/engine.h"
#include "common/array.h"
+#include "common/error.h"
#include "common/events.h"
#include "common/random.h"
#include "common/hashmap.h"
-#include "common/system.h"
#include "audio/mixer.h"
@@ -44,6 +44,10 @@ class SeekableReadStream;
class WriteStream;
} // End of namespace Common
+namespace Graphics {
+struct Surface;
+}
+
class KyraMetaEngine;
/**
@@ -166,7 +170,6 @@ enum MusicDataID {
class Screen;
class Resource;
class Sound;
-class Movie;
class TextDisplayer;
class StaticResource;
class TimerManager;
@@ -247,7 +250,7 @@ protected:
Common::Error err;
registerDefaultSettings();
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 804097c81d..16b5ffa4e8 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -23,11 +23,12 @@
*
*/
-#include "common/config-manager.h"
-
#include "kyra/kyra_v2.h"
#include "kyra/screen_v2.h"
-#include "kyra/debugger.h"
+
+#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 5928c40f92..ce73bffc89 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -28,17 +28,15 @@
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
#include "kyra/resource.h"
-
-#include "kyra/sound.h"
#include "kyra/timer.h"
#include "kyra/util.h"
#include "kyra/debugger.h"
+#include "kyra/sound.h"
-#include "audio/decoders/voc.h"
#include "audio/audiostream.h"
#include "common/config-manager.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
@@ -591,7 +589,9 @@ Common::Error LoLEngine::go() {
if (action == 0) {
startupNew();
} else if (_gameToLoad != -1) {
- if (loadGameState(_gameToLoad) != Common::kNoError)
+ // FIXME: Instead of throwing away the error returned by
+ // loadGameState, we should use it / augment it.
+ if (loadGameState(_gameToLoad).getCode() != Common::kNoError)
error("Couldn't load game slot %d on startup", _gameToLoad);
_gameToLoad = -1;
}
@@ -918,7 +918,9 @@ void LoLEngine::runLoop() {
while (!shouldQuit() && _runFlag) {
if (_gameToLoad != -1) {
- if (loadGameState(_gameToLoad) != Common::kNoError)
+ // FIXME: Instead of throwing away the error returned by
+ // loadGameState, we should use it / augment it.
+ if (loadGameState(_gameToLoad).getCode() != Common::kNoError)
error("Couldn't load game slot %d", _gameToLoad);
_gameToLoad = -1;
}
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index d24f3b427f..a3170c2193 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -31,12 +31,15 @@
#include "kyra/kyra_v1.h"
#include "kyra/script_tim.h"
#include "kyra/script.h"
-#include "kyra/sound.h"
#include "kyra/gui_lol.h"
#include "kyra/text_lol.h"
#include "common/list.h"
+namespace Audio {
+class SeekableAudioStream;
+} // End of namespace Audio
+
namespace Kyra {
class Screen_LoL;
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 63b8072654..22786c1c7e 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -27,11 +27,7 @@
#include "kyra/resource_intern.h"
#include "common/config-manager.h"
-#include "common/endian.h"
-#include "common/file.h"
#include "common/fs.h"
-#include "common/func.h"
-#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index 44579c3377..81b3ec15ae 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -23,15 +23,15 @@
*
*/
-#include "common/endian.h"
+#include "kyra/kyra_v1.h"
+#include "kyra/util.h"
+
#include "common/savefile.h"
#include "common/system.h"
+
#include "graphics/thumbnail.h"
#include "graphics/surface.h"
-#include "kyra/kyra_v1.h"
-#include "kyra/util.h"
-
#define CURRENT_SAVE_VERSION 16
#define GF_FLOPPY (1 << 0)
@@ -257,7 +257,9 @@ void KyraEngine_v1::checkAutosave() {
}
void KyraEngine_v1::loadGameStateCheck(int slot) {
- if (loadGameState(slot) != Common::kNoError) {
+ // FIXME: Instead of throwing away the error returned by
+ // loadGameState, we should use it / augment it.
+ if (loadGameState(slot).getCode() != Common::kNoError) {
const char *filename = getSavegameFilename(slot);
Common::String errorMessage = "Could not load savegame: '";
errorMessage += filename;
diff --git a/engines/kyra/saveload_hof.cpp b/engines/kyra/saveload_hof.cpp
index 7a487dcf7b..1fd6c0f3c8 100644
--- a/engines/kyra/saveload_hof.cpp
+++ b/engines/kyra/saveload_hof.cpp
@@ -23,17 +23,15 @@
*
*/
-#include "common/endian.h"
-#include "common/savefile.h"
-#include "common/substream.h"
-#include "common/system.h"
-
-#include "kyra/kyra_v2.h"
+#include "kyra/kyra_hof.h"
#include "kyra/screen_v2.h"
-#include "kyra/resource.h"
#include "kyra/sound.h"
#include "kyra/timer.h"
+#include "common/savefile.h"
+#include "common/substream.h"
+#include "common/system.h"
+
namespace Kyra {
Common::Error KyraEngine_HoF::saveGameStateIntern(int slot, const char *saveName, const Graphics::Surface *thumb) {
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index 012ff138b5..5af4f1d8ca 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -23,17 +23,14 @@
*
*/
-#include "common/endian.h"
-#include "common/savefile.h"
-#include "common/system.h"
-
#include "kyra/kyra_lok.h"
#include "kyra/animator_lok.h"
-#include "kyra/screen.h"
#include "kyra/resource.h"
#include "kyra/sound.h"
#include "kyra/timer.h"
+#include "common/savefile.h"
+
namespace Kyra {
Common::Error KyraEngine_LoK::loadGameState(int slot) {
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index b6c0693a16..c5240e2624 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -27,12 +27,9 @@
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
-#include "kyra/resource.h"
-#include "common/endian.h"
#include "common/savefile.h"
#include "common/substream.h"
-#include "common/system.h"
#include "graphics/scaler.h"
diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp
index 79827361a3..b44c88a0b4 100644
--- a/engines/kyra/scene_hof.cpp
+++ b/engines/kyra/scene_hof.cpp
@@ -24,12 +24,10 @@
*/
#include "kyra/kyra_hof.h"
-#include "kyra/screen_v2.h"
#include "kyra/sound.h"
-#include "kyra/wsamovie.h"
#include "kyra/resource.h"
-#include "common/func.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp
index 3abfe03fff..6200e2ab1e 100644
--- a/engines/kyra/scene_lok.cpp
+++ b/engines/kyra/scene_lok.cpp
@@ -24,19 +24,13 @@
*/
#include "kyra/kyra_lok.h"
-#include "kyra/seqplayer.h"
-#include "kyra/screen.h"
#include "kyra/resource.h"
#include "kyra/sound.h"
#include "kyra/sprites.h"
-#include "kyra/wsamovie.h"
#include "kyra/animator_lok.h"
-#include "kyra/text.h"
-#include "kyra/script.h"
#include "kyra/timer.h"
#include "common/system.h"
-#include "common/savefile.h"
namespace Kyra {
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index e070b91a44..ab9f89456b 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -29,9 +29,9 @@
#include "kyra/screen_lol.h"
#include "kyra/resource.h"
#include "kyra/timer.h"
-#include "kyra/sound.h"
#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp
index acb0710616..4eac4889b6 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -25,10 +25,11 @@
#include "kyra/kyra_mr.h"
#include "kyra/screen_mr.h"
-#include "kyra/wsamovie.h"
#include "kyra/sound.h"
#include "kyra/resource.h"
+#include "common/system.h"
+
namespace Kyra {
void KyraEngine_MR::enterNewScene(uint16 sceneId, int facing, int unk1, int unk2, int unk3) {
diff --git a/engines/kyra/scene_v1.cpp b/engines/kyra/scene_v1.cpp
index 848735b4a5..bc88377892 100644
--- a/engines/kyra/scene_v1.cpp
+++ b/engines/kyra/scene_v1.cpp
@@ -24,7 +24,6 @@
*/
#include "kyra/kyra_v1.h"
-#include "kyra/screen.h"
namespace Kyra {
diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp
index fdfbceb521..897f2e937f 100644
--- a/engines/kyra/scene_v2.cpp
+++ b/engines/kyra/scene_v2.cpp
@@ -24,7 +24,8 @@
*/
#include "kyra/kyra_v2.h"
-#include "kyra/screen.h"
+
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 58d8e7f3d4..20a1022b26 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "kyra/screen.h"
+#include "kyra/kyra_v1.h"
+#include "kyra/resource.h"
#include "common/endian.h"
#include "common/memstream.h"
@@ -31,12 +34,9 @@
#include "engines/util.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "graphics/sjis.h"
-#include "kyra/screen.h"
-#include "kyra/kyra_v1.h"
-#include "kyra/resource.h"
-
namespace Kyra {
Screen::Screen(KyraEngine_v1 *vm, OSystem *system)
diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp
index a180c28442..f0af53f024 100644
--- a/engines/kyra/screen_hof.cpp
+++ b/engines/kyra/screen_hof.cpp
@@ -23,10 +23,8 @@
*
*/
-#include "common/endian.h"
-
-#include "kyra/kyra_hof.h"
#include "kyra/screen_hof.h"
+#include "kyra/kyra_hof.h"
namespace Kyra {
diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp
index 227349754f..2431cde20b 100644
--- a/engines/kyra/screen_lok.cpp
+++ b/engines/kyra/screen_lok.cpp
@@ -23,10 +23,12 @@
*
*/
-#include "kyra/kyra_lok.h"
#include "kyra/screen_lok.h"
+#include "kyra/kyra_lok.h"
+
+#include "common/system.h"
-#include "graphics/cursorman.h"
+#include "graphics/palette.h"
namespace Kyra {
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index ff35facbb5..20756e1fae 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -27,7 +27,10 @@
#include "kyra/screen_lol.h"
#include "kyra/lol.h"
-#include "kyra/resource.h"
+
+#include "common/system.h"
+
+#include "graphics/palette.h"
namespace Kyra {
diff --git a/engines/kyra/screen_mr.cpp b/engines/kyra/screen_mr.cpp
index 33bfc517f7..4ae52b924d 100644
--- a/engines/kyra/screen_mr.cpp
+++ b/engines/kyra/screen_mr.cpp
@@ -24,7 +24,6 @@
*/
#include "kyra/screen_mr.h"
-
#include "kyra/kyra_mr.h"
namespace Kyra {
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index 956bf39b5a..21dfe0bd31 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -23,15 +23,11 @@
*
*/
-
-#include "common/endian.h"
-#include "common/stream.h"
-#include "common/util.h"
-#include "common/system.h"
-
+#include "kyra/script.h"
#include "kyra/kyra_v1.h"
#include "kyra/resource.h"
-#include "kyra/script.h"
+
+#include "common/endian.h"
namespace Kyra {
EMCInterpreter::EMCInterpreter(KyraEngine_v1 *vm) : _vm(vm), _scriptData(0), _filename(0) {
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index d57bb7efc5..056319e6d4 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -24,14 +24,11 @@
*/
#include "kyra/kyra_hof.h"
-#include "kyra/text_hof.h"
-#include "kyra/wsamovie.h"
-#include "kyra/sound.h"
#include "kyra/timer.h"
-#include "kyra/script_tim.h"
#include "kyra/resource.h"
+#include "kyra/sound.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp
index a2bad8035e..30f1138360 100644
--- a/engines/kyra/script_lok.cpp
+++ b/engines/kyra/script_lok.cpp
@@ -23,12 +23,7 @@
*
*/
-#include "common/endian.h"
-#include "common/system.h"
-
#include "kyra/kyra_lok.h"
-#include "kyra/script.h"
-#include "kyra/screen.h"
#include "kyra/sprites.h"
#include "kyra/wsamovie.h"
#include "kyra/animator_lok.h"
@@ -36,6 +31,8 @@
#include "kyra/timer.h"
#include "kyra/sound.h"
+#include "common/system.h"
+
namespace Kyra {
int KyraEngine_LoK::o1_magicInMouseItem(EMCState *script) {
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index c9fb8df1fb..3185032218 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -29,8 +29,9 @@
#include "kyra/screen_lol.h"
#include "kyra/timer.h"
#include "kyra/resource.h"
+#include "kyra/sound.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index 18878b6543..b3943e1aef 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -24,14 +24,10 @@
*/
#include "kyra/kyra_mr.h"
-#include "kyra/script.h"
-#include "kyra/screen_mr.h"
#include "kyra/text_mr.h"
-#include "kyra/wsamovie.h"
-#include "kyra/timer.h"
#include "kyra/resource.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 1e978caf15..004ceb97bb 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -24,10 +24,8 @@
*/
#include "kyra/script_tim.h"
-#include "kyra/script.h"
#include "kyra/resource.h"
#include "kyra/sound.h"
-#include "kyra/wsamovie.h"
#ifdef ENABLE_LOL
#include "kyra/lol.h"
@@ -35,7 +33,7 @@
#endif // ENABLE_LOL
#include "common/iff_container.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index 91f2e8589e..7cf7d0a7dd 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -36,6 +36,7 @@ namespace Kyra {
class WSAMovie_v2;
class Screen_v2;
+class Movie;
class LoLEngine;
class TimAnimator {
diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp
index 12f26ec5f6..13fdcb7d97 100644
--- a/engines/kyra/script_v1.cpp
+++ b/engines/kyra/script_v1.cpp
@@ -26,6 +26,8 @@
#include "kyra/kyra_v1.h"
#include "kyra/screen.h"
+#include "common/system.h"
+
namespace Kyra {
int KyraEngine_v1::o1_queryGameFlag(EMCState *script) {
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 17e882398e..081f9dd517 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -27,7 +27,7 @@
#include "kyra/screen_v2.h"
#include "kyra/timer.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp
index 5160224591..16e89de146 100644
--- a/engines/kyra/seqplayer.cpp
+++ b/engines/kyra/seqplayer.cpp
@@ -23,18 +23,11 @@
*
*/
-
-#include "common/system.h"
-
-#include "engines/engine.h"
-
+#include "kyra/seqplayer.h"
#include "kyra/resource.h"
-#include "kyra/screen.h"
#include "kyra/sound.h"
-#include "kyra/wsamovie.h"
-#include "kyra/text.h"
-#include "kyra/seqplayer.h"
+#include "common/system.h"
#define SEQOP(n, x) { n, &SeqPlayer::x, #x }
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index c55153b802..b268f13fc1 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -23,14 +23,10 @@
*
*/
-#include "kyra/kyra_v1.h"
#include "kyra/kyra_hof.h"
-#include "kyra/screen.h"
-#include "kyra/wsamovie.h"
-#include "kyra/sound.h"
-#include "kyra/text_hof.h"
#include "kyra/timer.h"
#include "kyra/resource.h"
+#include "kyra/sound.h"
#include "common/system.h"
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index 23af24064d..0b39201f85 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -25,14 +25,12 @@
#include "kyra/kyra_lok.h"
#include "kyra/seqplayer.h"
-#include "kyra/screen_lok.h"
#include "kyra/resource.h"
-#include "kyra/sound.h"
#include "kyra/sprites.h"
#include "kyra/wsamovie.h"
#include "kyra/animator_lok.h"
-#include "kyra/text.h"
#include "kyra/timer.h"
+#include "kyra/sound.h"
#include "common/system.h"
#include "common/savefile.h"
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index e8ea7a9dcb..da1245d7e6 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -28,9 +28,12 @@
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
#include "kyra/resource.h"
+#include "kyra/sound.h"
#include "base/version.h"
+#include "common/system.h"
+
namespace Kyra {
#pragma mark - Intro
diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp
index 3824676213..4d9cdf0d5d 100644
--- a/engines/kyra/sequences_v2.cpp
+++ b/engines/kyra/sequences_v2.cpp
@@ -26,6 +26,8 @@
#include "kyra/kyra_v2.h"
#include "kyra/resource.h"
+#include "common/system.h"
+
namespace Kyra {
void KyraEngine_v2::runAnimationScript(const char *filename, int allowSkip, int resetChar, int newShapes, int shapeUnload) {
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 9dd046e50b..1392824235 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -24,19 +24,16 @@
*/
-#include "common/system.h"
-#include "common/config-manager.h"
-
-#include "kyra/resource.h"
#include "kyra/sound.h"
+#include "kyra/resource.h"
#include "audio/mixer.h"
-#include "audio/decoders/voc.h"
#include "audio/audiostream.h"
#include "audio/decoders/flac.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/raw.h"
+#include "audio/decoders/voc.h"
#include "audio/decoders/vorbis.h"
namespace Kyra {
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 758d66192d..16f6ca3eaa 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -40,10 +40,11 @@
*/
+#include "kyra/sound_intern.h"
+#include "kyra/resource.h"
+
#include "common/system.h"
#include "common/mutex.h"
-#include "kyra/resource.h"
-#include "kyra/sound_intern.h"
#include "audio/mixer.h"
#include "audio/fmopl.h"
@@ -909,7 +910,7 @@ void AdLibDriver::unkOutput2(uint8 chan) {
// including the two most significant frequency bit, and the octave -
// set to zero.
//
- // This is very strange behaviour, and causes problems with the ancient
+ // This is very strange behavior, and causes problems with the ancient
// FMOPL code we borrowed from AdPlug. I've added a workaround. See
// fmopl.cpp for more details.
//
@@ -984,7 +985,7 @@ void AdLibDriver::setupNote(uint8 rawNote, Channel &channel, bool flag) {
uint16 freq = _unkTable[note] + channel.baseFreq;
- // When called from callback 41, the behaviour is slightly different:
+ // When called from callback 41, the behavior is slightly different:
// We adjust the frequency, even when channel.unk16 is 0.
if (channel.unk16 || flag) {
@@ -1093,12 +1094,12 @@ void AdLibDriver::adjustVolume(Channel &channel) {
// tree) and turning Kallak to stone. Related functions and variables:
//
// update_setupPrimaryEffect1()
-// - Initialises unk29, unk30 and unk31
+// - Initializes unk29, unk30 and unk31
// - unk29 is not further modified
// - unk30 is not further modified, except by update_removePrimaryEffect1()
//
// update_removePrimaryEffect1()
-// - Deinitialises unk30
+// - Deinitializes unk30
//
// unk29 - determines how often the notes are played
// unk30 - modifies the frequency
@@ -1115,7 +1116,7 @@ void AdLibDriver::primaryEffect1(Channel &channel) {
if (channel.unk31 >= temp)
return;
- // Initialise unk1 to the current frequency
+ // Initialize unk1 to the current frequency
uint16 unk1 = ((channel.regBx & 3) << 8) | channel.regAx;
// This is presumably to shift the "note on" bit so far to the left
@@ -1167,10 +1168,10 @@ void AdLibDriver::primaryEffect1(Channel &channel) {
// and leaving Kallak's hut. Related functions and variables:
//
// update_setupPrimaryEffect2()
-// - Initialises unk32, unk33, unk34, unk35 and unk36
+// - Initializes unk32, unk33, unk34, unk35 and unk36
// - unk32 is not further modified
// - unk33 is not further modified
-// - unk34 is a countdown that gets reinitialised to unk35 on zero
+// - unk34 is a countdown that gets reinitialized to unk35 on zero
// - unk35 is based on unk34 and not further modified
// - unk36 is not further modified
//
@@ -1182,13 +1183,13 @@ void AdLibDriver::primaryEffect1(Channel &channel) {
// unk32 - determines how often the notes are played
// unk33 - modifies the frequency
// unk34 - countdown, updates frequency on zero
-// unk35 - initialiser for unk34 countdown
-// unk36 - initialiser for unk38 countdown
+// unk35 - initializer for unk34 countdown
+// unk36 - initializer for unk38 countdown
// unk37 - frequency
// unk38 - countdown, begins playing on zero
// unk41 - determines how often the notes are played
//
-// Note that unk41 is never initialised. Not that it should matter much, but it
+// Note that unk41 is never initialized. Not that it should matter much, but it
// is a bit sloppy.
void AdLibDriver::primaryEffect2(Channel &channel) {
diff --git a/engines/kyra/sound_amiga.cpp b/engines/kyra/sound_amiga.cpp
index c5e9f6171d..fed21eba84 100644
--- a/engines/kyra/sound_amiga.cpp
+++ b/engines/kyra/sound_amiga.cpp
@@ -23,14 +23,11 @@
*
*/
-#include "common/system.h"
-#include "common/mutex.h"
-#include "kyra/resource.h"
#include "kyra/sound_intern.h"
+#include "kyra/resource.h"
#include "audio/mixer.h"
#include "audio/mods/maxtrax.h"
-#include "audio/audiostream.h"
namespace Kyra {
diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp
index 40daa0b5bd..83566372bf 100644
--- a/engines/kyra/sound_lok.cpp
+++ b/engines/kyra/sound_lok.cpp
@@ -23,8 +23,10 @@
*
*/
-#include "kyra/sound.h"
#include "kyra/kyra_lok.h"
+#include "kyra/sound.h"
+
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp
index 87679f5bfb..10d35e03d5 100644
--- a/engines/kyra/sound_lol.cpp
+++ b/engines/kyra/sound_lol.cpp
@@ -25,10 +25,12 @@
#ifdef ENABLE_LOL
-#include "kyra/sound.h"
#include "kyra/lol.h"
+#include "kyra/sound.h"
#include "kyra/resource.h"
+#include "common/system.h"
+
#include "audio/audiostream.h"
namespace Kyra {
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 084bae5aab..6b30824a2f 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -23,20 +23,17 @@
*
*/
+#include "kyra/sound_intern.h"
+#include "kyra/resource.h"
+
#include "common/config-manager.h"
#include "common/system.h"
-#include "kyra/resource.h"
-#include "kyra/sound_intern.h"
-#include "kyra/screen.h"
-
#include "backends/audiocd/audiocd.h"
#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
-#include "common/util.h"
-
namespace Kyra {
SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer)
diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp
index 52689869c6..23775d2946 100644
--- a/engines/kyra/sprites.cpp
+++ b/engines/kyra/sprites.cpp
@@ -23,19 +23,13 @@
*
*/
-
-#include "common/endian.h"
-#include "common/stream.h"
-#include "common/util.h"
-#include "common/system.h"
-#include "common/EventRecorder.h"
-
-#include "kyra/screen.h"
-#include "kyra/kyra_lok.h"
#include "kyra/sprites.h"
#include "kyra/resource.h"
#include "kyra/animator_lok.h"
+#include "common/system.h"
+#include "common/EventRecorder.h"
+
namespace Kyra {
Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) {
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index fe4bd2ad71..f83546e0dd 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -23,23 +23,22 @@
*
*/
-#include "common/endian.h"
-#include "common/md5.h"
-#include "kyra/kyra_v1.h"
+#include "kyra/resource.h"
#include "kyra/kyra_lok.h"
-#include "kyra/kyra_v2.h"
#include "kyra/kyra_hof.h"
#include "kyra/kyra_mr.h"
#include "kyra/screen.h"
#include "kyra/screen_lok.h"
#include "kyra/screen_hof.h"
#include "kyra/screen_mr.h"
-#include "kyra/resource.h"
#include "kyra/gui_lok.h"
#include "kyra/gui_hof.h"
#include "kyra/gui_mr.h"
#include "kyra/sound_intern.h"
+#include "common/endian.h"
+#include "common/md5.h"
+
namespace Kyra {
#define RESFILE_VERSION 73
diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp
index 09f952f67e..e0114cda29 100644
--- a/engines/kyra/text.cpp
+++ b/engines/kyra/text.cpp
@@ -23,12 +23,8 @@
*
*/
-#include "kyra/kyra_v1.h"
-#include "kyra/screen.h"
#include "kyra/text.h"
-
-#include "common/system.h"
-#include "common/endian.h"
+#include "kyra/kyra_v1.h"
namespace Kyra {
diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp
index 4c292b70db..c961d2bf49 100644
--- a/engines/kyra/text_hof.cpp
+++ b/engines/kyra/text_hof.cpp
@@ -24,11 +24,9 @@
*/
#include "kyra/text_hof.h"
-#include "kyra/kyra_hof.h"
-#include "kyra/script_tim.h"
#include "kyra/resource.h"
-#include "common/endian.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp
index 40f2217a2b..cca8e5aaf5 100644
--- a/engines/kyra/text_lok.cpp
+++ b/engines/kyra/text_lok.cpp
@@ -23,13 +23,14 @@
*
*/
-#include "kyra/kyra_lok.h"
-#include "kyra/screen_lok.h"
#include "kyra/text.h"
+#include "kyra/kyra_lok.h"
#include "kyra/animator_lok.h"
#include "kyra/sprites.h"
#include "kyra/timer.h"
+#include "common/system.h"
+
namespace Kyra {
void KyraEngine_LoK::waitForChatToFinish(int vocFile, int16 chatDuration, const char *chatStr, uint8 charNum, const bool printText) {
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index 9f98586303..c9a77be1b2 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -25,10 +25,13 @@
#ifdef ENABLE_LOL
+#include "kyra/text_lol.h"
#include "kyra/lol.h"
#include "kyra/screen_lol.h"
#include "kyra/timer.h"
-#include "kyra/util.h"
+#include "kyra/sound.h"
+
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/text_lol.h b/engines/kyra/text_lol.h
index 1e5bc8884e..edac131106 100644
--- a/engines/kyra/text_lol.h
+++ b/engines/kyra/text_lol.h
@@ -28,9 +28,11 @@
#ifndef KYRA_TEXT_LOL_H
#define KYRA_TEXT_LOL_H
+#include "common/scummsys.h"
+
namespace Kyra {
-class Screen_v2;
+class Screen_LoL;
class LoLEngine;
struct EMCState;
diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp
index 001faab016..5679dc1ee6 100644
--- a/engines/kyra/text_mr.cpp
+++ b/engines/kyra/text_mr.cpp
@@ -24,9 +24,10 @@
*/
#include "kyra/text_mr.h"
-#include "kyra/screen_mr.h"
#include "kyra/resource.h"
+#include "common/system.h"
+
namespace Kyra {
TextDisplayer_MR::TextDisplayer_MR(KyraEngine_MR *vm, Screen_MR *screen)
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index 66b78d3c03..475f17cadc 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -23,11 +23,9 @@
*
*/
-#include "kyra/kyra_v1.h"
#include "kyra/timer.h"
-#include "common/func.h"
-#include "common/stream.h"
+#include "common/system.h"
namespace Kyra {
diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp
index 85b98be724..3a312c22c6 100644
--- a/engines/kyra/timer_lok.cpp
+++ b/engines/kyra/timer_lok.cpp
@@ -23,14 +23,10 @@
*
*/
-#include "kyra/kyra_v1.h"
#include "kyra/kyra_lok.h"
-#include "kyra/screen.h"
#include "kyra/animator_lok.h"
#include "kyra/timer.h"
-#include "common/system.h"
-
namespace Kyra {
#define TimerV1(x) new Common::Functor1Mem<int, void, KyraEngine_LoK>(this, &KyraEngine_LoK::x)
diff --git a/engines/kyra/timer_lol.cpp b/engines/kyra/timer_lol.cpp
index 90cfc1af78..a3dab365c7 100644
--- a/engines/kyra/timer_lol.cpp
+++ b/engines/kyra/timer_lol.cpp
@@ -26,9 +26,10 @@
#ifdef ENABLE_LOL
#include "kyra/lol.h"
-#include "kyra/screen_lol.h"
#include "kyra/timer.h"
+#include "common/system.h"
+
namespace Kyra {
#define TimerV2(x) new Common::Functor1Mem<int, void, LoLEngine>(this, &LoLEngine::x)
diff --git a/engines/kyra/timer_mr.cpp b/engines/kyra/timer_mr.cpp
index 0d89decf5a..97ce7c166d 100644
--- a/engines/kyra/timer_mr.cpp
+++ b/engines/kyra/timer_mr.cpp
@@ -26,6 +26,8 @@
#include "kyra/kyra_mr.h"
#include "kyra/timer.h"
+#include "common/system.h"
+
namespace Kyra {
#define TimerV3(x) new Common::Functor1Mem<int, void, KyraEngine_MR>(this, &KyraEngine_MR::x)
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index b3371793de..28071bc171 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -33,16 +33,14 @@
#include "kyra/vqa.h"
+#include "kyra/resource.h"
#include "common/system.h"
+
#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
-#include "kyra/sound.h"
-#include "kyra/screen.h"
-#include "kyra/resource.h"
-
namespace Kyra {
VQAMovie::VQAMovie(KyraEngine_v1 *vm, OSystem *system) {
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp
index c9536484a3..db324d48d4 100644
--- a/engines/kyra/wsamovie.cpp
+++ b/engines/kyra/wsamovie.cpp
@@ -23,18 +23,13 @@
*
*/
-
-#include "common/endian.h"
-#include "common/system.h"
-
-#include "kyra/kyra_v1.h"
-#include "kyra/kyra_v2.h"
-#include "kyra/screen.h"
-#include "kyra/screen_v2.h"
#include "kyra/wsamovie.h"
#include "kyra/resource.h"
+#include "common/endian.h"
+
namespace Kyra {
+
WSAMovie_v1::WSAMovie_v1(KyraEngine_v1 *vm)
: Movie(vm), _frameData(0), _frameOffsTable(0), _offscreenBuffer(0), _deltaBuffer(0) {
}
diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h
index d2c041742a..f755cdd557 100644
--- a/engines/kyra/wsamovie.h
+++ b/engines/kyra/wsamovie.h
@@ -26,10 +26,10 @@
#ifndef KYRA_WSAMOVIE_H
#define KYRA_WSAMOVIE_H
+#include "kyra/kyra_v1.h"
+
namespace Kyra {
-class KyraEngine_v1;
-class Screen_v2;
class Palette;
class Movie {
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index 7288889f09..2bf9bd4999 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -35,7 +35,10 @@
#include "common/events.h"
#include "common/rational.h"
+#include "common/rect.h"
#include "common/stream.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "engines/engine.h"
@@ -266,7 +269,7 @@ void Animation::play() {
if (_changed) {
// Create a temporary surface to merge the overlay with the background
Graphics::Surface *s = new Graphics::Surface;
- s->create(640, 480, 2);
+ s->create(640, 480, Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0));
draw(s);
diff --git a/engines/lastexpress/data/archive.h b/engines/lastexpress/data/archive.h
index 3860245bc5..17b1d661fa 100644
--- a/engines/lastexpress/data/archive.h
+++ b/engines/lastexpress/data/archive.h
@@ -39,6 +39,9 @@
*/
#include "common/archive.h"
+#include "common/hash-str.h"
+#include "common/hashmap.h"
+#include "common/str.h"
namespace LastExpress {
diff --git a/engines/lastexpress/data/background.cpp b/engines/lastexpress/data/background.cpp
index 8b0d338f64..e8236bca86 100644
--- a/engines/lastexpress/data/background.cpp
+++ b/engines/lastexpress/data/background.cpp
@@ -31,6 +31,7 @@
#include "lastexpress/debug.h"
+#include "common/rect.h"
#include "common/stream.h"
namespace LastExpress {
diff --git a/engines/lastexpress/data/font.cpp b/engines/lastexpress/data/font.cpp
index 99239606ab..d9acbb8382 100644
--- a/engines/lastexpress/data/font.cpp
+++ b/engines/lastexpress/data/font.cpp
@@ -25,8 +25,10 @@
#include "lastexpress/data/font.h"
+#include "common/rect.h"
#include "common/stream.h"
#include "common/system.h"
+#include "common/textconsole.h"
namespace LastExpress {
diff --git a/engines/lastexpress/data/font.h b/engines/lastexpress/data/font.h
index d49db35ba5..7bcf03ed7d 100644
--- a/engines/lastexpress/data/font.h
+++ b/engines/lastexpress/data/font.h
@@ -39,10 +39,12 @@
byte {x} - Unknown data (probably just garbage)
*/
+#include "common/str.h"
#include "graphics/surface.h"
namespace Common {
class SeekableReadStream;
+struct Rect;
}
namespace LastExpress {
diff --git a/engines/lastexpress/data/scene.cpp b/engines/lastexpress/data/scene.cpp
index 5a943982c4..e893d641a5 100644
--- a/engines/lastexpress/data/scene.cpp
+++ b/engines/lastexpress/data/scene.cpp
@@ -31,6 +31,7 @@
#include "lastexpress/lastexpress.h"
#include "lastexpress/resource.h"
+#include "common/textconsole.h"
#include "common/stream.h"
namespace LastExpress {
diff --git a/engines/lastexpress/data/scene.h b/engines/lastexpress/data/scene.h
index 7fc9425f28..9ec1899402 100644
--- a/engines/lastexpress/data/scene.h
+++ b/engines/lastexpress/data/scene.h
@@ -72,9 +72,15 @@
#include "lastexpress/shared.h"
#include "common/array.h"
+#include "common/rect.h"
namespace Common {
class SeekableReadStream;
+class String;
+}
+
+namespace Graphics {
+struct Surface;
}
namespace LastExpress {
diff --git a/engines/lastexpress/data/sequence.cpp b/engines/lastexpress/data/sequence.cpp
index 2308d70a2b..b986a33d5c 100644
--- a/engines/lastexpress/data/sequence.cpp
+++ b/engines/lastexpress/data/sequence.cpp
@@ -30,6 +30,7 @@
#include "lastexpress/debug.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace LastExpress {
@@ -82,7 +83,7 @@ void FrameInfo::read(Common::SeekableReadStream *in, bool isSequence) {
AnimFrame::AnimFrame(Common::SeekableReadStream *in, const FrameInfo &f) : _palette(NULL) {
_palSize = 1;
// TODO: use just the needed rectangle
- _image.create(640, 480, 1);
+ _image.create(640, 480, Graphics::PixelFormat::createFormatCLUT8());
//debugC(6, kLastExpressDebugGraphics, " Offsets: data=%d, unknown=%d, palette=%d", f.dataOffset, f.unknown, f.paletteOffset);
//debugC(6, kLastExpressDebugGraphics, " Position: (%d, %d) - (%d, %d)", f.xPos1, f.yPos1, f.xPos2, f.yPos2);
diff --git a/engines/lastexpress/data/sequence.h b/engines/lastexpress/data/sequence.h
index 7ad0a57254..cd16f26ab2 100644
--- a/engines/lastexpress/data/sequence.h
+++ b/engines/lastexpress/data/sequence.h
@@ -77,6 +77,8 @@
#include "lastexpress/shared.h"
#include "common/array.h"
+#include "common/rect.h"
+#include "common/str.h"
namespace Common {
class SeekableReadStream;
diff --git a/engines/lastexpress/data/snd.cpp b/engines/lastexpress/data/snd.cpp
index bd2320726a..a50fa7be08 100644
--- a/engines/lastexpress/data/snd.cpp
+++ b/engines/lastexpress/data/snd.cpp
@@ -30,12 +30,48 @@
#include "lastexpress/debug.h"
-#include "audio/decoders/adpcm.h"
+#include "audio/decoders/adpcm_intern.h"
#include "audio/audiostream.h"
+#include "common/debug.h"
#include "common/memstream.h"
+#include "common/system.h"
+#include "common/textconsole.h"
namespace LastExpress {
+// 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 {
+public:
+ LastExpress_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, uint32 blockSize) :
+ Audio::Ima_ADPCMStream(stream, disposeAfterUse, size, 44100, 1, blockSize) {}
+
+ int readBuffer(int16 *buffer, const int numSamples) {
+ int samples = 0;
+
+ assert(numSamples % 2 == 0);
+
+ while (samples < numSamples && !_stream->eos() && _stream->pos() < _endpos) {
+ if (_blockPos[0] == _blockAlign) {
+ // read block header
+ _status.ima_ch[0].last = _stream->readSint16LE();
+ _status.ima_ch[0].stepIndex = _stream->readSint16LE();
+ _blockPos[0] = 4;
+ }
+
+ 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);
+ }
+ }
+
+ return samples;
+ }
+};
+
//////////////////////////////////////////////////////////////////////////
// Sound
//////////////////////////////////////////////////////////////////////////
@@ -60,7 +96,7 @@ void SimpleSound::loadHeader(Common::SeekableReadStream *in) {
}
Audio::AudioStream *SimpleSound::makeDecoder(Common::SeekableReadStream *in, uint32 size) const {
- return Audio::makeADPCMStream(in, DisposeAfterUse::YES, size, Audio::kADPCMMSImaLastExpress, 44100, 1, _blockSize);
+ return new LastExpress_ADPCMStream(in, DisposeAfterUse::YES, size, _blockSize);
}
void SimpleSound::play(Audio::AudioStream *as) {
diff --git a/engines/lastexpress/data/snd.h b/engines/lastexpress/data/snd.h
index 2d28404f42..61d1c0951a 100644
--- a/engines/lastexpress/data/snd.h
+++ b/engines/lastexpress/data/snd.h
@@ -42,8 +42,8 @@
#include "audio/mixer.h"
namespace Audio {
- class AudioStream;
- class QueuingAudioStream;
+class AudioStream;
+class QueuingAudioStream;
}
namespace Common {
diff --git a/engines/lastexpress/data/subtitle.cpp b/engines/lastexpress/data/subtitle.cpp
index 953edd1d1a..2bc5d3c5ad 100644
--- a/engines/lastexpress/data/subtitle.cpp
+++ b/engines/lastexpress/data/subtitle.cpp
@@ -33,7 +33,9 @@
#include "lastexpress/debug.h"
#include "common/debug.h"
+#include "common/rect.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace LastExpress {
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h
index ccef312cd6..8c6cc2bafc 100644
--- a/engines/lastexpress/entities/entity.h
+++ b/engines/lastexpress/entities/entity.h
@@ -35,6 +35,7 @@
#include "common/array.h"
#include "common/func.h"
#include "common/serializer.h"
+#include "common/textconsole.h"
namespace LastExpress {
diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp
index 81189ae633..c4d43d53d7 100644
--- a/engines/lastexpress/game/inventory.cpp
+++ b/engines/lastexpress/game/inventory.cpp
@@ -43,13 +43,13 @@
namespace LastExpress {
-Inventory::Inventory(LastExpressEngine *engine) : _engine(engine), _selectedItem(kItemNone), _highlightedItem(kItemNone), _itemsShown(0),
+Inventory::Inventory(LastExpressEngine *engine) : _engine(engine), _selectedItem(kItemNone), _highlightedItemIndex(0), _itemsShown(0),
_showingHourGlass(false), _blinkingEgg(false), _blinkingTime(0), _blinkingInterval(_defaultBlinkingInterval), _blinkingBrightness(1),
- _useMagnifier(false), _flag1(false), _isOpened(false), _eggHightlighted(false), _itemScene(NULL) {
+ _useMagnifier(false), _portraitHighlighted(false), _isOpened(false), _eggHightlighted(false), _itemScene(NULL) {
- _inventoryRect = Common::Rect(0, 0, 32, 32);
- _menuRect = Common::Rect(608, 448, 640, 480);
- _selectedRect = Common::Rect(44, 0, 76, 32);
+ //_inventoryRect = Common::Rect(0, 0, 32, 32);
+ _menuEggRect = Common::Rect(608, 448, 640, 480);
+ _selectedItemRect = Common::Rect(44, 0, 76, 32);
init();
}
@@ -136,13 +136,14 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
_useMagnifier = false;
// Egg (menu)
- if (!_menuRect.contains(ev.mouse)) {
+ if (!_menuEggRect.contains(ev.mouse)) {
// Remove highlight if needed
if (_eggHightlighted) {
if (!getGlobalTimer()) {
drawItem((CursorStyle)(getMenu()->getGameId() + 39), 608, 448, 1);
askForRedraw();
}
+
_eggHightlighted = false;
}
} else {
@@ -159,7 +160,7 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
// If clicked, show the menu
if (ev.type == Common::EVENT_LBUTTONDOWN) {
_eggHightlighted = false;
- _flag1 = false;
+ _portraitHighlighted = false;
_isOpened = false;
getSound()->playSoundWithSubtitles("LIB039.SND", SoundManager::kFlagMenuClock, kEntityPlayer);
@@ -178,14 +179,125 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
// Selected item
if (ev.mouse.x >= 32) {
- // TODO
+ if (_isOpened) {
+ // If clicked
+ if (ev.type == Common::EVENT_LBUTTONDOWN) {
+ if (_highlightedItemIndex != 0) {
+ error("[Inventory::handleMouseEvent] Click on highlighted item not implemented");
+ }
+ } else {
+ warning("[Inventory::handleMouseEvent] Default handling of open menu not implemented");
+ }
+ } else {
+ if (_portraitHighlighted) {
+ drawItem((CursorStyle)getProgress().portrait, 0, 0, 1);
+ askForRedraw();
+ _portraitHighlighted = false;
+ }
+
+ if (_selectedItem != kItemNone
+ && get(_selectedItem)->scene != kSceneNone
+ && _selectedItemRect.contains(ev.mouse)) {
+ error("[Inventory::handleMouseEvent] Default handling of selected item not implemented");
+ }
+ }
return;
}
// Opened inventory
if (ev.mouse.y >= 32) {
- // TODO
+ // Draw portrait (darkened) if the inventory is closed (and we are not on top of it)
+ if (!_isOpened) {
+ if (_portraitHighlighted) {
+ drawItem((CursorStyle)getProgress().portrait, 0, 0, 1);
+ askForRedraw();
+ _portraitHighlighted = false;
+ }
+
+ return;
+ }
+
+ // Change item highlight on list
+ if (getFlags()->mouseLeftPressed) {
+ uint32 index = ev.mouse.y / 40;
+
+ if (_highlightedItemIndex && _highlightedItemIndex != index)
+ drawHighlight(_highlightedItemIndex, true);
+
+ if (index && index <= _itemsShown && index != _highlightedItemIndex)
+ drawHighlight(index, false);
+
+ return;
+ }
+
+ // User released the mouse button, check if we were on a valid item
+ uint32 index = _highlightedItemIndex ? getItemIndex(_highlightedItemIndex) : 0;
+
+ // Reset items and portrait
+ drawItem((CursorStyle)getProgress().portrait, 0, 0, 1);
+ _engine->getGraphicsManager()->clear(GraphicsManager::kBackgroundInventory, Common::Rect(0, 44, 32, (int16)(40 * _itemsShown + 40)));
+ _highlightedItemIndex = 0;
+ _itemsShown = 0;
+
+ // Load the scene if an item has been selected
+ if (index) {
+ InventoryEntry entry = _entries[index];
+
+ // If a scene is affected to the item
+ if (entry.scene) {
+ if (getState()->sceneUseBackup) {
+ if (getFirstExaminableItem() && !getState()->sceneBackup2)
+ getState()->sceneBackup2 = getState()->scene;
+ } else {
+ getState()->sceneUseBackup = true;
+ getState()->sceneBackup = getState()->scene;
+ }
+
+ getScenes()->loadScene(entry.scene);
+ }
+
+ if (entry.field_2) {
+ selectItem((InventoryItem)index);
+ } else {
+ drawSelectedItem();
+ }
+
+ // Set inventory as closed (will cause a cleanup on next call)
+ _isOpened = false;
+
+ return;
+ }
+
+ // Draw the currently selected item
+ drawSelectedItem();
+
+ // Stop processing if we are not looking at an item already
+ if (!getState()->sceneUseBackup) {
+ _isOpened = false;
+ return;
+ }
+
+ SceneIndex scene = kSceneNone;
+ if (getState()->sceneBackup2) {
+ scene = getState()->sceneBackup2;
+ getState()->sceneBackup2 = kSceneNone;
+ } else {
+ if (getEvent(kEventKronosBringFirebird) || getProgress().isEggOpen) {
+ _isOpened = false;
+ return;
+ }
+
+ getState()->sceneUseBackup = false;
+ scene = getState()->sceneBackup;
+
+ if (getEntities()->getPosition(getScenes()->get(scene)->car, getScenes()->get(scene)->position))
+ scene = getScenes()->processIndex(getState()->sceneBackup);
+ }
+
+ getScenes()->loadScene(scene);
+
+ _isOpened = false;
return;
}
@@ -202,10 +314,10 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
return;
}
- if (!_flag1 && !_isOpened) {
+ if (!_portraitHighlighted && !_isOpened) {
drawItem((CursorStyle)getProgress().portrait, 0, 0);
- _flag1 = true;
- } else if (!_isOpened || (ev.type == Common::EVENT_LBUTTONDOWN || ev.type == Common::EVENT_LBUTTONUP)) {
+ _portraitHighlighted = true;
+ } else if (!_isOpened || getFlags()->mouseLeftPressed) {
// Do nothing
} else if (_isOpened) {
close();
@@ -239,12 +351,12 @@ void Inventory::handleMouseEvent(const Common::Event &ev) {
}
}
- _flag1 = true;
+ _portraitHighlighted = true;
}
// Draw highlighted item
- if (_highlightedItem)
- drawHighlight();
+ if (_highlightedItemIndex)
+ drawHighlight(_highlightedItemIndex, true);
}
}
@@ -256,7 +368,7 @@ void Inventory::show() {
askForRedraw();
// Show portrait (first draw, cannot be highlighted)
- drawItem((CursorStyle)getProgress().portrait, 0, 0);
+ drawItem((CursorStyle)getProgress().portrait, 0, 0, 1);
// Show selected item
if (_selectedItem != kItemNone)
@@ -511,9 +623,27 @@ void Inventory::drawItem(CursorStyle id, uint16 x, uint16 y, int16 brightnessInd
_engine->getGraphicsManager()->draw(&icon, GraphicsManager::kBackgroundInventory);
}
-// Close inventory: clear items and reset icon
+void Inventory::drawSelectedItem() {
+ // Draw the selected item if any
+ if (!_selectedItem || get(_selectedItem)->manualSelect) {
+ _selectedItem = getFirstExaminableItem();
+
+ if (_selectedItem) {
+ drawItem(get(_selectedItem)->cursor, 44, 0);
+ } else {
+ clearSelectedItem();
+ }
+ askForRedraw();
+ }
+}
+
+void Inventory::clearSelectedItem() {
+ _engine->getGraphicsManager()->clear(GraphicsManager::kBackgroundInventory, Common::Rect(44, 0, 44 + 32, 32));
+}
+
+// Open inventory: show portrait selected and draw contents
void Inventory::open() {
- _flag1 = false;
+ _portraitHighlighted = false;
_isOpened = true;
// Draw highlighted portrait
@@ -552,9 +682,18 @@ void Inventory::close() {
askForRedraw();
}
-void Inventory::drawHighlight() {
- int32 count = 0;
- uint32 index = 0;
+void Inventory::drawHighlight(uint32 currentIndex, bool reset) {
+ uint32 index = getItemIndex(currentIndex);
+
+ if (index) {
+ drawItem(_entries[index].cursor, 0, 40 * currentIndex + 4, reset ? 1 : -1);
+ _highlightedItemIndex = reset ? 0 : currentIndex;
+ askForRedraw();
+ }
+}
+
+uint32 Inventory::getItemIndex(uint32 currentIndex) {
+ uint32 count = 0;
for (uint32 i = 1; i < ARRAYSIZE(_entries); i++) {
if (!_entries[i].isPresent)
@@ -565,17 +704,13 @@ void Inventory::drawHighlight() {
if (count < 11) {
++count;
- if (count == _highlightedItem) {
- index = i;
- break;
- }
+
+ if (count == currentIndex)
+ return i;
}
}
- if (index) {
- drawItem(_entries[index].cursor, 0, 40 * _highlightedItem + 4, 1);
- _highlightedItem = kItemNone;
- }
+ return 0;
}
} // End of namespace LastExpress
diff --git a/engines/lastexpress/game/inventory.h b/engines/lastexpress/game/inventory.h
index 860f8257fe..9a885438eb 100644
--- a/engines/lastexpress/game/inventory.h
+++ b/engines/lastexpress/game/inventory.h
@@ -120,7 +120,7 @@ public:
// State
bool isMagnifierInUse() { return _useMagnifier; }
- bool isFlag1() { return _flag1; }
+ bool isPortraitHighlighted() { return _portraitHighlighted; }
bool isOpened() { return _isOpened; }
bool isEggHighlighted() { return _eggHightlighted; }
@@ -142,7 +142,7 @@ private:
InventoryEntry _entries[32];
InventoryItem _selectedItem;
- InventoryItem _highlightedItem;
+ uint32 _highlightedItemIndex;
uint32 _itemsShown;
@@ -154,27 +154,31 @@ private:
// Flags
bool _useMagnifier;
- bool _flag1;
+ bool _portraitHighlighted;
bool _isOpened;
bool _eggHightlighted;
Scene *_itemScene;
// Important rects
- Common::Rect _inventoryRect;
- Common::Rect _menuRect;
- Common::Rect _selectedRect;
+ //Common::Rect _inventoryRect;
+ Common::Rect _menuEggRect;
+ Common::Rect _selectedItemRect;
void init();
void open();
void close();
void examine(InventoryItem item);
- void drawHighlight();
+ void drawHighlight(uint32 currentIndex, bool reset);
+ uint32 getItemIndex(uint32 currentIndex);
bool isItemSceneParameter(InventoryItem item) const;
void drawItem(CursorStyle id, uint16 x, uint16 y, int16 brighnessIndex = -1);
+
+ void drawSelectedItem();
+ void clearSelectedItem();
};
} // End of namespace LastExpress
diff --git a/engines/lastexpress/game/logic.cpp b/engines/lastexpress/game/logic.cpp
index bfed65eb4a..83e067f67c 100644
--- a/engines/lastexpress/game/logic.cpp
+++ b/engines/lastexpress/game/logic.cpp
@@ -89,7 +89,7 @@ Logic::~Logic() {
#define REDRAW_CURSOR() { \
if (getInventory()->isMagnifierInUse()) \
_engine->getCursor()->setStyle(kCursorMagnifier); \
- if (getInventory()->isFlag1() \
+ if (getInventory()->isPortraitHighlighted() \
|| getInventory()->isOpened() \
|| getInventory()->isEggHighlighted()) \
_engine->getCursor()->setStyle(kCursorNormal); \
@@ -104,7 +104,7 @@ void Logic::eventMouse(const Common::Event &ev) {
getFlags()->mouseRightClick = false;
// Process event flags
- if (ev.type == Common::EVENT_LBUTTONUP) {
+ if (ev.type == Common::EVENT_LBUTTONDOWN) {
if (getFlags()->frameInterval)
_ignoreFrameInterval = false;
@@ -113,7 +113,7 @@ void Logic::eventMouse(const Common::Event &ev) {
}
if (getFlags()->flag_0) {
- if (ev.type == Common::EVENT_LBUTTONUP || ev.type == Common::EVENT_RBUTTONUP) {
+ if (ev.type == Common::EVENT_LBUTTONDOWN || ev.type == Common::EVENT_RBUTTONDOWN) {
getFlags()->flag_0 = false;
getFlags()->shouldRedraw = true;
updateCursor(true);
@@ -143,7 +143,7 @@ void Logic::eventMouse(const Common::Event &ev) {
&& !getProgress().isEggOpen
&& !getEntities()->isPlayerPosition(kCarGreenSleeping, 59)
&& !getEntities()->isPlayerPosition(kCarGreenSleeping, 76)
- && !getInventory()->isFlag1()
+ && !getInventory()->isPortraitHighlighted()
&& !getInventory()->isOpened()
&& !getInventory()->isEggHighlighted()
&& !getInventory()->isMagnifierInUse()) {
@@ -173,7 +173,7 @@ void Logic::eventMouse(const Common::Event &ev) {
if (getInventory()->getSelectedItem() == kItemMatch
&& (getEntities()->isPlayerInCar(kCarGreenSleeping) || getEntities()->isPlayerInCar(kCarRedSleeping))
&& getProgress().jacket == kJacketGreen
- && !getInventory()->isFlag1()
+ && !getInventory()->isPortraitHighlighted()
&& !getInventory()->isOpened()
&& !getInventory()->isEggHighlighted()
&& !getInventory()->isMagnifierInUse()
@@ -198,7 +198,7 @@ void Logic::eventMouse(const Common::Event &ev) {
// Handle entity item case
EntityIndex entityIndex = getEntities()->canInteractWith(ev.mouse);
if (entityIndex
- && !getInventory()->isFlag1()
+ && !getInventory()->isPortraitHighlighted()
&& !getInventory()->isOpened()
&& !getInventory()->isEggHighlighted()
&& !getInventory()->isMagnifierInUse()) {
@@ -223,17 +223,17 @@ void Logic::eventMouse(const Common::Event &ev) {
//////////////////////////////////////////////////////////////////////////
// Handle standard actions
- if (getInventory()->isFlag1() || getInventory()->isOpened() || getInventory()->isEggHighlighted())
+ if (getInventory()->isPortraitHighlighted() || getInventory()->isOpened() || getInventory()->isEggHighlighted())
_engine->getCursor()->setStyle(kCursorNormal);
- if (hotspotHandled || getInventory()->isFlag1() || getInventory()->isOpened() || getInventory()->isEggHighlighted())
+ if (hotspotHandled || getInventory()->isPortraitHighlighted() || getInventory()->isOpened() || getInventory()->isEggHighlighted())
return;
// Magnifier in use
if (getInventory()->isMagnifierInUse()) {
_engine->getCursor()->setStyle(kCursorMagnifier);
- if (getInventory()->isFlag1()
+ if (getInventory()->isPortraitHighlighted()
|| getInventory()->isOpened()
|| getInventory()->isEggHighlighted())
_engine->getCursor()->setStyle(kCursorNormal);
@@ -518,7 +518,7 @@ void Logic::updateCursor(bool) const { /* the cursor is always updated, even whe
|| getProgress().isEggOpen
|| getEntities()->isPlayerPosition(kCarGreenSleeping, 59)
|| getEntities()->isPlayerPosition(kCarGreenSleeping, 76)
- || getInventory()->isFlag1()
+ || getInventory()->isPortraitHighlighted()
|| getInventory()->isOpened()
|| getInventory()->isEggHighlighted()
|| getInventory()->isMagnifierInUse()) {
@@ -526,7 +526,7 @@ void Logic::updateCursor(bool) const { /* the cursor is always updated, even whe
if (getInventory()->getSelectedItem() != kItemMatch
|| (!getEntities()->isPlayerInCar(kCarGreenSleeping) && !getEntities()->isPlayerInCar(kCarRedSleeping))
|| getProgress().jacket != kJacketGreen
- || getInventory()->isFlag1()
+ || getInventory()->isPortraitHighlighted()
|| getInventory()->isOpened()
|| getInventory()->isEggHighlighted()
|| getInventory()->isMagnifierInUse()
@@ -536,7 +536,7 @@ void Logic::updateCursor(bool) const { /* the cursor is always updated, even whe
EntityIndex entity = getEntities()->canInteractWith(getCoords());
if (entity
- && !getInventory()->isFlag1()
+ && !getInventory()->isPortraitHighlighted()
&& !getInventory()->isOpened()
&& !getInventory()->isEggHighlighted()
&& !getInventory()->isMagnifierInUse()) {
@@ -550,7 +550,7 @@ void Logic::updateCursor(bool) const { /* the cursor is always updated, even whe
}
if (!interact
- && !getInventory()->isFlag1()
+ && !getInventory()->isPortraitHighlighted()
&& !getInventory()->isOpened()
&& !getInventory()->isEggHighlighted()
&& !getInventory()->isMagnifierInUse()) {
@@ -587,7 +587,7 @@ void Logic::updateCursor(bool) const { /* the cursor is always updated, even whe
if (getInventory()->isMagnifierInUse())
style = kCursorMagnifier;
- if (getInventory()->isFlag1() || getInventory()->isOpened() || getInventory()->isEggHighlighted())
+ if (getInventory()->isPortraitHighlighted() || getInventory()->isOpened() || getInventory()->isEggHighlighted())
style = kCursorNormal;
_engine->getCursor()->setStyle(style);
diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h
index d97ebc1b55..663550acc2 100644
--- a/engines/lastexpress/game/state.h
+++ b/engines/lastexpress/game/state.h
@@ -28,8 +28,10 @@
#include "lastexpress/shared.h"
+#include "common/rect.h"
#include "common/serializer.h"
#include "common/system.h"
+#include "common/textconsole.h"
namespace LastExpress {
@@ -564,6 +566,9 @@ public:
bool mouseLeftClick;
bool mouseRightClick;
+ bool mouseLeftPressed;
+ bool mouseRightPressed;
+
bool flag_entities_0;
bool flag_entities_1;
@@ -585,6 +590,9 @@ public:
mouseRightClick = false;
mouseLeftClick = false;
+ mouseLeftPressed = false;
+ mouseRightPressed = false;
+
flag_entities_0 = false;
flag_entities_1 = false;
diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp
index e5a69d16ea..c45baba808 100644
--- a/engines/lastexpress/graphics.cpp
+++ b/engines/lastexpress/graphics.cpp
@@ -25,20 +25,23 @@
#include "lastexpress/graphics.h"
+#include "common/rect.h"
#include "common/system.h"
+#include "common/textconsole.h"
namespace LastExpress {
#define COLOR_KEY 0xFFFF
GraphicsManager::GraphicsManager() : _changed(false) {
- _screen.create(640, 480, 2);
+ const Graphics::PixelFormat format(2, 5, 5, 5, 0, 10, 5, 0, 0);
+ _screen.create(640, 480, format);
// Create the game surfaces
- _backgroundA.create(640, 480, 2);
- _backgroundC.create(640, 480, 2);
- _overlay.create(640, 480, 2);
- _inventory.create(640, 480, 2);
+ _backgroundA.create(640, 480, format);
+ _backgroundC.create(640, 480, format);
+ _overlay.create(640, 480, format);
+ _inventory.create(640, 480, format);
clear(kBackgroundAll);
}
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index 7c08fef627..535f5e86b7 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -215,6 +215,7 @@ bool LastExpressEngine::handleEvents() {
case Common::EVENT_LBUTTONUP:
case Common::EVENT_LBUTTONDOWN:
getGameLogic()->getGameState()->getGameFlags()->mouseLeftClick = true;
+ getGameLogic()->getGameState()->getGameFlags()->mouseLeftPressed = (ev.type == Common::EVENT_LBUTTONDOWN) ? true : false;
// Adjust frameInterval flag
if (_frameCounter < _lastFrameCount + 30)
@@ -228,6 +229,8 @@ bool LastExpressEngine::handleEvents() {
case Common::EVENT_RBUTTONUP:
case Common::EVENT_RBUTTONDOWN:
getGameLogic()->getGameState()->getGameFlags()->mouseRightClick = true;
+ getGameLogic()->getGameState()->getGameFlags()->mouseRightPressed = (ev.type == Common::EVENT_RBUTTONDOWN) ? true : false;
+
if (_eventMouse && _eventMouse->isValid())
(*_eventMouse)(ev);
break;
diff --git a/engines/lastexpress/resource.cpp b/engines/lastexpress/resource.cpp
index 5a77b23602..dff686a503 100644
--- a/engines/lastexpress/resource.cpp
+++ b/engines/lastexpress/resource.cpp
@@ -34,6 +34,7 @@
#include "common/debug.h"
#include "common/file.h"
+#include "common/textconsole.h"
namespace LastExpress {
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index 9b1bb743e4..fc2029c6c4 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -312,7 +312,7 @@ bool Debugger::cmd_hotspot(int argc, const char **argv) {
hs->width, hs->height, hs->widthCopy, hs->heightCopy, hs->yCorrection);
DebugPrintf("Talk bubble offset = %d,%d\n", hs->talkX, hs->talkY);
DebugPrintf("load offset = %xh, script load = %d\n", hs->loadOffset, hs->scriptLoadFlag);
- DebugPrintf("Animation Id = %xh, Colour offset = %d\n", hs->animRecordId, hs->colourOffset);
+ DebugPrintf("Animation Id = %xh, Color offset = %d\n", hs->animRecordId, hs->colorOffset);
DebugPrintf("Talk Script offset = %xh, Tick Script offset = %xh\n",
hs->talkScriptOffset, hs->tickScriptOffset);
DebugPrintf("Tick Proc offset = %xh\n", hs->tickProcId);
@@ -543,7 +543,7 @@ bool Debugger::cmd_showAnim(int argc, const char **argv) {
hotspot->setSize(width, height);
Hotspot *player = res.activateHotspot(PLAYER_ID);
- hotspot->setColourOffset(player->resource()->colourOffset);
+ hotspot->setColorOffset(player->resource()->colorOffset);
hotspot->setAnimation(animId);
diff --git a/engines/lure/decode.cpp b/engines/lure/decode.cpp
index ae91cc1c52..5ffdcf1884 100644
--- a/engines/lure/decode.cpp
+++ b/engines/lure/decode.cpp
@@ -111,7 +111,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
dataPos += sizeof(uint16);
int bitCtr = 8;
- // Decode the colour popularity table
+ // Decode the color popularity table
for (int nibbleCtr = 0; nibbleCtr < 32; ++nibbleCtr) {
for (int byteCtr = 0; byteCtr < 128; byteCtr += 32) {
@@ -134,7 +134,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
READ_BIT_DX
if (!bitFlag) {
- // Get the favourite colour
+ // Get the favourite color
v = popTable[tableOffset];
} else {
@@ -182,7 +182,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
continue;
} else {
- // It's a new colour
+ // It's a new color
v = al;
}
diff --git a/engines/lure/disk.h b/engines/lure/disk.h
index d2848cc587..79aaf80bbc 100644
--- a/engines/lure/disk.h
+++ b/engines/lure/disk.h
@@ -33,7 +33,7 @@
#include "lure/res_struct.h"
namespace Common {
- class File;
+class File;
}
namespace Lure {
diff --git a/engines/lure/fights.cpp b/engines/lure/fights.cpp
index 789c9d924e..983033281a 100644
--- a/engines/lure/fights.cpp
+++ b/engines/lure/fights.cpp
@@ -74,7 +74,7 @@ void FightsManager::setupPigFight() {
Resources &res = Resources::getReference();
Hotspot *player = res.getActiveHotspot(PLAYER_ID);
player->setSkipFlag(false);
- player->resource()->colourOffset = 16;
+ player->resource()->colorOffset = 16;
player->setTickProc(PLAYER_FIGHT_TICK_PROC_ID);
player->setSize(48, 53);
player->setAnimationIndex(PLAYER_FIGHT_ANIM_INDEX);
@@ -103,7 +103,7 @@ void FightsManager::setupSkorlFight() {
rec.fwtrue_x = 282;
rec.fwtrue_y = 136;
player->setPosition(282, 136);
- player->resource()->colourOffset = 96;
+ player->resource()->colorOffset = 96;
}
bool FightsManager::isFighting() {
@@ -598,7 +598,7 @@ void FightsManager::enemyKilled() {
playerHotspot->setTickProc(PLAYER_TICK_PROC_ID);
playerRec.fwhits = GENERAL_MAGIC_ID;
- playerHotspot->resource()->colourOffset = 128;
+ playerHotspot->resource()->colorOffset = 128;
playerHotspot->setSize(32, 48);
playerHotspot->resource()->width = 32;
playerHotspot->resource()->height = 48;
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index bce98b28fd..5644ef798c 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -73,7 +73,7 @@ Hotspot::Hotspot(HotspotData *res): _pathFinder(this) {
_hotspotScriptOffset = res->hotspotScriptOffset;
_frameCtr = res->tickTimeout;
_tempDest.counter = 0;
- _colourOffset = isEGA ? 0 : res->colourOffset;
+ _colorOffset = isEGA ? 0 : res->colorOffset;
_override = resources.getHotspotOverride(res->hotspotId);
setAnimation(_data->animRecordId);
@@ -103,7 +103,7 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) {
_persistant = false;
_hotspotId = 0xffff;
_override = NULL;
- _colourOffset = 0;
+ _colorOffset = 0;
_destHotspotId = character->hotspotId();
_blockedOffset = 0;
_exitCtr = 0;
@@ -174,7 +174,7 @@ Hotspot::Hotspot(): _pathFinder(NULL) {
_persistant = false;
_hotspotId = 0xffff;
_override = NULL;
- _colourOffset = 0;
+ _colorOffset = 0;
_destHotspotId = 0;
_blockedOffset = 0;
_exitCtr = 0;
@@ -303,7 +303,7 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) {
_frames = new Surface(_width * _numFrames, _height);
_frameStartsUsed = false;
}
- _frames->data().setBytes(_colourOffset, 0, _frames->data().size());
+ _frames->data().setBytes(_colorOffset, 0, _frames->data().size());
byte *pSrc = dest->data() + 0x40;
byte *pDest;
@@ -353,13 +353,13 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) {
xStart = frameNumCtr * _width;
}
- // Copy over the frame, applying the colour offset to each nibble
+ // Copy over the frame, applying the color offset to each nibble
for (uint16 yPos = 0; yPos < tempHeight; ++yPos) {
pDest = mDest.data() + yPos * _frames->width() + xStart;
for (uint16 xPos = 0; xPos < tempWidth / 2; ++xPos) {
- *pDest++ = _colourOffset + (*pSrc >> 4);
- *pDest++ = _colourOffset + (*pSrc & 0xf);
+ *pDest++ = _colorOffset + (*pSrc >> 4);
+ *pDest++ = _colorOffset + (*pSrc & 0xf);
++pSrc;
}
}
@@ -421,7 +421,7 @@ void Hotspot::copyTo(Surface *dest) {
if ((r.top >= r.bottom) || (r.left >= r.right))
return;
- _frames->copyTo(dest, r, (uint16) xPos, (uint16) yPos, _colourOffset);
+ _frames->copyTo(dest, r, (uint16) xPos, (uint16) yPos, _colorOffset);
}
void Hotspot::incFrameNumber() {
@@ -2313,7 +2313,7 @@ void Hotspot::saveToStream(Common::WriteStream *stream) {
stream->writeUint16LE(_talkY);
stream->writeByte(_layer);
stream->writeUint16LE(_hotspotScriptOffset);
- stream->writeByte(_colourOffset);
+ stream->writeByte(_colorOffset);
stream->writeByte((byte)_direction);
stream->writeUint16LE(_animId);
stream->writeUint16LE(_frameNumber);
@@ -2358,7 +2358,7 @@ void Hotspot::loadFromStream(Common::ReadStream *stream) {
_talkY = stream->readUint16LE();
_layer = stream->readByte();
_hotspotScriptOffset = stream->readUint16LE();
- _colourOffset = stream->readByte();
+ _colorOffset = stream->readByte();
_direction = (Direction)stream->readByte();
setAnimation(stream->readUint16LE());
setFrameNumber(stream->readUint16LE());
@@ -3505,10 +3505,10 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
screen.screen().fillRect(r, 0);
// Display line
- byte colour = LureEngine::getReference().isEGA() ?
- ((lineNum + 1 == selectedLine) ? EGA_DIALOG_WHITE_COLOUR : EGA_DIALOG_TEXT_COLOUR) :
- ((lineNum + 1 == selectedLine) ? VGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_TEXT_COLOUR);
- screen.screen().writeString(r.left, r.top, buffer, false, colour);
+ byte color = LureEngine::getReference().isEGA() ?
+ ((lineNum + 1 == selectedLine) ? EGA_DIALOG_WHITE_COLOR : EGA_DIALOG_TEXT_COLOR) :
+ ((lineNum + 1 == selectedLine) ? VGA_DIALOG_WHITE_COLOR : VGA_DIALOG_TEXT_COLOR);
+ screen.screen().writeString(r.left, r.top, buffer, false, color);
}
if (mouse.mButton() || mouse.rButton()) {
diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h
index 2ae2e91ecf..e9f5d56edd 100644
--- a/engines/lure/hotspots.h
+++ b/engines/lure/hotspots.h
@@ -203,7 +203,7 @@ private:
Direction _direction;
uint8 _layer;
uint16 _hotspotScriptOffset;
- uint8 _colourOffset;
+ uint8 _colorOffset;
bool _persistant;
HotspotOverrideData *_override;
bool _skipFlag;
@@ -324,8 +324,8 @@ public:
void setTickProc(uint16 newVal);
bool persistant() { return _persistant; }
void setPersistant(bool value) { _persistant = value; }
- uint8 colourOffset() { return _colourOffset; }
- void setColourOffset(uint8 value) { _colourOffset = value; }
+ uint8 colorOffset() { return _colorOffset; }
+ void setColorOffset(uint8 value) { _colorOffset = value; }
void setRoomNumber(uint16 roomNum) {
_roomNumber = roomNum;
if (_data) _data->roomNumber = roomNum;
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index 99e9e3d93e..52b785a09a 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -98,7 +98,7 @@ public:
virtual Common::Error run() {
Common::Error err;
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h
index b13c4a0724..0ef7a73b7e 100644
--- a/engines/lure/luredefs.h
+++ b/engines/lure/luredefs.h
@@ -111,7 +111,7 @@ enum Action {
// Basic game dimensions
#define FULL_SCREEN_WIDTH 320
#define FULL_SCREEN_HEIGHT 200
-#define GAME_COLOURS 256
+#define GAME_COLORS 256
#define SCREEN_SIZE (FULL_SCREEN_HEIGHT * FULL_SCREEN_WIDTH)
// Some resources include multiple packed palettes of 64 entries each
@@ -120,7 +120,7 @@ enum Action {
#define RES_PALETTE_ENTRIES 220
// Main working palette size
#define MAIN_PALETTE_SIZE 228
-// Palette colour increment amouns for palette fade in/outs
+// Palette color increment amouns for palette fade in/outs
#define PALETTE_FADE_INC_SIZE 4
// EGA constants
@@ -189,11 +189,11 @@ enum CursorType {CURSOR_ARROW = 0, CURSOR_DISK = 1, CURSOR_TIME_START = 2,
#define POPMENU_CHANGE_SENSITIVITY 5
// Dialog related defines
-#define EGA_DIALOG_TEXT_COLOUR 6
-#define EGA_DIALOG_WHITE_COLOUR 2
-#define VGA_DIALOG_TEXT_COLOUR 0xe2
-#define VGA_DIALOG_WHITE_COLOUR 0xe3
-#define EGA_DIALOG_BG_COLOUR 13
+#define EGA_DIALOG_TEXT_COLOR 6
+#define EGA_DIALOG_WHITE_COLOR 2
+#define VGA_DIALOG_TEXT_COLOR 0xe2
+#define VGA_DIALOG_WHITE_COLOR 0xe3
+#define EGA_DIALOG_BG_COLOR 13
#define INFO_DIALOG_X 69
#define INFO_DIALOG_Y 61
#define INFO_DIALOG_WIDTH 191
diff --git a/engines/lure/memory.cpp b/engines/lure/memory.cpp
index f96b5015bc..d3d5067cce 100644
--- a/engines/lure/memory.cpp
+++ b/engines/lure/memory.cpp
@@ -25,6 +25,7 @@
#include "lure/memory.h"
#include "common/file.h"
+#include "common/textconsole.h"
namespace Lure {
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 7d0816ee79..f9a78d8fc8 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -34,7 +34,7 @@
#include "lure/events.h"
#include "lure/lure.h"
-#if defined(_WIN32_WCE) || defined(__SYMBIAN32__)
+#if defined(_WIN32_WCE) || defined(__SYMBIAN32__) || defined(WEBOS)
#define LURE_CLICKABLE_MENUS
#endif
@@ -153,7 +153,7 @@ uint8 Menu::execute() {
toggleHighlight(_selectedMenu);
_surfaceMenu = Surface::newDialog(
_selectedMenu->width(), _selectedMenu->numEntries(),
- _selectedMenu->entries(), false, DEFAULT_TEXT_COLOUR, false);
+ _selectedMenu->entries(), false, DEFAULT_TEXT_COLOR, false);
_surfaceMenu->copyToScreen(_selectedMenu->xstart(), MENUBAR_Y_SIZE);
}
@@ -230,26 +230,26 @@ uint8 Menu::getIndexAt(uint16 x, uint16 y) {
return index;
}
-#define MENUBAR_SELECTED_COLOUR 0xf7
+#define MENUBAR_SELECTED_COLOR 0xf7
void Menu::toggleHighlight(MenuRecord *menuRec) {
- const byte colourList[4] = {4, 2, 0, 0xf7};
- const byte *colours = LureEngine::getReference().isEGA() ? &colourList[0] : &colourList[2];
+ const byte colorList[4] = {4, 2, 0, 0xf7};
+ const byte *colors = LureEngine::getReference().isEGA() ? &colorList[0] : &colorList[2];
byte *addr = _menu->data();
for (uint16 y=0; y<MENUBAR_Y_SIZE; ++y) {
for (uint16 x=menuRec->hsxstart(); x<=menuRec->hsxend(); ++x) {
- if (addr[x] == colours[0]) addr[x] = colours[1];
- else if (addr[x] == colours[1]) addr[x] = colours[0];
+ if (addr[x] == colors[0]) addr[x] = colors[1];
+ else if (addr[x] == colors[1]) addr[x] = colors[0];
}
addr += FULL_SCREEN_WIDTH;
}
}
void Menu::toggleHighlightItem(uint8 index) {
- const byte colourList[4] = {EGA_DIALOG_TEXT_COLOUR, EGA_DIALOG_WHITE_COLOUR,
- VGA_DIALOG_TEXT_COLOUR, VGA_DIALOG_WHITE_COLOUR};
- const byte *colours = LureEngine::getReference().isEGA() ? &colourList[0] : &colourList[2];
+ const byte colorList[4] = {EGA_DIALOG_TEXT_COLOR, EGA_DIALOG_WHITE_COLOR,
+ VGA_DIALOG_TEXT_COLOR, VGA_DIALOG_WHITE_COLOR};
+ const byte *colors = LureEngine::getReference().isEGA() ? &colorList[0] : &colorList[2];
byte *p = _surfaceMenu->data().data() + (Surface::textY() +
((index - 1) * FONT_HEIGHT)) * _surfaceMenu->width() + Surface::textX();
int numBytes =_surfaceMenu->width() - Surface::textX() * 2;
@@ -258,8 +258,8 @@ void Menu::toggleHighlightItem(uint8 index) {
byte *pTemp = p;
for (int x = 0; x < numBytes; ++x, ++pTemp) {
- if (*pTemp == colours[0]) *pTemp = colours[1];
- else if (*pTemp == colours[1]) *pTemp = colours[0];
+ if (*pTemp == colors[0]) *pTemp = colors[1];
+ else if (*pTemp == colors[1]) *pTemp = colors[0];
}
}
@@ -475,9 +475,9 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) {
Screen &screen = Screen::getReference();
Common::Rect r;
bool isEGA = LureEngine::getReference().isEGA();
- byte bgColour = isEGA ? EGA_DIALOG_BG_COLOUR : 0;
- byte textColour = isEGA ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR;
- byte whiteColour = isEGA ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR;
+ byte bgColor = isEGA ? EGA_DIALOG_BG_COLOR : 0;
+ byte textColor = isEGA ? EGA_DIALOG_TEXT_COLOR : VGA_DIALOG_TEXT_COLOR;
+ byte whiteColor = isEGA ? EGA_DIALOG_WHITE_COLOR : VGA_DIALOG_WHITE_COLOR;
const uint16 yMiddle = FULL_SCREEN_HEIGHT / 2;
@@ -521,7 +521,7 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) {
for (;;) {
if (refreshFlag) {
// Set up the contents of the menu
- s->fillRect(r, bgColour);
+ s->fillRect(r, bgColor);
for (int index = 0; index < numLines; ++index) {
#ifndef LURE_CLICKABLE_MENUS
@@ -533,9 +533,9 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) {
s->writeString(Surface::textX(), Surface::textY() + index * FONT_HEIGHT,
actions[actionIndex], true,
#ifndef LURE_CLICKABLE_MENUS
- (index == (numLines / 2)) ? whiteColour : textColour,
+ (index == (numLines / 2)) ? whiteColor : textColor,
#else
- (index == selectedIndex) ? whiteColour : textColour,
+ (index == selectedIndex) ? whiteColor : textColor,
#endif
false);
}
diff --git a/engines/lure/palette.cpp b/engines/lure/palette.cpp
index d77f64f00a..b08ca64dfb 100644
--- a/engines/lure/palette.cpp
+++ b/engines/lure/palette.cpp
@@ -33,7 +33,7 @@ namespace Lure {
// Defaults the palette to a full 256 entry palette
Palette::Palette() {
- _numEntries = GAME_COLOURS;
+ _numEntries = GAME_COLORS;
_palette = Memory::allocate(_numEntries * 4);
_palette->empty();
}
@@ -91,7 +91,7 @@ Palette::Palette(uint16 resourceId, PaletteSource paletteSource) {
break;
case RGB64:
- if (((srcData->size() % 3) != 0) || ((srcData->size() / 3) > GAME_COLOURS))
+ if (((srcData->size() % 3) != 0) || ((srcData->size() / 3) > GAME_COLORS))
error("Specified resource %d is not a palette", resourceId);
_numEntries = srcData->size() / 3;
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 90c2b67b85..01b0bd0d4a 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -432,7 +432,7 @@ byte *Resources::getCursor(uint8 cursorNum) {
}
}
- // Post-process the cells to adjust the colour
+ // Post-process the cells to adjust the color
for (int index = 0; index < CURSOR_SIZE; ++index) {
if (_cursor[index] == 3) _cursor[index] = 15;
}
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp
index f6a2092ddc..39beb2729e 100644
--- a/engines/lure/res_struct.cpp
+++ b/engines/lure/res_struct.cpp
@@ -406,7 +406,7 @@ HotspotData::HotspotData(HotspotResource *rec) {
walkY = READ_LE_UINT16(&rec->walkY);
talkX = rec->talkX;
talkY = rec->talkY;
- colourOffset = READ_LE_UINT16(&rec->colourOffset);
+ colorOffset = READ_LE_UINT16(&rec->colorOffset);
animRecordId = READ_LE_UINT16(&rec->animRecordId);
hotspotScriptOffset = READ_LE_UINT16(&rec->hotspotScriptOffset);
talkScriptOffset = READ_LE_UINT16(&rec->talkScriptOffset);
diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h
index e4b8c02f6a..58ee3f4c02 100644
--- a/engines/lure/res_struct.h
+++ b/engines/lure/res_struct.h
@@ -27,9 +27,11 @@
#define LURE_RESSTRUCT_H
#include "lure/luredefs.h"
+#include "common/rect.h"
#include "common/list.h"
#include "common/file.h"
#include "common/ptr.h"
+#include "common/textconsole.h"
namespace Lure {
@@ -88,7 +90,7 @@ struct HotspotResource {
uint16 walkY;
int8 talkX;
int8 talkY;
- uint16 colourOffset;
+ uint16 colorOffset;
uint16 animRecordId;
uint16 hotspotScriptOffset;
uint16 talkScriptOffset;
@@ -538,7 +540,7 @@ public:
uint16 walkY;
int8 talkX;
int8 talkY;
- uint16 colourOffset;
+ uint16 colorOffset;
uint16 animRecordId;
uint16 hotspotScriptOffset;
uint16 talkScriptOffset;
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index 746d6ef094..4cefe1fabb 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -432,7 +432,7 @@ void Room::update() {
Surface &s = _screen.screen();
Resources &res = Resources::getReference();
HotspotList &hotspots = res.activeHotspots();
- byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR;
+ byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOR : VGA_DIALOG_WHITE_COLOR;
HotspotList::iterator i;
// Copy the background to the temporary screen surface
@@ -564,9 +564,9 @@ void Room::setRoomNumber(uint16 newRoomNumber, bool showOverlay) {
if (isEGA)
_screen.setPaletteEmpty();
else
- // Fade out all the colours except the high index 0FFh, which is used to show the
+ // Fade out all the colors except the high index 0FFh, which is used to show the
// disk cursor as a room changes
- _screen.paletteFadeOut(GAME_COLOURS - 1);
+ _screen.paletteFadeOut(GAME_COLORS - 1);
// Deallocate graphical layers from the room
for (int layerNum = 0; layerNum < _numLayers; ++layerNum) {
diff --git a/engines/lure/screen.cpp b/engines/lure/screen.cpp
index 282e382bba..e02f492ef2 100644
--- a/engines/lure/screen.cpp
+++ b/engines/lure/screen.cpp
@@ -30,6 +30,8 @@
#include "lure/decode.h"
#include "lure/events.h"
+#include "graphics/palette.h"
+
namespace Lure {
static Screen *int_disk = NULL;
@@ -44,7 +46,7 @@ Screen::Screen(OSystem &system): _system(system),
_palette(new Palette(GAME_PALETTE_RESOURCE_ID, RGB64)) {
int_disk = this;
_screen->empty();
- _system.getPaletteManager()->setPalette(_palette->data(), 0, GAME_COLOURS);
+ _system.getPaletteManager()->setPalette(_palette->data(), 0, GAME_COLORS);
}
Screen::~Screen() {
@@ -87,7 +89,7 @@ void Screen::setPaletteEmpty(int numEntries) {
void Screen::setPalette(Palette *p) {
_palette->copyFrom(p);
- setSystemPalette(_palette, 0, GAME_COLOURS);
+ setSystemPalette(_palette, 0, GAME_COLORS);
_system.updateScreen();
}
@@ -138,7 +140,7 @@ void Screen::paletteFadeIn(Palette *p) {
}
// paletteFadeOut
-// Fades the screen to black by gradually decreasing the palette colours
+// Fades the screen to black by gradually decreasing the palette colors
void Screen::paletteFadeOut(int numEntries) {
assert((uint32)numEntries <= _palette->palette()->size());
diff --git a/engines/lure/sound.h b/engines/lure/sound.h
index dd5538085c..7a894d814d 100644
--- a/engines/lure/sound.h
+++ b/engines/lure/sound.h
@@ -30,6 +30,7 @@
#include "lure/disk.h"
#include "lure/memory.h"
+#include "common/mutex.h"
#include "common/singleton.h"
#include "common/ptr.h"
#include "audio/mididrv.h"
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index c4ee0f7dad..783401fde2 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -123,21 +123,21 @@ void Surface::getDialogBounds(Common::Point &size, int charWidth, int numLines,
// Forms a dialog encompassing the entire surface
void Surface::egaCreateDialog(bool blackFlag) {
- byte lineColours1[3] = {6, 0, 9};
- byte lineColours2[3] = {7, 0, 12};
+ byte lineColors1[3] = {6, 0, 9};
+ byte lineColors2[3] = {7, 0, 12};
// Surface contents
- data().setBytes(blackFlag ? 0 : EGA_DIALOG_BG_COLOUR, 0, data().size());
+ data().setBytes(blackFlag ? 0 : EGA_DIALOG_BG_COLOR, 0, data().size());
// Top/bottom lines
for (int y = 2; y >= 0; --y) {
- data().setBytes(lineColours1[y], y * width(), width());
- data().setBytes(lineColours2[y], (height() - y - 1) * width(), width());
+ data().setBytes(lineColors1[y], y * width(), width());
+ data().setBytes(lineColors2[y], (height() - y - 1) * width(), width());
for (int p = y + 1; p < height() - y; ++p) {
byte *line = data().data() + p * width();
- *(line + y) = lineColours2[y];
- *(line + width() - y - 1) = lineColours1[y];
+ *(line + y) = lineColors2[y];
+ *(line + width() - y - 1) = lineColors1[y];
}
}
}
@@ -220,10 +220,10 @@ void Surface::loadScreen(MemoryBlock *rawData) {
delete tmpScreen;
}
-int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int colour) {
+int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int color) {
byte *const addr = _data->data() + (y * _width) + x;
- if (colour == DEFAULT_TEXT_COLOUR)
- colour = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR;
+ if (color == DEFAULT_TEXT_COLOR)
+ color = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOR : VGA_DIALOG_TEXT_COLOR;
if ((ascii < 32) || (ascii >= 32 + numFontChars))
error("Invalid ascii character passed for display '%d'", ascii);
@@ -239,7 +239,7 @@ int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int co
for (int x1 = 0; x1 < 8; ++x1, ++pDest) {
if (v & 0x80) {
- *pDest = colour;
+ *pDest = color;
if (x1+1 > charWidth) charWidth = x1 + 1;
}
else if (!transparent) *pDest = 0;
@@ -251,16 +251,16 @@ int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int co
}
void Surface::writeString(uint16 x, uint16 y, Common::String line, bool transparent,
- int colour, bool varLength) {
- writeSubstring(x, y, line, line.size(), transparent, colour, varLength);
+ int color, bool varLength) {
+ writeSubstring(x, y, line, line.size(), transparent, color, varLength);
}
void Surface::writeSubstring(uint16 x, uint16 y, Common::String line, int len,
- bool transparent, int colour, bool varLength) {
+ bool transparent, int color, bool varLength) {
const char *sPtr = line.c_str();
- if (colour == DEFAULT_TEXT_COLOUR)
- colour = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR;
+ if (color == DEFAULT_TEXT_COLOR)
+ color = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOR : VGA_DIALOG_TEXT_COLOR;
for (int index = 0; (index < len) && (*sPtr != '\0'); ++index, ++sPtr) {
int charSize = varLength ? fontSize[(uint8)*sPtr - 32] + 2 : FONT_WIDTH;
@@ -269,7 +269,7 @@ void Surface::writeSubstring(uint16 x, uint16 y, Common::String line, int len,
break;
// Write next character
- writeChar(x, y, (uint8) *sPtr, transparent, colour);
+ writeChar(x, y, (uint8) *sPtr, transparent, color);
// Move to after the character in preparation for the next character
x += charSize;
@@ -312,7 +312,7 @@ void Surface::copyTo(Surface *dest, uint16 x, uint16 y) {
}
void Surface::copyTo(Surface *dest, const Common::Rect &srcBounds,
- uint16 destX, uint16 destY, int transparentColour) {
+ uint16 destX, uint16 destY, int transparentColor) {
int numBytes = srcBounds.right - srcBounds.left + 1;
if (destX + numBytes > dest->width())
numBytes = dest->width() - destX;
@@ -322,8 +322,8 @@ void Surface::copyTo(Surface *dest, const Common::Rect &srcBounds,
const uint32 srcPos = (srcBounds.top + y) * _width + srcBounds.left;
const uint32 destPos = (destY+y) * dest->width() + destX;
- if (transparentColour == -1) {
- // No trnnsparent colour, so copy all the bytes of the line
+ if (transparentColor == -1) {
+ // No trnnsparent color, so copy all the bytes of the line
dest->data().copyFrom(_data, srcPos, destPos, numBytes);
} else {
byte *pSrc = _data->data() + srcPos;
@@ -331,7 +331,7 @@ void Surface::copyTo(Surface *dest, const Common::Rect &srcBounds,
int bytesCtr = numBytes;
while (bytesCtr-- > 0) {
- if (*pSrc != (uint8) transparentColour)
+ if (*pSrc != (uint8) transparentColor)
*pDest = *pSrc;
++pSrc;
++pDest;
@@ -347,12 +347,12 @@ void Surface::copyFrom(MemoryBlock *src, uint32 destOffset) {
}
// fillRect
-// Fills a rectangular area with a colour
+// Fills a rectangular area with a color
-void Surface::fillRect(const Common::Rect &r, uint8 colour) {
+void Surface::fillRect(const Common::Rect &r, uint8 color) {
for (int yp = r.top; yp <= r.bottom; ++yp) {
byte *const addr = _data->data() + (yp * _width) + r.left;
- memset(addr, colour, r.width());
+ memset(addr, color, r.width());
}
}
@@ -464,7 +464,7 @@ void Surface::wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines)
}
Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength,
- int colour, bool squashedLines) {
+ int color, bool squashedLines) {
Common::Point size;
Surface::getDialogBounds(size, 0, numLines, squashedLines);
@@ -473,21 +473,21 @@ Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bo
uint16 yP = Surface::textY();
for (uint8 ctr = 0; ctr < numLines; ++ctr) {
- s->writeString(Surface::textX(), yP, lines[ctr], true, colour, varLength);
+ s->writeString(Surface::textX(), yP, lines[ctr], true, color, varLength);
yP += squashedLines ? FONT_HEIGHT - 1 : FONT_HEIGHT;
}
return s;
}
-Surface *Surface::newDialog(uint16 width, const char *line, int colour) {
+Surface *Surface::newDialog(uint16 width, const char *line, int color) {
char **lines;
char *lineCopy = strdup(line);
uint8 numLines;
wordWrap(lineCopy, width - (Surface::textX() * 2), lines, numLines);
// Create the dialog
- Surface *result = newDialog(width, numLines, const_cast<const char **>(lines), true, colour);
+ Surface *result = newDialog(width, numLines, const_cast<const char **>(lines), true, color);
// Deallocate used resources
free(lines);
@@ -510,7 +510,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
Mouse &mouse = Mouse::getReference();
Events &events = Events::getReference();
Screen &screen = Screen::getReference();
- uint8 bgColour = *(screen.screen().data().data() + (y * FULL_SCREEN_WIDTH) + x);
+ uint8 bgColor = *(screen.screen().data().data() + (y * FULL_SCREEN_WIDTH) + x);
Common::String newLine(line);
bool abortFlag = false;
bool refreshFlag = false;
@@ -527,7 +527,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
while (!abortFlag) {
// Display the string
- screen.screen().writeString(x, y, newLine, true, DEFAULT_TEXT_COLOUR, varLength);
+ screen.screen().writeString(x, y, newLine, true, DEFAULT_TEXT_COLOR, varLength);
screen.update();
int stringSize = textWidth(newLine.c_str());
@@ -545,7 +545,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
if ((keycode == Common::KEYCODE_RETURN) || (keycode == Common::KEYCODE_KP_ENTER)) {
// Return character
screen.screen().fillRect(
- Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
+ Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor);
screen.update();
newLine.deleteLastChar();
line = newLine;
@@ -556,7 +556,7 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
else if (keycode == Common::KEYCODE_ESCAPE) {
// Escape character
screen.screen().fillRect(
- Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
+ Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor);
screen.update();
abortFlag = true;
} else if (keycode == Common::KEYCODE_BACKSPACE) {
@@ -564,14 +564,14 @@ bool Surface::getString(Common::String &line, int maxSize, bool isNumeric, bool
if (newLine.size() == 1) continue;
screen.screen().fillRect(
- Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
+ Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor);
newLine.deleteChar(newLine.size() - 2);
refreshFlag = true;
} else if ((ch >= ' ') && (stringSize + 8 < maxSize)) {
if (((ch >= '0') && (ch <= '9')) || !isNumeric) {
screen.screen().fillRect(
- Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColour);
+ Common::Rect(x, y, x + maxSize - 1, y + FONT_HEIGHT), bgColor);
newLine.insertChar(ch, newLine.size() - 1);
refreshFlag = true;
}
@@ -818,7 +818,7 @@ TalkDialog::TalkDialog(uint16 characterId, uint16 destCharacterId, uint16 active
// Write out the character name
uint16 charWidth = Surface::textWidth(srcCharName);
- byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOUR : VGA_DIALOG_WHITE_COLOUR;
+ byte white = LureEngine::getReference().isEGA() ? EGA_DIALOG_WHITE_COLOR : VGA_DIALOG_WHITE_COLOR;
_surface->writeString((TALK_DIALOG_WIDTH - charWidth) / 2, TALK_DIALOG_EDGE_SIZE + 2,
srcCharName, true, white);
debugC(ERROR_DETAILED, kLureDebugAnimations, "TalkDialog end");
@@ -903,14 +903,14 @@ TalkDialog *TalkDialog::loadFromStream(Common::ReadStream *stream) {
void SaveRestoreDialog::toggleHightlight(int xs, int xe, int ys, int ye) {
Screen &screen = Screen::getReference();
byte *addr = screen.screen().data().data() + FULL_SCREEN_WIDTH * ys + xs;
- const byte colourList[4] = {EGA_DIALOG_TEXT_COLOUR, EGA_DIALOG_WHITE_COLOUR,
- VGA_DIALOG_TEXT_COLOUR, VGA_DIALOG_WHITE_COLOUR};
- const byte *colours = LureEngine::getReference().isEGA() ? &colourList[0] : &colourList[2];
+ const byte colorList[4] = {EGA_DIALOG_TEXT_COLOR, EGA_DIALOG_WHITE_COLOR,
+ VGA_DIALOG_TEXT_COLOR, VGA_DIALOG_WHITE_COLOR};
+ const byte *colors = LureEngine::getReference().isEGA() ? &colorList[0] : &colorList[2];
for (int y = 0; y < ye - ys + 1; ++y, addr += FULL_SCREEN_WIDTH) {
for (int x = 0; x < xe - xs + 1; ++x) {
- if (addr[x] == colours[0]) addr[x] = colours[1];
- else if (addr[x] == colours[1]) addr[x] = colours[0];
+ if (addr[x] == colors[0]) addr[x] = colors[1];
+ else if (addr[x] == colors[1]) addr[x] = colors[0];
}
}
@@ -951,9 +951,9 @@ bool SaveRestoreDialog::show(bool saveDialog) {
// Create the outer dialog and dividing line
s->createDialog();
byte *pDest = s->data().data() + (s->width() * SR_SEPARATOR_Y) + SR_SEPARATOR_X;
- uint8 rowColours[5] = {*(pDest-2), *(pDest-1), *(pDest-1), *(pDest-2), *(pDest+1)};
+ uint8 rowColors[5] = {*(pDest-2), *(pDest-1), *(pDest-1), *(pDest-2), *(pDest+1)};
for (int y = 0; y < SR_SEPARATOR_HEIGHT; ++y, pDest += s->width())
- memset(pDest, rowColours[y], s->width() - 12);
+ memset(pDest, rowColors[y], s->width() - 12);
// Create title line
Common::String title(res.stringList().getString(
@@ -1248,7 +1248,7 @@ struct ItemDesc {
int16 x, y;
uint16 width, height;
uint16 animId;
- uint8 startColour;
+ uint8 startColor;
};
#define PROT_SPR_HEADER 0x1830
@@ -1286,7 +1286,7 @@ CopyProtectionDialog::CopyProtectionDialog() {
Hotspot *h = new Hotspot();
h->setPosition(ptr->x, ptr->y);
h->setSize(ptr->width, ptr->height);
- h->setColourOffset(ptr->startColour);
+ h->setColorOffset(ptr->startColor);
h->setAnimation(ptr->animId);
_hotspots.push_back(HotspotsList::value_type(h));
diff --git a/engines/lure/surface.h b/engines/lure/surface.h
index 8fd8ae49a6..9a677cf749 100644
--- a/engines/lure/surface.h
+++ b/engines/lure/surface.h
@@ -34,7 +34,7 @@
namespace Lure {
-#define DEFAULT_TEXT_COLOUR -1
+#define DEFAULT_TEXT_COLOR -1
class Surface {
private:
@@ -61,20 +61,20 @@ public:
void loadScreen(uint16 resourceId);
void loadScreen(MemoryBlock *data);
- int writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int colour);
+ int writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int color);
void writeString(uint16 x, uint16 y, Common::String line, bool transparent,
- int colour = DEFAULT_TEXT_COLOUR, bool varLength = true);
+ int color = DEFAULT_TEXT_COLOR, bool varLength = true);
void writeSubstring(uint16 x, uint16 y, Common::String line, int len,
- bool transparent, int colour = DEFAULT_TEXT_COLOUR, bool varLength = true);
+ bool transparent, int color = DEFAULT_TEXT_COLOR, bool varLength = true);
void transparentCopyTo(Surface *dest);
void copyTo(Surface *dest);
void copyTo(Surface *dest, uint16 x, uint16 y);
void copyTo(Surface *dest, const Common::Rect &srcBounds, uint16 destX, uint16 destY,
- int transparentColour = -1);
+ int transparentColor = -1);
void copyFrom(MemoryBlock *src) { _data->copyFrom(src); }
void copyFrom(MemoryBlock *src, uint32 destOffset);
void empty() { _data->empty(); }
- void fillRect(const Common::Rect &r, uint8 colour);
+ void fillRect(const Common::Rect &r, uint8 color);
void createDialog(bool blackFlag = false);
void copyToScreen(uint16 x, uint16 y);
void centerOnScreen();
@@ -82,8 +82,8 @@ public:
static uint16 textWidth(const char *s, int numChars = 0);
static void wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines);
static Surface *newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength = true,
- int colour = DEFAULT_TEXT_COLOUR, bool squashedLines = true);
- static Surface *newDialog(uint16 width, const char *lines, int colour = DEFAULT_TEXT_COLOUR);
+ int color = DEFAULT_TEXT_COLOR, bool squashedLines = true);
+ static Surface *newDialog(uint16 width, const char *lines, int color = DEFAULT_TEXT_COLOR);
static Surface *getScreen(uint16 resourceId);
bool getString(Common::String &line, int maxSize, bool isNumeric, bool varLength, int16 x, int16 y);
};
diff --git a/engines/m4/actor.cpp b/engines/m4/actor.cpp
index f342ca6b46..c61c6fe7d8 100644
--- a/engines/m4/actor.cpp
+++ b/engines/m4/actor.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/array.h"
+#include "common/textconsole.h"
#include "m4/actor.h"
#include "m4/m4_views.h"
#include "m4/assets.h"
@@ -59,7 +60,7 @@ void Actor::placeWalkerSpriteAt(int spriteNum, int x, int y) {
info.height = info.sprite->height();
info.scaleX = info.scaleY = _scaling;
info.palette = _walkerSprites[_direction]->getPalette();
- info.inverseColourTable = _m4Vm->scene()->getInverseColourTable();
+ info.inverseColorTable = _m4Vm->scene()->getInverseColorTable();
_vm->_scene->drawSprite(x, y, info, Common::Rect(640, 400));
}
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp
index 37314eff44..3fe050e604 100644
--- a/engines/m4/animation.cpp
+++ b/engines/m4/animation.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/assets.h"
#include "m4/animation.h"
#include "m4/compression.h"
@@ -426,7 +428,7 @@ void MadsAnimation::update() {
// Start displaying the message
AnimMessage &me = _messages[idx];
- // The colour index to use is dependant on how many messages are currently on-screen
+ // The color index to use is dependant on how many messages are currently on-screen
uint8 colIndex;
switch (_messageCtr) {
case 1:
diff --git a/engines/m4/compression.cpp b/engines/m4/compression.cpp
index 9b1416945c..8fe4fbf1eb 100644
--- a/engines/m4/compression.cpp
+++ b/engines/m4/compression.cpp
@@ -27,6 +27,7 @@
#include "m4/m4.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace M4 {
diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp
index 88b4240901..cbcaa04669 100644
--- a/engines/m4/console.cpp
+++ b/engines/m4/console.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4.h"
#include "m4/console.h"
#include "m4/dialogs.h"
diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp
index 2d1b8e7e4f..46c4b35b79 100644
--- a/engines/m4/converse.cpp
+++ b/engines/m4/converse.cpp
@@ -26,6 +26,7 @@
#include "common/array.h"
#include "common/hashmap.h"
#include "common/substream.h"
+#include "common/textconsole.h"
#include "m4/converse.h"
#include "m4/resource.h"
@@ -97,7 +98,7 @@ void ConversationView::setNode(int32 nodeIndex) {
_vm->_font->setFont(FONT_CONVERSATION);
// TODO: Conversation styles and colors
- _vm->_font->current()->setColours(2, 1, 3);
+ _vm->_font->current()->setColors(2, 1, 3);
_currentNodeIndex = nodeIndex;
@@ -164,7 +165,7 @@ void ConversationView::onRefresh(RectList *rects, M4Surface *destSurface) {
if (i > CONV_MAX_SHOWN_ENTRIES - 1)
break;
- _vm->_font->current()->setColour((_highlightedIndex == i) ? CONVERSATION_ENTRY_HIGHLIGHTED :
+ _vm->_font->current()->setColor((_highlightedIndex == i) ? CONVERSATION_ENTRY_HIGHLIGHTED :
CONVERSATION_ENTRY_NORMAL);
_vm->_font->current()->writeString(this, _activeItems[i]->text, CONV_ENTRIES_X_OFFSET,
diff --git a/engines/m4/detection.cpp b/engines/m4/detection.cpp
index 4b204996f3..e0983e3327 100644
--- a/engines/m4/detection.cpp
+++ b/engines/m4/detection.cpp
@@ -44,11 +44,11 @@ uint32 MadsM4Engine::getFeatures() const { return _gameDescription->features; }
Common::Language MadsM4Engine::getLanguage() const { return _gameDescription->desc.language; }
Common::Platform MadsM4Engine::getPlatform() const { return _gameDescription->desc.platform; }
-}
+} // End of namespace M4
static const PlainGameDescriptor m4Games[] = {
{"m4", "MADS/M4 engine game"},
- {"riddle", "Riddle of Master Lu: Believe it or Not!"},
+ {"riddle", "Ripley's Believe It or Not!: The Riddle of Master Lu"},
{"burger", "Orion Burger"},
{"rex", "Rex Nebular and the Cosmic Gender Bender"},
{"dragon", "DragonSphere"},
@@ -380,7 +380,12 @@ static const M4GameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER, 0, 0 }
};
-}
+} // End of namespace M4
+
+static const char *directoryGlobs[] = {
+ "option1",
+ 0
+};
static const ADParams detectionParams = {
// Pointer to ADGameDescription or its superset structure
@@ -402,9 +407,9 @@ static const ADParams detectionParams = {
// Additional GUI options (for every game}
Common::GUIO_NOMIDI,
// Maximum directory depth
- 1,
+ 2,
// List of directory globs
- 0
+ directoryGlobs
};
class M4MetaEngine : public AdvancedMetaEngine {
diff --git a/engines/m4/dialogs.cpp b/engines/m4/dialogs.cpp
index da828ccf5b..bc6228658d 100644
--- a/engines/m4/dialogs.cpp
+++ b/engines/m4/dialogs.cpp
@@ -25,6 +25,7 @@
#include "m4/dialogs.h"
#include "common/file.h"
+#include "common/textconsole.h"
namespace M4 {
@@ -444,7 +445,7 @@ void Dialog::draw() {
int dialogY = (_vm->_screen->height() - dlgHeight) / 2;
// Create the surface for the dialog
- create(dlgWidth, dlgHeight, 1);
+ create(dlgWidth, dlgHeight, Graphics::PixelFormat::createFormatCLUT8());
_coords.left = dialogX;
_coords.top = dialogY;
_coords.right = dialogX + dlgWidth + 1;
@@ -452,7 +453,7 @@ void Dialog::draw() {
// Set up the dialog
fillRect(Common::Rect(0, 0, width(), height()), 3);
- setColour(2);
+ setColor(2);
hLine(1, width() - 1, height() - 2); // Bottom edge
hLine(0, width(), height() - 1);
vLine(width() - 2, 2, height()); // Right edge
@@ -480,8 +481,8 @@ void Dialog::draw() {
}
// Handle drawing the text contents
- _vm->_font->current()->setColours(7, 7, 7);
- setColour(7);
+ _vm->_font->current()->setColors(7, 7, 7);
+ setColor(7);
for (uint lineCtr = 0, yp = 5; lineCtr < _lines.size(); ++lineCtr, yp += _vm->_font->current()->getHeight() + 1) {
diff --git a/engines/m4/events.cpp b/engines/m4/events.cpp
index 29b243aceb..a9641eb542 100644
--- a/engines/m4/events.cpp
+++ b/engines/m4/events.cpp
@@ -257,7 +257,7 @@ bool Mouse::setCursorNum(int cursorIndex) {
// Set the cursor to the sprite
CursorMan.replaceCursor((const byte *)_cursor->getBasePtr(), _cursor->width(), _cursor->height(),
- _cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOUR_INDEX);
+ _cursor->xOffset, _cursor->yOffset, TRANSPARENT_COLOR_INDEX);
return true;
}
diff --git a/engines/m4/font.cpp b/engines/m4/font.cpp
index 3ed419675d..582fbaebc7 100644
--- a/engines/m4/font.cpp
+++ b/engines/m4/font.cpp
@@ -159,14 +159,14 @@ Font::~Font() {
}
}
-void Font::setColour(uint8 colour) {
+void Font::setColor(uint8 color) {
if (_sysFont)
- _fontColors[1] = colour;
+ _fontColors[1] = color;
else
- _fontColors[3] = colour;
+ _fontColors[3] = color;
}
-void Font::setColours(uint8 col1, uint8 col2, uint8 col3) {
+void Font::setColors(uint8 col1, uint8 col2, uint8 col3) {
if (_sysFont)
_fontColors[1] = col3;
else {
diff --git a/engines/m4/font.h b/engines/m4/font.h
index 19d15faa1e..64e54f35b5 100644
--- a/engines/m4/font.h
+++ b/engines/m4/font.h
@@ -62,8 +62,8 @@ public:
Font(MadsM4Engine *vm, const char *filename);
~Font();
- void setColour(uint8 colour);
- void setColours(uint8 col1, uint8 col2, uint8 col3);
+ void setColor(uint8 color);
+ void setColors(uint8 col1, uint8 col2, uint8 col3);
int32 getWidth(const char *text, int spaceWidth = -1);
int32 getHeight() const { return _maxHeight; }
diff --git a/engines/m4/globals.cpp b/engines/m4/globals.cpp
index d982ecad0e..3db9934cec 100644
--- a/engines/m4/globals.cpp
+++ b/engines/m4/globals.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4.h"
#include "m4/globals.h"
#include "m4/graphics.h"
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index 5fc46d3881..689a6ab8b4 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -23,11 +23,12 @@
*
*/
-#include "common/file.h"
-#include "common/endian.h"
#include "common/system.h"
#include "common/util.h"
#include "common/ptr.h"
+#include "common/textconsole.h"
+
+#include "graphics/palette.h"
#include "m4/globals.h"
#include "m4/graphics.h"
@@ -96,7 +97,7 @@ void M4Surface::loadCodesM4(Common::SeekableReadStream *source) {
uint16 widthVal = source->readUint16LE();
uint16 heightVal = source->readUint16LE();
- create(widthVal, heightVal, 1);
+ create(widthVal, heightVal, Graphics::PixelFormat::createFormatCLUT8());
source->read(pixels, widthVal * heightVal);
}
@@ -110,7 +111,7 @@ void M4Surface::loadCodesMads(Common::SeekableReadStream *source) {
uint16 heightVal = 156;
byte *walkMap = new byte[source->size()];
- create(widthVal, heightVal, 1);
+ create(widthVal, heightVal, Graphics::PixelFormat::createFormatCLUT8());
source->read(walkMap, source->size());
byte *ptr = (byte *)getBasePtr(0, 0);
@@ -300,7 +301,7 @@ void M4Surface::drawSprite(int x, int y, SpriteInfo &info, const Common::Rect &c
r = CLIP((info.palette[destPixel].r * pixel) >> 10, 0, 31);
g = CLIP((info.palette[destPixel].g * pixel) >> 10, 0, 31);
b = CLIP((info.palette[destPixel].b * pixel) >> 10, 0, 31);
- pixel = info.inverseColourTable[(b << 10) | (g << 5) | r];
+ pixel = info.inverseColorTable[(b << 10) | (g << 5) | r];
}
}
@@ -361,7 +362,7 @@ void M4Surface::fillRect(const Common::Rect &r, uint8 color) {
}
void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int destX, int destY,
- int transparentColour) {
+ int transparentColor) {
// Validation of the rectangle and position
if ((destX >= w) || (destY >= h))
return;
@@ -390,13 +391,13 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest
byte *destPtr = (byte *)pixels + (destY * width()) + destX;
for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) {
- if (transparentColour == -1)
+ if (transparentColor == -1)
// No transparency, so copy line over
Common::copy(srcPtr, srcPtr + copyRect.width(), destPtr);
else {
// Copy each byte one at a time checking for the transparency color
for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr)
- if (srcPtr[xCtr] != transparentColour) destPtr[xCtr] = srcPtr[xCtr];
+ if (srcPtr[xCtr] != transparentColor) destPtr[xCtr] = srcPtr[xCtr];
}
srcPtr += src->width();
@@ -411,7 +412,7 @@ void M4Surface::copyFrom(M4Surface *src, const Common::Rect &srcBounds, int dest
* the specified depth requirement on a secondary surface contain depth information
*/
void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
- M4Surface *depthsSurface, int scale, int transparentColour) {
+ M4Surface *depthsSurface, int scale, int transparentColor) {
if (scale == 100) {
// Copy the specified area
@@ -443,7 +444,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) {
// Copy each byte one at a time checking against the depth
for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) {
- if ((depth <= (depthsPtr[xCtr] & 0x7f)) && (srcPtr[xCtr] != transparentColour))
+ if ((depth <= (depthsPtr[xCtr] & 0x7f)) && (srcPtr[xCtr] != transparentColor))
destPtr[xCtr] = srcPtr[xCtr];
}
@@ -557,7 +558,7 @@ void M4Surface::copyFrom(M4Surface *src, int destX, int destY, int depth,
// Not a display pixel
continue;
- if ((*srcP != transparentColour) && (depth <= (*depthP & 0x7f)))
+ if ((*srcP != transparentColor) && (depth <= (*depthP & 0x7f)))
*destP = *srcP;
++destP;
@@ -760,7 +761,7 @@ void M4Surface::rexLoadBackground(Common::SeekableReadStream *source, RGBList **
sourceUnc = packData.getItemStream(1);
assert((int)sourceUnc->size() >= sceneSize);
- create(sceneWidth, sceneHeight, 1);
+ create(sceneWidth, sceneHeight, Graphics::PixelFormat::createFormatCLUT8());
byte *pData = (byte *)pixels;
sourceUnc->read(pData, sceneSize);
@@ -813,7 +814,7 @@ void M4Surface::m4LoadBackground(Common::SeekableReadStream *source) {
assert(width() == (int)widthVal);
//debugCN(kDebugGraphics, "width(): %d, widthVal: %d, height(): %d, heightVal: %d\n", width(), widthVal, height(), heightVal);
- tileBuffer->create(tileWidth, tileHeight, 1);
+ tileBuffer->create(tileWidth, tileHeight, Graphics::PixelFormat::createFormatCLUT8());
for (curTileY = 0; curTileY < tilesY; curTileY++) {
clipY = MIN(heightVal, (1 + curTileY) * tileHeight) - (curTileY * tileHeight);
@@ -854,7 +855,7 @@ void M4Surface::madsLoadInterface(const Common::String &filename) {
// Chunk 1, data
intStream = intFile.getItemStream(1);
- create(320, 44, 1);
+ create(320, 44, Graphics::PixelFormat::createFormatCLUT8());
intStream->read(pixels, 320 * 44);
delete intStream;
@@ -933,7 +934,7 @@ void M4Surface::translate(RGBList *list, bool isTransparent) {
byte *palIndexes = list->palIndexes();
for (int i = 0; i < width() * height(); ++i, ++p) {
- if (!isTransparent || (*p != TRANSPARENT_COLOUR_INDEX)) {
+ if (!isTransparent || (*p != TRANSPARENT_COLOR_INDEX)) {
if (*p < list->size())
*p = palIndexes[*p];
else
diff --git a/engines/m4/graphics.h b/engines/m4/graphics.h
index d58ed69403..96e81f746e 100644
--- a/engines/m4/graphics.h
+++ b/engines/m4/graphics.h
@@ -40,7 +40,7 @@ namespace M4 {
#define MADS_SCREEN_HEIGHT 200
#define MADS_Y_OFFSET ((MADS_SCREEN_HEIGHT - MADS_SURFACE_HEIGHT) / 2)
-#define TRANSPARENT_COLOUR_INDEX 0xFF
+#define TRANSPARENT_COLOR_INDEX 0xFF
struct BGR8 {
uint8 b, g, r;
@@ -89,7 +89,7 @@ struct SpriteInfo {
int width, height;
int scaleX, scaleY;
uint8 encoding;
- byte *inverseColourTable;
+ byte *inverseColorTable;
RGB8 *palette;
};
@@ -105,19 +105,19 @@ private:
void m4LoadBackground(Common::SeekableReadStream *source);
public:
M4Surface(bool isScreen = false) {
- create(g_system->getWidth(), isScreen ? g_system->getHeight() : MADS_SURFACE_HEIGHT, 1);
+ create(g_system->getWidth(), isScreen ? g_system->getHeight() : MADS_SURFACE_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
_isScreen = isScreen;
_rgbList = NULL;
_ownsData = true;
}
M4Surface(int width_, int height_) {
- create(width_, height_, 1);
+ create(width_, height_, Graphics::PixelFormat::createFormatCLUT8());
_isScreen = false;
_rgbList = NULL;
_ownsData = true;
}
M4Surface(int width_, int height_, byte *srcPixels, int pitch_) {
- bytesPerPixel = 1;
+ format = Graphics::PixelFormat::createFormatCLUT8();
w = width_;
h = height_;
pitch = pitch_;
@@ -141,7 +141,6 @@ public:
void madsLoadInterface(const Common::String &filename);
void setColor(byte value) { _color = value; }
- void setColour(byte value) { _color = value; }
inline byte getColor() const { return _color; }
void vLine(int x, int y1, int y2);
void hLine(int x1, int x2, int y);
@@ -158,7 +157,7 @@ public:
inline int width() const { return w; }
inline int height() const { return h; }
inline int getPitch() const { return pitch; }
- void setSize(int sizeX, int sizeY) { create(sizeX, sizeY, 1); }
+ void setSize(int sizeX, int sizeY) { create(sizeX, sizeY, Graphics::PixelFormat::createFormatCLUT8()); }
inline byte *getBasePtr() {
return (byte *)pixels;
}
@@ -173,9 +172,9 @@ public:
void reset();
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 transparentColour = -1);
+ 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,
- int scale, int transparentColour = -1);
+ int scale, int transparentColor = -1);
void update() {
if (_isScreen) {
@@ -185,19 +184,19 @@ public:
}
// copyTo methods
- inline void copyTo(M4Surface *dest, int transparentColour = -1) {
- dest->copyFrom(this, Common::Rect(width(), height()), 0, 0, transparentColour);
+ inline void copyTo(M4Surface *dest, int transparentColor = -1) {
+ dest->copyFrom(this, Common::Rect(width(), height()), 0, 0, transparentColor);
}
- inline void copyTo(M4Surface *dest, int x, int y, int transparentColour = -1) {
- dest->copyFrom(this, Common::Rect(width(), height()), x, y, transparentColour);
+ inline void copyTo(M4Surface *dest, int x, int y, int transparentColor = -1) {
+ dest->copyFrom(this, Common::Rect(width(), height()), x, y, transparentColor);
}
inline void copyTo(M4Surface *dest, const Common::Rect &srcBounds, int destX, int destY,
- int transparentColour = -1) {
- dest->copyFrom(this, srcBounds, destX, destY, transparentColour);
+ int transparentColor = -1) {
+ dest->copyFrom(this, srcBounds, destX, destY, transparentColor);
}
inline void copyTo(M4Surface *dest, int destX, int destY, int depth, M4Surface *depthsSurface, int scale,
- int transparentColour = -1) {
- dest->copyFrom(this, destX, destY, depth, depthsSurface, scale, transparentColour);
+ int transparentColor = -1) {
+ dest->copyFrom(this, destX, destY, depth, depthsSurface, scale, transparentColor);
}
void scrollX(int xAmount);
diff --git a/engines/m4/gui.cpp b/engines/m4/gui.cpp
index 8665b4e767..56cf96b589 100644
--- a/engines/m4/gui.cpp
+++ b/engines/m4/gui.cpp
@@ -25,6 +25,7 @@
#include "common/events.h"
#include "common/keyboard.h"
+#include "common/textconsole.h"
#include "m4/globals.h"
#include "m4/events.h"
@@ -290,26 +291,26 @@ void MenuButton::onRefresh() {
case OBJTYPE_SL_TEXT:
switch (_objectState) {
case OS_MOUSEOVER:
- _vm->_font->current()->setColours(TEXT_COLOR_MOUSEOVER_SHADOW, TEXT_COLOR_MOUSEOVER_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_MOUSEOVER_SHADOW, TEXT_COLOR_MOUSEOVER_FOREGROUND,
TEXT_COLOR_MOUSEOVER_HILIGHT);
sprite = sprites[SL_LINE_MOUSEOVER];
break;
case OS_PRESSED:
- _vm->_font->current()->setColours(TEXT_COLOR_PRESSED_SHADOW, TEXT_COLOR_PRESSED_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_PRESSED_SHADOW, TEXT_COLOR_PRESSED_FOREGROUND,
TEXT_COLOR_PRESSED_HILIGHT);
sprite = sprites[SL_LINE_PRESSED];
break;
case OS_GREYED:
- _vm->_font->current()->setColours(TEXT_COLOR_GREYED_SHADOW, TEXT_COLOR_GREYED_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_GREYED_SHADOW, TEXT_COLOR_GREYED_FOREGROUND,
TEXT_COLOR_GREYED_HILIGHT);
sprite = sprites[SL_LINE_NORMAL];
break;
default:
case OS_NORMAL:
- _vm->_font->current()->setColours(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
TEXT_COLOR_NORMAL_HILIGHT);
sprite = sprites[SL_LINE_NORMAL];
break;
@@ -955,7 +956,7 @@ void MenuTextField::onRefresh() {
// Draw the text
_vm->_font->setFont(FONT_MENU);
- _vm->_font->current()->setColours(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
+ _vm->_font->current()->setColors(TEXT_COLOR_NORMAL_SHADOW, TEXT_COLOR_NORMAL_FOREGROUND,
TEXT_COLOR_NORMAL_HILIGHT);
int xp = _bounds.left + 4;
@@ -1140,7 +1141,7 @@ GUITextField::GUITextField(View *owner, const Common::Rect &bounds): GUIRect(own
void GUITextField::onRefresh() {
_parent->fillRect(_bounds, _vm->_palette->BLACK);
- _vm->_font->current()->setColours(3, 3, 3);
+ _vm->_font->current()->setColors(3, 3, 3);
_vm->_font->setFont(FONT_INTERFACE);
_vm->_font->current()->writeString(_parent, _text.c_str(), _bounds.left, _bounds.top, 0, 1);
}
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index 4cc2bf8783..e88140cd26 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -30,7 +30,6 @@
#include "m4/burger_data.h"
#include "m4/m4.h"
#include "m4/resource.h"
-#include "m4/sprite.h"
#include "m4/hotspot.h"
#include "m4/font.h"
#include "m4/rails.h"
@@ -50,17 +49,15 @@
#include "m4/mads_anim.h"
#include "m4/mads_menus.h"
+#include "common/error.h"
#include "common/file.h"
#include "common/fs.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
-#include "common/endian.h"
#include "common/system.h"
#include "common/config-manager.h"
#include "common/debug-channels.h"
+#include "common/textconsole.h"
#include "engines/util.h"
-#include "graphics/surface.h"
-#include "audio/mididrv.h"
namespace M4 {
@@ -118,6 +115,7 @@ MadsM4Engine::MadsM4Engine(OSystem *syst, const M4GameDescription *gameDesc) :
SearchMan.addSubDirectoryMatching(gameDataDir, "goodstuf");
SearchMan.addSubDirectoryMatching(gameDataDir, "resource");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "option1");
DebugMan.addDebugChannel(kDebugScript, "script", "Script debug level");
DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics debug level");
@@ -416,7 +414,7 @@ Common::Error M4Engine::run() {
_scene->loadScene(_kernel->currentRoom);
_ws->setBackgroundSurface(_scene->getBackgroundSurface());
- _ws->setInverseColourTable(scene()->getInverseColourTable());
+ _ws->setInverseColorTable(scene()->getInverseColorTable());
_kernel->loadSectionScriptFunctions();
_kernel->loadRoomScriptFunctions();
@@ -554,7 +552,7 @@ Common::Error MadsEngine::run() {
_scene->show();
_font->setFont(FONT_MAIN_MADS);
- _font->current()->setColours(2, 1, 3);
+ _font->current()->setColors(2, 1, 3);
_font->current()->writeString(_scene->getBackgroundSurface(), "Testing the M4/MADS ScummVM engine", 5, 160, 310, 2);
_font->current()->writeString(_scene->getBackgroundSurface(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 5, 180, 310, 2);
diff --git a/engines/m4/m4_menus.cpp b/engines/m4/m4_menus.cpp
index 118b09f50b..a20bb2660b 100644
--- a/engines/m4/m4_menus.cpp
+++ b/engines/m4/m4_menus.cpp
@@ -24,6 +24,7 @@
*/
#include "common/algorithm.h" // for find()
+#include "common/textconsole.h"
#include "gui/dialog.h"
#include "gui/message.h"
diff --git a/engines/m4/m4_scene.cpp b/engines/m4/m4_scene.cpp
index 738f414add..a0d8a503ab 100644
--- a/engines/m4/m4_scene.cpp
+++ b/engines/m4/m4_scene.cpp
@@ -24,6 +24,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "m4/m4_scene.h"
#include "m4/dialogs.h"
@@ -41,7 +42,7 @@ namespace M4 {
M4Scene::M4Scene(M4Engine *vm): _sceneResources(), Scene(vm, &_sceneResources) {
_vm = vm;
_sceneSprites = NULL;
- _inverseColourTable = NULL;
+ _inverseColorTable = NULL;
_sceneResources.hotspots = new HotSpotList();
_sceneResources.parallax = new HotSpotList();
@@ -110,15 +111,15 @@ void M4Scene::loadSceneResources(int sceneNumber) {
}
}
-void M4Scene::loadSceneInverseColourTable(int sceneNumber) {
+void M4Scene::loadSceneInverseColorTable(int sceneNumber) {
char filename[kM4MaxFilenameSize];
Common::SeekableReadStream *iplS;
sprintf(filename, "%i.ipl", sceneNumber);
iplS = _vm->res()->openFile(filename);
- delete[] _inverseColourTable;
- _inverseColourTable = new byte[iplS->size()];
- iplS->read(_inverseColourTable, iplS->size());
+ delete[] _inverseColorTable;
+ _inverseColorTable = new byte[iplS->size()];
+ iplS->read(_inverseColorTable, iplS->size());
_vm->res()->toss(filename);
}
@@ -163,7 +164,7 @@ void M4Scene::loadScene(int sceneNumber) {
loadSceneCodes(sceneNumber);
// Load inverse color table file (*.IPL)
- loadSceneInverseColourTable(sceneNumber);
+ loadSceneInverseColorTable(sceneNumber);
if (_vm->getGameType() != GType_Burger) {
// Load scene sprites file (*.SSB)
@@ -202,7 +203,7 @@ void M4Scene::leaveScene() {
_sceneResources.parallax->clear();
delete _sceneResources.parallax;
- delete[] _inverseColourTable;
+ delete[] _inverseColorTable;
Scene::leaveScene();
}
diff --git a/engines/m4/m4_scene.h b/engines/m4/m4_scene.h
index 2216779a3e..9c2edbc06c 100644
--- a/engines/m4/m4_scene.h
+++ b/engines/m4/m4_scene.h
@@ -53,11 +53,11 @@ private:
M4SceneResources _sceneResources;
SpriteAsset *_sceneSprites;
SpriteAsset *_walkerSprite;
- byte *_inverseColourTable;
+ byte *_inverseColorTable;
void loadSceneSprites(int sceneNumber);
void loadSceneResources(int sceneNumber);
- void loadSceneInverseColourTable(int sceneNumber);
+ void loadSceneInverseColorTable(int sceneNumber);
void loadSceneSpriteCodes(int sceneNumber);
void nextCommonCursor();
public:
@@ -75,7 +75,7 @@ public:
virtual void update();
virtual void showHotSpots();
- byte *getInverseColourTable() const { return _inverseColourTable; }
+ byte *getInverseColorTable() const { return _inverseColorTable; }
M4InterfaceView *getInterface() { return (M4InterfaceView *)_interfaceSurface; }
M4SceneResources &getSceneResources() { return _sceneResources; }
void setStatusText(const char *text);
diff --git a/engines/m4/m4_views.cpp b/engines/m4/m4_views.cpp
index f4345787df..83f23edd3d 100644
--- a/engines/m4/m4_views.cpp
+++ b/engines/m4/m4_views.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4_views.h"
#include "m4/events.h"
#include "m4/font.h"
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp
index 1d15cbbaf7..e7ca9cb14d 100644
--- a/engines/m4/mads_anim.cpp
+++ b/engines/m4/mads_anim.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/mads_anim.h"
#include "m4/m4.h"
#include "m4/compression.h"
@@ -60,7 +62,7 @@ TextviewView::TextviewView(MadsM4Engine *vm):
_vm->_palette->setPalette(&palData[0], 4, 3);
_vm->_palette->blockRange(4, 3);
- _vm->_font->current()->setColours(5, 6, 4);
+ _vm->_font->current()->setColors(5, 6, 4);
clear();
_bgSurface.clear();
diff --git a/engines/m4/mads_logic.cpp b/engines/m4/mads_logic.cpp
index 878e86c573..98a0d06412 100644
--- a/engines/m4/mads_logic.cpp
+++ b/engines/m4/mads_logic.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/m4.h"
#include "m4/dialogs.h"
#include "m4/mads_logic.h"
diff --git a/engines/m4/mads_menus.cpp b/engines/m4/mads_menus.cpp
index 91db7d343a..437e9d2a6b 100644
--- a/engines/m4/mads_menus.cpp
+++ b/engines/m4/mads_menus.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "m4/mads_menus.h"
#include "m4/m4.h"
@@ -695,11 +697,11 @@ void RexDialogView::updateState() {
void RexDialogView::onRefresh(RectList *rects, M4Surface *destSurface) {
// Draw the framed base area
fillRect(this->bounds(), _madsVm->_palette->BLACK);
- setColour(2);
+ setColor(2);
hLine(0, width(), MADS_Y_OFFSET - 2);
hLine(0, width(), MADS_Y_OFFSET + MADS_SURFACE_HEIGHT + 2);
- // Add in the loaded background vertically centred
+ // Add in the loaded background vertically centered
_backgroundSurface->copyTo(this, 0, (height() - MADS_SURFACE_HEIGHT) / 2);
// Check whether any of the dialog text entries need to be refreshed
@@ -943,20 +945,20 @@ void RexDialogView::refreshText() {
if (!_dialogText[i].in_use)
continue;
- // Get the item's colours
- uint colour;
+ // Get the item's colors
+ uint color;
if (_dialogText[i].state == STATE_DESELECTED)
- colour = 0xB0A;
+ color = 0xB0A;
else if (_dialogText[i].state == STATE_SELECTED)
- colour = 0xD0C;
+ color = 0xD0C;
else
- colour = 0xF0E;
+ color = 0xF0E;
- // If there's an associated text display entry, check to see if it's colour needs to change
+ // If there's an associated text display entry, check to see if it's color needs to change
if (_dialogText[i].textDisplay_index >= 0) {
MadsTextDisplayEntry &tdEntry = _textDisplay[_dialogText[i].textDisplay_index];
- if ((tdEntry.colour1 == (colour & 0xff)) && (tdEntry.colour2 == (colour >> 8)))
+ if ((tdEntry.color1 == (color & 0xff)) && (tdEntry.color2 == (color >> 8)))
// It's still the same, so no further action needed
continue;
@@ -967,7 +969,7 @@ void RexDialogView::refreshText() {
// Create a new text display entry for the dialog text line
_dialogText[i].textDisplay_index = _textDisplay.add(_dialogText[i].pos.x, _dialogText[i].pos.y,
- colour, _dialogText[i].widthAdjust, _dialogText[i].text, _dialogText[i].font);
+ color, _dialogText[i].widthAdjust, _dialogText[i].text, _dialogText[i].font);
}
}
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp
index fd8a609b53..7b82480ee2 100644
--- a/engines/m4/mads_scene.cpp
+++ b/engines/m4/mads_scene.cpp
@@ -24,6 +24,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "m4/mads_scene.h"
#include "m4/dialogs.h"
@@ -855,13 +856,13 @@ MadsInterfaceView::~MadsInterfaceView() {
void MadsInterfaceView::setFontMode(InterfaceFontMode newMode) {
switch (newMode) {
case ITEM_NORMAL:
- _vm->_font->current()->setColours(4, 4, 0xff);
+ _vm->_font->current()->setColors(4, 4, 0xff);
break;
case ITEM_HIGHLIGHTED:
- _vm->_font->current()->setColours(5, 5, 0xff);
+ _vm->_font->current()->setColors(5, 5, 0xff);
break;
case ITEM_SELECTED:
- _vm->_font->current()->setColours(6, 6, 0xff);
+ _vm->_font->current()->setColors(6, 6, 0xff);
break;
}
}
@@ -939,7 +940,7 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) {
int actionIndex = 0;
for (int x = 0; x < 2; ++x) {
for (int y = 0; y < 5; ++y, ++actionIndex) {
- // Determine the font colour depending on whether an item is selected. Note that the first action,
+ // Determine the font color depending on whether an item is selected. Note that the first action,
// 'Look', is always 'selected', even when another action is clicked on
setFontMode((_highlightedElement == actionIndex) ? ITEM_HIGHLIGHTED :
((actionIndex == 0) ? ITEM_SELECTED : ITEM_NORMAL));
@@ -994,7 +995,7 @@ void MadsInterfaceView::onRefresh(RectList *rects, M4Surface *destSurface) {
// Display object sprite. Note that the frame number isn't used directly, because it would result
// in too fast an animation
M4Sprite *spr = _objectSprites->getFrame(_objectFrameNumber / INV_ANIM_FRAME_SPEED);
- spr->copyTo(destSurface, INVENTORY_X, INVENTORY_Y, TRANSPARENT_COLOUR_INDEX);
+ spr->copyTo(destSurface, INVENTORY_X, INVENTORY_Y, TRANSPARENT_COLOR_INDEX);
if (!_madsVm->globals()->_config.invObjectsStill && !dialogVisible) {
// If objects need to be animated, move to the next frame
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index cc127032eb..33c679c9bd 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -34,6 +34,7 @@
#include "m4/staticres.h"
#include "common/algorithm.h"
+#include "common/textconsole.h"
namespace M4 {
@@ -244,10 +245,10 @@ void MadsAction::refresh() {
}
// Add a new text display entry to display the status text at the bottom of the screen area
- uint colours = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003;
+ uint colors = (_vm->getGameType() == GType_DragonSphere) ? 0x0300 : 0x0003;
_statusTextIndex = _owner._textDisplay.add(160 - (strWidth / 2),
- MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colours, textSpacing, _statusText, font);
+ MADS_SURFACE_HEIGHT + _owner._posAdjust.y - 13, colors, textSpacing, _statusText, font);
}
}
@@ -616,7 +617,7 @@ void MadsTextDisplay::clear() {
_entries[i].active = false;
}
-int MadsTextDisplay::add(int xp, int yp, uint fontColour, int charSpacing, const char *msg, Font *font) {
+int MadsTextDisplay::add(int xp, int yp, uint fontColor, int charSpacing, const char *msg, Font *font) {
int usedSlot = -1;
for (int idx = 0; idx < TEXT_DISPLAY_SIZE; ++idx) {
@@ -629,8 +630,8 @@ int MadsTextDisplay::add(int xp, int yp, uint fontColour, int charSpacing, const
_entries[idx].msg = msg;
_entries[idx].bounds.setWidth(font->getWidth(msg, charSpacing));
_entries[idx].bounds.setHeight(font->getHeight());
- _entries[idx].colour1 = fontColour & 0xff;
- _entries[idx].colour2 = fontColour >> 8;
+ _entries[idx].color1 = fontColor & 0xff;
+ _entries[idx].color2 = fontColor >> 8;
_entries[idx].spacing = charSpacing;
_entries[idx].expire = 1;
_entries[idx].active = true;
@@ -666,7 +667,7 @@ void MadsTextDisplay::setDirtyAreas2() {
void MadsTextDisplay::draw(M4Surface *view) {
for (uint idx = 0; idx < _entries.size(); ++idx) {
if (_entries[idx].active && (_entries[idx].expire >= 0)) {
- _entries[idx].font->setColours(_entries[idx].colour1, _entries[idx].colour2, 0);
+ _entries[idx].font->setColors(_entries[idx].color1, _entries[idx].color2, 0);
_entries[idx].font->writeString(view, _entries[idx].msg,
_entries[idx].bounds.left, _entries[idx].bounds.top, _entries[idx].bounds.width(),
_entries[idx].spacing);
@@ -707,7 +708,7 @@ void MadsKernelMessageList::clear() {
_talkFont = _vm->_font->getFont(FONT_CONVERSATION_MADS);
}
-int MadsKernelMessageList::add(const Common::Point &pt, uint fontColour, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg) {
+int MadsKernelMessageList::add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg) {
// Find a free slot
uint idx = 0;
while ((idx < _entries.size()) && ((_entries[idx].flags & KMSG_ACTIVE) != 0))
@@ -722,8 +723,8 @@ int MadsKernelMessageList::add(const Common::Point &pt, uint fontColour, uint8 f
MadsKernelMessageEntry &rec = _entries[idx];
strcpy(rec.msg, msg);
rec.flags = flags | KMSG_ACTIVE;
- rec.colour1 = fontColour & 0xff;
- rec.colour2 = fontColour >> 8;
+ rec.color1 = fontColor & 0xff;
+ rec.color2 = fontColor >> 8;
rec.position = pt;
rec.textDisplayIndex = -1;
rec.timeout = timeout;
@@ -918,7 +919,7 @@ void MadsKernelMessageList::processText(int msgIndex) {
if (msg.textDisplayIndex < 0) {
// Need to create a new text display entry for this message
- int idx = _owner._textDisplay.add(x1, y1, msg.colour1 | (msg.colour2 << 8), _owner._textSpacing, msg.msg, _talkFont);
+ int idx = _owner._textDisplay.add(x1, y1, msg.color1 | (msg.color2 << 8), _owner._textSpacing, msg.msg, _talkFont);
if (idx >= 0)
msg.textDisplayIndex = idx;
}
diff --git a/engines/m4/mads_views.h b/engines/m4/mads_views.h
index c93d0beda3..ce5ba9c4e5 100644
--- a/engines/m4/mads_views.h
+++ b/engines/m4/mads_views.h
@@ -174,8 +174,8 @@ public:
int expire;
int spacing;
Common::Rect bounds;
- uint8 colour1;
- uint8 colour2;
+ uint8 color1;
+ uint8 color2;
Font *font;
const char *msg;
@@ -201,7 +201,7 @@ public:
_entries[idx].expire = -1;
}
- int add(int xp, int yp, uint fontColour, int charSpacing, const char *msg, Font *font);
+ int add(int xp, int yp, uint fontColor, int charSpacing, const char *msg, Font *font);
void clear();
void draw(M4Surface *view);
void setDirtyAreas();
@@ -221,8 +221,8 @@ public:
int sequenceIndex;
char asciiChar;
char asciiChar2;
- int colour1;
- int colour2;
+ int color1;
+ int color2;
Common::Point position;
int textDisplayIndex;
int msgOffset;
@@ -251,7 +251,7 @@ public:
MadsKernelMessageList(MadsView &owner);
void clear();
- int add(const Common::Point &pt, uint fontColour, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg);
+ int add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, uint32 timeout, const char *msg);
int addQuote(int quoteId, int abortTimers, uint32 timeout);
void scrollMessage(int msgIndex, int numTicks, bool quoted);
void setSeqIndex(int msgIndex, int seqIndex);
diff --git a/engines/m4/midi.cpp b/engines/m4/midi.cpp
index e49dbfa2e7..24ac60c22e 100644
--- a/engines/m4/midi.cpp
+++ b/engines/m4/midi.cpp
@@ -31,6 +31,7 @@
#include "audio/midiparser.h"
#include "common/config-manager.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace M4 {
diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp
index 192cab0c83..1946797f75 100644
--- a/engines/m4/resource.cpp
+++ b/engines/m4/resource.cpp
@@ -28,6 +28,7 @@
#include "m4/events.h"
#include "common/substream.h"
+#include "common/textconsole.h"
namespace M4 {
diff --git a/engines/m4/scene.cpp b/engines/m4/scene.cpp
index 0f684ebced..c0cbd879b2 100644
--- a/engines/m4/scene.cpp
+++ b/engines/m4/scene.cpp
@@ -163,7 +163,7 @@ void Scene::showCodes() {
// Show all the scene's walk nodes
SceneNodeList &nodeList = _madsVm->scene()->getSceneResources()._nodes;
- _backgroundSurface->setColour(_madsVm->_palette->WHITE);
+ _backgroundSurface->setColor(_madsVm->_palette->WHITE);
for (uint i = 0; i < nodeList.size() - 2; ++i) {
// Draw a little cross at the node's position
_backgroundSurface->hLine(nodeList[i].pt.x - 2, nodeList[i].pt.x + 2, nodeList[i].pt.y);
diff --git a/engines/m4/script.cpp b/engines/m4/script.cpp
index 42d55c6dc7..cc60ec310d 100644
--- a/engines/m4/script.cpp
+++ b/engines/m4/script.cpp
@@ -24,6 +24,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "m4/m4.h"
#include "m4/script.h"
diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp
index 14c60c1c58..fb90cea5cc 100644
--- a/engines/m4/sound.cpp
+++ b/engines/m4/sound.cpp
@@ -28,6 +28,7 @@
#include "m4/compression.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
diff --git a/engines/m4/sprite.cpp b/engines/m4/sprite.cpp
index 641b93baea..cef9917381 100644
--- a/engines/m4/sprite.cpp
+++ b/engines/m4/sprite.cpp
@@ -24,6 +24,7 @@
*/
#include "common/rect.h"
+#include "common/textconsole.h"
#include "m4/globals.h"
#include "m4/graphics.h"
@@ -124,7 +125,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
bool spriteEnd = false;
// Set entire sprite contents to transparent pixels
- fillRect(bounds(), TRANSPARENT_COLOUR_INDEX);
+ fillRect(bounds(), TRANSPARENT_COLOR_INDEX);
// Major line loop
for (int yp = 0; yp < h; ++yp) {
@@ -153,7 +154,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
byte v = source->readByte();
while (cmd-- > 0) {
if (x2 < w)
- *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v;
+ *destP++ = (v == 0xFD) ? TRANSPARENT_COLOR_INDEX : v;
++x2;
}
}
@@ -173,13 +174,13 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
byte v = source->readByte();
while (cmd-- > 0) {
if (x2 < w) {
- *destP++ = (v == 0xFD) ? TRANSPARENT_COLOUR_INDEX : v;
+ *destP++ = (v == 0xFD) ? TRANSPARENT_COLOR_INDEX : v;
}
++x2;
}
} else {
// Handle writing out single pixel
- *destP++ = (cmd == 0xFD) ? TRANSPARENT_COLOUR_INDEX : cmd;
+ *destP++ = (cmd == 0xFD) ? TRANSPARENT_COLOR_INDEX : cmd;
++x2;
}
}
@@ -203,7 +204,7 @@ void M4Sprite::loadMadsSprite(Common::SeekableReadStream* source) {
}
byte M4Sprite::getTransparencyIndex() const {
- return TRANSPARENT_COLOUR_INDEX;
+ return TRANSPARENT_COLOR_INDEX;
}
} // End of namespace M4
diff --git a/engines/m4/woodscript.cpp b/engines/m4/woodscript.cpp
index 1b9d9859ef..dc24548f84 100644
--- a/engines/m4/woodscript.cpp
+++ b/engines/m4/woodscript.cpp
@@ -26,6 +26,7 @@
#include "m4/woodscript.h"
#include "common/memstream.h"
+#include "graphics/palette.h"
namespace M4 {
diff --git a/engines/m4/woodscript.h b/engines/m4/woodscript.h
index 4b0f457193..a9a884a4b0 100644
--- a/engines/m4/woodscript.h
+++ b/engines/m4/woodscript.h
@@ -319,8 +319,8 @@ public:
RGB8 *getMainPalette() const;
- void setInverseColourTable(byte *inverseColourTable) { _inverseColourTable = inverseColourTable; }
- byte *getInverseColourTable() const { return _inverseColourTable; }
+ void setInverseColorTable(byte *inverseColorTable) { _inverseColorTable = inverseColorTable; }
+ byte *getInverseColorTable() const { return _inverseColorTable; }
protected:
MadsM4Engine *_vm;
@@ -338,7 +338,7 @@ protected:
/* Misc */
int16 *_depthTable;
- byte *_inverseColourTable;
+ byte *_inverseColorTable;
M4Surface *_backgroundSurface;
View *_surfaceView;
diff --git a/engines/m4/ws_sequence.cpp b/engines/m4/ws_sequence.cpp
index bb6230d041..3ee496da0d 100644
--- a/engines/m4/ws_sequence.cpp
+++ b/engines/m4/ws_sequence.cpp
@@ -291,7 +291,7 @@ void Sequence::draw(M4Surface *surface, const Common::Rect &clipRect, Common::Re
info.hotX = _curFrame->xOffset;
info.hotY = _curFrame->yOffset;
info.encoding = _curFrame->encoding;
- info.inverseColourTable = _m4Vm->scene()->getInverseColourTable();
+ info.inverseColorTable = _m4Vm->scene()->getInverseColorTable();
info.palette = _ws->getMainPalette();
info.width = _curFrame->width();
info.height = _curFrame->height();
diff --git a/engines/made/database.cpp b/engines/made/database.cpp
index 8d06aa0085..4e7a0467b1 100644
--- a/engines/made/database.cpp
+++ b/engines/made/database.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/util.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "made/database.h"
diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp
index 7e8330d3f4..388ff60aa8 100644
--- a/engines/made/graphics.cpp
+++ b/engines/made/graphics.cpp
@@ -23,7 +23,9 @@
*
*/
+#include "common/debug.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "made/graphics.h"
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index c81fa3db25..c791b657e7 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -26,8 +26,6 @@
#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/keyboard.h"
-#include "common/file.h"
-#include "common/savefile.h"
#include "common/config-manager.h"
#include "common/stream.h"
diff --git a/engines/made/music.cpp b/engines/made/music.cpp
index 2e06871e13..e5bbbc3b42 100644
--- a/engines/made/music.cpp
+++ b/engines/made/music.cpp
@@ -30,8 +30,6 @@
#include "audio/audiostream.h"
#include "audio/mididrv.h"
#include "audio/midiparser.h"
-#include "common/config-manager.h"
-#include "common/file.h"
#include "made/music.h"
diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp
index e37bd87a7e..5ab24c1984 100644
--- a/engines/made/pmvplayer.cpp
+++ b/engines/made/pmvplayer.cpp
@@ -169,7 +169,7 @@ bool PmvPlayer::play(const char *filename) {
if (!_surface) {
_surface = new Graphics::Surface();
- _surface->create(width, height, 1);
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
}
decompressMovieImage(imageData, *_surface, cmdOffs, pixelOffs, maskOffs, lineSize);
diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp
index 3d36b69a28..2fcd7f43da 100644
--- a/engines/made/redreader.cpp
+++ b/engines/made/redreader.cpp
@@ -25,6 +25,7 @@
#include "made/redreader.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace Made {
diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp
index e556e4ab38..403520bec3 100644
--- a/engines/made/resource.cpp
+++ b/engines/made/resource.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "common/debug.h"
#include "common/endian.h"
#include "common/memstream.h"
#include "audio/mixer.h"
@@ -95,7 +96,7 @@ void PictureResource::loadRaw(byte *source, int size) {
}
_picture = new Graphics::Surface();
- _picture->create(width, height, 1);
+ _picture->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags);
@@ -171,7 +172,7 @@ void PictureResource::loadChunked(byte *source, int size) {
}
_picture = new Graphics::Surface();
- _picture->create(width, height, 1);
+ _picture->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags);
@@ -227,7 +228,7 @@ void AnimationResource::load(byte *source, int size) {
uint16 lineSize = sourceS->readUint16LE();
Graphics::Surface *frame = new Graphics::Surface();
- frame->create(frameWidth, frameHeight, 1);
+ frame->create(frameWidth, frameHeight, Graphics::PixelFormat::createFormatCLUT8());
decompressImage(source + frameOffs, *frame, cmdOffs, pixelOffs, maskOffs, lineSize, 0, 0, 0, _flags & 1);
diff --git a/engines/made/resource.h b/engines/made/resource.h
index ade6a23029..f1aeb7a87c 100644
--- a/engines/made/resource.h
+++ b/engines/made/resource.h
@@ -30,6 +30,7 @@
#include "common/file.h"
#include "common/stream.h"
#include "common/hashmap.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
#include "audio/audiostream.h"
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index 2649e2bd37..4a73ba8e38 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -28,6 +28,8 @@
#include "made/resource.h"
#include "made/database.h"
+#include "graphics/palette.h"
+
namespace Made {
Screen::Screen(MadeEngine *vm) : _vm(vm) {
@@ -36,10 +38,10 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
_newPalette = new byte[768];
_backgroundScreen = new Graphics::Surface();
- _backgroundScreen->create(320, 200, 1);
+ _backgroundScreen->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
_workScreen = new Graphics::Surface();
- _workScreen->create(320, 200, 1);
+ _workScreen->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
_backgroundScreenDrawCtx.clipRect = Common::Rect(320, 200);
_workScreenDrawCtx.clipRect = Common::Rect(320, 200);
@@ -51,7 +53,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
// Screen mask is only needed in v2 games
if (_vm->getGameID() != GID_RTZ) {
_screenMask = new Graphics::Surface();
- _screenMask->create(320, 200, 1);
+ _screenMask->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
_maskDrawCtx.clipRect = Common::Rect(320, 200);
_maskDrawCtx.destSurface = _screenMask;
}
diff --git a/engines/made/script.h b/engines/made/script.h
index 16c5ad604f..be719eba5f 100644
--- a/engines/made/script.h
+++ b/engines/made/script.h
@@ -29,6 +29,7 @@
#include "common/util.h"
#include "common/file.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Made {
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index 4f1937c057..c0a723438e 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -23,9 +23,7 @@
*
*/
-#include "common/endian.h"
#include "common/util.h"
-#include "common/events.h"
#include "backends/audiocd/audiocd.h"
#include "graphics/cursorman.h"
diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h
index 3bed27c5c8..b8b2a87d19 100644
--- a/engines/made/scriptfuncs.h
+++ b/engines/made/scriptfuncs.h
@@ -34,7 +34,7 @@
#include "made/resource.h"
namespace Audio {
- class PCSpeaker;
+class PCSpeaker;
}
namespace Made {
diff --git a/engines/metaengine.h b/engines/metaengine.h
index 2afed0703b..ef34506991 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -37,8 +37,8 @@ class Engine;
class OSystem;
namespace Common {
- class FSList;
- class String;
+class FSList;
+class String;
}
/**
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp
index c8111fa91b..02548d58fc 100644
--- a/engines/mohawk/bitmap.cpp
+++ b/engines/mohawk/bitmap.cpp
@@ -31,6 +31,7 @@
#include "common/memstream.h"
#include "common/substream.h"
#include "common/system.h"
+#include "common/textconsole.h"
namespace Mohawk {
@@ -135,8 +136,12 @@ Common::Array<MohawkSurface *> MohawkBitmap::decodeImages(Common::SeekableReadSt
Graphics::Surface *MohawkBitmap::createSurface(uint16 width, uint16 height) {
Graphics::Surface *surface = new Graphics::Surface();
- byte bytesPerPixel = (getBitsPerPixel() <= 8) ? 1 : g_system->getScreenFormat().bytesPerPixel;
- surface->create(width, height, bytesPerPixel);
+ Graphics::PixelFormat format;
+ if (getBitsPerPixel() <= 8)
+ format = Graphics::PixelFormat::createFormatCLUT8();
+ else
+ format = g_system->getScreenFormat();
+ surface->create(width, height, format);
return surface;
}
@@ -569,7 +574,7 @@ void MohawkBitmap::drawRaw(Graphics::Surface *surface) {
byte b = _data->readByte();
byte g = _data->readByte();
byte r = _data->readByte();
- if (surface->bytesPerPixel == 2)
+ if (surface->format.bytesPerPixel == 2)
*((uint16 *)surface->getBasePtr(x, y)) = pixelFormat.RGBToColor(r, g, b);
else
*((uint32 *)surface->getBasePtr(x, y)) = pixelFormat.RGBToColor(r, g, b);
@@ -608,13 +613,12 @@ void MohawkBitmap::drawRLE8(Graphics::Surface *surface, bool isLE) {
if (code & 0x80) {
byte val = _data->readByte();
- for (uint16 j = 0; j < runLen; j++)
- *dst++ = val;
+ memset(dst, val, runLen);
} else {
- for (uint16 j = 0; j < runLen; j++)
- *dst++ = _data->readByte();
+ _data->read(dst, runLen);
}
+ dst += runLen;
remaining -= runLen;
}
@@ -857,7 +861,7 @@ MohawkSurface *DOSBitmap::decodeImage(Common::SeekableReadStream *stream) {
}
void DOSBitmap::expandMonochromePlane(Graphics::Surface *surface, Common::SeekableReadStream *rawStream) {
- assert(surface->bytesPerPixel == 1);
+ assert(surface->format.bytesPerPixel == 1);
byte *dst = (byte *)surface->pixels;
@@ -883,7 +887,7 @@ void DOSBitmap::expandMonochromePlane(Graphics::Surface *surface, Common::Seekab
*(dst + j * 4 + dstPixel) = (*(dst + j * 4 + dstPixel) >> 1) | (((temp >> srcBit) & 1) << 3)
void DOSBitmap::expandEGAPlanes(Graphics::Surface *surface, Common::SeekableReadStream *rawStream) {
- assert(surface->bytesPerPixel == 1);
+ assert(surface->format.bytesPerPixel == 1);
// Note that the image is in EGA planar form and not just standard 4bpp
// This seems to contradict the PoP specs which seem to do
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index ee67c9f23c..93cbe87e55 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -29,6 +29,9 @@
#include "mohawk/sound.h"
#include "mohawk/video.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+
#ifdef ENABLE_CSTIME
#include "mohawk/cstime.h"
#endif
diff --git a/engines/mohawk/cstime.cpp b/engines/mohawk/cstime.cpp
index 955e0e5af6..46faae08f5 100644
--- a/engines/mohawk/cstime.cpp
+++ b/engines/mohawk/cstime.cpp
@@ -30,15 +30,14 @@
#include "mohawk/cstime_view.h"
#include "mohawk/resource.h"
#include "mohawk/cursors.h"
-#include "mohawk/sound.h"
#include "mohawk/video.h"
#include "common/config-manager.h"
+#include "common/error.h"
#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/fs.h"
-
-#include "engines/util.h"
+#include "common/textconsole.h"
namespace Mohawk {
diff --git a/engines/mohawk/cstime_cases.cpp b/engines/mohawk/cstime_cases.cpp
index 408f1c9d9a..c4801f822c 100644
--- a/engines/mohawk/cstime_cases.cpp
+++ b/engines/mohawk/cstime_cases.cpp
@@ -26,6 +26,8 @@
#include "mohawk/cstime_cases.h"
#include "mohawk/cstime_ui.h"
+#include "common/textconsole.h"
+
namespace Mohawk {
CSTimeCase1::CSTimeCase1(MohawkEngine_CSTime *vm) : CSTimeCase(vm, 1) {
diff --git a/engines/mohawk/cstime_game.cpp b/engines/mohawk/cstime_game.cpp
index 14e5d99e51..66dce1da92 100644
--- a/engines/mohawk/cstime_game.cpp
+++ b/engines/mohawk/cstime_game.cpp
@@ -29,6 +29,8 @@
#include "mohawk/resource.h"
#include "mohawk/sound.h"
#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
namespace Mohawk {
diff --git a/engines/mohawk/cstime_ui.cpp b/engines/mohawk/cstime_ui.cpp
index 935b0321da..106f7ea319 100644
--- a/engines/mohawk/cstime_ui.cpp
+++ b/engines/mohawk/cstime_ui.cpp
@@ -29,6 +29,8 @@
#include "mohawk/resource.h"
#include "common/algorithm.h" // find
#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/fontman.h"
namespace Mohawk {
diff --git a/engines/mohawk/cstime_view.cpp b/engines/mohawk/cstime_view.cpp
index 115b363b6e..12d641a9ff 100644
--- a/engines/mohawk/cstime_view.cpp
+++ b/engines/mohawk/cstime_view.cpp
@@ -30,6 +30,8 @@
#include "mohawk/cursors.h"
#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
namespace Mohawk {
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index b4969f990a..3327860913 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -29,9 +29,11 @@
#include "common/macresman.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/winexe_ne.h"
#include "common/winexe_pe.h"
#include "graphics/cursorman.h"
+#include "graphics/maccursor.h"
#include "graphics/wincursor.h"
#ifdef ENABLE_MYST
@@ -41,11 +43,6 @@
namespace Mohawk {
-static const byte s_bwPalette[] = {
- 0x00, 0x00, 0x00, // Black
- 0xFF, 0xFF, 0xFF // White
-};
-
void CursorManager::showCursor() {
CursorMan.showMouse(true);
}
@@ -78,8 +75,13 @@ void CursorManager::setDefaultCursor() {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0
};
+ static const byte bwPalette[] = {
+ 0x00, 0x00, 0x00, // Black
+ 0xFF, 0xFF, 0xFF // White
+ };
+
CursorMan.replaceCursor(defaultCursor, 12, 20, 0, 0, 0);
- CursorMan.replaceCursorPalette(s_bwPalette, 1, 2);
+ CursorMan.replaceCursorPalette(bwPalette, 1, 2);
}
void CursorManager::setCursor(uint16 id) {
@@ -87,35 +89,24 @@ void CursorManager::setCursor(uint16 id) {
setDefaultCursor();
}
-void CursorManager::setMacXorCursor(Common::SeekableReadStream *stream) {
+void CursorManager::setMacCursor(Common::SeekableReadStream *stream) {
assert(stream);
- byte cursorBitmap[16 * 16];
+ Graphics::MacCursor *macCursor = new Graphics::MacCursor();
- // Get black and white data
- for (int i = 0; i < 32; i++) {
- byte imageByte = stream->readByte();
- for (int b = 0; b < 8; b++)
- cursorBitmap[i * 8 + b] = (imageByte & (0x80 >> b)) ? 1 : 2;
- }
+ if (!macCursor->readFromStream(*stream))
+ error("Could not parse Mac cursor");
- // Apply mask data
- for (int i = 0; i < 32; i++) {
- byte imageByte = stream->readByte();
- for (int b = 0; b < 8; b++)
- if ((imageByte & (0x80 >> b)) == 0)
- cursorBitmap[i * 8 + b] = 0;
- }
-
- uint16 hotspotY = stream->readUint16BE();
- uint16 hotspotX = stream->readUint16BE();
+ CursorMan.replaceCursor(macCursor->getSurface(), macCursor->getWidth(), macCursor->getHeight(),
+ macCursor->getHotspotX(), macCursor->getHotspotY(), macCursor->getKeyColor());
+ CursorMan.replaceCursorPalette(macCursor->getPalette(), 0, 256);
- CursorMan.replaceCursor(cursorBitmap, 16, 16, hotspotX, hotspotY, 0);
- CursorMan.replaceCursorPalette(s_bwPalette, 1, 2);
+ delete macCursor;
+ delete stream;
}
void DefaultCursorManager::setCursor(uint16 id) {
- setMacXorCursor(_vm->getResource(_tag, id));
+ setMacCursor(_vm->getResource(_tag, id));
}
#ifdef ENABLE_MYST
@@ -148,7 +139,7 @@ void MystCursorManager::setCursor(uint16 id) {
delete clrcStream;
// Myst ME stores some cursors as 24bpp images instead of 8bpp
- if (surface->bytesPerPixel == 1) {
+ if (surface->format.bytesPerPixel == 1) {
CursorMan.replaceCursor((byte *)surface->pixels, surface->w, surface->h, hotspotX, hotspotY, 0);
CursorMan.replaceCursorPalette(mhkSurface->getPalette(), 0, 256);
} else {
@@ -223,26 +214,12 @@ void MacCursorManager::setCursor(uint16 id) {
// Try a color cursor first
Common::SeekableReadStream *stream = _resFork->getResource(MKTAG('c','r','s','r'), id);
- if (stream) {
- byte *cursor, *palette;
- int width, height, hotspotX, hotspotY, keyColor, palSize;
-
- _resFork->convertCrsrCursor(stream, &cursor, width, height, hotspotX, hotspotY, keyColor, true, &palette, palSize);
-
- CursorMan.replaceCursor(cursor, width, height, hotspotX, hotspotY, keyColor);
- CursorMan.replaceCursorPalette(palette, 0, palSize);
-
- delete[] cursor;
- delete[] palette;
- delete stream;
- return;
- }
-
- // Fall back to b&w cursors
- stream = _resFork->getResource(MKTAG('C','U','R','S'), id);
+ // Fall back to monochrome cursors
+ if (!stream)
+ stream = _resFork->getResource(MKTAG('C','U','R','S'), id);
if (stream) {
- setMacXorCursor(stream);
+ setMacCursor(stream);
delete stream;
} else {
setDefaultCursor();
@@ -265,7 +242,7 @@ LivingBooksCursorManager_v2::~LivingBooksCursorManager_v2() {
void LivingBooksCursorManager_v2::setCursor(uint16 id) {
if (_sysArchive && _sysArchive->hasResource(ID_TCUR, id)) {
- setMacXorCursor(_sysArchive->getResource(ID_TCUR, id));
+ setMacCursor(_sysArchive->getResource(ID_TCUR, id));
} else {
// TODO: Handle generated cursors
}
diff --git a/engines/mohawk/cursors.h b/engines/mohawk/cursors.h
index f8a9429689..ba9700c9f9 100644
--- a/engines/mohawk/cursors.h
+++ b/engines/mohawk/cursors.h
@@ -29,11 +29,11 @@
#include "common/scummsys.h"
namespace Common {
- class MacResManager;
- class NEResources;
- class PEResources;
- class SeekableReadStream;
- class String;
+class MacResManager;
+class NEResources;
+class PEResources;
+class SeekableReadStream;
+class String;
}
#include "mohawk/resource.h"
@@ -63,8 +63,8 @@ public:
virtual bool hasSource() const { return false; }
protected:
- // Set a Mac XOR/AND map cursor to the screen
- void setMacXorCursor(Common::SeekableReadStream *stream);
+ // Set a Mac CURS/crsr cursor to the screen
+ void setMacCursor(Common::SeekableReadStream *stream);
};
// The default Mohawk cursor manager
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index cad24b55f1..c14d3327d0 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -26,9 +26,9 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
-#include "common/config-manager.h"
-#include "common/file.h"
#include "common/savefile.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "mohawk/livingbooks.h"
@@ -141,6 +141,7 @@ static const PlainGameDescriptor mohawkGames[] = {
{"rugrats", "Rugrats Adventure Game"},
{"lbsampler", "Living Books Sampler"},
{"bearfight", "The Berenstain Bears Get in a Fight"},
+ {"beardark", "The Berenstain Bears In The Dark"},
{"arthurcomp", "Arthur's Computer Adventure"},
{"harryhh","Harry and the Haunted House"},
{"stellaluna", "Stellaluna"},
diff --git a/engines/mohawk/detection_tables.h b/engines/mohawk/detection_tables.h
index a8f9ee557b..36dbcbde7b 100644
--- a/engines/mohawk/detection_tables.h
+++ b/engines/mohawk/detection_tables.h
@@ -793,6 +793,21 @@ static const MohawkGameDescription gameDescriptions[] = {
{
{
+ "seussabc",
+ "Demo",
+ AD_ENTRY1("BookOutline", "17d72660680ae32cd7c560d0cf04d2ef"),
+ Common::EN_ANY,
+ Common::kPlatformMacintosh,
+ ADGF_DEMO,
+ Common::GUIO_NONE
+ },
+ GType_LIVINGBOOKSV2,
+ GF_DEMO,
+ 0
+ },
+
+ {
+ {
"1stdegree",
"",
AD_ENTRY1("AL236_1.MHK", "3ba145492a7b8b4dee0ef4222c5639c3"),
@@ -1023,6 +1038,23 @@ static const MohawkGameDescription gameDescriptions[] = {
0
},
+ // Just Grandma and Me 1.0
+ // From scoriae
+ {
+ {
+ "grandma",
+ "v1.0",
+ AD_ENTRY1("PAGES.512", "e694ac10f957dd2e20611350bf968da3"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_LIVINGBOOKSV1,
+ GF_LB_10,
+ "GRANDMA.EXE"
+ },
+
{
{
"grandma",
@@ -1254,6 +1286,22 @@ static const MohawkGameDescription gameDescriptions[] = {
0
},
+ // From zerep in bug #3287894
+ {
+ {
+ "arthurbday",
+ "",
+ AD_ENTRY1("BIRTHDAY.512", "874f80ff363214d63593864e58c4a130"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_LIVINGBOOKSV1,
+ 0,
+ "BIRTHDAY.EXE"
+ },
+
{
{
"arthurbday",
@@ -1545,6 +1593,55 @@ static const MohawkGameDescription gameDescriptions[] = {
"Bears Get in a Fight"
},
+ // From bkennimer in bug #3284930
+ {
+ {
+ "beardark",
+ "",
+ AD_ENTRY1("DARK.LB", "81d1e6eaf88d54bd29836a133935c0d4"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_LIVINGBOOKSV3,
+ 0,
+ 0
+ },
+
+ // From bkennimer in bug #3284930
+ // 32-bit version of the previous entry
+ {
+ {
+ "beardark",
+ "",
+ AD_ENTRY1("DARK32.LB", "28abbf5498aeb29e78e5e0dec969ebe2"),
+ Common::EN_ANY,
+ Common::kPlatformWindows,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_LIVINGBOOKSV3,
+ 0,
+ 0
+ },
+
+ // From bkennimer in bug #3284930
+ {
+ {
+ "beardark",
+ "",
+ AD_ENTRY1("BookOutline", "95b2e43778ca9cfaee37bdde843e7681"),
+ Common::EN_ANY,
+ Common::kPlatformMacintosh,
+ ADGF_NO_FLAGS,
+ Common::GUIO_NONE
+ },
+ GType_LIVINGBOOKSV3,
+ 0,
+ 0
+ },
+
{
{
"arthurcomp",
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index c5a0c7e86d..4c7e52f02f 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -27,7 +27,9 @@
#include "mohawk/dialogs.h"
#include "gui/gui-manager.h"
-#include "common/savefile.h"
+#include "gui/ThemeEngine.h"
+#include "gui/widget.h"
+#include "common/system.h"
#include "common/translation.h"
#ifdef ENABLE_MYST
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index 81d2b6f019..a1bcb55f7b 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -28,7 +28,10 @@
#include "mohawk/livingbooks.h"
#include "common/substream.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "engines/util.h"
+#include "graphics/palette.h"
#include "graphics/primitives.h"
#include "gui/message.h"
@@ -70,14 +73,14 @@ MohawkSurface::~MohawkSurface() {
void MohawkSurface::convertToTrueColor() {
assert(_surface);
- if (_surface->bytesPerPixel > 1)
+ if (_surface->format.bytesPerPixel > 1)
return;
assert(_palette);
Graphics::PixelFormat pixelFormat = g_system->getScreenFormat();
Graphics::Surface *surface = new Graphics::Surface();
- surface->create(_surface->w, _surface->h, pixelFormat.bytesPerPixel);
+ surface->create(_surface->w, _surface->h, pixelFormat);
for (uint16 i = 0; i < _surface->h; i++) {
for (uint16 j = 0; j < _surface->w; j++) {
@@ -292,7 +295,7 @@ MystGraphics::MystGraphics(MohawkEngine_Myst* vm) : GraphicsManager(), _vm(vm) {
// Initialize our buffer
_backBuffer = new Graphics::Surface();
- _backBuffer->create(_vm->_system->getWidth(), _vm->_system->getHeight(), _pixelFormat.bytesPerPixel);
+ _backBuffer->create(_vm->_system->getWidth(), _vm->_system->getHeight(), _pixelFormat);
}
MystGraphics::~MystGraphics() {
@@ -486,7 +489,7 @@ void MystGraphics::copyImageSectionToBackBuffer(uint16 image, Common::Rect src,
debug(3, "\theight: %d", height);
for (uint16 i = 0; i < height; i++)
- memcpy(_backBuffer->getBasePtr(dest.left, i + dest.top), surface->getBasePtr(src.left, top + i), width * surface->bytesPerPixel);
+ memcpy(_backBuffer->getBasePtr(dest.left, i + dest.top), surface->getBasePtr(src.left, top + i), width * surface->format.bytesPerPixel);
}
void MystGraphics::copyImageToScreen(uint16 image, Common::Rect dest) {
@@ -646,7 +649,7 @@ RivenGraphics::RivenGraphics(MohawkEngine_Riven* vm) : GraphicsManager(), _vm(vm
// The actual game graphics only take up the first 392 rows. The inventory
// occupies the rest of the screen and we don't use the buffer to hold that.
_mainScreen = new Graphics::Surface();
- _mainScreen->create(608, 392, _pixelFormat.bytesPerPixel);
+ _mainScreen->create(608, 392, _pixelFormat);
_updatesEnabled = true;
_scheduledTransition = -1; // no transition
@@ -677,7 +680,7 @@ void RivenGraphics::copyImageToScreen(uint16 image, uint32 left, uint32 top, uin
surface->w = 608 - left;
for (uint16 i = 0; i < surface->h; i++)
- memcpy(_mainScreen->getBasePtr(left, i + top), surface->getBasePtr(0, i), surface->w * surface->bytesPerPixel);
+ memcpy(_mainScreen->getBasePtr(left, i + top), surface->getBasePtr(0, i), surface->w * surface->format.bytesPerPixel);
_dirtyScreen = true;
}
@@ -972,7 +975,7 @@ void RivenGraphics::drawImageRect(uint16 id, Common::Rect srcRect, Common::Rect
assert(srcRect.width() == dstRect.width() && srcRect.height() == dstRect.height());
for (uint16 i = 0; i < srcRect.height(); i++)
- memcpy(_mainScreen->getBasePtr(dstRect.left, i + dstRect.top), surface->getBasePtr(srcRect.left, i + srcRect.top), srcRect.width() * surface->bytesPerPixel);
+ memcpy(_mainScreen->getBasePtr(dstRect.left, i + dstRect.top), surface->getBasePtr(srcRect.left, i + srcRect.top), srcRect.width() * surface->format.bytesPerPixel);
_dirtyScreen = true;
}
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index 5cac68c510..c7e9b98d49 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -33,7 +33,7 @@
#include "graphics/pict.h"
namespace Graphics {
- class JPEG;
+class JPEG;
}
namespace Mohawk {
diff --git a/engines/mohawk/installer_archive.cpp b/engines/mohawk/installer_archive.cpp
index 4ea742dff6..5079375896 100644
--- a/engines/mohawk/installer_archive.cpp
+++ b/engines/mohawk/installer_archive.cpp
@@ -27,8 +27,6 @@
#include "common/dcl.h"
#include "common/debug.h"
-#include "common/substream.h"
-#include "common/util.h"
namespace Mohawk {
diff --git a/engines/mohawk/installer_archive.h b/engines/mohawk/installer_archive.h
index 565b363be3..d33fbe5bcd 100644
--- a/engines/mohawk/installer_archive.h
+++ b/engines/mohawk/installer_archive.h
@@ -27,6 +27,8 @@
#include "common/scummsys.h"
#include "common/endian.h"
#include "common/file.h"
+#include "common/hash-str.h"
+#include "common/hashmap.h"
#include "common/str.h"
#ifndef MOHAWK_INSTALLER_ARCHIVE_H
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 7f6c3cc43a..2475965812 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -26,13 +26,17 @@
#include "mohawk/livingbooks.h"
#include "mohawk/resource.h"
#include "mohawk/cursors.h"
-#include "mohawk/sound.h"
#include "mohawk/video.h"
+#include "common/config-manager.h"
+#include "common/error.h"
#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/fs.h"
#include "common/archive.h"
+#include "common/textconsole.h"
+
+#include "graphics/palette.h"
#include "engines/util.h"
@@ -2004,7 +2008,7 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
size -= target.size() + 1;
}
- if (size % 2 != oldAlign) {
+ if ((uint)(size % 2) != oldAlign) {
stream->skip(1);
size--;
}
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp
index 84f69af2ac..4237c712d9 100644
--- a/engines/mohawk/livingbooks_code.cpp
+++ b/engines/mohawk/livingbooks_code.cpp
@@ -26,6 +26,9 @@
#include "mohawk/livingbooks.h"
#include "mohawk/resource.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+
namespace Mohawk {
bool LBValue::operator==(const LBValue &x) const {
diff --git a/engines/mohawk/mohawk.cpp b/engines/mohawk/mohawk.cpp
index 015cbffb26..f63645f1ac 100644
--- a/engines/mohawk/mohawk.cpp
+++ b/engines/mohawk/mohawk.cpp
@@ -24,13 +24,9 @@
*/
#include "common/scummsys.h"
-#include "common/config-manager.h"
-#include "common/file.h"
-#include "common/events.h"
-#include "common/keyboard.h"
-
-#include "base/plugins.h"
-#include "base/version.h"
+#include "common/error.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "mohawk/mohawk.h"
#include "mohawk/cursors.h"
diff --git a/engines/mohawk/mohawk.h b/engines/mohawk/mohawk.h
index 1bad8a08ce..8a853d151e 100644
--- a/engines/mohawk/mohawk.h
+++ b/engines/mohawk/mohawk.h
@@ -34,7 +34,7 @@
class OSystem;
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
/**
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 1aba820fed..655a38b578 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -25,7 +25,9 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
+#include "common/system.h"
#include "common/translation.h"
+#include "common/textconsole.h"
#include "mohawk/cursors.h"
#include "mohawk/graphics.h"
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index 21f6627f60..dc00bff923 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -29,6 +29,10 @@
#include "mohawk/sound.h"
#include "mohawk/video.h"
+#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+
namespace Mohawk {
MystResource::MystResource(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystResource *parent) {
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index 17a2c66091..71c408ed37 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -31,6 +31,8 @@
#include "mohawk/sound.h"
#include "mohawk/video.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "gui/message.h"
namespace Mohawk {
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index 26267cfbda..cba2583a50 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -32,7 +32,9 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/channelwood.h"
-#include "gui/message.h"
+#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
namespace Mohawk {
namespace MystStacks {
diff --git a/engines/mohawk/myst_stacks/credits.cpp b/engines/mohawk/myst_stacks/credits.cpp
index 61772eda4d..bb8397fd09 100644
--- a/engines/mohawk/myst_stacks/credits.cpp
+++ b/engines/mohawk/myst_stacks/credits.cpp
@@ -30,6 +30,7 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/credits.h"
+#include "common/system.h"
#include "gui/message.h"
namespace Mohawk {
diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp
index ffbf9c991f..e2a11eb94f 100644
--- a/engines/mohawk/myst_stacks/dni.cpp
+++ b/engines/mohawk/myst_stacks/dni.cpp
@@ -31,6 +31,8 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/dni.h"
+#include "common/system.h"
+
namespace Mohawk {
namespace MystStacks {
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index 3dab2f7939..c5c11026f5 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -32,7 +32,8 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/mechanical.h"
-#include "gui/message.h"
+#include "common/events.h"
+#include "common/system.h"
namespace Mohawk {
namespace MystStacks {
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 5d070322ca..2b8ef94442 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -33,6 +33,8 @@
#include "mohawk/myst_stacks/myst.h"
#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "gui/message.h"
diff --git a/engines/mohawk/myst_stacks/preview.cpp b/engines/mohawk/myst_stacks/preview.cpp
index dc491c7573..fddf6290fb 100644
--- a/engines/mohawk/myst_stacks/preview.cpp
+++ b/engines/mohawk/myst_stacks/preview.cpp
@@ -30,6 +30,7 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/preview.h"
+#include "common/system.h"
#include "gui/message.h"
namespace Mohawk {
diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index f485bab2f9..c670cb6a48 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -32,6 +32,8 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/selenitic.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "gui/message.h"
namespace Mohawk {
@@ -816,7 +818,7 @@ void Selenitic::o_soundLockEndMove(uint16 op, uint16 var, uint16 argc, uint16 *a
debugC(kDebugScript, "Opcode %d: Sound lock end move", op);
MystResourceType10 *slider = soundLockSliderFromVar(var);
- uint16 *value = 0;
+ uint16 *value = &_state.soundLockSliderPositions[0];
switch (var) {
case 20: // Sound lock sliders
@@ -834,6 +836,9 @@ void Selenitic::o_soundLockEndMove(uint16 op, uint16 var, uint16 argc, uint16 *a
case 24:
value = &_state.soundLockSliderPositions[4];
break;
+ default:
+ error("Incorrect var value for Selenitic opcode 114");
+ break;
}
uint16 stepped = 12 * (*value / 12) + 6;
diff --git a/engines/mohawk/myst_stacks/slides.cpp b/engines/mohawk/myst_stacks/slides.cpp
index e664081c96..4057edd9c9 100644
--- a/engines/mohawk/myst_stacks/slides.cpp
+++ b/engines/mohawk/myst_stacks/slides.cpp
@@ -30,6 +30,7 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/slides.h"
+#include "common/system.h"
#include "gui/message.h"
namespace Mohawk {
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp
index b5b403dad8..07701c273e 100644
--- a/engines/mohawk/myst_stacks/stoneship.cpp
+++ b/engines/mohawk/myst_stacks/stoneship.cpp
@@ -32,7 +32,9 @@
#include "mohawk/video.h"
#include "mohawk/myst_stacks/stoneship.h"
-#include "gui/message.h"
+#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
namespace Mohawk {
namespace MystStacks {
diff --git a/engines/mohawk/myst_state.cpp b/engines/mohawk/myst_state.cpp
index 968bb422be..de71dcf382 100644
--- a/engines/mohawk/myst_state.cpp
+++ b/engines/mohawk/myst_state.cpp
@@ -27,7 +27,9 @@
#include "mohawk/myst.h"
#include "mohawk/myst_state.h"
+#include "common/debug.h"
#include "common/serializer.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Mohawk {
diff --git a/engines/mohawk/myst_state.h b/engines/mohawk/myst_state.h
index a543cb1c4f..074c3e5f10 100644
--- a/engines/mohawk/myst_state.h
+++ b/engines/mohawk/myst_state.h
@@ -31,7 +31,7 @@
#include "common/str.h"
namespace Common {
- class Serializer;
+class Serializer;
}
namespace Mohawk {
diff --git a/engines/mohawk/resource.cpp b/engines/mohawk/resource.cpp
index de1513b237..62250b75f2 100644
--- a/engines/mohawk/resource.cpp
+++ b/engines/mohawk/resource.cpp
@@ -28,6 +28,7 @@
#include "common/debug.h"
#include "common/substream.h"
#include "common/util.h"
+#include "common/textconsole.h"
namespace Mohawk {
diff --git a/engines/mohawk/riven.h b/engines/mohawk/riven.h
index 88927884a2..3aba5643db 100644
--- a/engines/mohawk/riven.h
+++ b/engines/mohawk/riven.h
@@ -35,6 +35,7 @@
#include "common/hashmap.h"
#include "common/hash-str.h"
#include "common/random.h"
+#include "common/rect.h"
namespace Mohawk {
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 7c453dec48..dc0d66f19b 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -32,6 +32,7 @@
#include "gui/message.h"
#include "common/events.h"
+#include "common/system.h"
namespace Mohawk {
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp
index 35f38c4069..b8f86f993a 100644
--- a/engines/mohawk/riven_scripts.cpp
+++ b/engines/mohawk/riven_scripts.cpp
@@ -33,6 +33,7 @@
#include "common/memstream.h"
#include "common/stream.h"
+#include "common/system.h"
namespace Mohawk {
diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h
index 46cd965f40..2ac805c366 100644
--- a/engines/mohawk/riven_scripts.h
+++ b/engines/mohawk/riven_scripts.h
@@ -28,6 +28,7 @@
#include "common/str-array.h"
#include "common/ptr.h"
+#include "common/textconsole.h"
class MohawkEngine_Riven;
diff --git a/engines/mohawk/sound.cpp b/engines/mohawk/sound.cpp
index 9759f14699..fba87808d2 100644
--- a/engines/mohawk/sound.cpp
+++ b/engines/mohawk/sound.cpp
@@ -25,7 +25,10 @@
#include "mohawk/sound.h"
+#include "common/debug.h"
+#include "common/system.h"
#include "common/util.h"
+#include "common/textconsole.h"
#include "audio/musicplugin.h"
#include "audio/audiostream.h"
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index f481b5ceb2..8f57d61cc4 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -27,9 +27,16 @@
#include "mohawk/resource.h"
#include "mohawk/video.h"
+#include "common/debug.h"
#include "common/events.h"
+#include "common/textconsole.h"
+#include "common/system.h"
+
+#include "graphics/surface.h"
+
#include "video/qt_decoder.h"
+
namespace Mohawk {
void VideoEntry::clear() {
@@ -219,7 +226,7 @@ bool VideoManager::updateMovies() {
// Convert from 8bpp to the current screen format if necessary
Graphics::PixelFormat pixelFormat = _vm->_system->getScreenFormat();
- if (frame->bytesPerPixel == 1) {
+ if (frame->format.bytesPerPixel == 1) {
if (pixelFormat.bytesPerPixel == 1) {
if (_videoStreams[i]->hasDirtyPalette())
_videoStreams[i]->setSystemPalette();
@@ -228,7 +235,7 @@ bool VideoManager::updateMovies() {
const byte *palette = _videoStreams[i]->getPalette();
assert(palette);
- convertedFrame->create(frame->w, frame->h, pixelFormat.bytesPerPixel);
+ convertedFrame->create(frame->w, frame->h, pixelFormat);
for (uint16 j = 0; j < frame->h; j++) {
for (uint16 k = 0; k < frame->w; k++) {
diff --git a/engines/mohawk/view.cpp b/engines/mohawk/view.cpp
index 837d386b58..e5a44122ea 100644
--- a/engines/mohawk/view.cpp
+++ b/engines/mohawk/view.cpp
@@ -28,6 +28,8 @@
#include "mohawk/graphics.h"
#include "common/stream.h"
#include "common/system.h"
+#include "common/textconsole.h"
+#include "graphics/palette.h"
namespace Mohawk {
diff --git a/engines/parallaction/balloons.cpp b/engines/parallaction/balloons.cpp
index 527f2d2812..2cf6eebf2a 100644
--- a/engines/parallaction/balloons.cpp
+++ b/engines/parallaction/balloons.cpp
@@ -304,7 +304,7 @@ int BalloonManager_ns::createBalloon(int16 w, int16 h, int16 winding, uint16 bor
int16 real_h = (winding == -1) ? h : h + 9;
balloon->surface = new Graphics::Surface;
- balloon->surface->create(w, real_h, 1);
+ balloon->surface->create(w, real_h, Graphics::PixelFormat::createFormatCLUT8());
balloon->surface->fillRect(Common::Rect(w, real_h), BALLOON_TRANSPARENT_COLOR_NS);
Common::Rect r(w, h);
@@ -578,7 +578,7 @@ Graphics::Surface *BalloonManager_br::expandBalloon(Frames *data, int frameNum)
rect.translate(-rect.left, -rect.top);
Graphics::Surface *surf = new Graphics::Surface;
- surf->create(rect.width(), rect.height(), 1);
+ surf->create(rect.width(), rect.height(), Graphics::PixelFormat::createFormatCLUT8());
_vm->_gfx->unpackBlt(rect, data->getData(frameNum), data->getRawSize(frameNum), surf, LAYER_FOREGROUND, 100, BALLOON_TRANSPARENT_COLOR_BR);
@@ -670,7 +670,7 @@ int BalloonManager_br::createBalloon(int16 w, int16 h, uint16 borderThickness) {
Balloon *balloon = &_intBalloons[id];
balloon->surface = new Graphics::Surface;
- balloon->surface->create(w, h, 1);
+ balloon->surface->create(w, h, Graphics::PixelFormat::createFormatCLUT8());
Common::Rect rect(w, h);
balloon->surface->fillRect(rect, 1);
diff --git a/engines/parallaction/callables_br.cpp b/engines/parallaction/callables_br.cpp
index 21703dc1dd..0bc6f6762c 100644
--- a/engines/parallaction/callables_br.cpp
+++ b/engines/parallaction/callables_br.cpp
@@ -25,6 +25,8 @@
#include "parallaction/parallaction.h"
+#include "common/textconsole.h"
+
namespace Parallaction {
void Parallaction_br::_c_null(void*) {
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index f67a77aa21..8e3c2cbeb8 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -28,6 +28,7 @@
#include "common/config-manager.h"
#include "engines/advancedDetector.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "parallaction/parallaction.h"
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index e3d02bac62..944d9f4b55 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -25,6 +25,7 @@
#include "common/events.h"
#include "common/debug-channels.h"
+#include "common/textconsole.h"
#include "parallaction/exec.h"
#include "parallaction/input.h"
#include "parallaction/parallaction.h"
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
index 6928c1eefc..d996b72e90 100644
--- a/engines/parallaction/disk.cpp
+++ b/engines/parallaction/disk.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "common/iff_container.h"
+#include "common/textconsole.h"
+
#include "parallaction/disk.h"
#include "parallaction/graphics.h"
@@ -36,7 +39,7 @@ void ILBMLoader::setupBuffer(uint32 w, uint32 h) {
_surf = new Graphics::Surface;
assert(_surf);
}
- _surf->create(w, h, 1);
+ _surf->create(w, h, Graphics::PixelFormat::createFormatCLUT8());
_mode = Graphics::ILBMDecoder::ILBM_UNPACK_PLANES;
_intBuffer = (byte*)_surf->pixels;
break;
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h
index 8ff0efd3c6..9af189af68 100644
--- a/engines/parallaction/disk.h
+++ b/engines/parallaction/disk.h
@@ -29,14 +29,20 @@
#define PATH_LEN 200
#include "common/archive.h"
+#include "common/str.h"
-#include "graphics/surface.h"
#include "graphics/iff.h"
namespace Common {
- class FSDirectory;
+class FSDirectory;
+class ReadStream;
+class SeekableReadStream;
+struct IFFChunk;
}
+namespace Graphics {
+struct Surface;
+}
namespace Parallaction {
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index 34b04cd00f..cea4091ee9 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -27,6 +27,7 @@
#include "common/config-manager.h"
#include "common/fs.h"
+#include "common/textconsole.h"
#include "parallaction/parallaction.h"
#include "parallaction/parser.h"
@@ -227,7 +228,7 @@ void DosDisk_br::loadBitmap(Common::SeekableReadStream &stream, Graphics::Surfac
stream.skip(768);
}
- surf.create(width, height, 1);
+ surf.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
stream.read(surf.pixels, width * height);
}
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index 133b7bef6c..e695fa8798 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -27,6 +27,7 @@
#include "common/fs.h"
#include "common/memstream.h"
#include "common/substream.h"
+#include "common/textconsole.h"
#include "parallaction/parser.h"
#include "parallaction/parallaction.h"
@@ -473,7 +474,7 @@ void DosDisk_ns::loadBackground(BackgroundInfo& info, const char *filename) {
}
// read bitmap, mask and path data and extract them into the 3 buffers
- info.bg.create(info.width, info.height, 1);
+ info.bg.create(info.width, info.height, Graphics::PixelFormat::createFormatCLUT8());
createMaskAndPathBuffers(info);
unpackBackground(stream, (byte*)info.bg.pixels, info._mask->data, info._path->data);
diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp
index 99aa27b30f..c879745f65 100644
--- a/engines/parallaction/exec_br.cpp
+++ b/engines/parallaction/exec_br.cpp
@@ -27,6 +27,8 @@
#include "parallaction/input.h"
#include "parallaction/parallaction.h"
+#include "common/textconsole.h"
+
namespace Parallaction {
#define INST_ON 1
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp
index c8a5ee1548..ee357576d2 100644
--- a/engines/parallaction/exec_ns.cpp
+++ b/engines/parallaction/exec_ns.cpp
@@ -28,6 +28,7 @@
#include "parallaction/parallaction.h"
#include "parallaction/sound.h"
+#include "common/textconsole.h"
namespace Parallaction {
diff --git a/engines/parallaction/font.cpp b/engines/parallaction/font.cpp
index 18f469f0a2..a459e6a600 100644
--- a/engines/parallaction/font.cpp
+++ b/engines/parallaction/font.cpp
@@ -25,6 +25,7 @@
#include "common/endian.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "parallaction/parallaction.h"
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index 6c39b2e696..ca99624ecd 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -28,6 +28,7 @@
#include "disk.h"
#include "common/algorithm.h"
+#include "common/textconsole.h"
#include "parallaction/parallaction.h"
namespace Parallaction {
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 35441d7e3e..d33e733677 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -26,6 +26,8 @@
#include "common/system.h"
#include "common/file.h"
+#include "common/textconsole.h"
+#include "graphics/palette.h"
#include "graphics/primitives.h"
#include "engines/util.h"
@@ -521,7 +523,7 @@ void Gfx::invertBackground(const Common::Rect& r) {
void setupLabelSurface(Graphics::Surface &surf, uint w, uint h) {
- surf.create(w, h, 1);
+ surf.create(w, h, Graphics::PixelFormat::createFormatCLUT8());
surf.fillRect(Common::Rect(w,h), LABEL_TRANSPARENT_COLOR);
}
@@ -857,7 +859,7 @@ void Gfx::setBackground(uint type, BackgroundInfo *info) {
int height = CLIP(info->height, (int)_vm->_screenHeight, info->height);
if (width != _backBuffer.w || height != _backBuffer.h) {
- _backBuffer.create(width, height, 1);
+ _backBuffer.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
}
}
diff --git a/engines/parallaction/gui.cpp b/engines/parallaction/gui.cpp
index c4a36e5362..db70ebb432 100644
--- a/engines/parallaction/gui.cpp
+++ b/engines/parallaction/gui.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "parallaction/gui.h"
namespace Parallaction {
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index c80a9940a2..41e3082464 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -24,6 +24,7 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "parallaction/gui.h"
#include "parallaction/input.h"
@@ -483,7 +484,7 @@ public:
_y = 90;
Graphics::Surface *surf = new Graphics::Surface;
- surf->create(w, 110, 1);
+ surf->create(w, 110, Graphics::PixelFormat::createFormatCLUT8());
surf->fillRect(Common::Rect(0, 0, w, 110), 12);
surf->fillRect(Common::Rect(10, 10, w-10, 100), 15);
diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp
index 51d3ba5799..6b863cc808 100644
--- a/engines/parallaction/gui_ns.cpp
+++ b/engines/parallaction/gui_ns.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/hashmap.h"
+#include "common/textconsole.h"
#include "parallaction/gui.h"
#include "parallaction/input.h"
@@ -474,7 +475,7 @@ class SelectCharacterInputState_NS : public MenuInputState {
public:
SelectCharacterInputState_NS(Parallaction_ns *vm, MenuInputHelper *helper) : MenuInputState("selectcharacter", helper), _vm(vm) {
_keys = (_vm->getPlatform() == Common::kPlatformAmiga && (_vm->getFeatures() & GF_LANG_MULT)) ? _amigaKeys : _pcKeys;
- _block.create(BLOCK_WIDTH, BLOCK_HEIGHT, 1);
+ _block.create(BLOCK_WIDTH, BLOCK_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
_labels[0] = 0;
_labels[1] = 0;
@@ -625,7 +626,7 @@ public:
_vm->_soundManI->stopMusic();
_vm->showSlide("password");
- _emptySlots.create(BLOCK_WIDTH * 8, BLOCK_HEIGHT, 1);
+ _emptySlots.create(BLOCK_WIDTH * 8, BLOCK_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
Common::Rect rect(SLOT_X, SLOT_Y, SLOT_X + BLOCK_WIDTH * 8, SLOT_Y + BLOCK_HEIGHT);
_vm->_gfx->grabBackground(rect, _emptySlots);
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index e508668d80..3a47b14deb 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -25,6 +25,7 @@
#include "common/events.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
#include "parallaction/exec.h"
@@ -486,7 +487,7 @@ void Input::initCursors() {
_donnaCursor = _vm->_disk->loadPointer("pointer3");
Graphics::Surface *surf = new Graphics::Surface;
- surf->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, 1);
+ surf->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, Graphics::PixelFormat::createFormatCLUT8());
_comboArrow = new SurfaceToFrames(surf);
// TODO: choose the pointer depending on the active character
@@ -495,12 +496,12 @@ void Input::initCursors() {
} else {
// TODO: Where are the Amiga cursors?
Graphics::Surface *surf1 = new Graphics::Surface;
- surf1->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, 1);
+ surf1->create(_mouseComboProps_BR._width, _mouseComboProps_BR._height, Graphics::PixelFormat::createFormatCLUT8());
_comboArrow = new SurfaceToFrames(surf1);
// TODO: scale mouse cursor (see staticres.cpp)
Graphics::Surface *surf2 = new Graphics::Surface;
- surf2->create(32, 16, 1);
+ surf2->create(32, 16, Graphics::PixelFormat::createFormatCLUT8());
memcpy(surf2->pixels, _resMouseArrow_BR_Amiga, 32*16);
_mouseArrow = new SurfaceToFrames(surf2);
}
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index 5ead55bbef..2412cc6445 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -26,7 +26,7 @@
#include "parallaction/input.h"
#include "parallaction/parallaction.h"
-
+#include "common/textconsole.h"
namespace Parallaction {
@@ -141,7 +141,7 @@ void Parallaction::closeInventory() {
InventoryRenderer::InventoryRenderer(Parallaction *vm, InventoryProperties *props, Inventory *inv) : _vm(vm), _props(props), _inv(inv) {
- _surf.create(_props->_width, _props->_height, 1);
+ _surf.create(_props->_width, _props->_height, Graphics::PixelFormat::createFormatCLUT8());
}
InventoryRenderer::~InventoryRenderer() {
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index c345b92ffb..e1306dc956 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "parallaction/parallaction.h"
#include "parallaction/objects.h"
#include "parallaction/parser.h"
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 3055439e47..516d465671 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -23,13 +23,10 @@
*
*/
-#include "common/config-manager.h"
#include "common/debug-channels.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
-#include "common/file.h"
-#include "common/util.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "parallaction/exec.h"
#include "parallaction/input.h"
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index a8a57ed2d8..b0b1145d2e 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -32,6 +32,7 @@
#include "common/func.h"
#include "common/random.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "engines/engine.h"
@@ -268,7 +269,7 @@ public:
virtual Common::Error run() {
Common::Error err;
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 619a4f7559..ca344792cf 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/util.h"
+#include "common/textconsole.h"
#include "parallaction/parallaction.h"
#include "parallaction/exec.h"
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index ffac22e118..ffc0412b1d 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -25,6 +25,7 @@
#include "common/system.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "parallaction/parallaction.h"
#include "parallaction/exec.h"
diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp
index c964b74512..a7b926e485 100644
--- a/engines/parallaction/parser.cpp
+++ b/engines/parallaction/parser.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "parallaction/parallaction.h"
#include "parallaction/parser.h"
diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp
index 9748be0526..f8818def9a 100644
--- a/engines/parallaction/parser_br.cpp
+++ b/engines/parallaction/parser_br.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "common/textconsole.h"
#include "parallaction/parallaction.h"
#include "parallaction/parser.h"
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index 5053a3d7a5..6c9afe3d85 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "parallaction/parallaction.h"
#include "parallaction/parser.h"
#include "parallaction/sound.h"
diff --git a/engines/parallaction/saveload.cpp b/engines/parallaction/saveload.cpp
index b8116d6bc7..4c77aa3e02 100644
--- a/engines/parallaction/saveload.cpp
+++ b/engines/parallaction/saveload.cpp
@@ -25,6 +25,7 @@
#include "common/savefile.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "gui/dialog.h"
#include "gui/saveload.h"
@@ -313,7 +314,7 @@ void SaveLoad_ns::renameOldSavefiles() {
if (_saveFileMan->renameSavefile(oldName, newName)) {
success++;
} else {
- warning("Error %i (%s) occurred while renaming %s to %s", _saveFileMan->getError(),
+ warning("Error %i (%s) occurred while renaming %s to %s", _saveFileMan->getError().getCode(),
_saveFileMan->getErrorDesc().c_str(), oldName.c_str(), newName.c_str());
}
}
diff --git a/engines/parallaction/sound_br.cpp b/engines/parallaction/sound_br.cpp
index ee53f9641e..abfaa4bf5d 100644
--- a/engines/parallaction/sound_br.cpp
+++ b/engines/parallaction/sound_br.cpp
@@ -24,6 +24,7 @@
*/
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "audio/mixer.h"
diff --git a/engines/parallaction/sound_ns.cpp b/engines/parallaction/sound_ns.cpp
index ba81314da6..5123695ebc 100644
--- a/engines/parallaction/sound_ns.cpp
+++ b/engines/parallaction/sound_ns.cpp
@@ -24,8 +24,8 @@
*/
#include "common/file.h"
-
#include "common/stream.h"
+#include "common/textconsole.h"
#include "audio/mixer.h"
#include "audio/midiparser.h"
diff --git a/engines/queen/command.cpp b/engines/queen/command.cpp
index 356856e940..87b24735a8 100644
--- a/engines/queen/command.cpp
+++ b/engines/queen/command.cpp
@@ -24,8 +24,6 @@
*/
-#include "common/events.h"
-#include "common/system.h"
#include "queen/command.h"
#include "queen/display.h"
diff --git a/engines/queen/cutaway.cpp b/engines/queen/cutaway.cpp
index 11a8704d60..6fb48c7fb0 100644
--- a/engines/queen/cutaway.cpp
+++ b/engines/queen/cutaway.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "common/textconsole.h"
#include "queen/cutaway.h"
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index b130b27a89..c78fd8ebcc 100644
--- a/engines/queen/display.cpp
+++ b/engines/queen/display.cpp
@@ -29,6 +29,7 @@
#include "common/events.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "queen/display.h"
#include "queen/input.h"
diff --git a/engines/queen/display.h b/engines/queen/display.h
index d3391fc4d3..e7a2ecd4a1 100644
--- a/engines/queen/display.h
+++ b/engines/queen/display.h
@@ -32,8 +32,9 @@
#include "queen/defs.h"
class OSystem;
+
namespace Common {
- struct Rect;
+struct Rect;
}
namespace Queen {
diff --git a/engines/queen/graphics.cpp b/engines/queen/graphics.cpp
index 17e36b1d90..c86f679765 100644
--- a/engines/queen/graphics.cpp
+++ b/engines/queen/graphics.cpp
@@ -34,6 +34,9 @@
#include "queen/resource.h"
#include "queen/sound.h"
+#include "common/debug.h"
+#include "common/textconsole.h"
+
namespace Queen {
void BobSlot::curPos(int16 xx, int16 yy) {
diff --git a/engines/queen/input.cpp b/engines/queen/input.cpp
index 9518388b26..eac855a0cd 100644
--- a/engines/queen/input.cpp
+++ b/engines/queen/input.cpp
@@ -26,6 +26,7 @@
#include "common/events.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "queen/queen.h"
#include "queen/input.h"
diff --git a/engines/queen/journal.cpp b/engines/queen/journal.cpp
index aff24be22e..4200168f07 100644
--- a/engines/queen/journal.cpp
+++ b/engines/queen/journal.cpp
@@ -24,6 +24,7 @@
*/
+#include "common/error.h"
#include "common/events.h"
#include "common/system.h"
#include "queen/journal.h"
diff --git a/engines/queen/logic.cpp b/engines/queen/logic.cpp
index de254300b6..e99a739726 100644
--- a/engines/queen/logic.cpp
+++ b/engines/queen/logic.cpp
@@ -25,8 +25,7 @@
#include "common/config-manager.h"
-#include "common/events.h"
-#include "common/system.h"
+#include "common/textconsole.h"
#include "queen/logic.h"
diff --git a/engines/queen/midiadlib.cpp b/engines/queen/midiadlib.cpp
index b03c90f653..af52f7ed2b 100644
--- a/engines/queen/midiadlib.cpp
+++ b/engines/queen/midiadlib.cpp
@@ -24,6 +24,7 @@
*/
#include "common/endian.h"
+#include "common/textconsole.h"
#include "audio/fmopl.h"
#include "audio/softsynth/emumidi.h"
diff --git a/engines/queen/music.cpp b/engines/queen/music.cpp
index 58ecfa6d16..5d1a06ccb2 100644
--- a/engines/queen/music.cpp
+++ b/engines/queen/music.cpp
@@ -99,8 +99,8 @@ MidiMusic::MidiMusic(QueenEngine *vm)
MidiMusic::~MidiMusic() {
_driver->setTimerCallback(0, 0);
_parser->unloadMusic();
- _driver->close();
delete _parser;
+ _driver->close();
delete _driver;
delete[] _buf;
delete[] _musicData;
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 519f028cda..0dde5c7b42 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -32,6 +32,7 @@
#include "common/system.h"
#include "common/events.h"
#include "common/EventRecorder.h"
+#include "common/textconsole.h"
#include "engines/util.h"
diff --git a/engines/queen/queen.h b/engines/queen/queen.h
index 93d705b182..6098a9f5c2 100644
--- a/engines/queen/queen.h
+++ b/engines/queen/queen.h
@@ -30,7 +30,7 @@
#include "common/random.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
#if defined(_WIN32_WCE) && (_WIN32_WCE <= 300)
diff --git a/engines/queen/resource.cpp b/engines/queen/resource.cpp
index e8519ee68b..62b13e290c 100644
--- a/engines/queen/resource.cpp
+++ b/engines/queen/resource.cpp
@@ -27,6 +27,7 @@
#include "common/endian.h"
#include "common/config-manager.h"
#include "common/substream.h"
+#include "common/textconsole.h"
#include "queen/resource.h"
namespace Queen {
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index a34af99ec3..afb77f3969 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -27,6 +27,7 @@
#include "common/config-manager.h"
#include "common/endian.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "queen/sound.h"
#include "queen/input.h"
diff --git a/engines/queen/sound.h b/engines/queen/sound.h
index cee0463ed1..a89e345791 100644
--- a/engines/queen/sound.h
+++ b/engines/queen/sound.h
@@ -32,7 +32,7 @@
#include "queen/defs.h"
namespace Common {
- class File;
+class File;
}
namespace Queen {
diff --git a/engines/queen/talk.cpp b/engines/queen/talk.cpp
index 106b0d6123..18c712b799 100644
--- a/engines/queen/talk.cpp
+++ b/engines/queen/talk.cpp
@@ -24,9 +24,8 @@
*/
-#include "common/events.h"
-#include "common/system.h"
#include "common/rect.h"
+#include "common/textconsole.h"
#include "queen/talk.h"
diff --git a/engines/queen/walk.cpp b/engines/queen/walk.cpp
index 7765828bd7..a778ea5b05 100644
--- a/engines/queen/walk.cpp
+++ b/engines/queen/walk.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "common/textconsole.h"
#include "queen/walk.h"
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index 5fc2082178..4930718b67 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -34,6 +34,7 @@
#include "common/system.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "engines/util.h"
namespace Saga {
@@ -46,7 +47,7 @@ Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height) : _vm(vm), _sys
debug(5, "Init screen %dx%d", width, height);
// Convert surface data to R surface data
- _backBuffer.create(width, height, 1);
+ _backBuffer.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
// Start with the cursor shown. It will be hidden before the intro, if
// there is an intro. (With boot params, there may not be.)
diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h
index 33fac10c63..56d9104371 100644
--- a/engines/saga/gfx.h
+++ b/engines/saga/gfx.h
@@ -28,6 +28,7 @@
#ifndef SAGA_GFX_H
#define SAGA_GFX_H
+#include "common/rect.h"
#include "graphics/surface.h"
namespace Saga {
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 5a3b229c9d..c3773b2cb2 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -1379,9 +1379,7 @@ void Interface::setSave(PanelButton *panelButton) {
fileName = _vm->calcSaveFileName(_vm->getSaveFile(_optionSaveFileTitleNumber)->slotNumber);
_vm->save(fileName, _textInputString);
}
- _vm->getTimerManager()->removeTimerProc(&saveReminderCallback);
- _vm->getTimerManager()->installTimerProc(&saveReminderCallback, TIMETOSAVE, this);
- setSaveReminderState(1);
+ resetSaveReminder();
_textInput = false;
setMode(kPanelOption);
@@ -1393,6 +1391,12 @@ void Interface::setSave(PanelButton *panelButton) {
}
}
+void Interface::resetSaveReminder() {
+ _vm->getTimerManager()->removeTimerProc(&saveReminderCallback);
+ _vm->getTimerManager()->installTimerProc(&saveReminderCallback, TIMETOSAVE, this);
+ setSaveReminderState(1);
+}
+
void Interface::handleOptionUpdate(const Point& mousePoint) {
int16 mouseY;
Rect rect;
@@ -2794,7 +2798,7 @@ void Interface::keyBoss() {
Rect rect;
ByteArray image;
int imageWidth, imageHeight;
- const byte *pal;
+ //const byte *pal;
PalEntry cPal[PAL_ENTRIES];
_vm->_gfx->showCursor(false);
@@ -2814,7 +2818,7 @@ void Interface::keyBoss() {
rect.setHeight(imageHeight);
_vm->_gfx->getCurrentPal(_mapSavedPal);
- pal = _vm->getImagePal(resourceData);
+ //pal = _vm->getImagePal(resourceData);
cPal[0].red = 0;
cPal[0].green = 0;
diff --git a/engines/saga/interface.h b/engines/saga/interface.h
index b9a96653a7..09631bf0e8 100644
--- a/engines/saga/interface.h
+++ b/engines/saga/interface.h
@@ -288,6 +288,8 @@ public:
int32 getProtectHash() { return _protectHash; }
+ void resetSaveReminder();
+
private:
void handleMainUpdate(const Point& mousePoint); // main panel update
void handleMainClick(const Point& mousePoint); // main panel click
diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp
index 5ae80b14c9..7f04474c61 100644
--- a/engines/saga/introproc_saga2.cpp
+++ b/engines/saga/introproc_saga2.cpp
@@ -31,7 +31,10 @@
#include "saga/scene.h"
#include "saga/gfx.h"
-#include "audio/mixer.h"
+#include "common/events.h"
+#include "common/keyboard.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
#include "video/smk_decoder.h"
diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp
index dc9334b037..837a9e5879 100644
--- a/engines/saga/render.cpp
+++ b/engines/saga/render.cpp
@@ -56,7 +56,7 @@ Render::Render(SagaEngine *vm, OSystem *system) {
_vm->getTimerManager()->installTimerProc(&fpsTimerCallback, 1000000, this);
#endif
- _backGroundSurface.create(_vm->getDisplayInfo().width, _vm->getDisplayInfo().height, 1);
+ _backGroundSurface.create(_vm->getDisplayInfo().width, _vm->getDisplayInfo().height, Graphics::PixelFormat::createFormatCLUT8());
_flags = 0;
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 52c4b824e7..4df44a2e18 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -31,6 +31,7 @@
#include "common/array.h"
#include "common/random.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "audio/mididrv.h"
#include "saga/gfx.h"
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 9edb79fa7c..27300377e9 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -23,10 +23,8 @@
*
*/
-#include "common/config-manager.h"
#include "common/savefile.h"
#include "common/system.h"
-#include "common/file.h"
#include "graphics/thumbnail.h"
#include "saga/saga.h"
@@ -256,6 +254,8 @@ void SagaEngine::save(const char *fileName, const char *saveName) {
warning("Can't write file '%s'. (Disk full?)", fileName);
delete out;
+
+ _interface->resetSaveReminder();
}
void SagaEngine::load(const char *fileName) {
diff --git a/engines/saga/shorten.cpp b/engines/saga/shorten.cpp
index 685cb26aa7..8f0baa9d53 100644
--- a/engines/saga/shorten.cpp
+++ b/engines/saga/shorten.cpp
@@ -24,6 +24,7 @@
*/
#include "common/scummsys.h"
+#include "common/textconsole.h"
#include "saga/shorten.h"
@@ -34,10 +35,8 @@
// FIXME: This doesn't work yet correctly
-#include "common/endian.h"
#include "common/util.h"
-#include "audio/mixer.h"
#include "audio/decoders/raw.h"
namespace Saga {
diff --git a/engines/savestate.cpp b/engines/savestate.cpp
index 368f59ef51..bed19ba3e5 100644
--- a/engines/savestate.cpp
+++ b/engines/savestate.cpp
@@ -25,6 +25,7 @@
#include "engines/savestate.h"
#include "graphics/surface.h"
+#include "common/textconsole.h"
void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) {
if (_thumbnail.get() == t)
diff --git a/engines/savestate.h b/engines/savestate.h
index 37f2b9bdd4..9b64a96aee 100644
--- a/engines/savestate.h
+++ b/engines/savestate.h
@@ -32,7 +32,7 @@
namespace Graphics {
- struct Surface;
+struct Surface;
}
/**
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 7c351c6220..419f5e1415 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -442,7 +442,7 @@ ResourceType parseResourceType(const char *resid) {
}
bool Console::cmdGetVersion(int argc, const char **argv) {
- const char *viewTypeDesc[] = { "Unknown", "EGA", "VGA", "VGA SCI1.1", "Amiga" };
+ const char *viewTypeDesc[] = { "Unknown", "EGA", "Amiga ECS 32 colors", "Amiga AGA 64 colors", "VGA", "VGA SCI1.1" };
bool hasVocab997 = g_sci->getResMan()->testResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SELECTORS)) ? true : false;
Common::String gameVersion = "N/A";
@@ -1532,7 +1532,7 @@ bool Console::cmdUndither(int argc, const char **argv) {
}
bool flag = atoi(argv[1]) ? true : false;
- _engine->_gfxScreen->debugUnditherSetState(flag);
+ _engine->_gfxScreen->enableUndithering(flag);
if (flag)
DebugPrintf("undithering ENABLED\n");
else
diff --git a/engines/sci/decompressor.cpp b/engines/sci/decompressor.cpp
index 73d4ed4198..c122fceeb0 100644
--- a/engines/sci/decompressor.cpp
+++ b/engines/sci/decompressor.cpp
@@ -28,9 +28,8 @@
#include "common/dcl.h"
#include "common/util.h"
#include "common/endian.h"
-#include "common/debug.h"
-#include "common/debug-channels.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "sci/decompressor.h"
#include "sci/sci.h"
diff --git a/engines/sci/decompressor.h b/engines/sci/decompressor.h
index 88e24fcc47..8b6f955ddb 100644
--- a/engines/sci/decompressor.h
+++ b/engines/sci/decompressor.h
@@ -28,7 +28,9 @@
#include "common/scummsys.h"
-namespace Common { class ReadStream; }
+namespace Common {
+class ReadStream;
+}
namespace Sci {
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 82522a6e77..0e2f64257a 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -28,6 +28,7 @@
#include "common/file.h"
#include "common/str.h"
#include "common/savefile.h"
+#include "common/system.h"
#include "common/translation.h"
#include "gui/saveload.h"
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp
index 907e0ba2e4..80425224bf 100644
--- a/engines/sci/engine/kmisc.cpp
+++ b/engines/sci/engine/kmisc.cpp
@@ -411,7 +411,8 @@ reg_t kMacPlatform(EngineState *s, int argc, reg_t *argv) {
return kIconBar(s, argc - 1, argv + 1);
case 7: // Unknown, but always return -1
return SIGNAL_REG;
- case 1: // Unknown, calls QuickDraw region functions (KQ5, QFG1VGA)
+ case 1: // Unknown, calls QuickDraw region functions (KQ5, QFG1VGA, Dr. Brain 1)
+ break; // removed warning, as it produces a lot of spam in the console
case 2: // Unknown, "UseNextWaitEvent" (Various)
case 3: // Unknown, "ProcessOpenDocuments" (Various)
case 5: // Unknown, plays a sound (KQ7)
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index f93a6716b9..f4392df8f2 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -128,7 +128,7 @@ reg_t kSetJump(EngineState *s, int argc, reg_t *argv) {
debugC(kDebugLevelBresen, "c: %d, tmp: %d", c, tmp);
// Compute x step
- if (tmp != 0)
+ if (tmp != 0 && dx != 0)
vx = (int16)((float)(dx * sqrt(gy / (2.0 * tmp))));
else
vx = 0;
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 911713d0bd..7fb6ac296e 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -32,6 +32,7 @@
#include "sci/sound/soundcmd.h"
#include "audio/mixer.h"
+#include "common/system.h"
namespace Sci {
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index d9bb1c3531..e79af70158 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -175,7 +175,7 @@ reg_t kReadNumber(EngineState *s, int argc, reg_t *argv) {
#define ALIGN_NONE 0
#define ALIGN_RIGHT 1
#define ALIGN_LEFT -1
-#define ALIGN_CENTRE 2
+#define ALIGN_CENTER 2
/* Format(targ_address, textresnr, index_inside_res, ...)
** or
@@ -246,7 +246,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
if (xfer == '0')
fillchar = '0';
else if (xfer == '=')
- align = ALIGN_CENTRE;
+ align = ALIGN_CENTER;
else if (isdigit(xfer) || (xfer == '-'))
source--; // Go to start of length argument
@@ -258,7 +258,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
if (str_leng < 0) {
align = ALIGN_LEFT;
str_leng = -str_leng;
- } else if (align != ALIGN_CENTRE)
+ } else if (align != ALIGN_CENTER)
align = ALIGN_RIGHT;
xfer = *source++;
@@ -298,7 +298,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
*target++ = ' '; /* Format into the text */
break;
- case ALIGN_CENTRE: {
+ case ALIGN_CENTER: {
int half_extralen = extralen >> 1;
while (half_extralen-- > 0)
*target++ = ' '; /* Format into the text */
@@ -315,7 +315,7 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
switch (align) {
- case ALIGN_CENTRE: {
+ case ALIGN_CENTER: {
int half_extralen;
align = 0;
half_extralen = extralen - (extralen >> 1);
diff --git a/engines/sci/engine/kvideo.cpp b/engines/sci/engine/kvideo.cpp
index 6a411d8e23..a8d4437148 100644
--- a/engines/sci/engine/kvideo.cpp
+++ b/engines/sci/engine/kvideo.cpp
@@ -29,7 +29,14 @@
#include "sci/graphics/cursor.h"
#include "sci/graphics/palette.h"
#include "sci/graphics/screen.h"
-#include "graphics/cursorman.h"
+#include "common/events.h"
+#include "common/keyboard.h"
+#include "common/str.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+#include "graphics/pixelformat.h"
+#include "graphics/surface.h"
+#include "video/video_decoder.h"
#include "video/avi_decoder.h"
#include "video/qt_decoder.h"
#include "sci/video/seq_decoder.h"
diff --git a/engines/sci/engine/object.h b/engines/sci/engine/object.h
index 81d5b2c983..8ae06f2707 100644
--- a/engines/sci/engine/object.h
+++ b/engines/sci/engine/object.h
@@ -28,6 +28,7 @@
#include "common/array.h"
#include "common/serializer.h"
+#include "common/textconsole.h"
#include "sci/sci.h" // for the SCI versions
#include "sci/engine/vm_types.h" // for reg_t
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index fb96518f19..25bf91c3ad 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -611,7 +611,7 @@ void Script::initialiseObjectsSci0(SegManager *segMan, SegmentId segmentId) {
// #3150767.
// Same happens with script 764, it seems to
// contain junk towards its end.
- _objects.erase(addr.toUint16() + (getSciVersion() < SCI_VERSION_1_1) ? 8 : 0);
+ _objects.erase(addr.toUint16() - SCRIPT_OBJECT_MAGIC_OFFSET);
} else {
error("Failed to locate base object for object at %04X:%04X", PRINT_REG(addr));
}
diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 54ae88a17e..06540e6f43 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -874,9 +874,50 @@ const uint16 qfg3PatchDialogCrash[] = {
PATCH_END
};
+// Part of script 47 that handles the barter icon checks for the wrong local.
+// The local is supposed to contain the value returned by a previous kDisplay
+// call, but since the wrong one is checked, it contains junk instead. We
+// remove that check here (this doesn't affect the game at all). This occurs
+// when attempting to purchase something from a vendor and the barter button is
+// available (e.g. when buying the robe or meat from the associated vendors).
+// Fixes bug #3292251.
+const byte qfg3BarterCrash[] = {
+ 22,
+ 0x83, 0x10, // lal 10 ---> BUG! Wrong local
+ 0x30, 0x11, 0x00, // bnt 0011 ---> the accumulator will now contain garbage, so this check fails
+ 0x35, 0x00, // ldi 00
+ 0xa5, 0x00, // sat 00
+ 0x39, 0x03, // pushi 03
+ 0x5b, 0x04, 0x00, // lea 04 00
+ 0x36, // push
+ 0x39, 0x6c, // pushi 6c
+ 0x8b, 0x10, // lsl 10 ---> local 10 contains garbage, so the call below will fail
+ 0x43, 0x1b, 0x06 // callk Display[1b] 06
+};
+
+// Same as above, but for local 0x11
+const byte qfg3BarterCrash2[] = {
+ 18,
+ 0x83, 0x11, // lal 11 ---> BUG! Wrong local
+ 0x30, 0x0d, 0x00, // bnt 000d ---> the accumulator will now contain garbage, so this check fails
+ 0x39, 0x03, // pushi 03
+ 0x5b, 0x04, 0x00, // lea 04 00
+ 0x36, // push
+ 0x39, 0x6c, // pushi 6c
+ 0x8b, 0x11, // lsl 11 ---> local 11 contains garbage, so the call below will fail
+ 0x43, 0x1b, 0x06 // callk Display[1b] 06
+};
+
+const uint16 qfg3PatchBarterCrash[] = {
+ 0x35, 0x00, // ldi 00 ---> the accumulator will always be zero, so the problematic code won't run
+ PATCH_END
+};
+
// script, description, magic DWORD, adjust
const SciScriptSignature qfg3Signatures[] = {
{ 23, "dialog crash", 1, PATCH_MAGICDWORD(0xe7, 0x03, 0x22, 0x33), -1, qfg3DialogCrash, qfg3PatchDialogCrash },
+ { 47, "barter crash", 1, PATCH_MAGICDWORD(0x83, 0x10, 0x30, 0x11), 0, qfg3BarterCrash, qfg3PatchBarterCrash },
+ { 47, "barter crash 2", 1, PATCH_MAGICDWORD(0x83, 0x11, 0x30, 0x0d), 0, qfg3BarterCrash2, qfg3PatchBarterCrash },
{ 944, "import dialog continuous calls", 1, PATCH_MAGICDWORD(0x2a, 0x31, 0x0b, 0x7a), -1, qfg3SignatureImportDialog, qfg3PatchImportDialog },
SCI_SIGNATUREENTRY_TERMINATOR
};
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index d91118ec1e..cd6d56500a 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -32,8 +32,8 @@
#include "common/str-array.h"
namespace Common {
- class SeekableReadStream;
- class WriteStream;
+class SeekableReadStream;
+class WriteStream;
}
#include "sci/sci.h"
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index d209a0ca5b..b441815014 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -25,8 +25,6 @@
#include "common/debug.h"
#include "common/debug-channels.h"
-#include "common/stack.h"
-#include "common/config-manager.h"
#include "sci/sci.h"
#include "sci/console.h"
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 0fba7a59e3..20d6cd0dd0 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -74,6 +74,11 @@ const SciWorkaroundEntry uninitializedReadWorkarounds[] = {
{ GID_HOYLE4, -1, 0, 0, NULL, "open", -1, -1, { WORKAROUND_FAKE, 0 } }, // when selecting "Control" from the menu (temp vars 0-3) - bug #3039294
{ GID_HOYLE4, 910, 18, 0, NULL, "init", -1, 0, { WORKAROUND_FAKE, 0 } }, // during tutorial - bug #3042756
{ GID_HOYLE4, 910, 910, 0, NULL, "setup", -1, 3, { WORKAROUND_FAKE, 0 } }, // when selecting "Tutorial" from the main menu - bug #3039294
+ { GID_HOYLE4, 700, 718, 0, "compete_tree", "doit", -1, 75, { WORKAROUND_FAKE, 0 } }, // when placing a bid in bridge - bug #3292332
+ { GID_HOYLE4, 700, 716, 0, "other1_tree", "doit", -1, 46, { WORKAROUND_FAKE, 0 } }, // sometimes when placing a bid in bridge
+ { 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_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
@@ -251,6 +256,7 @@ const SciWorkaroundEntry kGetAngle_workarounds[] = {
// gameID, room,script,lvl, object-name, method-name, call,index, workaround
const SciWorkaroundEntry kFindKey_workarounds[] = {
{ GID_ECOQUEST2, 100, 999, 0, "myList", "contains", -1, 0, { WORKAROUND_FAKE, 0 } }, // When Noah Greene gives Adam the Ecorder, and just before the game gives a demonstration, a null reference to a list is passed - bug #3035186
+ { GID_HOYLE4, 300, 999, 0, "Piles", "contains", -1, 0, { WORKAROUND_FAKE, 0 } }, // When passing the three cards in Hearts, a null reference to a list is passed - bug #3292333
SCI_WORKAROUNDENTRY_TERMINATOR
};
diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
index 3b95a5c955..d4d7dcfd4f 100644
--- a/engines/sci/graphics/cursor.cpp
+++ b/engines/sci/graphics/cursor.cpp
@@ -25,11 +25,11 @@
#include "common/config-manager.h"
#include "common/events.h"
-#include "common/macresman.h"
#include "common/memstream.h"
#include "common/system.h"
#include "common/util.h"
#include "graphics/cursorman.h"
+#include "graphics/maccursor.h"
#include "sci/sci.h"
#include "sci/event.h"
@@ -473,49 +473,19 @@ void GfxCursor::kernelSetMacCursor(GuiResourceId viewNum, int loopNum, int celNu
assert(resource);
- if (resource->size == 32 * 2 + 4) {
- // Mac CURS cursor
- // See http://developer.apple.com/legacy/mac/library/documentation/mac/QuickDraw/QuickDraw-402.html
- // for more information.
- byte *cursorBitmap = new byte[16 * 16];
- byte *data = resource->data;
-
- // Get B&W data
- for (byte i = 0; i < 32; i++) {
- byte imageByte = *data++;
- for (byte b = 0; b < 8; b++)
- cursorBitmap[i * 8 + b] = (byte)((imageByte & (0x80 >> b)) > 0 ? 1 : 2);
- }
-
- // Apply mask data
- for (byte i = 0; i < 32; i++) {
- byte imageByte = *data++;
- for (byte b = 0; b < 8; b++)
- if ((imageByte & (0x80 >> b)) == 0)
- cursorBitmap[i * 8 + b] = 0; // Doesn't matter, just is transparent
- }
-
- uint16 hotspotY = READ_BE_UINT16(data);
- uint16 hotspotX = READ_BE_UINT16(data + 2);
-
- static const byte cursorPalette[] = { 0x00, 0x00, 0x00, 0xff, 0xff, 0xff };
-
- CursorMan.replaceCursor(cursorBitmap, 16, 16, hotspotX, hotspotY, 0);
- CursorMan.replaceCursorPalette(cursorPalette, 1, 2);
+ Common::MemoryReadStream resStream(resource->data, resource->size);
+ Graphics::MacCursor *macCursor = new Graphics::MacCursor();
- delete[] cursorBitmap;
- } else {
- // Mac crsr cursor
- byte *cursorBitmap, *palette;
- int width, height, hotspotX, hotspotY, palSize, keycolor;
- Common::MemoryReadStream resStream(resource->data, resource->size);
- Common::MacResManager::convertCrsrCursor(&resStream, &cursorBitmap, width, height, hotspotX, hotspotY, keycolor, true, &palette, palSize);
- CursorMan.replaceCursor(cursorBitmap, width, height, hotspotX, hotspotY, keycolor);
- CursorMan.replaceCursorPalette(palette, 0, palSize);
- delete[] cursorBitmap;
- delete[] palette;
+ if (!macCursor->readFromStream(resStream)) {
+ warning("Failed to load Mac cursor %d", viewNum);
+ return;
}
+ CursorMan.replaceCursor(macCursor->getSurface(), macCursor->getWidth(), macCursor->getHeight(),
+ macCursor->getHotspotX(), macCursor->getHotspotY(), macCursor->getKeyColor());
+ CursorMan.replaceCursorPalette(macCursor->getPalette(), 0, 256);
+
+ delete macCursor;
kernelShow();
}
diff --git a/engines/sci/graphics/fontsjis.h b/engines/sci/graphics/fontsjis.h
index 684e6cac5e..5538b5c2c5 100644
--- a/engines/sci/graphics/fontsjis.h
+++ b/engines/sci/graphics/fontsjis.h
@@ -29,7 +29,7 @@
#include "sci/graphics/helpers.h"
namespace Graphics {
- class FontSJIS;
+class FontSJIS;
}
namespace Sci {
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index dd55b3b060..7fafe843fd 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -23,9 +23,15 @@
*
*/
-#include "common/util.h"
-#include "common/stack.h"
-#include "graphics/primitives.h"
+#include "common/algorithm.h"
+#include "common/events.h"
+#include "common/keyboard.h"
+#include "common/list_intern.h"
+#include "common/str.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+#include "engines/engine.h"
+#include "graphics/surface.h"
#include "sci/sci.h"
#include "sci/engine/kernel.h"
diff --git a/engines/sci/graphics/maciconbar.h b/engines/sci/graphics/maciconbar.h
index 3ac5475147..72609d19ab 100644
--- a/engines/sci/graphics/maciconbar.h
+++ b/engines/sci/graphics/maciconbar.h
@@ -31,7 +31,7 @@
#include "sci/engine/vm.h"
namespace Graphics {
- struct Surface;
+struct Surface;
}
namespace Sci {
diff --git a/engines/sci/graphics/paint.cpp b/engines/sci/graphics/paint.cpp
index c347da3c0f..27a0bdfc44 100644
--- a/engines/sci/graphics/paint.cpp
+++ b/engines/sci/graphics/paint.cpp
@@ -23,8 +23,6 @@
*
*/
-#include "common/util.h"
-#include "common/stack.h"
#include "graphics/primitives.h"
#include "sci/sci.h"
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp
index ff738fc3b9..5172f7cdc0 100644
--- a/engines/sci/graphics/paint16.cpp
+++ b/engines/sci/graphics/paint16.cpp
@@ -23,11 +23,6 @@
*
*/
-#include "common/util.h"
-#include "common/stack.h"
-#include "common/system.h"
-#include "graphics/primitives.h"
-
#include "sci/sci.h"
#include "sci/engine/features.h"
#include "sci/engine/state.h"
@@ -302,6 +297,11 @@ void GfxPaint16::bitsShow(const Common::Rect &rect) {
return;
_ports->offsetRect(workerRect);
+
+ // We adjust the left/right coordinates to even coordinates
+ workerRect.left &= 0xFFFE; // round down
+ workerRect.right = (workerRect.right + 1) & 0xFFFE; // round up
+
_screen->copyRectToScreen(workerRect);
}
@@ -472,6 +472,7 @@ void GfxPaint16::kernelGraphRedrawBox(Common::Rect rect) {
#define SCI_DISPLAY_RESTOREUNDER 108
#define SCI_DISPLAY_DUMMY1 114 // used in longbow demo/qfg1 ega demo, not supported in sierra sci - no parameters
#define SCI_DISPLAY_DUMMY2 115 // used in longbow demo, not supported in sierra sci - has 1 parameter
+#define SCI_DISPLAY_DUMMY3 117 // used in qfg1 ega demo, not supported in sierra sci - no parameters
#define SCI_DISPLAY_DONTSHOWBITS 121
reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) {
@@ -542,9 +543,10 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) {
break;
// 2 Dummy functions, longbow-demo is using those several times but sierra sci doesn't support them at all
- // The Quest for Glory 1 EGA demo also calls kDisplay(114)
+ // The Quest for Glory 1 EGA demo also calls kDisplay(114) and kDisplay(117)
case SCI_DISPLAY_DUMMY1:
case SCI_DISPLAY_DUMMY2:
+ case SCI_DISPLAY_DUMMY3:
if (!g_sci->isDemo() || (g_sci->getGameId() != GID_LONGBOW && g_sci->getGameId() != GID_QFG1))
error("Unknown kDisplay argument %d", displayArg.offset);
if (displayArg.offset == SCI_DISPLAY_DUMMY2) {
diff --git a/engines/sci/graphics/paint32.cpp b/engines/sci/graphics/paint32.cpp
index 69a278eb8b..f277436631 100644
--- a/engines/sci/graphics/paint32.cpp
+++ b/engines/sci/graphics/paint32.cpp
@@ -23,11 +23,6 @@
*
*/
-#include "common/util.h"
-#include "common/stack.h"
-
-#include "graphics/primitives.h"
-
#include "sci/sci.h"
#include "sci/engine/state.h"
#include "sci/engine/selector.h"
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 0433479a09..42551e9369 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -28,6 +28,8 @@
#include "common/util.h"
#include "common/system.h"
+#include "graphics/palette.h"
+
#include "sci/sci.h"
#include "sci/engine/state.h"
#include "sci/graphics/cache.h"
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index 82aae5399f..8cdd46268a 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -509,10 +509,12 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
memcpy(&EGApriority, &vector_defaultEGApriority, sizeof(vector_defaultEGApriority));
if (g_sci->getGameId() == GID_ICEMAN) {
- // WORKAROUND: we remove certain visual&priority lines in underwater rooms of iceman, when not dithering the
- // picture. Normally those lines aren't shown, because they share the same color as the dithered
- // fill color combination. When not dithering, those lines would appear and get distracting.
- if ((_screen->getUnditherState()) && ((_resourceId >= 53 && _resourceId <= 58) || (_resourceId == 61)))
+ // WORKAROUND: we remove certain visual&priority lines in underwater
+ // rooms of iceman, when not dithering the picture. Normally those
+ // lines aren't shown, because they share the same color as the
+ // dithered fill color combination. When not dithering, those lines
+ // would appear and get distracting.
+ if ((_screen->isUnditheringEnabled()) && ((_resourceId >= 53 && _resourceId <= 58) || (_resourceId == 61)))
icemanDrawFix = true;
}
if (g_sci->getGameId() == GID_KQ5) {
@@ -618,14 +620,17 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) {
}
break;
- // Pattern opcodes are handled in sierra sci1.1+ as actual NOPs and normally they definitely should not occur
- // inside picture data for such games
+ // Pattern opcodes are handled in sierra sci1.1+ as actual NOPs and
+ // normally they definitely should not occur inside picture data for
+ // such games.
case PIC_OP_SET_PATTERN:
if (_resourceType >= SCI_PICTURE_TYPE_SCI11) {
if (g_sci->getGameId() == GID_SQ4) {
- // WORKAROUND: For SQ4 / for some pictures handle this like a terminator
- // This picture includes garbage data, first a set pattern w/o parameter and then short pattern
- // I guess that garbage is a left over from the sq4-floppy (sci1) to sq4-cd (sci1.1) conversion
+ // WORKAROUND: For SQ4 / for some pictures handle this like
+ // a terminator. This picture includes garbage data, first a
+ // set pattern w/o parameter and then short pattern. I guess
+ // that garbage is a left over from the sq4-floppy (sci1) to
+ // sq4-cd (sci1.1) conversion.
switch (_resourceId) {
case 35:
case 381:
@@ -857,7 +862,8 @@ void GfxPicture::vectorGetPatternTexture(byte *data, int &curPos, int16 pattern_
}
}
-// Do not replace w/ some generic code. This algo really needs to behave exactly as the one from sierra
+// WARNING: Do not replace the following code with something else, like generic
+// code. This algo really needs to behave exactly as the one from sierra.
void GfxPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, byte control) {
Port *curPort = _ports->getPort();
Common::Stack<Common::Point> stack;
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index 6e9df2f019..3f9ebaa07a 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -24,9 +24,7 @@
*/
#include "common/archive.h"
-#include "common/util.h"
-#include "common/stack.h"
-#include "graphics/primitives.h"
+#include "common/system.h"
#include "sci/sci.h"
#include "sci/event.h"
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp
index f619780c7c..56e6759fac 100644
--- a/engines/sci/graphics/screen.cpp
+++ b/engines/sci/graphics/screen.cpp
@@ -111,7 +111,7 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) {
_picNotValid = 0;
_picNotValidSci11 = 0;
- _unditherState = true;
+ _unditheringEnabled = true;
_fontIsUpscaled = false;
if (_resMan->getViewType() != kViewEga) {
@@ -560,7 +560,7 @@ void GfxScreen::dither(bool addToFlag) {
byte *visualPtr = _visualScreen;
byte *displayPtr = _displayScreen;
- if (!_unditherState) {
+ if (!_unditheringEnabled) {
// Do dithering on visual and display-screen
for (y = 0; y < _height; y++) {
for (x = 0; x < _width; x++) {
@@ -624,13 +624,13 @@ void GfxScreen::ditherForceDitheredColor(byte color) {
_ditheredPicColors[color] = 256;
}
-void GfxScreen::debugUnditherSetState(bool flag) {
- _unditherState = flag;
+void GfxScreen::enableUndithering(bool flag) {
+ _unditheringEnabled = flag;
}
int16 *GfxScreen::unditherGetDitheredBgColors() {
- if (_unditherState)
- return (int16 *)&_ditheredPicColors;
+ if (_unditheringEnabled)
+ return _ditheredPicColors;
else
return NULL;
}
diff --git a/engines/sci/graphics/screen.h b/engines/sci/graphics/screen.h
index 89ad52e0ac..bfe0a50b81 100644
--- a/engines/sci/graphics/screen.h
+++ b/engines/sci/graphics/screen.h
@@ -95,9 +95,10 @@ public:
return _upscaledHires;
}
- bool getUnditherState() const {
- return _unditherState;
+ bool isUnditheringEnabled() const {
+ return _unditheringEnabled;
}
+ void enableUndithering(bool flag);
void putKanjiChar(Graphics::FontSJIS *commonFont, int16 x, int16 y, uint16 chr, byte color);
byte getVisual(int x, int y);
@@ -119,7 +120,6 @@ public:
// Force a color combination as a dithered color
void ditherForceDitheredColor(byte color);
- void debugUnditherSetState(bool flag);
int16 *unditherGetDitheredBgColors();
void debugShowMap(int mapNo);
@@ -151,7 +151,10 @@ private:
void setVerticalShakePos(uint16 shakePos);
- bool _unditherState;
+ /**
+ * If this flag is true, undithering is enabled, otherwise disabled.
+ */
+ bool _unditheringEnabled;
int16 _ditheredPicColors[DITHERED_BG_COLORS_SIZE];
// These screens have the real resolution of the game engine (320x200 for
@@ -161,13 +164,13 @@ private:
byte *_priorityScreen;
byte *_controlScreen;
- // This screen is the one that is actually displayed to the user. It may be
- // 640x400 for japanese SCI1 games. SCI0 games may be undithered in here.
- // Only read from this buffer for Save/ShowBits usage.
+ /**
+ * This screen is the one that is actually displayed to the user. It may be
+ * 640x400 for japanese SCI1 games. SCI0 games may be undithered in here.
+ * Only read from this buffer for Save/ShowBits usage.
+ */
byte *_displayScreen;
- Common::Rect getScaledRect(Common::Rect rect);
-
ResourceManager *_resMan;
/**
@@ -176,16 +179,22 @@ private:
*/
byte *_activeScreen;
- // This variable defines, if upscaled hires is active and what upscaled mode
- // is used.
+ /**
+ * This variable defines, if upscaled hires is active and what upscaled mode
+ * is used.
+ */
GfxScreenUpscaledMode _upscaledHires;
- // This here holds a translation for vertical coordinates between native
- // (visual) and actual (display) screen.
+ /**
+ * This here holds a translation for vertical coordinates between native
+ * (visual) and actual (display) screen.
+ */
int _upscaledMapping[SCI_SCREEN_UPSCALEDMAXHEIGHT + 1];
- // This defines whether or not the font we're drawing is already scaled
- // to the screen size (and we therefore should not upscale it ourselves).
+ /**
+ * This defines whether or not the font we're drawing is already scaled
+ * to the screen size (and we therefore should not upscale it ourselves).
+ */
bool _fontIsUpscaled;
uint16 getLowResScreenHeight();
diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp
index fb124055d6..dde1be13ab 100644
--- a/engines/sci/graphics/transitions.cpp
+++ b/engines/sci/graphics/transitions.cpp
@@ -24,9 +24,8 @@
*/
#include "common/events.h"
-#include "common/util.h"
-#include "common/stack.h"
#include "common/system.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "sci/sci.h"
diff --git a/engines/sci/parser/grammar.cpp b/engines/sci/parser/grammar.cpp
index 77db56adba..b330a432e3 100644
--- a/engines/sci/parser/grammar.cpp
+++ b/engines/sci/parser/grammar.cpp
@@ -31,6 +31,7 @@
#include "sci/parser/vocabulary.h"
#include "sci/console.h"
#include "common/array.h"
+#include "common/textconsole.h"
namespace Sci {
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 4caa77b0ae..a48ae0fad7 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -28,6 +28,7 @@
#include "common/file.h"
#include "common/fs.h"
#include "common/macresman.h"
+#include "common/textconsole.h"
#include "sci/resource.h"
#include "sci/resource_intern.h"
@@ -1275,7 +1276,7 @@ ResVersion ResourceManager::detectVolVersion() {
// SCI32 volume format: {bResType wResNumber dwPacked dwUnpacked wCompression} = 13 bytes
// Try to parse volume with SCI0 scheme to see if it make sense
// Checking 1MB of data should be enough to determine the version
- uint16 resId, wCompression;
+ uint16 wCompression;
uint32 dwPacked, dwUnpacked;
ResVersion curVersion = kResVersionSci0Sci1Early;
bool failed = false;
@@ -1285,7 +1286,7 @@ ResVersion ResourceManager::detectVolVersion() {
while (!fileStream->eos() && fileStream->pos() < 0x100000) {
if (curVersion > kResVersionSci0Sci1Early)
fileStream->readByte();
- resId = fileStream->readUint16LE();
+ fileStream->skip(2); // resId
dwPacked = (curVersion < kResVersionSci2) ? fileStream->readUint16LE() : fileStream->readUint32LE();
dwUnpacked = (curVersion < kResVersionSci2) ? fileStream->readUint16LE() : fileStream->readUint32LE();
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 6e74553f56..1e0b9c0ddf 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -27,6 +27,7 @@
#include "common/archive.h"
#include "common/file.h"
+#include "common/textconsole.h"
#include "sci/resource.h"
#include "sci/resource_intern.h"
diff --git a/engines/sci/resource_intern.h b/engines/sci/resource_intern.h
index 98cca6283c..969e250e62 100644
--- a/engines/sci/resource_intern.h
+++ b/engines/sci/resource_intern.h
@@ -29,7 +29,7 @@
#include "sci/resource.h"
namespace Common {
- class MacResManager;
+class MacResManager;
}
namespace Sci {
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 85c2eced19..8a81ea7240 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -218,7 +218,7 @@ Common::Error SciEngine::run() {
// Initialize the game screen
_gfxScreen = new GfxScreen(_resMan);
- _gfxScreen->debugUnditherSetState(ConfMan.getBool("disable_dithering"));
+ _gfxScreen->enableUndithering(ConfMan.getBool("disable_dithering"));
// Create debugger console. It requires GFX to be initialized
_console = new Console(this);
diff --git a/engines/sci/sound/drivers/adlib.cpp b/engines/sci/sound/drivers/adlib.cpp
index 65a8e2e3da..f00c99d5b5 100644
--- a/engines/sci/sound/drivers/adlib.cpp
+++ b/engines/sci/sound/drivers/adlib.cpp
@@ -26,6 +26,8 @@
#include "sci/sci.h"
#include "common/file.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "audio/fmopl.h"
#include "audio/softsynth/emumidi.h"
diff --git a/engines/sci/sound/drivers/amigamac.cpp b/engines/sci/sound/drivers/amigamac.cpp
index d64dfac23c..7ee8d21f86 100644
--- a/engines/sci/sound/drivers/amigamac.cpp
+++ b/engines/sci/sound/drivers/amigamac.cpp
@@ -30,6 +30,8 @@
#include "common/file.h"
#include "common/frac.h"
#include "common/memstream.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Sci {
@@ -132,6 +134,7 @@ private:
};
bool _isSci1;
+ bool _isSci1Early; // KQ1 Amiga, patch 5
bool _playSwitch;
int _masterVolume;
int _frequency;
@@ -557,6 +560,7 @@ uint32 MidiDriver_AmigaMac::property(int prop, uint32 param) {
int MidiDriver_AmigaMac::open() {
_isSci1 = false;
+ _isSci1Early = false;
for (int i = 0; i < 48; i++)
_freqTable[i] = pow(2, i / (double)48);
@@ -589,9 +593,15 @@ int MidiDriver_AmigaMac::open() {
} else {
ResourceManager *resMan = g_sci->getResMan();
- Resource *resource = resMan->findResource(ResourceId(kResourceTypePatch, 7), false);
+ Resource *resource = resMan->findResource(ResourceId(kResourceTypePatch, 7), false); // Mac
if (!resource)
- resource = resMan->findResource(ResourceId(kResourceTypePatch, 9), false);
+ resource = resMan->findResource(ResourceId(kResourceTypePatch, 9), false); // Amiga
+
+ if (!resource) {
+ resource = resMan->findResource(ResourceId(kResourceTypePatch, 5), false); // KQ1 Amiga
+ if (resource)
+ _isSci1Early = true;
+ }
// If we have a patch by this point, it's SCI1
if (resource)
@@ -896,6 +906,9 @@ bool MidiDriver_AmigaMac::loadInstrumentsSCI0Mac(Common::SeekableReadStream &fil
bool MidiDriver_AmigaMac::loadInstrumentsSCI1(Common::SeekableReadStream &file) {
_bank.size = 128;
+ if (_isSci1Early)
+ file.skip(4); // TODO: What is this offset for?
+
Common::Array<uint32> instrumentOffsets;
instrumentOffsets.resize(_bank.size);
_bank.instruments.resize(_bank.size);
@@ -908,11 +921,17 @@ bool MidiDriver_AmigaMac::loadInstrumentsSCI1(Common::SeekableReadStream &file)
if (instrumentOffsets[i] == 0)
continue;
- file.seek(instrumentOffsets[i]);
+ file.seek(instrumentOffsets[i] + (_isSci1Early ? 4 : 0));
// Read in the instrument name
file.read(_bank.instruments[i].name, 10); // last two bytes are always 0
+ // TODO: Finish off support of SCI1 early patches (patch.005 - KQ1 Amiga)
+ if (_isSci1Early) {
+ warning("Music patch 5 isn't supported yet - ignoring instrument %d", i);
+ continue;
+ }
+
for (uint32 j = 0; ; j++) {
InstrumentSample *sample = new InstrumentSample;
memset(sample, 0, sizeof(InstrumentSample));
diff --git a/engines/sci/sound/drivers/cms.cpp b/engines/sci/sound/drivers/cms.cpp
index 051fa7f1fd..47c59a1e3d 100644
--- a/engines/sci/sound/drivers/cms.cpp
+++ b/engines/sci/sound/drivers/cms.cpp
@@ -29,6 +29,8 @@
#include "audio/softsynth/cms.h"
#include "audio/mixer.h"
+#include "common/system.h"
+
#include "sci/resource.h"
namespace Sci {
diff --git a/engines/sci/sound/drivers/fb01.cpp b/engines/sci/sound/drivers/fb01.cpp
index 971c2ff92d..f217738bb2 100644
--- a/engines/sci/sound/drivers/fb01.cpp
+++ b/engines/sci/sound/drivers/fb01.cpp
@@ -30,6 +30,7 @@
#include "common/file.h"
#include "common/system.h"
+#include "common/textconsole.h"
namespace Sci {
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 9eef867aeb..f36aac3a2a 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -745,7 +745,7 @@ uint8 MidiPlayer_Midi::getGmInstrument(const Mt32ToGmMap &Mt32Ins) {
void MidiPlayer_Midi::mapMt32ToGm(byte *data, size_t size) {
// FIXME: Clean this up
int memtimbres, patches;
- uint8 group, number, keyshift, finetune, bender_range;
+ uint8 group, number, keyshift, /*finetune,*/ bender_range;
uint8 *patchpointer;
uint32 pos;
int i;
@@ -784,7 +784,7 @@ void MidiPlayer_Midi::mapMt32ToGm(byte *data, size_t size) {
group = *patchpointer;
number = *(patchpointer + 1);
keyshift = *(patchpointer + 2);
- finetune = *(patchpointer + 3);
+ //finetune = *(patchpointer + 3);
bender_range = *(patchpointer + 4);
debugCN(kDebugLevelSound, " [%03d] ", i);
diff --git a/engines/sci/sound/drivers/pcjr.cpp b/engines/sci/sound/drivers/pcjr.cpp
index 063332577e..4b1efb3c87 100644
--- a/engines/sci/sound/drivers/pcjr.cpp
+++ b/engines/sci/sound/drivers/pcjr.cpp
@@ -27,6 +27,9 @@
#include "audio/softsynth/emumidi.h"
+#include "common/debug.h"
+#include "common/system.h"
+
namespace Sci {
#define VOLUME_SHIFT 3
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 9ad964b67e..a2b09eab4c 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -325,14 +325,6 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
return acc;
}
- // If the current volume of the slot is the same as the target volume,
- // return without performing any fading. This fixes the music in room
- // 406 in KQ6 (bug #3267956), where the game scripts ask for the background
- // music to be played, and then faded to volume 127 (but the music is
- // already at volume 127) and subsequently stopped.
- if (argc >= 4 && musicSlot->volume == CLIP<uint16>(argv[1].toUint16(), 0, MUSIC_VOLUME_MAX))
- return acc;
-
switch (argc) {
case 1: // SCI0
// SCI0 fades out all the time and when fadeout is done it will also
@@ -353,7 +345,25 @@ reg_t SoundCommandParser::kDoSoundFade(int argc, reg_t *argv, reg_t acc) {
musicSlot->fadeStep = volume > musicSlot->fadeTo ? -5 : 5;
musicSlot->fadeTickerStep = argv[2].toUint16() * 16667 / _music->soundGetTempo();
musicSlot->fadeTicker = 0;
- musicSlot->stopAfterFading = (argc == 5) ? (argv[4].toUint16() != 0) : false;
+
+ if (argc == 5) {
+ // TODO: We currently treat this argument as a boolean, but may
+ // have to handle different non-zero values differently. (e.g.,
+ // some KQ6 scripts pass 3 here)
+ musicSlot->stopAfterFading = (argv[4].toUint16() != 0);
+ } else {
+ musicSlot->stopAfterFading = false;
+ }
+
+ // WORKAROUND/HACK: In the labyrinth in KQ6, when falling in the pit and
+ // lighting the lantern, the game scripts perform a fade in of the game
+ // music, but set it to stop after fading. Remove that flag here. This is
+ // marked as both a workaround and a hack because this issue could be a
+ // problem with our fading code and an incorrect handling of that
+ // parameter, or a script bug in that scene. Fixes bug #3267956.
+ if (g_sci->getGameId() == GID_KQ6 && g_sci->getEngineState()->currentRoomNumber() == 406 &&
+ musicSlot->resourceId == 400)
+ musicSlot->stopAfterFading = false;
break;
default:
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index ecdce3bd6b..debc75dffd 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -23,11 +23,10 @@
*
*/
-#include "common/debug.h"
-#include "common/endian.h"
#include "common/archive.h"
#include "common/stream.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "graphics/surface.h"
@@ -126,7 +125,7 @@ bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) {
readPaletteChunk(_header.paletteDataSize);
readFrameSizesChunk();
calculateVideoDimensions();
- _surface->create(_width, _height, 1);
+ _surface->create(_width, _height, Graphics::PixelFormat::createFormatCLUT8());
return true;
}
diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h
index 52bf0bad07..aeb638e019 100644
--- a/engines/sci/video/robot_decoder.h
+++ b/engines/sci/video/robot_decoder.h
@@ -32,6 +32,7 @@
#include "common/substream.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
+#include "graphics/pixelformat.h"
#include "video/video_decoder.h"
namespace Sci {
diff --git a/engines/sci/video/seq_decoder.cpp b/engines/sci/video/seq_decoder.cpp
index 0e69a9a352..7168496893 100644
--- a/engines/sci/video/seq_decoder.cpp
+++ b/engines/sci/video/seq_decoder.cpp
@@ -23,12 +23,10 @@
*
*/
-#include "common/debug.h"
#include "common/endian.h"
-#include "common/archive.h"
#include "common/stream.h"
#include "common/system.h"
-#include "common/util.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
@@ -61,7 +59,7 @@ bool SeqDecoder::loadStream(Common::SeekableReadStream *stream) {
_fileStream = stream;
_surface = new Graphics::Surface();
- _surface->create(SEQ_SCREEN_WIDTH, SEQ_SCREEN_HEIGHT, 1);
+ _surface->create(SEQ_SCREEN_WIDTH, SEQ_SCREEN_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
_frameCount = _fileStream->readUint16LE();
diff --git a/engines/sci/video/seq_decoder.h b/engines/sci/video/seq_decoder.h
index 70aaa661ae..70d3985ec5 100644
--- a/engines/sci/video/seq_decoder.h
+++ b/engines/sci/video/seq_decoder.h
@@ -26,8 +26,18 @@
#ifndef SCI_VIDEO_SEQ_DECODER_H
#define SCI_VIDEO_SEQ_DECODER_H
+#include "common/rational.h"
+#include "graphics/pixelformat.h"
#include "video/video_decoder.h"
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Graphics {
+struct Surface;
+}
+
namespace Sci {
/**
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 861e448221..9fb76d9d63 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -401,7 +401,7 @@ int CharsetRendererClassic::getCharWidth(uint16 chr) {
spacing++;
}
}
-
+
} else if (chr >= 0x80) {
return _vm->_2byteWidth / 2;
}
@@ -618,11 +618,12 @@ int CharsetRendererV3::getCharWidth(uint16 chr) {
spacing = 4;
} else if (chr & 0x80) {
spacing = _vm->_2byteWidth / 2;
- }
+ }
}
- if (!spacing)
+ if (!spacing) {
spacing = *(_widthTable + chr);
+ }
return spacing;
}
@@ -777,7 +778,7 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
(ignoreCharsetMask || !vs->hasTwoBuffers)) {
dst = vs->getPixels(_left, drawTop);
if (charPtr)
- drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight, vs->bytesPerPixel);
+ 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);
@@ -785,7 +786,7 @@ void CharsetRendererV3::printChar(int chr, bool ignoreCharsetMask) {
} else {
dst = (byte *)_vm->_textSurface.getBasePtr(_left * _vm->_textSurfaceMultiplier, _top * _vm->_textSurfaceMultiplier);
if (charPtr)
- drawBits1(_vm->_textSurface, dst, charPtr, drawTop, origWidth, origHeight, _vm->_textSurface.bytesPerPixel, (_vm->_textSurfaceMultiplier == 2 && !is2byte));
+ 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);
@@ -834,7 +835,7 @@ void CharsetRendererV3::drawChar(int chr, Graphics::Surface &s, int x, int y) {
height = 8;
}
dst = (byte *)s.pixels + y * s.pitch + x;
- drawBits1(s, dst, charPtr, y, width, height, s.bytesPerPixel);
+ drawBits1(s, dst, charPtr, y, width, height, s.format.bytesPerPixel);
}
void CharsetRenderer::translateColor() {
@@ -857,17 +858,17 @@ 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;
}
@@ -920,12 +921,12 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
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
@@ -947,7 +948,7 @@ void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) {
height++;
}
} else
-#endif
+#endif
{
uint32 charOffs = READ_LE_UINT32(_fontPtr + chr * 4 + 4);
assert(charOffs < 0x14000);
@@ -1096,7 +1097,7 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr,
} else
#endif
if (is2byte) {
- drawBits1(dstSurface, dstPtr, charPtr, drawTop, origWidth, origHeight, dstSurface.bytesPerPixel);
+ drawBits1(dstSurface, dstPtr, charPtr, drawTop, origWidth, origHeight, dstSurface.format.bytesPerPixel);
} else {
drawBitsN(dstSurface, dstPtr, charPtr, *_fontPtr, drawTop, origWidth, origHeight, _vm->_textSurfaceMultiplier == 2);
}
@@ -1173,7 +1174,7 @@ void CharsetRendererClassic::drawChar(int chr, Graphics::Surface &s, int x, int
dst = (byte *)s.pixels + y * s.pitch + x;
if (is2byte) {
- drawBits1(s, dst, charPtr, y, width, height, s.bytesPerPixel);
+ drawBits1(s, dst, charPtr, y, width, height, s.format.bytesPerPixel);
} else {
drawBitsN(s, dst, charPtr, *_fontPtr, y, width, height);
}
@@ -1259,14 +1260,14 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
byte *dst3 = dst2;
byte *dst4 = dst2;
- if (scale2x) {
+ if (scale2x) {
dst3 = dst2 + s.pitch;
dst4 = dst3 + s.pitch;
pitch <<= 1;
}
if (_vm->_game.platform == Common::kPlatformFMTowns && _vm->_game.version == 5)
col = _vm->_townsCharsetColorMap[1];
-#endif
+#endif
for (y = 0; y < height && y + drawTop < s.h; y++) {
for (x = 0; x < width; x++) {
@@ -1287,19 +1288,19 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
if (scale2x) {
dst[2] = dst[3] = dst2[2] = dst2[3] = _shadowColor;
dst3[0] = dst4[0] = dst3[1] = dst4[1] = _shadowColor;
- } else
+ } else
#endif
{
dst[1] = dst2[0] = _shadowColor;
if (_shadowMode != kFMTOWNSShadowMode)
dst2[1] = _shadowColor;
- }
+ }
}
dst[0] = col;
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (scale2x)
- dst[1] = dst2[0] = dst2[1] = col;
+ dst[1] = dst2[0] = dst2[1] = col;
#endif
}
}
@@ -1317,7 +1318,7 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con
dst += pitch;
dst2 += pitch;
-#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
+#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
dst3 += pitch;
dst4 += pitch;
#endif
@@ -1519,10 +1520,10 @@ void CharsetRendererNES::printChar(int chr, bool ignoreCharsetMask) {
if (ignoreCharsetMask || !vs->hasTwoBuffers) {
dst = vs->getPixels(_left, drawTop);
- drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight, vs->bytesPerPixel);
+ drawBits1(*vs, dst, charPtr, drawTop, origWidth, origHeight, vs->format.bytesPerPixel);
} else {
dst = (byte *)_vm->_textSurface.pixels + _top * _vm->_textSurface.pitch + _left;
- drawBits1(_vm->_textSurface, dst, charPtr, drawTop, origWidth, origHeight, _vm->_textSurface.bytesPerPixel);
+ drawBits1(_vm->_textSurface, dst, charPtr, drawTop, origWidth, origHeight, _vm->_textSurface.format.bytesPerPixel);
}
if (_str.left > _left)
@@ -1552,7 +1553,7 @@ void CharsetRendererNES::drawChar(int chr, Graphics::Surface &s, int x, int y) {
height = 8;
dst = (byte *)s.pixels + y * s.pitch + x;
- drawBits1(s, dst, charPtr, y, width, height, s.bytesPerPixel);
+ 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) {
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index cd366fcfd4..d0a3ec6e11 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -419,6 +419,11 @@ void ClassicCostumeRenderer::procC64(Codec1 &v1, int actor) {
#undef MASK_AT
#ifdef USE_ARM_COSTUME_ASM
+
+#ifndef IPHONE
+#define ClassicProc3RendererShadowARM _ClassicProc3RendererShadowARM
+#endif
+
extern "C" int ClassicProc3RendererShadowARM(int _scaleY,
ClassicCostumeRenderer::Codec1 *v1,
Graphics::Surface *_out,
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index bb3c4bcc02..820605924c 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -385,7 +385,7 @@ void ScummEngine_v5::redefineBuiltinCursorFromChar(int index, int chr) {
s.pitch = s.w;
// s.h = 17 for FM-TOWNS Loom Japanese. Fixes bug #1166917
assert(s.w <= 16 && s.h <= 17);
- s.bytesPerPixel = 1;
+ s.format = Graphics::PixelFormat::createFormatCLUT8();
_charset->drawChar(chr, s, 0, 0);
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 63188c1d7a..4c1942b865 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -23,7 +23,6 @@
*
*/
-#include "common/config-manager.h"
#include "common/debug-channels.h"
#include "common/file.h"
#include "common/str.h"
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 87ec7b85a4..51b46b033c 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -23,6 +23,9 @@
*
*/
+// FIXME: Avoid using printf
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "base/plugins.h"
#include "common/archive.h"
@@ -994,7 +997,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
Common::FSList fslist;
Common::FSNode dir(ConfMan.get("path"));
if (!dir.isDirectory())
- return Common::kInvalidPathError;
+ return Common::kPathNotDirectory;
if (!dir.getChildren(fslist, Common::FSNode::kListFilesOnly))
return Common::kNoGameDataFoundError;
@@ -1131,6 +1134,7 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) co
break;
case 62:
case 61:
+ case 60:
*engine = new ScummEngine_v60he(syst, res);
break;
default:
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index a5542ca868..952abdb39a 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -372,7 +372,7 @@ static const GameSettings gameVariantsTable[] = {
{"arttime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
{"baseball2001", 0, 0, GID_BASEBALL2001, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
{"readtime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
- {"SoccerMLS", 0, 0, GID_SOCCER, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
+ {"SoccerMLS", 0, 0, GID_SOCCERMLS, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
{"spyozon", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
{"freddicove", "", 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
@@ -386,7 +386,7 @@ static const GameSettings gameVariantsTable[] = {
{"Baseball2003", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
{"basketball", 0, 0, GID_BASKETBALL, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
{"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
- {"Soccer2004", 0, 0, GID_SOCCER, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
+ {"Soccer2004", 0, 0, GID_SOCCER2004, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
// U32 code required, for testing only
{"moonbase", 0, 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOLAUNCHLOAD | GUIO_NOMIDI},
@@ -483,6 +483,7 @@ static const GameFilenamePattern gameFilenamesTable[] = {
#ifdef ENABLE_SCUMM_7_8
{ "dig", "dig.la%d", kGenDiskNum, UNK_LANG, UNK, 0 },
+ { "dig", "thedig.la%d", kGenDiskNum, UNK_LANG, UNK, "Demo" }, // Used by an alternate version of the demo
{ "dig", "The Dig Data", kGenUnchanged, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "dig", "The Dig Demo Data", kGenUnchanged, UNK_LANG, Common::kPlatformMacintosh, "Demo" },
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 0e6e18905f..40e549471b 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -33,8 +33,8 @@
#include "scumm/detection.h"
namespace GUI {
- class ListWidget;
- class CommandSender;
+class ListWidget;
+class CommandSender;
}
diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp
index d9d84f04ff..47704d6eaf 100644
--- a/engines/scumm/file_nes.cpp
+++ b/engines/scumm/file_nes.cpp
@@ -28,6 +28,7 @@
#include "common/endian.h"
#include "common/md5.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
namespace Scumm {
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index a6a97ec426..e7abd5610e 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -36,6 +36,12 @@
#include "scumm/util.h"
#ifdef USE_ARM_GFX_ASM
+
+#ifndef IPHONE
+#define asmDrawStripToScreen _asmDrawStripToScreen
+#define asmCopy8Col _asmCopy8Col
+#endif
+
extern "C" void asmDrawStripToScreen(int height, int width, void const* text, void const* src, byte* dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch);
extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height, uint8 bitDepth);
@@ -385,8 +391,11 @@ void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int
vs->hasTwoBuffers = twobufs;
vs->xstart = 0;
vs->backBuf = NULL;
- vs->bytesPerPixel = (_game.features & GF_16BIT_COLOR) ? 2 : 1;
- vs->pitch = width * vs->bytesPerPixel;
+ if (_game.features & GF_16BIT_COLOR)
+ vs->format = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
+ else
+ vs->format = Graphics::PixelFormat::createFormatCLUT8();
+ vs->pitch = width * vs->format.bytesPerPixel;
if (_game.version >= 7) {
// Increase the pitch by one; needed to accomodate the extra screen
@@ -622,7 +631,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
int m = _textSurfaceMultiplier;
int vsPitch;
int pitch = vs->pitch;
- vsPitch = vs->pitch - width * vs->bytesPerPixel;
+ vsPitch = vs->pitch - width * vs->format.bytesPerPixel;
if (_game.version < 7) {
@@ -667,7 +676,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
} else {
WRITE_UINT16(dstPtr, _16BitPalette[tmp]); dstPtr += 2;
}
- srcPtr += vs->bytesPerPixel;
+ srcPtr += vs->format.bytesPerPixel;
}
srcPtr += vsPitch;
textPtr += _textSurface.pitch - width * m;
@@ -706,7 +715,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
}
#endif
src = _compositeBuf;
- pitch = width * vs->bytesPerPixel;
+ pitch = width * vs->format.bytesPerPixel;
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
ditherHerc(_compositeBuf, _herculesBuf, width, &x, &y, &width, &height);
@@ -1036,17 +1045,17 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
return;
if (vs->hasTwoBuffers && _currentRoom != 0 && isLightOn()) {
- blit(screenBuf, vs->pitch, vs->getBackPixels(rect.left, rect.top), vs->pitch, width, height, vs->bytesPerPixel);
+ blit(screenBuf, vs->pitch, vs->getBackPixels(rect.left, rect.top), vs->pitch, width, height, vs->format.bytesPerPixel);
if (vs->number == kMainVirtScreen && _charset->_hasMask) {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns) {
byte *mask = (byte *)_textSurface.getBasePtr(rect.left * _textSurfaceMultiplier, (rect.top + vs->topline) * _textSurfaceMultiplier);
- fill(mask, _textSurface.pitch, 0, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.bytesPerPixel);
+ fill(mask, _textSurface.pitch, 0, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
} else
#endif
{
byte *mask = (byte *)_textSurface.getBasePtr(rect.left, rect.top - _screenTop);
- fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.bytesPerPixel);
+ fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
}
}
} else {
@@ -1054,14 +1063,14 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) {
if (_game.platform == Common::kPlatformFMTowns) {
backColor |= (backColor << 4);
byte *mask = (byte *)_textSurface.getBasePtr(rect.left * _textSurfaceMultiplier, (rect.top + vs->topline) * _textSurfaceMultiplier);
- fill(mask, _textSurface.pitch, backColor, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.bytesPerPixel);
+ 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->bytesPerPixel);
+ fill(screenBuf, vs->pitch, _16BitPalette[backColor], width, height, vs->format.bytesPerPixel);
else
- fill(screenBuf, vs->pitch, backColor, width, height, vs->bytesPerPixel);
+ fill(screenBuf, vs->pitch, backColor, width, height, vs->format.bytesPerPixel);
}
}
@@ -1090,7 +1099,7 @@ void ScummEngine::restoreCharsetBg() {
if (vs->number != kMainVirtScreen) {
// Restore from back buffer
const byte *backBuf = vs->getBackPixels(0, 0);
- blit(screenBuf, vs->pitch, backBuf, vs->pitch, vs->w, vs->h, vs->bytesPerPixel);
+ blit(screenBuf, vs->pitch, backBuf, vs->pitch, vs->w, vs->h, vs->format.bytesPerPixel);
}
} else {
// Clear area
@@ -1118,7 +1127,7 @@ void ScummEngine::clearTextSurface() {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
_game.platform == Common::kPlatformFMTowns ? 0 :
#endif
- CHARSET_MASK_TRANSPARENCY, _textSurface.w, _textSurface.h, _textSurface.bytesPerPixel);
+ CHARSET_MASK_TRANSPARENCY, _textSurface.w, _textSurface.h, _textSurface.format.bytesPerPixel);
}
byte *ScummEngine::getMaskBuffer(int x, int y, int z) {
@@ -1291,56 +1300,56 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) {
if (vs->number != kMainVirtScreen)
error("can only copy bg to main window");
- blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->bytesPerPixel);
+ blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->format.bytesPerPixel);
if (_charset->_hasMask) {
byte *mask = (byte *)_textSurface.getBasePtr(x * _textSurfaceMultiplier, (y - _screenTop) * _textSurfaceMultiplier);
- fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.bytesPerPixel);
+ fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.format.bytesPerPixel);
}
}
} else if (_game.heversion >= 72) {
// Flags are used for different methods in HE games
uint32 flags = color;
if ((flags & 0x2000) || (flags & 0x4000000)) {
- blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->bytesPerPixel);
+ blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->format.bytesPerPixel);
} else if ((flags & 0x4000) || (flags & 0x2000000)) {
- blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height, vs->bytesPerPixel);
+ blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height, vs->format.bytesPerPixel);
} else if ((flags & 0x8000) || (flags & 0x1000000)) {
flags &= (flags & 0x1000000) ? 0xFFFFFF : 0x7FFF;
- fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel);
- fill(bgbuff, vs->pitch, flags, width, height, vs->bytesPerPixel);
+ fill(backbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);
+ fill(bgbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);
} else {
- fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel);
+ fill(backbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);
}
} else if (_game.heversion >= 60) {
// Flags are used for different methods in HE games
uint16 flags = color;
if (flags & 0x2000) {
- blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->bytesPerPixel);
+ blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->format.bytesPerPixel);
} else if (flags & 0x4000) {
- blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height, vs->bytesPerPixel);
+ blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height, vs->format.bytesPerPixel);
} else if (flags & 0x8000) {
flags &= 0x7FFF;
- fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel);
- fill(bgbuff, vs->pitch, flags, width, height, vs->bytesPerPixel);
+ fill(backbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);
+ fill(bgbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);
} else {
- fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel);
+ fill(backbuff, vs->pitch, flags, width, height, vs->format.bytesPerPixel);
}
} else {
if (_game.features & GF_16BIT_COLOR) {
- fill(backbuff, vs->pitch, _16BitPalette[color], width, height, vs->bytesPerPixel);
+ fill(backbuff, vs->pitch, _16BitPalette[color], width, height, vs->format.bytesPerPixel);
} else {
#ifndef DISABLE_TOWNS_DUAL_LAYER_MODE
if (_game.platform == Common::kPlatformFMTowns) {
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.bytesPerPixel);
+ 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->bytesPerPixel);
+ fill(backbuff, vs->pitch, color, width, height, vs->format.bytesPerPixel);
}
}
}
@@ -1379,7 +1388,7 @@ void ScummEngine_v5::drawFlashlight() {
_flashlight.y, _flashlight.y + _flashlight.h, USAGE_BIT_DIRTY);
if (_flashlight.buffer) {
- fill(_flashlight.buffer, vs->pitch, 0, _flashlight.w, _flashlight.h, vs->bytesPerPixel);
+ fill(_flashlight.buffer, vs->pitch, 0, _flashlight.w, _flashlight.h, vs->format.bytesPerPixel);
}
_flashlight.isDrawn = false;
}
@@ -1426,20 +1435,20 @@ void ScummEngine_v5::drawFlashlight() {
_flashlight.buffer = vs->getPixels(_flashlight.x, _flashlight.y);
bgbak = vs->getBackPixels(_flashlight.x, _flashlight.y);
- blit(_flashlight.buffer, vs->pitch, bgbak, vs->pitch, _flashlight.w, _flashlight.h, vs->bytesPerPixel);
+ blit(_flashlight.buffer, vs->pitch, bgbak, vs->pitch, _flashlight.w, _flashlight.h, vs->format.bytesPerPixel);
// Round the corners. To do so, we simply hard-code a set of nicely
// rounded corners.
static const int corner_data[] = { 8, 6, 4, 3, 2, 2, 1, 1 };
int minrow = 0;
- int maxcol = (_flashlight.w - 1) * vs->bytesPerPixel;
+ int maxcol = (_flashlight.w - 1) * vs->format.bytesPerPixel;
int maxrow = (_flashlight.h - 1) * vs->pitch;
for (i = 0; i < 8; i++, minrow += vs->pitch, maxrow -= vs->pitch) {
int d = corner_data[i];
for (j = 0; j < d; j++) {
- if (vs->bytesPerPixel == 2) {
+ if (vs->format.bytesPerPixel == 2) {
WRITE_UINT16(&_flashlight.buffer[minrow + 2 * j], 0);
WRITE_UINT16(&_flashlight.buffer[minrow + maxcol - 2 * j], 0);
WRITE_UINT16(&_flashlight.buffer[maxrow + 2 * j], 0);
@@ -1755,7 +1764,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const
}
#endif
- _vertStripNextInc = height * vs->pitch - 1 * vs->bytesPerPixel;
+ _vertStripNextInc = height * vs->pitch - 1 * vs->format.bytesPerPixel;
_objectMode = (flag & dbObjectMode) == dbObjectMode;
prepareDrawBitmap(ptr, vs, x, y, width, height, stripnr, numstrip);
@@ -1788,9 +1797,9 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const
// In the case of a double buffered virtual screen, we draw to
// the backbuffer, otherwise to the primary surface memory.
if (vs->hasTwoBuffers)
- dstPtr = vs->backBuf + y * vs->pitch + (x * 8 * vs->bytesPerPixel);
+ dstPtr = vs->backBuf + y * vs->pitch + (x * 8 * vs->format.bytesPerPixel);
else
- dstPtr = (byte *)vs->pixels + y * vs->pitch + (x * 8 * vs->bytesPerPixel);
+ dstPtr = (byte *)vs->pixels + y * vs->pitch + (x * 8 * vs->format.bytesPerPixel);
transpStrip = drawStrip(dstPtr, vs, x, y, width, height, stripnr, smap_ptr);
@@ -1799,11 +1808,11 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const
transpStrip = true;
if (vs->hasTwoBuffers) {
- byte *frontBuf = (byte *)vs->pixels + y * vs->pitch + (x * 8 * vs->bytesPerPixel);
+ byte *frontBuf = (byte *)vs->pixels + y * vs->pitch + (x * 8 * vs->format.bytesPerPixel);
if (lightsOn)
- copy8Col(frontBuf, vs->pitch, dstPtr, height, vs->bytesPerPixel);
+ copy8Col(frontBuf, vs->pitch, dstPtr, height, vs->format.bytesPerPixel);
else
- clear8Col(frontBuf, vs->pitch, height, vs->bytesPerPixel);
+ clear8Col(frontBuf, vs->pitch, height, vs->format.bytesPerPixel);
}
decodeMask(x, y, width, height, stripnr, numzbuf, zplane_list, transpStrip, flag, tmsk_ptr);
@@ -2039,7 +2048,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) {
drawStripHE(dst, vs->pitch, bmap_ptr, vs->w, vs->h, true);
break;
case 150:
- fill(dst, vs->pitch, *bmap_ptr, vs->w, vs->h, vs->bytesPerPixel);
+ fill(dst, vs->pitch, *bmap_ptr, vs->w, vs->h, vs->format.bytesPerPixel);
break;
default:
// Alternative russian freddi3 uses badly formatted bitmaps
@@ -2150,7 +2159,7 @@ void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) {
assert(rw <= _screenWidth && rw > 0);
assert(rh <= _screenHeight && rh > 0);
- blit(dst, _virtscr[kMainVirtScreen].pitch, src, _virtscr[kMainVirtScreen].pitch, rw, rh, vs->bytesPerPixel);
+ blit(dst, _virtscr[kMainVirtScreen].pitch, src, _virtscr[kMainVirtScreen].pitch, rw, rh, vs->format.bytesPerPixel);
markRectAsDirty(kMainVirtScreen, rect, dirtybit);
}
#endif
@@ -2180,15 +2189,15 @@ void Gdi::resetBackground(int top, int bottom, int strip) {
if (bottom > vs->bdirty[strip])
vs->bdirty[strip] = bottom;
- bgbak_ptr = (byte *)vs->backBuf + top * vs->pitch + (strip + vs->xstart/8) * 8 * vs->bytesPerPixel;
- backbuff_ptr = (byte *)vs->pixels + top * vs->pitch + (strip + vs->xstart/8) * 8 * vs->bytesPerPixel;
+ bgbak_ptr = (byte *)vs->backBuf + top * vs->pitch + (strip + vs->xstart/8) * 8 * vs->format.bytesPerPixel;
+ backbuff_ptr = (byte *)vs->pixels + top * vs->pitch + (strip + vs->xstart/8) * 8 * vs->format.bytesPerPixel;
numLinesToProcess = bottom - top;
if (numLinesToProcess) {
if (_vm->isLightOn()) {
- copy8Col(backbuff_ptr, vs->pitch, bgbak_ptr, numLinesToProcess, vs->bytesPerPixel);
+ copy8Col(backbuff_ptr, vs->pitch, bgbak_ptr, numLinesToProcess, vs->format.bytesPerPixel);
} else {
- clear8Col(backbuff_ptr, vs->pitch, numLinesToProcess, vs->bytesPerPixel);
+ clear8Col(backbuff_ptr, vs->pitch, numLinesToProcess, vs->format.bytesPerPixel);
}
}
}
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index c6062ef9be..3f69d75efd 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -158,11 +158,11 @@ struct VirtScreen : Graphics::Surface {
}
byte *getPixels(int x, int y) const {
- return (byte *)pixels + y * pitch + (xstart + x) * bytesPerPixel;
+ return (byte *)pixels + y * pitch + (xstart + x) * format.bytesPerPixel;
}
byte *getBackPixels(int x, int y) const {
- return (byte *)backBuf + y * pitch + (xstart + x) * bytesPerPixel;
+ return (byte *)backBuf + y * pitch + (xstart + x) * format.bytesPerPixel;
}
};
diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s
index 34de954a17..9f7c2949b3 100644
--- a/engines/scumm/gfxARM.s
+++ b/engines/scumm/gfxARM.s
@@ -25,8 +25,8 @@
.text
- .global asmDrawStripToScreen
- .global asmCopy8Col
+ .global _asmDrawStripToScreen
+ .global _asmCopy8Col
@ ARM implementation of asmDrawStripToScreen.
@
@@ -44,7 +44,7 @@
@ In addition, we assume that text, src and dst are all word (4 byte)
@ aligned. This is the same assumption that the old 'inline' version
@ made.
-asmDrawStripToScreen:
+_asmDrawStripToScreen:
@ r0 = height
@ r1 = width
@ r2 = text
@@ -125,7 +125,7 @@ end:
@ In addition, we assume that src and dst are both word (4 byte)
@ aligned. This is the same assumption that the old 'inline' version
@ made.
-asmCopy8Col:
+_asmCopy8Col:
@ r0 = dst
@ r1 = dstPitch
@ r2 = src
diff --git a/engines/scumm/gfx_towns.cpp b/engines/scumm/gfx_towns.cpp
index abf2da63a6..78c7ef23f1 100644
--- a/engines/scumm/gfx_towns.cpp
+++ b/engines/scumm/gfx_towns.cpp
@@ -48,7 +48,7 @@ void ScummEngine::towns_drawStripToScreen(VirtScreen *vs, int dstX, int dstY, in
int dp1 = _townsScreen->getLayerPitch(0) - width * _townsScreen->getLayerBpp(0);
int dp2 = _townsScreen->getLayerPitch(1) - width * m * _townsScreen->getLayerBpp(1);
- int sp1 = vs->pitch - (width * vs->bytesPerPixel);
+ 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) {
diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp
index a16af73135..5cd75a5c62 100644
--- a/engines/scumm/he/cup_player_he.cpp
+++ b/engines/scumm/he/cup_player_he.cpp
@@ -30,6 +30,7 @@
#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"
+#include "graphics/palette.h"
#include "scumm/scumm.h"
#include "scumm/util.h"
#include "scumm/he/intern_he.h"
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index c088fd6e22..297c2992db 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -823,8 +823,18 @@ int LogicHEsoccer::versionID() {
}
LogicHEsoccer::LogicHEsoccer(ScummEngine_v90he *vm) : LogicHE(vm) {
- // Originally it used 0x1b0d bytes
_userDataD = (double *)calloc(1732, sizeof(double));
+ _intArray1 = 0;
+ _intArray2 = 0;
+ _intArraysAllocated = false;
+ _array1013 = 0;
+ _array1013Allocated = false;
+}
+
+LogicHEsoccer::~LogicHEsoccer() {
+ free(_userDataD);
+ op_1020(); // clear int arrays
+ delete[] _array1013;
}
int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) {
@@ -843,6 +853,37 @@ int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) {
res = op_1004(args);
break;
+ case 1006:
+ res = op_1006(args[0], args[1], args[2], args[3]);
+ break;
+
+ case 1011:
+ // args[4] is ignored!
+ // soccer passes the argument, but then ends up not using it
+ // Makes sense that they removed it for soccermls
+ res = op_1011(args[0], args[1], args[2], args[3], args[5]);
+ break;
+
+ case 1012:
+ res = op_1012(args);
+ break;
+
+ case 1013:
+ res = op_1013(args[0], args[1], args[2]);
+ break;
+
+ case 1019:
+ res = op_1019(args);
+ break;
+
+ case 1020:
+ res = op_1020();
+ break;
+
+ case 1021:
+ res = op_1021(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ break;
+
case 8221968:
// Someone had a fun and used his birthday as opcode number
res = getFromArray(args[0], args[1], args[2]);
@@ -856,6 +897,32 @@ int32 LogicHEsoccer::dispatch(int op, int numArgs, int32 *args) {
return res;
}
+void LogicHEsoccer::beforeBootScript() {
+ if (_intArraysAllocated)
+ op_1020();
+
+ _userDataD[530] = 0;
+}
+
+void LogicHEsoccer::initOnce() {
+ // The original sets some paths here that we don't need to worry about
+ _array1013Allocated = false;
+ _userDataD[530] = 0;
+}
+
+int LogicHEsoccer::startOfFrame() {
+ // This variable is some sort of flag that activates this mode
+ int res = (int)_userDataD[530];
+
+ // _userDataD[535] is not used!
+ // soccer passes the argument, but then ends up not using it
+ // Makes sense that they removed it for soccermls
+ if (res)
+ res = op_1011((int)_userDataD[531], (int)_userDataD[532], (int)_userDataD[533], (int)_userDataD[534], (int)_userDataD[536]);
+
+ return res;
+}
+
int LogicHEsoccer::op_1001(int32 *args) {
return (int)(args[0] * sin((float)args[1]));
}
@@ -901,16 +968,16 @@ int LogicHEsoccer::op_1004(int32 *args) {
return 1;
}
-int LogicHEsoccer::op_1006(int32 *args) {
- double a1 = args[1] * 0.01;
- double a2 = args[2] * 0.01;
- double a3 = args[3] * 0.01;
+int LogicHEsoccer::op_1006(int32 a1, int32 a2, int32 a3, int32 a4) {
+ double v1 = a1 * 0.01;
+ double v2 = a2 * 0.01;
+ double v3 = a3 * 0.01;
double var108, var109;
- _userDataD[529] = args[4];
+ _userDataD[529] = a4;
- var108 = atan2(a1, a3) * _userDataD[523] - args[4];
- var109 = _userDataD[526] - _userDataD[528] + (_userDataD[521] - atan2(_userDataD[524] - a2, a3)) * _userDataD[522];
+ var108 = atan2(v1, v3) * _userDataD[523] - a4;
+ var109 = _userDataD[526] - _userDataD[528] + (_userDataD[521] - atan2(_userDataD[524] - v2, v3)) * _userDataD[522];
writeScummVar(108, (int32)var108);
writeScummVar(109, (int32)var109);
@@ -919,37 +986,358 @@ int LogicHEsoccer::op_1006(int32 *args) {
}
int LogicHEsoccer::op_1007(int32 *args) {
- // TODO: Used when the HE logo is shown
+ // Used when the HE logo is shown
+ // This initializes the _userDataD fields that are used in op_1006/op_1011
+
+ _intArraysAllocated = false;
+ double v14 = (double)args[0] * 0.01;
+ double v13 = (double)args[2] * 0.01;
+ _userDataD[524] = v14;
+ double v12 = atan2(v13, v14);
+ _userDataD[520] = v12;
+ double v15 = atan2(v13 - (double)args[4] * 0.01, (double)args[3] * 0.01);
+ double v19 = v15 * 2.0;
+ double v17 = atan2(v13 - (double)args[4] * 0.01, v14);
+ _userDataD[519] = v19;
+ _userDataD[521] = v17;
+ _userDataD[525] = (v17 - v12) * 2.0;
+ _userDataD[527] = (double)args[5];
+ _userDataD[526] = (double)args[6];
+ _userDataD[528] = (double)args[7];
+ _userDataD[522] = _userDataD[526] / _userDataD[525];
+ _userDataD[523] = _userDataD[527] / _userDataD[519];
+ _userDataD[518] = v13;
+
+ // Clear both byte arrays
+ memset(_byteArray1, 0, 4096);
+ memset(_byteArray2, 0, 585);
+
+ if (_array1013Allocated == 0 )
+ op_1013(4, args[8], args[9]);
return 1;
}
+// 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?)
return 1;
}
+int LogicHEsoccer::op_1011(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5) {
+ // This is called on each frame by startOfFrame() if activated by op_1012.
+ // This seems to do player placement!
+
+ float v28 = 0.0;
+
+ for (int i = 0; i < 18; i++) {
+ // These seem to be some sort of percent? of angles?
+ int v32 = getFromArray(a1, i, 0);
+ int v6 = getFromArray(a1, i, 1);
+ int v30 = getFromArray(a1, i, 2);
+
+ float v29 = (double)v32 / 100.0;
+ v28 = (double)v6 / 100.0;
+ float v31 = (double)v30 / 100.0;
+
+ if (i < 13) {
+ int v25 = ((v32 + 2760) / 500 >= 0) ? ((v32 + 2750) / 500) : 0;
+ int v24 = 10;
+
+ if (v25 <= 10) {
+ int v23 = 0;
+ if ((v32 + 2750) / 500 >= 0)
+ v23 = (v32 + 2750) / 500;
+
+ v24 = v23;
+ }
+
+ int v22 = 0;
+ if ((9219 - v30) / 500 >= 0)
+ v22 = (9219 - v30) / 500;
+
+ int v21 = 6;
+ if (v22 <= 6) {
+ int v20 = 0;
+ if ((9219 - v30) / 500 >= 0)
+ v20 = (9219 - v30) / 500;
+ v21 = v20;
+ }
+
+ if (a5)
+ putInArray(a5, 0, i, v24 + 11 * v21);
+ }
+
+ float v7 = atan2(_userDataD[524] - v28, (double)v31);
+ int v8 = (int)(_userDataD[526] - (_userDataD[521] - v7) * _userDataD[522] + 300.0);
+
+ double v9 = atan2(_userDataD[523], (double)v31);
+ // x/y position?
+ putInArray(a2, i, 0, (int32)(v29 * v9 + 640.0));
+ putInArray(a2, i, 1, v8);
+
+ double v10 = atan2(_userDataD[524], (double)v31);
+ int v12 = (int)(_userDataD[526] - (_userDataD[521] - (float)v10) * _userDataD[522] + 300.0);
+ double v13 = _userDataD[523];
+
+ v29 = atan2(v29, v31);
+ // x/y position?
+ putInArray(a2, i + 22, 0, (int32)(v29 * v13 + 640.0));
+ putInArray(a2, i + 22, 1, v12);
+ }
+
+ // soccer only uses one array here
+ // soccermls/soccer2004 use four
+ int start = (_vm->_game.id == GID_SOCCER) ? 19 : 18;
+ int end = (_vm->_game.id == GID_SOCCER) ? 19 : 21;
+
+ for (int i = start; i <= end; i++) {
+ int v14 = getFromArray(a2, i, 0);
+ int v15 = getFromArray(a2, i, 1);
+
+ // This retains v28 from (i == 17)?
+ float v16 = _userDataD[524] - v28;
+ float v17 = v16 / tan((_userDataD[528] + v15 - _userDataD[526]) / (_userDataD[522] + _userDataD[521]));
+ double v18 = tan((double)(v14 - 640) / _userDataD[523]) * v17;
+ putInArray(a1, i, 0, (int)(v18 * 100.0));
+ putInArray(a1, i, 2, (int)(v17 * 100.0));
+ }
+
+ op_1011_sub(a1, a3, a4, a4);
+
+ return 1;
+}
+
+static inline int distance(int a1, int a2, int a3, int a4) {
+ return (int)sqrt((double)((a4 - a3) * (a4 - a3) + (a2 - a1) * (a2 - a1)));
+}
+
+void LogicHEsoccer::op_1011_sub(int32 a1, int32 a2, int32 a3, int32 a4) {
+ // As you can guess, this is called from op_1011
+ // This seems to be checking distances between the players and the ball
+ // and which distance is the shortest.
+
+ int v6[13];
+ int v7[13];
+ int v8[13];
+ int v18[195];
+
+ for (int i = 0; i < 13; i++) {
+ v6[i] = 0;
+ v7[i] = getFromArray(a1, i, 0);
+ v8[i] = getFromArray(a1, i, 2);
+ }
+
+ // 12 here, 13 up there
+ // Probably 12 for players, 13 for players+ball
+ for (int i = 0; i < 12; i++) {
+ int v22 = a4;
+ for (int j = i + 1; j < 13; j++) {
+ v18[i * 15 + j] = distance(v7[i], v7[j], v8[i], v8[j]);
+ putInArray(a2, i, j, v18[i * 15 + j]);
+ putInArray(a2, j, i, v18[i * 15 + j]);
+ if (v18[i * 15 + j] < v22) {
+ v22 = v18[i * 15 + j];
+ v6[i] = j + 1;
+ v6[j] = i + 1;
+ }
+ }
+ }
+
+ int v13 = getFromArray(a1, 18, 0);
+ int v14 = getFromArray(a1, 18, 2);
+ int v15 = getFromArray(a1, 19, 0);
+ int v16 = getFromArray(a1, 19, 2);
+ int v19[15];
+ int v20[15];
+
+ if (_vm->_game.id == GID_SOCCER) {
+ // soccer gets to be different
+ for (int i = 0; i < 13; i++)
+ v20[i] = distance(v13, v7[i], v14, v8[i]);
+
+ for (int i = 0; i < 13; i++)
+ v19[i] = distance(v15, v7[i], v16, v8[i]);
+ } else {
+ // soccermls and soccer2004 use two other arrays here
+ int v9 = getFromArray(a1, 20, 0);
+ int v10 = getFromArray(a1, 20, 2);
+ int v11 = getFromArray(a1, 21, 0);
+ int v12 = getFromArray(a1, 21, 2);
+
+ for (int i = 0; i < 6; i++) {
+ v20[i] = distance(v9, v7[i], v10, v8[i]);
+ v19[i] = distance(v13, v7[i], v14, v8[i]);
+ }
+
+ for (int i = 6; i < 13; i++) {
+ v20[i] = distance(v11, v7[i], v12, v8[i]);
+ v19[i] = distance(v15, v7[i], v16, v8[i]);
+ }
+ }
+
+ for (int i = 0; i < 13; i++) {
+ putInArray(a2, 14, i, v20[i]);
+ putInArray(a2, i, 14, v20[i]);
+ putInArray(a2, 13, i, v19[i]);
+ putInArray(a2, i, 13, v19[i]);
+ putInArray(a3, 0, i, v6[i]);
+ }
+}
+
int LogicHEsoccer::op_1012(int32 *args) {
- // TODO: Used after op_1019
+ // Used after op_1019
+ // This function activates startOfFrame() to call op_1011
+ // (Possibly field parameters?)
+
+ _userDataD[530] = (args[0] != 0) ? 1 : 0;
+ _userDataD[531] = args[1];
+ _userDataD[532] = args[2];
+ _userDataD[533] = args[3];
+ _userDataD[534] = args[4];
+ _userDataD[535] = args[5]; // unused!!!
+ _userDataD[536] = args[6];
+
+ return 1;
+}
+
+// Some strange power operation, ignores negative exponents
+static inline double u32Pow(float a1, int a2) {
+ if (a2 < 0)
+ return 0.0;
+
+ float v4 = 1.0;
+
+ for (int i = 1; i <= a2; i++)
+ v4 *= a1;
+
+ return v4;
+}
+
+int LogicHEsoccer::op_sub5(int a1, int a2, int a3) {
+ byte *v9 = _array1013 + 44 * a2;
+
+ *((uint32 *)v9 + 4) = a3;
+ *((uint32 *)v9) = a2;
+
+ if (a1 > 2) {
+ // Casual observation: 585 is also the size of _byteArray2
+ *((uint32 *)v9 + 40) = 8 * a2 - 585;
+ for (int i = 0; i < 8; i++)
+ *((uint32 *)v9 + 4 * i + 8) = 0xffffffff;
+ } else {
+ for (int i = 0; i < 8; i++)
+ *((uint32 *)v9 + 4 * i + 8) = op_sub5(a1 + 1, i + 8 * a2 + 1, a2);
+ }
+
+ return a2;
+}
+
+int LogicHEsoccer::op_1013(int32 a1, int32 a2, int32 a3) {
+ // Creates _array1013 for *some* purpose
+ // _array1013Temp is used again op_1014 for some reason...
+ // Seems to be used in op_1015
+
+ int v4 = (int)((1.0 - u32Pow(8.0, 4)) / -7.0);
+
+ _array1013 = new byte[v4 * 44];
+ memset(_array1013, 0, v4 * 44);
+ _array1013Allocated = true;
+ memset(_array1013Temp, 0, 44);
+
+ for (int i = 0; i < 8; i++)
+ _array1013Temp[i + 2] = op_sub5(1, i + 1, 0);
+
+ // Yes, this is not endian-safe, but should not matter since we're
+ // not saving/loading the data anywhere
+ memcpy(_array1013, _array1013Temp, 44);
return 1;
}
-int LogicHEsoccer::op_1014(int32 *args) {
+int LogicHEsoccer::op_1014(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7, int32 a8, int32 a9, int32 a10, int32 a11, int32 a12, int32 a13, int32 a14) {
// TODO: Used many times during a match
+ // And called from op_1008!
return 1;
}
int LogicHEsoccer::op_1019(int32 *args) {
- // TODO: Used at the beginning of a match
+ // Used at the beginning of a match
+ // Initializes some arrays. Player positions?
+
+ // These two arrays are used in op_1014 and op_1015
+ for (int i = 0; i < 4096; i++)
+ _byteArray1[i] = getFromArray(args[1], 0, i);
+
+ for (int i = 0; i < 585; i++)
+ _byteArray2[i] = getFromArray(args[0], 0, i);
+
+ // Deallocate the two integer arrays
+ if (_intArraysAllocated)
+ op_1020();
+
+ // Reallocate them
+ _intArray1 = new uint32[1008];
+ _intArray2 = new uint32[168];
+ _intArraysAllocated = true;
+
+ memset(_intArray1, 0, 4 * 4);
+ memset(_intArray2, 0, 24 * 4);
+
+ // These two arrays are used in op_1015
+ for (int i = 0; i < 42; i++) {
+ for (int j = 0; j < 24; j++)
+ _intArray1[j + 24 * i] = getFromArray(args[3], 0, j + 24 * i);
+
+ for (int j = 0; j < 4; j++)
+ _intArray2[j + 4 * i] = getFromArray(args[2], 0, j + 4 * i);
+ }
+
+ return 1;
+}
+
+int LogicHEsoccer::op_1020() {
+ // Deallocate integer arrays
+ // The arrays can be allocated in op_1015 or op_1019
+
+ delete[] _intArray1; _intArray1 = 0;
+ delete[] _intArray2; _intArray2 = 0;
+ _intArraysAllocated = false;
return 1;
}
-int LogicHEsoccer::op_1021(int32 *args) {
- // TODO: Used during a match (ball movement?)
+int LogicHEsoccer::op_1021(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7) {
+ // Used during a match (ball movement?)
+ // Also called from op_1008
+
+ int v10;
+ if (a4 && a5)
+ v10 = (int)(((double)a2 - (double)a5 * (double)a1 / (double)a4) * -1.0 * (double)a4 / (double)a5);
+ else
+ v10 = a1;
+
+ int v9;
+ if (a6 && a5)
+ v9 = (int)(((double)a2 - (double)a5 * (double)a3 / (double)a6) * -1.0 * (double)a6 / (double)a5);
+ else
+ v9 = a3;
+
+ // The final argument chooses whether to store the results for op_1008 or
+ // store them in SCUMM variables.
+ if (a7) {
+ _var1021[0] = v10;
+ _var1021[1] = v9;
+ } else {
+ writeScummVar(108, v10);
+ writeScummVar(109, v9);
+ }
return 1;
}
diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h
index ab952abd5e..d097d37e75 100644
--- a/engines/scumm/he/logic_he.h
+++ b/engines/scumm/he/logic_he.h
@@ -41,9 +41,9 @@ public:
int getFromArray(int arg0, int idx2, int idx1);
void putInArray(int arg0, int idx2, int idx1, int val);
- void beforeBootScript() {}
- void initOnce() {}
- void startOfFrame() {}
+ virtual void beforeBootScript() {}
+ virtual void initOnce() {}
+ virtual int startOfFrame() { return 1; }
void endOfFrame() {}
void processKeyStroke(int keyPressed) {}
@@ -115,22 +115,52 @@ private:
public:
LogicHEsoccer(ScummEngine_v90he *vm);
+ ~LogicHEsoccer();
int versionID();
int32 dispatch(int op, int numArgs, int32 *args);
+ void beforeBootScript();
+ void initOnce();
+ int startOfFrame();
+
private:
int op_1001(int32 *args);
int op_1002(int32 *args);
int op_1003(int32 *args);
int op_1004(int32 *args);
- int op_1006(int32 *args);
+ int op_1006(int32 a1, int32 a2, int32 a3, int32 a4);
int op_1007(int32 *args);
int op_1008(int32 *args);
+ int op_1011(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5);
int op_1012(int32 *args);
- int op_1014(int32 *args);
+ int op_1013(int32 a1, int32 a2, int32 a3);
+ int op_1014(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7, int32 a8, int32 a9, int32 a10, int32 a11, int32 a12, int32 a13, int32 a14);
int op_1019(int32 *args);
- int op_1021(int32 *args);
+ int op_1020();
+ int op_1021(int32 a1, int32 a2, int32 a3, int32 a4, int32 a5, int32 a6, int32 a7);
+
+ // Two integer arrays are used between some functions
+ // Originally, these pointers were in _userData, but we keep them separate
+ // Also, doing it that would break things on non 32-bit systems...
+ bool _intArraysAllocated;
+ uint32 *_intArray1, *_intArray2;
+
+ // op_1007 allocates some arrays
+ // they're then filled by op_1019
+ byte _byteArray1[4096], _byteArray2[585];
+
+ // op_1011 has a subfunction
+ void op_1011_sub(int32 a1, int32 a2, int32 a3, int32 a4);
+
+ // op_1013 creates some array, purpose unknown
+ bool _array1013Allocated;
+ byte *_array1013;
+ uint32 _array1013Temp[11];
+ int op_sub5(int a1, int a2, int a3);
+
+ // op_1021 can (optionally) set two variables for use in op_1008
+ uint32 _var1021[2];
};
class LogicHEbaseball2001 : public LogicHE {
diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp
index 7f517c56ed..49e43a040b 100644
--- a/engines/scumm/he/palette_he.cpp
+++ b/engines/scumm/he/palette_he.cpp
@@ -26,6 +26,7 @@
#ifdef ENABLE_HE
#include "common/system.h"
+#include "graphics/palette.h"
#include "scumm/scumm.h"
#include "scumm/he/intern_he.h"
#include "scumm/resource.h"
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index ecb094f29b..552c420755 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -32,6 +32,7 @@
#include "audio/decoders/wave.h"
#include "graphics/cursorman.h"
+#include "graphics/maccursor.h"
#include "graphics/wincursor.h"
#include "common/archive.h"
@@ -172,11 +173,49 @@ bool MacResExtractor::extractResource(int id, CachedCursor *cc) {
if (!dataStream)
return false;
- int keyColor; // HACK: key color is ignored
- _resMgr->convertCrsrCursor(dataStream, &cc->bitmap, cc->width, cc->height, cc->hotspotX, cc->hotspotY,
- keyColor, _vm->_system->hasFeature(OSystem::kFeatureCursorHasPalette),
- &cc->palette, cc->palSize);
+ // If we don't have a cursor palette, force monochrome cursors
+ bool forceMonochrome = !_vm->_system->hasFeature(OSystem::kFeatureCursorHasPalette);
+ Graphics::MacCursor *macCursor = new Graphics::MacCursor();
+
+ if (!macCursor->readFromStream(*dataStream, forceMonochrome)) {
+ delete dataStream;
+ delete macCursor;
+ return false;
+ }
+
+ cc->bitmap = new byte[macCursor->getWidth() * macCursor->getHeight()];
+ cc->width = macCursor->getWidth();
+ cc->height = macCursor->getHeight();
+ cc->hotspotX = macCursor->getHotspotX();
+ cc->hotspotY = macCursor->getHotspotY();
+
+ if (forceMonochrome) {
+ // Convert to the SCUMM palette
+ const byte *srcBitmap = macCursor->getSurface();
+
+ for (int i = 0; i < macCursor->getWidth() * macCursor->getHeight(); i++) {
+ if (srcBitmap[i] == macCursor->getKeyColor()) // Transparent
+ cc->bitmap[i] = 255;
+ else if (srcBitmap[i] == 0) // Black
+ cc->bitmap[i] = 253;
+ else // White
+ cc->bitmap[i] = 254;
+ }
+ } else {
+ // Copy data and palette
+
+ // Sanity check. This code assumes that the key color is the same
+ assert(macCursor->getKeyColor() == 255);
+
+ memcpy(cc->bitmap, macCursor->getSurface(), macCursor->getWidth() * macCursor->getHeight());
+
+ cc->palette = new byte[256 * 3];
+ cc->palSize = 256;
+ memcpy(cc->palette, macCursor->getPalette(), 256 * 3);
+ }
+
+ delete macCursor;
delete dataStream;
return true;
}
diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp
index 40889ec24f..487429c294 100644
--- a/engines/scumm/imuse/imuse_part.cpp
+++ b/engines/scumm/imuse/imuse_part.cpp
@@ -25,6 +25,8 @@
+#include "common/debug.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "scumm/imuse/imuse_internal.h"
#include "scumm/saveload.h"
diff --git a/engines/scumm/imuse/sysex_scumm.cpp b/engines/scumm/imuse/sysex_scumm.cpp
index c96b2f757b..78028c6056 100644
--- a/engines/scumm/imuse/sysex_scumm.cpp
+++ b/engines/scumm/imuse/sysex_scumm.cpp
@@ -24,6 +24,7 @@
#include "common/endian.h"
+#include "common/textconsole.h"
#include "common/util.h"
/*
diff --git a/engines/scumm/imuse_digi/dimuse.h b/engines/scumm/imuse_digi/dimuse.h
index 236edb5a89..1e96aa8827 100644
--- a/engines/scumm/imuse_digi/dimuse.h
+++ b/engines/scumm/imuse_digi/dimuse.h
@@ -26,6 +26,8 @@
#define SCUMM_IMUSE_DIGI_H
#include "common/scummsys.h"
+#include "common/mutex.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "scumm/imuse_digi/dimuse.h"
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp
index fd9deb7b44..c78e313fc2 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.cpp
+++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp
@@ -229,7 +229,7 @@ int32 decompressADPCM(byte *compInput, byte *compOutput, int channels) {
// Every block starts with a 2 byte word. If that word is
// non-zero, it indicates the size of a block of raw audio
// data (not encoded) following it. That data we simply copy
- // to the output buffer and the proceed by decoding the
+ // to the output buffer and then proceed by decoding the
// remaining data.
//
// If on the other hand the word is zero, then what follows
diff --git a/engines/scumm/midiparser_ro.cpp b/engines/scumm/midiparser_ro.cpp
index e737d747ac..be77e4fd66 100644
--- a/engines/scumm/midiparser_ro.cpp
+++ b/engines/scumm/midiparser_ro.cpp
@@ -26,6 +26,7 @@
#include "audio/midiparser.h"
#include "audio/mididrv.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Scumm {
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index e81212fec8..b0786c924d 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -23,8 +23,11 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/util.h"
+#include "graphics/palette.h"
+
#include "scumm/resource.h"
#include "scumm/scumm.h"
#include "scumm/scumm_v6.h"
diff --git a/engines/scumm/player_mod.h b/engines/scumm/player_mod.h
index 67d1bb4cbf..3f97c4cab9 100644
--- a/engines/scumm/player_mod.h
+++ b/engines/scumm/player_mod.h
@@ -31,7 +31,7 @@
#include "audio/mixer.h"
namespace Audio {
- class RateConverter;
+class RateConverter;
}
namespace Scumm {
diff --git a/engines/scumm/player_nes.h b/engines/scumm/player_nes.h
index 5f6e8f2d8d..402eea7bf8 100644
--- a/engines/scumm/player_nes.h
+++ b/engines/scumm/player_nes.h
@@ -35,7 +35,7 @@ namespace Scumm {
class ScummEngine;
namespace APUe {
- class APU;
+class APU;
}
static const int MAXVOLUME = 0x7F;
diff --git a/engines/scumm/player_pce.h b/engines/scumm/player_pce.h
index 3f5033f724..42153e8abc 100644
--- a/engines/scumm/player_pce.h
+++ b/engines/scumm/player_pce.h
@@ -27,6 +27,7 @@
#define SCUMM_PLAYER_PCE_H
#include "common/scummsys.h"
+#include "common/mutex.h"
#include "scumm/music.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
diff --git a/engines/scumm/player_sid.cpp b/engines/scumm/player_sid.cpp
index 0d5832a5fb..11468f3097 100644
--- a/engines/scumm/player_sid.cpp
+++ b/engines/scumm/player_sid.cpp
@@ -1296,7 +1296,7 @@ int Player_SID::readBuffer(int16 *buffer, const int numSamples) {
_cpuCyclesLeft = timingProps[_videoSystem].cyclesPerFrame;
}
// fetch samples
- int sampleCount = _sid->clock(_cpuCyclesLeft, (short*)buffer, samplesLeft);
+ int sampleCount = _sid->updateClock(_cpuCyclesLeft, (short*)buffer, samplesLeft);
samplesLeft -= sampleCount;
buffer += sampleCount;
}
diff --git a/engines/scumm/player_v4a.h b/engines/scumm/player_v4a.h
index 108dbcf317..458a39b5fe 100644
--- a/engines/scumm/player_v4a.h
+++ b/engines/scumm/player_v4a.h
@@ -27,6 +27,7 @@
#define SCUMM_PLAYER_V4A_H
#include "common/scummsys.h"
+#include "common/util.h"
#include "scumm/music.h"
#include "audio/mixer.h"
#include "audio/mods/tfmx.h"
diff --git a/engines/scumm/proc3ARM.s b/engines/scumm/proc3ARM.s
index 8b3e31f5f8..5acfa86c29 100644
--- a/engines/scumm/proc3ARM.s
+++ b/engines/scumm/proc3ARM.s
@@ -25,40 +25,40 @@
.text
- .global ClassicProc3RendererShadowARM
+ .global _ClassicProc3RendererShadowARM
-.equ _scaleIndexY , 112
-.equ _numStrips , 108
-.equ _palette , 104
-.equ _shadow_table , 100
-.equ _scaleIndexX , 96
-.equ _scaleX , 92
-.equ _height , 88
-.equ store_r14 , 84
-.equ store_r11 , 80
-.equ store_r10 , 76
-.equ store_r9 , 72
-.equ store_r8 , 68
-.equ store_r7 , 64
-.equ store_r6 , 60
-.equ store_r5 , 56
-.equ store_r4 , 52
-.equ src , 48
-.equ height , 44
-.equ len , 40
-.equ v1_shr , 36
-.equ v1_skip_width , 32
-.equ v1_destptr , 28
-.equ v1_scaleXstep , 24
-.equ v1_mask_ptr , 20
-.equ v1_y , 16
-.equ v1_scaletable , 12
-.equ pitch , 8
-.equ scaleIdxXPtr , 4
-.equ scaleIdxYPtr , 0
+.set _scaleIndexY , 112
+.set _numStrips , 108
+.set _palette , 104
+.set _shadow_table , 100
+.set _scaleIndexX , 96
+.set _scaleX , 92
+.set _height , 88
+.set store_r14 , 84
+.set store_r11 , 80
+.set store_r10 , 76
+.set store_r9 , 72
+.set store_r8 , 68
+.set store_r7 , 64
+.set store_r6 , 60
+.set store_r5 , 56
+.set store_r4 , 52
+.set src , 48
+.set height , 44
+.set len , 40
+.set v1_shr , 36
+.set v1_skip_width , 32
+.set v1_destptr , 28
+.set v1_scaleXstep , 24
+.set v1_mask_ptr , 20
+.set v1_y , 16
+.set v1_scaletable , 12
+.set pitch , 8
+.set scaleIdxXPtr , 4
+.set scaleIdxYPtr , 0
-.equ space , 48
+.set space , 48
@ r0 = _scaleY
@ r1 = v1
@@ -71,7 +71,7 @@
@ <> = _palette
@ <> = _numstrips
@ <> = _scaleIndexY
-ClassicProc3RendererShadowARM:
+_ClassicProc3RendererShadowARM:
@ shadow20 = false
@ shadowed = true
@ unscaled = false
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index 91e780bcd1..eead241b90 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -30,8 +30,8 @@
#include <stddef.h> // for ptrdiff_t
namespace Common {
- class SeekableReadStream;
- class WriteStream;
+class SeekableReadStream;
+class WriteStream;
}
namespace Scumm {
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index 40eeba3663..8f555818f4 100644
--- a/engines/scumm/scumm-md5.h
+++ b/engines/scumm/scumm-md5.h
@@ -1,5 +1,5 @@
/*
- This file was generated by the md5table tool on Mon Oct 18 00:42:16 2010
+ This file was generated by the md5table tool on Sun Apr 17 10:46:26 2011
DO NOT EDIT MANUALLY!
*/
@@ -206,6 +206,7 @@ static const MD5Table md5table[] = {
{ "4c4820518e16e1a0e3616a3b021a04f3", "catalog", "HE CUP", "Preview", 10927456, Common::DE_DEU, Common::kPlatformUnknown },
{ "4cb9c3618f71668f8e4346c8f323fa82", "monkey2", "", "", 10700, Common::EN_ANY, Common::kPlatformMacintosh },
{ "4ce2d5b355964bbcb5e5ce73236ef868", "freddicove", "HE 100", "", -1, Common::RU_RUS, Common::kPlatformWindows },
+ { "4cfd3fda4a4e6e64a1fc488eba973b7a", "fbpack", "", "", -1, Common::EN_ANY, Common::kPlatformPC },
{ "4d34042713958b971cb139fba4658586", "atlantis", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns },
{ "4dbff3787aedcd96b0b325f2d92d7ad9", "maze", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformUnknown },
{ "4dc780f1bc587a193ce8a97652791438", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformAmiga },
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 5aea36ef66..f43aed53f7 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1162,7 +1162,7 @@ Common::Error ScummEngine::init() {
warning("Starting game without the required 16bit color support.\nYou may experience color glitches");
initGraphics(screenWidth, screenHeight, (screenWidth > 320));
} else {
- error("16bit color support is required for this game");
+ return Common::Error(Common::kUnsupportedColorMode, "16bit color support is required for this game");
}
#endif
} else {
@@ -1222,7 +1222,7 @@ void ScummEngine::setupScumm() {
setupCharsetRenderer();
// Create and clear the text surface
- _textSurface.create(_screenWidth * _textSurfaceMultiplier, _screenHeight * _textSurfaceMultiplier, 1);
+ _textSurface.create(_screenWidth * _textSurfaceMultiplier, _screenHeight * _textSurfaceMultiplier, Graphics::PixelFormat::createFormatCLUT8());
clearTextSurface();
// Create the costume renderer
@@ -1648,6 +1648,8 @@ void ScummEngine_v90he::resetScumm() {
break;
case GID_SOCCER:
+ case GID_SOCCERMLS:
+ case GID_SOCCER2004:
_logicHE = new LogicHEsoccer(this);
break;
@@ -2494,7 +2496,7 @@ void ScummEngine_v90he::runBootscript() {
void ScummEngine::startManiac() {
debug(0, "stub startManiac()");
- displayMessage(0, "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.");
+ displayMessage(0, "%s", _("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."));
}
#pragma mark -
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index f3af84bb04..62c6c70e5a 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -35,6 +35,7 @@
#include "common/random.h"
#include "common/rect.h"
#include "common/str.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
#include "graphics/sjis.h"
@@ -56,12 +57,12 @@
#endif
namespace GUI {
- class Dialog;
+class Dialog;
}
using GUI::Dialog;
namespace Common {
- class SeekableReadStream;
- class WriteStream;
+class SeekableReadStream;
+class WriteStream;
}
/**
@@ -253,6 +254,8 @@ enum ScummGameId {
GID_FUNSHOP, // Used for all three funshops
GID_FOOTBALL,
GID_SOCCER,
+ GID_SOCCERMLS,
+ GID_SOCCER2004,
GID_BASEBALL2001,
GID_BASKETBALL,
GID_MOONBASE,
@@ -463,7 +466,7 @@ public:
virtual Common::Error run() {
Common::Error err;
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp
index 4389890994..95b7653262 100644
--- a/engines/scumm/smush/channel.cpp
+++ b/engines/scumm/smush/channel.cpp
@@ -24,6 +24,8 @@
*/
+#include "common/textconsole.h"
+
#include "scumm/smush/channel.h"
namespace Scumm {
diff --git a/engines/scumm/smush/channel.h b/engines/scumm/smush/channel.h
index c35ac0ac00..717a294d96 100644
--- a/engines/scumm/smush/channel.h
+++ b/engines/scumm/smush/channel.h
@@ -29,7 +29,7 @@
#include "common/util.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Scumm {
diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp
index 658d67c1b4..9dbbc6816f 100644
--- a/engines/scumm/smush/codec37.cpp
+++ b/engines/scumm/smush/codec37.cpp
@@ -25,6 +25,7 @@
#include "common/endian.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "scumm/bomp.h"
#include "scumm/smush/codec37.h"
diff --git a/engines/scumm/smush/codec47.cpp b/engines/scumm/smush/codec47.cpp
index 333fdabccf..47286ba4fc 100644
--- a/engines/scumm/smush/codec47.cpp
+++ b/engines/scumm/smush/codec47.cpp
@@ -25,6 +25,7 @@
#include "common/endian.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "scumm/bomp.h"
#include "scumm/smush/codec47.h"
@@ -342,11 +343,9 @@ void Codec47Decoder::makeTables47(int width) {
#ifdef USE_ARM_SMUSH_ASM
-extern "C" {
#ifndef IPHONE
#define ARM_Smush_decode2 _ARM_Smush_decode2
#endif
-}
extern "C" void ARM_Smush_decode2( byte *dst,
const byte *src,
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp
index 04ed955224..f730acf804 100644
--- a/engines/scumm/smush/saud_channel.cpp
+++ b/engines/scumm/smush/saud_channel.cpp
@@ -26,6 +26,7 @@
#include "common/endian.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "scumm/util.h"
#include "scumm/smush/channel.h"
diff --git a/engines/scumm/smush/smush_mixer.h b/engines/scumm/smush/smush_mixer.h
index c7a7354511..3d62fdc722 100644
--- a/engines/scumm/smush/smush_mixer.h
+++ b/engines/scumm/smush/smush_mixer.h
@@ -27,6 +27,8 @@
#define SCUMM_SMUSH_MIXER_H
+#include "audio/mixer.h"
+#include "common/mutex.h"
#include "scumm/sound.h"
namespace Scumm {
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 0e4f588593..2e39558372 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -31,6 +31,7 @@
#include "common/util.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "scumm/bomp.h"
#include "scumm/file.h"
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 54f35c1969..a38119584f 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -527,6 +527,10 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, Audio::SoundHandle
sprintf(filename, "audio/%s.%d/%d.voc", roomname, offset, b);
_vm->openFile(*_sfxFile, filename);
if (!_sfxFile->isOpen()) {
+ sprintf(filename, "audio/%s_%d/%d.voc", roomname, offset, b);
+ _vm->openFile(*_sfxFile, filename);
+ }
+ if (!_sfxFile->isOpen()) {
sprintf(filename, "%d.%d.voc", offset, b);
_vm->openFile(*_sfxFile, filename);
}
diff --git a/engines/scumm/util.cpp b/engines/scumm/util.cpp
index ccd0230efa..5c3e4c9d0c 100644
--- a/engines/scumm/util.cpp
+++ b/engines/scumm/util.cpp
@@ -25,6 +25,7 @@
#include "scumm/util.h"
#include "common/util.h"
+#include "common/textconsole.h"
namespace Scumm {
diff --git a/engines/sky/autoroute.cpp b/engines/sky/autoroute.cpp
index dae4b94291..d6974837c6 100644
--- a/engines/sky/autoroute.cpp
+++ b/engines/sky/autoroute.cpp
@@ -25,6 +25,7 @@
#include "common/endian.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "sky/autoroute.h"
diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp
index 78884e96dc..672fb38ca9 100644
--- a/engines/sky/compact.cpp
+++ b/engines/sky/compact.cpp
@@ -24,9 +24,10 @@
*/
+#include "common/debug.h"
#include "common/endian.h"
-#include "common/util.h"
#include "common/file.h"
+#include "common/textconsole.h"
#include "sky/compact.h"
#include "gui/message.h"
#include <stddef.h> // for ptrdiff_t
@@ -85,7 +86,7 @@ static const uint32 compactOffsets[] = {
MK16(Compact, alt),
MK16(Compact, request),
MK16(Compact, spWidth_xx),
- MK16(Compact, spColour),
+ MK16(Compact, spColor),
MK16(Compact, spTextId),
MK16(Compact, spTime),
MK16(Compact, arAnimIndex),
diff --git a/engines/sky/compact.h b/engines/sky/compact.h
index cd80d5cfbe..4861273146 100644
--- a/engines/sky/compact.h
+++ b/engines/sky/compact.h
@@ -31,7 +31,7 @@
#include "sky/skydefs.h"
namespace Common {
- class File;
+class File;
}
enum CptIds {
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index 55ba6039c3..f31f0f6ba9 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -26,11 +26,10 @@
#include "common/endian.h"
#include "common/config-manager.h"
-#include "common/file.h"
#include "common/events.h"
#include "common/system.h"
#include "common/savefile.h"
-#include "common/util.h"
+#include "common/textconsole.h"
#include "gui/message.h"
#include "sky/compact.h"
@@ -1275,7 +1274,7 @@ void Control::importOldCompact(Compact* destCpt, uint8 **srcPos, uint16 numElems
LODSW(*srcPos, destCpt->alt);
LODSW(*srcPos, destCpt->request);
LODSW(*srcPos, destCpt->spWidth_xx);
- LODSW(*srcPos, destCpt->spColour);
+ LODSW(*srcPos, destCpt->spColor);
LODSW(*srcPos, destCpt->spTextId);
LODSW(*srcPos, destCpt->spTime);
LODSW(*srcPos, destCpt->arAnimIndex);
diff --git a/engines/sky/control.h b/engines/sky/control.h
index a0024ce73b..e4428c1876 100644
--- a/engines/sky/control.h
+++ b/engines/sky/control.h
@@ -33,7 +33,7 @@
class OSystem;
namespace Common {
- class SaveFileManager;
+class SaveFileManager;
}
namespace Sky {
diff --git a/engines/sky/debug.cpp b/engines/sky/debug.cpp
index 2839665ff8..df55966a9a 100644
--- a/engines/sky/debug.cpp
+++ b/engines/sky/debug.cpp
@@ -24,7 +24,7 @@
*/
-#include "common/endian.h"
+#include "common/debug.h"
#include "common/util.h"
#include "sky/debug.h"
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index e72875fa4e..6871fc9604 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -34,6 +34,7 @@
#include "common/file.h"
#include "common/fs.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "engines/metaengine.h"
diff --git a/engines/sky/disk.cpp b/engines/sky/disk.cpp
index 5ad0c3eb19..3795c4166d 100644
--- a/engines/sky/disk.cpp
+++ b/engines/sky/disk.cpp
@@ -24,12 +24,12 @@
*/
+#include "common/debug.h"
+#include "common/textconsole.h"
#include "common/endian.h"
#include "common/file.h"
-#include "common/util.h"
#include "sky/disk.h"
-#include "sky/rnc_deco.h"
#include "sky/sky.h"
#include "sky/struc.h"
diff --git a/engines/sky/disk.h b/engines/sky/disk.h
index 3338cce385..0cdcbb4d0f 100644
--- a/engines/sky/disk.h
+++ b/engines/sky/disk.h
@@ -28,13 +28,12 @@
#include "common/scummsys.h"
-#include "common/str.h"
#include "sky/rnc_deco.h"
#define MAX_FILES_IN_LIST 60
namespace Common {
- class File;
+class File;
}
namespace Sky {
diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp
index cf1910c5b1..506a6699c1 100644
--- a/engines/sky/intro.cpp
+++ b/engines/sky/intro.cpp
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/events.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "sky/disk.h"
#include "sky/intro.h"
diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp
index 1c1e2c9682..f9ebd0fb64 100644
--- a/engines/sky/logic.cpp
+++ b/engines/sky/logic.cpp
@@ -25,9 +25,8 @@
#include "common/endian.h"
#include "common/rect.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
-#include "common/system.h"
+#include "common/textconsole.h"
#include "sky/autoroute.h"
#include "sky/compact.h"
@@ -1823,7 +1822,7 @@ bool Logic::fnHighlight(uint32 itemNo, uint32 pen, uint32 c) {
pen += 241;
Compact *textCompact = _skyCompact->fetchCpt(itemNo);
uint8 *sprData = (uint8 *)SkyEngine::fetchItem(textCompact->flag);
- _skyText->changeTextSpriteColour(sprData, (uint8)pen);
+ _skyText->changeTextSpriteColor(sprData, (uint8)pen);
return true;
}
@@ -2547,7 +2546,7 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
// form the text sprite, if player wants subtitles or
// if we couldn't find the speech file
DisplayedText textInfo;
- textInfo = _skyText->lowTextManager(textNum, FIXED_TEXT_WIDTH, 0, (uint8)target->spColour, true);
+ textInfo = _skyText->lowTextManager(textNum, FIXED_TEXT_WIDTH, 0, (uint8)target->spColor, true);
Compact *textCompact = _skyCompact->fetchCpt(textInfo.compactNum);
target->spTextId = textInfo.compactNum; //So we know what text to kill
byte *textGfx = textInfo.textData;
diff --git a/engines/sky/mouse.cpp b/engines/sky/mouse.cpp
index ca0ebcc19c..611010fa46 100644
--- a/engines/sky/mouse.cpp
+++ b/engines/sky/mouse.cpp
@@ -26,6 +26,7 @@
#include "common/events.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
#include "sky/disk.h"
#include "sky/logic.h"
diff --git a/engines/sky/music/adlibchannel.cpp b/engines/sky/music/adlibchannel.cpp
index e9c20de8c7..9b3c4338ab 100644
--- a/engines/sky/music/adlibchannel.cpp
+++ b/engines/sky/music/adlibchannel.cpp
@@ -25,6 +25,7 @@
#include "common/endian.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "sky/music/adlibchannel.h"
#include "sky/sky.h"
diff --git a/engines/sky/music/gmchannel.cpp b/engines/sky/music/gmchannel.cpp
index 3852a69068..be0afa8894 100644
--- a/engines/sky/music/gmchannel.cpp
+++ b/engines/sky/music/gmchannel.cpp
@@ -25,6 +25,7 @@
#include "gmchannel.h"
#include "common/util.h"
+#include "common/textconsole.h"
#include "audio/mididrv.h"
namespace Sky {
diff --git a/engines/sky/music/gmmusic.cpp b/engines/sky/music/gmmusic.cpp
index 8818c5b711..6a8529f287 100644
--- a/engines/sky/music/gmmusic.cpp
+++ b/engines/sky/music/gmmusic.cpp
@@ -28,6 +28,7 @@
#include "sky/sky.h"
#include "common/util.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "audio/mididrv.h"
namespace Sky {
diff --git a/engines/sky/music/mt32music.cpp b/engines/sky/music/mt32music.cpp
index 51df95e451..4f47e511c7 100644
--- a/engines/sky/music/mt32music.cpp
+++ b/engines/sky/music/mt32music.cpp
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/system.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "audio/mididrv.h"
namespace Sky {
diff --git a/engines/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index e1044a9505..748637f9d0 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -27,6 +27,7 @@
#include "sky/disk.h"
#include "common/util.h"
#include "common/endian.h"
+#include "common/textconsole.h"
namespace Sky {
diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp
index a77017de38..a209571b37 100644
--- a/engines/sky/screen.cpp
+++ b/engines/sky/screen.cpp
@@ -27,6 +27,9 @@
#include "common/endian.h"
#include "common/events.h"
#include "common/system.h"
+#include "common/textconsole.h"
+
+#include "graphics/palette.h"
#include "sky/disk.h"
#include "sky/logic.h"
@@ -38,7 +41,7 @@
namespace Sky {
-uint8 Screen::_top16Colours[16*3] = {
+uint8 Screen::_top16Colors[16*3] = {
0, 0, 0,
38, 38, 38,
63, 63, 63,
@@ -63,7 +66,7 @@ Screen::Screen(OSystem *pSystem, Disk *pDisk, SkyCompact *skyCompact) {
_skyCompact = skyCompact;
int i;
- uint8 tmpPal[VGA_COLOURS * 3];
+ uint8 tmpPal[VGA_COLORS * 3];
_gameGrid = (uint8 *)malloc(GRID_X * GRID_Y * 2);
forceRefresh();
@@ -72,17 +75,17 @@ Screen::Screen(OSystem *pSystem, Disk *pDisk, SkyCompact *skyCompact) {
_scrollScreen = NULL;
//blank the first 240 colors of the palette
- memset(tmpPal, 0, GAME_COLOURS * 3);
+ memset(tmpPal, 0, GAME_COLORS * 3);
//set the remaining colors
- for (i = 0; i < (VGA_COLOURS-GAME_COLOURS); i++) {
- tmpPal[3 * GAME_COLOURS + i * 3 + 0] = (_top16Colours[i * 3 + 0] << 2) + (_top16Colours[i * 3 + 0] >> 4);
- tmpPal[3 * GAME_COLOURS + i * 3 + 1] = (_top16Colours[i * 3 + 1] << 2) + (_top16Colours[i * 3 + 1] >> 4);
- tmpPal[3 * GAME_COLOURS + i * 3 + 2] = (_top16Colours[i * 3 + 2] << 2) + (_top16Colours[i * 3 + 2] >> 4);
+ for (i = 0; i < (VGA_COLORS-GAME_COLORS); i++) {
+ tmpPal[3 * GAME_COLORS + i * 3 + 0] = (_top16Colors[i * 3 + 0] << 2) + (_top16Colors[i * 3 + 0] >> 4);
+ tmpPal[3 * GAME_COLORS + i * 3 + 1] = (_top16Colors[i * 3 + 1] << 2) + (_top16Colors[i * 3 + 1] >> 4);
+ tmpPal[3 * GAME_COLORS + i * 3 + 2] = (_top16Colors[i * 3 + 2] << 2) + (_top16Colors[i * 3 + 2] >> 4);
}
//set the palette
- _system->getPaletteManager()->setPalette(tmpPal, 0, VGA_COLOURS);
+ _system->getPaletteManager()->setPalette(tmpPal, 0, VGA_COLORS);
_currentPalette = 0;
_seqInfo.nextFrame = _seqInfo.framesLeft = 0;
@@ -109,32 +112,32 @@ void Screen::setFocusRectangle(const Common::Rect& rect) {
//set a new palette, pal is a pointer to dos vga rgb components 0..63
void Screen::setPalette(uint8 *pal) {
convertPalette(pal, _palette);
- _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS);
+ _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS);
_system->updateScreen();
}
void Screen::setPaletteEndian(uint8 *pal) {
#ifdef SCUMM_BIG_ENDIAN
- uint8 endPalette[VGA_COLOURS * 3];
- for (uint16 cnt = 0; cnt < VGA_COLOURS * 3; cnt++)
+ uint8 endPalette[VGA_COLORS * 3];
+ for (uint16 cnt = 0; cnt < VGA_COLORS * 3; cnt++)
endPalette[cnt] = pal[cnt ^ 1];
convertPalette(endPalette, _palette);
#else
convertPalette(pal, _palette);
#endif
- _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS);
+ _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS);
_system->updateScreen();
}
void Screen::halvePalette() {
- uint8 halfPalette[VGA_COLOURS * 3];
+ uint8 halfPalette[VGA_COLORS * 3];
- for (uint8 cnt = 0; cnt < GAME_COLOURS; cnt++) {
+ for (uint8 cnt = 0; cnt < GAME_COLORS; cnt++) {
halfPalette[cnt * 3 + 0] = _palette[cnt * 3 + 0] >> 1;
halfPalette[cnt * 3 + 1] = _palette[cnt * 3 + 1] >> 1;
halfPalette[cnt * 3 + 2] = _palette[cnt * 3 + 2] >> 1;
}
- _system->getPaletteManager()->setPalette(halfPalette, 0, GAME_COLOURS);
+ _system->getPaletteManager()->setPalette(halfPalette, 0, GAME_COLORS);
}
void Screen::setPalette(uint16 fileNum) {
@@ -168,7 +171,7 @@ void Screen::showScreen(uint8 *pScreen) {
void Screen::convertPalette(uint8 *inPal, uint8* outPal) {
int i;
- for (i = 0; i < VGA_COLOURS; i++) {
+ for (i = 0; i < VGA_COLORS; i++) {
outPal[3 * i + 0] = (inPal[3 * i + 0] << 2) + (inPal[3 * i + 0] >> 4);
outPal[3 * i + 1] = (inPal[3 * i + 1] << 2) + (inPal[3 * i + 1] >> 4);
outPal[3 * i + 2] = (inPal[3 * i + 2] << 2) + (inPal[3 * i + 2] >> 4);
@@ -247,8 +250,8 @@ void Screen::fnFadeDown(uint32 scroll) {
uint32 delayTime = _system->getMillis();
for (uint8 cnt = 0; cnt < 32; cnt++) {
delayTime += 20;
- palette_fadedown_helper(_palette, GAME_COLOURS);
- _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS);
+ palette_fadedown_helper(_palette, GAME_COLORS);
+ _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS);
_system->updateScreen();
int32 waitTime = (int32)delayTime - _system->getMillis();
if (waitTime < 0)
@@ -296,7 +299,7 @@ void Screen::paletteFadeUp(uint16 fileNr) {
}
void Screen::paletteFadeUp(uint8 *pal) {
- byte tmpPal[VGA_COLOURS * 3];
+ byte tmpPal[VGA_COLORS * 3];
convertPalette(pal, tmpPal);
@@ -304,13 +307,13 @@ void Screen::paletteFadeUp(uint8 *pal) {
for (uint8 cnt = 1; cnt <= 32; cnt++) {
delayTime += 20;
- for (uint8 colCnt = 0; colCnt < GAME_COLOURS; colCnt++) {
+ for (uint8 colCnt = 0; colCnt < GAME_COLORS; colCnt++) {
_palette[colCnt * 3 + 0] = (tmpPal[colCnt * 3 + 0] * cnt) >> 5;
_palette[colCnt * 3 + 1] = (tmpPal[colCnt * 3 + 1] * cnt) >> 5;
_palette[colCnt * 3 + 2] = (tmpPal[colCnt * 3 + 2] * cnt) >> 5;
}
- _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLOURS);
+ _system->getPaletteManager()->setPalette(_palette, 0, GAME_COLORS);
_system->updateScreen();
int32 waitTime = (int32)delayTime - _system->getMillis();
@@ -331,8 +334,8 @@ void Screen::fnFadeUp(uint32 palNum, uint32 scroll) {
if (palette == NULL)
error("Screen::fnFadeUp: can't fetch compact %X", palNum);
#ifdef SCUMM_BIG_ENDIAN
- byte tmpPal[VGA_COLOURS * 3];
- for (uint16 cnt = 0; cnt < VGA_COLOURS * 3; cnt++)
+ byte tmpPal[VGA_COLORS * 3];
+ for (uint16 cnt = 0; cnt < VGA_COLORS * 3; cnt++)
tmpPal[cnt] = palette[cnt ^ 1];
paletteFadeUp(tmpPal);
#else
diff --git a/engines/sky/screen.h b/engines/sky/screen.h
index 69a9a2fc8f..5e226c49ed 100644
--- a/engines/sky/screen.h
+++ b/engines/sky/screen.h
@@ -31,8 +31,9 @@
#include "sky/skydefs.h"
class OSystem;
+
namespace Common {
- struct Rect;
+struct Rect;
}
namespace Sky {
@@ -44,8 +45,8 @@ struct Compact;
struct DataFileHeader;
#define SCROLL_JUMP 16
-#define VGA_COLOURS 256
-#define GAME_COLOURS 240
+#define VGA_COLORS 256
+#define GAME_COLORS 240
#define FORE 1
#define BACK 0
@@ -100,8 +101,8 @@ private:
OSystem *_system;
Disk *_skyDisk;
SkyCompact *_skyCompact;
- static uint8 _top16Colours[16 * 3];
- uint8 _palette[VGA_COLOURS * 3];
+ static uint8 _top16Colors[16 * 3];
+ uint8 _palette[VGA_COLORS * 3];
uint32 _currentPalette;
uint8 _seqGrid[20 * 12];
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index f3556c84b3..f10ec1083a 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -25,6 +25,7 @@
#include "common/config-manager.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "sky/control.h"
#include "sky/debug.h"
diff --git a/engines/sky/sky.h b/engines/sky/sky.h
index d8ced1e569..58ac3ed26e 100644
--- a/engines/sky/sky.h
+++ b/engines/sky/sky.h
@@ -27,7 +27,8 @@
#define SKY_H
-#include "common/events.h"
+#include "common/error.h"
+#include "common/keyboard.h"
#include "engines/engine.h"
/**
@@ -52,7 +53,6 @@ struct SystemVars {
bool paused;
};
-struct Compact;
class Sound;
class Disk;
class Text;
@@ -106,7 +106,7 @@ protected:
virtual Common::Error run() {
Common::Error err;
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
diff --git a/engines/sky/skydefs.h b/engines/sky/skydefs.h
index f68c0f826b..e3f3f3101f 100644
--- a/engines/sky/skydefs.h
+++ b/engines/sky/skydefs.h
@@ -92,7 +92,7 @@ namespace Sky {
#define C_BASE_MODE 0
#define C_BASE_MODE56 56
#define C_ACTION_MODE 4
-#define C_SP_COLOUR 90
+#define C_SP_COLOR 90
#define C_MEGA_SET 112
#define C_GRID_WIDTH 114
#define C_ANIM_UP 122
@@ -141,7 +141,7 @@ namespace Sky {
#define L_WAIT_SYNC 15
#define L_SIMPLE_MOD 16
-// characters with own colour set
+// characters with own color set
#define SP_COL_FOSTER 194
#define SP_COL_JOEY 216
#define SP_COL_JOBS 209
diff --git a/engines/sky/sound.cpp b/engines/sky/sound.cpp
index 3d247ed334..7191f6cd00 100644
--- a/engines/sky/sound.cpp
+++ b/engines/sky/sound.cpp
@@ -24,7 +24,9 @@
*/
+#include "common/debug.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "sky/disk.h"
#include "sky/logic.h"
diff --git a/engines/sky/struc.h b/engines/sky/struc.h
index 295e31d9b0..987f074ed1 100644
--- a/engines/sky/struc.h
+++ b/engines/sky/struc.h
@@ -37,9 +37,9 @@ struct DisplayedText {
#include "common/pack-start.h" // START STRUCT PACKING
struct DataFileHeader {
- uint16 flag; // bit 0: set for colour data, clear for not
+ uint16 flag; // bit 0: set for color data, clear for not
// bit 1: set for compressed, clear for uncompressed
- // bit 2: set for 32 colours, clear for 16 colours
+ // bit 2: set for 32 colors, clear for 16 colors
uint16 s_x;
uint16 s_y;
uint16 s_width;
@@ -139,7 +139,7 @@ struct Compact {
uint16 request; // 42
uint16 spWidth_xx; // 43
- uint16 spColour; // 44
+ uint16 spColor; // 44
uint16 spTextId; // 45
uint16 spTime; // 46
diff --git a/engines/sky/text.cpp b/engines/sky/text.cpp
index 73c376dbbe..2464d93581 100644
--- a/engines/sky/text.cpp
+++ b/engines/sky/text.cpp
@@ -24,7 +24,9 @@
*/
+#include "common/debug.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "sky/disk.h"
#include "sky/logic.h"
@@ -231,13 +233,13 @@ char Text::getTextChar(uint8 **data, uint32 *bitPos) {
}
}
-DisplayedText Text::displayText(uint32 textNum, uint8 *dest, bool centre, uint16 pixelWidth, uint8 color) {
+DisplayedText Text::displayText(uint32 textNum, uint8 *dest, bool center, uint16 pixelWidth, uint8 color) {
//Render text into buffer *dest
getText(textNum);
- return displayText(_textBuffer, dest, centre, pixelWidth, color);
+ return displayText(_textBuffer, dest, center, pixelWidth, color);
}
-DisplayedText Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16 pixelWidth, uint8 color) {
+DisplayedText Text::displayText(char *textPtr, uint8 *dest, bool center, uint16 pixelWidth, uint8 color) {
//Render text pointed to by *textPtr in buffer *dest
uint32 centerTable[10];
uint16 lineWidth = 0;
@@ -319,7 +321,7 @@ DisplayedText Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
uint32 *centerTblPtr = centerTable;
do {
- if (centre) {
+ if (center) {
uint32 width = (pixelWidth - *centerTblPtr) >> 1;
centerTblPtr++;
curDest += width;
@@ -379,9 +381,9 @@ void Text::makeGameCharacter(uint8 textChar, uint8 *charSetPtr, uint8 *&dest, ui
dest = startPos + charWidth + _dtCharSpacing * 2 - 1;
}
-DisplayedText Text::lowTextManager(uint32 textNum, uint16 width, uint16 logicNum, uint8 color, bool centre) {
+DisplayedText Text::lowTextManager(uint32 textNum, uint16 width, uint16 logicNum, uint8 color, bool center) {
getText(textNum);
- DisplayedText textInfo = displayText(_textBuffer, NULL, centre, width, color);
+ DisplayedText textInfo = displayText(_textBuffer, NULL, center, width, color);
uint32 compactNum = FIRST_TEXT_COMPACT;
Compact *cpt = _skyCompact->fetchCpt(compactNum);
@@ -405,7 +407,7 @@ DisplayedText Text::lowTextManager(uint32 textNum, uint16 width, uint16 logicNum
return textInfo;
}
-void Text::changeTextSpriteColour(uint8 *sprData, uint8 newCol) {
+void Text::changeTextSpriteColor(uint8 *sprData, uint8 newCol) {
DataFileHeader *header = (DataFileHeader *)sprData;
sprData += sizeof(DataFileHeader);
for (uint16 cnt = 0; cnt < header->s_sp_size; cnt++)
diff --git a/engines/sky/text.h b/engines/sky/text.h
index 890cfb2e47..06aabf5094 100644
--- a/engines/sky/text.h
+++ b/engines/sky/text.h
@@ -52,14 +52,14 @@ class Text {
public:
Text(Disk *skyDisk, SkyCompact *skyCompact);
~Text();
- struct DisplayedText displayText(uint32 textNum, uint8 *dest, bool centre, uint16 pixelWidth, uint8 color);
- struct DisplayedText displayText(char *textPtr, uint8 *dest, bool centre, uint16 pixelWidth, uint8 color);
- struct DisplayedText lowTextManager(uint32 textNum, uint16 width, uint16 logicNum, uint8 color, bool centre);
+ struct DisplayedText displayText(uint32 textNum, uint8 *dest, bool center, uint16 pixelWidth, uint8 color);
+ struct DisplayedText displayText(char *textPtr, uint8 *dest, bool center, uint16 pixelWidth, uint8 color);
+ struct DisplayedText lowTextManager(uint32 textNum, uint16 width, uint16 logicNum, uint8 color, bool center);
void fnSetFont(uint32 fontNr);
void fnTextModule(uint32 textInfoId, uint32 textNo);
void fnPointerText(uint32 pointedId, uint16 mouseX, uint16 mouseY);
void logicCursor(Compact *textCompact, uint16 mouseX, uint16 mouseY);
- void changeTextSpriteColour(uint8 *sprData, uint8 newCol);
+ void changeTextSpriteColor(uint8 *sprData, uint8 newCol);
uint32 giveCurrentCharSet();
uint32 _numLetters; //no of chars in message
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index 60176be1a9..7c17befcff 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -24,15 +24,16 @@
*/
#include "common/file.h"
+#include "common/events.h"
+#include "common/keyboard.h"
+#include "common/textconsole.h"
#include "sword1/sword1.h"
#include "sword1/animation.h"
#include "sword1/text.h"
-#include "audio/decoders/vorbis.h"
-#include "common/config-manager.h"
-#include "common/endian.h"
#include "common/str.h"
#include "common/system.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "gui/message.h"
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index d4f6bfd1fe..d8ddd53e2e 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -29,7 +29,9 @@
#include "common/events.h"
#include "common/system.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
+#include "graphics/palette.h"
#include "graphics/thumbnail.h"
#include "gui/message.h"
diff --git a/engines/sword1/control.h b/engines/sword1/control.h
index 2e5bfc7197..db910f521f 100644
--- a/engines/sword1/control.h
+++ b/engines/sword1/control.h
@@ -33,7 +33,7 @@
class OSystem;
namespace Common {
- class SaveFileManager;
+class SaveFileManager;
}
namespace Sword1 {
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 855c7d1f83..fa8277033c 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -27,8 +27,6 @@
#include "sword1/control.h"
#include "base/plugins.h"
-#include "common/config-manager.h"
-#include "common/file.h"
#include "common/fs.h"
#include "common/savefile.h"
#include "common/system.h"
diff --git a/engines/sword1/eventman.cpp b/engines/sword1/eventman.cpp
index 55a438f506..9200e6a229 100644
--- a/engines/sword1/eventman.cpp
+++ b/engines/sword1/eventman.cpp
@@ -26,6 +26,7 @@
#include "sword1/eventman.h"
#include "sword1/sworddefs.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Sword1 {
diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index ef54167d41..3da3c457d0 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -25,9 +25,8 @@
#include "common/endian.h"
#include "common/util.h"
-#include "common/system.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
+#include "common/textconsole.h"
#include "sword1/logic.h"
#include "sword1/text.h"
diff --git a/engines/sword1/memman.cpp b/engines/sword1/memman.cpp
index b08631dfc8..f315895eb0 100644
--- a/engines/sword1/memman.cpp
+++ b/engines/sword1/memman.cpp
@@ -25,6 +25,7 @@
#include "sword1/memman.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Sword1 {
diff --git a/engines/sword1/menu.cpp b/engines/sword1/menu.cpp
index 34f6daf276..582bea82f8 100644
--- a/engines/sword1/menu.cpp
+++ b/engines/sword1/menu.cpp
@@ -309,7 +309,7 @@ void Menu::buildMenu() {
if (Logic::_scriptVars[MENU_LOOKING] || _subjectBarStatus == MENU_OPEN) { // either we're in the chooser or we're doing a 'LOOK AT'
if ((!objHeld) || (objHeld == _menuList[menuSlot]))
_objects[menuSlot]->setSelect(true);
- } else if (Logic::_scriptVars[SECOND_ITEM]) { // clicked luggage onto 2nd icon - we need to colour-highlight the 2 relevant icons & grey out the rest
+ } else if (Logic::_scriptVars[SECOND_ITEM]) { // clicked luggage onto 2nd icon - we need to color-highlight the 2 relevant icons & grey out the rest
if ((_menuList[menuSlot] == objHeld) || (_menuList[menuSlot] == Logic::_scriptVars[SECOND_ITEM]))
_objects[menuSlot]->setSelect(true);
} else { // this object is selected - ie. GREYED OUT
diff --git a/engines/sword1/mouse.h b/engines/sword1/mouse.h
index 1b4ca12183..3a7ea747fb 100644
--- a/engines/sword1/mouse.h
+++ b/engines/sword1/mouse.h
@@ -27,6 +27,7 @@
#define SWORD1_MOUSE_H
#include "common/scummsys.h"
+#include "common/rect.h"
#include "sword1/sworddefs.h"
#include "sword1/object.h"
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 2b81ae1eb4..49f9f7271b 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -24,10 +24,9 @@
*/
-#include "common/endian.h"
#include "common/file.h"
#include "common/util.h"
-#include "common/system.h"
+#include "common/textconsole.h"
#include "sword1/sword1.h"
#include "sword1/music.h"
diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp
index 9ac2c7a255..dde1498591 100644
--- a/engines/sword1/objectman.cpp
+++ b/engines/sword1/objectman.cpp
@@ -24,6 +24,7 @@
*/
+#include "common/textconsole.h"
#include "common/util.h"
#include "sword1/objectman.h"
diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp
index 2bad8a79a7..f7b9eb8908 100644
--- a/engines/sword1/resman.cpp
+++ b/engines/sword1/resman.cpp
@@ -24,19 +24,14 @@
*/
-#include "common/config-manager.h"
-#include "common/util.h"
-#include "common/str.h"
-
-#include "engines/engine.h"
+#include "common/debug.h"
+#include "common/textconsole.h"
#include "sword1/memman.h"
#include "sword1/resman.h"
-#include "sword1/sworddefs.h"
#include "sword1/swordres.h"
#include "gui/message.h"
-#include "gui/gui-manager.h"
namespace Sword1 {
void guiFatalError(char *msg) {
diff --git a/engines/sword1/router.cpp b/engines/sword1/router.cpp
index 9ff5ae0c8e..3694ed2459 100644
--- a/engines/sword1/router.cpp
+++ b/engines/sword1/router.cpp
@@ -24,6 +24,7 @@
*/
#include "common/debug.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "sword1/router.h"
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index 1906fcb7fd..de96f6e7b4 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -25,8 +25,11 @@
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/util.h"
+#include "graphics/palette.h"
+
#include "sword1/screen.h"
#include "sword1/logic.h"
#include "sword1/sworddefs.h"
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index f8219eb21a..c970e72748 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -27,10 +27,9 @@
#include "common/endian.h"
#include "common/util.h"
-#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/memstream.h"
-#include "common/system.h"
+#include "common/textconsole.h"
#include "sword1/sound.h"
#include "sword1/resman.h"
diff --git a/engines/sword1/sound.h b/engines/sword1/sound.h
index ae96132241..b6fcd6706f 100644
--- a/engines/sword1/sound.h
+++ b/engines/sword1/sound.h
@@ -34,7 +34,7 @@
#include "audio/mixer.h"
namespace Audio {
- class Mixer;
+class Mixer;
}
namespace Sword1 {
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 8768e62457..3b3eaaf8b9 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -37,6 +37,7 @@
#include "sword1/control.h"
#include "common/config-manager.h"
+#include "common/textconsole.h"
#include "engines/util.h"
diff --git a/engines/sword1/sword1.h b/engines/sword1/sword1.h
index 592d2da6f4..dbb683cd74 100644
--- a/engines/sword1/sword1.h
+++ b/engines/sword1/sword1.h
@@ -27,7 +27,9 @@
#define SWORD1_H
#include "engines/engine.h"
-#include "common/events.h"
+#include "common/error.h"
+#include "common/keyboard.h"
+#include "common/rect.h"
#include "common/util.h"
#include "sword1/sworddefs.h"
#include "sword1/console.h"
@@ -100,7 +102,7 @@ protected:
virtual Common::Error run() {
Common::Error err;
err = init();
- if (err != Common::kNoError)
+ if (err.getCode() != Common::kNoError)
return err;
return go();
}
diff --git a/engines/sword1/text.cpp b/engines/sword1/text.cpp
index ef3e07fe74..7c65533067 100644
--- a/engines/sword1/text.cpp
+++ b/engines/sword1/text.cpp
@@ -24,8 +24,7 @@
*/
-#include "common/endian.h"
-#include "common/util.h"
+#include "common/textconsole.h"
#include "sword1/text.h"
#include "sword1/resman.h"
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp
index 8d1a9836f4..a5a2499b01 100644
--- a/engines/sword2/animation.cpp
+++ b/engines/sword2/animation.cpp
@@ -26,7 +26,9 @@
*/
#include "common/file.h"
+#include "common/mutex.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword2/controls.cpp b/engines/sword2/controls.cpp
index c55cc72493..4332f2811c 100644
--- a/engines/sword2/controls.cpp
+++ b/engines/sword2/controls.cpp
@@ -26,9 +26,7 @@
*/
-#include "common/events.h"
#include "common/rect.h"
-#include "common/config-manager.h"
#include "common/system.h"
#include "sword2/sword2.h"
@@ -465,7 +463,7 @@ void Widget::createSurfaceImage(int state, uint32 res, int x, int y, uint32 pc)
break;
case RLE16:
spriteType |= RDSPR_RLE256;
- // Points to just after last cdt_entry, i.e. start of colour
+ // Points to just after last cdt_entry, i.e. start of color
// table
colTablePtr = _vm->fetchAnimHeader(file) + AnimHeader::size()
+ anim_head.noAnimFrames * CdtEntry::size();
diff --git a/engines/sword2/events.cpp b/engines/sword2/events.cpp
index f0e0e567a4..24101e271c 100644
--- a/engines/sword2/events.cpp
+++ b/engines/sword2/events.cpp
@@ -26,6 +26,7 @@
*/
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp
index 5e570fbaad..e0990ea120 100644
--- a/engines/sword2/function.cpp
+++ b/engines/sword2/function.cpp
@@ -28,6 +28,7 @@
#include "common/system.h"
#include "common/file.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
@@ -1859,15 +1860,15 @@ int32 Logic::fnSetScrollRightMouse(int32 *params) {
return IR_CONT;
}
-int32 Logic::fnColour(int32 *params) {
- // set border colour - useful during script development
- // eg. set to colour during a timer situation, then black when timed
+int32 Logic::fnColor(int32 *params) {
+ // set border color - useful during script development
+ // eg. set to color during a timer situation, then black when timed
// out
- // params 0: colour (see defines above)
+ // params 0: color (see defines above)
#ifdef SWORD2_DEBUG
- // what colour?
+ // what color?
switch (params[0]) {
case BLACK:
_vm->_screen->setPalette(0, 1, black, RDPAL_INSTANT);
@@ -1905,14 +1906,14 @@ static const uint8 blue[3] = { 0, 0, 255 };
#endif
int32 Logic::fnFlash(int32 *params) {
- // flash colour 0 (ie. border) - useful during script development
+ // flash color 0 (ie. border) - useful during script development
// eg. fnFlash(BLUE) where a text line is missed; RED when some code
// missing, etc
- // params: 0 colour to flash
+ // params: 0 color to flash
#ifdef SWORD2_DEBUG
- // what colour?
+ // what color?
switch (params[0]) {
case WHITE:
_vm->_screen->setPalette(0, 1, white, RDPAL_INSTANT);
diff --git a/engines/sword2/header.h b/engines/sword2/header.h
index 3f64152bb9..ed63c806bc 100644
--- a/engines/sword2/header.h
+++ b/engines/sword2/header.h
@@ -114,7 +114,7 @@ enum {
// standard file header
// animation header
// a string of CDT entries (one per frame of the anim)
-// a 16-byte colour table ONLY if (runTimeComp==RLE16)
+// a 16-byte color table ONLY if (runTimeComp==RLE16)
// a string of groups of (frame header + frame data)
// Animation Header
@@ -147,11 +147,11 @@ struct AnimHeader {
enum {
NONE = 0, // No frame compression
- RLE256 = 1, // James's RLE for 256-colour sprites
- RLE16 = 2 // James's RLE for 16- or 17-colour sprites
- // (raw blocks have max 16 colours for 2 pixels
+ RLE256 = 1, // James's RLE for 256-color sprites
+ RLE16 = 2 // James's RLE for 16- or 17-color sprites
+ // (raw blocks have max 16 colors for 2 pixels
// per byte, so '0's are encoded only as FLAT
- // for 17-colour sprites eg. George's mega-set)
+ // for 17-color sprites eg. George's mega-set)
};
// CDT Entry
diff --git a/engines/sword2/icons.cpp b/engines/sword2/icons.cpp
index b115eb373b..8336178ae5 100644
--- a/engines/sword2/icons.cpp
+++ b/engines/sword2/icons.cpp
@@ -157,33 +157,33 @@ void Mouse::buildMenu() {
byte *icon = NULL;
if (res) {
- bool icon_coloured;
+ bool icon_colored;
uint32 object_held = _vm->_logic->readVar(OBJECT_HELD);
uint32 combine_base = _vm->_logic->readVar(COMBINE_BASE);
if (_examiningMenuIcon) {
// When examining an object, that object is
- // coloured. The rest are greyed out.
- icon_coloured = (res == object_held);
+ // colored. The rest are greyed out.
+ icon_colored = (res == object_held);
} else if (combine_base) {
// When combining two menu object (i.e. using
- // one on another), both are coloured. The rest
+ // one on another), both are colored. The rest
// are greyed out.
- icon_coloured = (res == object_held || combine_base);
+ icon_colored = (res == object_held || combine_base);
} else {
// If an object is selected but we are not yet
// doing anything with it, the selected object
- // is greyed out. The rest are coloured.
- icon_coloured = (res != object_held);
+ // is greyed out. The rest are colored.
+ icon_colored = (res != object_held);
}
icon = _vm->_resman->openResource(res) + ResHeader::size();
- // The coloured icon is stored directly after the
+ // The colored icon is stored directly after the
// greyed out one.
- if (icon_coloured)
+ if (icon_colored)
icon += (menuIconWidth * RDMENU_ICONDEEP);
}
@@ -216,7 +216,7 @@ void Mouse::buildSystemMenu() {
else
menuIconWidth = RDMENU_ICONWIDE;
- // Build them all high in full colour - when one is clicked on all the
+ // Build them all high in full color - when one is clicked on all the
// rest will grey out.
for (int i = 0; i < ARRAYSIZE(icon_list); i++) {
diff --git a/engines/sword2/interpreter.cpp b/engines/sword2/interpreter.cpp
index a51ce5702c..a3804366d4 100644
--- a/engines/sword2/interpreter.cpp
+++ b/engines/sword2/interpreter.cpp
@@ -28,6 +28,7 @@
#include "common/util.h"
#include "common/stack.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/header.h"
@@ -147,7 +148,7 @@ void Logic::setupOpcodes() {
OPCODE(fnSetScrollLeftMouse),
OPCODE(fnSetScrollRightMouse),
/* 4C */
- OPCODE(fnColour),
+ OPCODE(fnColor),
OPCODE(fnFlash),
OPCODE(fnPreFetch),
OPCODE(fnGetPlayerSaveData),
diff --git a/engines/sword2/layers.cpp b/engines/sword2/layers.cpp
index d97b1395d5..47cc3ec232 100644
--- a/engines/sword2/layers.cpp
+++ b/engines/sword2/layers.cpp
@@ -35,6 +35,7 @@
#include "common/rect.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
@@ -166,7 +167,7 @@ void Screen::initBackground(int32 res, int32 new_palette) {
spriteInfo.type = 0;
spriteInfo.blend = 0;
spriteInfo.data = _vm->fetchShadingMask(file);
- spriteInfo.colourTable = 0;
+ spriteInfo.colorTable = 0;
if (openLightMask(&spriteInfo) != RD_OK)
error("Could not open light mask");
diff --git a/engines/sword2/logic.cpp b/engines/sword2/logic.cpp
index 511561c55a..c27bd76ff4 100644
--- a/engines/sword2/logic.cpp
+++ b/engines/sword2/logic.cpp
@@ -26,6 +26,7 @@
*/
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword2/logic.h b/engines/sword2/logic.h
index 793f87d037..e40a12bba3 100644
--- a/engines/sword2/logic.h
+++ b/engines/sword2/logic.h
@@ -260,7 +260,7 @@ public:
int32 fnStandAtAnim(int32 *params);
int32 fnSetScrollLeftMouse(int32 *params);
int32 fnSetScrollRightMouse(int32 *params);
- int32 fnColour(int32 *params);
+ int32 fnColor(int32 *params);
int32 fnFlash(int32 *params);
int32 fnPreFetch(int32 *params);
int32 fnGetPlayerSaveData(int32 *params);
diff --git a/engines/sword2/maketext.cpp b/engines/sword2/maketext.cpp
index 84a2fccedd..fda30981c8 100644
--- a/engines/sword2/maketext.cpp
+++ b/engines/sword2/maketext.cpp
@@ -27,17 +27,17 @@
// MAKETEXT - Constructs a single-frame text sprite: returns a handle to a
// FLOATING memory block containing the sprite, given a
-// null-terminated string, max width allowed, pen colour and
+// null-terminated string, max width allowed, pen color and
// pointer to required character set.
//
// NB 1) The routine does not create a standard file header or
// an anim header for the text sprite - the data simply begins
// with the frame header.
//
-// NB 2) If pen colour is zero, it copies the characters into
-// the sprite without remapping the colours.
-// ie. It can handle both the standard 2-colour font for speech
-// and any multicoloured fonts for control panels, etc.
+// NB 2) If pen color is zero, it copies the characters into
+// the sprite without remapping the colors.
+// ie. It can handle both the standard 2-color font for speech
+// and any multicolored fonts for control panels, etc.
//
// Based on textsprt.c as used for Broken Sword 1, but updated
// for new system by JEL on 9oct96 and updated again (for font
@@ -45,6 +45,7 @@
#include "common/system.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
@@ -58,10 +59,10 @@ namespace Sword2 {
#define MAX_LINES 30 // max character lines in output sprite
-#define BORDER_COL 200 // source colour for character border (only
- // needed for remapping colours)
+#define BORDER_COL 200 // source color for character border (only
+ // needed for remapping colors)
-#define LETTER_COL 193 // source colour for bulk of character ( " )
+#define LETTER_COL 193 // source color for bulk of character ( " )
#define LETTER_COL_PSX1 33
#define LETTER_COL_PSX2 34
#define SPACE ' '
@@ -76,9 +77,9 @@ namespace Sword2 {
*
* @param sentence pointer to a null-terminated string
* @param maxWidth the maximum allowed text sprite width in pixels
- * @param pen the text colour, or zero to use the source colours
+ * @param pen the text color, or zero to use the source colors
* @param fontRes the font resource id
- * @param border the border colour; black by default
+ * @param border the border color; black by default
* @return a handle to a floating memory block containing the text sprite
* @note The sentence must contain no leading, trailing or extra spaces.
* Out-of-range characters in the string are replaced by a special
@@ -200,7 +201,7 @@ uint16 FontRenderer::analyseSentence(byte *sentence, uint16 maxWidth, uint32 fon
*
* @param sentence pointer to a null-terminated string
* @param fontRes the font resource id
- * @param pen the text colour, or zero to use the source colours
+ * @param pen the text color, or zero to use the source colors
* @param line array of LineInfo structures, created by analyseSentence()
* @param noOfLines the number of lines, i.e. the number of elements in 'line'
* @return a handle to a floating memory block containing the text sprite
@@ -448,7 +449,7 @@ byte *FontRenderer::findChar(byte ch, byte *charSet) {
* @param spritePtr pointer to the sprite buffer
* @param spriteWidth the width of the character
* @param pen If zero, copy the data directly. Otherwise remap the
- * sprite's colours from BORDER_COL to _borderPen and from
+ * sprite's colors from BORDER_COL to _borderPen and from
* LETTER_COL to pen.
*/
@@ -464,7 +465,7 @@ void FontRenderer::copyChar(byte *charPtr, byte *spritePtr, uint16 spriteWidth,
byte *dest = rowPtr;
if (pen) {
- // Use the specified colours
+ // Use the specified colors
for (uint j = 0; j < frame.width; j++) {
switch (*source++) {
case 0:
@@ -489,7 +490,7 @@ void FontRenderer::copyChar(byte *charPtr, byte *spritePtr, uint16 spriteWidth,
}
} else {
// Pen is zero, so just copy character sprites
- // directly into text sprite without remapping colours.
+ // directly into text sprite without remapping colors.
// Apparently overlapping is never considered here?
memcpy(dest, source, frame.width);
source += frame.width;
@@ -528,13 +529,13 @@ uint32 FontRenderer::buildNewBloc(byte *ascii, int16 x, int16 y, uint16 width, u
frame_head.read(_blocList[i].text_mem);
switch (justification) {
- case POSITION_AT_CENTRE_OF_BASE:
+ case POSITION_AT_CENTER_OF_BASE:
// This one is always used for SPEECH TEXT; possibly
// also for pointer text
x -= (frame_head.width / 2);
y -= frame_head.height;
break;
- case POSITION_AT_CENTRE_OF_TOP:
+ case POSITION_AT_CENTER_OF_TOP:
x -= (frame_head.width / 2);
break;
case POSITION_AT_LEFT_OF_TOP:
@@ -550,10 +551,10 @@ uint32 FontRenderer::buildNewBloc(byte *ascii, int16 x, int16 y, uint16 width, u
x -= frame_head.width;
y -= frame_head.height;
break;
- case POSITION_AT_LEFT_OF_CENTRE:
+ case POSITION_AT_LEFT_OF_CENTER:
y -= (frame_head.height / 2);
break;
- case POSITION_AT_RIGHT_OF_CENTRE:
+ case POSITION_AT_RIGHT_OF_CENTER:
x -= frame_head.width;
y -= (frame_head.height) / 2;
break;
@@ -613,7 +614,7 @@ void FontRenderer::printTextBlocs() {
spriteInfo.type = _blocList[i].type;
spriteInfo.blend = 0;
spriteInfo.data = _blocList[i].text_mem + FrameHeader::size();
- spriteInfo.colourTable = 0;
+ spriteInfo.colorTable = 0;
spriteInfo.isText = true;
uint32 rv = _vm->_screen->drawSprite(&spriteInfo);
diff --git a/engines/sword2/maketext.h b/engines/sword2/maketext.h
index 63b65a32b1..52740d9de9 100644
--- a/engines/sword2/maketext.h
+++ b/engines/sword2/maketext.h
@@ -32,7 +32,7 @@
namespace Sword2 {
-// Output colour for character border - should be be black but note that we
+// Output color for character border - should be be black but note that we
// have to use a different pen number during sequences
#define BORDER_PEN 194
@@ -47,14 +47,14 @@ enum {
NO_JUSTIFICATION = 0,
// These all force text inside the screen edge margin when necessary
- POSITION_AT_CENTRE_OF_BASE = 1,
- POSITION_AT_CENTRE_OF_TOP = 2,
+ POSITION_AT_CENTER_OF_BASE = 1,
+ POSITION_AT_CENTER_OF_TOP = 2,
POSITION_AT_LEFT_OF_TOP = 3,
POSITION_AT_RIGHT_OF_TOP = 4,
POSITION_AT_LEFT_OF_BASE = 5,
POSITION_AT_RIGHT_OF_BASE = 6,
- POSITION_AT_LEFT_OF_CENTRE = 7,
- POSITION_AT_RIGHT_OF_CENTRE = 8
+ POSITION_AT_LEFT_OF_CENTER = 7,
+ POSITION_AT_RIGHT_OF_CENTER = 8
};
enum {
@@ -92,7 +92,7 @@ private:
// for overlap
int8 _charSpacing; // no. of pixels to separate characters along
// each line - negative for overlap
- uint8 _borderPen; // output pen colour of character borders
+ uint8 _borderPen; // output pen color of character borders
uint16 analyseSentence(byte *sentence, uint16 maxWidth, uint32 fontRes, LineInfo *line);
byte *buildTextSprite(byte *sentence, uint32 fontRes, uint8 pen, LineInfo *line, uint16 noOfLines);
diff --git a/engines/sword2/memory.cpp b/engines/sword2/memory.cpp
index cd36f9a19b..2b3784164e 100644
--- a/engines/sword2/memory.cpp
+++ b/engines/sword2/memory.cpp
@@ -48,6 +48,7 @@
//
// The number zero is used to represent the NULL pointer.
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/memory.h"
diff --git a/engines/sword2/mouse.cpp b/engines/sword2/mouse.cpp
index c8e9387cb7..3a26ab17b7 100644
--- a/engines/sword2/mouse.cpp
+++ b/engines/sword2/mouse.cpp
@@ -29,6 +29,7 @@
#include "common/system.h"
#include "common/events.h"
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "graphics/cursorman.h"
@@ -1270,8 +1271,8 @@ void Mouse::createPointerText(uint32 text_id, uint32 pointer_res) {
// Above right
justification = POSITION_AT_LEFT_OF_BASE;
} else {
- // Above centre
- justification = POSITION_AT_CENTRE_OF_BASE;
+ // Above center
+ justification = POSITION_AT_CENTER_OF_BASE;
}
} else if (yOffset > 0) {
// Below pointer
@@ -1282,20 +1283,20 @@ void Mouse::createPointerText(uint32 text_id, uint32 pointer_res) {
// Below right
justification = POSITION_AT_LEFT_OF_TOP;
} else {
- // Below centre
- justification = POSITION_AT_CENTRE_OF_TOP;
+ // Below center
+ justification = POSITION_AT_CENTER_OF_TOP;
}
} else {
// Same y-coord as pointer
if (xOffset < 0) {
- // Centre left
- justification = POSITION_AT_RIGHT_OF_CENTRE;
+ // Center left
+ justification = POSITION_AT_RIGHT_OF_CENTER;
} else if (xOffset > 0) {
- // Centre right
- justification = POSITION_AT_LEFT_OF_CENTRE;
+ // Center right
+ justification = POSITION_AT_LEFT_OF_CENTER;
} else {
- // Centre centre - shouldn't happen anyway!
- justification = POSITION_AT_LEFT_OF_CENTRE;
+ // Center center - shouldn't happen anyway!
+ justification = POSITION_AT_LEFT_OF_CENTER;
}
}
@@ -1433,7 +1434,7 @@ void Mouse::refreshInventory() {
// Can reset this now
_vm->_logic->writeVar(COMBINE_BASE, 0);
- // Cause 'object_held' icon to be greyed. The rest are coloured.
+ // Cause 'object_held' icon to be greyed. The rest are colored.
_examiningMenuIcon = true;
buildMenu();
_examiningMenuIcon = false;
diff --git a/engines/sword2/music.cpp b/engines/sword2/music.cpp
index aa91843432..ae6e2f1268 100644
--- a/engines/sword2/music.cpp
+++ b/engines/sword2/music.cpp
@@ -36,6 +36,7 @@
#include "common/memstream.h"
#include "common/substream.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "audio/decoders/mp3.h"
#include "audio/decoders/vorbis.h"
@@ -52,40 +53,6 @@
namespace Sword2 {
-/**
- * This class behaves like SeekableSubReadStream, except it remembers where the
- * previous read() or seek() took it, so that it can continue from that point
- * the next time. This is because we're frequently streaming two pieces of
- * music from the same file.
- */
-class SafeSubReadStream : public Common::SeekableSubReadStream {
-protected:
- uint32 _previousPos;
-public:
- SafeSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end);
- virtual uint32 read(void *dataPtr, uint32 dataSize);
- virtual bool seek(int32 offset, int whence = SEEK_SET);
-};
-
-SafeSubReadStream::SafeSubReadStream(SeekableReadStream *parentStream, uint32 begin, uint32 end)
- : SeekableSubReadStream(parentStream, begin, end, DisposeAfterUse::NO) {
- _previousPos = 0;
-}
-
-uint32 SafeSubReadStream::read(void *dataPtr, uint32 dataSize) {
- uint32 result;
- SeekableSubReadStream::seek(_previousPos);
- result = SeekableSubReadStream::read(dataPtr, dataSize);
- _previousPos = pos();
- return result;
-}
-
-bool SafeSubReadStream::seek(int32 offset, int whence) {
- bool result = SeekableSubReadStream::seek(offset, whence);
- _previousPos = pos();
- return result;
-}
-
static Audio::AudioStream *makeCLUStream(Common::File *fp, int size);
static Audio::AudioStream *makePSXCLUStream(Common::File *fp, int size);
@@ -196,19 +163,19 @@ static Audio::AudioStream *getAudioStream(SoundFileHandle *fh, const char *base,
return makeCLUStream(&fh->file, enc_len);
#ifdef USE_MAD
case kMP3Mode: {
- SafeSubReadStream *tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len);
+ Common::SafeSubReadStream *tmp = new Common::SafeSubReadStream(&fh->file, pos, pos + enc_len);
return Audio::makeMP3Stream(tmp, DisposeAfterUse::YES);
}
#endif
#ifdef USE_VORBIS
case kVorbisMode: {
- SafeSubReadStream *tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len);
+ Common::SafeSubReadStream *tmp = new Common::SafeSubReadStream(&fh->file, pos, pos + enc_len);
return Audio::makeVorbisStream(tmp, DisposeAfterUse::YES);
}
#endif
#ifdef USE_FLAC
case kFLACMode: {
- SafeSubReadStream *tmp = new SafeSubReadStream(&fh->file, pos, pos + enc_len);
+ Common::SafeSubReadStream *tmp = new Common::SafeSubReadStream(&fh->file, pos, pos + enc_len);
return Audio::makeFLACStream(tmp, DisposeAfterUse::YES);
}
#endif
diff --git a/engines/sword2/object.h b/engines/sword2/object.h
index 53819c08cc..94a968e58d 100644
--- a/engines/sword2/object.h
+++ b/engines/sword2/object.h
@@ -139,7 +139,7 @@ public:
// speech structure - contains fields used by speech scripts & text output
class ObjectSpeech {
- // int32 pen; // colour to use for body of characters
+ // int32 pen; // color to use for body of characters
// int32 width; // max width of text sprite
// int32 command; // speech script command id
// int32 ins1; // speech script instruction parameters
diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp
index b348fd6bb5..a52160db25 100644
--- a/engines/sword2/palette.cpp
+++ b/engines/sword2/palette.cpp
@@ -27,6 +27,9 @@
#include "common/system.h"
+#include "common/textconsole.h"
+
+#include "graphics/palette.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
@@ -107,8 +110,8 @@ void Screen::setFullPalette(int32 palRes) {
pal += ResHeader::size();
- // always set colour 0 to black because most background screen
- // palettes have a bright colour 0 although it should come out
+ // always set color 0 to black because most background screen
+ // palettes have a bright color 0 although it should come out
// as black in the game!
_palette[0] = 0;
@@ -144,11 +147,11 @@ void Screen::setFullPalette(int32 palRes) {
}
/**
- * Matches a colour triplet to a palette index.
- * @param r red colour component
- * @param g green colour component
- * @param b blue colour component
- * @return the palette index of the closest matching colour in the palette
+ * Matches a color triplet to a palette index.
+ * @param r red color component
+ * @param g green color component
+ * @param b blue color component
+ * @return the palette index of the closest matching color in the palette
*/
// FIXME: This used to be inlined - probably a good idea - but the
@@ -160,16 +163,16 @@ uint8 Screen::quickMatch(uint8 r, uint8 g, uint8 b) {
/**
* Sets the palette.
- * @param startEntry the first colour entry to set
- * @param noEntries the number of colour entries to set
- * @param colourTable the new colour entries
+ * @param startEntry the first color entry to set
+ * @param noEntries the number of color entries to set
+ * @param colorTable the new color entries
* @param fadeNow whether to perform the change immediately or delayed
*/
-void Screen::setPalette(int16 startEntry, int16 noEntries, byte *colourTable, uint8 fadeNow) {
+void Screen::setPalette(int16 startEntry, int16 noEntries, byte *colorTable, uint8 fadeNow) {
assert(noEntries > 0);
- memmove(&_palette[3 * startEntry], colourTable, noEntries * 3);
+ memmove(&_palette[3 * startEntry], colorTable, noEntries * 3);
if (fadeNow == RDPAL_INSTANT) {
setSystemPalette(_palette, startEntry, noEntries);
diff --git a/engines/sword2/protocol.cpp b/engines/sword2/protocol.cpp
index ef2c622287..3d16e4ea4c 100644
--- a/engines/sword2/protocol.cpp
+++ b/engines/sword2/protocol.cpp
@@ -52,8 +52,8 @@ void Sword2Engine::fetchPalette(byte *screenFile, byte *palBuffer) {
palette = screenFile + ResHeader::size() + mscreenHeader.palette;
}
- // Always set colour 0 to black, because while most background screen
- // palettes have a bright colour 0 it should come out as black in the
+ // Always set color 0 to black, because while most background screen
+ // palettes have a bright color 0 it should come out as black in the
// game.
palBuffer[0] = 0;
diff --git a/engines/sword2/render.cpp b/engines/sword2/render.cpp
index a71d503d95..a47f8abe0d 100644
--- a/engines/sword2/render.cpp
+++ b/engines/sword2/render.cpp
@@ -234,24 +234,24 @@ void Screen::scaleImageGood(byte *dst, uint16 dstPitch, uint16 dstWidth, uint16
* used for debugging.
* @param x x-coordinate of the point
* @param y y-coordinate of the point
- * @param colour colour of the point
+ * @param color color of the point
*/
-void Screen::plotPoint(int x, int y, uint8 colour) {
+void Screen::plotPoint(int x, int y, uint8 color) {
byte *buf = _buffer + MENUDEEP * RENDERWIDE;
x -= _scrollX;
y -= _scrollY;
if (x >= 0 && x < RENDERWIDE && y >= 0 && y < RENDERDEEP) {
- buf[y * RENDERWIDE + x] = colour;
+ buf[y * RENDERWIDE + x] = color;
markAsDirty(x, y + MENUDEEP, x, y + MENUDEEP);
}
}
-static void plot(int x, int y, int colour, void *data) {
+static void plot(int x, int y, int color, void *data) {
Screen *screen = (Screen *)data;
- screen->plotPoint(x, y, (uint8) colour);
+ screen->plotPoint(x, y, (uint8) color);
}
/**
@@ -260,11 +260,11 @@ static void plot(int x, int y, int colour, void *data) {
* @param y0 y-coordinate of the start point
* @param x1 x-coordinate of the end point
* @param y1 y-coordinate of the end point
- * @param colour colour of the line
+ * @param color color of the line
*/
-void Screen::drawLine(int x0, int y0, int x1, int y1, uint8 colour) {
- Graphics::drawLine(x0, y0, x1, y1, colour, &plot, this);
+void Screen::drawLine(int x0, int y0, int x1, int y1, uint8 color) {
+ Graphics::drawLine(x0, y0, x1, y1, color, &plot, this);
}
/**
diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp
index fa9c396ef3..36280cfda2 100644
--- a/engines/sword2/resman.cpp
+++ b/engines/sword2/resman.cpp
@@ -28,6 +28,7 @@
#include "common/file.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword2/resman.h b/engines/sword2/resman.h
index dcc79927ea..75748e1568 100644
--- a/engines/sword2/resman.h
+++ b/engines/sword2/resman.h
@@ -29,7 +29,7 @@
#define SWORD2_RESMAN_H
namespace Common {
- class File;
+class File;
}
#define MAX_MEM_CACHE (8 * 1024 * 1024) // we keep up to 8 megs of resource data files in memory
diff --git a/engines/sword2/router.cpp b/engines/sword2/router.cpp
index 1548536ccb..c2b4d2e67f 100644
--- a/engines/sword2/router.cpp
+++ b/engines/sword2/router.cpp
@@ -27,6 +27,7 @@
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
@@ -2344,9 +2345,9 @@ void Router::plotWalkGrid() {
plotCross(_node[i].x, _node[i].y, 184);
}
-void Router::plotCross(int16 x, int16 y, uint8 colour) {
- _vm->_screen->drawLine(x - 1, y - 1, x + 1, y + 1, colour);
- _vm->_screen->drawLine(x + 1, y - 1, x - 1, y + 1, colour);
+void Router::plotCross(int16 x, int16 y, uint8 color) {
+ _vm->_screen->drawLine(x - 1, y - 1, x + 1, y + 1, color);
+ _vm->_screen->drawLine(x + 1, y - 1, x - 1, y + 1, color);
}
void Router::loadWalkGrid() {
diff --git a/engines/sword2/router.h b/engines/sword2/router.h
index f556850797..1ad3dd74c4 100644
--- a/engines/sword2/router.h
+++ b/engines/sword2/router.h
@@ -193,7 +193,7 @@ private:
int32 solidWalkAnimator(WalkData *walkAnim);
#endif
- void plotCross(int16 x, int16 y, uint8 colour);
+ void plotCross(int16 x, int16 y, uint8 color);
public:
Router(Sword2Engine *vm) : _vm(vm), _diagonalx(0), _diagonaly(0) {
diff --git a/engines/sword2/saveload.cpp b/engines/sword2/saveload.cpp
index fab360a8ac..94ef8975b4 100644
--- a/engines/sword2/saveload.cpp
+++ b/engines/sword2/saveload.cpp
@@ -37,6 +37,7 @@
#include "common/memstream.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp
index 8c2db79297..a83e581fd4 100644
--- a/engines/sword2/screen.cpp
+++ b/engines/sword2/screen.cpp
@@ -32,6 +32,7 @@
#include "common/system.h"
#include "common/events.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
@@ -253,7 +254,7 @@ void Screen::updateDisplay(bool redrawScene) {
}
/**
- * Fill the screen buffer with palette colour zero. Note that it does not
+ * Fill the screen buffer with palette color zero. Note that it does not
* touch the menu areas of the screen.
*/
@@ -392,7 +393,7 @@ void Screen::displayMsg(byte *text, int time) {
spriteInfo.type = RDSPR_DISPLAYALIGN | RDSPR_NOCOMPRESSION | RDSPR_TRANS;
spriteInfo.blend = 0;
spriteInfo.data = text_spr + FrameHeader::size();
- spriteInfo.colourTable = 0;
+ spriteInfo.colorTable = 0;
spriteInfo.isText = true;
uint32 rv = drawSprite(&spriteInfo);
@@ -530,7 +531,7 @@ void Screen::processLayer(byte *file, uint32 layer_number) {
}
spriteInfo.blend = 0;
- spriteInfo.colourTable = 0;
+ spriteInfo.colorTable = 0;
// check for largest layer for debug info
@@ -572,7 +573,7 @@ void Screen::processImage(BuildUnit *build_unit) {
cdt_entry.read(_vm->fetchCdtEntry(file, build_unit->anim_pc));
frame_head.read(frame);
- // so that 0-colour is transparent
+ // so that 0-color is transparent
uint32 spriteType = RDSPR_TRANS;
if (anim_head.blend)
@@ -606,7 +607,7 @@ void Screen::processImage(BuildUnit *build_unit) {
case RLE16:
spriteType |= RDSPR_RLE16;
// points to just after last cdt_entry, ie.
- // start of colour table
+ // start of color table
colTablePtr = _vm->fetchAnimHeader(file) + AnimHeader::size() + anim_head.noAnimFrames * CdtEntry::size();
if (Sword2Engine::isPsx())
colTablePtr++; // There is one additional byte to skip before the table in psx version
@@ -632,7 +633,7 @@ void Screen::processImage(BuildUnit *build_unit) {
spriteInfo.blend = anim_head.blend;
// points to just after frame header, ie. start of sprite data
spriteInfo.data = frame + FrameHeader::size();
- spriteInfo.colourTable = colTablePtr;
+ spriteInfo.colorTable = colTablePtr;
spriteInfo.isText = false;
// check for largest layer for debug info
@@ -895,7 +896,7 @@ void Screen::rollCredits() {
// palette 3 * 256 bytes
// data width * height bytes
//
- // Note that the maximum colour component in the palette is 0x3F.
+ // Note that the maximum color component in the palette is 0x3F.
// This is the same resolution as the _paletteMatch table. I doubt
// that this is a coincidence, but let's use the image palette
// directly anyway, just to be safe.
@@ -1261,7 +1262,7 @@ void Screen::splashScreen() {
barSprite.scaledHeight = 0;
barSprite.type = RDSPR_RLE256FAST | RDSPR_TRANS;
barSprite.blend = 0;
- barSprite.colourTable = 0;
+ barSprite.colorTable = 0;
barSprite.data = frame + FrameHeader::size();
barSprite.isText = false;
diff --git a/engines/sword2/screen.h b/engines/sword2/screen.h
index 46eb53d0db..9ef4f28049 100644
--- a/engines/sword2/screen.h
+++ b/engines/sword2/screen.h
@@ -172,7 +172,7 @@ struct SpriteInfo {
uint16 type; // mask containing 'RDSPR_' bits specifying compression type, flip, transparency, etc
uint16 blend; // holds the blending values.
byte *data; // pointer to the sprite data
- byte *colourTable; // pointer to 16-byte colour table, only applicable to 16-col compression type
+ byte *colorTable; // pointer to 16-byte color table, only applicable to 16-col compression type
bool isText; // It is a engine-generated sprite containing text
};
@@ -442,8 +442,8 @@ public:
void buildDisplay();
- void plotPoint(int x, int y, uint8 colour);
- void drawLine(int x0, int y0, int x1, int y1, uint8 colour);
+ void plotPoint(int x, int y, uint8 color);
+ void drawLine(int x0, int y0, int x1, int y1, uint8 color);
void rollCredits();
void splashScreen();
diff --git a/engines/sword2/scroll.cpp b/engines/sword2/scroll.cpp
index eb080eb4b3..11ba546cf3 100644
--- a/engines/sword2/scroll.cpp
+++ b/engines/sword2/scroll.cpp
@@ -73,7 +73,7 @@ void Screen::setScrolling() {
return;
}
- // George's offset from the centre - the desired position for him
+ // George's offset from the center - the desired position for him
int16 offset_x = _thisScreen.player_feet_x - _thisScreen.feet_x;
int16 offset_y = _thisScreen.player_feet_y - _thisScreen.feet_y;
diff --git a/engines/sword2/sound.cpp b/engines/sword2/sound.cpp
index 261c8293bd..3cf8523113 100644
--- a/engines/sword2/sound.cpp
+++ b/engines/sword2/sound.cpp
@@ -39,6 +39,7 @@
#include "common/file.h"
#include "common/memstream.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword2/sound.h b/engines/sword2/sound.h
index 2c4c8364c7..c37e006b76 100644
--- a/engines/sword2/sound.h
+++ b/engines/sword2/sound.h
@@ -39,6 +39,7 @@
#define SWORD2_SOUND_H
#include "common/file.h"
+#include "common/mutex.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
diff --git a/engines/sword2/speech.cpp b/engines/sword2/speech.cpp
index a0ddc333c2..ec8e198377 100644
--- a/engines/sword2/speech.cpp
+++ b/engines/sword2/speech.cpp
@@ -27,6 +27,7 @@
#include "common/file.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
@@ -104,16 +105,16 @@ void Logic::locateTalker(int32 *params) {
uint16 scale = obMega.calcScale();
- // Calc suitable centre point above the head, based on scaled
+ // Calc suitable center point above the head, based on scaled
// height
- // just use 'feet_x' as centre
+ // just use 'feet_x' as center
_textX = obMega.getFeetX();
// Add scaled y-offset to feet_y coord to get top of sprite
_textY = obMega.getFeetY() + (cdt_entry.y * scale) / 256;
} else {
- // It's a non-scaling anim - calc suitable centre point above
+ // It's a non-scaling anim - calc suitable center point above
// the head, based on scaled width
// x-coord + half of width
@@ -185,7 +186,7 @@ void Logic::formText(int32 *params) {
text + 2, _textX, _textY,
textWidth, obSpeech.getPen(),
RDSPR_TRANS | RDSPR_DISPLAYALIGN,
- _vm->_speechFontId, POSITION_AT_CENTRE_OF_BASE);
+ _vm->_speechFontId, POSITION_AT_CENTER_OF_BASE);
_vm->_resman->closeResource(text_res);
diff --git a/engines/sword2/sprite.cpp b/engines/sword2/sprite.cpp
index 255176292a..9a25812178 100644
--- a/engines/sword2/sprite.cpp
+++ b/engines/sword2/sprite.cpp
@@ -51,7 +51,7 @@ void Screen::mirrorSprite(byte *dst, byte *src, int16 w, int16 h) {
}
/**
- * This function takes a compressed frame of a sprite with up to 256 colours
+ * This function takes a compressed frame of a sprite with up to 256 colors
* and decompresses it.
* @param dst destination buffer
* @param src source buffer
@@ -82,7 +82,7 @@ int32 Screen::decompressRLE256(byte *dst, byte *src, int32 decompSize) {
break;
}
- // set the next 'headerByte' pixels to the next colour
+ // set the next 'headerByte' pixels to the next color
// at 'source'
memset(dst, *src, headerByte);
@@ -90,7 +90,7 @@ int32 Screen::decompressRLE256(byte *dst, byte *src, int32 decompSize) {
// block
dst += headerByte;
- // increment source pointer to just after this colour
+ // increment source pointer to just after this color
src++;
// if we've decompressed all of the data
@@ -135,7 +135,7 @@ int32 Screen::decompressRLE256(byte *dst, byte *src, int32 decompSize) {
}
/**
- * Unwinds a run of 16-colour data into 256-colour palette data.
+ * Unwinds a run of 16-color data into 256-color palette data.
*/
void Screen::unwindRaw16(byte *dst, byte *src, uint16 blockSize, byte *colTable) {
@@ -143,11 +143,11 @@ void Screen::unwindRaw16(byte *dst, byte *src, uint16 blockSize, byte *colTable)
while (blockSize > 1) {
if (Sword2Engine::isPsx()) {
- // 1st colour = number in table at position given by upper
+ // 1st color = number in table at position given by upper
// nibble of source byte
*dst++ = colTable[(*src) & 0x0f];
- // 2nd colour = number in table at position given by lower
+ // 2nd color = number in table at position given by lower
// nibble of source byte
*dst++ = colTable[(*src) >> 4];
} else {
@@ -165,19 +165,19 @@ void Screen::unwindRaw16(byte *dst, byte *src, uint16 blockSize, byte *colTable)
// if there's a final odd pixel
if (blockSize) {
- // colour = number in table at position given by upper nibble
+ // color = number in table at position given by upper nibble
// of source byte
*dst++ = colTable[(*src) >> 4];
}
}
/**
- * This function takes a compressed frame of a sprite (with up to 16 colours)
+ * This function takes a compressed frame of a sprite (with up to 16 colors)
* and decompresses it.
* @param dst destination buffer
* @param src source buffer
* @param decompSize the expected size of the uncompressed sprite
- * @param colTable mapping from the 16 encoded colours to the current palette
+ * @param colTable mapping from the 16 encoded colors to the current palette
*/
int32 Screen::decompressRLE16(byte *dst, byte *src, int32 decompSize, byte *colTable) {
@@ -199,14 +199,14 @@ int32 Screen::decompressRLE16(byte *dst, byte *src, int32 decompSize, byte *colT
}
// set the next 'headerByte' pixels to the next
- // colour at 'source'
+ // color at 'source'
memset(dst, *src, headerByte);
// increment destination pointer to just after this
// block
dst += headerByte;
- // increment source pointer to just after this colour
+ // increment source pointer to just after this color
src++;
// if we've decompressed all of the data
@@ -470,13 +470,13 @@ void Screen::deleteSurface(byte *surface) {
* RDSPR_DISPLAYALIGN The sprite is drawn relative to the top left corner
* of the screen
* RDSPR_FLIP The sprite is mirrored
- * RDSPR_TRANS The sprite has a transparent colour zero
+ * RDSPR_TRANS The sprite has a transparent color zero
* RDSPR_BLEND The sprite is translucent
* RDSPR_SHADOW The sprite is affected by the light mask. (Scaled
* sprites always are.)
* RDSPR_NOCOMPRESSION The sprite data is not compressed
- * RDSPR_RLE16 The sprite data is a 16-colour compressed sprite
- * RDSPR_RLE256 The sprite data is a 256-colour compressed sprite
+ * RDSPR_RLE16 The sprite data is a 16-color compressed sprite
+ * RDSPR_RLE256 The sprite data is a 256-color compressed sprite
* @param s all the information needed to draw the sprite
* @warning Sprites will only be drawn onto the background, not over menubar
* areas.
@@ -538,7 +538,7 @@ int32 Screen::drawSprite(SpriteInfo *s) {
byte *tempBuf2 = (byte *)malloc(s->w * s->h * 10);
memset(tempBuf2, 0, s->w * s->h * 2);
- unwindRaw16(tempBuf2, tempBuf, (s->w * (s->h / 2)), s->colourTable);
+ unwindRaw16(tempBuf2, tempBuf, (s->w * (s->h / 2)), s->colorTable);
sprite = (byte *)malloc(s->w * s->h);
if (!sprite) {
@@ -557,7 +557,7 @@ int32 Screen::drawSprite(SpriteInfo *s) {
if (!sprite)
return RDERR_OUTOFMEMORY;
- if (decompressRLE16(sprite, s->data, s->w * s->h, s->colourTable)) {
+ if (decompressRLE16(sprite, s->data, s->w * s->h, s->colorTable)) {
free(sprite);
return RDERR_DECOMPRESSION;
}
diff --git a/engines/sword2/startup.cpp b/engines/sword2/startup.cpp
index e4572d3c1a..ea1751eb5f 100644
--- a/engines/sword2/startup.cpp
+++ b/engines/sword2/startup.cpp
@@ -27,6 +27,7 @@
#include "common/file.h"
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 7ad021b3a5..58f3547ff7 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -34,6 +34,7 @@
#include "common/EventRecorder.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "engines/metaengine.h"
#include "engines/util.h"
diff --git a/engines/sword2/sync.cpp b/engines/sword2/sync.cpp
index 1adc652b75..ee4c6b2238 100644
--- a/engines/sword2/sync.cpp
+++ b/engines/sword2/sync.cpp
@@ -26,6 +26,7 @@
*/
+#include "common/textconsole.h"
#include "sword2/sword2.h"
#include "sword2/defs.h"
diff --git a/engines/sword25/detection.cpp b/engines/sword25/detection.cpp
index 3900df2fcf..fe24675f8a 100644
--- a/engines/sword25/detection.cpp
+++ b/engines/sword25/detection.cpp
@@ -24,8 +24,6 @@
*/
#include "base/plugins.h"
-#include "common/savefile.h"
-#include "common/system.h"
#include "engines/advancedDetector.h"
#include "sword25/sword25.h"
diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp
index 177bd38303..975f08be22 100644
--- a/engines/sword25/fmv/movieplayer.cpp
+++ b/engines/sword25/fmv/movieplayer.cpp
@@ -32,13 +32,17 @@
*
*/
+#include "common/debug.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+#include "common/util.h"
+
#include "sword25/sword25.h" // for kDebugScript
#include "sword25/fmv/movieplayer.h"
#include "sword25/gfx/graphicengine.h"
#include "sword25/gfx/panel.h"
#include "sword25/kernel/kernel.h"
#include "sword25/package/packagemanager.h"
-#include "sword25/sfx/soundengine.h"
namespace Sword25 {
@@ -121,7 +125,7 @@ void MoviePlayer::update() {
const Graphics::Surface *s = _decoder.decodeNextFrame();
if (s) {
// Transfer the next frame
- assert(s->bytesPerPixel == 4);
+ assert(s->format.bytesPerPixel == 4);
#ifdef THEORA_INDIRECT_RENDERING
byte *frameData = (byte *)s->getBasePtr(0, 0);
diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp
index e9901c04b0..86236fbd21 100644
--- a/engines/sword25/fmv/theora_decoder.cpp
+++ b/engines/sword25/fmv/theora_decoder.cpp
@@ -41,6 +41,7 @@
#ifdef USE_THEORADEC
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/conversion.h"
#include "audio/decoders/raw.h"
#include "sword25/kernel/common.h"
@@ -289,7 +290,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
_surface = new Graphics::Surface();
- _surface->create(_theoraInfo.frame_width, _theoraInfo.frame_height, 4);
+ _surface->create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat());
return true;
}
diff --git a/engines/sword25/fmv/theora_decoder.h b/engines/sword25/fmv/theora_decoder.h
index a753bc58ac..4ed2af5f98 100644
--- a/engines/sword25/fmv/theora_decoder.h
+++ b/engines/sword25/fmv/theora_decoder.h
@@ -30,9 +30,12 @@
#ifdef USE_THEORADEC
+#include "common/rational.h"
#include "video/video_decoder.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
+#include "graphics/pixelformat.h"
+#include "graphics/surface.h"
#include <theora/theoradec.h>
#include <vorbis/codec.h>
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 5fefcec420..fbaa69d09c 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -86,7 +86,6 @@ GraphicEngine::GraphicEngine(Kernel *pKernel) :
GraphicEngine::~GraphicEngine() {
unregisterScriptBindings();
_backSurface.free();
- _frameBuffer.free();
delete _thumbnail;
}
@@ -112,8 +111,9 @@ bool GraphicEngine::init(int width, int height, int bitDepth, int backbufferCoun
_screenRect.right = _width;
_screenRect.bottom = _height;
- _backSurface.create(width, height, 4);
- _frameBuffer.create(width, height, 4);
+ const Graphics::PixelFormat format = g_system->getScreenFormat();
+
+ _backSurface.create(width, height, format);
// Standardmфпig ist Vsync an.
setVsync(true);
@@ -149,18 +149,6 @@ bool GraphicEngine::endFrame() {
_renderObjectManagerPtr->render();
- // FIXME: The following hack doesn't really work (all the thumbnails are empty)
-#if 0
- // HACK: The frame buffer surface is only used as the base for creating thumbnails when saving the
- // game, since the _backSurface is blanked. Currently I'm doing a slightly hacky check and only
- // copying the back surface if line 50 (the first line after the interface area) is non-blank
- if (READ_LE_UINT32((byte *)_backSurface.pixels + (_backSurface.pitch * 50)) & 0xffffff) {
- // Make a copy of the current frame into the frame buffer
- Common::copy((byte *)_backSurface.pixels, (byte *)_backSurface.pixels +
- (_backSurface.pitch * _backSurface.h), (byte *)_frameBuffer.pixels);
- }
-#endif
-
g_system->updateScreen();
return true;
@@ -206,6 +194,7 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
for (int i = rect.top; i < rect.bottom; i++) {
out = outo;
for (int j = rect.left; j < rect.right; j++) {
+#if defined(SCUMM_LITTLE_ENDIAN)
*out += (byte)(((cb - *out) * ca) >> 8);
out++;
*out += (byte)(((cg - *out) * ca) >> 8);
@@ -214,6 +203,16 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
out++;
*out = 255;
out++;
+#else
+ *out = 255;
+ out++;
+ *out += (byte)(((cr - *out) * ca) >> 8);
+ out++;
+ *out += (byte)(((cg - *out) * ca) >> 8);
+ out++;
+ *out += (byte)(((cb - *out) * ca) >> 8);
+ out++;
+#endif
}
outo += _backSurface.pitch;
@@ -226,10 +225,6 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
return true;
}
-Graphics::Surface *GraphicEngine::getScreenshot() {
- return &_frameBuffer;
-}
-
// -----------------------------------------------------------------------------
// RESOURCE MANAGING
// -----------------------------------------------------------------------------
@@ -257,8 +252,9 @@ Resource *GraphicEngine::loadResource(const Common::String &filename) {
return pResource;
}
- // Load sprite image
- if (filename.hasSuffix(".png") || filename.hasSuffix(".b25s")) {
+ // Load sprite image. Savegame thumbnails are also loaded here.
+ if (filename.hasSuffix(".png") || filename.hasSuffix(".b25s") ||
+ filename.hasPrefix("/saves")) {
bool result = false;
RenderedImage *pImage = new RenderedImage(filename, result);
if (!result) {
@@ -345,7 +341,8 @@ bool GraphicEngine::canLoadResource(const Common::String &filename) {
filename.hasSuffix("_ani.xml") ||
filename.hasSuffix("_fnt.xml") ||
filename.hasSuffix(".swf") ||
- filename.hasSuffix(".b25s");
+ filename.hasSuffix(".b25s") ||
+ filename.hasPrefix("/saves");
}
void GraphicEngine::updateLastFrameDuration() {
@@ -374,7 +371,9 @@ bool GraphicEngine::saveThumbnailScreenshot(const Common::String &filename) {
// Note: In ScumMVM, rather than saivng the thumbnail to a file, we store it in memory
// until needed when creating savegame files
delete _thumbnail;
- _thumbnail = Screenshot::createThumbnail(&_frameBuffer);
+
+ _thumbnail = Screenshot::createThumbnail(&_backSurface);
+
return true;
}
diff --git a/engines/sword25/gfx/graphicengine.h b/engines/sword25/gfx/graphicengine.h
index 38eecaa60f..8d12168b62 100644
--- a/engines/sword25/gfx/graphicengine.h
+++ b/engines/sword25/gfx/graphicengine.h
@@ -146,17 +146,6 @@ public:
*/
bool saveThumbnailScreenshot(const Common::String &filename);
- /**
- * Reads the current contents of the frame buffer
- * Notes: This method is for creating screenshots. It is not very optimised. It should only be called
- * after a call to EndFrame(), and before the next call to StartFrame().
- * @param Width Returns the width of the frame buffer
- * @param Height Returns the height of the frame buffer
- * @param Data Returns the raw data of the frame buffer as an array of 32-bit color values.
- */
- Graphics::Surface *getScreenshot();
-
-
RenderObjectPtr<Panel> getMainPanel();
/**
@@ -246,9 +235,6 @@ public:
Graphics::Surface _backSurface;
Graphics::Surface *getSurface() { return &_backSurface; }
- Graphics::Surface _frameBuffer;
- Graphics::Surface *getFrameBuffer() { return &_frameBuffer; }
-
Common::SeekableReadStream *_thumbnail;
Common::SeekableReadStream *getThumbnail() { return _thumbnail; }
diff --git a/engines/sword25/gfx/image/pngloader.cpp b/engines/sword25/gfx/image/pngloader.cpp
index f6c00b6968..d3c119b1a0 100644
--- a/engines/sword25/gfx/image/pngloader.cpp
+++ b/engines/sword25/gfx/image/pngloader.cpp
@@ -32,9 +32,6 @@
*
*/
-// Define to use ScummVM's PNG decoder, instead of libpng
-#define USE_INTERNAL_PNG_DECODER
-
#ifndef USE_INTERNAL_PNG_DECODER
// Disable symbol overrides so that we can use png.h
#define FORBIDDEN_SYMBOL_ALLOW_ALL
@@ -242,8 +239,8 @@ bool PNGLoader::decodeImage(const byte *fileDataPtr, uint fileSize, byte *&uncom
return doDecodeImage(fileDataPtr + pngOffset, fileSize - pngOffset, uncompressedDataPtr, width, height, pitch);
}
-bool PNGLoader::doImageProperties(const byte *fileDataPtr, uint fileSize, int &width, int &height) {
#ifndef USE_INTERNAL_PNG_DECODER
+bool PNGLoader::doImageProperties(const byte *fileDataPtr, uint fileSize, int &width, int &height) {
// Check for valid PNG signature
if (!doIsCorrectImageFormat(fileDataPtr, fileSize))
return false;
@@ -280,9 +277,7 @@ bool PNGLoader::doImageProperties(const byte *fileDataPtr, uint fileSize, int &w
// Destroy libpng structures
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-#else
- // We don't need to read the image properties here...
-#endif
+
return true;
}
@@ -292,5 +287,9 @@ bool PNGLoader::imageProperties(const byte *fileDataPtr, uint fileSize, int &wid
return doImageProperties(fileDataPtr + pngOffset, fileSize - pngOffset, width, height);
}
+#else
+ // We don't need to read the image properties here...
+#endif
+
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/pngloader.h b/engines/sword25/gfx/image/pngloader.h
index e0d68ff8b9..fea6ece0e9 100644
--- a/engines/sword25/gfx/image/pngloader.h
+++ b/engines/sword25/gfx/image/pngloader.h
@@ -40,6 +40,9 @@
namespace Sword25 {
+// Define to use ScummVM's PNG decoder, instead of libpng
+#define USE_INTERNAL_PNG_DECODER
+
/**
* Class for loading PNG files, and PNG data embedded into savegames.
*
@@ -50,7 +53,9 @@ protected:
PNGLoader() {} // Protected constructor to prevent instances
static bool doDecodeImage(const byte *fileDataPtr, uint fileSize, byte *&uncompressedDataPtr, int &width, int &height, int &pitch);
+#ifndef USE_INTERNAL_PNG_DECODER
static bool doImageProperties(const byte *fileDataPtr, uint fileSize, int &width, int &height);
+#endif
public:
@@ -72,6 +77,8 @@ public:
byte *&pUncompressedData,
int &width, int &height,
int &pitch);
+
+#ifndef USE_INTERNAL_PNG_DECODER
/**
* Extract the properties of an image.
* @param[in] fileDatePtr pointer to the image data
@@ -86,6 +93,8 @@ public:
static bool imageProperties(const byte *fileDatePtr, uint fileSize,
int &width,
int &height);
+#endif
+
};
} // End of namespace Sword25
diff --git a/engines/sword25/gfx/image/renderedimage.cpp b/engines/sword25/gfx/image/renderedimage.cpp
index ced3296e57..132c516c12 100644
--- a/engines/sword25/gfx/image/renderedimage.cpp
+++ b/engines/sword25/gfx/image/renderedimage.cpp
@@ -36,6 +36,7 @@
// INCLUDES
// -----------------------------------------------------------------------------
+#include "common/savefile.h"
#include "sword25/package/packagemanager.h"
#include "sword25/gfx/image/pngloader.h"
#include "sword25/gfx/image/renderedimage.h"
@@ -44,6 +45,14 @@
namespace Sword25 {
+// Duplicated from kernel/persistenceservice.cpp
+static Common::String generateSavegameFilename(uint slotID) {
+ char buffer[100];
+ // NOTE: This is hardcoded to sword25
+ snprintf(buffer, 100, "%s.%.3d", "sword25", slotID);
+ return Common::String(buffer);
+}
+
// -----------------------------------------------------------------------------
// CONSTRUCTION / DESTRUCTION
// -----------------------------------------------------------------------------
@@ -62,21 +71,36 @@ RenderedImage::RenderedImage(const Common::String &filename, bool &result) :
// Load file
byte *pFileData;
uint fileSize;
- pFileData = pPackage->getFile(filename, &fileSize);
+
+ if (filename.hasPrefix("/saves")) {
+ // A savegame thumbnail
+ Common::SaveFileManager *sfm = g_system->getSavefileManager();
+ int slotNum = atoi(filename.c_str() + filename.size() - 3);
+ Common::InSaveFile *file = sfm->openForLoading(generateSavegameFilename(slotNum));
+ fileSize = file->size();
+ pFileData = new byte[fileSize];
+ file->read(pFileData, fileSize);
+ delete file;
+ } else {
+ pFileData = pPackage->getFile(filename, &fileSize);
+ }
+
if (!pFileData) {
error("File \"%s\" could not be loaded.", filename.c_str());
return;
}
+#ifndef USE_INTERNAL_PNG_DECODER
// Determine image properties
- int pitch;
if (!PNGLoader::imageProperties(pFileData, fileSize, _width, _height)) {
error("Could not read image properties.");
delete[] pFileData;
return;
}
+#endif
// Uncompress the image
+ int pitch;
if (!PNGLoader::decodeImage(pFileData, fileSize, _data, _width, _height, pitch)) {
error("Could not decode image.");
delete[] pFileData;
@@ -187,7 +211,8 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
// Create an encapsulating surface for the data
Graphics::Surface srcImage;
- srcImage.bytesPerPixel = 4;
+ // TODO: Is the data really in the screen format?
+ srcImage.format = g_system->getScreenFormat();
srcImage.pitch = _width * 4;
srcImage.w = _width;
srcImage.h = _height;
@@ -267,10 +292,11 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
out = outo;
in = ino;
for (int j = 0; j < img->w; j++) {
- int b = in[0];
- int g = in[1];
- int r = in[2];
- int a = in[3];
+ uint32 pix = *(uint32 *)in;
+ int b = (pix >> 0) & 0xff;
+ int g = (pix >> 8) & 0xff;
+ int r = (pix >> 16) & 0xff;
+ int a = (pix >> 24) & 0xff;
in += inStep;
if (ca != 255) {
@@ -282,6 +308,7 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
out += 4;
break;
case 255: // Full opacity
+#if defined(SCUMM_LITTLE_ENDIAN)
if (cb != 255)
*out++ = (b * cb) >> 8;
else
@@ -298,9 +325,28 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
*out++ = r;
*out++ = a;
+#else
+ *out++ = a;
+
+ if (cr != 255)
+ *out++ = (r * cr) >> 8;
+ else
+ *out++ = r;
+
+ if (cg != 255)
+ *out++ = (g * cg) >> 8;
+ else
+ *out++ = g;
+
+ if (cb != 255)
+ *out++ = (b * cb) >> 8;
+ else
+ *out++ = b;
+#endif
break;
default: // alpha blending
+#if defined(SCUMM_LITTLE_ENDIAN)
if (cb != 255)
*out += ((b - *out) * a * cb) >> 16;
else
@@ -318,6 +364,25 @@ bool RenderedImage::blit(int posX, int posY, int flipping, Common::Rect *pPartRe
out++;
*out = 255;
out++;
+#else
+ *out = 255;
+ out++;
+ if (cr != 255)
+ *out += ((r - *out) * a * cr) >> 16;
+ else
+ *out += ((r - *out) * a) >> 8;
+ out++;
+ if (cg != 255)
+ *out += ((g - *out) * a * cg) >> 16;
+ else
+ *out += ((g - *out) * a) >> 8;
+ out++;
+ if (cb != 255)
+ *out += ((b - *out) * a * cb) >> 16;
+ else
+ *out += ((b - *out) * a) >> 8;
+ out++;
+#endif
}
}
outo += _backSurface->pitch;
@@ -369,7 +434,7 @@ void RenderedImage::copyDirectly(int posX, int posY) {
*/
Graphics::Surface *RenderedImage::scale(const Graphics::Surface &srcImage, int xSize, int ySize) {
Graphics::Surface *s = new Graphics::Surface();
- s->create(xSize, ySize, srcImage.bytesPerPixel);
+ s->create(xSize, ySize, srcImage.format);
int *horizUsage = scaleLine(xSize, srcImage.w);
int *vertUsage = scaleLine(ySize, srcImage.h);
@@ -380,8 +445,8 @@ Graphics::Surface *RenderedImage::scale(const Graphics::Surface &srcImage, int x
byte *destP = (byte *)s->getBasePtr(0, yp);
for (int xp = 0; xp < xSize; ++xp) {
- const byte *tempSrcP = srcP + (horizUsage[xp] * srcImage.bytesPerPixel);
- for (int byteCtr = 0; byteCtr < srcImage.bytesPerPixel; ++byteCtr) {
+ const byte *tempSrcP = srcP + (horizUsage[xp] * srcImage.format.bytesPerPixel);
+ for (int byteCtr = 0; byteCtr < srcImage.format.bytesPerPixel; ++byteCtr) {
*destP++ = *tempSrcP++;
}
}
diff --git a/engines/sword25/gfx/image/swimage.cpp b/engines/sword25/gfx/image/swimage.cpp
index 3b9b939eb3..0f3814eb54 100644
--- a/engines/sword25/gfx/image/swimage.cpp
+++ b/engines/sword25/gfx/image/swimage.cpp
@@ -56,14 +56,16 @@ SWImage::SWImage(const Common::String &filename, bool &result) :
return;
}
+#ifndef USE_INTERNAL_PNG_DECODER
// Determine image properties
- int pitch;
if (!PNGLoader::imageProperties(pFileData, fileSize, _width, _height)) {
error("Could not read image properties.");
return;
}
+#endif
// Uncompress the image
+ int pitch;
byte *pUncompressedData;
if (!PNGLoader::decodeImage(pFileData, fileSize, pUncompressedData, _width, _height, pitch)) {
error("Could not decode image.");
diff --git a/engines/sword25/gfx/image/vectorimagerenderer.cpp b/engines/sword25/gfx/image/vectorimagerenderer.cpp
index e8acd08909..99a47015fb 100644
--- a/engines/sword25/gfx/image/vectorimagerenderer.cpp
+++ b/engines/sword25/gfx/image/vectorimagerenderer.cpp
@@ -67,6 +67,7 @@ void art_rgb_run_alpha1(byte *buf, byte r, byte g, byte b, int alpha, int n) {
int v;
for (i = 0; i < n; i++) {
+#if defined(SCUMM_LITTLE_ENDIAN)
v = *buf;
*buf++ = v + (((b - v) * alpha + 0x80) >> 8);
v = *buf;
@@ -75,6 +76,16 @@ void art_rgb_run_alpha1(byte *buf, byte r, byte g, byte b, int alpha, int n) {
*buf++ = v + (((r - v) * alpha + 0x80) >> 8);
v = *buf;
*buf++ = MIN(v + alpha, 0xff);
+#else
+ v = *buf;
+ *buf++ = MIN(v + alpha, 0xff);
+ v = *buf;
+ *buf++ = v + (((r - v) * alpha + 0x80) >> 8);
+ v = *buf;
+ *buf++ = v + (((g - v) * alpha + 0x80) >> 8);
+ v = *buf;
+ *buf++ = v + (((b - v) * alpha + 0x80) >> 8);
+#endif
}
}
diff --git a/engines/sword25/gfx/screenshot.cpp b/engines/sword25/gfx/screenshot.cpp
index 35e94976eb..6ea2b574d6 100644
--- a/engines/sword25/gfx/screenshot.cpp
+++ b/engines/sword25/gfx/screenshot.cpp
@@ -36,6 +36,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/memstream.h"
+#include "common/textconsole.h"
#include "sword25/gfx/screenshot.h"
#include "sword25/kernel/filesystemutil.h"
#include <png.h>
@@ -127,14 +128,14 @@ Common::SeekableReadStream *Screenshot::createThumbnail(Graphics::Surface *data)
// 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.
- if (data->w != 800 || data->h != 600 || data->bytesPerPixel != 4) {
+ if (data->w != 800 || data->h != 600 || data->format.bytesPerPixel != 4) {
error("The sreenshot dimensions have to be 800x600 in order to be saved as a thumbnail.");
return false;
}
// Buffer for the output thumbnail
Graphics::Surface thumbnail;
- thumbnail.create(200, 125, 4);
+ thumbnail.create(200, 125, g_system->getScreenFormat());
// мber das Zielbild iterieren und einen Pixel zur Zeit berechnen.
uint x, y;
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index bbfc3804a3..b1c1708565 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -173,10 +173,8 @@ bool Text::doRender() {
Common::Rect curRect = fontPtr->getCharacterRect((byte)(*iter).text[i]);
Common::Rect renderRect(curX, curY, curX + curRect.width(), curY + curRect.height());
- int renderX = curX + (renderRect.left - renderRect.left);
- int renderY = curY + (renderRect.top - renderRect.top);
renderRect.translate(curRect.left - curX, curRect.top - curY);
- result = charMapPtr->blit(renderX, renderY, Image::FLIP_NONE, &renderRect, _modulationColor);
+ result = charMapPtr->blit(curX, curY, Image::FLIP_NONE, &renderRect, _modulationColor);
if (!result)
break;
diff --git a/engines/sword25/kernel/filesystemutil.cpp b/engines/sword25/kernel/filesystemutil.cpp
index b4d4b25f8d..e5ec6c15db 100644
--- a/engines/sword25/kernel/filesystemutil.cpp
+++ b/engines/sword25/kernel/filesystemutil.cpp
@@ -34,8 +34,7 @@
#include "common/config-manager.h"
#include "common/fs.h"
-#include "common/savefile.h"
-#include "common/system.h"
+#include "common/textconsole.h"
#include "sword25/kernel/filesystemutil.h"
#include "sword25/kernel/persistenceservice.h"
diff --git a/engines/sword25/kernel/inputpersistenceblock.cpp b/engines/sword25/kernel/inputpersistenceblock.cpp
index f3aebef203..26c924dc82 100644
--- a/engines/sword25/kernel/inputpersistenceblock.cpp
+++ b/engines/sword25/kernel/inputpersistenceblock.cpp
@@ -32,6 +32,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "sword25/kernel/inputpersistenceblock.h"
namespace Sword25 {
diff --git a/engines/sword25/kernel/kernel.cpp b/engines/sword25/kernel/kernel.cpp
index 6b99b0a115..99fec52040 100644
--- a/engines/sword25/kernel/kernel.cpp
+++ b/engines/sword25/kernel/kernel.cpp
@@ -95,10 +95,8 @@ Kernel::Kernel() :
_geometry = new Geometry(this);
assert(_geometry);
-#ifdef USE_THEORADEC
_fmv = new MoviePlayer(this);
assert(_fmv);
-#endif
_initSuccess = true;
}
@@ -121,10 +119,8 @@ Kernel::~Kernel() {
delete _geometry;
_geometry = 0;
-#ifdef USE_THEORADEC
delete _fmv;
_fmv = 0;
-#endif
delete _script;
_script = 0;
diff --git a/engines/sword25/kernel/kernel.h b/engines/sword25/kernel/kernel.h
index 9e7ee0fdd9..3abf43d239 100644
--- a/engines/sword25/kernel/kernel.h
+++ b/engines/sword25/kernel/kernel.h
@@ -48,6 +48,7 @@
#include "common/scummsys.h"
#include "common/random.h"
#include "common/stack.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "engines/engine.h"
diff --git a/engines/sword25/kernel/kernel_script.cpp b/engines/sword25/kernel/kernel_script.cpp
index 458f6b2deb..43a144b2c6 100644
--- a/engines/sword25/kernel/kernel_script.cpp
+++ b/engines/sword25/kernel/kernel_script.cpp
@@ -42,45 +42,9 @@
namespace Sword25 {
-static int disconnectService(lua_State *L) {
- // This function apparently is not used by the game scripts
- lua_pushboolean(L, true);
-
- return 1;
-}
-
-static int getActiveServiceIdentifier(lua_State *L) {
- // This function apparently is not used by the game scripts
- lua_pushstring(L, "QUUX");
-
- return 1;
-}
-
-static int getSuperclassCount(lua_State *L) {
- // This function is only used by a single function in system/kernel.lua which is never called.
- lua_pushnumber(L, 0);
-
- return 1;
-}
-
-static int getSuperclassIdentifier(lua_State *L) {
- // This function is only used by a single function in system/kernel.lua which is never called.
- lua_pushstring(L, "FOO");
-
- return 1;
-}
-
-static int getServiceCount(lua_State *L) {
- // This function is only used by a single function in system/kernel.lua which is never called.
- lua_pushnumber(L, 0);
-
- return 1;
-}
-
-static int getServiceIdentifier(lua_State *L) {
- // This function is only used by a single function in system/kernel.lua which is never called.
- lua_pushstring(L, "BAR");
-
+// Marks a function that should never be used
+static int dummyFuncError(lua_State *L) {
+ error("Dummy function invoked by LUA");
return 1;
}
@@ -177,12 +141,12 @@ static int getUsedMemory(lua_State *L) {
static const char *KERNEL_LIBRARY_NAME = "Kernel";
static const luaL_reg KERNEL_FUNCTIONS[] = {
- {"DisconnectService", disconnectService},
- {"GetActiveServiceIdentifier", getActiveServiceIdentifier},
- {"GetSuperclassCount", getSuperclassCount},
- {"GetSuperclassIdentifier", getSuperclassIdentifier},
- {"GetServiceCount", getServiceCount},
- {"GetServiceIdentifier", getServiceIdentifier},
+ {"DisconnectService", dummyFuncError},
+ {"GetActiveServiceIdentifier", dummyFuncError},
+ {"GetSuperclassCount", dummyFuncError},
+ {"GetSuperclassIdentifier", dummyFuncError},
+ {"GetServiceCount", dummyFuncError},
+ {"GetServiceIdentifier", dummyFuncError},
{"GetMilliTicks", getMilliTicks},
{"GetTimer", getTimer},
{"StartService", startService},
@@ -241,20 +205,6 @@ static int setY(lua_State *L) {
return 0;
}
-static int getClientX(lua_State *L) {
- // This function apparently is not used by the game scripts
- lua_pushnumber(L, 0);
-
- return 1;
-}
-
-static int getClientY(lua_State *L) {
- // This function apparently is not used by the game scripts
- lua_pushnumber(L, 0);
-
- return 1;
-}
-
static int getWidth(lua_State *L) {
// This function apparently is not used by the game scripts
lua_pushnumber(L, 800);
@@ -332,20 +282,6 @@ static int closeWanted(lua_State *L) {
return 1;
}
-static int waitForFocus(lua_State *L) {
- // This function apparently is not used by the game scripts
- lua_pushbooleancpp(L, true);
-
- return 1;
-}
-
-static int hasFocus(lua_State *L) {
- // This function apparently is not used by the game scripts
- lua_pushbooleancpp(L, true);
-
- return 1;
-}
-
static const char *WINDOW_LIBRARY_NAME = "Window";
static const luaL_reg WINDOW_FUNCTIONS[] = {
@@ -355,8 +291,8 @@ static const luaL_reg WINDOW_FUNCTIONS[] = {
{"SetX", setX},
{"GetY", getY},
{"SetY", setY},
- {"GetClientX", getClientX},
- {"GetClientY", getClientY},
+ {"GetClientX", dummyFuncError},
+ {"GetClientY", dummyFuncError},
{"GetWidth", getWidth},
{"GetHeight", getHeight},
{"SetWidth", setWidth},
@@ -365,8 +301,8 @@ static const luaL_reg WINDOW_FUNCTIONS[] = {
{"SetTitle", setTitle},
{"ProcessMessages", processMessages},
{"CloseWanted", closeWanted},
- {"WaitForFocus", waitForFocus},
- {"HasFocus", hasFocus},
+ {"WaitForFocus", dummyFuncError},
+ {"HasFocus", dummyFuncError},
{0, 0}
};
@@ -436,29 +372,6 @@ static int emptyCache(lua_State *L) {
return 0;
}
-static int isLogCacheMiss(lua_State *L) {
- Kernel *pKernel = Kernel::getInstance();
- assert(pKernel);
- ResourceManager *pResource = pKernel->getResourceManager();
- assert(pResource);
-
- // This isn't used in any script
- lua_pushbooleancpp(L, false);
-
- return 1;
-}
-
-static int setLogCacheMiss(lua_State *L) {
- Kernel *pKernel = Kernel::getInstance();
- assert(pKernel);
- ResourceManager *pResource = pKernel->getResourceManager();
- assert(pResource);
-
- // This isn't used in any script
-
- return 0;
-}
-
static int dumpLockedResources(lua_State *L) {
Kernel *pKernel = Kernel::getInstance();
assert(pKernel);
@@ -478,8 +391,8 @@ static const luaL_reg RESOURCE_FUNCTIONS[] = {
{"GetMaxMemoryUsage", getMaxMemoryUsage},
{"SetMaxMemoryUsage", setMaxMemoryUsage},
{"EmptyCache", emptyCache},
- {"IsLogCacheMiss", isLogCacheMiss},
- {"SetLogCacheMiss", setLogCacheMiss},
+ {"IsLogCacheMiss", dummyFuncError},
+ {"SetLogCacheMiss", dummyFuncError},
{"DumpLockedResources", dumpLockedResources},
{0, 0}
};
diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h
index 8d0f4a314b..69d961ae91 100644
--- a/engines/sword25/kernel/objectregistry.h
+++ b/engines/sword25/kernel/objectregistry.h
@@ -37,6 +37,7 @@
#include "common/func.h"
#include "common/hashmap.h"
+#include "common/textconsole.h"
#include "sword25/kernel/common.h"
namespace Sword25 {
diff --git a/engines/sword25/kernel/persistenceservice.cpp b/engines/sword25/kernel/persistenceservice.cpp
index be66b6abf0..6bb2b1b102 100644
--- a/engines/sword25/kernel/persistenceservice.cpp
+++ b/engines/sword25/kernel/persistenceservice.cpp
@@ -32,6 +32,9 @@
*
*/
+// Disable symbol overrides so that we can use zlib.h
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "common/fs.h"
#include "common/savefile.h"
#include "sword25/kernel/kernel.h"
@@ -102,7 +105,6 @@ struct SavegameInformation {
bool isOccupied;
bool isCompatible;
Common::String description;
- Common::String filename;
uint gamedataLength;
uint gamedataOffset;
uint gamedataUncompressedLength;
@@ -115,7 +117,6 @@ struct SavegameInformation {
isOccupied = false;
isCompatible = false;
description = "";
- filename = "";
gamedataLength = 0;
gamedataOffset = 0;
gamedataUncompressedLength = 0;
@@ -130,18 +131,18 @@ struct PersistenceService::Impl {
}
void reloadSlots() {
- // мber alle Spielstanddateien iterieren und deren Infos einlesen.
+ // Iterate through all the saved games, and read their thumbnails.
for (uint i = 0; i < SLOT_COUNT; ++i) {
readSlotSavegameInformation(i);
}
}
void readSlotSavegameInformation(uint slotID) {
- // Aktuelle Slotinformationen in den Ausgangszustand versetzen, er wird im Folgenden neu gefќllt.
+ // Get the information corresponding to the requested save slot.
SavegameInformation &curSavegameInfo = _savegameInformations[slotID];
curSavegameInfo.clear();
- // Den Dateinamen fќr den Spielstand des Slots generieren.
+ // Generate the save slot file name.
Common::String filename = generateSavegameFilename(slotID);
// Try to open the savegame for loading
@@ -160,16 +161,15 @@ struct PersistenceService::Impl {
// If the header can be read in and is detected to be valid, we will have a valid file
if (storedMarker == FILE_MARKER) {
- // Der Slot wird als belegt markiert.
+ // The slot is marked as occupied.
curSavegameInfo.isOccupied = true;
- // Speichern, ob der Spielstand kompatibel mit der aktuellen Engine-Version ist.
+ // Check if the saved game is compatible with the current engine version.
curSavegameInfo.isCompatible = (storedVersionID == Common::String(VERSIONID));
- // Dateinamen des Spielstandes speichern.
- curSavegameInfo.filename = generateSavegameFilename(slotID);
- // Die Beschreibung des Spielstandes besteht aus einer textuellen Darstellung des Фnderungsdatums der Spielstanddatei.
+ // Load the save game description.
curSavegameInfo.description = gameDescription;
- // Den Offset zu den gespeicherten Spieldaten innerhalb der Datei speichern.
- // Dieses entspricht der aktuellen Position, da nach der letzten Headerinformation noch ein Leerzeichen als trenner folgt.
+ // The offset to the stored save game data within the file.
+ // This reflects the current position, as the header information
+ // is still followed by a space as separator.
curSavegameInfo.gamedataOffset = static_cast<uint>(file->pos());
}
@@ -241,10 +241,11 @@ Common::String &PersistenceService::getSavegameDescription(uint slotID) {
}
Common::String &PersistenceService::getSavegameFilename(uint slotID) {
- static Common::String emptyString;
+ static Common::String result;
if (!checkslotID(slotID))
- return emptyString;
- return _impl->_savegameInformations[slotID].filename;
+ return result;
+ result = generateSavegameFilename(slotID);
+ return result;
}
bool PersistenceService::saveGame(uint slotID, const Common::String &screenshotFilename) {
@@ -335,6 +336,9 @@ bool PersistenceService::saveGame(uint slotID, const Common::String &screenshotF
// Savegameinformationen fќr diesen Slot aktualisieren.
_impl->readSlotSavegameInformation(slotID);
+ // Empty the cache, to remove old thumbnails
+ Kernel::getInstance()->getResourceManager()->emptyThumbnailCache();
+
// Erfolg signalisieren.
return true;
}
@@ -369,13 +373,13 @@ bool PersistenceService::loadGame(uint slotID) {
byte *compressedDataBuffer = new byte[curSavegameInfo.gamedataLength];
byte *uncompressedDataBuffer = new Bytef[curSavegameInfo.gamedataUncompressedLength];
-
- file = sfm->openForLoading(generateSavegameFilename(slotID));
+ Common::String filename = generateSavegameFilename(slotID);
+ file = sfm->openForLoading(filename);
file->seek(curSavegameInfo.gamedataOffset);
file->read(reinterpret_cast<char *>(&compressedDataBuffer[0]), curSavegameInfo.gamedataLength);
if (file->err()) {
- error("Unable to load the gamedata from the savegame file \"%s\".", curSavegameInfo.filename.c_str());
+ error("Unable to load the gamedata from the savegame file \"%s\".", filename.c_str());
delete[] compressedDataBuffer;
delete[] uncompressedDataBuffer;
return false;
@@ -385,7 +389,7 @@ bool PersistenceService::loadGame(uint slotID) {
uLongf uncompressedBufferSize = curSavegameInfo.gamedataUncompressedLength;
if (uncompress(reinterpret_cast<Bytef *>(&uncompressedDataBuffer[0]), &uncompressedBufferSize,
reinterpret_cast<Bytef *>(&compressedDataBuffer[0]), curSavegameInfo.gamedataLength) != Z_OK) {
- error("Unable to decompress the gamedata from savegame file \"%s\".", curSavegameInfo.filename.c_str());
+ error("Unable to decompress the gamedata from savegame file \"%s\".", filename.c_str());
delete[] uncompressedDataBuffer;
delete[] compressedDataBuffer;
delete file;
@@ -408,7 +412,7 @@ bool PersistenceService::loadGame(uint slotID) {
delete file;
if (!success) {
- error("Unable to unpersist the gamedata from savegame file \"%s\".", curSavegameInfo.filename.c_str());
+ error("Unable to unpersist the gamedata from savegame file \"%s\".", filename.c_str());
return false;
}
diff --git a/engines/sword25/kernel/resmanager.cpp b/engines/sword25/kernel/resmanager.cpp
index 8b446e69d1..b77d79e8ea 100644
--- a/engines/sword25/kernel/resmanager.cpp
+++ b/engines/sword25/kernel/resmanager.cpp
@@ -147,6 +147,21 @@ void ResourceManager::emptyCache() {
}
}
+void ResourceManager::emptyThumbnailCache() {
+ // Scan through the resource list
+ Common::List<Resource *>::iterator iter = _resources.begin();
+ while (iter != _resources.end()) {
+ if ((*iter)->getFileName().hasPrefix("/saves")) {
+ // Unlock the thumbnail
+ while ((*iter)->getLockCount() > 0)
+ (*iter)->release();
+ // Delete the thumbnail
+ iter = deleteResource(*iter);
+ } else
+ ++iter;
+ }
+}
+
/**
* Returns a requested resource. If any error occurs, returns NULL
* @param FileName Filename of resource
diff --git a/engines/sword25/kernel/resmanager.h b/engines/sword25/kernel/resmanager.h
index 5b2bfd395f..f8006bd62d 100644
--- a/engines/sword25/kernel/resmanager.h
+++ b/engines/sword25/kernel/resmanager.h
@@ -82,6 +82,11 @@ public:
void emptyCache();
/**
+ * Removes all the savegame thumbnails from the cache
+ **/
+ void emptyThumbnailCache();
+
+ /**
* Writes the names of all currently locked resources to the log file
*/
void dumpLockedResources();
diff --git a/engines/sword25/script/luacallback.cpp b/engines/sword25/script/luacallback.cpp
index 137e37bf8d..809676796e 100644
--- a/engines/sword25/script/luacallback.cpp
+++ b/engines/sword25/script/luacallback.cpp
@@ -32,6 +32,8 @@
*
*/
+#include "common/textconsole.h"
+
#include "sword25/script/luacallback.h"
#include "sword25/script/luabindhelper.h"
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 03cdaf82b7..08f0f5b4ae 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -39,6 +39,8 @@
#include "audio/decoders/vorbis.h"
+#include "common/system.h"
+
namespace Sword25 {
class SoundResource : public Resource {
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index aac21f4b55..38c1c89109 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -34,10 +34,18 @@
#include "common/config-manager.h"
#include "common/debug-channels.h"
+#include "common/algorithm.h"
+#include "common/array.h"
+#include "common/error.h"
+#include "common/fs.h"
+#include "common/singleton.h"
+#include "common/str-array.h"
+#include "common/str.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "engines/util.h"
#include "sword25/sword25.h"
-#include "sword25/kernel/filesystemutil.h"
#include "sword25/kernel/kernel.h"
#include "sword25/kernel/persistenceservice.h"
#include "sword25/package/packagemanager.h"
@@ -73,10 +81,10 @@ Sword25Engine::~Sword25Engine() {
Common::Error Sword25Engine::run() {
// Engine initialisation
- Common::Error errorCode = appStart();
- if (errorCode != Common::kNoError) {
+ Common::Error error = appStart();
+ if (error.getCode() != Common::kNoError) {
appEnd();
- return errorCode;
+ return error;
}
// Run the game
diff --git a/engines/sword25/sword25.h b/engines/sword25/sword25.h
index 9e9679526b..5bd27b311f 100644
--- a/engines/sword25/sword25.h
+++ b/engines/sword25/sword25.h
@@ -27,12 +27,18 @@
#define SWORD25_H
#include "common/scummsys.h"
-#include "common/str-array.h"
-#include "common/util.h"
#include "engines/engine.h"
#include "sword25/console.h"
+namespace Common {
+class Error;
+}
+
+namespace GUI {
+class Debugger;
+}
+
struct ADGameDescription;
/**
diff --git a/engines/sword25/util/pluto/Makefile b/engines/sword25/util/pluto/Makefile
deleted file mode 100644
index 611ecc83d2..0000000000
--- a/engines/sword25/util/pluto/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-LDLIBS= -lm -ldl -llua
-LDFLAGS = -rdynamic # -L../lua-5.1.3/src
-# CFLAGS= -g3 -Wall -fprofile-arcs -ftest-coverage
-CFLAGS= -g3 -Wall -ansi -pedantic
-
-LIBTOOL=libtool --tag=CC
-
-default: pluto.so pptest puptest
-
-%.lo: %.c
- $(LIBTOOL) --mode=compile cc $(CFLAGS) -c $<
-
-pluto.so: pluto.lo pdep.lo lzio.lo
- $(LIBTOOL) --mode=link cc -rpath /usr/local/lib/lua/5.1 -o libpluto.la $^
- mv .libs/libpluto.so.0.0.0 $@
-
-test: pptest puptest pptest.lua puptest.lua pluto.so
- ./pptest
- ./puptest
-
-pptest: pptest.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
-
-puptest: puptest.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
-
-clean:
- -rm -r *.so *.la *.lo .libs *.a *.o *.bb *.bbg *.da *.gcov pptest puptest test.plh
-
diff --git a/engines/sword25/util/pluto/pdep/lauxlib.h b/engines/sword25/util/pluto/pdep/lauxlib.h
deleted file mode 100644
index d58f290527..0000000000
--- a/engines/sword25/util/pluto/pdep/lauxlib.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
-** $Id$
-** Auxiliary functions for building Lua libraries
-** See Copyright Notice in lua.h
-*/
-
-
-#ifndef lauxlib_h
-#define lauxlib_h
-
-
-#include <stddef.h>
-#include <stdio.h>
-
-#include "lua.h"
-
-
-#if defined(LUA_COMPAT_GETN)
-LUALIB_API int (luaL_getn) (lua_State *L, int t);
-LUALIB_API void (luaL_setn) (lua_State *L, int t, int n);
-#else
-#define luaL_getn(L,i) ((int)lua_objlen(L, i))
-#define luaL_setn(L,i,j) ((void)0) /* no op! */
-#endif
-
-#if defined(LUA_COMPAT_OPENLIB)
-#define luaI_openlib luaL_openlib
-#endif
-
-
-/* extra error code for `luaL_load' */
-#define LUA_ERRFILE (LUA_ERRERR+1)
-
-
-typedef struct luaL_Reg {
- const char *name;
- lua_CFunction func;
-} luaL_Reg;
-
-
-
-LUALIB_API void (luaI_openlib) (lua_State *L, const char *libname,
- const luaL_Reg *l, int nup);
-LUALIB_API void (luaL_register) (lua_State *L, const char *libname,
- const luaL_Reg *l);
-LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e);
-LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e);
-LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname);
-LUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg);
-LUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg,
- size_t *l);
-LUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg,
- const char *def, size_t *l);
-LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg);
-LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def);
-
-LUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg);
-LUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg,
- lua_Integer def);
-
-LUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg);
-LUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t);
-LUALIB_API void (luaL_checkany) (lua_State *L, int narg);
-
-LUALIB_API int (luaL_newmetatable) (lua_State *L, const char *tname);
-LUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname);
-
-LUALIB_API void (luaL_where) (lua_State *L, int lvl);
-LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);
-
-LUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def,
- const char *const lst[]);
-
-LUALIB_API int (luaL_ref) (lua_State *L, int t);
-LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref);
-
-LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename);
-LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz,
- const char *name);
-LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s);
-
-LUALIB_API lua_State *(luaL_newstate) (void);
-
-
-LUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p,
- const char *r);
-
-LUALIB_API const char *(luaL_findtable) (lua_State *L, int idx,
- const char *fname, int szhint);
-
-
-
-
-/*
-** ===============================================================
-** some useful macros
-** ===============================================================
-*/
-
-#define luaL_argcheck(L, cond,numarg,extramsg) \
- ((void)((cond) || luaL_argerror(L, (numarg), (extramsg))))
-#define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL))
-#define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL))
-#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
-#define luaL_optint(L,n,d) ((int)luaL_optinteger(L, (n), (d)))
-#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n)))
-#define luaL_optlong(L,n,d) ((long)luaL_optinteger(L, (n), (d)))
-
-#define luaL_typename(L,i) lua_typename(L, lua_type(L,(i)))
-
-#define luaL_dofile(L, fn) \
- (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0))
-
-#define luaL_dostring(L, s) \
- (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))
-
-#define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n)))
-
-#define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))
-
-/*
-** {======================================================
-** Generic Buffer manipulation
-** =======================================================
-*/
-
-
-
-typedef struct luaL_Buffer {
- char *p; /* current position in buffer */
- int lvl; /* number of strings in the stack (level) */
- lua_State *L;
- char buffer[LUAL_BUFFERSIZE];
-} luaL_Buffer;
-
-#define luaL_addchar(B,c) \
- ((void)((B)->p < ((B)->buffer+LUAL_BUFFERSIZE) || luaL_prepbuffer(B)), \
- (*(B)->p++ = (char)(c)))
-
-/* compatibility only */
-#define luaL_putchar(B,c) luaL_addchar(B,c)
-
-#define luaL_addsize(B,n) ((B)->p += (n))
-
-LUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B);
-LUALIB_API char *(luaL_prepbuffer) (luaL_Buffer *B);
-LUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l);
-LUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s);
-LUALIB_API void (luaL_addvalue) (luaL_Buffer *B);
-LUALIB_API void (luaL_pushresult) (luaL_Buffer *B);
-
-
-/* }====================================================== */
-
-
-/* compatibility with ref system */
-
-/* pre-defined references */
-#define LUA_NOREF (-2)
-#define LUA_REFNIL (-1)
-
-#define lua_ref(L,lock) ((lock) ? luaL_ref(L, LUA_REGISTRYINDEX) : \
- (lua_pushstring(L, "unlocked references are obsolete"), lua_error(L), 0))
-
-#define lua_unref(L,ref) luaL_unref(L, LUA_REGISTRYINDEX, (ref))
-
-#define lua_getref(L,ref) lua_rawgeti(L, LUA_REGISTRYINDEX, (ref))
-
-
-#define luaL_reg luaL_Reg
-
-#endif
-
-
diff --git a/engines/sword25/util/pluto/pdep/ldo.h b/engines/sword25/util/pluto/pdep/ldo.h
deleted file mode 100644
index 4c97134805..0000000000
--- a/engines/sword25/util/pluto/pdep/ldo.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-** $Id$
-** Stack and Call structure of Lua
-** See Copyright Notice in lua.h
-*/
-
-#ifndef ldo_h
-#define ldo_h
-
-
-#include "lobject.h"
-#include "lstate.h"
-#include "lzio.h"
-
-
-#define luaD_checkstack(L,n) \
- if ((char *)L->stack_last - (char *)L->top <= (n)*(int)sizeof(TValue)) \
- luaD_growstack(L, n); \
- else condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1));
-
-
-#define incr_top(L) {luaD_checkstack(L,1); L->top++;}
-
-#define savestack(L,p) ((char *)(p) - (char *)L->stack)
-#define restorestack(L,n) ((TValue *)((char *)L->stack + (n)))
-
-#define saveci(L,p) ((char *)(p) - (char *)L->base_ci)
-#define restoreci(L,n) ((CallInfo *)((char *)L->base_ci + (n)))
-
-
-/* results from luaD_precall */
-#define PCRLUA 0 /* initiated a call to a Lua function */
-#define PCRC 1 /* did a call to a C function */
-#define PCRYIELD 2 /* C funtion yielded */
-
-
-/* type of protected functions, to be ran by `runprotected' */
-typedef void (*Pfunc) (lua_State *L, void *ud);
-
-LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name);
-LUAI_FUNC void luaD_callhook (lua_State *L, int event, int line);
-LUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults);
-LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults);
-LUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,
- ptrdiff_t oldtop, ptrdiff_t ef);
-LUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);
-LUAI_FUNC void luaD_reallocCI (lua_State *L, int newsize);
-LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
-LUAI_FUNC void luaD_growstack (lua_State *L, int n);
-
-LUAI_FUNC void luaD_throw (lua_State *L, int errcode);
-LUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);
-
-LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
-
-#endif
-
diff --git a/engines/sword25/util/pluto/pdep/lfunc.h b/engines/sword25/util/pluto/pdep/lfunc.h
deleted file mode 100644
index 4c2b7fd138..0000000000
--- a/engines/sword25/util/pluto/pdep/lfunc.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-** $Id$
-** Auxiliary functions to manipulate prototypes and closures
-** See Copyright Notice in lua.h
-*/
-
-#ifndef lfunc_h
-#define lfunc_h
-
-
-#include "lobject.h"
-
-
-#define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \
- cast(int, sizeof(TValue)*((n)-1)))
-
-#define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \
- cast(int, sizeof(TValue *)*((n)-1)))
-
-
-LUAI_FUNC Proto *luaF_newproto (lua_State *L);
-LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e);
-LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e);
-LUAI_FUNC UpVal *luaF_newupval (lua_State *L);
-LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
-LUAI_FUNC void luaF_close (lua_State *L, StkId level);
-LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);
-LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c);
-LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv);
-LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,
- int pc);
-
-
-#endif
diff --git a/engines/sword25/util/pluto/pdep/lgc.h b/engines/sword25/util/pluto/pdep/lgc.h
deleted file mode 100644
index 5123ccb479..0000000000
--- a/engines/sword25/util/pluto/pdep/lgc.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-** $Id$
-** Garbage Collector
-** See Copyright Notice in lua.h
-*/
-
-#ifndef lgc_h
-#define lgc_h
-
-
-#include "lobject.h"
-
-
-/*
-** Possible states of the Garbage Collector
-*/
-#define GCSpause 0
-#define GCSpropagate 1
-#define GCSsweepstring 2
-#define GCSsweep 3
-#define GCSfinalize 4
-
-
-/*
-** some userful bit tricks
-*/
-#define resetbits(x,m) ((x) &= cast(lu_byte, ~(m)))
-#define setbits(x,m) ((x) |= (m))
-#define testbits(x,m) ((x) & (m))
-#define bitmask(b) (1<<(b))
-#define bit2mask(b1,b2) (bitmask(b1) | bitmask(b2))
-#define l_setbit(x,b) setbits(x, bitmask(b))
-#define resetbit(x,b) resetbits(x, bitmask(b))
-#define testbit(x,b) testbits(x, bitmask(b))
-#define set2bits(x,b1,b2) setbits(x, (bit2mask(b1, b2)))
-#define reset2bits(x,b1,b2) resetbits(x, (bit2mask(b1, b2)))
-#define test2bits(x,b1,b2) testbits(x, (bit2mask(b1, b2)))
-
-
-
-/*
-** Layout for bit use in `marked' field:
-** bit 0 - object is white (type 0)
-** bit 1 - object is white (type 1)
-** bit 2 - object is black
-** bit 3 - for userdata: has been finalized
-** bit 3 - for tables: has weak keys
-** bit 4 - for tables: has weak values
-** bit 5 - object is fixed (should not be collected)
-** bit 6 - object is "super" fixed (only the main thread)
-*/
-
-
-#define WHITE0BIT 0
-#define WHITE1BIT 1
-#define BLACKBIT 2
-#define FINALIZEDBIT 3
-#define KEYWEAKBIT 3
-#define VALUEWEAKBIT 4
-#define FIXEDBIT 5
-#define SFIXEDBIT 6
-#define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT)
-
-
-#define iswhite(x) test2bits((x)->gch.marked, WHITE0BIT, WHITE1BIT)
-#define isblack(x) testbit((x)->gch.marked, BLACKBIT)
-#define isgray(x) (!isblack(x) && !iswhite(x))
-
-#define otherwhite(g) (g->currentwhite ^ WHITEBITS)
-#define isdead(g,v) ((v)->gch.marked & otherwhite(g) & WHITEBITS)
-
-#define changewhite(x) ((x)->gch.marked ^= WHITEBITS)
-#define gray2black(x) l_setbit((x)->gch.marked, BLACKBIT)
-
-#define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x)))
-
-#define luaC_white(g) cast(lu_byte, (g)->currentwhite & WHITEBITS)
-
-
-#define luaC_checkGC(L) { \
- condhardstacktests(luaD_reallocstack(L, L->stacksize - EXTRA_STACK - 1)); \
- if (G(L)->totalbytes >= G(L)->GCthreshold) \
- luaC_step(L); }
-
-
-#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p))) \
- luaC_barrierf(L,obj2gco(p),gcvalue(v)); }
-
-#define luaC_barriert(L,t,v) { if (valiswhite(v) && isblack(obj2gco(t))) \
- luaC_barrierback(L,t); }
-
-#define luaC_objbarrier(L,p,o) \
- { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \
- luaC_barrierf(L,obj2gco(p),obj2gco(o)); }
-
-#define luaC_objbarriert(L,t,o) \
- { if (iswhite(obj2gco(o)) && isblack(obj2gco(t))) luaC_barrierback(L,t); }
-
-LUAI_FUNC size_t luaC_separateudata (lua_State *L, int all);
-LUAI_FUNC void luaC_callGCTM (lua_State *L);
-LUAI_FUNC void luaC_freeall (lua_State *L);
-LUAI_FUNC void luaC_step (lua_State *L);
-LUAI_FUNC void luaC_fullgc (lua_State *L);
-LUAI_FUNC void luaC_link (lua_State *L, GCObject *o, lu_byte tt);
-LUAI_FUNC void luaC_linkupval (lua_State *L, UpVal *uv);
-LUAI_FUNC void luaC_barrierf (lua_State *L, GCObject *o, GCObject *v);
-LUAI_FUNC void luaC_barrierback (lua_State *L, Table *t);
-
-
-#endif
diff --git a/engines/sword25/util/pluto/pdep/llimits.h b/engines/sword25/util/pluto/pdep/llimits.h
deleted file mode 100644
index a31ad160ad..0000000000
--- a/engines/sword25/util/pluto/pdep/llimits.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-** $Id$
-** Limits, basic types, and some other `installation-dependent' definitions
-** See Copyright Notice in lua.h
-*/
-
-#ifndef llimits_h
-#define llimits_h
-
-
-#include <limits.h>
-#include <stddef.h>
-
-
-#include "lua.h"
-
-
-typedef LUAI_UINT32 lu_int32;
-
-typedef LUAI_UMEM lu_mem;
-
-typedef LUAI_MEM l_mem;
-
-
-
-/* chars used as small naturals (so that `char' is reserved for characters) */
-typedef unsigned char lu_byte;
-
-
-#define MAX_SIZET ((size_t)(~(size_t)0)-2)
-
-#define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2)
-
-
-#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */
-
-/*
-** conversion of pointer to integer
-** this is for hashing only; there is no problem if the integer
-** cannot hold the whole pointer value
-*/
-#define IntPoint(p) ((unsigned int)(lu_mem)(p))
-
-
-
-/* type to ensure maximum alignment */
-typedef LUAI_USER_ALIGNMENT_T L_Umaxalign;
-
-
-/* result of a `usual argument conversion' over lua_Number */
-typedef LUAI_UACNUMBER l_uacNumber;
-
-
-/* internal assertions for in-house debugging */
-#ifdef lua_assert
-
-#define check_exp(c,e) (lua_assert(c), (e))
-#define api_check(l,e) lua_assert(e)
-
-#else
-
-#define lua_assert(c) ((void)0)
-#define check_exp(c,e) (e)
-#define api_check luai_apicheck
-
-#endif
-
-
-#ifndef UNUSED
-#define UNUSED(x) ((void)(x)) /* to avoid warnings */
-#endif
-
-
-#ifndef cast
-#define cast(t, exp) ((t)(exp))
-#endif
-
-#define cast_byte(i) cast(lu_byte, (i))
-#define cast_num(i) cast(lua_Number, (i))
-#define cast_int(i) cast(int, (i))
-
-
-
-/*
-** type for virtual-machine instructions
-** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h)
-*/
-typedef lu_int32 Instruction;
-
-
-
-/* maximum stack for a Lua function */
-#define MAXSTACK 250
-
-
-
-/* minimum size for the string table (must be power of 2) */
-#ifndef MINSTRTABSIZE
-#define MINSTRTABSIZE 32
-#endif
-
-
-/* minimum size for string buffer */
-#ifndef LUA_MINBUFFER
-#define LUA_MINBUFFER 32
-#endif
-
-
-#ifndef lua_lock
-#define lua_lock(L) ((void) 0)
-#define lua_unlock(L) ((void) 0)
-#endif
-
-#ifndef luai_threadyield
-#define luai_threadyield(L) {lua_unlock(L); lua_lock(L);}
-#endif
-
-
-/*
-** macro to control inclusion of some hard tests on stack reallocation
-*/
-#ifndef HARDSTACKTESTS
-#define condhardstacktests(x) ((void)0)
-#else
-#define condhardstacktests(x) x
-#endif
-
-#endif
diff --git a/engines/sword25/util/pluto/pdep/lobject.h b/engines/sword25/util/pluto/pdep/lobject.h
deleted file mode 100644
index 35aaed028a..0000000000
--- a/engines/sword25/util/pluto/pdep/lobject.h
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
-** $Id$
-** Type definitions for Lua objects
-** See Copyright Notice in lua.h
-*/
-
-
-#ifndef lobject_h
-#define lobject_h
-
-
-#include <stdarg.h>
-
-
-#include "llimits.h"
-#include "lua.h"
-
-
-/* tags for values visible from Lua */
-#define LAST_TAG LUA_TTHREAD
-
-#define NUM_TAGS (LAST_TAG+1)
-
-
-/*
-** Extra tags for non-values
-*/
-#define LUA_TPROTO (LAST_TAG+1)
-#define LUA_TUPVAL (LAST_TAG+2)
-#define LUA_TDEADKEY (LAST_TAG+3)
-
-
-/*
-** Union of all collectable objects
-*/
-typedef union GCObject GCObject;
-
-
-/*
-** Common Header for all collectable objects (in macro form, to be
-** included in other objects)
-*/
-#define CommonHeader GCObject *next; lu_byte tt; lu_byte marked
-
-
-/*
-** Common header in struct form
-*/
-typedef struct GCheader {
- CommonHeader;
-} GCheader;
-
-
-
-
-/*
-** Union of all Lua values
-*/
-typedef union {
- GCObject *gc;
- void *p;
- lua_Number n;
- int b;
-} Value;
-
-
-/*
-** Tagged Values
-*/
-
-#define TValuefields Value value; int tt
-
-typedef struct lua_TValue {
- TValuefields;
-} TValue;
-
-
-/* Macros to test type */
-#define ttisnil(o) (ttype(o) == LUA_TNIL)
-#define ttisnumber(o) (ttype(o) == LUA_TNUMBER)
-#define ttisstring(o) (ttype(o) == LUA_TSTRING)
-#define ttistable(o) (ttype(o) == LUA_TTABLE)
-#define ttisfunction(o) (ttype(o) == LUA_TFUNCTION)
-#define ttisboolean(o) (ttype(o) == LUA_TBOOLEAN)
-#define ttisuserdata(o) (ttype(o) == LUA_TUSERDATA)
-#define ttisthread(o) (ttype(o) == LUA_TTHREAD)
-#define ttislightuserdata(o) (ttype(o) == LUA_TLIGHTUSERDATA)
-
-/* Macros to access values */
-#define ttype(o) ((o)->tt)
-#define gcvalue(o) check_exp(iscollectable(o), (o)->value.gc)
-#define pvalue(o) check_exp(ttislightuserdata(o), (o)->value.p)
-#define nvalue(o) check_exp(ttisnumber(o), (o)->value.n)
-#define rawtsvalue(o) check_exp(ttisstring(o), &(o)->value.gc->ts)
-#define tsvalue(o) (&rawtsvalue(o)->tsv)
-#define rawuvalue(o) check_exp(ttisuserdata(o), &(o)->value.gc->u)
-#define uvalue(o) (&rawuvalue(o)->uv)
-#define clvalue(o) check_exp(ttisfunction(o), &(o)->value.gc->cl)
-#define hvalue(o) check_exp(ttistable(o), &(o)->value.gc->h)
-#define bvalue(o) check_exp(ttisboolean(o), (o)->value.b)
-#define thvalue(o) check_exp(ttisthread(o), &(o)->value.gc->th)
-
-#define l_isfalse(o) (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0))
-
-/*
-** for internal debug only
-*/
-#define checkconsistency(obj) \
- lua_assert(!iscollectable(obj) || (ttype(obj) == (obj)->value.gc->gch.tt))
-
-#define checkliveness(g,obj) \
- lua_assert(!iscollectable(obj) || \
- ((ttype(obj) == (obj)->value.gc->gch.tt) && !isdead(g, (obj)->value.gc)))
-
-
-/* Macros to set values */
-#define setnilvalue(obj) ((obj)->tt=LUA_TNIL)
-
-#define setnvalue(obj,x) \
- { TValue *i_o=(obj); i_o->value.n=(x); i_o->tt=LUA_TNUMBER; }
-
-#define setpvalue(obj,x) \
- { TValue *i_o=(obj); i_o->value.p=(x); i_o->tt=LUA_TLIGHTUSERDATA; }
-
-#define setbvalue(obj,x) \
- { TValue *i_o=(obj); i_o->value.b=(x); i_o->tt=LUA_TBOOLEAN; }
-
-#define setsvalue(L,obj,x) \
- { TValue *i_o=(obj); \
- i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TSTRING; \
- checkliveness(G(L),i_o); }
-
-#define setuvalue(L,obj,x) \
- { TValue *i_o=(obj); \
- i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TUSERDATA; \
- checkliveness(G(L),i_o); }
-
-#define setthvalue(L,obj,x) \
- { TValue *i_o=(obj); \
- i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTHREAD; \
- checkliveness(G(L),i_o); }
-
-#define setclvalue(L,obj,x) \
- { TValue *i_o=(obj); \
- i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TFUNCTION; \
- checkliveness(G(L),i_o); }
-
-#define sethvalue(L,obj,x) \
- { TValue *i_o=(obj); \
- i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TTABLE; \
- checkliveness(G(L),i_o); }
-
-#define setptvalue(L,obj,x) \
- { TValue *i_o=(obj); \
- i_o->value.gc=cast(GCObject *, (x)); i_o->tt=LUA_TPROTO; \
- checkliveness(G(L),i_o); }
-
-
-
-
-#define setobj(L,obj1,obj2) \
- { const TValue *o2=(obj2); TValue *o1=(obj1); \
- o1->value = o2->value; o1->tt=o2->tt; \
- checkliveness(G(L),o1); }
-
-
-/*
-** different types of sets, according to destination
-*/
-
-/* from stack to (same) stack */
-#define setobjs2s setobj
-/* to stack (not from same stack) */
-#define setobj2s setobj
-#define setsvalue2s setsvalue
-#define sethvalue2s sethvalue
-#define setptvalue2s setptvalue
-/* from table to same table */
-#define setobjt2t setobj
-/* to table */
-#define setobj2t setobj
-/* to new object */
-#define setobj2n setobj
-#define setsvalue2n setsvalue
-
-#define setttype(obj, tt) (ttype(obj) = (tt))
-
-
-#define iscollectable(o) (ttype(o) >= LUA_TSTRING)
-
-
-
-typedef TValue *StkId; /* index to stack elements */
-
-
-/*
-** String headers for string table
-*/
-typedef union TString {
- L_Umaxalign dummy; /* ensures maximum alignment for strings */
- struct {
- CommonHeader;
- lu_byte reserved;
- unsigned int hash;
- size_t len;
- } tsv;
-} TString;
-
-
-#define getstr(ts) cast(const char *, (ts) + 1)
-#define svalue(o) getstr(tsvalue(o))
-
-
-
-typedef union Udata {
- L_Umaxalign dummy; /* ensures maximum alignment for `local' udata */
- struct {
- CommonHeader;
- struct Table *metatable;
- struct Table *env;
- size_t len;
- } uv;
-} Udata;
-
-
-
-
-/*
-** Function Prototypes
-*/
-typedef struct Proto {
- CommonHeader;
- TValue *k; /* constants used by the function */
- Instruction *code;
- struct Proto **p; /* functions defined inside the function */
- int *lineinfo; /* map from opcodes to source lines */
- struct LocVar *locvars; /* information about local variables */
- TString **upvalues; /* upvalue names */
- TString *source;
- int sizeupvalues;
- int sizek; /* size of `k' */
- int sizecode;
- int sizelineinfo;
- int sizep; /* size of `p' */
- int sizelocvars;
- int linedefined;
- int lastlinedefined;
- GCObject *gclist;
- lu_byte nups; /* number of upvalues */
- lu_byte numparams;
- lu_byte is_vararg;
- lu_byte maxstacksize;
-} Proto;
-
-
-/* masks for new-style vararg */
-#define VARARG_HASARG 1
-#define VARARG_ISVARARG 2
-#define VARARG_NEEDSARG 4
-
-
-typedef struct LocVar {
- TString *varname;
- int startpc; /* first point where variable is active */
- int endpc; /* first point where variable is dead */
-} LocVar;
-
-
-
-/*
-** Upvalues
-*/
-
-typedef struct UpVal {
- CommonHeader;
- TValue *v; /* points to stack or to its own value */
- union {
- TValue value; /* the value (when closed) */
- struct { /* double linked list (when open) */
- struct UpVal *prev;
- struct UpVal *next;
- } l;
- } u;
-} UpVal;
-
-
-/*
-** Closures
-*/
-
-#define ClosureHeader \
- CommonHeader; lu_byte isC; lu_byte nupvalues; GCObject *gclist; \
- struct Table *env
-
-typedef struct CClosure {
- ClosureHeader;
- lua_CFunction f;
- TValue upvalue[1];
-} CClosure;
-
-
-typedef struct LClosure {
- ClosureHeader;
- struct Proto *p;
- UpVal *upvals[1];
-} LClosure;
-
-
-typedef union Closure {
- CClosure c;
- LClosure l;
-} Closure;
-
-
-#define iscfunction(o) (ttype(o) == LUA_TFUNCTION && clvalue(o)->c.isC)
-#define isLfunction(o) (ttype(o) == LUA_TFUNCTION && !clvalue(o)->c.isC)
-
-
-/*
-** Tables
-*/
-
-typedef union TKey {
- struct {
- TValuefields;
- struct Node *next; /* for chaining */
- } nk;
- TValue tvk;
-} TKey;
-
-
-typedef struct Node {
- TValue i_val;
- TKey i_key;
-} Node;
-
-
-typedef struct Table {
- CommonHeader;
- 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 */
- Node *node;
- Node *lastfree; /* any free position is before this position */
- GCObject *gclist;
- int sizearray; /* size of `array' array */
-} Table;
-
-
-
-/*
-** `module' operation for hashing (size is always a power of 2)
-*/
-#define lmod(s,size) \
- (check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1)))))
-
-
-#define twoto(x) (1<<(x))
-#define sizenode(t) (twoto((t)->lsizenode))
-
-
-#define luaO_nilobject (&luaO_nilobject_)
-
-LUAI_DATA const TValue luaO_nilobject_;
-
-#define ceillog2(x) (luaO_log2((x)-1) + 1)
-
-LUAI_FUNC int luaO_log2 (unsigned int x);
-LUAI_FUNC int luaO_int2fb (unsigned int x);
-LUAI_FUNC int luaO_fb2int (int x);
-LUAI_FUNC int luaO_rawequalObj (const TValue *t1, const TValue *t2);
-LUAI_FUNC int luaO_str2d (const char *s, lua_Number *result);
-LUAI_FUNC const char *luaO_pushvfstring (lua_State *L, const char *fmt,
- va_list argp);
-LUAI_FUNC const char *luaO_pushfstring (lua_State *L, const char *fmt, ...);
-LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len);
-
-
-#endif
-
diff --git a/engines/sword25/util/pluto/pdep/lopcodes.h b/engines/sword25/util/pluto/pdep/lopcodes.h
deleted file mode 100644
index e1aed0f637..0000000000
--- a/engines/sword25/util/pluto/pdep/lopcodes.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
-** $Id$
-** Opcodes for Lua virtual machine
-** See Copyright Notice in lua.h
-*/
-
-#ifndef lopcodes_h
-#define lopcodes_h
-
-#include "llimits.h"
-
-
-/*===========================================================================
- We assume that instructions are unsigned numbers.
- All instructions have an opcode in the first 6 bits.
- Instructions can have the following fields:
- `A' : 8 bits
- `B' : 9 bits
- `C' : 9 bits
- `Bx' : 18 bits (`B' and `C' together)
- `sBx' : signed Bx
-
- A signed argument is represented in excess K; that is, the number
- value is the unsigned value minus K. K is exactly the maximum value
- for that argument (so that -max is represented by 0, and +max is
- represented by 2*max), which is half the maximum for the corresponding
- unsigned argument.
-===========================================================================*/
-
-
-enum OpMode {iABC, iABx, iAsBx}; /* basic instruction format */
-
-
-/*
-** size and position of opcode arguments.
-*/
-#define SIZE_C 9
-#define SIZE_B 9
-#define SIZE_Bx (SIZE_C + SIZE_B)
-#define SIZE_A 8
-
-#define SIZE_OP 6
-
-#define POS_OP 0
-#define POS_A (POS_OP + SIZE_OP)
-#define POS_C (POS_A + SIZE_A)
-#define POS_B (POS_C + SIZE_C)
-#define POS_Bx POS_C
-
-
-/*
-** limits for opcode arguments.
-** we use (signed) int to manipulate most arguments,
-** so they must fit in LUAI_BITSINT-1 bits (-1 for sign)
-*/
-#if SIZE_Bx < LUAI_BITSINT-1
-#define MAXARG_Bx ((1<<SIZE_Bx)-1)
-#define MAXARG_sBx (MAXARG_Bx>>1) /* `sBx' is signed */
-#else
-#define MAXARG_Bx MAX_INT
-#define MAXARG_sBx MAX_INT
-#endif
-
-
-#define MAXARG_A ((1<<SIZE_A)-1)
-#define MAXARG_B ((1<<SIZE_B)-1)
-#define MAXARG_C ((1<<SIZE_C)-1)
-
-
-/* creates a mask with `n' 1 bits at position `p' */
-#define MASK1(n,p) ((~((~(Instruction)0)<<n))<<p)
-
-/* creates a mask with `n' 0 bits at position `p' */
-#define MASK0(n,p) (~MASK1(n,p))
-
-/*
-** the following macros help to manipulate instructions
-*/
-
-#define GET_OPCODE(i) (cast(OpCode, ((i)>>POS_OP) & MASK1(SIZE_OP,0)))
-#define SET_OPCODE(i,o) ((i) = (((i)&MASK0(SIZE_OP,POS_OP)) | \
- ((cast(Instruction, o)<<POS_OP)&MASK1(SIZE_OP,POS_OP))))
-
-#define GETARG_A(i) (cast(int, ((i)>>POS_A) & MASK1(SIZE_A,0)))
-#define SETARG_A(i,u) ((i) = (((i)&MASK0(SIZE_A,POS_A)) | \
- ((cast(Instruction, u)<<POS_A)&MASK1(SIZE_A,POS_A))))
-
-#define GETARG_B(i) (cast(int, ((i)>>POS_B) & MASK1(SIZE_B,0)))
-#define SETARG_B(i,b) ((i) = (((i)&MASK0(SIZE_B,POS_B)) | \
- ((cast(Instruction, b)<<POS_B)&MASK1(SIZE_B,POS_B))))
-
-#define GETARG_C(i) (cast(int, ((i)>>POS_C) & MASK1(SIZE_C,0)))
-#define SETARG_C(i,b) ((i) = (((i)&MASK0(SIZE_C,POS_C)) | \
- ((cast(Instruction, b)<<POS_C)&MASK1(SIZE_C,POS_C))))
-
-#define GETARG_Bx(i) (cast(int, ((i)>>POS_Bx) & MASK1(SIZE_Bx,0)))
-#define SETARG_Bx(i,b) ((i) = (((i)&MASK0(SIZE_Bx,POS_Bx)) | \
- ((cast(Instruction, b)<<POS_Bx)&MASK1(SIZE_Bx,POS_Bx))))
-
-#define GETARG_sBx(i) (GETARG_Bx(i)-MAXARG_sBx)
-#define SETARG_sBx(i,b) SETARG_Bx((i),cast(unsigned int, (b)+MAXARG_sBx))
-
-
-#define CREATE_ABC(o,a,b,c) ((cast(Instruction, o)<<POS_OP) \
- | (cast(Instruction, a)<<POS_A) \
- | (cast(Instruction, b)<<POS_B) \
- | (cast(Instruction, c)<<POS_C))
-
-#define CREATE_ABx(o,a,bc) ((cast(Instruction, o)<<POS_OP) \
- | (cast(Instruction, a)<<POS_A) \
- | (cast(Instruction, bc)<<POS_Bx))
-
-
-/*
-** Macros to operate RK indices
-*/
-
-/* this bit 1 means constant (0 means register) */
-#define BITRK (1 << (SIZE_B - 1))
-
-/* test whether value is a constant */
-#define ISK(x) ((x) & BITRK)
-
-/* gets the index of the constant */
-#define INDEXK(r) ((int)(r) & ~BITRK)
-
-#define MAXINDEXRK (BITRK - 1)
-
-/* code a constant index as a RK value */
-#define RKASK(x) ((x) | BITRK)
-
-
-/*
-** invalid register that fits in 8 bits
-*/
-#define NO_REG MAXARG_A
-
-
-/*
-** R(x) - register
-** Kst(x) - constant (in constant table)
-** RK(x) == if ISK(x) then Kst(INDEXK(x)) else R(x)
-*/
-
-
-/*
-** grep "ORDER OP" if you change these enums
-*/
-
-typedef enum {
-/*----------------------------------------------------------------------
-name args description
-------------------------------------------------------------------------*/
-OP_MOVE,/* A B R(A) := R(B) */
-OP_LOADK,/* A Bx R(A) := Kst(Bx) */
-OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */
-OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */
-OP_GETUPVAL,/* A B R(A) := UpValue[B] */
-
-OP_GETGLOBAL,/* A Bx R(A) := Gbl[Kst(Bx)] */
-OP_GETTABLE,/* A B C R(A) := R(B)[RK(C)] */
-
-OP_SETGLOBAL,/* A Bx Gbl[Kst(Bx)] := R(A) */
-OP_SETUPVAL,/* A B UpValue[B] := R(A) */
-OP_SETTABLE,/* A B C R(A)[RK(B)] := RK(C) */
-
-OP_NEWTABLE,/* A B C R(A) := {} (size = B,C) */
-
-OP_SELF,/* A B C R(A+1) := R(B); R(A) := R(B)[RK(C)] */
-
-OP_ADD,/* A B C R(A) := RK(B) + RK(C) */
-OP_SUB,/* A B C R(A) := RK(B) - RK(C) */
-OP_MUL,/* A B C R(A) := RK(B) * RK(C) */
-OP_DIV,/* A B C R(A) := RK(B) / RK(C) */
-OP_MOD,/* A B C R(A) := RK(B) % RK(C) */
-OP_POW,/* A B C R(A) := RK(B) ^ RK(C) */
-OP_UNM,/* A B R(A) := -R(B) */
-OP_NOT,/* A B R(A) := not R(B) */
-OP_LEN,/* A B R(A) := length of R(B) */
-
-OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */
-
-OP_JMP,/* sBx pc+=sBx */
-
-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_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)) */
-OP_RETURN,/* A B return R(A), ... ,R(A+B-2) (see note) */
-
-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_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)*/
-OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx], R(A), ... ,R(A+n)) */
-
-OP_VARARG/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */
-} OpCode;
-
-
-#define NUM_OPCODES (cast(int, OP_VARARG) + 1)
-
-
-
-/*===========================================================================
- Notes:
- (*) In OP_CALL, if (B == 0) then B = top. C is the number of returns - 1,
- and can be 0: OP_CALL then sets `top' to last_result+1, so
- next open instruction (OP_CALL, OP_RETURN, OP_SETLIST) may use `top'.
-
- (*) In OP_VARARG, if (B == 0) then use actual number of varargs and
- set top (like in OP_CALL with C == 0).
-
- (*) In OP_RETURN, if (B == 0) then return up to `top'
-
- (*) In OP_SETLIST, if (B == 0) then B = `top';
- if (C == 0) then next `instruction' is real C
-
- (*) For comparisons, A specifies what condition the test should accept
- (true or false).
-
- (*) All `skips' (pc++) assume that next instruction is a jump
-===========================================================================*/
-
-
-/*
-** masks for instruction properties. The format is:
-** bits 0-1: op mode
-** bits 2-3: C arg mode
-** 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 */
- OpArgU, /* argument is used */
- OpArgR, /* argument is a register or a jump offset */
- OpArgK /* argument is a constant or register/constant */
-};
-
-LUAI_DATA const lu_byte luaP_opmodes[NUM_OPCODES];
-
-#define getOpMode(m) (cast(enum OpMode, luaP_opmodes[m] & 3))
-#define getBMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))
-#define getCMode(m) (cast(enum OpArgMask, (luaP_opmodes[m] >> 2) & 3))
-#define testAMode(m) (luaP_opmodes[m] & (1 << 6))
-#define testTMode(m) (luaP_opmodes[m] & (1 << 7))
-
-
-LUAI_DATA const char *const luaP_opnames[NUM_OPCODES+1]; /* opcode names */
-
-
-/* number of list items to accumulate before a SETLIST instruction */
-#define LFIELDS_PER_FLUSH 50
-
-
-#endif
diff --git a/engines/sword25/util/pluto/pdep/lstate.h b/engines/sword25/util/pluto/pdep/lstate.h
deleted file mode 100644
index 94a6249461..0000000000
--- a/engines/sword25/util/pluto/pdep/lstate.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
-** $Id$
-** Global State
-** See Copyright Notice in lua.h
-*/
-
-#ifndef lstate_h
-#define lstate_h
-
-#include "lua.h"
-
-#include "lobject.h"
-#include "ltm.h"
-#include "lzio.h"
-
-
-
-struct lua_longjmp; /* defined in ldo.c */
-
-
-/* table of globals */
-#define gt(L) (&L->l_gt)
-
-/* registry */
-#define registry(L) (&G(L)->l_registry)
-
-
-/* extra stack space to handle TM calls and some other extras */
-#define EXTRA_STACK 5
-
-
-#define BASIC_CI_SIZE 8
-
-#define BASIC_STACK_SIZE (2*LUA_MINSTACK)
-
-
-
-typedef struct stringtable {
- GCObject **hash;
- lu_int32 nuse; /* number of elements */
- int size;
-} stringtable;
-
-
-/*
-** informations about a call
-*/
-typedef struct CallInfo {
- StkId base; /* base for this function */
- StkId func; /* function index in the stack */
- StkId top; /* top for this function */
- const Instruction *savedpc;
- int nresults; /* expected number of results from this function */
- int tailcalls; /* number of tail calls lost under this entry */
-} CallInfo;
-
-
-
-#define curr_func(L) (clvalue(L->ci->func))
-#define ci_func(ci) (clvalue((ci)->func))
-#define f_isLua(ci) (!ci_func(ci)->c.isC)
-#define isLua(ci) (ttisfunction((ci)->func) && f_isLua(ci))
-
-
-/*
-** `global state', shared by all threads of this state
-*/
-typedef struct global_State {
- stringtable strt; /* hash table for strings */
- lua_Alloc frealloc; /* function to reallocate memory */
- void *ud; /* auxiliary data to `frealloc' */
- lu_byte currentwhite;
- lu_byte gcstate; /* state of garbage collector */
- int sweepstrgc; /* position of sweep in `strt' */
- GCObject *rootgc; /* list of all collectable objects */
- GCObject **sweepgc; /* position of sweep in `rootgc' */
- GCObject *gray; /* list of gray objects */
- GCObject *grayagain; /* list of objects to be traversed atomically */
- GCObject *weak; /* list of weak tables (to be cleared) */
- GCObject *tmudata; /* last element of list of userdata to be GC */
- Mbuffer buff; /* temporary buffer for string concatentation */
- lu_mem GCthreshold;
- lu_mem totalbytes; /* number of bytes currently allocated */
- lu_mem estimate; /* an estimate of number of bytes actually in use */
- lu_mem gcdept; /* how much GC is `behind schedule' */
- int gcpause; /* size of pause between successive GCs */
- int gcstepmul; /* GC `granularity' */
- lua_CFunction panic; /* to be called in unprotected errors */
- TValue l_registry;
- struct lua_State *mainthread;
- UpVal uvhead; /* head of double-linked list of all open upvalues */
- struct Table *mt[NUM_TAGS]; /* metatables for basic types */
- TString *tmname[TM_N]; /* array with tag-method names */
-} global_State;
-
-
-/*
-** `per thread' state
-*/
-struct lua_State {
- CommonHeader;
- lu_byte status;
- StkId top; /* first free slot in the stack */
- StkId base; /* base of current function */
- global_State *l_G;
- CallInfo *ci; /* call info for current function */
- const Instruction *savedpc; /* `savedpc' of current function */
- StkId stack_last; /* last free slot in the stack */
- StkId stack; /* stack base */
- CallInfo *end_ci; /* points after end of ci array*/
- CallInfo *base_ci; /* array of CallInfo's */
- int stacksize;
- int size_ci; /* size of array `base_ci' */
- unsigned short nCcalls; /* number of nested C calls */
- unsigned short baseCcalls; /* nested C calls when resuming coroutine */
- lu_byte hookmask;
- lu_byte allowhook;
- int basehookcount;
- int hookcount;
- lua_Hook hook;
- TValue l_gt; /* table of globals */
- TValue env; /* temporary place for environments */
- GCObject *openupval; /* list of open upvalues in this stack */
- GCObject *gclist;
- struct lua_longjmp *errorJmp; /* current error recover point */
- ptrdiff_t errfunc; /* current error handling function (stack index) */
-};
-
-
-#define G(L) (L->l_G)
-
-
-/*
-** Union of all collectable objects
-*/
-union GCObject {
- GCheader gch;
- union TString ts;
- union Udata u;
- union Closure cl;
- struct Table h;
- struct Proto p;
- struct UpVal uv;
- struct lua_State th; /* thread */
-};
-
-
-/* macros to convert a GCObject into a specific value */
-#define rawgco2ts(o) check_exp((o)->gch.tt == LUA_TSTRING, &((o)->ts))
-#define gco2ts(o) (&rawgco2ts(o)->tsv)
-#define rawgco2u(o) check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u))
-#define gco2u(o) (&rawgco2u(o)->uv)
-#define gco2cl(o) check_exp((o)->gch.tt == LUA_TFUNCTION, &((o)->cl))
-#define gco2h(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))
-#define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))
-#define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
-#define ngcotouv(o) \
- check_exp((o) == NULL || (o)->gch.tt == LUA_TUPVAL, &((o)->uv))
-#define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))
-
-/* macro to convert any Lua object into a GCObject */
-#define obj2gco(v) (cast(GCObject *, (v)))
-
-
-LUAI_FUNC lua_State *luaE_newthread (lua_State *L);
-LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1);
-
-#endif
-
diff --git a/engines/sword25/util/pluto/pdep/lstring.h b/engines/sword25/util/pluto/pdep/lstring.h
deleted file mode 100644
index c88e4c12a9..0000000000
--- a/engines/sword25/util/pluto/pdep/lstring.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-** $Id$
-** String table (keep all strings handled by Lua)
-** See Copyright Notice in lua.h
-*/
-
-#ifndef lstring_h
-#define lstring_h
-
-
-#include "lgc.h"
-#include "lobject.h"
-#include "lstate.h"
-
-
-#define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char))
-
-#define sizeudata(u) (sizeof(union Udata)+(u)->len)
-
-#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s)))
-#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
- (sizeof(s)/sizeof(char))-1))
-
-#define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT)
-
-LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
-LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
-LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
-
-
-#endif
diff --git a/engines/sword25/util/pluto/pdep/ltm.h b/engines/sword25/util/pluto/pdep/ltm.h
deleted file mode 100644
index 1b89683ef3..0000000000
--- a/engines/sword25/util/pluto/pdep/ltm.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-** $Id$
-** Tag methods
-** See Copyright Notice in lua.h
-*/
-
-#ifndef ltm_h
-#define ltm_h
-
-
-#include "lobject.h"
-
-
-/*
-* WARNING: if you change the order of this enumeration,
-* grep "ORDER TM"
-*/
-typedef enum {
- TM_INDEX,
- TM_NEWINDEX,
- TM_GC,
- TM_MODE,
- TM_EQ, /* last tag method with `fast' access */
- TM_ADD,
- TM_SUB,
- TM_MUL,
- TM_DIV,
- TM_MOD,
- TM_POW,
- TM_UNM,
- TM_LEN,
- TM_LT,
- TM_LE,
- TM_CONCAT,
- TM_CALL,
- TM_N /* number of elements in the enum */
-} TMS;
-
-
-
-#define gfasttm(g,et,e) ((et) == NULL ? NULL : \
- ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
-
-#define fasttm(l,et,e) gfasttm(G(l), et, e)
-
-LUAI_DATA const char *const luaT_typenames[];
-
-
-LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);
-LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o,
- TMS event);
-LUAI_FUNC void luaT_init (lua_State *L);
-
-#endif
diff --git a/engines/sword25/util/pluto/pdep/lua.h b/engines/sword25/util/pluto/pdep/lua.h
deleted file mode 100644
index 68dd887f0f..0000000000
--- a/engines/sword25/util/pluto/pdep/lua.h
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
-** $Id$
-** Lua - An Extensible Extension Language
-** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
-** See Copyright Notice at the end of this file
-*/
-
-
-#ifndef lua_h
-#define lua_h
-
-#include <stdarg.h>
-#include <stddef.h>
-
-
-#include "sword25/util/lua/luaconf.h"
-
-
-#define LUA_VERSION "Lua 5.1"
-#define LUA_RELEASE "Lua 5.1.3"
-#define LUA_VERSION_NUM 501
-#define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio"
-#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes"
-
-
-/* mark for precompiled code (`<esc>Lua') */
-#define LUA_SIGNATURE "\033Lua"
-
-/* option for multiple returns in `lua_pcall' and `lua_call' */
-#define LUA_MULTRET (-1)
-
-
-/*
-** pseudo-indices
-*/
-#define LUA_REGISTRYINDEX (-10000)
-#define LUA_ENVIRONINDEX (-10001)
-#define LUA_GLOBALSINDEX (-10002)
-#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i))
-
-
-/* thread status; 0 is OK */
-#define LUA_YIELD 1
-#define LUA_ERRRUN 2
-#define LUA_ERRSYNTAX 3
-#define LUA_ERRMEM 4
-#define LUA_ERRERR 5
-
-
-typedef struct lua_State lua_State;
-
-typedef int (*lua_CFunction) (lua_State *L);
-
-
-/*
-** functions that read/write blocks when loading/dumping Lua chunks
-*/
-typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz);
-
-typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud);
-
-
-/*
-** prototype for memory-allocation functions
-*/
-typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
-
-
-/*
-** basic types
-*/
-#define LUA_TNONE (-1)
-
-#define LUA_TNIL 0
-#define LUA_TBOOLEAN 1
-#define LUA_TLIGHTUSERDATA 2
-#define LUA_TNUMBER 3
-#define LUA_TSTRING 4
-#define LUA_TTABLE 5
-#define LUA_TFUNCTION 6
-#define LUA_TUSERDATA 7
-#define LUA_TTHREAD 8
-
-
-
-/* minimum Lua stack available to a C function */
-#define LUA_MINSTACK 20
-
-
-/*
-** generic extra include file
-*/
-#if defined(LUA_USER_H)
-#include LUA_USER_H
-#endif
-
-
-/* type of numbers in Lua */
-typedef LUA_NUMBER lua_Number;
-
-
-/* type for integer functions */
-typedef LUA_INTEGER lua_Integer;
-
-
-
-/*
-** state manipulation
-*/
-LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud);
-LUA_API void (lua_close) (lua_State *L);
-LUA_API lua_State *(lua_newthread) (lua_State *L);
-
-LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf);
-
-
-/*
-** basic stack manipulation
-*/
-LUA_API int (lua_gettop) (lua_State *L);
-LUA_API void (lua_settop) (lua_State *L, int idx);
-LUA_API void (lua_pushvalue) (lua_State *L, int idx);
-LUA_API void (lua_remove) (lua_State *L, int idx);
-LUA_API void (lua_insert) (lua_State *L, int idx);
-LUA_API void (lua_replace) (lua_State *L, int idx);
-LUA_API int (lua_checkstack) (lua_State *L, int sz);
-
-LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n);
-
-
-/*
-** access functions (stack -> C)
-*/
-
-LUA_API int (lua_isnumber) (lua_State *L, int idx);
-LUA_API int (lua_isstring) (lua_State *L, int idx);
-LUA_API int (lua_iscfunction) (lua_State *L, int idx);
-LUA_API int (lua_isuserdata) (lua_State *L, int idx);
-LUA_API int (lua_type) (lua_State *L, int idx);
-LUA_API const char *(lua_typename) (lua_State *L, int tp);
-
-LUA_API int (lua_equal) (lua_State *L, int idx1, int idx2);
-LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2);
-LUA_API int (lua_lessthan) (lua_State *L, int idx1, int idx2);
-
-LUA_API lua_Number (lua_tonumber) (lua_State *L, int idx);
-LUA_API lua_Integer (lua_tointeger) (lua_State *L, int idx);
-LUA_API int (lua_toboolean) (lua_State *L, int idx);
-LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len);
-LUA_API size_t (lua_objlen) (lua_State *L, int idx);
-LUA_API lua_CFunction (lua_tocfunction) (lua_State *L, int idx);
-LUA_API void *(lua_touserdata) (lua_State *L, int idx);
-LUA_API lua_State *(lua_tothread) (lua_State *L, int idx);
-LUA_API const void *(lua_topointer) (lua_State *L, int idx);
-
-
-/*
-** push functions (C -> stack)
-*/
-LUA_API void (lua_pushnil) (lua_State *L);
-LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
-LUA_API void (lua_pushinteger) (lua_State *L, lua_Integer n);
-LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l);
-LUA_API void (lua_pushstring) (lua_State *L, const char *s);
-LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,
- va_list argp);
-LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...);
-LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n);
-LUA_API void (lua_pushboolean) (lua_State *L, int b);
-LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p);
-LUA_API int (lua_pushthread) (lua_State *L);
-
-
-/*
-** get functions (Lua -> stack)
-*/
-LUA_API void (lua_gettable) (lua_State *L, int idx);
-LUA_API void (lua_getfield) (lua_State *L, int idx, const char *k);
-LUA_API void (lua_rawget) (lua_State *L, int idx);
-LUA_API void (lua_rawgeti) (lua_State *L, int idx, int n);
-LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec);
-LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz);
-LUA_API int (lua_getmetatable) (lua_State *L, int objindex);
-LUA_API void (lua_getfenv) (lua_State *L, int idx);
-
-
-/*
-** set functions (stack -> Lua)
-*/
-LUA_API void (lua_settable) (lua_State *L, int idx);
-LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k);
-LUA_API void (lua_rawset) (lua_State *L, int idx);
-LUA_API void (lua_rawseti) (lua_State *L, int idx, int n);
-LUA_API int (lua_setmetatable) (lua_State *L, int objindex);
-LUA_API int (lua_setfenv) (lua_State *L, int idx);
-
-
-/*
-** `load' and `call' functions (load and run Lua code)
-*/
-LUA_API void (lua_call) (lua_State *L, int nargs, int nresults);
-LUA_API int (lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc);
-LUA_API int (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud);
-LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt,
- const char *chunkname);
-
-LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data);
-
-
-/*
-** coroutine functions
-*/
-LUA_API int (lua_yield) (lua_State *L, int nresults);
-LUA_API int (lua_resume) (lua_State *L, int narg);
-LUA_API int (lua_status) (lua_State *L);
-
-/*
-** garbage-collection function and options
-*/
-
-#define LUA_GCSTOP 0
-#define LUA_GCRESTART 1
-#define LUA_GCCOLLECT 2
-#define LUA_GCCOUNT 3
-#define LUA_GCCOUNTB 4
-#define LUA_GCSTEP 5
-#define LUA_GCSETPAUSE 6
-#define LUA_GCSETSTEPMUL 7
-
-LUA_API int (lua_gc) (lua_State *L, int what, int data);
-
-
-/*
-** miscellaneous functions
-*/
-
-LUA_API int (lua_error) (lua_State *L);
-
-LUA_API int (lua_next) (lua_State *L, int idx);
-
-LUA_API void (lua_concat) (lua_State *L, int n);
-
-LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
-LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
-
-
-
-/*
-** ===============================================================
-** some useful macros
-** ===============================================================
-*/
-
-#define lua_pop(L,n) lua_settop(L, -(n)-1)
-
-#define lua_newtable(L) lua_createtable(L, 0, 0)
-
-#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))
-
-#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0)
-
-#define lua_strlen(L,i) lua_objlen(L, (i))
-
-#define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION)
-#define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE)
-#define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA)
-#define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL)
-#define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN)
-#define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD)
-#define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE)
-#define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0)
-
-#define lua_pushliteral(L, s) \
- lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1)
-
-#define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, (s))
-#define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, (s))
-
-#define lua_tostring(L,i) lua_tolstring(L, (i), NULL)
-
-
-
-/*
-** compatibility macros and functions
-*/
-
-#define lua_open() luaL_newstate()
-
-#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX)
-
-#define lua_getgccount(L) lua_gc(L, LUA_GCCOUNT, 0)
-
-#define lua_Chunkreader lua_Reader
-#define lua_Chunkwriter lua_Writer
-
-
-/* hack */
-LUA_API void lua_setlevel (lua_State *from, lua_State *to);
-
-
-/*
-** {======================================================================
-** Debug API
-** =======================================================================
-*/
-
-
-/*
-** Event codes
-*/
-#define LUA_HOOKCALL 0
-#define LUA_HOOKRET 1
-#define LUA_HOOKLINE 2
-#define LUA_HOOKCOUNT 3
-#define LUA_HOOKTAILRET 4
-
-
-/*
-** Event masks
-*/
-#define LUA_MASKCALL (1 << LUA_HOOKCALL)
-#define LUA_MASKRET (1 << LUA_HOOKRET)
-#define LUA_MASKLINE (1 << LUA_HOOKLINE)
-#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT)
-
-typedef struct lua_Debug lua_Debug; /* activation record */
-
-
-/* Functions to be called by the debuger in specific events */
-typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
-
-
-LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar);
-LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
-LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
-LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
-LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n);
-LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n);
-
-LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count);
-LUA_API lua_Hook lua_gethook (lua_State *L);
-LUA_API int lua_gethookmask (lua_State *L);
-LUA_API int lua_gethookcount (lua_State *L);
-
-
-struct lua_Debug {
- int event;
- const char *name; /* (n) */
- const char *namewhat; /* (n) `global', `local', `field', `method' */
- const char *what; /* (S) `Lua', `C', `main', `tail' */
- const char *source; /* (S) */
- int currentline; /* (l) */
- int nups; /* (u) number of upvalues */
- int linedefined; /* (S) */
- int lastlinedefined; /* (S) */
- char short_src[LUA_IDSIZE]; /* (S) */
- /* private part */
- int i_ci; /* active function */
-};
-
-/* }====================================================================== */
-
-
-/******************************************************************************
-* Copyright (C) 1994-2008 Lua.org, PUC-Rio. All rights reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining
-* a copy of this software and associated documentation files (the
-* "Software"), to deal in the Software without restriction, including
-* without limitation the rights to use, copy, modify, merge, publish,
-* distribute, sublicense, and/or sell copies of the Software, and to
-* permit persons to whom the Software is furnished to do so, subject to
-* the following conditions:
-*
-* The above copyright notice and this permission notice shall be
-* included in all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-
-
-#endif
diff --git a/engines/sword25/util/pluto/pdep/lzio.h b/engines/sword25/util/pluto/pdep/lzio.h
index 2f167d7d58..2e37f8d202 100644
--- a/engines/sword25/util/pluto/pdep/lzio.h
+++ b/engines/sword25/util/pluto/pdep/lzio.h
@@ -8,7 +8,7 @@
#ifndef lzio_h
#define lzio_h
-#include "lua.h"
+#include "sword25/util/lua/lua.h"
#define EOZ (-1) /* end of stream */
diff --git a/engines/sword25/util/pluto/pdep/pdep.h b/engines/sword25/util/pluto/pdep/pdep.h
index c26f4566c5..664fc812b5 100644
--- a/engines/sword25/util/pluto/pdep/pdep.h
+++ b/engines/sword25/util/pluto/pdep/pdep.h
@@ -1,16 +1,17 @@
#ifndef PDEP_H
#define PDEP_H
-#include "lua.h"
-#include "ldo.h"
-#include "lfunc.h"
-#include "lgc.h"
-#include "llimits.h"
-#include "lobject.h"
-#include "lopcodes.h"
-#include "lstate.h"
-#include "lstring.h"
-#include "lauxlib.h"
+#include "sword25/util/lua/lua.h"
+#include "sword25/util/pluto/pdep/lzio.h"
+#include "sword25/util/lua/ldo.h"
+#include "sword25/util/lua/lfunc.h"
+#include "sword25/util/lua/lgc.h"
+#include "sword25/util/lua/llimits.h"
+#include "sword25/util/lua/lobject.h"
+#include "sword25/util/lua/lopcodes.h"
+#include "sword25/util/lua/lstate.h"
+#include "sword25/util/lua/lstring.h"
+#include "sword25/util/lua/lauxlib.h"
#define pdep_reallocv(L,b,on,n,e) \
diff --git a/engines/sword25/util/pluto/pptest.cpp b/engines/sword25/util/pluto/pptest.cpp
deleted file mode 100644
index 1bfecf2b75..0000000000
--- a/engines/sword25/util/pluto/pptest.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/* $Id$ */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
-
-static int LUAF_createludata(lua_State *L)
-{
- lua_pushlightuserdata(L, (void*)321);
- return 1;
-}
-
-/* A userdata that may be literally persisted */
-static int LUAF_boxinteger(lua_State *L)
-{
- /* num */
- int* ptr = lua_newuserdata(L, sizeof(int));
- /* num udata */
- *ptr = luaL_checkint(L, 1);
- lua_newtable(L);
- /* num udata mt */
- lua_pushstring(L, "__persist");
- /* num udata mt "__persist" */
- lua_pushboolean(L, 1);
- /* num udata mt "__persist" true */
- lua_rawset(L, 3);
- /* num udata mt */
- lua_setmetatable(L, 2);
- /* num udata */
- return 1;
-}
-
-static int LUAF_boxboolean(lua_State *L)
-{
- /* bool */
- char* ptr = lua_newuserdata(L, sizeof(char));
- /* bool udata */
- *ptr = lua_toboolean(L, 1);
- lua_newtable(L);
- /* num udata mt */
- lua_pushstring(L, "__persist");
- /* num udata mt "__persist" */
- lua_getglobal(L, "booleanpersist");
- /* num udata mt "__persist" booleanpersist */
- lua_rawset(L, 3);
- /* num udata mt */
- lua_setmetatable(L, 2);
- /* num udata */
- return 1;
-}
-
-static int LUAF_unboxboolean(lua_State *L)
-{
- /* udata */
- lua_pushboolean(L, *(char*)lua_touserdata(L, 1));
- /* udata bool */
- return 1;
-}
-
-static int LUAF_onerror(lua_State *L)
-{
-
- const char* str = 0;
- if(lua_gettop(L) != 0)
- {
- str = lua_tostring(L, -1);
- printf("%s\n",str);
- }
- return 0;
-}
-
-int main()
-{
- lua_State* L = lua_open();
-
- luaL_openlibs(L);
- lua_settop(L, 0);
-
- lua_register(L, "createludata", LUAF_createludata);
- lua_register(L, "boxinteger", LUAF_boxinteger);
- lua_register(L, "boxboolean", LUAF_boxboolean);
- lua_register(L, "unboxboolean", LUAF_unboxboolean);
- lua_register(L, "onerror", LUAF_onerror);
-
- lua_pushcfunction(L, LUAF_onerror);
- luaL_loadfile(L, "pptest.lua");
- lua_pcall(L,0,0,1);
-
- lua_close(L);
-
- return 0;
-}
diff --git a/engines/sword25/util/pluto/pptest.lua b/engines/sword25/util/pluto/pptest.lua
deleted file mode 100644
index 144da3ee80..0000000000
--- a/engines/sword25/util/pluto/pptest.lua
+++ /dev/null
@@ -1,168 +0,0 @@
--- $Id$
-
-require "pluto"
-
-permtable = { 1234 }
-
-perms = { [coroutine.yield] = 1, [permtable] = 2 }
-
-twithmt = {}
-setmetatable( twithmt, { __call = function() return 21 end } )
-
-function testfenv()
- return abc
-end
-
-setfenv(testfenv, { abc = 456 })
-
-function fa(i)
- local ia = i + 1
- return fb(ia)
-end
-
-function fb(i)
- local ib = i + 1
- ib = ib + fc(ib)
- return ib
-end
-
-function fc(i)
- local ic = i + 1
- coroutine.yield()
- return ic*2
-end
-
-function func()
- return 4
-end
-
-thr = coroutine.create(fa)
-coroutine.resume(thr, 2)
-
-testtbl = { a = 2, [2] = 4 }
-
-function funcreturningclosure(n)
- return function()
- return n
- end
-end
-
-function nestedfunc(n)
- return (function(m) return m+2 end)(n+3)
-end
-
-testloopa = {}
-testloopb = { testloopa = testloopa }
-testloopa.testloopb = testloopb
-
-sharedref = {}
-refa = {sharedref = sharedref}
-refb = {sharedref = sharedref}
-
-sptable = { a = 3 }
-
-setmetatable(sptable, {
- __persist = function(tbl)
- local a = tbl.a
- return function()
- return { a = a+3 }
- end
- end
-})
-
-literaludata = boxinteger(71)
-
-function booleanpersist(udata)
- local b = unboxboolean(udata)
- return function()
- return boxboolean(b)
- end
-end
-
-function makecounter()
- local a = 0
- return {
- inc = function() a = a + 1 end,
- cur = function() return a end
- }
-end
-
-function uvinthreadfunc()
- local a = 1
- local b = function()
- a = a+1
- coroutine.yield()
- a = a+1
- end
- a = a+1
- b()
- a = a+1
- return a
-end
-
-uvinthread = coroutine.create(uvinthreadfunc)
-coroutine.resume(uvinthread)
-
-niinmt = { a = 3 }
-setmetatable(niinmt, {__newindex = function(key, val) end })
-
-
-
-
-local function GenerateObjects()
- local Table = {}
-
- function Table:Func()
- return { Table, self }
- end
-
- function uvcycle()
- return Table:Func()
- end
-end
-
-GenerateObjects()
-
-
-
-function debuginfo(foo)
- foo = foo + foo
- return debug.getlocal(1,1)
-end
-
-rootobj = {
- testfalse = false,
- testtrue = true,
- testseven = 7,
- testfoobar = "foobar",
- testfuncreturnsfour = func,
- testnil = nil,
- testthread = thr,
- testperm = permtable,
- testmt = twithmt,
- testtbl = testtbl,
- testfenv = testfenv,
- testclosure = funcreturningclosure(11),
- testnilclosure = funcreturningclosure(nil),
- testnest = nestedfunc,
- testludata = createludata(),
- testlooptable = testloopa,
- testsharedrefa = refa,
- testsharedrefb = refb,
- testsptable = sptable,
- testliteraludata = literaludata,
- testspudata1 = boxboolean(true),
- testspudata2 = boxboolean(false),
- testsharedupval = makecounter(),
- testuvinthread = uvinthread,
- testniinmt = niinmt,
- testuvcycle = uvcycle,
- testdebuginfo = debuginfo
-}
-
-buf = pluto.persist(perms, rootobj)
-
-onerror()
-outfile = io.open("test.plh", "wb")
-outfile:write(buf)
-outfile:close()
diff --git a/engines/sword25/util/pluto/puptest.cpp b/engines/sword25/util/pluto/puptest.cpp
deleted file mode 100644
index e9aa7ea305..0000000000
--- a/engines/sword25/util/pluto/puptest.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/* $Id$ */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
-
-static int LUAF_checkludata(lua_State *L)
-{
- lua_pushboolean(L, lua_touserdata(L, -1) == (void*)321);
- return 1;
-}
-
-static int LUAF_unboxinteger(lua_State *L)
-{
- lua_pushnumber(L, *((int*)lua_touserdata(L, -1)));
- return 1;
-}
-
-static int LUAF_unboxboolean(lua_State *L)
-{
- /* udata */
- lua_pushboolean(L, *(char*)lua_touserdata(L, 1));
- /* udata bool */
- return 1;
-}
-
-static int LUAF_boxboolean(lua_State *L)
-{
- /* bool */
- char* ptr = lua_newuserdata(L, sizeof(char));
- /* bool udata */
- *ptr = lua_toboolean(L, 1);
- lua_newtable(L);
- /* num udata mt */
- lua_pushstring(L, "__persist");
- /* num udata mt "__persist" */
- lua_getglobal(L, "booleanpersist");
- /* num udata mt "__persist" booleanpersist */
- lua_rawset(L, 3);
- /* num udata mt */
- lua_setmetatable(L, 2);
- /* num udata */
- return 1;
-}
-
-static int LUAF_onerror(lua_State *L)
-{
-
- const char* str = 0;
- if(lua_gettop(L) != 0)
- {
- str = lua_tostring(L, -1);
- printf("%s\n",str);
- }
- return 0;
-}
-
-int main()
-{
- lua_State* L = lua_open();
-
- luaL_openlibs(L);
- lua_settop(L, 0);
-
- lua_register(L, "checkludata", LUAF_checkludata);
- lua_register(L, "unboxinteger", LUAF_unboxinteger);
- lua_register(L, "boxboolean", LUAF_boxboolean);
- lua_register(L, "unboxboolean", LUAF_unboxboolean);
- lua_register(L, "onerror", LUAF_onerror);
-
- lua_pushcfunction(L, LUAF_onerror);
- luaL_loadfile(L, "puptest.lua");
- lua_pcall(L,0,0,1);
-
- lua_close(L);
-
- return 0;
-}
diff --git a/engines/sword25/util/pluto/puptest.lua b/engines/sword25/util/pluto/puptest.lua
deleted file mode 100644
index e5ccdd64bd..0000000000
--- a/engines/sword25/util/pluto/puptest.lua
+++ /dev/null
@@ -1,93 +0,0 @@
--- $Id$
-
-require "pluto"
-
-permtable = { 1234 }
-
-perms = { [1] = coroutine.yield, [2] = permtable }
-
-function testcounter(counter)
- local a = counter.cur()
- counter.inc()
- return counter.cur() == a+1
-end
-
-function testuvinthread(func)
- local success, result = coroutine.resume(func)
- return success and result == 5
-end
-
-
-function test(rootobj)
- local passed = 0
- local total = 0
- local dotest = function(name,cond)
- total = total+1
- if cond then
- print(name, " PASSED")
- passed = passed + 1
- else
- print(name, "* FAILED")
- end
- end
-
-
- dotest("Boolean FALSE ", rootobj.testfalse == false)
- dotest("Boolean TRUE ", rootobj.testtrue == true)
- dotest("Number 7 ", rootobj.testseven == 7)
- dotest("String 'foobar' ", rootobj.testfoobar == "foobar")
- dotest("Func returning 4 ", rootobj.testfuncreturnsfour() == 4)
- dotest("Nil value ", rootobj.testnil == nil)
- dotest("Thread resume ", coroutine.resume(rootobj.testthread) == true,14)
- dotest("Table ", rootobj.testtbl.a == 2 and rootobj.testtbl[2] == 4);
- dotest("Permanent table ", rootobj.testperm == permtable)
- dotest("Table metatable ", rootobj.testmt() == 21)
- dotest("Function env ", rootobj.testfenv() == 456)
- dotest("Lua closure ", rootobj.testclosure() == 11)
- dotest("Nil in closure ", rootobj.testnilclosure() == nil)
- dotest("Nested func ", rootobj.testnest(1) == 6)
- dotest("Light userdata ", checkludata(rootobj.testludata))
- dotest("Looped tables ",
- rootobj.testlooptable.testloopb.testloopa ==
- rootobj.testlooptable)
- dotest("Shared reference ", rootobj.testsharedrefa.sharedref ==
- rootobj.testsharedrefb.sharedref)
- dotest("Identical tables ", rootobj.testsharedrefa ~=
- rootobj.testsharedrefb)
- dotest("Table special persist", rootobj.testsptable.a == 6)
- dotest("Udata literal persist",
- unboxinteger(rootobj.testliteraludata) == 71)
- dotest("Udata special persist",
- unboxboolean(rootobj.testspudata1) == true and
- unboxboolean(rootobj.testspudata2) == false)
- dotest("Shared upvalues ",
- testcounter(rootobj.testsharedupval))
- dotest("Open upvalues ",
- testuvinthread(rootobj.testuvinthread))
- dotest("Upvalue cycles ",
- rootobj.testuvcycle()[1] == rootobj.testuvcycle()[2])
- dotest("__newindex metamethod", rootobj.testniinmt.a == 3)
- dotest("Debug info ", (rootobj.testdebuginfo(2)) == "foo")
- print()
- if passed == total then
- print("All tests passed.")
- else
- print(passed .. "/" .. total .. " tests passed.")
- end
-end
-
-infile, err = io.open("test.plh", "rb")
-if infile == nil then
- error("While opening: " .. (err or "no error"))
-end
-
-buf, err = infile:read("*a")
-if buf == nil then
- error("While reading: " .. (err or "no error"))
-end
-
-infile:close()
-
-rootobj = pluto.unpersist(perms, buf)
-
-test(rootobj)
diff --git a/engines/teenagent/actor.cpp b/engines/teenagent/actor.cpp
index 1620aa700c..9dd30f43c3 100644
--- a/engines/teenagent/actor.cpp
+++ b/engines/teenagent/actor.cpp
@@ -27,6 +27,7 @@
#include "teenagent/resources.h"
#include "common/random.h"
+#include "common/textconsole.h"
namespace TeenAgent {
diff --git a/engines/teenagent/animation.cpp b/engines/teenagent/animation.cpp
index 56812001e8..623966f265 100644
--- a/engines/teenagent/animation.cpp
+++ b/engines/teenagent/animation.cpp
@@ -24,6 +24,7 @@
#include "teenagent/animation.h"
#include "common/endian.h"
+#include "common/textconsole.h"
namespace TeenAgent {
diff --git a/engines/teenagent/callbacks.cpp b/engines/teenagent/callbacks.cpp
index d0662a73d6..f4be917eac 100644
--- a/engines/teenagent/callbacks.cpp
+++ b/engines/teenagent/callbacks.cpp
@@ -27,6 +27,8 @@
#include "teenagent/resources.h"
#include "teenagent/dialog.h"
+#include "common/textconsole.h"
+
namespace TeenAgent {
#define CHECK_FLAG(addr, v) (res->dseg.get_byte(addr) == (v))
diff --git a/engines/teenagent/console.h b/engines/teenagent/console.h
index 2aba99428b..d6c24d4d8f 100644
--- a/engines/teenagent/console.h
+++ b/engines/teenagent/console.h
@@ -22,8 +22,8 @@
* $Id$
*/
-#ifndef TEENAGENT_DIALOG_H
-#define TEENAGENT_DIALOG_H
+#ifndef TEENAGENT_CONSOLE_H
+#define TEENAGENT_CONSOLE_H
#include "gui/debugger.h"
diff --git a/engines/teenagent/font.cpp b/engines/teenagent/font.cpp
index 7d252f59e8..2d98ae9de7 100644
--- a/engines/teenagent/font.cpp
+++ b/engines/teenagent/font.cpp
@@ -24,8 +24,12 @@
#include "teenagent/font.h"
#include "teenagent/pack.h"
+#include "common/debug.h"
+#include "common/endian.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/ptr.h"
+#include "graphics/surface.h"
namespace TeenAgent {
diff --git a/engines/teenagent/font.h b/engines/teenagent/font.h
index e08a3513af..29a8121435 100644
--- a/engines/teenagent/font.h
+++ b/engines/teenagent/font.h
@@ -25,6 +25,7 @@
#ifndef TEENAGENT_FONT_H
#define TEENAGENT_FONT_H
+#include "common/str.h"
#include "graphics/surface.h"
namespace TeenAgent {
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index bc4ac24da4..4d18d68502 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -24,6 +24,7 @@
#include "common/memstream.h"
#include "common/ptr.h"
+#include "common/textconsole.h"
#include "teenagent/inventory.h"
#include "teenagent/resources.h"
diff --git a/engines/teenagent/music.cpp b/engines/teenagent/music.cpp
index 395b2546b9..f0be5165f6 100644
--- a/engines/teenagent/music.cpp
+++ b/engines/teenagent/music.cpp
@@ -25,7 +25,9 @@
#include "teenagent/music.h"
#include "teenagent/resources.h"
+#include "common/debug.h"
#include "common/ptr.h"
+#include "common/textconsole.h"
namespace TeenAgent {
diff --git a/engines/teenagent/resources.cpp b/engines/teenagent/resources.cpp
index 9fe889fa41..69908239ab 100644
--- a/engines/teenagent/resources.cpp
+++ b/engines/teenagent/resources.cpp
@@ -24,6 +24,7 @@
#include "teenagent/resources.h"
#include "teenagent/teenagent.h"
+#include "common/textconsole.h"
#include "common/zlib.h"
namespace TeenAgent {
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index f9756b5b91..ee431b2ab5 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -26,6 +26,9 @@
#include "common/debug.h"
#include "common/algorithm.h"
#include "common/ptr.h"
+#include "common/textconsole.h"
+
+#include "graphics/palette.h"
#include "teenagent/scene.h"
#include "teenagent/resources.h"
@@ -379,7 +382,7 @@ void Scene::init(int id, const Common::Point &pos) {
custom_animation[i].free();
if (background.pixels == NULL)
- background.create(320, 200, 1);
+ background.create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
warp(pos);
diff --git a/engines/teenagent/scene.h b/engines/teenagent/scene.h
index 2dc5bc9c83..28def3a064 100644
--- a/engines/teenagent/scene.h
+++ b/engines/teenagent/scene.h
@@ -35,6 +35,10 @@
#include "common/array.h"
#include "common/list.h"
+namespace Common {
+struct Event;
+}
+
namespace TeenAgent {
class TeenAgentEngine;
diff --git a/engines/teenagent/segment.cpp b/engines/teenagent/segment.cpp
index 7ba680907b..829c84765d 100644
--- a/engines/teenagent/segment.cpp
+++ b/engines/teenagent/segment.cpp
@@ -23,6 +23,7 @@
*/
#include "teenagent/segment.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace TeenAgent {
diff --git a/engines/teenagent/surface.cpp b/engines/teenagent/surface.cpp
index 96672ca1b3..545b0f75f0 100644
--- a/engines/teenagent/surface.cpp
+++ b/engines/teenagent/surface.cpp
@@ -61,7 +61,7 @@ void Surface::load(Common::SeekableReadStream *stream, Type type) {
}
//debug(0, "creating surface %ux%u -> %u,%u", w_, h_, x, y);
- create(w_, h_, 1);
+ create(w_, h_, Graphics::PixelFormat::createFormatCLUT8());
stream->read(pixels, w_ * h_);
}
diff --git a/engines/teenagent/surface.h b/engines/teenagent/surface.h
index b44fd3c21a..82c13c84bd 100644
--- a/engines/teenagent/surface.h
+++ b/engines/teenagent/surface.h
@@ -25,8 +25,12 @@
#ifndef TEENAGENT_SURFACE_H
#define TEENAGENT_SURFACE_H
+#include "common/rect.h"
#include "graphics/surface.h"
-#include "common/stream.h"
+
+namespace Common {
+ class SeekableReadStream;
+}
namespace TeenAgent {
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index e66de70079..ec1e945f8d 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -27,6 +27,7 @@
#include "common/events.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "backends/audiocd/audiocd.h"
@@ -37,6 +38,7 @@
#include "audio/decoders/raw.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
#include "graphics/thumbnail.h"
#include "teenagent/console.h"
diff --git a/engines/testbed/detection.cpp b/engines/testbed/detection.cpp
index 734ed0c22a..b08cca291a 100644
--- a/engines/testbed/detection.cpp
+++ b/engines/testbed/detection.cpp
@@ -23,10 +23,8 @@
*
*/
-#include "common/config-manager.h"
#include "engines/advancedDetector.h"
#include "common/system.h"
-#include "common/fs.h"
#include "base/plugins.h"
diff --git a/engines/testbed/events.cpp b/engines/testbed/events.cpp
index b0a930172d..37b0a7ead4 100644
--- a/engines/testbed/events.cpp
+++ b/engines/testbed/events.cpp
@@ -24,10 +24,17 @@
#include "common/events.h"
#include "common/keyboard.h"
+#include "common/rect.h"
+#include "common/str.h"
+#include "common/system.h"
+#include "common/util.h"
#include "engines/engine.h"
#include "graphics/cursorman.h"
+#include "graphics/font.h"
+#include "graphics/fontman.h"
+#include "graphics/surface.h"
#include "testbed/events.h"
#include "testbed/graphics.h"
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index 588aad8248..c8558e30f4 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -33,6 +33,7 @@
#include "graphics/cursorman.h"
#include "graphics/fontman.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "graphics/VectorRendererSpec.h"
@@ -606,7 +607,7 @@ TestExitStatus GFXtests::mouseMovements() {
Common::String info = "Testing Automated Mouse movements.\n"
"You should expect cursor hotspot(top-left corner) to automatically move from (0, 0) to (100, 100).\n"
- "There we have a rectangle drawn, finally the cursor would lie centred in that rectangle.";
+ "There we have a rectangle drawn, finally the cursor would lie centered in that rectangle.";
if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
Testsuite::logPrintf("Info! Skipping test : Mouse Movements\n");
@@ -637,7 +638,7 @@ TestExitStatus GFXtests::mouseMovements() {
g_system->delayMillis(1500);
CursorMan.showMouse(false);
- if (Testsuite::handleInteractiveInput("Was the cursor centred in the rectangle at (100, 100)?", "Yes", "No", kOptionRight)) {
+ if (Testsuite::handleInteractiveInput("Was the cursor centered in the rectangle at (100, 100)?", "Yes", "No", kOptionRight)) {
return kTestFailed;
}
@@ -654,7 +655,7 @@ TestExitStatus GFXtests::copyRectToScreen() {
Testsuite::clearScreen();
Common::String info = "Testing Blitting a Bitmap to screen.\n"
- "You should expect to see a 20x40 yellow horizontal rectangle centred at the screen.";
+ "You should expect to see a 20x40 yellow horizontal rectangle centered at the screen.";
if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) {
Testsuite::logPrintf("Info! Skipping test : Blitting Bitmap\n");
@@ -1113,7 +1114,7 @@ TestExitStatus GFXtests::pixelFormats() {
Graphics::Surface *screen = g_system->lockScreen();
- // Draw 6 rectangles centred at (50, 160), piled over one another
+ // Draw 6 rectangles centered at (50, 160), piled over one another
// each with color in colors[]
for (int i = 0; i < 6; i++) {
screen->fillRect(Common::Rect::center(160, 20 + i * 10, 100, 10), colors[i]);
diff --git a/engines/testbed/savegame.cpp b/engines/testbed/savegame.cpp
index b91d9fc47c..0ffd3672fa 100644
--- a/engines/testbed/savegame.cpp
+++ b/engines/testbed/savegame.cpp
@@ -138,9 +138,9 @@ TestExitStatus SaveGametests::testListingSavefile() {
Common::Error error = saveFileMan->getError();
- if (error != Common::kNoError) {
+ if (error.getCode() != Common::kNoError) {
// Abort. Some Error in writing files
- Testsuite::logDetailedPrintf("Error while creating savefiles: %s\n", Common::errorToString(error));
+ Testsuite::logDetailedPrintf("Error while creating savefiles: %s\n", error.getDesc().c_str());
return kTestFailed;
}
@@ -177,7 +177,7 @@ TestExitStatus SaveGametests::testErrorMessages() {
readAndVerifyData("tBedSomeNonExistentSaveFile.0", "File doesn't exists!");
Common::Error error = saveFileMan->getError();
- if (error == Common::kNoError) {
+ if (error.getCode() == Common::kNoError) {
// blunder! how come?
Testsuite::logDetailedPrintf("SaveFileMan.getError() failed\n");
return kTestFailed;
diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp
index 76f9e850c0..dca116368e 100644
--- a/engines/testbed/sound.cpp
+++ b/engines/testbed/sound.cpp
@@ -26,6 +26,8 @@
#include "backends/audiocd/audiocd.h"
+#include "common/config-manager.h"
+
#include "testbed/sound.h"
namespace Testbed {
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index 1ceecb8ebf..179be2bb8b 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -24,7 +24,12 @@
#include "common/debug-channels.h"
#include "common/scummsys.h"
-#include "common/system.h"
+#include "common/archive.h"
+#include "common/config-manager.h"
+#include "common/error.h"
+#include "common/fs.h"
+#include "common/rect.h"
+#include "common/str.h"
#include "engines/util.h"
diff --git a/engines/testbed/testbed.h b/engines/testbed/testbed.h
index e0feb52ff5..ca803a4cec 100644
--- a/engines/testbed/testbed.h
+++ b/engines/testbed/testbed.h
@@ -25,9 +25,9 @@
#ifndef TESTBED_H
#define TESTBED_H
-#include "engines/engine.h"
+#include "common/array.h"
-#include "gui/options.h"
+#include "engines/engine.h"
#include "testbed/config.h"
#include "testbed/testsuite.h"
diff --git a/engines/testbed/testsuite.h b/engines/testbed/testsuite.h
index a738f40764..94b3d70fd4 100644
--- a/engines/testbed/testsuite.h
+++ b/engines/testbed/testsuite.h
@@ -25,9 +25,12 @@
#ifndef TESTBED_TESTSUITE_H
#define TESTBED_TESTSUITE_H
+#include "common/array.h"
+#include "common/rect.h"
+#include "common/scummsys.h"
#include "common/system.h"
#include "common/str.h"
-#include "common/array.h"
+#include "graphics/font.h"
#include "graphics/fontman.h"
diff --git a/engines/tinsel/actors.cpp b/engines/tinsel/actors.cpp
index 7a1f9fbf55..9ec253e512 100644
--- a/engines/tinsel/actors.cpp
+++ b/engines/tinsel/actors.cpp
@@ -44,6 +44,7 @@
#include "tinsel/tinsel.h"
#include "tinsel/token.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
@@ -108,7 +109,7 @@ struct ACTORINFO {
bool bEscOn;
int escEvent;
- COLORREF textColour; // Text colour
+ COLORREF textColor; // Text color
SCNHANDLE playFilm; // revert to this after talks
SCNHANDLE talkFilm; // this be deleted in the future!
@@ -140,7 +141,7 @@ typedef TAGACTOR *PTAGACTOR;
static ACTORINFO *actorInfo = NULL;
-static COLORREF defaultColour = 0; // Text colour
+static COLORREF defaultColor = 0; // Text color
static bool bActorsOn = false;
@@ -479,13 +480,13 @@ void DropActors() {
for (int i = 0; i < NumActors; i++) {
if (TinselV2) {
- // Save text colour
- COLORREF tColour = actorInfo[i].textColour;
+ // Save text color
+ COLORREF tColor = actorInfo[i].textColor;
memset(&actorInfo[i], 0, sizeof(ACTORINFO));
- // Restor text colour
- actorInfo[i].textColour = tColour;
+ // Restor text color
+ actorInfo[i].textColor = tColor;
// Clear extra arrays
memset(zFactors, 0, NumActors);
@@ -1278,7 +1279,7 @@ void SetMoverZ(PMOVER pMover, int y, int32 zFactor) {
/**
* Stores actor's attributes.
- * Currently only the speech colours.
+ * Currently only the speech colors.
*/
void storeActorAttr(int ano, int r1, int g1, int b1) {
assert((ano > 0 && ano <= NumActors) || ano == -1); // illegal actor number
@@ -1288,36 +1289,36 @@ void storeActorAttr(int ano, int r1, int g1, int b1) {
if (b1 > MAX_INTENSITY) b1 = MAX_INTENSITY; // }
if (ano == -1)
- defaultColour = TINSEL_RGB(r1, g1, b1);
+ defaultColor = TINSEL_RGB(r1, g1, b1);
else
- actorInfo[ano - 1].textColour = TINSEL_RGB(r1, g1, b1);
+ actorInfo[ano - 1].textColor = TINSEL_RGB(r1, g1, b1);
}
/**
- * Called from ActorRGB() - Stores actor's speech colour.
+ * Called from ActorRGB() - Stores actor's speech color.
*/
-void SetActorRGB(int ano, COLORREF colour) {
+void SetActorRGB(int ano, COLORREF color) {
assert(ano >= 0 && ano <= NumActors);
if (ano)
- actorInfo[ano - 1].textColour = TO_LE_32(colour);
+ actorInfo[ano - 1].textColor = TO_LE_32(color);
else
- defaultColour = TO_LE_32(colour);
+ defaultColor = TO_LE_32(color);
}
/**
- * Get the actor's stored speech colour.
+ * Get the actor's stored speech color.
* @param ano Actor Id
*/
COLORREF GetActorRGB(int ano) {
// Not used in JAPAN version
assert((ano >= -1) && (ano <= NumActors)); // illegal actor number
- if ((ano == -1) || !actorInfo[ano - 1].textColour)
- return defaultColour;
+ if ((ano == -1) || !actorInfo[ano - 1].textColor)
+ return defaultColor;
else
- return actorInfo[ano - 1].textColour;
+ return actorInfo[ano - 1].textColor;
}
/**
diff --git a/engines/tinsel/actors.h b/engines/tinsel/actors.h
index fbad5d9955..2be42b00e6 100644
--- a/engines/tinsel/actors.h
+++ b/engines/tinsel/actors.h
@@ -109,7 +109,7 @@ void ActorEvent(int ano, TINSEL_EVENT event, PLR_EVENT be);
void storeActorAttr(int ano, int r1, int g1, int b1);
COLORREF GetActorRGB(int ano);
-void SetActorRGB(int ano, COLORREF colour);
+void SetActorRGB(int ano, COLORREF color);
void SetActorZfactor(int ano, uint32 zFactor);
uint32 GetActorZfactor(int ano);
diff --git a/engines/tinsel/adpcm.cpp b/engines/tinsel/adpcm.cpp
index ec51d150dc..530395d754 100644
--- a/engines/tinsel/adpcm.cpp
+++ b/engines/tinsel/adpcm.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "common/stream.h"
+#include "common/util.h"
+
#include "tinsel/adpcm.h"
namespace Tinsel {
@@ -44,14 +47,14 @@ void Tinsel_ADPCMStream::readBufferTinselHeader() {
// Negate
start = ~(start | 0xC0) + 1;
- _status.predictor = 1 << start;
+ _status.predictor = (unsigned long long int)1 << start;
} else {
// Lower 6 bit are positive
// Truncate
start &= 0x1F;
- _status.predictor = ((double) 1.0) / (1 << start);
+ _status.predictor = ((double) 1.0) / ((unsigned long long int)1 << start);
}
_status.K0 = TinselFilterTable[filterVal][0];
diff --git a/engines/tinsel/anim.cpp b/engines/tinsel/anim.cpp
index 37d8de925e..61c8b67624 100644
--- a/engines/tinsel/anim.cpp
+++ b/engines/tinsel/anim.cpp
@@ -31,6 +31,7 @@
#include "tinsel/sched.h"
#include "tinsel/tinsel.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
diff --git a/engines/tinsel/background.cpp b/engines/tinsel/background.cpp
index f895ecd2da..79f051420b 100644
--- a/engines/tinsel/background.cpp
+++ b/engines/tinsel/background.cpp
@@ -51,8 +51,8 @@ void InitBackground(const BACKGND *pBgnd) {
// set current background
pCurBgnd = pBgnd;
- // init background sky colour
- SetBgndColour(pBgnd->rgbSkyColour);
+ // init background sky color
+ SetBgndColor(pBgnd->rgbSkyColor);
// start of playfield array
pPlayfield = pBgnd->fieldArray;
@@ -127,11 +127,11 @@ void PlayfieldGetPos(int which, int *pXpos, int *pYpos) {
}
/**
- * Returns the x position of the centre of the specified playfield
+ * Returns the x position of the center of the specified playfield
* @param which Which playfield
*/
-int PlayfieldGetCentreX(int which) {
+int PlayfieldGetCenterX(int which) {
PLAYFIELD *pPlayfield; // pointer to relavent playfield
// make sure there is a background
@@ -165,7 +165,7 @@ OBJECT *GetPlayfieldList(int which) {
pPlayfield = pCurBgnd->fieldArray + which;
// return the display list pointer for this playfield
- return (OBJECT *)&pPlayfield->pDispList;
+ return pPlayfield->pDispList;
}
/**
@@ -205,10 +205,10 @@ void DrawBackgnd() {
pPlay->bMoved = true;
// sort the display list for this background - just in case somebody has changed object Z positions
- SortObjectList((OBJECT *)&pPlay->pDispList);
+ SortObjectList(pPlay->pDispList);
// generate clipping rects for all objects that have moved etc.
- FindMovingObjects((OBJECT *)&pPlay->pDispList, &ptWin,
+ FindMovingObjects(pPlay->pDispList, &ptWin,
&pPlay->rcClip, false, pPlay->bMoved);
// clear playfield moved flag
@@ -235,7 +235,7 @@ void DrawBackgnd() {
if (IntersectRectangle(rcPlayClip, pPlay->rcClip, *r))
// redraw all objects within this clipping rect
- UpdateClipRect((OBJECT *)&pPlay->pDispList,
+ UpdateClipRect(pPlay->pDispList,
&ptWin, &rcPlayClip);
}
}
diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h
index d0b27e6e40..06789e50bf 100644
--- a/engines/tinsel/background.h
+++ b/engines/tinsel/background.h
@@ -60,7 +60,7 @@ struct PLAYFIELD {
/** multi-playfield background structure - a backgnd is a container of playfields */
struct BACKGND {
- COLORREF rgbSkyColour; ///< background sky colour
+ COLORREF rgbSkyColor; ///< background sky color
Common::Point ptInitWorld; ///< initial world position
Common::Rect rcScrollLimits; ///< scroll limits
int refreshRate; ///< background update process refresh rate
@@ -93,7 +93,7 @@ void PlayfieldGetPos( // Returns the xy position of the specified playfield in
int *pXpos, // returns current x position
int *pYpos); // returns current y position
-int PlayfieldGetCentreX( // Returns the xy position of the specified playfield in the current background
+int PlayfieldGetCenterX( // Returns the xy position of the specified playfield in the current background
int which); // which playfield
OBJECT *GetPlayfieldList( // Returns the display list for the specified playfield
diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp
index 68653b16f4..0e67c3a06e 100644
--- a/engines/tinsel/bg.cpp
+++ b/engines/tinsel/bg.cpp
@@ -40,6 +40,7 @@
#include "tinsel/tinlib.h" // For Control()
#include "tinsel/tinsel.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
@@ -158,7 +159,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) {
FadeInFast(NULL);
bDoFadeIn = false;
} else if (TinselV2)
- PokeInTagColour();
+ PokeInTagColor();
for (;;) {
for (int i = 0; i < bgReels; i++) {
diff --git a/engines/tinsel/bmv.cpp b/engines/tinsel/bmv.cpp
index b5b84ceaee..793febdc21 100644
--- a/engines/tinsel/bmv.cpp
+++ b/engines/tinsel/bmv.cpp
@@ -44,6 +44,8 @@
#include "audio/decoders/raw.h"
+#include "common/textconsole.h"
+
namespace Tinsel {
//----------------- LOCAL DEFINES ----------------------------
@@ -81,7 +83,7 @@ namespace Tinsel {
#define BIT0 0x01
#define CD_XSCR 0x04 // Screen has a scroll offset
-#define CD_CMAP 0x08 // Colour map is included
+#define CD_CMAP 0x08 // Color map is included
#define CD_CMND 0x10 // Command is included
#define CD_AUDIO 0x20 // Audio data is included
#define CD_EXTEND 0x40 // Extended modes "A"-"z"
@@ -350,7 +352,7 @@ BMVPlayer::BMVPlayer() {
memset(texts, 0, sizeof(texts));
- talkColour = 0;
+ talkColor = 0;
bigProblemCount = 0;
bIsText = 0;
movieTick = 0;
@@ -382,8 +384,8 @@ void BMVPlayer::MoviePalette(int paletteOffset) {
UpdateDACqueue(1, 255, &moviePal[1]);
// Don't clobber talk
- if (talkColour != 0)
- SetTextPal(talkColour);
+ if (talkColor != 0)
+ SetTextPal(talkColor);
}
void BMVPlayer::InitialiseMovieSound() {
@@ -490,7 +492,7 @@ void BMVPlayer::BmvDrawText(bool bDraw) {
|-------------------------------------------------------|
\*-----------------------------------------------------*/
-void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration) {
+void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColor, int duration) {
SCNHANDLE hFont;
int index;
@@ -502,8 +504,8 @@ void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, CO
} else {
// It's a 'talk'
- if (pTalkColour != NULL)
- SetTextPal(*pTalkColour);
+ if (pTalkColor != NULL)
+ SetTextPal(*pTalkColor);
hFont = GetTalkFontHandle();
index = 1;
}
@@ -519,7 +521,7 @@ void BMVPlayer::MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, CO
0,
x, y,
hFont,
- TXT_CENTRE, 0);
+ TXT_CENTER, 0);
KeepOnScreen(texts[index].pText, &x, &y);
}
@@ -541,13 +543,13 @@ int BMVPlayer::MovieCommand(char cmd, int commandOffset) {
} else {
if (_vm->_config->_useSubtitles) {
TALK_CMD *pCmd = (TALK_CMD *)(bigBuffer + commandOffset);
- talkColour = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b);
+ talkColor = TINSEL_RGB(pCmd->r, pCmd->g, pCmd->b);
MovieText(nullContext, (int16)READ_LE_UINT16(&pCmd->stringId),
(int16)READ_LE_UINT16(&pCmd->x),
(int16)READ_LE_UINT16(&pCmd->y),
0,
- &talkColour,
+ &talkColor,
pCmd->duration);
}
return sz_CMD_TALK_pkt;
@@ -693,7 +695,7 @@ void BMVPlayer::InitialiseBMV() {
bFileEnd = false;
blobsInBuffer = 0;
memset(texts, 0, sizeof(texts));
- talkColour = 0;
+ talkColor = 0;
bigProblemCount = 0;
movieTick = 0;
diff --git a/engines/tinsel/bmv.h b/engines/tinsel/bmv.h
index 99a43e0740..d90d68fc13 100644
--- a/engines/tinsel/bmv.h
+++ b/engines/tinsel/bmv.h
@@ -96,7 +96,7 @@ class BMVPlayer {
int dieFrame;
} texts[2];
- COLORREF talkColour;
+ COLORREF talkColor;
int bigProblemCount;
@@ -143,7 +143,7 @@ private:
void MovieAudio(int audioOffset, int blobs);
void FettleMovieText();
void BmvDrawText(bool bDraw);
- void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColour, int duration);
+ void MovieText(CORO_PARAM, int stringId, int x, int y, int fontId, COLORREF *pTalkColor, int duration);
int MovieCommand(char cmd, int commandOffset);
int FollowingPacket(int thisPacket, bool bReallyImportant);
void LoadSlots(int number);
diff --git a/engines/tinsel/dialogs.cpp b/engines/tinsel/dialogs.cpp
index 73cad7a68f..281dd2da55 100644
--- a/engines/tinsel/dialogs.cpp
+++ b/engines/tinsel/dialogs.cpp
@@ -62,6 +62,8 @@
#include "tinsel/tinsel.h" // For engine access
#include "tinsel/token.h"
+#include "common/textconsole.h"
+
namespace Tinsel {
//----------------- EXTERNAL GLOBAL DATA --------------------
@@ -259,7 +261,7 @@ enum PARTS_INDEX {
#define MD_XLBUTR (TinselV2 ? 26 : 10)
#define MD_XRBUTL (TinselV2 ? 173 : 105)
#define MD_XRBUTR (TinselV2 ? 195 : 114)
-#define ROTX1 60 // Rotate button's offsets from the centre
+#define ROTX1 60 // Rotate button's offsets from the center
// Number of objects that makes up an empty window
#define MAX_WCOMP 21 // 4 corners + (3+3) sides + (2+2) extra sides
@@ -449,7 +451,7 @@ static bool bMoveOnUnHide; // Set before start of conversation
//----- Data pertinant to configure (incl. load/save game) -----
-#define COL_MAINBOX TBLUE1 // Base blue colour
+#define COL_MAINBOX TBLUE1 // Base blue color
#define COL_BOX TBLUE1
#define COL_HILIGHT TBLUE4
@@ -1639,7 +1641,7 @@ static void Select(int i, bool force) {
switch (cd.box[i].boxType) {
case RGROUP:
iconArray[HL2] = RectangleObject(BgPal(),
- (TinselV2 ? HighlightColour() : COL_HILIGHT), cd.box[i].w, cd.box[i].h);
+ (TinselV2 ? HighlightColor() : COL_HILIGHT), cd.box[i].w, cd.box[i].h);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL2]);
MultiSetAniXY(iconArray[HL2],
InvD[ino].inventoryX + cd.box[i].xpos,
@@ -2239,7 +2241,7 @@ static int WhichMenuBox(int curX, int curY, bool bSlides) {
/***/
/**************************************************************************/
-#define ROTX1 60 // Rotate button's offsets from the centre
+#define ROTX1 60 // Rotate button's offsets from the center
/**
* InvBoxes
@@ -2277,7 +2279,7 @@ static void InvBoxes(bool InBody, int curX, int curY) {
cd.box[cd.pointBox].boxType == AATBUT ||
cd.box[cd.pointBox].boxType == AABUT) {
iconArray[HL1] = RectangleObject(BgPal(),
- (TinselV2 ? HighlightColour() : COL_HILIGHT),
+ (TinselV2 ? HighlightColor() : COL_HILIGHT),
cd.box[cd.pointBox].w, cd.box[cd.pointBox].h);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[HL1]);
MultiSetAniXY(iconArray[HL1],
@@ -2638,14 +2640,14 @@ static void AddBackground(OBJECT **rect, OBJECT **title, int extraH, int extraV,
LoadStringRes(InvD[ino].hInvTitle, TextBufferAddr(), TBUFSZ);
*title = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0,
InvD[ino].inventoryX + width/2, InvD[ino].inventoryY + M_TOFF,
- GetTagFontHandle(), TXT_CENTRE);
+ GetTagFontHandle(), TXT_CENTER);
assert(*title); // Inventory title string produced NULL text
MultiSetZPosition(*title, Z_INV_HTEXT);
} else if (textFrom == FROM_STRING && cd.ixHeading != NO_HEADING) {
LoadStringRes(configStrings[cd.ixHeading], TextBufferAddr(), TBUFSZ);
*title = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0,
InvD[ino].inventoryX + width/2, InvD[ino].inventoryY + M_TOFF,
- GetTagFontHandle(), TXT_CENTRE);
+ GetTagFontHandle(), TXT_CENTER);
assert(*title); // Inventory title string produced NULL text
MultiSetZPosition(*title, Z_INV_HTEXT);
}
@@ -2669,7 +2671,7 @@ static void AddTitle(POBJECT *title, int extraH) {
LoadStringRes(InvD[ino].hInvTitle, TextBufferAddr(), TBUFSZ);
*title = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0,
InvD[ino].inventoryX + (width/2)+NM_BG_POS_X, InvD[ino].inventoryY + NM_TOFF,
- GetTagFontHandle(), TXT_CENTRE, 0);
+ GetTagFontHandle(), TXT_CENTER, 0);
assert(*title);
MultiSetZPosition(*title, Z_INV_HTEXT);
}
@@ -2736,7 +2738,7 @@ static void AddBox(int *pi, const int i) {
break;
// Give us a box
- iconArray[*pi] = RectangleObject(BgPal(), TinselV2 ? BoxColour() : COL_BOX,
+ iconArray[*pi] = RectangleObject(BgPal(), TinselV2 ? BoxColor() : COL_BOX,
cd.box[i].w, cd.box[i].h);
MultiInsertObject(GetPlayfieldList(FIELD_STATUS), iconArray[*pi]);
MultiSetAniXY(iconArray[*pi], x, y);
@@ -2758,9 +2760,9 @@ static void AddBox(int *pi, const int i) {
iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), cd.box[i].boxText, 0,
#ifdef JAPAN
// Note: it never seems to go here!
- x + cd.box[i].w/2, y+2, GetTagFontHandle(), TXT_CENTRE);
+ x + cd.box[i].w/2, y+2, GetTagFontHandle(), TXT_CENTER);
#else
- x + cd.box[i].w / 2, y + TYOFF, GetTagFontHandle(), TXT_CENTRE);
+ x + cd.box[i].w / 2, y + TYOFF, GetTagFontHandle(), TXT_CENTER);
#endif
}
@@ -2787,9 +2789,9 @@ static void AddBox(int *pi, const int i) {
iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0,
#ifdef JAPAN
- x + cd.box[i].w/2, y+2, GetTagFontHandle(), TXT_CENTRE);
+ x + cd.box[i].w/2, y+2, GetTagFontHandle(), TXT_CENTER);
#else
- x + cd.box[i].w / 2, y + TYOFF, GetTagFontHandle(), TXT_CENTRE);
+ x + cd.box[i].w / 2, y + TYOFF, GetTagFontHandle(), TXT_CENTER);
#endif
MultiSetZPosition(iconArray[*pi], Z_INV_ITEXT);
*pi += 1;
@@ -2870,7 +2872,7 @@ static void AddBox(int *pi, const int i) {
if (cd.box[i].boxType == TOGGLE2) {
iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0, x + cd.box[i].w / 2, y + TOG2_YOFF,
- GetTagFontHandle(), TXT_CENTRE, 0);
+ GetTagFontHandle(), TXT_CENTER, 0);
} else {
iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0, x + MDTEXT_XOFF, y + MDTEXT_YOFF,
@@ -2934,7 +2936,7 @@ static void AddBox(int *pi, const int i) {
LoadStringRes(SysString(cd.box[i].ixText), TextBufferAddr(), TBUFSZ);
iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0, x + cd.box[i].w / 2, y + TOG2_YOFF,
- GetTagFontHandle(), TXT_CENTRE, 0);
+ GetTagFontHandle(), TXT_CENTER, 0);
MultiSetZPosition(iconArray[*pi], Z_INV_ITEXT);
*pi += 1;
}
@@ -2945,7 +2947,7 @@ static void AddBox(int *pi, const int i) {
LoadStringRes(LanguageDesc(displayedLanguage), TextBufferAddr(), TBUFSZ);
iconArray[*pi] = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(), 0,
- x + cd.box[i].w / 2, y + ROT_YOFF, GetTagFontHandle(), TXT_CENTRE, 0);
+ x + cd.box[i].w / 2, y + ROT_YOFF, GetTagFontHandle(), TXT_CENTER, 0);
MultiSetZPosition(iconArray[*pi], Z_INV_ITEXT);
*pi += 1;
@@ -3683,15 +3685,15 @@ extern void HideConversation(bool bHide) {
/*
* First time, position it appropriately
*/
- int left, centre;
+ int left, center;
int x, y, deltay;
// Only do it once per conversation
bMoveOnUnHide = false;
- // Current centre of the window
+ // Current center of the window
left = MultiLeftmost(RectObject);
- centre = (MultiRightmost(RectObject) + left) / 2;
+ center = (MultiRightmost(RectObject) + left) / 2;
// Get the x-offset for the conversation window
if (thisConvActor) {
@@ -3731,12 +3733,12 @@ extern void HideConversation(bool bHide) {
// Move it all
for (i = 0; objArray[i] && i < MAX_WCOMP; i++) {
- MultiMoveRelXY(objArray[i], x - centre, deltay);
+ MultiMoveRelXY(objArray[i], x - center, deltay);
}
for (i = 0; iconArray[i] && i < MAX_ICONS; i++) {
- MultiMoveRelXY(iconArray[i], x - centre, deltay);
+ MultiMoveRelXY(iconArray[i], x - center, deltay);
}
- InvD[INV_CONV].inventoryX += x - centre;
+ InvD[INV_CONV].inventoryX += x - center;
/*
* Now positioned as worked out
diff --git a/engines/tinsel/dialogs.h b/engines/tinsel/dialogs.h
index a256ed73e8..f81a59a0b7 100644
--- a/engines/tinsel/dialogs.h
+++ b/engines/tinsel/dialogs.h
@@ -32,7 +32,7 @@
#include "tinsel/events.h" // for PLR_EVENT, PLR_EVENT
namespace Common {
- class Serializer;
+class Serializer;
}
namespace Tinsel {
diff --git a/engines/tinsel/drives.cpp b/engines/tinsel/drives.cpp
index ab606f3159..d252e45cf5 100644
--- a/engines/tinsel/drives.cpp
+++ b/engines/tinsel/drives.cpp
@@ -24,9 +24,7 @@
* CD/drive handling functions
*/
-#include "common/config-manager.h"
-#include "common/substream.h"
-#include "gui/message.h"
+#include "common/textconsole.h"
#include "tinsel/drives.h"
#include "tinsel/scene.h"
#include "tinsel/tinsel.h"
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index a82285b12f..99a8b9ff14 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -37,7 +37,7 @@ namespace Tinsel {
/** structure used by the "FadeProcess" process */
struct FADE {
- const long *pColourMultTable; // list of fixed point colour multipliers - terminated with negative entry
+ const long *pColorMultTable; // list of fixed point color multipliers - terminated with negative entry
PALQ *pPalQ; // palette queue entry to fade
};
@@ -46,42 +46,42 @@ struct FADE {
//const long fadein[] = {0, 0x1000, 0x3000, 0x5000, 0x7000, 0x9000, 0xb000, 0xd000, 0x10000L, -1};
/**
- * Scale 'colour' by the fixed point colour multiplier 'colourMult'
- * @param colour Colour to scale
- * @param colourMult Fixed point multiplier
+ * Scale 'color' by the fixed point color multiplier 'colorMult'
+ * @param color Color to scale
+ * @param colorMult Fixed point multiplier
*/
-static COLORREF ScaleColour(COLORREF colour, uint32 colourMult) {
+static COLORREF ScaleColor(COLORREF color, uint32 colorMult) {
// apply multiplier to RGB components
- uint32 red = ((TINSEL_GetRValue(colour) * colourMult) << 8) >> 24;
- uint32 green = ((TINSEL_GetGValue(colour) * colourMult) << 8) >> 24;
- uint32 blue = ((TINSEL_GetBValue(colour) * colourMult) << 8) >> 24;
+ uint32 red = ((TINSEL_GetRValue(color) * colorMult) << 8) >> 24;
+ uint32 green = ((TINSEL_GetGValue(color) * colorMult) << 8) >> 24;
+ uint32 blue = ((TINSEL_GetBValue(color) * colorMult) << 8) >> 24;
- // return new colour
+ // return new color
return TINSEL_RGB(red, green, blue);
}
/**
- * Applies the fixed point multiplier 'mult' to all colours in
- * 'pOrig' to produce 'pNew'. Each colour in the palette will be
+ * Applies the fixed point multiplier 'mult' to all colors in
+ * 'pOrig' to produce 'pNew'. Each color in the palette will be
* multiplied by 'mult'.
* @param pNew Pointer to new palette
* @param pOrig Pointer to original palette
- * @param numColours Number of colours in the above palettes
+ * @param numColors Number of colors in the above palettes
* @param mult Fixed point multiplier
*/
-static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColours, uint32 mult) {
- for (int i = 0; i < numColours; i++, pNew++, pOrig++) {
+static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColors, uint32 mult) {
+ for (int i = 0; i < numColors; i++, pNew++, pOrig++) {
if (!TinselV2)
// apply multiplier to RGB components
- *pNew = ScaleColour(*pOrig, mult);
- else if (i == (TalkColour() - 1)) {
- *pNew = GetTalkColourRef();
- *pNew = ScaleColour(*pNew, mult);
- } else if (SysVar(SV_TAGCOLOUR) && i == (SysVar(SV_TAGCOLOUR) - 1)) {
+ *pNew = ScaleColor(*pOrig, mult);
+ else if (i == (TalkColor() - 1)) {
+ *pNew = GetTalkColorRef();
+ *pNew = ScaleColor(*pNew, mult);
+ } else if (SysVar(SV_TAGCOLOR) && i == (SysVar(SV_TAGCOLOR) - 1)) {
*pNew = GetTagColorRef();
- *pNew = ScaleColour(*pNew, mult);
+ *pNew = ScaleColor(*pNew, mult);
} else {
- *pNew = ScaleColour(*pOrig, mult);
+ *pNew = ScaleColor(*pOrig, mult);
}
}
}
@@ -94,8 +94,8 @@ static void FadePalette(COLORREF *pNew, COLORREF *pOrig, int numColours, uint32
static void FadeProcess(CORO_PARAM, const void *param) {
// COROUTINE
CORO_BEGIN_CONTEXT;
- COLORREF fadeRGB[MAX_COLOURS]; // local copy of palette
- const long *pColMult; // pointer to colour multiplier table
+ COLORREF fadeRGB[MAX_COLORS]; // local copy of palette
+ const long *pColMult; // pointer to color multiplier table
PALETTE *pPalette; // pointer to palette
CORO_END_CONTEXT(_ctx);
@@ -111,19 +111,19 @@ static void FadeProcess(CORO_PARAM, const void *param) {
// get pointer to palette - reduce pointer indirection a bit
_ctx->pPalette = (PALETTE *)LockMem(pFade->pPalQ->hPal);
- for (_ctx->pColMult = pFade->pColourMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) {
+ for (_ctx->pColMult = pFade->pColorMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) {
// go through all multipliers in table - until a negative entry
// fade palette using next multiplier
if (TinselV2)
FadePalette(_ctx->fadeRGB, pFade->pPalQ->palRGB,
- pFade->pPalQ->numColours, (uint32) *_ctx->pColMult);
+ pFade->pPalQ->numColors, (uint32) *_ctx->pColMult);
else
FadePalette(_ctx->fadeRGB, _ctx->pPalette->palRGB,
- FROM_LE_32(_ctx->pPalette->numColours), (uint32) *_ctx->pColMult);
+ FROM_LE_32(_ctx->pPalette->numColors), (uint32) *_ctx->pColMult);
// send new palette to video DAC
- UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColours), _ctx->fadeRGB);
+ UpdateDACqueue(pFade->pPalQ->posInDAC, FROM_LE_32(_ctx->pPalette->numColors), _ctx->fadeRGB);
// allow time for video DAC to be updated
CORO_SLEEP(1);
@@ -139,7 +139,7 @@ static void FadeProcess(CORO_PARAM, const void *param) {
/**
* Generic palette fader/unfader. Creates a 'FadeProcess' process
* for each palette that is to fade.
- * @param multTable Fixed point colour multiplier table
+ * @param multTable Fixed point color multiplier table
* @param noFadeTable List of palettes not to fade
*/
static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) {
@@ -175,7 +175,7 @@ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) {
FADE fade;
// fill in FADE struct
- fade.pColourMultTable = multTable;
+ fade.pColorMultTable = multTable;
fade.pPalQ = pPal;
// create a fader process for this palette
@@ -210,7 +210,7 @@ void FadeOutFast(SCNHANDLE noFadeTable[]) {
}
/**
- * Fades a list of palettes from black to their current colours.
+ * Fades a list of palettes from black to their current colors.
* 'noFadeTable' is a NULL terminated list of palettes not to fade.
*/
void FadeInMedium(SCNHANDLE noFadeTable[]) {
@@ -223,7 +223,7 @@ void FadeInMedium(SCNHANDLE noFadeTable[]) {
}
/**
- * Fades a list of palettes from black to their current colours.
+ * Fades a list of palettes from black to their current colors.
* @param noFadeTable A NULL terminated list of palettes not to fade.
*/
void FadeInFast(SCNHANDLE noFadeTable[]) {
@@ -234,10 +234,10 @@ void FadeInFast(SCNHANDLE noFadeTable[]) {
Fader(fadein, noFadeTable);
}
-void PokeInTagColour() {
- if (SysVar(SV_TAGCOLOUR)) {
+void PokeInTagColor() {
+ if (SysVar(SV_TAGCOLOR)) {
const COLORREF c = GetActorRGB(-1);
- UpdateDACqueue(SysVar(SV_TAGCOLOUR), c);
+ UpdateDACqueue(SysVar(SV_TAGCOLOR), c);
}
}
diff --git a/engines/tinsel/faders.h b/engines/tinsel/faders.h
index e77bff2661..b30a26d893 100644
--- a/engines/tinsel/faders.h
+++ b/engines/tinsel/faders.h
@@ -50,7 +50,7 @@ void FadeOutMedium(SCNHANDLE noFadeTable[]);
void FadeOutFast(SCNHANDLE noFadeTable[]);
void FadeInMedium(SCNHANDLE noFadeTable[]);
void FadeInFast(SCNHANDLE noFadeTable[]);
-void PokeInTagColour();
+void PokeInTagColor();
} // End of namespace Tinsel
diff --git a/engines/tinsel/font.cpp b/engines/tinsel/font.cpp
index 4c76d12400..f57a6d5d54 100644
--- a/engines/tinsel/font.cpp
+++ b/engines/tinsel/font.cpp
@@ -118,10 +118,10 @@ void FettleFontPal(SCNHANDLE fontPal) {
else
pImg->hImgPal = 0;
- if (TinselV2 && SysVar(SV_TAGCOLOUR)) {
+ if (TinselV2 && SysVar(SV_TAGCOLOR)) {
const COLORREF c = GetActorRGB(-1);
SetTagColorRef(c);
- UpdateDACqueue(SysVar(SV_TAGCOLOUR), c);
+ UpdateDACqueue(SysVar(SV_TAGCOLOR), c);
}
}
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index aefc6e6144..bdcd3207f9 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -32,6 +32,8 @@
#include "tinsel/tinsel.h"
#include "tinsel/scn.h"
+#include "common/textconsole.h"
+
namespace Tinsel {
//----------------- LOCAL DEFINES --------------------
@@ -41,7 +43,7 @@ namespace Tinsel {
#define CHAR_WIDTH 4
#define CHAR_HEIGHT 4
-extern uint8 transPalette[MAX_COLOURS];
+extern uint8 transPalette[MAX_COLORS];
//----------------- SUPPORT FUNCTIONS ---------------------
@@ -175,14 +177,14 @@ static void t0WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
x += clipAmount;
if (repeatFlag) {
- // Repeat of a given colour
- uint8 colour = (numBytes >> 8) & 0xff;
+ // Repeat of a given color
+ uint8 color = (numBytes >> 8) & 0xff;
int runLength = (numBytes & 0xff) - clipAmount;
int rptLength = MAX(MIN(runLength, pObj->width - rightClip - x), 0);
if (yClip == 0) {
- if (colour != 0)
- memset(tempDest, colour, rptLength);
+ if (color != 0)
+ memset(tempDest, color, rptLength);
tempDest += rptLength;
}
@@ -470,18 +472,18 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
x+= clipAmount;
int runLength = numBytes - clipAmount;
- uint8 colour = *srcP++;
+ uint8 color = *srcP++;
- if ((yClip == 0) && (runLength > 0) && (colour != 0)) {
+ if ((yClip == 0) && (runLength > 0) && (color != 0)) {
runLength = MIN(runLength, pObj->width - rightClip - x);
if (runLength > 0) {
// Non-transparent run length
- colour += pObj->constant;
+ color += pObj->constant;
if (horizFlipped)
- Common::set_to(tempP - runLength + 1, tempP + 1, colour);
+ Common::set_to(tempP - runLength + 1, tempP + 1, color);
else
- Common::set_to(tempP, tempP + runLength, colour);
+ Common::set_to(tempP, tempP + runLength, color);
}
}
@@ -521,7 +523,7 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply
}
/**
- * Fill the destination area with a constant colour
+ * Fill the destination area with a constant color
*/
static void WrtConst(DRAWOBJECT *pObj, uint8 *destP, bool applyClipping) {
if (applyClipping) {
@@ -595,11 +597,11 @@ static void WrtAll(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool applyClippi
*/
static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
bool applyClipping, bool horizFlipped, int packingType) {
- uint8 numColours = 0;
- uint8 *colourTable = NULL;
+ uint8 numColors = 0;
+ uint8 *colorTable = NULL;
int topClip = 0;
int xOffset = 0;
- int numBytes, colour;
+ int numBytes, color;
int v;
if (_vm->getLanguage() == Common::RU_RUS) {
@@ -625,10 +627,10 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
}
if (packingType == 3) {
- // Variable colours
- numColours = *srcP++;
- colourTable = srcP;
- srcP += numColours;
+ // Variable colors
+ numColors = *srcP++;
+ colorTable = srcP;
+ srcP += numColors;
}
for (int y = 0; y < pObj->height; ++y) {
@@ -646,7 +648,7 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
int x = 0;
while (x < pObj->width) {
- // Get next run size and colour to use
+ // Get next run size and color to use
for (;;) {
if (xOffset > 0) {
x += xOffset;
@@ -663,9 +665,9 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
v = *srcP++;
numBytes = v & 0xf; // No. bytes 1-15
if (packingType == 3)
- colour = colourTable[v >> 4];
+ color = colorTable[v >> 4];
else
- colour = pObj->baseCol + (v >> 4);
+ color = pObj->baseCol + (v >> 4);
if (numBytes != 0)
break;
@@ -693,7 +695,7 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
while (numBytes-- > 0) {
if ((topClip == 0) && (x < (pObj->width - rightClip))) {
- *tempP = colour;
+ *tempP = color;
if (horizFlipped) --tempP; else ++tempP;
}
++x;
@@ -830,7 +832,7 @@ void DrawObject(DRAWOBJECT *pObj) {
int packType = pObj->flags >> 14;
if (packType == 0) {
- // No colour packing
+ // No color packing
switch (typeId) {
case 0x01:
case 0x11:
@@ -865,7 +867,7 @@ void DrawObject(DRAWOBJECT *pObj) {
} else {
// 1 = 16 from 240
// 2 = 16 from 224
- // 3 = variable colour
+ // 3 = variable color
if (packType == 1) pObj->baseCol = 0xF0;
else if (packType == 2) pObj->baseCol = 0xE0;
diff --git a/engines/tinsel/graphics.h b/engines/tinsel/graphics.h
index 8b8bb6488d..de16082441 100644
--- a/engines/tinsel/graphics.h
+++ b/engines/tinsel/graphics.h
@@ -43,7 +43,7 @@ struct DRAWOBJECT {
int transOffset; // transparent character offset
int flags; // object flags - see above for list
PALQ *pPal; // objects palette Q position
- int constant; // which colour in palette for monochrome objects
+ int constant; // which color in palette for monochrome objects
int width; // width of object
int height; // height of object
SCNHANDLE hBits; // image bitmap handle
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp
index f2db42bede..6f5f92c969 100644
--- a/engines/tinsel/handle.cpp
+++ b/engines/tinsel/handle.cpp
@@ -27,6 +27,7 @@
#define BODGE
#include "common/file.h"
+#include "common/textconsole.h"
#include "tinsel/drives.h"
#include "tinsel/dw.h"
diff --git a/engines/tinsel/mareels.cpp b/engines/tinsel/mareels.cpp
index cf28749e76..5d9672972a 100644
--- a/engines/tinsel/mareels.cpp
+++ b/engines/tinsel/mareels.cpp
@@ -28,6 +28,7 @@
#include "tinsel/pcode.h" // For D_UP, D_DOWN
#include "tinsel/rince.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
diff --git a/engines/tinsel/move.cpp b/engines/tinsel/move.cpp
index 5b9e650689..5fc555f9b0 100644
--- a/engines/tinsel/move.cpp
+++ b/engines/tinsel/move.cpp
@@ -584,7 +584,7 @@ static void SetMoverUltDest(PMOVER pActor, int x, int y) {
* If in a neighbouring path to the final destination, if the target path
* is a follow nodes path, head for the end node, otherwise head straight
* for the target.
- * Otherwise, head towards the pseudo-centre or end node of the first
+ * Otherwise, head towards the pseudo-center or end node of the first
* en-route path.
*/
static void SetMoverIntDest(PMOVER pMover, int x, int y) {
@@ -636,7 +636,7 @@ static void SetMoverIntDest(PMOVER pMover, int x, int y) {
} else if (hIpath != NOPOLY) {
/* Head for an en-route path */
if (PolySubtype(hIpath) != NODE) {
- /* En-route path is normal - head for pseudo centre. */
+ /* En-route path is normal - head for pseudo center. */
if (CanGetThere(pMover, x, y) == GT_OK) {
pMover->ItargetX = x;
pMover->ItargetY = y;
@@ -644,8 +644,8 @@ static void SetMoverIntDest(PMOVER pMover, int x, int y) {
// make damn sure that Itarget is in hIpath
pMover->hIpath = InPolygon(x, y, PATH);
} else {
- pMover->ItargetX = PolyCentreX(hIpath);
- pMover->ItargetY = PolyCentreY(hIpath);
+ pMover->ItargetX = PolyCenterX(hIpath);
+ pMover->ItargetY = PolyCenterY(hIpath);
if (TinselV2)
// make damn sure that Itarget is in hIpath
pMover->hIpath = InPolygon(pMover->ItargetX, pMover->ItargetY, PATH);
@@ -943,12 +943,12 @@ static void SetNextDest(PMOVER pMover) {
assert(hPath == pMover->hIpath);
if (pMover->InDifficulty == NO_PROB) {
- x = PolyCentreX(hPath);
- y = PolyCentreY(hPath);
+ x = PolyCenterX(hPath);
+ y = PolyCenterY(hPath);
SetMoverDest(pMover, x, y);
- pMover->InDifficulty = TRY_CENTRE;
+ pMover->InDifficulty = TRY_CENTER;
pMover->over = false;
- } else if (pMover->InDifficulty == TRY_CENTRE) {
+ } else if (pMover->InDifficulty == TRY_CENTER) {
NearestCorner(&x, &y, pMover->hCpath, pMover->hIpath);
SetMoverDest(pMover, x, y);
pMover->InDifficulty = TRY_CORNER;
@@ -986,7 +986,7 @@ static void SetNextDest(PMOVER pMover) {
!IsAdjacentPath(pMover->hCpath, pMover->hIpath)) {
/*----------------------------------------------------------
If just entering a follow nodes polygon, go to first node.|
- Else if just going to pass through, go to pseudo-centre. |
+ Else if just going to pass through, go to pseudo-center. |
----------------------------------------------------------*/
if (PolySubtype(hPath) == NODE && pMover->hFnpath != hPath && pMover->npstatus != LEAVING) {
int node = NearestEndNode(hPath, x, y);
@@ -995,7 +995,7 @@ static void SetNextDest(PMOVER pMover) {
pMover->over = true;
} else if (!IsInPolygon(pMover->ItargetX, pMover->ItargetY, hPath) &&
!IsInPolygon(pMover->ItargetX, pMover->ItargetY, pMover->hCpath)) {
- SetMoverDest(pMover, PolyCentreX(hPath), PolyCentreY(hPath));
+ SetMoverDest(pMover, PolyCenterX(hPath), PolyCenterY(hPath));
pMover->over = true;
} else {
SetMoverDest(pMover, pMover->ItargetX, pMover->ItargetY);
@@ -1258,8 +1258,8 @@ static void SetOffWithinNodePath(PMOVER pMover, HPOLYGON StartPath, HPOLYGON Des
endnode = NearestEndNode(StartPath, targetX, targetY);
} else {
if (PolySubtype(hIpath) != NODE) {
- x = PolyCentreX(hIpath);
- y = PolyCentreY(hIpath);
+ x = PolyCenterX(hIpath);
+ y = PolyCenterY(hIpath);
endnode = NearestEndNode(StartPath, x, y);
} else {
endnode = NearEndNode(StartPath, hIpath);
@@ -1278,7 +1278,7 @@ static void SetOffWithinNodePath(PMOVER pMover, HPOLYGON StartPath, HPOLYGON Des
{
// could go for its end node if it's an NPATH
// but we probably will when we hit it anyway!
- SetMoverDest(pMover, PolyCentreX(hIpath), PolyCentreY(hIpath));
+ SetMoverDest(pMover, PolyCenterX(hIpath), PolyCenterY(hIpath));
}
}
} else
@@ -1500,7 +1500,7 @@ static void EnteringNewPath(PMOVER pMover, HPOLYGON hPath, int x, int y) {
assert(hIpath != NOPOLY); // No path on the way
if (PolySubtype(hIpath) != NODE) {
- lastnode = NearestEndNode(hPath, PolyCentreX(hIpath), PolyCentreY(hIpath));
+ lastnode = NearestEndNode(hPath, PolyCenterX(hIpath), PolyCenterY(hIpath));
} else {
lastnode = NearEndNode(hPath, hIpath);
}
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index bf31cdfa25..ad02a614a5 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -32,6 +32,8 @@
#include "tinsel/text.h"
#include "tinsel/tinsel.h"
+#include "common/textconsole.h"
+
#define OID_EFFECTS 0x2000 // generic special effects object id
namespace Tinsel {
@@ -482,11 +484,11 @@ void AnimateObject(OBJECT *pAniObj, SCNHANDLE hNewImg) {
* Creates a rectangle object of the given dimensions and returns
* a pointer to the object.
* @param hPal Palette for the rectangle object
- * @param colour Which colour offset from the above palette
+ * @param color Which color offset from the above palette
* @param width Width of rectangle
* @param height Height of rectangle
*/
-OBJECT *RectangleObject(SCNHANDLE hPal, int colour, int width, int height) {
+OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) {
// template for initialising the rectangle object
static const OBJ_INIT rectObj = {0, DMA_CONST, OID_EFFECTS, 0, 0, 0};
PALQ *pPalQ; // palette queue pointer
@@ -503,8 +505,8 @@ OBJECT *RectangleObject(SCNHANDLE hPal, int colour, int width, int height) {
// assign palette to object
pRect->pPal = pPalQ;
- // set colour in the palette
- pRect->constant = colour;
+ // set color in the palette
+ pRect->constant = color;
// set rectangle width
pRect->width = width;
diff --git a/engines/tinsel/object.h b/engines/tinsel/object.h
index a000dee72c..9f10c06cd2 100644
--- a/engines/tinsel/object.h
+++ b/engines/tinsel/object.h
@@ -87,7 +87,7 @@ struct OBJECT {
Common::Rect rcPrev; ///< previous screen coordinates of object bounding rectangle
int flags; ///< object flags - see above for list
PALQ *pPal; ///< objects palette Q position
- int constant; ///< which colour in palette for monochrome objects
+ int constant; ///< which color in palette for monochrome objects
int width; ///< width of object
int height; ///< height of object
SCNHANDLE hBits; ///< image bitmap handle
@@ -184,7 +184,7 @@ void HideObject( // Hides a object by giving it a "NullImage" image pointer
OBJECT *RectangleObject( // create a rectangle object of the given dimensions
SCNHANDLE hPal, // palette for the rectangle object
- int colour, // which colour offset from the above palette
+ int color, // which color offset from the above palette
int width, // width of rectangle
int height); // height of rectangle
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index a0ceec54eb..0877337603 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -32,6 +32,8 @@
#include "tinsel/tinsel.h"
#include "common/system.h"
+#include "common/textconsole.h"
+#include "graphics/palette.h"
namespace Tinsel {
@@ -41,12 +43,12 @@ namespace Tinsel {
struct VIDEO_DAC_Q {
union {
SCNHANDLE hRGBarray; ///< handle of palette or
- COLORREF *pRGBarray; ///< list of palette colours
+ COLORREF *pRGBarray; ///< list of palette colors
COLORREF singleRGB;
} pal;
bool bHandle; ///< when set - use handle of palette
int destDACindex; ///< start index of palette in video DAC
- int numColours; ///< number of colours in "hRGBarray"
+ int numColors; ///< number of colors in "hRGBarray"
};
@@ -67,13 +69,13 @@ static VIDEO_DAC_Q vidDACdata[VDACQLENGTH];
/** video DAC transfer Q head pointer */
static VIDEO_DAC_Q *pDAChead;
-/** colour index of the 4 colours used for the translucent palette */
+/** color index of the 4 colors used for the translucent palette */
#define COL_HILIGHT TBLUE1
/** the translucent palette lookup table */
-uint8 transPalette[MAX_COLOURS]; // used in graphics.cpp
+uint8 transPalette[MAX_COLORS]; // used in graphics.cpp
-uint8 ghostPalette[MAX_COLOURS];
+uint8 ghostPalette[MAX_COLORS];
static int translucentIndex = 228;
@@ -111,7 +113,7 @@ void psxPaletteMapper(PALQ *originalPal, uint8 *psxClut, byte *mapperTable) {
}
// Check for correspondent color
- for (uint i = 0; (i < FROM_LE_32(pal->numColours)) && !colorFound; i++) {
+ for (uint i = 0; (i < FROM_LE_32(pal->numColors)) && !colorFound; i++) {
// get R G B values in the same way as psx format converters
uint16 psxEquivalent = TINSEL_PSX_RGB(TINSEL_GetRValue(pal->palRGB[i]) >> 3, TINSEL_GetGValue(pal->palRGB[i]) >> 3, TINSEL_GetBValue(pal->palRGB[i]) >> 3);
@@ -138,15 +140,15 @@ void PalettesToVideoDAC() {
// while Q is not empty
while (pDAChead != pDACtail) {
const PALETTE *pPalette; // pointer to hardware palette
- const COLORREF *pColours; // pointer to list of RGB triples
+ const COLORREF *pColors; // pointer to list of RGB triples
#ifdef DEBUG
// make sure palette does not overlap
- assert(pDACtail->destDACindex + pDACtail->numColours <= MAX_COLOURS);
+ assert(pDACtail->destDACindex + pDACtail->numColors <= MAX_COLORS);
#else
// make sure palette does not overlap
- if (pDACtail->destDACindex + pDACtail->numColours > MAX_COLOURS)
- pDACtail->numColours = MAX_COLOURS - pDACtail->destDACindex;
+ if (pDACtail->destDACindex + pDACtail->numColors > MAX_COLORS)
+ pDACtail->numColors = MAX_COLORS - pDACtail->destDACindex;
#endif
if (pDACtail->bHandle) {
@@ -156,23 +158,23 @@ void PalettesToVideoDAC() {
pPalette = (const PALETTE *)LockMem(pDACtail->pal.hRGBarray);
// get RGB pointer
- pColours = pPalette->palRGB;
- } else if (pDACtail->numColours == 1) {
+ pColors = pPalette->palRGB;
+ } else if (pDACtail->numColors == 1) {
// we are using a single color palette
- pColours = &pDACtail->pal.singleRGB;
+ pColors = &pDACtail->pal.singleRGB;
} else {
// we are using a palette pointer
- pColours = pDACtail->pal.pRGBarray;
+ pColors = pDACtail->pal.pRGBarray;
}
- for (int i = 0; i < pDACtail->numColours; ++i) {
- pal[i * 3 + 0] = TINSEL_GetRValue(pColours[i]);
- pal[i * 3 + 1] = TINSEL_GetGValue(pColours[i]);
- pal[i * 3 + 2] = TINSEL_GetBValue(pColours[i]);
+ for (int i = 0; i < pDACtail->numColors; ++i) {
+ pal[i * 3 + 0] = TINSEL_GetRValue(pColors[i]);
+ pal[i * 3 + 1] = TINSEL_GetGValue(pColors[i]);
+ pal[i * 3 + 2] = TINSEL_GetBValue(pColors[i]);
}
// update the system palette
- g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColours);
+ g_system->getPaletteManager()->setPalette(pal, pDACtail->destDACindex, pDACtail->numColors);
// update tail pointer
pDACtail++;
@@ -216,15 +218,15 @@ void PaletteStats() {
/**
* Places a palette in the video DAC queue.
* @param posInDAC Position in video DAC
- * @param numColours Number of colours in palette
+ * @param numColors Number of colors in palette
* @param hPalette Handle to palette
*/
-void UpdateDACqueueHandle(int posInDAC, int numColours, SCNHANDLE hPalette) {
+void UpdateDACqueueHandle(int posInDAC, int numColors, SCNHANDLE hPalette) {
// check Q overflow
assert(pDAChead < vidDACdata + VDACQLENGTH);
pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC
- pDAChead->numColours = numColours; // set number of colours
+ pDAChead->numColors = numColors; // set number of colors
pDAChead->pal.hRGBarray = hPalette; // set handle of palette
pDAChead->bHandle = true; // we are using a palette handle
@@ -240,19 +242,19 @@ void UpdateDACqueueHandle(int posInDAC, int numColours, SCNHANDLE hPalette) {
/**
* Places a palette in the video DAC queue.
* @param posInDAC Position in video DAC
- * @param numColours Number of colours in palette
- * @param pColours List of RGB triples
+ * @param numColors Number of colors in palette
+ * @param pColors List of RGB triples
*/
-void UpdateDACqueue(int posInDAC, int numColours, COLORREF *pColours) {
+void UpdateDACqueue(int posInDAC, int numColors, COLORREF *pColors) {
// check Q overflow
assert(pDAChead < vidDACdata + NUM_PALETTES);
pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC
- pDAChead->numColours = numColours; // set number of colours
- if (numColours == 1)
- pDAChead->pal.singleRGB = *pColours; // set single color of which the "palette" consists
+ pDAChead->numColors = numColors; // set number of colors
+ if (numColors == 1)
+ pDAChead->pal.singleRGB = *pColors; // set single color of which the "palette" consists
else
- pDAChead->pal.pRGBarray = pColours; // set addr of palette
+ pDAChead->pal.pRGBarray = pColors; // set addr of palette
pDAChead->bHandle = false; // we are not using a palette handle
// update head pointer
@@ -275,7 +277,7 @@ void UpdateDACqueue(int posInDAC, COLORREF color) {
assert(pDAChead < vidDACdata + NUM_PALETTES);
pDAChead->destDACindex = posInDAC & ~PALETTE_MOVED; // set index in video DAC
- pDAChead->numColours = 1; // set number of colours
+ pDAChead->numColors = 1; // set number of colors
pDAChead->pal.singleRGB = color; // set single color of which the "palette" consists
pDAChead->bHandle = false; // we are not using a palette handle
@@ -294,7 +296,7 @@ void UpdateDACqueue(int posInDAC, COLORREF color) {
*/
PALQ *AllocPalette(SCNHANDLE hNewPal) {
PALQ *pPrev, *p; // walks palAllocData
- int iDAC; // colour index in video DAC
+ int iDAC; // color index in video DAC
PALQ *pNxtPal; // next PALQ struct in palette allocator
PALETTE *pNewPal;
@@ -311,7 +313,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
}
// search all structs in palette allocator - find a free slot
- iDAC = FGND_DAC_INDEX; // init DAC index to first available foreground colour
+ iDAC = FGND_DAC_INDEX; // init DAC index to first available foreground color
for (p = palAllocData; p < palAllocData + NUM_PALETTES; p++) {
if (p->hPal == 0) {
@@ -319,11 +321,11 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
p->objCount = 1; // init number of objects using palette
p->posInDAC = iDAC; // set palettes start pos in video DAC
p->hPal = hNewPal; // set hardware palette data
- p->numColours = FROM_LE_32(pNewPal->numColours); // set number of colours in palette
+ p->numColors = FROM_LE_32(pNewPal->numColors); // set number of colors in palette
if (TinselV2)
- // Copy all the colours
- memcpy(p->palRGB, pNewPal->palRGB, p->numColours * sizeof(COLORREF));
+ // Copy all the colors
+ memcpy(p->palRGB, pNewPal->palRGB, p->numColors * sizeof(COLORREF));
#ifdef DEBUG
// one more palette in use
@@ -333,30 +335,30 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
// Q the change to the video DAC
if (TinselV2)
- UpdateDACqueue(p->posInDAC, p->numColours, p->palRGB);
+ UpdateDACqueue(p->posInDAC, p->numColors, p->palRGB);
else
- UpdateDACqueueHandle(p->posInDAC, p->numColours, p->hPal);
+ UpdateDACqueueHandle(p->posInDAC, p->numColors, p->hPal);
// move all palettes after this one down (if necessary)
for (pPrev = p, pNxtPal = pPrev + 1; pNxtPal < palAllocData + NUM_PALETTES; pNxtPal++) {
if (pNxtPal->hPal != 0) {
// palette slot is in use
- if (pNxtPal->posInDAC >= pPrev->posInDAC + pPrev->numColours)
+ if (pNxtPal->posInDAC >= pPrev->posInDAC + pPrev->numColors)
// no need to move palettes down
break;
// move palette down - indicate change
pNxtPal->posInDAC = (pPrev->posInDAC
- + pPrev->numColours) | PALETTE_MOVED;
+ + pPrev->numColors) | PALETTE_MOVED;
// Q the palette change in position to the video DAC
if (!TinselV2)
UpdateDACqueueHandle(pNxtPal->posInDAC,
- pNxtPal->numColours,
+ pNxtPal->numColors,
pNxtPal->hPal);
else if (!pNxtPal->bFading)
UpdateDACqueue(pNxtPal->posInDAC,
- pNxtPal->numColours,
+ pNxtPal->numColors,
pNxtPal->palRGB);
// update previous palette to current palette
@@ -369,7 +371,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
}
// set new DAC index
- iDAC = p->posInDAC + p->numColours;
+ iDAC = p->posInDAC + p->numColors;
}
// no free palettes
@@ -431,43 +433,43 @@ void SwapPalette(PALQ *pPalQ, SCNHANDLE hNewPal) {
// validate palette Q pointer
assert(pPalQ >= palAllocData && pPalQ <= palAllocData + NUM_PALETTES - 1);
- if (pPalQ->numColours >= (int)FROM_LE_32(pNewPal->numColours)) {
+ if (pPalQ->numColors >= (int)FROM_LE_32(pNewPal->numColors)) {
// new palette will fit the slot
// install new palette
pPalQ->hPal = hNewPal;
if (TinselV2) {
- pPalQ->numColours = FROM_LE_32(pNewPal->numColours);
+ pPalQ->numColors = FROM_LE_32(pNewPal->numColors);
- // Copy all the colours
- memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColours) * sizeof(COLORREF));
+ // Copy all the colors
+ memcpy(pPalQ->palRGB, pNewPal->palRGB, FROM_LE_32(pNewPal->numColors) * sizeof(COLORREF));
if (!pPalQ->bFading)
// Q the change to the video DAC
- UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColours), pPalQ->palRGB);
+ UpdateDACqueue(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), pPalQ->palRGB);
} else {
// Q the change to the video DAC
- UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColours), hNewPal);
+ UpdateDACqueueHandle(pPalQ->posInDAC, FROM_LE_32(pNewPal->numColors), hNewPal);
}
} else {
- // # colours are different - will have to update all following palette entries
+ // # colors are different - will have to update all following palette entries
assert(!TinselV2); // Fatal error for Tinsel 2
PALQ *pNxtPalQ; // next palette queue position
for (pNxtPalQ = pPalQ + 1; pNxtPalQ < palAllocData + NUM_PALETTES; pNxtPalQ++) {
- if (pNxtPalQ->posInDAC >= pPalQ->posInDAC + pPalQ->numColours)
+ if (pNxtPalQ->posInDAC >= pPalQ->posInDAC + pPalQ->numColors)
// no need to move palettes down
break;
// move palette down
pNxtPalQ->posInDAC = (pPalQ->posInDAC
- + pPalQ->numColours) | PALETTE_MOVED;
+ + pPalQ->numColors) | PALETTE_MOVED;
// Q the palette change in position to the video DAC
UpdateDACqueueHandle(pNxtPalQ->posInDAC,
- pNxtPalQ->numColours,
+ pNxtPalQ->numColors,
pNxtPalQ->hPal);
// update previous palette to current palette
@@ -501,12 +503,12 @@ PALQ *GetNextPalette(PALQ *pStrtPal) {
}
/**
- * Sets the current background colour.
- * @param colour Colour to set the background to
+ * Sets the current background color.
+ * @param color Color to set the background to
*/
-void SetBgndColour(COLORREF colour) {
- // update background colour struct by queuing the change to the video DAC
- UpdateDACqueue(BGND_DAC_INDEX, colour);
+void SetBgndColor(COLORREF color) {
+ // update background color struct by queuing the change to the video DAC
+ UpdateDACqueue(BGND_DAC_INDEX, color);
}
/**
@@ -544,23 +546,23 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) {
// get a pointer to the palette
PALETTE *pPal = (PALETTE *)LockMem(hPalette);
- // leave background colour alone
+ // leave background color alone
transPalette[0] = 0;
- for (uint i = 0; i < FROM_LE_32(pPal->numColours); i++) {
- // get the RGB colour model values
+ for (uint i = 0; i < FROM_LE_32(pPal->numColors); i++) {
+ // get the RGB color model values
uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]);
- // calculate the Value field of the HSV colour model
+ // calculate the Value field of the HSV color model
unsigned val = (red > green) ? red : green;
val = (val > blue) ? val : blue;
- // map the Value field to one of the 4 colours reserved for the translucent palette
+ // map the Value field to one of the 4 colors reserved for the translucent palette
val /= 63;
transPalette[i + 1] = (uint8)((val == 0) ? 0 : val +
- (TinselV2 ? TranslucentColour() : COL_HILIGHT) - 1);
+ (TinselV2 ? TranslucentColor() : COL_HILIGHT) - 1);
}
}
@@ -572,20 +574,20 @@ void CreateGhostPalette(SCNHANDLE hPalette) {
PALETTE *pPal = (PALETTE *)LockMem(hPalette);
int i;
- // leave background colour alone
+ // leave background color alone
ghostPalette[0] = 0;
- for (i = 0; i < (int)FROM_LE_32(pPal->numColours); i++) {
- // get the RGB colour model values
+ for (i = 0; i < (int)FROM_LE_32(pPal->numColors); i++) {
+ // get the RGB color model values
uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]);
- // calculate the Value field of the HSV colour model
+ // calculate the Value field of the HSV color model
unsigned val = (red > green) ? red : green;
val = (val > blue) ? val : blue;
- // map the Value field to one of the 4 colours reserved for the translucent palette
+ // map the Value field to one of the 4 colors reserved for the translucent palette
val /= 64;
assert(/*val >= 0 &&*/ val <= 3);
ghostPalette[i + 1] = (uint8)(val + SysVar(ISV_GHOST_BASE));
@@ -594,25 +596,25 @@ void CreateGhostPalette(SCNHANDLE hPalette) {
/**
- * Returns an adjusted colour RGB
- * @param colour Colour to scale
+ * Returns an adjusted color RGB
+ * @param color Color to scale
*/
-static COLORREF DimColour(COLORREF colour, int factor) {
+static COLORREF DimColor(COLORREF color, int factor) {
uint32 red, green, blue;
if (factor == 10) {
// No change
- return colour;
+ return color;
} else if (factor == 0) {
// No brightness
return 0;
} else {
// apply multiplier to RGB components
- red = TINSEL_GetRValue(colour) * factor / 10;
- green = TINSEL_GetGValue(colour) * factor / 10;
- blue = TINSEL_GetBValue(colour) * factor / 10;
+ red = TINSEL_GetRValue(color) * factor / 10;
+ green = TINSEL_GetGValue(color) * factor / 10;
+ blue = TINSEL_GetBValue(color) * factor / 10;
- // return new colour
+ // return new color
return TINSEL_RGB(red, green, blue);
}
}
@@ -620,10 +622,10 @@ static COLORREF DimColour(COLORREF colour, int factor) {
/**
* DimPartPalette
*/
-void DimPartPalette(SCNHANDLE hDimPal, int startColour, int length, int brightness) {
+void DimPartPalette(SCNHANDLE hDimPal, int startColor, int length, int brightness) {
PALQ *pPalQ;
PALETTE *pDimPal;
- int iColour;
+ int iColor;
pPalQ = FindPalette(hDimPal);
assert(pPalQ);
@@ -631,42 +633,42 @@ void DimPartPalette(SCNHANDLE hDimPal, int startColour, int length, int brightne
// get pointer to dim palette
pDimPal = (PALETTE *)LockMem(hDimPal);
- // Adjust for the fact that palettes don't contain colour 0
- startColour -= 1;
+ // Adjust for the fact that palettes don't contain color 0
+ startColor -= 1;
// Check some other things
- if (startColour + length > pPalQ->numColours)
- error("DimPartPalette(): colour overrun");
+ if (startColor + length > pPalQ->numColors)
+ error("DimPartPalette(): color overrun");
- for (iColour = startColour; iColour < startColour + length; iColour++) {
- pPalQ->palRGB[iColour] = DimColour(pDimPal->palRGB[iColour], brightness);
+ for (iColor = startColor; iColor < startColor + length; iColor++) {
+ pPalQ->palRGB[iColor] = DimColor(pDimPal->palRGB[iColor], brightness);
}
if (!pPalQ->bFading) {
// Q the change to the video DAC
- UpdateDACqueue(pPalQ->posInDAC + startColour, length, &pPalQ->palRGB[startColour]);
+ UpdateDACqueue(pPalQ->posInDAC + startColor, length, &pPalQ->palRGB[startColor]);
}
}
-int TranslucentColour() {
+int TranslucentColor() {
return translucentIndex;
}
-int HighlightColour() {
+int HighlightColor() {
UpdateDACqueue(talkIndex, (COLORREF)SysVar(SYS_HighlightRGB));
return talkIndex;
}
-int TalkColour() {
+int TalkColor() {
return TinselV2 ? talkIndex : TALKFONT_COL;
}
-void SetTalkColourRef(COLORREF colRef) {
+void SetTalkColorRef(COLORREF colRef) {
talkColRef = colRef;
}
-COLORREF GetTalkColourRef() {
+COLORREF GetTalkColorRef() {
return talkColRef;
}
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index 9743ee53aa..694eff504d 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -42,14 +42,14 @@ typedef uint32 COLORREF;
#define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
enum {
- MAX_COLOURS = 256, ///< maximum number of colours - for VGA 256
+ MAX_COLORS = 256, ///< maximum number of colors - for VGA 256
BITS_PER_PIXEL = 8, ///< number of bits per pixel for VGA 256
MAX_INTENSITY = 255, ///< the biggest value R, G or B can have
NUM_PALETTES = 32, ///< number of palettes
// Discworld has some fixed apportioned bits in the palette.
- BGND_DAC_INDEX = 0, ///< index of background colour in Video DAC
- FGND_DAC_INDEX = 1, ///< index of first foreground colour in Video DAC
+ BGND_DAC_INDEX = 0, ///< index of background color in Video DAC
+ FGND_DAC_INDEX = 1, ///< index of first foreground color in Video DAC
TBLUE1 = 228, ///< Blue used in translucent rectangles
TBLUE2 = 229, ///< Blue used in translucent rectangles
TBLUE3 = 230, ///< Blue used in translucent rectangles
@@ -57,7 +57,7 @@ enum {
TALKFONT_COL = 233
};
-// some common colours
+// some common colors
#define BLACK (TINSEL_RGB(0, 0, 0))
#define WHITE (TINSEL_RGB(MAX_INTENSITY, MAX_INTENSITY, MAX_INTENSITY))
@@ -73,8 +73,8 @@ enum {
/** hardware palette structure */
struct PALETTE {
- int32 numColours; ///< number of colours in the palette
- COLORREF palRGB[MAX_COLOURS]; ///< actual palette colours
+ int32 numColors; ///< number of colors in the palette
+ COLORREF palRGB[MAX_COLORS]; ///< actual palette colors
} PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING
@@ -85,10 +85,10 @@ struct PALQ {
SCNHANDLE hPal; ///< handle to palette data struct
int objCount; ///< number of objects using this palette
int posInDAC; ///< palette position in the video DAC
- int numColours; ///< number of colours in the palette
+ int numColors; ///< number of colors in the palette
// Discworld 2 fields
bool bFading; // Whether or not fading
- COLORREF palRGB[MAX_COLOURS]; // actual palette colours
+ COLORREF palRGB[MAX_COLORS]; // actual palette colors
};
#define PALETTE_MOVED 0x8000 // when this bit is set in the "posInDAC"
@@ -114,13 +114,13 @@ void PalettesToVideoDAC(); // Update the video DAC with palettes currently the t
void UpdateDACqueueHandle(
int posInDAC, // position in video DAC
- int numColours, // number of colours in palette
+ int numColors, // number of colors in palette
SCNHANDLE hPalette); // handle to palette
void UpdateDACqueue( // places a palette in the video DAC queue
int posInDAC, // position in video DAC
- int numColours, // number of colours in palette
- COLORREF *pColours); // list of RGB tripples
+ int numColors, // number of colors in palette
+ COLORREF *pColors); // list of RGB tripples
void UpdateDACqueue(int posInDAC, COLORREF color);
@@ -140,10 +140,10 @@ void SwapPalette( // swaps palettes at the specified palette queue position
PALQ *GetNextPalette( // returns the next palette in the queue
PALQ *pStrtPal); // queue position to start from - when NULL will start from beginning of queue
-COLORREF GetBgndColour(); // returns current background colour
+COLORREF GetBgndColor(); // returns current background color
-void SetBgndColour( // sets current background colour
- COLORREF colour); // colour to set the background to
+void SetBgndColor( // sets current background color
+ COLORREF color); // color to set the background to
void FadingPalette(PALQ *pPalQ, bool bFading);
@@ -155,22 +155,22 @@ void NoFadingPalettes(); // All fading processes have just been killed
void DimPartPalette(
SCNHANDLE hPal,
- int startColour,
+ int startColor,
int length,
int brightness); // 0 = black, 10 == 100%
-int TranslucentColour();
+int TranslucentColor();
-#define BoxColour TranslucentColour
+#define BoxColor TranslucentColor
-int HighlightColour();
+int HighlightColor();
-int TalkColour();
+int TalkColor();
-void SetTalkColourRef(COLORREF colRef);
+void SetTalkColorRef(COLORREF colRef);
-COLORREF GetTalkColourRef();
+COLORREF GetTalkColorRef();
void SetTagColorRef(COLORREF colRef);
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index ccd86d7ed7..a1cc02a832 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -36,6 +36,7 @@
#include "tinsel/tinlib.h" // Library routines
#include "tinsel/tinsel.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
diff --git a/engines/tinsel/pcode.h b/engines/tinsel/pcode.h
index f3690e9257..f31f2eb5c6 100644
--- a/engines/tinsel/pcode.h
+++ b/engines/tinsel/pcode.h
@@ -31,7 +31,7 @@
#include "tinsel/sched.h" // for PROCESS
namespace Common {
- class Serializer;
+class Serializer;
}
namespace Tinsel {
diff --git a/engines/tinsel/pdisplay.cpp b/engines/tinsel/pdisplay.cpp
index 38748b703b..5022f4757a 100644
--- a/engines/tinsel/pdisplay.cpp
+++ b/engines/tinsel/pdisplay.cpp
@@ -44,6 +44,8 @@
#include "tinsel/text.h"
#include "tinsel/tinsel.h"
+#include "common/textconsole.h"
+
namespace Tinsel {
//----------------- EXTERNAL GLOBAL DATA --------------------
@@ -59,8 +61,8 @@ extern int newestString; // The overrun counter, in STRRES.C
#define LPOSX 295 // X-co-ord of lead actor's position display
#define CPOSX 24 // X-co-ord of cursor's position display
-#define OPOSX SCRN_CENTRE_X // X-co-ord of overrun counter's display
-#define SPOSX SCRN_CENTRE_X // X-co-ord of string numbner's display
+#define OPOSX SCRN_CENTER_X // X-co-ord of overrun counter's display
+#define SPOSX SCRN_CENTER_X // X-co-ord of string numbner's display
#define POSY 0 // Y-co-ord of these position displays
@@ -158,7 +160,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) {
// New text objects
sprintf(PositionString, "%d %d", aniX + Loffset, aniY + Toffset);
_ctx->cpText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString,
- 0, CPOSX, POSY, GetTagFontHandle(), TXT_CENTRE);
+ 0, CPOSX, POSY, GetTagFontHandle(), TXT_CENTER);
if (DispPath) {
HPOLYGON hp = InPolygon(aniX + Loffset, aniY + Toffset, PATH);
if (hp == NOPOLY)
@@ -190,7 +192,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) {
sprintf(PositionString, "%d", Overrun);
_ctx->opText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString,
- 0, OPOSX, POSY, GetTagFontHandle(), TXT_CENTRE);
+ 0, OPOSX, POSY, GetTagFontHandle(), TXT_CENTER);
// update previous value
_ctx->prevOver = Overrun;
@@ -216,7 +218,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) {
// create new text object list
sprintf(PositionString, "%d %d", aniX, aniY);
_ctx->rpText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString,
- 0, LPOSX, POSY, GetTagFontHandle(), TXT_CENTRE);
+ 0, LPOSX, POSY, GetTagFontHandle(), TXT_CENTER);
// update previous position
_ctx->prevlX = aniX;
@@ -235,7 +237,7 @@ void CursorPositionProcess(CORO_PARAM, const void *) {
sprintf(PositionString, "String: %d", newestString);
_ctx->spText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), PositionString,
- 0, SPOSX, POSY+10, GetTalkFontHandle(), TXT_CENTRE);
+ 0, SPOSX, POSY+10, GetTalkFontHandle(), TXT_CENTER);
// update previous value
_ctx->prevString = newestString;
@@ -411,7 +413,7 @@ static bool ActorTag(int curX, int curY, HotSpotTag *pTag, OBJECT **ppText) {
// May have buggered cursor
EndCursorFollowed();
*ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), tagBuffer,
- 0, tagX, tagY, GetTagFontHandle(), TXT_CENTRE, 0);
+ 0, tagX, tagY, GetTagFontHandle(), TXT_CENTER, 0);
assert(*ppText);
MultiSetZPosition(*ppText, Z_TAG_TEXT);
} else
@@ -456,7 +458,7 @@ static bool ActorTag(int curX, int curY, HotSpotTag *pTag, OBJECT **ppText) {
PlayfieldGetPos(FIELD_WORLD, &tagX, &tagY);
LoadStringRes(GetActorTag(ano), TextBufferAddr(), TBUFSZ);
*ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(),
- 0, xtext - tagX, ytext - tagY, GetTagFontHandle(), TXT_CENTRE);
+ 0, xtext - tagX, ytext - tagY, GetTagFontHandle(), TXT_CENTER);
assert(*ppText); // Actor tag string produced NULL text
MultiSetZPosition(*ppText, Z_TAG_TEXT);
} else {
@@ -561,7 +563,7 @@ static bool PolyTag(HotSpotTag *pTag, OBJECT **ppText) {
*ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0, tagx - Loffset, tagy - Toffset,
- GetTagFontHandle(), TXT_CENTRE, 0);
+ GetTagFontHandle(), TXT_CENTER, 0);
} else if (TinselV2) {
// Bugger cursor
const char *tagPtr = TextBufferAddr();
@@ -570,12 +572,12 @@ static bool PolyTag(HotSpotTag *pTag, OBJECT **ppText) {
GetCursorXYNoWait(&curX, &curY, false);
*ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(),
- 0, curX, curY, GetTagFontHandle(), TXT_CENTRE, 0);
+ 0, curX, curY, GetTagFontHandle(), TXT_CENTER, 0);
} else {
// Handle displaying the tag text on-screen
*ppText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(),
0, tagx - Loffset, tagy - Toffset,
- GetTagFontHandle(), TXT_CENTRE);
+ GetTagFontHandle(), TXT_CENTER);
assert(*ppText); // Polygon tag string produced NULL text
}
diff --git a/engines/tinsel/pid.h b/engines/tinsel/pid.h
index 786ccc6327..d6f87bdf98 100644
--- a/engines/tinsel/pid.h
+++ b/engines/tinsel/pid.h
@@ -32,11 +32,11 @@ namespace Tinsel {
#define PID_DESTROY 0x8000 // process id of any process that is to be destroyed between scenes
#define PID_EFFECTS (0x0010 | PID_DESTROY) // generic special effects process id
-#define PID_FLASH (PID_EFFECTS + 1) // flash colour process
-#define PID_CYCLE (PID_EFFECTS + 2) // cycle colour range process
+#define PID_FLASH (PID_EFFECTS + 1) // flash color process
+#define PID_CYCLE (PID_EFFECTS + 2) // cycle color range process
#define PID_MORPH (PID_EFFECTS + 3) // morph process
#define PID_FADER (PID_EFFECTS + 4) // fader process
-#define PID_FADE_BGND (PID_EFFECTS + 5) // fade background colour process
+#define PID_FADE_BGND (PID_EFFECTS + 5) // fade background color process
#define PID_BACKGND (0x0020 | PID_DESTROY) // background update process id
diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp
index 1620881b01..f49dddeef4 100644
--- a/engines/tinsel/polygons.cpp
+++ b/engines/tinsel/polygons.cpp
@@ -34,6 +34,7 @@
#include "tinsel/tinsel.h"
#include "tinsel/token.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
@@ -98,10 +99,10 @@ struct POLYGON {
/*
* Internal derived data for speed and conveniance
- * set up by PseudoCentre()
+ * set up by PseudoCenter()
*/
- int pcentrex; // Pseudo-centre
- int pcentrey; //
+ int pcenterx; // Pseudo-center
+ int pcentery; //
/**
* List of adjacent polygons. For Path polygons only.
@@ -1624,34 +1625,34 @@ static PPOLYGON CommonInits(PTYPE polyType, int pno, const Poly &ptp, bool bRest
}
/**
- * Calculate a point approximating to the centre of a polygon.
+ * Calculate a point approximating to the center of a polygon.
* Not very sophisticated.
*/
-static void PseudoCentre(POLYGON *p) {
- p->pcentrex = (p->cx[0] + p->cx[1] + p->cx[2] + p->cx[3])/4;
- p->pcentrey = (p->cy[0] + p->cy[1] + p->cy[2] + p->cy[3])/4;
+static void PseudoCenter(POLYGON *p) {
+ p->pcenterx = (p->cx[0] + p->cx[1] + p->cx[2] + p->cx[3])/4;
+ p->pcentery = (p->cy[0] + p->cy[1] + p->cy[2] + p->cy[3])/4;
- if (!IsInPolygon(p->pcentrex, p->pcentrey, PolygonIndex(p))) {
+ if (!IsInPolygon(p->pcenterx, p->pcentery, PolygonIndex(p))) {
int i, top = 0, bot = 0;
for (i = p->ptop; i <= p->pbottom; i++) {
- if (IsInPolygon(p->pcentrex, i, PolygonIndex(p))) {
+ if (IsInPolygon(p->pcenterx, i, PolygonIndex(p))) {
top = i;
break;
}
}
for (i = p->pbottom; i >= p->ptop; i--) {
- if (IsInPolygon(p->pcentrex, i, PolygonIndex(p))) {
+ if (IsInPolygon(p->pcenterx, i, PolygonIndex(p))) {
bot = i;
break;
}
}
- p->pcentrex = (top+bot)/2;
+ p->pcenterx = (top+bot)/2;
}
#ifdef DEBUG
- // assert(IsInPolygon(p->pcentrex, p->pcentrey, PolygonIndex(p))); // Pseudo-centre is not in path
- if (!IsInPolygon(p->pcentrex, p->pcentrey, PolygonIndex(p))) {
- sprintf(TextBufferAddr(), "Pseudo-centre is not in path (starting (%d, %d)) - polygon reversed?",
+ // assert(IsInPolygon(p->pcenterx, p->pcentery, PolygonIndex(p))); // Pseudo-center is not in path
+ if (!IsInPolygon(p->pcenterx, p->pcentery, PolygonIndex(p))) {
+ sprintf(TextBufferAddr(), "Pseudo-center is not in path (starting (%d, %d)) - polygon reversed?",
p->cx[0], p->cy[0]);
error(TextBufferAddr());
}
@@ -1673,7 +1674,7 @@ static void InitPath(const Poly &ptp, bool NodePath, int pno, bool bRestart) {
p->subtype = NodePath ? NODE : NORMAL;
- PseudoCentre(p);
+ PseudoCenter(p);
}
@@ -1918,16 +1919,16 @@ int PolySubtype(HPOLYGON hp) {
return Polys[hp]->subtype;
}
-int PolyCentreX(HPOLYGON hp) {
+int PolyCenterX(HPOLYGON hp) {
CHECK_HP(hp, "Out of range polygon handle (27)");
- return Polys[hp]->pcentrex;
+ return Polys[hp]->pcenterx;
}
-int PolyCentreY(HPOLYGON hp) {
+int PolyCenterY(HPOLYGON hp) {
CHECK_HP(hp, "Out of range polygon handle (28)");
- return Polys[hp]->pcentrey;
+ return Polys[hp]->pcentery;
}
int PolyCornerX(HPOLYGON hp, int n) {
diff --git a/engines/tinsel/polygons.h b/engines/tinsel/polygons.h
index 4be1dabf98..cf8f9e98c2 100644
--- a/engines/tinsel/polygons.h
+++ b/engines/tinsel/polygons.h
@@ -127,8 +127,8 @@ void RestorePolygonStuff(POLY_VOLATILE *sps);
PTYPE PolyType(HPOLYGON hp); // ->type
int PolySubtype(HPOLYGON hp); // ->subtype
-int PolyCentreX(HPOLYGON hp); // ->pcentrex
-int PolyCentreY(HPOLYGON hp); // ->pcentrey
+int PolyCenterX(HPOLYGON hp); // ->pcenterx
+int PolyCenterY(HPOLYGON hp); // ->pcentery
int PolyCornerX(HPOLYGON hp, int n); // ->cx[n]
int PolyCornerY(HPOLYGON hp, int n); // ->cy[n]
PSTATE PolyPointState(HPOLYGON hp); // ->pointState
diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp
index 6ea1dd7464..38ac0a2ce6 100644
--- a/engines/tinsel/rince.cpp
+++ b/engines/tinsel/rince.cpp
@@ -47,6 +47,7 @@
#include "tinsel/tinsel.h"
#include "tinsel/token.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
@@ -60,8 +61,8 @@ static MOVER Movers[MAX_MOVERS]; // FIXME: Avoid non-const global vars
/**
* Called from ActorPalette(), normally once just after the beginning of time.
*/
-void StoreMoverPalette(PMOVER pMover, int startColour, int length) {
- pMover->startColour = startColour;
+void StoreMoverPalette(PMOVER pMover, int startColor, int length) {
+ pMover->startColor = startColor;
pMover->paletteLength = length;
}
@@ -88,7 +89,7 @@ static void CheckBrightness(PMOVER pMover) {
pMover->brightness--; // ramp down
DimPartPalette(BgPal(),
- pMover->startColour,
+ pMover->startColor,
pMover->paletteLength,
pMover->brightness);
}
@@ -107,7 +108,7 @@ void MoverBrightness(PMOVER pMover, int brightness) {
assert(BgPal());
// Do it all immediately
- DimPartPalette(BgPal(), pMover->startColour, pMover->paletteLength, brightness);
+ DimPartPalette(BgPal(), pMover->startColor, pMover->paletteLength, brightness);
// The actor is probably hidden at this point,
pMover->brightness = brightness;
@@ -924,7 +925,7 @@ void SaveMovers(SAVED_MOVER *sMoverInfo) {
if (TinselV2) {
sMoverInfo[i].bHidden = Movers[i].bHidden;
sMoverInfo[i].brightness = Movers[i].brightness;
- sMoverInfo[i].startColour = Movers[i].startColour;
+ sMoverInfo[i].startColor = Movers[i].startColor;
sMoverInfo[i].paletteLength = Movers[i].paletteLength;
}
diff --git a/engines/tinsel/rince.h b/engines/tinsel/rince.h
index 57eac00fa4..5d09a1e945 100644
--- a/engines/tinsel/rince.h
+++ b/engines/tinsel/rince.h
@@ -38,7 +38,7 @@ struct PROCESS;
enum NPS {NOT_IN, GOING_UP, GOING_DOWN, LEAVING, ENTERING};
-enum IND {NO_PROB, TRY_CENTRE, TRY_CORNER, TRY_NEXTCORNER};
+enum IND {NO_PROB, TRY_CENTER, TRY_CORNER, TRY_NEXTCORNER};
enum DIRECTION { LEFTREEL, RIGHTREEL, FORWARD, AWAY };
@@ -119,7 +119,7 @@ struct MOVER {
int32 zOverride;
bool bHidden;
int brightness; // Current brightness
- int startColour;
+ int startColor;
int paletteLength;
HPOLYGON hRpath; // Recent path
};
@@ -140,7 +140,7 @@ void MoverProcessCreate(int X, int Y, int id, PMOVER pMover);
enum AR_FUNCTION { AR_NORMAL, AR_PUSHREEL, AR_POPREEL, AR_WALKREEL };
-void StoreMoverPalette(PMOVER pMover, int startColour, int length);
+void StoreMoverPalette(PMOVER pMover, int startColor, int length);
void MoverBrightness(PMOVER pMover, int brightness);
@@ -204,7 +204,7 @@ struct SAVED_MOVER {
bool bActive;
bool bHidden;
int brightness;
- int startColour;
+ int startColor;
int paletteLength;
};
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 3182593a88..50f6d8d00b 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -36,6 +36,7 @@
#include "common/serializer.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "gui/message.h"
@@ -164,8 +165,7 @@ static bool syncSaveGameHeader(Common::Serializer &s, SaveGameHeader &hdr) {
}
static void syncSavedMover(Common::Serializer &s, SAVED_MOVER &sm) {
- SCNHANDLE *pList[3] = { (SCNHANDLE *)&sm.walkReels,
- (SCNHANDLE *)&sm.standReels, (SCNHANDLE *)&sm.talkReels };
+ int i, j;
s.syncAsUint32LE(sm.bActive);
s.syncAsSint32LE(sm.actorID);
@@ -173,17 +173,27 @@ static void syncSavedMover(Common::Serializer &s, SAVED_MOVER &sm) {
s.syncAsSint32LE(sm.objY);
s.syncAsUint32LE(sm.hLastfilm);
- for (int pIndex = 0; pIndex < 3; ++pIndex) {
- SCNHANDLE *p = pList[pIndex];
- for (int i = 0; i < TOTAL_SCALES * 4; ++i)
- s.syncAsUint32LE(*p++);
- }
+ // Sync walk reels
+ for (i = 0; i < TOTAL_SCALES; ++i)
+ for (j = 0; j < 4; ++j)
+ s.syncAsUint32LE(sm.walkReels[i][j]);
+
+ // Sync stand reels
+ for (i = 0; i < TOTAL_SCALES; ++i)
+ for (j = 0; j < 4; ++j)
+ s.syncAsUint32LE(sm.standReels[i][j]);
+
+ // Sync talk reels
+ for (i = 0; i < TOTAL_SCALES; ++i)
+ for (j = 0; j < 4; ++j)
+ s.syncAsUint32LE(sm.talkReels[i][j]);
+
if (TinselV2) {
s.syncAsByte(sm.bHidden);
s.syncAsSint32LE(sm.brightness);
- s.syncAsSint32LE(sm.startColour);
+ s.syncAsSint32LE(sm.startColor);
s.syncAsSint32LE(sm.paletteLength);
}
}
diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp
index a3fe393b79..aa359d281f 100644
--- a/engines/tinsel/savescn.cpp
+++ b/engines/tinsel/savescn.cpp
@@ -48,6 +48,8 @@
#include "tinsel/tinlib.h"
#include "tinsel/token.h"
+#include "common/textconsole.h"
+
namespace Tinsel {
//----------------- EXTERN FUNCTIONS --------------------
@@ -226,7 +228,7 @@ static void SortMAProcess(CORO_PARAM, const void *) {
}
ActorPalette(rsd->SavedMoverInfo[_ctx->i].actorID,
- rsd->SavedMoverInfo[_ctx->i].startColour, rsd->SavedMoverInfo[_ctx->i].paletteLength);
+ rsd->SavedMoverInfo[_ctx->i].startColor, rsd->SavedMoverInfo[_ctx->i].paletteLength);
if (rsd->SavedMoverInfo[_ctx->i].brightness != BOGUS_BRIGHTNESS)
ActorBrightness(rsd->SavedMoverInfo[_ctx->i].actorID, rsd->SavedMoverInfo[_ctx->i].brightness);
diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp
index 67e0ea9ffd..b82bac32cc 100644
--- a/engines/tinsel/scene.cpp
+++ b/engines/tinsel/scene.cpp
@@ -51,6 +51,7 @@
#include "tinsel/sysvar.h"
#include "tinsel/token.h"
+#include "common/textconsole.h"
namespace Tinsel {
@@ -381,7 +382,7 @@ void PrimeBackground() {
// structure for background
static const BACKGND backgnd = {
- BLACK, // sky colour
+ BLACK, // sky color
Common::Point(0, 0), // initial world pos
Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), // scroll limits
0, // no background update process
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index 427e28826f..37c04abd22 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -30,6 +30,7 @@
#include "tinsel/polygons.h"
#include "tinsel/sched.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Tinsel {
diff --git a/engines/tinsel/scn.cpp b/engines/tinsel/scn.cpp
index 17ae7c8687..20d75b6b93 100644
--- a/engines/tinsel/scn.cpp
+++ b/engines/tinsel/scn.cpp
@@ -24,9 +24,6 @@
* A (some would say very) small collection of utility functions.
*/
-#include "common/endian.h"
-#include "common/util.h"
-
#include "tinsel/dw.h"
#include "tinsel/film.h"
#include "tinsel/handle.h"
diff --git a/engines/tinsel/sound.cpp b/engines/tinsel/sound.cpp
index 1fcdb4dcf9..ec42ca5da4 100644
--- a/engines/tinsel/sound.cpp
+++ b/engines/tinsel/sound.cpp
@@ -35,9 +35,7 @@
#include "tinsel/sysvar.h"
#include "tinsel/background.h"
-#include "common/config-manager.h"
#include "common/endian.h"
-#include "common/file.h"
#include "common/memstream.h"
#include "common/system.h"
@@ -131,13 +129,9 @@ bool SoundManager::playSample(int id, Audio::Mixer::SoundType type, Audio::Sound
error(FILE_IS_CORRUPT, _vm->getSampleFile(sampleLanguage));
// FIXME: Should set this in a different place ;)
- bool mute = false;
- if (ConfMan.hasKey("mute"))
- mute = ConfMan.getBool("mute");
-
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : _vm->_config->_soundVolume);
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, _vm->_config->_soundVolume);
//_vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : _vm->_config->_voiceVolume);
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _vm->_config->_voiceVolume);
Audio::AudioStream *sampleStream = 0;
@@ -325,13 +319,9 @@ bool SoundManager::playSample(int id, int sub, bool bLooped, int x, int y, int p
}
// FIXME: Should set this in a different place ;)
- bool mute = false;
- if (ConfMan.hasKey("mute"))
- mute = ConfMan.getBool("mute");
-
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : _vm->_config->_soundVolume);
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, _vm->_config->_soundVolume);
//_vm->_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
- _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : _vm->_config->_voiceVolume);
+ _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _vm->_config->_voiceVolume);
curChan->sampleNum = id;
curChan->subSample = sub;
@@ -364,8 +354,8 @@ bool SoundManager::offscreenChecks(int x, int &y) {
if (x == -1)
return true;
- // convert x to offset from screen centre
- x -= PlayfieldGetCentreX(FIELD_WORLD);
+ // convert x to offset from screen center
+ x -= PlayfieldGetCenterX(FIELD_WORLD);
if (x < -SCREEN_WIDTH || x > SCREEN_WIDTH) {
// A long way offscreen, ignore it
@@ -385,7 +375,7 @@ int8 SoundManager::getPan(int x) {
if (x == -1)
return 0;
- x -= PlayfieldGetCentreX(FIELD_WORLD);
+ x -= PlayfieldGetCenterX(FIELD_WORLD);
if (x == 0)
return 0;
diff --git a/engines/tinsel/strres.cpp b/engines/tinsel/strres.cpp
index aa303a5391..2dc0e833d1 100644
--- a/engines/tinsel/strres.cpp
+++ b/engines/tinsel/strres.cpp
@@ -31,6 +31,7 @@
#include "tinsel/scn.h"
#include "common/file.h"
#include "common/endian.h"
+#include "common/textconsole.h"
#include "gui/message.h"
diff --git a/engines/tinsel/sysvar.cpp b/engines/tinsel/sysvar.cpp
index 7003d34feb..ad795fd219 100644
--- a/engines/tinsel/sysvar.cpp
+++ b/engines/tinsel/sysvar.cpp
@@ -31,6 +31,8 @@
#include "tinsel/sysvar.h"
#include "tinsel/tinsel.h"
+#include "common/textconsole.h"
+
namespace Tinsel {
// Return for SYS_Platform
@@ -77,7 +79,7 @@ static int systemVars[SV_TOPVALID] = {
2, // Speech Delay
2, // Music dim factor
- 0, // if set, default actor's text colour gets poked in here
+ 0, // if set, default actor's text color gets poked in here
0, // user 1
0, // user 2
@@ -103,7 +105,7 @@ static int systemVars[SV_TOPVALID] = {
0, // ISV_GHOST_ACTOR
0, // ISV_GHOST_BASE
- 0 // ISV_GHOST_COLOUR
+ 0 // ISV_GHOST_COLOR
};
static SCNHANDLE systemStrings[SS_MAX_VALID]; // FIXME: Avoid non-const global vars
diff --git a/engines/tinsel/sysvar.h b/engines/tinsel/sysvar.h
index e407e6ffa3..4cdb1364b4 100644
--- a/engines/tinsel/sysvar.h
+++ b/engines/tinsel/sysvar.h
@@ -60,7 +60,7 @@ typedef enum { SV_DEFAULT_INV,
SV_SPEECHDELAY, // Delay 'twixt text/animation and sample
SV_MUSICDIMFACTOR, // dimVolume = volume - volume/SV_MDF
- SV_TAGCOLOUR, // if set, default actor's text colour gets poked in here
+ SV_TAGCOLOR, // if set, default actor's text color gets poked in here
SV_USER1,
SV_USER2,
@@ -85,7 +85,7 @@ typedef enum { SV_DEFAULT_INV,
ISV_NO_BLOCKING,
ISV_GHOST_ACTOR,
ISV_GHOST_BASE,
- ISV_GHOST_COLOUR,
+ ISV_GHOST_COLOR,
SV_TOPVALID } SYSVARS;
diff --git a/engines/tinsel/text.cpp b/engines/tinsel/text.cpp
index d2939281eb..3652d6ed3e 100644
--- a/engines/tinsel/text.cpp
+++ b/engines/tinsel/text.cpp
@@ -78,8 +78,8 @@ int StringLengthPix(char *szStr, const FONT *pFont) {
* @param mode Mode flags for the string
*/
int JustifyText(char *szStr, int xPos, const FONT *pFont, int mode) {
- if (mode & TXT_CENTRE) {
- // centre justify the text
+ if (mode & TXT_CENTER) {
+ // center justify the text
// adjust x positioning by half the length of line in pixels
xPos -= StringLengthPix(szStr, pFont) / 2;
@@ -100,14 +100,14 @@ int JustifyText(char *szStr, int xPos, const FONT *pFont, int mode) {
* of the list is returned.
* @param pList Object list to add text to
* @param szStr String to output
- * @param colour Colour for monochrome text
+ * @param color Color for monochrome text
* @param xPos X position of string
* @param yPos Y position of string
* @param hFont Which font to use
* @param mode Mode flags for the string
* @param sleepTime Sleep time between each character (if non-zero)
*/
-OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour,
+OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color,
int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime) {
int xJustify; // x position of text after justification
int yOffset; // offset to next line of text
@@ -183,8 +183,8 @@ OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour,
if (mode & TXT_ABSOLUTE)
pChar->flags |= DMA_ABS;
- // set characters colour - only effective for mono fonts
- pChar->constant = colour;
+ // set characters color - only effective for mono fonts
+ pChar->constant = color;
// get Y animation offset
GetAniOffset(hImg, pChar->flags, &aniX, &aniY);
diff --git a/engines/tinsel/text.h b/engines/tinsel/text.h
index a849e286ec..ea804f58d7 100644
--- a/engines/tinsel/text.h
+++ b/engines/tinsel/text.h
@@ -34,7 +34,7 @@ namespace Tinsel {
/** text mode flags - defaults to left justify */
enum {
- TXT_CENTRE = 0x0001, ///< centre justify text
+ TXT_CENTER = 0x0001, ///< center justify text
TXT_RIGHT = 0x0002, ///< right justify text
TXT_SHADOW = 0x0004, ///< shadow each character
TXT_ABSOLUTE = 0x0008 ///< position of text is absolute (only for object text)
@@ -72,7 +72,7 @@ struct FONT {
struct TEXTOUT {
OBJECT *pList; ///< object list to add text to
char *szStr; ///< string to output
- int colour; ///< colour for monochrome text
+ int color; ///< color for monochrome text
int xPos; ///< x position of string
int yPos; ///< y position of string
SCNHANDLE hFont; ///< which font to use
@@ -91,14 +91,14 @@ struct TEXTOUT {
* of the list is returned.
* @param pList object list to add text to
* @param szStr string to output
- * @param colour colour for monochrome text
+ * @param color color for monochrome text
* @param xPos x position of string
* @param yPos y position of string
* @param hFont which font to use
* @param mode mode flags for the string
* @param sleepTime Sleep time between each character (if non-zero)
*/
-OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int colour,
+OBJECT *ObjectTextOut(OBJECT *pList, char *szStr, int color,
int xPos, int yPos, SCNHANDLE hFont, int mode, int sleepTime = 0);
OBJECT *ObjectTextOutIndirect( // output a string of text
diff --git a/engines/tinsel/timers.cpp b/engines/tinsel/timers.cpp
index 5f15cd9d3b..c1a4cd0ff5 100644
--- a/engines/tinsel/timers.cpp
+++ b/engines/tinsel/timers.cpp
@@ -31,7 +31,7 @@
#include "tinsel/timers.h"
#include "tinsel/dw.h"
#include "common/serializer.h"
-
+#include "common/textconsole.h"
#include "common/system.h"
namespace Tinsel {
diff --git a/engines/tinsel/timers.h b/engines/tinsel/timers.h
index 022604b662..1456d9a1d5 100644
--- a/engines/tinsel/timers.h
+++ b/engines/tinsel/timers.h
@@ -31,7 +31,7 @@
#include "tinsel/dw.h"
namespace Common {
- class Serializer;
+class Serializer;
}
namespace Tinsel {
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index 40418dcc43..afd409ce27 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -70,6 +70,7 @@
#include "tinsel/tinsel.h"
#include "tinsel/token.h"
+#include "common/textconsole.h"
namespace Tinsel {
@@ -84,7 +85,7 @@ extern bool bNoPause;
// In DOS_MAIN.C
// TODO/FIXME: From dos_main.c: "Only used on PSX so far"
-int clRunMode = 0;
+//int clRunMode = 0;
//----------------- EXTERNAL FUNCTIONS ---------------------
@@ -426,11 +427,11 @@ static void ScrollMonitorProcess(CORO_PARAM, const void *param) {
/**
* NOT A LIBRARY FUNCTION
*
- * Poke supplied colour into the DAC queue.
+ * Poke supplied color into the DAC queue.
*/
void SetTextPal(COLORREF col) {
- SetTalkColourRef(col);
- UpdateDACqueue(TalkColour(), col);
+ SetTalkColorRef(col);
+ UpdateDACqueue(TalkColor(), col);
}
/**
@@ -522,7 +523,7 @@ void TinGetVersion(WHICH_VER which, char *buffer, int length) {
/**
* Set actor's attributes.
- * - currently only the text colour.
+ * - currently only the text color.
*/
static void ActorAttr(int actor, int r1, int g1, int b1) {
storeActorAttr(actor, r1, g1, b1);
@@ -553,11 +554,11 @@ static int ActorDirection(int actor) {
/**
* Set actor's palette details for path brightnesses
*/
-void ActorPalette(int actor, int startColour, int length) {
+void ActorPalette(int actor, int startColor, int length) {
PMOVER pMover = GetMover(actor);
assert(pMover);
- StoreMoverPalette(pMover, startColour, length);
+ StoreMoverPalette(pMover, startColor, length);
}
/**
@@ -568,10 +569,10 @@ static void ActorPriority(int actor, int zFactor) {
}
/**
- * Set actor's text colour.
+ * Set actor's text color.
*/
-static void ActorRGB(int actor, COLORREF colour) {
- SetActorRGB(actor, colour);
+static void ActorRGB(int actor, COLORREF color) {
+ SetActorRGB(actor, color);
}
/**
@@ -1196,9 +1197,9 @@ static int GetInvLimit(int invno) {
/**
* Ghost
*/
-static void Ghost(int actor, int tColour, int tPalOffset) {
+static void Ghost(int actor, int tColor, int tPalOffset) {
SetSysVar(ISV_GHOST_ACTOR, actor);
- SetSysVar(ISV_GHOST_COLOUR, tColour);
+ SetSysVar(ISV_GHOST_COLOR, tColor);
SetSysVar(ISV_GHOST_BASE, tPalOffset);
CreateGhostPalette(BgPal());
}
@@ -1952,7 +1953,7 @@ static void Print(CORO_PARAM, int x, int y, SCNHANDLE text, int time, bool bSust
PlayfieldGetPos(FIELD_WORLD, &Loffset, &Toffset);
_ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0, x - Loffset, y - Toffset, GetTagFontHandle(),
- TXT_CENTRE, 0);
+ TXT_CENTER, 0);
assert(_ctx->pText);
// Adjust x, y, or z if necessary
@@ -1965,7 +1966,7 @@ static void Print(CORO_PARAM, int x, int y, SCNHANDLE text, int time, bool bSust
PlayfieldGetPos(FIELD_WORLD, &Loffset, &Toffset);
_ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(),
0, x - Loffset, y - Toffset,
- TinselV2 ? GetTagFontHandle() : GetTalkFontHandle(), TXT_CENTRE);
+ TinselV2 ? GetTagFontHandle() : GetTalkFontHandle(), TXT_CENTER);
assert(_ctx->pText); // string produced NULL text
if (IsTopWindow())
MultiSetZPosition(_ctx->pText, Z_TOPW_TEXT);
@@ -2128,7 +2129,7 @@ static void PrintObj(CORO_PARAM, const SCNHANDLE hText, const INV_OBJECT *pinvo,
LoadStringRes(hText, TextBufferAddr(), TBUFSZ);
_ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(),
- 0, _ctx->textx, _ctx->texty, GetTagFontHandle(), TXT_CENTRE);
+ 0, _ctx->textx, _ctx->texty, GetTagFontHandle(), TXT_CENTER);
assert(_ctx->pText); // PrintObj() string produced NULL text
MultiSetZPosition(_ctx->pText, Z_INV_ITEXT);
@@ -2181,7 +2182,7 @@ static void PrintObj(CORO_PARAM, const SCNHANDLE hText, const INV_OBJECT *pinvo,
LoadStringRes(hText, TextBufferAddr(), TBUFSZ);
_ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0, _ctx->textx, _ctx->texty, GetTagFontHandle(),
- TXT_CENTRE, 0);
+ TXT_CENTER, 0);
assert(_ctx->pText);
KeepOnScreen(_ctx->pText, &_ctx->textx, &_ctx->texty);
@@ -2297,7 +2298,7 @@ static void PrintObjPointed(CORO_PARAM, const SCNHANDLE text, const INV_OBJECT *
// Re-display in the same place
LoadStringRes(text, TextBufferAddr(), TBUFSZ);
pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS), TextBufferAddr(),
- 0, textx, texty, GetTagFontHandle(), TXT_CENTRE);
+ 0, textx, texty, GetTagFontHandle(), TXT_CENTER);
assert(pText); // PrintObj() string produced NULL text
MultiSetZPosition(pText, Z_INV_ITEXT);
}
@@ -2490,7 +2491,7 @@ void ResumeLastGame() {
* Returns the current run mode
*/
static int RunMode() {
- return clRunMode;
+ return 0; //clRunMode;
}
/**
@@ -3367,7 +3368,7 @@ static void TalkOrSay(CORO_PARAM, SPEECH_TYPE speechType, SCNHANDLE hText, int x
_ctx->pText = ObjectTextOut(GetPlayfieldList(FIELD_STATUS),
TextBufferAddr(), 0, _ctx->x - _ctx->Loffset, _ctx->y - _ctx->Toffset,
- GetTalkFontHandle(), TXT_CENTRE);
+ GetTalkFontHandle(), TXT_CENTER);
assert(_ctx->pText); // talk() string produced NULL text;
if (IsTopWindow())
@@ -3595,12 +3596,12 @@ static void TalkPaletteIndex(unsigned index) {
/**
* Set talk font's palette entry.
*/
-static void TalkRGB(COLORREF colour, int myescEvent) {
+static void TalkRGB(COLORREF color, int myescEvent) {
// Don't do it if it's not wanted
if (myescEvent && myescEvent != GetEscEvents())
return;
- SetTextPal(colour);
+ SetTextPal(color);
}
/**
diff --git a/engines/tinsel/tinlib.h b/engines/tinsel/tinlib.h
index 11e59f380d..7bd2a19d55 100644
--- a/engines/tinsel/tinlib.h
+++ b/engines/tinsel/tinlib.h
@@ -48,7 +48,7 @@ void TinGetVersion(WHICH_VER which, char *buffer, int length);
// Library functions in TINLIB.C
void ActorBrightness(int actor, int brightness);
-void ActorPalette(int actor, int startColour, int length);
+void ActorPalette(int actor, int startColor, int length);
void Control(int param);
void HookScene(SCNHANDLE scene, int entrance, int transition);
void NewScene(CORO_PARAM, SCNHANDLE scene, int entrance, int transition);
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index e1396f9715..20d4f1d31a 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -29,22 +29,14 @@
#include "common/events.h"
#include "common/EventRecorder.h"
#include "common/keyboard.h"
-#include "common/file.h"
#include "common/fs.h"
-#include "common/savefile.h"
#include "common/config-manager.h"
#include "common/serializer.h"
-#include "common/stream.h"
#include "backends/audiocd/audiocd.h"
#include "engines/util.h"
-#include "graphics/cursorman.h"
-
-#include "base/plugins.h"
-#include "base/version.h"
-
#include "tinsel/actors.h"
#include "tinsel/background.h"
#include "tinsel/bmv.h"
@@ -911,10 +903,10 @@ Common::Error TinselEngine::run() {
#else
initGraphics(640, 432, true);
#endif
- _screenSurface.create(640, 432, 1);
+ _screenSurface.create(640, 432, Graphics::PixelFormat::createFormatCLUT8());
} else {
initGraphics(320, 200, false);
- _screenSurface.create(320, 200, 1);
+ _screenSurface.create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
}
g_eventRec.registerRandomSource(_random, "tinsel");
@@ -972,7 +964,7 @@ Common::Error TinselEngine::run() {
// errors when loading the save state.
if (ConfMan.hasKey("save_slot")) {
- if (loadGameState(ConfMan.getInt("save_slot")) == Common::kNoError)
+ if (loadGameState(ConfMan.getInt("save_slot")).getCode() == Common::kNoError)
loadingFromGMM = true;
}
diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h
index 5c7a1cdfb2..35ea43074c 100644
--- a/engines/tinsel/tinsel.h
+++ b/engines/tinsel/tinsel.h
@@ -125,8 +125,8 @@ typedef bool (*KEYFPTR)(const Common::KeyState &);
#define SCREEN_WIDTH (_vm->screen().w) // PC screen dimensions
#define SCREEN_HEIGHT (_vm->screen().h)
-#define SCRN_CENTRE_X ((SCREEN_WIDTH - 1) / 2) // screen centre x
-#define SCRN_CENTRE_Y ((SCREEN_HEIGHT - 1) / 2) // screen centre y
+#define SCRN_CENTER_X ((SCREEN_WIDTH - 1) / 2) // screen center x
+#define SCRN_CENTER_Y ((SCREEN_HEIGHT - 1) / 2) // screen center y
#define UNUSED_LINES 48
#define EXTRA_UNUSED_LINES 3
//#define SCREEN_BOX_HEIGHT1 (SCREEN_HEIGHT - UNUSED_LINES)
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 6004aacead..856acbd986 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "common/debug.h"
+#include "common/rect.h"
+
#include "toon/anim.h"
#include "toon/toon.h"
#include "toon/tools.h"
diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp
index c2e0bf7b20..026450d3c9 100644
--- a/engines/toon/audio.cpp
+++ b/engines/toon/audio.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/audio.h"
#include "common/memstream.h"
#include "common/substream.h"
diff --git a/engines/toon/character.cpp b/engines/toon/character.cpp
index 69051d45fd..29a61ffd78 100644
--- a/engines/toon/character.cpp
+++ b/engines/toon/character.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "common/debug.h"
+#include "common/system.h"
+
#include "toon/character.h"
#include "toon/drew.h"
#include "toon/flux.h"
@@ -166,8 +169,9 @@ bool Character::walkTo(int32 newPosX, int32 newPosY) {
_vm->getPathFinding()->resetBlockingRects();
- if (_id == 1) {
- int32 sizeX = MAX<int32>(5, 40 * _vm->getDrew()->getScale() / 1024);
+ // don't allow flux to go at the same position as drew
+ if (_id == 1 ) {
+ int32 sizeX = MAX<int32>(5, 30 * _vm->getDrew()->getScale() / 1024);
int32 sizeY = MAX<int32>(2, 20 * _vm->getDrew()->getScale() / 1024);
_vm->getPathFinding()->addBlockingEllipse(_vm->getDrew()->getFinalX(), _vm->getDrew()->getFinalY(), sizeX, sizeY);
}
diff --git a/engines/toon/drew.cpp b/engines/toon/drew.cpp
index 4f8152833b..77333c4a9f 100644
--- a/engines/toon/drew.cpp
+++ b/engines/toon/drew.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/drew.h"
namespace Toon {
diff --git a/engines/toon/flux.cpp b/engines/toon/flux.cpp
index 034332af56..833fdbf5ce 100644
--- a/engines/toon/flux.cpp
+++ b/engines/toon/flux.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/flux.h"
namespace Toon {
diff --git a/engines/toon/font.cpp b/engines/toon/font.cpp
index 8192a6f6f1..9367d79036 100644
--- a/engines/toon/font.cpp
+++ b/engines/toon/font.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/font.h"
namespace Toon {
@@ -81,7 +83,7 @@ void FontRenderer::renderText(int32 x, int32 y, Common::String origText, int32 m
x -= xx / 2;
}
- _vm->addDirtyRect(x, y, x + xx, y + yy);
+ _vm->addDirtyRect(x, y, x + xx + 2, y + yy);
int32 curX = x;
int32 curY = y;
@@ -214,7 +216,7 @@ void FontRenderer::renderMultiLineText(int32 x, int32 y, Common::String origText
curChar = textToFont(curChar);
int width = _currentFont->getFrameWidth(curChar);
- curWidth += width - 2;
+ curWidth += MAX<int32>(width - 2, 0);
it++;
curLetterNr++;
}
@@ -275,12 +277,12 @@ void FontRenderer::renderMultiLineText(int32 x, int32 y, Common::String origText
for (int32 i = 0; i < numLines; i++) {
const byte *line = lines[i];
curX = x - lineSize[i] / 2;
- _vm->addDirtyRect(curX + _vm->state()->_currentScrollValue, y, curX + lineSize[i] + _vm->state()->_currentScrollValue, curY + height);
+ _vm->addDirtyRect(curX + _vm->state()->_currentScrollValue, curY, curX + lineSize[i] + _vm->state()->_currentScrollValue + 2, curY + height);
while (*line) {
byte curChar = textToFont(*line);
if (curChar != 32) _currentFont->drawFontFrame(_vm->getMainSurface(), curChar, curX + _vm->state()->_currentScrollValue, curY, _currentFontColor);
- curX = curX + _currentFont->getFrameWidth(curChar) - 2;
+ curX = curX + MAX<int32>(_currentFont->getFrameWidth(curChar) - 2, 0);
//height = MAX(height, _currentFont->getFrameHeight(curChar));
line++;
}
diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp
index 0573e92fef..1c1e23e39e 100644
--- a/engines/toon/hotspot.cpp
+++ b/engines/toon/hotspot.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/hotspot.h"
#include "toon/tools.h"
diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index 4305abb62b..64b80c29b3 100644
--- a/engines/toon/movie.cpp
+++ b/engines/toon/movie.cpp
@@ -23,7 +23,16 @@
*
*/
+#include "common/debug.h"
+#include "common/events.h"
+#include "common/keyboard.h"
+#include "common/stream.h"
+#include "common/system.h"
+#include "graphics/surface.h"
+
+#include "toon/audio.h"
#include "toon/movie.h"
+#include "toon/toon.h"
namespace Toon {
@@ -50,7 +59,7 @@ bool ToonstruckSmackerDecoder::loadFile(const Common::String &filename) {
delete _surface;
}
_surface = new Graphics::Surface();
- _surface->create(640, 400, 1);
+ _surface->create(640, 400, Graphics::PixelFormat::createFormatCLUT8());
_header.flags = 4;
}
diff --git a/engines/toon/path.cpp b/engines/toon/path.cpp
index e0cdf87502..26355863f6 100644
--- a/engines/toon/path.cpp
+++ b/engines/toon/path.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/path.h"
namespace Toon {
@@ -407,7 +409,11 @@ void PathFinding::init(Picture *mask) {
_height = mask->getHeight();
_currentMask = mask;
_heap->unload();
- _heap->init(_width * _height);
+ // 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
delete[] _gridTemp;
_gridTemp = new int32[_width*_height];
}
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index 1945f0fe45..ce28f9c68b 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -25,6 +25,9 @@
#include "toon/picture.h"
#include "toon/tools.h"
+
+#include "common/debug.h"
+#include "common/rect.h"
#include "common/stack.h"
namespace Toon {
diff --git a/engines/toon/resource.cpp b/engines/toon/resource.cpp
index b29aa3b72d..f9f65b423b 100644
--- a/engines/toon/resource.cpp
+++ b/engines/toon/resource.cpp
@@ -24,6 +24,7 @@
*/
#include "toon/resource.h"
+#include "common/debug.h"
#include "common/file.h"
#include "common/memstream.h"
#include "common/substream.h"
diff --git a/engines/toon/script.cpp b/engines/toon/script.cpp
index 0242ace7e3..8703666781 100644
--- a/engines/toon/script.cpp
+++ b/engines/toon/script.cpp
@@ -23,10 +23,9 @@
*
*/
+#include "common/debug.h"
#include "common/endian.h"
#include "common/stream.h"
-#include "common/util.h"
-#include "common/system.h"
#include "toon/toon.h"
#include "toon/script.h"
diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp
index b181591bf0..8f75097bd4 100644
--- a/engines/toon/script_func.cpp
+++ b/engines/toon/script_func.cpp
@@ -23,6 +23,9 @@
*
*/
+#include "common/debug.h"
+#include "common/system.h"
+
#include "toon/script_func.h"
#include "toon/script.h"
#include "toon/state.h"
diff --git a/engines/toon/state.cpp b/engines/toon/state.cpp
index 0d6977842d..af37ea9e68 100644
--- a/engines/toon/state.cpp
+++ b/engines/toon/state.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/state.h"
#include "toon/toon.h"
diff --git a/engines/toon/text.cpp b/engines/toon/text.cpp
index f0d17dd34e..94a3ea5aa7 100644
--- a/engines/toon/text.cpp
+++ b/engines/toon/text.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/text.h"
namespace Toon {
diff --git a/engines/toon/tools.cpp b/engines/toon/tools.cpp
index da6e0f712e..ff72e69543 100644
--- a/engines/toon/tools.cpp
+++ b/engines/toon/tools.cpp
@@ -23,6 +23,8 @@
*
*/
+#include "common/debug.h"
+
#include "toon/tools.h"
#include "toon/toon.h"
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 2040668245..81c4d313e4 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -33,6 +33,7 @@
#include "common/memstream.h"
#include "engines/util.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "graphics/thumbnail.h"
#include "gui/saveload.h"
@@ -57,7 +58,7 @@ void ToonEngine::init() {
_hotspots = new Hotspots(this);
_mainSurface = new Graphics::Surface();
- _mainSurface->create(TOON_BACKBUFFER_WIDTH, TOON_BACKBUFFER_HEIGHT, 1);
+ _mainSurface->create(TOON_BACKBUFFER_WIDTH, TOON_BACKBUFFER_HEIGHT, Graphics::PixelFormat::createFormatCLUT8());
_finalPalette = new uint8[768];
_backupPalette = new uint8[768];
@@ -116,6 +117,8 @@ void ToonEngine::init() {
_drew = _characters[0];
_flux = _characters[1];
+
+
// preload walk anim for flux and drew
_drew->loadWalkAnimation("STNDWALK.CAF");
_drew->setupPalette();
@@ -135,6 +138,9 @@ void ToonEngine::init() {
memset(_sceneAnimations, 0, sizeof(_sceneAnimations));
memset(_sceneAnimationScripts, 0, sizeof(_sceneAnimationScripts));
+ _drew->setVisible(false);
+ _flux->setVisible(false);
+
_gameState->_currentChapter = 1;
initChapter();
loadCursor();
@@ -843,6 +849,7 @@ ToonEngine::ToonEngine(OSystem *syst, const ADGameDescription *gameDescription)
_backupPalette = NULL;
_additionalPalette1 = NULL;
_additionalPalette2 = NULL;
+ _additionalPalette2Present = false;
_cutawayPalette = NULL;
_universalPalette = NULL;
_fluxPalette = NULL;
@@ -1148,6 +1155,7 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
strcat(temp, ".NPP");
loadAdditionalPalette(temp, 0);
+ _additionalPalette2Present = false;
strcpy(temp, state()->_locations[SceneId]._name);
strcat(temp, ".NP2");
loadAdditionalPalette(temp, 1);
@@ -1318,6 +1326,7 @@ void ToonEngine::loadAdditionalPalette(Common::String fileName, int32 mode) {
case 1:
memcpy(_additionalPalette2, palette, 69);
fixPaletteEntries(_additionalPalette2, 23);
+ _additionalPalette2Present = true;
break;
case 2:
memcpy(_cutawayPalette, palette, size);
@@ -1786,7 +1795,8 @@ void ToonEngine::flipScreens() {
if (_gameState->_inCloseUp) {
_gameState->_currentScrollValue = TOON_SCREEN_WIDTH;
setPaletteEntries(_cutawayPalette, 1, 128);
- setPaletteEntries(_additionalPalette2, 232, 23);
+ if (_additionalPalette2Present)
+ setPaletteEntries(_additionalPalette2, 232, 23);
} else {
_gameState->_currentScrollValue = 0;
_currentPicture->setupPalette();
diff --git a/engines/toon/toon.h b/engines/toon/toon.h
index 3554900684..373437d658 100644
--- a/engines/toon/toon.h
+++ b/engines/toon/toon.h
@@ -352,6 +352,7 @@ protected:
uint8 *_backupPalette;
uint8 *_additionalPalette1;
uint8 *_additionalPalette2;
+ bool _additionalPalette2Present;
uint8 *_cutawayPalette;
uint8 *_universalPalette;
uint8 *_fluxPalette;
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index 52967c25c7..eb10c61893 100644
--- a/engines/touche/menu.cpp
+++ b/engines/touche/menu.cpp
@@ -331,14 +331,14 @@ void ToucheEngine::handleMenuAction(void *menu, int actionId) {
break;
case kActionPerformSaveLoad:
if (menuData->mode == kMenuLoadStateMode) {
- if (loadGameState(_saveLoadCurrentSlot) == Common::kNoError) {
+ if (loadGameState(_saveLoadCurrentSlot).getCode() == Common::kNoError) {
menuData->quit = true;
}
} else if (menuData->mode == kMenuSaveStateMode) {
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
const char *description = menuData->saveLoadDescriptionsTable[_saveLoadCurrentSlot];
if (strlen(description) > 0) {
- if (saveGameState(_saveLoadCurrentSlot, description) == Common::kNoError) {
+ if (saveGameState(_saveLoadCurrentSlot, description).getCode() == Common::kNoError) {
menuData->quit = true;
}
}
diff --git a/engines/touche/midi.h b/engines/touche/midi.h
index f0f55e64e6..bde4950b93 100644
--- a/engines/touche/midi.h
+++ b/engines/touche/midi.h
@@ -34,7 +34,7 @@
class MidiParser;
namespace Common {
- class ReadStream;
+class ReadStream;
}
namespace Touche {
diff --git a/engines/touche/resource.cpp b/engines/touche/resource.cpp
index 3c108e2931..93406dcb8b 100644
--- a/engines/touche/resource.cpp
+++ b/engines/touche/resource.cpp
@@ -24,6 +24,7 @@
*/
+#include "common/textconsole.h"
#include "audio/decoders/flac.h"
#include "audio/mixer.h"
diff --git a/engines/touche/saveload.cpp b/engines/touche/saveload.cpp
index 73817a5a1a..42b68d015c 100644
--- a/engines/touche/saveload.cpp
+++ b/engines/touche/saveload.cpp
@@ -24,6 +24,7 @@
*/
+#include "common/textconsole.h"
#include "common/savefile.h"
#include "touche/graphics.h"
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 6b47a7fc4d..15a2b1c53a 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -28,13 +28,18 @@
#include "common/debug-channels.h"
#include "common/events.h"
#include "common/EventRecorder.h"
-#include "common/file.h"
#include "common/fs.h"
#include "common/system.h"
+#include "common/archive.h"
+#include "common/debug.h"
+#include "common/error.h"
+#include "common/keyboard.h"
+#include "common/textconsole.h"
#include "engines/util.h"
#include "graphics/cursorman.h"
-#include "audio/mididrv.h"
+#include "graphics/palette.h"
+#include "gui/debugger.h"
#include "touche/midi.h"
#include "touche/touche.h"
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index fd1dfe9e9d..789ec8fa8d 100644
--- a/engines/tsage/converse.cpp
+++ b/engines/tsage/converse.cpp
@@ -52,7 +52,10 @@ void SequenceManager::setup() {
_sceneObject = _objectList[0];
}
-void SequenceManager::synchronise(Serialiser &s) {
+void SequenceManager::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ Action::synchronize(s);
+
s.syncAsSint32LE(_resNum);
s.syncAsSint32LE(_sequenceOffset);
s.syncAsByte(_keepActive);
@@ -150,11 +153,11 @@ void SequenceManager::signal() {
case 10: {
int resNum= getNextValue();
int lineNum = getNextValue();
- int colour = getNextValue();
+ int color = getNextValue();
int xp = getNextValue();
int yp = getNextValue();
int width = getNextValue();
- setMessage(resNum, lineNum, colour, Common::Point(xp, yp), width);
+ setMessage(resNum, lineNum, color, Common::Point(xp, yp), width);
break;
}
case 11:
@@ -181,7 +184,7 @@ void SequenceManager::signal() {
break;
case 15:
v1 = getNextValue();
- _sceneObject->_field7A = v1;
+ _sceneObject->_moveRate = v1;
break;
case 16:
v1 = getNextValue();
@@ -208,7 +211,7 @@ void SequenceManager::signal() {
break;
case 22:
v1 = getNextValue();
- _sceneObject->setPriority2(v1);
+ _sceneObject->fixPriority(v1);
break;
case 23:
v1 = getNextValue();
@@ -244,6 +247,7 @@ void SequenceManager::signal() {
}
case 28:
_objectIndex = getNextValue();
+ assert((_objectIndex >= 0) && (_objectIndex < 6));
_sceneObject = _objectList[_objectIndex];
assert(_sceneObject);
break;
@@ -272,14 +276,15 @@ void SequenceManager::signal() {
case 34: {
v1 = getNextValue();
v2 = getNextValue();
- int objIndex1 = getNextValue();
- int objIndex2 = getNextValue();
- int objIndex3 = getNextValue();
- int objIndex4 = getNextValue();
- int objIndex5 = getNextValue();
+ int objIndex1 = getNextValue() - 1;
+ int objIndex2 = getNextValue() - 1;
+ int objIndex3 = getNextValue() - 1;
+ int objIndex4 = getNextValue() - 1;
+ int objIndex5 = getNextValue() - 1;
+ int objIndex6 = getNextValue() - 1;
setAction(globalManager(), v2 ? this : NULL, v1, _objectList[objIndex1], _objectList[objIndex2],
- _objectList[objIndex3], _objectList[objIndex4], _objectList[objIndex5]);
+ _objectList[objIndex3], _objectList[objIndex4], _objectList[objIndex5], _objectList[objIndex6], NULL);
break;
}
default:
@@ -294,17 +299,19 @@ void SequenceManager::process(Event &event) {
!event.handled && _globals->_sceneObjects->contains(&_sceneText)) {
// Remove the text item
_sceneText.remove();
+ setDelay(2);
+ event.handled = true;
} else {
Action::process(event);
}
}
-void SequenceManager::attached(EventHandler *newOwner, EventHandler *fmt, va_list va) {
+void SequenceManager::attached(EventHandler *newOwner, EventHandler *endHandler, va_list va) {
// Get the sequence number to use
_resNum = va_arg(va, int);
- byte *seqData = _vm->_dataManager->getResource(RES_SEQUENCE, _resNum, 0);
+ byte *seqData = _resourceManager->getResource(RES_SEQUENCE, _resNum, 0);
uint seqSize = _vm->_memoryManager.getSize(seqData);
_sequenceData.resize(seqSize);
@@ -320,12 +327,7 @@ void SequenceManager::attached(EventHandler *newOwner, EventHandler *fmt, va_lis
}
setup();
- // TODO: This is not particulary nice, since dummy is uninitialized.
- // Since the default Action implementation does not access the va_list
- // parameter it should be fine though. Still it would be nice to find
- // a better solution to this.
- va_list dummy;
- Action::attached(newOwner, fmt, dummy);
+ Action::attached(newOwner, endHandler, va);
}
/**
@@ -337,28 +339,30 @@ uint16 SequenceManager::getNextValue() {
return result;
}
-void SequenceManager::setMessage(int resNum, int lineNum, int colour, const Common::Point &pt, int width) {
- _sceneText._colour1 = colour;
- _sceneText._colour2 = 0;
- _sceneText._colour3 = 0;
+void SequenceManager::setMessage(int resNum, int lineNum, int color, const Common::Point &pt, int width) {
+ _sceneText._color1 = color;
+ _sceneText._color2 = 0;
+ _sceneText._color3 = 0;
_sceneText._fontNumber = 2;
_sceneText._width = width;
// Get the display message
- Common::String msg = _vm->_dataManager->getMessage(resNum, lineNum);
+ Common::String msg = _resourceManager->getMessage(resNum, lineNum);
- // Get the needed rect, and move it to the desired position
- Rect textRect;
- _globals->gfxManager().getStringBounds(msg.c_str(), textRect, width);
+ // Set the text message
+ _sceneText.setup(msg);
+
+ // Move the text to the correct position
+ Rect textRect = _sceneText._bounds;
Rect sceneBounds = _globals->_sceneManager._scene->_sceneBounds;
sceneBounds.collapse(4, 2);
textRect.moveTo(pt);
textRect.contain(sceneBounds);
- // Set the text message
- _sceneText.setup(msg);
_sceneText.setPosition(Common::Point(textRect.left, textRect.top));
- _sceneText.setPriority2(255);
+
+ // Draw the text
+ _sceneText.fixPriority(255);
_sceneText.show();
// Set the delay based on the number of words
@@ -379,8 +383,8 @@ SequenceManager *SequenceManager::globalManager() {
/*--------------------------------------------------------------------------*/
ConversationChoiceDialog::ConversationChoiceDialog() {
- _stdColour = 23;
- _highlightColour = _globals->_scenePalette._colours.background;
+ _stdColor = 23;
+ _highlightColor = _globals->_scenePalette._colors.background;
_fontNumber = 1;
}
@@ -443,7 +447,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
if (idx != _selectedIndex) {
if (_selectedIndex != _choiceList.size()) {
// De-highlight previously selected item
- _gfxManager._font._colours.foreground = _stdColour;
+ _gfxManager._font._colors.foreground = _stdColor;
_gfxManager._font.writeLines(_choiceList[_selectedIndex]._msg.c_str(),
_choiceList[_selectedIndex]._bounds, ALIGN_LEFT);
}
@@ -452,7 +456,7 @@ int ConversationChoiceDialog::execute(const Common::StringArray &choiceList) {
if (_selectedIndex != _choiceList.size()) {
// Highlight the new item
- _gfxManager._font._colours.foreground = _highlightColour;
+ _gfxManager._font._colors.foreground = _highlightColor;
_gfxManager._font.writeLines(_choiceList[idx]._msg.c_str(), _choiceList[idx]._bounds, ALIGN_LEFT);
}
@@ -477,7 +481,7 @@ void ConversationChoiceDialog::draw() {
drawFrame();
_gfxManager._bounds = tempRect;
- _gfxManager._font._colours.foreground = _stdColour;
+ _gfxManager._font._colors.foreground = _stdColor;
_gfxManager.activate();
// Loop through writing the conversation choices
@@ -510,12 +514,12 @@ void Obj44::load(const byte *dataP) {
_speakerOffset = READ_LE_UINT16(dataP + 0x42);
}
-void Obj44::synchronise(Serialiser &s) {
+void Obj44::synchronize(Serializer &s) {
s.syncAsSint32LE(_id);
- for (int i = 0; i < OBJ44_LIST_SIZE; ++i)
- s.syncAsSint32LE(_field2[i]);
- for (int i = 0; i < OBJ44_LIST_SIZE; ++i)
- _list[OBJ44_LIST_SIZE].synchronise(s);
+ for (int idx = 0; idx < OBJ44_LIST_SIZE; ++idx)
+ s.syncAsSint32LE(_field2[idx]);
+ for (int idx = 0; idx < OBJ44_LIST_SIZE; ++idx)
+ _list[idx].synchronize(s);
s.syncAsUint32LE(_speakerOffset);
}
@@ -535,7 +539,7 @@ void StripManager::start(int stripNum, EventHandler *owner, StripCallback *callb
_stripNum = stripNum;
_callbackObject = callback;
- _sceneNumber = _globals->_sceneManager._sceneNumber;
+ _sceneNumber = _globals->_sceneManager._scene->_screenNumber;
_sceneBounds = _globals->_sceneManager._scene->_sceneBounds;
_script.clear();
@@ -547,7 +551,7 @@ void StripManager::reset() {
_actionIndex = 0;
_delayFrames = 0;
_owner = NULL;
- _fmt = NULL;
+ _endHandler = NULL;
_field2E6 = false;
_stripNum = -1;
_obj44Index = 0;
@@ -565,7 +569,7 @@ void StripManager::reset() {
void StripManager::load() {
// Get the script
- byte *script = _vm->_dataManager->getResource(RES_STRIP, _stripNum, 2);
+ byte *script = _resourceManager->getResource(RES_STRIP, _stripNum, 2);
uint scriptSize = _vm->_memoryManager.getSize(script);
_script.resize(scriptSize);
@@ -574,7 +578,7 @@ void StripManager::load() {
DEALLOCATE(script);
// Get the object list
- byte *obj44List = _vm->_dataManager->getResource(RES_STRIP, _stripNum, 1);
+ byte *obj44List = _resourceManager->getResource(RES_STRIP, _stripNum, 1);
int dataSize = _vm->_memoryManager.getSize(obj44List);
assert((dataSize % 0x44) == 0);
@@ -588,24 +592,27 @@ void StripManager::load() {
DEALLOCATE(obj44List);
}
-void StripManager::synchronise(Serialiser &s) {
+void StripManager::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ Action::synchronize(s);
+
s.syncAsSint32LE(_stripNum);
s.syncAsSint32LE(_obj44Index);
s.syncAsSint32LE(_field20);
s.syncAsSint32LE(_sceneNumber);
- _sceneBounds.synchronise(s);
+ _sceneBounds.synchronize(s);
SYNC_POINTER(_activeSpeaker);
s.syncAsByte(_textShown);
s.syncAsByte(_field2E6);
s.syncAsSint32LE(_field2E8);
- // Synchronise the item list
+ // Synchronize the item list
int arrSize = _obj44List.size();
s.syncAsUint16LE(arrSize);
if (s.isLoading())
_obj44List.resize(arrSize);
for (int i = 0; i < arrSize; ++i)
- _obj44List[i].synchronise(s);
+ _obj44List[i].synchronize(s);
// Synhcronise script data
int scriptSize = _script.size();
@@ -636,7 +643,7 @@ void StripManager::remove() {
if (_activeSpeaker)
_activeSpeaker->remove();
- if (_sceneNumber != _globals->_sceneManager._scene->_sceneNumber) {
+ if (_sceneNumber != _globals->_sceneManager._scene->_screenNumber) {
_globals->_sceneManager._scene->_sceneBounds = _sceneBounds;
_globals->_sceneManager._scene->loadScene(_sceneNumber);
}
@@ -651,7 +658,7 @@ void StripManager::signal() {
}
if (_obj44Index < 0) {
- EventHandler *owner = _fmt;
+ EventHandler *owner = _endHandler;
int stripNum = ABS(_obj44Index);
remove();
@@ -700,7 +707,7 @@ void StripManager::signal() {
_activeSpeaker->remove();
_activeSpeaker = speakerP;
- if ((_activeSpeaker->_newSceneNumber == -1) && (_globals->_sceneManager._scene->_sceneNumber != _sceneNumber)) {
+ if ((_activeSpeaker->_newSceneNumber == -1) && (_globals->_sceneManager._scene->_screenNumber != _sceneNumber)) {
_globals->_sceneManager._scene->_sceneBounds = _sceneBounds;
_globals->_sceneManager._scene->loadScene(_sceneNumber);
}
@@ -736,8 +743,8 @@ void StripManager::process(Event &event) {
if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
if (_obj44Index != 10000) {
int currIndex = _obj44Index;
- while (!_obj44List[_obj44Index + 1]._id) {
- _obj44Index = getNewIndex(_obj44List[_obj44Index]._id);
+ while (!_obj44List[_obj44Index]._list[1]._id) {
+ _obj44Index = getNewIndex(_obj44List[_obj44Index]._list[0]._id);
if ((_obj44Index < 0) || (_obj44Index == 10000))
break;
currIndex = _obj44Index;
@@ -795,25 +802,28 @@ Speaker::Speaker() : EventHandler() {
_textPos = Common::Point(10, 20);
_fontNumber = 2;
_textMode = ALIGN_LEFT;
- _colour1 = _colour2 = _colour3 = _globals->_scenePalette._colours.foreground;
+ _color1 = _color2 = _color3 = _globals->_scenePalette._colors.foreground;
_action = NULL;
_speakerName = "SPEAKER";
}
-void Speaker::synchronise(Serialiser &s) {
- _fieldA.synchronise(s);
+void Speaker::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ EventHandler::synchronize(s);
+
+ _fieldA.synchronize(s);
SYNC_POINTER(_field18);
s.syncString(_speakerName);
s.syncAsSint32LE(_newSceneNumber);
s.syncAsSint32LE(_oldSceneNumber);
- _sceneBounds.synchronise(s);
+ _sceneBounds.synchronize(s);
s.syncAsSint32LE(_textWidth);
s.syncAsSint16LE(_textPos.x); s.syncAsSint16LE(_textPos.y);
s.syncAsSint32LE(_fontNumber);
SYNC_ENUM(_textMode, TextAlign);
- s.syncAsSint16LE(_colour1);
- s.syncAsSint16LE(_colour2);
- s.syncAsSint16LE(_colour3);
+ s.syncAsSint16LE(_color1);
+ s.syncAsSint16LE(_color2);
+ s.syncAsSint16LE(_color3);
s.syncAsByte(_hideObjects);
}
@@ -844,15 +854,15 @@ void Speaker::proc12(Action *action) {
void Speaker::setText(const Common::String &msg) {
_globals->_sceneObjects->draw();
- _sceneText._colour1 = _colour1;
- _sceneText._colour2 = _colour2;
- _sceneText._colour3 = _colour3;
+ _sceneText._color1 = _color1;
+ _sceneText._color2 = _color2;
+ _sceneText._color3 = _color3;
_sceneText._width = _textWidth;
_sceneText._fontNumber = _fontNumber;
_sceneText._textMode = _textMode;
_sceneText.setup(msg);
_sceneText.setPosition(_textPos);
- _sceneText.setPriority2(256);
+ _sceneText.fixPriority(256);
// Count the number of words (by spaces) in the string
const char *msgP = msg.c_str();
@@ -876,8 +886,8 @@ void Speaker::removeText() {
SpeakerGameText::SpeakerGameText() : Speaker() {
_speakerName = "GAMETEXT";
_textPos = Common::Point(40, 40);
- _textMode = ALIGN_CENTRE;
- _colour1 = 7;
+ _textMode = ALIGN_CENTER;
+ _color1 = 7;
_textWidth = 230;
_hideObjects = false;
}
@@ -886,7 +896,7 @@ SpeakerGameText::SpeakerGameText() : Speaker() {
ScreenSpeaker::ScreenSpeaker() : Speaker() {
_npc = NULL;
- _textMode = ALIGN_CENTRE;
+ _textMode = ALIGN_CENTER;
}
void ScreenSpeaker::setText(const Common::String &msg) {
@@ -897,9 +907,9 @@ void ScreenSpeaker::setText(const Common::String &msg) {
_globals->gfxManager().getStringBounds(msg.c_str(), textRect, _textWidth);
if (_npc) {
- textRect.centre(_npc->_position.x, _npc->_bounds.top - (textRect.height() / 2 + 10));
+ textRect.center(_npc->_position.x, _npc->_bounds.top - (textRect.height() / 2 + 10));
} else {
- textRect.centre(_globals->_sceneManager._scene->_sceneBounds.left +
+ textRect.center(_globals->_sceneManager._scene->_sceneBounds.left +
(_globals->_sceneManager._scene->_sceneBounds.width() / 2),
_globals->_sceneManager._scene->_sceneBounds.top);
}
diff --git a/engines/tsage/converse.h b/engines/tsage/converse.h
index 4d6e51a6b8..f8c5bc7b14 100644
--- a/engines/tsage/converse.h
+++ b/engines/tsage/converse.h
@@ -40,7 +40,7 @@ class SequenceManager : public Action {
private:
void setup();
uint16 getNextValue();
- void setMessage(int resNum, int lineNum, int colour, const Common::Point &pt, int width);
+ void setMessage(int resNum, int lineNum, int color, const Common::Point &pt, int width);
SequenceManager *globalManager();
public:
SceneText _sceneText;
@@ -58,11 +58,11 @@ public:
SequenceManager();
virtual Common::String getClassName() { return "SequenceManager"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void remove();
virtual void signal();
virtual void process(Event &event);
- virtual void attached(EventHandler *newOwner, EventHandler *fmt, va_list va);
+ virtual void attached(EventHandler *newOwner, EventHandler *endHandler, va_list va);
};
@@ -80,13 +80,13 @@ public:
Common::Point _textPos;
int _fontNumber;
TextAlign _textMode;
- int _colour1, _colour2, _colour3;
+ int _color1, _color2, _color3;
bool _hideObjects;
public:
Speaker();
virtual Common::String getClassName() { return "Speaker"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void remove();
virtual void proc12(Action *action);
virtual void setText(const Common::String &msg);
@@ -143,19 +143,19 @@ public:
class ConversationChoiceDialog : public ModalDialog {
public:
- int _stdColour;
- int _highlightColour;
+ int _stdColor;
+ int _highlightColor;
int _fontNumber;
- int _savedFgColour;
+ int _savedFgColor;
int _savedFontNumber;
Common::Array<ChoiceEntry> _choiceList;
uint _selectedIndex;
public:
ConversationChoiceDialog();
- void setColours(int stdColour, int highlightColour) {
- _stdColour = stdColour;
- _highlightColour = highlightColour;
+ void setColors(int stdColor, int highlightColor) {
+ _stdColor = stdColor;
+ _highlightColor = highlightColor;
}
void setFontNumber(int fontNum) { _fontNumber = fontNum; }
int execute(const Common::StringArray &choiceList);
@@ -168,7 +168,7 @@ public:
int _id;
uint _scriptOffset;
- virtual void synchronise(Serialiser &s) {
+ virtual void synchronize(Serializer &s) {
s.syncAsSint32LE(_id);
s.syncAsUint32LE(_scriptOffset);
}
@@ -184,7 +184,7 @@ public:
uint _speakerOffset;
public:
void load(const byte *dataP);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
};
class StripManager : public Action {
@@ -212,14 +212,14 @@ public:
StripManager();
virtual ~StripManager();
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void remove();
virtual void signal();
virtual void process(Event &event);
void start(int stripNum, EventHandler *owner, StripCallback *callback = NULL);
void setCallback(StripCallback *callback) { _callbackObject = callback; }
- void setColours(int stdColour, int highlightColour) { _choiceDialog.setColours(stdColour, highlightColour); }
+ void setColors(int stdColor, int highlightColor) { _choiceDialog.setColors(stdColor, highlightColor); }
void setFontNumber(int fontNum) { _choiceDialog.setFontNumber(fontNum); }
void addSpeaker(Speaker *speaker);
};
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 81088b4eaa..8ad920e6fd 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -24,10 +24,8 @@
*/
#include "common/system.h"
-#include "common/config-manager.h"
-#include "common/translation.h"
#include "engines/engine.h"
-#include "gui/saveload.h"
+#include "graphics/palette.h"
#include "tsage/tsage.h"
#include "tsage/core.h"
#include "tsage/dialogs.h"
@@ -51,7 +49,7 @@ InvObject::InvObject(int sceneNumber, int rlbNum, int cursorNum, CursorType curs
// Decode the image for the inventory item to get it's display bounds
uint size;
- byte *imgData = _vm->_dataManager->getSubResource(_displayResNum, _rlbNum, _cursorNum, &size);
+ byte *imgData = _resourceManager->getSubResource(_displayResNum, _rlbNum, _cursorNum, &size);
GfxSurface s = surfaceFromRes(imgData);
_bounds = s.getBounds();
@@ -65,87 +63,18 @@ void InvObject::setCursor() {
GfxSurface s = surfaceFromRes(_iconResNum, _rlbNum, _cursorNum);
Graphics::Surface src = s.lockSurface();
- _globals->_events.setCursor(src, s._transColour, s._centroid, _cursorId);
+ _globals->_events.setCursor(src, s._transColor, s._centroid, _cursorId);
}
}
/*--------------------------------------------------------------------------*/
-InvObjectList::InvObjectList() :
- _stunner(2280, 1, 2, OBJECT_STUNNER, "This is your stunner."),
- _scanner(1, 1, 3, OBJECT_SCANNER, "A combination scanner comm unit."),
- _stasisBox(5200, 1, 4, OBJECT_STASIS_BOX, "A stasis box."),
- _infoDisk(40, 1, 1, OBJECT_INFODISK, "The infodisk you took from the assassin."),
- _stasisNegator(0, 2, 2, OBJECT_STASIS_NEGATOR, "The stasis field negator."),
- _keyDevice(4250, 1, 6, OBJECT_KEY_DEVICE, "A magnetic key device."),
- _medkit(2280, 1, 7, OBJECT_MEDKIT, "Your medkit."),
- _ladder(4100, 1, 8, OBJECT_LADDER, "The chief's ladder."),
- _rope(4150, 1, 9, OBJECT_ROPE, "The chief's rope."),
- _key(7700, 1, 11, OBJECT_KEY, "A key."),
- _translator(7700, 1, 13, OBJECT_TRANSLATOR, "The dolphin translator box."),
- _ale(2150, 1, 10, OBJECT_ALE, "A bottle of ale."),
- _paper(7700, 1, 12, OBJECT_PAPER, "A slip of paper with the numbers 2,4, and 3 written on it."),
- _waldos(0, 1, 14, OBJECT_WALDOS, "A pair of waldos from the ruined probe."),
- _stasisBox2(8100, 1, 4, OBJECT_STASIS_BOX2, "A stasis box."),
- _ring(8100, 2, 5, OBJECT_RING, "This is a signet ring sent to you by Louis Wu."),
- _cloak(9850, 2, 6, OBJECT_CLOAK, "A fine silk cloak."),
- _tunic(9450, 2, 7, OBJECT_TUNIC, "The patriarch's soiled tunic."),
- _candle(9500, 2, 8, OBJECT_CANDLE, "A tallow candle."),
- _straw(9400, 2, 9, OBJECT_STRAW, "Clean, dry straw."),
- _scimitar(9850, 1, 18, OBJECT_SCIMITAR, "A scimitar from the Patriarch's closet."),
- _sword(9850, 1, 17, OBJECT_SWORD, "A short sword from the Patriarch's closet."),
- _helmet(9500, 2, 4, OBJECT_HELMET, "Some type of helmet."),
- _items(4300, 2, 10, OBJECT_ITEMS, "Two interesting items from the Tnuctipun vessel."),
- _concentrator(4300, 2, 11, OBJECT_CONCENTRATOR, "The Tnuctipun anti-matter concentrator contained in a stasis field."),
- _nullifier(5200, 2, 12, OBJECT_NULLIFIER, "A purported neural wave nullifier."),
- _peg(4045, 2, 16, OBJECT_PEG, "A peg with a symbol."),
- _vial(5100, 2, 17, OBJECT_VIAL, "A vial of the bat creatures anti-pheromone drug."),
- _jacket(9850, 3, 1, OBJECT_JACKET, "A natty padded jacket."),
- _tunic2(9850, 3, 2, OBJECT_TUNIC2, "A very hairy tunic."),
- _bone(5300, 3, 5, OBJECT_BONE, "A very sharp bone."),
- _jar(7700, 3, 4, OBJECT_JAR, "An jar filled with a green substance."),
- _emptyJar(7700, 3, 3, OBJECT_EMPTY_JAR, "An empty jar.") {
-
- // Add the items to the list
- _itemList.push_back(&_stunner);
- _itemList.push_back(&_scanner);
- _itemList.push_back(&_stasisBox);
- _itemList.push_back(&_infoDisk);
- _itemList.push_back(&_stasisNegator);
- _itemList.push_back(&_keyDevice);
- _itemList.push_back(&_medkit);
- _itemList.push_back(&_ladder);
- _itemList.push_back(&_rope);
- _itemList.push_back(&_key);
- _itemList.push_back(&_translator);
- _itemList.push_back(&_ale);
- _itemList.push_back(&_paper);
- _itemList.push_back(&_waldos);
- _itemList.push_back(&_stasisBox2);
- _itemList.push_back(&_ring);
- _itemList.push_back(&_cloak);
- _itemList.push_back(&_tunic);
- _itemList.push_back(&_candle);
- _itemList.push_back(&_straw);
- _itemList.push_back(&_scimitar);
- _itemList.push_back(&_sword);
- _itemList.push_back(&_helmet);
- _itemList.push_back(&_items);
- _itemList.push_back(&_concentrator);
- _itemList.push_back(&_nullifier);
- _itemList.push_back(&_peg);
- _itemList.push_back(&_vial);
- _itemList.push_back(&_jacket);
- _itemList.push_back(&_tunic2);
- _itemList.push_back(&_bone);
- _itemList.push_back(&_jar);
- _itemList.push_back(&_emptyJar);
-
+InvObjectList::InvObjectList() {
_selectedItem = NULL;
}
-void InvObjectList::synchronise(Serialiser &s) {
- SavedObject::synchronise(s);
+void InvObjectList::synchronize(Serializer &s) {
+ SavedObject::synchronize(s);
SYNC_POINTER(_selectedItem);
}
@@ -155,17 +84,17 @@ void EventHandler::dispatch() {
if (_action) _action->dispatch();
}
-void EventHandler::setAction(Action *action, EventHandler *fmt, ...) {
+void EventHandler::setAction(Action *action, EventHandler *endHandler, ...) {
if (_action) {
- _action->_fmt = NULL;
+ _action->_endHandler = NULL;
_action->remove();
}
_action = action;
if (action) {
va_list va;
- va_start(va, fmt);
- _action->attached(this, fmt, va);
+ va_start(va, endHandler);
+ _action->attached(this, endHandler, va);
va_end(va);
}
}
@@ -175,20 +104,21 @@ void EventHandler::setAction(Action *action, EventHandler *fmt, ...) {
Action::Action() {
_actionIndex = 0;
_owner = NULL;
- _fmt = NULL;
+ _endHandler = NULL;
+ _attached = false;
}
-void Action::synchronise(Serialiser &s) {
- EventHandler::synchronise(s);
- if (s.isLoading())
+void Action::synchronize(Serializer &s) {
+ EventHandler::synchronize(s);
+ if (s.getVersion() == 1)
remove();
SYNC_POINTER(_owner);
s.syncAsSint32LE(_actionIndex);
s.syncAsSint32LE(_delayFrames);
s.syncAsUint32LE(_startFrame);
- s.syncAsSint16LE(_field16);
- SYNC_POINTER(_fmt);
+ s.syncAsByte(_attached);
+ SYNC_POINTER(_endHandler);
}
void Action::remove() {
@@ -202,9 +132,9 @@ void Action::remove() {
_globals->_sceneManager.removeAction(this);
}
- _field16 = 0;
- if (_fmt)
- _fmt->signal();
+ _attached = false;
+ if (_endHandler)
+ _endHandler->signal();
}
void Action::process(Event &event) {
@@ -230,13 +160,13 @@ void Action::dispatch() {
}
}
-void Action::attached(EventHandler *newOwner, EventHandler *fmt, va_list va) {
+void Action::attached(EventHandler *newOwner, EventHandler *endHandler, va_list va) {
_actionIndex = 0;
_delayFrames = 0;
_startFrame = _globals->_events.getFrameNumber();
_owner = newOwner;
- _fmt = fmt;
- _field16 = 1;
+ _endHandler = endHandler;
+ _attached = true;
signal();
}
@@ -252,15 +182,15 @@ ObjectMover::~ObjectMover() {
_sceneObject->_mover = NULL;
}
-void ObjectMover::synchronise(Serialiser &s) {
- EventHandler::synchronise(s);
+void ObjectMover::synchronize(Serializer &s) {
+ EventHandler::synchronize(s);
s.syncAsSint16LE(_destPosition.x); s.syncAsSint16LE(_destPosition.y);
s.syncAsSint16LE(_moveDelta.x); s.syncAsSint16LE(_moveDelta.y);
s.syncAsSint16LE(_moveSign.x); s.syncAsSint16LE(_moveSign.y);
s.syncAsSint32LE(_minorDiff);
s.syncAsSint32LE(_majorDiff);
- s.syncAsSint32LE(_field1A);
+ s.syncAsSint32LE(_changeCtr);
SYNC_POINTER(_action);
SYNC_POINTER(_sceneObject);
}
@@ -294,10 +224,10 @@ void ObjectMover::dispatch() {
ySign = _moveSign.y;
else {
int v = yAmount / yChange;
- _field1A += yAmount % yChange;
- if (_field1A >= yChange) {
+ _changeCtr += yAmount % yChange;
+ if (_changeCtr >= yChange) {
++v;
- _field1A -= yChange;
+ _changeCtr -= yChange;
}
ySign = _moveSign.y * v;
@@ -320,10 +250,10 @@ void ObjectMover::dispatch() {
xSign = _moveSign.x;
else {
int v = xAmount / xChange;
- _field1A += xAmount % xChange;
- if (_field1A >= xChange) {
+ _changeCtr += xAmount % xChange;
+ if (_changeCtr >= xChange) {
++v;
- _field1A -= xChange;
+ _changeCtr -= xChange;
}
xSign = _moveSign.x * v;
@@ -373,7 +303,7 @@ void ObjectMover::setup(const Common::Point &destPos) {
_destPosition = destPos;
_moveDelta = Common::Point(diffX, diffY);
_moveSign = Common::Point(xSign, ySign);
- _field1A = 0;
+ _changeCtr = 0;
if (!diffX && !diffY)
// Object is already at the correct destination
@@ -398,8 +328,8 @@ ObjectMover2::ObjectMover2() : ObjectMover() {
_destObject = NULL;
}
-void ObjectMover2::synchronise(Serialiser &s) {
- ObjectMover::synchronise(s);
+void ObjectMover2::synchronize(Serializer &s) {
+ ObjectMover::synchronize(s);
SYNC_POINTER(_destObject);
s.syncAsSint32LE(_minArea);
@@ -474,8 +404,8 @@ void NpcMover::startMove(SceneObject *sceneObj, va_list va) {
/*--------------------------------------------------------------------------*/
-void PlayerMover::synchronise(Serialiser &s) {
- NpcMover::synchronise(s);
+void PlayerMover::synchronize(Serializer &s) {
+ NpcMover::synchronize(s);
s.syncAsSint16LE(_finalDest.x); s.syncAsSint16LE(_finalDest.y);
s.syncAsSint32LE(_routeIndex);
@@ -627,7 +557,6 @@ void PlayerMover::pathfind(Common::Point *routeList, Common::Point srcPos, Commo
} while (routeRegions[++idx] != destRegion);
tempList[idx] = 1;
- idx = 0;
for (int listIndex = 1; listIndex <= endIndex; ++listIndex) {
int var10 = tempList[listIndex];
int var12 = tempList[listIndex + 1];
@@ -997,9 +926,11 @@ bool PlayerMover::sub_F8E5(const Common::Point &pt1, const Common::Point &pt2, c
/*--------------------------------------------------------------------------*/
-void PlayerMover2::synchronise(Serialiser &s) {
+void PlayerMover2::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ PlayerMover::synchronize(s);
SYNC_POINTER(_destObject);
- s.syncAsSint16LE(_field7E);
+ s.syncAsSint16LE(_maxArea);
s.syncAsSint16LE(_minArea);
}
@@ -1016,7 +947,7 @@ void PlayerMover2::dispatch() {
void PlayerMover2::startMove(SceneObject *sceneObj, va_list va) {
_sceneObject = sceneObj;
- _field7E = va_arg(va, int);
+ _maxArea = va_arg(va, int);
_minArea = va_arg(va, int);
_destObject = va_arg(va, SceneObject *);
@@ -1036,18 +967,35 @@ PaletteModifier::PaletteModifier() {
/*--------------------------------------------------------------------------*/
-PaletteRotation::PaletteRotation() : PaletteModifier() {
- _disabled = false;
- _delayFrames = 0;
+PaletteModifierCached::PaletteModifierCached(): PaletteModifier() {
+ _step = 0;
+ _percent = 0;
+}
+
+void PaletteModifierCached::setPalette(ScenePalette *palette, int step) {
+ _scenePalette = palette;
+ _step = step;
+ _percent = 100;
+}
+
+void PaletteModifierCached::synchronize(Serializer &s) {
+ PaletteModifier::synchronize(s);
+
+ s.syncAsByte(_step);
+ s.syncAsSint32LE(_percent);
+}
+
+/*--------------------------------------------------------------------------*/
+
+PaletteRotation::PaletteRotation() : PaletteModifierCached() {
+ _percent = 0;
_delayCtr = 0;
_frameNumber = _globals->_events.getFrameNumber();
}
-void PaletteRotation::synchronise(Serialiser &s) {
- PaletteModifier::synchronise(s);
+void PaletteRotation::synchronize(Serializer &s) {
+ PaletteModifierCached::synchronize(s);
- s.syncAsByte(_disabled);
- s.syncAsSint32LE(_delayFrames);
s.syncAsSint32LE(_delayCtr);
s.syncAsUint32LE(_frameNumber);
s.syncAsSint32LE(_currIndex);
@@ -1055,11 +1003,7 @@ void PaletteRotation::synchronise(Serialiser &s) {
s.syncAsSint32LE(_end);
s.syncAsSint32LE(_rotationMode);
s.syncAsSint32LE(_duration);
- for (int i = 0; i < 256; ++i) {
- s.syncAsByte(_palette[i].r);
- s.syncAsByte(_palette[i].g);
- s.syncAsByte(_palette[i].b);
- }
+ s.syncBytes(&_palette[0], 256 * 3);
}
void PaletteRotation::signal() {
@@ -1077,8 +1021,8 @@ void PaletteRotation::signal() {
if (_delayCtr)
return;
- _delayCtr = _delayFrames;
- if (_disabled)
+ _delayCtr = _percent;
+ if (_step)
return;
bool flag = true;
@@ -1120,17 +1064,17 @@ void PaletteRotation::signal() {
if (flag) {
int count2 = _currIndex - _start;
int count = _end - _currIndex;
- g_system->getPaletteManager()->setPalette((const byte *)&_palette[_currIndex], _start, count);
+ g_system->getPaletteManager()->setPalette((const byte *)&_palette[_currIndex * 3], _start, count);
if (count2) {
- g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start], _start + count, count2);
+ g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start * 3], _start + count, count2);
}
}
}
void PaletteRotation::remove() {
Action *action = _action;
- g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start], _start, _end - _start);
+ g_system->getPaletteManager()->setPalette((const byte *)&_palette[_start * 3], _start, _end - _start);
_scenePalette->_listeners.remove(this);
@@ -1141,11 +1085,11 @@ void PaletteRotation::remove() {
void PaletteRotation::set(ScenePalette *palette, int start, int end, int rotationMode, int duration, Action *action) {
_duration = duration;
- _disabled = false;
+ _step = false;
_action = action;
_scenePalette = palette;
- Common::copy(&palette->_palette[0], &palette->_palette[256], &_palette[0]);
+ Common::copy(&palette->_palette[0], &palette->_palette[256 * 3], &_palette[0]);
_start = start;
_end = end + 1;
@@ -1162,12 +1106,6 @@ void PaletteRotation::set(ScenePalette *palette, int start, int end, int rotatio
}
}
-void PaletteRotation::setPalette(ScenePalette *palette, bool disabled) {
- _scenePalette = palette;
- _disabled = disabled;
- _delayFrames = 100;
-}
-
bool PaletteRotation::decDuration() {
if (_duration) {
if (--_duration == 0) {
@@ -1179,26 +1117,20 @@ bool PaletteRotation::decDuration() {
}
void PaletteRotation::setDelay(int amount) {
- _delayFrames = _delayCtr = amount;
+ _percent = _delayCtr = amount;
}
/*--------------------------------------------------------------------------*/
-void PaletteUnknown::synchronise(Serialiser &s) {
- PaletteModifier::synchronise(s);
+void PaletteFader::synchronize(Serializer &s) {
+ PaletteModifierCached::synchronize(s);
s.syncAsSint16LE(_step);
s.syncAsSint16LE(_percent);
- s.syncAsSint16LE(_field12);
- s.syncAsSint16LE(_field14);
- for (int i = 0; i < 256; ++i) {
- s.syncAsByte(_palette[i].r);
- s.syncAsByte(_palette[i].g);
- s.syncAsByte(_palette[i].b);
- }
+ s.syncBytes(&_palette[0], 256 * 3);
}
-void PaletteUnknown::signal() {
+void PaletteFader::signal() {
_percent -= _step;
if (_percent > 0) {
_scenePalette->fade((byte *)_palette, true /* 256 */, _percent);
@@ -1207,35 +1139,43 @@ void PaletteUnknown::signal() {
}
}
-void PaletteUnknown::remove() {
- if (_scenePalette) {
- for (int i = 0; i < 256; i++)
- _scenePalette->_palette[i] = _palette[i];
- _scenePalette->refresh();
- _scenePalette->_listeners.remove(this);
- delete this;
- }
+void PaletteFader::remove() {
+ // Save of a copy of the object's action, since it will be used after the object is destroyed
+ Action *action = _action;
- if (_action)
- _action->signal();
+ Common::copy(&_palette[0], &_palette[256 * 3], &_scenePalette->_palette[0]);
+ _scenePalette->refresh();
+ _scenePalette->_listeners.remove(this);
+ delete this;
+
+ if (action)
+ action->signal();
}
/*--------------------------------------------------------------------------*/
ScenePalette::ScenePalette() {
// Set a default gradiant range
- for (int idx = 0; idx < 256; ++idx)
- _palette[idx].r = _palette[idx].g = _palette[idx].b = idx;
+ byte *palData = &_palette[0];
+ for (int idx = 0; idx < 256; ++idx) {
+ *palData++ = idx;
+ *palData++ = idx;
+ *palData++ = idx;
+ }
_field412 = 0;
}
+ScenePalette::~ScenePalette() {
+ clearListeners();
+}
+
ScenePalette::ScenePalette(int paletteNum) {
loadPalette(paletteNum);
}
bool ScenePalette::loadPalette(int paletteNum) {
- byte *palData = _vm->_dataManager->getResource(RES_PALETTE, paletteNum, 0, true);
+ byte *palData = _resourceManager->getResource(RES_PALETTE, paletteNum, 0, true);
if (!palData)
return false;
@@ -1243,25 +1183,25 @@ bool ScenePalette::loadPalette(int paletteNum) {
int palSize = READ_LE_UINT16(palData + 2);
assert(palSize <= 256);
- RGB8 *destP = &_palette[palStart];
- RGB8 *srcP = (RGB8 *)(palData + 6);
+ byte *destP = &_palette[palStart * 3];
+ byte *srcP = palData + 6;
- Common::copy(&srcP[0], &srcP[palSize], destP);
+ Common::copy(&srcP[0], &srcP[palSize * 3], destP);
DEALLOCATE(palData);
return true;
}
void ScenePalette::refresh() {
- // Set indexes for standard colours to closest colour in the palette
- _colours.background = indexOf(255, 255, 255); // White background
- _colours.foreground = indexOf(0, 0, 0); // Black foreground
- _redColour = indexOf(180, 0, 0); // Red-ish
- _greenColour = indexOf(0, 180, 0); // Green-ish
- _blueColour = indexOf(0, 0, 180); // Blue-ish
- _aquaColour = indexOf(0, 180, 180); // Aqua
- _purpleColour = indexOf(180, 0, 180); // Purple
- _limeColour = indexOf(180, 180, 0); // Lime
+ // Set indexes for standard colors to closest color in the palette
+ _colors.background = indexOf(255, 255, 255); // White background
+ _colors.foreground = indexOf(0, 0, 0); // Black foreground
+ _redColor = indexOf(180, 0, 0); // Red-ish
+ _greenColor = indexOf(0, 180, 0); // Green-ish
+ _blueColor = indexOf(0, 0, 180); // Blue-ish
+ _aquaColor = indexOf(0, 180, 180); // Aqua
+ _purpleColor = indexOf(180, 0, 180); // Purple
+ _limeColor = indexOf(180, 180, 0); // Lime
// Refresh the palette
g_system->getPaletteManager()->setPalette((const byte *)&_palette[0], 0, 256);
@@ -1271,27 +1211,31 @@ void ScenePalette::refresh() {
* Loads a section of the palette into the game palette
*/
void ScenePalette::setPalette(int index, int count) {
- g_system->getPaletteManager()->setPalette((const byte *)&_palette[index], index, count);
+ g_system->getPaletteManager()->setPalette((const byte *)&_palette[index * 3], index, count);
}
/**
- * Returns the palette index with the closest matching colour to that specified
+ * Returns the palette index with the closest matching color to that specified
* @param r R component
* @param g G component
* @param b B component
* @param threshold Closeness threshold.
- * @remarks A threshold may be provided to specify how close the matching colour must be
+ * @remarks A threshold may be provided to specify how close the matching color must be
*/
uint8 ScenePalette::indexOf(uint r, uint g, uint b, int threshold) {
int palIndex = -1;
+ byte *palData = &_palette[0];
for (int i = 0; i < 256; ++i) {
- int rDiff = abs(_palette[i].r - (int)r);
- int gDiff = abs(_palette[i].g - (int)g);
- int bDiff = abs(_palette[i].b - (int)b);
+ byte ir = *palData++;
+ byte ig = *palData++;
+ byte ib = *palData++;
+ int rDiff = abs(ir - (int)r);
+ int gDiff = abs(ig - (int)g);
+ int bDiff = abs(ib - (int)b);
int idxThreshold = rDiff * rDiff + gDiff * gDiff + bDiff * bDiff;
- if (idxThreshold <= threshold) {
+ if (idxThreshold < threshold) {
threshold = idxThreshold;
palIndex = i;
}
@@ -1310,13 +1254,16 @@ void ScenePalette::getPalette(int start, int count) {
}
void ScenePalette::signalListeners() {
- for (SynchronisedList<PaletteModifier *>::iterator i = _listeners.begin(); i != _listeners.end(); ++i) {
- (*i)->signal();
+ SynchronizedList<PaletteModifier *>::iterator i = _listeners.begin();
+ while (i != _listeners.end()) {
+ PaletteModifier *obj = *i;
+ ++i;
+ obj->signal();
}
}
void ScenePalette::clearListeners() {
- SynchronisedList<PaletteModifier *>::iterator i = _listeners.begin();
+ SynchronizedList<PaletteModifier *>::iterator i = _listeners.begin();
while (i != _listeners.end()) {
PaletteModifier *obj = *i;
++i;
@@ -1325,14 +1272,14 @@ void ScenePalette::clearListeners() {
}
void ScenePalette::fade(const byte *adjustData, bool fullAdjust, int percent) {
- RGB8 tempPalette[256];
+ byte tempPalette[256 * 3];
// Ensure the percent adjustment is within 0 - 100%
percent = CLIP(percent, 0, 100);
for (int palIndex = 0; palIndex < 256; ++palIndex) {
- const byte *srcP = (const byte *)&_palette[palIndex];
- byte *destP = (byte *)&tempPalette[palIndex].r;
+ const byte *srcP = (const byte *)&_palette[palIndex * 3];
+ byte *destP = &tempPalette[palIndex * 3];
for (int rgbIndex = 0; rgbIndex < 3; ++rgbIndex, ++srcP, ++destP) {
*destP = *srcP - ((*srcP - adjustData[rgbIndex]) * (100 - percent)) / 100;
@@ -1358,18 +1305,21 @@ PaletteRotation *ScenePalette::addRotation(int start, int end, int rotationMode,
return obj;
}
-PaletteUnknown *ScenePalette::addUnkPal(RGB8 *arrBufferRGB, int unkNumb, bool disabled, Action *action) {
- PaletteUnknown *paletteUnk = new PaletteUnknown();
- paletteUnk->_action = action;
- for (int i = 0; i < 256; i++) {
- if (unkNumb <= 1)
- paletteUnk->_palette[i] = arrBufferRGB[i];
- else
- paletteUnk->_palette[i] = arrBufferRGB[0];
+PaletteFader *ScenePalette::addFader(const byte *arrBufferRGB, int palSize, int percent, Action *action) {
+ PaletteFader *fader = new PaletteFader();
+ fader->_action = action;
+ for (int i = 0; i < 256 * 3; i += 3) {
+ fader->_palette[i] = *(arrBufferRGB + 0);
+ fader->_palette[i + 1] = *(arrBufferRGB + 1);
+ fader->_palette[i + 2] = *(arrBufferRGB + 2);
+
+ if (palSize > 1)
+ arrBufferRGB += 3;
}
-// PaletteRotation::setPalette(this, disabled);
- _globals->_scenePalette._listeners.push_back(paletteUnk);
- return paletteUnk;
+
+ fader->setPalette(this, percent);
+ _globals->_scenePalette._listeners.push_back(fader);
+ return fader;
}
@@ -1397,35 +1347,34 @@ void ScenePalette::changeBackground(const Rect &bounds, FadeMode fadeMode) {
_globals->_screenSurface.copyFrom(_globals->_sceneManager._scene->_backSurface,
bounds, Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), NULL);
- for (SynchronisedList<PaletteModifier *>::iterator i = tempPalette._listeners.begin(); i != tempPalette._listeners.end(); ++i)
+ for (SynchronizedList<PaletteModifier *>::iterator i = tempPalette._listeners.begin(); i != tempPalette._listeners.end(); ++i)
delete *i;
tempPalette._listeners.clear();
}
-void ScenePalette::synchronise(Serialiser &s) {
- for (int i = 0; i < 256; ++i) {
- s.syncAsByte(_palette[i].r);
- s.syncAsByte(_palette[i].g);
- s.syncAsByte(_palette[i].b);
- }
- s.syncAsSint32LE(_colours.foreground);
- s.syncAsSint32LE(_colours.background);
+void ScenePalette::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ SavedObject::synchronize(s);
+
+ s.syncBytes(_palette, 256 * 3);
+ s.syncAsSint32LE(_colors.foreground);
+ s.syncAsSint32LE(_colors.background);
s.syncAsSint32LE(_field412);
- s.syncAsByte(_redColour);
- s.syncAsByte(_greenColour);
- s.syncAsByte(_blueColour);
- s.syncAsByte(_aquaColour);
- s.syncAsByte(_purpleColour);
- s.syncAsByte(_limeColour);
+ s.syncAsByte(_redColor);
+ s.syncAsByte(_greenColor);
+ s.syncAsByte(_blueColor);
+ s.syncAsByte(_aquaColor);
+ s.syncAsByte(_purpleColor);
+ s.syncAsByte(_limeColor);
}
/*--------------------------------------------------------------------------*/
-void SceneItem::synchronise(Serialiser &s) {
- EventHandler::synchronise(s);
+void SceneItem::synchronize(Serializer &s) {
+ EventHandler::synchronize(s);
- _bounds.synchronise(s);
+ _bounds.synchronize(s);
s.syncString(_msg);
s.syncAsSint32LE(_fieldE);
s.syncAsSint32LE(_field10);
@@ -1473,7 +1422,7 @@ bool SceneItem::contains(const Common::Point &pt) {
}
void SceneItem::display(int resNum, int lineNum, ...) {
- Common::String msg = !resNum ? Common::String() : _vm->_dataManager->getMessage(resNum, lineNum);
+ Common::String msg = !resNum ? Common::String() : _resourceManager->getMessage(resNum, lineNum);
if (_globals->_sceneObjects->contains(&_globals->_sceneText)) {
_globals->_sceneText.remove();
@@ -1485,7 +1434,7 @@ void SceneItem::display(int resNum, int lineNum, ...) {
Rect textRect;
int maxWidth = 120;
bool keepOnscreen = false;
- bool centreText = true;
+ bool centerText = true;
if (resNum) {
va_list va;
@@ -1515,40 +1464,40 @@ void SceneItem::display(int resNum, int lineNum, ...) {
_globals->_sceneText._fontNumber = va_arg(va, int);
_globals->gfxManager()._font.setFontNumber(_globals->_sceneText._fontNumber);
break;
- case SET_BG_COLOUR: {
- // Set the background colour
- int bgColour = va_arg(va, int);
- _globals->gfxManager()._font._colours.background = bgColour;
- if (!bgColour)
+ case SET_BG_COLOR: {
+ // Set the background color
+ int bgColor = va_arg(va, int);
+ _globals->gfxManager()._font._colors.background = bgColor;
+ if (!bgColor)
_globals->gfxManager().setFillFlag(false);
break;
}
- case SET_FG_COLOUR:
- // Set the foreground colour
- _globals->_sceneText._colour1 = va_arg(va, int);
- _globals->gfxManager()._font._colours.foreground = _globals->_sceneText._colour1;
+ case SET_FG_COLOR:
+ // Set the foreground color
+ _globals->_sceneText._color1 = va_arg(va, int);
+ _globals->gfxManager()._font._colors.foreground = _globals->_sceneText._color1;
break;
case SET_KEEP_ONSCREEN:
// Suppresses immediate display
keepOnscreen = va_arg(va, int) != 0;
break;
- case SET_EXT_BGCOLOUR: {
- // Set secondary bg colour
+ case SET_EXT_BGCOLOR: {
+ // Set secondary bg color
int v = va_arg(va, int);
- _globals->_sceneText._colour2 = v;
- _globals->gfxManager()._font._colours2.background = v;
+ _globals->_sceneText._color2 = v;
+ _globals->gfxManager()._font._colors2.background = v;
break;
}
- case SET_EXT_FGCOLOUR: {
- // Set secondary fg colour
+ case SET_EXT_FGCOLOR: {
+ // Set secondary fg color
int v = va_arg(va, int);
- _globals->_sceneText._colour3 = v;
- _globals->gfxManager()._font._colours.foreground = v;
+ _globals->_sceneText._color3 = v;
+ _globals->gfxManager()._font._colors.foreground = v;
break;
}
case SET_POS_MODE:
// Set whether a custom x/y is used
- centreText = va_arg(va, int) != 0;
+ centerText = va_arg(va, int) != 0;
break;
case SET_TEXT_MODE:
// Set the text mode
@@ -1565,17 +1514,17 @@ void SceneItem::display(int resNum, int lineNum, ...) {
if (resNum) {
// Get required bounding size
_globals->gfxManager().getStringBounds(msg.c_str(), textRect, maxWidth);
- textRect.centre(pos.x, pos.y);
+ textRect.center(pos.x, pos.y);
textRect.contain(_globals->gfxManager()._bounds);
- if (centreText) {
- _globals->_sceneText._colour1 = _globals->_sceneText._colour2;
- _globals->_sceneText._colour2 = 0;
- _globals->_sceneText._colour3 = 0;
+ if (centerText) {
+ _globals->_sceneText._color1 = _globals->_sceneText._color2;
+ _globals->_sceneText._color2 = 0;
+ _globals->_sceneText._color3 = 0;
}
_globals->_sceneText.setup(msg);
- if (centreText) {
+ if (centerText) {
_globals->_sceneText.setPosition(Common::Point(
_globals->_sceneManager._scene->_sceneBounds.left + textRect.left,
_globals->_sceneManager._scene->_sceneBounds.top + textRect.top), 0);
@@ -1583,7 +1532,7 @@ void SceneItem::display(int resNum, int lineNum, ...) {
_globals->_sceneText.setPosition(pos, 0);
}
- _globals->_sceneText.setPriority2(255);
+ _globals->_sceneText.fixPriority(255);
_globals->_sceneObjects->draw();
}
@@ -1607,18 +1556,18 @@ void SceneItem::display(int resNum, int lineNum, ...) {
void SceneHotspot::doAction(int action) {
switch ((int)action) {
case CURSOR_LOOK:
- display(1, 0, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ display(1, 0, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
case CURSOR_USE:
- display(1, 5, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ display(1, 5, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
case CURSOR_TALK:
- display(1, 15, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ display(1, 15, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
case CURSOR_WALK:
break;
default:
- display(2, action, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ display(2, action, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
}
}
@@ -1634,13 +1583,13 @@ void NamedHotspot::doAction(int action) {
if (_lookLineNum == -1)
SceneHotspot::doAction(action);
else
- SceneItem::display(_resnum, _lookLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(_resnum, _lookLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
case CURSOR_USE:
if (_useLineNum == -1)
SceneHotspot::doAction(action);
else
- SceneItem::display(_resnum, _useLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(_resnum, _useLineNum, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
default:
SceneHotspot::doAction(action);
@@ -1648,7 +1597,7 @@ void NamedHotspot::doAction(int action) {
}
}
-void NamedHotspot::setup(const int ys, const int xe, const int ye, const int xs, const int resnum, const int lookLineNum, const int useLineNum) {
+void NamedHotspot::setup(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum) {
setBounds(ys, xe, ye, xs);
_resnum = resnum;
_lookLineNum = lookLineNum;
@@ -1656,6 +1605,13 @@ void NamedHotspot::setup(const int ys, const int xe, const int ye, const int xs,
_globals->_sceneItems.addItems(this, NULL);
}
+void NamedHotspot::synchronize(Serializer &s) {
+ SceneHotspot::synchronize(s);
+ s.syncAsSint16LE(_resnum);
+ s.syncAsSint16LE(_lookLineNum);
+ s.syncAsSint16LE(_useLineNum);
+}
+
/*--------------------------------------------------------------------------*/
void SceneObjectWrapper::setSceneObject(SceneObject *so) {
@@ -1664,8 +1620,8 @@ void SceneObjectWrapper::setSceneObject(SceneObject *so) {
so->_flags |= OBJFLAG_PANES;
}
-void SceneObjectWrapper::synchronise(Serialiser &s) {
- EventHandler::synchronise(s);
+void SceneObjectWrapper::synchronize(Serializer &s) {
+ EventHandler::synchronize(s);
SYNC_POINTER(_sceneObject);
}
@@ -1727,7 +1683,7 @@ SceneObject::SceneObject() : SceneHotspot() {
_moveDiff.y = 3;
_numFrames = 10;
_numFrames = 10;
- _field7A = 10;
+ _moveRate = 10;
_regionBitList = 0;
_sceneRegionId = 0;
_percent = 100;
@@ -1857,7 +1813,7 @@ void SceneObject::setPriority(int priority) {
}
}
-void SceneObject::setPriority2(int priority) {
+void SceneObject::fixPriority(int priority) {
if (priority == -1) {
_flags &= ~OBJFLAG_FIXED_PRIORITY;
} else {
@@ -1889,8 +1845,8 @@ void SceneObject::addMover(ObjectMover *mover, ...) {
if (mover) {
// Set up the assigned mover
_walkStartFrame = _globals->_events.getFrameNumber();
- if (_field7A != 0)
- _walkStartFrame = 60 / _field7A;
+ if (_moveRate != 0)
+ _walkStartFrame = 60 / _moveRate;
// Signal the mover that movement is beginning
va_list va;
@@ -1943,7 +1899,7 @@ int SceneObject::checkRegion(const Common::Point &pt) {
}
newY -= _yDiff;
- SynchronisedList<SceneObject *>::iterator i;
+ SynchronizedList<SceneObject *>::iterator i;
for (i = _globals->_sceneObjects->begin(); (regionIndex == 0) && (i != _globals->_sceneObjects->end()); ++i) {
if ((*i) && ((*i)->_flags & OBJFLAG_CHECK_REGION)) {
int objYDiff = (*i)->_position.y - _yDiff;
@@ -2062,8 +2018,8 @@ int SceneObject::getSpliceArea(const SceneObject *obj) {
return (xd * xd + yd) / 2;
}
-void SceneObject::synchronise(Serialiser &s) {
- SceneHotspot::synchronise(s);
+void SceneObject::synchronize(Serializer &s) {
+ SceneHotspot::synchronize(s);
s.syncAsUint32LE(_updateStartFrame);
s.syncAsUint32LE(_walkStartFrame);
@@ -2074,8 +2030,8 @@ void SceneObject::synchronise(Serialiser &s) {
s.syncAsUint32LE(_flags);
s.syncAsSint16LE(_xs);
s.syncAsSint16LE(_xe);
- _paneRects[0].synchronise(s);
- _paneRects[1].synchronise(s);
+ _paneRects[0].synchronize(s);
+ _paneRects[1].synchronize(s);
s.syncAsSint32LE(_visage);
SYNC_POINTER(_objectWrapper);
s.syncAsSint32LE(_strip);
@@ -2088,7 +2044,7 @@ void SceneObject::synchronise(Serialiser &s) {
s.syncAsSint32LE(_regionIndex);
SYNC_POINTER(_mover);
s.syncAsSint16LE(_moveDiff.x); s.syncAsSint16LE(_moveDiff.y);
- s.syncAsSint32LE(_field7A);
+ s.syncAsSint32LE(_moveRate);
SYNC_POINTER(_endAction);
s.syncAsUint32LE(_regionBitList);
}
@@ -2111,7 +2067,7 @@ void SceneObject::postInit(SceneObjectList *OwnerList) {
_yDiff = 0;
_moveDiff.x = 5;
_moveDiff.y = 3;
- _field7A = 10;
+ _moveRate = 10;
_regionIndex = 0x40;
_numFrames = 10;
_regionBitList = 0;
@@ -2138,8 +2094,8 @@ void SceneObject::dispatch() {
_action->dispatch();
if (_mover && (_walkStartFrame <= currTime)) {
- if (_field7A) {
- int frameInc = 60 / _field7A;
+ if (_moveRate) {
+ int frameInc = 60 / _moveRate;
_walkStartFrame = currTime + frameInc;
}
_mover->dispatch();
@@ -2235,7 +2191,6 @@ void SceneObject::removeObject() {
_globals->_sceneObjects->remove(this);
if (_visage) {
- _vm->_memoryManager.deallocate(_visage);
_visage = 0;
}
@@ -2247,8 +2202,9 @@ void SceneObject::removeObject() {
_mover->remove();
_mover = NULL;
}
- if (_flags & 0x800)
- destroy();
+ if (_flags & OBJFLAG_CLONED)
+ // Cloned temporary object, so delete it
+ delete this;
}
GfxSurface SceneObject::getFrame() {
@@ -2301,7 +2257,7 @@ void SceneObject::setup(int visage, int stripFrameNum, int frameNum, int posX, i
setStrip(stripFrameNum);
setFrame(frameNum);
setPosition(Common::Point(posX, posY), 0);
- setPriority2(priority);
+ fixPriority(priority);
}
/*--------------------------------------------------------------------------*/
@@ -2368,7 +2324,7 @@ void SceneObjectList::draw() {
uint32 flagMask = (paneNum == 0) ? OBJFLAG_PANE_0 : OBJFLAG_PANE_1;
// Initial loop to set up object list and update object position, priority, and flags
- for (SynchronisedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
+ for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
i != _globals->_sceneObjects->end(); ++i) {
SceneObject *obj = *i;
objList.push_back(obj);
@@ -2381,8 +2337,8 @@ void SceneObjectList::draw() {
// Handle updating object priority
if (!(obj->_flags & OBJFLAG_FIXED_PRIORITY)) {
- obj->_priority = MIN((int)obj->_position.y - 1,
- (int)_globals->_sceneManager._scene->_backgroundBounds.bottom);
+ obj->_priority = MIN((int)obj->_position.y,
+ (int)_globals->_sceneManager._scene->_backgroundBounds.bottom - 1);
}
if ((_globals->_paneRefreshFlag[paneNum] != 0) || !_globals->_paneRegions[paneNum].empty()) {
@@ -2522,7 +2478,7 @@ void SceneObjectList::activate() {
_globals->_sceneObjects_queue.push_front(this);
// Flag all the objects as modified
- SynchronisedList<SceneObject *>::iterator i;
+ SynchronizedList<SceneObject *>::iterator i;
for (i = begin(); i != end(); ++i) {
(*i)->_flags |= OBJFLAG_PANES;
}
@@ -2543,7 +2499,7 @@ void SceneObjectList::deactivate() {
_globals->_sceneObjects_queue.pop_front();
_globals->_sceneObjects = *_globals->_sceneObjects_queue.begin();
- SynchronisedList<SceneObject *>::iterator i;
+ SynchronizedList<SceneObject *>::iterator i;
for (i = objectList->begin(); i != objectList->end(); ++i) {
if (!((*i)->_flags & OBJFLAG_CLONED)) {
SceneObject *sceneObj = (*i)->clone();
@@ -2553,8 +2509,10 @@ void SceneObjectList::deactivate() {
}
}
-void SceneObjectList::synchronise(Serialiser &s) {
- _objList.synchronise(s);
+void SceneObjectList::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ SavedObject::synchronize(s);
+ _objList.synchronize(s);
}
/*--------------------------------------------------------------------------*/
@@ -2563,8 +2521,8 @@ SceneText::SceneText() : SceneObject() {
_fontNumber = 2;
_width = 160;
_textMode = ALIGN_LEFT;
- _colour2 = 0;
- _colour3 = 0;
+ _color2 = 0;
+ _color3 = 0;
}
SceneText::~SceneText() {
@@ -2576,16 +2534,18 @@ void SceneText::setup(const Common::String &msg) {
Rect textRect;
gfxMan._font.setFontNumber(_fontNumber);
- gfxMan._font._colours.foreground = _colour1;
- gfxMan._font._colours2.background = _colour2;
- gfxMan._font._colours2.foreground = _colour3;
+ gfxMan._font._colors.foreground = _color1;
+ gfxMan._font._colors2.background = _color2;
+ gfxMan._font._colors2.foreground = _color3;
gfxMan.getStringBounds(msg.c_str(), textRect, _width);
+ _bounds.setWidth(textRect.width());
+ _bounds.setHeight(textRect.height());
// Set up a new blank surface to hold the text
_textSurface.create(textRect.width(), textRect.height());
- _textSurface._transColour = 0xff;
- _textSurface.fillRect(textRect, _textSurface._transColour);
+ _textSurface._transColor = 0xff;
+ _textSurface.fillRect(textRect, _textSurface._transColor);
// Write the text to the surface
gfxMan._bounds = textRect;
@@ -2596,14 +2556,14 @@ void SceneText::setup(const Common::String &msg) {
gfxMan.deactivate();
}
-void SceneText::synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+void SceneText::synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsSint16LE(_fontNumber);
s.syncAsSint16LE(_width);
- s.syncAsSint16LE(_colour1);
- s.syncAsSint16LE(_colour2);
- s.syncAsSint16LE(_colour3);
+ s.syncAsSint16LE(_color1);
+ s.syncAsSint16LE(_color2);
+ s.syncAsSint16LE(_color3);
SYNC_ENUM(_textMode, TextAlign);
}
@@ -2638,7 +2598,7 @@ void Visage::setVisage(int resNum, int rlbNum) {
_resNum = resNum;
_rlbNum = rlbNum;
DEALLOCATE(_data);
- _data = _vm->_dataManager->getResource(RES_VISAGE, resNum, rlbNum);
+ _data = _resourceManager->getResource(RES_VISAGE, resNum, rlbNum);
assert(_data);
}
}
@@ -2654,7 +2614,7 @@ GfxSurface Visage::getFrame(int frameNum) {
if (frameNum > 0)
--frameNum;
- int offset = READ_UINT32(_data + 2 + frameNum * 4);
+ int offset = READ_LE_UINT32(_data + 2 + frameNum * 4);
byte *frameData = _data + offset;
return surfaceFromRes(frameData);
@@ -2666,6 +2626,12 @@ int Visage::getFrameCount() const {
/*--------------------------------------------------------------------------*/
+Player::Player(): SceneObject() {
+ _canWalk = false;
+ _uiEnabled = false;
+ _field8C = 0;
+}
+
void Player::postInit(SceneObjectList *OwnerList) {
SceneObject::postInit();
@@ -2715,8 +2681,8 @@ void Player::process(Event &event) {
}
}
-void Player::synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+void Player::synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsByte(_canWalk);
s.syncAsByte(_uiEnabled);
@@ -2728,9 +2694,20 @@ void Player::synchronise(Serialiser &s) {
Region::Region(int resNum, int rlbNum, ResourceType ctlType) {
_regionId = rlbNum;
- byte *regionData = _vm->_dataManager->getResource(ctlType, resNum, rlbNum);
+ byte *regionData = _resourceManager->getResource(ctlType, resNum, rlbNum);
assert(regionData);
+ load(regionData);
+
+ DEALLOCATE(regionData);
+}
+
+Region::Region(int regionId, const byte *regionData) {
+ _regionId = regionId;
+ load(regionData);
+}
+
+void Region::load(const byte *regionData) {
// Set the region bounds
_bounds.top = READ_LE_UINT16(regionData + 6);
_bounds.left = READ_LE_UINT16(regionData + 8);
@@ -2753,8 +2730,6 @@ Region::Region(int resNum, int rlbNum, ResourceType ctlType) {
_ySlices.push_back(sliceSet);
}
-
- DEALLOCATE(regionData);
}
/**
@@ -2940,7 +2915,7 @@ void Region::uniteRect(const Rect &rect) {
void SceneRegions::load(int sceneNum) {
clear();
- byte *regionData = _vm->_dataManager->getResource(RES_CONTROL, sceneNum, 9999, true);
+ byte *regionData = _resourceManager->getResource(RES_CONTROL, sceneNum, 9999, true);
if (regionData) {
int regionCount = READ_LE_UINT16(regionData);
@@ -3202,9 +3177,20 @@ void WalkRegions::clear() {
void WalkRegions::load(int sceneNum) {
clear();
-
_resNum = sceneNum;
- byte *regionData = _vm->_dataManager->getResource(RES_WALKRGNS, sceneNum, 1, true);
+
+ if (_vm->getFeatures() & GF_ALT_REGIONS) {
+ loadRevised();
+ } else {
+ loadOriginal();
+ }
+}
+
+/**
+ * This version handles loading walk regions for Ringworld floppy version and Demo #1
+ */
+void WalkRegions::loadOriginal() {
+ byte *regionData = _resourceManager->getResource(RES_WALKRGNS, _resNum, 1, true);
if (!regionData) {
// No data, so return
_resNum = -1;
@@ -3215,7 +3201,7 @@ void WalkRegions::load(int sceneNum) {
int dataSize;
// Load the field 18 list
- dataP = _vm->_dataManager->getResource(RES_WALKRGNS, sceneNum, 2);
+ dataP = _resourceManager->getResource(RES_WALKRGNS, _resNum, 2);
dataSize = _vm->_memoryManager.getSize(dataP);
assert(dataSize % 10 == 0);
@@ -3229,7 +3215,7 @@ void WalkRegions::load(int sceneNum) {
DEALLOCATE(dataP);
// Load the idx list
- dataP = _vm->_dataManager->getResource(RES_WALKRGNS, sceneNum, 3);
+ dataP = _resourceManager->getResource(RES_WALKRGNS, _resNum, 3);
dataSize = _vm->_memoryManager.getSize(dataP);
assert(dataSize % 2 == 0);
@@ -3240,7 +3226,7 @@ void WalkRegions::load(int sceneNum) {
DEALLOCATE(dataP);
// Load the secondary idx list
- dataP = _vm->_dataManager->getResource(RES_WALKRGNS, sceneNum, 4);
+ dataP = _resourceManager->getResource(RES_WALKRGNS, _resNum, 4);
dataSize = _vm->_memoryManager.getSize(dataP);
assert(dataSize % 2 == 0);
@@ -3251,7 +3237,7 @@ void WalkRegions::load(int sceneNum) {
DEALLOCATE(dataP);
// Handle the loading of the actual regions themselves
- dataP = _vm->_dataManager->getResource(RES_WALKRGNS, sceneNum, 5);
+ dataP = _resourceManager->getResource(RES_WALKRGNS, _resNum, 5);
byte *pWalkRegion = regionData + 16;
byte *srcP = dataP;
@@ -3264,7 +3250,7 @@ void WalkRegions::load(int sceneNum) {
wr._idxListIndex = READ_LE_UINT32(pWalkRegion + 4);
wr._idxList2Index = READ_LE_UINT32(pWalkRegion + 8);
- // Region in the region data
+ // Read in the region data
int size = READ_LE_UINT16(srcP);
srcP += 2;
wr.loadRegion(srcP, size);
@@ -3278,13 +3264,81 @@ void WalkRegions::load(int sceneNum) {
}
/**
+ * This version handles loading walk regions for Ringworld CD version and Demo #2. Given it's the newer
+ * version, it may also be used by future game titles
+ */
+void WalkRegions::loadRevised() {
+ byte *regionData = _resourceManager->getResource(RES_WALKRGNS, _resNum, 2, true);
+ if (!regionData) {
+ // No data, so return
+ _resNum = -1;
+ return;
+ }
+
+ byte *data1P = regionData + READ_LE_UINT32(regionData);
+ byte *data2P = regionData + READ_LE_UINT32(regionData + 4);
+ byte *data3P = regionData + READ_LE_UINT32(regionData + 8);
+ byte *data4P = regionData + READ_LE_UINT32(regionData + 12);
+ byte *regionOffset = regionData + 16;
+ int dataSize;
+
+ // Load the field 18 list
+ dataSize = READ_LE_UINT32(regionData + 8) - READ_LE_UINT32(regionData + 4);
+ assert(dataSize % 10 == 0);
+
+ byte *p = data2P;
+ for (int idx = 0; idx < (dataSize / 10); ++idx, p += 10) {
+ WRField18 rec;
+ rec.load(p);
+ _field18.push_back(rec);
+ }
+
+ // Load the idx list
+ dataSize = READ_LE_UINT32(regionData + 12) - READ_LE_UINT32(regionData + 8);
+ assert(dataSize % 2 == 0);
+
+ p = data3P;
+ for (int idx = 0; idx < (dataSize / 2); ++idx, p += 2)
+ _idxList.push_back(READ_LE_UINT16(p));
+
+ // Load the secondary idx list
+ dataSize = READ_LE_UINT32(regionData + 16) - READ_LE_UINT32(regionData + 12);
+ assert(dataSize % 2 == 0);
+
+ p = data4P;
+ for (int idx = 0; idx < (dataSize / 2); ++idx, p += 2)
+ _idxList2.push_back(READ_LE_UINT16(p));
+
+ // Handle the loading of the actual regions themselves
+ byte *pWalkRegion = data1P + 16;
+ for (; (int16)READ_LE_UINT16(pWalkRegion) != -20000; pWalkRegion += 16, regionOffset += 4) {
+ WalkRegion wr;
+ byte *srcP = regionData + READ_LE_UINT32(regionOffset);
+
+ // Set the Walk region specific fields
+ wr._pt.x = (int16)READ_LE_UINT16(pWalkRegion);
+ wr._pt.y = (int16)READ_LE_UINT16(pWalkRegion + 2);
+ wr._idxListIndex = READ_LE_UINT32(pWalkRegion + 4);
+ wr._idxList2Index = READ_LE_UINT32(pWalkRegion + 8);
+
+ // Read in the region data
+ wr._regionId = 0;
+ wr.load(srcP);
+
+ _regionList.push_back(wr);
+ }
+
+ DEALLOCATE(regionData);
+}
+
+/**
* Returns the index of the walk region that contains the given point
* @param pt Point to locate
* @param indexList List of region indexes that should be ignored
*/
int WalkRegions::indexOf(const Common::Point &pt, const Common::List<int> *indexList) {
for (uint idx = 0; idx < _regionList.size(); ++idx) {
- if ((!indexList || contains(*indexList, int(idx + 1))) && _regionList[idx].contains(pt))
+ if ((!indexList || !contains(*indexList, int(idx + 1))) && _regionList[idx].contains(pt))
return idx + 1;
}
@@ -3297,18 +3351,27 @@ void ScenePriorities::load(int resNum) {
_resNum = resNum;
clear();
- byte *regionData = _vm->_dataManager->getResource(RES_PRIORITY, resNum, 9999, true);
+ bool altMode = (_vm->getFeatures() & GF_ALT_REGIONS) != 0;
+ byte *regionData = _resourceManager->getResource(RES_PRIORITY, resNum, altMode ? 1 : 9999, true);
+ if (!regionData)
+ return;
- if (regionData) {
- int regionCount = READ_LE_UINT16(regionData);
- for (int regionCtr = 0; regionCtr < regionCount; ++regionCtr) {
+ int regionCount = READ_LE_UINT16(regionData);
+ for (int regionCtr = 0; regionCtr < regionCount; ++regionCtr) {
+ if (altMode) {
+ // Region data is embedded within the resource
+ uint16 regionId = READ_LE_UINT16(regionData + regionCtr * 6 + 2);
+ uint32 dataOffset = READ_LE_UINT32(regionData + regionCtr * 6 + 4);
+ push_back(Region(regionId, regionData + dataOffset));
+ } else {
+ // The data contains the index of another resource containing the region data
int rlbNum = READ_LE_UINT16(regionData + regionCtr * 6 + 2);
push_back(Region(resNum, rlbNum, RES_PRIORITY));
}
-
- DEALLOCATE(regionData);
}
+
+ DEALLOCATE(regionData);
}
Region *ScenePriorities::find(int priority) {
@@ -3319,7 +3382,7 @@ Region *ScenePriorities::find(int priority) {
if (priority > 255)
priority = 255;
- // Loop through the regions to find the closest for the givne priority level
+ // Loop through the regions to find the closest for the given priority level
int minRegionId = 9998;
Region *region = NULL;
for (ScenePriorities::iterator i = begin(); i != end(); ++i) {
@@ -3368,7 +3431,7 @@ GameHandler::GameHandler() : EventHandler() {
GameHandler::~GameHandler() {
if (_globals)
- _globals->_game.removeHandler(this);
+ _globals->_game->removeHandler(this);
}
void GameHandler::execute() {
@@ -3378,9 +3441,12 @@ void GameHandler::execute() {
}
}
-void GameHandler::synchronise(Serialiser &s) {
- _lockCtr.synchronise(s);
- _waitCtr.synchronise(s);
+void GameHandler::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ EventHandler::synchronize(s);
+
+ _lockCtr.synchronize(s);
+ _waitCtr.synchronize(s);
s.syncAsSint16LE(_nextWaitCtr);
s.syncAsSint16LE(_field14);
}
@@ -3394,7 +3460,7 @@ SceneHandler::SceneHandler() {
void SceneHandler::registerHandler() {
postInit();
- _globals->_game.addHandler(this);
+ _globals->_game->addHandler(this);
}
void SceneHandler::postInit(SceneObjectList *OwnerList) {
@@ -3406,21 +3472,7 @@ void SceneHandler::postInit(SceneObjectList *OwnerList) {
// TODO: Bunch of other scene related setup goes here
_globals->_soundManager.postInit();
- // Set some default flags and cursor
- _globals->setFlag(12);
- _globals->setFlag(34);
- _globals->_events.setCursor(CURSOR_WALK);
-
- // Set the screen to scroll in response to the player moving off-screen
- _globals->_scrollFollower = &_globals->_player;
-
- // Set the object's that will be in the player's inventory by default
- _globals->_inventory._stunner._sceneNumber = 1;
- _globals->_inventory._scanner._sceneNumber = 1;
- _globals->_inventory._ring._sceneNumber = 1;
-
- // Switch to the title screen
- _globals->_sceneManager.setNewScene(1000);
+ _globals->_game->start();
}
void SceneHandler::process(Event &event) {
@@ -3429,8 +3481,7 @@ void SceneHandler::process(Event &event) {
switch (event.kbd.keycode) {
case Common::KEYCODE_F1:
// F1 - Help
- _globals->_events.setCursor(CURSOR_ARROW);
- MessageDialog::show(HELP_MSG, OK_BTN_STRING);
+ MessageDialog::show((_vm->getFeatures() & GF_DEMO) ? DEMO_HELP_MSG : HELP_MSG, OK_BTN_STRING);
break;
case Common::KEYCODE_F2: {
@@ -3444,19 +3495,19 @@ void SceneHandler::process(Event &event) {
case Common::KEYCODE_F3:
// F3 - Quit
- _globals->_game.quitGame();
+ _globals->_game->quitGame();
event.handled = false;
break;
case Common::KEYCODE_F4:
// F4 - Restart
- _globals->_game.restartGame();
+ _globals->_game->restartGame();
_globals->_events.setCursorFromFlag();
break;
case Common::KEYCODE_F7:
// F7 - Restore
- _globals->_game.restoreGame();
+ _globals->_game->restoreGame();
_globals->_events.setCursorFromFlag();
break;
@@ -3493,7 +3544,7 @@ void SceneHandler::process(Event &event) {
// Separate check for F5 - Save key
if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_F5)) {
// F5 - Save
- _globals->_game.saveGame();
+ _globals->_game->saveGame();
event.handled = true;
_globals->_events.setCursorFromFlag();
}
@@ -3510,7 +3561,7 @@ void SceneHandler::process(Event &event) {
if (_globals->_player._uiEnabled && (event.eventType == EVENT_BUTTON_DOWN) &&
!_globals->_sceneItems.empty()) {
// Scan the item list to find one the mouse is within
- SynchronisedList<SceneItem *>::iterator i = _globals->_sceneItems.begin();
+ SynchronizedList<SceneItem *>::iterator i = _globals->_sceneItems.begin();
while ((i != _globals->_sceneItems.end()) && !(*i)->contains(event.mousePos))
++i;
@@ -3540,7 +3591,10 @@ void SceneHandler::dispatch() {
if (_saveGameSlot != -1) {
int saveSlot = _saveGameSlot;
_saveGameSlot = -1;
- if (_saver->save(saveSlot, _saveName) != Common::kNoError)
+ Common::Error err = _saver->save(saveSlot, _saveName);
+ // FIXME: Make use of the description string in err to enhance
+ // the error reported to the user.
+ if (err.getCode() != Common::kNoError)
GUIErrorMessage(SAVE_ERROR_MSG);
}
if (_loadGameSlot != -1) {
@@ -3585,7 +3639,7 @@ void SceneHandler::dispatchObject(EventHandler *obj) {
obj->dispatch();
}
-void SceneHandler::saveListener(Serialiser &ser) {
+void SceneHandler::saveListener(Serializer &ser) {
warning("TODO: SceneHandler::saveListener");
}
@@ -3597,7 +3651,7 @@ void Game::execute() {
do {
// Process all currently atcive game handlers
activeFlag = false;
- for (SynchronisedList<GameHandler *>::iterator i = _handlers.begin(); i != _handlers.end(); ++i) {
+ for (SynchronizedList<GameHandler *>::iterator i = _handlers.begin(); i != _handlers.end(); ++i) {
GameHandler *gh = *i;
if (gh->_lockCtr.getCtr() == 0) {
gh->execute();
@@ -3607,129 +3661,4 @@ void Game::execute() {
} while (activeFlag && !_vm->getEventManager()->shouldQuit());
}
-void Game::restartGame() {
- if (MessageDialog::show(RESTART_MSG, CANCEL_BTN_STRING, RESTART_BTN_STRING) == 1)
- _globals->_game.restart();
-}
-
-void Game::saveGame() {
- if (_globals->getFlag(50))
- MessageDialog::show(SAVING_NOT_ALLOWED_MSG, OK_BTN_STRING);
- else {
- // Show the save dialog
- handleSaveLoad(true, _globals->_sceneHandler._saveGameSlot, _globals->_sceneHandler._saveName);
- }
-}
-
-void Game::restoreGame() {
- if (_globals->getFlag(50))
- MessageDialog::show(RESTORING_NOT_ALLOWED_MSG, OK_BTN_STRING);
- else {
- // Show the load dialog
- handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName);
- }
-}
-
-void Game::quitGame() {
- if (MessageDialog::show(QUIT_CONFIRM_MSG, CANCEL_BTN_STRING, QUIT_BTN_STRING) == 1)
- _vm->quitGame();
-}
-
-void Game::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) {
- const EnginePlugin *plugin = 0;
- EngineMan.findGame(_vm->getGameId(), &plugin);
- GUI::SaveLoadChooser *dialog;
- if (saveFlag)
- dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"));
- else
- dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"));
-
- dialog->setSaveMode(saveFlag);
-
- saveSlot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
- saveName = dialog->getResultString();
-
- delete dialog;
-}
-
-void Game::restart() {
- _globals->_scenePalette.clearListeners();
- _globals->_soundHandler.proc3();
-
- // Reset the flags
- _globals->reset();
- _globals->setFlag(34);
-
- // Clear save/load slots
- _globals->_sceneHandler._saveGameSlot = -1;
- _globals->_sceneHandler._loadGameSlot = -1;
-
- _globals->_stripNum = 0;
- _globals->_events.setCursor(CURSOR_WALK);
-
- // Reset item properties
- _globals->_inventory._stunner._sceneNumber = 1;
- _globals->_inventory._scanner._sceneNumber = 1;
- _globals->_inventory._stasisBox._sceneNumber = 5200;
- _globals->_inventory._infoDisk._sceneNumber = 40;
- _globals->_inventory._stasisNegator._sceneNumber = 0;
- _globals->_inventory._keyDevice._sceneNumber = 0;
- _globals->_inventory._medkit._sceneNumber = 2280;
- _globals->_inventory._ladder._sceneNumber = 4100;
- _globals->_inventory._rope._sceneNumber = 4150;
- _globals->_inventory._key._sceneNumber = 7700;
- _globals->_inventory._translator._sceneNumber = 2150;
- _globals->_inventory._paper._sceneNumber = 7700;
- _globals->_inventory._waldos._sceneNumber = 0;
- _globals->_inventory._ring._sceneNumber = 1;
- _globals->_inventory._stasisBox2._sceneNumber = 8100;
- _globals->_inventory._cloak._sceneNumber = 9850;
- _globals->_inventory._tunic._sceneNumber = 9450;
- _globals->_inventory._candle._sceneNumber = 9500;
- _globals->_inventory._straw._sceneNumber = 9400;
- _globals->_inventory._scimitar._sceneNumber = 9850;
- _globals->_inventory._sword._sceneNumber = 9850;
- _globals->_inventory._helmet._sceneNumber = 9500;
- _globals->_inventory._items._sceneNumber = 4300;
- _globals->_inventory._concentrator._sceneNumber = 4300;
- _globals->_inventory._nullifier._sceneNumber = 4300;
- _globals->_inventory._peg._sceneNumber = 4045;
- _globals->_inventory._vial._sceneNumber = 5100;
- _globals->_inventory._jacket._sceneNumber = 9850;
- _globals->_inventory._tunic2._sceneNumber = 9850;
- _globals->_inventory._bone._sceneNumber = 5300;
- _globals->_inventory._jar._sceneNumber = 7700;
- _globals->_inventory._emptyJar._sceneNumber = 7700;
-
- // Change to the first game scene
- _globals->_sceneManager.changeScene(30);
-}
-
-void Game::endGame(int resNum, int lineNum) {
- _globals->_events.setCursor(CURSOR_WALK);
- Common::String msg = _vm->_dataManager->getMessage(resNum, lineNum);
- bool savesExist = _saver->savegamesExist();
-
- if (!savesExist) {
- // No savegames exist, so prompt the user to restart or quit
- if (MessageDialog::show(msg, QUIT_BTN_STRING, RESTART_BTN_STRING) == 0)
- _vm->quitGame();
- else
- restart();
- } else {
- // Savegames exist, so prompt for Restore/Restart
- bool breakFlag;
- do {
- if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0) {
- breakFlag = true;
- } else {
- handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName);
- breakFlag = _globals->_sceneHandler._loadGameSlot > 0;
- }
- } while (!breakFlag);
- }
-
- _globals->_events.setCursorFromFlag();
-}
-
} // End of namespace tSage
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 77923606d1..001b478fc9 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -47,7 +47,7 @@ class SceneObject;
class SceneObjectList;
class ObjectMover;
class Action;
-class Serialiser;
+class Serializer;
class InvObject : public SavedObject {
public:
@@ -66,54 +66,20 @@ public:
void setCursor();
virtual Common::String getClassName() { return "InvObject"; }
- virtual void synchronise(Serialiser &s) {
+ virtual void synchronize(Serializer &s) {
s.syncAsUint16LE(_sceneNumber);
}
};
class InvObjectList : public SavedObject {
public:
- InvObject _stunner;
- InvObject _scanner;
- InvObject _stasisBox;
- InvObject _infoDisk;
- InvObject _stasisNegator;
- InvObject _keyDevice;
- InvObject _medkit;
- InvObject _ladder;
- InvObject _rope;
- InvObject _key;
- InvObject _translator;
- InvObject _ale;
- InvObject _paper;
- InvObject _waldos;
- InvObject _stasisBox2;
- InvObject _ring;
- InvObject _cloak;
- InvObject _tunic;
- InvObject _candle;
- InvObject _straw;
- InvObject _scimitar;
- InvObject _sword;
- InvObject _helmet;
- InvObject _items;
- InvObject _concentrator;
- InvObject _nullifier;
- InvObject _peg;
- InvObject _vial;
- InvObject _jacket;
- InvObject _tunic2;
- InvObject _bone;
- InvObject _jar;
- InvObject _emptyJar;
-
- SynchronisedList<InvObject *> _itemList;
+ SynchronizedList<InvObject *> _itemList;
InvObject *_selectedItem;
-public:
+
InvObjectList();
virtual Common::String getClassName() { return "InvObjectList"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
};
/*--------------------------------------------------------------------------*/
@@ -139,7 +105,7 @@ public:
int incCtr() { return ++_ctr; }
int getCtr() const { return _ctr; }
- virtual void synchronise(Serialiser &s) { s.syncAsSint16LE(_ctr); }
+ virtual void synchronize(Serializer &s) { s.syncAsSint16LE(_ctr); }
};
class EventHandler : public SavedObject {
@@ -149,7 +115,7 @@ public:
EventHandler() : SavedObject() { _action = NULL; }
virtual ~EventHandler() { destroy(); }
- virtual void synchronise(Serialiser &s) { SYNC_POINTER(_action); }
+ virtual void synchronize(Serializer &s) { SYNC_POINTER(_action); }
virtual Common::String getClassName() { return "EventHandler"; }
virtual void postInit(SceneObjectList *OwnerList = NULL) {}
virtual void remove() {}
@@ -157,7 +123,7 @@ public:
virtual void process(Event &event) {}
virtual void dispatch();
virtual void setAction(Action *action) { setAction(action, NULL); }
- virtual void setAction(Action *action, EventHandler *fmt, ...);
+ virtual void setAction(Action *action, EventHandler *endHandler, ...);
virtual void destroy() {};
};
@@ -167,22 +133,22 @@ public:
int _actionIndex;
int _delayFrames;
uint32 _startFrame;
- int _field16;
- EventHandler *_fmt;
+ bool _attached;
+ EventHandler *_endHandler;
Action();
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "Action"; }
virtual void remove();
virtual void process(Event &event);
virtual void dispatch();
- virtual void attached(EventHandler *newOwner, EventHandler *fmt, va_list va);
+ virtual void attached(EventHandler *newOwner, EventHandler *endHandler, va_list va);
- void attach(EventHandler *newOwner, EventHandler *fmt, ...) {
+ void attach(EventHandler *newOwner, EventHandler *endHandler, ...) {
va_list va;
- va_start(va, fmt);
- attached(newOwner, fmt, va);
+ va_start(va, endHandler);
+ attached(newOwner, endHandler, va);
va_end(va);
}
int getActionIndex() const { return _actionIndex; }
@@ -202,14 +168,14 @@ public:
Common::Point _moveSign;
int _minorDiff;
int _majorDiff;
- int _field1A;
+ int _changeCtr;
Action *_action;
SceneObject *_sceneObject;
public:
ObjectMover() { _action = NULL; _sceneObject = NULL; }
virtual ~ObjectMover();
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "ObjectMover"; }
virtual void remove();
virtual void dispatch();
@@ -228,7 +194,7 @@ public:
ObjectMover2();
virtual ~ObjectMover2() {}
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "ObjectMover2"; }
virtual void dispatch();
virtual void startMove(SceneObject *sceneObj, va_list va);
@@ -278,7 +244,7 @@ public:
Common::Point _routeList[MAX_ROUTE_SIZE];
int _routeIndex;
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "PlayerMover"; }
virtual void startMove(SceneObject *sceneObj, va_list va);
virtual void endMove();
@@ -287,11 +253,11 @@ public:
class PlayerMover2 : public PlayerMover {
public:
SceneObject *_destObject;
- int _field7E;
+ int _maxArea;
int _minArea;
PlayerMover2() : PlayerMover() { _destObject = NULL; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "PlayerMover2"; }
virtual void dispatch();
virtual void startMove(SceneObject *sceneObj, va_list va);
@@ -309,7 +275,7 @@ public:
public:
PaletteModifier();
- virtual void synchronise(Serialiser &s) {
+ virtual void synchronize(Serializer &s) {
SYNC_POINTER(_scenePalette);
SYNC_POINTER(_action);
}
@@ -317,10 +283,21 @@ public:
virtual void remove() = 0;
};
-class PaletteRotation : public PaletteModifier {
+class PaletteModifierCached: public PaletteModifier {
+public:
+ byte _palette[256 * 3];
+ int _step;
+ int _percent;
+
+ PaletteModifierCached();
+
+ void setPalette(ScenePalette *palette, int step);
+ virtual Common::String getClassName() { return "PaletteModifierCached"; }
+ virtual void synchronize(Serializer &s);
+};
+
+class PaletteRotation: public PaletteModifierCached {
public:
- bool _disabled;
- int _delayFrames;
int _delayCtr;
uint32 _frameNumber;
int _currIndex;
@@ -328,53 +305,51 @@ public:
int _end;
int _rotationMode;
int _duration;
- RGB8 _palette[256];
public:
PaletteRotation();
virtual Common::String getClassName() { return "PaletteRotation"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void signal();
virtual void remove();
- void setDisabled(bool v) { _disabled = v; }
+ void setStep(int step) { _step = step; }
void set(ScenePalette *palette, int start, int end, int rotationMode, int duration, Action *action);
- void setPalette(ScenePalette *palette, bool disabled);
bool decDuration();
void setDelay(int amount);
};
-/*--------------------------------------------------------------------------*/
-
-class PaletteUnknown : public PaletteModifier {
+class PaletteFader: public PaletteModifierCached {
public:
- int _step, _percent, _field12, _field14;
- RGB8 _palette[256];
+ byte _palette[256 * 3];
public:
- virtual Common::String getClassName() { return "PaletteUnknown"; }
- virtual void synchronise(Serialiser &s);
+ virtual Common::String getClassName() { return "PaletteFader"; }
+ virtual void synchronize(Serializer &s);
virtual void signal();
virtual void remove();
};
+/*--------------------------------------------------------------------------*/
+
enum FadeMode {FADEMODE_NONE = 0, FADEMODE_GRADUAL = 1, FADEMODE_IMMEDIATE = 2};
class ScenePalette : public SavedObject {
public:
- RGB8 _palette[256];
- GfxColours _colours;
- SynchronisedList<PaletteModifier *> _listeners;
+ byte _palette[256 * 3];
+ GfxColors _colors;
+ SynchronizedList<PaletteModifier *> _listeners;
int _field412;
- uint8 _redColour;
- uint8 _greenColour;
- uint8 _blueColour;
- uint8 _aquaColour;
- uint8 _purpleColour;
- uint8 _limeColour;
+ uint8 _redColor;
+ uint8 _greenColor;
+ uint8 _blueColor;
+ uint8 _aquaColor;
+ uint8 _purpleColor;
+ uint8 _limeColor;
public:
ScenePalette();
ScenePalette(int paletteNum);
+ ~ScenePalette();
bool loadPalette(int paletteNum);
void refresh();
@@ -385,11 +360,11 @@ public:
void clearListeners();
void fade(const byte *adjustData, bool fullAdjust, int percent);
PaletteRotation *addRotation(int start, int end, int rotationMode, int duration = 0, Action *action = NULL);
- PaletteUnknown *addUnkPal(RGB8 *arrBufferRGB, int unkNumb, bool disabled, Action *action);
+ PaletteFader *addFader(const byte *arrBufferRGB, int palSize, int percent, Action *action);
static void changeBackground(const Rect &bounds, FadeMode fadeMode);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "ScenePalette"; }
};
@@ -398,11 +373,11 @@ const int SET_WIDTH = 0;
const int SET_X = 1;
const int SET_Y = 2;
const int SET_FONT = 3;
-const int SET_BG_COLOUR = 4;
-const int SET_FG_COLOUR = 5;
+const int SET_BG_COLOR = 4;
+const int SET_FG_COLOR = 5;
const int SET_KEEP_ONSCREEN = 6;
-const int SET_EXT_BGCOLOUR = 7;
-const int SET_EXT_FGCOLOUR = 8;
+const int SET_EXT_BGCOLOR = 7;
+const int SET_EXT_FGCOLOR = 8;
const int SET_POS_MODE = 9;
const int SET_TEXT_MODE = 10;
const int LIST_END = -999;
@@ -418,7 +393,7 @@ public:
public:
SceneItem() : EventHandler() { _msg = "Feature"; _action = NULL; _sceneRegionId = 0; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "SceneItem"; }
virtual void remove();
virtual void destroy() {}
@@ -430,7 +405,7 @@ public:
void setBounds(const int ys, const int xe, const int ye, const int xs) { _bounds = Rect(MIN(xs, xe), MIN(ys, ye), MAX(xs, xe), MAX(ys, ye)); }
static void display(int resNum, int lineNum, ...);
static void display2(int resNum, int lineNum) {
- display(resNum, lineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ display(resNum, lineNum, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
}
};
@@ -439,8 +414,8 @@ public:
int _state;
virtual Common::String getClassName() { return "SceneItemExt"; }
- virtual void synchronise(Serialiser &s) {
- SceneItem::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ SceneItem::synchronize(s);
s.syncAsSint16LE(_state);
}
};
@@ -458,9 +433,10 @@ public:
int _resnum, _lookLineNum, _useLineNum;
NamedHotspot() : SceneHotspot() {}
- void setup(const int ys, const int xe, const int ye, const int xs, const int resnum, const int lookLineNum, const int useLineNum);
+ void setup(int ys, int xs, int ye, int xe, const int resnum, const int lookLineNum, const int useLineNum);
virtual void doAction(int action);
virtual Common::String getClassName() { return "NamedHotspot"; }
+ virtual void synchronize(Serializer &s);
};
enum AnimateMode {ANIM_MODE_NONE = 0, ANIM_MODE_1 = 1, ANIM_MODE_2 = 2, ANIM_MODE_3 = 3,
@@ -496,7 +472,7 @@ public:
void setSceneObject(SceneObject *so);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "SceneObjectWrapper"; }
virtual void remove();
virtual void dispatch();
@@ -538,7 +514,7 @@ public:
int _regionIndex;
EventHandler *_mover;
Common::Point _moveDiff;
- int _field7A;
+ int _moveRate;
Action *_endAction;
uint32 _regionBitList;
public:
@@ -555,7 +531,7 @@ public:
void setFrame(int frameNum);
void setFrame2(int frameNum);
void setPriority(int priority);
- void setPriority2(int priority);
+ void fixPriority(int priority);
void setVisage(int visage);
void setObjectWrapper(SceneObjectWrapper *objWrapper);
void addMover(ObjectMover *mover, ...);
@@ -570,7 +546,7 @@ public:
int getSpliceArea(const SceneObject *obj);
int getFrameCount();
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "SceneObject"; }
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void remove();
@@ -590,8 +566,8 @@ class SceneObjectExt : public SceneObject {
public:
int _state;
- virtual void synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsSint16LE(_state);
}
virtual Common::String getClassName() { return "SceneObjectExt"; }
@@ -602,9 +578,9 @@ public:
int _fontNumber;
int _width;
TextAlign _textMode;
- int _colour1;
- int _colour2;
- int _colour3;
+ int _color1;
+ int _color2;
+ int _color3;
GfxSurface _textSurface;
public:
SceneText();
@@ -612,7 +588,7 @@ public:
void setup(const Common::String &msg);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "SceneText"; }
virtual GfxSurface getFrame() { return _textSurface; }
};
@@ -623,10 +599,10 @@ public:
bool _uiEnabled;
int _field8C;
public:
- Player() : SceneObject() {}
+ Player();
virtual Common::String getClassName() { return "Player"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void process(Event &event);
@@ -669,7 +645,9 @@ public:
public:
Region() { _regionSize = 0; _regionId = 0; }
Region(int resNum, int rlbNum, ResourceType ctlType = RES_CONTROL);
+ Region(int regionId, const byte *regionData);
+ void load(const byte *regionData);
bool contains(const Common::Point &pt);
bool empty() const;
void clear();
@@ -695,14 +673,14 @@ class SceneObjectList : public SavedObject {
private:
void checkIntersection(Common::Array<SceneObject *> &ObjList, uint ObjIndex, int PaneNum);
- SynchronisedList<SceneObject *> _objList;
+ SynchronizedList<SceneObject *> _objList;
bool _listAltered;
public:
SceneObjectList() { _listAltered = false; }
void sortList(Common::Array<SceneObject *> &ObjList);
virtual Common::String getClassName() { return "SceneObjectList"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
void draw();
void activate();
@@ -712,14 +690,15 @@ public:
void recurse(EventHandlerFn Fn) {
// Loop through each object
_listAltered = false;
- for (SynchronisedList<SceneObject *>::iterator i = _objList.begin(); i != _objList.end() && !_listAltered; ) {
+ for (SynchronizedList<SceneObject *>::iterator i = _objList.begin(); i != _objList.end() && !_listAltered; ) {
SceneObject *o = *i;
++i;
Fn(o);
}
}
- SynchronisedList<SceneObject *>::iterator begin() { return _objList.begin(); }
- SynchronisedList<SceneObject *>::iterator end() { return _objList.end(); }
+ SynchronizedList<SceneObject *>::iterator begin() { return _objList.begin(); }
+ SynchronizedList<SceneObject *>::iterator end() { return _objList.end(); }
+ int size() const { return _objList.size(); }
bool contains(SceneObject *sceneObj) { return tSage::contains(_objList, sceneObj); }
void push_back(SceneObject *sceneObj) { _objList.push_back(sceneObj); }
void push_front(SceneObject *sceneObj) { _objList.push_front(sceneObj); }
@@ -811,7 +790,7 @@ public:
/*--------------------------------------------------------------------------*/
-class SceneItemList : public SynchronisedList<SceneItem *> {
+class SceneItemList : public SynchronizedList<SceneItem *> {
public:
void addItems(SceneItem *first, ...);
};
@@ -861,6 +840,9 @@ public:
};
class WalkRegions {
+private:
+ void loadOriginal();
+ void loadRevised();
public:
int _resNum;
RouteEnds _routeEnds;
@@ -905,7 +887,7 @@ public:
virtual ~GameHandler();
void execute();
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual Common::String getClassName() { return "GameHandler"; }
virtual void postInit(SceneObjectList *OwnerList = NULL) {}
virtual void dispatch() {}
@@ -927,28 +909,31 @@ public:
virtual void dispatch();
static void dispatchObject(EventHandler *obj);
- static void saveListener(Serialiser &ser);
+ static void saveListener(Serializer &ser);
};
/*--------------------------------------------------------------------------*/
class Game {
-private:
- SynchronisedList<GameHandler *> _handlers;
+protected:
+ SynchronizedList<GameHandler *> _handlers;
static bool notLockedFn(GameHandler *g);
- void restart();
- void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName);
+ virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) {}
public:
+ virtual ~Game() {}
+
void addHandler(GameHandler *entry) { _handlers.push_back(entry); }
void removeHandler(GameHandler *entry) { _handlers.remove(entry); }
void execute();
- void restartGame();
- void saveGame();
- void restoreGame();
- void quitGame();
- void endGame(int resNum, int lineNum);
+ virtual void start() = 0;
+ virtual void restart() {}
+ virtual void restartGame() {}
+ virtual void saveGame() {}
+ virtual void restoreGame() {}
+ virtual void quitGame() {}
+ virtual void endGame(int resNum, int lineNum) {}
};
} // End of namespace tSage
diff --git a/engines/tsage/debugger.cpp b/engines/tsage/debugger.cpp
index d04fd71461..7944bad776 100644
--- a/engines/tsage/debugger.cpp
+++ b/engines/tsage/debugger.cpp
@@ -24,11 +24,9 @@
*/
#include "tsage/debugger.h"
-#include "common/config-manager.h"
-#include "common/endian.h"
#include "tsage/globals.h"
#include "tsage/graphics.h"
-
+#include "tsage/ringworld_logic.h"
namespace tSage {
@@ -37,7 +35,12 @@ Debugger::Debugger() : GUI::Debugger() {
DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene));
DCmd_Register("walk_regions", WRAP_METHOD(Debugger, Cmd_WalkRegions));
DCmd_Register("priority_regions", WRAP_METHOD(Debugger, Cmd_PriorityRegions));
- DCmd_Register("item", WRAP_METHOD(Debugger, Cmd_Item));
+ DCmd_Register("setflag", WRAP_METHOD(Debugger, Cmd_SetFlag));
+ DCmd_Register("getflag", WRAP_METHOD(Debugger, Cmd_GetFlag));
+ DCmd_Register("clearflag", WRAP_METHOD(Debugger, Cmd_ClearFlag));
+ DCmd_Register("listobjects", WRAP_METHOD(Debugger, Cmd_ListObjects));
+ DCmd_Register("moveobject", WRAP_METHOD(Debugger, Cmd_MoveObject));
+ DCmd_Register("hotspots", WRAP_METHOD(Debugger, Cmd_Hotspots));
}
static int strToInt(const char *s) {
@@ -81,14 +84,16 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
return true;
}
- // Colour index to use for the first walk region
- int colour = 16;
+ // Color index to use for the first walk region
+ int color = 16;
// Lock the background surface for access
Graphics::Surface destSurface = _globals->_sceneManager._scene->_backSurface.lockSurface();
- // Loop through drawing each walk region in a different colour to the background surface
- for (uint regionIndex = 0; regionIndex < _globals->_walkRegions._regionList.size(); ++regionIndex, ++colour) {
+ // Loop through drawing each walk region in a different color to the background surface
+ Common::String regionsDesc;
+
+ for (uint regionIndex = 0; regionIndex < _globals->_walkRegions._regionList.size(); ++regionIndex, ++color) {
WalkRegion &wr = _globals->_walkRegions._regionList[regionIndex];
for (int yp = wr._bounds.top; yp < wr._bounds.bottom; ++yp) {
@@ -96,8 +101,11 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
for (uint idx = 0; idx < sliceSet.items.size(); ++idx)
destSurface.hLine(sliceSet.items[idx].xs - _globals->_sceneOffset.x, yp,
- sliceSet.items[idx].xe - _globals->_sceneOffset.x, colour);
+ sliceSet.items[idx].xe - _globals->_sceneOffset.x, color);
}
+
+ regionsDesc += Common::String::format("Region #%d d bounds=%d,%d,%d,%d\n",
+ regionIndex, wr._bounds.left, wr._bounds.top, wr._bounds.right, wr._bounds.bottom);
}
// Release the surface
@@ -106,6 +114,9 @@ bool Debugger::Cmd_WalkRegions(int argc, const char **argv) {
// Mark the scene as requiring a full redraw
_globals->_paneRefreshFlag[0] = 2;
+ DebugPrintf("Total regions = %d\n", _globals->_walkRegions._regionList.size());
+ DebugPrintf("%s\n", regionsDesc.c_str());
+
return false;
}
@@ -119,8 +130,8 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) {
if (argc == 2)
regionNum = strToInt(argv[1]);
- // Colour index to use for the first priority region
- int colour = 16;
+ // Color index to use for the first priority region
+ int color = 16;
int count = 0;
// Lock the background surface for access
@@ -129,7 +140,7 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) {
Common::List<Region>::iterator i = _globals->_sceneManager._scene->_priorities.begin();
Common::String regionsDesc;
- for (; i != _globals->_sceneManager._scene->_priorities.end(); ++i, ++colour, ++count) {
+ for (; i != _globals->_sceneManager._scene->_priorities.end(); ++i, ++color, ++count) {
Region &r = *i;
if ((regionNum == 0) || (regionNum == (count + 1))) {
@@ -139,7 +150,7 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) {
for (int x = 0; x < destSurface.w; ++x) {
if (r.contains(Common::Point(_globals->_sceneManager._scene->_sceneBounds.left + x,
_globals->_sceneManager._scene->_sceneBounds.top + y)))
- *destP = colour;
+ *destP = color;
++destP;
}
}
@@ -161,12 +172,269 @@ bool Debugger::Cmd_PriorityRegions(int argc, const char **argv) {
return true;
}
-/**
- * Give a specified item to the player
+/*
+ * This command sets a flag
*/
-bool Debugger::Cmd_Item(int argc, const char **argv) {
- _globals->_inventory._infoDisk._sceneNumber = 1;
+bool Debugger::Cmd_SetFlag(int argc, const char **argv) {
+ // Check for a flag to set
+ if (argc != 2) {
+ DebugPrintf("Usage: %s <flag number>\n", argv[0]);
+ return true;
+ }
+
+ int flagNum = strToInt(argv[1]);
+ _globals->setFlag(flagNum);
return true;
}
+/*
+ * This command gets the value of a flag
+ */
+bool Debugger::Cmd_GetFlag(int argc, const char **argv) {
+ // Check for an flag to display
+ if (argc != 2) {
+ DebugPrintf("Usage: %s <flag number>\n", argv[0]);
+ return true;
+ }
+
+ int flagNum = strToInt(argv[1]);
+ DebugPrintf("Value: %d\n", _globals->getFlag(flagNum));
+ return true;
+}
+
+/*
+ * This command clears a flag
+ */
+bool Debugger::Cmd_ClearFlag(int argc, const char **argv) {
+ // Check for a flag to clear
+ if (argc != 2) {
+ DebugPrintf("Usage: %s <flag number>\n", argv[0]);
+ return true;
+ }
+
+ int flagNum = strToInt(argv[1]);
+ _globals->clearFlag(flagNum);
+ return true;
+}
+
+/*
+ * This command lists the objects available, and their ID
+ */
+bool Debugger::Cmd_ListObjects(int argc, const char **argv) {
+ if (argc != 1) {
+ DebugPrintf("Usage: %s\n", argv[0]);
+ return true;
+ }
+
+ DebugPrintf("Available objects for this game are:\n");
+ DebugPrintf("0 - Stunner\n");
+ DebugPrintf("1 - Scanner\n");
+ DebugPrintf("2 - Stasis Box\n");
+ DebugPrintf("3 - Info Disk\n");
+ DebugPrintf("4 - Stasis Negator\n");
+ DebugPrintf("5 - Key Device\n");
+ DebugPrintf("6 - Medkit\n");
+ DebugPrintf("7 - Ladder\n");
+ DebugPrintf("8 - Rope\n");
+ DebugPrintf("9 - Key\n");
+ DebugPrintf("10 - Translator\n");
+ DebugPrintf("11 - Ale\n");
+ DebugPrintf("12 - Paper\n");
+ DebugPrintf("13 - Waldos\n");
+ DebugPrintf("14 - Stasis Box 2\n");
+ DebugPrintf("15 - Ring\n");
+ DebugPrintf("16 - Cloak\n");
+ DebugPrintf("17 - Tunic\n");
+ DebugPrintf("18 - Candle\n");
+ DebugPrintf("19 - Straw\n");
+ DebugPrintf("20 - Scimitar\n");
+ DebugPrintf("21 - Sword\n");
+ DebugPrintf("22 - Helmet\n");
+ DebugPrintf("23 - Items\n");
+ DebugPrintf("24 - Concentrator\n");
+ DebugPrintf("25 - Nullifier\n");
+ DebugPrintf("26 - Peg\n");
+ DebugPrintf("27 - Vial\n");
+ DebugPrintf("28 - Jacket\n");
+ DebugPrintf("29 - Tunic 2\n");
+ DebugPrintf("30 - Bone\n");
+ DebugPrintf("31 - Empty Jar\n");
+ DebugPrintf("32 - Jar\n");
+ return true;
+}
+
+/*
+ * This command gets an item, or move it to a room
+ */
+bool Debugger::Cmd_MoveObject(int argc, const char **argv) {
+ // Check for a flag to clear
+ if ((argc < 2) || (argc > 3)){
+ DebugPrintf("Usage: %s <object number> [<scene number>]\n", argv[0]);
+ DebugPrintf("If no scene is specified, the object will be added to inventory\n");
+ return true;
+ }
+
+ int objNum = strToInt(argv[1]);
+ int sceneNum = 1;
+ if (argc == 3)
+ sceneNum = strToInt(argv[2]);
+
+ switch (objNum) {
+ case OBJECT_STUNNER:
+ RING_INVENTORY._stunner._sceneNumber = sceneNum;
+ break;
+ case OBJECT_SCANNER:
+ RING_INVENTORY._scanner._sceneNumber = sceneNum;
+ break;
+ case OBJECT_STASIS_BOX:
+ RING_INVENTORY._stasisBox._sceneNumber = sceneNum;
+ break;
+ case OBJECT_INFODISK:
+ RING_INVENTORY._infoDisk._sceneNumber = sceneNum;
+ break;
+ case OBJECT_STASIS_NEGATOR:
+ RING_INVENTORY._stasisNegator._sceneNumber = sceneNum;
+ break;
+ case OBJECT_KEY_DEVICE:
+ RING_INVENTORY._keyDevice._sceneNumber = sceneNum;
+ break;
+ case OBJECT_MEDKIT:
+ RING_INVENTORY._medkit._sceneNumber = sceneNum;
+ break;
+ case OBJECT_LADDER:
+ RING_INVENTORY._ladder._sceneNumber = sceneNum;
+ break;
+ case OBJECT_ROPE:
+ RING_INVENTORY._rope._sceneNumber = sceneNum;
+ break;
+ case OBJECT_KEY:
+ RING_INVENTORY._key._sceneNumber = sceneNum;
+ break;
+ case OBJECT_TRANSLATOR:
+ RING_INVENTORY._translator._sceneNumber = sceneNum;
+ break;
+ case OBJECT_ALE:
+ RING_INVENTORY._ale._sceneNumber = sceneNum;
+ break;
+ case OBJECT_PAPER:
+ RING_INVENTORY._paper._sceneNumber = sceneNum;
+ break;
+ case OBJECT_WALDOS:
+ RING_INVENTORY._waldos._sceneNumber = sceneNum;
+ break;
+ case OBJECT_STASIS_BOX2:
+ RING_INVENTORY._stasisBox2._sceneNumber = sceneNum;
+ break;
+ case OBJECT_RING:
+ RING_INVENTORY._ring._sceneNumber = sceneNum;
+ break;
+ case OBJECT_CLOAK:
+ RING_INVENTORY._cloak._sceneNumber = sceneNum;
+ break;
+ case OBJECT_TUNIC:
+ RING_INVENTORY._tunic._sceneNumber = sceneNum;
+ break;
+ case OBJECT_CANDLE:
+ RING_INVENTORY._candle._sceneNumber = sceneNum;
+ break;
+ case OBJECT_STRAW:
+ RING_INVENTORY._straw._sceneNumber = sceneNum;
+ break;
+ case OBJECT_SCIMITAR:
+ RING_INVENTORY._scimitar._sceneNumber = sceneNum;
+ break;
+ case OBJECT_SWORD:
+ RING_INVENTORY._sword._sceneNumber = sceneNum;
+ break;
+ case OBJECT_HELMET:
+ RING_INVENTORY._helmet._sceneNumber = sceneNum;
+ break;
+ case OBJECT_ITEMS:
+ RING_INVENTORY._items._sceneNumber = sceneNum;
+ break;
+ case OBJECT_CONCENTRATOR:
+ RING_INVENTORY._concentrator._sceneNumber = sceneNum;
+ break;
+ case OBJECT_NULLIFIER:
+ RING_INVENTORY._nullifier._sceneNumber = sceneNum;
+ break;
+ case OBJECT_PEG:
+ RING_INVENTORY._peg._sceneNumber = sceneNum;
+ break;
+ case OBJECT_VIAL:
+ RING_INVENTORY._vial._sceneNumber = sceneNum;
+ break;
+ case OBJECT_JACKET:
+ RING_INVENTORY._jacket._sceneNumber = sceneNum;
+ break;
+ case OBJECT_TUNIC2:
+ RING_INVENTORY._tunic2._sceneNumber = sceneNum;
+ break;
+ case OBJECT_BONE:
+ RING_INVENTORY._bone._sceneNumber = sceneNum;
+ break;
+ case OBJECT_EMPTY_JAR:
+ RING_INVENTORY._emptyJar._sceneNumber = sceneNum;
+ break;
+ case OBJECT_JAR:
+ RING_INVENTORY._jar._sceneNumber = sceneNum;
+ break;
+ default:
+ DebugPrintf("Invlid object Id %s\n", argv[1]);
+ }
+
+ return true;
+}
+
+/**
+ * Show any active hotspot areas in the scene
+ */
+bool Debugger::Cmd_Hotspots(int argc, const char **argv) {
+ int colIndex = 16;
+ const Rect &sceneBounds = _globals->_sceneManager._scene->_sceneBounds;
+
+ // 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) {
+ SceneItem *o = *i;
+
+ // Draw the contents of the hotspot area
+ if (o->_sceneRegionId == 0) {
+ // Scene item doesn't use a region, so fill in the entire area
+ destSurface.fillRect(Rect(o->_bounds.left - sceneBounds.left, o->_bounds.top - sceneBounds.top,
+ o->_bounds.right - sceneBounds.left - 1, o->_bounds.bottom - sceneBounds.top - 1), colIndex);
+ } else {
+ // Scene uses a region, so get it and use it to fill out only the correct parts
+ SceneRegions::iterator ri = _globals->_sceneRegions.begin();
+ while ((ri != _globals->_sceneRegions.end()) && ((*ri)._regionId != o->_sceneRegionId))
+ ++ri;
+
+ if (ri != _globals->_sceneRegions.end()) {
+ // Fill out the areas defined by the region
+ Region &r = *ri;
+
+ for (int y = r._bounds.top; y < r._bounds.bottom; ++y) {
+ 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,
+ set.items[p].xe - sceneBounds.left - 1, colIndex);
+ }
+ }
+ }
+ }
+
+ // Release the surface
+ _globals->_sceneManager._scene->_backSurface.unlockSurface();
+
+ // Mark the scene as requiring a full redraw
+ _globals->_paneRefreshFlag[0] = 2;
+
+ return false;
+}
+
+
} // End of namespace tSage
diff --git a/engines/tsage/debugger.h b/engines/tsage/debugger.h
index c94d77b2ab..eeb5bc86f6 100644
--- a/engines/tsage/debugger.h
+++ b/engines/tsage/debugger.h
@@ -40,7 +40,13 @@ protected:
bool Cmd_Scene(int argc, const char **argv);
bool Cmd_WalkRegions(int argc, const char **argv);
bool Cmd_PriorityRegions(int argc, const char **argv);
- bool Cmd_Item(int argc, const char **argv);
+ bool Cmd_SetFlag(int argc, const char **argv);
+ bool Cmd_GetFlag(int argc, const char **argv);
+ bool Cmd_ClearFlag(int argc, const char **argv);
+ bool Cmd_ListObjects(int argc, const char **argv);
+ bool Cmd_MoveObject(int argc, const char **argv);
+
+ bool Cmd_Hotspots(int argc, const char **argv);
};
} // End of namespace tSage
diff --git a/engines/tsage/detection.cpp b/engines/tsage/detection.cpp
index 371166d782..ba7b459304 100644
--- a/engines/tsage/detection.cpp
+++ b/engines/tsage/detection.cpp
@@ -54,6 +54,10 @@ uint32 TSageEngine::getFeatures() const {
return _gameDescription->features;
}
+Common::String TSageEngine::getPrimaryFilename() const {
+ return Common::String(_gameDescription->desc.filesDescriptions[0].fileName);
+}
+
} // End of namespace tSage
static const PlainGameDescriptor tSageGameTitles[] = {
@@ -122,16 +126,18 @@ public:
virtual SaveStateList listSaves(const char *target) const {
Common::String pattern = target;
- pattern += ".*";
+ pattern += ".???";
Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern);
+ sort(filenames.begin(), filenames.end());
tSage::tSageSavegameHeader header;
SaveStateList saveList;
for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
- int slot;
const char *ext = strrchr(file->c_str(), '.');
- if (ext && (slot = atoi(ext + 1)) >= 0 && slot < MAX_SAVES) {
+ int slot = ext ? atoi(ext + 1) : -1;
+
+ if (slot >= 0 && slot < MAX_SAVES) {
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file);
if (in) {
diff --git a/engines/tsage/detection_tables.h b/engines/tsage/detection_tables.h
index f932c62367..d165900d55 100644
--- a/engines/tsage/detection_tables.h
+++ b/engines/tsage/detection_tables.h
@@ -39,7 +39,7 @@ static const tSageGameDescription gameDescriptions[] = {
Common::GUIO_NONE
},
GType_Ringworld,
- GF_CD
+ GF_CD | GF_ALT_REGIONS
},
// Ringworld First Wave English CD version
{
@@ -53,7 +53,7 @@ static const tSageGameDescription gameDescriptions[] = {
Common::GUIO_NONE
},
GType_Ringworld,
- GF_CD
+ GF_CD | GF_ALT_REGIONS
},
// Ringworld English Floppy version
{
@@ -69,6 +69,34 @@ static const tSageGameDescription gameDescriptions[] = {
GType_Ringworld,
GF_FLOPPY
},
+ // Ringworld English Floppy Demo #1 version
+ {
+ {
+ "ring",
+ "Floppy Demo",
+ AD_ENTRY1s("tsage.rlb", "bf4e8525d0cab84b08b57126092eeacd", 833453),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_DEMO,
+ Common::GUIO_NONE
+ },
+ GType_Ringworld,
+ GF_FLOPPY | GF_DEMO
+ },
+ // Ringworld English Floppy Demo #2 version
+ {
+ {
+ "ring",
+ "Floppy Demo",
+ AD_ENTRY1s("demoring.rlb", "9ecf48e088a0d475778fab480b3dbdd0", 832206),
+ Common::EN_ANY,
+ Common::kPlatformPC,
+ ADGF_DEMO,
+ Common::GUIO_NONE
+ },
+ GType_Ringworld,
+ GF_FLOPPY | GF_DEMO | GF_ALT_REGIONS
+ },
// Blue Force
{
diff --git a/engines/tsage/dialogs.cpp b/engines/tsage/dialogs.cpp
index b76d60ac48..f8e35f74f9 100644
--- a/engines/tsage/dialogs.cpp
+++ b/engines/tsage/dialogs.cpp
@@ -24,13 +24,16 @@
*/
#include "common/translation.h"
+
+#include "gui/dialog.h"
+#include "gui/widget.h"
+
#include "tsage/tsage.h"
#include "tsage/core.h"
#include "tsage/dialogs.h"
-#include "tsage/graphics.h"
-#include "tsage/core.h"
#include "tsage/staticres.h"
#include "tsage/globals.h"
+#include "tsage/ringworld_logic.h"
namespace tSage {
@@ -64,23 +67,18 @@ MessageDialog::MessageDialog(const Common::String &message, const Common::String
// Do post setup for the dialog
setDefaults();
- // Set the dialog's centre
- setCentre(_globals->_dialogCentre.x, _globals->_dialogCentre.y);
+ // Set the dialog's center
+ setCenter(_globals->_dialogCenter.x, _globals->_dialogCenter.y);
}
int MessageDialog::show(const Common::String &message, const Common::String &btn1Message, const Common::String &btn2Message) {
// Ensure that the cursor is the arrow
- CursorType currentCursor = _globals->_events.getCursor();
- if (currentCursor != CURSOR_ARROW)
- _globals->_events.setCursor(CURSOR_ARROW);
+ _globals->_events.pushCursor(CURSOR_ARROW);
_globals->_events.showCursor();
int result = show2(message, btn1Message, btn2Message);
- // If the cursor was changed, change it back
- if (currentCursor != CURSOR_ARROW)
- _globals->_events.setCursor(currentCursor);
-
+ _globals->_events.popCursor();
return result;
}
@@ -95,7 +93,6 @@ int MessageDialog::show2(const Common::String &message, const Common::String &bt
return result;
}
-
/*--------------------------------------------------------------------------*/
ConfigDialog::ConfigDialog() : GUI::OptionsDialog("", "GlobalConfig") {
@@ -139,7 +136,7 @@ void RightClickButton::highlight() {
_savedButton = Surface_getArea(_globals->gfxManager().getSurface(), _bounds);
uint size;
- byte *imgData = _vm->_dataManager->getSubResource(7, 2, _buttonIndex, &size);
+ byte *imgData = _resourceManager->getSubResource(7, 2, _buttonIndex, &size);
GfxSurface btnSelected = surfaceFromRes(imgData);
_globals->gfxManager().copyFrom(btnSelected, _bounds.left, _bounds.top);
@@ -167,7 +164,7 @@ RightClickDialog::RightClickDialog() : GfxDialog(),
// Set the dialog position
dialogRect.resize(_surface, 0, 0, 100);
- dialogRect.centre(_globals->_events._mousePos.x, _globals->_events._mousePos.y);
+ dialogRect.center(_globals->_events._mousePos.x, _globals->_events._mousePos.y);
// Ensure the dialog will be entirely on-screen
Rect screenRect = _globals->gfxManager()._bounds;
@@ -379,36 +376,34 @@ bool GfxInvImage::process(Event &event) {
/*--------------------------------------------------------------------------*/
-void InventoryDialog::show(bool allFlag) {
- if (!allFlag) {
- // Determine how many items are in the player's inventory
- int itemCount = 0;
- SynchronisedList<InvObject *>::iterator i;
- for (i = _globals->_inventory._itemList.begin(); i != _globals->_inventory._itemList.end(); ++i) {
- if ((*i)->inInventory())
- ++itemCount;
- }
+void InventoryDialog::show() {
+ // Determine how many items are in the player's inventory
+ int itemCount = 0;
+ SynchronizedList<InvObject *>::iterator i;
+ for (i = RING_INVENTORY._itemList.begin(); i != RING_INVENTORY._itemList.end(); ++i) {
+ if ((*i)->inInventory())
+ ++itemCount;
+ }
- if (itemCount == 0) {
- MessageDialog::show(INV_EMPTY_MSG, OK_BTN_STRING);
- return;
- }
+ if (itemCount == 0) {
+ MessageDialog::show(INV_EMPTY_MSG, OK_BTN_STRING);
+ return;
}
- InventoryDialog *dlg = new InventoryDialog(allFlag);
+ InventoryDialog *dlg = new InventoryDialog();
dlg->draw();
dlg->execute();
delete dlg;
}
-InventoryDialog::InventoryDialog(bool allFlag) {
+InventoryDialog::InventoryDialog() {
// Determine the maximum size of the image of any item in the player's inventory
int imgWidth = 0, imgHeight = 0;
- SynchronisedList<InvObject *>::iterator i;
- for (i = _globals->_inventory._itemList.begin(); i != _globals->_inventory._itemList.end(); ++i) {
+ SynchronizedList<InvObject *>::iterator i;
+ for (i = RING_INVENTORY._itemList.begin(); i != RING_INVENTORY._itemList.end(); ++i) {
InvObject *invObject = *i;
- if (allFlag || invObject->inInventory()) {
+ if (invObject->inInventory()) {
// Get the image for the item
GfxSurface itemSurface = surfaceFromRes(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum);
@@ -417,10 +412,11 @@ InventoryDialog::InventoryDialog(bool allFlag) {
imgHeight = MAX(imgHeight, (int)itemSurface.getBounds().height());
// Add the item to the display list
- _images.push_back(GfxInvImage());
- _images[_images.size() - 1].setDetails(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum);
- _images[_images.size() - 1]._invObject = invObject;
- add(&_images[_images.size() - 1]);
+ GfxInvImage *img = new GfxInvImage();
+ _images.push_back(img);
+ img->setDetails(invObject->_displayResNum, invObject->_rlbNum, invObject->_cursorNum);
+ img->_invObject = invObject;
+ add(img);
}
}
assert(_images.size() > 0);
@@ -442,7 +438,7 @@ InventoryDialog::InventoryDialog(bool allFlag) {
cellX = 0;
}
- _images[idx]._bounds.moveTo(pt.x, pt.y);
+ _images[idx]->_bounds.moveTo(pt.x, pt.y);
pt.x += imgWidth + 2;
++cellX;
@@ -457,15 +453,21 @@ InventoryDialog::InventoryDialog(bool allFlag) {
addElements(&_btnLook, &_btnOk, NULL);
frame();
- setCentre(SCREEN_CENTRE_X, SCREEN_CENTRE_Y);
+ setCenter(SCREEN_CENTER_X, SCREEN_CENTER_Y);
+}
+
+InventoryDialog::~InventoryDialog() {
+ for (uint idx = 0; idx < _images.size(); ++idx)
+ delete _images[idx];
}
void InventoryDialog::execute() {
- if ((_globals->_inventory._selectedItem) && _globals->_inventory._selectedItem->inInventory())
- _globals->_inventory._selectedItem->setCursor();
+ if ((RING_INVENTORY._selectedItem) && RING_INVENTORY._selectedItem->inInventory())
+ RING_INVENTORY._selectedItem->setCursor();
GfxElement *hiliteObj;
bool lookFlag = false;
+ _gfxManager.activate();
while (!_vm->getEventManager()->shouldQuit()) {
// Get events
@@ -491,7 +493,7 @@ void InventoryDialog::execute() {
if (!event.handled && event.eventType == EVENT_KEYPRESS) {
if ((event.kbd.keycode == Common::KEYCODE_RETURN) || (event.kbd.keycode == Common::KEYCODE_ESCAPE)) {
// Exit the dialog
- hiliteObj = &_btnOk;
+ //hiliteObj = &_btnOk;
break;
}
}
@@ -513,20 +515,20 @@ void InventoryDialog::execute() {
_globals->_events.setCursor(CURSOR_WALK);
}
- _gfxManager.activate();
hiliteObj->draw();
- _gfxManager.deactivate();
} else if (hiliteObj) {
// Inventory item selected
InvObject *invObject = static_cast<GfxInvImage *>(hiliteObj)->_invObject;
if (lookFlag) {
_globals->_screenSurface.displayText(invObject->_description);
} else {
- _globals->_inventory._selectedItem = invObject;
+ RING_INVENTORY._selectedItem = invObject;
invObject->setCursor();
}
}
}
+
+ _gfxManager.deactivate();
}
/*--------------------------------------------------------------------------*/
@@ -544,15 +546,15 @@ void OptionsDialog::show() {
}
} else if (btn == &dlg->_btnRestart) {
// Restart game
- _globals->_game.restartGame();
+ _globals->_game->restartGame();
} else if (btn == &dlg->_btnSound) {
// Sound dialog
} else if (btn == &dlg->_btnSave) {
// Save button
- _globals->_game.saveGame();
+ _globals->_game->saveGame();
} else if (btn == &dlg->_btnRestore) {
// Restore button
- _globals->_game.restoreGame();
+ _globals->_game->restoreGame();
}
dlg->remove();
@@ -591,7 +593,7 @@ OptionsDialog::OptionsDialog() {
// Set the dialog size and position
frame();
- setCentre(160, 100);
+ setCenter(160, 100);
}
diff --git a/engines/tsage/dialogs.h b/engines/tsage/dialogs.h
index 8e766372b4..c24fa2dd3b 100644
--- a/engines/tsage/dialogs.h
+++ b/engines/tsage/dialogs.h
@@ -105,14 +105,14 @@ public:
class InventoryDialog : public ModalDialog {
private:
- Common::Array<GfxInvImage> _images;
+ Common::Array<GfxInvImage *> _images;
GfxButton _btnOk, _btnLook;
public:
- InventoryDialog(bool allFlag = false);
- virtual ~InventoryDialog() {}
+ InventoryDialog();
+ virtual ~InventoryDialog();
void execute();
- static void show(bool allFlag = false);
+ static void show();
};
/*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index 4d2a1cce8c..e51c5da479 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -38,6 +38,7 @@ namespace tSage {
EventsClass::EventsClass() {
_currentCursor = CURSOR_NONE;
+ hideCursor();
_frameNumber = 0;
_priorFrameTime = 0;
_prevDelayFrame = 0;
@@ -127,6 +128,9 @@ bool EventsClass::getEvent(Event &evt, int eventMask) {
return true;
}
+ evt.handled = false;
+ evt.eventType = EVENT_NONE;
+
return false;
}
@@ -154,27 +158,27 @@ void EventsClass::setCursor(CursorType cursorType) {
uint size;
switch (cursorType) {
- case CURSOR_CROSSHAIRS:
- // Crosshairs cursor
- cursor = _vm->_dataManager->getSubResource(4, 1, 6, &size);
+ case OBJECT_STUNNER:
+ // Stunner cursor
+ cursor = _resourceManager->getSubResource(4, 1, 6, &size);
_globals->setFlag(122);
break;
case CURSOR_LOOK:
// Look cursor
- cursor = _vm->_dataManager->getSubResource(4, 1, 5, &size);
+ cursor = _resourceManager->getSubResource(4, 1, 5, &size);
_currentCursor = CURSOR_LOOK;
break;
case CURSOR_USE:
// Use cursor
- cursor = _vm->_dataManager->getSubResource(4, 1, 4, &size);
+ cursor = _resourceManager->getSubResource(4, 1, 4, &size);
_currentCursor = CURSOR_USE;
break;
case CURSOR_TALK:
// Talk cursor
- cursor = _vm->_dataManager->getSubResource(4, 1, 3, &size);
+ cursor = _resourceManager->getSubResource(4, 1, 3, &size);
_currentCursor = CURSOR_TALK;
break;
@@ -198,16 +202,72 @@ void EventsClass::setCursor(CursorType cursorType) {
Graphics::Surface surface = s.lockSurface();
const byte *cursorData = (const byte *)surface.getBasePtr(0, 0);
- CursorMan.replaceCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColour);
+ CursorMan.replaceCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColor);
s.unlockSurface();
if (delFlag)
DEALLOCATE(cursor);
}
-void EventsClass::setCursor(Graphics::Surface &cursor, int transColour, const Common::Point &hotspot, CursorType cursorId) {
+void EventsClass::pushCursor(CursorType cursorType) {
+ const byte *cursor;
+ bool delFlag = true;
+ uint size;
+
+ switch (cursorType) {
+ case CURSOR_CROSSHAIRS:
+ // Crosshairs cursor
+ cursor = _resourceManager->getSubResource(4, 1, 6, &size);
+ break;
+
+ case CURSOR_LOOK:
+ // Look cursor
+ cursor = _resourceManager->getSubResource(4, 1, 5, &size);
+ break;
+
+ case CURSOR_USE:
+ // Use cursor
+ cursor = _resourceManager->getSubResource(4, 1, 4, &size);
+ break;
+
+ case CURSOR_TALK:
+ // Talk cursor
+ cursor = _resourceManager->getSubResource(4, 1, 3, &size);
+ break;
+
+ case CURSOR_ARROW:
+ // Arrow cursor
+ cursor = CURSOR_ARROW_DATA;
+ delFlag = false;
+ break;
+
+ case CURSOR_WALK:
+ default:
+ // Walk cursor
+ cursor = CURSOR_WALK_DATA;
+ delFlag = false;
+ break;
+ }
+
+ // Decode the cursor
+ GfxSurface s = surfaceFromRes(cursor);
+
+ Graphics::Surface surface = s.lockSurface();
+ const byte *cursorData = (const byte *)surface.getBasePtr(0, 0);
+ CursorMan.pushCursor(cursorData, surface.w, surface.h, s._centroid.x, s._centroid.y, s._transColor);
+ s.unlockSurface();
+
+ if (delFlag)
+ DEALLOCATE(cursor);
+}
+
+void EventsClass::popCursor() {
+ CursorMan.popCursor();
+}
+
+void EventsClass::setCursor(Graphics::Surface &cursor, int transColor, const Common::Point &hotspot, CursorType cursorId) {
const byte *cursorData = (const byte *)cursor.getBasePtr(0, 0);
- CursorMan.replaceCursor(cursorData, cursor.w, cursor.h, hotspot.x, hotspot.y, transColour);
+ CursorMan.replaceCursor(cursorData, cursor.w, cursor.h, hotspot.x, hotspot.y, transColor);
_currentCursor = cursorId;
}
@@ -224,6 +284,10 @@ void EventsClass::hideCursor() {
CursorMan.showMouse(false);
}
+bool EventsClass::isCursorVisible() const {
+ return CursorMan.isVisible();
+}
+
/**
* Delays the game for the specified number of frames, if necessary, from the
* previous time the delay method was called
diff --git a/engines/tsage/events.h b/engines/tsage/events.h
index 202ac9ccd2..d2dbd9e058 100644
--- a/engines/tsage/events.h
+++ b/engines/tsage/events.h
@@ -82,11 +82,14 @@ public:
CursorType _currentCursor;
void setCursor(CursorType cursorType);
- void setCursor(Graphics::Surface &cursor, int transColour, const Common::Point &hotspot, CursorType cursorId);
+ void pushCursor(CursorType cursorType);
+ void popCursor();
+ void setCursor(Graphics::Surface &cursor, int transColor, const Common::Point &hotspot, CursorType cursorId);
void setCursorFromFlag();
CursorType getCursor() const { return _currentCursor; }
void showCursor();
void hideCursor();
+ bool isCursorVisible() const;
bool pollEvent();
void waitForPress(int eventMask = EVENT_BUTTON_DOWN | EVENT_KEYPRESS);
@@ -97,10 +100,10 @@ public:
uint32 getFrameNumber() const { return _frameNumber; }
void delay(int numFrames);
- virtual void listenerSynchronise(Serialiser &s) {
+ virtual void listenerSynchronize(Serializer &s) {
s.syncAsUint32LE(_frameNumber);
s.syncAsUint32LE(_prevDelayFrame);
- // TODO: Synchronise unknown stuff
+ // TODO: Synchronize unknown stuff
}
};
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index b9abb9d751..c6e1344714 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -24,10 +24,13 @@
*/
#include "tsage/globals.h"
+#include "tsage/tsage.h"
+#include "tsage/ringworld_logic.h"
namespace tSage {
Globals *_globals = NULL;
+ResourceManager *_resourceManager = NULL;
/*--------------------------------------------------------------------------*/
@@ -40,23 +43,34 @@ static SavedObject *classFactoryProc(const Common::String &className) {
if (className == "ObjectMover2") return new ObjectMover2();
if (className == "ObjectMover3") return new ObjectMover3();
if (className == "PlayerMover") return new PlayerMover();
-
+ if (className == "SceneObjectWrapper") return new SceneObjectWrapper();
+ if (className == "PaletteRotation") return new PaletteRotation();
+ if (className == "PaletteFader") return new PaletteFader();
return NULL;
}
/*--------------------------------------------------------------------------*/
Globals::Globals() :
- _dialogCentre(160, 140),
+ _dialogCenter(160, 140),
_gfxManagerInstance(_screenSurface) {
reset();
_stripNum = 0;
- _gfxFontNumber = 50;
- _gfxColours.background = 53;
- _gfxColours.foreground = 18;
- _fontColours.background = 51;
- _fontColours.foreground = 54;
+ if (_vm->getFeatures() & GF_DEMO) {
+ _gfxFontNumber = 0;
+ _gfxColors.background = 6;
+ _gfxColors.foreground = 0;
+ _fontColors.background = 0;
+ _fontColors.foreground = 0;
+ _dialogCenter.y = 80;
+ } else {
+ _gfxFontNumber = 50;
+ _gfxColors.background = 53;
+ _gfxColors.foreground = 18;
+ _fontColors.background = 51;
+ _fontColors.foreground = 54;
+ }
_screenSurface.setScreenSurface();
_gfxManagers.push_back(&_gfxManagerInstance);
@@ -66,10 +80,22 @@ Globals::Globals() :
_prevSceneOffset = Common::Point(-1, -1);
_sceneListeners.push_back(&_soundHandler);
_sceneListeners.push_back(&_sequenceManager._soundHandler);
+
+ _scrollFollower = NULL;
+ _inventory = NULL;
+
+ if (!(_vm->getFeatures() & GF_DEMO)) {
+ _inventory = new RingworldInvObjectList();
+ _game = new RingworldGame();
+ } else {
+ _game = new RingworldDemoGame();
+ }
}
Globals::~Globals() {
_globals = NULL;
+ delete _inventory;
+ delete _game;
}
void Globals::reset() {
@@ -77,20 +103,22 @@ void Globals::reset() {
_saver->addFactory(classFactoryProc);
}
-void Globals::synchronise(Serialiser &s) {
+void Globals::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ SavedObject::synchronize(s);
assert(_gfxManagers.size() == 1);
- _sceneItems.synchronise(s);
+ _sceneItems.synchronize(s);
SYNC_POINTER(_sceneObjects);
- _sceneObjects_queue.synchronise(s);
+ _sceneObjects_queue.synchronize(s);
s.syncAsSint32LE(_gfxFontNumber);
- s.syncAsSint32LE(_gfxColours.background);
- s.syncAsSint32LE(_gfxColours.foreground);
- s.syncAsSint32LE(_fontColours.background);
- s.syncAsSint32LE(_fontColours.foreground);
+ s.syncAsSint32LE(_gfxColors.background);
+ s.syncAsSint32LE(_gfxColors.foreground);
+ s.syncAsSint32LE(_fontColors.background);
+ s.syncAsSint32LE(_fontColors.foreground);
- s.syncAsSint16LE(_dialogCentre.x); s.syncAsSint16LE(_dialogCentre.y);
- _sceneListeners.synchronise(s);
+ s.syncAsSint16LE(_dialogCenter.x); s.syncAsSint16LE(_dialogCenter.y);
+ _sceneListeners.synchronize(s);
for (int i = 0; i < 256; ++i)
s.syncAsByte(_flags[i]);
diff --git a/engines/tsage/globals.h b/engines/tsage/globals.h
index 59afe140a0..3a6fab5b70 100644
--- a/engines/tsage/globals.h
+++ b/engines/tsage/globals.h
@@ -41,7 +41,7 @@ public:
GfxManager _gfxManagerInstance;
Common::List<GfxManager *> _gfxManagers;
SceneHandler _sceneHandler;
- Game _game;
+ Game *_game;
EventsClass _events;
SceneManager _sceneManager;
ScenePalette _scenePalette;
@@ -49,19 +49,19 @@ public:
SceneItemList _sceneItems;
SceneObjectList _sceneObjectsInstance;
SceneObjectList *_sceneObjects;
- SynchronisedList<SceneObjectList *> _sceneObjects_queue;
+ SynchronizedList<SceneObjectList *> _sceneObjects_queue;
SceneText _sceneText;
int _gfxFontNumber;
- GfxColours _gfxColours;
- GfxColours _fontColours;
+ GfxColors _gfxColors;
+ GfxColors _fontColors;
SoundManager _soundManager;
- Common::Point _dialogCentre;
+ Common::Point _dialogCenter;
WalkRegions _walkRegions;
- SynchronisedList<EventHandler *> _sceneListeners;
+ SynchronizedList<EventHandler *> _sceneListeners;
bool _flags[256];
Player _player;
SoundHandler _soundHandler;
- InvObjectList _inventory;
+ InvObjectList *_inventory;
Region _paneRegions[2];
int _paneRefreshFlag[2];
Common::Point _sceneOffset;
@@ -90,11 +90,15 @@ public:
GfxManager &gfxManager() { return **_gfxManagers.begin(); }
virtual Common::String getClassName() { return "Globals"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
};
extern Globals *_globals;
+// Note: Currently this can't be part of the _globals structure, since it needs to be constructed
+// prior to many of the fields in Globals execute their constructors
+extern ResourceManager *_resourceManager;
+
} // End of namespace tSage
#endif
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 641e10b3e9..c50da6beef 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -29,6 +29,7 @@
#include "tsage/tsage.h"
#include "tsage/core.h"
#include "common/algorithm.h"
+#include "graphics/palette.h"
#include "graphics/surface.h"
#include "tsage/globals.h"
@@ -72,7 +73,7 @@ GfxSurface surfaceFromRes(const byte *imgData) {
s.create(r.width(), r.height());
s._centroid.x = READ_LE_UINT16(imgData + 4);
s._centroid.y = READ_LE_UINT16(imgData + 6);
- s._transColour = *(imgData + 8);
+ s._transColor = *(imgData + 8);
bool rleEncoded = (imgData[9] & 2) != 0;
@@ -83,7 +84,7 @@ GfxSurface surfaceFromRes(const byte *imgData) {
if (!rleEncoded) {
Common::copy(srcP, srcP + (r.width() * r.height()), destP);
} else {
- Common::set_to(destP, destP + (r.width() * r.height()), s._transColour);
+ Common::set_to(destP, destP + (r.width() * r.height()), s._transColor);
for (int yp = 0; yp < r.height(); ++yp) {
int width = r.width();
@@ -122,7 +123,7 @@ GfxSurface surfaceFromRes(const byte *imgData) {
GfxSurface surfaceFromRes(int resNum, int rlbNum, int subNum) {
uint size;
- byte *imgData = _vm->_dataManager->getSubResource(resNum, rlbNum, subNum, &size);
+ byte *imgData = _resourceManager->getSubResource(resNum, rlbNum, subNum, &size);
GfxSurface surface = surfaceFromRes(imgData);
DEALLOCATE(imgData);
@@ -147,22 +148,22 @@ void Rect::collapse(int dx, int dy) {
}
/**
- * Centres the rectangle at a given position
+ * Centers the rectangle at a given position
*
- * @xp x position for new centre
- * @yp y position for new centre
+ * @xp x position for new center
+ * @yp y position for new center
*/
-void Rect::centre(int xp, int yp) {
+void Rect::center(int xp, int yp) {
moveTo(xp - (width() / 2), yp - (height() / 2));
}
/**
- * Centres the rectangle at the centre of a second passed rectangle
+ * Centers the rectangle at the center of a second passed rectangle
*
- * @r Second rectangle whose centre to use
+ * @r Second rectangle whose center to use
*/
-void Rect::centre(const Rect &r) {
- centre(r.left + (r.width() / 2), r.top + (r.height() / 2));
+void Rect::center(const Rect &r) {
+ center(r.left + (r.width() / 2), r.top + (r.height() / 2));
}
/*
@@ -211,7 +212,7 @@ void Rect::expandPanes() {
/**
* Serialises the given rect
*/
-void Rect::synchronise(Serialiser &s) {
+void Rect::synchronize(Serializer &s) {
s.syncAsSint16LE(left);
s.syncAsSint16LE(top);
s.syncAsSint16LE(right);
@@ -226,6 +227,7 @@ GfxSurface::GfxSurface() : _bounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) {
_lockSurfaceCtr = 0;
_customSurface = NULL;
_screenSurfaceP = NULL;
+ _transColor = -1;
}
GfxSurface::GfxSurface(const GfxSurface &s) {
@@ -256,8 +258,13 @@ void GfxSurface::setScreenSurface() {
void GfxSurface::create(int width, int height) {
assert((width >= 0) && (height >= 0));
_screenSurface = false;
+ if (_customSurface) {
+ _customSurface->free();
+ delete _customSurface;
+ }
_customSurface = new Graphics::Surface();
- _customSurface->create(width, height, 1);
+ _customSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
+ Common::set_to((byte *)_customSurface->pixels, (byte *)_customSurface->pixels + (width * height), 0);
_bounds = Rect(0, 0, width, height);
}
@@ -282,7 +289,7 @@ Graphics::Surface GfxSurface::lockSurface() {
result.w = _bounds.width();
result.h = _bounds.height();
result.pitch = src->pitch;
- result.bytesPerPixel = src->bytesPerPixel;
+ result.format = src->format;
result.pixels = src->getBasePtr(_bounds.left, _bounds.top);
return result;
@@ -301,14 +308,14 @@ void GfxSurface::unlockSurface() {
}
/**
- * Fills a specified rectangle on the surface with the specified colour
+ * Fills a specified rectangle on the surface with the specified color
*
* @bounds Area to fill
- * @colour Colour to use
+ * @color Color to use
*/
-void GfxSurface::fillRect(const Rect &bounds, int colour) {
+void GfxSurface::fillRect(const Rect &bounds, int color) {
Graphics::Surface surface = lockSurface();
- surface.fillRect(bounds, colour);
+ surface.fillRect(bounds, color);
unlockSurface();
}
@@ -326,12 +333,12 @@ GfxSurface &GfxSurface::operator=(const GfxSurface &s) {
_disableUpdates = s._disableUpdates;
_bounds = s._bounds;
_centroid = s._centroid;
- _transColour = s._transColour;
+ _transColor = s._transColor;
if (_customSurface) {
// Surface owns the internal data, so replicate it so new surface owns it's own
_customSurface = new Graphics::Surface();
- _customSurface->create(s._customSurface->w, s._customSurface->h, 1);
+ _customSurface->create(s._customSurface->w, s._customSurface->h, Graphics::PixelFormat::createFormatCLUT8());
const byte *srcP = (const byte *)s._customSurface->getBasePtr(0, 0);
byte *destP = (byte *)_customSurface->getBasePtr(0, 0);
@@ -348,14 +355,14 @@ bool GfxSurface::displayText(const Common::String &msg, const Common::Point &pt)
// Set up a new graphics manager
GfxManager gfxManager;
gfxManager.activate();
- gfxManager._font._colours.background = 0;
- gfxManager._font._colours.foreground = 7;
+ gfxManager._font._colors.background = 0;
+ gfxManager._font._colors.foreground = 7;
gfxManager._font.setFontNumber(2);
// Get the area for text display
Rect textRect;
gfxManager.getStringBounds(msg.c_str(), textRect, 200);
- textRect.centre(pt.x, pt.y);
+ textRect.center(pt.x, pt.y);
// Make a backup copy of the area the text will occupy
Rect saveRect = textRect;
@@ -390,7 +397,7 @@ void GfxSurface::loadScreenSection(Graphics::Surface &dest, int xHalf, int yHalf
if (xSection < xHalfCount && ySection < yHalfCount) {
int rlbNum = xSection * yHalfCount + ySection;
- byte *data = _vm->_dataManager->getResource(RES_BITMAP, screenNum, rlbNum);
+ byte *data = _resourceManager->getResource(RES_BITMAP, screenNum, rlbNum);
for (int y = 0; y < updateRect.height(); ++y) {
byte *pSrc = data + y * 160;
@@ -410,19 +417,20 @@ void GfxSurface::loadScreenSection(Graphics::Surface &dest, int xHalf, int yHalf
* included in a scaled image
*/
static int *scaleLine(int size, int srcSize) {
- int scale = 100 * size / srcSize;
+ const int PRECISION_FACTOR = 1000;
+ int scale = PRECISION_FACTOR * size / srcSize;
assert(scale >= 0);
int *v = new int[size];
- Common::set_to(v, &v[size], 0);
+ Common::set_to(v, &v[size], -1);
- int distCtr = 0;
+ int distCtr = PRECISION_FACTOR / 2;
int *destP = v;
for (int distIndex = 0; distIndex < srcSize; ++distIndex) {
distCtr += scale;
- while (distCtr >= 100) {
+ while (distCtr > PRECISION_FACTOR) {
assert(destP < &v[size]);
*destP++ = distIndex;
- distCtr -= 100;
+ distCtr -= PRECISION_FACTOR;
}
}
@@ -436,7 +444,7 @@ static int *scaleLine(int size, int srcSize) {
* @param NewHeight New height for scaled image
* @remarks Caller is responsible for freeing the returned surface
*/
-static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize) {
+static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize, int transIndex) {
GfxSurface s;
s.create(xSize, ySize);
@@ -448,12 +456,22 @@ static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize) {
// Loop to create scaled version
for (int yp = 0; yp < ySize; ++yp) {
- const byte *srcP = (const byte *)srcImage.getBasePtr(0, vertUsage[yp]);
byte *destP = (byte *)destImage.getBasePtr(0, yp);
- for (int xp = 0; xp < xSize; ++xp) {
- const byte *tempSrcP = srcP + horizUsage[xp];
- *destP++ = *tempSrcP++;
+ if (vertUsage[yp] == -1) {
+ Common::set_to(destP, destP + xSize, transIndex);
+ } else {
+ const byte *srcP = (const byte *)srcImage.getBasePtr(0, vertUsage[yp]);
+
+ for (int xp = 0; xp < xSize; ++xp) {
+ if (horizUsage[xp] != -1) {
+ const byte *tempSrcP = srcP + horizUsage[xp];
+ *destP++ = *tempSrcP++;
+ } else {
+ // Pixel overrun at the end of the line
+ *destP++ = transIndex;
+ }
+ }
}
}
@@ -472,6 +490,8 @@ static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize) {
*/
void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Region *priorityRegion) {
GfxSurface srcImage;
+ if (srcBounds.isEmpty())
+ return;
if (srcBounds == src.getBounds())
srcImage = src;
@@ -493,7 +513,7 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi
}
if ((destBounds.width() != srcBounds.width()) || (destBounds.height() != srcBounds.height()))
- srcImage = ResizeSurface(srcImage, destBounds.width(), destBounds.height());
+ srcImage = ResizeSurface(srcImage, destBounds.width(), destBounds.height(), src._transColor);
Graphics::Surface srcSurface = srcImage.lockSurface();
Graphics::Surface destSurface = lockSurface();
@@ -519,7 +539,7 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi
for (int y = 0; y < destBounds.height(); ++y, pSrc += srcSurface.pitch, pDest += destSurface.pitch) {
- if (!priorityRegion && (src._transColour == -1))
+ if (!priorityRegion && (src._transColor == -1))
Common::copy(pSrc, pSrc + destBounds.width(), pDest);
else {
const byte *tempSrc = pSrc;
@@ -530,7 +550,7 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi
if (!priorityRegion || !priorityRegion->contains(Common::Point(
xp + _globals->_sceneManager._scene->_sceneBounds.left,
destBounds.top + y + _globals->_sceneManager._scene->_sceneBounds.top))) {
- if (*tempSrc != src._transColour)
+ if (*tempSrc != src._transColor)
*tempDest = *tempSrc;
}
++tempSrc;
@@ -570,8 +590,8 @@ GfxElement::GfxElement() {
void GfxElement::setDefaults() {
_flags = 0;
_fontNumber = _globals->_gfxFontNumber;
- _colours = _globals->_gfxColours;
- _fontColours = _globals->_fontColours;
+ _colors = _globals->_gfxColors;
+ _fontColors = _globals->_fontColors;
}
/**
@@ -583,15 +603,15 @@ void GfxElement::highlight() {
Graphics::Surface surface = gfxManager.lockSurface();
// Scan through the contents of the element, switching any occurances of the foreground
- // colour with the background colour and vice versa
+ // color with the background color and vice versa
Rect tempRect(_bounds);
tempRect.collapse(2, 2);
for (int yp = tempRect.top; yp < tempRect.bottom; ++yp) {
byte *lineP = (byte *)surface.getBasePtr(tempRect.left, yp);
for (int xp = tempRect.left; xp < tempRect.right; ++xp, ++lineP) {
- if (*lineP == _colours.background) *lineP = _colours.foreground;
- else if (*lineP == _colours.foreground) *lineP = _colours.background;
+ if (*lineP == _colors.background) *lineP = _colors.foreground;
+ else if (*lineP == _colors.foreground) *lineP = _colors.background;
}
}
@@ -607,31 +627,31 @@ void GfxElement::drawFrame() {
GfxManager &gfxManager = _globals->gfxManager();
gfxManager.lockSurface();
- uint8 bgColour, fgColour;
+ uint8 bgColor, fgColor;
if (_flags & GFXFLAG_THICK_FRAME) {
- bgColour = 0;
- fgColour = 0;
+ bgColor = 0;
+ fgColor = 0;
} else {
- bgColour = _fontColours.background;
- fgColour = _fontColours.foreground;
+ bgColor = _fontColors.background;
+ fgColor = _fontColors.foreground;
}
Rect tempRect = _bounds;
tempRect.collapse(3, 3);
tempRect.collapse(-1, -1);
- gfxManager.fillRect(tempRect, _colours.background);
+ gfxManager.fillRect(tempRect, _colors.background);
--tempRect.bottom; --tempRect.right;
- gfxManager.fillArea(tempRect.left, tempRect.top, bgColour);
- gfxManager.fillArea(tempRect.left, tempRect.bottom, fgColour);
- gfxManager.fillArea(tempRect.right, tempRect.top, fgColour);
- gfxManager.fillArea(tempRect.right, tempRect.bottom, fgColour);
+ gfxManager.fillArea(tempRect.left, tempRect.top, bgColor);
+ gfxManager.fillArea(tempRect.left, tempRect.bottom, fgColor);
+ gfxManager.fillArea(tempRect.right, tempRect.top, fgColor);
+ gfxManager.fillArea(tempRect.right, tempRect.bottom, fgColor);
tempRect.collapse(-1, -1);
- gfxManager.fillRect2(tempRect.left + 1, tempRect.top, tempRect.width() - 1, 1, bgColour);
- gfxManager.fillRect2(tempRect.left, tempRect.top + 1, 1, tempRect.height() - 1, bgColour);
- gfxManager.fillRect2(tempRect.left + 1, tempRect.bottom, tempRect.width() - 1, 1, fgColour);
- gfxManager.fillRect2(tempRect.right, tempRect.top + 1, 1, tempRect.height() - 1, fgColour);
+ gfxManager.fillRect2(tempRect.left + 1, tempRect.top, tempRect.width() - 1, 1, bgColor);
+ gfxManager.fillRect2(tempRect.left, tempRect.top + 1, 1, tempRect.height() - 1, bgColor);
+ gfxManager.fillRect2(tempRect.left + 1, tempRect.bottom, tempRect.width() - 1, 1, fgColor);
+ gfxManager.fillRect2(tempRect.right, tempRect.top + 1, 1, tempRect.height() - 1, fgColor);
gfxManager.fillArea(tempRect.left, tempRect.top, 0);
gfxManager.fillArea(tempRect.left, tempRect.bottom, 0);
@@ -702,7 +722,7 @@ void GfxImage::setDefaults() {
// Decode the image
uint size;
- byte *imgData = _vm->_dataManager->getSubResource(_resNum, _rlbNum, _cursorNum, &size);
+ byte *imgData = _resourceManager->getSubResource(_resNum, _rlbNum, _cursorNum, &size);
_surface = surfaceFromRes(imgData);
DEALLOCATE(imgData);
@@ -753,10 +773,10 @@ void GfxMessage::draw() {
GfxFontBackup font;
GfxManager &gfxManager = _globals->gfxManager();
- // Set the font and colour
+ // Set the font and color
gfxManager.setFillFlag(false);
gfxManager._font.setFontNumber(_fontNumber);
- gfxManager._font._colours.foreground = this->_colours.foreground;
+ gfxManager._font._colors.foreground = this->_colors.foreground;
// Display the text
gfxManager._font.writeLines(_message.c_str(), _bounds, _textAlign);
@@ -791,14 +811,14 @@ void GfxButton::draw() {
// Draw a basic frame for the button
drawFrame();
- // Set the font and colour
+ // Set the font and color
gfxManager._font.setFontNumber(_fontNumber);
- gfxManager._font._colours.foreground = this->_colours.foreground;
+ gfxManager._font._colors.foreground = this->_colors.foreground;
// Display the button's text
Rect tempRect(_bounds);
tempRect.collapse(3, 3);
- gfxManager._font.writeLines(_message.c_str(), tempRect, ALIGN_CENTRE);
+ gfxManager._font.writeLines(_message.c_str(), tempRect, ALIGN_CENTER);
gfxManager.unlockSurface();
}
@@ -928,7 +948,7 @@ void GfxDialog::setTopLeft(int xp, int yp) {
_bounds.moveTo(xp - 6, yp - 6);
}
-void GfxDialog::setCentre(int xp, int yp) {
+void GfxDialog::setCenter(int xp, int yp) {
setTopLeft(xp - (_bounds.width() / 2), yp - (_bounds.height() / 2));
}
@@ -986,9 +1006,9 @@ GfxButton *GfxDialog::execute(GfxButton *defaultButton) {
void GfxDialog::setPalette() {
_globals->_scenePalette.loadPalette(0);
_globals->_scenePalette.setPalette(0, 1);
- _globals->_scenePalette.setPalette(_globals->_scenePalette._colours.foreground, 1);
- _globals->_scenePalette.setPalette(_globals->_fontColours.background, 1);
- _globals->_scenePalette.setPalette(_globals->_fontColours.foreground, 1);
+ _globals->_scenePalette.setPalette(_globals->_scenePalette._colors.foreground, 1);
+ _globals->_scenePalette.setPalette(_globals->_fontColors.background, 1);
+ _globals->_scenePalette.setPalette(_globals->_fontColors.foreground, 1);
_globals->_scenePalette.setPalette(255, 1);
}
@@ -1013,7 +1033,7 @@ void GfxManager::setDefaults() {
_pane0Rect4 = screenBounds;
_font._edgeSize = Common::Point(1, 1);
- _font._colours = _globals->_fontColours;
+ _font._colors = _globals->_fontColors;
_font.setFontNumber(_globals->_gfxFontNumber);
}
@@ -1040,20 +1060,20 @@ void GfxManager::getStringBounds(const char *s, Rect &bounds, int maxWidth) {
_font.getStringBounds(s, bounds, maxWidth);
}
-void GfxManager::fillArea(int xp, int yp, int colour) {
+void GfxManager::fillArea(int xp, int yp, int color) {
_surface.setBounds(_bounds);
Rect tempRect(xp, yp, xp + _font._edgeSize.x, yp + _font._edgeSize.y);
- _surface.fillRect(tempRect, colour);
+ _surface.fillRect(tempRect, color);
}
-void GfxManager::fillRect(const Rect &bounds, int colour) {
+void GfxManager::fillRect(const Rect &bounds, int color) {
_surface.setBounds(_bounds);
- _surface.fillRect(bounds, colour);
+ _surface.fillRect(bounds, color);
}
-void GfxManager::fillRect2(int xs, int ys, int width, int height, int colour) {
+void GfxManager::fillRect2(int xs, int ys, int width, int height, int color) {
_surface.setBounds(_bounds);
- _surface.fillRect(Rect(xs, ys, xs + width, ys + height), colour);
+ _surface.fillRect(Rect(xs, ys, xs + width, ys + height), color);
}
/**
@@ -1061,10 +1081,10 @@ void GfxManager::fillRect2(int xs, int ys, int width, int height, int colour) {
*/
void GfxManager::setDialogPalette() {
// Get the main palette information
- RGB8 palData[256];
+ byte palData[256 * 3];
uint count, start;
- _vm->_dataManager->getPalette(0, &palData[0], &start, &count);
- g_system->getPaletteManager()->setPalette((byte *)&palData[0], start, count);
+ _resourceManager->getPalette(0, &palData[0], &start, &count);
+ g_system->getPaletteManager()->setPalette(&palData[0], start, count);
// Miscellaneous
uint32 white = 0xffffffff;
@@ -1098,7 +1118,7 @@ int GfxManager::getAngle(const Common::Point &p1, const Common::Point &p2) {
GfxFont::GfxFont() {
- _fontNumber = 50;
+ _fontNumber = (_vm->getFeatures() & GF_DEMO) ? 0 : 50;
_numChars = 0;
_bpp = 0;
_fontData = NULL;
@@ -1122,9 +1142,9 @@ void GfxFont::setFontNumber(uint32 fontNumber) {
_fontNumber = fontNumber;
- _fontData = _vm->_tSageManager->getResource(RES_FONT, _fontNumber, 0, true);
+ _fontData = _resourceManager->getResource(RES_FONT, _fontNumber, 0, true);
if (!_fontData)
- _fontData = _vm->_dataManager->getResource(RES_FONT, _fontNumber, 0);
+ _fontData = _resourceManager->getResource(RES_FONT, _fontNumber, 0);
_numChars = READ_LE_UINT16(_fontData + 4);
_fontSize.y = READ_LE_UINT16(_fontData + 6);
@@ -1268,7 +1288,7 @@ int GfxFont::writeChar(const char ch) {
charRect.translate(_topLeft.x + _position.x, _topLeft.y + _position.y + yOffset);
if (_fillFlag)
- surfacePtr.fillRect(charRect, _colours.background);
+ surfacePtr.fillRect(charRect, _colors.background);
charRect.bottom = charRect.top + charHeight;
@@ -1279,7 +1299,7 @@ int GfxFont::writeChar(const char ch) {
byte *destP = (byte *)surfacePtr.getBasePtr(charRect.left, yp);
for (int xs = 0; xs < charRect.width(); ++xs, ++destP) {
- // Get the next colour index to use
+ // Get the next color index to use
if ((bitCtr % 8) == 0) v = *dataP++;
int colIndex = 0;
for (int subCtr = 0; subCtr < _bpp; ++subCtr, ++bitCtr) {
@@ -1288,10 +1308,10 @@ int GfxFont::writeChar(const char ch) {
}
switch (colIndex) {
- //case 0: *destP = _colours.background; break;
- case 1: *destP = _colours.foreground; break;
- case 2: *destP = _colours2.background; break;
- case 3: *destP = _colours2.foreground; break;
+ //case 0: *destP = _colors.background; break;
+ case 1: *destP = _colors.foreground; break;
+ case 2: *destP = _colors2.background; break;
+ case 3: *destP = _colors2.foreground; break;
}
}
}
@@ -1355,7 +1375,7 @@ void GfxFont::writeLines(const char *s, const Rect &bounds, TextAlign align) {
writeString(s, numChars);
break;
- case ALIGN_CENTRE:
+ case ALIGN_CENTER:
// Center aligned text
_position.x = bounds.left + (bounds.width() / 2) - (getStringWidth(s, numChars) / 2);
writeString(s, numChars);
@@ -1415,7 +1435,7 @@ void GfxFont::writeLines(const char *s, const Rect &bounds, TextAlign align) {
GfxFontBackup::GfxFontBackup() {
_edgeSize = _globals->gfxManager()._font._edgeSize;
_position = _globals->gfxManager()._font._position;
- _colours = _globals->gfxManager()._font._colours;
+ _colors = _globals->gfxManager()._font._colors;
_fontNumber = _globals->gfxManager()._font._fontNumber;
}
@@ -1423,7 +1443,7 @@ GfxFontBackup::~GfxFontBackup() {
_globals->gfxManager()._font.setFontNumber(_fontNumber);
_globals->gfxManager()._font._edgeSize = _edgeSize;
_globals->gfxManager()._font._position = _position;
- _globals->gfxManager()._font._colours = _colours;
+ _globals->gfxManager()._font._colors = _colors;
}
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index 0ad76772b3..8be4629493 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -48,22 +48,22 @@ public:
void set(int16 x1, int16 y1, int16 x2, int16 y2);
void collapse(int dx, int dy);
- void centre(int dx, int dy);
- void centre(const Rect &r);
- void centre(const Common::Point &pt) { centre(pt.x, pt.y); }
+ void center(int dx, int dy);
+ void center(const Rect &r);
+ void center(const Common::Point &pt) { center(pt.x, pt.y); }
void contain(const Rect &r);
void resize(const GfxSurface &surface, int xp, int yp, int percent);
void expandPanes();
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
};
-class GfxColours {
+class GfxColors {
public:
uint8 foreground;
uint8 background;
- GfxColours() : foreground(0), background(0) {};
+ GfxColors() : foreground(0), background(0) {};
};
class LineSlice {
@@ -85,7 +85,7 @@ private:
Rect _bounds;
public:
Common::Point _centroid;
- int _transColour;
+ int _transColor;
public:
GfxSurface();
GfxSurface(const GfxSurface &s);
@@ -108,14 +108,14 @@ public:
copyFrom(src, tempRect, priorityRegion);
}
void draw(const Common::Point &pt, Rect *rect = NULL);
- void fillRect(const Rect &bounds, int colour);
+ void fillRect(const Rect &bounds, int color);
GfxSurface &operator=(const GfxSurface &s);
static void loadScreenSection(Graphics::Surface &dest, int xHalf, int yHalf, int xSection, int ySection);
static bool displayText(const Common::String &msg, const Common::Point &pt = Common::Point(160, 100));
};
-enum TextAlign {ALIGN_LEFT = 0, ALIGN_CENTRE = 1, ALIGN_RIGHT = 2, ALIGN_JUSTIFIED = 3};
+enum TextAlign {ALIGN_LEFT = 0, ALIGN_CENTER = 1, ALIGN_RIGHT = 2, ALIGN_JUSTIFIED = 3};
class GfxFont {
friend class GfxFontBackup;
@@ -131,8 +131,8 @@ public:
Common::Point _edgeSize;
Common::Point _position;
bool _fillFlag;
- GfxColours _colours;
- GfxColours _colours2;
+ GfxColors _colors;
+ GfxColors _colors2;
uint32 _fontNumber;
Common::Point _topLeft;
public:
@@ -160,7 +160,7 @@ private:
GfxSurface *_surface;
Common::Point _edgeSize;
Common::Point _position;
- GfxColours _colours;
+ GfxColors _colors;
uint32 _fontNumber;
public:
GfxFontBackup();
@@ -177,8 +177,8 @@ public:
Rect _bounds;
uint16 _flags;
uint16 _fontNumber;
- GfxColours _colours;
- GfxColours _fontColours;
+ GfxColors _colors;
+ GfxColors _fontColors;
uint16 _keycode;
public:
GfxElement();
@@ -275,19 +275,19 @@ public:
return _surface.lockSurface();
}
void unlockSurface() { _surface.unlockSurface(); };
- void fillArea(int xp, int yp, int colour);
- void fillRect(const Rect &bounds, int colour);
- void fillRect2(int xs, int ys, int width, int height, int colour);
+ void fillArea(int xp, int yp, int color);
+ void fillRect(const Rect &bounds, int color);
+ void fillRect2(int xs, int ys, int width, int height, int color);
void setFillFlag(bool v) { _font._fillFlag = v; }
static int getAngle(const Common::Point &p1, const Common::Point &p2);
// Virtual method table
- virtual void xorArea(const Common::Rect &r, int colour, int fillMode) {
- //_surface->xorArea(r, colour, fillMode);
+ virtual void xorArea(const Common::Rect &r, int color, int fillMode) {
+ //_surface->xorArea(r, color, fillMode);
}
- virtual void draw(const Common::Rect &r, void *gfxData, int v1, GfxColours *colours) {
- //_surface->draw(r, gfxData, v1, colours);
+ virtual void draw(const Common::Rect &r, void *gfxData, int v1, GfxColors *colors) {
+ //_surface->draw(r, gfxData, v1, colors);
}
virtual void copy(const byte *src, byte *dest, int size) {
Common::copy(src, src + size, dest);
@@ -325,7 +325,7 @@ public:
void add(GfxElement *element);
void addElements(GfxElement *ge, ...);
void setTopLeft(int xp, int yp);
- void setCentre(int xp, int yp);
+ void setCenter(int xp, int yp);
void frame() {
setDefaults();
_bounds.collapse(6, 6);
diff --git a/engines/tsage/module.mk b/engines/tsage/module.mk
index 41a868195b..2f9194a9ba 100644
--- a/engines/tsage/module.mk
+++ b/engines/tsage/module.mk
@@ -10,6 +10,7 @@ MODULE_OBJS := \
globals.o \
graphics.o \
resources.o \
+ ringworld_demo.o \
ringworld_logic.o \
ringworld_scenes1.o \
ringworld_scenes2.o \
diff --git a/engines/tsage/resources.cpp b/engines/tsage/resources.cpp
index c87c3eaf1e..2b678a848a 100644
--- a/engines/tsage/resources.cpp
+++ b/engines/tsage/resources.cpp
@@ -29,6 +29,7 @@
#include "common/stack.h"
#include "common/util.h"
#include "tsage/resources.h"
+#include "tsage/tsage.h"
namespace tSage {
@@ -134,7 +135,7 @@ uint16 BitReader::readToken() {
/*-------------------------------------------------------------------------*/
-RlbManager::RlbManager(MemoryManager &memManager, const Common::String filename) :
+TLib::TLib(MemoryManager &memManager, const Common::String &filename) :
_memoryManager(memManager) {
// If the resource strings list isn't yet loaded, load them
@@ -154,11 +155,11 @@ RlbManager::RlbManager(MemoryManager &memManager, const Common::String filename)
loadIndex();
}
-RlbManager::~RlbManager() {
+TLib::~TLib() {
_resStrings.clear();
}
-void RlbManager::loadSection(uint32 fileOffset) {
+void TLib::loadSection(uint32 fileOffset) {
_resources.clear();
_file.seek(fileOffset);
_sections.fileOffset = fileOffset;
@@ -197,13 +198,13 @@ struct DecodeReference {
/**
* Gets a resource from the currently loaded section
*/
-byte *RlbManager::getResource(uint16 id, bool suppressErrors) {
+byte *TLib::getResource(uint16 id, bool suppressErrors) {
// Scan for an entry for the given Id
- ResourceEntry *re= NULL;
- ResourceList::iterator i;
- for (i = _resources.begin(); i != _resources.end(); ++i) {
- if ((*i).id == id) {
- re = &(*i);
+ ResourceEntry *re = NULL;
+ ResourceList::iterator iter;
+ for (iter = _resources.begin(); iter != _resources.end(); ++iter) {
+ if ((*iter).id == id) {
+ re = &(*iter);
break;
}
}
@@ -238,6 +239,9 @@ byte *RlbManager::getResource(uint16 id, bool suppressErrors) {
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) {
+ table[i].vByte = table[i].vWord = 0;
+ }
Common::Stack<uint16> tokenList;
for (;;) {
@@ -307,7 +311,7 @@ byte *RlbManager::getResource(uint16 id, bool suppressErrors) {
/**
* Finds the correct section and loads the specified resource within it
*/
-byte *RlbManager::getResource(ResourceType resType, uint16 resNum, uint16 rlbNum, bool suppressErrors) {
+byte *TLib::getResource(ResourceType resType, uint16 resNum, uint16 rlbNum, bool suppressErrors) {
SectionList::iterator i = _sections.begin();
while ((i != _sections.end()) && ((*i).resType != resType || (*i).resNum != resNum))
++i;
@@ -322,7 +326,7 @@ byte *RlbManager::getResource(ResourceType resType, uint16 resNum, uint16 rlbNum
return getResource(rlbNum, suppressErrors);
}
-void RlbManager::loadIndex() {
+void TLib::loadIndex() {
uint16 resNum, configId, fileOffset;
// Load the root resources section
@@ -356,26 +360,32 @@ void RlbManager::loadIndex() {
*
* @paletteNum Specefies the palette number
*/
-void RlbManager::getPalette(int paletteNum, RGB8 *palData, uint *startNum, uint *numEntries) {
+bool TLib::getPalette(int paletteNum, byte *palData, uint *startNum, uint *numEntries) {
// Get the specified palette
- byte *dataIn = getResource(RES_PALETTE, 0, paletteNum);
- assert(dataIn);
+ byte *dataIn = getResource(RES_PALETTE, 0, paletteNum, true);
+ if (!dataIn)
+ return false;
*startNum = READ_LE_UINT16(dataIn);
*numEntries = READ_LE_UINT16(dataIn + 2);
- RGB8 *srcPal = (RGB8 *)(dataIn + 6);
assert((*startNum < 256) && ((*startNum + *numEntries) <= 256));
// Copy over the data
- Common::copy(&srcPal[0], &srcPal[*numEntries], palData);
+ Common::copy(&dataIn[6], &dataIn[6 + *numEntries * 3], palData);
_memoryManager.deallocate(dataIn);
+ return true;
}
-byte *RlbManager::getSubResource(int resNum, int rlbNum, int index, uint *size) {
+byte *TLib::getSubResource(int resNum, int rlbNum, int index, uint *size, bool suppressErrors) {
// Get the specified image set
byte *dataIn = getResource(RES_VISAGE, resNum, rlbNum);
- assert(dataIn);
+ if (!dataIn) {
+ if (suppressErrors)
+ return NULL;
+
+ error("Unknown sub resource %d/%d index %d", resNum, rlbNum, index);
+ }
int numEntries = READ_LE_UINT16(dataIn);
uint32 entryOffset = READ_LE_UINT32(dataIn + 2 + (index - 1) * 4);
@@ -394,16 +404,97 @@ byte *RlbManager::getSubResource(int resNum, int rlbNum, int index, uint *size)
/**
* Retrieves a given message resource, and returns the specified message number
*/
-Common::String RlbManager::getMessage(int resNum, int lineNum) {
- byte *msgData = getResource(RES_MESSAGE, resNum, 0);
- assert(msgData);
+bool TLib::getMessage(int resNum, int lineNum, Common::String &result, bool suppressErrors) {
+ byte *msgData = getResource(RES_MESSAGE, resNum, 0, true);
+ if (!msgData) {
+ if (suppressErrors)
+ return false;
+
+ error("Unknown message %d line %d", resNum, lineNum);
+ }
const char *srcP = (const char *)msgData;
while (lineNum-- > 0)
srcP += strlen(srcP) + 1;
- Common::String result(srcP);
+ result = Common::String(srcP);
_memoryManager.deallocate(msgData);
+ return true;
+}
+
+/*--------------------------------------------------------------------------*/
+
+ResourceManager::~ResourceManager() {
+ for (uint idx = 0; idx < _libList.size(); ++idx)
+ delete _libList[idx];
+}
+
+void ResourceManager::addLib(const Common::String &libName) {
+ assert(_libList.size() < 5);
+
+ _libList.push_back(new TLib(_vm->_memoryManager, libName));
+}
+
+byte *ResourceManager::getResource(uint16 id, bool suppressErrors) {
+ byte *result = NULL;
+ for (uint idx = 0; idx < _libList.size(); ++idx) {
+ result = _libList[idx]->getResource(id, true);
+ if (result)
+ return result;
+ }
+
+ if (!result && !suppressErrors)
+ error("Could not find resource Id #%d", id);
+ return NULL;
+}
+
+byte *ResourceManager::getResource(ResourceType resType, uint16 resNum, uint16 rlbNum, bool suppressErrors) {
+ byte *result = NULL;
+ for (uint idx = 0; idx < _libList.size(); ++idx) {
+ result = _libList[idx]->getResource(resType, resNum, rlbNum, true);
+ if (result)
+ return result;
+ }
+
+ if (!result && !suppressErrors)
+ error("Unknown resource type %d num %d", resType, resNum);
+ return NULL;
+}
+
+void ResourceManager::getPalette(int paletteNum, byte *palData, uint *startNum, uint *numEntries, bool suppressErrors) {
+ for (uint idx = 0; idx < _libList.size(); ++idx) {
+ if (_libList[idx]->getPalette(paletteNum, palData, startNum, numEntries))
+ return;
+ }
+
+ if (!suppressErrors)
+ error("Unknown palette resource %d", paletteNum);
+ *numEntries = 0;
+}
+
+byte *ResourceManager::getSubResource(int resNum, int rlbNum, int index, uint *size, bool suppressErrors) {
+ byte *result = NULL;
+ for (uint idx = 0; idx < _libList.size(); ++idx) {
+ result = _libList[idx]->getSubResource(resNum, rlbNum, index, size, true);
+ if (result)
+ return result;
+ }
+
+ if (!result && !suppressErrors)
+ error("Unknown resource %d/%d index %d", resNum, rlbNum, index);
+ return NULL;
+}
+
+Common::String ResourceManager::getMessage(int resNum, int lineNum, bool suppressErrors) {
+ Common::String result;
+
+ for (uint idx = 0; idx < _libList.size(); ++idx) {
+ if (_libList[idx]->getMessage(resNum, lineNum, result, true))
+ return result;
+ }
+
+ if (!suppressErrors)
+ error("Unknown message %d line %d", resNum, lineNum);
return result;
}
diff --git a/engines/tsage/resources.h b/engines/tsage/resources.h
index 1af1bb8d2f..7b518cabd6 100644
--- a/engines/tsage/resources.h
+++ b/engines/tsage/resources.h
@@ -27,10 +27,12 @@
#define RING_RESOURCES_H
#include "common/scummsys.h"
+#include "common/array.h"
#include "common/file.h"
#include "common/list.h"
#include "common/str.h"
#include "common/str-array.h"
+#include "common/textconsole.h"
#include "common/util.h"
#include "graphics/surface.h"
@@ -45,16 +47,6 @@ enum ResourceType { RES_LIBRARY, RES_STRIP, RES_IMAGE, RES_PALETTE, RES_VISAGE,
RES_FONT, RES_POINTER, RES_BANK, RES_SND_DRIVER, RES_PRIORITY, RES_CONTROL, RES_WALKRGNS,
RES_BITMAP, RES_SAVE, RES_SEQUENCE };
-#include "common/pack-start.h" // START STRUCT PACKING
-
-struct RGB8 {
- uint8 r;
- uint8 g;
- uint8 b;
-} PACKED_STRUCT;
-
-#include "common/pack-end.h" // END STRUCT PACKING
-
class MemoryHeader {
public:
uint32 id;
@@ -127,7 +119,7 @@ public:
byte *lock(uint32 handle);
int indexOf(const byte *p);
void deallocate(const byte *p);
- void deallocate(uint16 handle) { assert("TODO"); }
+ void deallocate(uint16 handle) { warning("TODO: MemoryManager::deallocate(handle)"); }
uint32 getSize(const byte *p);
void incLocks(const byte *p);
};
@@ -148,7 +140,7 @@ public:
int numBits;
};
-class RlbManager {
+class TLib {
private:
Common::StringArray _resStrings;
MemoryManager &_memoryManager;
@@ -160,14 +152,29 @@ private:
void loadSection(uint32 fileOffset);
void loadIndex();
public:
- RlbManager(MemoryManager &memManager, const Common::String filename);
- ~RlbManager();
+ TLib(MemoryManager &memManager, const Common::String &filename);
+ ~TLib();
+
+ byte *getResource(uint16 id, bool suppressErrors = false);
+ byte *getResource(ResourceType resType, uint16 resNum, uint16 rlbNum, bool suppressErrors = false);
+ bool getPalette(int paletteNum, byte *palData, uint *startNum, uint *numEntries);
+ byte *getSubResource(int resNum, int rlbNum, int index, uint *size, bool suppressErrors = false);
+ bool getMessage(int resNum, int lineNum, Common::String &result, bool suppressErrors = false);
+};
+
+class ResourceManager {
+private:
+ Common::Array<TLib *> _libList;
+public:
+ ~ResourceManager();
+
+ void addLib(const Common::String &libName);
byte *getResource(uint16 id, bool suppressErrors = false);
byte *getResource(ResourceType resType, uint16 resNum, uint16 rlbNum, bool suppressErrors = false);
- void getPalette(int paletteNum, RGB8 *palData, uint *startNum, uint *numEntries);
- byte *getSubResource(int resNum, int rlbNum, int index, uint *size);
- Common::String getMessage(int resNum, int lineNum);
+ void getPalette(int paletteNum, byte *palData, uint *startNum, uint *numEntries, bool suppressErrors = false);
+ byte *getSubResource(int resNum, int rlbNum, int index, uint *size, bool suppressErrors = false);
+ Common::String getMessage(int resNum, int lineNum, bool suppressErrors = false);
};
diff --git a/engines/tsage/ringworld_demo.cpp b/engines/tsage/ringworld_demo.cpp
new file mode 100644
index 0000000000..29438c0347
--- /dev/null
+++ b/engines/tsage/ringworld_demo.cpp
@@ -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$
+ *
+ */
+
+#include "tsage/ringworld_demo.h"
+#include "tsage/scenes.h"
+#include "tsage/tsage.h"
+#include "tsage/staticres.h"
+
+namespace tSage {
+
+/*--------------------------------------------------------------------------
+ * Ringworld Demo scene
+ *
+ *--------------------------------------------------------------------------*/
+
+void RingworldDemoScene::postInit(SceneObjectList *OwnerList) {
+ signal();
+}
+
+void RingworldDemoScene::signal() {
+ _soundHandler.startSound(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
new file mode 100644
index 0000000000..63ffe56555
--- /dev/null
+++ b/engines/tsage/ringworld_demo.h
@@ -0,0 +1,52 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef TSAGE_RINGWORLD_DEMO_H
+#define TSAGE_RINGWORLD_DEMO_H
+
+#include "common/scummsys.h"
+#include "tsage/events.h"
+#include "tsage/core.h"
+#include "tsage/scenes.h"
+#include "tsage/globals.h"
+
+namespace tSage {
+
+
+class RingworldDemoScene: public Scene {
+public:
+ SequenceManager _sequenceManager;
+ SceneObject _actor1, _actor2, _actor3;
+ SceneObject _actor4, _actor5, _actor6;
+ SoundHandler _soundHandler;
+
+ virtual void postInit(SceneObjectList *OwnerList = NULL);
+ virtual void process(Event &event);
+ virtual void signal();
+};
+
+} // End of namespace tSage
+
+#endif
diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp
index 32f62bea76..d334e0ce1f 100644
--- a/engines/tsage/ringworld_logic.cpp
+++ b/engines/tsage/ringworld_logic.cpp
@@ -23,10 +23,14 @@
*
*/
+#include "common/config-manager.h"
+#include "common/translation.h"
+#include "gui/saveload.h"
#include "tsage/ringworld_logic.h"
#include "tsage/scenes.h"
#include "tsage/tsage.h"
#include "tsage/staticres.h"
+#include "tsage/ringworld_demo.h"
#include "tsage/ringworld_scenes1.h"
#include "tsage/ringworld_scenes2.h"
#include "tsage/ringworld_scenes3.h"
@@ -39,6 +43,9 @@
namespace tSage {
Scene *SceneFactory::createScene(int sceneNumber) {
+ if (_vm->getFeatures() & GF_DEMO)
+ return new RingworldDemoScene();
+
switch (sceneNumber) {
/* Scene group 1 */
// Kziniti Palace (Introduction)
@@ -141,32 +148,47 @@ Scene *SceneFactory::createScene(int sceneNumber) {
case 5300: return new Scene5300();
/* Scene group 8 */
- // Scene 7000: Landing
+ // Landing near beach
case 7000: return new Scene7000();
- // Scene 7100: swimming under water
+ // Underwater: swimming
case 7100: return new Scene7100();
- // Scene 7200: Entering the underwater cave
+ // Underwater: Entering the cave
case 7200: return new Scene7200();
- // Scene 7300: Discussion with Lord Poria
+ // Underwater: Lord Poria
case 7300: return new Scene7300();
+ // Floating Buildings: Outside
case 7600: return new Scene7600();
+ // Floating Buildings: In the lab
case 7700: return new Scene7700();
/* Scene group 10 */
+ // Near beach: Slave washing clothes
case 9100: return new Scene9100();
+ // Castle: Outside the bulwarks
case 9150: return new Scene9150();
+ // Castle: Near the fountain
case 9200: return new Scene9200();
+ // Castle: In front of a large guarded door
case 9300: return new Scene9300();
+ // Castle: In a hallway
case 9350: return new Scene9350();
+ // Castle: In a hallway
case 9360: return new Scene9360();
+ // Castle: Black-Smith room
case 9400: return new Scene9400();
+ // Castle: Dining room
case 9450: return new Scene9450();
+ // Castle: Bedroom
case 9500: return new Scene9500();
+ // Castle: Balcony
case 9700: return new Scene9700();
+ // Castle: In the garden
case 9750: return new Scene9750();
+ // Castle: Dressing room
case 9850: return new Scene9850();
- // Scene 9900: Ending
+ // Ending
case 9900: return new Scene9900();
+ // Space travel
case 9999: return new Scene9999();
default:
@@ -196,7 +218,7 @@ DisplayHotspot::DisplayHotspot(int regionId, ...) {
bool DisplayHotspot::performAction(int action) {
for (uint i = 0; i < _actions.size(); i += 3) {
if (_actions[i] == action) {
- display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
return true;
}
}
@@ -223,7 +245,7 @@ DisplayObject::DisplayObject(int firstAction, ...) {
bool DisplayObject::performAction(int action) {
for (uint i = 0; i < _actions.size(); i += 3) {
if (_actions[i] == action) {
- display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ display(_actions[i + 1], _actions[i + 2], SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
return true;
}
}
@@ -285,7 +307,7 @@ void SceneArea::wait() {
g_system->delayMillis(10);
}
- SynchronisedList<SceneItem *>::iterator ii;
+ SynchronizedList<SceneItem *>::iterator ii;
for (ii = _globals->_sceneItems.begin(); ii != _globals->_sceneItems.end(); ++ii) {
SceneItem *sceneItem = *ii;
if (sceneItem->contains(event.mousePos)) {
@@ -297,14 +319,17 @@ void SceneArea::wait() {
_globals->_events.setCursor(CURSOR_ARROW);
}
-void SceneArea::synchronise(Serialiser &s) {
+void SceneArea::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ SavedObject::synchronize(s);
+
s.syncAsSint16LE(_pt.x);
s.syncAsSint16LE(_pt.y);
s.syncAsSint32LE(_resNum);
s.syncAsSint32LE(_rlbNum);
s.syncAsSint32LE(_subNum);
s.syncAsSint32LE(_actionId);
- _bounds.synchronise(s);
+ _bounds.synchronize(s);
}
/*--------------------------------------------------------------------------*/
@@ -313,7 +338,7 @@ SpeakerGText::SpeakerGText() {
_speakerName = "GTEXT";
_textWidth = 160;
_textPos = Common::Point(130, 10);
- _colour1 = 42;
+ _color1 = 42;
_hideObjects = false;
}
@@ -322,7 +347,7 @@ void SpeakerGText::setText(const Common::String &msg) {
_sceneObject.postInit();
_sceneObject.setVisage(9405);
_sceneObject.setStrip2(3);
- _sceneObject.setPriority2(255);
+ _sceneObject.fixPriority(255);
_sceneObject.changeZoom(100);
_sceneObject._frame = 1;
_sceneObject.setPosition(Common::Point(183, 71));
@@ -331,7 +356,7 @@ void SpeakerGText::setText(const Common::String &msg) {
// Set the text
Rect textRect;
_globals->gfxManager()._font.getStringBounds(msg.c_str(), textRect, _textWidth);
- textRect.centre(_sceneObject._position.x, _sceneObject._position.y);
+ textRect.center(_sceneObject._position.x, _sceneObject._position.y);
_textPos.x = textRect.left;
Speaker::setText(msg);
}
@@ -347,7 +372,7 @@ SpeakerPOR::SpeakerPOR() {
_speakerName = "POR";
_newSceneNumber = 7221;
_textPos = Common::Point(10, 30);
- _colour1 = 41;
+ _color1 = 41;
}
void SpeakerPOR::SpeakerAction1::signal(){
@@ -371,19 +396,19 @@ void SpeakerPOR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(7223);
_object1.setStrip2(2);
- _object1.setPosition(Common::Point(191, 166), 0);
- _object1.animate(ANIM_MODE_7, 0, 0);
+ _object1.setPosition(Common::Point(191, 166));
+ _object1.animate(ANIM_MODE_7, 0, NULL);
_object2.postInit(&_objectList);
_object2.setVisage(7223);
- _object2.setPosition(Common::Point(159, 86), 0);
- _object2.setAction(&_speakerAction, 0);
+ _object2.setPosition(Common::Point(159, 86));
+ _object2.setAction(&_speakerAction, NULL);
_object3.postInit(&_objectList);
_object3.setVisage(7223);
_object3.setStrip(3);
- _object3.setPosition(Common::Point(119, 107), 0);
- _object3.setPriority2(199);
+ _object3.setPosition(Common::Point(119, 107));
+ _object3.fixPriority(199);
_object3.setAction(&_action2);
Speaker::setText(msg);
@@ -395,7 +420,7 @@ SpeakerOR::SpeakerOR() {
_speakerName = "OR";
_newSceneNumber = 9430;
_textPos = Common::Point(8, 36);
- _colour1 = 42;
+ _color1 = 42;
_textWidth = 136;
}
@@ -403,20 +428,20 @@ void SpeakerOR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(9431);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
- _object1.setPosition(Common::Point(202, 147), 0);
- _object1.animate(ANIM_MODE_7, 0, 0);
+ _object1.setPosition(Common::Point(202, 147));
+ _object1.animate(ANIM_MODE_7, 0, NULL);
_object2.postInit(&_objectList);
_object2.setVisage(9431);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.setZoom(100);
_object2._frame = 1;
- _object2.setPosition(Common::Point(199, 85), 0);
- _object2.setAction(&_speakerAction, 0);
+ _object2.setPosition(Common::Point(199, 85));
+ _object2.setAction(&_speakerAction, NULL);
Speaker::setText(msg);
}
@@ -427,7 +452,7 @@ SpeakerOText::SpeakerOText() : SpeakerGText() {
_speakerName = "OTEXT";
_textWidth = 240;
_textPos = Common::Point(130, 10);
- _colour1 = 42;
+ _color1 = 42;
_hideObjects = false;
}
@@ -436,9 +461,9 @@ SpeakerOText::SpeakerOText() : SpeakerGText() {
SpeakerQText::SpeakerQText() : ScreenSpeaker() {
_speakerName = "QTEXT";
_textPos = Common::Point(160, 40);
- _colour1 = 35;
+ _color1 = 35;
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
+ _textMode = ALIGN_CENTER;
_hideObjects = false;
}
@@ -446,9 +471,9 @@ SpeakerQText::SpeakerQText() : ScreenSpeaker() {
SpeakerSText::SpeakerSText() : ScreenSpeaker() {
_speakerName = "STEXT";
- _colour1 = 13;
+ _color1 = 13;
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
+ _textMode = ALIGN_CENTER;
_hideObjects = false;
}
@@ -457,8 +482,8 @@ SpeakerSText::SpeakerSText() : ScreenSpeaker() {
SpeakerPOText::SpeakerPOText() : ScreenSpeaker() {
_speakerName = "POTEXT";
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
- _colour1 = 41;
+ _textMode = ALIGN_CENTER;
+ _color1 = 41;
_hideObjects = false;
}
@@ -466,9 +491,9 @@ SpeakerPOText::SpeakerPOText() : ScreenSpeaker() {
SpeakerMText::SpeakerMText() {
_speakerName = "MTEXT";
- _colour1 = 11;
- _textWidth = 160;
- _textMode = ALIGN_CENTRE;
+ _color1 = 22;
+ _textWidth = 230;
+ _textMode = ALIGN_CENTER;
_hideObjects = false;
}
@@ -476,9 +501,9 @@ SpeakerMText::SpeakerMText() {
SpeakerCText::SpeakerCText() {
_speakerName = "CTEXT";
- _colour1 = 4;
+ _color1 = 4;
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
+ _textMode = ALIGN_CENTER;
_hideObjects = false;
}
@@ -487,18 +512,31 @@ SpeakerCText::SpeakerCText() {
SpeakerEText::SpeakerEText() {
_speakerName = "ETEXT";
_textPos = Common::Point(20, 20);
- _colour1 = 22;
+ _color1 = 22;
_hideObjects = false;
}
/*--------------------------------------------------------------------------*/
-SpeakerGR::SpeakerGR() {
+SpeakerGR::SpeakerGR() : AnimatedSpeaker() {
_speakerName = "GR";
_newSceneNumber = 9220;
_textWidth = 136;
_textPos = Common::Point(168, 36);
- _colour1 = 14;
+ _color1 = 14;
+}
+
+void SpeakerGR::setText(const Common::String &msg) {
+ _object1.postInit(&_objectList);
+ _object1.setVisage(9221);
+ _object1.setStrip2(2);
+ _object1.fixPriority(255);
+ _object1.changeZoom(100);
+ _object1._frame = 1;
+ _object1.setPosition(Common::Point(101, 70));
+ _object1.animate(ANIM_MODE_7, 0, NULL);
+
+ Speaker::setText(msg);
}
/*--------------------------------------------------------------------------*/
@@ -506,7 +544,7 @@ SpeakerGR::SpeakerGR() {
SpeakerHText::SpeakerHText() {
_speakerName = "HTEXT";
_textPos = Common::Point(160, 40);
- _colour1 = 52;
+ _color1 = 52;
_hideObjects = false;
}
@@ -515,8 +553,8 @@ SpeakerHText::SpeakerHText() {
SpeakerSKText::SpeakerSKText() : ScreenSpeaker() {
_speakerName = "SKTEXT";
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
- _colour1 = 5;
+ _textMode = ALIGN_CENTER;
+ _color1 = 9;
_hideObjects = false;
}
@@ -525,8 +563,8 @@ SpeakerSKText::SpeakerSKText() : ScreenSpeaker() {
SpeakerPText::SpeakerPText() {
_speakerName = "PTEXT";
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
- _colour1 = 5;
+ _textMode = ALIGN_CENTER;
+ _color1 = 5;
_hideObjects = false;
}
@@ -535,8 +573,8 @@ SpeakerPText::SpeakerPText() {
SpeakerCHFText::SpeakerCHFText() {
_speakerName = "CHFTEXT";
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
- _colour1 = 56;
+ _textMode = ALIGN_CENTER;
+ _color1 = 56;
_hideObjects = false;
}
@@ -545,8 +583,8 @@ SpeakerCHFText::SpeakerCHFText() {
SpeakerCDRText::SpeakerCDRText() {
_speakerName = "CDRTEXT";
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
- _colour1 = 52;
+ _textMode = ALIGN_CENTER;
+ _color1 = 52;
_hideObjects = false;
}
@@ -555,7 +593,7 @@ SpeakerCDRText::SpeakerCDRText() {
SpeakerFLText::SpeakerFLText() {
_speakerName = "FLTEXT";
_textPos = Common::Point(10, 40);
- _colour1 = 17;
+ _color1 = 17;
_hideObjects = false;
}
@@ -564,8 +602,8 @@ SpeakerFLText::SpeakerFLText() {
SpeakerBatText::SpeakerBatText() {
_speakerName = "BATTEXT";
_textWidth = 240;
- _textMode = ALIGN_CENTRE;
- _colour1 = 3;
+ _textMode = ALIGN_CENTER;
+ _color1 = 3;
_hideObjects = false;
}
@@ -575,23 +613,23 @@ SpeakerSKL::SpeakerSKL() : AnimatedSpeaker() {
_speakerName = "SKL";
_newSceneNumber = 7011;
_textPos = Common::Point(10, 30);
- _colour1 = 10;
+ _color1 = 9;
}
void SpeakerSKL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(7013);
_object1.setStrip2(2);
- _object1._frame = 1;
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
+ _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);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(197, 80));
@@ -606,15 +644,15 @@ SpeakerQL::SpeakerQL() : AnimatedSpeaker() {
_speakerName = "QL";
_newSceneNumber = 2610;
_textPos = Common::Point(160, 30);
- _colour1 = 35;
- _textMode = ALIGN_CENTRE;
+ _color1 = 35;
+ _textMode = ALIGN_CENTER;
}
void SpeakerQL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2612);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(128, 146));
@@ -623,7 +661,7 @@ void SpeakerQL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2612);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(122, 84));
@@ -635,18 +673,19 @@ void SpeakerQL::setText(const Common::String &msg) {
/*--------------------------------------------------------------------------*/
SpeakerSR::SpeakerSR() {
+ // TODO: check initialization of object3
_speakerName = "SR";
_newSceneNumber = 2811;
_textPos = Common::Point(10, 30);
- _colour1 = 13;
- _textMode = ALIGN_CENTRE;
+ _color1 = 13;
+ _textMode = ALIGN_CENTER;
}
void SpeakerSR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2813);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(224, 198));
@@ -655,7 +694,7 @@ void SpeakerSR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2813);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(203, 96));
@@ -665,7 +704,7 @@ void SpeakerSR::setText(const Common::String &msg) {
_object3.setVisage(2813);
_object3.setStrip(3);
_object3.setPosition(Common::Point(204, 91));
- _object3.setPriority2(199);
+ _object3.fixPriority(199);
_object3._numFrames = 3;
_object3.animate(ANIM_MODE_7, 0, NULL);
@@ -679,15 +718,15 @@ SpeakerSL::SpeakerSL() {
_newSceneNumber = 2810;
_textPos = Common::Point(140, 30);
_textWidth = 160;
- _colour1 = 13;
- _textMode = ALIGN_CENTRE;
+ _color1 = 13;
+ _textMode = ALIGN_CENTER;
}
void SpeakerSL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2812);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(95, 198));
@@ -696,7 +735,7 @@ void SpeakerSL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2812);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(116, 96));
@@ -711,15 +750,15 @@ SpeakerQR::SpeakerQR() {
_speakerName = "QR";
_newSceneNumber = 2611;
_textPos = Common::Point(10, 30);
- _colour1 = 13;
- _textMode = ALIGN_CENTRE;
+ _color1 = 35;
+ _textMode = ALIGN_CENTER;
}
void SpeakerQR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2613);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(191, 146));
@@ -728,7 +767,7 @@ void SpeakerQR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2613);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(197, 84));
@@ -743,28 +782,28 @@ SpeakerQU::SpeakerQU() {
_speakerName = "QU";
_newSceneNumber = 7020;
_textPos = Common::Point(160, 30);
- _colour1 = 35;
- _textMode = ALIGN_CENTRE;
+ _color1 = 35;
+ _textMode = ALIGN_CENTER;
}
void SpeakerQU::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(7021);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
- _object1.setPosition(Common::Point(116, 120), 0);
- _object1.animate(ANIM_MODE_7, 0, 0);
+ _object1.setPosition(Common::Point(116, 120));
+ _object1.animate(ANIM_MODE_7, 0, NULL);
_object2.postInit(&_objectList);
_object2.setVisage(7021);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
- _object2.setPosition(Common::Point(111, 84), 0);
- _object2.setAction(&_speakerAction, 0);
+ _object2.setPosition(Common::Point(111, 84));
+ _object2.setAction(&_speakerAction, NULL);
Speaker::setText(msg);
}
@@ -775,21 +814,21 @@ SpeakerCR::SpeakerCR() {
_speakerName = "CR";
_newSceneNumber = 9010;
_textPos = Common::Point(20, 40);
- _colour1 = 4;
+ _color1 = 4;
}
void SpeakerCR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(9011);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _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);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.setPosition(Common::Point(232, 81));
_object2.setAction(&_speakerAction, NULL);
@@ -801,15 +840,15 @@ void SpeakerCR::setText(const Common::String &msg) {
SpeakerMR::SpeakerMR() {
_speakerName = "MR";
_newSceneNumber = 2711;
- _textPos = Common::Point(40, 10);
- _colour1 = 22;
+ _textPos = Common::Point(10, 40);
+ _color1 = 22;
}
void SpeakerMR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2713);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(220, 143));
@@ -818,7 +857,8 @@ void SpeakerMR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2713);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
+ _object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(215, 99));
_object2.setAction(&_speakerAction, NULL);
@@ -832,15 +872,15 @@ SpeakerSAL::SpeakerSAL() {
_speakerName = "SAL";
_newSceneNumber = 2851;
_textPos = Common::Point(10, 30);
- _colour1 = 13;
- _textMode = ALIGN_CENTRE;
+ _color1 = 13;
+ _textMode = ALIGN_CENTER;
}
void SpeakerSAL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2853);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(185, 200));
@@ -849,7 +889,8 @@ void SpeakerSAL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2853);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
+ _object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(170, 92));
_object2.setAction(&_speakerAction, NULL);
@@ -863,14 +904,14 @@ SpeakerML::SpeakerML() {
_speakerName = "ML";
_newSceneNumber = 2710;
_textPos = Common::Point(160, 40);
- _colour1 = 22;
+ _color1 = 22;
}
void SpeakerML::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(2712);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(99, 143));
@@ -879,7 +920,8 @@ void SpeakerML::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(2712);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
+ _object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(105, 99));
_object2.setAction(&_speakerAction, NULL);
@@ -893,14 +935,14 @@ SpeakerCHFL::SpeakerCHFL() {
_speakerName = "CHFL";
_newSceneNumber = 4111;
_textPos = Common::Point(10, 40);
- _colour1 = 56;
+ _color1 = 56;
}
void SpeakerCHFL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4113);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(205, 116));
@@ -909,7 +951,8 @@ void SpeakerCHFL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4113);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
+ _object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(202, 71));
_object2.setAction(&_speakerAction, NULL);
@@ -923,14 +966,14 @@ SpeakerCHFR::SpeakerCHFR() {
_speakerName = "CHFR";
_newSceneNumber = 4110;
_textPos = Common::Point(160, 40);
- _colour1 = 56;
+ _color1 = 56;
}
void SpeakerCHFR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4112);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(103, 116));
@@ -939,7 +982,8 @@ void SpeakerCHFR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4112);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
+ _object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(106, 71));
_object2.setAction(&_speakerAction, NULL);
@@ -953,14 +997,14 @@ SpeakerPL::SpeakerPL() {
_speakerName = "PL";
_newSceneNumber = 4060;
_textPos = Common::Point(160, 40);
- _colour1 = 5;
+ _color1 = 5;
}
void SpeakerPL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4062);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(107, 117));
@@ -969,7 +1013,8 @@ void SpeakerPL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4062);
_object2.setStrip2(1);
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
+ _object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(105, 62));
_object2.setAction(&_speakerAction, NULL);
@@ -977,7 +1022,8 @@ void SpeakerPL::setText(const Common::String &msg) {
_object3.postInit(&_objectList);
_object3.setVisage(4062);
_object3.setStrip2(3);
- _object3.setPriority2(255);
+ _object3.fixPriority(255);
+ _object3.changeZoom(100);
_object3._frame = 1;
_object3.setPosition(Common::Point(105, 59));
_object3.setAction(&_speakerAction2, NULL);
@@ -996,14 +1042,14 @@ SpeakerPR::SpeakerPR() {
_speakerName = "PR";
_newSceneNumber = 4061;
_textPos = Common::Point(10, 40);
- _colour1 = 5;
+ _color1 = 5;
}
void SpeakerPR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4063);
_object1.setStrip2(1);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(212, 117));
@@ -1012,7 +1058,7 @@ void SpeakerPR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4063);
_object2.setStrip2(2);
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(214, 62));
@@ -1021,7 +1067,7 @@ void SpeakerPR::setText(const Common::String &msg) {
_object3.postInit(&_objectList);
_object3.setVisage(4063);
_object3.setStrip2(3);
- _object3.setPriority2(255);
+ _object3.fixPriority(255);
_object3.changeZoom(100);
_object3._frame = 1;
_object3.setPosition(Common::Point(214, 59));
@@ -1041,14 +1087,14 @@ SpeakerCDR::SpeakerCDR() {
_speakerName = "CDR";
_newSceneNumber = 4161;
_textPos = Common::Point(10, 40);
- _colour1 = 52;
+ _color1 = 52;
}
void SpeakerCDR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4163);
_object1.setStrip2(1);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(208, 97));
@@ -1057,7 +1103,7 @@ void SpeakerCDR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4163);
_object2.setStrip2(2);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(200, 57));
@@ -1072,14 +1118,14 @@ SpeakerCDL::SpeakerCDL() {
_speakerName = "CDL";
_newSceneNumber = 4160;
_textPos = Common::Point(160, 40);
- _colour1 = 52;
+ _color1 = 52;
}
void SpeakerCDL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(4162);
_object1.setStrip2(1);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(112, 97));
@@ -1088,7 +1134,7 @@ void SpeakerCDL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(4162);
_object2.setStrip2(2);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(115, 57));
@@ -1103,14 +1149,14 @@ SpeakerFLL::SpeakerFLL() {
_speakerName = "FLL";
_newSceneNumber = 5221;
_textPos = Common::Point(10, 40);
- _colour1 = 17;
+ _color1 = 17;
}
void SpeakerFLL::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(5223);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(216, 129));
@@ -1119,7 +1165,7 @@ void SpeakerFLL::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(5223);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(210, 67));
@@ -1134,14 +1180,14 @@ SpeakerBatR::SpeakerBatR() {
_speakerName = "BATR";
_newSceneNumber = 5360;
_textPos = Common::Point(140, 40);
- _colour1 = 3;
+ _color1 = 3;
}
void SpeakerBatR::setText(const Common::String &msg) {
_object1.postInit(&_objectList);
_object1.setVisage(5361);
_object1.setStrip2(2);
- _object1.setPriority2(255);
+ _object1.fixPriority(255);
_object1.changeZoom(100);
_object1._frame = 1;
_object1.setPosition(Common::Point(137, 122));
@@ -1150,7 +1196,7 @@ void SpeakerBatR::setText(const Common::String &msg) {
_object2.postInit(&_objectList);
_object2.setVisage(5361);
_object2.setStrip2(1);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2.changeZoom(100);
_object2._frame = 1;
_object2.setPosition(Common::Point(137, 104));
@@ -1159,4 +1205,239 @@ void SpeakerBatR::setText(const Common::String &msg) {
Speaker::setText(msg);
}
+/*--------------------------------------------------------------------------*/
+
+RingworldInvObjectList::RingworldInvObjectList() :
+ _stunner(2280, 1, 2, OBJECT_STUNNER, "This is your stunner."),
+ _scanner(1, 1, 3, OBJECT_SCANNER, "A combination scanner comm unit."),
+ _stasisBox(5200, 1, 4, OBJECT_STASIS_BOX, "A stasis box."),
+ _infoDisk(40, 1, 1, OBJECT_INFODISK, "The infodisk you took from the assassin."),
+ _stasisNegator(0, 2, 2, OBJECT_STASIS_NEGATOR, "The stasis field negator."),
+ _keyDevice(4250, 1, 6, OBJECT_KEY_DEVICE, "A magnetic key device."),
+ _medkit(2280, 1, 7, OBJECT_MEDKIT, "Your medkit."),
+ _ladder(4100, 1, 8, OBJECT_LADDER, "The chief's ladder."),
+ _rope(4150, 1, 9, OBJECT_ROPE, "The chief's rope."),
+ _key(7700, 1, 11, OBJECT_KEY, "A key."),
+ _translator(7700, 1, 13, OBJECT_TRANSLATOR, "The dolphin translator box."),
+ _ale(2150, 1, 10, OBJECT_ALE, "A bottle of ale."),
+ _paper(7700, 1, 12, OBJECT_PAPER, "A slip of paper with the numbers 2,4, and 3 written on it."),
+ _waldos(0, 1, 14, OBJECT_WALDOS, "A pair of waldos from the ruined probe."),
+ _stasisBox2(8100, 1, 4, OBJECT_STASIS_BOX2, "A stasis box."),
+ _ring(8100, 2, 5, OBJECT_RING, "This is a signet ring sent to you by Louis Wu."),
+ _cloak(9850, 2, 6, OBJECT_CLOAK, "A fine silk cloak."),
+ _tunic(9450, 2, 7, OBJECT_TUNIC, "The patriarch's soiled tunic."),
+ _candle(9500, 2, 8, OBJECT_CANDLE, "A tallow candle."),
+ _straw(9400, 2, 9, OBJECT_STRAW, "Clean, dry straw."),
+ _scimitar(9850, 1, 18, OBJECT_SCIMITAR, "A scimitar from the Patriarch's closet."),
+ _sword(9850, 1, 17, OBJECT_SWORD, "A short sword from the Patriarch's closet."),
+ _helmet(9500, 2, 4, OBJECT_HELMET, "Some type of helmet."),
+ _items(4300, 2, 10, OBJECT_ITEMS, "Two interesting items from the Tnuctipun vessel."),
+ _concentrator(4300, 2, 11, OBJECT_CONCENTRATOR, "The Tnuctipun anti-matter concentrator contained in a stasis field."),
+ _nullifier(5200, 2, 12, OBJECT_NULLIFIER, "A purported neural wave nullifier."),
+ _peg(4045, 2, 16, OBJECT_PEG, "A peg with a symbol."),
+ _vial(5100, 2, 17, OBJECT_VIAL, "A vial of the bat creatures anti-pheromone drug."),
+ _jacket(9850, 3, 1, OBJECT_JACKET, "A natty padded jacket."),
+ _tunic2(9850, 3, 2, OBJECT_TUNIC2, "A very hairy tunic."),
+ _bone(5300, 3, 5, OBJECT_BONE, "A very sharp bone."),
+ _jar(7700, 3, 4, OBJECT_JAR, "An jar filled with a green substance."),
+ _emptyJar(7700, 3, 3, OBJECT_EMPTY_JAR, "An empty jar.") {
+
+ // Add the items to the list
+ _itemList.push_back(&_stunner);
+ _itemList.push_back(&_scanner);
+ _itemList.push_back(&_stasisBox);
+ _itemList.push_back(&_infoDisk);
+ _itemList.push_back(&_stasisNegator);
+ _itemList.push_back(&_keyDevice);
+ _itemList.push_back(&_medkit);
+ _itemList.push_back(&_ladder);
+ _itemList.push_back(&_rope);
+ _itemList.push_back(&_key);
+ _itemList.push_back(&_translator);
+ _itemList.push_back(&_ale);
+ _itemList.push_back(&_paper);
+ _itemList.push_back(&_waldos);
+ _itemList.push_back(&_stasisBox2);
+ _itemList.push_back(&_ring);
+ _itemList.push_back(&_cloak);
+ _itemList.push_back(&_tunic);
+ _itemList.push_back(&_candle);
+ _itemList.push_back(&_straw);
+ _itemList.push_back(&_scimitar);
+ _itemList.push_back(&_sword);
+ _itemList.push_back(&_helmet);
+ _itemList.push_back(&_items);
+ _itemList.push_back(&_concentrator);
+ _itemList.push_back(&_nullifier);
+ _itemList.push_back(&_peg);
+ _itemList.push_back(&_vial);
+ _itemList.push_back(&_jacket);
+ _itemList.push_back(&_tunic2);
+ _itemList.push_back(&_bone);
+ _itemList.push_back(&_jar);
+ _itemList.push_back(&_emptyJar);
+
+ _selectedItem = NULL;
+}
+
+/*--------------------------------------------------------------------------*/
+
+void RingworldGame::restartGame() {
+ if (MessageDialog::show(RESTART_MSG, CANCEL_BTN_STRING, RESTART_BTN_STRING) == 1)
+ _globals->_game->restart();
+}
+
+void RingworldGame::saveGame() {
+ if (!_vm->canSaveGameStateCurrently())
+ MessageDialog::show(SAVING_NOT_ALLOWED_MSG, OK_BTN_STRING);
+ else {
+ // Show the save dialog
+ handleSaveLoad(true, _globals->_sceneHandler._saveGameSlot, _globals->_sceneHandler._saveName);
+ }
+}
+
+void RingworldGame::restoreGame() {
+ if (!_vm->canLoadGameStateCurrently())
+ MessageDialog::show(RESTORING_NOT_ALLOWED_MSG, OK_BTN_STRING);
+ else {
+ // Show the load dialog
+ handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName);
+ }
+}
+
+void RingworldGame::quitGame() {
+ if (MessageDialog::show(QUIT_CONFIRM_MSG, CANCEL_BTN_STRING, QUIT_BTN_STRING) == 1)
+ _vm->quitGame();
+}
+
+void RingworldGame::handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName) {
+ const EnginePlugin *plugin = 0;
+ EngineMan.findGame(_vm->getGameId(), &plugin);
+ GUI::SaveLoadChooser *dialog;
+ if (saveFlag)
+ dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"));
+ else
+ dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"));
+
+ dialog->setSaveMode(saveFlag);
+
+ saveSlot = dialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
+ saveName = dialog->getResultString();
+
+ delete dialog;
+}
+
+void RingworldGame::start() {
+ // Set some default flags and cursor
+ _globals->setFlag(12);
+ _globals->setFlag(34);
+ _globals->_events.setCursor(CURSOR_WALK);
+
+ // Set the screen to scroll in response to the player moving off-screen
+ _globals->_scrollFollower = &_globals->_player;
+
+ // Set the object's that will be in the player's inventory by default
+ RING_INVENTORY._stunner._sceneNumber = 1;
+ RING_INVENTORY._scanner._sceneNumber = 1;
+ RING_INVENTORY._ring._sceneNumber = 1;
+
+ // Switch to the title screen
+ _globals->_sceneManager.setNewScene(1000);
+
+ _globals->_events.showCursor();
+}
+
+void RingworldGame::restart() {
+ _globals->_scenePalette.clearListeners();
+ _globals->_soundHandler.proc3();
+
+ // Reset the flags
+ _globals->reset();
+ _globals->setFlag(34);
+
+ // Clear save/load slots
+ _globals->_sceneHandler._saveGameSlot = -1;
+ _globals->_sceneHandler._loadGameSlot = -1;
+
+ _globals->_stripNum = 0;
+ _globals->_events.setCursor(CURSOR_WALK);
+
+ // Reset item properties
+ RING_INVENTORY._stunner._sceneNumber = 1;
+ RING_INVENTORY._scanner._sceneNumber = 1;
+ RING_INVENTORY._stasisBox._sceneNumber = 5200;
+ RING_INVENTORY._infoDisk._sceneNumber = 40;
+ RING_INVENTORY._stasisNegator._sceneNumber = 0;
+ RING_INVENTORY._keyDevice._sceneNumber = 0;
+ RING_INVENTORY._medkit._sceneNumber = 2280;
+ RING_INVENTORY._ladder._sceneNumber = 4100;
+ RING_INVENTORY._rope._sceneNumber = 4150;
+ RING_INVENTORY._key._sceneNumber = 7700;
+ RING_INVENTORY._translator._sceneNumber = 2150;
+ RING_INVENTORY._paper._sceneNumber = 7700;
+ RING_INVENTORY._waldos._sceneNumber = 0;
+ RING_INVENTORY._ring._sceneNumber = 1;
+ RING_INVENTORY._stasisBox2._sceneNumber = 8100;
+ RING_INVENTORY._cloak._sceneNumber = 9850;
+ RING_INVENTORY._tunic._sceneNumber = 9450;
+ RING_INVENTORY._candle._sceneNumber = 9500;
+ RING_INVENTORY._straw._sceneNumber = 9400;
+ RING_INVENTORY._scimitar._sceneNumber = 9850;
+ RING_INVENTORY._sword._sceneNumber = 9850;
+ RING_INVENTORY._helmet._sceneNumber = 9500;
+ RING_INVENTORY._items._sceneNumber = 4300;
+ RING_INVENTORY._concentrator._sceneNumber = 4300;
+ RING_INVENTORY._nullifier._sceneNumber = 4300;
+ RING_INVENTORY._peg._sceneNumber = 4045;
+ RING_INVENTORY._vial._sceneNumber = 5100;
+ RING_INVENTORY._jacket._sceneNumber = 9850;
+ RING_INVENTORY._tunic2._sceneNumber = 9850;
+ RING_INVENTORY._bone._sceneNumber = 5300;
+ RING_INVENTORY._jar._sceneNumber = 7700;
+ RING_INVENTORY._emptyJar._sceneNumber = 7700;
+ RING_INVENTORY._selectedItem = NULL;
+
+ // Change to the first game scene
+ _globals->_sceneManager.changeScene(30);
+}
+
+void RingworldGame::endGame(int resNum, int lineNum) {
+ _globals->_events.setCursor(CURSOR_WALK);
+ Common::String msg = _resourceManager->getMessage(resNum, lineNum);
+ bool savesExist = _saver->savegamesExist();
+
+ if (!savesExist) {
+ // No savegames exist, so prompt the user to restart or quit
+ if (MessageDialog::show(msg, QUIT_BTN_STRING, RESTART_BTN_STRING) == 0)
+ _vm->quitGame();
+ else
+ restart();
+ } else {
+ // Savegames exist, so prompt for Restore/Restart
+ bool breakFlag;
+ do {
+ if (MessageDialog::show(msg, RESTART_BTN_STRING, RESTORE_BTN_STRING) == 0) {
+ breakFlag = true;
+ } else {
+ handleSaveLoad(false, _globals->_sceneHandler._loadGameSlot, _globals->_sceneHandler._saveName);
+ breakFlag = _globals->_sceneHandler._loadGameSlot > 0;
+ }
+ } while (!breakFlag);
+ }
+
+ _globals->_events.setCursorFromFlag();
+}
+
+/*--------------------------------------------------------------------------*/
+
+void RingworldDemoGame::start() {
+ // Start the demo's single scene
+ _globals->_sceneManager.changeScene(1);
+
+ _globals->_events.setCursor(CURSOR_NONE);
+}
+
+void RingworldDemoGame::restart() {
+}
+
} // End of namespace tSage
diff --git a/engines/tsage/ringworld_logic.h b/engines/tsage/ringworld_logic.h
index 66c7bff912..e84779e6ad 100644
--- a/engines/tsage/ringworld_logic.h
+++ b/engines/tsage/ringworld_logic.h
@@ -97,7 +97,7 @@ public:
void display();
void restore();
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void draw(bool flag);
virtual void wait();
};
@@ -192,6 +192,7 @@ public:
SpeakerGR();
virtual Common::String getClassName() { return "SpeakerGR"; }
+ virtual void setText(const Common::String &msg);
};
class SpeakerHText : public ScreenSpeaker {
@@ -397,6 +398,77 @@ public:
virtual void setText(const Common::String &msg);
};
+/*--------------------------------------------------------------------------*/
+
+class RingworldInvObjectList : public InvObjectList {
+public:
+ InvObject _stunner;
+ InvObject _scanner;
+ InvObject _stasisBox;
+ InvObject _infoDisk;
+ InvObject _stasisNegator;
+ InvObject _keyDevice;
+ InvObject _medkit;
+ InvObject _ladder;
+ InvObject _rope;
+ InvObject _key;
+ InvObject _translator;
+ InvObject _ale;
+ InvObject _paper;
+ InvObject _waldos;
+ InvObject _stasisBox2;
+ InvObject _ring;
+ InvObject _cloak;
+ InvObject _tunic;
+ InvObject _candle;
+ InvObject _straw;
+ InvObject _scimitar;
+ InvObject _sword;
+ InvObject _helmet;
+ InvObject _items;
+ InvObject _concentrator;
+ InvObject _nullifier;
+ InvObject _peg;
+ InvObject _vial;
+ InvObject _jacket;
+ InvObject _tunic2;
+ InvObject _bone;
+ InvObject _jar;
+ InvObject _emptyJar;
+public:
+ RingworldInvObjectList();
+
+ virtual Common::String getClassName() { return "RingworldInvObjectList"; }
+};
+
+#define RING_INVENTORY (*((RingworldInvObjectList *)_globals->_inventory))
+
+class RingworldGame: public Game {
+protected:
+ virtual void handleSaveLoad(bool saveFlag, int &saveSlot, Common::String &saveName);
+public:
+ virtual void start();
+ virtual void restart();
+ virtual void restartGame();
+ virtual void saveGame();
+ virtual void restoreGame();
+ virtual void quitGame();
+ virtual void endGame(int resNum, int lineNum);
+};
+
+class RingworldDemoGame: public Game {
+protected:
+ virtual void restart();
+public:
+ virtual void start();
+ virtual void restartGame() {}
+ virtual void saveGame() {}
+ virtual void restoreGame() {}
+ virtual void quitGame() {}
+ virtual void endGame(int resNum, int lineNum) {}
+};
+
+
} // End of namespace tSage
#endif
diff --git a/engines/tsage/ringworld_scenes1.cpp b/engines/tsage/ringworld_scenes1.cpp
index 4497d6af75..e5ec60c690 100644
--- a/engines/tsage/ringworld_scenes1.cpp
+++ b/engines/tsage/ringworld_scenes1.cpp
@@ -48,7 +48,7 @@ void Scene10::Action1::signal() {
break;
case 2:
scene->_speakerSText.setTextPos(Common::Point(20, 20));
- scene->_speakerSText._colour1 = 10;
+ scene->_speakerSText._color1 = 10;
scene->_speakerSText._textWidth = 160;
scene->_stripManager.start(11, this, scene);
break;
@@ -138,10 +138,10 @@ void Scene10::postInit(SceneObjectList *OwnerList) {
_speakerSText._hideObjects = false;
_speakerQText._hideObjects = false;
_speakerQText.setTextPos(Common::Point(140, 120));
- _speakerQText._colour1 = 4;
+ _speakerQText._color1 = 4;
_speakerQText._textWidth = 160;
_speakerSText.setTextPos(Common::Point(20, 20));
- _speakerSText._colour1 = 7;
+ _speakerSText._color1 = 7;
_speakerSText._textWidth = 320;
_stripManager.setCallback(this);
@@ -149,20 +149,20 @@ void Scene10::postInit(SceneObjectList *OwnerList) {
_object1.postInit();
_object1.setVisage(10);
_object1.setPosition(Common::Point(232, 90));
- _object1.setPriority2(1);
+ _object1.fixPriority(1);
_object2.postInit();
_object2.setVisage(10);
_object2.setStrip(4);
_object2.setFrame(1);
_object2.setPosition(Common::Point(204, 59));
- _object2.setPriority2(198);
+ _object2.fixPriority(198);
_object3.postInit();
_object3.setVisage(10);
_object3.setStrip2(5);
_object3.setPosition(Common::Point(180, 87));
- _object3.setPriority2(196);
+ _object3.fixPriority(196);
_object3.setAction(&_action2);
_object4.postInit();
@@ -221,12 +221,12 @@ void Scene15::Action1::signal() {
setDelay(60);
break;
case 1:
- SceneItem::display(15, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 7,
+ SceneItem::display(15, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 7,
SET_WIDTH, 320, SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(300);
break;
case 2: {
- SceneItem::display(15, 1, SET_Y, 20, SET_FONT, 2, SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 7,
+ SceneItem::display(15, 1, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 7,
SET_WIDTH, 320, SET_KEEP_ONSCREEN, 1, LIST_END);
scene->_object1.postInit();
scene->_object1.setVisage(15);
@@ -300,7 +300,7 @@ void Scene20::Action2::signal() {
break;
case 1:
SceneItem::display(20, 1, SET_WIDTH, 200, SET_Y, 20, SET_X, 160, SET_KEEP_ONSCREEN, true,
- SET_EXT_BGCOLOUR, 4, LIST_END);
+ SET_EXT_BGCOLOR, 4, LIST_END);
setDelay(120);
break;
case 2: {
@@ -512,7 +512,7 @@ void Scene20::Action4::signal() {
scene->_sound.startSound(77, this, 127);
break;
case 8:
- _globals->_game.endGame(20, 0);
+ _globals->_game->endGame(20, 0);
break;
default:
break;
@@ -533,6 +533,7 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_speakerQText._npc = &_globals->_player;
if (_globals->_sceneManager._previousScene == 30) {
+ // Cut scene: Assassins are coming
_globals->_player.postInit();
_globals->_player.setVisage(20);
_globals->_player.setPosition(Common::Point(405, 69));
@@ -558,29 +559,13 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_sceneBounds = Rect(320, 0, 640, 200);
} else if (_globals->_sceneManager._previousScene == 60) {
- _globals->_player.postInit();
- _globals->_player.setVisage(2640);
- _globals->_player.animate(ANIM_MODE_NONE, NULL);
- _globals->_player.setStrip2(1);
- _globals->_player.setFrame2(4);
- _globals->_player.setPriority2(200);
- _globals->_player.setPosition(Common::Point(425, 233));
-
- setAction(&_action1);
- _speakerQText.setTextPos(Common::Point(350, 20));
- _speakerQText._textWidth = 260;
- _speakerGameText.setTextPos(Common::Point(350, 20));
- _speakerGameText._textWidth = 260;
-
- _globals->_soundHandler.startSound(8);
- _sceneBounds = Rect(320, 0, 640, 200);
- } else {
+ // Evasion
_sound.startSound(30);
_globals->_player.postInit();
_globals->_player.setVisage(20);
_globals->_player.setPosition(Common::Point(588, 79));
_globals->_player._moveDiff = Common::Point(5, 5);
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
_globals->_player.animate(ANIM_MODE_1, NULL);
_SceneObjectExt.postInit();
@@ -590,22 +575,41 @@ void Scene20::postInit(SceneObjectList *OwnerList) {
_sceneObject3.postInit();
_sceneObject3.setVisage(20);
- _sceneObject3.setStrip(2);
- _SceneObjectExt.setPosition(Common::Point(595, 79));
- _SceneObjectExt.animate(ANIM_MODE_1, NULL);
+ _sceneObject3.setStrip2(2);
+ _sceneObject3.setPosition(Common::Point(595, 79));
+ _sceneObject3.animate(ANIM_MODE_1, NULL);
if ((_globals->getFlag(120) && _globals->getFlag(116)) ||
(_globals->getFlag(117) && _globals->getFlag(119))) {
+ // Successful evasion
setAction(&_action3);
} else if (_globals->getFlag(104)) {
_sceneMode = 21;
setAction(&_sequenceManager, this, 21, &_globals->_player, &_SceneObjectExt, NULL);
} else {
+ // Failed evasion
_sceneObject3._moveDiff = Common::Point(8, 8);
setAction(&_action4);
}
+ _sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y);
+ } else {
+ // Intro: Quinn looking at the monaster
+ _globals->_player.postInit();
+ _globals->_player.setVisage(2640);
+ _globals->_player.animate(ANIM_MODE_NONE, NULL);
+ _globals->_player.setStrip2(1);
+ _globals->_player.setFrame2(4);
+ _globals->_player.fixPriority(200);
+ _globals->_player.setPosition(Common::Point(425, 233));
- _sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y);
+ setAction(&_action1);
+ _speakerQText.setTextPos(Common::Point(350, 20));
+ _speakerQText._textWidth = 260;
+ _speakerGameText.setTextPos(Common::Point(350, 20));
+ _speakerGameText._textWidth = 260;
+
+ _globals->_soundHandler.startSound(8);
+ _sceneBounds = Rect(320, 0, 640, 200);
}
_globals->_player.disableControl();
@@ -622,6 +626,29 @@ void Scene20::signal() {
*
*--------------------------------------------------------------------------*/
+void Scene30::BeamObject::doAction(int action) {
+ if (action == OBJECT_SCANNER)
+ display2(30, 14);
+ else if (action == CURSOR_LOOK)
+ display2(30, 2);
+ else if (action == CURSOR_USE) {
+ Scene30 *parent = (Scene30 *)_globals->_sceneManager._scene;
+ parent->setAction(&parent->_beamAction);
+ } else
+ SceneObject::doAction(action);
+}
+
+void Scene30::DoorObject::doAction(int action) {
+ if (action == OBJECT_SCANNER)
+ display2(30, 13);
+ else if (action == CURSOR_LOOK)
+ display2(30, 1);
+ else if (action == CURSOR_USE)
+ display2(30, 7);
+ else
+ SceneObject::doAction(action);
+}
+
void Scene30::BeamAction::signal() {
Scene30 *scene = (Scene30 *)_globals->_sceneManager._scene;
@@ -817,7 +844,7 @@ void Scene30::KzinObject::doAction(int action) {
display2(30, 11);
break;
case OBJECT_RING:
- _globals->_inventory._ring._sceneNumber = 30;
+ RING_INVENTORY._ring._sceneNumber = 30;
scene->setAction(&scene->_ringAction);
break;
case CURSOR_LOOK:
@@ -874,7 +901,7 @@ void Scene30::postInit(SceneObjectList *OwnerList) {
_beam.setVisage(31);
_beam.setStrip(2);
_beam.setPosition(Common::Point(124, 178));
- _beam.setPriority2(188);
+ _beam.fixPriority(188);
// Set up door object
_door.postInit();
@@ -900,7 +927,7 @@ void Scene30::signal() {
_beam.setVisage(31);
_beam.setStrip(2);
_beam.setPosition(Common::Point(124, 178));
- _beam.setPriority2(188);
+ _beam.fixPriority(188);
_globals->_sceneItems.push_front(&_beam);
_globals->_player.enableControl();
} else if (_sceneMode == 32) {
@@ -977,7 +1004,8 @@ void Scene40::Action1::signal() {
break;
case 9: {
scene->_dyingKzin.setStrip(1);
- scene->_dyingKzin.setFrame(1);
+ //Workaround: The original uses setFrame(1) but it's completely wrong.
+ scene->_dyingKzin.setFrame(2);
scene->_dyingKzin._moveDiff.y = 15;
scene->_dyingKzin.animate(ANIM_MODE_5, NULL);
Common::Point pt(223, 186);
@@ -1035,7 +1063,7 @@ void Scene40::Action1::signal() {
_globals->_soundHandler.startSound(77, this);
break;
case 17:
- _globals->_game.endGame(40, 20);
+ _globals->_game->endGame(40, 20);
remove();
break;
}
@@ -1062,10 +1090,10 @@ void Scene40::Action2::signal() {
scene->_doorway.postInit();
scene->_doorway.setVisage(16);
scene->_doorway.setStrip2(6);
- scene->_doorway.setPriority2(200);
+ scene->_doorway.fixPriority(200);
scene->_doorway.setPosition(Common::Point(159, 191));
scene->_doorway._moveDiff = Common::Point(40, 40);
- scene->_doorway._field7A = 60;
+ scene->_doorway._moveRate = 60;
scene->_doorway.animate(ANIM_MODE_5, NULL);
Common::Point pt(271, 165);
@@ -1079,7 +1107,7 @@ void Scene40::Action2::signal() {
scene->_assassin._frame = 1;
scene->_assassin.animate(ANIM_MODE_5, this);
scene->_soundHandler.startSound(29);
- _globals->_inventory._infoDisk._sceneNumber = 40;
+ RING_INVENTORY._infoDisk._sceneNumber = 40;
break;
case 4:
_globals->_player.animate(ANIM_MODE_6, this);
@@ -1146,7 +1174,7 @@ void Scene40::Action3::signal() {
case 2:
scene->_assassin.setStrip(2);
scene->_assassin.setFrame(1);
- _globals->_inventory._infoDisk._sceneNumber = 1;
+ RING_INVENTORY._infoDisk._sceneNumber = 1;
_globals->_player.animate(ANIM_MODE_6, this);
break;
case 3:
@@ -1180,7 +1208,7 @@ void Scene40::Action5::signal() {
switch (_actionIndex++) {
case 0:
- setDelay(_globals->_randomSource.getRandomNumber(120));
+ setDelay(_globals->_randomSource.getRandomNumber(119) + 120);
break;
case 1:
scene->_object2.animate(ANIM_MODE_8, 1, this);
@@ -1196,12 +1224,13 @@ void Scene40::Action6::signal() {
scene->_object1.postInit();
scene->_object1.setVisage(16);
scene->_object1.setStrip2(6);
+ scene->_object1._moveDiff = Common::Point(40, 40);
scene->_object1.setPosition(Common::Point(313, 53));
- scene->_object1._field7A = 60;
+ scene->_object1._moveRate = 60;
Common::Point pt(141, 194);
NpcMover *mover = new NpcMover();
- scene->_object1.addMover(mover, &pt, this);
+ scene->_object1.addMover(mover, &pt, NULL);
scene->_object1.animate(ANIM_MODE_5, NULL);
scene->_doorway.postInit();
@@ -1229,6 +1258,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));
break;
case 1:
@@ -1242,6 +1272,8 @@ void Scene40::Action7::signal() {
scene->_object7.setPosition(Common::Point(305, 61));
scene->_object7.setFrame(15);
}
+ scene->_object7.animate(ANIM_MODE_5, this);
+ scene->_soundHandler.startSound(25);
break;
case 2:
scene->_object7.remove();
@@ -1268,11 +1300,11 @@ void Scene40::Action8::signal() {
scene->_doorway.postInit();
scene->_doorway.setVisage(16);
scene->_doorway.setStrip2(6);
- scene->_doorway.setPriority2(200);
- scene->_doorway._field7A = 60;
+ scene->_doorway.fixPriority(200);
+ scene->_doorway._moveRate = 60;
if (_globals->_player._position.x >= 145) {
- scene->_doorway.setPriority2(-1);
+ scene->_doorway.fixPriority(-1);
scene->_doorway.setPosition(Common::Point(6, 157));
} else {
scene->_doorway.setPosition(Common::Point(313, 53));
@@ -1296,7 +1328,7 @@ void Scene40::Action8::signal() {
_globals->_soundHandler.startSound(77, this);
break;
case 4:
- _globals->_game.endGame(40, 45);
+ _globals->_game->endGame(40, 45);
remove();
break;
}
@@ -1307,11 +1339,11 @@ void Scene40::Action8::signal() {
void Scene40::DyingKzin::doAction(int action) {
switch (action) {
case OBJECT_STUNNER:
- SceneItem::display2(40, 43);
- break;
- case CURSOR_CROSSHAIRS:
SceneItem::display2(40, 44);
break;
+ case OBJECT_SCANNER:
+ SceneItem::display2(40, 43);
+ break;
case CURSOR_LOOK:
SceneItem::display2(40, 12);
break;
@@ -1328,7 +1360,7 @@ void Scene40::Assassin::doAction(int action) {
Scene40 *scene = (Scene40 *)_globals->_sceneManager._scene;
switch (action) {
- case CURSOR_CROSSHAIRS:
+ case OBJECT_STUNNER:
if (scene->_assassin._visage == 44)
SceneItem::display2(40, 21);
else {
@@ -1336,6 +1368,7 @@ void Scene40::Assassin::doAction(int action) {
Common::Point pt(230, 187);
NpcMover *mover = new NpcMover();
addMover(mover, &pt, NULL);
+ scene->setAction(&scene->_action2);
}
break;
case OBJECT_SCANNER:
@@ -1345,12 +1378,12 @@ void Scene40::Assassin::doAction(int action) {
if (scene->_assassin._visage != 44)
SceneItem::display2(40, 13);
else
- SceneItem::display2(40, (_globals->_inventory._infoDisk._sceneNumber == 1) ? 19 : 14);
+ SceneItem::display2(40, (RING_INVENTORY._infoDisk._sceneNumber == 1) ? 19 : 14);
break;
case CURSOR_USE:
if (scene->_assassin._visage != 44)
SceneItem::display2(40, 15);
- else if (_globals->_inventory._infoDisk._sceneNumber == 1)
+ else if (RING_INVENTORY._infoDisk._sceneNumber == 1)
SceneItem::display2(40, 19);
else {
_globals->_player.disableControl();
@@ -1370,7 +1403,7 @@ void Scene40::Assassin::doAction(int action) {
void Scene40::Item2::doAction(int action) {
switch (action) {
- case CURSOR_CROSSHAIRS:
+ case OBJECT_STUNNER:
SceneItem::display2(40, 35);
_globals->_events.setCursor(CURSOR_WALK);
break;
@@ -1394,7 +1427,7 @@ void Scene40::Item2::doAction(int action) {
void Scene40::Item6::doAction(int action) {
switch (action) {
- case CURSOR_CROSSHAIRS:
+ case OBJECT_STUNNER:
SceneItem::display2(40, 25);
_globals->_events.setCursor(CURSOR_WALK);
break;
@@ -1416,12 +1449,12 @@ void Scene40::Item6::doAction(int action) {
/*--------------------------------------------------------------------------*/
Scene40::Scene40() :
- _item1(2, OBJECT_SCANNER, 40, 24, CURSOR_CROSSHAIRS, 40, 25, CURSOR_LOOK, 40, 7, CURSOR_USE, 40, 16, LIST_END),
- _item3(5, OBJECT_SCANNER, 40, 26, CURSOR_CROSSHAIRS, 40, 27, CURSOR_LOOK, 40, 9, CURSOR_USE, 40, 17, LIST_END),
- _item4(6, OBJECT_SCANNER, 40, 31, CURSOR_CROSSHAIRS, 40, 32, CURSOR_LOOK, 40, 5, CURSOR_USE, 40, 33, LIST_END),
+ _item1(2, OBJECT_SCANNER, 40, 24, OBJECT_STUNNER, 40, 25, CURSOR_LOOK, 40, 7, CURSOR_USE, 40, 16, LIST_END),
+ _item3(5, OBJECT_SCANNER, 40, 26, OBJECT_STUNNER, 40, 27, CURSOR_LOOK, 40, 9, CURSOR_USE, 40, 17, LIST_END),
+ _item4(6, OBJECT_SCANNER, 40, 31, OBJECT_STUNNER, 40, 32, CURSOR_LOOK, 40, 5, CURSOR_USE, 40, 33, LIST_END),
_item5(0, CURSOR_LOOK, 40, 11, LIST_END),
- _item7(4, OBJECT_SCANNER, 40, 26, CURSOR_CROSSHAIRS, 40, 27, CURSOR_LOOK, 40, 9, CURSOR_USE, 40, 17, LIST_END),
- _item8(8, OBJECT_SCANNER, 40, 39, CURSOR_CROSSHAIRS, 40, 40, CURSOR_LOOK, 40, 3, CURSOR_USE, 40, 41, LIST_END) {
+ _item7(4, OBJECT_SCANNER, 40, 26, OBJECT_STUNNER, 40, 27, CURSOR_LOOK, 40, 9, CURSOR_USE, 40, 17, LIST_END),
+ _item8(8, OBJECT_SCANNER, 40, 39, OBJECT_STUNNER, 40, 40, CURSOR_LOOK, 40, 3, CURSOR_USE, 40, 41, LIST_END) {
}
void Scene40::postInit(SceneObjectList *OwnerList) {
@@ -1437,7 +1470,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_stripManager.addSpeaker(&_speakerSText);
_stripManager.addSpeaker(&_speakerGameText);
- _speakerGameText._colour1 = 9;
+ _speakerGameText._color1 = 9;
_speakerGameText.setTextPos(Common::Point(160, 30));
_speakerQText._npc = &_globals->_player;
_speakerSText._npc = &_object1;
@@ -1459,14 +1492,14 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_object2.postInit();
_object2.setVisage(41);
_object2.setStrip(6);
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
_object2.setPosition(Common::Point(94, 189));
_object2.setAction(&_action5);
_object3.postInit();
_object3.setVisage(41);
_object3.setStrip(5);
- _object3.setPriority2(205);
+ _object3.fixPriority(205);
_object3.setPosition(Common::Point(110, 186));
_object3._numFrames = 2;
_object3.animate(ANIM_MODE_8, NULL, NULL);
@@ -1479,7 +1512,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_dyingKzin.setVisage(40);
_dyingKzin.setStrip(6);
_dyingKzin.setPosition(Common::Point(-90, 65));
- _dyingKzin.setPriority2(170);
+ _dyingKzin.fixPriority(170);
setAction(&_action1);
} else {
@@ -1492,7 +1525,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_dyingKzin.postInit();
_dyingKzin.setVisage(40);
_dyingKzin.setPosition(Common::Point(205, 183));
- _dyingKzin.setPriority2(170);
+ _dyingKzin.fixPriority(170);
_dyingKzin._frame = 9;
_dyingKzin.setAction(&_action7);
@@ -1501,7 +1534,7 @@ void Scene40::postInit(SceneObjectList *OwnerList) {
_assassin.setPosition(Common::Point(230, 187));
_assassin.setAction(&_action8);
- if (_globals->_inventory._infoDisk._sceneNumber == 40) {
+ if (RING_INVENTORY._infoDisk._sceneNumber == 40) {
_assassin.setStrip(1);
_assassin.setFrame(_assassin.getFrameCount());
} else {
@@ -1759,19 +1792,19 @@ void Scene50::postInit(SceneObjectList *OwnerList) {
_object2.setVisage(2331);
_object2.setStrip(6);
_object2.setPosition(Common::Point(136, 192));
- _object2.setPriority2(200);
+ _object2.fixPriority(200);
_object3.postInit();
_object3.setVisage(2337);
_object3.setStrip(6);
_object3.setPosition(Common::Point(260, 180));
- _object3.setPriority2(200);
+ _object3.fixPriority(200);
_object4.postInit();
_object4.setVisage(2331);
_object4.setStrip(6);
_object4.setPosition(Common::Point(295, 144));
- _object4.setPriority2(178);
+ _object4.fixPriority(178);
_globals->_sceneItems.addItems(&_object2, &_object3, &_object4, NULL);
@@ -1833,33 +1866,33 @@ void Scene60::Action1::signal() {
setDelay(3);
break;
case 1:
- scene->_object9.postInit();
- scene->_object9.setVisage(60);
- scene->_object9.setStrip(7);
- scene->_object9.setPosition(Common::Point(136, 65));
- scene->_object9.animate(ANIM_MODE_5, this);
+ scene->_floppyDrive.postInit();
+ scene->_floppyDrive.setVisage(60);
+ scene->_floppyDrive.setStrip(7);
+ scene->_floppyDrive.setPosition(Common::Point(136, 65));
+ scene->_floppyDrive.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(35);
break;
case 2:
- scene->_object10.postInit();
- scene->_object10.setVisage(60);
- scene->_object10.setPosition(Common::Point(199, 186));
- scene->_object10.animate(ANIM_MODE_8, 0, NULL);
- scene->_object10._numFrames = 5;
+ scene->_redLights.postInit();
+ scene->_redLights.setVisage(60);
+ scene->_redLights.setPosition(Common::Point(199, 186));
+ scene->_redLights.animate(ANIM_MODE_8, 0, NULL);
+ scene->_redLights._numFrames = 5;
- scene->_object6.animate(ANIM_MODE_2, NULL);
+ scene->_controlButton.animate(ANIM_MODE_2, NULL);
if (!_globals->getFlag(83)) {
- scene->_object5.postInit();
- scene->_object5.setVisage(60);
- scene->_object5.setStrip2(3);
- scene->_object5.setFrame(2);
- scene->_object5.setPosition(Common::Point(148, 85));
- scene->_object5.animate(ANIM_MODE_2, NULL);
- scene->_object5._numFrames = 5;
-
- _globals->_sceneItems.push_front(&scene->_object5);
+ scene->_message.postInit();
+ scene->_message.setVisage(60);
+ scene->_message.setStrip2(3);
+ scene->_message.setFrame(2);
+ scene->_message.setPosition(Common::Point(148, 85));
+ scene->_message.animate(ANIM_MODE_2, NULL);
+ scene->_message._numFrames = 5;
+
+ _globals->_sceneItems.push_front(&scene->_message);
scene->_soundHandler2.startSound(38);
}
@@ -1868,40 +1901,40 @@ void Scene60::Action1::signal() {
case 3:
scene->_soundHandler2.startSound(37);
scene->loadScene(65);
- scene->_object5.remove();
+ scene->_message.remove();
- if (_globals->_sceneObjects->contains(&scene->_object10))
- scene->_object10.remove();
+ if (_globals->_sceneObjects->contains(&scene->_redLights))
+ scene->_redLights.remove();
- scene->_object6.remove();
+ scene->_controlButton.remove();
scene->_slaveButton.remove();
- scene->_object8.remove();
+ scene->_masterButton.remove();
scene->_item1.remove();
scene->_item2.remove();
- scene->_object3.postInit();
- scene->_object3.setVisage(65);
- scene->_object3.setPosition(Common::Point(118, 197));
-
- scene->_object2.postInit();
- scene->_object2.setVisage(65);
- scene->_object2.setStrip(2);
- scene->_object2.setPosition(Common::Point(160, 197));
-
- scene->_object4.postInit();
- scene->_object4.setVisage(65);
- scene->_object4.setStrip(3);
- scene->_object4.setPosition(Common::Point(202, 197));
-
- scene->_object1.postInit();
- scene->_object1.setVisage(65);
- scene->_object1.setStrip(4);
- scene->_object1.setFrame(1);
- scene->_object1.setPosition(Common::Point(145, 165));
-
- _globals->_sceneItems.push_front(&scene->_object3);
- _globals->_sceneItems.push_front(&scene->_object2);
- _globals->_sceneItems.push_front(&scene->_object4);
+ scene->_nextButton.postInit();
+ scene->_nextButton.setVisage(65);
+ scene->_nextButton.setPosition(Common::Point(118, 197));
+
+ scene->_prevButton.postInit();
+ scene->_prevButton.setVisage(65);
+ scene->_prevButton.setStrip(2);
+ scene->_prevButton.setPosition(Common::Point(160, 197));
+
+ scene->_exitButton.postInit();
+ scene->_exitButton.setVisage(65);
+ scene->_exitButton.setStrip(3);
+ scene->_exitButton.setPosition(Common::Point(202, 197));
+
+ scene->_rose.postInit();
+ scene->_rose.setVisage(65);
+ scene->_rose.setStrip(4);
+ scene->_rose.setFrame(1);
+ scene->_rose.setPosition(Common::Point(145, 165));
+
+ _globals->_sceneItems.push_front(&scene->_nextButton);
+ _globals->_sceneItems.push_front(&scene->_prevButton);
+ _globals->_sceneItems.push_front(&scene->_exitButton);
setDelay(10);
_globals->_events.setCursor(CURSOR_USE);
@@ -1913,33 +1946,33 @@ void Scene60::Action1::signal() {
case 6:
case 7:
SceneItem::display(60, _actionIndex - 4, SET_Y, 40, SET_X, 25, SET_FONT, 75,
- SET_EXT_BGCOLOUR, -1, SET_FG_COLOUR, 34, SET_POS_MODE, 0,
+ SET_EXT_BGCOLOR, -1, SET_FG_COLOR, 34, SET_POS_MODE, 0,
SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END);
_globals->_events.setCursor(CURSOR_USE);
break;
case 9:
_globals->_player._uiEnabled = false;
- _globals->_inventory._infoDisk._sceneNumber = 1;
+ RING_INVENTORY._infoDisk._sceneNumber = 1;
- if (_globals->_sceneObjects->contains(&scene->_object5))
- scene->_object5.remove();
+ if (_globals->_sceneObjects->contains(&scene->_message))
+ scene->_message.remove();
- scene->_object6.animate(ANIM_MODE_NONE);
- scene->_object6.setFrame(1);
- scene->_object10.remove();
+ scene->_controlButton.animate(ANIM_MODE_NONE);
+ scene->_controlButton.setFrame(1);
+ scene->_redLights.remove();
- scene->_object9.postInit();
- scene->_object9.setVisage(60);
- scene->_object9.setStrip(7);
- scene->_object9.setPosition(Common::Point(136, 65));
- scene->_object9.setFrame(scene->_object9.getFrameCount());
- scene->_object9.animate(ANIM_MODE_6, this);
+ scene->_floppyDrive.postInit();
+ scene->_floppyDrive.setVisage(60);
+ scene->_floppyDrive.setStrip(7);
+ scene->_floppyDrive.setPosition(Common::Point(136, 65));
+ scene->_floppyDrive.setFrame(scene->_floppyDrive.getFrameCount());
+ scene->_floppyDrive.animate(ANIM_MODE_6, this);
scene->_soundHandler1.startSound(35);
scene->_soundHandler3.proc3();
- scene->_object8.setFrame(1);
- scene->_object8._state = 0;
+ scene->_masterButton.setFrame(1);
+ scene->_masterButton._state = 0;
_globals->clearFlag(103);
_globals->clearFlag(!_globals->_stripNum ? 116 : 119);
@@ -1949,9 +1982,10 @@ void Scene60::Action1::signal() {
break;
case 11:
_globals->_player._uiEnabled = true;
- scene->_object9.remove();
+ scene->_floppyDrive.remove();
remove();
break;
+ case 8:
default:
break;
}
@@ -1976,7 +2010,7 @@ void Scene60::Action2::signal() {
/*--------------------------------------------------------------------------*/
-void Scene60::Object2::doAction(int action) {
+void Scene60::PrevObject::doAction(int action) {
Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
@@ -1994,7 +2028,7 @@ void Scene60::Object2::doAction(int action) {
}
}
-void Scene60::Object3::doAction(int action) {
+void Scene60::NextObject::doAction(int action) {
Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
@@ -2011,7 +2045,7 @@ void Scene60::Object3::doAction(int action) {
}
}
-void Scene60::Object4::doAction(int action) {
+void Scene60::ExitObject::doAction(int action) {
Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
@@ -2019,47 +2053,49 @@ void Scene60::Object4::doAction(int action) {
} else if (action == CURSOR_USE) {
scene->_soundHandler3.startSound(36);
animate(ANIM_MODE_8, 1, NULL);
- scene->_object3.remove();
- scene->_object2.remove();
- scene->_object4.remove();
- scene->_object1.remove();
+ scene->_nextButton.remove();
+ scene->_prevButton.remove();
+ scene->_exitButton.remove();
+ scene->_rose.remove();
SceneItem::display(0, 0);
scene->loadScene(60);
- scene->_object6.setVisage(60);
- scene->_object6.setPosition(Common::Point(233, 143));
- scene->_object6.animate(ANIM_MODE_2, NULL);
+ scene->_controlButton.postInit();
+ scene->_controlButton.setVisage(60);
+ scene->_controlButton.setStrip(5);
+ scene->_controlButton.setPosition(Common::Point(233, 143));
+ scene->_controlButton.animate(ANIM_MODE_2, NULL);
scene->_slaveButton.postInit();
scene->_slaveButton.setVisage(60);
scene->_slaveButton.setStrip(8);
scene->_slaveButton.setPosition(Common::Point(143, 125));
- scene->_object8.postInit();
- scene->_object8.setVisage(60);
- scene->_object8.setStrip(8);
- scene->_object8.setPosition(Common::Point(143, 105));
+ scene->_masterButton.postInit();
+ scene->_masterButton.setVisage(60);
+ scene->_masterButton.setStrip(8);
+ scene->_masterButton.setPosition(Common::Point(143, 105));
- _globals->_sceneItems.push_front(&scene->_object8);
+ _globals->_sceneItems.push_front(&scene->_masterButton);
_globals->_sceneItems.push_front(&scene->_slaveButton);
- scene->_object10.postInit();
- scene->_object10.setVisage(60);
- scene->_object10.setPosition(Common::Point(199, 186));
- scene->_object10.animate(ANIM_MODE_8, 0, NULL);
- scene->_object10._numFrames = 5;
- scene->_object10.setAction(&scene->_sequenceManager, scene, 61, NULL);
+ scene->_redLights.postInit();
+ scene->_redLights.setVisage(60);
+ scene->_redLights.setPosition(Common::Point(199, 186));
+ scene->_redLights.animate(ANIM_MODE_8, 0, NULL);
+ scene->_redLights._numFrames = 5;
+ scene->_redLights.setAction(&scene->_sequenceManager, scene, 61, NULL);
if (scene->_slaveButton._state)
scene->_slaveButton.setFrame(2);
- if (scene->_object8._state)
- scene->_object8.setFrame(2);
+ if (scene->_masterButton._state)
+ scene->_masterButton.setFrame(2);
_globals->_sceneItems.push_front(&scene->_item1);
- _globals->_sceneItems.push_front(&scene->_object6);
+ _globals->_sceneItems.push_front(&scene->_controlButton);
_globals->_sceneItems.push_front(&scene->_slaveButton);
- _globals->_sceneItems.push_front(&scene->_object8);
+ _globals->_sceneItems.push_front(&scene->_masterButton);
_globals->_sceneItems.push_back(&scene->_item2);
_globals->gfxManager()._font.setFontNumber(2);
@@ -2074,7 +2110,7 @@ void Scene60::Object4::doAction(int action) {
}
}
-void Scene60::Object5::doAction(int action) {
+void Scene60::MessageObject::doAction(int action) {
Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
@@ -2087,7 +2123,7 @@ void Scene60::Object5::doAction(int action) {
}
}
-void Scene60::Object6::doAction(int action) {
+void Scene60::ControlObject::doAction(int action) {
Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
@@ -2114,7 +2150,7 @@ void Scene60::SlaveObject::doAction(int action) {
if (action == CURSOR_LOOK) {
SceneItem::display2(60, 8);
} else if (action == CURSOR_USE) {
- if (scene->_object8._state)
+ if (scene->_masterButton._state)
scene->_sceneMode = 19;
else if (_state) {
scene->_soundHandler3.proc3();
@@ -2138,20 +2174,22 @@ void Scene60::SlaveObject::doAction(int action) {
}
}
-void Scene60::Object8::doAction(int action) {
+void Scene60::MasterObject::doAction(int action) {
Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
SceneItem::display2(60, 7);
} else if (action == CURSOR_USE) {
- if (!scene->_object8._state)
+ if (!scene->_controlButton._animateMode)
scene->_sceneMode = 14;
+ else if (scene->_slaveButton._state)
+ scene->_sceneMode = 20;
else if (_state) {
scene->_soundHandler3.proc3();
animate(ANIM_MODE_6, NULL);
+ _state = 0;
_globals->clearFlag(103);
_globals->clearFlag(!_globals->_stripNum ? 116 : 119);
- _state = 0;
scene->_sceneMode = 9998;
} else {
scene->_soundHandler3.startSound(39);
@@ -2168,7 +2206,7 @@ void Scene60::Object8::doAction(int action) {
}
}
-void Scene60::Object9::doAction(int action) {
+void Scene60::FloppyDrive::doAction(int action) {
Scene60 *scene = (Scene60 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
@@ -2188,7 +2226,7 @@ void Scene60::Item1::doAction(int action) {
switch (action) {
case OBJECT_INFODISK:
- _globals->_inventory._infoDisk._sceneNumber = 60;
+ RING_INVENTORY._infoDisk._sceneNumber = 60;
_globals->setFlag(!_globals->_stripNum ? 118 : 121);
scene->_sceneMode = 0;
scene->setAction(&scene->_action1);
@@ -2197,7 +2235,7 @@ void Scene60::Item1::doAction(int action) {
SceneItem::display2(60, 10);
break;
case CURSOR_USE:
- if (_globals->_inventory._infoDisk._sceneNumber == 60) {
+ if (RING_INVENTORY._infoDisk._sceneNumber == 60) {
if (_globals->getFlag(118) && !_globals->_stripNum) {
_globals->clearFlag(118);
scene->setAction(&scene->_action1);
@@ -2210,7 +2248,7 @@ void Scene60::Item1::doAction(int action) {
scene->_action1.setActionIndex(9);
scene->_action1.setDelay(1);
}
- } else if (_globals->_inventory._infoDisk._sceneNumber == 1) {
+ } else if (RING_INVENTORY._infoDisk._sceneNumber == 1) {
scene->_sceneMode = 0;
setAction(&scene->_sequenceManager, scene, 62, NULL);
} else {
@@ -2264,20 +2302,20 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
_slaveButton.setPosition(Common::Point(143, 125));
_slaveButton._state = 0;
- _object8.postInit();
- _object8.setVisage(60);
- _object8.setStrip(8);
- _object8.setPosition(Common::Point(143, 105));
- _object8._state = 0;
+ _masterButton.postInit();
+ _masterButton.setVisage(60);
+ _masterButton.setStrip(8);
+ _masterButton.setPosition(Common::Point(143, 105));
+ _masterButton._state = 0;
- _globals->_sceneItems.push_back(&_object8);
+ _globals->_sceneItems.push_back(&_masterButton);
_globals->_sceneItems.push_back(&_slaveButton);
- _object6.postInit();
- _object6.setVisage(60);
- _object6.setStrip(5);
- _object6.setPosition(Common::Point(233, 143));
- _globals->_sceneItems.push_back(&_object6);
+ _controlButton.postInit();
+ _controlButton.setVisage(60);
+ _controlButton.setStrip(5);
+ _controlButton.setPosition(Common::Point(233, 143));
+ _globals->_sceneItems.push_back(&_controlButton);
if (_globals->_stripNum == -1) {
_globals->_stripNum = 0;
@@ -2297,29 +2335,29 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
}
if (_globals->getFlag(116)) {
- _object8._state = 1;
- _object8.setFrame(2);
+ _masterButton._state = 1;
+ _masterButton.setFrame(2);
}
if (_globals->getFlag(118)) {
- _object6.animate(ANIM_MODE_2, NULL);
+ _controlButton.animate(ANIM_MODE_2, NULL);
- _object10.postInit();
- _object10.setVisage(60);
- _object10.setPosition(Common::Point(199, 186));
- _object10.animate(ANIM_MODE_8, 0, NULL);
+ _redLights.postInit();
+ _redLights.setVisage(60);
+ _redLights.setPosition(Common::Point(199, 186));
+ _redLights.animate(ANIM_MODE_8, 0, NULL);
_soundHandler1.startSound(35);
if (!_globals->getFlag(83)) {
- _object5.postInit();
- _object5.setVisage(60);
- _object5.setStrip2(3);
- _object5.setFrame(2);
- _object5.setPosition(Common::Point(148, 85));
- _object5.animate(ANIM_MODE_2, NULL);
- _object5._numFrames = 5;
- _globals->_sceneItems.push_front(&_object5);
+ _message.postInit();
+ _message.setVisage(60);
+ _message.setStrip2(3);
+ _message.setFrame(2);
+ _message.setPosition(Common::Point(148, 85));
+ _message.animate(ANIM_MODE_2, NULL);
+ _message._numFrames = 5;
+ _globals->_sceneItems.push_front(&_message);
_soundHandler2.startSound(38);
}
@@ -2331,30 +2369,30 @@ void Scene60::postInit(SceneObjectList *OwnerList) {
}
if (_globals->getFlag(119)) {
- _object8._state = 1;
- _object8.setFrame(2);
+ _masterButton._state = 1;
+ _masterButton.setFrame(2);
}
if (_globals->getFlag(121)) {
- _object6.animate(ANIM_MODE_2, NULL);
+ _controlButton.animate(ANIM_MODE_2, NULL);
- _object10.postInit();
- _object10.setVisage(60);
- _object10.setPosition(Common::Point(199, 186));
- _object10.animate(ANIM_MODE_8, 0, NULL);
- _object10._numFrames = 5;
+ _redLights.postInit();
+ _redLights.setVisage(60);
+ _redLights.setPosition(Common::Point(199, 186));
+ _redLights.animate(ANIM_MODE_8, 0, NULL);
+ _redLights._numFrames = 5;
_soundHandler1.startSound(35);
if (!_globals->getFlag(83)) {
- _object5.postInit();
- _object5.setVisage(60);
- _object5.setStrip2(3);
- _object5.setFrame(2);
- _object5.setPosition(Common::Point(148, 85));
- _object5.animate(ANIM_MODE_2, NULL);
- _object5._numFrames = 5;
- _globals->_sceneItems.push_front(&_object5);
+ _message.postInit();
+ _message.setVisage(60);
+ _message.setStrip2(3);
+ _message.setFrame(2);
+ _message.setPosition(Common::Point(148, 85));
+ _message.animate(ANIM_MODE_2, NULL);
+ _message._numFrames = 5;
+ _globals->_sceneItems.push_front(&_message);
_soundHandler2.startSound(38);
}
@@ -2374,7 +2412,7 @@ void Scene60::signal() {
_globals->_events.setCursor(CURSOR_USE);
_gfxButton.setText(EXIT_MSG);
- _gfxButton._bounds.centre(160, 193);
+ _gfxButton._bounds.center(160, 193);
_gfxButton.draw();
_gfxButton._bounds.expandPanes();
} else {
@@ -2387,7 +2425,7 @@ void Scene60::signal() {
void Scene60::process(Event &event) {
Scene::process(event);
- if (_sceneNumber == 60) {
+ if (_screenNumber == 60) {
if (_gfxButton.process(event))
_globals->_sceneManager.changeScene(50);
}
@@ -2474,7 +2512,7 @@ void Scene90::Action1::signal() {
scene->_object3.animate(ANIM_MODE_6, NULL);
SceneItem::display(90, _globals->getFlag(104) ? 15 : 14,
- SET_EXT_BGCOLOUR, 13, SET_KEEP_ONSCREEN, -1, SET_X, 120, SET_Y, 20, LIST_END);
+ SET_EXT_BGCOLOR, 13, SET_KEEP_ONSCREEN, -1, SET_X, 120, SET_Y, 20, LIST_END);
break;
case 12:
SceneItem::display(0, 0);
@@ -2611,7 +2649,7 @@ void Scene90::postInit(SceneObjectList *OwnerList) {
_object3.setVisage(90);
_object3.animate(ANIM_MODE_1, NULL);
_object3.setPosition(Common::Point(196, 181));
- _object3.setPriority2(175);
+ _object3.fixPriority(175);
_globals->_sceneItems.push_back(&_object3);
_globals->_player.disableControl();
@@ -2636,7 +2674,7 @@ void Scene90::signal() {
break;
case 92:
_globals->_scenePalette.clearListeners();
- _globals->_game.endGame(90, 6);
+ _globals->_game->endGame(90, 6);
break;
case 96:
_globals->_player.enableControl();
@@ -2667,7 +2705,7 @@ void Scene95::Action1::signal() {
case 1:
if (_state) {
SceneItem::display(95, _state % 2, SET_FONT, 2,
- SET_EXT_BGCOLOUR, -1, SET_EXT_BGCOLOUR, 20,
+ SET_EXT_BGCOLOR, -1, SET_EXT_BGCOLOR, 20,
SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, SET_TEXT_MODE, 1, LIST_END);
--_state;
_actionIndex = 1;
@@ -2701,7 +2739,7 @@ void Scene95::Action1::signal() {
scene->_object1.addMover(mover2, &pt2, NULL);
SceneItem::display(95, 2, SET_Y, 45, SET_FONT, 2,
- SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 13, SET_WIDTH, 200,
+ SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 13, SET_WIDTH, 200,
SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(240);
break;
@@ -2710,13 +2748,13 @@ void Scene95::Action1::signal() {
scene->_object3.remove();
SceneItem::display(95, 3, SET_Y, 45, SET_FONT, 2,
- SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 35, SET_WIDTH, 200,
+ SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 35, SET_WIDTH, 200,
SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(240);
break;
case 5:
SceneItem::display(95, 4, SET_Y, 45, SET_FONT, 2,
- SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 35, SET_WIDTH, 200,
+ SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 35, SET_WIDTH, 200,
SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(240);
break;
@@ -2841,7 +2879,7 @@ void Scene6100::Action3::signal() {
break;
case 1:
_globals->_scenePalette.clearListeners();
- scene->_fadePercent = 0;
+ scene->_fadePercent = 100;
_globals->_scenePalette.refresh();
scene->loadScene(9997);
scene->_object1.hide();
@@ -2852,7 +2890,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;
@@ -2957,39 +2995,39 @@ void Scene6100::Action5::dispatch() {
}
scene->_objList[idx]->_flags |= OBJFLAG_PANES;
-/*
+
if ((idx != 3) && (scene->_fadePercent == 100) &&
- (tempSet.sqrt(floatSet) < 150.0)) {
+ (tempSet.sqrt(zeroSet) < 150.0)) {
switch (scene->_hitCount++) {
case 1:
scene->_soundHandler.startSound(233);
- scene->showMessage(0, NULL, 0);
+ scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
- scene->_object5.setAction(&scene->_action2);
+ scene->_probe.setAction(&scene->_action2);
+ break;
case 2:
scene->_soundHandler.startSound(234);
- scene->showMessage(0, NULL, 0);
+ scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
- scene->_object5.setAction(NULL);
+ scene->_probe.setAction(NULL);
scene->setAction(&scene->_action3);
break;
default:
scene->_soundHandler.startSound(233);
- scene->showMessage(0, NULL, 0);
+ scene->showMessage(NULL, 0, NULL);
if (!_globals->getFlag(76))
- scene->_object5.setAction(&scene->_action1);
+ scene->_probe.setAction(&scene->_action1);
break;
}
_globals->_scenePalette.clearListeners();
scene->_fadePercent = 0;
}
- */
}
}
@@ -3091,6 +3129,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
loadScene(6100);
Scene::postInit();
setZoomPercents(62, 2, 200, 425);
+ _globals->_sceneHandler._delayTicks = 8;
_globals->_player.disableControl();
_globals->_events.setCursor(CURSOR_WALK);
@@ -3102,28 +3141,28 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
_object1._frame = 1;
_object1._strip = 4;
_object1.setPosition(Common::Point(0, 60));
- _object1.setPriority2(1);
+ _object1.fixPriority(1);
_object2.postInit();
_object2.setVisage(6100);
_object2._frame = 1;
_object2._strip = 4;
_object2.setPosition(Common::Point(160, 60));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object3.postInit();
_object3.setVisage(6100);
_object3._frame = 1;
_object3._strip = 4;
_object3.setPosition(Common::Point(320, 60));
- _object3.setPriority2(1);
+ _object3.fixPriority(1);
_rocks.postInit();
_rocks.setVisage(6100);
_rocks._frame = 1;
_rocks._strip = 3;
_rocks.setPosition(Common::Point(320, 0));
- _rocks.setPriority2(2);
+ _rocks.fixPriority(2);
_rocks.changeZoom(-1);
_rocks._floats._float1 = 320.0;
_rocks._floats._float2 = 25000.0;
@@ -3135,7 +3174,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
_probe._frame = 1;
_probe._strip = 5;
_probe.setPosition(Common::Point(160, 260));
- _probe.setPriority2(3);
+ _probe.fixPriority(3);
_probe._floats._float1 = 320.0;
_probe._floats._float2 = 0.0;
_probe._floats._float3 = 0.0;
@@ -3160,7 +3199,7 @@ void Scene6100::postInit(SceneObjectList *OwnerList) {
_objList[idx]->setPosition(Common::Point(
_globals->_randomSource.getRandomNumber(319), 60));
- _objList[idx]->setPriority2(1);
+ _objList[idx]->fixPriority(1);
_objList[idx]->changeZoom(-1);
}
@@ -3193,9 +3232,9 @@ void Scene6100::process(Event &event) {
if (event.eventType == EVENT_KEYPRESS) {
// Handle incremental turning speeds with arrow keys
if ((event.kbd.keycode == Common::KEYCODE_LEFT) || (event.kbd.keycode == Common::KEYCODE_KP4)) {
- _turnAmount = MAX(_turnAmount - 1, -8);
+ _turnAmount = MIN(_turnAmount + 1, 8);
} else if ((event.kbd.keycode == Common::KEYCODE_RIGHT) || (event.kbd.keycode == Common::KEYCODE_KP6)) {
- _turnAmount = MIN(_turnAmount + 1, -8);
+ _turnAmount = MAX(_turnAmount - 1, -8);
}
}
@@ -3231,7 +3270,7 @@ void Scene6100::dispatch() {
_sceneText.setPosition(Common::Point(24, 160));
_sceneText._fontNumber = 0;
- _sceneText._colour1 = 35;
+ _sceneText._color1 = 35;
_sceneText.setup(s);
}
@@ -3244,7 +3283,7 @@ void Scene6100::dispatch() {
}
}
-void Scene6100::showMessage(const Common::String &msg, int colour, Action *action) {
+void Scene6100::showMessage(const Common::String &msg, int color, Action *action) {
if (_msgActive) {
_msgActive = false;
_speaker1.removeText();
@@ -3254,7 +3293,7 @@ void Scene6100::showMessage(const Common::String &msg, int colour, Action *actio
_msgActive = true;
_speaker1._textPos.x = 20;
_speaker1._textWidth = 280;
- _speaker1._colour1 = colour;
+ _speaker1._color1 = color;
_speaker1._action = action;
_speaker1.setText(msg);
}
diff --git a/engines/tsage/ringworld_scenes1.h b/engines/tsage/ringworld_scenes1.h
index b567aeea2d..be6d8e6337 100644
--- a/engines/tsage/ringworld_scenes1.h
+++ b/engines/tsage/ringworld_scenes1.h
@@ -114,34 +114,13 @@ class Scene30 : public Scene {
// Doorway beam sensor
class BeamObject : public SceneObject {
public:
- virtual void doAction(int action) {
- if (action == OBJECT_SCANNER)
- display(30, 14, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- else if (action == CURSOR_LOOK)
- display(30, 2, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- else if (action == CURSOR_USE) {
- Scene30 *parent = (Scene30 *)_globals->_sceneManager._scene;
- parent->setAction(&parent->_beamAction);
- } else
- SceneObject::doAction(action);
- }
+ virtual void doAction(int action);
};
-
// Doorway object
class DoorObject : public SceneObject {
public:
- virtual void doAction(int action) {
- if (action == OBJECT_SCANNER)
- display(30, 13, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- else if (action == CURSOR_LOOK)
- display(30, 1, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- else if (action == CURSOR_USE)
- display(30, 7, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- else
- SceneObject::doAction(action);
- }
+ virtual void doAction(int action);
};
-
// Kzin object
class KzinObject : public SceneObject {
public:
@@ -344,23 +323,23 @@ class Scene60 : public Scene {
public:
virtual void signal();
};
- class Object2 : public SceneObject {
+ class PrevObject : public SceneObject {
public:
virtual void doAction(int action);
};
- class Object3 : public SceneObject {
+ class NextObject : public SceneObject {
public:
virtual void doAction(int action);
};
- class Object4 : public SceneObject {
+ class ExitObject : public SceneObject {
public:
virtual void doAction(int action);
};
- class Object5 : public SceneObject {
+ class MessageObject : public SceneObject {
public:
virtual void doAction(int action);
};
- class Object6 : public SceneObject {
+ class ControlObject : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -368,11 +347,11 @@ class Scene60 : public Scene {
public:
virtual void doAction(int action);
};
- class Object8 : public SceneObjectExt {
+ class MasterObject : public SceneObjectExt {
public:
virtual void doAction(int action);
};
- class Object9 : public SceneObject {
+ class FloppyDrive : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -399,16 +378,16 @@ public:
SpeakerSText _speakerSText;
Action1 _action1;
Action2 _action2;
- SceneObject _object1;
- Object2 _object2;
- Object3 _object3;
- Object4 _object4;
- Object5 _object5;
- Object6 _object6;
+ SceneObject _rose;
+ PrevObject _prevButton;
+ NextObject _nextButton;
+ ExitObject _exitButton;
+ MessageObject _message;
+ ControlObject _controlButton;
SlaveObject _slaveButton;
- Object8 _object8;
- Object9 _object9;
- SceneObject _object10;
+ MasterObject _masterButton;
+ FloppyDrive _floppyDrive;
+ SceneObject _redLights;
Item1 _item1;
Item _item2, _item3, _item4, _item5, _item6;
SoundHandler _soundHandler1;
@@ -548,7 +527,7 @@ public:
virtual void remove();
virtual void process(Event &event);
virtual void dispatch();
- void showMessage(const Common::String &msg, int colour, Action *action);
+ void showMessage(const Common::String &msg, int color, Action *action);
};
diff --git a/engines/tsage/ringworld_scenes10.cpp b/engines/tsage/ringworld_scenes10.cpp
index 30a0ffd34e..65e415748d 100644
--- a/engines/tsage/ringworld_scenes10.cpp
+++ b/engines/tsage/ringworld_scenes10.cpp
@@ -38,7 +38,8 @@ Scene2::Scene2() : Scene() {
/*--------------------------------------------------------------------------*/
void Object9350::postInit(SceneObjectList *OwnerList) {
- _globals->_sceneManager.postInit(&_globals->_sceneManager._altSceneObjects);
+ //SceneObject::postInit(&_globals->_sceneManager._altSceneObjects);
+ SceneObject::postInit(OwnerList);
}
void Object9350::draw() {
@@ -66,7 +67,7 @@ void Scene9100::SceneHotspot1::doAction(int action) {
_globals->_player.disableControl();
scene->_sceneMode = 9105;
}
- scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, &scene->_object5, &scene->_object6, 0);
+ scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, &scene->_object5, &scene->_object6, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -77,16 +78,16 @@ void Scene9100::dispatch() {
if (!_action) {
if (_globals->_player._position.x < 25) {
- if (!_globals->getFlag(11)) {
- scene->_sceneMode = 9106;
- } else {
- scene->_sceneMode = 9108;
+ _globals->_player.disableControl();
+ if (!_globals->getFlag(23) || _globals->getFlag(11))
+ _sceneMode = 9106;
+ else {
+ _sceneMode = 9108;
_globals->setFlag(11);
}
- } else {
- scene->_sceneMode = 9106;
+
+ scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, NULL);
}
- scene->setAction(&scene->_sequenceManager, scene, scene->_sceneMode, &_globals->_player, 0);
} else {
Scene::dispatch();
}
@@ -102,7 +103,7 @@ void Scene9100::signal() {
_globals->_sceneManager.changeScene(9150);
break;
case 9105:
- _sceneHotspot1.remove();
+ _sceneHotspot3.remove();
// No break on purpose
case 9103:
case 9104:
@@ -115,17 +116,15 @@ void Scene9100::signal() {
}
void Scene9100::postInit(SceneObjectList *OwnerList) {
- Scene9100 *scene = (Scene9100 *)_globals->_sceneManager._scene;
-
Scene::postInit();
setZoomPercents(0, 100, 200, 100);
_object1.postInit();
_object1.setVisage(9100);
_object1._strip = 1;
_object1._numFrames = 6;
- _object1.setPosition(Common::Point(297, 132), 0);
- _object1.animate(ANIM_MODE_2, 0);
- _object1.setPriority2(10);
+ _object1.setPosition(Common::Point(279, 132));
+ _object1.animate(ANIM_MODE_2, NULL);
+ _object1.fixPriority(10);
_globals->_player.postInit();
@@ -146,7 +145,7 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
_object6.setVisage(9111);
_object6.setStrip(6);
_object6.setFrame(1);
- _object6.setPosition(Common::Point(138, 166), 0);
+ _object6.setPosition(Common::Point(138, 166));
_sceneHotspot3.setup(145, 125, 166, 156, 9100, 40, 43);
}
_sceneHotspot1.setup(140, 176, 185, 215, 9100, 36, 37);
@@ -155,7 +154,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, 0, 127);
+ _globals->_soundHandler.startSound(251);
if (_globals->_sceneManager._previousScene == 9150) {
if (_globals->getFlag(20)) {
_globals->_player.disableControl();
@@ -163,17 +162,17 @@ void Scene9100::postInit(SceneObjectList *OwnerList) {
_sceneMode = 9107;
else
_sceneMode = 9109;
- setAction(&scene->_sequenceManager, scene, _sceneMode, &_globals->_player, &_object5, 0);
+ setAction(&_sequenceManager, this, _sceneMode, &_globals->_player, &_object5, NULL);
} else {
_sceneMode = 9103;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager, scene, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, 0);
+ setAction(&_sequenceManager, this, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, NULL);
_globals->setFlag(20);
}
} else {
_sceneMode = 9102;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager, scene, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, 0);
+ setAction(&_sequenceManager, this, _sceneMode, &_globals->_player, &_object2, &_object3, &_object4, &_object5, NULL);
}
}
@@ -224,7 +223,7 @@ void Scene9150::dispatch() {
if ((_sceneState != 0) && (_sceneBounds.left == 0)) {
_object3._timer = 0;
_sceneState = 0;
- _sceneHotspot3.setAction(&_sequenceManager2, 0, 9154, &_object3, 0);
+ _object3.setAction(&_sequenceManager2, NULL, 9154, &_object3, NULL);
_sceneHotspot10.remove();
}
@@ -235,17 +234,17 @@ void Scene9150::dispatch() {
if (_globals->_player._position.x > 630) {
_globals->_player.disableControl();
_sceneMode = 9157;
- setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, 0);
+ setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, NULL);
}
} else {
_globals->_player.disableControl();
if (_globals->getFlag(11)) {
- _globals->_soundHandler.startSound(286, 0, 127);
+ _globals->_soundHandler.startSound(286);
_sceneMode = 9153;
} else {
_sceneMode = 9156;
}
- setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, 0);
+ setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, NULL);
}
}
}
@@ -260,7 +259,7 @@ void Scene9150::postInit(SceneObjectList *OwnerList) {
_object3.setVisage(9151);
_object3._strip = 1;
_object3._frame = 1;
- _object3.setPosition(Common::Point(312, 95), 0);
+ _object3.setPosition(Common::Point(312, 95));
_object3.signal();
_sceneHotspot1.setup(0, 0, 200, 94, 9150, 46, -1);
@@ -274,7 +273,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, 0, 127);
+ _globals->_soundHandler.startSound(285);
_globals->_player.disableControl();
if (_globals->getFlag(20)) {
@@ -286,14 +285,14 @@ void Scene9150::postInit(SceneObjectList *OwnerList) {
else
// Hero wearing Purple suit
_sceneMode = 9152;
- setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, 0);
+ setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, NULL);
} else {
// Walking with the tiger
_sceneMode = 9151;
_object2.postInit();
_object2.hide();
_object1.postInit();
- setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, &_object1, &_object2, 0);
+ setAction(&_sequenceManager1, this, _sceneMode, &_globals->_player, &_object1, &_object2, NULL);
}
}
@@ -308,16 +307,16 @@ void Scene9200::SceneHotspot1::doAction(int action) {
_globals->_player.disableControl();
if (_globals->getFlag(93)) {
scene->_sceneState = 9214;
- setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, NULL);
} else {
_globals->setFlag(93);
scene->_sceneState = 9213;
- setAction(&scene->_sequenceManager, scene, 9213, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9213, &_globals->_player, &scene->_object2, NULL);
}
} else if (action <= 100) {
_globals->_player.disableControl();
scene->_sceneState = 9214;
- setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9214, &_globals->_player, &scene->_object2, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -365,27 +364,27 @@ void Scene9200::dispatch() {
if ( (_globals->_player._position.x <= 0) || ((_globals->_player._position.x < 100) && (_globals->_player._position.y > 199))) {
_globals->_player.disableControl();
_sceneState = 9209;
- setAction(&_sequenceManager, this, 9209, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9209, &_globals->_player, &_object2, &_object3, NULL);
} else {
if (rect9200.contains(_globals->_player._position)) {
if (_globals->getFlag(93)) {
if (_globals->getFlag(86)) {
_sceneState = 9215;
- setAction(&_sequenceManager, this, 9215, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9215, &_globals->_player, &_object2, &_object3, NULL);
} else {
_sceneState = 9208;
- setAction(&_sequenceManager, this, 9208, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9208, &_globals->_player, &_object2, &_object3, NULL);
}
} else {
_globals->_player.disableControl();
_sceneState = 9204;
- setAction(&_sequenceManager, this, 9204, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9204, &_globals->_player, &_object2, &_object3, NULL);
}
} else {
if (_globals->_player._position.y < 140) {
_globals->_player.disableControl();
_sceneState = 9207;
- setAction(&_sequenceManager, this, 9207, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9207, &_globals->_player, &_object2, &_object3, NULL);
}
}
}
@@ -403,10 +402,10 @@ void Scene9200::postInit(SceneObjectList *OwnerList) {
// Water animation
_object1.setVisage(9200);
_object1._strip = 3;
- _object1.animate(ANIM_MODE_2, 0);
- _object1.setPosition(Common::Point(132, 114), 0);
- _object1.setPriority2(140);
- _soundHandler.startSound(297, 0, 127);
+ _object1.animate(ANIM_MODE_2, NULL);
+ _object1.setPosition(Common::Point(132, 114));
+ _object1.fixPriority(140);
+ _soundHandler.startSound(297);
_stripManager.addSpeaker(&_speakerQText);
_stripManager.addSpeaker(&_speakerGR);
_stripManager.addSpeaker(&_speakerGText);
@@ -429,41 +428,45 @@ void Scene9200::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) {
case 9500:
if (_globals->getFlag(85)) {
- if (_globals->_inventory._helmet._sceneNumber == 1) {
+ if (RING_INVENTORY._helmet._sceneNumber == 1) {
_globals->setFlag(86);
+ _globals->_player.disableControl();
_sceneState = 9210;
- setAction(&_sequenceManager, this, 9210, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9210, &_globals->_player, &_object2, &_object3, NULL);
} else {
+ _globals->_player.disableControl();
_sceneState = 9212;
- setAction(&_sequenceManager, this, 9212, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9212, &_globals->_player, &_object2, &_object3, NULL);
}
} else {
- if (_globals->_inventory._helmet._sceneNumber == 1) {
+ if (RING_INVENTORY._helmet._sceneNumber == 1) {
+ _globals->_player.disableControl();
_sceneState = 9211;
- setAction(&_sequenceManager, this, 9211, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9211, &_globals->_player, &_object2, &_object3, NULL);
} else {
+ _globals->_player.disableControl();
_sceneState = 9202;
- setAction(&_sequenceManager, this, 9202, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9202, &_globals->_player, &_object2, &_object3, NULL);
}
}
break;
case 9700:
if (_globals->getFlag(86)) {
_sceneState = 9206;
- setAction(&_sequenceManager, this, 9206, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9206, &_globals->_player, &_object2, &_object3, NULL);
} else {
_sceneState = 9203;
- setAction(&_sequenceManager, this, 9203, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9203, &_globals->_player, &_object2, &_object3, NULL);
}
break;
case 9360:
default:
if (_globals->getFlag(86)) {
_sceneState = 9205;
- setAction(&_sequenceManager, this, 9205, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9205, &_globals->_player, &_object2, &_object3, NULL);
} else {
_sceneState = 9201;
- setAction(&_sequenceManager, this, 9201, &_globals->_player, &_object2, &_object3, 0);
+ setAction(&_sequenceManager, this, 9201, &_globals->_player, &_object2, &_object3, NULL);
}
break;
}
@@ -479,7 +482,7 @@ void Scene9300::signal() {
_globals->setFlag(84);
// No break on purpose
case 9303:
- _globals->_soundHandler.startSound(295, 0, 127);
+ _globals->_soundHandler.startSound(295);
_globals->_sceneManager.changeScene(9350);
break;
case 9302:
@@ -496,7 +499,7 @@ void Scene9300::dispatch() {
} else if (_globals->_player._position.y < 145) {
_globals->_player.disableControl();
_sceneMode = 9303;
- setAction(&_sequenceManager, this, 9303, &_globals->_player, &_object1, &_object2, 0);
+ setAction(&_sequenceManager, this, 9303, &_globals->_player, &_object1, &_object2, NULL);
}
}
@@ -509,7 +512,7 @@ void Scene9300::postInit(SceneObjectList *OwnerList) {
_globals->_player.changeZoom(-1);
_object1.postInit();
_object2.postInit();
- _globals->_soundHandler.startSound(289, 0, 127);
+ _globals->_soundHandler.startSound(289);
_hotspot1.setup(35, 142, 76, 212, 9300, 0, 1);
_hotspot2.setup(28, 90, 81, 143, 9300, 2, 3);
@@ -528,11 +531,11 @@ void Scene9300::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneManager._previousScene == 9350) {
_globals->_player.disableControl();
_sceneMode = 9302;
- setAction(&_sequenceManager, this, 9302, &_globals->_player, &_object1, &_object2, 0);
+ setAction(&_sequenceManager, this, 9302, &_globals->_player, &_object1, &_object2, NULL);
} else {
_globals->_player.disableControl();
_sceneMode = 9301;
- setAction(&_sequenceManager, this, 9301, &_globals->_player, &_object1, &_object2, 0);
+ setAction(&_sequenceManager, this, 9301, &_globals->_player, &_object1, &_object2, NULL);
}
}
@@ -569,15 +572,15 @@ void Scene9350::dispatch() {
if ((_globals->_player._position.x > 300) && (_globals->_player._position.y < 160)) {
_globals->_player.disableControl();
_sceneState = 9356;
- setAction(&_sequenceManager, this, 9356, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9356, &_globals->_player, &_object2, NULL);
} else if ((_globals->_player._position.x > 110) && (_globals->_player._position.y >= 195)) {
_globals->_player.disableControl();
_sceneState = 9357;
- setAction(&_sequenceManager, this, 9357, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9357, &_globals->_player, &_object2, NULL);
} else if ((_globals->_player._position.x < 10) || ((_globals->_player._position.x <= 110) && (_globals->_player._position.y >= 195))) {
_globals->_player.disableControl();
_sceneState = 9355;
- setAction(&_sequenceManager, this, 9355, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9355, &_globals->_player, &_object2, NULL);
}
} else {
Scene::dispatch();
@@ -589,7 +592,7 @@ void Scene9350::postInit(SceneObjectList *OwnerList) {
setZoomPercents(95, 80, 200, 100);
_globals->_player.postInit();
- _object1.setup(9350, 1, 3, 139, 97, 0);
+ _object1.setup(9351, 1, 3, 139, 97, 0);
_sceneHotspot1.setup(42, 0, 97, 60, 9350, 0, -1);
_sceneHotspot2.setup(37, 205, 82, 256, 9350, 0, -1);
_sceneHotspot3.setup(29, 93, 92, 174, 9350, 1, -1);
@@ -602,22 +605,22 @@ void Scene9350::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneManager._previousScene == 9360) {
_globals->_player.disableControl();
_sceneState = 9352;
- setAction(&_sequenceManager, this, 9352, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9352, &_globals->_player, &_object2, NULL);
} else if (_globals->_sceneManager._previousScene == 9400) {
_globals->_player.disableControl();
_sceneState = 9353;
- setAction(&_sequenceManager, this, 9353, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9353, &_globals->_player, &_object2, NULL);
} else {
- if (!_globals->getFlag(84)) {
+ if (_globals->getFlag(84)) {
_globals->clearFlag(84);
_object2.postInit();
_globals->_player.disableControl();
_sceneState = 9359;
- setAction(&_sequenceManager, this, 9359, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9359, &_globals->_player, &_object2, NULL);
} else {
_globals->_player.disableControl();
_sceneState = 9354;
- setAction(&_sequenceManager, this, 9354, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9354, &_globals->_player, &_object2, NULL);
}
}
}
@@ -654,15 +657,15 @@ void Scene9360::dispatch() {
if ((_globals->_player._position.x > 300) && (_globals->_player._position.y < 160)) {
_globals->_player.disableControl();
_sceneState = 9366;
- setAction(&_sequenceManager, this, 9366, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9366, &_globals->_player, NULL);
} else if ((_globals->_player._position.x > 110) && (_globals->_player._position.y >= 195)) {
_globals->_player.disableControl();
_sceneState = 9367;
- setAction(&_sequenceManager, this, 9367, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9367, &_globals->_player, NULL);
} else if ((_globals->_player._position.x < 10) || ((_globals->_player._position.x <= 110) && (_globals->_player._position.y >= 195))) {
_globals->_player.disableControl();
_sceneState = 9365;
- setAction(&_sequenceManager, this, 9365, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9365, &_globals->_player, NULL);
}
} else {
Scene::dispatch();
@@ -687,15 +690,15 @@ void Scene9360::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneManager._previousScene == 9350) {
_globals->_player.disableControl();
_sceneState = 9364;
- setAction(&_sequenceManager, this, 9364, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9364, &_globals->_player, NULL);
} else if (_globals->_sceneManager._previousScene == 9450) {
_globals->_player.disableControl();
_sceneState = 9363;
- setAction(&_sequenceManager, this, 9363, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9363, &_globals->_player, NULL);
} else {
_globals->_player.disableControl();
_sceneState = 9362;
- setAction(&_sequenceManager, this, 9362, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9362, &_globals->_player, NULL);
}
_object1.setup(9351, 1, 1, 131, 90, 0);
}
@@ -711,9 +714,10 @@ Scene9400::Scene9400() {
void Scene9400::SceneHotspot7::doAction(int action) {
Scene9400 *scene = (Scene9400 *)_globals->_sceneManager._scene;
- if ((action == CURSOR_USE) && (_globals->_inventory._straw._sceneNumber != 1)) {
+ if ((action == CURSOR_USE) && (RING_INVENTORY._straw._sceneNumber != 1)) {
scene->_sceneState = 1;
- scene->setAction(&scene->_sequenceManager, scene, 9408, &_globals->_player, 0);
+ RING_INVENTORY._straw._sceneNumber = 1;
+ scene->setAction(&scene->_sequenceManager, scene, 9408, &_globals->_player, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -739,7 +743,7 @@ void Scene9400::signal() {
break;
case 1:
_object1._numFrames = 6;
- _object1.animate(ANIM_MODE_2, 0);
+ _object1.animate(ANIM_MODE_2, NULL);
_globals->_player.enableControl();
break;
case 2:
@@ -763,7 +767,7 @@ void Scene9400::signal() {
void Scene9400::dispatch() {
if ((_object1._animateMode == 2) && (_object1._strip == 1) && (_object1._frame == 4)){
if (_field1032 == 0) {
- _soundHandler.startSound(296, 0, 127);
+ _soundHandler.startSound(296);
_field1032 = 1;
}
} else {
@@ -785,11 +789,11 @@ void Scene9400::dispatch() {
void Scene9400::postInit(SceneObjectList *OwnerList) {
Scene::postInit();
- _sceneNumber = 9400;
+ _screenNumber = 9400;
setZoomPercents(0, 100, 200, 100);
_globals->_player.postInit();
- _object1.postInit(0);
- _object3.postInit(0);
+ _object1.postInit();
+ _object3.postInit();
_speakerQText._textPos.x = 20;
_hotspot7.setup(157, 66, 180, 110, 9400, 21, 23);
@@ -815,7 +819,7 @@ void Scene9400::postInit(SceneObjectList *OwnerList) {
_sceneState = 0;
}
- setAction(&_sequenceManager, this, 9400, &_globals->_player, &_object1, &_object3, 0);
+ setAction(&_sequenceManager, this, 9400, &_globals->_player, &_object1, &_object3, NULL);
}
/*--------------------------------------------------------------------------
@@ -825,7 +829,7 @@ void Scene9400::postInit(SceneObjectList *OwnerList) {
void Scene9450::Object2::signal() {
Scene9450 *scene = (Scene9450 *)_globals->_sceneManager._scene;
- this->setAction(&scene->_sequenceManager3, this, 9458, &scene->_object1, 0);
+ this->setAction(&scene->_sequenceManager3, this, 9458, this, &scene->_object1, NULL);
}
void Scene9450::Object3::dispatch() {
@@ -841,7 +845,7 @@ void Scene9450::Hotspot1::doAction(int action) {
scene->_object2._action->remove();
scene->_sceneMode = 9459;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager1, scene, 9459, &scene->_object2, &scene->_object1, &scene->_object3, &_globals->_player, 0);
+ scene->setAction(&scene->_sequenceManager1, scene, 9459, &scene->_object2, &scene->_object1, &scene->_object3, &_globals->_player, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -856,35 +860,35 @@ void Scene9450::Hotspot3::doAction(int action) {
case OBJECT_TUNIC2:
scene->_sceneMode = 9460;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager1, scene, 9460, &_globals->_player, &scene->_object2, &scene->_object1, 0);
+ scene->setAction(&scene->_sequenceManager1, scene, 9460, &_globals->_player, &scene->_object2, &scene->_object1, NULL);
break;
case OBJECT_TUNIC:
- SceneItem::display(9450, 49, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9450, 49, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
case CURSOR_WALK:
// nothing
break;
case CURSOR_LOOK:
- SceneItem::display(9450, 41, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9450, 41, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
case CURSOR_USE:
case CURSOR_TALK:
- if (_globals->_inventory._tunic._sceneNumber == 9450) {
+ if (RING_INVENTORY._tunic._sceneNumber == 9450) {
if (scene->_object2._action)
scene->_object2._action->remove();
scene->_sceneMode = 9459;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager1, scene, 9459, &scene->_object2, &scene->_object1, &scene->_object3, &_globals->_player, 0);
- } else if ((_globals->_inventory._cloak._sceneNumber != 1) && (_globals->_inventory._jacket._sceneNumber != 1) && (_globals->_inventory._tunic2._sceneNumber != 1)) {
- SceneItem::display(9450, 38, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ scene->setAction(&scene->_sequenceManager1, scene, 9459, &scene->_object2, &scene->_object1, &scene->_object3, &_globals->_player, NULL);
+ } else if ((RING_INVENTORY._cloak._sceneNumber != 1) && (RING_INVENTORY._jacket._sceneNumber != 1) && (RING_INVENTORY._tunic2._sceneNumber != 1)) {
+ SceneItem::display(9450, 38, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else {
scene->_sceneMode = 9460;
_globals->_player.disableControl();
- setAction(&scene->_sequenceManager1, scene, 9460, &_globals->_player, &scene->_object2, &scene->_object1, 0);
+ scene->setAction(&scene->_sequenceManager1, scene, 9460, &_globals->_player, &scene->_object2, &scene->_object1, NULL);
}
break;
default:
- SceneItem::display(9450, 45, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9450, 45, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
break;
}
}
@@ -894,11 +898,11 @@ void Scene9450::signal() {
case 1002:
case 1004:
// Drink
- setAction(&_sequenceManager1, this, 9456, &_object2, &_object1, &_object3, 0);
+ setAction(&_sequenceManager1, this, 9456, &_object2, &_object1, &_object3, NULL);
break;
case 1005:
// Bring me more wine
- setAction(&_sequenceManager1, this, 9457, &_object2, &_object1, &_object3, 0);
+ setAction(&_sequenceManager1, this, 9457, &_object2, &_object1, &_object3, NULL);
break;
case 9451:
if (_globals->getFlag(87)) {
@@ -907,18 +911,22 @@ void Scene9450::signal() {
_sceneMode = 1001;
if (_object2._action)
_object2._action->remove();
+ // Eat
+ setAction(&_sequenceManager1, this, 9455, &_object2, &_object1, &_object3, NULL);
}
- // No break on purpose
+ break;
case 1001:
case 1003:
// Eat
- setAction(&_sequenceManager1, this, 9455, &_object2, &_object1, &_object3, 0);
+ setAction(&_sequenceManager1, this, 9455, &_object2, &_object1, &_object3, NULL);
break;
case 9453:
_globals->_sceneManager.changeScene(9360);
break;
case 9459:
+ RING_INVENTORY._tunic._sceneNumber = 1;
_object2.signal();
+ _globals->_player.enableControl();
_globals->_events.setCursor(CURSOR_WALK);
_hotspot1.remove();
break;
@@ -938,11 +946,11 @@ void Scene9450::dispatch() {
if ((_globals->_player._position.y < 98) && (_globals->_player._position.x > 241) && (_globals->_player._position.x < 282)) {
_globals->_player.disableControl();
_sceneMode = 9452;
- setAction(&_sequenceManager1, this, 9452, &_globals->_player, 0);
+ setAction(&_sequenceManager1, this, 9452, &_globals->_player, NULL);
} else if ((_globals->_player._position.y < 99) && (_globals->_player._position.x > 68) && (_globals->_player._position.x < 103)) {
_globals->_player.disableControl();
_sceneMode = 9453;
- setAction(&_sequenceManager1, this, 9453, &_globals->_player, 0);
+ setAction(&_sequenceManager1, this, 9453, &_globals->_player, NULL);
}
}
}
@@ -959,25 +967,25 @@ void Scene9450::postInit(SceneObjectList *OwnerList) {
_globals->_player.disableControl();
_sceneMode = 9451;
- setAction(&_sequenceManager1, this, 9451, &_globals->_player, 0);
+ setAction(&_sequenceManager1, this, 9451, &_globals->_player, NULL);
if (_globals->getFlag(87)) {
- if (_globals->_inventory._tunic._sceneNumber == 1) {
+ if (RING_INVENTORY._tunic._sceneNumber == 1) {
_object2.signal();
} else {
- _object2.setPosition(Common::Point(184, 144), 0);
+ _object2.setPosition(Common::Point(184, 144));
_object2.setVisage(9451);
- _object2.setPriority2(250);
+ _object2.fixPriority(250);
_object2._strip = 5;
_object2._frame = 10;
}
} else {
_object3.postInit();
_object3.hide();
- _object3.setAction(&_sequenceManager2, 0, 9455, &_object2, &_object1, 0);
+ _object3.setAction(&_sequenceManager2, NULL, 9455, &_object2, &_object1, NULL);
}
- if (_globals->_inventory._tunic._sceneNumber != 1)
+ if (RING_INVENTORY._tunic._sceneNumber != 1)
_hotspot1.setup(123, 139, 138, 170, 9450, 37, -1);
_hotspot2.setup(153, 102, 176, 141, 9450, 39, 40);
@@ -1007,11 +1015,11 @@ void Scene9500::Hotspot1::doAction(int action) {
if (action == OBJECT_SWORD) {
scene->_sceneMode = 9510;
_globals->setFlag(92);
- _globals->_inventory._sword._sceneNumber = 9500;
+ RING_INVENTORY._sword._sceneNumber = 9500;
_globals->_player.disableControl();
_globals->_sceneItems.remove(this);
scene->_hotspot2.setup(87, 294, 104, 314, 9400, 17, -1);
- scene->setAction(&scene->_sequenceManager, scene, 9510, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9510, &_globals->_player, &scene->_object2, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -1024,7 +1032,7 @@ void Scene9500::Hotspot2::doAction(int action) {
scene->_sceneMode = 9511;
_globals->_player.disableControl();
_globals->_sceneItems.remove(this);
- scene->setAction(&scene->_sequenceManager, scene, 9511, &_globals->_player, &scene->_object2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9511, &_globals->_player, &scene->_object2, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -1033,11 +1041,11 @@ void Scene9500::Hotspot2::doAction(int action) {
void Scene9500::Hotspot3::doAction(int action) {
Scene9500 *scene = (Scene9500 *)_globals->_sceneManager._scene;
- if ((action == CURSOR_USE) && (_globals->_inventory._candle._sceneNumber != 1)){
+ if ((action == CURSOR_USE) && (RING_INVENTORY._candle._sceneNumber != 1)){
scene->_sceneMode = 9505;
_globals->_player.disableControl();
_globals->_sceneItems.remove(this);
- scene->setAction(&scene->_sequenceManager, scene, 9505, &_globals->_player, &scene->_candle, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9505, &_globals->_player, &scene->_candle, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -1048,21 +1056,21 @@ void Scene9500::Hotspot4::doAction(int action) {
if (action == OBJECT_CANDLE) {
_globals->_player.disableControl();
- if (_globals->_inventory._straw._sceneNumber == 9500) {
+ if (RING_INVENTORY._straw._sceneNumber == 9500) {
scene->_sceneMode = 9506;
_globals->_sceneItems.remove(&scene->_hotspot5);
_globals->_sceneItems.remove(this);
- scene->setAction(&scene->_sequenceManager, scene, 9506, &_globals->_player, &scene->_object3, 0);
- _globals->_inventory._candle._sceneNumber = 9850;
+ scene->setAction(&scene->_sequenceManager, scene, 9506, &_globals->_player, &scene->_object3, NULL);
+ RING_INVENTORY._candle._sceneNumber = 9850;
} else {
scene->_sceneMode = 9507;
- scene->setAction(&scene->_sequenceManager, scene, 9507, &_globals->_player, &scene->_object3, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9507, &_globals->_player, &scene->_object3, NULL);
}
} else if (action == OBJECT_STRAW) {
scene->_sceneMode = 9512;
_globals->_player.disableControl();
- _globals->_inventory._straw._sceneNumber = 9500;
- scene->setAction(&scene->_sequenceManager, scene, 9512, &_globals->_player, &scene->_object3, 0);
+ RING_INVENTORY._straw._sceneNumber = 9500;
+ scene->setAction(&scene->_sequenceManager, scene, 9512, &_globals->_player, &scene->_object3, NULL);
} else {
NamedHotspot::doAction(action);
}
@@ -1072,13 +1080,14 @@ void Scene9500::signal() {
switch (_sceneMode) {
case 9503:
_globals->_sceneManager.changeScene(9200);
- _globals->_soundHandler.startSound(295, 0, 127);
+ _globals->_soundHandler.startSound(295);
break;
case 9504:
_globals->_sceneManager.changeScene(9850);
break;
case 9505:
_candle.setStrip(2);
+ RING_INVENTORY._candle._sceneNumber = 1;
_globals->_player.enableControl();
break;
case 9506:
@@ -1086,12 +1095,13 @@ void Scene9500::signal() {
_globals->_player.enableControl();
break;
case 9511:
+ RING_INVENTORY._helmet._sceneNumber = 1;
_globals->_player.enableControl();
if (!_globals->getFlag(51)) {
_globals->setFlag(51);
_globals->_player.disableControl();
_sceneMode = 9514;
- setAction(&_sequenceManager, this, 9514, &_globals->_player, 0, 0, 0, 0);
+ setAction(&_sequenceManager, this, 9514, &_globals->_player, NULL, NULL, NULL, NULL);
}
break;
case 0:
@@ -1109,11 +1119,11 @@ void Scene9500::dispatch() {
if (_globals->_player._position.y >= 199) {
_globals->_player.disableControl();
_sceneMode = 9503;
- setAction(&_sequenceManager, this, 9503, &_globals->_player, 0, 0, 0, 0);
+ setAction(&_sequenceManager, this, 9503, &_globals->_player, NULL, NULL, NULL, NULL);
} else if (_globals->_player._position.y < 127) {
_globals->_player.disableControl();
_sceneMode = 9504;
- setAction(&_sequenceManager, this, 9504, &_globals->_player, 0, 0, 0, 0);
+ setAction(&_sequenceManager, this, 9504, &_globals->_player, NULL, NULL, NULL, NULL);
}
}
@@ -1128,21 +1138,21 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
setZoomPercents(110, 75, 200, 150);
_globals->_player.postInit();
- _globals->_soundHandler.startSound(305, 0, 127);
+ _globals->_soundHandler.startSound(305);
- _candle.postInit(0);
+ _candle.postInit();
_candle.setVisage(9500);
_candle.setStrip(1);
_candle.animate(ANIM_MODE_2);
- _candle.setPosition(Common::Point(30, 105), 0);
- if (_globals->_inventory._candle._sceneNumber != 9500)
+ _candle.setPosition(Common::Point(30, 105));
+ if (RING_INVENTORY._candle._sceneNumber != 9500)
_candle.setStrip(2);
- _object3.postInit(0);
+ _object3.postInit();
_object3.hide();
- _object3.setPriority2(150);
+ _object3.fixPriority(150);
_object3.setPosition(Common::Point(166, 133));
- if (_globals->_inventory._straw._sceneNumber == 9500) {
+ if (RING_INVENTORY._straw._sceneNumber == 9500) {
_object3.show();
_object3.setVisage(5);
_object3._strip = 2;
@@ -1151,12 +1161,12 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
if (_globals->getFlag(85)) {
_object3.setVisage(9500);
_object3.setStrip(4);
- _object3.animate(ANIM_MODE_8, 0, 0);
+ _object3.animate(ANIM_MODE_8, 0, NULL);
_object3.setPosition(Common::Point(166, 133));
}
}
- _object2.postInit(0);
+ _object2.postInit();
_object2.hide();
if (_globals->getFlag(92)) {
_object2.show();
@@ -1164,8 +1174,8 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
_object2.setStrip(1);
_object2.setFrame(_object2.getFrameCount());
_object2.setPosition(Common::Point(303, 130));
- _object2.setPriority2(132);
- if (_globals->_inventory._helmet._sceneNumber == 1) {
+ _object2.fixPriority(132);
+ if (RING_INVENTORY._helmet._sceneNumber == 1) {
_hotspot2.setup(87, 294, 104, 314, 9400, 17, -1);
} else {
_object2.setStrip(2);
@@ -1203,16 +1213,16 @@ void Scene9500::postInit(SceneObjectList *OwnerList) {
if ((_globals->_sceneManager._previousScene == 9200) || (_globals->_sceneManager._previousScene != 9850)) {
_sceneMode = 0;
- if (_globals->_inventory._helmet._sceneNumber != 1) {
- setAction(&_sequenceManager, this, 9501, &_globals->_player, &_candle, 0);
+ if (RING_INVENTORY._helmet._sceneNumber != 1) {
+ setAction(&_sequenceManager, this, 9501, &_globals->_player, &_candle, NULL);
} else {
- _globals->_inventory._helmet._sceneNumber = 9500;
+ RING_INVENTORY._helmet._sceneNumber = 9500;
_hotspot2.setup(87, 294, 104, 314, 9400, 17, -1);
- setAction(&_sequenceManager, this, 9513, &_globals->_player, &_object2, 0);
+ setAction(&_sequenceManager, this, 9513, &_globals->_player, &_object2, NULL);
}
} else {
_sceneMode = 0;
- setAction(&_sequenceManager, this, 9502, &_globals->_player, &_candle, 0);
+ setAction(&_sequenceManager, this, 9502, &_globals->_player, &_candle, NULL);
}
}
@@ -1228,34 +1238,35 @@ void Scene9700::signal() {
case 9701:
case 9702:
_gfxButton1.setText(EXIT_MSG);
- _gfxButton1._bounds.centre(50, 190);
+ _gfxButton1._bounds.center(50, 190);
_gfxButton1.draw();
_gfxButton1._bounds.expandPanes();
_globals->_player.enableControl();
- _globals->_player._canWalk = 0;
+ _globals->_player._canWalk = false;
_globals->_events.setCursor(CURSOR_USE);
break;
case 9704:
- _globals->_soundHandler.startSound(323, 0, 127);
+ _globals->_soundHandler.startSound(323);
_globals->_sceneManager.changeScene(9750);
break;
}
}
void Scene9700::process(Event &event) {
- if ((event.eventType == EVENT_BUTTON_DOWN) && (event.kbd.keycode == 0)) {
+ Scene::process(event);
+ if ((event.eventType == EVENT_BUTTON_DOWN) && !_action) {
if (_gfxButton1.process(event)) {
_globals->_sceneManager.changeScene(9200);
} else if (_globals->_events._currentCursor == OBJECT_SCANNER) {
event.handled = true;
- if (_globals->_inventory._helmet._sceneNumber == 1) {
+ if (RING_INVENTORY._helmet._sceneNumber == 1) {
_globals->_player.disableControl();
_sceneMode = 9704;
- setAction(&_sequenceManager, this, 9704, &_globals->_player, &_object1, 0);
+ setAction(&_sequenceManager, this, 9704, &_globals->_player, &_object1, NULL);
} else {
_globals->_player.disableControl();
_sceneMode = 9703;
- setAction(&_sequenceManager, this, 9703, &_globals->_player, &_object1, 0);
+ setAction(&_sequenceManager, this, 9703, &_globals->_player, &_object1, NULL);
}
}
}
@@ -1267,7 +1278,7 @@ void Scene9700::postInit(SceneObjectList *OwnerList) {
_sceneHotspot1.setup(84, 218, 151, 278, 9700, 14, -1);
_sceneHotspot2.setup(89, 11, 151, 121, 9700, 14, -1);
- _sceneHotspot3.setup(69, 119, 138, 218, 9700, 15, 16);
+ _sceneHotspot3.setup(69, 119, 138, 216, 9700, 15, 16);
_sceneHotspot4.setup(34, 13, 88, 116, 9700, 17, -1);
_sceneHotspot5.setup(52, 119, 68, 204, 9700, 17, -1);
_sceneHotspot6.setup(0, 22, 56, 275, 9700, 18, -1);
@@ -1275,15 +1286,15 @@ void Scene9700::postInit(SceneObjectList *OwnerList) {
_object1.postInit();
_object1.hide();
_globals->_player.postInit();
- if (_globals->getFlag(97)) {
+ if (!_globals->getFlag(97)) {
_globals->_player.disableControl();
_sceneMode = 9701;
- setAction(&_sequenceManager, this, 9701, &_globals->_player, &_object1, 0);
+ setAction(&_sequenceManager, this, 9701, &_globals->_player, &_object1, NULL);
_globals->setFlag(97);
} else {
_globals->_player.disableControl();
_sceneMode = 9702;
- setAction(&_sequenceManager, this, 9702, &_globals->_player, &_object1, 0);
+ setAction(&_sequenceManager, this, 9702, &_globals->_player, &_object1, NULL);
}
}
@@ -1319,7 +1330,7 @@ void Scene9750::postInit(SceneObjectList *OwnerList) {
_object2.hide();
_globals->_player.disableControl();
_sceneMode = 9751;
- setAction(&_sequenceManager, this, 9751, &_globals->_player, &_object1, &_object2, 0);
+ setAction(&_sequenceManager, this, 9751, &_globals->_player, &_object1, &_object2, NULL);
}
@@ -1330,9 +1341,9 @@ void Scene9750::postInit(SceneObjectList *OwnerList) {
void Scene9850::Object6::doAction(int action) {
if ((_flags & OBJFLAG_HIDE) == 0) {
if (action == CURSOR_LOOK) {
- SceneItem::display(9850, 27, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9850, 27, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else if (action == CURSOR_USE) {
- _globals->_inventory._scimitar._sceneNumber = 1;
+ RING_INVENTORY._scimitar._sceneNumber = 1;
hide();
} else {
SceneHotspot::doAction(action);
@@ -1342,9 +1353,9 @@ void Scene9850::Object6::doAction(int action) {
void Scene9850::Object7::doAction(int action) {
if ((_flags & OBJFLAG_HIDE) == 0) {
if (action == CURSOR_LOOK) {
- SceneItem::display(9850, 28, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9850, 28, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
} else if (action == CURSOR_USE) {
- _globals->_inventory._sword._sceneNumber = 1;
+ RING_INVENTORY._sword._sceneNumber = 1;
hide();
} else {
SceneHotspot::doAction(action);
@@ -1357,21 +1368,21 @@ void Scene9850::Hotspot12::doAction(int action) {
Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene;
if (action == CURSOR_USE) {
- if (_globals->_inventory._tunic2._sceneNumber != 1) {
- _globals->_inventory._tunic2._sceneNumber = 1;
+ if (RING_INVENTORY._tunic2._sceneNumber != 1) {
+ RING_INVENTORY._tunic2._sceneNumber = 1;
_globals->_player.disableControl();
scene->_sceneMode = 9858;
- setAction(&scene->_sequenceManager, scene, 9858, &_globals->_player, &scene->_objTunic2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9858, &_globals->_player, &scene->_objTunic2, NULL);
} else {
- _globals->_inventory._tunic2._sceneNumber = 9850;
+ RING_INVENTORY._tunic2._sceneNumber = 9850;
_globals->_player.disableControl();
scene->_sceneMode = 9861;
- setAction(&scene->_sequenceManager, scene, 9861, &_globals->_player, &scene->_objTunic2, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9861, &_globals->_player, &scene->_objTunic2, NULL);
}
- } else if ((action != CURSOR_LOOK) || (_globals->_inventory._tunic2._sceneNumber != 1)) {
+ } else if ((action != CURSOR_LOOK) || (RING_INVENTORY._tunic2._sceneNumber != 1)) {
NamedHotspot::doAction(action);
} else {
- SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
}
}
@@ -1379,21 +1390,21 @@ void Scene9850::Hotspot14::doAction(int action) {
Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene;
if (action == CURSOR_USE) {
- if (_globals->_inventory._jacket._sceneNumber != 1) {
- _globals->_inventory._jacket._sceneNumber = 1;
+ if (RING_INVENTORY._jacket._sceneNumber != 1) {
+ RING_INVENTORY._jacket._sceneNumber = 1;
_globals->_player.disableControl();
scene->_sceneMode = 9857;
- setAction(&scene->_sequenceManager, scene, 9857, &_globals->_player, &scene->_objJacket, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9857, &_globals->_player, &scene->_objJacket, NULL);
} else {
- _globals->_inventory._jacket._sceneNumber = 9850;
+ RING_INVENTORY._jacket._sceneNumber = 9850;
_globals->_player.disableControl();
scene->_sceneMode = 9860;
- setAction(&scene->_sequenceManager, scene, 9860, &_globals->_player, &scene->_objJacket, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9860, &_globals->_player, &scene->_objJacket, NULL);
}
- } else if ((action != CURSOR_LOOK) || (_globals->_inventory._jacket._sceneNumber != 1)) {
+ } else if ((action != CURSOR_LOOK) || (RING_INVENTORY._jacket._sceneNumber != 1)) {
NamedHotspot::doAction(action);
} else {
- SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
}
}
@@ -1401,21 +1412,21 @@ void Scene9850::Hotspot16::doAction(int action) {
Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene;
if (action == CURSOR_USE) {
- if (_globals->_inventory._cloak._sceneNumber != 1) {
- _globals->_inventory._cloak._sceneNumber = 1;
+ if (RING_INVENTORY._cloak._sceneNumber != 1) {
+ RING_INVENTORY._cloak._sceneNumber = 1;
_globals->_player.disableControl();
scene->_sceneMode = 9862;
- setAction(&scene->_sequenceManager, scene, 9862, &_globals->_player, &scene->_objCloak, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9862, &_globals->_player, &scene->_objCloak, NULL);
} else {
- _globals->_inventory._cloak._sceneNumber = 9850;
+ RING_INVENTORY._cloak._sceneNumber = 9850;
_globals->_player.disableControl();
scene->_sceneMode = 9859;
- setAction(&scene->_sequenceManager, scene, 9859, &_globals->_player, &scene->_objCloak, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 9859, &_globals->_player, &scene->_objCloak, NULL);
}
- } else if ((action != CURSOR_LOOK) || (_globals->_inventory._cloak._sceneNumber != 1)) {
+ } else if ((action != CURSOR_LOOK) || (RING_INVENTORY._cloak._sceneNumber != 1)) {
NamedHotspot::doAction(action);
} else {
- SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display(9850, 30, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOR, 7, LIST_END);
}
}
@@ -1423,10 +1434,10 @@ void Scene9850::Hotspot17::doAction(int action) {
Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene;
if (action == OBJECT_SCANNER) {
- SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ 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, 0, 127);
+ scene->_soundHandler.startSound(306);
NamedHotspot::doAction(action);
}
}
@@ -1435,10 +1446,10 @@ void Scene9850::Hotspot18::doAction(int action) {
Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene;
if (action == OBJECT_SCANNER) {
- SceneItem::display(9850, 32, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ 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, 0, 127);
+ scene->_soundHandler.startSound(306);
NamedHotspot::doAction(action);
}
}
@@ -1447,10 +1458,10 @@ void Scene9850::Hotspot19::doAction(int action) {
Scene9850 *scene = (Scene9850 *)_globals->_sceneManager._scene;
if (action == OBJECT_SCANNER) {
- SceneItem::display(9850, 31, SET_Y, 20, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ 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, 0, 127);
+ scene->_soundHandler.startSound(313);
NamedHotspot::doAction(action);
}
}
@@ -1462,15 +1473,15 @@ void Scene9850::Hotspot20::doAction(int action) {
if (action == CURSOR_USE) {
_globals->_player.disableControl();
if (scene->_objSword._state == 0) {
- if (_globals->_inventory._scimitar._sceneNumber == 9850)
+ if (RING_INVENTORY._scimitar._sceneNumber == 9850)
scene->_objScimitar.show();
- if (_globals->_inventory._sword._sceneNumber == 9850)
+ if (RING_INVENTORY._sword._sceneNumber == 9850)
scene->_objSword.show();
scene->_sceneMode = 11;
- setAction(&scene->_sequenceManager, scene, 9853, &_globals->_player, &scene->_objDoor, &scene->_objLever, 0);
+ setAction(&scene->_sequenceManager, scene, 9853, &_globals->_player, &scene->_objDoor, &scene->_objLever, NULL);
} else {
scene->_sceneMode = 10;
- setAction(&scene->_sequenceManager, scene, 9854, &_globals->_player, &scene->_objDoor, &scene->_objLever, 0);
+ setAction(&scene->_sequenceManager, scene, 9854, &_globals->_player, &scene->_objDoor, &scene->_objLever, NULL);
}
scene->_objSword._state ^= 1;
} else {
@@ -1482,9 +1493,9 @@ void Scene9850::signal() {
switch (_sceneMode ++) {
case 10:
// Hidden closet closed
- if (_globals->_inventory._scimitar._sceneNumber == 9850)
+ if (RING_INVENTORY._scimitar._sceneNumber == 9850)
_objScimitar.hide();
- if (_globals->_inventory._sword._sceneNumber == 9850)
+ if (RING_INVENTORY._sword._sceneNumber == 9850)
_objSword.hide();
_globals->_sceneItems.remove(&_objScimitar);
_globals->_sceneItems.remove(&_objSword);
@@ -1493,15 +1504,15 @@ void Scene9850::signal() {
break;
case 11:
// Hidden closet opened
- if (_globals->_inventory._scimitar._sceneNumber == 9850)
+ if (RING_INVENTORY._scimitar._sceneNumber == 9850)
_globals->_sceneItems.addItems(&_objScimitar, NULL);
- if (_globals->_inventory._sword._sceneNumber == 9850)
+ if (RING_INVENTORY._sword._sceneNumber == 9850)
_globals->_sceneItems.addItems(&_objSword, NULL);
_globals->_sceneItems.remove(&_hotspot19);
_globals->_player.enableControl();
break;
case 9500:
- _globals->_sceneManager.changeScene(9500);
+ _globals->_sceneManager.changeScene(_sceneMode - 1);
break;
case 0:
default:
@@ -1517,10 +1528,10 @@ void Scene9850::process(Event &event) {
_globals->_player.disableControl();
if (_objSword._state == 0) {
_sceneMode = 0;
- setAction(&_sequenceManager, this, 9853, &_objLever, &_objDoor, &_objScimitar, &_objSword, 0);
+ setAction(&_sequenceManager, this, 9853, &_objLever, &_objDoor, &_objScimitar, &_objSword, NULL);
} else {
_sceneMode = 10;
- setAction(&_sequenceManager, this, 9854, &_objLever, &_objDoor, &_objScimitar, &_objSword, 0);
+ setAction(&_sequenceManager, this, 9854, &_objLever, &_objDoor, &_objScimitar, &_objSword, NULL);
}
_objSword._state ^= 1;
}
@@ -1532,7 +1543,7 @@ void Scene9850::dispatch() {
} else if (_globals->_player._position.y >= 198) {
_globals->_player.disableControl();
_sceneMode = 9500;
- setAction(&_sequenceManager, this, 9852, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9852, &_globals->_player, NULL);
}
}
@@ -1544,59 +1555,59 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_objDoor.setVisage(9850);
_objDoor.setStrip(1);
_objDoor.setFrame(1);
- _objDoor.setPosition(Common::Point(28, 118), 0);
- _objDoor.setPriority2(90);
+ _objDoor.setPosition(Common::Point(28, 118));
+ _objDoor.fixPriority(90);
_objLever.postInit();
_objLever.setVisage(9850);
_objLever.setStrip(4);
_objLever.setFrame(1);
- _objLever.setPosition(Common::Point(256, 35), 0);
+ _objLever.setPosition(Common::Point(256, 35));
_objCloak.postInit();
_objCloak.setVisage(9850);
_objCloak.setStrip(5);
_objCloak.setFrame(1);
- _objCloak.setPriority2(90);
- _objCloak.setPosition(Common::Point(157, 81), 0);
- if (_globals->_inventory._cloak._sceneNumber != 9850)
+ _objCloak.fixPriority(90);
+ _objCloak.setPosition(Common::Point(157, 81));
+ if (RING_INVENTORY._cloak._sceneNumber != 9850)
_objCloak.hide();
_objJacket.postInit();
_objJacket.setVisage(9850);
_objJacket.setStrip(5);
_objJacket.setFrame(2);
- _objJacket.setPriority2(90);
+ _objJacket.fixPriority(90);
_objJacket.setPosition(Common::Point(201, 84));
- if (_globals->_inventory._jacket._sceneNumber != 9850)
+ if (RING_INVENTORY._jacket._sceneNumber != 9850)
_objJacket.hide();
_objTunic2.postInit();
_objTunic2.setVisage(9850);
_objTunic2.setStrip(5);
_objTunic2.setFrame(3);
- _objTunic2.setPriority2(90);
+ _objTunic2.fixPriority(90);
_objTunic2.setPosition(Common::Point(295, 90));
- if (_globals->_inventory._tunic2._sceneNumber != 9850)
+ if (RING_INVENTORY._tunic2._sceneNumber != 9850)
_objTunic2.hide();
- if (_globals->_inventory._scimitar._sceneNumber == 9850) {
+ if (RING_INVENTORY._scimitar._sceneNumber == 9850) {
_objScimitar.postInit();
_objScimitar.setVisage(9850);
_objScimitar.setStrip(2);
_objScimitar.setFrame(1);
- _objScimitar.setPosition(Common::Point(55, 83), 0);
- _objScimitar.setPriority2(80);
+ _objScimitar.setPosition(Common::Point(55, 83));
+ _objScimitar.fixPriority(80);
_objScimitar.hide();
}
- if (_globals->_inventory._sword._sceneNumber == 9850) {
+ if (RING_INVENTORY._sword._sceneNumber == 9850) {
_objSword.postInit();
_objSword.setVisage(9850);
_objSword.setStrip(3);
_objSword.setFrame(1);
- _objSword.setPosition(Common::Point(56, 101), 0);
- _objSword.setPriority2(80);
+ _objSword.setPosition(Common::Point(56, 101));
+ _objSword.fixPriority(80);
_objSword.hide();
}
@@ -1624,7 +1635,7 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
_globals->_player.postInit();
_globals->_player.disableControl();
_sceneMode = 0;
- setAction(&_sequenceManager, this, 9851, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 9851, &_globals->_player, NULL);
}
/*--------------------------------------------------------------------------
@@ -1632,38 +1643,38 @@ void Scene9850::postInit(SceneObjectList *OwnerList) {
*
*--------------------------------------------------------------------------*/
void Scene9900::strAction1::signal() {
- RGB8 mask1, mask2;
- mask1.r = mask1.g = mask1.b = 0xff;
- mask2.r = mask2.g = mask2.b = 0;
+ const byte mask1[3] = {0xff, 0xff, 0xff};
+ const byte mask2[3] = {0, 0, 0};
Scene9900 *scene = (Scene9900 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
case 0:
- scene->_soundHandler.startSound(351, 0, 127);
+ scene->_soundHandler.startSound(351);
_object9.postInit();
_object9.setVisage(18);
_object9._frame = 1;
_object9._strip = 6;
+ _object9.fixPriority(250);
_object9.setPosition(Common::Point(171, 59));
- _object9.animate(ANIM_MODE_5, 0);
+ _object9.animate(ANIM_MODE_5, NULL);
_globals->_scenePalette.addRotation(67, 111, 1, 1, this);
scene->_object2.hide();
break;
case 1:
_palette1.getPalette();
- _globals->_scenePalette.addUnkPal(&mask1, 1, true /*10*/, this);
+ _globals->_scenePalette.addFader(&mask1[0], 1, 10, this);
break;
case 2:
_object9.remove();
- _globals->_scenePalette.addUnkPal(&mask2, 1, true /*5*/, this);
+ _globals->_scenePalette.addFader(&mask2[0], 1, 5, this);
break;
case 3:
- _globals->_soundHandler.startSound(377, 0, 127);
+ _globals->_soundHandler.startSound(377);
setDelay(120);
break;
case 4:
- _globals->_scenePalette.addUnkPal(_palette1._palette, 256, 1, this);
+ _globals->_scenePalette.addFader(_palette1._palette, 256, 1, this);
break;
case 5:
remove();
@@ -1676,57 +1687,58 @@ void Scene9900::strAction1::signal() {
void Scene9900::strAction2::signal() {
switch (_actionIndex++) {
case 0:
- var1 = 0;
+ _lineNum = 0;
_txtArray1Index = 0;
_txtArray1[0]._position.y = 200;
- _txtArray1[0]._position.y = 300;
+ _txtArray1[1]._position.y = 300;
_txtArray2[0]._position.y = 400;
- _txtArray2[0]._position.y = 500;
- var3 = 0;
+ _txtArray2[1]._position.y = 500;
+ _var3 = 0;
// No break on purpose
case 1: {
- Common::String msg = _vm->_dataManager->getMessage(8030, var1++);
- if (!msg.compareTo("LASTCREDIT")) {
- if (var3 == 0) {
+ Common::String msg = _resourceManager->getMessage(8030, _lineNum++);
+ if (msg.compareTo("LASTCREDIT")) {
+ if (_var3) {
// Not used?
// int x = _txtArray1[_txtArray1Index].getFrame().getBounds().height();
_txtArray1[_txtArray1Index]._moveDiff.y = 10;
NpcMover *mover = new NpcMover();
- Common::Point pt(_txtArray1[_txtArray1Index]._moveDiff.x, -100);
- _txtArray1[_txtArray1Index].addMover(mover, &pt, 0);
+ Common::Point pt(_txtArray1[_txtArray1Index]._position.x, -100);
+ _txtArray1[_txtArray1Index].addMover(mover, &pt, NULL);
// Not used?
// int x = _txtArray2[_txtArray1Index].getFrame().getBounds().height();
_txtArray2[_txtArray1Index]._moveDiff.y = 10;
_txtArray1Index = (_txtArray1Index + 1) % 2;
}
- var3 = 1;
- _txtArray1[_txtArray1Index]._textMode = ALIGN_CENTRE;
+ _var3 = 1;
+ _txtArray1[_txtArray1Index]._textMode = ALIGN_CENTER;
_txtArray1[_txtArray1Index]._width = 240;
_txtArray1[_txtArray1Index]._fontNumber = 2;
- _txtArray1[_txtArray1Index]._colour1 = 7;
+ _txtArray1[_txtArray1Index]._color1 = 7;
_txtArray1[_txtArray1Index].setup(msg);
- _txtArray1[_txtArray1Index]._field7A = 20;
+ _txtArray1[_txtArray1Index]._moveRate = 20;
_txtArray1[_txtArray1Index]._moveDiff.y = 2;
- _txtArray1[_txtArray1Index].setPriority2(255);
+ _txtArray1[_txtArray1Index].fixPriority(255);
int frameWidth = _txtArray1[_txtArray1Index].getFrame().getBounds().width();
int frameHeight = _txtArray1[_txtArray1Index].getFrame().getBounds().height();
_txtArray1[_txtArray1Index].setPosition(Common::Point((320 - frameWidth) / 2, 200));
+
NpcMover *mover2 = new NpcMover();
Common::Point pt2(_txtArray1[_txtArray1Index]._position.x, 100);
- _txtArray1[_txtArray1Index].addMover(mover2, &pt2, 0);
+ _txtArray1[_txtArray1Index].addMover(mover2, &pt2, this);
- _txtArray2[_txtArray1Index]._textMode = ALIGN_CENTRE;
+ _txtArray2[_txtArray1Index]._textMode = ALIGN_CENTER;
_txtArray2[_txtArray1Index]._width = 240;
_txtArray2[_txtArray1Index]._fontNumber = 2;
- _txtArray2[_txtArray1Index]._colour1 = 23;
+ _txtArray2[_txtArray1Index]._color1 = 23;
- msg = _vm->_dataManager->getMessage(8030, var1++);
+ msg = _resourceManager->getMessage(8030, _lineNum++);
_txtArray2[_txtArray1Index].setup(msg);
- _txtArray2[_txtArray1Index]._field7A = 20;
+ _txtArray2[_txtArray1Index]._moveRate = 20;
_txtArray2[_txtArray1Index]._moveDiff.y = 2;
- _txtArray2[_txtArray1Index].setPriority2(255);
+ _txtArray2[_txtArray1Index].fixPriority(255);
frameWidth = _txtArray2[_txtArray1Index].getFrame().getBounds().width();
_txtArray2[_txtArray1Index].setPosition(Common::Point((320 - frameWidth) / 2, 200 + frameHeight));
} else {
@@ -1769,29 +1781,28 @@ void Scene9900::strAction2::dispatch() {
}
void Scene9900::strAction3::signal() {
- RGB8 mask3, mask4;
- mask3.r = 0xff; mask3.g = mask3.b = 0;
- mask4.r = mask4.g = mask4.b = 0;
+ const byte mask3[3] = {0xff, 0, 0};
+ const byte mask4[3] = {0, 0, 0};
switch (_actionIndex++) {
case 0:
_palette2.getPalette();
_palette3.loadPalette(2003);
- _globals->_scenePalette.addUnkPal(_palette3._palette, 256, true /*5*/, this);
+ _globals->_scenePalette.addFader(_palette3._palette, 256, 5, this);
break;
case 1:
- _globals->_scenePalette.addUnkPal(&mask3, 1, true /*10*/, this);
+ _globals->_scenePalette.addFader(&mask3[0], 1, 10, this);
break;
case 2:
- _globals->_scenePalette.addUnkPal(&mask4, 1, true /*1*/, this);
+ _globals->_scenePalette.addFader(&mask4[0], 1, 1, this);
break;
case 3:
_palette2.loadPalette(17);
_globals->_sceneManager._scene->loadScene(17);
- _globals->_scenePalette.addUnkPal(_palette2._palette, 256, true /*5*/, this);
+ _globals->_scenePalette.addFader(_palette2._palette, 256, 5, this);
break;
case 4:
- _globals->_game.endGame(9900, 61);
+ _globals->_game->endGame(9900, 61);
remove();
default:
break;
@@ -1808,35 +1819,35 @@ void Scene9900::signal() {
_object6.hide();
}
- _object1.animate(ANIM_MODE_NONE, 0);
- _object2.animate(ANIM_MODE_NONE, 0);
- _object3.animate(ANIM_MODE_NONE, 0);
- _object4.animate(ANIM_MODE_NONE, 0);
- _object5.animate(ANIM_MODE_NONE, 0);
- _object6.animate(ANIM_MODE_NONE, 0);
+ _object1.animate(ANIM_MODE_NONE, NULL);
+ _object2.animate(ANIM_MODE_NONE, NULL);
+ _object3.animate(ANIM_MODE_NONE, NULL);
+ _object4.animate(ANIM_MODE_NONE, NULL);
+ _object5.animate(ANIM_MODE_NONE, NULL);
+ _object6.animate(ANIM_MODE_NONE, NULL);
- _object1.setObjectWrapper(0);
- _object2.setObjectWrapper(0);
- _object3.setObjectWrapper(0);
- _object4.setObjectWrapper(0);
- _object5.setObjectWrapper(0);
- _object6.setObjectWrapper(0);
+ _object1.setObjectWrapper(NULL);
+ _object2.setObjectWrapper(NULL);
+ _object3.setObjectWrapper(NULL);
+ _object4.setObjectWrapper(NULL);
+ _object5.setObjectWrapper(NULL);
+ _object6.setObjectWrapper(NULL);
- _object1.addMover(0);
- _object2.addMover(0);
- _object3.addMover(0);
- _object4.addMover(0);
- _object5.addMover(0);
- _object6.addMover(0);
+ _object1.addMover(NULL);
+ _object2.addMover(NULL);
+ _object3.addMover(NULL);
+ _object4.addMover(NULL);
+ _object5.addMover(NULL);
+ _object6.addMover(NULL);
switch (_sceneMode){
case 150:
- _globals->_soundHandler.startSound(380, 0, 127);
- _object8.postInit(0);
+ _globals->_soundHandler.startSound(380);
+ _object8.postInit();
_object8.setVisage(2002);
_object8.setStrip(1);
_object8.setFrame(1);
- _object8.setPriority2(200);
+ _object8.fixPriority(200);
_object8.setPosition(Common::Point(64, 199));
_globals->_player.disableControl();
_sceneMode = 9908;
@@ -1844,7 +1855,7 @@ void Scene9900::signal() {
break;
case 162:
warning("TBC: shutdown();");
- _globals->_game.quitGame();
+ _globals->_game->quitGame();
break;
case 9901:
_globals->_player.disableControl();
@@ -1864,7 +1875,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9902, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break;
case 9904:
- _globals->_soundHandler.startSound(390, 0, 127);
+ _globals->_soundHandler.startSound(390);
_sceneMode = 9912;
setAction(&_strAction2, this);
break;
@@ -1895,7 +1906,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9904, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break;
case 9909:
- _globals->_soundHandler.startSound(375, 0, 127);
+ _globals->_soundHandler.startSound(375);
_globals->_player.disableControl();
_sceneMode = 9907;
setAction(&_sequenceManager, this, 9907, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
@@ -1906,7 +1917,7 @@ void Scene9900::signal() {
setAction(&_sequenceManager, this, 9911, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
break;
case 9911:
- _globals->_soundHandler.startSound(367, 0, 127);
+ _globals->_soundHandler.startSound(367);
_globals->_player.disableControl();
_sceneMode = 9909;
setAction(&_sequenceManager, this, 9909, &_object1, &_object2, &_object3, &_object4, &_object5, &_object6);
@@ -1932,10 +1943,10 @@ void Scene9900::process(Event &event) {
if (event.handled)
return;
Scene::process(event);
- if (_sceneMode != 9906) {
+ if (_sceneMode == 9906) {
if ((event.eventType == EVENT_BUTTON_DOWN) && (_globals->_events.getCursor() == OBJECT_ITEMS)) {
_object8._state = 1;
- _globals->_inventory._items._sceneNumber = 9900;
+ RING_INVENTORY._items._sceneNumber = 9900;
_globals->_events.setCursor(CURSOR_USE);
}
}
@@ -1947,25 +1958,25 @@ void Scene9900::dispatch() {
}
void Scene9900::postInit(SceneObjectList *OwnerList) {
- _object1.postInit(0);
+ _object1.postInit();
_object1.hide();
- _object2.postInit(0);
+ _object2.postInit();
_object2.hide();
- _object3.postInit(0);
+ _object3.postInit();
_object3.hide();
- _object4.postInit(0);
+ _object4.postInit();
_object4.hide();
- _object5.postInit(0);
+ _object5.postInit();
_object5.hide();
- _object6.postInit(0);
+ _object6.postInit();
_object6.hide();
_object8._state = 0;
- _globals->_inventory._concentrator._sceneNumber = 9900;
- _globals->_inventory._items._rlbNum = 3;
- _globals->_inventory._items._cursorNum = 6;
- _globals->_inventory._items._description = Common::String("One of the items from the stasis ship. The other is on the Lance's bridge.");
+ RING_INVENTORY._concentrator._sceneNumber = 9900;
+ RING_INVENTORY._items._rlbNum = 3;
+ RING_INVENTORY._items._cursorNum = 6;
+ RING_INVENTORY._items._description = Common::String("One of the items from the stasis ship. The other is on the Lance's bridge.");
_stripManager.addSpeaker(&_speakerMR);
_globals->_player.disableControl();
@@ -1999,7 +2010,7 @@ void Scene9999::Action2::signal() {
setDelay(10);
break;
case 1:
- SceneItem::display(9999, 0, SET_Y, 10, SET_X, 30, SET_FONT, 2, SET_BG_COLOUR, -1, SET_EXT_BGCOLOUR, 23, SET_WIDTH, 260, SET_KEEP_ONSCREEN, 1, LIST_END);
+ SceneItem::display(9999, 0, SET_Y, 10, SET_X, 30, SET_FONT, 2, SET_BG_COLOR, -1, SET_EXT_BGCOLOR, 23, SET_WIDTH, 260, SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(300);
break;
case 2:
@@ -2018,29 +2029,29 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {
_object1.postInit();
_object1.setVisage(1303);
_object1.setStrip2(3);
- _object1.setPosition(Common::Point(160, 152), 0);
+ _object1.setPosition(Common::Point(160, 152));
_globals->_player.postInit();
_globals->_player.setVisage(1303);
_globals->_player.setStrip2(1);
- _globals->_player.setPriority2(250);
- _globals->_player.animate(ANIM_MODE_2, 0);
- _globals->_player.setPosition(Common::Point(194, 98), 0);
+ _globals->_player.fixPriority(250);
+ _globals->_player.animate(ANIM_MODE_2, NULL);
+ _globals->_player.setPosition(Common::Point(194, 98));
_globals->_player._numFrames = 20;
_globals->_player.disableControl();
_object2.postInit();
_object2.setVisage(1303);
_object2.setStrip2(2);
- _object2.setPriority2(2);
- _object2.setPosition(Common::Point(164, 149), 0);
+ _object2.fixPriority(2);
+ _object2.setPosition(Common::Point(164, 149));
_object3.postInit();
_object3.setVisage(1303);
_object3.setStrip2(2);
- _object3.setPriority2(2);
+ _object3.fixPriority(2);
_object3.setFrame(2);
- _object3.setPosition(Common::Point(292, 149), 0);
+ _object3.setPosition(Common::Point(292, 149));
_object3.setAction(&_action3);
if (_globals->_sceneManager._previousScene == 3500)
@@ -2048,7 +2059,7 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {
else
setAction(&_action1);
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
@@ -2057,7 +2068,7 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {
else
_globals->_stripNum = 2121;
- _globals->_soundHandler.startSound(118, 0, 127);
+ _globals->_soundHandler.startSound(118);
}
diff --git a/engines/tsage/ringworld_scenes10.h b/engines/tsage/ringworld_scenes10.h
index a89456e39d..93987aa64b 100644
--- a/engines/tsage/ringworld_scenes10.h
+++ b/engines/tsage/ringworld_scenes10.h
@@ -39,8 +39,8 @@ class SceneObject9150 : public SceneObject {
public:
int _timer, _signalFlag;
- virtual void synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsSint16LE(_timer);
s.syncAsSint16LE(_signalFlag);
}
@@ -52,8 +52,8 @@ public :
int _sceneState;
Scene2();
- virtual void synchronise(Serialiser &s) {
- Scene::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ Scene::synchronize(s);
s.syncAsSint16LE(_sceneState);
}
};
@@ -467,7 +467,7 @@ class Scene9900 : public Scene {
public:
SceneText _txtArray1[2];
SceneText _txtArray2[2];
- int var1, _txtArray1Index, var3;
+ int _lineNum, _txtArray1Index, _var3;
virtual void signal();
virtual void dispatch();
@@ -482,17 +482,6 @@ class Scene9900 : public Scene {
virtual void signal();
};
- class SceneTextArr1 {
- public:
- SceneText _sceneText[2];
- };
-
- class SceneTextArr2 {
- public:
- SceneText _sceneText[2];
- int _var1, var2, var3;
- };
-
public:
SoundHandler _soundHandler;
SequenceManager _sequenceManager;
diff --git a/engines/tsage/ringworld_scenes2.cpp b/engines/tsage/ringworld_scenes2.cpp
index 8d95460615..6a8db81adf 100644
--- a/engines/tsage/ringworld_scenes2.cpp
+++ b/engines/tsage/ringworld_scenes2.cpp
@@ -23,6 +23,7 @@
*
*/
+#include "common/config-manager.h"
#include "tsage/ringworld_scenes2.h"
#include "tsage/scenes.h"
#include "tsage/tsage.h"
@@ -76,8 +77,8 @@ void Scene1000::Action2::signal() {
setDelay(10);
break;
case 1:
- SceneItem::display(1000, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOUR, -1,
- SET_EXT_BGCOLOUR, 35, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END);
+ SceneItem::display(1000, 0, SET_Y, 20, SET_FONT, 2, SET_BG_COLOR, -1,
+ SET_EXT_BGCOLOR, 35, SET_WIDTH, 200, SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(180);
break;
case 2:
@@ -112,28 +113,25 @@ void Scene1000::Action3::signal() {
setDelay(240);
break;
case 5: {
- // Intro.txt file presence is used to allow user option to skip the introduction
- _globals->_player.enableControl();
- Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading("Intro.txt");
- if (!in) {
- // File not present, so create it
- Common::OutSaveFile *out = g_system->getSavefileManager()->openForSaving("Intro.txt");
- out->finalize();
- delete out;
+ const char *SEEN_INTRO = "seen_intro";
+ if (!ConfMan.hasKey(SEEN_INTRO) || !ConfMan.getBool(SEEN_INTRO)) {
+ // First time being played, so show the introduction
+ ConfMan.setBool(SEEN_INTRO, true);
+ ConfMan.flushToDisk();
setDelay(1);
} else {
- delete in;
-
// Prompt user for whether to start play or watch introduction
+ _globals->_player.enableControl();
+
if (MessageDialog::show2(WATCH_INTRO_MSG, START_PLAY_BTN_STRING, INTRODUCTION_BTN_STRING) == 0) {
_actionIndex = 20;
_globals->_soundHandler.proc1(this);
} else {
setDelay(1);
}
-
- _globals->_player.disableControl();
}
+
+ _globals->_player.disableControl();
break;
}
case 6: {
@@ -266,7 +264,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
setAction(&_action2);
- _globals->_sceneManager._scene->_sceneBounds.centre(_object1._position.x, _object1._position.y);
+ _globals->_sceneManager._scene->_sceneBounds.center(_object1._position.x, _object1._position.y);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
@@ -280,7 +278,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
_object1._moveDiff = Common::Point(2, 2);
_object1.setPosition(Common::Point(120, 180));
- _globals->_sceneManager._scene->_sceneBounds.centre(_object1._position.x, _object1._position.y);
+ _globals->_sceneManager._scene->_sceneBounds.center(_object1._position.x, _object1._position.y);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
@@ -301,7 +299,7 @@ void Scene1000::postInit(SceneObjectList *OwnerList) {
_globals->_player.hide();
_globals->_player.disableControl();
- _globals->_sceneManager._scene->_sceneBounds.centre(_object3._position.x, _object3._position.y);
+ _globals->_sceneManager._scene->_sceneBounds.center(_object3._position.x, _object3._position.y);
setAction(&_action3);
}
@@ -439,7 +437,7 @@ void Scene1001::Action1::signal() {
scene->_object6.setStrip2(6);
scene->_object6.setFrame2(2);
scene->_object6._moveDiff = Common::Point(20, 20);
- scene->_object6.setPriority2(20);
+ scene->_object6.fixPriority(20);
scene->_object6.setPosition(Common::Point(scene->_object2._position.x - 6, scene->_object2._position.y + 7));
scene->_object6.animate(ANIM_MODE_5, NULL);
@@ -458,7 +456,7 @@ void Scene1001::Action1::signal() {
scene->_object7.setFrame2(1);
scene->_object7._moveDiff = Common::Point(20, 20);
scene->_object7.setPosition(Common::Point(scene->_object3._position.x - 28, scene->_object3._position.y - 11));
- scene->_object7.setPriority2(200);
+ scene->_object7.fixPriority(200);
scene->_object7.animate(ANIM_MODE_5, NULL);
Common::Point pt(scene->_object7._position.x - 70, scene->_object7._position.y - 70);
@@ -473,7 +471,7 @@ void Scene1001::Action1::signal() {
scene->_object5.setVisage(16);
scene->_object5.setPosition(Common::Point(306, 93));
scene->_object5._strip = 3;
- scene->_object5.setPriority2(200);
+ scene->_object5.fixPriority(200);
scene->_object5.animate(ANIM_MODE_2, NULL);
setDelay(30);
break;
@@ -521,7 +519,7 @@ void Scene1001::postInit(SceneObjectList *OwnerList) {
_stripManager.addSpeaker(&_speakerCText);
_stripManager.addSpeaker(&_speakerCR);
_stripManager.addSpeaker(&_speakerSL);
- _speakerQText._colour1 = 11;
+ _speakerQText._color1 = 11;
_object3.postInit();
_object3.setVisage(16);
@@ -638,7 +636,7 @@ void Scene1250::postInit(SceneObjectList *OwnerList) {
_object2.setVisage(1250);
_object2.setPosition(Common::Point(126, 69));
_object2.setStrip2(2);
- _object2.setPriority2(255);
+ _object2.fixPriority(255);
_object2._frame = 1;
_object2.setAction(&_action2);
@@ -666,7 +664,7 @@ void Scene1400::Action1::signal() {
setDelay(5);
break;
case 1: {
- SceneItem::display(1400, 0, SET_X, 120, SET_Y, 610, SET_FONT, 2, SET_EXT_BGCOLOUR, 23, SET_KEEP_ONSCREEN, -1, LIST_END);
+ SceneItem::display(1400, 0, SET_X, 120, SET_Y, 610, SET_FONT, 2, SET_EXT_BGCOLOR, 23, SET_KEEP_ONSCREEN, -1, LIST_END);
Common::Point pt(160, 700);
NpcMover *mover = new NpcMover();
@@ -687,7 +685,7 @@ void Scene1400::Action1::signal() {
}
case 3:
SceneItem::display(1400, 2, SET_X, 60, SET_Y, _globals->_sceneManager._scene->_sceneBounds.bottom - 80,
- SET_FONT, 2, SET_FG_COLOUR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
+ SET_FONT, 2, SET_FG_COLOR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
setDelay(420);
break;
case 4:
@@ -696,7 +694,7 @@ void Scene1400::Action1::signal() {
break;
case 5:
SceneItem::display(1400, 3, SET_X, 60, SET_Y, _globals->_sceneManager._scene->_sceneBounds.bottom - 80,
- SET_FONT, 2, SET_FG_COLOUR, 23, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
+ SET_FONT, 2, SET_FG_COLOR, 23, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
setDelay(360);
break;
case 6:
@@ -722,7 +720,7 @@ void Scene1400::Action1::signal() {
_globals->_player.animate(ANIM_MODE_2, NULL);
SceneItem::display(1400, 4, SET_X, 30, SET_Y, _globals->_player._position.y + 10, SET_FONT, 2,
- SET_FG_COLOUR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
+ SET_FG_COLOR, 13, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, -1, LIST_END);
setDelay(300);
break;
case 9: {
@@ -771,12 +769,12 @@ void Scene1400::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(1401);
_globals->_player.animate(ANIM_MODE_2, 0);
_globals->_player.setStrip2(4);
- _globals->_player.setPriority2(4);
+ _globals->_player.fixPriority(4);
_globals->_player.disableControl();
_globals->_player._moveDiff = Common::Point(4, 2);
_globals->_player.setPosition(Common::Point(160, 800));
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.y = (_globals->_sceneManager._scene->_sceneBounds.top / 100) * 100;
@@ -874,7 +872,7 @@ void Scene1500::Action2::signal() {
case 1: {
scene->_object2.postInit();
scene->_object2.setVisage(1502);
- scene->_object2.setPriority2(255);
+ scene->_object2.fixPriority(255);
scene->_object2.changeZoom(5);
scene->_object2._frame = 1;
scene->_object2._moveDiff = Common::Point(1, 1);
@@ -897,7 +895,7 @@ void Scene1500::Action2::signal() {
case 3:
scene->_soundHandler.proc4();
_globals->_stripNum = 1505;
- _globals->_sceneManager.changeScene(1505);
+ _globals->_sceneManager.changeScene(2400);
break;
}
}
diff --git a/engines/tsage/ringworld_scenes3.cpp b/engines/tsage/ringworld_scenes3.cpp
index b37b156907..f788f9a28b 100644
--- a/engines/tsage/ringworld_scenes3.cpp
+++ b/engines/tsage/ringworld_scenes3.cpp
@@ -226,8 +226,8 @@ void Scene2000::Action10::signal() {
error("Old stuff");
break;
case 2:
- SceneItem::display(2000, 17, SET_Y, 20, SET_X, 110, SET_FONT, 2, SET_BG_COLOUR, -1,
- SET_FG_COLOUR, 17, SET_WIDTH, 200, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, 1, LIST_END);
+ SceneItem::display(2000, 17, SET_Y, 20, SET_X, 110, SET_FONT, 2, SET_BG_COLOR, -1,
+ SET_FG_COLOR, 17, SET_WIDTH, 200, SET_POS_MODE, 0, SET_KEEP_ONSCREEN, 1, LIST_END);
break;
case 3:
SceneItem::display(0, 0);
@@ -405,7 +405,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
_object9.setStrip2(3);
_object9.setFrame(4);
_object9.setPosition(Common::Point(136, 86));
- _object9.setPriority2(190);
+ _object9.fixPriority(190);
_object9.hide();
_object10.postInit();
@@ -413,7 +413,7 @@ void Scene2000::postInit(SceneObjectList *OwnerList) {
_object10.setStrip2(5);
_object10.setFrame(4);
_object10.setPosition(Common::Point(202, 86));
- _object10.setPriority2(195);
+ _object10.fixPriority(195);
_object10.hide();
switch (_globals->_sceneManager._previousScene) {
@@ -519,7 +519,7 @@ void Scene2100::Action1::signal() {
setDelay(3);
break;
case 5:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
scene->_area1.display();
scene->_area2.display();
scene->_area3.display();
@@ -578,7 +578,7 @@ void Scene2100::Action1::signal() {
}
break;
case 7:
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
@@ -684,6 +684,7 @@ void Scene2100::Action5::signal() {
}
void Scene2100::Action6::signal() {
+ // Seeker stands up and walks to the elevator
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -699,14 +700,14 @@ void Scene2100::Action6::signal() {
Common::Point pt(130, 116);
NpcMover *mover = new NpcMover();
- scene->_object2.addMover(mover, &pt, NULL);
+ scene->_object2.addMover(mover, &pt, this);
break;
}
case 1: {
- scene->_object2.setPriority2(-1);
+ scene->_object2.fixPriority(-1);
Common::Point pt(153, 67);
NpcMover *mover = new NpcMover();
- scene->_object2.addMover(mover, &pt, NULL);
+ scene->_object2.addMover(mover, &pt, this);
break;
}
case 2:
@@ -752,10 +753,10 @@ void Scene2100::Action8::signal() {
}
case 3:
_globals->_player.checkAngle(&scene->_object3);
- scene->_stripManager.start((_globals->_inventory._translator._sceneNumber == 1) ? 7720 : 7710, this);
+ scene->_stripManager.start((RING_INVENTORY._translator._sceneNumber == 1) ? 7720 : 7710, this);
break;
case 4:
- if (_globals->_inventory._translator._sceneNumber != 1)
+ if (RING_INVENTORY._translator._sceneNumber != 1)
_globals->_sceneManager.changeScene(7600);
else {
_globals->setFlag(24);
@@ -835,7 +836,7 @@ void Scene2100::Action10::signal() {
scene->_object3.setVisage(2705);
scene->_object3.setStrip2(-1);
scene->_object3.changeZoom(-1);
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
scene->_object3.setPosition(Common::Point(260, 156));
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.animate(ANIM_MODE_1, NULL);
@@ -852,30 +853,30 @@ void Scene2100::Action10::signal() {
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 6: {
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
Common::Point pt(144, 54);
NpcMover *mover = new NpcMover();
_globals->_player.addMover(mover, &pt, this);
break;
}
case 7: {
- scene->_object3.setPriority2(2);
+ scene->_object3.fixPriority(2);
Common::Point pt1(163, 55);
NpcMover *mover1 = new NpcMover();
scene->_object3.addMover(mover1, &pt1, NULL);
- scene->_object2.setPriority2(2);
+ scene->_object2.fixPriority(2);
Common::Point pt2(158, 55);
NpcMover *mover2 = new NpcMover();
scene->_object2.addMover(mover2, &pt2, this);
break;
}
case 8:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setStrip(1);
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
scene->_object3.setStrip(2);
- scene->_object2.setPriority2(2);
+ scene->_object2.fixPriority(2);
scene->_object2.setStrip(3);
setDelay(45);
@@ -893,6 +894,7 @@ void Scene2100::Action10::signal() {
}
void Scene2100::Action11::signal() {
+ // Miranda stands up and walks to the elevator
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -911,7 +913,7 @@ void Scene2100::Action11::signal() {
scene->_object3.setVisage(2705);
scene->_object3.setStrip2(-1);
scene->_object3.changeZoom(-1);
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
scene->_object3.setPosition(Common::Point(260, 156));
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.animate(ANIM_MODE_1, NULL);
@@ -928,12 +930,12 @@ void Scene2100::Action11::signal() {
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 4: {
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
Common::Point pt1(163, 55);
NpcMover *mover1 = new NpcMover();
scene->_object3.addMover(mover1, &pt1, NULL);
- scene->_object2.setPriority2(1);
+ scene->_object2.fixPriority(1);
Common::Point pt2(158, 55);
NpcMover *mover2 = new NpcMover();
scene->_object2.addMover(mover2, &pt2, this);
@@ -987,12 +989,12 @@ void Scene2100::Action12::signal() {
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_6, NULL);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
Common::Point pt1(277, 84);
PlayerMover *mover1 = new PlayerMover();
_globals->_player.addMover(mover1, &pt1, this);
- scene->_object2.setPriority2(-1);
+ scene->_object2.fixPriority(-1);
Common::Point pt2(255, 76);
PlayerMover *mover2 = new PlayerMover();
scene->_object2.addMover(mover2, &pt2, this);
@@ -1020,6 +1022,8 @@ void Scene2100::Action12::signal() {
case 10:
if (_globals->getFlag(74))
setDelay(1);
+ else
+ setAction(&scene->_sequenceManager, this, 2101, &_globals->_player, NULL);
break;
case 11:
scene->_stripManager.start(2170, this);
@@ -1050,7 +1054,7 @@ void Scene2100::Action13::signal() {
setDelay(6);
break;
case 1: {
- scene->_object2.setPriority2(113);
+ scene->_object2.fixPriority(113);
Common::Point pt(178, 116);
PlayerMover *mover = new PlayerMover();
scene->_object2.addMover(mover, &pt, this);
@@ -1123,7 +1127,7 @@ void Scene2100::Action14::signal() {
scene->_object3.setVisage(2705);
scene->_object3.setStrip2(-1);
scene->_object3.changeZoom(-1);
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
scene->_object3.setPosition(Common::Point(260, 156));
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.animate(ANIM_MODE_1, NULL);
@@ -1147,7 +1151,7 @@ void Scene2100::Action14::signal() {
scene->_object3.setStrip(2);
setDelay(30);
case 13:
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_6, this);
break;
@@ -1174,14 +1178,14 @@ void Scene2100::Action15::signal() {
scene->_object3.animate(ANIM_MODE_1, NULL);
scene->_object3.setObjectWrapper(new SceneObjectWrapper());
scene->_object3.setPosition(Common::Point(157, 56));
- scene->_object3.setPriority2(1);
+ scene->_object3.fixPriority(1);
scene->_object3.changeZoom(-1);
scene->_soundHandler.startSound(162);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 2: {
- scene->_object3.setPriority2(-1);
+ scene->_object3.fixPriority(-1);
Common::Point pt(177, 68);
NpcMover *mover = new NpcMover();
scene->_object3.addMover(mover, &pt, this);
@@ -1203,7 +1207,7 @@ void Scene2100::Action15::signal() {
break;
}
case 5: {
- scene->_object3.setPriority2(156);
+ scene->_object3.fixPriority(156);
Common::Point pt(260, 156);
NpcMover *mover = new NpcMover();
@@ -1258,7 +1262,7 @@ void Scene2100::Action16::signal() {
break;
}
case 7:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setStrip(3);
setDelay(45);
break;
@@ -1311,7 +1315,7 @@ void Scene2100::Action17::signal() {
scene->_stripManager.start(7072, this);
break;
case 8:
- _globals->_inventory._stasisNegator._sceneNumber = 1;
+ RING_INVENTORY._stasisNegator._sceneNumber = 1;
_globals->_sceneManager.changeScene(9100);
remove();
break;
@@ -1342,6 +1346,7 @@ void Scene2100::Hotspot2::doAction(int action) {
}
void Scene2100::Hotspot3::doAction(int action) {
+ // Computer, on the left
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1442,6 +1447,7 @@ void Scene2100::Hotspot14::doAction(int action) {
}
void Scene2100::Object1::doAction(int action) {
+ // Elevator
Scene2100 *scene = (Scene2100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1555,7 +1561,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object1.setVisage(2100);
_object1.animate(ANIM_MODE_NONE, NULL);
_object1.setPosition(Common::Point(157, 57));
- _object1.setPriority(5);
+ _object1.fixPriority(5);
_hotspot3.postInit();
_hotspot3.setVisage(2101);
@@ -1563,7 +1569,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot3.animate(ANIM_MODE_2, NULL);
_hotspot3.setPosition(Common::Point(53, 44));
_hotspot3.changeZoom(100);
- _hotspot3.setPriority2(1);
+ _hotspot3.fixPriority(1);
_hotspot4.postInit();
_hotspot4.setVisage(2101);
@@ -1572,7 +1578,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot4.animate(ANIM_MODE_8, 0, NULL);
_hotspot4.setPosition(Common::Point(274, 52));
_hotspot4.changeZoom(100);
- _hotspot4.setPriority2(1);
+ _hotspot4.fixPriority(1);
_hotspot5.postInit();
_hotspot5.setVisage(2101);
@@ -1581,13 +1587,13 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot5.animate(ANIM_MODE_8, 0, NULL);
_hotspot5.setPosition(Common::Point(219, 141));
_hotspot5.changeZoom(100);
- _hotspot5.setPriority2(160);
+ _hotspot5.fixPriority(160);
_hotspot6.postInit();
_hotspot6.setVisage(2101);
_hotspot6._frame = 1;
_hotspot6._strip = 5;
- _hotspot6.setPriority2(175);
+ _hotspot6.fixPriority(175);
_hotspot6.animate(ANIM_MODE_8, 0, NULL);
_hotspot6.setPosition(Common::Point(97, 142));
_hotspot6.changeZoom(100);
@@ -1599,7 +1605,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot7.animate(ANIM_MODE_NONE, NULL);
_hotspot7.setPosition(Common::Point(133, 46));
_hotspot7.changeZoom(100);
- _hotspot7.setPriority2(1);
+ _hotspot7.fixPriority(1);
_hotspot8.postInit();
_hotspot8.setVisage(2101);
@@ -1608,16 +1614,16 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_hotspot8.animate(ANIM_MODE_8, 0, NULL);
_hotspot8.setPosition(Common::Point(20, 45));
_hotspot8.changeZoom(100);
- _hotspot8.setPriority2(1);
+ _hotspot8.fixPriority(1);
_hotspot2.postInit();
_hotspot2.setVisage(2101);
_hotspot2._frame = 1;
- _hotspot2._strip = 7;
+ _hotspot2._strip = 8;
_hotspot2.animate(ANIM_MODE_8, 0, NULL);
_hotspot2.setPosition(Common::Point(88, 41));
_hotspot2.changeZoom(100);
- _hotspot2.setPriority2(1);
+ _hotspot2.fixPriority(1);
_hotspot11.setBounds(Rect(139, 74, 173, 96));
_hotspot10.setBounds(Rect(71, 100, 91, 135));
@@ -1633,7 +1639,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object3.setPosition(Common::Point(246, 156));
_object3.animate(ANIM_MODE_NONE, NULL);
_object3.changeZoom(100);
- _object3.setPriority2(156);
+ _object3.fixPriority(156);
_object3.setVisage(2107);
_object3.setStrip(1);
_object3.setAction(&_action2);
@@ -1647,7 +1653,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object2.setPosition(Common::Point(150, 100));
_object2.animate(ANIM_MODE_NONE, NULL);
_object2.changeZoom(100);
- _object2.setPriority2(113);
+ _object2.fixPriority(113);
_object2.setAction(&_action3);
_globals->_sceneItems.push_back(&_object2);
}
@@ -1666,7 +1672,14 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_area4._pt = Common::Point(237, 77);
_globals->_player.postInit();
- _globals->_player.setVisage(_globals->getFlag(13) ? 2170 : 0);
+ if (_globals->getFlag(13)) {
+ _globals->_player.setVisage(2170);
+ _globals->_player._moveDiff.y = 1;
+ } else {
+ _globals->_player.setVisage(0);
+ _globals->_player._moveDiff.y = 3;
+ }
+
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player._moveDiff.x = 4;
@@ -1678,13 +1691,13 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
case 2120:
_globals->_soundHandler.startSound(160);
_globals->_soundHandler.proc5(true);
- _object1.setPriority2(-1);
- _globals->_player.setPriority2(-1);
+ _object1.fixPriority(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(80, 66));
_globals->_player.enableControl();
break;
case 2150:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
_sceneMode = 2104;
setAction(&_sequenceManager, this, 2104, &_globals->_player, &_object1, NULL);
@@ -1693,13 +1706,13 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneObjects->contains(&_object3))
_object3.remove();
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(144, 55));
_object2.setVisage(2806);
_object2.changeZoom(-1);
_object2.setPosition(Common::Point(158, 55));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object2.setAction(NULL);
_object2.setObjectWrapper(new SceneObjectWrapper());
_object2.animate(ANIM_MODE_1, NULL);
@@ -1711,7 +1724,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneObjects->contains(&_object3))
_object3.remove();
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(144, 55));
_object2.postInit();
@@ -1719,7 +1732,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object2.setStrip(1);
_object2.changeZoom(-1);
_object2.setPosition(Common::Point(158, 55));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object2.setAction(NULL);
_object2.setObjectWrapper(new SceneObjectWrapper());
_object2.animate(ANIM_MODE_1, NULL);
@@ -1727,7 +1740,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
setAction(&_action12);
} else if (_globals->_stripNum == 6100) {
_globals->_player.setPosition(Common::Point(157, 56));
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_object4.postInit();
_object4.setVisage(2102);
@@ -1754,11 +1767,11 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player._angle = 225;
_globals->_player.setStrip(6);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(272, 127));
_object3.setPosition(Common::Point(246, 156));
- _object3.setPriority2(156);
+ _object3.fixPriority(156);
_sceneMode = 2105;
setAction(&_sequenceManager, this, 2105, &_object3, NULL);
break;
@@ -1770,7 +1783,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_object4.postInit();
@@ -1790,11 +1803,11 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setStrip(3);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
_object3.setPosition(Common::Point(246, 156));
- _object3.setPriority2(156);
+ _object3.fixPriority(156);
setAction(&_action5);
break;
@@ -1804,7 +1817,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_field1800 = 1;
@@ -1814,15 +1827,15 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_object4.setPosition(Common::Point(160, 199));
_object4.hide();
- _globals->_inventory._stasisBox._sceneNumber = 0;
+ RING_INVENTORY._stasisBox._sceneNumber = 0;
setAction(&_action9);
break;
case 7000:
_globals->_soundHandler.startSound(160);
_globals->_soundHandler.proc5(true);
- if (_globals->_inventory._stasisBox2._sceneNumber == 1) {
- _globals->_player.setPriority2(1);
+ if (RING_INVENTORY._stasisBox2._sceneNumber == 1) {
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
_object4.postInit();
@@ -1838,7 +1851,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_field1800 = 1;
@@ -1852,7 +1865,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
if (_globals->_sceneObjects->contains(&_object2))
_object2.remove();
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
_globals->_player.setPosition(Common::Point(157, 56));
setAction(&_action8);
@@ -1864,7 +1877,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_sceneMode = 2106;
@@ -1877,7 +1890,7 @@ void Scene2100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2104);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(65, 149));
- _globals->_player.setPriority2(152);
+ _globals->_player.fixPriority(152);
_globals->_player.setStrip(2);
_object4.postInit();
@@ -1995,12 +2008,12 @@ void Scene2120::Action1::signal() {
break;
case 1:
// First page of index
- SceneItem::display(2120, 0, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1,
+ SceneItem::display(2120, 0, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1,
SET_WIDTH, 200, SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END);
break;
case 2:
// Second page of index
- SceneItem::display(2120, 1, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1,
+ SceneItem::display(2120, 1, SET_X, 120, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1,
SET_WIDTH, 200, SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END);
break;
case 3:
@@ -2016,7 +2029,7 @@ void Scene2120::Action1::signal() {
case 4:
// Display page of text
SceneItem::display(2121, _entries[scene->_subjectIndex]._lineNum + scene->_lineOffset,
- SET_X, 130, SET_FONT, 1, SET_EXT_BGCOLOUR, 7, SET_BG_COLOUR, -1, SET_WIDTH, 200,
+ SET_X, 130, SET_FONT, 1, SET_EXT_BGCOLOR, 7, SET_BG_COLOR, -1, SET_WIDTH, 200,
SET_KEEP_ONSCREEN, -1, SET_TEXT_MODE, 0, LIST_END);
_actionIndex = 4;
break;
@@ -2182,8 +2195,8 @@ void Scene2120::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
}
-void Scene2120::synchronise(Serialiser &s) {
- Scene::synchronise(s);
+void Scene2120::synchronize(Serializer &s) {
+ Scene::synchronize(s);
s.syncAsSint16LE(_dbMode);
s.syncAsSint16LE(_prevDbMode);
@@ -2318,7 +2331,7 @@ void Scene2150::Action2::signal() {
break;
case 3:
_globals->_events.setCursor(CURSOR_WALK);
- scene->_stripManager.start((_globals->_inventory._ale._sceneNumber == 2150) ? 2151 : 2152, this);
+ scene->_stripManager.start((RING_INVENTORY._ale._sceneNumber == 2150) ? 2151 : 2152, this);
break;
case 4:
scene->_hotspot14.postInit();
@@ -2328,7 +2341,7 @@ void Scene2150::Action2::signal() {
if (scene->_stripManager._field2E8 == 15) {
scene->_hotspot14.setFrame(5);
- _globals->_inventory._ale._sceneNumber = 1;
+ RING_INVENTORY._ale._sceneNumber = 1;
} else {
scene->_hotspot14.setFrame(scene->_stripManager._field2E8 - 5);
}
@@ -2474,7 +2487,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot7.animate(ANIM_MODE_8, NULL);
_hotspot7.setPosition(Common::Point(122, 62));
_hotspot7.changeZoom(100);
- _hotspot7.setPriority2(76);
+ _hotspot7.fixPriority(76);
_hotspot2.postInit();
_hotspot2.setVisage(2151);
@@ -2483,7 +2496,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot2.animate(ANIM_MODE_NONE, NULL);
_hotspot2.setPosition(Common::Point(257, 67));
_hotspot2.changeZoom(100);
- _hotspot2.setPriority2(60);
+ _hotspot2.fixPriority(60);
_hotspot1.postInit();
_hotspot1.setVisage(2151);
@@ -2492,7 +2505,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot1.animate(ANIM_MODE_NONE, NULL);
_hotspot1.setPosition(Common::Point(158, 99));
_hotspot1.changeZoom(100);
- _hotspot1.setPriority2(99);
+ _hotspot1.fixPriority(99);
_hotspot4.postInit();
_hotspot4.setVisage(2150);
@@ -2501,7 +2514,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_hotspot4.animate(ANIM_MODE_NONE, NULL);
_hotspot4.setPosition(Common::Point(218, 200));
_hotspot4.changeZoom(100);
- _hotspot4.setPriority2(200);
+ _hotspot4.fixPriority(200);
_hotspot10.postInit();
_hotspot10.setVisage(2152);
@@ -2515,7 +2528,7 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(_globals->getFlag(13) ? 2170 : 0);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.changeZoom(-1);
_globals->_player._moveDiff.y = 3;
@@ -2576,10 +2589,10 @@ void Scene2150::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
}
-void Scene2150::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _rect1.synchronise(s);
- _rect2.synchronise(s);
+void Scene2150::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _rect1.synchronize(s);
+ _rect2.synchronize(s);
}
void Scene2150::signal() {
@@ -2714,7 +2727,7 @@ void Scene2200::Action3::signal() {
_actionIndex = 8;
setDelay(5);
} else {
- for (SynchronisedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
+ for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
i != _globals->_sceneObjects->end(); ++i) {
(*i)->hide();
}
@@ -2731,7 +2744,7 @@ void Scene2200::Action3::signal() {
scene->_hotspot7.setFrame(1);
scene->_hotspot7.setPosition(Common::Point(145, 165));
- SceneItem::display(60, 1, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOUR, -1, SET_FG_COLOUR, 34,
+ SceneItem::display(60, 1, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOR, -1, SET_FG_COLOR, 34,
SET_POS_MODE, 0, SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END);
_state = 1;
setDelay(1800);
@@ -2740,7 +2753,7 @@ void Scene2200::Action3::signal() {
case 3:
case 4:
case 5:
- SceneItem::display(60, _actionIndex - 2, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOUR, -1, SET_FG_COLOUR, 34,
+ SceneItem::display(60, _actionIndex - 2, SET_Y, 40, SET_X, 25, SET_FONT, 75, SET_BG_COLOR, -1, SET_FG_COLOR, 34,
SET_POS_MODE, 0, SET_WIDTH, 280, SET_KEEP_ONSCREEN, 1, LIST_END);
setDelay(1800);
break;
@@ -2751,7 +2764,7 @@ void Scene2200::Action3::signal() {
setDelay(5);
break;
case 7:
- for (SynchronisedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
+ for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneObjects->begin();
i != _globals->_sceneObjects->end(); ++i)
(*i)->show();
@@ -2907,7 +2920,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot8.setVisage(2840);
_hotspot8.setStrip(2);
_hotspot8.setPosition(Common::Point(96, 184));
- _hotspot8.setPriority2(236);
+ _hotspot8.fixPriority(236);
_globals->_player.postInit();
_globals->_player.setVisage(2640);
@@ -2930,25 +2943,25 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot1.postInit();
_hotspot1.setVisage(2202);
_hotspot1.setPosition(Common::Point(175, 173));
- _hotspot1.setPriority2(99);
+ _hotspot1.fixPriority(99);
_hotspot3.postInit();
_hotspot3.setVisage(2202);
_hotspot3._strip = 2;
_hotspot3.setPosition(Common::Point(152, 76));
- _hotspot3.setPriority2(100);
+ _hotspot3.fixPriority(100);
_hotspot4.postInit();
_hotspot4.setVisage(2202);
_hotspot4._strip = 3;
_hotspot4.setPosition(Common::Point(115, 76));
- _hotspot4.setPriority2(200);
+ _hotspot4.fixPriority(200);
setAction(&_action1);
break;
case 2310:
default:
- _globals->_inventory._infoDisk._sceneNumber = 1;
+ RING_INVENTORY._infoDisk._sceneNumber = 1;
_hotspot3.postInit();
_hotspot3.setVisage(2215);
@@ -2959,7 +2972,7 @@ void Scene2200::postInit(SceneObjectList *OwnerList) {
_hotspot4.setVisage(2215);
_hotspot4._strip = 2;
_hotspot4.setPosition(Common::Point(120, 78));
- _hotspot4.setPriority2(255);
+ _hotspot4.fixPriority(255);
_globals->_sceneItems.push_back(&_hotspot4);
_soundHandler1.startSound(101);
@@ -2993,9 +3006,9 @@ void Scene2200::stripCallback(int v) {
}
}
-void Scene2200::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _exitRect.synchronise(s);
+void Scene2200::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _exitRect.synchronize(s);
}
void Scene2200::signal() {
@@ -3096,7 +3109,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) {
_hotspot5.postInit();
_hotspot5.setVisage(3401);
_hotspot5.setStrip2(2);
- _hotspot5._frame = 5;
+ _hotspot5.setFrame(5);
_hotspot5.animate(ANIM_MODE_2, 0);
if (_globals->_sceneManager._previousScene == 2100) {
@@ -3118,7 +3131,7 @@ void Scene2222::postInit(SceneObjectList *OwnerList) {
}
_soundHandler.startSound(116);
- _globals->_sceneManager._scene->_sceneBounds.centre(_hotspot1._position);
+ _globals->_sceneManager._scene->_sceneBounds.center(_hotspot1._position);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
@@ -3197,7 +3210,7 @@ void Scene2230::Action2::signal() {
case 2:
_globals->_player.setVisage(2235);
_globals->_player.setStrip2(1);
- _globals->_player.setPriority2(100);
+ _globals->_player.fixPriority(100);
_globals->_player._frame = 1;
_globals->_player.setPosition(Common::Point(200, 68));
_globals->_player.animate(ANIM_MODE_5, this);
@@ -3241,7 +3254,7 @@ void Scene2230::Action3::signal() {
_globals->_player.setVisage(0);
_globals->_player.setStrip2(-1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(164, 96));
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player._canWalk = true;
@@ -3284,7 +3297,7 @@ void Scene2230::Action5::signal() {
break;
}
case 2:
- _globals->_player.setPriority2(1430);
+ _globals->_player.fixPriority(1430);
_globals->_player.setVisage(2232);
_globals->_player._strip = 1;
_globals->_player._frame = 1;
@@ -3306,7 +3319,7 @@ void Scene2230::Action6::signal() {
case 0:
_globals->_player._strip = 2;
_globals->_player._frame = 1;
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 1:
@@ -3359,7 +3372,7 @@ void Scene2230::Action7::signal() {
scene->_hotspot2.setVisage(2231);
scene->_hotspot2._strip = 3;
scene->_hotspot2.setPosition(Common::Point(166, 116));
- scene->_hotspot2.setPriority2(131);
+ scene->_hotspot2.fixPriority(131);
scene->_hotspot2.animate(ANIM_MODE_5, this);
scene->_hotspot8._frame = 2;
@@ -3425,7 +3438,7 @@ void Scene2230::Action8::signal() {
scene->_hotspot2._strip = 3;
scene->_hotspot2._frame = scene->_hotspot2.getFrameCount();
scene->_hotspot2.setPosition(Common::Point(166, 116));
- scene->_hotspot2.setPriority2(131);
+ scene->_hotspot2.fixPriority(131);
scene->_hotspot2.animate(ANIM_MODE_6, this);
break;
case 4: {
@@ -3688,7 +3701,7 @@ void Scene2230::postInit(SceneObjectList *OwnerList) {
_hotspot8.animate(ANIM_MODE_NONE, 0);
_hotspot8.setPosition(Common::Point(164, 133));
_hotspot8.changeZoom(100);
- _hotspot8.setPriority2(129);
+ _hotspot8.fixPriority(129);
_rect1 = Rect(59, 64, 89, 74);
@@ -3720,9 +3733,9 @@ void Scene2230::postInit(SceneObjectList *OwnerList) {
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
}
-void Scene2230::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _rect1.synchronise(s);
+void Scene2230::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _rect1.synchronize(s);
s.syncAsSint16LE(_field30A);
}
@@ -3766,7 +3779,7 @@ void Scene2280::Action1::signal() {
setDelay(10);
break;
case 4:
- _globals->_player.setPriority2(1);
+ _globals->_player.fixPriority(1);
scene->_soundHandler.startSound(162);
scene->_hotspot16.animate(ANIM_MODE_6, this);
break;
@@ -3849,7 +3862,7 @@ void Scene2280::Action3::signal() {
scene->_hotspot12._strip = 2;
scene->_hotspot12._frame = 3;
scene->_hotspot12.setPosition(Common::Point(88, 76));
- scene->_hotspot12.setPriority2(1);
+ scene->_hotspot12.fixPriority(1);
_globals->_player.animate(ANIM_MODE_6, this);
break;
@@ -3867,7 +3880,7 @@ void Scene2280::Action3::signal() {
scene->_hotspot8.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot8.setPosition(Common::Point(79, 108));
scene->_hotspot8.changeZoom(100);
- scene->_hotspot8.setPriority2(1);
+ scene->_hotspot8.fixPriority(1);
scene->_hotspot10.postInit();
scene->_hotspot10.setVisage(2280);
@@ -3876,7 +3889,7 @@ void Scene2280::Action3::signal() {
scene->_hotspot10.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot10.setPosition(Common::Point(79, 104));
scene->_hotspot10.changeZoom(100);
- scene->_hotspot10.setPriority2(1);
+ scene->_hotspot10.fixPriority(1);
_globals->clearFlag(13);
@@ -3925,11 +3938,11 @@ void Scene2280::Action4::signal() {
switch (_state) {
case 1:
scene->_hotspot18.remove();
- _globals->_inventory._scanner._sceneNumber = 1;
+ RING_INVENTORY._scanner._sceneNumber = 1;
break;
case 6:
scene->_hotspot17.remove();
- _globals->_inventory._medkit._sceneNumber = 1;
+ RING_INVENTORY._medkit._sceneNumber = 1;
break;
case 50:
scene->_hotspot17.postInit();
@@ -3939,9 +3952,9 @@ void Scene2280::Action4::signal() {
scene->_hotspot17.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot17.setPosition(Common::Point(162, 39));
scene->_hotspot17.changeZoom(100);
- scene->_hotspot17.setPriority2(1);
+ scene->_hotspot17.fixPriority(1);
- _globals->_inventory._medkit._sceneNumber = 2280;
+ RING_INVENTORY._medkit._sceneNumber = 2280;
_globals->_sceneItems.push_front(&scene->_hotspot17);
break;
case 51:
@@ -3952,9 +3965,9 @@ void Scene2280::Action4::signal() {
scene->_hotspot18.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot18.setPosition(Common::Point(152, 43));
scene->_hotspot18.changeZoom(100);
- scene->_hotspot18.setPriority2(1);
+ scene->_hotspot18.fixPriority(1);
- _globals->_inventory._scanner._sceneNumber = 2280;
+ RING_INVENTORY._scanner._sceneNumber = 2280;
_globals->_sceneItems.push_front(&scene->_hotspot18);
break;
}
@@ -4221,25 +4234,25 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_hotspot16.postInit();
_hotspot16.setVisage(2281);
_hotspot16.setPosition(Common::Point(208, 90));
- _hotspot16.setPriority2(80);
+ _hotspot16.fixPriority(80);
- if (_globals->_inventory._medkit._sceneNumber == 2280) {
+ if (RING_INVENTORY._medkit._sceneNumber == 2280) {
_hotspot17.postInit();
_hotspot17.setVisage(2161);
_hotspot17._strip = 2;
_hotspot17.setPosition(Common::Point(162, 39));
- _hotspot17.setPriority2(1);
+ _hotspot17.fixPriority(1);
_globals->_sceneItems.push_back(&_hotspot17);
}
- if (_globals->_inventory._scanner._sceneNumber == 2280) {
+ if (RING_INVENTORY._scanner._sceneNumber == 2280) {
_hotspot18.postInit();
_hotspot18.setVisage(2161);
_hotspot18._strip = 2;
_hotspot18._frame = 2;
_hotspot17.setPosition(Common::Point(152, 43));
- _hotspot17.setPriority2(1);
+ _hotspot17.fixPriority(1);
_globals->_sceneItems.push_back(&_hotspot17);
}
@@ -4249,21 +4262,21 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_hotspot8.setVisage(2280);
_hotspot8._strip = 2;
_hotspot8.setPosition(Common::Point(79, 108));
- _hotspot8.setPriority2(1);
+ _hotspot8.fixPriority(1);
_hotspot10.postInit();
_hotspot10.setVisage(2280);
_hotspot10._strip = 2;
_hotspot10._frame = 2;
_hotspot10.setPosition(Common::Point(79, 104));
- _hotspot10.setPriority2(2);
+ _hotspot10.fixPriority(2);
_hotspot12.postInit();
_hotspot12.setVisage(2280);
_hotspot12._strip = 2;
_hotspot12._frame = 3;
_hotspot12.setPosition(Common::Point(88, 76));
- _hotspot12.setPriority2(1);
+ _hotspot12.fixPriority(1);
_globals->_sceneItems.addItems(&_hotspot8, &_hotspot10, &_hotspot12, NULL);
}
@@ -4273,19 +4286,19 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_hotspot9.postInit();
_hotspot9.setVisage(2280);
_hotspot9.setPosition(Common::Point(104, 96));
- _hotspot9.setPriority2(1);
+ _hotspot9.fixPriority(1);
_hotspot11.postInit();
_hotspot11.setVisage(2280);
_hotspot11._frame = 2;
_hotspot11.setPosition(Common::Point(130, 79));
- _hotspot11.setPriority2(1);
+ _hotspot11.fixPriority(1);
_hotspot13.postInit();
_hotspot13.setVisage(2280);
_hotspot13._frame = 3;
_hotspot13.setPosition(Common::Point(113, 63));
- _hotspot13.setPriority2(1);
+ _hotspot13.fixPriority(1);
_hotspot1.setBounds(Rect(225, 70, 234, 80));
_hotspot2.setBounds(Rect(44, 78, 56, 105));
@@ -4310,7 +4323,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
_globals->_player.enableControl();
} else {
_globals->setFlag(109);
- _globals->_player.setPriority2(76);
+ _globals->_player.fixPriority(76);
_globals->_player.disableControl();
_sceneMode = 2281;
@@ -4329,7 +4342,7 @@ void Scene2280::postInit(SceneObjectList *OwnerList) {
void Scene2280::signal() {
if (_sceneMode == 2281) {
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.enableControl();
}
}
@@ -4342,9 +4355,9 @@ void Scene2280::dispatch() {
}
}
-void Scene2280::synchronise(Serialiser &s) {
- Scene::synchronise(s);
- _exitRect.synchronise(s);
+void Scene2280::synchronize(Serializer &s) {
+ Scene::synchronize(s);
+ _exitRect.synchronize(s);
}
/*--------------------------------------------------------------------------
@@ -4422,7 +4435,7 @@ void Scene2300::Action1::signal() {
_globals->_soundHandler.startSound(77, this);
break;
case 8:
- _globals->_game.endGame(2300, 0);
+ _globals->_game->endGame(2300, 0);
break;
case 9:
if (scene->_hotspot5._mover)
@@ -4454,8 +4467,8 @@ void Scene2300::Action1::signal() {
scene->_hotspot6._frame = 1;
scene->_hotspot5.animate(ANIM_MODE_5, NULL);
scene->_hotspot6.animate(ANIM_MODE_5, NULL);
- scene->_hotspot5.setPriority2(20);
- scene->_hotspot6.setPriority2(20);
+ scene->_hotspot5.fixPriority(20);
+ scene->_hotspot6.fixPriority(20);
_globals->_player.setVisage(2672);
_globals->_player._strip = 5;
@@ -4546,7 +4559,7 @@ void Scene2300::Action2::signal() {
case 7:
scene->_hotspot7._strip = 2;
scene->_hotspot7._frame = 1;
- scene->_hotspot7.animate(ANIM_MODE_7, this);
+ scene->_hotspot7.animate(ANIM_MODE_5, this);
break;
case 8:
scene->_hotspot2.animate(ANIM_MODE_6, this);
@@ -4626,7 +4639,7 @@ void Scene2300::Action4::signal() {
scene->_hotspot9.setStrip2(2);
scene->_hotspot9.setFrame(3);
scene->_hotspot9.setPosition(Common::Point(273, 199));
- scene->_hotspot9.setPriority2(19);
+ scene->_hotspot9.fixPriority(19);
scene->_hotspot9.animate(ANIM_MODE_5, this);
scene->_soundHandler1.startSound(11);
break;
@@ -4672,7 +4685,7 @@ void Scene2300::Hotspot5::doAction(int action) {
}
}
-void Scene2300::Hotspot6::doAction(int action) {
+void Scene2300::Hotspot7::doAction(int action) {
Scene2300 *scene = (Scene2300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -4707,12 +4720,12 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
setZoomPercents(0, 100, 200, 100);
_stripManager.addSpeaker(&_speakerSL);
- _stripManager.addSpeaker(&_speakerML);
+ _stripManager.addSpeaker(&_speakerMText);
_stripManager.addSpeaker(&_speakerQText);
_stripManager.addSpeaker(&_speakerSText);
- _globals->_inventory._stunner._sceneNumber = 1;
- _globals->_inventory._infoDisk._sceneNumber = 1;
+ RING_INVENTORY._stunner._sceneNumber = 1;
+ RING_INVENTORY._infoDisk._sceneNumber = 1;
_hotspot8.postInit();
_hotspot8.setVisage(2301);
@@ -4727,7 +4740,7 @@ void Scene2300::postInit(SceneObjectList *OwnerList) {
_hotspot9.setStrip2(2);
_hotspot9._frame = _hotspot9.getFrameCount();
_hotspot9.setPosition(Common::Point(273, 199));
- _hotspot9.setPriority2(1);
+ _hotspot9.fixPriority(1);
_hotspot10.postInit();
_hotspot10.setVisage(2301);
@@ -4864,29 +4877,32 @@ void Scene2310::postInit(SceneObjectList *OwnerList) {
_globals->_events.setCursor(CURSOR_WALK);
_wireIndex = 5;
- _pageIndex = _globals->_randomSource.getRandomNumber(19) + 1;
+ if (_vm->getFeatures() & GF_CD)
+ _pageIndex = _globals->_randomSource.getRandomNumber(14) + 2;
+ else
+ _pageIndex = _globals->_randomSource.getRandomNumber(19) + 1;
signal();
}
void Scene2310::signal() {
switch (_sceneMode++) {
case 0: {
- Common::String fmtString = _vm->_dataManager->getMessage(2300, 22);
+ Common::String fmtString = _resourceManager->getMessage(2300, 22);
Common::String msg = Common::String::format(fmtString.c_str(), _pageList[_pageIndex]._pageNumber);
_sceneText._width = 280;
- _sceneText._textMode = ALIGN_CENTRE;
- _sceneText._colour1 = 35;
+ _sceneText._textMode = ALIGN_CENTER;
+ _sceneText._color1 = 35;
_sceneText._fontNumber = 2;
_sceneText.setup(msg);
- _sceneText.setPriority2(255);
+ _sceneText.fixPriority(255);
_sceneText.setPosition(Common::Point(30, 20));
break;
}
case 1: {
- Common::String msg = _vm->_dataManager->getMessage(2300, 23);
+ Common::String msg = _resourceManager->getMessage(2300, 23);
_sceneText.setup(msg);
- _sceneText.setPriority2(255);
+ _sceneText.fixPriority(255);
_sceneText.setPosition(Common::Point(30, 170));
_globals->_sceneObjects->draw();
@@ -4901,8 +4917,8 @@ void Scene2310::signal() {
}
}
-void Scene2310::synchronise(Serialiser &s) {
- Scene::synchronise(s);
+void Scene2310::synchronize(Serializer &s) {
+ Scene::synchronize(s);
s.syncAsSint16LE(_wireIndex);
s.syncAsSint16LE(_pageIndex);
@@ -4966,10 +4982,7 @@ void Scene2310::process(Event &event) {
}
void Scene2310::dispatch() {
- if ((_vm->getFeatures() & GF_CD) && !ConfMan.getBool("copy_protection")) {
- // CD version of Ringworld has the copy protection disabled
- signal();
- } else if (_wireIndex != 5) {
+ if (_wireIndex != 5) {
for (int idx = 0; idx < 5; ++idx) {
if (_rectList[idx].contains(_globals->_events._mousePos)) {
_wireList[_wireIndex].setFrame(idx + 2);
@@ -5033,7 +5046,7 @@ void Scene2320::Action2::signal() {
switch (_actionIndex++) {
case 0: {
scene->_soundHandler.startSound(253);
- scene->_hotspot13.setPriority2(99);
+ scene->_hotspot13.fixPriority(99);
Common::Point pt(scene->_hotspot13._position.x, 200);
NpcMover *mover = new NpcMover();
@@ -5068,7 +5081,7 @@ void Scene2320::Action3::signal() {
break;
}
case 3:
- scene->_hotspot6.setPriority2(scene->_hotspot6._priority - 1);
+ _globals->_player.fixPriority(scene->_hotspot6._priority - 1);
_globals->_player._strip = 3;
setDelay(10);
break;
@@ -5122,7 +5135,7 @@ void Scene2320::Action3::signal() {
break;
case 5: {
if (_state == 2320)
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
else
_globals->_sceneManager.changeScene(_state);
@@ -5165,13 +5178,13 @@ void Scene2320::Action4::signal() {
break;
case 3:
_globals->_player.animate(ANIM_MODE_6, NULL);
- scene->setAction(&scene->_action2);
+ setAction(&scene->_action2, this);
break;
case 4: {
scene->_hotspot16.postInit();
scene->_hotspot16.setVisage(2331);
scene->_hotspot16.setStrip(3);
- scene->_hotspot16.setPriority2(149);
+ scene->_hotspot16.fixPriority(149);
scene->_hotspot16.setPosition(Common::Point(320, 202));
scene->_hotspot16.show();
@@ -5181,14 +5194,14 @@ void Scene2320::Action4::signal() {
break;
}
case 5: {
- scene->_hotspot16.setPriority2(200);
+ scene->_hotspot16.fixPriority(200);
Common::Point pt(320, 180);
NpcMover *mover = new NpcMover();
scene->_hotspot16.addMover(mover, &pt, this);
break;
}
case 6: {
- scene->_hotspot16.setPriority2(-1);
+ scene->_hotspot16.fixPriority(-1);
_globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
@@ -5262,7 +5275,7 @@ void Scene2320::Action4::signal() {
}
case 17: {
_globals->_player.animate(ANIM_MODE_6, NULL);
- scene->_hotspot16.setPriority2(160);
+ scene->_hotspot16.fixPriority(160);
Common::Point pt(320, 121);
NpcMover *mover = new NpcMover();
@@ -5290,7 +5303,7 @@ void Scene2320::Action4::signal() {
_globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
- scene->_hotspot13.setPriority2(1);
+ scene->_hotspot13.fixPriority(1);
remove();
break;
}
@@ -5320,7 +5333,7 @@ void Scene2320::Action5::signal() {
_globals->_player.setVisage(2347);
_globals->_player.setStrip(1);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(137);
+ _globals->_player.fixPriority(137);
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 5:
@@ -5333,7 +5346,7 @@ void Scene2320::Action5::signal() {
_globals->_sceneManager.changeScene(7000);
else if (_globals->getFlag(59))
_globals->_sceneManager.changeScene(5000);
- else if (!_globals->getFlag(43) || (_globals->_inventory._ale._sceneNumber != 1))
+ else if (!_globals->getFlag(43) || (RING_INVENTORY._ale._sceneNumber != 1))
setDelay(10);
else {
scene->_hotspot11.setAction(NULL);
@@ -5345,7 +5358,7 @@ void Scene2320::Action5::signal() {
NpcMover *mover = new NpcMover();
scene->_hotspot11.addMover(mover, &pt, NULL);
- _globals->clearFlag(53);
+ _globals->clearFlag(43);
scene->_stripManager.start(2325, this);
}
break;
@@ -5376,7 +5389,7 @@ void Scene2320::Action6::signal() {
case 3:
_globals->_player.setVisage(0);
_globals->_player.setStrip(3);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.animate(ANIM_MODE_1, NULL);
@@ -5432,12 +5445,12 @@ void Scene2320::Action7::signal() {
scene->_hotspot6.animate(ANIM_MODE_5, this);
break;
case 2:
- scene->_hotspot10.setPriority2(-1);
+ scene->_hotspot10.fixPriority(-1);
ADD_MOVER_NULL(scene->_hotspot10, 321, 94);
- scene->_hotspot11.setPriority2(-1);
+ scene->_hotspot11.fixPriority(-1);
ADD_MOVER_NULL(scene->_hotspot11, 346, 85);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
ADD_MOVER(_globals->_player, 297, 89);
break;
case 3:
@@ -5454,10 +5467,6 @@ void Scene2320::Action7::signal() {
case 6:
ADD_MOVER_NULL(scene->_hotspot10, 491, 160);
ADD_MOVER(_globals->_player, 391, 88);
-
- _globals->_player.setStrip(1);
- _globals->_player.setFrame(1);
- _globals->_player.animate(ANIM_MODE_6, this);
break;
case 7:
ADD_PLAYER_MOVER(462, 182);
@@ -5477,7 +5486,7 @@ void Scene2320::Action7::signal() {
break;
case 12:
_globals->_player.enableControl();
- _globals->_inventory._stasisBox._sceneNumber = 2320;
+ RING_INVENTORY._stasisBox._sceneNumber = 2320;
break;
}
}
@@ -5507,7 +5516,7 @@ void Scene2320::Action8::signal() {
_globals->_player.enableControl();
break;
case 5:
- _globals->_inventory._stasisBox._sceneNumber = 2320;
+ RING_INVENTORY._stasisBox._sceneNumber = 2320;
scene->_sceneMode = 2326;
scene->_speakerGameText.setTextPos(Common::Point(_globals->_sceneManager._scene->_sceneBounds.left + 30, 10));
scene->setAction(&scene->_sequenceManager1, scene, 2326, &_globals->_player, &scene->_hotspot11, NULL);
@@ -5622,12 +5631,12 @@ void Scene2320::Hotspot11::doAction(int action) {
} else {
scene->_sceneMode = 2329;
- if (_globals->_inventory._ale._sceneNumber == 1) {
+ if (RING_INVENTORY._ale._sceneNumber == 1) {
scene->setAction(&scene->_sequenceManager1, scene, 2329, NULL);
} else if (!_globals->getFlag(110)) {
_globals->setFlag(110);
scene->setAction(&scene->_sequenceManager1, scene, 2330, NULL);
- } else if (_globals->_inventory._peg._sceneNumber != 1) {
+ } else if (RING_INVENTORY._peg._sceneNumber != 1) {
scene->setAction(&scene->_sequenceManager1, scene, 2331, NULL);
} else if (!_state) {
++_state;
@@ -5683,13 +5692,13 @@ void Scene2320::Hotspot14::doAction(int action) {
scene->_hotspot8.hide();
_globals->_sceneItems.push_front(&scene->_hotspot8);
- _globals->_inventory._waldos._sceneNumber = 2320;
+ RING_INVENTORY._waldos._sceneNumber = 2320;
scene->_hotspot9.postInit();
scene->_hotspot9.setVisage(2345);
scene->_hotspot9._strip = 6;
scene->_hotspot9.setPosition(Common::Point(536, 103));
- scene->_hotspot9.setPriority2(200);
+ scene->_hotspot9.fixPriority(200);
scene->_hotspot9.hide();
scene->_hotspot16.postInit();
@@ -5705,7 +5714,7 @@ void Scene2320::Hotspot14::doAction(int action) {
SceneItem::display2(2320, 24);
} else if (!_globals->getFlag(76)) {
SceneItem::display2(2320, 28);
- } else if (!_globals->_inventory._waldos._sceneNumber) {
+ } else if (!RING_INVENTORY._waldos._sceneNumber) {
SceneItem::display2(2320, 27);
} else {
SceneItem::display2(2320, 29);
@@ -5779,7 +5788,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot13.postInit();
_hotspot13.setVisage(2323);
_hotspot13.setPosition(Common::Point(319, 157));
- _hotspot13.setPriority2(1);
+ _hotspot13.fixPriority(1);
_hotspot12.postInit();
_hotspot12.setVisage(2321);
@@ -5787,18 +5796,18 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot12.animate(ANIM_MODE_8, 0, NULL);
_hotspot12.setPosition(Common::Point(412, 46));
- if (_globals->_inventory._waldos._sceneNumber == 2320) {
+ if (RING_INVENTORY._waldos._sceneNumber == 2320) {
_hotspot8.postInit();
_hotspot8.setVisage(2345);
_hotspot8.setStrip(5);
_hotspot8.setFrame(8);
_hotspot8.setPosition(Common::Point(541, 103));
- _hotspot8.setPriority2(201);
+ _hotspot8.fixPriority(201);
_globals->_sceneItems.push_back(&_hotspot8);
}
- _area1.setup(2100, 2, 1, 2150);
+ _area1.setup(2153, 2, 1, 2100);
_area1._pt = Common::Point(200, 31);
_area2.setup(2153, 3, 1, 2150);
_area2._pt = Common::Point(200, 50);
@@ -5812,17 +5821,20 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot11.setVisage(2705);
_hotspot11._strip = 3;
_hotspot11.setPosition(Common::Point(510, 156));
+ _globals->_sceneItems.push_back(&_hotspot11);
_hotspot11._state = 0;
_hotspot11.setAction(&_action1);
-
- _globals->_sceneItems.push_back(&_hotspot11);
}
_globals->_player.postInit();
+ if (_globals->getFlag(13))
+ _globals->_player.setVisage(2170);
+ else
+ _globals->_player.setVisage(0);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setPosition(Common::Point(320, 79));
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
_globals->_player.changeZoom(-1);
_globals->_player._moveDiff.y = 3;
_globals->_player.disableControl();
@@ -5857,7 +5869,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_soundHandler.startSound(160);
_globals->_soundHandler.proc5(true);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setPosition(Common::Point(389, 72));
_globals->_player.enableControl();
break;
@@ -5883,7 +5895,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(2347);
_globals->_player.setStrip(2);
_globals->_player.setFrame(5);
- _globals->_player.setPriority2(137);
+ _globals->_player.fixPriority(137);
_globals->_player.setPosition(Common::Point(165, 132));
setAction(&_action6);
@@ -5909,7 +5921,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_globals->_player.setStrip(2);
_globals->_player.setFrame(_globals->_player.getFrameCount());
_globals->_player.setPosition(Common::Point(303, 176));
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.disableControl();
_hotspot13.setPosition(Common::Point(319, 199));
@@ -5917,7 +5929,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot16.postInit();
_hotspot16.setVisage(2331);
_hotspot16._strip = 3;
- _hotspot16.setPriority2(160);
+ _hotspot16.fixPriority(160);
_hotspot16.setPosition(Common::Point(320, 202));
_hotspot16.hide();
@@ -5934,7 +5946,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot11.postInit();
_hotspot11.setVisage(2705);
_hotspot11._strip = 2;
- _hotspot11.setPriority2(10);
+ _hotspot11.fixPriority(10);
_hotspot11.setPosition(Common::Point(322, 80));
_hotspot11.setObjectWrapper(new SceneObjectWrapper());
_hotspot11.animate(ANIM_MODE_1, NULL);
@@ -5943,7 +5955,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
_hotspot10.setVisage(2806);
_hotspot10.setObjectWrapper(new SceneObjectWrapper());
_hotspot10.changeZoom(-1);
- _hotspot10.setPriority2(10);
+ _hotspot10.fixPriority(10);
_hotspot10.setPosition(Common::Point(318, 89));
_hotspot10._strip = 3;
_hotspot10.animate(ANIM_MODE_1, NULL);
@@ -5971,7 +5983,7 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
}
_globals->_stripNum = 0;
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
loadScene(2320);
_hotspot14._sceneRegionId = 8;
@@ -5986,8 +5998,8 @@ void Scene2320::postInit(SceneObjectList *OwnerList) {
&_hotspot13, &_hotspot4, &_hotspot3, &_hotspot2, &_hotspot1, NULL);
}
-void Scene2320::synchronise(Serialiser &s) {
- Scene::synchronise(s);
+void Scene2320::synchronize(Serializer &s) {
+ Scene::synchronize(s);
SYNC_POINTER(_hotspotPtr);
}
@@ -6019,13 +6031,13 @@ void Scene2320::signal() {
break;
case 2326:
_globals->clearFlag(70);
- _globals->_inventory._nullifier._sceneNumber = 1;
+ RING_INVENTORY._nullifier._sceneNumber = 1;
_globals->_stripNum = 2321;
_globals->_sceneManager.changeScene(2100);
break;
case 2336:
_globals->setFlag(77);
- _globals->_inventory._waldos._sceneNumber = 1;
+ RING_INVENTORY._waldos._sceneNumber = 1;
_hotspot8.remove();
break;
case 5000:
@@ -6088,7 +6100,7 @@ void Scene2400::postInit(SceneObjectList *OwnerList) {
setAction(&_action1);
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y);
_globals->_sceneManager._scene->_sceneBounds.contain(_globals->_sceneManager._scene->_backgroundBounds);
_globals->_sceneOffset.x = (_globals->_sceneManager._scene->_sceneBounds.left / 160) * 160;
diff --git a/engines/tsage/ringworld_scenes3.h b/engines/tsage/ringworld_scenes3.h
index 61aac522f2..a25bf8834b 100644
--- a/engines/tsage/ringworld_scenes3.h
+++ b/engines/tsage/ringworld_scenes3.h
@@ -324,7 +324,7 @@ public:
int _lineOffset;
virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
};
class Scene2150 : public Scene {
@@ -381,7 +381,7 @@ public:
Scene2150();
virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void signal();
virtual void dispatch();
};
@@ -446,7 +446,7 @@ public:
Scene2200();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void stripCallback(int v);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void signal();
virtual void dispatch();
};
@@ -462,8 +462,6 @@ class Scene2222 : public Scene {
virtual void signal();
};
- /* Hotspots */
-
public:
SoundHandler _soundHandler;
SpeakerSText _speakerSText;
@@ -581,7 +579,7 @@ public:
Scene2230();
virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void dispatch();
};
@@ -681,7 +679,7 @@ public:
Scene2280();
virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void signal();
virtual void dispatch();
};
@@ -710,22 +708,14 @@ class Scene2300 : public Scene {
public:
virtual void doAction(int action);
};
- class Hotspot6 : public SceneObject {
- public:
- virtual void doAction(int action);
- };
- class Hotspot12 : public SceneObject {
- public:
- virtual void doAction(int action);
- };
- class Hotspot13 : public SceneObject {
+ class Hotspot7 : public SceneObject {
public:
virtual void doAction(int action);
};
public:
SoundHandler _soundHandler1, _soundHandler2;
SpeakerSL _speakerSL;
- SpeakerML _speakerML;
+ SpeakerMText _speakerMText;
SpeakerQText _speakerQText;
SpeakerSText _speakerSText;
Action1 _action1;
@@ -734,8 +724,9 @@ public:
Action4 _action4;
SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4;
Hotspot5 _hotspot5;
- Hotspot6 _hotspot6;
- SceneObject _hotspot7, _hotspot8, _hotspot9, _hotspot10;
+ SceneObject _hotspot6;
+ Hotspot7 _hotspot7;
+ SceneObject _hotspot8, _hotspot9, _hotspot10;
DisplayHotspot _hotspot11, _hotspot12, _hotspot13, _hotspot14, _hotspot15;
Scene2300();
@@ -769,7 +760,7 @@ public:
Scene2310();
virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void signal();
virtual void process(Event &event);
virtual void dispatch();
@@ -882,7 +873,7 @@ public:
Scene2320();
virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void signal();
};
diff --git a/engines/tsage/ringworld_scenes4.cpp b/engines/tsage/ringworld_scenes4.cpp
index 89feb223a1..c42b7819f2 100644
--- a/engines/tsage/ringworld_scenes4.cpp
+++ b/engines/tsage/ringworld_scenes4.cpp
@@ -113,8 +113,8 @@ Scene3700::Viewer::Viewer() {
_percentList[3] = 114;
}
-void Scene3700::Viewer::synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+void Scene3700::Viewer::synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsByte(_active);
s.syncAsSint16LE(_countdownCtr);
for (int idx = 0; idx < 4; ++idx) {
diff --git a/engines/tsage/ringworld_scenes4.h b/engines/tsage/ringworld_scenes4.h
index f5dac297fc..53ea7be491 100644
--- a/engines/tsage/ringworld_scenes4.h
+++ b/engines/tsage/ringworld_scenes4.h
@@ -67,7 +67,7 @@ class Scene3700 : public Scene {
Viewer();
virtual Common::String getClassName() { return "Viewer"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void dispatch();
virtual void reposition();
virtual void draw();
diff --git a/engines/tsage/ringworld_scenes5.cpp b/engines/tsage/ringworld_scenes5.cpp
index de29a1cefc..dd9c33f0e5 100644
--- a/engines/tsage/ringworld_scenes5.cpp
+++ b/engines/tsage/ringworld_scenes5.cpp
@@ -47,9 +47,11 @@ void Scene4000::Action1::signal() {
scene->_hotspot5.animate(ANIM_MODE_1, NULL);
scene->_hotspot5.setPosition(Common::Point(116, 160));
- ADD_PLAYER_MOVER_NULL(scene->_hotspot5, 208, 169);
+ Common::Point pt(208, 169);
+ NpcMover *mover = new NpcMover();
+ scene->_hotspot5.addMover(mover, &pt, this);
- _globals->_inventory._ale._sceneNumber = 0;
+ RING_INVENTORY._ale._sceneNumber = 0;
_globals->clearFlag(42);
_globals->clearFlag(36);
_globals->clearFlag(43);
@@ -57,30 +59,33 @@ void Scene4000::Action1::signal() {
break;
}
case 1: {
- scene->_hotspot9.postInit();
- scene->_hotspot9.setVisage(4001);
- scene->_hotspot9.animate(ANIM_MODE_1, NULL);
- scene->_hotspot9.setObjectWrapper(new SceneObjectWrapper());
- scene->_hotspot9.setPosition(Common::Point(314, 132));
+ scene->_guardRock.postInit();
+ scene->_guardRock.setVisage(4001);
+ scene->_guardRock.animate(ANIM_MODE_1, NULL);
+ scene->_guardRock.setObjectWrapper(new SceneObjectWrapper());
+ scene->_guardRock.setPosition(Common::Point(314, 132));
+ scene->_guardRock._moveDiff = Common::Point(4, 2);
- ADD_PLAYER_MOVER_NULL(scene->_hotspot9, 288, 167);
+ ADD_PLAYER_MOVER_NULL(scene->_guardRock, 288, 167);
- scene->_hotspot4.postInit();
- scene->_hotspot4.setVisage(4006);
- scene->_hotspot4.animate(ANIM_MODE_1, NULL);
- scene->_hotspot4.setStrip(1);
- scene->_hotspot4.setPosition(Common::Point(207, 136));
+ scene->_olo.postInit();
+ scene->_olo.setVisage(4006);
+ scene->_olo.animate(ANIM_MODE_1, NULL);
+ scene->_olo.setStrip(1);
+ scene->_olo.setPosition(Common::Point(207, 136));
+
+ ADD_PLAYER_MOVER_NULL(scene->_olo, 220, 151);
- ADD_PLAYER_MOVER_NULL(scene->_hotspot4, 220, 151);
+ scene->_miranda.postInit();
+ scene->_miranda.setVisage(2701);
+ scene->_miranda.animate(ANIM_MODE_1, NULL);
+ scene->_miranda.setObjectWrapper(new SceneObjectWrapper());
+ scene->_miranda._moveDiff = Common::Point(4, 2);
+ scene->_miranda.setPosition(Common::Point(300, 135));
- scene->_hotspot7.postInit();
- scene->_hotspot7.setVisage(2701);
- scene->_hotspot7.animate(ANIM_MODE_1, NULL);
- scene->_hotspot7.setObjectWrapper(new SceneObjectWrapper());
- scene->_hotspot7._moveDiff = Common::Point(4, 2);
- scene->_hotspot7.setPosition(Common::Point(300, 135));
+ ADD_PLAYER_MOVER_THIS(scene->_miranda, 266, 169);
- ADD_PLAYER_MOVER_NULL(_globals->_player, 266, 169);
+ ADD_PLAYER_MOVER_NULL(_globals->_player, 241, 155);
break;
}
case 2:
@@ -89,14 +94,14 @@ void Scene4000::Action1::signal() {
case 3: {
Common::Point pt1(30, 86);
PlayerMover *mover1 = new PlayerMover();
- scene->_hotspot7.addMover(mover1, &pt1, this);
+ scene->_miranda.addMover(mover1, &pt1, this);
ADD_PLAYER_MOVER_NULL(scene->_hotspot5, 3, 86);
break;
}
case 4:
- ADD_MOVER(scene->_hotspot7, -30, 86);
- ADD_MOVER(scene->_hotspot5, -40, 86);
+ ADD_MOVER(scene->_miranda, -30, 86);
+ ADD_MOVER_NULL(scene->_hotspot5, -40, 86);
break;
case 5:
_globals->_soundHandler.startSound(155);
@@ -105,7 +110,7 @@ void Scene4000::Action1::signal() {
scene->_stripManager.start(4430, this);
break;
case 6:
- ADD_PLAYER_MOVER_THIS(scene->_hotspot4, 277, 175);
+ ADD_PLAYER_MOVER_THIS(scene->_olo, 277, 175);
ADD_PLAYER_MOVER_NULL(_globals->_player, 258, 187);
break;
case 7:
@@ -135,19 +140,19 @@ void Scene4000::Action2::signal() {
scene->_hotspot5._moveDiff.x = 5;
scene->_hotspot5.setPosition(Common::Point(-8, 88));
- scene->_hotspot3.setAction(&scene->_sequenceManager3, NULL, 4003, &scene->_hotspot5, NULL);
- scene->_hotspot7.setAction(&scene->_sequenceManager2, NULL, 4002, &scene->_hotspot7, NULL);
+ scene->_lander.setAction(&scene->_sequenceManager3, NULL, 4003, &scene->_hotspot5, NULL);
+ scene->_miranda.setAction(&scene->_sequenceManager2, NULL, 4002, &scene->_miranda, NULL);
break;
case 1:
_globals->_player.disableControl();
- scene->_hotspot3.remove();
- ADD_MOVER(scene->_hotspot9, scene->_hotspot5._position.x + 30, scene->_hotspot5._position.y - 10);
+ scene->_lander.remove();
+ ADD_MOVER(scene->_guardRock, scene->_hotspot5._position.x + 30, scene->_hotspot5._position.y - 10);
break;
case 2:
- _globals->_player.checkAngle(&scene->_hotspot9);
- scene->_hotspot5.checkAngle(&scene->_hotspot9);
- scene->_hotspot7.checkAngle(&scene->_hotspot9);
+ _globals->_player.checkAngle(&scene->_guardRock);
+ scene->_hotspot5.checkAngle(&scene->_guardRock);
+ scene->_miranda.checkAngle(&scene->_guardRock);
scene->_stripManager.start(4000, this);
break;
case 3:
@@ -166,9 +171,9 @@ void Scene4000::Action2::signal() {
scene->_stripManager.start(4010, this);
break;
case 6:
- ADD_PLAYER_MOVER_NULL(scene->_hotspot9, 230, 149);
+ ADD_PLAYER_MOVER_NULL(scene->_guardRock, 230, 149);
ADD_PLAYER_MOVER(210, 136);
- ADD_PLAYER_MOVER_NULL(scene->_hotspot7, 210, 133);
+ ADD_PLAYER_MOVER_NULL(scene->_miranda, 210, 133);
break;
case 7:
_globals->_sceneManager.changeScene(4045);
@@ -203,20 +208,20 @@ void Scene4000::Action4::signal() {
ADD_MOVER(_globals->_player, 257, 57);
break;
case 1:
- _globals->_player.setVisage(4000);
+ _globals->_player.setVisage(4008);
_globals->_player.setPosition(Common::Point(258, 83));
_globals->_player._frame = 1;
_globals->_player._strip = 3;
_globals->_player.animate(ANIM_MODE_4, 2, 1, this);
break;
case 2:
- scene->_hotspot6.postInit();
- scene->_hotspot6.setVisage(4000);
- scene->_hotspot6.setStrip(7);
- scene->_hotspot6.setFrame(3);
- scene->_hotspot6.setPosition(Common::Point(268, 44));
+ scene->_rope.postInit();
+ scene->_rope.setVisage(4000);
+ scene->_rope.setStrip(7);
+ scene->_rope.setFrame(3);
+ scene->_rope.setPosition(Common::Point(268, 44));
- _globals->_inventory._rope._sceneNumber = 4000;
+ RING_INVENTORY._rope._sceneNumber = 4000;
_globals->_events.setCursor(CURSOR_USE);
_globals->_player.animate(ANIM_MODE_6, this);
break;
@@ -270,23 +275,23 @@ void Scene4000::Action6::signal() {
setAction(&scene->_sequenceManager1, this, 4001, &_globals->_player, NULL);
if (!_globals->getFlag(36))
- scene->_hotspot7.setAction(&scene->_sequenceManager2, NULL, 4002, &scene->_hotspot7, NULL);
+ scene->_miranda.setAction(&scene->_sequenceManager2, NULL, 4002, &scene->_miranda, NULL);
break;
case 2:
_globals->_player.disableControl();
- ADD_MOVER(scene->_hotspot9, _globals->_player._position.x + 30, _globals->_player._position.y - 5);
+ ADD_MOVER(scene->_guardRock, _globals->_player._position.x + 30, _globals->_player._position.y - 5);
break;
case 3:
scene->_stripManager.start(_globals->getFlag(35) ? 4500 : 4502, this);
break;
case 4:
_globals->clearFlag(35);
- ADD_MOVER_NULL(scene->_hotspot9, 292, 138);
+ ADD_MOVER_NULL(scene->_guardRock, 292, 138);
ADD_PLAYER_MOVER(283, 147);
- if (!_globals->getFlag(36)) {
- ADD_PLAYER_MOVER_NULL(scene->_hotspot7, 280, 150);
- }
+ if (!_globals->getFlag(36))
+ ADD_PLAYER_MOVER_NULL(scene->_miranda, 280, 150);
+ RING_INVENTORY._ale._sceneNumber = 4100;
break;
case 5:
_globals->_sceneManager.changeScene(4100);
@@ -295,20 +300,21 @@ void Scene4000::Action6::signal() {
}
void Scene4000::Action7::signal() {
+ // Climb down left Chimney using a rope
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
case 0:
_globals->_player.disableControl();
- scene->_hotspot6.setFrame(1);
+ scene->_rope.setFrame(1);
ADD_MOVER(_globals->_player, 247, 53);
break;
case 1:
_globals->_player.setVisage(4008);
_globals->_player.setStrip(4);
_globals->_player.setFrame(1);
- _globals->_player.setPriority2(16);
+ _globals->_player.fixPriority(16);
_globals->_player.setPosition(Common::Point(260, 55));
_globals->_player.animate(ANIM_MODE_5, this);
break;
@@ -325,7 +331,7 @@ void Scene4000::Action8::signal() {
case 0:
_globals->_player.disableControl();
if (_globals->getFlag(41))
- scene->_hotspot6.setFrame(2);
+ scene->_rope.setFrame(2);
ADD_MOVER(_globals->_player, 289, 53);
break;
@@ -343,16 +349,16 @@ void Scene4000::Action8::signal() {
break;
case 3:
_globals->_soundHandler.startSound(170);
- scene->_hotspot27.setVisage(4000);
- scene->_hotspot27.setStrip(6);
- scene->_hotspot27.animate(ANIM_MODE_2, NULL);
+ 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);
break;
case 5:
- _globals->_game.endGame(4000, 15);
+ _globals->_game->endGame(4000, 15);
remove();
break;
}
@@ -388,7 +394,7 @@ void Scene4000::Action11::signal() {
switch (_actionIndex++) {
case 0:
_globals->_player.disableControl();
- ADD_MOVER(scene->_hotspot3, -30, 70);
+ ADD_MOVER(scene->_lander, -30, 70);
break;
case 1:
setDelay(60);
@@ -403,23 +409,23 @@ void Scene4000::Action11::signal() {
setAction(&scene->_sequenceManager1, this, 4001, &_globals->_player, NULL);
- scene->_hotspot7.setPosition(Common::Point(-210, 139));
- scene->_hotspot7.setAction(&scene->_sequenceManager2, NULL, 4002, &scene->_hotspot7, NULL);
- scene->_hotspot3.setAction(&scene->_sequenceManager3, NULL, 4003, &scene->_hotspot5, NULL);
+ scene->_miranda.setPosition(Common::Point(-210, 139));
+ scene->_miranda.setAction(&scene->_sequenceManager2, NULL, 4002, &scene->_miranda, NULL);
+ scene->_lander.setAction(&scene->_sequenceManager3, NULL, 4003, &scene->_hotspot5, NULL);
break;
case 3:
scene->_stripManager.start(8000, this);
break;
case 4:
- ADD_MOVER(scene->_hotspot4, 263, 187);
- scene->_hotspot4.animate(ANIM_MODE_1, NULL);
+ ADD_MOVER(scene->_olo, 263, 187);
+ scene->_olo.animate(ANIM_MODE_1, NULL);
break;
case 5:
scene->_soundHandler1.proc3();
- scene->_hotspot11.remove();
+ scene->_forceField.remove();
ADD_MOVER(_globals->_player, 340, 163);
- ADD_MOVER_NULL(scene->_hotspot7, 340, 169);
+ ADD_MOVER_NULL(scene->_miranda, 340, 169);
ADD_MOVER_NULL(scene->_hotspot5, 340, 165);
break;
case 6:
@@ -444,7 +450,7 @@ void Scene4000::Action12::signal() {
_globals->setFlag(32);
if (scene->_stripManager._field2E8 == 275) {
_globals->setFlag(82);
- ADD_MOVER_NULL(scene->_hotspot9, 292, 138);
+ ADD_MOVER_NULL(scene->_guardRock, 292, 138);
ADD_PLAYER_MOVER(283, 147);
} else {
setDelay(30);
@@ -454,11 +460,11 @@ void Scene4000::Action12::signal() {
if (scene->_stripManager._field2E8 == 275) {
_globals->_sceneManager.changeScene(4100);
} else {
- ADD_PLAYER_MOVER_THIS(scene->_hotspot9, 300, 132);
+ ADD_PLAYER_MOVER_THIS(scene->_guardRock, 300, 132);
}
break;
case 4:
- scene->_hotspot9.hide();
+ scene->_guardRock.hide();
scene->_stripManager.start(4020, this);
break;
case 5:
@@ -480,7 +486,7 @@ void Scene4000::Action13::signal() {
case 1:
scene->_soundHandler2.startSound(151);
scene->_soundHandler2.proc5(true);
- ADD_MOVER(scene->_hotspot3, -30, 70);
+ ADD_MOVER(scene->_lander, -30, 70);
break;
case 2:
scene->_soundHandler2.proc4();
@@ -491,7 +497,7 @@ void Scene4000::Action13::signal() {
/*--------------------------------------------------------------------------*/
-void Scene4000::Hotspot7::doAction(int action) {
+void Scene4000::Miranda::doAction(int action) {
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -545,7 +551,7 @@ void Scene4000::Hotspot8::doAction(int action) {
SceneItem::display2(4000, 25);
break;
case CURSOR_TALK:
- if (_globals->_inventory._peg._sceneNumber == 1)
+ if (RING_INVENTORY._peg._sceneNumber == 1)
SceneItem::display2(4000, 34);
else {
switch (_ctr) {
@@ -577,7 +583,7 @@ void Scene4000::Hotspot8::doAction(int action) {
}
}
-void Scene4000::Hotspot9::doAction(int action) {
+void Scene4000::GuardRock::doAction(int action) {
switch (action) {
case OBJECT_STUNNER:
SceneItem::display2(4000, 28);
@@ -594,7 +600,7 @@ void Scene4000::Hotspot9::doAction(int action) {
}
}
-void Scene4000::Hotspot10::doAction(int action) {
+void Scene4000::Ladder::doAction(int action) {
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -608,7 +614,7 @@ void Scene4000::Hotspot10::doAction(int action) {
scene->setAction(&scene->_sequenceManager1, scene, 4005, &_globals->_player, NULL);
} else {
scene->_sceneMode = 4004;
- scene->setAction(&scene->_sequenceManager1, scene, 4004, &_globals->_player, &scene->_hotspot10, NULL);
+ scene->setAction(&scene->_sequenceManager1, scene, 4004, &_globals->_player, &scene->_ladder, NULL);
}
break;
default:
@@ -617,7 +623,7 @@ void Scene4000::Hotspot10::doAction(int action) {
}
}
-void Scene4000::Hotspot12::doAction(int action) {
+void Scene4000::TheTech::doAction(int action) {
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -635,7 +641,7 @@ void Scene4000::Hotspot12::doAction(int action) {
SceneItem::display2(4000, 37);
else {
_globals->_player.disableControl();
- if (_globals->_sceneObjects->contains(&scene->_hotspot7))
+ if (_globals->_sceneObjects->contains(&scene->_miranda))
_globals->clearFlag(96);
scene->_sceneMode = 4012;
@@ -649,6 +655,7 @@ void Scene4000::Hotspot12::doAction(int action) {
}
void Scene4000::Hotspot13::doAction(int action) {
+ // Rock
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -680,24 +687,27 @@ void Scene4000::Hotspot::doAction(int action) {
case OBJECT_STUNNER:
SceneItem::display2(4000, 18);
break;
- case OBJECT_LADDER:
+ case OBJECT_LADDER: {
_globals->_player.disableControl();
- scene->_hotspot10.postInit();
- scene->_hotspot10.setVisage(4000);
- scene->_hotspot10.setStrip(5);
- scene->_hotspot10.setPosition(Common::Point(245, 147));
- scene->_hotspot10.hide();
- _globals->_sceneItems.push_front(&scene->_hotspot10);
+ scene->_ladder.postInit();
+ scene->_ladder.setVisage(4000);
+ scene->_ladder.setStrip(5);
+ scene->_ladder.setPosition(Common::Point(245, 147));
+ scene->_ladder.hide();
+ _globals->_sceneItems.push_front(&scene->_ladder);
if (_globals->_sceneObjects->contains(&scene->_hotspot8)) {
scene->_hotspot8.setAction(NULL);
- ADD_MOVER_NULL(scene->_hotspot8, 118, 145);
+ Common::Point pt(118, 145);
+ NpcMover *mover = new NpcMover();
+ scene->_hotspot18.addMover(mover, &pt, NULL);
}
scene->_sceneMode = 4004;
- scene->setAction(&scene->_sequenceManager1, scene, 4011, &_globals->_player, &scene->_hotspot10, NULL);
+ scene->setAction(&scene->_sequenceManager1, scene, 4011, &_globals->_player, &scene->_ladder, NULL);
break;
+ }
default:
SceneHotspot::doAction(action);
break;
@@ -705,6 +715,7 @@ void Scene4000::Hotspot::doAction(int action) {
}
void Scene4000::Hotspot17::doAction(int action) {
+ // Left Chimney
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -724,6 +735,7 @@ void Scene4000::Hotspot17::doAction(int action) {
}
void Scene4000::Hotspot18::doAction(int action) {
+ // Right Chimney
Scene4000 *scene = (Scene4000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -756,7 +768,7 @@ void Scene4000::Hotspot23::doAction(int action) {
/*--------------------------------------------------------------------------*/
Scene4000::Scene4000() :
- _hotspot11(0, CURSOR_LOOK, 4000, 14, CURSOR_USE, 4000, 32, OBJECT_STUNNER, 4000, 33,
+ _forceField(0, CURSOR_LOOK, 4000, 14, CURSOR_USE, 4000, 32, OBJECT_STUNNER, 4000, 33,
OBJECT_SCANNER, 4000, 19, LIST_END),
_hotspot19(0, CURSOR_LOOK, 4000, 7, LIST_END),
_hotspot20(0, CURSOR_LOOK, 4000, 3, LIST_END),
@@ -786,14 +798,14 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_stripManager.addSpeaker(&_speakerSText);
_stripManager.addSpeaker(&_speakerMText);
- _speakerCHFText._npc = &_hotspot9;
+ _speakerCHFText._npc = &_guardRock;
_speakerSText._npc = &_hotspot5;
- _speakerMText._npc = &_hotspot7;
- _speakerPText._npc = &_hotspot4;
+ _speakerMText._npc = &_miranda;
+ _speakerPText._npc = &_olo;
_speakerQText._npc = &_globals->_player;
_hotspot13.setBounds(Rect(263, 41, 278, 55));
- _hotspot14.setBounds(Rect(140, 177, 140 /*96*/, 204));
+ _hotspot14.setBounds(Rect(96 /*140*/, 177, 140 /*96*/, 204));
_hotspot15.setBounds(Rect(227, 101, 264, 143));
_hotspot16.setBounds(Rect(306, 100, 319, 148));
_hotspot17.setBounds(Rect(231, 53, 254, 60));
@@ -808,22 +820,23 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_hotspot20._sceneRegionId = 18;
_hotspot25._sceneRegionId = 17;
- _hotspot1.postInit();
- _hotspot1.setVisage(4000);
- _hotspot1.setPriority2(1);
- _hotspot1.setFrame(2);
- _hotspot1.setPosition(Common::Point(242, 59));
- _hotspot1.animate(ANIM_MODE_2, NULL);
-
- _hotspot27.postInit();
- _hotspot27.setVisage(4000);
- _hotspot27.setStrip(2);
- _hotspot27.setPriority2(1);
- _hotspot27.setFrame(2);
- _hotspot27.setPosition(Common::Point(299, 59));
- _hotspot27.animate(ANIM_MODE_2, NULL);
-
- if (_globals->_inventory._ladder._sceneNumber != 4000) {
+ _smoke1.postInit();
+ _smoke1.setVisage(4000);
+ _smoke1.fixPriority(1);
+ _smoke1.setFrame(2);
+ _smoke1.setPosition(Common::Point(242, 59));
+ _smoke1.animate(ANIM_MODE_2, NULL);
+
+ _smoke2.postInit();
+ _smoke2.setVisage(4000);
+ _smoke2.setStrip(2);
+ _smoke2.fixPriority(1);
+ _smoke2.setFrame(2);
+ _smoke2.setPosition(Common::Point(299, 59));
+ _smoke2.animate(ANIM_MODE_2, NULL);
+
+ if (RING_INVENTORY._ladder._sceneNumber != 4000) {
+ // if ladder is not in the scene, activate the hotspot on the wall
_hotspot8.postInit();
_hotspot8.setVisage(4018);
_hotspot8.setObjectWrapper(new SceneObjectWrapper());
@@ -833,24 +846,24 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_hotspot8.setAction(&_action9);
}
- _hotspot12.postInit();
- _hotspot12.setVisage(4000);
- _hotspot12.setStrip(3);
- _hotspot12.setFrame(3);
- _hotspot12.setPriority2(200);
- _hotspot12.setPosition(Common::Point(281, 176));
+ _theTech.postInit();
+ _theTech.setVisage(4000);
+ _theTech.setStrip(3);
+ _theTech.setFrame(3);
+ _theTech.fixPriority(200);
+ _theTech.setPosition(Common::Point(281, 176));
if (_globals->getFlag(34)) {
_soundHandler1.startSound(156);
- _hotspot11.postInit();
- _hotspot11.setVisage(4000);
- _hotspot11.setStrip(4);
- _hotspot11.setPosition(Common::Point(312, 174));
- _hotspot11.setPriority2(200);
- _hotspot11.animate(ANIM_MODE_8, 0, NULL);
+ _forceField.postInit();
+ _forceField.setVisage(4000);
+ _forceField.setStrip(4);
+ _forceField.setPosition(Common::Point(312, 174));
+ _forceField.fixPriority(200);
+ _forceField.animate(ANIM_MODE_8, 0, NULL);
- _globals->_sceneItems.push_back(&_hotspot11);
+ _globals->_sceneItems.push_back(&_forceField);
}
_globals->_player.postInit();
@@ -860,26 +873,28 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.setPosition(Common::Point(-28, 86));
if (!_globals->getFlag(36) && !_globals->getFlag(43)) {
- _hotspot7.postInit();
- _hotspot7.setVisage(2701);
- _hotspot7.animate(ANIM_MODE_1, NULL);
- _hotspot7.setObjectWrapper(new SceneObjectWrapper());
- _hotspot7._moveDiff = Common::Point(4, 2);
- _hotspot7.setPosition(Common::Point(-210, 139));
-
- _globals->_sceneItems.push_back(&_hotspot7);
+ _miranda.postInit();
+ _miranda.setVisage(2701);
+ _miranda.animate(ANIM_MODE_1, NULL);
+ _miranda.setObjectWrapper(new SceneObjectWrapper());
+ _miranda._moveDiff = Common::Point(4, 2);
+ _miranda.setPosition(Common::Point(-210, 139));
+
+ _globals->_sceneItems.push_back(&_miranda);
}
+ _globals->clearFlag(40);
+
switch (_globals->_sceneManager._previousScene) {
case 2320:
_globals->_soundHandler.startSound(155);
- if (_globals->_inventory._ale._sceneNumber == 1) {
- _hotspot9.postInit();
- _hotspot9.setVisage(4001);
- _hotspot9.animate(ANIM_MODE_1, NULL);
- _hotspot9.setObjectWrapper(new SceneObjectWrapper());
- _hotspot9.setPosition(Common::Point(314, 132));
+ if (RING_INVENTORY._ale._sceneNumber == 1) {
+ _guardRock.postInit();
+ _guardRock.setVisage(4001);
+ _guardRock.animate(ANIM_MODE_1, NULL);
+ _guardRock.setObjectWrapper(new SceneObjectWrapper());
+ _guardRock.setPosition(Common::Point(314, 132));
setAction(&_action6);
} else {
@@ -888,7 +903,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager1, this, 4001, &_globals->_player, NULL);
if (!_globals->getFlag(36) && !_globals->getFlag(43))
- _hotspot7.setAction(&_sequenceManager2, NULL, 4002, &_hotspot7, NULL);
+ _miranda.setAction(&_sequenceManager2, NULL, 4002, &_miranda, NULL);
}
if (_globals->getFlag(42))
@@ -898,13 +913,13 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
break;
case 4010:
- _hotspot7.setPosition(Common::Point(-210, 139));
+ _miranda.setPosition(Common::Point(-210, 139));
- _hotspot9.postInit();
- _hotspot9.setVisage(4001);
- _hotspot9.animate(ANIM_MODE_1, NULL);
- _hotspot9.setObjectWrapper(new SceneObjectWrapper());
- _hotspot9.setPosition(Common::Point(314, 132));
+ _guardRock.postInit();
+ _guardRock.setVisage(4001);
+ _guardRock.animate(ANIM_MODE_1, NULL);
+ _guardRock.setObjectWrapper(new SceneObjectWrapper());
+ _guardRock.setPosition(Common::Point(314, 132));
_hotspot2.postInit();
_hotspot2.setVisage(4018);
@@ -917,25 +932,25 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
break;
case 4025:
- if (_globals->_inventory._ladder._sceneNumber != 4000)
+ if (RING_INVENTORY._ladder._sceneNumber == 4000)
_hotspot8.remove();
_globals->_player.setPosition(Common::Point(260, 185));
if (!_globals->getFlag(36) && !_globals->getFlag(43))
- _hotspot7.setPosition(Common::Point(246, 146));
+ _miranda.setPosition(Common::Point(246, 146));
if (_globals->getFlag(96)) {
- _hotspot4.postInit();
- _hotspot4.setVisage(4006);
- _hotspot4.animate(ANIM_MODE_1, NULL);
- _hotspot4.setObjectWrapper(new SceneObjectWrapper());
- _hotspot4.setPosition(Common::Point(290, 163));
+ _olo.postInit();
+ _olo.setVisage(4006);
+ _olo.animate(ANIM_MODE_1, NULL);
+ _olo.setObjectWrapper(new SceneObjectWrapper());
+ _olo.setPosition(Common::Point(290, 163));
}
if (_globals->_stripNum == 4025) {
_soundHandler1.startSound(182);
- _hotspot11.remove();
+ _forceField.remove();
_hotspot5.postInit();
_hotspot5.setVisage(2801);
@@ -947,15 +962,15 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.disableControl();
if (!_globals->getFlag(96)) {
- _hotspot4.postInit();
- _hotspot4.setVisage(4006);
- _hotspot4.animate(ANIM_MODE_1, NULL);
- _hotspot4.setObjectWrapper(new SceneObjectWrapper());
- _hotspot4.setPosition(Common::Point(195, 128));
+ _olo.postInit();
+ _olo.setVisage(4006);
+ _olo.animate(ANIM_MODE_1, NULL);
+ _olo.setObjectWrapper(new SceneObjectWrapper());
+ _olo.setPosition(Common::Point(195, 128));
Common::Point pt(268, 157);
PlayerMover *mover = new PlayerMover();
- _hotspot4.addMover(mover, &pt, NULL);
+ _olo.addMover(mover, &pt, NULL);
}
_sceneMode = 4003;
@@ -963,7 +978,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
} else if (_globals->getFlag(96)) {
_globals->_player.disableControl();
_sceneMode = 4013;
- setAction(&_sequenceManager1, this, 4013, &_hotspot4, NULL);
+ setAction(&_sequenceManager1, this, 4013, &_olo, NULL);
}
_globals->clearFlag(96);
@@ -972,7 +987,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
case 4045:
_globals->_player.enableControl();
- if (_globals->_inventory._ladder._sceneNumber != 4000) {
+ if (RING_INVENTORY._ladder._sceneNumber != 4000) {
_hotspot8.postInit();
_hotspot8.setVisage(4017);
_hotspot8.animate(ANIM_MODE_1, NULL);
@@ -982,16 +997,16 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.setPosition(Common::Point(208, 153));
if (!_globals->getFlag(36) && !_globals->getFlag(43))
- _hotspot7.setPosition(Common::Point(246, 146));
+ _miranda.setPosition(Common::Point(246, 146));
if (_globals->getFlag(39)) {
_globals->clearFlag(39);
- _hotspot4.postInit();
- _hotspot4.setVisage(4006);
- _hotspot4.animate(ANIM_MODE_1, NULL);
- _hotspot4.setObjectWrapper(new SceneObjectWrapper());
- _hotspot4.setPosition(Common::Point(219, 150));
+ _olo.postInit();
+ _olo.setVisage(4006);
+ _olo.animate(ANIM_MODE_1, NULL);
+ _olo.setObjectWrapper(new SceneObjectWrapper());
+ _olo.setPosition(Common::Point(219, 150));
_globals->_player.disableControl();
setAction(&_sequenceManager1, this, 4010, &_globals->_player, NULL);
@@ -1000,12 +1015,12 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
if (_globals->_stripNum == 4000) {
_globals->_stripNum = 0;
- _hotspot9.postInit();
- _hotspot9.setVisage(4001);
- _hotspot9.animate(ANIM_MODE_1, NULL);
- _hotspot9.setObjectWrapper(new SceneObjectWrapper());
- _hotspot9.setPosition(Common::Point(231, 159));
- _hotspot9.setStrip(4);
+ _guardRock.postInit();
+ _guardRock.setVisage(4001);
+ _guardRock.animate(ANIM_MODE_1, NULL);
+ _guardRock.setObjectWrapper(new SceneObjectWrapper());
+ _guardRock.setPosition(Common::Point(231, 159));
+ _guardRock.setStrip(4);
setAction(&_action12);
}
@@ -1019,7 +1034,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(4008);
_globals->_player.setStrip(4);
_globals->_player.setFrame(_globals->_player.getFrameCount());
- _globals->_player.setPriority2(16);
+ _globals->_player.fixPriority(16);
_globals->_player.setPosition(Common::Point(260, 55));
_sceneMode = 4007;
@@ -1029,7 +1044,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.enableControl();
}
- if (_globals->_inventory._ladder._sceneNumber != 4000)
+ if (RING_INVENTORY._ladder._sceneNumber != 4000)
_hotspot8.remove();
break;
@@ -1037,7 +1052,7 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_globals->_player.enableControl();
_globals->_player.setPosition(Common::Point(270, 155));
- if (_globals->getFlag(42) && (_globals->_inventory._ladder._sceneNumber != 4000)) {
+ if (_globals->getFlag(42) && (RING_INVENTORY._ladder._sceneNumber != 4000)) {
_hotspot8.setVisage(4017);
_hotspot8.animate(ANIM_MODE_1, NULL);
_hotspot8.setPosition(Common::Point(244, 151));
@@ -1045,42 +1060,42 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
}
if (!_globals->getFlag(36) && !_globals->getFlag(43))
- _hotspot7.setPosition(Common::Point(246, 146));
+ _miranda.setPosition(Common::Point(246, 146));
break;
default:
_globals->_soundHandler.startSound(155);
- _hotspot3.postInit();
- _hotspot3.setVisage(4002);
- _hotspot3._moveDiff = Common::Point(10, 10);
- _hotspot3.setPosition(Common::Point(-100, 80));
- _hotspot3.changeZoom(-1);
- _hotspot3.setPosition(Common::Point(130, -1));
- _hotspot3.animate(ANIM_MODE_2, NULL);
+ _lander.postInit();
+ _lander.setVisage(4002);
+ _lander._moveDiff = Common::Point(10, 10);
+ _lander.setPosition(Common::Point(-100, 80));
+ _lander.changeZoom(-1);
+ _lander.setPosition(Common::Point(130, -1));
+ _lander.animate(ANIM_MODE_2, NULL);
if (_globals->_stripNum == 9000) {
- _hotspot4.postInit();
- _hotspot4.setVisage(4006);
- _hotspot4.setPosition(Common::Point(235, 153));
+ _olo.postInit();
+ _olo.setVisage(4006);
+ _olo.setPosition(Common::Point(235, 153));
- _hotspot9.postInit();
- _hotspot9.setVisage(4001);
- _hotspot9.setStrip(3);
- _hotspot9.setPosition(Common::Point(255, 153));
+ _guardRock.postInit();
+ _guardRock.setVisage(4001);
+ _guardRock.setStrip(3);
+ _guardRock.setPosition(Common::Point(255, 153));
setAction(&_action11);
- _globals->_inventory._ladder._sceneNumber = 4100;
- _globals->_inventory._rope._sceneNumber = 4150;
+ RING_INVENTORY._ladder._sceneNumber = 4100;
+ RING_INVENTORY._rope._sceneNumber = 4150;
_soundHandler1.startSound(156);
- _hotspot11.postInit();
- _hotspot11.setVisage(4000);
- _hotspot11.setStrip(4);
- _hotspot11.setPosition(Common::Point(312, 174));
- _hotspot11.setPriority2(200);
- _hotspot11.animate(ANIM_MODE_8, 0, NULL);
+ _forceField.postInit();
+ _forceField.setVisage(4000);
+ _forceField.setStrip(4);
+ _forceField.setPosition(Common::Point(312, 174));
+ _forceField.fixPriority(200);
+ _forceField.animate(ANIM_MODE_8, 0, NULL);
} else {
if (!_globals->getFlag(37)) {
_hotspot2.postInit();
@@ -1090,32 +1105,32 @@ void Scene4000::postInit(SceneObjectList *OwnerList) {
_hotspot2.setPosition(Common::Point(182, 146));
_hotspot2.setAction(&_action10);
}
-
- _hotspot7.setPosition(Common::Point(-210, 139));
+ _miranda.setPosition(Common::Point(-210, 139));
setAction(&_action13);
}
+
break;
}
- if (_globals->_inventory._ladder._sceneNumber == 4000) {
- _hotspot10.postInit();
- _hotspot10.setVisage(4000);
- _hotspot10.setStrip(5);
- _hotspot10.setPosition(Common::Point(245, 147));
+ if (RING_INVENTORY._ladder._sceneNumber == 4000) {
+ _ladder.postInit();
+ _ladder.setVisage(4000);
+ _ladder.setStrip(5);
+ _ladder.setPosition(Common::Point(245, 147));
- _globals->_sceneItems.push_back(&_hotspot10);
+ _globals->_sceneItems.push_back(&_ladder);
}
- if (_globals->_inventory._rope._sceneNumber == 4000) {
- _hotspot6.postInit();
- _hotspot6.setVisage(4000);
- _hotspot6.setStrip(7);
- _hotspot6.setPriority2(1);
- _hotspot6.setPosition(Common::Point(268, 44));
+ if (RING_INVENTORY._rope._sceneNumber == 4000) {
+ _rope.postInit();
+ _rope.setVisage(4000);
+ _rope.setStrip(7);
+ _rope.fixPriority(1);
+ _rope.setPosition(Common::Point(268, 44));
}
_globals->_sceneItems.addItems(&_hotspot8, &_hotspot17, &_hotspot18, &_hotspot14, &_hotspot15,
- &_hotspot16, &_hotspot12, &_hotspot13, &_hotspot21, &_hotspot20, &_hotspot22, &_hotspot23,
+ &_hotspot16, &_theTech, &_hotspot13, &_hotspot21, &_hotspot20, &_hotspot22, &_hotspot23,
&_hotspot24, &_hotspot25, &_hotspot19, &_hotspot26, NULL);
}
@@ -1132,9 +1147,10 @@ void Scene4000::signal() {
setAction(&_sequenceManager1, this, 4014, &_globals->_player, &_hotspot5, NULL);
break;
case 4004:
- _globals->_inventory._ladder._sceneNumber = 4000;
+ RING_INVENTORY._ladder._sceneNumber = 4000;
// Deliberate fall-through
case 4007:
+ _globals->_player._uiEnabled = true;
_globals->_events.setCursor(CURSOR_USE);
_globals->setFlag(40);
break;
@@ -1154,21 +1170,21 @@ void Scene4000::signal() {
break;
case 4010:
_globals->setFlag(38);
- _hotspot4.remove();
+ _olo.remove();
break;
case 4012:
- _globals->_player.checkAngle(&_hotspot12);
+ _globals->_player.checkAngle(&_theTech);
_globals->_sceneManager.changeScene(4025);
break;
case 4013:
_globals->_player.enableControl();
- _hotspot4.remove();
+ _olo.remove();
break;
case 4014:
_globals->_sceneManager.changeScene(4250);
break;
case 4015:
- ADD_MOVER_NULL(_hotspot7, 0, _hotspot7._position.y - 5);
+ ADD_MOVER_NULL(_miranda, 0, _miranda._position.y - 5);
break;
}
}
@@ -1177,38 +1193,38 @@ void Scene4000::dispatch() {
Scene::dispatch();
if ((_globals->_player.getRegionIndex() == 10) || (_globals->_player.getRegionIndex() == 6))
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
if (_globals->_player.getRegionIndex() == 11)
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
if (_globals->_player.getRegionIndex() == 5)
- _globals->_player.setPriority2(94);
+ _globals->_player.fixPriority(94);
if (_globals->_sceneObjects->contains(&_hotspot5)) {
if ((_hotspot5.getRegionIndex() == 10) || (_hotspot5.getRegionIndex() == 6))
- _hotspot5.setPriority2(200);
+ _hotspot5.fixPriority(200);
if (_hotspot5.getRegionIndex() == 11)
- _hotspot5.setPriority2(-1);
+ _hotspot5.fixPriority(-1);
if (_hotspot5.getRegionIndex() == 5)
- _hotspot5.setPriority2(94);
+ _hotspot5.fixPriority(94);
}
- if (_globals->_sceneObjects->contains(&_hotspot7)) {
- if (!_hotspot7._mover)
- _hotspot7.checkAngle(&_globals->_player);
+ if (_globals->_sceneObjects->contains(&_miranda)) {
+ if (!_miranda._mover)
+ _miranda.checkAngle(&_globals->_player);
if (!_action && _globals->_player.getRegionIndex() == 23) {
- ADD_MOVER_NULL(_hotspot7, 204, 186);
+ ADD_MOVER_NULL(_miranda, 204, 186);
}
- if ((_hotspot7.getRegionIndex() == 10) || (_hotspot7.getRegionIndex() == 6))
- _hotspot7.setPriority2(200);
- if (_hotspot7.getRegionIndex() == 11)
- _hotspot7.setPriority2(-1);
- if (_hotspot7.getRegionIndex() == 5)
- _hotspot7.setPriority2(94);
+ if ((_miranda.getRegionIndex() == 10) || (_miranda.getRegionIndex() == 6))
+ _miranda.fixPriority(200);
+ if (_miranda.getRegionIndex() == 11)
+ _miranda.fixPriority(-1);
+ if (_miranda.getRegionIndex() == 5)
+ _miranda.fixPriority(94);
}
if (!_action) {
- if ((_globals->_inventory._peg._sceneNumber == 1) && _globals->getFlag(34) &&
+ if ((RING_INVENTORY._peg._sceneNumber == 1) && _globals->getFlag(34) &&
_globals->getFlag(37) && !_globals->getFlag(40)) {
_globals->_player.disableControl();
_soundHandler1.startSound(177);
@@ -1222,16 +1238,16 @@ void Scene4000::dispatch() {
if (_globals->_player.getRegionIndex() == 15)
_globals->_sceneManager.changeScene(4100);
- if ((_globals->_player._position.x > 5) && (_globals->_player._position.y < 100)) {
+ if ((_globals->_player._position.x <= 5) && (_globals->_player._position.y < 100)) {
_globals->_player.disableControl();
- if (!_globals->_sceneObjects->contains(&_hotspot7) || (_hotspot7._position.y <= 100)) {
+ if (!_globals->_sceneObjects->contains(&_miranda) || (_miranda._position.y <= 100)) {
_sceneMode = 4008;
setAction(&_sequenceManager1, this, 4008, &_globals->_player, NULL);
} else {
_sceneMode = 4015;
_globals->_player.addMover(NULL);
- setAction(&_sequenceManager1, this, 4015, &_globals->_player, &_hotspot7, NULL);
+ setAction(&_sequenceManager1, this, 4015, &_globals->_player, &_miranda, NULL);
}
}
}
@@ -1398,8 +1414,8 @@ void Scene4025::Action3::signal() {
/*--------------------------------------------------------------------------*/
-void Scene4025::Hole::synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+void Scene4025::Hole::synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
SYNC_POINTER(_pegPtr);
s.syncAsSint16LE(_armStrip);
s.syncAsSint16LE(_newPosition.x);
@@ -1426,7 +1442,7 @@ void Scene4025::Hole::doAction(int action) {
if (!scene->_pegPtr2) {
_globals->_player.disableControl();
_globals->_events.setCursor(CURSOR_USE);
- _globals->_inventory._peg._sceneNumber = 4025;
+ RING_INVENTORY._peg._sceneNumber = 4025;
scene->_pegPtr = &scene->_peg5;
scene->_holePtr = this;
@@ -1442,8 +1458,8 @@ void Scene4025::Hole::doAction(int action) {
}
}
-void Scene4025::Peg::synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+void Scene4025::Peg::synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsSint16LE(_field88);
SYNC_POINTER(_armStrip);
}
@@ -1513,6 +1529,7 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_peg5.setFrame(5);
_peg5.hide();
+ // Hole N-W
_hole1.postInit();
_hole1.setVisage(4025);
_hole1.setStrip(1);
@@ -1522,6 +1539,7 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole1._newPosition = Common::Point(123, 44);
_hole1._armStrip = 8;
+ // Hole N-E
_hole2.postInit();
_hole2.setVisage(4025);
_hole2.setStrip(1);
@@ -1531,6 +1549,7 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole2._newPosition = Common::Point(166, 44);
_hole2._armStrip = 7;
+ // Hole Center
_hole3.postInit();
_hole3.setVisage(4025);
_hole3.setStrip(1);
@@ -1540,15 +1559,17 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole3._newPosition = Common::Point(145, 60);
_hole3._armStrip = 6;
+ // Hole S-W
_hole4.postInit();
_hole4.setVisage(4025);
_hole4.setStrip(1);
- _hole4.setFrame2(6);
+ _hole4.setFrame2(9);
_hole4.setPosition(Common::Point(123, 87));
_hole4._pegPtr = NULL;
_hole4._newPosition = Common::Point(123, 80);
_hole4._armStrip = 5;
+ // Hole S-E
_hole5.postInit();
_hole5.setVisage(4025);
_hole5.setStrip(1);
@@ -1558,11 +1579,11 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_hole5._newPosition = Common::Point(166, 80);
_hole5._armStrip = 4;
- _hole1.setPriority2(1);
- _hole2.setPriority2(1);
- _hole3.setPriority2(1);
- _hole4.setPriority2(1);
- _hole5.setPriority2(1);
+ _hole1.fixPriority(1);
+ _hole2.fixPriority(1);
+ _hole3.fixPriority(1);
+ _hole4.fixPriority(1);
+ _hole5.fixPriority(1);
_armHotspot.postInit();
_armHotspot.setVisage(4025);
@@ -1578,8 +1599,8 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
setAction(&_sequenceManager, this, 4026, NULL);
}
-void Scene4025::synchronise(Serialiser &s) {
- Scene::synchronise(s);
+void Scene4025::synchronize(Serializer &s) {
+ Scene::synchronize(s);
SYNC_POINTER(_pegPtr);
SYNC_POINTER(_pegPtr2);
SYNC_POINTER(_holePtr);
@@ -1594,7 +1615,7 @@ void Scene4025::signal() {
if (_sceneMode != 4027) {
if (_sceneMode != 4028) {
_gfxButton.setText(EXIT_MSG);
- _gfxButton._bounds.centre(144, 107);
+ _gfxButton._bounds.center(144, 107);
_gfxButton.draw();
_gfxButton._bounds.expandPanes();
}
@@ -1609,8 +1630,8 @@ void Scene4025::process(Event &event) {
Scene::process(event);
if (_gfxButton.process(event)) {
- if (_globals->_inventory._peg._sceneNumber == 4025)
- _globals->_inventory._peg._sceneNumber = 1;
+ if (RING_INVENTORY._peg._sceneNumber == 4025)
+ RING_INVENTORY._peg._sceneNumber = 1;
_globals->_sceneManager.changeScene(4000);
}
@@ -1642,7 +1663,7 @@ void Scene4045::Action1::signal() {
scene->_stripManager.start(4040, this, scene);
break;
case 2:
- scene->_hotspot5.animate(ANIM_MODE_NONE, NULL);
+ scene->_olloFace.animate(ANIM_MODE_NONE, NULL);
scene->_hotspot4.animate(ANIM_MODE_5, this);
break;
case 3:
@@ -1674,7 +1695,7 @@ void Scene4045::Action2::signal() {
scene->_stripManager.start(_globals->_stripNum, this, scene);
break;
case 2:
- scene->_hotspot5.animate(ANIM_MODE_NONE, NULL);
+ scene->_olloFace.animate(ANIM_MODE_NONE, NULL);
setDelay(10);
break;
case 3:
@@ -1705,7 +1726,7 @@ void Scene4045::Action3::signal() {
break;
case 2:
scene->_hotspot4.animate(ANIM_MODE_6, NULL);
- scene->_hotspot5.animate(ANIM_MODE_NONE, NULL);
+ scene->_olloFace.animate(ANIM_MODE_NONE, NULL);
ADD_MOVER(_globals->_player, 91, 1264);
break;
case 3:
@@ -1717,7 +1738,7 @@ void Scene4045::Action3::signal() {
/*--------------------------------------------------------------------------*/
-void Scene4045::Hotspot1::doAction(int action) {
+void Scene4045::OlloStand::doAction(int action) {
Scene4045 *scene = (Scene4045 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1733,7 +1754,7 @@ void Scene4045::Hotspot1::doAction(int action) {
case CURSOR_TALK:
if (_strip == 5) {
setStrip(6);
- animate(ANIM_MODE_NONE, 0);
+ animate(ANIM_MODE_NONE, NULL);
}
if (_globals->_player._position.y < 135) {
scene->_sceneMode = 4046;
@@ -1759,7 +1780,7 @@ void Scene4045::Hotspot1::doAction(int action) {
}
}
-void Scene4045::Hotspot2::doAction(int action) {
+void Scene4045::Miranda::doAction(int action) {
Scene4045 *scene = (Scene4045 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1777,7 +1798,7 @@ void Scene4045::Hotspot2::doAction(int action) {
}
}
-void Scene4045::Hotspot6::doAction(int action) {
+void Scene4045::Necklace::doAction(int action) {
Scene4045 *scene = (Scene4045 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1787,13 +1808,13 @@ void Scene4045::Hotspot6::doAction(int action) {
case CURSOR_USE:
if (_globals->_player._position.y < 135) {
SceneItem::display2(4045, 16);
- _globals->_inventory._peg._sceneNumber = 1;
+ RING_INVENTORY._peg._sceneNumber = 1;
_globals->_events.setCursor(CURSOR_WALK);
remove();
} else {
scene->_sceneMode = 4047;
_globals->_player.disableControl();
- scene->setAction(&scene->_sequenceManager, scene, 4047, &_globals->_player, &scene->_hotspot1, NULL);
+ scene->setAction(&scene->_sequenceManager, scene, 4047, &_globals->_player, &scene->_olloStand, NULL);
}
break;
default:
@@ -1805,15 +1826,15 @@ void Scene4045::Hotspot6::doAction(int action) {
/*--------------------------------------------------------------------------*/
Scene4045::Scene4045() :
- _hotspot3(0, CURSOR_LOOK, 4045, 1, CURSOR_USE, 4100, 21, LIST_END),
- _hotspot7(9, CURSOR_LOOK, 4045, 0, CURSOR_USE, 4045, 15, LIST_END),
- _hotspot8(10, CURSOR_LOOK, 4045, 2, LIST_END),
- _hotspot9(11, CURSOR_LOOK, 4045, 3, CURSOR_USE, 4045, 15, LIST_END),
- _hotspot10(12, CURSOR_LOOK, 4045, 4, CURSOR_USE, 4045, 19, LIST_END),
- _hotspot11(13, CURSOR_LOOK, 4045, 6, CURSOR_USE, 4045, 15, LIST_END),
- _hotspot12(14, CURSOR_LOOK, 4045, 7, CURSOR_USE, 4045, 29, LIST_END),
- _hotspot13(15, CURSOR_LOOK, 4045, 8, CURSOR_USE, 4045, 19, LIST_END),
- _hotspot14(0, CURSOR_LOOK, 4045, 10, LIST_END) {
+ _flame(0, CURSOR_LOOK, 4045, 1, CURSOR_USE, 4100, 21, LIST_END),
+ _hotspot7(9, CURSOR_LOOK, 4045, 0, CURSOR_USE, 4045, 15, LIST_END),
+ _hotspot8(10, CURSOR_LOOK, 4045, 2, LIST_END),
+ _hotspot9(11, CURSOR_LOOK, 4045, 3, CURSOR_USE, 4045, 15, LIST_END),
+ _hotspot10(12, CURSOR_LOOK, 4045, 4, CURSOR_USE, 4045, 19, LIST_END),
+ _hotspot11(13, CURSOR_LOOK, 4045, 6, CURSOR_USE, 4045, 15, LIST_END),
+ _hotspot12(14, CURSOR_LOOK, 4045, 7, CURSOR_USE, 4045, 29, LIST_END),
+ _hotspot13(15, CURSOR_LOOK, 4045, 8, CURSOR_USE, 4045, 19, LIST_END),
+ _hotspot14(0, CURSOR_LOOK, 4045, 10, LIST_END) {
_hotspot14.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
}
@@ -1833,12 +1854,12 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_speakerQText._textPos.y = 140;
- _hotspot3.postInit();
- _hotspot3.setVisage(4045);
- _hotspot3.setPosition(Common::Point(47, 111));
- _hotspot3.animate(ANIM_MODE_2, NULL);
- _hotspot3.setPriority2(156);
- _globals->_sceneItems.push_back(&_hotspot3);
+ _flame.postInit();
+ _flame.setVisage(4045);
+ _flame.setPosition(Common::Point(47, 111));
+ _flame.animate(ANIM_MODE_2, NULL);
+ _flame.fixPriority(156);
+ _globals->_sceneItems.push_back(&_flame);
_globals->_player.postInit();
_globals->_player.setVisage(4200);
@@ -1846,73 +1867,76 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player._moveDiff = Common::Point(7, 4);
- _hotspot1.postInit();
- _hotspot1.setVisage(4051);
+ _olloStand.postInit();
+ _olloStand.setVisage(4051);
- _hotspot5.postInit();
- _hotspot5.setVisage(4051);
- _hotspot5.setStrip(4);
- _hotspot5.setPriority2(152);
+ _olloFace.postInit();
+ _olloFace.setVisage(4051);
+ _olloFace.setStrip(4);
+ _olloFace.fixPriority(152);
if(_globals->_sceneManager._previousScene == 4050) {
_globals->_soundHandler.startSound(155);
_globals->_player.setPosition(Common::Point(72, 128));
_globals->_player.enableControl();
- _hotspot1.setStrip(5);
- _hotspot1.setPosition(Common::Point(173, 99));
- _hotspot1._numFrames = 1;
- _hotspot1.animate(ANIM_MODE_2, NULL);
+ _olloStand.setStrip(5);
+ _olloStand.setPosition(Common::Point(173, 99));
+ _olloStand._numFrames = 1;
+ _olloStand.animate(ANIM_MODE_2, NULL);
- _hotspot5.setPosition(Common::Point(177, 40));
+ _olloFace.setPosition(Common::Point(177, 40));
- if (_globals->_inventory._peg._sceneNumber == 4045) {
- _hotspot6.postInit();
- _hotspot6.setVisage(4045);
- _hotspot6.setStrip(2);
- _hotspot6.setPosition(Common::Point(108, 82));
- _globals->_sceneItems.push_back(&_hotspot6);
+ if (RING_INVENTORY._peg._sceneNumber == 4045) {
+ _necklace.postInit();
+ _necklace.setVisage(4045);
+ _necklace.setStrip(2);
+ _necklace.setPosition(Common::Point(108, 82));
+ _globals->_sceneItems.push_back(&_necklace);
}
} else {
_globals->_player.setPosition(Common::Point(108, 192));
_globals->_player.setStrip(4);
if (!_globals->getFlag(36) && !_globals->getFlag(43)) {
- _hotspot2.postInit();
- _hotspot2.setVisage(4102);
- _hotspot2.animate(ANIM_MODE_NONE, NULL);
- _hotspot2.setStrip(3);
- _hotspot2.changeZoom(-1);
- _hotspot2.setPosition(Common::Point(66, 209));
- _globals->_sceneItems.push_back(&_hotspot2);
+ _miranda.postInit();
+ _miranda.setVisage(4102);
+ _miranda.animate(ANIM_MODE_NONE, NULL);
+ _miranda.setStrip(3);
+ _miranda.setFrame(2);
+ _miranda.changeZoom(-1);
+
+ _miranda.setPosition(Common::Point(66, 209));
+ _globals->_sceneItems.push_back(&_miranda);
}
if (_globals->getFlag(31)) {
- _hotspot1.setVisage(4051);
- _hotspot1.setStrip(5);
- _hotspot1.setPosition(Common::Point(173, 99));
- _hotspot1._numFrames = 1;
- _hotspot1.animate(ANIM_MODE_2, NULL);
-
- _hotspot5.setPosition(Common::Point(177, 40));
-
- if (_globals->_inventory._peg._sceneNumber == 4045) {
- _hotspot6.postInit();
- _hotspot6.setVisage(4045);
- _hotspot6.setStrip(2);
- _hotspot6.setPosition(Common::Point(108, 82));
- _globals->_sceneItems.push_back(&_hotspot6);
+ // Olo asleep
+ _olloStand.setVisage(4051);
+ _olloStand.setStrip(5);
+ _olloStand.setPosition(Common::Point(173, 99));
+ _olloStand._numFrames = 1;
+ _olloStand.animate(ANIM_MODE_2, NULL);
+
+ _olloFace.setPosition(Common::Point(177, 40));
+
+ if (RING_INVENTORY._peg._sceneNumber == 4045) {
+ _necklace.postInit();
+ _necklace.setVisage(4045);
+ _necklace.setStrip(2);
+ _necklace.setPosition(Common::Point(108, 82));
+ _globals->_sceneItems.push_back(&_necklace);
}
} else {
- _hotspot1.setPosition(Common::Point(186, 149));
+ _olloStand.setPosition(Common::Point(186, 149));
_hotspot4.postInit();
_hotspot4.setVisage(4051);
_hotspot4.setStrip(2);
- _hotspot4.setPriority2(152);
+ _hotspot4.fixPriority(152);
_hotspot4.setPosition(Common::Point(202, 80));
- _hotspot5.setPosition(Common::Point(192, 77));
+ _olloFace.setPosition(Common::Point(192, 77));
_globals->setFlag(31);
setAction(&_action1);
@@ -1920,17 +1944,17 @@ void Scene4045::postInit(SceneObjectList *OwnerList) {
}
}
- _globals->_sceneItems.addItems(&_hotspot1, &_hotspot7, &_hotspot8, &_hotspot9, &_hotspot10,
+ _globals->_sceneItems.addItems(&_olloStand, &_hotspot7, &_hotspot8, &_hotspot9, &_hotspot10,
&_hotspot13, &_hotspot11, &_hotspot12, &_hotspot14, NULL);
}
void Scene4045::stripCallback(int v) {
switch (v) {
case 1:
- _hotspot5.animate(ANIM_MODE_7, 0, NULL);
+ _olloFace.animate(ANIM_MODE_7, 0, NULL);
break;
case 2:
- _hotspot5.animate(ANIM_MODE_NONE, NULL);
+ _olloFace.animate(ANIM_MODE_NONE, NULL);
break;
}
}
@@ -1939,7 +1963,7 @@ void Scene4045::signal() {
switch (_sceneMode) {
case 4046:
case 4047:
- _hotspot5.animate(ANIM_MODE_NONE, NULL);
+ _olloFace.animate(ANIM_MODE_NONE, NULL);
break;
case 4050:
_globals->_sceneManager.changeScene(4000);
@@ -1954,11 +1978,11 @@ void Scene4045::dispatch() {
if (!_action) {
if (_globals->_player.getRegionIndex() == 8) {
_globals->_player.addMover(NULL);
- if (_hotspot1._strip == 1) {
+ if (_olloStand._strip != 1) {
_globals->_player.disableControl();
_sceneMode = 4046;
- _hotspot1._numFrames = 10;
- setAction(&_sequenceManager, this, 4046, &_globals->_player, &_hotspot1, NULL);
+ _olloStand._numFrames = 10;
+ setAction(&_sequenceManager, this, 4046, &_globals->_player, &_olloStand, NULL);
} else {
setAction(&_action3);
}
@@ -1982,6 +2006,7 @@ void Scene4045::dispatch() {
*--------------------------------------------------------------------------*/
void Scene4050::Action1::signal() {
+ // "Map" on the wall
Scene4050 *scene = (Scene4050 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -1989,9 +2014,12 @@ void Scene4050::Action1::signal() {
_globals->_player.disableControl();
setDelay(3);
break;
- case 1:
- ADD_PLAYER_MOVER(204, 152);
+ case 1: {
+ Common::Point pt(204, 152);
+ PlayerMover *mover = new PlayerMover();
+ _globals->_player.addMover(mover, &pt, this);
break;
+ }
case 2:
_globals->_player.checkAngle(&scene->_hotspot17);
@@ -1999,7 +2027,8 @@ void Scene4050::Action1::signal() {
scene->_hotspot14.setVisage(4050);
scene->_hotspot14.setStrip(2);
scene->_hotspot14.setPosition(Common::Point(91, 154));
- scene->_hotspot14.setPriority2(200);
+ scene->_hotspot14.fixPriority(200);
+ setDelay(10);
break;
case 3:
_globals->_events.waitForPress();
@@ -2013,6 +2042,7 @@ void Scene4050::Action1::signal() {
}
void Scene4050::Action2::signal() {
+ // Climb down the rope
switch (_actionIndex++) {
case 0:
_globals->_player.disableControl();
@@ -2041,21 +2071,21 @@ void Scene4050::Action2::signal() {
_globals->_player.setVisage(4202);
_globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setPosition(Common::Point(210, 185));
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.enableControl();
-
remove();
break;
}
}
void Scene4050::Action3::signal() {
+ // Climb up the rope
switch (_actionIndex++) {
case 0:
ADD_PLAYER_MOVER(210, 185);
break;
case 1:
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.setVisage(4052);
_globals->_player.setStrip(5);
_globals->_player.changeZoom(100);
@@ -2084,7 +2114,7 @@ void Scene4050::Action4::signal() {
case 0:
_globals->_player.disableControl();
ADD_MOVER(_globals->_player, 189, 135);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
break;
case 1:
_globals->_player._moveDiff.y = 3;
@@ -2120,7 +2150,7 @@ void Scene4050::Action4::signal() {
_globals->_player.setStrip(2);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(216, 184));
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
break;
case 5:
scene->_hotspot16.setStrip2(4);
@@ -2149,7 +2179,7 @@ void Scene4050::Action4::signal() {
/*--------------------------------------------------------------------------*/
-void Scene4050::Hotspot14::doAction(int action) {
+void Scene4050::Hotspot15::doAction(int action) {
Scene4050 *scene = (Scene4050 *)_globals->_sceneManager._scene;
switch (action) {
@@ -2214,6 +2244,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
switch (_globals->_sceneManager._previousScene) {
case 4000:
if (_globals->getFlag(41)) {
+ // Using a rope
_hotspot15.postInit();
_hotspot15.setVisage(4054);
_hotspot15.setPosition(Common::Point(206, 103));
@@ -2222,12 +2253,13 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(4008);
_globals->_player.setPosition(Common::Point(206, 62));
_globals->_player.changeZoom(130);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.setStrip(2);
setAction(&_action2);
_globals->_soundHandler.startSound(175);
} else {
+ // Without the rope
_globals->_player.setVisage(5315);
_globals->_player.setPosition(Common::Point(189, 83));
_globals->_player.changeZoom(130);
@@ -2264,7 +2296,7 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
_hotspot17.postInit();
_hotspot17.setVisage(4050);
_hotspot17.setPosition(Common::Point(209, 119));
- _hotspot17.setPriority2(2);
+ _hotspot17.fixPriority(2);
_hotspot1.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_hotspot2.setBounds(Rect(150, 25, 198, 125));
@@ -2285,11 +2317,22 @@ void Scene4050::postInit(SceneObjectList *OwnerList) {
}
void Scene4050::signal() {
-
+ if (_sceneMode == 4050)
+ _globals->_sceneManager.changeScene(4045);
}
void Scene4050::dispatch() {
+ if (!_action) {
+ if ((_globals->_player._canWalk) && (_globals->_player._position.y > 196)) {
+ _sceneMode = 4050;
+ _globals->_player.disableControl();
+ Common::Point pt(160, 275);
+ NpcMover *mover = new NpcMover();
+ _globals->_player.addMover(mover, &pt, this);
+ }
+ }
+ Scene::dispatch();
}
/*--------------------------------------------------------------------------
@@ -2328,7 +2371,7 @@ void Scene4100::Action2::signal() {
scene->_hotspot2.setVisage(4120);
scene->_hotspot2.animate(ANIM_MODE_1, NULL);
scene->_hotspot2.setStrip2(4);
- scene->_hotspot2.setPriority2(100);
+ scene->_hotspot2.fixPriority(100);
scene->_hotspot2.setPosition(Common::Point(214, 119));
setDelay(3);
@@ -2355,14 +2398,15 @@ void Scene4100::Action3::signal() {
switch (_actionIndex++) {
case 0:
_globals->clearFlag(43);
- _globals->clearFlag(36);
+ _globals->setFlag(36);
setDelay(15);
break;
case 1:
scene->_stripManager.start(4505, this);
break;
case 2:
- scene->setAction(&scene->_action2);
+ setAction(&scene->_action2, this);
+ break;
case 3:
scene->_stripManager.start(4510, this);
break;
@@ -2372,10 +2416,13 @@ void Scene4100::Action3::signal() {
case 5:
_globals->_sceneManager.changeScene(4150);
break;
+ default:
+ break;
}
}
void Scene4100::Action4::signal() {
+ // Rock getting drunk
Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -2394,6 +2441,7 @@ void Scene4100::Action4::signal() {
_globals->clearFlag(43);
_globals->setFlag(42);
scene->_stripManager.start(4119, this);
+ break;
case 4:
setDelay(15);
break;
@@ -2413,16 +2461,16 @@ void Scene4100::Action5::signal() {
ADD_PLAYER_MOVER(58, 151);
break;
case 1:
- if (_globals->_inventory._ladder._sceneNumber == 4100) {
- _globals->_inventory._ladder._sceneNumber = 1;
- scene->_hotspot6.remove();
+ if (RING_INVENTORY._ladder._sceneNumber == 4100) {
+ RING_INVENTORY._ladder._sceneNumber = 1;
+ scene->_ladder.remove();
} else {
- scene->_hotspot6.postInit();
- scene->_hotspot6.setVisage(4101);
- scene->_hotspot6.setPosition(Common::Point(49, 144));
+ scene->_ladder.postInit();
+ scene->_ladder.setVisage(4101);
+ scene->_ladder.setPosition(Common::Point(49, 144));
- _globals->_inventory._ladder._sceneNumber = 4100;
- _globals->_sceneItems.push_front(&scene->_hotspot6);
+ RING_INVENTORY._ladder._sceneNumber = 4100;
+ _globals->_sceneItems.push_front(&scene->_ladder);
}
_globals->_player.enableControl();
@@ -2454,20 +2502,26 @@ void Scene4100::Hotspot1::doAction(int action) {
Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
switch (action) {
- case CURSOR_LOOK:
- SceneItem::display2(4100, _globals->getFlag(42) ? 24 : 12);
- break;
case OBJECT_STUNNER:
SceneItem::display2(4100, 16);
break;
+ case OBJECT_ALE:
+ _globals->_player.disableControl();
+ scene->setAction(&scene->_action3);
+ break;
+ case CURSOR_LOOK:
+ SceneItem::display2(4100, _globals->getFlag(42) ? 24 : 12);
+ break;
case CURSOR_USE:
SceneItem::display2(4100, 22);
break;
case CURSOR_TALK:
- if (_globals->_inventory._peg._sceneNumber == 1) {
+ if (RING_INVENTORY._peg._sceneNumber == 1) {
_globals->_player.disableControl();
+ scene->_sceneMode = 4109;
scene->setAction(&scene->_sequenceManager, scene, 4109, NULL);
} else if (_globals->getFlag(42)) {
+ scene->_sceneMode = 4102;
scene->setAction(&scene->_sequenceManager, scene, 4102, NULL);
} else {
if (_globals->getFlag(33))
@@ -2500,7 +2554,7 @@ void Scene4100::Hotspot2::doAction(int action) {
}
}
-void Scene4100::Hotspot5::doAction(int action) {
+void Scene4100::Miranda::doAction(int action) {
Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -2517,7 +2571,7 @@ void Scene4100::Hotspot5::doAction(int action) {
}
}
-void Scene4100::Hotspot6::doAction(int action) {
+void Scene4100::Ladder::doAction(int action) {
Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -2539,7 +2593,9 @@ void Scene4100::Hotspot6::doAction(int action) {
}
}
-
+/**
+ Exit hotspot, South
+ */
void Scene4100::Hotspot14::doAction(int action) {
Scene4100 *scene = (Scene4100 *)_globals->_sceneManager._scene;
@@ -2595,13 +2651,13 @@ void Scene4100::postInit(SceneObjectList *OwnerList) {
_hotspot1.postInit();
_hotspot1.setVisage(4102);
- _hotspot1.setPriority2(129);
+ _hotspot1.fixPriority(129);
_hotspot1.setPosition(Common::Point(171, 120));
_hotspot3.postInit();
_hotspot3.setVisage(4130);
_hotspot3.animate(ANIM_MODE_2, NULL);
- _hotspot3.setPriority2(200);
+ _hotspot3.fixPriority(200);
_hotspot3.setPosition(Common::Point(272, 110));
_hotspot4.postInit();
@@ -2615,21 +2671,21 @@ void Scene4100::postInit(SceneObjectList *OwnerList) {
_hotspot1.setStrip(1);
_hotspot1.setFrame(4);
} else if (!_globals->getFlag(43)) {
- _hotspot5.postInit();
- _hotspot5.setVisage(4102);
- _hotspot5.setStrip2(3);
- _hotspot5.setFrame(2);
- _hotspot5.setPosition(Common::Point(65, 188));
+ _miranda.postInit();
+ _miranda.setVisage(4102);
+ _miranda.setStrip2(3);
+ _miranda.setFrame(2);
+ _miranda.setPosition(Common::Point(65, 188));
- _globals->_sceneItems.push_back(&_hotspot5);
+ _globals->_sceneItems.push_back(&_miranda);
}
- if (_globals->_inventory._ladder._sceneNumber == 4100) {
- _hotspot6.postInit();
- _hotspot6.setVisage(4101);
- _hotspot6.setPosition(Common::Point(49, 144));
+ if (RING_INVENTORY._ladder._sceneNumber == 4100) {
+ _ladder.postInit();
+ _ladder.setVisage(4101);
+ _ladder.setPosition(Common::Point(49, 144));
- _globals->_sceneItems.push_back(&_hotspot6);
+ _globals->_sceneItems.push_back(&_ladder);
}
_hotspot14.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
@@ -2664,7 +2720,7 @@ void Scene4100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setPosition(Common::Point(252, 139));
_globals->_player.setStrip(2);
} else {
- if ((_globals->_inventory._ale._sceneNumber == 4100) && !_globals->getFlag(42)) {
+ if ((RING_INVENTORY._ale._sceneNumber == 4100) && !_globals->getFlag(42)) {
_globals->_player.disableControl();
setAction(&_action3);
}
@@ -2838,15 +2894,15 @@ void Scene4150::Action3::signal() {
case 1:
_globals->_player.checkAngle(&scene->_hotspot3);
- if (_globals->_inventory._rope._sceneNumber == 1) {
+ if (RING_INVENTORY._rope._sceneNumber == 1) {
scene->_hotspot3.postInit();
scene->_hotspot3.setVisage(4150);
scene->_hotspot3.setPosition(Common::Point(175, 70));
- _globals->_inventory._rope._sceneNumber = 4150;
+ RING_INVENTORY._rope._sceneNumber = 4150;
_globals->_sceneItems.push_front(&scene->_hotspot3);
} else {
- _globals->_inventory._rope._sceneNumber = 1;
+ RING_INVENTORY._rope._sceneNumber = 1;
scene->_hotspot3.remove();
}
@@ -2914,7 +2970,7 @@ void Scene4150::Hotspot3::doAction(int action) {
/*--------------------------------------------------------------------------*/
Scene4150::Scene4150() :
- _hotspot1(0, CURSOR_LOOK, 4000, 17, CURSOR_USE, 4150, 21, CURSOR_TALK, 4150, 21,
+ _hotspot1(0, CURSOR_LOOK, 4150, 17, CURSOR_USE, 4150, 21, CURSOR_TALK, 4150, 21,
OBJECT_SCANNER, 4150, 22, OBJECT_STUNNER, 4150, 23, LIST_END),
_hotspot2(0, CURSOR_LOOK, 4150, 4, CURSOR_USE, 4150, 24, LIST_END),
_hotspot7(0, CURSOR_LOOK, 4150, 1, CURSOR_USE, 4150, 25, OBJECT_ROPE, 4150, 26, LIST_END),
@@ -2947,7 +3003,7 @@ void Scene4150::postInit(SceneObjectList *OwnerList) {
_hotspot2.postInit();
_hotspot2.setVisage(4171);
_hotspot2.animate(ANIM_MODE_2, NULL);
- _hotspot2.setPriority2(100);
+ _hotspot2.fixPriority(100);
_hotspot2.setPosition(Common::Point(76, 147));
_hotspot1.postInit();
@@ -2980,7 +3036,7 @@ void Scene4150::postInit(SceneObjectList *OwnerList) {
_globals->setFlag(44);
}
- if (_globals->_inventory._rope._sceneNumber == 4150) {
+ if (RING_INVENTORY._rope._sceneNumber == 4150) {
_hotspot3.postInit();
_hotspot3.setVisage(4150);
_hotspot3.setPosition(Common::Point(175, 70));
@@ -3071,7 +3127,7 @@ void Scene4250::Action1::signal() {
break;
case 5:
ADD_PLAYER_MOVER(220, 175);
- scene->_hotspot1.setPriority2(105);
+ scene->_hotspot1.fixPriority(105);
ADD_PLAYER_MOVER_NULL(scene->_hotspot1, 197, 173);
break;
case 6:
@@ -3167,7 +3223,7 @@ void Scene4250::Action4::signal() {
break;
case 1:
_globals->_player.addMover(NULL);
- scene->_stripManager.start((_globals->_inventory._helmet._sceneNumber == 4250) ? 4259 : 4256, this);
+ scene->_stripManager.start((RING_INVENTORY._helmet._sceneNumber == 4250) ? 4259 : 4256, this);
break;
case 2:
ADD_PLAYER_MOVER(_globals->_player._position.x + 5, _globals->_player._position.y);
@@ -3188,8 +3244,8 @@ void Scene4250::Action5::signal() {
setDelay(3);
break;
case 1:
- scene->_hotspot4.setPriority2(195);
- scene->_hotspot1.setPriority2(105);
+ scene->_hotspot4.fixPriority(195);
+ scene->_hotspot1.fixPriority(105);
ADD_MOVER_NULL(_globals->_player, 6, 185);
ADD_MOVER_NULL(scene->_hotspot4, 9, 190);
ADD_MOVER(scene->_hotspot1, 12, 180);
@@ -3200,7 +3256,7 @@ void Scene4250::Action5::signal() {
ADD_PLAYER_MOVER_NULL(scene->_hotspot4, 239, 195);
break;
case 3:
- scene->_hotspot4.setPriority2(-1);
+ scene->_hotspot4.fixPriority(-1);
scene->_hotspot1.setStrip(5);
scene->_hotspot4.setStrip(7);
_globals->_player.enableControl();
@@ -3216,7 +3272,7 @@ void Scene4250::Hotspot1::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 19 : 14);
+ SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 19 : 14);
break;
case CURSOR_TALK:
_globals->_player.disableControl();
@@ -3224,7 +3280,7 @@ void Scene4250::Hotspot1::doAction(int action) {
scene->setAction(&scene->_action3);
} else {
scene->_sceneMode = 4260;
- if (_globals->_inventory._helmet._sceneNumber == 4250) {
+ if (RING_INVENTORY._helmet._sceneNumber == 4250) {
scene->_sceneMode = 4265;
scene->setAction(&scene->_sequenceManager, scene, 4265, this, NULL);
} else {
@@ -3234,13 +3290,13 @@ void Scene4250::Hotspot1::doAction(int action) {
}
break;
case OBJECT_SCANNER:
- if (_globals->_inventory._helmet._sceneNumber == 4250)
+ if (RING_INVENTORY._helmet._sceneNumber == 4250)
SceneItem::display2(4250, 21);
else
SceneHotspot::doAction(action);
break;
case OBJECT_STUNNER:
- if (_globals->_inventory._helmet._sceneNumber == 4250)
+ if (RING_INVENTORY._helmet._sceneNumber == 4250)
SceneItem::display2(4250, 22);
else
SceneHotspot::doAction(action);
@@ -3252,6 +3308,7 @@ void Scene4250::Hotspot1::doAction(int action) {
}
void Scene4250::Hotspot2::doAction(int action) {
+ //Ship with stasis field
Scene4250 *scene = (Scene4250 *)_globals->_sceneManager._scene;
switch (action) {
@@ -3285,16 +3342,16 @@ void Scene4250::Hotspot4::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 18 : 5);
+ SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 18 : 5);
break;
case OBJECT_SCANNER:
- if (_globals->_inventory._helmet._sceneNumber == 4250)
+ if (RING_INVENTORY._helmet._sceneNumber == 4250)
SceneItem::display2(4250, 21);
else
SceneHotspot::doAction(action);
break;
case OBJECT_STUNNER:
- if (_globals->_inventory._helmet._sceneNumber == 4250)
+ if (RING_INVENTORY._helmet._sceneNumber == 4250)
SceneItem::display2(4250, 22);
else
SceneHotspot::doAction(action);
@@ -3307,12 +3364,12 @@ void Scene4250::Hotspot4::doAction(int action) {
} else {
scene->_sceneMode = 4254;
- if (_globals->_inventory._helmet._sceneNumber == 4250) {
+ if (RING_INVENTORY._helmet._sceneNumber == 4250) {
scene->_sceneMode = 4266;
scene->setAction(&scene->_sequenceManager, scene, 4266, this, NULL);
} else {
scene->setAction(&scene->_sequenceManager, scene,
- (_globals->_inventory._concentrator._sceneNumber == 1) ? 4255 : 4254, NULL);
+ (RING_INVENTORY._concentrator._sceneNumber == 1) ? 4255 : 4254, NULL);
}
}
break;
@@ -3327,32 +3384,33 @@ void Scene4250::Hotspot6::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 7 : 6);
+ SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 7 : 6);
break;
case OBJECT_SCANNER:
- SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 1 : 2);
+ SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 1 : 2);
break;
case OBJECT_STUNNER:
- SceneItem::display2(4250, (_globals->_inventory._helmet._sceneNumber == 4250) ? 20 : 3);
+ SceneItem::display2(4250, (RING_INVENTORY._helmet._sceneNumber == 4250) ? 20 : 3);
break;
case OBJECT_HELMET:
_globals->_soundHandler.startSound(354);
_globals->_player.disableControl();
- _globals->_inventory._helmet._sceneNumber = 4250;
+ RING_INVENTORY._helmet._sceneNumber = 4250;
- if (_globals->_inventory._concentrator._sceneNumber == 1) {
+ if (RING_INVENTORY._concentrator._sceneNumber == 1) {
if (_globals->getFlag(115)) {
scene->_sceneMode = 4269;
scene->setAction(&scene->_sequenceManager, scene, 4269, this, NULL);
} else {
_globals->setFlag(115);
_globals->_events.setCursor(CURSOR_WALK);
+ scene->_sceneMode = 4256;
scene->setAction(&scene->_sequenceManager, scene, 4256, this, NULL);
}
- } else if (_globals->_inventory._keyDevice._sceneNumber == 1) {
+ } else if (RING_INVENTORY._keyDevice._sceneNumber == 1) {
scene->_sceneMode = 4267;
scene->setAction(&scene->_sequenceManager, scene, 4267, this, NULL);
- } else if (_globals->_inventory._keyDevice._sceneNumber == 4300) {
+ } else if (RING_INVENTORY._keyDevice._sceneNumber == 4300) {
scene->_sceneMode = 4268;
scene->setAction(&scene->_sequenceManager, scene, 4268, this, NULL);
} else {
@@ -3363,10 +3421,10 @@ void Scene4250::Hotspot6::doAction(int action) {
}
break;
case OBJECT_NULLIFIER:
- if (_globals->_inventory._helmet._sceneNumber == 4250) {
+ if (RING_INVENTORY._helmet._sceneNumber == 4250) {
_globals->_soundHandler.startSound(353);
_globals->_player.disableControl();
- _globals->_inventory._helmet._sceneNumber = 1;
+ RING_INVENTORY._helmet._sceneNumber = 1;
scene->_sceneMode = 4257;
scene->setAction(&scene->_sequenceManager, scene, 4257, &_globals->_player, this, NULL);
@@ -3375,7 +3433,7 @@ void Scene4250::Hotspot6::doAction(int action) {
}
break;
case CURSOR_TALK:
- if (_globals->_inventory._helmet._sceneNumber == 4250)
+ if (RING_INVENTORY._helmet._sceneNumber == 4250)
doAction(OBJECT_HELMET);
else {
_globals->_player.disableControl();
@@ -3384,11 +3442,11 @@ void Scene4250::Hotspot6::doAction(int action) {
}
break;
case CURSOR_USE:
- if (_globals->_inventory._helmet._sceneNumber == 4250)
+ if (RING_INVENTORY._helmet._sceneNumber == 4250)
doAction(OBJECT_HELMET);
else {
_globals->_player.disableControl();
- if ((_globals->_inventory._items._sceneNumber != 1) || (_globals->_inventory._concentrator._sceneNumber != 1)) {
+ if ((RING_INVENTORY._items._sceneNumber != 1) || (RING_INVENTORY._concentrator._sceneNumber != 1)) {
scene->_sceneMode = 4258;
scene->setAction(&scene->_sequenceManager, scene, 4258, this, NULL);
} else {
@@ -3427,7 +3485,7 @@ void Scene4250::Hotspot8::doAction(int action) {
_globals->_player.disableControl();
scene->_sceneMode = 4270;
scene->setAction(&scene->_sequenceManager, scene,
- (_globals->_inventory._helmet._sceneNumber == 4250) ? 4270 : 4271, NULL);
+ (RING_INVENTORY._helmet._sceneNumber == 4250) ? 4270 : 4271, NULL);
break;
default:
SceneHotspot::doAction(action);
@@ -3482,7 +3540,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot5.postInit();
_hotspot5.setVisage(4250);
_hotspot5.setPosition(Common::Point(268, 168));
- _hotspot5.setPriority2(1);
+ _hotspot5.fixPriority(1);
_hotspot4.postInit();
_hotspot4.setVisage(2701);
@@ -3497,7 +3555,6 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot1.setPosition(Common::Point(197, 173));
_hotspot1.changeZoom(70);
- _globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setPosition(Common::Point(252, 176));
_globals->_player.changeZoom(70);
@@ -3506,10 +3563,10 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot6.setStrip(4);
_hotspot6.setFrame(3);
_hotspot6.changeZoom(50);
- _hotspot6.setPriority2(70);
+ _hotspot6.fixPriority(70);
_hotspot6.setPosition(Common::Point(261, 175));
- if (_globals->_inventory._helmet._sceneNumber == 4250) {
+ if (RING_INVENTORY._helmet._sceneNumber == 4250) {
_hotspot6.setStrip(6);
_hotspot6.setFrame(_hotspot6.getFrameCount());
}
@@ -3529,7 +3586,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_sceneMode = 4253;
_globals->_sceneItems.push_front(&_hotspot6);
- setAction(&_sequenceManager, this, 4253, &_globals->_player, NULL);
+ setAction(&_sequenceManager, this, 4253, &_globals->_player, &_hotspot6, &_hotspot4, NULL);
}
}
} else if (_globals->_stripNum == 9000) {
@@ -3563,7 +3620,7 @@ void Scene4250::postInit(tSage::SceneObjectList *OwnerList) {
_hotspot2.postInit();
_hotspot2.setVisage(4251);
_hotspot2.setStrip2(1);
- _hotspot2.setPriority2(2);
+ _hotspot2.fixPriority(2);
_hotspot2.setFrame(1);
_hotspot2.setPosition(Common::Point(267, 172));
@@ -3583,6 +3640,7 @@ void Scene4250::signal() {
break;
case 4253:
if (_globals->_stripNum == 4301) {
+ _sceneMode = 4261;
ADD_MOVER_NULL(_hotspot1, 241, 169);
setAction(&_sequenceManager, this, 4261, &_globals->_player, &_hotspot6, NULL);
} else {
@@ -3603,18 +3661,19 @@ void Scene4250::signal() {
case 4270:
_globals->_player.enableControl();
break;
- case 4255:
- case 4262:
- case 4263:
- break;
case 4259:
_globals->_soundHandler.startSound(360);
_globals->_sceneManager.changeScene(9900);
break;
case 4261:
- _globals->_inventory._keyDevice._sceneNumber = 1;
+ RING_INVENTORY._keyDevice._sceneNumber = 1;
_globals->_player.enableControl();
break;
+ case 4255:
+ case 4262:
+ case 4263:
+ default:
+ break;
}
}
@@ -3625,7 +3684,7 @@ void Scene4250::dispatch() {
_globals->_player.changeZoom(70);
if (_globals->_player.getRegionIndex() == 15) {
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
}
if (_hotspot1.getRegionIndex() == 8)
@@ -3634,7 +3693,7 @@ void Scene4250::dispatch() {
_hotspot1.changeZoom(70);
if (_hotspot1.getRegionIndex() == 15) {
_hotspot1.changeZoom(-1);
- _hotspot1.setPriority2(-1);
+ _hotspot1.fixPriority(-1);
}
if (_hotspot4.getRegionIndex() == 8)
@@ -3643,7 +3702,7 @@ void Scene4250::dispatch() {
_hotspot4.changeZoom(70);
if (_hotspot4.getRegionIndex() == 15) {
_hotspot4.changeZoom(-1);
- _hotspot4.setPriority2(-1);
+ _hotspot4.fixPriority(-1);
}
Scene::dispatch();
@@ -3705,7 +3764,7 @@ void Scene4300::Action1::signal() {
setDelay(60);
break;
case 7:
- scene->_hotspot10.setPriority2(250);
+ scene->_hotspot10.fixPriority(250);
scene->_hotspot10.animate(ANIM_MODE_5, this);
break;
case 8:
@@ -3758,7 +3817,7 @@ void Scene4300::Hotspot8::doAction(int action) {
SceneItem::display2(4300, 19);
break;
case OBJECT_KEY_DEVICE:
- _globals->_inventory._keyDevice._sceneNumber = 4300;
+ RING_INVENTORY._keyDevice._sceneNumber = 4300;
_globals->_scenePalette.addRotation(240, 254, -1);
animate(ANIM_MODE_5, NULL);
@@ -3774,15 +3833,15 @@ void Scene4300::Hotspot8::doAction(int action) {
void Scene4300::Hotspot9::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) ||
- (_globals->_inventory._concentrator._sceneNumber == 1))
+ if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) ||
+ (RING_INVENTORY._concentrator._sceneNumber == 1))
SceneItem::display2(4300, 7);
else
SceneItem::display2(4300, 1);
break;
case CURSOR_USE:
- if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) ||
- (_globals->_inventory._concentrator._sceneNumber == 1))
+ if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) ||
+ (RING_INVENTORY._concentrator._sceneNumber == 1))
SceneItem::display2(4300, 7);
else
SceneItem::display2(4300, 3);
@@ -3791,8 +3850,8 @@ void Scene4300::Hotspot9::doAction(int action) {
SceneItem::display2(4300, 24);
break;
case OBJECT_SCANNER:
- if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) ||
- (_globals->_inventory._concentrator._sceneNumber != 1))
+ if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) ||
+ (RING_INVENTORY._concentrator._sceneNumber != 1))
SceneItem::display2(4300, 22);
else
SceneItem::display2(4300, 23);
@@ -3804,6 +3863,7 @@ void Scene4300::Hotspot9::doAction(int action) {
}
void Scene4300::Hotspot10::doAction(int action) {
+ // Alien
Scene4300 *scene = (Scene4300 *)_globals->_sceneManager._scene;
switch (action) {
@@ -3838,8 +3898,8 @@ void Scene4300::Hotspot15::signal() {
scene->_soundHandler2.startSound(345);
_strip = (_globals->_randomSource.getRandomNumber(6) < 2) ? 2 : 1;
- if ((_globals->_inventory._stasisBox2._sceneNumber == 4300) ||
- (_globals->_inventory._concentrator._sceneNumber == 1)) {
+ if ((RING_INVENTORY._stasisBox2._sceneNumber == 4300) ||
+ (RING_INVENTORY._concentrator._sceneNumber == 1)) {
setStrip(1);
setFrame(1);
animate(ANIM_MODE_NONE, NULL);
@@ -3856,8 +3916,8 @@ void Scene4300::Hotspot16::doAction(int action) {
SceneItem::display2(4300, 8);
break;
case CURSOR_USE:
- if ((_globals->_inventory._stasisBox2._sceneNumber != 4300) &&
- (_globals->_inventory._concentrator._sceneNumber != 4300)) {
+ if ((RING_INVENTORY._stasisBox2._sceneNumber != 4300) &&
+ (RING_INVENTORY._concentrator._sceneNumber != 4300)) {
SceneItem::display2(4300, 16);
} else {
scene->_sceneMode = 4302;
@@ -3881,17 +3941,17 @@ void Scene4300::Hotspot17::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display2(4300, (_globals->_inventory._stasisBox2._sceneNumber == 4300) ? 17 : 11);
+ SceneItem::display2(4300, (RING_INVENTORY._stasisBox2._sceneNumber == 4300) ? 17 : 11);
break;
case CURSOR_USE:
- if (_globals->_inventory._stasisBox2._sceneNumber != 4300)
+ if (RING_INVENTORY._stasisBox2._sceneNumber != 4300)
SceneItem::display2(4300, 13);
else {
_globals->_scenePalette.clearListeners();
remove();
SceneItem::display2(4300, 12);
- _globals->_inventory._concentrator._sceneNumber = 1;
+ RING_INVENTORY._concentrator._sceneNumber = 1;
}
break;
case OBJECT_SCANNER:
@@ -3922,8 +3982,8 @@ void Scene4300::Hotspot19::doAction(int action) {
SceneItem::display2(4300, 24);
break;
case CURSOR_USE:
- if ((_globals->_inventory._stasisBox2._sceneNumber != 4300) &&
- (_globals->_inventory._concentrator._sceneNumber != 4300))
+ if ((RING_INVENTORY._stasisBox2._sceneNumber != 4300) &&
+ (RING_INVENTORY._concentrator._sceneNumber != 4300))
SceneItem::display2(4300, 10);
else
SceneItem::display2(4300, 29);
@@ -3955,7 +4015,7 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot7.postInit();
_hotspot7.setPosition(Common::Point(90, 128));
_hotspot7.setVisage(4303);
- _hotspot7.setPriority2(250);
+ _hotspot7.fixPriority(250);
_globals->_sceneItems.push_back(&_hotspot7);
_hotspot9.setup(120, 49, 174, 91, 4300, -1, -1);
@@ -3973,14 +4033,14 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_globals->_sceneItems.push_back(&_hotspot8);
}
- if (_globals->_inventory._concentrator._sceneNumber == 4300) {
+ if (RING_INVENTORY._concentrator._sceneNumber == 4300) {
_hotspot17.postInit();
_hotspot17.setVisage(4300);
_hotspot17.setStrip(6);
- _hotspot17.setPriority2(1);
+ _hotspot17.fixPriority(1);
_hotspot17.setPosition(Common::Point(200, 69));
- if (_globals->_inventory._stasisBox2._sceneNumber == 4300)
+ if (RING_INVENTORY._stasisBox2._sceneNumber == 4300)
_hotspot17.setFrame(_hotspot17.getFrameCount());
_globals->_sceneItems.push_back(&_hotspot17);
@@ -3990,14 +4050,14 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot10.postInit();
_hotspot10.setVisage(4302);
_hotspot10.setPosition(Common::Point(244, 179));
- _hotspot10.setPriority2(100);
+ _hotspot10.fixPriority(100);
_globals->_sceneItems.push_back(&_hotspot10);
_hotspot12.postInit();
_hotspot12.setVisage(4302);
_hotspot12.setStrip2(3);
_hotspot12.setPosition(Common::Point(231, 185));
- _hotspot12.setPriority2(251);
+ _hotspot12.fixPriority(251);
_hotspot12.hide();
_hotspot13.postInit();
@@ -4005,16 +4065,16 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot13.setVisage(4302);
_hotspot13.setStrip2(2);
_hotspot13.setPosition(Common::Point(256, 168));
- _hotspot13.setPriority2(251);
+ _hotspot13.fixPriority(251);
_hotspot13._numFrames = 1;
_hotspot13.animate(ANIM_MODE_8, 0, NULL);
}
- if (_globals->_inventory._items._sceneNumber == 4300) {
+ if (RING_INVENTORY._items._sceneNumber == 4300) {
_hotspot16.postInit();
_hotspot16.setVisage(4300);
_hotspot16.setPosition(Common::Point(169, 141));
- _hotspot16.setPriority2(1);
+ _hotspot16.fixPriority(1);
_hotspot16.setStrip(4);
_globals->_sceneItems.push_back(&_hotspot16);
}
@@ -4025,37 +4085,37 @@ void Scene4300::postInit(SceneObjectList *OwnerList) {
_hotspot1.postInit();
_hotspot1.setVisage(4301);
- _hotspot1.setPriority2(145);
+ _hotspot1.fixPriority(145);
_hotspot1.setPosition(Common::Point(160, 64));
_hotspot2.postInit();
_hotspot2.setVisage(4301);
_hotspot2.setStrip2(2);
- _hotspot2.setPriority2(140);
+ _hotspot2.fixPriority(140);
_hotspot2.setPosition(Common::Point(166, 90));
_hotspot3.postInit();
_hotspot3.setVisage(4301);
_hotspot3.setStrip2(3);
- _hotspot3.setPriority2(135);
+ _hotspot3.fixPriority(135);
_hotspot3.setPosition(Common::Point(173, 114));
_hotspot4.postInit();
_hotspot4.setVisage(4301);
_hotspot4.setStrip2(4);
- _hotspot4.setPriority2(130);
+ _hotspot4.fixPriority(130);
_hotspot4.setPosition(Common::Point(187, 141));
_hotspot5.postInit();
_hotspot5.setVisage(4301);
_hotspot5.setStrip2(5);
- _hotspot5.setPriority2(125);
+ _hotspot5.fixPriority(125);
_hotspot5.setPosition(Common::Point(201, 164));
_hotspot6.postInit();
_hotspot6.setVisage(4301);
_hotspot6.setStrip2(6);
- _hotspot6.setPriority2(120);
+ _hotspot6.fixPriority(120);
_hotspot6.setPosition(Common::Point(219, 186));
setAction(&_action1);
@@ -4091,12 +4151,12 @@ void Scene4300::remove() {
void Scene4300::signal() {
switch (_sceneMode) {
case 4302:
- _globals->_inventory._items._sceneNumber = 1;
+ RING_INVENTORY._items._sceneNumber = 1;
_hotspot16.remove();
_globals->_player.enableControl();
break;
case 4303:
- _globals->_inventory._stasisBox2._sceneNumber = 4300;
+ RING_INVENTORY._stasisBox2._sceneNumber = 4300;
_hotspot15.setStrip(1);
_hotspot15.setFrame(1);
_hotspot15.animate(ANIM_MODE_NONE, NULL);
@@ -4108,7 +4168,7 @@ void Scene4300::signal() {
_hotspot14.setPosition(Common::Point(60, 199));
_gfxButton.setText(EXIT_MSG);
- _gfxButton._bounds.centre(60, 193);
+ _gfxButton._bounds.center(60, 193);
_gfxButton.draw();
_gfxButton._bounds.expandPanes();
@@ -4134,8 +4194,8 @@ void Scene4300::process(Event &event) {
*
*--------------------------------------------------------------------------*/
-void Scene4301::Action1::synchronise(Serialiser &s) {
- Action::synchronise(s);
+void Scene4301::Action1::synchronize(Serializer &s) {
+ Action::synchronize(s);
s.syncAsSint16LE(_field34E);
for (int idx = 0; idx < 6; ++idx)
s.syncAsSint16LE(_indexList[idx]);
@@ -4172,14 +4232,14 @@ void Scene4301::Action1::signal() {
scene->_hotspot2.setStrip(2);
scene->_hotspot2.setFrame(1);
scene->_hotspot2.setPosition(Common::Point(30, 15));
- scene->_hotspot2.setPriority2(255);
+ scene->_hotspot2.fixPriority(255);
scene->_hotspot3.postInit();
scene->_hotspot3.setVisage(4303);
scene->_hotspot3.setStrip(2);
scene->_hotspot3.setFrame(2);
scene->_hotspot3.setPosition(Common::Point(48, 29));
- scene->_hotspot3.setPriority2(255);
+ scene->_hotspot3.fixPriority(255);
scene->_hotspot3.hide();
_field34E = 0;
@@ -4187,6 +4247,7 @@ void Scene4301::Action1::signal() {
_actionIndex = 2;
break;
case 10:
+ // Puzzle: Wrong code
_globals->_events.setCursor(CURSOR_NONE);
scene->_soundHandler.startSound(337);
if (scene->_hotspot3._flags & OBJFLAG_HIDE)
@@ -4211,6 +4272,7 @@ void Scene4301::Action1::signal() {
_globals->_events.setCursor(CURSOR_USE);
break;
case 20:
+ // Puzzle: Correct code
_globals->_player.disableControl();
scene->_soundHandler.startSound(339);
scene->_hotspot3._frame = 3;
@@ -4233,6 +4295,7 @@ void Scene4301::Action1::signal() {
}
void Scene4301::Action1::process(Event &event) {
+ // Puzzle
Scene4301 *scene = (Scene4301 *)_globals->_sceneManager._scene;
Rect buttonsRect;
@@ -4255,7 +4318,7 @@ void Scene4301::Action1::process(Event &event) {
_buttonList[_state].setStrip(buttonIndex + 3);
_buttonList[_state].setFrame(1);
_buttonList[_state].setPosition(Common::Point((_state % 3) * 25 + 55, (_state / 3) * 25 + 121));
- _buttonList[_state].setPriority2(255);
+ _buttonList[_state].fixPriority(255);
_buttonList[_state]._numFrames = 25;
_buttonList[_state].animate(ANIM_MODE_5, NULL);
@@ -4287,6 +4350,7 @@ void Scene4301::Action1::process(Event &event) {
/*--------------------------------------------------------------------------*/
void Scene4301::Hotspot4::doAction(int action) {
+ // Hatch near door
Scene4301 *scene = (Scene4301 *)_globals->_sceneManager._scene;
if (action == CURSOR_USE) {
@@ -4303,7 +4367,7 @@ void Scene4301::Hotspot5::doAction(int action) {
SceneItem::display2(4300, 0);
break;
case CURSOR_USE:
- SceneItem::display(4300, 30);
+ SceneItem::display2(4300, 30);
break;
case OBJECT_SCANNER:
SceneItem::display2(4300, 31);
@@ -4326,15 +4390,15 @@ void Scene4301::postInit(SceneObjectList *OwnerList) {
setZoomPercents(0, 100, 200, 100);
_field68E = false;
- _globals->_inventory._stasisBox2._sceneNumber = 1;
- _hotspot4.setup(76, 97, 102, 127, 4300, 5, 6);
+ RING_INVENTORY._stasisBox2._sceneNumber = 1;
+ _hotspot4.setup(97, 76, 127, 102, 4300, 5, 6);
_hotspot1.postInit();
_hotspot1.setPosition(Common::Point(90, 128));
_hotspot1.setVisage(4303);
_hotspot1._strip = 1;
_hotspot1._frame = 1;
- _hotspot1.setPriority2(250);
+ _hotspot1.fixPriority(250);
_hotspot5.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_globals->_sceneItems.push_back(&_hotspot5);
diff --git a/engines/tsage/ringworld_scenes5.h b/engines/tsage/ringworld_scenes5.h
index 0def49ebe6..6c44395f9c 100644
--- a/engines/tsage/ringworld_scenes5.h
+++ b/engines/tsage/ringworld_scenes5.h
@@ -89,7 +89,7 @@ class Scene4000 : public Scene {
};
/* Hotspots */
- class Hotspot7 : public SceneObject {
+ class Miranda : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -97,21 +97,21 @@ class Scene4000 : public Scene {
private:
int _ctr;
public:
- virtual void synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsUint16LE(_ctr);
}
virtual void doAction(int action);
};
- class Hotspot9 : public SceneObject {
+ class GuardRock : public SceneObject {
public:
virtual void doAction(int action);
};
- class Hotspot10 : public SceneObject {
+ class Ladder : public SceneObject {
public:
virtual void doAction(int action);
};
- class Hotspot12 : public SceneObject {
+ class TheTech : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -151,13 +151,13 @@ public:
SpeakerCHFR _speakerCHFR;
SpeakerQL _speakerQL;
SpeakerCHFText _speakerCHFText;
- SceneObject _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5, _hotspot6;
- Hotspot7 _hotspot7;
+ SceneObject _smoke1, _hotspot2, _lander, _olo, _hotspot5, _rope;
+ Miranda _miranda;
Hotspot8 _hotspot8;
- Hotspot9 _hotspot9;
- Hotspot10 _hotspot10;
- DisplayHotspot _hotspot11;
- Hotspot12 _hotspot12;
+ GuardRock _guardRock;
+ Ladder _ladder;
+ DisplayHotspot _forceField;
+ TheTech _theTech;
Hotspot13 _hotspot13;
Hotspot _hotspot14, _hotspot15, _hotspot16;
Hotspot17 _hotspot17;
@@ -165,7 +165,7 @@ public:
DisplayHotspot _hotspot19, _hotspot20, _hotspot21, _hotspot22;
Hotspot23 _hotspot23;
DisplayHotspot _hotspot24, _hotspot25, _hotspot26;
- SceneObject _hotspot27;
+ SceneObject _smoke2;
Action1 _action1;
Action2 _action2;
Action3 _action3;
@@ -208,7 +208,7 @@ class Scene4025 : public Scene {
int _armStrip;
Common::Point _newPosition;
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void doAction(int action);
};
class Peg : public SceneObject {
@@ -217,7 +217,7 @@ class Scene4025 : public Scene {
int _armStrip;
Peg() : SceneObject() { _field88 = 0; _armStrip = 3; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void doAction(int action);
};
@@ -248,7 +248,7 @@ public:
Scene4025();
virtual void postInit(SceneObjectList *OwnerList = NULL);
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void remove();
virtual void signal();
virtual void process(Event &event);
@@ -271,15 +271,15 @@ class Scene4045 : public Scene {
};
/* Hotspots */
- class Hotspot1 : public SceneObject {
+ class OlloStand : public SceneObject {
public:
virtual void doAction(int action);
};
- class Hotspot2 : public SceneObject {
+ class Miranda : public SceneObject {
public:
virtual void doAction(int action);
};
- class Hotspot6 : public SceneObject {
+ class Necklace : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -292,11 +292,11 @@ public:
SpeakerPText _speakerPText;
SpeakerQText _speakerQText;
SpeakerQL _speakerQL;
- Hotspot1 _hotspot1;
- Hotspot2 _hotspot2;
- DisplayHotspot _hotspot3;
- SceneObject _hotspot4, _hotspot5;
- Hotspot6 _hotspot6;
+ OlloStand _olloStand;
+ Miranda _miranda;
+ DisplayHotspot _flame;
+ SceneObject _hotspot4, _olloFace;
+ Necklace _necklace;
DisplayHotspot _hotspot7, _hotspot8, _hotspot9, _hotspot10;
DisplayHotspot _hotspot11, _hotspot12, _hotspot13, _hotspot14;
Action1 _action1;
@@ -330,7 +330,7 @@ class Scene4050 : public Scene {
};
/* Hotspots */
- class Hotspot14 : public SceneObject {
+ class Hotspot15 : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -349,8 +349,9 @@ public:
DisplayHotspot _hotspot1, _hotspot2, _hotspot3, _hotspot4, _hotspot5;
DisplayHotspot _hotspot6, _hotspot7, _hotspot8, _hotspot9, _hotspot10;
DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
- Hotspot14 _hotspot14;
- SceneObject _hotspot15, _hotspot16;
+ SceneObject _hotspot14;
+ Hotspot15 _hotspot15;
+ SceneObject _hotspot16;
Hotspot17 _hotspot17;
Scene4050();
@@ -395,11 +396,11 @@ class Scene4100 : public Scene {
public:
virtual void doAction(int action);
};
- class Hotspot5 : public SceneObject {
+ class Miranda : public SceneObject {
public:
virtual void doAction(int action);
};
- class Hotspot6 : public SceneObject {
+ class Ladder : public SceneObject {
public:
virtual void doAction(int action);
};
@@ -425,8 +426,8 @@ public:
Hotspot1 _hotspot1;
Hotspot2 _hotspot2;
DisplayHotspot _hotspot3, _hotspot4;
- Hotspot5 _hotspot5;
- Hotspot6 _hotspot6;
+ Miranda _miranda;
+ Ladder _ladder;
DisplayHotspot _hotspot7, _hotspot8, _hotspot9, _hotspot10;
DisplayHotspot _hotspot11, _hotspot12, _hotspot13;
Hotspot14 _hotspot14;
@@ -655,7 +656,7 @@ class Scene4301 : public Scene {
int _field34E;
int _indexList[6];
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void remove();
virtual void signal();
virtual void process(Event &event);
@@ -683,8 +684,8 @@ public:
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void dispatch();
- virtual void synchronise(Serialiser &s) {
- Scene::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ Scene::synchronize(s);
s.syncAsSint16LE(_field68E);
}
};
diff --git a/engines/tsage/ringworld_scenes6.cpp b/engines/tsage/ringworld_scenes6.cpp
index 3ea4d7b279..973104a952 100644
--- a/engines/tsage/ringworld_scenes6.cpp
+++ b/engines/tsage/ringworld_scenes6.cpp
@@ -36,6 +36,7 @@ namespace tSage {
*--------------------------------------------------------------------------*/
void Scene5000::Action1::signal() {
+ // Ship landing
Scene5000 *scene = (Scene5000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -127,7 +128,7 @@ void Scene5000::Action2::signal() {
case 2:
if (!_globals->getFlag(59))
setAction(&scene->_action3, this);
- _globals->_player.setPriority2(15);
+ _globals->_player.fixPriority(15);
ADD_MOVER(_globals->_player, 208, 100);
break;
case 3:
@@ -145,7 +146,7 @@ void Scene5000::Action2::signal() {
break;
case 7:
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(35);
+ _globals->_player.fixPriority(35);
ADD_MOVER(_globals->_player, 201, 166);
break;
case 8:
@@ -154,7 +155,7 @@ void Scene5000::Action2::signal() {
break;
case 9:
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
ADD_MOVER(_globals->_player, 220, 182);
break;
case 10:
@@ -164,7 +165,7 @@ void Scene5000::Action2::signal() {
case 11:
_globals->_player.changeZoom(-1);
_globals->_player.setStrip2(-1);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
ADD_MOVER(_globals->_player, 208, 175);
break;
case 12:
@@ -200,7 +201,7 @@ void Scene5000::Action3::signal() {
scene->_hotspot7.setPosition(Common::Point(217, 76));
scene->_hotspot7.changeZoom(10);
scene->_hotspot7.setStrip2(3);
- scene->_hotspot7.setPriority2(200);
+ scene->_hotspot7.fixPriority(200);
scene->_hotspot7._moveDiff.y = 2;
scene->_hotspot7.animate(ANIM_MODE_1, NULL);
ADD_MOVER(scene->_hotspot7, 214, 89);
@@ -209,14 +210,14 @@ void Scene5000::Action3::signal() {
break;
case 2:
scene->_hotspot7.changeZoom(-1);
- scene->_hotspot7.setPriority2(14);
+ scene->_hotspot7.fixPriority(14);
ADD_MOVER(scene->_hotspot7, 208, 100);
break;
case 3:
ADD_MOVER(scene->_hotspot7, 213, 98);
break;
case 4:
- scene->_hotspot7.setPriority2(19);
+ scene->_hotspot7.fixPriority(19);
ADD_MOVER(scene->_hotspot7, 213, 98);
break;
case 5:
@@ -228,7 +229,7 @@ void Scene5000::Action3::signal() {
break;
case 7:
scene->_hotspot7.changeZoom(-1);
- scene->_hotspot7.setPriority2(34);
+ scene->_hotspot7.fixPriority(34);
ADD_MOVER(scene->_hotspot7, 201, 166);
break;
case 8:
@@ -237,7 +238,7 @@ void Scene5000::Action3::signal() {
break;
case 9:
scene->_hotspot7.changeZoom(-1);
- scene->_hotspot7.setPriority2(49);
+ scene->_hotspot7.fixPriority(49);
ADD_MOVER(scene->_hotspot7, 210, 182);
break;
case 10:
@@ -247,7 +248,7 @@ void Scene5000::Action3::signal() {
case 11:
scene->_hotspot7.changeZoom(-1);
scene->_hotspot7.setStrip2(-1);
- scene->_hotspot7.setPriority2(-1);
+ scene->_hotspot7.fixPriority(-1);
ADD_MOVER(scene->_hotspot7, 175, 166);
break;
case 12:
@@ -268,7 +269,7 @@ void Scene5000::Action4::signal() {
setDelay(1);
break;
case 1:
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
_globals->_player.setStrip2(4);
ADD_MOVER(_globals->_player, 210, 182);
break;
@@ -276,14 +277,14 @@ void Scene5000::Action4::signal() {
ADD_MOVER(_globals->_player, 205, 146);
break;
case 3:
- _globals->_player.setPriority2(35);
+ _globals->_player.fixPriority(35);
ADD_MOVER(_globals->_player, 201, 166);
break;
case 4:
ADD_MOVER(_globals->_player, 229, 115);
break;
case 5:
- _globals->_player.setPriority2(20);
+ _globals->_player.fixPriority(20);
_globals->_player.changeZoom(47);
ADD_MOVER(_globals->_player, 220, 125);
break;
@@ -295,7 +296,7 @@ void Scene5000::Action4::signal() {
ADD_MOVER(_globals->_player, 213, 98);
break;
case 8:
- _globals->_player.setPriority2(15);
+ _globals->_player.fixPriority(15);
ADD_MOVER(_globals->_player, 208, 100);
break;
case 9:
@@ -345,6 +346,7 @@ void Scene5000::Action5::signal() {
}
void Scene5000::Action6::signal() {
+ // Discussion between the hero and Seeker, then the hero goes back to the lander
Scene5000 *scene = (Scene5000 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -364,7 +366,7 @@ void Scene5000::Action6::signal() {
ADD_PLAYER_MOVER(208, 163);
break;
case 4:
- _globals->_player.setPriority2(50);
+ _globals->_player.fixPriority(50);
_globals->_player.setStrip2(4);
ADD_MOVER(_globals->_player, 210, 182);
break;
@@ -384,7 +386,7 @@ void Scene5000::Hotspot7::doAction(int action) {
SceneItem::display2(5000, 12);
break;
case CURSOR_TALK:
- setAction(&scene->_action6);
+ scene->setAction(&scene->_action6);
break;
default:
SceneHotspot::doAction(action);
@@ -393,6 +395,7 @@ void Scene5000::Hotspot7::doAction(int action) {
}
void Scene5000::Hotspot8::doAction(int action) {
+ // Cave
Scene5000 *scene = (Scene5000 *)_globals->_sceneManager._scene;
switch (action) {
@@ -403,7 +406,7 @@ void Scene5000::Hotspot8::doAction(int action) {
SceneItem::display2(5000, 14);
break;
case OBJECT_SCANNER:
- setAction(&scene->_action5);
+ scene->setAction(&scene->_action5);
break;
default:
SceneHotspot::doAction(action);
@@ -455,14 +458,14 @@ void Scene5000::postInit(SceneObjectList *OwnerList) {
_hotspot1.setVisage(5001);
_hotspot1.setFrame2(1);
_hotspot1._moveDiff = Common::Point(5, 5);
- _hotspot1.setPriority2(10);
+ _hotspot1.fixPriority(10);
_hotspot1.changeZoom(10);
_hotspot4.postInit();
_hotspot4.setVisage(5001);
_hotspot4.setStrip2(2);
_hotspot4._moveDiff = Common::Point(5, 1);
- _hotspot4.setPriority2(10);
+ _hotspot4.fixPriority(10);
_hotspot4.changeZoom(100);
_hotspot4.animate(ANIM_MODE_8, 0, NULL);
_hotspot4.hide();
@@ -484,13 +487,13 @@ void Scene5000::postInit(SceneObjectList *OwnerList) {
_hotspot5.setVisage(5001);
_hotspot5.setStrip2(4);
_hotspot5._numFrames = 5;
- _hotspot5.setPriority2(15);
+ _hotspot5.fixPriority(15);
_hotspot5.setPosition(Common::Point(218, 76));
_hotspot5.hide();
_hotspot9.postInit();
_hotspot9.setVisage(5002);
- _hotspot9.setPriority2(80);
+ _hotspot9.fixPriority(80);
_hotspot9.setPosition(Common::Point(71, 174));
_hotspot10.postInit();
@@ -512,7 +515,7 @@ void Scene5000::postInit(SceneObjectList *OwnerList) {
_hotspot13.setBounds(Rect(0, 164, 135, 200));
_hotspot14.setBounds(Rect(0, 0, 105, 140));
_hotspot15.setBounds(Rect(266, 70, 291, 85));
- _hotspot16.setBounds(Rect(0, 86, 3219, 200));
+ _hotspot16.setBounds(Rect(0, 86, 319, 200));
_hotspot12.setBounds(Rect(230, 143, 244, 150));
_globals->_sceneItems.addItems(&_hotspot9, &_hotspot10, &_hotspot11, &_hotspot8, &_hotspot13,
@@ -644,7 +647,7 @@ void Scene5100::Action1::signal() {
scene->_hotspot5.setPosition(Common::Point(1160, 34));
scene->_hotspot5.setStrip2(2);
scene->_hotspot5.animate(ANIM_MODE_1, NULL);
- scene->_hotspot5.setPriority2(10);
+ scene->_hotspot5.fixPriority(10);
_globals->_sceneItems.push_front(&scene->_hotspot5);
ADD_MOVER(scene->_hotspot5, 999, 14);
@@ -689,9 +692,9 @@ void Scene5100::Action2::signal() {
break;
case 3:
if (_globals->_player._position.x >= 966) {
- ADD_PLAYER_MOVER(1215, 155);
+ ADD_PLAYER_MOVER_NULL(scene->_hotspot8, 1215, 155);
} else {
- ADD_PLAYER_MOVER_THIS(scene->_hotspot8, 966, 185);
+ ADD_PLAYER_MOVER_NULL(scene->_hotspot8, 966, 185);
}
if (_globals->_player._position.x >= 966) {
@@ -701,7 +704,7 @@ void Scene5100::Action2::signal() {
}
break;
case 4:
- ADD_PLAYER_MOVER_THIS(scene->_hotspot8, 1215, 155);
+ ADD_PLAYER_MOVER_NULL(scene->_hotspot8, 1215, 155);
ADD_PLAYER_MOVER(1215, 155);
break;
case 5:
@@ -829,6 +832,7 @@ void Scene5100::Action5::signal() {
/*--------------------------------------------------------------------------*/
void Scene5100::HotspotGroup1::doAction(int action) {
+ // Flesh Eaters
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -881,11 +885,12 @@ void Scene5100::Hotspot4::doAction(int action) {
}
void Scene5100::HotspotGroup2::doAction(int action) {
+ // Bat
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
case CURSOR_LOOK:
- SceneItem::display2(5100, _globals->getFlag(62) ? 47 : 23);
+ SceneItem::display2(5100, _globals->getFlag(108) ? 47 : 23);
break;
case CURSOR_USE:
SceneItem::display2(5100, 29);
@@ -909,6 +914,7 @@ void Scene5100::HotspotGroup2::doAction(int action) {
}
void Scene5100::Hotspot9::doAction(int action) {
+ // Rope
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -929,7 +935,7 @@ void Scene5100::Hotspot9::doAction(int action) {
case OBJECT_BONE:
_globals->_player.disableControl();
scene->_sceneMode = 5116;
- scene->setAction(&scene->_sequenceManager, scene, 5116, &_globals->_player, &scene->_hotspot10,
+ scene->setAction(&scene->_sequenceManager, scene, 5116, &_globals->_player, this, &scene->_hotspot10,
&scene->_hotspot4, NULL);
break;
default:
@@ -1004,6 +1010,7 @@ void Scene5100::Hotspot18::doAction(int action) {
}
void Scene5100::Hotspot19::doAction(int action) {
+ // Pillar
Scene5100 *scene = (Scene5100 *)_globals->_sceneManager._scene;
switch (action) {
@@ -1082,14 +1089,14 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_hotspot14.postInit();
_hotspot14.setVisage(5101);
_hotspot14.setPosition(Common::Point(498, 147));
- _hotspot14.setPriority2(200);
+ _hotspot14.fixPriority(200);
_hotspot14._moveDiff.y = 10;
}
_hotspot17.postInit();
_hotspot17.setVisage(5101);
_hotspot17._strip = 2;
- _hotspot17.setPriority2(200);
+ _hotspot17.fixPriority(200);
if (_globals->getFlag(67))
_hotspot17.setPosition(Common::Point(554, 192));
@@ -1158,7 +1165,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
}
}
- if (_globals->getFlag(60) && (_globals->_inventory._stasisBox._sceneNumber == 1) &&
+ if (_globals->getFlag(60) && (RING_INVENTORY._stasisBox._sceneNumber == 1) &&
_globals->getFlag(107) && _globals->getFlag(67)) {
_hotspot8.postInit();
_hotspot8.setVisage(2806);
@@ -1178,7 +1185,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
case 5200:
if (_globals->_stripNum == 5200) {
_globals->_player.setVisage(5101);
- _globals->_player.setPriority2(200);
+ _globals->_player.fixPriority(200);
_globals->_player.setStrip(5);
_globals->_player.setFrame(1);
_globals->_player.setPosition(Common::Point(513, 199));
@@ -1227,7 +1234,7 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_globals->_player.setVisage(5101);
_globals->_player.setStrip(6);
- _globals->_player.setPriority2(170);
+ _globals->_player.fixPriority(170);
_globals->_player.setPosition(Common::Point(1168, 110));
setAction(&_sequenceManager, this, 5111, &_globals->_player, NULL);
@@ -1256,11 +1263,11 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_hotspot6.setStrip(6);
_hotspot6.setFrame(1);
_globals->_sceneItems.push_back(&_hotspot6);
- } else if (_globals->_inventory._vial._sceneNumber != 5100) {
+ } else if (RING_INVENTORY._vial._sceneNumber != 5100) {
_hotspot6.postInit();
_hotspot6.setVisage(5362);
_hotspot6.setPosition(Common::Point(1152, 70));
- _hotspot6.setPriority2(170);
+ _hotspot6.fixPriority(170);
_hotspot6.setStrip(6);
_hotspot6.setFrame(1);
_globals->_sceneItems.push_back(&_hotspot6);
@@ -1275,9 +1282,9 @@ void Scene5100::postInit(SceneObjectList *OwnerList) {
_hotspot15.setVisage(5140);
_hotspot15.setStrip(3);
_hotspot15.setPosition(Common::Point(977, 173));
- _hotspot15.setPriority2(1);
+ _hotspot15.fixPriority(1);
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
loadScene(5100);
_globals->_soundHandler.startSound(205);
}
@@ -1312,7 +1319,7 @@ void Scene5100::signal() {
case 5108:
if (!_globals->getFlag(60))
_globals->_player.enableControl();
- else if (_globals->_inventory._stasisBox._sceneNumber == 1)
+ else if (RING_INVENTORY._stasisBox._sceneNumber == 1)
setAction(&_action2);
else
setAction(&_action5);
@@ -1324,12 +1331,12 @@ void Scene5100::signal() {
break;
case 5111:
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
- _globals->_player.setVisage(6);
+ _globals->_player.setVisage(0);
_globals->_player.setStrip(6);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.animate(ANIM_MODE_1, NULL);
- if ((_globals->_inventory._vial._sceneNumber != 5100) && !_globals->getFlag(108)) {
+ if ((RING_INVENTORY._vial._sceneNumber != 5100) && !_globals->getFlag(108)) {
_globals->setFlag(108);
_sceneMode = 5130;
_globals->_player.disableControl();
@@ -1344,14 +1351,14 @@ void Scene5100::signal() {
break;
case 5116:
_globals->setFlag(105);
- _globals->_inventory._bone._sceneNumber = 0;
+ RING_INVENTORY._bone._sceneNumber = 0;
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setVisage(0);
_globals->_player.setStrip(6);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.animate(ANIM_MODE_1, NULL);
- break;
+ // No break on purpose
case 5117:
_globals->_player.enableControl();
break;
@@ -1370,6 +1377,7 @@ void Scene5100::signal() {
}
void Scene5100::dispatch() {
+ // Flesheater trap
if (_hotspot15._bounds.contains(_globals->_player._position) && !_globals->_player._visage) {
_globals->_player.disableControl();
_globals->_player.addMover(NULL);
@@ -1388,7 +1396,7 @@ void Scene5100::dispatch() {
_sceneMode = 5150;
_soundHandler.startSound(208);
- if (_globals->_inventory._vial._sceneNumber == 5100) {
+ if (RING_INVENTORY._vial._sceneNumber == 5100) {
_globals->_player.addMover(NULL);
_globals->_player.disableControl();
SceneItem::display2(5100, 39);
@@ -1398,9 +1406,9 @@ void Scene5100::dispatch() {
_hotspot3.setStrip2(2);
ObjectMover3 *mover1 = new ObjectMover3();
- _hotspot2.addMover(mover1, 20, this);
+ _hotspot2.addMover(mover1, &_globals->_player, 20, this);
ObjectMover3 *mover2 = new ObjectMover3();
- _hotspot3.addMover(mover2, 20, this);
+ _hotspot3.addMover(mover2, &_globals->_player, 20, this);
}
if (!_action) {
@@ -1408,8 +1416,9 @@ void Scene5100::dispatch() {
_globals->_player._canWalk = false;
_globals->_player.addMover(NULL);
+ Common::Point pt(20, 25);
PlayerMover2 *mover = new PlayerMover2();
- _hotspot3.addMover(mover, 20, 25, &_globals->_player);
+ _hotspot3.addMover(mover, &pt, &_globals->_player);
setAction(&_action4);
}
@@ -1445,6 +1454,7 @@ void Scene5200::Action1::signal() {
}
void Scene5200::Action2::signal() {
+ // Quinn obtains the stasis box from the flesheater throne room
Scene5200 *scene = (Scene5200 *)_globals->_sceneManager._scene;
switch (_actionIndex++) {
@@ -1462,7 +1472,7 @@ void Scene5200::Action2::signal() {
scene->_soundHandler.proc3();
scene->_hotspot14.remove();
- _globals->_inventory._stasisBox._sceneNumber = 1;
+ RING_INVENTORY._stasisBox._sceneNumber = 1;
_globals->_player.animate(ANIM_MODE_5, this);
break;
case 3:
@@ -1489,6 +1499,7 @@ void Scene5200::Action2::signal() {
void Scene5200::Action3::signal() {
switch (_actionIndex++) {
+ case 0:
_globals->_player.disableControl();
setDelay(5);
break;
@@ -1563,7 +1574,7 @@ void Scene5200::Hotspot10::doAction(int action) {
}
break;
default:
- SceneItem::doAction(action);
+ SceneObject::doAction(action);
break;
}
}
@@ -1578,9 +1589,6 @@ void Scene5200::Hotspot14::doAction(int action) {
case CURSOR_USE:
scene->setAction(&scene->_action2);
break;
- default:
- SceneItem::doAction(action);
- break;
}
}
@@ -1611,7 +1619,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_speakerFLText._textPos.x = 160;
_speakerQText._textPos.x = 20;
- if (_globals->_inventory._stasisBox._sceneNumber == 5200) {
+ if (RING_INVENTORY._stasisBox._sceneNumber == 5200) {
_soundHandler.startSound(216);
_soundHandler.proc5(true);
@@ -1619,17 +1627,20 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot14.setVisage(5202);
_hotspot14._strip = 3;
_hotspot14.setPosition(Common::Point(105, 52));
- _hotspot14.setPriority2(90);
+ _hotspot14.fixPriority(90);
_hotspot8.postInit();
_hotspot8.setVisage(5202);
_hotspot8._strip = 1;
_hotspot8.setPosition(Common::Point(96, 53));
- _hotspot8.setPriority2(90);
+ _hotspot8.fixPriority(90);
_globals->_sceneItems.push_back(&_hotspot14);
}
- if (_globals->_stripNum == 1111) {
+ if (_globals->_stripNum == 5111) {
+ // 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->_player.disableControl();
@@ -1644,6 +1655,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
setAction(&_action3);
} else {
+ // Happens when the player is captured by the flesh eaters the first time.
_globals->_player.postInit();
_globals->_player.setVisage(2640);
_globals->_player._strip = 1;
@@ -1665,7 +1677,7 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot7.setVisage(5210);
_hotspot7._frame = 1;
_hotspot7._strip = 4;
- _hotspot7.setPriority2(168);
+ _hotspot7.fixPriority(168);
_hotspot7.setPosition(Common::Point(186, 106));
_hotspot1.postInit();
@@ -1677,20 +1689,20 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot2.setVisage(5212);
_hotspot2._strip = 3;
_hotspot2.setPosition(Common::Point(148, 141));
- _hotspot2.setPriority2(90);
+ _hotspot2.fixPriority(90);
_hotspot3.postInit();
_hotspot3.setVisage(5212);
_hotspot3._strip = 2;
_hotspot3.setPosition(Common::Point(62, 109));
- _hotspot3.setPriority2(138);
+ _hotspot3.fixPriority(138);
_hotspot3.setAction(&_action1);
_hotspot4.postInit();
_hotspot4.setVisage(5212);
_hotspot4._strip = 4;
_hotspot4.setPosition(Common::Point(146, 110));
- _hotspot4.setPriority2(90);
+ _hotspot4.fixPriority(90);
_globals->_player.disableControl();
_globals->setFlag(61);
@@ -1701,9 +1713,11 @@ void Scene5200::postInit(SceneObjectList *OwnerList) {
_hotspot11.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
_hotspot9._sceneRegionId = 11;
_hotspot10._sceneRegionId = 9;
+ _hotspot12._sceneRegionId = 10;
+ _hotspot13._sceneRegionId = 8;
_globals->_sceneItems.addItems(&_hotspot12, &_hotspot13, &_hotspot9, &_hotspot10, &_hotspot11, NULL);
- _globals->_sceneManager._scene->_sceneBounds.centre(_globals->_player._position);
+ _globals->_sceneManager._scene->_sceneBounds.center(_globals->_player._position);
loadScene(5200);
}
@@ -1754,7 +1768,7 @@ void Scene5300::Action1::signal() {
ADD_MOVER(_globals->_player, 85, 170);
break;
case 3:
- scene->_hotspot2.setPriority2(-1);
+ scene->_hotspot2.fixPriority(-1);
_globals->_player.checkAngle(&scene->_hotspot2);
setAction(&scene->_sequenceManager, this, 5305, &scene->_hotspot2, NULL);
break;
@@ -1762,7 +1776,7 @@ void Scene5300::Action1::signal() {
scene->_stripManager.start(5316, this);
break;
case 5:
- if (!_globals->getFlag(106) || !_globals->getFlag(107) || (_globals->_inventory._stasisBox._sceneNumber != 1)) {
+ if (!_globals->getFlag(106) || !_globals->getFlag(107) || (RING_INVENTORY._stasisBox._sceneNumber != 1)) {
_globals->_player.enableControl();
remove();
} else {
@@ -1793,7 +1807,7 @@ void Scene5300::Action2::signal() {
scene->_stripManager.start(5328, this);
break;
case 2:
- if (_globals->_inventory._stasisBox._sceneNumber == 1) {
+ if (RING_INVENTORY._stasisBox._sceneNumber == 1) {
_globals->_stripNum = 5303;
setDelay(5);
} else {
@@ -1871,7 +1885,7 @@ void Scene5300::Hotspot2::doAction(int action) {
} else {
_globals->_player.disableControl();
- if (_globals->_inventory._stasisBox._sceneNumber != 1) {
+ if (RING_INVENTORY._stasisBox._sceneNumber != 1) {
scene->setAction(&scene->_sequenceManager, scene, 5316, NULL);
} else {
_globals->setFlag(60);
@@ -1898,7 +1912,7 @@ void Scene5300::Hotspot2::doAction(int action) {
if (_globals->getFlag(107)) {
SceneItem::display2(5300, 8);
} else {
- _globals->_inventory._vial._sceneNumber = 5300;
+ RING_INVENTORY._vial._sceneNumber = 5300;
_globals->setFlag(107);
_globals->_player.disableControl();
scene->_sceneMode = 5304;
@@ -1920,7 +1934,7 @@ void Scene5300::Hotspot5::doAction(int action) {
SceneItem::display2(5300, 27);
break;
case CURSOR_USE:
- _globals->_inventory._bone._sceneNumber = 1;
+ RING_INVENTORY._bone._sceneNumber = 1;
_globals->_player.disableControl();
scene->_sceneMode = 5309;
@@ -1933,24 +1947,25 @@ void Scene5300::Hotspot5::doAction(int action) {
}
void Scene5300::Hotspot6::doAction(int action) {
+ // Left Hole
Scene5300 *scene = (Scene5300 *)_globals->_sceneManager._scene;
switch (action) {
case CURSOR_LOOK:
- if (!_globals->getFlag(105) || (_globals->_inventory._vial._sceneNumber == 1))
+ if (!_globals->getFlag(105) || (RING_INVENTORY._vial._sceneNumber == 1))
SceneItem::display2(5300, 4);
else
SceneItem::display2(5300, 26);
break;
case CURSOR_USE:
- if (!_globals->getFlag(105) || (_globals->_inventory._vial._sceneNumber != 5100)) {
+ if (!_globals->getFlag(105) || (RING_INVENTORY._vial._sceneNumber != 5100)) {
_globals->_player.disableControl();
scene->_sceneMode = 5301;
scene->setAction(&scene->_sequenceManager, scene, 5301, &_globals->_player, NULL);
} else {
_globals->_player.disableControl();
scene->_sceneMode = 5307;
- _globals->_inventory._vial._sceneNumber = 1;
+ RING_INVENTORY._vial._sceneNumber = 1;
scene->setAction(&scene->_sequenceManager, scene, 5307, &scene->_hotspot1, &_globals->_player,
&scene->_hotspot4, NULL);
@@ -2033,7 +2048,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
_hotspot2.setVisage(5310);
_hotspot2.setPosition(Common::Point(63, 170));
_hotspot2.animate(ANIM_MODE_1, NULL);
- _hotspot2.setPriority2(98);
+ _hotspot2.fixPriority(98);
}
_hotspot1.postInit();
@@ -2075,7 +2090,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
_hotspot3.postInit();
_hotspot3.setVisage(5301);
_hotspot3.setPosition(Common::Point(172, 32));
- _hotspot3.setPriority2(1);
+ _hotspot3.fixPriority(1);
_hotspot3.animate(ANIM_MODE_NONE, NULL);
_globals->_player.postInit();
@@ -2091,7 +2106,7 @@ void Scene5300::postInit(SceneObjectList *OwnerList) {
}
_field1B0A = 1;
- if (_globals->_inventory._bone._sceneNumber == 5300) {
+ if (RING_INVENTORY._bone._sceneNumber == 5300) {
_hotspot5.postInit();
_hotspot5.setVisage(5301);
_hotspot5.setStrip(2);
@@ -2113,6 +2128,9 @@ void Scene5300::signal() {
_globals->_stripNum = 5300;
_globals->_sceneManager.changeScene(5100);
break;
+ case 5307:
+ _soundHandler.proc1(NULL);
+ // No break on purpose
case 5302:
case 5308:
case 5316:
@@ -2143,21 +2161,18 @@ void Scene5300::signal() {
_globals->clearFlag(67);
_globals->_player.setStrip2(-1);
- if ((_globals->_inventory._vial._sceneNumber == 1) || (_globals->_inventory._vial._sceneNumber == 5300))
+ if ((RING_INVENTORY._vial._sceneNumber == 1) || (RING_INVENTORY._vial._sceneNumber == 5300))
_stripManager.start(5303, this);
else
_stripManager.start(5302, this);
_sceneMode = 5302;
break;
- case 5307:
- _soundHandler.proc1(NULL);
- break;
case 5309:
_hotspot5.remove();
_globals->_player.enableControl();
break;
case 5310:
- _hotspot2.setPriority2(41);
+ _hotspot2.fixPriority(41);
_sceneMode = 5315;
setAction(&_sequenceManager, this, 5315, &_hotspot2, NULL);
diff --git a/engines/tsage/ringworld_scenes6.h b/engines/tsage/ringworld_scenes6.h
index 272aea4fe9..0d81bb3b78 100644
--- a/engines/tsage/ringworld_scenes6.h
+++ b/engines/tsage/ringworld_scenes6.h
@@ -216,11 +216,11 @@ class Scene5200 : public Scene {
};
/* Hotspots */
- class Hotspot9 : public SceneItemExt {
+ class Hotspot9 : public SceneObjectExt {
public:
virtual void doAction(int action);
};
- class Hotspot10 : public SceneItemExt {
+ class Hotspot10 : public SceneObjectExt {
public:
virtual void doAction(int action);
};
@@ -321,8 +321,8 @@ public:
Scene5300();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
- virtual void synchronise(Serialiser &s) {
- Scene::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ Scene::synchronize(s);
s.syncAsSint16LE(_field1B0A);
}
};
diff --git a/engines/tsage/ringworld_scenes8.cpp b/engines/tsage/ringworld_scenes8.cpp
index 416b7fe0fd..43bff50b47 100644
--- a/engines/tsage/ringworld_scenes8.cpp
+++ b/engines/tsage/ringworld_scenes8.cpp
@@ -31,6 +31,12 @@
namespace tSage {
+void NamedHotspotMult::synchronize(Serializer &s) {
+ SceneHotspot::synchronize(s);
+ s.syncAsSint16LE(_useLineNum);
+ s.syncAsSint16LE(_lookLineNum);
+}
+
/*--------------------------------------------------------------------------
* Scene 7000
*
@@ -48,22 +54,23 @@ void Scene7000::Action1::signal() {
setAction(&scene->_action6, this);
break;
case 2:
- scene->_soundHandler.startSound(252, 0, 127);
+ scene->_soundHandler.startSound(252);
scene->_object8.remove();
scene->_object1.postInit();
scene->_object1.setVisage(7003);
scene->_object1.animate(ANIM_MODE_5, this);
- scene->_object1.setPosition(Common::Point(151, 182), 0);
- scene->_object1.setPriority2(205);
+ scene->_object1.setPosition(Common::Point(151, 182));
+ scene->_object1.fixPriority(205);
_globals->_sceneItems.push_front(&scene->_object1);
break;
case 3:
- scene->_object1.setStrip(4);
- scene->_object1.animate(ANIM_MODE_8, 0, 0);
+ scene->_object1._numFrames = 4;
+ scene->_object1.setStrip(2);
+ scene->_object1.animate(ANIM_MODE_8, 0, NULL);
scene->_stripManager.start(7005, this);
break;
case 4:
- scene->_object1.animate(ANIM_MODE_2, 0);
+ scene->_object1.animate(ANIM_MODE_2, NULL);
setDelay(3);
break;
case 5:
@@ -84,7 +91,7 @@ void Scene7000::Action2::signal() {
setDelay(3);
break;
case 1:
- _globals->_player.addMover(0, 0);
+ _globals->_player.addMover(NULL);
_globals->_player.setVisage(7006);
_globals->_player.setStrip(1);
_globals->_player.setFrame(1);
@@ -107,7 +114,7 @@ void Scene7000::Action3::dispatch() {
Action::dispatch();
if (_actionIndex == 4)
- scene->_object4.setPosition(Common::Point(scene->_object3._position.x, scene->_object3._position.y));
+ scene->_object4.setPosition(scene->_object3._position);
}
/*--------------------------------------------------------------------------*/
@@ -122,9 +129,9 @@ void Scene7000::Action3::signal() {
scene->_object4.postInit();
scene->_object4.setVisage(5001);
scene->_object4.setStrip2(2);
- scene->_object4.animate(ANIM_MODE_8, 0, 0);
- scene->_object4.setPosition(Common::Point(10, 18), 0);
- scene->_object4.setPriority2(10);
+ scene->_object4.animate(ANIM_MODE_8, 0, NULL);
+ scene->_object4.setPosition(Common::Point(10, 18));
+ scene->_object4.fixPriority(10);
scene->_object4.changeZoom(100);
scene->_object4.hide();
break;
@@ -135,8 +142,9 @@ void Scene7000::Action3::signal() {
break;
}
case 2:
- scene->_object3.setPriority2(10);
- scene->_object4.setPosition(Common::Point(scene->_object3._position.x, scene->_object3._position.y + 15), 0);
+ scene->_object3._moveDiff.y = 1;
+ scene->_object3.fixPriority(10);
+ scene->_object4.setPosition(Common::Point(scene->_object3._position.x, scene->_object3._position.y + 15));
scene->_object4.show();
setDelay(30);
break;
@@ -169,15 +177,15 @@ void Scene7000::Action4::signal() {
setDelay(300);
break;
case 2:
- _globals->_soundHandler.startSound(252, 0, 127);
+ _globals->_soundHandler.startSound(252);
scene->_object1.show();
scene->_object1.setStrip(3);
scene->_object1.setFrame(1);
scene->_object1.animate(ANIM_MODE_5, this);
break;
case 3:
- scene->_object1.setStrip(1);
- scene->_object1.animate(ANIM_MODE_8, 0, 0);
+ scene->_object1.setStrip(4);
+ scene->_object1.animate(ANIM_MODE_8, 0, NULL);
_globals->setFlag(81);
_globals->_player.enableControl();
remove();
@@ -199,7 +207,7 @@ void Scene7000::Action5::signal() {
}
case 1:
_globals->_player.checkAngle(&scene->_object1);
- _globals->_soundHandler.startSound(252, 0, 127);
+ _globals->_soundHandler.startSound(252);
scene->_object1.setStrip(2);
scene->_stripManager.start(7015, this);
break;
@@ -222,7 +230,7 @@ void Scene7000::Action5::signal() {
break;
}
case 5: {
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
NpcMover *mover = new NpcMover();
Common::Point pt(11, 89);
_globals->_player.addMover(mover, &pt, this);
@@ -268,7 +276,7 @@ void Scene7000::Action6::signal() {
NpcMover *mover = new NpcMover();
Common::Point pt(31, 96);
_globals->_player.addMover(mover, &pt, this);
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
break;
}
case 4: {
@@ -315,7 +323,7 @@ void Scene7000::Action7::signal() {
break;
}
case 4: {
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
NpcMover *mover = new NpcMover();
Common::Point pt(11, 89);
_globals->_player.addMover(mover, &pt, this);
@@ -338,11 +346,11 @@ void Scene7000::Action7::signal() {
/*--------------------------------------------------------------------------*/
-void Scene7000::SceneItem1::doAction(int action) {
+void Scene7000::Hotspot1::doAction(int action) {
if (action == CURSOR_LOOK)
- SceneItem::display(7000, 2, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
-
- SceneItem::doAction(action);
+ SceneItem::display2(7000, 2);
+ else
+ SceneHotspot::doAction(action);
}
/*--------------------------------------------------------------------------*/
@@ -353,86 +361,84 @@ void Scene7000::Object1::doAction(int action) {
switch (action) {
case OBJECT_TRANSLATOR:
_globals->_player.disableControl();
- _globals->_inventory._translator._sceneNumber = 7000;
- if (_globals->_inventory._waldos._sceneNumber == 7000) {
- if (_globals->_inventory._jar._sceneNumber == 7000) {
- scene->_sceneMode = 7012;
- scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, 0, 0);
- } else {
- scene->_sceneMode = 7015;
- scene->setAction(&scene->_sequenceManager, scene, 7017, &_globals->_player, 0, 0);
- }
+ RING_INVENTORY._translator._sceneNumber = 7000;
+
+ if ((RING_INVENTORY._waldos._sceneNumber != 7000) && (RING_INVENTORY._jar._sceneNumber != 7000)) {
+ scene->_sceneMode = 7004;
+ scene->setAction(&scene->_sequenceManager, scene, 7004, &_globals->_player, this, NULL);
+ } else if (RING_INVENTORY._waldos._sceneNumber != 7000) {
+ scene->_sceneMode = 7011;
+ scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, NULL);
+ } else if (RING_INVENTORY._jar._sceneNumber != 7000) {
+ scene->_sceneMode = 7012;
+ scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, NULL);
} else {
- if (_globals->_inventory._jar._sceneNumber == 7000) {
- scene->_sceneMode = 7011;
- scene->setAction(&scene->_sequenceManager, scene, 7010, &_globals->_player, &scene->_object1, 0, 0);
- } else {
- scene->_sceneMode = 7004;
- scene->setAction(&scene->_sequenceManager, scene, 7004, &_globals->_player, this, 0, 0);
- }
+ scene->_sceneMode = 7015;
+ scene->setAction(&scene->_sequenceManager, scene, 7017, &_globals->_player, NULL);
}
break;
case OBJECT_WALDOS:
_globals->_player.disableControl();
- _globals->_inventory._waldos._sceneNumber = 7000;
- if (_globals->_inventory._translator._sceneNumber == 7000) {
- if (_globals->_inventory._jar._sceneNumber == 7000) {
+ RING_INVENTORY._waldos._sceneNumber = 7000;
+ if (RING_INVENTORY._translator._sceneNumber == 7000) {
+ if (RING_INVENTORY._jar._sceneNumber == 7000) {
scene->_sceneMode = 7015;
- scene->setAction(&scene->_sequenceManager, scene, 7015, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7015, &_globals->_player, NULL);
} else {
scene->_sceneMode = 7006;
- scene->setAction(&scene->_sequenceManager, scene, 7006, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7006, &_globals->_player, NULL);
}
} else {
scene->_sceneMode = 7009;
- scene->setAction(&scene->_sequenceManager, scene, 7009, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7009, &_globals->_player, NULL);
}
break;
case OBJECT_JAR:
_globals->_player.disableControl();
- _globals->_inventory._jar._sceneNumber = 7000;
- if (_globals->_inventory._translator._sceneNumber == 7000) {
- if (_globals->_inventory._waldos._sceneNumber == 7000) {
+ RING_INVENTORY._jar._sceneNumber = 7000;
+
+ if (RING_INVENTORY._translator._sceneNumber == 7000) {
+ if (RING_INVENTORY._waldos._sceneNumber != 7000) {
scene->_sceneMode = 7007;
- scene->setAction(&scene->_sequenceManager, scene, 7007, &_globals->_player, &scene->_object1, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7007, &_globals->_player, &scene->_object1, NULL);
} else {
scene->_sceneMode = 7015;
- scene->setAction(&scene->_sequenceManager, scene, 7016, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7016, &_globals->_player, NULL);
}
} else {
scene->_sceneMode = 7008;
- scene->setAction(&scene->_sequenceManager, scene, 7008, &_globals->_player, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7008, &_globals->_player, NULL);
}
break;
case CURSOR_LOOK:
if (_globals->getFlag(81))
- SceneItem::display(7000, 1, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7000, 1);
else
- SceneItem::display(7000, 0, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7000, 0);
break;
case CURSOR_USE:
if (_globals->getFlag(81)) {
- _globals->_inventory._stasisBox._sceneNumber = 1;
+ RING_INVENTORY._stasisBox2._sceneNumber = 1;
_globals->_player.disableControl();
scene->setAction(&scene->_action5);
} else {
- SceneItem::display(7000, 5, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7000, 5);
}
break;
case CURSOR_TALK:
if (_globals->getFlag(81)) {
- _globals->_inventory._stasisBox._sceneNumber = 1;
+ RING_INVENTORY._stasisBox2._sceneNumber = 1;
_globals->_player.disableControl();
scene->setAction(&scene->_action5);
} else if (_globals->getFlag(52)) {
scene->_sceneMode = 7005;
- scene->setAction(&scene->_sequenceManager, scene, 7013, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7013, NULL);
} else if (_globals->getFlag(13)) {
_globals->_sceneManager._sceneNumber = 7002;
- scene->setAction(&scene->_sequenceManager, scene, 7014, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7014, NULL);
} else {
_globals->_sceneManager._sceneNumber = 7002;
- scene->setAction(&scene->_sequenceManager, scene, 7002, 0, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7002, NULL);
}
break;
default:
@@ -450,8 +456,8 @@ void Scene7000::dispatch() {
if (_globals->_sceneRegions.indexOf(_globals->_player._position) == 8) {
if (!_globals->getFlag(13)) {
_globals->_player.disableControl();
- _globals->_player.addMover(0);
- SceneItem::display(7000, 3, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ _globals->_player.addMover(NULL);
+ SceneItem::display2(7000, 3);
_sceneMode = 7001;
setAction(&scene->_sequenceManager, this, 7001, &_globals->_player, NULL);
} else if (!_globals->getFlag(52)) {
@@ -459,7 +465,7 @@ void Scene7000::dispatch() {
} else {
_globals->_player.disableControl();
_sceneMode = 7003;
- setAction(&scene->_sequenceManager, this, 7003, &_globals->_player, 0);
+ setAction(&scene->_sequenceManager, this, 7003, &_globals->_player, NULL);
}
}
if (_globals->_sceneRegions.indexOf(_globals->_player._position) == 9)
@@ -486,39 +492,38 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object5.postInit();
_object5.setVisage(7001);
_object5.setStrip2(1);
- _object5.animate(ANIM_MODE_2, 0);
- _object5.setPosition(Common::Point(49, 147), 0);
- _object5.setPriority2(1);
+ _object5.animate(ANIM_MODE_2, NULL);
+ _object5.setPosition(Common::Point(49, 147));
+ _object5.fixPriority(1);
_object6.postInit();
_object6.setVisage(7001);
_object6.setStrip2(2);
- _object6.animate(ANIM_MODE_2, 0);
- _object6.setPosition(Common::Point(160, 139), 0);
- _object6.setPriority2(1);
+ _object6.animate(ANIM_MODE_2, NULL);
+ _object6.setPosition(Common::Point(160, 139));
+ _object6.fixPriority(1);
_object7.postInit();
_object7.setVisage(7001);
_object7.setStrip2(3);
- _object7.animate(ANIM_MODE_2, 0);
- _object7.setPosition(Common::Point(272, 129), 0);
- _object7.setPriority2(1);
+ _object7.animate(ANIM_MODE_2, NULL);
+ _object7.setPosition(Common::Point(272, 129));
+ _object7.fixPriority(1);
_object8.postInit();
_object8.setVisage(7001);
_object8.setStrip2(4);
- _object8.animate(ANIM_MODE_2, 0);
- _object8.setPosition(Common::Point(176, 175), 0);
- _object8.setPriority2(1);
+ _object8.animate(ANIM_MODE_2, NULL);
+ _object8.setPosition(Common::Point(176, 175));
+ _object8.fixPriority(1);
if (_globals->getFlag(72)) {
_object3.postInit();
_object3.setVisage(5001);
_object3.setStrip2(1);
- _object3.animate(ANIM_MODE_2, 0);
- _object3.setPosition(Common::Point(107, 92), 0);
+ _object3.setPosition(Common::Point(107, 92));
_object3.changeZoom(100);
- _object3.setPriority2(10);
+ _object3.fixPriority(10);
_object1.postInit();
_object1.setVisage(7003);
@@ -526,55 +531,55 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object1.setStrip(4);
else
_object1.setStrip(2);
- _object1.setPosition(Common::Point(87, 129), 0);
+ _object1.setPosition(Common::Point(87, 129));
_object1._numFrames = 4;
_object1.changeZoom(45);
- _object1.animate(ANIM_MODE_8, 0, 0);
- _globals->_sceneItems.addItems(&_object1, 0);
+ _object1.animate(ANIM_MODE_8, 0, NULL);
+ _globals->_sceneItems.push_back(&_object1);
}
- _soundHandler.startSound(251, 0, 127);
+ _soundHandler.startSound(251);
if (_globals->_sceneManager._previousScene == 2100) {
if (_globals->getFlag(72)) {
_globals->_player.postInit();
_globals->_player.setVisage(0);
- _globals->_player.animate(ANIM_MODE_1, 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
SceneObjectWrapper *wrapper = new SceneObjectWrapper();
_globals->_player.setObjectWrapper(wrapper);
- _globals->_player.setPosition(Common::Point(57, 94), 0);
+ _globals->_player.setPosition(Common::Point(57, 94));
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
if (_globals->getFlag(81)) {
setAction(&_action4);
} else {
- _object1.setPosition(Common::Point(151, 182), 0);
+ _object1.setPosition(Common::Point(151, 182));
+ _object1.changeZoom(100);
setAction(&_action1);
}
} else {
- _globals->_soundHandler.startSound(250, 0, 127);
+ _globals->_soundHandler.startSound(250);
_globals->setFlag(72);
_object3.postInit();
_object3.setVisage(5001);
_object3.setStrip2(1);
- _object3.animate(ANIM_MODE_1, 0);
- _object3.setPosition(Common::Point(307, 0), 0);
+ _object3.animate(ANIM_MODE_1, NULL);
+ _object3.setPosition(Common::Point(307, 0));
_object3.changeZoom(-1);
setAction(&_action3);
}
} else if (_globals->_sceneManager._previousScene == 2280) {
_globals->_player.postInit();
_globals->_player.setVisage(2170);
- _globals->_player.animate(ANIM_MODE_1, 0);
- SceneObjectWrapper *wrapper = new SceneObjectWrapper();
- _globals->_player.setObjectWrapper(wrapper);
- _globals->_player.setPosition(Common::Point(57, 94), 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
+ _globals->_player.setObjectWrapper(new SceneObjectWrapper());
+ _globals->_player.setPosition(Common::Point(57, 94));
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
_globals->_player.disableControl();
_sceneMode = 7001;
setAction(&_action6, this);
if (!_globals->getFlag(81)) {
- _object1.setPosition(Common::Point(151, 182), 0);
+ _object1.setPosition(Common::Point(151, 182));
_object1.changeZoom(100);
}
_object8.remove();
@@ -582,12 +587,12 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
} else if (_globals->_sceneManager._previousScene == 2320) {
_globals->_player.postInit();
_globals->_player.setVisage(0);
- _globals->_player.animate(ANIM_MODE_1, 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
SceneObjectWrapper *wrapper = new SceneObjectWrapper();
_globals->_player.setObjectWrapper(wrapper);
- _globals->_player.setPosition(Common::Point(57, 94), 0);
+ _globals->_player.setPosition(Common::Point(57, 94));
_globals->_player.changeZoom(-1);
- _globals->_player.setPriority2(10);
+ _globals->_player.fixPriority(10);
_sceneMode = 7001;
setAction(&_action6, this);
} else {
@@ -596,12 +601,15 @@ void Scene7000::postInit(SceneObjectList *OwnerList) {
_object3.postInit();
_object3.setVisage(5001);
_object3.setStrip2(1);
- _object3.setPosition(Common::Point(307, 0), 0);
- _soundHandler.startSound(151, 0, 127);
+ _object3.setPosition(Common::Point(307, 0));
+ _soundHandler.startSound(151);
_soundHandler.proc5(1);
- _globals->_soundHandler.startSound(250, 0, 127);
+ _globals->_soundHandler.startSound(250);
setAction(&_action3);
}
+
+ _hotspot1.setBounds(Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
+ _globals->_sceneItems.push_back(&_hotspot1);
}
/*--------------------------------------------------------------------------*/
@@ -612,6 +620,10 @@ void Scene7000::signal() {
case 7001:
case 7002:
case 7004:
+ case 7005:
+ case 7006:
+ case 7007:
+ case 7008:
case 7009:
_globals->_player.enableControl();
break;
@@ -709,7 +721,7 @@ void Scene7100::Action5::signal() {
}
case 3: {
scene->_object9.setStrip2(2);
- scene->_object9.setPriority2(180);
+ scene->_object9.fixPriority(180);
Common::Point pt(8, 181);
NpcMover *mover = new NpcMover();
scene->_object9.addMover(mover, &pt, this);
@@ -728,14 +740,14 @@ void Scene7100::Action6::signal() {
switch (_actionIndex++) {
case 0:
setDelay(1);
- scene->_object10.setPriority2(8);
- scene->_object10.setPosition(Common::Point(155, 187), 0);
+ scene->_object10.fixPriority(8);
+ scene->_object10.setPosition(Common::Point(155, 187));
- scene->_object11.setPriority2(8);
- scene->_object11.setPosition(Common::Point(155, 190), 0);
+ scene->_object11.fixPriority(8);
+ scene->_object11.setPosition(Common::Point(155, 190));
- scene->_object12.setPriority2(8);
- scene->_object12.setPosition(Common::Point(151, 193), 0);
+ scene->_object12.fixPriority(8);
+ scene->_object12.setPosition(Common::Point(151, 193));
break;
case 1: {
Common::Point pt1(167, 187);
@@ -744,11 +756,11 @@ void Scene7100::Action6::signal() {
Common::Point pt2(165, 185);
NpcMover *mover2 = new NpcMover();
- scene->_object11.addMover(mover2, &pt2, 0);
+ scene->_object11.addMover(mover2, &pt2, NULL);
Common::Point pt3(163, 183);
NpcMover *mover3 = new NpcMover();
- scene->_object12.addMover(mover3, &pt3, 0);
+ scene->_object12.addMover(mover3, &pt3, NULL);
break;
}
case 2: {
@@ -758,16 +770,16 @@ void Scene7100::Action6::signal() {
scene->_object10.addMover(mover1, &pt1, this);
scene->_object11.setStrip2(6);
- scene->_object11.setPriority2(50);
+ scene->_object11.fixPriority(50);
Common::Point pt2(89, 185);
NpcMover *mover2 = new NpcMover();
- scene->_object11.addMover(mover2, &pt2, 0);
+ scene->_object11.addMover(mover2, &pt2, NULL);
scene->_object12.setStrip2(6);
- scene->_object12.setPriority2(50);
+ scene->_object12.fixPriority(50);
Common::Point pt3(87, 183);
NpcMover *mover3 = new NpcMover();
- scene->_object12.addMover(mover3, &pt3, 0);
+ scene->_object12.addMover(mover3, &pt3, NULL);
break;
}
case 3:
@@ -795,7 +807,7 @@ void Scene7100::Action7::signal() {
scene->_object13.setStrip2(2);
Common::Point pt(524, 104);
NpcMover *mover = new NpcMover();
- scene->_object13.addMover(mover, &pt, 0);
+ scene->_object13.addMover(mover, &pt, NULL);
break;
}
case 3:
@@ -823,11 +835,11 @@ void Scene7100::Action8::signal() {
Common::Point pt2(480, 146);
NpcMover *mover2 = new NpcMover();
- scene->_object18.addMover(mover2, &pt2, 0);
+ scene->_object18.addMover(mover2, &pt2, NULL);
Common::Point pt3(470, 153);
NpcMover *mover3 = new NpcMover();
- scene->_object19.addMover(mover3, &pt3, 0);
+ scene->_object19.addMover(mover3, &pt3, NULL);
break;
}
case 2: {
@@ -841,11 +853,11 @@ void Scene7100::Action8::signal() {
Common::Point pt2(502, 179);
NpcMover *mover2 = new NpcMover();
- scene->_object18.addMover(mover2, &pt2, 0);
+ scene->_object18.addMover(mover2, &pt2, NULL);
Common::Point pt3(495, 184);
NpcMover *mover3 = new NpcMover();
- scene->_object19.addMover(mover3, &pt3, 0);
+ scene->_object19.addMover(mover3, &pt3, NULL);
break;
}
case 3: {
@@ -859,11 +871,11 @@ void Scene7100::Action8::signal() {
Common::Point pt2(379, 161);
NpcMover *mover2 = new NpcMover();
- scene->_object18.addMover(mover2, &pt2, 0);
+ scene->_object18.addMover(mover2, &pt2, NULL);
Common::Point pt3(373, 167);
NpcMover *mover3 = new NpcMover();
- scene->_object19.addMover(mover3, &pt3, 0);
+ scene->_object19.addMover(mover3, &pt3, NULL);
break;
}
case 4: {
@@ -877,11 +889,11 @@ void Scene7100::Action8::signal() {
Common::Point pt2(473, 187);
NpcMover *mover2 = new NpcMover();
- scene->_object18.addMover(mover2, &pt2, 0);
+ scene->_object18.addMover(mover2, &pt2, NULL);
Common::Point pt3(466, 192);
NpcMover *mover3 = new NpcMover();
- scene->_object19.addMover(mover3, &pt3, 0);
+ scene->_object19.addMover(mover3, &pt3, NULL);
break;
}
case 5: {
@@ -891,11 +903,11 @@ void Scene7100::Action8::signal() {
Common::Point pt2(552, 178);
NpcMover *mover2 = new NpcMover();
- scene->_object18.addMover(mover2, &pt2, 0);
+ scene->_object18.addMover(mover2, &pt2, NULL);
Common::Point pt3(541, 183);
NpcMover *mover3 = new NpcMover();
- scene->_object19.addMover(mover3, &pt3, 0);
+ scene->_object19.addMover(mover3, &pt3, NULL);
_actionIndex = 0;
break;
@@ -919,7 +931,7 @@ void Scene7100::Action9::signal() {
}
case 2: {
scene->_object24.setStrip2(2);
- scene->_object24.setPriority2(160);
+ scene->_object24.fixPriority(160);
Common::Point pt(34, 159);
NpcMover *mover = new NpcMover();
scene->_object24.addMover(mover, &pt, this);
@@ -934,7 +946,7 @@ void Scene7100::Action9::signal() {
}
case 4: {
scene->_object24.setStrip2(2);
- scene->_object24.setPriority2(180);
+ scene->_object24.fixPriority(180);
Common::Point pt(-12, 182);
NpcMover *mover = new NpcMover();
scene->_object24.addMover(mover, &pt, this);
@@ -1003,68 +1015,68 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object2.postInit();
_object2.setVisage(7161);
- _object2.animate(ANIM_MODE_2, 0);
- _object2.setPosition(Common::Point(10, 140), 0);
+ _object2.animate(ANIM_MODE_2, NULL);
+ _object2.setPosition(Common::Point(10, 140));
_object2._numFrames = 1;
- _object2.setPriority2(180);
- _object2.setAction(&_action1, 0);
+ _object2.fixPriority(180);
+ _object2.setAction(&_action1, NULL);
_object3.postInit();
_object3.setVisage(7161);
- _object3.animate(ANIM_MODE_2, 0);
- _object3.setPosition(Common::Point(34, 115), 0);
+ _object3.animate(ANIM_MODE_2, NULL);
+ _object3.setPosition(Common::Point(34, 115));
_object3._numFrames = 1;
- _object3.setPriority2(180);
- _object3.setAction(&_action2, 0);
+ _object3.fixPriority(180);
+ _object3.setAction(&_action2, NULL);
_object4.postInit();
_object4.setVisage(7164);
- _object4.animate(ANIM_MODE_2, 0);
- _object4.setPosition(Common::Point(-10, 159), 0);
+ _object4.animate(ANIM_MODE_2, NULL);
+ _object4.setPosition(Common::Point(-10, 159));
_object4._numFrames = 2;
- _object4.setPriority2(250);
- _object4.setAction(&_action3, 0);
+ _object4.fixPriority(250);
+ _object4.setAction(&_action3, NULL);
_object5.postInit();
_object5.setVisage(7162);
_object5.setStrip(3);
- _object5.animate(ANIM_MODE_2, 0);
- _object5.setPosition(Common::Point(20, 52), 0);
- _object5.setAction(&_action4, 0);
+ _object5.animate(ANIM_MODE_2, NULL);
+ _object5.setPosition(Common::Point(20, 52));
+ _object5.setAction(&_action4, NULL);
_object9.postInit();
_object9.setVisage(7160);
_object5.setStrip(2);
- _object9.animate(ANIM_MODE_2, 0);
- _object9.setPosition(Common::Point(110, 168), 0);
+ _object9.animate(ANIM_MODE_2, NULL);
+ _object9.setPosition(Common::Point(110, 168));
_object9._numFrames = 2;
- _object9.setPriority2(16);
- _object9.setAction(&_action5, 0);
+ _object9.fixPriority(16);
+ _object9.setAction(&_action5, NULL);
_object13.postInit();
_object13.setVisage(7161);
_object13.setStrip(8);
- _object13.animate(ANIM_MODE_2, 0);
- _object13.setPosition(Common::Point(524, 104), 0);
+ _object13.animate(ANIM_MODE_2, NULL);
+ _object13.setPosition(Common::Point(524, 104));
_object13._numFrames = 5;
- _object13.setPriority2(250);
- _object13.setAction(&_action7, 0);
+ _object13.fixPriority(250);
+ _object13.setAction(&_action7, NULL);
_object17.postInit();
_object17.setVisage(7160);
_object17.setStrip(3);
- _object17.animate(ANIM_MODE_2, 0);
- _object17.setPosition(Common::Point(552, 183), 0);
+ _object17.animate(ANIM_MODE_2, NULL);
+ _object17.setPosition(Common::Point(552, 183));
_object17._numFrames = 4;
_object17._moveDiff.x = 12;
_object17._moveDiff.y = 12;
- _object17.setAction(&_action8, 0);
+ _object17.setAction(&_action8, NULL);
_object18.postInit();
_object18.setVisage(7160);
_object18.setStrip(3);
- _object18.animate(ANIM_MODE_2, 0);
- _object18.setPosition(Common::Point(552, 178), 0);
+ _object18.animate(ANIM_MODE_2, NULL);
+ _object18.setPosition(Common::Point(552, 178));
_object18._numFrames = 4;
_object18._moveDiff.x = 12;
_object18._moveDiff.y = 12;
@@ -1072,8 +1084,8 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object19.postInit();
_object19.setVisage(7160);
_object19.setStrip(3);
- _object19.animate(ANIM_MODE_2, 0);
- _object19.setPosition(Common::Point(541, 183), 0);
+ _object19.animate(ANIM_MODE_2, NULL);
+ _object19.setPosition(Common::Point(541, 183));
_object19._numFrames = 4;
_object19._moveDiff.x = 12;
_object19._moveDiff.y = 12;
@@ -1081,42 +1093,42 @@ void Scene7100::postInit(SceneObjectList *OwnerList) {
_object24.postInit();
_object24.setVisage(7162);
_object24.setStrip(1);
- _object24.animate(ANIM_MODE_2, 0);
- _object24.setPosition(Common::Point(-12, 182), 0);
+ _object24.animate(ANIM_MODE_2, NULL);
+ _object24.setPosition(Common::Point(-12, 182));
_object24._numFrames = 4;
- _object24.setPriority2(180);
- _object24.setAction(&_action9, 0);
+ _object24.fixPriority(180);
+ _object24.setAction(&_action9, NULL);
_object25.postInit();
_object25.setVisage(7163);
- _object25.animate(ANIM_MODE_2, 0);
- _object25.setPosition(Common::Point(551, 145), 0);
+ _object25.animate(ANIM_MODE_2, NULL);
+ _object25.setPosition(Common::Point(551, 145));
_object25._numFrames = 5;
- _object25.setPriority2(160);
- _object25.setAction(&_action10, 0);
+ _object25.fixPriority(160);
+ _object25.setAction(&_action10, NULL);
// Swimmer 1
_globals->_player.postInit();
_globals->_player.setVisage(7101);
- _globals->_player.animate(ANIM_MODE_2, 0);
+ _globals->_player.animate(ANIM_MODE_2, NULL);
_globals->_player._moveDiff.x = 4;
_globals->_player._moveDiff.y = 2;
- _globals->_player.setPosition(Common::Point(135, 135), 0);
- _globals->_player.setPriority2(200);
+ _globals->_player.setPosition(Common::Point(135, 135));
+ _globals->_player.fixPriority(200);
_globals->_player.disableControl();
// Swimmer 2
_object1.postInit();
_object1.setVisage(7110);
- _object1.animate(ANIM_MODE_1, 0);
+ _object1.animate(ANIM_MODE_1, NULL);
_object1._moveDiff.x = 4;
_object1._moveDiff.y = 2;
- _object1.setPosition(Common::Point(100, 100), 0);
+ _object1.setPosition(Common::Point(100, 100));
setAction(&_action11);
- _soundHandler1.startSound(270, 0, 127);
- _soundHandler2.startSound(275, 0, 127);
- _globals->_soundHandler.startSound(270, 0, 127);
+ _soundHandler1.startSound(270);
+ _soundHandler2.startSound(275);
+ _globals->_soundHandler.startSound(270);
}
/*--------------------------------------------------------------------------
* Scene 7200
@@ -1158,9 +1170,9 @@ void Scene7200::Action2::signal() {
setDelay(3);
break;
case 1: {
- scene->_object2.setPriority2(25);
- scene->_object3.setPriority2(25);
- scene->_object4.setPriority2(25);
+ scene->_object2.fixPriority(25);
+ scene->_object3.fixPriority(25);
+ scene->_object4.fixPriority(25);
scene->_object2.setStrip(1);
scene->_object3.setStrip(1);
scene->_object4.setStrip(1);
@@ -1169,16 +1181,16 @@ void Scene7200::Action2::signal() {
scene->_object2.addMover(mover1, &pt1, this);
NpcMover *mover2 = new NpcMover();
Common::Point pt2(56, 85);
- scene->_object3.addMover(mover2, &pt2, 0);
+ scene->_object3.addMover(mover2, &pt2, NULL);
NpcMover *mover3 = new NpcMover();
Common::Point pt3(54, 80);
- scene->_object4.addMover(mover3, &pt3, 0);
+ scene->_object4.addMover(mover3, &pt3, NULL);
break;
}
case 2: {
- scene->_object2.setPriority2(160);
- scene->_object3.setPriority2(160);
- scene->_object4.setPriority2(160);
+ scene->_object2.fixPriority(160);
+ scene->_object3.fixPriority(160);
+ scene->_object4.fixPriority(160);
scene->_object2.setStrip(2);
scene->_object3.setStrip(2);
scene->_object4.setStrip(2);
@@ -1187,10 +1199,10 @@ void Scene7200::Action2::signal() {
scene->_object2.addMover(mover1, &pt1, this);
NpcMover *mover2 = new NpcMover();
Common::Point pt2(12, 84);
- scene->_object3.addMover(mover2, &pt2, 0);
+ scene->_object3.addMover(mover2, &pt2, NULL);
NpcMover *mover3 = new NpcMover();
Common::Point pt3(10, 79);
- scene->_object4.addMover(mover3, &pt3, 0);
+ scene->_object4.addMover(mover3, &pt3, NULL);
break;
}
case 3:
@@ -1208,80 +1220,80 @@ void Scene7200::postInit(SceneObjectList *OwnerList) {
Scene::postInit();
_object2.postInit();
_object2.setVisage(7160);
- _object2.animate(ANIM_MODE_2, 0);
+ _object2.animate(ANIM_MODE_2, NULL);
_object2.setZoom(10);
- _object2.setPosition(Common::Point(53, 88), 0);
+ _object2.setPosition(Common::Point(53, 88));
_object2.setAction(&_action2);
_object3.postInit();
_object3.setVisage(7160);
- _object3.animate(ANIM_MODE_2, 0);
+ _object3.animate(ANIM_MODE_2, NULL);
_object3.setZoom(10);
- _object3.setPosition(Common::Point(55, 83), 0);
+ _object3.setPosition(Common::Point(55, 83));
_object4.postInit();
_object4.setVisage(7160);
- _object4.animate(ANIM_MODE_2, 0);
+ _object4.animate(ANIM_MODE_2, NULL);
_object4.setZoom(10);
- _object4.setPosition(Common::Point(57, 78), 0);
+ _object4.setPosition(Common::Point(57, 78));
_object5.postInit();
_object5.setVisage(7201);
- _object5.setPosition(Common::Point(300, 172), 0);
+ _object5.setPosition(Common::Point(300, 172));
_object5.setPriority(172);
- _object5.animate(ANIM_MODE_2, 0);
+ _object5.animate(ANIM_MODE_2, NULL);
_object5._numFrames = 3;
_object6.postInit();
_object6.setVisage(7201);
_object6.setStrip2(3);
- _object6.setPosition(Common::Point(144, 97), 0);
+ _object6.setPosition(Common::Point(144, 97));
_object6.setPriority(199);
- _object6.animate(ANIM_MODE_2, 0);
+ _object6.animate(ANIM_MODE_2, NULL);
_object6._numFrames = 3;
_object7.postInit();
_object7.setVisage(7201);
_object7.setStrip2(4);
- _object7.setPosition(Common::Point(115, 123), 0);
+ _object7.setPosition(Common::Point(115, 123));
_object7.setPriority(199);
- _object7.animate(ANIM_MODE_2, 0);
+ _object7.animate(ANIM_MODE_2, NULL);
_object7._numFrames = 3;
_object8.postInit();
_object8.setVisage(7201);
_object8.setStrip2(6);
- _object8.setPosition(Common::Point(140, 173), 0);
+ _object8.setPosition(Common::Point(140, 173));
_object8.setPriority(199);
- _object8.animate(ANIM_MODE_2, 0);
+ _object8.animate(ANIM_MODE_2, NULL);
_object8._numFrames = 3;
_object9.postInit();
_object9.setVisage(7201);
_object9.setStrip2(7);
- _object9.setPosition(Common::Point(215, 196), 0);
+ _object9.setPosition(Common::Point(215, 196));
_object9.setPriority(199);
- _object9.animate(ANIM_MODE_2, 0);
+ _object9.animate(ANIM_MODE_2, NULL);
_object9._numFrames = 3;
// Orange swimmer
_globals->_player.postInit();
_globals->_player.setVisage(7110);
- _globals->_player.animate(ANIM_MODE_1, 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setZoom(50);
- _globals->_player.setPosition(Common::Point(-18, 16), 0);
+ _globals->_player.setPosition(Common::Point(-18, 16));
_globals->_player.disableControl();
_swimmer.postInit();
_swimmer.setVisage(7101);
- _swimmer.animate(ANIM_MODE_1, 0);
+ _swimmer.animate(ANIM_MODE_1, NULL);
_swimmer.setObjectWrapper(new SceneObjectWrapper());
_swimmer.setZoom(50);
- _swimmer.setPosition(Common::Point(-8, 16), 0);
+ _swimmer.setPosition(Common::Point(-8, 16));
setAction(&_action1);
- _soundHandler.startSound(271, 0, 127);
+ _soundHandler.startSound(271);
}
/*--------------------------------------------------------------------------
@@ -1316,14 +1328,14 @@ void Scene7300::Action1::signal() {
_globals->_player.setStrip(3);
_globals->_player._numFrames = 5;
_globals->_player.animate(ANIM_MODE_2, this);
- if (_globals->_inventory._translator._sceneNumber == 1)
+ if (RING_INVENTORY._translator._sceneNumber == 1)
scene->_stripManager.start(7310, this);
else
scene->_stripManager.start(7305, this);
break;
case 7:
setDelay(3);
- _globals->_soundHandler.proc1(0);
+ _globals->_soundHandler.proc1(NULL);
break;
case 8:
_globals->_sceneManager.changeScene(2280);
@@ -1342,7 +1354,7 @@ void Scene7300::Action2::signal() {
break;
case 1:
NpcMover *mover1 = new NpcMover();
- Common::Point pt(_globals->_randomSource.getRandomNumber(203), _globals->_randomSource.getRandomNumber(96));
+ Common::Point pt(_globals->_randomSource.getRandomNumber(3) + 203, _globals->_randomSource.getRandomNumber(3) + 96);
scene->_object3.addMover(mover1, &pt, this);
_actionIndex = 0;
break;
@@ -1360,7 +1372,7 @@ void Scene7300::Action3::signal() {
break;
case 1:
NpcMover *mover1 = new NpcMover();
- Common::Point pt(_globals->_randomSource.getRandomNumber(76), _globals->_randomSource.getRandomNumber(78));
+ Common::Point pt(_globals->_randomSource.getRandomNumber(5) + 76, _globals->_randomSource.getRandomNumber(5) + 78);
scene->_object1.addMover(mover1, &pt, this);
_actionIndex = 0;
break;
@@ -1414,69 +1426,69 @@ void Scene7300::postInit(SceneObjectList *OwnerList) {
_object4.setVisage(7311);
_object4.setStrip(1);
_object4.setFrame(1);
- _object4.setPosition(Common::Point(218, 157), 0);
+ _object4.setPosition(Common::Point(218, 157));
_object3.postInit();
_object3.setVisage(7311);
_object3.setStrip(2);
_object3.setFrame(1);
- _object3.setPosition(Common::Point(203, 96), 0);
+ _object3.setPosition(Common::Point(203, 96));
_object3._numFrames = 2;
_object3._moveDiff = Common::Point(1, 1);
- _object3.animate(ANIM_MODE_8, 0, 0);
- _object3._field7A = 2;
+ _object3.animate(ANIM_MODE_8, 0, NULL);
+ _object3._moveRate = 2;
_object3.setAction(&_action2);
_globals->_player.postInit();
_globals->_player.setVisage(7305);
- _globals->_player.animate(ANIM_MODE_1, 0);
- _globals->_player.setPosition(Common::Point(-100, 100), 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
+ _globals->_player.setPosition(Common::Point(-100, 100));
_globals->_player.disableControl();
_object1.postInit();
_object1.setVisage(7312);
- _object1.animate(ANIM_MODE_1, 0);
+ _object1.animate(ANIM_MODE_1, NULL);
_object1._moveDiff = Common::Point(1, 1);
- _object1.setPosition(Common::Point(76, 78), 0);
- _object1._field7A = 1;
+ _object1.setPosition(Common::Point(76, 78));
+ _object1._moveRate = 1;
_object1.setAction(&_action3);
_object2.postInit();
_object2.setVisage(7312);
_object2.setStrip(2);
- _object2.animate(ANIM_MODE_2, 0);
- _object2.setPosition(Common::Point(77, 47), 0);
- _object2.setPriority2(190);
+ _object2.animate(ANIM_MODE_2, NULL);
+ _object2.setPosition(Common::Point(77, 47));
+ _object2.fixPriority(190);
_object5.postInit();
_object5.setVisage(7300);
- _object5.setPosition(Common::Point(106, 45), 0);
- _object5.animate(ANIM_MODE_2, 0);
+ _object5.setPosition(Common::Point(106, 45));
+ _object5.animate(ANIM_MODE_2, NULL);
_object5._numFrames = 5;
_object6.postInit();
_object6.setVisage(7300);
_object6.setStrip2(2);
- _object6.setPosition(Common::Point(283, 193), 0);
- _object6.animate(ANIM_MODE_2, 0);
+ _object6.setPosition(Common::Point(283, 193));
+ _object6.animate(ANIM_MODE_2, NULL);
_object6._numFrames = 3;
_object7.postInit();
_object7.setVisage(7300);
_object7.setStrip(4);
- _object7.setPosition(Common::Point(295, 77), 0);
- _object7.animate(ANIM_MODE_2, 0);
+ _object7.setPosition(Common::Point(295, 77));
+ _object7.animate(ANIM_MODE_2, NULL);
_object7._numFrames = 3;
_object8.postInit();
_object8.setVisage(7300);
_object8.setStrip(5);
- _object8.setPosition(Common::Point(1, 147), 0);
- _object8.animate(ANIM_MODE_2, 0);
+ _object8.setPosition(Common::Point(1, 147));
+ _object8.animate(ANIM_MODE_2, NULL);
_object8._numFrames = 2;
setAction(&_action1);
- _globals->_soundHandler.startSound(272, 0, 127);
+ _globals->_soundHandler.startSound(272);
}
/*--------------------------------------------------------------------------
@@ -1530,41 +1542,41 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
_object2.postInit();
_object2.setVisage(7601);
_object2.setStrip(1);
- _object2.animate(ANIM_MODE_2, 0);
+ _object2.animate(ANIM_MODE_2, NULL);
_object2.setPosition(Common::Point(48, 135));
- _object2.setPriority2(1);
+ _object2.fixPriority(1);
_object3.postInit();
_object3.setVisage(7601);
_object3.setStrip(2);
- _object3.animate(ANIM_MODE_2, 0);
+ _object3.animate(ANIM_MODE_2, NULL);
_object3.setPosition(Common::Point(158, 136));
- _object3.setPriority2(1);
+ _object3.fixPriority(1);
_object4.postInit();
_object4.setVisage(7601);
_object4.setStrip(3);
- _object4.animate(ANIM_MODE_2, 0);
+ _object4.animate(ANIM_MODE_2, NULL);
_object4.setPosition(Common::Point(293, 141));
- _object4.setPriority2(1);
+ _object4.fixPriority(1);
_object5.postInit();
_object5.setVisage(7601);
_object5.setStrip(4);
- _object5.animate(ANIM_MODE_2, 0);
+ _object5.animate(ANIM_MODE_2, NULL);
_object5.setPosition(Common::Point(405, 143));
- _object5.setPriority2(1);
+ _object5.fixPriority(1);
_object6.postInit();
_object6.setVisage(7601);
_object6.setStrip(5);
- _object6.animate(ANIM_MODE_2, 0);
+ _object6.animate(ANIM_MODE_2, NULL);
_object6.setPosition(Common::Point(379, 191));
- _object6.setPriority2(1);
+ _object6.fixPriority(1);
_globals->_player.postInit();
_globals->_player.setVisage(2333);
- _globals->_player.animate(ANIM_MODE_1, 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
_globals->_player.setObjectWrapper(new SceneObjectWrapper());
_globals->_player.setStrip(1);
_globals->_player._moveDiff = Common::Point(16, 16);
@@ -1578,7 +1590,7 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
_globals->_player.setPosition(Common::Point(-50, 195));
setAction(&_action1);
}
- _sceneBounds.centre(_globals->_player._position.x, _globals->_player._position.y);
+ _sceneBounds.center(_globals->_player._position.x, _globals->_player._position.y);
loadScene(7600);
_soundHandler2.startSound(255);
_soundHandler1.startSound(251);
@@ -1590,7 +1602,7 @@ void Scene7600::postInit(SceneObjectList *OwnerList) {
*--------------------------------------------------------------------------*/
void Scene7700::Action1::signal() {
- SceneObject *fmtObj = (SceneObject *) _fmt;
+ SceneObjectExt *fmtObj = (SceneObjectExt *) _endHandler;
switch (_actionIndex++) {
case 0: {
PlayerMover *mover1 = new PlayerMover();
@@ -1600,7 +1612,7 @@ void Scene7700::Action1::signal() {
}
case 1:
_globals->_player.checkAngle(fmtObj);
- if (_globals->_player._field8C == 0)
+ if (fmtObj->_state == 0)
fmtObj->animate(ANIM_MODE_5, this);
else
fmtObj->animate(ANIM_MODE_6, this);
@@ -1619,7 +1631,7 @@ void Scene7700::Action2::signal() {
setDelay(_globals->_randomSource.getRandomNumber(60) + 60);
break;
case 1:
- scene->_prof.animate(ANIM_MODE_7, 0, 0);
+ scene->_prof.animate(ANIM_MODE_7, 0, NULL);
setDelay(20);
break;
case 3:
@@ -1644,9 +1656,9 @@ void Scene7700::Action3::signal() {
setDelay(60);
// No break on purpose!
case 2:
- scene->_soundHandler.startSound(260, 0, 127);
+ scene->_soundHandler.startSound(260);
scene->_object8.setVisage(7703);
- scene->_object8.setPosition(Common::Point(177, 97), 0);
+ scene->_object8.setPosition(Common::Point(177, 97));
scene->_object8.setStrip2(3);
scene->_object8.animate(ANIM_MODE_5, this);
scene->_object8._numFrames = 3;
@@ -1672,12 +1684,12 @@ void Scene7700::Action4::signal() {
scene->_object13.postInit();
scene->_object13.setVisage(7700);
scene->_object13.setStrip2(7);
- scene->_object13.setPosition(Common::Point(151, 33), 0);
+ scene->_object13.setPosition(Common::Point(151, 33));
scene->_object13.animate(ANIM_MODE_5, this);
break;
case 3:
CursorMan.showMouse(true);
- SceneItem::display(7700, 11, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 11);
_globals->_player.enableControl();
remove();
break;
@@ -1692,7 +1704,7 @@ void Scene7700::Action5::signal() {
break;
case 1: {
scene->_cloud.setFrame(_globals->_randomSource.getRandomNumber(1) + 1);
- scene->_cloud.setPosition(Common::Point(133, 145 + _globals->_randomSource.getRandomNumber(54)), 0);
+ scene->_cloud.setPosition(Common::Point(133, 145 + _globals->_randomSource.getRandomNumber(54)));
Common::Point pt(360, scene->_cloud._position.y);
NpcMover *mover = new NpcMover();
@@ -1717,13 +1729,13 @@ void Scene7700::Action6::signal() {
}
case 2:
scene->_easterEgg1.setStrip(2);
- scene->_easterEgg1.setPosition(Common::Point(43, 65), 0);
+ scene->_easterEgg1.setPosition(Common::Point(43, 65));
scene->_easterEgg2.postInit();
scene->_easterEgg2.setVisage(7708);
scene->_easterEgg2.setStrip(3);
- scene->_easterEgg2.setPosition(Common::Point(116, 54), 0);
- scene->_easterEgg2.animate(ANIM_MODE_2, 0);
+ scene->_easterEgg2.setPosition(Common::Point(116, 54));
+ scene->_easterEgg2.animate(ANIM_MODE_2, NULL);
setDelay(120);
break;
@@ -1737,14 +1749,14 @@ void Scene7700::Action6::signal() {
void Scene7700::SceneHotspot1::doAction(int action) {
if (action == CURSOR_LOOK)
- SceneItem::display(7700, 4, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 4);
else
SceneHotspot::doAction(action);
}
void Scene7700::SceneHotspot2::doAction(int action) {
if (action == CURSOR_LOOK)
- SceneItem::display(7700, 6, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 6);
else
SceneHotspot::doAction(action);
}
@@ -1754,23 +1766,23 @@ void Scene7700::SceneHotspot3::doAction(int action) {
switch (action) {
case OBJECT_KEY:
- SceneItem::display(7702, 3, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
- _globals->_inventory._key._sceneNumber = 7700;
+ SceneItem::display2(7702, 3);
+ RING_INVENTORY._key._sceneNumber = 7700;
break;
case CURSOR_LOOK:
- if (_globals->_inventory._key._sceneNumber == 7700)
- scene->setAction(&scene->_action4, 0);
+ if (RING_INVENTORY._key._sceneNumber == 7700)
+ scene->setAction(&scene->_action4, NULL);
else
- SceneItem::display(7700, 53, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 53);
break;
case CURSOR_USE:
if (!_globals->getFlag(78)) {
scene->_sceneMode = 7712;
- scene->setAction(&scene->_sequenceManager, scene, 7715, 0);
- } else if (_globals->_inventory._key._sceneNumber == 7700) {
+ scene->setAction(&scene->_sequenceManager, scene, 7715, NULL);
+ } else if (RING_INVENTORY._key._sceneNumber == 7700) {
_globals->_player.disableControl();
scene->_sceneMode = 7705;
- scene->setAction(&scene->_sequenceManager, scene, 7705, &_globals->_player, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7705, &_globals->_player, NULL);
}
break;
default:
@@ -1784,14 +1796,14 @@ void Scene7700::SceneHotspot4::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display(7700, 12, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 12);
break;
case CURSOR_USE:
if (!_globals->getFlag(78)) {
scene->_sceneMode = 7712;
- scene->setAction(&scene->_sequenceManager, scene, 7715, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7715, NULL);
} else {
- SceneItem::display(7700, 12, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 12);
}
break;
default:
@@ -1805,18 +1817,18 @@ void Scene7700::SceneHotspot5::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display(7700, 28, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 28);
break;
case CURSOR_USE:
if (_globals->getFlag(78)) {
- if (_globals->_inventory._paper._sceneNumber == 7700) {
+ if (RING_INVENTORY._paper._sceneNumber == 7700) {
_globals->_player.disableControl();
scene->_sceneMode = 7708;
- scene->setAction(&scene->_sequenceManager, scene, 7708, &_globals->_player, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7708, &_globals->_player, NULL);
}
} else {
scene->_sceneMode = 7712;
- scene->setAction(&scene->_sequenceManager, scene, 7715, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7715, NULL);
}
break;
default:
@@ -1828,10 +1840,10 @@ void Scene7700::SceneHotspot5::doAction(int action) {
void Scene7700::SceneHotspot6::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display(7700, 43, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 43);
break;
case CURSOR_USE:
- SceneItem::display(7700, 56, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 56);
break;
default:
SceneHotspot::doAction(action);
@@ -1841,7 +1853,7 @@ void Scene7700::SceneHotspot6::doAction(int action) {
void Scene7700::SceneItem7::doAction(int action) {
if (action == CURSOR_LOOK)
- SceneItem::display(7700, 51, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 51);
}
void Scene7700::SceneHotspot8::doAction(int action) {
@@ -1849,11 +1861,11 @@ void Scene7700::SceneHotspot8::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display(7700, 48, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 48);
break;
case CURSOR_USE:
scene->_sceneMode = 7709;
- scene->_soundHandler.startSound(259, 0, 127);
+ scene->_soundHandler.startSound(259);
scene->_object15.setFrame(scene->_object15.getFrameCount());
scene->_object15.animate(ANIM_MODE_6, scene);
if ((scene->_field977 == 2) && (scene->_field97B == 0)) {
@@ -1875,11 +1887,11 @@ void Scene7700::SceneHotspot9::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display(7700, 48, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 48);
break;
case CURSOR_USE:
scene->_sceneMode = 7709;
- scene->_soundHandler.startSound(259, 0, 127);
+ scene->_soundHandler.startSound(259);
scene->_object15.setFrame(1);
scene->_object15.animate(ANIM_MODE_5, scene);
if (scene->_field977 > 2) {
@@ -1917,14 +1929,14 @@ void Scene7700::Object1::doAction(int action) {
Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
- SceneItem::display(7700, _lookLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, _lookLineNum);
} else if (action == CURSOR_USE) {
if (_globals->getFlag(78)) {
_globals->_player.disableControl();
scene->setAction(&scene->_action1, this);
} else {
scene->_sceneMode = 7712;
- scene->setAction(&scene->_sequenceManager, scene, 7715, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7715, NULL);
}
} else {
SceneHotspot::doAction(action);
@@ -1934,10 +1946,10 @@ void Scene7700::Object1::doAction(int action) {
void Scene7700::SceneHotspot11::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display(7700, _lookLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, _lookLineNum);
break;
case CURSOR_USE:
- SceneItem::display(7701, _useLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7701, _useLineNum);
break;
default:
SceneHotspot::doAction(action);
@@ -1948,7 +1960,7 @@ void Scene7700::SceneHotspot11::doAction(int action) {
void Scene7700::Object1::signal() {
if (_state == 0) {
_state = 1;
- SceneItem::display(7701, _defltLineNum, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7701, _defltLineNum);
} else {
_state = 0;
}
@@ -1959,19 +1971,19 @@ void Scene7700::Object3::doAction(int action) {
Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
- SceneItem::display(7700, 34, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 34);
} else if (action == CURSOR_USE) {
if (_globals->getFlag(78)) {
if (scene->_object3._frame == 1) {
_globals->_player.disableControl();
scene->_sceneMode = 7707;
- scene->setAction(&scene->_sequenceManager, scene, 7707, &_globals->_player, this, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7707, &_globals->_player, this, NULL);
} else {
- SceneItem::display(7700, 60, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 60);
}
} else {
scene->_sceneMode = 7712;
- scene->setAction(&scene->_sequenceManager, scene, 7715, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7715, NULL);
}
} else {
SceneHotspot::doAction(action);
@@ -1984,30 +1996,30 @@ void Scene7700::Object7::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
if (_globals->getFlag(78))
- SceneItem::display(7700, 45, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 45);
else
- SceneItem::display(7700, 44, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 44);
break;
case CURSOR_USE:
if (_globals->getFlag(78)) {
- SceneItem::display(7701, 41, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7701, 41);
} else {
scene->_sceneMode = 7712;
- scene->setAction(&scene->_sequenceManager, scene, 7714, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7714, NULL);
}
break;
case CURSOR_TALK:
if (_globals->getFlag(78)) {
- SceneItem::display(7702, 1, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7702, 1);
} else {
_globals->_player.disableControl();
if (_state == 0) {
_state = 1;
scene->_sceneMode = 7703;
- scene->setAction(&scene->_sequenceManager, scene, 7703, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7703, NULL);
} else {
scene->_sceneMode = 7712;
- scene->setAction(&scene->_sequenceManager, scene, 7712, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7712, NULL);
}
}
break;
@@ -2015,10 +2027,10 @@ void Scene7700::Object7::doAction(int action) {
if (!_globals->getFlag(78)) {
_globals->_soundHandler.proc3();
_globals->setFlag(78);
- setAction(0);
+ setAction(NULL);
_globals->_player.disableControl();
scene->_sceneMode = 7704;
- scene->setAction(&scene->_sequenceManager, scene, 7704, &_globals->_player, this, 0);
+ scene->setAction(&scene->_sequenceManager, scene, 7704, &_globals->_player, this, NULL);
}
break;
default:
@@ -2035,44 +2047,45 @@ void Scene7700::Object8::doAction(int action) {
scene->_object9.postInit();
scene->_object9.setVisage(7701);
scene->_object9.setStrip2(3);
- scene->_object9.setPosition(Common::Point(91, 166), 0);
- scene->_object9.setPriority2(200);
+ scene->_object9.setPosition(Common::Point(91, 166));
+ scene->_object9.fixPriority(200);
scene->_object14.postInit();
scene->_object14.setVisage(7701);
scene->_object14.setStrip(2);
- scene->_object14.setPriority2(250);
- scene->_object14.setPosition(Common::Point(139, 151), 0);
+ scene->_object14.fixPriority(250);
+ scene->_object14.setPosition(Common::Point(139, 151));
scene->_gfxButton.setText(EXIT_MSG);
- scene->_gfxButton._bounds.centre(140, 189);
+ scene->_gfxButton._bounds.center(140, 189);
scene->_gfxButton.draw();
- scene->_gfxButton._bounds.expandPanes();
- _globals->_sceneItems.push_front(&scene->_object10);
+ _globals->_sceneItems.push_front(&scene->_sceneItem10);
_globals->_sceneItems.push_front(&scene->_object9);
_globals->_player._canWalk = false;
- } else {
+ } else if (_globals->getFlag(78)) {
scene->_object15.postInit();
scene->_object15.setVisage(7701);
- scene->_object15.setPosition(Common::Point(140, 165), 0);
- scene->_object15.setPriority2(200);
+ scene->_object15.setPosition(Common::Point(140, 165));
+ scene->_object15.fixPriority(200);
scene->_gfxButton.setText(EXIT_MSG);
- scene->_gfxButton._bounds.centre(140, 186);
+ scene->_gfxButton._bounds.center(140, 186);
scene->_gfxButton.draw();
scene->_gfxButton._bounds.expandPanes();
scene->_object19.postInit();
scene->_object19.setVisage(7700);
scene->_object19.setStrip(6);
- scene->_object19.setPosition(Common::Point(140, 192), 0);
+ scene->_object19.setPosition(Common::Point(140, 192));
- _globals->_sceneItems.push_front(&scene->_object10);
- _globals->_sceneItems.push_front(&scene->_object8);
- _globals->_sceneItems.push_front(&scene->_object9);
+ _globals->_sceneItems.push_front(&scene->_sceneItem10);
+ _globals->_sceneItems.push_front(&scene->_sceneHotspot8);
+ _globals->_sceneItems.push_front(&scene->_sceneHotspot9);
_globals->_events.setCursor(CURSOR_WALK);
_globals->_player._canWalk = false;
+ } else {
+ scene->setAction(&scene->_sequenceManager, scene, 7715, NULL);
}
} else {
SceneHotspot::doAction(action);
@@ -2084,13 +2097,13 @@ void Scene7700::Object9::doAction(int action) {
switch (action) {
case CURSOR_LOOK:
- SceneItem::display(7700, 49, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 49);
break;
case CURSOR_USE:
- SceneItem::display(7701, 42, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7701, 42);
break;
case CURSOR_TALK:
- SceneItem::display(7702, 4, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7702, 4);
break;
case OBJECT_KEY:
if (_frame == 1) {
@@ -2100,10 +2113,10 @@ void Scene7700::Object9::doAction(int action) {
scene->_object10.setStrip(4);
scene->_object10.setPosition(Common::Point(159, 136));
_globals->_sceneItems.push_front(&scene->_object10);
- scene->_object10.setPriority2(240);
+ scene->_object10.fixPriority(240);
}
- scene->_soundHandler.startSound(262, 0, 127);
- scene->_object14.animate(ANIM_MODE_5, 0);
+ scene->_soundHandler.startSound(262);
+ scene->_object14.animate(ANIM_MODE_5, NULL);
}
_globals->_events.setCursor(CURSOR_WALK);
break;
@@ -2116,8 +2129,10 @@ void Scene7700::Object10::doAction(int action) {
Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
- SceneItem::display(7700, 50, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 50);
} else if (action == CURSOR_USE) {
+ _globals->_player._canWalk = true;
+ RING_INVENTORY._translator._sceneNumber = 1;
_globals->setFlag(80);
scene->_sceneItem10.remove();
scene->_gfxButton._bounds.expandPanes();
@@ -2135,19 +2150,19 @@ void Scene7700::Object11::doAction(int action) {
switch (action) {
case OBJECT_SCANNER:
if (_frame != 1)
- SceneItem::display(7701, 44, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7701, 44);
else
SceneItem::doAction(action);
break;
case CURSOR_LOOK:
if (_frame != 1)
- SceneItem::display(7700, 9, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 9);
else
- SceneItem::display(7700, 52, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 52);
break;
case CURSOR_USE:
if (_frame != 1) {
- SceneItem::display(7701, 8, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7701, 8);
} else {
_globals->setFlag(49);
_globals->_player.disableControl();
@@ -2156,8 +2171,8 @@ void Scene7700::Object11::doAction(int action) {
}
break;
case OBJECT_EMPTY_JAR:
- _globals->_inventory._emptyJar._sceneNumber = 0;
- _globals->_inventory._jar._sceneNumber = 1;
+ RING_INVENTORY._emptyJar._sceneNumber = 0;
+ RING_INVENTORY._jar._sceneNumber = 1;
_globals->_player.disableControl();
scene->_sceneMode = 7710;
scene->setAction(&scene->_sequenceManager, scene, 7710, &_globals->_player, NULL);
@@ -2171,7 +2186,7 @@ void Scene7700::Object12::doAction(int action) {
Scene7700 *scene = (Scene7700 *)_globals->_sceneManager._scene;
if (action == CURSOR_LOOK) {
- SceneItem::display(7700, 15, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 15);
} else if (action == CURSOR_USE) {
if (_globals->getFlag(78)) {
scene->_sceneMode = 7713;
@@ -2188,13 +2203,13 @@ void Scene7700::Object12::doAction(int action) {
void Scene7700::signal() {
switch (_sceneMode) {
case 7701:
- _globals->_player.setPriority2(-1);
+ _globals->_player.fixPriority(-1);
_globals->_player.setStrip2(-1);
if (_globals->getFlag(78)) {
_globals->_player.enableControl();
} else {
_sceneMode = 7711;
- setAction(&_sequenceManager, this, 7711, 0);
+ setAction(&_sequenceManager, this, 7711, NULL);
}
break;
case 7702:
@@ -2209,15 +2224,18 @@ void Scene7700::signal() {
_globals->_player.enableControl();
break;
case 7704:
- _globals->_soundHandler.startSound(256, 0, 127);
+ _globals->_soundHandler.startSound(256);
_prof.setStrip2(4);
_prof.setFrame2(1);
- _prof.setPosition(Common::Point(159, 87), 0);
+ _prof.setPosition(Common::Point(159, 87));
_globals->_player.enableControl();
break;
case 7705:
+ RING_INVENTORY._key._sceneNumber = 1;
+ _globals->_player.enableControl();
+ break;
case 7708:
- _globals->_inventory._key._sceneNumber = 1;
+ RING_INVENTORY._paper._sceneNumber = 1;
_globals->_player.enableControl();
break;
case 7709:
@@ -2225,11 +2243,11 @@ void Scene7700::signal() {
break;
case 7710:
_globals->_player.enableControl();
- SceneItem::display(7700, 62, SET_WIDTH, 200, SET_EXT_BGCOLOUR, 7, LIST_END);
+ SceneItem::display2(7700, 62);
break;
case 7713:
_emptyJar.remove();
- _globals->_inventory._emptyJar._sceneNumber = 1;
+ RING_INVENTORY._emptyJar._sceneNumber = 1;
break;
default:
break;
@@ -2242,8 +2260,8 @@ void Scene7700::process(Event &event) {
if (contains<SceneItem *>(_globals->_sceneItems, &_sceneItem10)) {
if (_gfxButton.process(event)) {
_sceneItem10.remove();
- _sceneHotspot15.remove();
- _sceneHotspot9.remove();
+ _object15.remove();
+ _object9.remove();
if (_globals->_sceneObjects->contains(&_object10))
_object10.remove();
if (_globals->_sceneObjects->contains(&_object14))
@@ -2258,9 +2276,9 @@ void Scene7700::process(Event &event) {
if (!_globals->_sceneObjects->contains(&_easterEgg1)) {
_easterEgg1.postInit();
_easterEgg1.setVisage(7708);
- _easterEgg1.setPosition(Common::Point(163, 50), 0);
- _easterEgg1.setPriority2(1);
- _easterEgg1.animate(ANIM_MODE_2, 0);
+ _easterEgg1.setPosition(Common::Point(163, 50));
+ _easterEgg1.fixPriority(1);
+ _easterEgg1.animate(ANIM_MODE_2, NULL);
_easterEgg1.setAction(&_action6);
}
}
@@ -2275,7 +2293,7 @@ void Scene7700::dispatch() {
if ((_action == 0) && (_globals->_sceneRegions.indexOf(_globals->_player._position) == 30)) {
_globals->_player.disableControl();
_sceneMode = 7702;
- setAction(&_sequenceManager, this, 7702, &_globals->_player, 0);
+ setAction(&_sequenceManager, this, 7702, &_globals->_player, NULL);
}
Scene::dispatch();
}
@@ -2296,12 +2314,12 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_globals->_player.postInit();
_globals->_player.setVisage(4201);
- _globals->_player.animate(ANIM_MODE_1, 0);
+ _globals->_player.animate(ANIM_MODE_1, NULL);
SceneObjectWrapper *wrapper = new SceneObjectWrapper();
_globals->_player.setObjectWrapper(wrapper);
- _globals->_player.setPosition(Common::Point(-19, 68), 0);
+ _globals->_player.setPosition(Common::Point(-19, 68));
_globals->_player.setStrip2(7);
- _globals->_player.setPriority2(95);
+ _globals->_player.fixPriority(95);
_globals->_player.changeZoom(80);
_globals->_player._moveDiff.x = 6;
_globals->_player._moveDiff.y = 3;
@@ -2312,10 +2330,10 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
if (_globals->getFlag(78)) {
_prof.setStrip2(4);
- _prof.setPriority2(80);
- _prof.setPosition(Common::Point(159, 87), 0);
+ _prof.fixPriority(80);
+ _prof.setPosition(Common::Point(159, 87));
} else {
- _prof.setPosition(Common::Point(203, 87), 0);
+ _prof.setPosition(Common::Point(203, 87));
_prof.setStrip2(2);
_prof._numFrames = 6;
_prof.setAction(&_action2);
@@ -2324,74 +2342,74 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_cloud.postInit();
_cloud.setVisage(7700);
_cloud.setStrip2(5);
- _cloud.setPriority2(1);
- _cloud.setPosition(Common::Point(133, 160), 0);
+ _cloud.fixPriority(1);
+ _cloud.setPosition(Common::Point(133, 160));
_cloud._moveDiff.x = 1;
- _cloud._field7A = 7;
+ _cloud._moveRate = 7;
_cloud.setAction(&_action5);
_object1.postInit();
_object1.setVisage(7700);
- _object1.setPosition(Common::Point(184, 61), 0);
+ _object1.setPosition(Common::Point(184, 61));
_object1._lookLineNum = 18;
_object1._defltLineNum = 16;
_object2.postInit();
_object2.setVisage(7700);
- _object2.setPosition(Common::Point(184, 70), 0);
- _object2.setPriority2(60);
+ _object2.setPosition(Common::Point(184, 70));
+ _object2.fixPriority(60);
_object2._lookLineNum = 19;
_object2._defltLineNum = 17;
_object3.postInit();
_object3.setVisage(7703);
- _object3.setPosition(Common::Point(288, 36), 0);
+ _object3.setPosition(Common::Point(288, 36));
_object3.setStrip(2);
_object4.postInit();
_object4.setVisage(7700);
- _object4.setPosition(Common::Point(268, 59), 0);
+ _object4.setPosition(Common::Point(268, 59));
_object4.setStrip(2);
_object4._lookLineNum = 37;
_object4._defltLineNum = 35;
_object5.postInit();
_object5.setVisage(7700);
- _object5.setPosition(Common::Point(268, 67), 0);
- _object5.setPriority2(58);
+ _object5.setPosition(Common::Point(268, 67));
+ _object5.fixPriority(58);
_object5.setStrip2(3);
_object5._lookLineNum = 38;
_object5._defltLineNum = 36;
_object6.postInit();
_object6.setVisage(7700);
- _object6.setPosition(Common::Point(268, 75), 0);
- _object6.setPriority2(57);
+ _object6.setPosition(Common::Point(268, 75));
+ _object6.fixPriority(57);
_object6.setStrip2(4);
_object6._lookLineNum = 40;
_object6._defltLineNum = 43;
_object8.postInit();
_object8.setVisage(7703);
- _object8.setPosition(Common::Point(203, 91), 0);
+ _object8.setPosition(Common::Point(203, 91));
_object8.setStrip2(4);
- _object8.setPriority2(86);
+ _object8.fixPriority(86);
_sceneHotspot8.setBounds(82, 141, 161, 92);
_sceneHotspot9.setBounds(82, 187, 161, 141);
_cork.postInit();
_cork.setVisage(7703);
- _cork.setPosition(Common::Point(32, 128), 0);
+ _cork.setPosition(Common::Point(32, 128));
if (_globals->getFlag(49))
_cork.setFrame(_cork.getFrameCount());
- if (_globals->_inventory._emptyJar._sceneNumber == 7700) {
+ if (RING_INVENTORY._emptyJar._sceneNumber == 7700) {
_emptyJar.postInit();
_emptyJar.setVisage(7700);
_emptyJar.setStrip(8);
- _emptyJar.setPosition(Common::Point(189, 48), 0);
+ _emptyJar.setPosition(Common::Point(189, 48));
_globals->_sceneItems.addItems(&_emptyJar, NULL);
}
_sceneHotspot1._sceneRegionId = 28;
@@ -2420,8 +2438,8 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_sceneHotspot15._useLineNum = 6;
_sceneHotspot15._lookLineNum = 7;
_sceneHotspot16.setBounds(0, 130, 34, 103);
- _sceneHotspot16._useLineNum = 8;
- _sceneHotspot16._lookLineNum = 9;
+ _sceneHotspot16._useLineNum = 7;
+ _sceneHotspot16._lookLineNum = 8;
_sceneHotspot17.setBounds(41, 180, 46, 170);
_sceneHotspot17._useLineNum = 11;
_sceneHotspot17._lookLineNum = 13;
@@ -2492,8 +2510,8 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
_globals->_sceneItems.addItems(&_object6, &_object5, &_object4, &_sceneHotspot6, &_sceneHotspot36, &_sceneItem7, NULL);
_sceneMode = 7701;
- setAction(&_sequenceManager, this, 7701, &_globals->_player, 0);
- _soundHandler.startSound(256, 0, 127);
+ setAction(&_sequenceManager, this, 7701, &_globals->_player, NULL);
+ _soundHandler.startSound(256);
}
Scene7700::Scene7700() {
diff --git a/engines/tsage/ringworld_scenes8.h b/engines/tsage/ringworld_scenes8.h
index 0c39920614..713520c6a0 100644
--- a/engines/tsage/ringworld_scenes8.h
+++ b/engines/tsage/ringworld_scenes8.h
@@ -41,14 +41,15 @@ public:
NamedHotspotMult() : SceneHotspot() {}
virtual Common::String getClassName() { return "NamedHotspotMult"; }
+ virtual void synchronize(Serializer &s);
};
class SceneObject7700 : public SceneObjectExt {
public:
int _lookLineNum, _defltLineNum;
- virtual void synchronise(Serialiser &s) {
- SceneObject::synchronise(s);
+ virtual void synchronize(Serializer &s) {
+ SceneObject::synchronize(s);
s.syncAsSint16LE(_lookLineNum);
s.syncAsSint16LE(_defltLineNum);
}
@@ -94,7 +95,7 @@ class Scene7000 : public Scene {
};
/* Items */
- class SceneItem1 : public SceneItem {
+ class Hotspot1 : public SceneHotspot {
public:
virtual void doAction(int action);
};
@@ -107,7 +108,7 @@ public:
SpeakerQL _speakerQL;
SpeakerQR _speakerQR;
SpeakerQText _speakerQText;
- SceneObject _object1;
+ Object1 _object1;
SceneObject _object2;
SceneObject _object3;
SceneObject _object4;
@@ -124,7 +125,7 @@ public:
Action5 _action5;
Action6 _action6;
Action7 _action7;
- SceneItem1 _sceneItem1;
+ Hotspot1 _hotspot1;
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp
index 7983e2a34c..a0091bfd6a 100644
--- a/engines/tsage/saveload.cpp
+++ b/engines/tsage/saveload.cpp
@@ -24,6 +24,7 @@
*/
#include "common/savefile.h"
+#include "graphics/palette.h"
#include "graphics/scaler.h"
#include "graphics/thumbnail.h"
#include "tsage/globals.h"
@@ -52,7 +53,7 @@ Saver::Saver() {
Saver::~Saver() {
// Internal validation that no saved object is still present
int totalLost = 0;
- for (SynchronisedList<SavedObject *>::iterator i = _saver->_objList.begin(); i != _saver->_objList.end(); ++i) {
+ for (SynchronizedList<SavedObject *>::iterator i = _saver->_objList.begin(); i != _saver->_objList.end(); ++i) {
SavedObject *so = *i;
if (so)
++totalLost;
@@ -64,7 +65,7 @@ Saver::~Saver() {
/*--------------------------------------------------------------------------*/
-void Serialiser::syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion,
+void Serializer::syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion,
Common::Serializer::Version maxVersion) {
int idx;
assert(ptr);
@@ -88,7 +89,7 @@ void Serialiser::syncPointer(SavedObject **ptr, Common::Serializer::Version minV
}
}
-void Serialiser::validate(const Common::String &s, Common::Serializer::Version minVersion,
+void Serializer::validate(const Common::String &s, Common::Serializer::Version minVersion,
Common::Serializer::Version maxVersion) {
Common::String tempStr = s;
syncString(tempStr, minVersion, maxVersion);
@@ -97,7 +98,7 @@ void Serialiser::validate(const Common::String &s, Common::Serializer::Version m
error("Savegame is corrupt");
}
-void Serialiser::validate(int v, Common::Serializer::Version minVersion,
+void Serializer::validate(int v, Common::Serializer::Version minVersion,
Common::Serializer::Version maxVersion) {
int tempVal = v;
syncAsUint32LE(tempVal, minVersion, maxVersion);
@@ -117,9 +118,10 @@ Common::Error Saver::save(int slot, const Common::String &saveName) {
_macroSaveFlag = true;
_saveSlot = slot;
- // Set up the serialiser
+ // Set up the serializer
Common::OutSaveFile *saveFile = g_system->getSavefileManager()->openForSaving(_vm->generateSaveName(slot));
- Serialiser serialiser(NULL, saveFile);
+ Serializer serializer(NULL, saveFile);
+ serializer.setSaveVersion(TSAGE_SAVEGAME_VERSION);
// Write out the savegame header
tSageSavegameHeader header;
@@ -128,14 +130,14 @@ Common::Error Saver::save(int slot, const Common::String &saveName) {
writeSavegameHeader(saveFile, header);
// Save out objects that need to come at the start of the savegame
- for (SynchronisedList<SaveListener *>::iterator i = _listeners.begin(); i != _listeners.end(); ++i) {
- (*i)->listenerSynchronise(serialiser);
+ for (SynchronizedList<SaveListener *>::iterator i = _listeners.begin(); i != _listeners.end(); ++i) {
+ (*i)->listenerSynchronize(serializer);
}
// Save each registered SaveObject descendant object into the savegame file
- for (SynchronisedList<SavedObject *>::iterator i = _objList.begin(); i != _objList.end(); ++i) {
- serialiser.validate((*i)->getClassName());
- (*i)->synchronise(serialiser);
+ for (SynchronizedList<SavedObject *>::iterator i = _objList.begin(); i != _objList.end(); ++i) {
+ serializer.validate((*i)->getClassName());
+ (*i)->synchronize(serializer);
}
// Save file complete
@@ -151,34 +153,36 @@ Common::Error Saver::save(int slot, const Common::String &saveName) {
}
Common::Error Saver::restore(int slot) {
- assert(!getMacroSaveFlag());
+ assert(!getMacroRestoreFlag());
// Signal any objects registered for notification
_loadNotifiers.notify(false);
// Set fields
- _macroSaveFlag = true;
+ _macroRestoreFlag = true;
_saveSlot = slot;
_unresolvedPtrs.clear();
- // Set up the serialiser
+ // Set up the serializer
Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(_vm->generateSaveName(slot));
- Serialiser serialiser(saveFile, NULL);
+ Serializer serializer(saveFile, NULL);
// Read in the savegame header
tSageSavegameHeader header;
readSavegameHeader(saveFile, header);
delete header.thumbnail;
+ serializer.setSaveVersion(header.version);
+
// Load in data for objects that need to come at the start of the savegame
for (Common::List<SaveListener *>::iterator i = _listeners.begin(); i != _listeners.end(); ++i) {
- (*i)->listenerSynchronise(serialiser);
+ (*i)->listenerSynchronize(serializer);
}
// Loop through each registered object to load in the data
- for (SynchronisedList<SavedObject *>::iterator i = _objList.begin(); i != _objList.end(); ++i) {
- serialiser.validate((*i)->getClassName());
- (*i)->synchronise(serialiser);
+ for (SynchronizedList<SavedObject *>::iterator i = _objList.begin(); i != _objList.end(); ++i) {
+ serializer.validate((*i)->getClassName());
+ (*i)->synchronize(serializer);
}
// Loop through the remaining data of the file, instantiating new objects.
@@ -186,17 +190,17 @@ Common::Error Saver::restore(int slot) {
// of instantiating a saved object registers it with the saver, and will then be resolved to whatever
// object originally had a pointer to it as part of the post-processing step
Common::String className;
- serialiser.syncString(className);
+ serializer.syncString(className);
while (className != "END") {
SavedObject *savedObject;
if (!_factoryPtr || ((savedObject = _factoryPtr(className)) == NULL))
error("Unknown class name '%s' encountered trying to restore savegame", className.c_str());
// Populate the contents of the object
- savedObject->synchronise(serialiser);
+ savedObject->synchronize(serializer);
// Move to next object
- serialiser.syncString(className);
+ serializer.syncString(className);
}
// Post-process any unresolved pointers to get the correct pointer
@@ -224,7 +228,7 @@ bool Saver::readSavegameHeader(Common::InSaveFile *in, tSageSavegameHeader &head
return false;
header.version = in->readByte();
- if (header.version != TSAGE_SAVEGAME_VERSION)
+ if (header.version > TSAGE_SAVEGAME_VERSION)
return false;
// Read in the string
@@ -261,16 +265,8 @@ void Saver::writeSavegameHeader(Common::OutSaveFile *out, tSageSavegameHeader &h
out->write(header.saveName.c_str(), header.saveName.size() + 1);
// Get the active palette
- uint32 workPal[256];
uint8 thumbPalette[256 * 3];
- const byte *srcP = (const byte *)&workPal[0];
- byte *destP = &thumbPalette[0];
- g_system->getPaletteManager()->grabPalette((byte *)workPal, 0, 256);
- for (int idx = 0; idx < 256; ++idx, ++srcP) {
- *destP++ = *srcP++;
- *destP++ = *srcP++;
- *destP++ = *srcP++;
- }
+ g_system->getPaletteManager()->grabPalette(thumbPalette, 0, 256);
// Create a thumbnail and save it
Graphics::Surface *thumb = new Graphics::Surface();
@@ -343,7 +339,7 @@ bool Saver::savegamesExist() const {
*/
int Saver::blockIndexOf(SavedObject *p) {
int objIndex = 1;
- SynchronisedList<SavedObject *>::iterator iObj;
+ Common::List<SavedObject *>::iterator iObj;
for (iObj = _objList.begin(); iObj != _objList.end(); ++iObj, ++objIndex) {
SavedObject *iObjP = *iObj;
@@ -355,6 +351,25 @@ int Saver::blockIndexOf(SavedObject *p) {
}
/**
+ * Returns the number of objects in the object list registry
+ */
+int Saver::getObjectCount() const {
+ return _objList.size();
+}
+
+/**
+ * List any currently active objects
+ */
+void Saver::listObjects() {
+ Common::List<SavedObject *>::iterator i;
+ int count = 1;
+
+ for (i = _objList.begin(); i != _objList.end(); ++i, ++count)
+ debug("%d - %s", count, (*i)->getClassName().c_str());
+ debugN("\n");
+}
+
+/**
* Returns the pointer associated with the specified object index
*/
void Saver::resolveLoadPointers() {
@@ -364,14 +379,16 @@ void Saver::resolveLoadPointers() {
// Outer loop through the main object list
int objIndex = 1;
- for (SynchronisedList<SavedObject *>::iterator iObj = _objList.begin(); iObj != _objList.end(); ++iObj, ++objIndex) {
+ for (SynchronizedList<SavedObject *>::iterator iObj = _objList.begin(); iObj != _objList.end(); ++iObj, ++objIndex) {
Common::List<SavedObjectRef>::iterator iPtr;
+ SavedObject *pObj = *iObj;
for (iPtr = _unresolvedPtrs.begin(); iPtr != _unresolvedPtrs.end(); ) {
SavedObjectRef &r = *iPtr;
if (r._objIndex == objIndex) {
// Found an unresolved pointer to this object
- *r._savedObject = *iObj;
+ SavedObject **objPP = r._savedObject;
+ *objPP = pObj;
iPtr = _unresolvedPtrs.erase(iPtr);
} else {
++iPtr;
diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h
index 83661b8f15..cf7d087e6e 100644
--- a/engines/tsage/saveload.h
+++ b/engines/tsage/saveload.h
@@ -36,7 +36,7 @@ namespace tSage {
typedef void (*SaveNotifierFn)(bool postFlag);
-#define TSAGE_SAVEGAME_VERSION 1
+#define TSAGE_SAVEGAME_VERSION 2
class SavedObject;
@@ -51,16 +51,28 @@ struct tSageSavegameHeader {
/*--------------------------------------------------------------------------*/
-#define SYNC_POINTER(x) s.syncPointer((SavedObject **)&x)
+// FIXME: workaround to supress spurious strict-alias warnings on older GCC
+// versions. this should be resolved with the savegame rewrite
+#define SYNC_POINTER(x) do { \
+ SavedObject **y = (SavedObject **)((void *)&x); \
+ s.syncPointer(y); \
+} while (false)
+
#define SYNC_ENUM(FIELD, TYPE) int v_##FIELD = (int)FIELD; s.syncAsUint16LE(v_##FIELD); \
if (s.isLoading()) FIELD = (TYPE)v_##FIELD;
/**
- * Derived serialiser class with extra synchronisation types
+ * Derived serializer class with extra synchronisation types
*/
-class Serialiser : public Common::Serializer {
+class Serializer : public Common::Serializer {
public:
- Serialiser(Common::SeekableReadStream *in, Common::WriteStream *out) : Common::Serializer(in, out) {}
+ Serializer(Common::SeekableReadStream *in, Common::WriteStream *out) : Common::Serializer(in, out) {}
+
+ // HACK: TSAGE saved games contain a single byte for the savegame version,
+ // thus the normal syncVersion() Serializer member won't work here. In order
+ // to maintain compatibility with older game saves, this method is provided
+ // in order to set the savegame version from a byte
+ void setSaveVersion(byte version) { _version = version; }
void syncPointer(SavedObject **ptr, Common::Serializer::Version minVersion = 0,
Common::Serializer::Version maxVersion = kLastVersion);
@@ -75,13 +87,13 @@ public:
class Serialisable {
public:
virtual ~Serialisable() {}
- virtual void synchronise(Serialiser &s) = 0;
+ virtual void synchronize(Serializer &s) = 0;
};
class SaveListener {
public:
virtual ~SaveListener() {}
- virtual void listenerSynchronise(Serialiser &s) = 0;
+ virtual void listenerSynchronize(Serializer &s) = 0;
};
/*--------------------------------------------------------------------------*/
@@ -92,7 +104,7 @@ public:
virtual ~SavedObject();
virtual Common::String getClassName() { return "SavedObject"; }
- virtual void synchronise(Serialiser &s) {}
+ virtual void synchronize(Serializer &s) {}
static SavedObject *createInstance(const Common::String &className);
};
@@ -103,9 +115,9 @@ public:
* Derived list class with extra functionality
*/
template<typename T>
-class SynchronisedList : public Common::List<T> {
+class SynchronizedList : public Common::List<T> {
public:
- void synchronise(Serialiser &s) {
+ void synchronize(Serializer &s) {
int entryCount;
if (s.isLoading()) {
@@ -170,7 +182,7 @@ typedef SavedObject *(*SavedObjectFactory)(const Common::String &className);
class Saver {
private:
- SynchronisedList<SavedObject *> _objList;
+ Common::List<SavedObject *> _objList;
FunctionList<bool> _saveNotifiers;
FunctionList<bool> _loadNotifiers;
Common::List<SaveListener *> _listeners;
@@ -206,6 +218,8 @@ public:
bool getMacroSaveFlag() const { return _macroSaveFlag; }
bool getMacroRestoreFlag() const { return _macroRestoreFlag; }
int blockIndexOf(SavedObject *p);
+ int getObjectCount() const;
+ void listObjects();
};
extern Saver *_saver;
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index 68320066d7..f554d546f6 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -27,6 +27,7 @@
#include "tsage/globals.h"
#include "tsage/ringworld_logic.h"
#include "tsage/tsage.h"
+#include "tsage/saveload.h"
namespace tSage {
@@ -39,6 +40,7 @@ SceneManager::SceneManager() {
_fadeMode = FADEMODE_GRADUAL;
_scrollerRect = Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
_saver->addListener(this);
+ _objectCount = 0;
}
SceneManager::~SceneManager() {
@@ -46,6 +48,7 @@ SceneManager::~SceneManager() {
}
void SceneManager::setNewScene(int sceneNumber) {
+ warning("SetNewScene(%d)", sceneNumber);
_nextSceneNumber = sceneNumber;
}
@@ -59,12 +62,16 @@ void SceneManager::checkScene() {
}
void SceneManager::sceneChange() {
+ int activeScreenNumber = 0;
+
// Handle removing the scene
- if (_scene)
+ if (_scene) {
+ activeScreenNumber = _scene->_activeScreenNumber;
_scene->remove();
+ }
// Clear the scene objects
- SynchronisedList<SceneObject *>::iterator io = _globals->_sceneObjects->begin();
+ SynchronizedList<SceneObject *>::iterator io = _globals->_sceneObjects->begin();
while (io != _globals->_sceneObjects->end()) {
SceneObject *sceneObj = *io;
++io;
@@ -80,7 +87,7 @@ void SceneManager::sceneChange() {
}
// Clear the hotspot list
- SynchronisedList<SceneItem *>::iterator ii = _globals->_sceneItems.begin();
+ SynchronizedList<SceneItem *>::iterator ii = _globals->_sceneItems.begin();
while (ii != _globals->_sceneItems.end()) {
SceneItem *sceneItem = *ii;
++ii;
@@ -106,9 +113,20 @@ void SceneManager::sceneChange() {
// Free any regions
disposeRegions();
+ // Ensure that the same number of objects are registered now as when the scene started
+ if (_objectCount > 0) {
+ assert(_objectCount == _saver->getObjectCount());
+ }
+ _objectCount = _saver->getObjectCount();
+ _globals->_sceneHandler._delayTicks = 2;
+
// Instantiate and set the new scene
_scene = getNewScene();
- _scene->postInit();
+
+ if (!_saver->getMacroRestoreFlag())
+ _scene->postInit();
+ else
+ _scene->loadScene(activeScreenNumber);
}
Scene *SceneManager::getNewScene() {
@@ -133,6 +151,7 @@ void SceneManager::fadeInIfNecessary() {
}
void SceneManager::changeScene(int newSceneNumber) {
+ warning("changeScene(%d)", newSceneNumber);
// Fade out the scene
ScenePalette scenePalette;
uint32 adjustData = 0;
@@ -145,7 +164,7 @@ void SceneManager::changeScene(int newSceneNumber) {
}
// Stop any objects that were animating
- SynchronisedList<SceneObject *>::iterator i;
+ SynchronizedList<SceneObject *>::iterator i;
for (i = _globals->_sceneObjects->begin(); i != _globals->_sceneObjects->end(); ++i) {
SceneObject *sceneObj = *i;
Common::Point pt(0, 0);
@@ -208,18 +227,19 @@ void SceneManager::setBgOffset(const Common::Point &pt, int loadCount) {
_sceneLoadCount = loadCount;
}
-void SceneManager::listenerSynchronise(Serialiser &s) {
+void SceneManager::listenerSynchronize(Serializer &s) {
s.validate("SceneManager");
- _altSceneObjects.synchronise(s);
+ _altSceneObjects.synchronize(s);
s.syncAsSint32LE(_sceneNumber);
+ s.syncAsUint16LE(_globals->_sceneManager._scene->_activeScreenNumber);
+
if (s.isLoading()) {
changeScene(_sceneNumber);
checkScene();
}
- s.syncAsUint16LE(_globals->_sceneManager._scene->_activeScreenNumber);
- _globals->_sceneManager._scrollerRect.synchronise(s);
+ _globals->_sceneManager._scrollerRect.synchronize(s);
SYNC_POINTER(_globals->_scrollFollower);
s.syncAsSint16LE(_loadMode);
}
@@ -230,19 +250,23 @@ Scene::Scene() : _sceneBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT),
_backgroundBounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) {
_sceneMode = 0;
_oldSceneBounds = Rect(4000, 4000, 4100, 4100);
+ Common::set_to(&_zoomPercents[0], &_zoomPercents[256], 0);
}
Scene::~Scene() {
}
-void Scene::synchronise(Serialiser &s) {
+void Scene::synchronize(Serializer &s) {
+ if (s.getVersion() >= 2)
+ StripCallback::synchronize(s);
+
s.syncAsSint32LE(_field12);
- s.syncAsSint32LE(_sceneNumber);
+ s.syncAsSint32LE(_screenNumber);
s.syncAsSint32LE(_activeScreenNumber);
s.syncAsSint32LE(_sceneMode);
- _backgroundBounds.synchronise(s);
- _sceneBounds.synchronise(s);
- _oldSceneBounds.synchronise(s);
+ _backgroundBounds.synchronize(s);
+ _sceneBounds.synchronize(s);
+ _oldSceneBounds.synchronize(s);
s.syncAsSint16LE(_fieldA);
s.syncAsSint16LE(_fieldE);
@@ -269,7 +293,8 @@ void Scene::dispatch() {
}
void Scene::loadScene(int sceneNum) {
- _sceneNumber = sceneNum;
+ warning("loadScene(%d)", sceneNum);
+ _screenNumber = sceneNum;
if (_globals->_scenePalette.loadPalette(sceneNum))
_globals->_sceneManager._hasPalette = true;
@@ -277,10 +302,10 @@ void Scene::loadScene(int sceneNum) {
}
void Scene::loadSceneData(int sceneNum) {
- _globals->_sceneManager._scene->_activeScreenNumber = sceneNum;
+ _activeScreenNumber = sceneNum;
// Get the basic scene size
- byte *data = _vm->_dataManager->getResource(RES_BITMAP, sceneNum, 9999);
+ byte *data = _resourceManager->getResource(RES_BITMAP, sceneNum, 9999);
_backgroundBounds = Rect(0, 0, READ_LE_UINT16(data), READ_LE_UINT16(data + 2));
_globals->_sceneManager._scene->_sceneBounds.contain(_backgroundBounds);
DEALLOCATE(data);
@@ -411,7 +436,7 @@ void Scene::drawAltObjects() {
Common::Array<SceneObject *> objList;
// Initial loop to set the priority for entries in the list
- for (SynchronisedList<SceneObject *>::iterator i = _globals->_sceneManager._altSceneObjects.begin();
+ for (SynchronizedList<SceneObject *>::iterator i = _globals->_sceneManager._altSceneObjects.begin();
i != _globals->_sceneManager._altSceneObjects.end(); ++i) {
SceneObject *obj = *i;
objList.push_back(obj);
diff --git a/engines/tsage/scenes.h b/engines/tsage/scenes.h
index 1a6f92745d..11637de1a7 100644
--- a/engines/tsage/scenes.h
+++ b/engines/tsage/scenes.h
@@ -39,7 +39,7 @@ private:
void drawAltObjects();
public:
int _field12;
- int _sceneNumber;
+ int _screenNumber;
int _activeScreenNumber;
int _sceneMode;
StripManager _stripManager;
@@ -59,7 +59,7 @@ public:
virtual ~Scene();
virtual Common::String getClassName() { return "Scene"; }
- virtual void synchronise(Serialiser &s);
+ virtual void synchronize(Serializer &s);
virtual void stripCallback(int v) {}
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void process(Event &event);
@@ -88,11 +88,12 @@ public:
int _sceneLoadCount;
Rect _scrollerRect;
SceneObjectList _altSceneObjects;
+ int _objectCount;
public:
SceneManager();
virtual ~SceneManager();
- virtual void listenerSynchronise(Serialiser &s);
+ virtual void listenerSynchronize(Serializer &s);
void setNewScene(int sceneNumber);
void checkScene();
void sceneChange();
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp
index 7c8325d53e..9d50316baf 100644
--- a/engines/tsage/sound.cpp
+++ b/engines/tsage/sound.cpp
@@ -23,8 +23,6 @@
*
*/
-#include "common/config-manager.h"
-#include "common/endian.h"
#include "tsage/core.h"
#include "tsage/globals.h"
#include "tsage/debugger.h"
@@ -54,9 +52,9 @@ void SoundManager::loadNotifierProc(bool postFlag) {
warning("TODO: SoundManager::loadNotifierProc");
}
-void SoundManager::listenerSynchronise(Serialiser &s) {
+void SoundManager::listenerSynchronize(Serializer &s) {
s.validate("SoundManager");
- warning("TODO: SoundManager listenerSynchronise");
+ warning("TODO: SoundManager listenerSynchronize");
}
} // End of namespace tSage
diff --git a/engines/tsage/sound.h b/engines/tsage/sound.h
index a495344038..45815de69f 100644
--- a/engines/tsage/sound.h
+++ b/engines/tsage/sound.h
@@ -34,7 +34,7 @@ namespace tSage {
class SoundManager : public SaveListener {
public:
void dispatch() {}
- virtual void listenerSynchronise(Serialiser &s);
+ virtual void listenerSynchronize(Serializer &s);
virtual void postInit();
void proc2() {}
diff --git a/engines/tsage/staticres.cpp b/engines/tsage/staticres.cpp
index 46b75e30ea..bc85718035 100644
--- a/engines/tsage/staticres.cpp
+++ b/engines/tsage/staticres.cpp
@@ -114,4 +114,7 @@ const char *SCENE6100_SWEAT = "Humans sweat, Kzin twitch their tail. What's the
const char *SCENE6100_VERY_WELL = "Very well. I will retrieve the stasis box and return the probe. \
Wait for it's return in the lander bay.";
+const char *DEMO_HELP_MSG = " Help...\rF2 - Sound Options\rF3 - Exit demo\r\rPress ENTER\rto continue";
+const char *DEMO_PAUSED_MSG = " demo is paused";
+
} // End of namespace tSage
diff --git a/engines/tsage/staticres.h b/engines/tsage/staticres.h
index cb62272735..0db349f8a7 100644
--- a/engines/tsage/staticres.h
+++ b/engines/tsage/staticres.h
@@ -79,6 +79,10 @@ extern const char *SCENE6100_SURPRISE;
extern const char *SCENE6100_SWEAT;
extern const char *SCENE6100_VERY_WELL;
+// Demo messages
+extern const char *DEMO_HELP_MSG;
+extern const char *DEMO_PAUSED_MSG;
+
} // End of namespace tSage
#endif
diff --git a/engines/tsage/tsage.cpp b/engines/tsage/tsage.cpp
index 1f6442f2ff..8813fc7e45 100644
--- a/engines/tsage/tsage.cpp
+++ b/engines/tsage/tsage.cpp
@@ -23,11 +23,7 @@
*
*/
-#include "common/config-manager.h"
-#include "common/debug.h"
#include "common/debug-channels.h"
-#include "common/system.h"
-#include "common/savefile.h"
#include "engines/util.h"
#include "tsage/tsage.h"
@@ -46,7 +42,6 @@ TSageEngine::TSageEngine(OSystem *system, const tSageGameDescription *gameDesc)
_vm = this;
DebugMan.addDebugChannel(kRingDebugScripts, "scripts", "Scripts debugging");
_debugger = new Debugger();
- _dataManager = NULL;
}
Common::Error TSageEngine::init() {
@@ -69,29 +64,34 @@ bool TSageEngine::hasFeature(EngineFeature f) const {
}
void TSageEngine::initialise() {
- _tSageManager = new RlbManager(_memoryManager, "tsage.rlb");
- _dataManager = new RlbManager(_memoryManager, "ring.rlb");
-
_saver = new Saver();
+
+ // Set up the resource manager
+ _resourceManager = new ResourceManager();
+ if (_vm->getFeatures() & GF_DEMO) {
+ // Add the single library file associated with the demo
+ _resourceManager->addLib(getPrimaryFilename());
+ } else {
+ _resourceManager->addLib("RING.RLB");
+ _resourceManager->addLib("TSAGE.RLB");
+ }
+
_globals = new Globals();
_globals->gfxManager().setDefaults();
}
void TSageEngine::deinitialise() {
delete _globals;
+ delete _resourceManager;
delete _saver;
- delete _tSageManager;
- delete _dataManager;
}
Common::Error TSageEngine::run() {
// Basic initialisation
initialise();
- _globals->_events.showCursor();
-
_globals->_sceneHandler.registerHandler();
- _globals->_game.execute();
+ _globals->_game->execute();
deinitialise();
return Common::kNoError;
@@ -101,14 +101,14 @@ Common::Error TSageEngine::run() {
* Returns true if it is currently okay to restore a game
*/
bool TSageEngine::canLoadGameStateCurrently() {
- return _globals->getFlag(50) == 0;
+ return (_globals->getFlag(50) == 0);
}
/**
* Returns true if it is currently okay to save the game
*/
bool TSageEngine::canSaveGameStateCurrently() {
- return _globals->getFlag(50) == 0;
+ return (_globals->getFlag(50) == 0);
}
/**
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index 2a627d80bc..06c66d8f42 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -50,7 +50,8 @@ enum {
enum {
GF_DEMO = 1 << 0,
GF_CD = 1 << 1,
- GF_FLOPPY = 1 << 2
+ GF_FLOPPY = 1 << 2,
+ GF_ALT_REGIONS = 1 << 3
};
enum {
@@ -61,8 +62,8 @@ struct tSageGameDescription;
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 200
-#define SCREEN_CENTRE_X 160
-#define SCREEN_CENTRE_Y 100
+#define SCREEN_CENTER_X 160
+#define SCREEN_CENTER_Y 100
class TSageEngine : public Engine {
private:
@@ -74,12 +75,11 @@ public:
MemoryManager _memoryManager;
Debugger *_debugger;
- RlbManager *_tSageManager;
- RlbManager *_dataManager;
const char *getGameId() const;
uint32 getGameID() const;
uint32 getFeatures() const;
+ Common::String getPrimaryFilename() const;
virtual Common::Error init();
virtual Common::Error run();
diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp
index 108c6bcad5..ee117d233d 100644
--- a/engines/tucker/locations.cpp
+++ b/engines/tucker/locations.cpp
@@ -26,6 +26,7 @@
#include "tucker/tucker.h"
#include "tucker/graphics.h"
#include "common/system.h"
+#include "graphics/palette.h"
namespace Tucker {
diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp
index c0f1baae99..aeb4399dee 100644
--- a/engines/tucker/resource.cpp
+++ b/engines/tucker/resource.cpp
@@ -24,6 +24,7 @@
*/
#include "common/file.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/decoders/flac.h"
diff --git a/engines/tucker/saveload.cpp b/engines/tucker/saveload.cpp
index 83533a90c3..52c6bf19ce 100644
--- a/engines/tucker/saveload.cpp
+++ b/engines/tucker/saveload.cpp
@@ -24,6 +24,7 @@
*/
#include "common/savefile.h"
+#include "common/textconsole.h"
#include "tucker/tucker.h"
diff --git a/engines/tucker/sequences.cpp b/engines/tucker/sequences.cpp
index 5e99e3ccef..d747b346ee 100644
--- a/engines/tucker/sequences.cpp
+++ b/engines/tucker/sequences.cpp
@@ -24,11 +24,14 @@
*/
#include "common/system.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/decoders/raw.h"
#include "audio/decoders/wave.h"
+#include "graphics/palette.h"
+
#include "tucker/tucker.h"
#include "tucker/graphics.h"
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index e41cbfbeef..ed3046867b 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -26,10 +26,17 @@
#include "common/config-manager.h"
#include "common/events.h"
#include "common/system.h"
+#include "common/archive.h"
+#include "common/debug.h"
+#include "common/error.h"
+#include "common/keyboard.h"
+#include "common/textconsole.h"
#include "engines/util.h"
#include "graphics/cursorman.h"
+#include "graphics/palette.h"
+#include "gui/debugger.h"
#include "tucker/tucker.h"
#include "tucker/graphics.h"
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index 0237712f13..e3ca0bf588 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -23,14 +23,9 @@
*
*/
+#include "common/textconsole.h"
#include "common/util.h"
-#include "common/system.h"
-#include "common/events.h"
-#include "graphics/surface.h"
-#include "graphics/colormasks.h"
-
-#include "gui/ThemeEngine.h"
#include "graphics/VectorRenderer.h"
#define VECTOR_RENDERER_FAST_TRIANGLES
diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h
index 0a783a077d..9285fa21c5 100644
--- a/graphics/VectorRenderer.h
+++ b/graphics/VectorRenderer.h
@@ -26,16 +26,19 @@
#ifndef VECTOR_RENDERER_H
#define VECTOR_RENDERER_H
+#include "common/rect.h"
#include "common/scummsys.h"
-#include "common/system.h"
+#include "common/str.h"
#include "graphics/surface.h"
-#include "graphics/pixelformat.h"
#include "gui/ThemeEngine.h"
+class OSystem;
+
namespace Graphics {
class VectorRenderer;
+struct DrawStep;
typedef void (VectorRenderer::*DrawingFunctionCallback)(const Common::Rect &, const Graphics::DrawStep &);
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp
index 0ee13033af..3eb8b1345f 100644
--- a/graphics/VectorRendererSpec.cpp
+++ b/graphics/VectorRendererSpec.cpp
@@ -25,7 +25,6 @@
#include "common/util.h"
#include "common/system.h"
-#include "common/events.h"
#include "common/frac.h"
#include "graphics/surface.h"
@@ -277,7 +276,7 @@ copyFrame(OSystem *sys, const Common::Rect &r) {
sys->copyRectToOverlay(
(const OverlayColor *)_activeSurface->getBasePtr(r.left, r.top),
- _activeSurface->pitch / _activeSurface->bytesPerPixel,
+ _activeSurface->pitch / _activeSurface->format.bytesPerPixel,
r.left, r.top, r.width(), r.height()
);
}
@@ -337,8 +336,8 @@ blitAlphaBitmap(const Graphics::Surface *source, const Common::Rect &r) {
PixelType *dst_ptr = (PixelType *)_activeSurface->getBasePtr(x, y);
const PixelType *src_ptr = (const PixelType *)source->getBasePtr(0, 0);
- int dst_pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
- int src_pitch = source->pitch / source->bytesPerPixel;
+ int dst_pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
+ int src_pitch = source->pitch / source->format.bytesPerPixel;
int w, h = source->h;
@@ -485,7 +484,7 @@ drawLine(int x1, int y1, int x2, int y2) {
return;
PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(x1, y1);
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int st = Base::_strokeWidth >> 1;
if (dy == 0) { // horizontal lines
@@ -733,7 +732,7 @@ void VectorRendererSpec<PixelType>::
drawTabAlg(int x1, int y1, int w, int h, int r, PixelType color, VectorRenderer::FillMode fill_m, int baseLeft, int baseRight) {
int f, ddF_x, ddF_y;
int x, y, px, py;
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int sw = 0, sp = 0, hp = 0;
PixelType *ptr_tl = (PixelType *)Base::_activeSurface->getBasePtr(x1 + r, y1 + r);
@@ -831,7 +830,7 @@ drawTabAlg(int x1, int y1, int w, int h, int r, PixelType color, VectorRenderer:
template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawBevelTabAlg(int x, int y, int w, int h, int bevel, PixelType top_color, PixelType bottom_color, int baseLeft, int baseRight) {
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int i, j;
PixelType *ptr_left = (PixelType *)_activeSurface->getBasePtr(x, y);
@@ -876,7 +875,7 @@ template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawSquareAlg(int x, int y, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) {
PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(x, y);
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int max_h = h;
if (fill_m != kFillDisabled) {
@@ -908,7 +907,7 @@ drawSquareAlg(int x, int y, int w, int h, PixelType color, VectorRenderer::FillM
template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawBevelSquareAlg(int x, int y, int w, int h, int bevel, PixelType top_color, PixelType bottom_color, bool fill) {
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int height = h;
PixelType *ptr_fill = (PixelType *)_activeSurface->getBasePtr(x, y);
@@ -965,7 +964,7 @@ template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawLineAlg(int x1, int y1, int x2, int y2, int dx, int dy, PixelType color) {
PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(x1, y1);
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int xdir = (x2 > x1) ? 1 : -1;
*ptr = (PixelType)color;
@@ -1013,7 +1012,7 @@ template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color, VectorRenderer::FillMode fill_m) {
int dx = w >> 1, dy = h, gradient_h = 0;
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
PixelType *ptr_right = 0, *ptr_left = 0;
if (inverted) {
@@ -1094,7 +1093,7 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color
template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawTriangleFast(int x1, int y1, int size, bool inverted, PixelType color, VectorRenderer::FillMode fill_m) {
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int hstep = 0, dy = size;
bool grad = (fill_m == kFillGradient);
@@ -1143,7 +1142,7 @@ void VectorRendererSpec<PixelType>::
drawRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) {
int f, ddF_x, ddF_y;
int x, y, px, py;
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int sw = 0, sp = 0, hp = h * pitch;
PixelType *ptr_tl = (PixelType *)Base::_activeSurface->getBasePtr(x1 + r, y1 + r);
@@ -1234,7 +1233,7 @@ void VectorRendererSpec<PixelType>::
drawCircleAlg(int x1, int y1, int r, PixelType color, VectorRenderer::FillMode fill_m) {
int f, ddF_x, ddF_y;
int x, y, px, py, sw = 0;
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
PixelType *ptr = (PixelType *)Base::_activeSurface->getBasePtr(x1, y1);
if (fill_m == kFillDisabled) {
@@ -1284,7 +1283,7 @@ template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawSquareShadow(int x, int y, int w, int h, int blur) {
PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(x + w - 1, y + blur);
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int i, j;
i = h - blur;
@@ -1321,7 +1320,7 @@ void VectorRendererSpec<PixelType>::
drawRoundedSquareShadow(int x1, int y1, int r, int w, int h, int blur) {
int f, ddF_x, ddF_y;
int x, y, px, py;
- int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int alpha = 102;
x1 += blur;
@@ -1368,7 +1367,7 @@ template<typename PixelType>
void VectorRendererSpec<PixelType>::
drawRoundedSquareFakeBevel(int x1, int y1, int r, int w, int h, int amount) {
int x, y;
- const int pitch = _activeSurface->pitch / _activeSurface->bytesPerPixel;
+ const int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel;
int px, py;
int sw = 0, sp = 0;
@@ -1438,7 +1437,7 @@ void VectorRendererAA<PixelType>::
drawLineAlg(int x1, int y1, int x2, int y2, int dx, int dy, PixelType color) {
PixelType *ptr = (PixelType *)Base::_activeSurface->getBasePtr(x1, y1);
- int pitch = Base::_activeSurface->pitch / Base::_activeSurface->bytesPerPixel;
+ int pitch = Base::_activeSurface->pitch / Base::_activeSurface->format.bytesPerPixel;
int xdir = (x2 > x1) ? 1 : -1;
uint16 error_tmp, error_acc, gradient;
uint8 alpha;
@@ -1489,7 +1488,7 @@ template<typename PixelType>
void VectorRendererAA<PixelType>::
drawRoundedSquareAlg(int x1, int y1, int r, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) {
int x, y;
- const int pitch = Base::_activeSurface->pitch / Base::_activeSurface->bytesPerPixel;
+ const int pitch = Base::_activeSurface->pitch / Base::_activeSurface->format.bytesPerPixel;
int px, py;
int sw = 0, sp = 0, hp = h * pitch;
@@ -1566,7 +1565,7 @@ template<typename PixelType>
void VectorRendererAA<PixelType>::
drawCircleAlg(int x1, int y1, int r, PixelType color, VectorRenderer::FillMode fill_m) {
int x, y, sw = 0;
- const int pitch = Base::_activeSurface->pitch / Base::_activeSurface->bytesPerPixel;
+ const int pitch = Base::_activeSurface->pitch / Base::_activeSurface->format.bytesPerPixel;
int px, py;
uint32 rsq = r*r;
diff --git a/graphics/conversion.cpp b/graphics/conversion.cpp
index fee4b05f66..c9679432fa 100644
--- a/graphics/conversion.cpp
+++ b/graphics/conversion.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/conversion.h"
+#include "graphics/pixelformat.h"
namespace Graphics {
diff --git a/graphics/conversion.h b/graphics/conversion.h
index b6d230612e..2759f3bb5e 100644
--- a/graphics/conversion.h
+++ b/graphics/conversion.h
@@ -27,10 +27,11 @@
#define GRAPHICS_CONVERSION_H
#include "common/util.h"
-#include "graphics/pixelformat.h"
namespace Graphics {
+struct PixelFormat;
+
/** Converting a color from YUV to RGB colorspace. */
inline static void YUV2RGB(byte y, byte u, byte v, byte &r, byte &g, byte &b) {
r = CLIP<int>(y + ((1357 * (v - 128)) >> 10), 0, 255);
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 359374436c..7fa39d07db 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -25,7 +25,11 @@
#include "common/stream.h"
#include "common/file.h"
#include "common/endian.h"
+#include "common/array.h"
+#include "common/textconsole.h"
+#include "common/util.h"
#include "graphics/font.h"
+#include "graphics/surface.h"
namespace Graphics {
@@ -74,7 +78,7 @@ void NewFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const
assert(dst != 0);
assert(desc.bits != 0 && desc.maxwidth <= 16);
- assert(dst->bytesPerPixel == 1 || dst->bytesPerPixel == 2);
+ 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) {
@@ -106,9 +110,9 @@ void NewFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const
tmp += bbh - y;
y -= MAX(0, ty + desc.ascent - bby - dst->h);
- if (dst->bytesPerPixel == 1)
+ 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->bytesPerPixel == 2)
+ else if (dst->format.bytesPerPixel == 2)
drawCharIntern<uint16>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
}
diff --git a/graphics/font.h b/graphics/font.h
index b1a4735249..9e6e180ec3 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -26,15 +26,16 @@
#define GRAPHICS_FONT_H
#include "common/str.h"
-#include "common/array.h"
-#include "graphics/surface.h"
namespace Common {
class SeekableReadStream;
+template<class T> class Array;
}
namespace Graphics {
+struct Surface;
+
/** Text alignment modes */
enum TextAlign {
kTextAlignInvalid,
diff --git a/graphics/fontman.cpp b/graphics/fontman.cpp
index 35ea14b199..bbd75bfca2 100644
--- a/graphics/fontman.cpp
+++ b/graphics/fontman.cpp
@@ -22,6 +22,7 @@
* $Id$
*/
+#include "graphics/font.h"
#include "graphics/fontman.h"
DECLARE_SINGLETON(Graphics::FontManager);
diff --git a/graphics/fontman.h b/graphics/fontman.h
index 7871f32ba9..34b457ae83 100644
--- a/graphics/fontman.h
+++ b/graphics/fontman.h
@@ -30,11 +30,12 @@
#include "common/str.h"
#include "common/hashmap.h"
#include "common/hash-str.h"
-#include "graphics/font.h"
namespace Graphics {
+class Font;
+
class FontManager : public Common::Singleton<FontManager> {
public:
enum FontUsage {
diff --git a/graphics/fonts/scummfont.cpp b/graphics/fonts/scummfont.cpp
index 87078e1475..3331b72c47 100644
--- a/graphics/fonts/scummfont.cpp
+++ b/graphics/fonts/scummfont.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/font.h"
+#include "graphics/surface.h"
namespace Graphics {
@@ -302,9 +303,9 @@ void ScummFont::drawChar(Surface *dst, byte chr, int tx, int ty, uint32 color) c
}
c = ((buffer & mask) != 0);
if (c) {
- if (dst->bytesPerPixel == 1)
+ if (dst->format.bytesPerPixel == 1)
ptr[x] = color;
- else if (dst->bytesPerPixel == 2)
+ else if (dst->format.bytesPerPixel == 2)
((uint16 *)ptr)[x] = color;
}
}
diff --git a/graphics/fonts/winfont.cpp b/graphics/fonts/winfont.cpp
index 12509fd9e1..7db9a233f6 100644
--- a/graphics/fonts/winfont.cpp
+++ b/graphics/fonts/winfont.cpp
@@ -24,8 +24,11 @@
#include "common/file.h"
#include "common/str.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/winexe_ne.h"
#include "common/winexe_pe.h"
+#include "graphics/surface.h"
#include "graphics/fonts/winfont.h"
namespace Graphics {
@@ -320,7 +323,7 @@ bool WinFont::loadFromFNT(Common::SeekableReadStream &stream) {
void WinFont::drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const {
assert(dst);
- assert(dst->bytesPerPixel == 1 || dst->bytesPerPixel == 2 || dst->bytesPerPixel == 4);
+ assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2 || dst->format.bytesPerPixel == 4);
assert(_glyphs);
GlyphEntry &glyph = _glyphs[characterToIndex(chr)];
@@ -328,11 +331,11 @@ void WinFont::drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const
for (uint16 i = 0; i < _pixHeight; i++) {
for (uint16 j = 0; j < glyph.charWidth; j++) {
if (glyph.bitmap[j + i * glyph.charWidth]) {
- if (dst->bytesPerPixel == 1)
+ if (dst->format.bytesPerPixel == 1)
*((byte *)dst->getBasePtr(x + j, y + i)) = color;
- else if (dst->bytesPerPixel == 2)
+ else if (dst->format.bytesPerPixel == 2)
*((uint16 *)dst->getBasePtr(x + j, y + i)) = color;
- else if (dst->bytesPerPixel == 4)
+ else if (dst->format.bytesPerPixel == 4)
*((uint32 *)dst->getBasePtr(x + j, y + i)) = color;
}
}
diff --git a/graphics/fonts/winfont.h b/graphics/fonts/winfont.h
index fbe4a778e2..c31d45e2ce 100644
--- a/graphics/fonts/winfont.h
+++ b/graphics/fonts/winfont.h
@@ -25,11 +25,11 @@
#ifndef GRAPHICS_WINFONT_H
#define GRAPHICS_WINFONT_H
+#include "common/str.h"
#include "graphics/font.h"
namespace Common {
- class SeekableReadStream;
- class String;
+class SeekableReadStream;
}
namespace Graphics {
diff --git a/graphics/iff.cpp b/graphics/iff.cpp
index 2174291112..fee71de485 100644
--- a/graphics/iff.cpp
+++ b/graphics/iff.cpp
@@ -25,6 +25,10 @@
#include "graphics/iff.h"
#include "graphics/surface.h"
+#include "common/endian.h"
+#include "common/func.h"
+#include "common/iff_container.h"
+#include "common/textconsole.h"
#include "common/util.h"
namespace Graphics {
@@ -204,7 +208,7 @@ struct PBMLoader {
case ID_BODY:
if (_surface) {
- _surface->create(_decoder._header.width, _decoder._header.height, 1);
+ _surface->create(_decoder._header.width, _decoder._header.height, PixelFormat::createFormatCLUT8());
_decoder.loadBitmap((byte*)_surface->pixels, chunk._stream);
}
return true; // stop the parser
diff --git a/graphics/iff.h b/graphics/iff.h
index 0aab0e09cb..fc837a3ea2 100644
--- a/graphics/iff.h
+++ b/graphics/iff.h
@@ -31,7 +31,7 @@
#ifndef GRAPHICS_IFF_H
#define GRAPHICS_IFF_H
-#include "common/iff_container.h"
+#include "common/stream.h"
namespace Graphics {
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp
index a4d2fbc1cf..f45f0ce5ef 100644
--- a/graphics/imagedec.cpp
+++ b/graphics/imagedec.cpp
@@ -23,6 +23,7 @@
*/
#include "graphics/imagedec.h"
+#include "graphics/pixelformat.h"
#include "graphics/surface.h"
#include "common/file.h"
@@ -117,7 +118,7 @@ Surface *BMPDecoder::decodeImage(Common::SeekableReadStream &stream, const Pixel
uint8 r = 0, g = 0, b = 0;
Surface *newSurf = new Surface;
assert(newSurf);
- newSurf->create(info.width, info.height, sizeof(OverlayColor));
+ newSurf->create(info.width, info.height, format);
assert(newSurf->pixels);
OverlayColor *curPixel = (OverlayColor*)newSurf->pixels + (newSurf->h-1) * newSurf->w;
int pitchAdd = info.width % 4;
diff --git a/graphics/imagedec.h b/graphics/imagedec.h
index 13aa63a153..7ea987b1e4 100644
--- a/graphics/imagedec.h
+++ b/graphics/imagedec.h
@@ -28,14 +28,13 @@
#include "common/scummsys.h"
#include "common/str.h"
-#include "graphics/pixelformat.h"
-
namespace Common{
class SeekableReadStream;
}
namespace Graphics {
+struct PixelFormat;
struct Surface;
class ImageDecoder {
diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp
index 169c3b5f1b..70ffb06f6b 100644
--- a/graphics/jpeg.cpp
+++ b/graphics/jpeg.cpp
@@ -27,9 +27,10 @@
#include "graphics/jpeg.h"
#include "graphics/pixelformat.h"
+#include "common/debug.h"
#include "common/endian.h"
-#include "common/util.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Graphics {
@@ -95,7 +96,7 @@ Surface *JPEG::getSurface(const PixelFormat &format) {
Graphics::Surface *vComponent = getComponent(3);
Graphics::Surface *output = new Graphics::Surface();
- output->create(yComponent->w, yComponent->h, format.bytesPerPixel);
+ output->create(yComponent->w, yComponent->h, format);
for (uint16 i = 0; i < output->h; i++) {
for (uint16 j = 0; j < output->w; j++) {
@@ -443,7 +444,7 @@ bool JPEG::readSOS() {
// Initialize the scan surfaces
for (uint16 c = 0; c < _numScanComp; c++) {
- _scanComp[c]->surface.create(xMCU * _maxFactorH * 8, yMCU * _maxFactorV * 8, 1);
+ _scanComp[c]->surface.create(xMCU * _maxFactorH * 8, yMCU * _maxFactorV * 8, PixelFormat::createFormatCLUT8());
}
bool ok = true;
@@ -710,9 +711,9 @@ uint8 JPEG::readBit() {
if (byte2 == 0xDC) {
// DNL marker: Define Number of Lines
// TODO: terminate scan
- printf("DNL marker detected: terminate scan\n");
+ warning("DNL marker detected: terminate scan");
} else {
- printf("Error: marker 0x%02X read in entropy data\n", byte2);
+ warning("Error: marker 0x%02X read in entropy data", byte2);
}
}
}
diff --git a/graphics/maccursor.cpp b/graphics/maccursor.cpp
new file mode 100644
index 0000000000..e086e22fca
--- /dev/null
+++ b/graphics/maccursor.cpp
@@ -0,0 +1,185 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "common/textconsole.h"
+
+#include "graphics/maccursor.h"
+
+namespace Graphics {
+
+MacCursor::MacCursor() {
+ _surface = 0;
+ memset(_palette, 0, 256 * 3);
+
+ _hotspotX = 0;
+ _hotspotY = 0;
+}
+
+MacCursor::~MacCursor() {
+ clear();
+}
+
+void MacCursor::clear() {
+ delete[] _surface; _surface = 0;
+ memset(_palette, 0, 256 * 3);
+}
+
+bool MacCursor::readFromStream(Common::SeekableReadStream &stream, bool forceMonochrome) {
+ clear();
+
+ // Older Mac CURS monochrome cursors had a set size
+ // All crsr cursors are larger than this
+ if (stream.size() == 32 * 2 + 4)
+ return readFromCURS(stream);
+
+ return readFromCRSR(stream, forceMonochrome);
+}
+
+bool MacCursor::readFromCURS(Common::SeekableReadStream &stream) {
+ // Grab B/W icon data
+ _surface = new byte[16 * 16];
+ for (int i = 0; i < 32; i++) {
+ byte imageByte = stream.readByte();
+ for (int b = 0; b < 8; b++)
+ _surface[i * 8 + b] = (byte)((imageByte & (0x80 >> b)) > 0 ? 0 : 1);
+ }
+
+ // Apply mask data
+ for (int i = 0; i < 32; i++) {
+ byte imageByte = stream.readByte();
+ for (int b = 0; b < 8; b++)
+ if ((imageByte & (0x80 >> b)) == 0)
+ _surface[i * 8 + b] = 0xff;
+ }
+
+ _hotspotY = stream.readUint16BE();
+ _hotspotX = stream.readUint16BE();
+
+ // Setup a basic palette
+ _palette[1 * 3 + 0] = 0xff;
+ _palette[1 * 3 + 1] = 0xff;
+ _palette[1 * 3 + 2] = 0xff;
+
+ return !stream.eos();
+}
+
+bool MacCursor::readFromCRSR(Common::SeekableReadStream &stream, bool forceMonochrome) {
+ stream.readUint16BE(); // type
+ stream.readUint32BE(); // offset to pixel map
+ stream.readUint32BE(); // offset to pixel data
+ stream.readUint32BE(); // expanded cursor data
+ stream.readUint16BE(); // expanded data depth
+ stream.readUint32BE(); // reserved
+
+ // Read the B/W data first
+ if (!readFromCURS(stream))
+ return false;
+
+ // Use b/w cursor on backends which don't support cursor palettes
+ if (forceMonochrome)
+ return true;
+
+ stream.readUint32BE(); // reserved
+ stream.readUint32BE(); // cursorID
+
+ // Color version of cursor
+ stream.readUint32BE(); // baseAddr
+
+ // Keep only lowbyte for now
+ stream.readByte();
+ int iconRowBytes = stream.readByte();
+
+ if (!iconRowBytes)
+ return false;
+
+ int iconBounds[4];
+ iconBounds[0] = stream.readUint16BE();
+ iconBounds[1] = stream.readUint16BE();
+ iconBounds[2] = stream.readUint16BE();
+ iconBounds[3] = stream.readUint16BE();
+
+ stream.readUint16BE(); // pmVersion
+ stream.readUint16BE(); // packType
+ stream.readUint32BE(); // packSize
+
+ stream.readUint32BE(); // hRes
+ stream.readUint32BE(); // vRes
+
+ stream.readUint16BE(); // pixelType
+ stream.readUint16BE(); // pixelSize
+ stream.readUint16BE(); // cmpCount
+ stream.readUint16BE(); // cmpSize
+
+ stream.readUint32BE(); // planeByte
+ stream.readUint32BE(); // pmTable
+ stream.readUint32BE(); // reserved
+
+ // Pixel data for cursor
+ int iconDataSize = iconRowBytes * (iconBounds[3] - iconBounds[1]);
+ byte *iconData = new byte[iconDataSize];
+
+ if (!iconData)
+ error("Cannot allocate Mac color cursor iconData");
+
+ stream.read(iconData, iconDataSize);
+
+ // Color table
+ stream.readUint32BE(); // ctSeed
+ stream.readUint16BE(); // ctFlag
+ uint16 ctSize = stream.readUint16BE() + 1;
+
+ // Read just high byte of 16-bit color
+ for (int c = 0; c < ctSize; c++) {
+ stream.readUint16BE();
+ _palette[c * 3 + 0] = stream.readUint16BE() >> 8;
+ _palette[c * 3 + 1] = stream.readUint16BE() >> 8;
+ _palette[c * 3 + 2] = stream.readUint16BE() >> 8;
+ }
+
+ int pixelsPerByte = (iconBounds[2] - iconBounds[0]) / iconRowBytes;
+ int bpp = 8 / pixelsPerByte;
+
+ // build a mask to make sure the pixels are properly shifted out
+ int bitmask = 0;
+ for (int m = 0; m < bpp; m++) {
+ bitmask <<= 1;
+ bitmask |= 1;
+ }
+
+ // Extract pixels from bytes
+ for (int j = 0; j < iconDataSize; j++) {
+ for (int b = 0; b < pixelsPerByte; b++) {
+ int idx = j * pixelsPerByte + (pixelsPerByte - 1 - b);
+
+ if (_surface[idx] != 0xff) // if mask is not there
+ _surface[idx] = (byte)((iconData[j] >> (b * bpp)) & bitmask);
+ }
+ }
+
+ delete[] iconData;
+ return stream.pos() == stream.size();
+}
+
+} // End of namespace Common
diff --git a/graphics/maccursor.h b/graphics/maccursor.h
new file mode 100644
index 0000000000..fac78d97a4
--- /dev/null
+++ b/graphics/maccursor.h
@@ -0,0 +1,83 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public 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$
+ *
+ */
+
+/**
+ * @file
+ * Macintosh cursor decoding used in engines:
+ * - mohawk
+ * - sci
+ * - scumm
+ */
+
+#include "common/stream.h"
+
+#ifndef GRAPHICS_MACCURSOR_H
+#define GRAPHICS_MACCURSOR_H
+
+namespace Graphics {
+
+/**
+ * A Mac crsr or CURS cursor
+ * TODO: Think about making a base class with WinCursor
+ */
+class MacCursor {
+public:
+ MacCursor();
+ ~MacCursor();
+
+ /** Return the cursor's width. */
+ uint16 getWidth() const { return 16; }
+ /** Return the cursor's height. */
+ uint16 getHeight() const { return 16; }
+ /** Return the cursor's hotspot's x coordinate. */
+ uint16 getHotspotX() const { return _hotspotX; }
+ /** Return the cursor's hotspot's y coordinate. */
+ uint16 getHotspotY() const { return _hotspotY; }
+ /** Return the cursor's transparent key. */
+ byte getKeyColor() const { return 0xFF; }
+
+ const byte *getSurface() const { return _surface; }
+ const byte *getPalette() const { return _palette; }
+
+ /** Read the cursor's data out of a stream. */
+ bool readFromStream(Common::SeekableReadStream &stream, bool forceMonochrome = false);
+
+private:
+ bool readFromCURS(Common::SeekableReadStream &stream);
+ bool readFromCRSR(Common::SeekableReadStream &stream, bool forceMonochrome);
+
+ byte *_surface;
+ byte _palette[256 * 3];
+
+ uint16 _hotspotX; ///< The cursor's hotspot's x coordinate.
+ uint16 _hotspotY; ///< The cursor's hotspot's y coordinate.
+
+ /** Clear the cursor. */
+ void clear();
+};
+
+} // End of namespace Graphics
+
+#endif
diff --git a/graphics/module.mk b/graphics/module.mk
index cb3a07e691..59621dc525 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -14,6 +14,7 @@ MODULE_OBJS := \
iff.o \
imagedec.o \
jpeg.o \
+ maccursor.o \
pict.o \
png.o \
primitives.o \
diff --git a/graphics/palette.h b/graphics/palette.h
index 8d7fdbd99a..14e433f153 100644
--- a/graphics/palette.h
+++ b/graphics/palette.h
@@ -26,6 +26,7 @@
#ifndef GRAPHICS_PALETTE_H
#define GRAPHICS_PALETTE_H
+#include "common/scummsys.h"
#include "common/noncopyable.h"
/**
diff --git a/graphics/pict.cpp b/graphics/pict.cpp
index ca4aac751d..acade48515 100644
--- a/graphics/pict.cpp
+++ b/graphics/pict.cpp
@@ -23,9 +23,12 @@
*
*/
+#include "common/debug.h"
+#include "common/endian.h"
+#include "common/stream.h"
#include "common/substream.h"
+#include "common/textconsole.h"
-#include "graphics/conversion.h"
#include "graphics/jpeg.h"
#include "graphics/pict.h"
#include "graphics/surface.h"
@@ -209,7 +212,7 @@ void PictDecoder::decodeDirectBitsRect(Common::SeekableReadStream *stream, bool
bytesPerPixel = directBitsData.pixMap.pixelSize / 8;
_outputSurface = new Graphics::Surface();
- _outputSurface->create(width, height, (bytesPerPixel == 1) ? 1 : _pixelFormat.bytesPerPixel);
+ _outputSurface->create(width, height, (bytesPerPixel == 1) ? PixelFormat::createFormatCLUT8() : _pixelFormat);
byte *buffer = new byte[width * height * bytesPerPixel];
// Read in amount of data per row
diff --git a/graphics/pict.h b/graphics/pict.h
index a683a23bf6..22f36aafe7 100644
--- a/graphics/pict.h
+++ b/graphics/pict.h
@@ -32,7 +32,7 @@
#include "graphics/pixelformat.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Graphics {
diff --git a/graphics/png.cpp b/graphics/png.cpp
index eb066efa57..3cdb9f7cca 100644
--- a/graphics/png.cpp
+++ b/graphics/png.cpp
@@ -23,13 +23,14 @@
*
*/
-#include "graphics/conversion.h"
#include "graphics/png.h"
#include "graphics/pixelformat.h"
+#include "graphics/surface.h"
#include "common/endian.h"
#include "common/memstream.h"
#include "common/stream.h"
+#include "common/types.h"
#include "common/util.h"
#include "common/zlib.h"
@@ -99,8 +100,6 @@ enum PNGFilters {
kFilterPaeth = 4
};
-#define PNG_HEADER(a, b, c, d) CONSTANT_LE_32(d | (c << 8) | (b << 16) | (a << 24))
-
PNG::PNG() : _compressedBuffer(0), _compressedBufferSize(0),
_unfilteredSurface(0), _transparentColorSpecified(false) {
}
@@ -114,60 +113,62 @@ PNG::~PNG() {
Graphics::Surface *PNG::getSurface(const PixelFormat &format) {
Graphics::Surface *output = new Graphics::Surface();
- output->create(_unfilteredSurface->w, _unfilteredSurface->h, format.bytesPerPixel);
+ output->create(_unfilteredSurface->w, _unfilteredSurface->h, format);
byte *src = (byte *)_unfilteredSurface->pixels;
byte a = 0xFF;
if (_header.colorType != kIndexed) {
if (_header.colorType == kTrueColor || _header.colorType == kTrueColorWithAlpha) {
- if (_unfilteredSurface->bytesPerPixel != 3 && _unfilteredSurface->bytesPerPixel != 4)
+ if (_unfilteredSurface->format.bytesPerPixel != 3 && _unfilteredSurface->format.bytesPerPixel != 4)
error("Unsupported truecolor PNG format");
} else if (_header.colorType == kGrayScale || _header.colorType == kGrayScaleWithAlpha) {
- if (_unfilteredSurface->bytesPerPixel != 1 && _unfilteredSurface->bytesPerPixel != 2)
+ if (_unfilteredSurface->format.bytesPerPixel != 1 && _unfilteredSurface->format.bytesPerPixel != 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) {
- if (_unfilteredSurface->bytesPerPixel == 1) { // Grayscale
+ 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;
- *((uint16 *)output->getBasePtr(j, i)) = format.ARGBToColor( a, src[0], src[0], src[0]);
- } else if (_unfilteredSurface->bytesPerPixel == 2) { // Grayscale + alpha
- *((uint16 *)output->getBasePtr(j, i)) = format.ARGBToColor(src[1], src[0], src[0], src[0]);
- } else if (_unfilteredSurface->bytesPerPixel == 3) { // RGB
+ *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;
}
- *((uint16 *)output->getBasePtr(j, i)) = format.ARGBToColor( a, src[0], src[1], src[2]);
- } else if (_unfilteredSurface->bytesPerPixel == 4) { // RGBA
- *((uint16 *)output->getBasePtr(j, i)) = format.ARGBToColor(src[3], src[0], src[1], src[2]);
+ *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 {
- if (_unfilteredSurface->bytesPerPixel == 1) { // Grayscale
+ } else { // 4bpp
+ uint32 *dest = ((uint32 *)output->getBasePtr(j, i));
+ if (_unfilteredSurface->format.bytesPerPixel == 1) { // Grayscale
if (_transparentColorSpecified)
a = (src[0] == _transparentColor[0]) ? 0 : 0xFF;
- *((uint32 *)output->getBasePtr(j, i)) = format.ARGBToColor( a, src[0], src[0], src[0]);
- } else if (_unfilteredSurface->bytesPerPixel == 2) { // Grayscale + alpha
- *((uint32 *)output->getBasePtr(j, i)) = format.ARGBToColor(src[1], src[0], src[0], src[0]);
- } else if (_unfilteredSurface->bytesPerPixel == 3) { // RGB
+ *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;
}
- *((uint32 *)output->getBasePtr(j, i)) = format.ARGBToColor( a, src[0], src[1], src[2]);
- } else if (_unfilteredSurface->bytesPerPixel == 4) { // RGBA
- *((uint32 *)output->getBasePtr(j, i)) = format.ARGBToColor(src[3], src[0], src[1], src[2]);
+ *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]);
}
}
- src += _unfilteredSurface->bytesPerPixel;
+ src += _unfilteredSurface->format.bytesPerPixel;
}
}
} else {
@@ -175,8 +176,16 @@ Graphics::Surface *PNG::getSurface(const PixelFormat &format) {
// Convert the indexed surface to the target pixel format
for (uint16 i = 0; i < output->h; i++) {
+ bool otherPixel = false;
+
for (uint16 j = 0; j < output->w; j++) {
- index = *src;
+ if (_header.bitDepth != 4)
+ index = *src;
+ else if (!otherPixel)
+ index = (*src) >> 4;
+ else
+ index = (*src) & 0xf;
+
r = _palette[index * 4 + 0];
g = _palette[index * 4 + 1];
b = _palette[index * 4 + 2];
@@ -187,8 +196,13 @@ Graphics::Surface *PNG::getSurface(const PixelFormat &format) {
else
*((uint32 *)output->getBasePtr(j, i)) = format.ARGBToColor(a, r, g, b);
- src++;
+ 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;
}
}
@@ -200,11 +214,11 @@ bool PNG::read(Common::SeekableReadStream *str) {
_stream = str;
// First, check the PNG signature
- if (_stream->readUint32BE() != PNG_HEADER(0x89, 0x50, 0x4e, 0x47)) {
+ if (_stream->readUint32BE() != MKTAG(0x89, 0x50, 0x4e, 0x47)) {
delete _stream;
return false;
}
- if (_stream->readUint32BE() != PNG_HEADER(0x0d, 0x0a, 0x1a, 0x0a)) {
+ if (_stream->readUint32BE() != MKTAG(0x0d, 0x0a, 0x1a, 0x0a)) {
delete _stream;
return false;
}
@@ -377,7 +391,8 @@ void PNG::constructImage() {
delete _unfilteredSurface;
}
_unfilteredSurface = new Graphics::Surface();
- _unfilteredSurface->create(_header.width, _header.height, (getNumColorChannels() * _header.bitDepth + 7) / 8);
+ // TODO/FIXME: It seems we can not properly determine the format here. But maybe there is a way...
+ _unfilteredSurface->create(_header.width, _header.height, PixelFormat((getNumColorChannels() * _header.bitDepth + 7) / 8, 0, 0, 0, 0, 0, 0, 0, 0));
scanLine = new byte[_unfilteredSurface->pitch];
dest = (byte *)_unfilteredSurface->getBasePtr(0, 0);
@@ -386,7 +401,7 @@ void PNG::constructImage() {
for (uint16 y = 0; y < _unfilteredSurface->h; y++) {
filterType = _imageData->readByte();
_imageData->read(scanLine, scanLineWidth);
- unfilterScanLine(dest, scanLine, prevLine, _unfilteredSurface->bytesPerPixel, filterType, scanLineWidth);
+ unfilterScanLine(dest, scanLine, prevLine, _unfilteredSurface->format.bytesPerPixel, filterType, scanLineWidth);
prevLine = dest;
dest += _unfilteredSurface->pitch;
}
diff --git a/graphics/png.h b/graphics/png.h
index 70f2e4ba27..21e0f35be1 100644
--- a/graphics/png.h
+++ b/graphics/png.h
@@ -31,8 +31,6 @@
#ifndef GRAPHICS_PNG_H
#define GRAPHICS_PNG_H
-#include "graphics/surface.h"
-
// PNG decoder, based on the W3C specs:
// http://www.w3.org/TR/PNG/
// Parts of the code have been adapted from LodePNG, by Lode Vandevenne:
@@ -54,12 +52,17 @@
// is a bit unclear. For now, these won't be supported, until a suitable sample
// is found.
+#include "common/scummsys.h"
+#include "common/textconsole.h"
+
namespace Common {
class SeekableReadStream;
}
namespace Graphics {
+struct Surface;
+
enum PNGColorType {
kGrayScale = 0, // bit depths: 1, 2, 4, 8, 16
kTrueColor = 2, // bit depths: 8, 16
@@ -117,14 +120,18 @@ public:
}
/**
- * Returns the palette of the specified PNG8 image.
- *
- * Note that the palette's format is RGBA.
+ * Returns the palette of the specified PNG8 image, given a pointer to
+ * an RGBA palette array (4 x 256).
*/
void getPalette(byte *palette, uint16 &entries) {
if (_header.colorType != kIndexed)
error("Palette requested for a non-indexed PNG");
- palette = _palette;
+ for (int i = 0; i < 256; i++) {
+ palette[0 + i * 4] = _palette[0 + i * 4]; // R
+ palette[1 + i * 4] = _palette[1 + i * 4]; // G
+ palette[2 + i * 4] = _palette[2 + i * 4]; // B
+ palette[3 + i * 4] = _palette[3 + i * 4]; // A
+ }
entries = _paletteEntries;
}
diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp
index 85768fbced..85b79ab6cd 100644
--- a/graphics/scaler/aspect.cpp
+++ b/graphics/scaler/aspect.cpp
@@ -79,10 +79,7 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1
}
} else {
while (width--) {
- // TODO: We really would like to use interpolate16_5_3, but that
- // does not exist (yet), so we use this trick instead.
- uint16 tmp = *srcA++;
- *dst++ = interpolate16_5_2_1<ColorMask>(*srcB++, tmp, tmp);
+ *dst++ = interpolate16_5_3<ColorMask>(*srcB++, *srcA++);
}
}
}
diff --git a/graphics/scaler/intern.h b/graphics/scaler/intern.h
index 4addd6d3bd..7317745e62 100644
--- a/graphics/scaler/intern.h
+++ b/graphics/scaler/intern.h
@@ -77,6 +77,16 @@ static inline unsigned interpolate16_3_1(unsigned p1, unsigned p2) {
}
/**
+ * Interpolate two 16 bit pixels with weights 5 and 3 and 1, i.e., (5*p1+3*p2)/8.
+ */
+template<typename ColorMask>
+static inline unsigned interpolate16_5_3(unsigned p1, unsigned p2) {
+ const unsigned lowbits = (((p1 & ColorMask::kLowBits) << 2) + (p1 & ColorMask::kLow3Bits)
+ + ((p2 & ColorMask::kLow2Bits) << 1) + (p2 & ColorMask::kLow3Bits)) & ColorMask::kLow3Bits;
+ return ((p1*5 + p2*3) - lowbits) >> 3;
+}
+
+/**
* Interpolate two 16 bit pixels with weights 7 and 1, i.e., (7*p1+p2)/8.
*/
template<typename ColorMask>
diff --git a/graphics/scaler/scale2x.cpp b/graphics/scaler/scale2x.cpp
index deae44c1c7..ec2aa2086e 100644
--- a/graphics/scaler/scale2x.cpp
+++ b/graphics/scaler/scale2x.cpp
@@ -34,7 +34,6 @@
#include "common/scummsys.h"
-#include "graphics/scaler/intern.h"
#include "graphics/scaler/scale2x.h"
/***************************************************************************/
diff --git a/graphics/scaler/scale3x.cpp b/graphics/scaler/scale3x.cpp
index 4e78796ee7..788c8694c5 100644
--- a/graphics/scaler/scale3x.cpp
+++ b/graphics/scaler/scale3x.cpp
@@ -34,7 +34,6 @@
#include "common/scummsys.h"
-#include "graphics/scaler/intern.h"
#include "graphics/scaler/scale3x.h"
/***************************************************************************/
diff --git a/graphics/scaler/scalebit.cpp b/graphics/scaler/scalebit.cpp
index 706fea8f05..c6d2a0d752 100644
--- a/graphics/scaler/scalebit.cpp
+++ b/graphics/scaler/scalebit.cpp
@@ -35,7 +35,6 @@
#include "common/scummsys.h"
-#include "graphics/scaler/intern.h"
#include "graphics/scaler/scale2x.h"
#include "graphics/scaler/scale3x.h"
diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp
index 5cee1c7a72..d78648c325 100644
--- a/graphics/scaler/thumbnail_intern.cpp
+++ b/graphics/scaler/thumbnail_intern.cpp
@@ -30,6 +30,7 @@
#include "graphics/colormasks.h"
#include "graphics/scaler.h"
#include "graphics/scaler/intern.h"
+#include "graphics/palette.h"
template<int bitFormat>
uint16 quadBlockInterpolate(const uint8 *src, uint32 srcPitch) {
@@ -99,12 +100,12 @@ static bool grabScreen565(Graphics::Surface *surf) {
if (!screen)
return false;
- assert(screen->bytesPerPixel == 1 || screen->bytesPerPixel == 2);
+ assert(screen->format.bytesPerPixel == 1 || screen->format.bytesPerPixel == 2);
assert(screen->pixels != 0);
Graphics::PixelFormat screenFormat = g_system->getScreenFormat();
- surf->create(screen->w, screen->h, 2);
+ surf->create(screen->w, screen->h, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
byte *palette = 0;
if (screenFormat.bytesPerPixel == 1) {
@@ -146,7 +147,7 @@ static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in) {
// center MM NES screen
Graphics::Surface newscreen;
- newscreen.create(width, in.h, in.bytesPerPixel);
+ newscreen.create(width, in.h, in.format);
uint8 *dst = (uint8 *)newscreen.getBasePtr((320 - in.w) / 2, 0);
const uint8 *src = (const uint8 *)in.getBasePtr(0, 0);
@@ -171,13 +172,13 @@ static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in) {
// cut off menu and so on..
Graphics::Surface newscreen;
- newscreen.create(width, 400, in.bytesPerPixel);
+ newscreen.create(width, 400, in.format);
uint8 *dst = (uint8 *)newscreen.getBasePtr(0, (400 - 240) / 2);
const uint8 *src = (const uint8 *)in.getBasePtr(41, 28);
for (int y = 0; y < 240; ++y) {
- memcpy(dst, src, 640 * in.bytesPerPixel);
+ memcpy(dst, src, 640 * in.format.bytesPerPixel);
dst += newscreen.pitch;
src += in.pitch;
}
@@ -190,9 +191,9 @@ static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in) {
inHeight = 480;
Graphics::Surface newscreen;
- newscreen.create(width, 480, in.bytesPerPixel);
+ newscreen.create(width, 480, in.format);
- memcpy(newscreen.getBasePtr(0, 0), in.getBasePtr(0, 0), width * 440 * in.bytesPerPixel);
+ memcpy(newscreen.getBasePtr(0, 0), in.getBasePtr(0, 0), width * 440 * in.format.bytesPerPixel);
in.free();
in = newscreen;
@@ -200,7 +201,7 @@ static bool createThumbnail(Graphics::Surface &out, Graphics::Surface &in) {
uint16 newHeight = !(inHeight % 240) ? kThumbnailHeight2 : kThumbnailHeight1;
- out.create(kThumbnailWidth, newHeight, sizeof(uint16));
+ out.create(kThumbnailWidth, newHeight, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
createThumbnail((const uint8 *)in.pixels, width * sizeof(uint16), (uint8 *)out.pixels, out.pitch, width, inHeight);
in.free();
@@ -223,7 +224,7 @@ bool createThumbnail(Graphics::Surface *surf, const uint8 *pixels, int w, int h,
assert(surf);
Graphics::Surface screen;
- screen.create(w, h, 2);
+ screen.create(w, h, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
for (uint y = 0; y < screen.h; ++y) {
for (uint x = 0; x < screen.w; ++x) {
diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp
index c581f9b265..caa53a4f63 100644
--- a/graphics/sjis.cpp
+++ b/graphics/sjis.cpp
@@ -31,6 +31,7 @@
#include "common/archive.h"
#include "common/endian.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "graphics/surface.h"
@@ -57,7 +58,7 @@ FontSJIS *FontSJIS::createFont(const Common::Platform platform) {
}
void FontSJIS::drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const {
- drawChar(dst.getBasePtr(x, y), ch, dst.pitch, dst.bytesPerPixel, c1, c2, dst.w - x, dst.h - y);
+ drawChar(dst.getBasePtr(x, y), ch, dst.pitch, dst.format.bytesPerPixel, c1, c2, dst.w - x, dst.h - y);
}
template<typename Color>
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index f06c24c2cd..88bdcfc822 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -24,7 +24,8 @@
#include "common/algorithm.h"
#include "common/util.h"
-#include "common/endian.h"
+#include "common/rect.h"
+#include "common/textconsole.h"
#include "graphics/primitives.h"
#include "graphics/surface.h"
@@ -40,23 +41,23 @@ static void plotPoint(int x, int y, int color, void *data) {
}
void Surface::drawLine(int x0, int y0, int x1, int y1, uint32 color) {
- if (bytesPerPixel == 1)
+ if (format.bytesPerPixel == 1)
Graphics::drawLine(x0, y0, x1, y1, color, plotPoint<byte>, this);
- else if (bytesPerPixel == 2)
+ else if (format.bytesPerPixel == 2)
Graphics::drawLine(x0, y0, x1, y1, color, plotPoint<uint16>, this);
else
error("Surface::drawLine: bytesPerPixel must be 1 or 2");
}
-void Surface::create(uint16 width, uint16 height, uint8 bytesPP) {
+void Surface::create(uint16 width, uint16 height, const PixelFormat &f) {
free();
w = width;
h = height;
- bytesPerPixel = bytesPP;
- pitch = w * bytesPP;
+ format = f;
+ pitch = w * format.bytesPerPixel;
- pixels = calloc(width * height, bytesPP);
+ pixels = calloc(width * height, format.bytesPerPixel);
assert(pixels);
}
@@ -64,11 +65,11 @@ void Surface::free() {
::free(pixels);
pixels = 0;
w = h = pitch = 0;
- bytesPerPixel = 0;
+ format = PixelFormat();
}
void Surface::copyFrom(const Surface &surf) {
- create(surf.w, surf.h, surf.bytesPerPixel);
+ create(surf.w, surf.h, surf.format);
memcpy(pixels, surf.pixels, h * pitch);
}
@@ -88,10 +89,10 @@ void Surface::hLine(int x, int y, int x2, uint32 color) {
if (x2 < x)
return;
- if (bytesPerPixel == 1) {
+ if (format.bytesPerPixel == 1) {
byte *ptr = (byte *)getBasePtr(x, y);
memset(ptr, (byte)color, x2-x+1);
- } else if (bytesPerPixel == 2) {
+ } else if (format.bytesPerPixel == 2) {
uint16 *ptr = (uint16 *)getBasePtr(x, y);
Common::set_to(ptr, ptr + (x2-x+1), (uint16)color);
} else {
@@ -112,13 +113,13 @@ void Surface::vLine(int x, int y, int y2, uint32 color) {
if (y2 >= h)
y2 = h - 1;
- if (bytesPerPixel == 1) {
+ if (format.bytesPerPixel == 1) {
byte *ptr = (byte *)getBasePtr(x, y);
while (y++ <= y2) {
*ptr = (byte)color;
ptr += pitch;
}
- } else if (bytesPerPixel == 2) {
+ } else if (format.bytesPerPixel == 2) {
uint16 *ptr = (uint16 *)getBasePtr(x, y);
while (y++ <= y2) {
*ptr = (uint16)color;
@@ -140,13 +141,13 @@ void Surface::fillRect(Common::Rect r, uint32 color) {
int height = r.height();
bool useMemset = true;
- if (bytesPerPixel == 2) {
+ if (format.bytesPerPixel == 2) {
lineLen *= 2;
if ((uint16)color != ((color & 0xff) | (color & 0xff) << 8))
useMemset = false;
- } else if (bytesPerPixel == 4) {
+ } else if (format.bytesPerPixel == 4) {
useMemset = false;
- } else if (bytesPerPixel != 1) {
+ } else if (format.bytesPerPixel != 1) {
error("Surface::fillRect: bytesPerPixel must be 1, 2 or 4");
}
@@ -157,7 +158,7 @@ void Surface::fillRect(Common::Rect r, uint32 color) {
ptr += pitch;
}
} else {
- if (bytesPerPixel == 2) {
+ if (format.bytesPerPixel == 2) {
uint16 *ptr = (uint16 *)getBasePtr(r.left, r.top);
while (height--) {
Common::set_to(ptr, ptr + width, (uint16)color);
@@ -185,7 +186,7 @@ void Surface::move(int dx, int dy, int height) {
if ((dx == 0 && dy == 0) || height <= 0)
return;
- if (bytesPerPixel != 1 && bytesPerPixel != 2)
+ if (format.bytesPerPixel != 1 && format.bytesPerPixel != 2)
error("Surface::move: bytesPerPixel must be 1 or 2");
byte *src, *dst;
@@ -215,37 +216,37 @@ void Surface::move(int dx, int dy, int height) {
// horizontal movement
if (dx > 0) {
// move right - copy from right to left
- dst = (byte *)pixels + (pitch - bytesPerPixel);
- src = dst - (dx * bytesPerPixel);
+ dst = (byte *)pixels + (pitch - format.bytesPerPixel);
+ src = dst - (dx * format.bytesPerPixel);
for (y = 0; y < height; y++) {
for (x = dx; x < w; x++) {
- if (bytesPerPixel == 1) {
+ if (format.bytesPerPixel == 1) {
*dst-- = *src--;
- } else if (bytesPerPixel == 2) {
+ } else if (format.bytesPerPixel == 2) {
*(uint16 *)dst = *(const uint16 *)src;
src -= 2;
dst -= 2;
}
}
- src += pitch + (pitch - dx * bytesPerPixel);
- dst += pitch + (pitch - dx * bytesPerPixel);
+ src += pitch + (pitch - dx * format.bytesPerPixel);
+ dst += pitch + (pitch - dx * format.bytesPerPixel);
}
} else if (dx < 0) {
// move left - copy from left to right
dst = (byte *)pixels;
- src = dst - (dx * bytesPerPixel);
+ src = dst - (dx * format.bytesPerPixel);
for (y = 0; y < height; y++) {
for (x = -dx; x < w; x++) {
- if (bytesPerPixel == 1) {
+ if (format.bytesPerPixel == 1) {
*dst++ = *src++;
- } else if (bytesPerPixel == 2) {
+ } else if (format.bytesPerPixel == 2) {
*(uint16 *)dst = *(const uint16 *)src;
src += 2;
dst += 2;
}
}
- src += pitch - (pitch + dx * bytesPerPixel);
- dst += pitch - (pitch + dx * bytesPerPixel);
+ src += pitch - (pitch + dx * format.bytesPerPixel);
+ dst += pitch - (pitch + dx * format.bytesPerPixel);
}
}
}
diff --git a/graphics/surface.h b/graphics/surface.h
index f9cb6cc474..1b54690aa9 100644
--- a/graphics/surface.h
+++ b/graphics/surface.h
@@ -26,7 +26,12 @@
#define GRAPHICS_SURFACE_H
#include "common/scummsys.h"
-#include "common/rect.h"
+
+namespace Common {
+struct Rect;
+}
+
+#include "graphics/pixelformat.h"
namespace Graphics {
@@ -65,14 +70,14 @@ struct Surface {
void *pixels;
/**
- * How many bytes a single pixel occupies.
+ * The pixel format of the surface.
*/
- uint8 bytesPerPixel;
+ PixelFormat format;
/**
* Construct a simple Surface object.
*/
- Surface() : w(0), h(0), pitch(0), pixels(0), bytesPerPixel(0) {
+ Surface() : w(0), h(0), pitch(0), pixels(0), format() {
}
/**
@@ -83,7 +88,7 @@ struct Surface {
* @return Pointer to the pixel.
*/
inline const void *getBasePtr(int x, int y) const {
- return (const byte *)(pixels) + y * pitch + x * bytesPerPixel;
+ return (const byte *)(pixels) + y * pitch + x * format.bytesPerPixel;
}
/**
@@ -94,7 +99,7 @@ struct Surface {
* @return Pointer to the pixel.
*/
inline void *getBasePtr(int x, int y) {
- return static_cast<byte *>(pixels) + y * pitch + x * bytesPerPixel;
+ return static_cast<byte *>(pixels) + y * pitch + x * format.bytesPerPixel;
}
/**
@@ -105,9 +110,9 @@ struct Surface {
*
* @param width Width of the surface object.
* @param height Height of the surface object.
- * @param bytePP The number of bytes a single pixel uses.
+ * @param format The pixel format the surface should use.
*/
- void create(uint16 width, uint16 height, uint8 bytesPP);
+ void create(uint16 width, uint16 height, const PixelFormat &format);
/**
* Release the memory used by the pixels memory of this surface. This is the
diff --git a/graphics/thumbnail.cpp b/graphics/thumbnail.cpp
index 8688096c3d..32ab04ed24 100644
--- a/graphics/thumbnail.cpp
+++ b/graphics/thumbnail.cpp
@@ -28,6 +28,7 @@
#include "common/endian.h"
#include "common/system.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Graphics {
@@ -107,10 +108,10 @@ bool loadThumbnail(Common::SeekableReadStream &in, Graphics::Surface &to) {
return false;
}
- to.create(header.width, header.height, sizeof(OverlayColor));
+ Graphics::PixelFormat format = g_system->getOverlayFormat();
+ to.create(header.width, header.height, format);
OverlayColor *pixels = (OverlayColor *)to.pixels;
- Graphics::PixelFormat format = g_system->getOverlayFormat();
for (int y = 0; y < to.h; ++y) {
for (int x = 0; x < to.w; ++x) {
uint8 r, g, b;
@@ -139,18 +140,18 @@ bool saveThumbnail(Common::WriteStream &out) {
}
bool saveThumbnail(Common::WriteStream &out, const Graphics::Surface &thumb) {
- if (thumb.bytesPerPixel != 2) {
+ if (thumb.format.bytesPerPixel != 2) {
warning("trying to save thumbnail with bpp different than 2");
return false;
}
ThumbnailHeader header;
header.type = MKTAG('T','H','M','B');
- header.size = ThumbnailHeaderSize + thumb.w*thumb.h*thumb.bytesPerPixel;
+ header.size = ThumbnailHeaderSize + thumb.w*thumb.h*thumb.format.bytesPerPixel;
header.version = THMB_VERSION;
header.width = thumb.w;
header.height = thumb.h;
- header.bpp = thumb.bytesPerPixel;
+ header.bpp = thumb.format.bytesPerPixel;
out.writeUint32BE(header.type);
out.writeUint32BE(header.size);
diff --git a/graphics/wincursor.cpp b/graphics/wincursor.cpp
index 10939a677a..bae64f9303 100644
--- a/graphics/wincursor.cpp
+++ b/graphics/wincursor.cpp
@@ -23,12 +23,9 @@
*
*/
-#include "common/debug.h"
-#include "common/file.h"
-#include "common/memstream.h"
#include "common/ptr.h"
-#include "common/str.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "common/winexe_ne.h"
#include "common/winexe_pe.h"
diff --git a/graphics/wincursor.h b/graphics/wincursor.h
index ca0abf6fe1..717a1be588 100644
--- a/graphics/wincursor.h
+++ b/graphics/wincursor.h
@@ -30,9 +30,9 @@
#include "common/winexe.h"
namespace Common {
- class NEResources;
- class PEResources;
- class SeekableReadStream;
+class NEResources;
+class PEResources;
+class SeekableReadStream;
}
namespace Graphics {
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 82104eb7ae..098cb8e0ac 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -24,7 +24,6 @@
*/
#include "common/system.h"
-#include "common/events.h"
#include "common/config-manager.h"
#include "common/file.h"
#include "common/fs.h"
@@ -32,14 +31,13 @@
#include "common/tokenizer.h"
#include "common/translation.h"
-#include "graphics/colormasks.h"
#include "graphics/cursorman.h"
#include "graphics/fontman.h"
#include "graphics/imagedec.h"
#include "graphics/surface.h"
#include "graphics/VectorRenderer.h"
-#include "gui/launcher.h"
+#include "gui/widget.h"
#include "gui/ThemeEngine.h"
#include "gui/ThemeEval.h"
#include "gui/ThemeParser.h"
@@ -373,8 +371,8 @@ const char *ThemeEngine::findModeConfigName(GraphicsMode mode) {
bool ThemeEngine::init() {
// reset everything and reload the graphics
_initOk = false;
- setGraphicsMode(_graphicsMode);
_overlayFormat = _system->getOverlayFormat();
+ setGraphicsMode(_graphicsMode);
if (_screen.pixels && _backBuffer.pixels) {
_initOk = true;
@@ -393,7 +391,7 @@ bool ThemeEngine::init() {
Common::FSNode node(_themeFile);
if (node.isDirectory()) {
_themeArchive = new Common::FSDirectory(node);
- } else if (_themeFile.hasSuffix(".zip")) {
+ } else if (_themeFile.matchString("*.zip", true)) {
// TODO: Also use "node" directly?
// Look for the zip file via SearchMan
Common::ArchiveMemberPtr member = SearchMan.getMember(_themeFile);
@@ -499,10 +497,10 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) {
uint32 height = _system->getOverlayHeight();
_backBuffer.free();
- _backBuffer.create(width, height, _bytesPerPixel);
+ _backBuffer.create(width, height, _overlayFormat);
_screen.free();
- _screen.create(width, height, _bytesPerPixel);
+ _screen.create(width, height, _overlayFormat);
delete _vectorRenderer;
_vectorRenderer = Graphics::createRenderer(mode);
@@ -1477,20 +1475,23 @@ Common::String ThemeEngine::genLocalizedFontFilename(const Common::String &filen
#ifndef USE_TRANSLATION
return filename;
#else
- Common::String result;
- bool pointPassed = false;
-
- for (const char *p = filename.c_str(); *p != 0; p++) {
- if (!pointPassed && *p == '.') {
- result += "-";
- result += TransMan.getCurrentCharset();
- result += *p;
-
- pointPassed = true;
- } else {
- result += *p;
- }
- }
+ // We will transform the font filename in the following way:
+ // name.bdf
+ // will become:
+ // name-charset.bdf
+ // Note that name should not contain any dot here!
+
+ // In the first step we look for the dot. In case there is none we will
+ // return the normal filename.
+ Common::String::const_iterator dot = Common::find(filename.begin(), filename.end(), '.');
+ if (dot == filename.end())
+ return filename;
+
+ // Put the translated font filename string back together.
+ Common::String result(filename.begin(), dot);
+ result += '-';
+ result += TransMan.getCurrentCharset();
+ result += dot;
return result;
#endif
@@ -1502,6 +1503,12 @@ Common::String ThemeEngine::genLocalizedFontFilename(const Common::String &filen
*********************************************************/
bool ThemeEngine::themeConfigParseHeader(Common::String header, Common::String &themeName) {
+ // Check that header is not corrupted
+ if ((byte)header[0] > 127) {
+ warning("Corrupted theme header found");
+ return false;
+ }
+
header.trim();
if (header.empty())
@@ -1528,7 +1535,7 @@ bool ThemeEngine::themeConfigUsable(const Common::ArchiveMember &member, Common:
Common::File stream;
bool foundHeader = false;
- if (member.getName().hasSuffix(".zip")) {
+ if (member.getName().matchString("*.zip", true)) {
Common::Archive *zipArchive = Common::makeZipArchive(member.createReadStream());
if (zipArchive && zipArchive->hasFile("THEMERC")) {
@@ -1550,7 +1557,7 @@ bool ThemeEngine::themeConfigUsable(const Common::FSNode &node, Common::String &
Common::File stream;
bool foundHeader = false;
- if (node.getName().hasSuffix(".zip") && !node.isDirectory()) {
+ if (node.getName().matchString("*.zip", true) && !node.isDirectory()) {
Common::Archive *zipArchive = Common::makeZipArchive(node);
if (zipArchive && zipArchive->hasFile("THEMERC")) {
// Open THEMERC from the ZIP file.
@@ -1636,7 +1643,7 @@ void ThemeEngine::listUsableThemes(Common::Archive &archive, Common::List<ThemeD
// If the name of the node object also contains
// the ".zip" suffix, we will strip it.
- if (td.id.hasSuffix(".zip")) {
+ if (td.id.matchString("*.zip", true)) {
for (int j = 0; j < 4; ++j)
td.id.deleteLastChar();
}
@@ -1673,7 +1680,7 @@ void ThemeEngine::listUsableThemes(const Common::FSNode &node, Common::List<Them
for (Common::FSList::iterator i = fileList.begin(); i != fileList.end(); ++i) {
// We will only process zip files for now
- if (!i->getPath().hasSuffix(".zip"))
+ if (!i->getPath().matchString("*.zip", true))
continue;
td.name.clear();
@@ -1683,7 +1690,7 @@ void ThemeEngine::listUsableThemes(const Common::FSNode &node, Common::List<Them
// If the name of the node object also contains
// the ".zip" suffix, we will strip it.
- if (td.id.hasSuffix(".zip")) {
+ if (td.id.matchString("*.zip", true)) {
for (int j = 0; j < 4; ++j)
td.id.deleteLastChar();
}
@@ -1720,7 +1727,7 @@ Common::String ThemeEngine::getThemeFile(const Common::String &id) {
Common::FSNode node(id);
// If the given id is a full path we'll just use it
- if (node.exists() && (node.isDirectory() || node.getName().hasSuffix(".zip")))
+ if (node.exists() && (node.isDirectory() || node.getName().matchString("*.zip", true)))
return id;
// FIXME:
@@ -1751,7 +1758,7 @@ Common::String ThemeEngine::getThemeId(const Common::String &filename) {
if (!node.exists())
return "builtin";
- if (node.getName().hasSuffix(".zip")) {
+ if (node.getName().matchString("*.zip", true)) {
Common::String id = node.getName();
for (int i = 0; i < 4; ++i)
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index 46065278d3..08560c8635 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -27,13 +27,25 @@
#define GUI_THEME_ENGINE_H
#include "common/scummsys.h"
-#include "common/system.h"
#include "common/fs.h"
+#include "common/hash-str.h"
+#include "common/hashmap.h"
+#include "common/list.h"
+#include "common/str.h"
+
#include "graphics/surface.h"
#include "graphics/font.h"
+#include "graphics/pixelformat.h"
+
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.3"
+class OSystem;
+
+namespace Common {
+struct Rect;
+}
+
namespace Graphics {
struct DrawStep;
class VectorRenderer;
@@ -42,8 +54,6 @@ class VectorRenderer;
namespace GUI {
struct WidgetDrawData;
-struct DrawDataInfo;
-struct TextDataInfo;
struct TextDrawData;
struct TextColorData;
class Dialog;
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp
index 017d47fd29..64e18f93a3 100644
--- a/gui/ThemeEval.cpp
+++ b/gui/ThemeEval.cpp
@@ -24,10 +24,10 @@
*/
#include "gui/ThemeEval.h"
-#include "gui/widget.h"
#include "graphics/scaler.h"
+#include "common/system.h"
#include "common/tokenizer.h"
namespace GUI {
diff --git a/gui/ThemeEval.h b/gui/ThemeEval.h
index ac867512da..65bed3e271 100644
--- a/gui/ThemeEval.h
+++ b/gui/ThemeEval.h
@@ -30,6 +30,8 @@
#include "common/hashmap.h"
#include "common/hash-str.h"
#include "common/stack.h"
+#include "common/str.h"
+#include "common/textconsole.h"
#include "graphics/font.h"
#include "gui/ThemeLayout.h"
diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp
index 3c930db73c..fbfc498bcb 100644
--- a/gui/ThemeLayout.cpp
+++ b/gui/ThemeLayout.cpp
@@ -25,14 +25,12 @@
#include "common/util.h"
#include "common/system.h"
-#include "common/events.h"
-#include "common/xmlparser.h"
-#include "gui/ThemeEval.h"
#include "gui/ThemeLayout.h"
-#ifdef LAYOUT_DEBUG_DIALOG
#include "graphics/font.h"
+
+#ifdef LAYOUT_DEBUG_DIALOG
#include "graphics/surface.h"
#endif
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h
index 3d367df147..76d3f7d380 100644
--- a/gui/ThemeLayout.h
+++ b/gui/ThemeLayout.h
@@ -26,12 +26,13 @@
#ifndef THEME_LAYOUT_H
#define THEME_LAYOUT_H
+#include "common/array.h"
#include "common/rect.h"
+#include "graphics/font.h"
#ifdef LAYOUT_DEBUG_DIALOG
namespace Graphics {
- class Font;
- class Surface;
+class Surface;
}
#endif
diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index e3523d11e8..230dad8cc5 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -26,10 +26,10 @@
#include "gui/ThemeEngine.h"
#include "gui/ThemeEval.h"
#include "gui/ThemeParser.h"
-#include "gui/gui-manager.h"
#include "graphics/VectorRenderer.h"
+#include "common/system.h"
#include "common/tokenizer.h"
namespace GUI {
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp
index 7dec12d522..a7cb0610e7 100644
--- a/gui/Tooltip.cpp
+++ b/gui/Tooltip.cpp
@@ -23,7 +23,6 @@
*/
#include "common/util.h"
-#include "graphics/fontman.h"
#include "gui/widget.h"
#include "gui/dialog.h"
#include "gui/gui-manager.h"
diff --git a/gui/Tooltip.h b/gui/Tooltip.h
index d228ca8a49..f5e2bb08a8 100644
--- a/gui/Tooltip.h
+++ b/gui/Tooltip.h
@@ -25,11 +25,14 @@
#ifndef GUI_TOOLTIP_H
#define GUI_TOOLTIP_H
+#include "common/keyboard.h"
+#include "common/str-array.h"
#include "gui/dialog.h"
-#include "gui/widget.h"
namespace GUI {
+class Widget;
+
class Tooltip : public Dialog {
public:
Tooltip();
diff --git a/gui/about.cpp b/gui/about.cpp
index c2d9a3f983..0389f4c8da 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -31,8 +31,6 @@
#include "common/util.h"
#include "gui/about.h"
#include "gui/gui-manager.h"
-#include "gui/widget.h"
-
#include "gui/ThemeEval.h"
namespace GUI {
diff --git a/gui/about.h b/gui/about.h
index fc216a78dc..b49365c5e5 100644
--- a/gui/about.h
+++ b/gui/about.h
@@ -27,7 +27,8 @@
#include "gui/dialog.h"
#include "common/str.h"
-#include "graphics/surface.h"
+#include "common/array.h"
+#include "common/keyboard.h"
namespace GUI {
diff --git a/gui/browser.cpp b/gui/browser.cpp
index 4ee6bafdde..2c7459623f 100644
--- a/gui/browser.cpp
+++ b/gui/browser.cpp
@@ -23,7 +23,6 @@
*/
#include "gui/browser.h"
-#include "gui/gui-manager.h"
#include "gui/widgets/list.h"
#include "common/config-manager.h"
diff --git a/gui/browser.h b/gui/browser.h
index 1fef041a5a..eb3498e654 100644
--- a/gui/browser.h
+++ b/gui/browser.h
@@ -26,13 +26,13 @@
#define BROWSER_DIALOG_H
#include "gui/dialog.h"
-#include "common/str.h"
#include "common/fs.h"
namespace GUI {
class ListWidget;
class StaticTextWidget;
+class CommandSender;
class BrowserDialog : public Dialog {
public:
diff --git a/gui/chooser.cpp b/gui/chooser.cpp
index f5e7d26a32..ecc8ebd894 100644
--- a/gui/chooser.cpp
+++ b/gui/chooser.cpp
@@ -22,10 +22,9 @@
* $Id$
*/
-#include "common/system.h"
#include "common/translation.h"
#include "gui/chooser.h"
-#include "gui/gui-manager.h"
+#include "gui/widget.h"
#include "gui/widgets/list.h"
namespace GUI {
diff --git a/gui/chooser.h b/gui/chooser.h
index ce67c008df..79a20383c5 100644
--- a/gui/chooser.h
+++ b/gui/chooser.h
@@ -25,12 +25,14 @@
#ifndef CHOOSER_DIALOG_H
#define CHOOSER_DIALOG_H
+#include "common/array.h"
#include "common/str.h"
#include "gui/dialog.h"
namespace GUI {
class ButtonWidget;
+class CommandSender;
class ListWidget;
/*
diff --git a/gui/console.cpp b/gui/console.cpp
index cb3319063d..cbab1b212e 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -27,10 +27,8 @@
#include "gui/ThemeEval.h"
#include "gui/gui-manager.h"
-#include "engines/engine.h"
#include "base/version.h"
-#include "common/events.h"
#include "common/system.h"
#include "graphics/fontman.h"
diff --git a/gui/credits.h b/gui/credits.h
index a6a8a4f483..7ad480032e 100644
--- a/gui/credits.h
+++ b/gui/credits.h
@@ -206,6 +206,10 @@ static const char *credits[] = {
"C1""Touch\351",
"C0""Gregory Montoir",
"",
+"C1""TsAGE",
+"C0""Paul Gilbert",
+"C0""Arnaud Boutonn\351",
+"",
"C1""Tucker",
"C0""Gregory Montoir",
"",
@@ -472,7 +476,7 @@ static const char *credits[] = {
"C0""Raina",
"C2""ScummVM forum buttons",
"C0""William Claydon",
-"C2""Skins for doxygen and wiki",
+"C2""Skins for doxygen, buildbot and wiki",
"",
"C1""Code contributions",
"C0""Ori Avtalion",
@@ -649,7 +653,7 @@ static const char *credits[] = {
"C0""",
"C0""Emilio de Paz Aragon from Alcachofa Soft for sharing the source code of Drascula: The Vampire Strikes Back with us and his generosity with freewaring the game.",
"C0""",
-"C0""David P. Gray from Gray Design Associate for sharing the source code of the Hugo trilogy.",
+"C0""David P. Gray from Gray Design Associates for sharing the source code of the Hugo trilogy.",
"C0""",
"C0""Broken Sword 2.5 team for providing sources of their engine and their great support.",
"C0""",
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index f113206ea1..2282bc3a1c 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -26,7 +26,6 @@
// NB: This is really only necessary if USE_READLINE is defined
#define FORBIDDEN_SYMBOL_ALLOW_ALL
-#include "common/debug.h"
#include "common/debug-channels.h"
#include "common/system.h"
diff --git a/gui/dialog.cpp b/gui/dialog.cpp
index 2c2b0603d6..15e47141c8 100644
--- a/gui/dialog.cpp
+++ b/gui/dialog.cpp
@@ -22,14 +22,11 @@
* $Id$
*/
-#include "common/events.h"
+#include "common/rect.h"
#include "gui/gui-manager.h"
#include "gui/dialog.h"
#include "gui/widget.h"
-#include "gui/widgets/popup.h"
-
-#include "common/system.h"
namespace GUI {
diff --git a/gui/dialog.h b/gui/dialog.h
index 1845786044..c298ef107b 100644
--- a/gui/dialog.h
+++ b/gui/dialog.h
@@ -27,14 +27,14 @@
#include "common/scummsys.h"
#include "common/str.h"
+#include "common/keyboard.h"
#include "gui/object.h"
-#include "gui/widget.h"
+#include "gui/ThemeEngine.h"
namespace GUI {
-class GuiManager;
-class PopUpWidget;
+class Widget;
// Some "common" commands sent to handleCommand()
enum {
diff --git a/gui/error.cpp b/gui/error.cpp
index 3332eb533a..f6da795d40 100644
--- a/gui/error.cpp
+++ b/gui/error.cpp
@@ -36,10 +36,10 @@ void displayErrorDialog(const char *text) {
alert.runModal();
}
-void displayErrorDialog(Common::Error error, const char *extraText) {
+void displayErrorDialog(const Common::Error &error, const char *extraText) {
Common::String errorText(extraText);
errorText += " ";
- errorText += _(Common::errorToString(error));
+ errorText += _(error.getDesc());
GUI::MessageDialog alert(errorText);
alert.runModal();
}
diff --git a/gui/error.h b/gui/error.h
index a55f555bed..f048a0cd09 100644
--- a/gui/error.h
+++ b/gui/error.h
@@ -36,7 +36,7 @@ namespace GUI {
* @param error error code
* @param extraText extra text to be displayed in addition to default string description(optional)
*/
-void displayErrorDialog(Common::Error error, const char *extraText = "");
+void displayErrorDialog(const Common::Error &error, const char *extraText = "");
/**
* Displays an error dialog for a given message.
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 0cb06458ef..19ca66b7b1 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -27,7 +27,8 @@
#include "common/util.h"
#include "common/config-manager.h"
#include "common/algorithm.h"
-#include "common/timer.h"
+#include "common/rect.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#include "backends/keymapper/keymapper.h"
@@ -37,6 +38,7 @@
#include "gui/ThemeEngine.h"
#include "gui/ThemeEval.h"
#include "gui/Tooltip.h"
+#include "gui/widget.h"
#include "graphics/cursorman.h"
diff --git a/gui/gui-manager.h b/gui/gui-manager.h
index a6c90bfe8d..ac4118bb06 100644
--- a/gui/gui-manager.h
+++ b/gui/gui-manager.h
@@ -30,13 +30,14 @@
#include "common/stack.h"
#include "common/str.h"
-#include "graphics/font.h"
-
-#include "gui/widget.h"
#include "gui/ThemeEngine.h"
class OSystem;
+namespace Graphics {
+class Font;
+}
+
namespace GUI {
class Dialog;
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 1d209ce71a..aed57decd3 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -28,7 +28,6 @@
#include "common/events.h"
#include "common/fs.h"
#include "common/util.h"
-#include "common/savefile.h"
#include "common/system.h"
#include "common/translation.h"
@@ -49,9 +48,6 @@
#include "graphics/cursorman.h"
-#include "audio/mididrv.h"
-
-
using Common::ConfigManager;
namespace GUI {
diff --git a/gui/launcher.h b/gui/launcher.h
index df9a6fb639..274fc45bb4 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -31,10 +31,13 @@
namespace GUI {
class BrowserDialog;
+class CommandSender;
class ListWidget;
+class ButtonWidget;
class GraphicsWidget;
-class SaveLoadChooser;
+class StaticTextWidget;
class EditTextWidget;
+class SaveLoadChooser;
Common::String addGameToConf(const GameDescriptor &result);
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index 197caae675..80d580d2a0 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -24,14 +24,13 @@
#include "engines/metaengine.h"
#include "common/algorithm.h"
-#include "common/events.h"
-#include "common/func.h"
#include "common/config-manager.h"
+#include "common/debug.h"
+#include "common/system.h"
#include "common/translation.h"
#include "gui/launcher.h" // For addGameToConf()
#include "gui/massadd.h"
-#include "gui/gui-manager.h"
#include "gui/widget.h"
#include "gui/widgets/list.h"
@@ -63,6 +62,7 @@ enum {
MassAddDialog::MassAddDialog(const Common::FSNode &startDir)
: Dialog("MassAdd"),
_dirsScanned(0),
+ _oldGamesCount(0),
_okButton(0),
_dirProgressText(0),
_gameProgressText(0) {
@@ -213,8 +213,10 @@ void MassAddDialog::handleTickle() {
break;
}
}
- if (duplicate)
+ if (duplicate) {
+ _oldGamesCount++;
break; // Skip duplicates
+ }
}
result["path"] = path;
_games.push_back(result);
@@ -244,14 +246,14 @@ void MassAddDialog::handleTickle() {
snprintf(buf, sizeof(buf), "%s", _("Scan complete!"));
_dirProgressText->setLabel(buf);
- snprintf(buf, sizeof(buf), _("Discovered %d new games."), _games.size());
+ snprintf(buf, sizeof(buf), _("Discovered %d new games, ignored %d previously added games."), _games.size(), _oldGamesCount);
_gameProgressText->setLabel(buf);
} else {
snprintf(buf, sizeof(buf), _("Scanned %d directories ..."), _dirsScanned);
_dirProgressText->setLabel(buf);
- snprintf(buf, sizeof(buf), _("Discovered %d new games ..."), _games.size());
+ snprintf(buf, sizeof(buf), _("Discovered %d new games, ignored %d previously added games ..."), _games.size(), _oldGamesCount);
_gameProgressText->setLabel(buf);
}
diff --git a/gui/massadd.h b/gui/massadd.h
index 31a8821a26..6aad392b0d 100644
--- a/gui/massadd.h
+++ b/gui/massadd.h
@@ -30,7 +30,6 @@
#include "common/hashmap.h"
#include "common/stack.h"
#include "common/str.h"
-#include "common/hash-str.h"
namespace GUI {
@@ -63,6 +62,7 @@ private:
Common::HashMap<Common::String, StringArray> _pathToTargets;
int _dirsScanned;
+ int _oldGamesCount;
Widget *_okButton;
StaticTextWidget *_dirProgressText;
diff --git a/gui/message.cpp b/gui/message.cpp
index 2d097a75a9..5cb4cec3d3 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -22,7 +22,6 @@
* $Id$
*/
-#include "common/events.h"
#include "common/str.h"
#include "common/system.h"
#include "gui/message.h"
diff --git a/gui/message.h b/gui/message.h
index 912e3b0785..5c3308e425 100644
--- a/gui/message.h
+++ b/gui/message.h
@@ -30,6 +30,8 @@
namespace GUI {
+class CommandSender;
+
enum {
kMessageOK = 1,
kMessageCancel = 0
diff --git a/gui/object.cpp b/gui/object.cpp
index bf8e7a8642..6564fe2b68 100644
--- a/gui/object.cpp
+++ b/gui/object.cpp
@@ -22,7 +22,8 @@
* $Id$
*/
-#include "common/system.h"
+#include "common/textconsole.h"
+
#include "gui/object.h"
#include "gui/widget.h"
#include "gui/gui-manager.h"
diff --git a/gui/object.h b/gui/object.h
index fb5ff18290..3b181fd8a3 100644
--- a/gui/object.h
+++ b/gui/object.h
@@ -25,9 +25,11 @@
#ifndef GUI_OBJECT_H
#define GUI_OBJECT_H
+#include "common/scummsys.h"
+#include "common/str.h"
+
namespace GUI {
-class CommandReceiver;
class CommandSender;
class CommandReceiver {
diff --git a/gui/options.cpp b/gui/options.cpp
index a540fbb9d1..547ab0f3c6 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -24,10 +24,8 @@
#include "gui/browser.h"
#include "gui/themebrowser.h"
-#include "gui/chooser.h"
#include "gui/message.h"
#include "gui/gui-manager.h"
-#include "gui/ThemeEval.h"
#include "gui/options.h"
#include "gui/widgets/popup.h"
#include "gui/widgets/tab.h"
@@ -35,10 +33,9 @@
#include "common/fs.h"
#include "common/config-manager.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/translation.h"
-#include "graphics/scaler.h"
-
#include "audio/mididrv.h"
#include "audio/musicplugin.h"
#include "audio/mixer.h"
@@ -144,6 +141,7 @@ void OptionsDialog::init() {
_subSpeedDesc = 0;
_subSpeedSlider = 0;
_subSpeedLabel = 0;
+ _oldTheme = ConfMan.get("gui_theme");
// Retrieve game GUI options
_guioptions = 0;
@@ -509,6 +507,13 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
setResult(1);
close();
break;
+ case kCloseCmd:
+ if (g_gui.theme()->getThemeId() != _oldTheme) {
+ g_gui.loadNewTheme(_oldTheme);
+ ConfMan.set("gui_theme", _oldTheme);
+ }
+ close();
+ break;
default:
Dialog::handleCommand(sender, cmd, data);
}
@@ -1316,7 +1321,6 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
#ifdef USE_TRANSLATION
Common::String lang = TransMan.getCurrentLanguage();
#endif
- Common::String oldTheme = g_gui.theme()->getThemeId();
if (g_gui.loadNewTheme(theme)) {
#ifdef USE_TRANSLATION
// If the charset has changed, it means the font were not found for the
@@ -1324,7 +1328,7 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
// language without restarting, we let the user know about this.
if (lang != TransMan.getCurrentLanguage()) {
TransMan.setLanguage(lang.c_str());
- g_gui.loadNewTheme(oldTheme);
+ g_gui.loadNewTheme(_oldTheme);
MessageDialog error(_("The theme you selected does not support your current language. If you want to use this theme you need to switch to another language first."));
error.runModal();
} else {
diff --git a/gui/options.h b/gui/options.h
index eba1779b69..c097a3a9e9 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -27,7 +27,7 @@
#include "gui/dialog.h"
#include "common/str.h"
-#include "audio/musicplugin.h"
+#include "audio/mididrv.h"
#ifdef SMALL_SCREEN_DEVICE
#include "gui/KeysDialog.h"
@@ -35,13 +35,16 @@
namespace GUI {
-class BrowserDialog;
class CheckboxWidget;
class PopUpWidget;
class SliderWidget;
class StaticTextWidget;
-class ListWidget;
class TabWidget;
+class ButtonWidget;
+class CommandSender;
+class GuiObject;
+class RadiobuttonGroup;
+class RadiobuttonWidget;
class OptionsDialog : public Dialog {
public:
@@ -174,6 +177,11 @@ protected:
//
uint32 _guioptions;
Common::String _guioptionsString;
+
+ //
+ //Theme Options
+ //
+ Common::String _oldTheme;
};
diff --git a/gui/saveload.h b/gui/saveload.h
index b3622c1f13..06f1251e11 100644
--- a/gui/saveload.h
+++ b/gui/saveload.h
@@ -32,6 +32,10 @@ namespace GUI {
class ListWidget;
class GraphicsWidget;
+class ButtonWidget;
+class CommandSender;
+class ContainerWidget;
+class StaticTextWidget;
class SaveLoadChooser : GUI::Dialog {
typedef Common::String String;
diff --git a/gui/themebrowser.h b/gui/themebrowser.h
index aba519886d..bd6b11fb46 100644
--- a/gui/themebrowser.h
+++ b/gui/themebrowser.h
@@ -33,8 +33,8 @@
namespace GUI {
+class CommandSender;
class ListWidget;
-class StaticTextWidget;
class ThemeBrowser : public Dialog {
public:
diff --git a/gui/themes/scummmodern.zip b/gui/themes/scummmodern.zip
index 77951475e6..1e44442933 100644
--- a/gui/themes/scummmodern.zip
+++ b/gui/themes/scummmodern.zip
Binary files differ
diff --git a/gui/themes/scummmodern/scummmodern_layout.stx b/gui/themes/scummmodern/scummmodern_layout.stx
index 32d6d19d1a..c0433ceb9a 100644
--- a/gui/themes/scummmodern/scummmodern_layout.stx
+++ b/gui/themes/scummmodern/scummmodern_layout.stx
@@ -128,7 +128,7 @@
/>
<space />
<widget name = 'Version'
- width = '247'
+ width = '310'
height = 'Globals.Line.Height'
textalign = 'center'
/>
diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat
index e488b45347..f025a05337 100644
--- a/gui/themes/translations.dat
+++ b/gui/themes/translations.dat
Binary files differ
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 61f4a0e249..d3c8d3402d 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -22,10 +22,12 @@
* $Id$
*/
-#include "common/util.h"
-#include "graphics/fontman.h"
+#include "common/scummsys.h"
+#include "common/system.h"
+#include "common/rect.h"
+#include "common/textconsole.h"
+#include "graphics/pixelformat.h"
#include "gui/widget.h"
-#include "gui/dialog.h"
#include "gui/gui-manager.h"
#include "gui/ThemeEval.h"
@@ -345,7 +347,7 @@ void PicButtonWidget::setGfx(const Graphics::Surface *gfx) {
void PicButtonWidget::drawWidget() {
g_gui.theme()->drawButton(Common::Rect(_x, _y, _x+_w, _y+_h), "", _state, getFlags());
- if (sizeof(OverlayColor) == _gfx.bytesPerPixel && _gfx.pixels) {
+ if (sizeof(OverlayColor) == _gfx.format.bytesPerPixel && _gfx.pixels) {
const int x = _x + (_w - _gfx.w) / 2;
const int y = _y + (_h - _gfx.h) / 2;
@@ -573,11 +575,12 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) {
if (h == -1)
h = _h;
+ Graphics::PixelFormat overlayFormat = g_system->getOverlayFormat();
+
_gfx.free();
- _gfx.create(w, h, sizeof(OverlayColor));
+ _gfx.create(w, h, overlayFormat);
OverlayColor *dst = (OverlayColor *)_gfx.pixels;
- Graphics::PixelFormat overlayFormat = g_system->getOverlayFormat();
OverlayColor fillCol = overlayFormat.RGBToColor(r, g, b);
while (h--) {
for (int i = 0; i < w; ++i) {
@@ -587,7 +590,7 @@ void GraphicsWidget::setGfx(int w, int h, int r, int g, int b) {
}
void GraphicsWidget::drawWidget() {
- if (sizeof(OverlayColor) == _gfx.bytesPerPixel && _gfx.pixels) {
+ if (sizeof(OverlayColor) == _gfx.format.bytesPerPixel && _gfx.pixels) {
const int x = _x + (_w - _gfx.w) / 2;
const int y = _y + (_h - _gfx.h) / 2;
diff --git a/gui/widget.h b/gui/widget.h
index 1bb9823fdf..9acccd9684 100644
--- a/gui/widget.h
+++ b/gui/widget.h
@@ -26,17 +26,16 @@
#define GUI_WIDGET_H
#include "common/scummsys.h"
+#include "common/array.h"
#include "common/str.h"
-#include "common/str-array.h"
#include "common/keyboard.h"
+#include "graphics/font.h"
#include "graphics/surface.h"
#include "gui/object.h"
#include "gui/ThemeEngine.h"
namespace GUI {
-class Dialog;
-
enum {
WIDGET_ENABLED = 1 << 0,
WIDGET_INVISIBLE = 1 << 1,
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 7d6e0fae01..2ee3575bc6 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -22,9 +22,11 @@
* $Id$
*/
-#include "common/events.h"
+#include "common/rect.h"
+#include "common/system.h"
#include "gui/widgets/editable.h"
#include "gui/gui-manager.h"
+#include "graphics/font.h"
namespace GUI {
diff --git a/gui/widgets/editable.h b/gui/widgets/editable.h
index b394e105d1..e0b6375919 100644
--- a/gui/widgets/editable.h
+++ b/gui/widgets/editable.h
@@ -25,9 +25,15 @@
#ifndef GUI_WIDGETS_EDITABLE_H
#define GUI_WIDGETS_EDITABLE_H
+#include "common/keyboard.h"
#include "common/str.h"
-#include "common/rect.h"
#include "gui/widget.h"
+#include "gui/ThemeEngine.h"
+#include "gui/object.h"
+
+namespace Common {
+struct Rect;
+}
namespace GUI {
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index 3ef813283e..106262bafe 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -23,25 +23,26 @@
*/
#include "gui/widgets/edittext.h"
-#include "gui/dialog.h"
#include "gui/gui-manager.h"
#include "gui/ThemeEval.h"
namespace GUI {
-EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip, uint32 cmd)
+ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd)
: EditableWidget(boss, x, y - 1, w, h + 2, tooltip, cmd) {
setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
_type = kEditTextWidget;
+ _finishCmd = finishCmd;
setEditString(text);
}
-EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd)
+EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd)
: EditableWidget(boss, name, tooltip, cmd) {
setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE);
_type = kEditTextWidget;
+ _finishCmd = finishCmd;
setEditString(text);
}
@@ -107,6 +108,8 @@ void EditTextWidget::startEditMode() {
void EditTextWidget::endEditMode() {
releaseFocus();
+
+ sendCommand(_finishCmd, 0);
}
void EditTextWidget::abortEditMode() {
diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h
index a2549882ca..b94e58780c 100644
--- a/gui/widgets/edittext.h
+++ b/gui/widgets/edittext.h
@@ -41,8 +41,8 @@ protected:
int _rightPadding;
public:
- EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0);
- EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0);
+ EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0, uint32 finishCmd = 0);
+ EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0, uint32 finishCmd = 0);
void setEditString(const String &str);
@@ -62,6 +62,8 @@ protected:
void abortEditMode();
Common::Rect getEditRect() const;
+
+ uint32 _finishCmd;
};
} // End of namespace GUI
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 1e13226d61..1f7846c503 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -23,7 +23,6 @@
*/
#include "common/system.h"
-#include "common/events.h"
#include "common/frac.h"
#include "common/tokenizer.h"
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 02cbd940b2..cab556065f 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -23,11 +23,9 @@
*/
#include "common/system.h"
-#include "common/events.h"
#include "gui/dialog.h"
#include "gui/gui-manager.h"
#include "gui/widgets/popup.h"
-#include "engines/engine.h"
#include "gui/ThemeEval.h"
diff --git a/gui/widgets/scrollbar.cpp b/gui/widgets/scrollbar.cpp
index 5e963e04fe..38383c0e55 100644
--- a/gui/widgets/scrollbar.cpp
+++ b/gui/widgets/scrollbar.cpp
@@ -22,11 +22,12 @@
* $Id$
*/
+#include "common/rect.h"
+#include "common/system.h"
+#include "common/timer.h"
#include "gui/widgets/scrollbar.h"
-#include "gui/dialog.h"
#include "gui/gui-manager.h"
-
-#include "common/timer.h"
+#include "gui/ThemeEngine.h"
namespace GUI {
diff --git a/gui/widgets/tab.cpp b/gui/widgets/tab.cpp
index 10baeac901..721fb88cf8 100644
--- a/gui/widgets/tab.cpp
+++ b/gui/widgets/tab.cpp
@@ -24,7 +24,6 @@
#include "common/util.h"
#include "gui/widgets/tab.h"
-#include "gui/dialog.h"
#include "gui/gui-manager.h"
#include "gui/ThemeEval.h"
diff --git a/po/POTFILES b/po/POTFILES
index 8ba37f7bf3..e96f15fb1b 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -56,4 +56,3 @@ backends/platform/wince/CEActionsPocket.cpp
backends/platform/wince/CEActionsSmartphone.cpp
backends/platform/wince/CELauncherDialog.cpp
backends/platform/wince/wince-sdl.cpp
-backends/platform/openpandora/op-graphics.cpp
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 6aea7b3314..e625b9bcc4 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-03-22 21:55+0000\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
@@ -43,7 +43,7 @@ msgid "Go up"
msgstr "Amunt"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -64,11 +64,11 @@ msgstr "Tanca"
msgid "Mouse click"
msgstr "Clic del ratolэ"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Mostra el teclat"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Remapeja les tecles"
@@ -81,7 +81,7 @@ msgid "Map"
msgstr "Mapeja"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -156,7 +156,7 @@ msgstr ""
"Anglшs"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<per defecte>"
@@ -174,11 +174,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Platafor.:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grрfics"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -191,7 +191,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Canviar les opcions de grрfics"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Рudio"
@@ -204,11 +204,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Canviar les opcions d'рudio"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volum"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volum"
@@ -222,7 +222,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Canviar les opcions de volum"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -235,7 +235,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Canviar les opcions de MIDI"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -248,11 +248,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Canviar les opcions de MT-32"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Camins"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Camins"
@@ -266,7 +266,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Camэ joc:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Camэ extra:"
@@ -274,30 +274,30 @@ msgstr "Camэ extra:"
msgid "Specifies path to additional data used the game"
msgstr "Especifica el camэ de dades addicionals utilitzades pel joc"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Camэ extra:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Camэ de partides:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Especifica on es desaran les partides"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Partides:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Cap"
@@ -307,7 +307,7 @@ msgstr "Cap"
msgid "Default"
msgstr "Per defecte"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Seleccioneu el fitxer SoundFont"
@@ -417,17 +417,17 @@ msgstr "Cerca a la llista de jocs"
msgid "Search:"
msgstr "Cerca:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Neteja el valor"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Carrega partida:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -563,83 +563,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Cap"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Mode grрfic:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Mode de pintat:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Modes de dispersiѓ especials suportats per alguns jocs"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Mode pantalla completa"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Correcciѓ de la relaciѓ d'aspecte"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corregeix la relaciѓ d'aspecte per jocs de 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr ""
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr ""
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Disp. preferit:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Especifica el dispositiu de so o l'emulador de tarja de so preferit"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Especifica el dispositiu de so o l'emulador de tarja de so de sortida"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Disp. preferit:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Emulador AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib s'utilitza per la mњsica de molts jocs"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Freq. sortida:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -647,63 +647,63 @@ msgstr ""
"Valors mщs alts especifiquen millor qualitat de so perђ pot ser que la "
"vostra tarja de so no ho suporti"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "Dispositiu GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr ""
"Especifica el dispositiu de so per defecte per a la sortida General MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr ""
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr ""
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "Fitxer SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "Algunes targes de so, Fluidsynth i Timidity suporten SoundFont"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Mode combinat AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Utilitza MIDI i la generaciѓ de so AdLib alhora"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Guany MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Disposit. MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Especifica el dispositiu de so per defecte per a la sortida de Roland MT-32/"
"LAPC1/CM32l/CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 real (desactiva l'emulaciѓ GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -711,197 +711,197 @@ msgstr ""
"Marqueu si voleu utilitzar el vostre dispositiu hardware real de so "
"compatible amb Roland connectat al vostre ordinador"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 real (sense emulaciѓ GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Activa el Mode Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Desactiva la conversiѓ General MIDI pels jocs que tenen banda sonora per a "
"Roland MT-32"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
#, fuzzy
msgid "Don't use Roland MT-32 music"
msgstr "Roland MT-32 real (sense emulaciѓ GM)"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Text i Veus:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Veus"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Subtэtols"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Ambdѓs"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Velocitat de subt.:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Text i Veus:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Veus"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Subt"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Ambdѓs"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Mostra els subtэtols i reprodueix la veu"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Veloc. de subt.:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Volum de mњsica:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Volum de mњsica:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Silenciar tot"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Volum d'efectes:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Volum dels sons d'efectes especials"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Volum d'efectes:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Volum de veus:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Volum de veus:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Camэ dels temes:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Camэ temes:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Especifica el camэ de les dades addicionals utilitzades per tots els jocs o "
"pel ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Camэ dels connectors:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Camэ de connectors:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Misc"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Misc"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Pintat GUI:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Desat automрtic:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Auto-desat:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Tecles"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Idioma GUI:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Idioma de la interfэcie d'usuari de ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Heu de reiniciar ScummVM perquш tots els canvis tingui efecte."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Seleccioneu el directori de les partides desades"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"No es pot escriure al directori seleccionat. Si us plau, escolliu-ne un "
"altre."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Seleccioneu el directori dels temes"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Seleccioneu el directori dels fitxers extra"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Seleccioneu el directori dels connectors"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -974,88 +974,107 @@ msgstr "Pintat amb antialias (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Amb antialias (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "El motor no suporta el nivell de depuraciѓ '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menњ"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Salta"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Salta la lэnia"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Error al executar el joc:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "No s'ha pogut trobar cap motor capaч d'executar el joc seleccionat"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Camэ incorrecte"
+#: common/error.cpp:42
+msgid "No error"
+msgstr ""
#: common/error.cpp:44
-msgid "Game Data not found"
+#, fuzzy
+msgid "Game data not found"
msgstr "No s'han trobat les dades del joc"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+#, fuzzy
+msgid "Game id not supported"
msgstr "Identificador de joc no suportat"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+#, fuzzy
+msgid "Unsupported color mode"
msgstr "Mode de color no suportat"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "S'ha denegat el permэs de lectura"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "S'ha denegat el permэs d'escriptura"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+#, fuzzy
+msgid "Path does not exist"
msgstr "El camэ no existeix"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "El camэ no щs un directori"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "El camэ no щs un fitxer"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "No s'ha pogut crear el fitxer"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+#, fuzzy
+msgid "Reading data failed"
msgstr "Ha fallat la lectura"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Ha fallat l'escriptura de dades"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr ""
+
+#: common/error.cpp:72
+#, fuzzy
+msgid "Engine plugin does not support save states"
+msgstr "El motor no suporta el nivell de depuraciѓ '%s'"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr ""
+
+#: common/error.cpp:79
+#, fuzzy
+msgid "Unknown error"
msgstr "Error desconegut"
#: common/util.cpp:276
@@ -1124,13 +1143,13 @@ msgstr "Desa la partida:"
msgid "Save"
msgstr "Desa"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~D~'acord"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~C~ancelЗla"
@@ -1689,7 +1708,7 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1700,7 +1719,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1711,7 +1730,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1722,15 +1741,22 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "Mode ~Z~ip activat"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "~T~ransicions activades"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~E~fecte de l'aigua activat"
@@ -1750,7 +1776,7 @@ msgstr "Emulador OPL de MAME"
msgid "DOSBox OPL emulator"
msgstr "Emulador OPL DOSBox"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Sense mњsica"
@@ -1770,11 +1796,11 @@ msgstr "Emulador d'Apple II GS (NO IMPLEMENTAT)"
msgid "C64 Audio Emulator"
msgstr "Emulador d'рudio C64"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Iniciant l'Emulador de MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -1806,7 +1832,7 @@ msgstr " (Global)"
msgid " (Game)"
msgstr " (Joc)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "MIDI de Windows"
@@ -2226,3 +2252,5 @@ msgid ""
"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
msgstr ""
+#~ msgid "Invalid Path"
+#~ msgstr "Camэ incorrecte"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index fbd39ce0d7..69592b2c9b 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -1,5 +1,5 @@
# Czech translation for ScummVM.
-# Copyright (C) YEAR ScummVM Team
+# Copyright (C) 2001-2011 ScummVM Team
# This file is distributed under the same license as the ScummVM package.
# Zbynьk Schwarz <zbynek.schwarz@gmail.com>, 2011.
#
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-03-22 21:55+0000\n"
-"PO-Revision-Date: 2011-02-06 21:53+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
+"PO-Revision-Date: 2011-04-23 10:55+0100\n"
"Last-Translator: Zbynьk Schwarz <zbynek.schwarz@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -47,7 +47,7 @@ msgid "Go up"
msgstr "Jэt nahoru"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -68,11 +68,11 @@ msgstr "Zavјэt"
msgid "Mouse click"
msgstr "Kliknutэ myЙэ"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Zobrazit klсvesnici"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Pјemapovat klсvesy"
@@ -85,7 +85,7 @@ msgid "Map"
msgstr "Mapovat"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -98,7 +98,7 @@ msgstr "Zvolte шinnost a kliknьte 'Mapovat'"
#: gui/KeysDialog.cpp:83 gui/KeysDialog.cpp:105 gui/KeysDialog.cpp:144
#, c-format
msgid "Associated key : %s"
-msgstr "Pјэјazenс klсvesa: %s"
+msgstr "Pјiјazenс klсvesa: %s"
#: gui/KeysDialog.cpp:85 gui/KeysDialog.cpp:107 gui/KeysDialog.cpp:146
#, c-format
@@ -126,7 +126,7 @@ msgid ""
"Short game identifier used for referring to savegames and running the game "
"from the command line"
msgstr ""
-"Krсtky identifikсtor her, pouОэvan§ jako odkaz k uloОen§m hrсm a spuЙtьnэ "
+"Krсtk§ identifikсtor her, pouОэvan§ jako odkaz k uloОen§m hrсm a spuЙtьnэ "
"hry z pјэkazovщho јсdku"
#: gui/launcher.cpp:178
@@ -158,7 +158,7 @@ msgid ""
msgstr "Jazyk hry. Toto z VaЙэ Љpanьlskщ verze neudьlс Anglickou"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<v§chozэ>"
@@ -176,11 +176,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Platforma:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Obraz"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -193,7 +193,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Potlaшit globсlnэ nastavenэ obrazu"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Zvuk"
@@ -206,11 +206,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Potlaшit globсlnэ nastavenэ zvuku"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Hlasitost"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Hlasitost"
@@ -224,7 +224,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Potlaшit globсlnэ nastavenэ hlasitosti"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -237,7 +237,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Potlaшit globсlnэ nastavenэ MIDI"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -250,11 +250,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Potlaшit globсlnэ nastavenэ MT-32"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Cesty"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Cesty"
@@ -268,38 +268,38 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Cesta Hry:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Dodateшnс Cesta:"
#: gui/launcher.cpp:302 gui/launcher.cpp:304 gui/launcher.cpp:305
msgid "Specifies path to additional data used the game"
-msgstr "Stanovэ cestu pro dodateшnс data pouОэtс ve hјe"
+msgstr "Stanovэ cestu pro dodateшnс data pouОitс ve hјe"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Dodateшnс Cesta:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Cesta pro uloОenэ:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Stanovuje, kam jsou umэstьny VaЙe uloОenщ hry"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Cesta pro uloОenэ:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Ўсdnщ"
@@ -309,7 +309,7 @@ msgstr "Ўсdnщ"
msgid "Default"
msgstr "V§chozэ"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Vybrat SoundFont"
@@ -339,7 +339,7 @@ msgstr "Ukonшit ScummVM"
#: gui/launcher.cpp:563
msgid "A~b~out..."
-msgstr "~O~..."
+msgstr "~O~ Programu..."
#: gui/launcher.cpp:563
msgid "About ScummVM"
@@ -391,7 +391,7 @@ msgstr "~O~dstranit Hru"
#: gui/launcher.cpp:578 gui/launcher.cpp:585
msgid "Remove game from the list. The game data files stay intact"
-msgstr "Odstranit hru ze snamu. Hernэ data zљstanou zachovсna"
+msgstr "Odstranit hru ze seznamu. Hernэ data zљstanou zachovсna"
#: gui/launcher.cpp:581
msgctxt "lowres"
@@ -416,17 +416,17 @@ msgstr "Hledat v seznamu her"
msgid "Search:"
msgstr "Hledat:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Vyшistit hodnotu"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Nahrсt hru:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -561,83 +561,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Ўсdnщ"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "ReОim obrazu:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
-msgstr "ReОim vykreslovсnэ:"
+msgstr "ReОim vykreslenэ:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
-msgstr "Speciсlnэ reОimi chvьnэ podporovanщ nьkter§mi hrami"
+msgstr "Speciсlnэ reОimy chvьnэ podporovanщ nьkter§mi hrami"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "ReОim celщ obrazovky"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Korekce pomьru stran"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korigovat pomьr stran pro hry 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "Nerozklсdсnэ EGA"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "Povolit nerozklсdсnэ v EGA hrсch, kterщ to podporujэ"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Prioritnэ Zaјэzenэ:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Hudebnэ zaјэzenэ"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Stanovэ prioritnэ zvukovщ zaјэzenэ nebo emulсtor zvukovщ karty"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Stanovэ v§stupnэ zvukovщ zaјэzenэ nebo emulсtor zvukovщ karty"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Prioritnэ Zaј.:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Hudebnэ zaјэzenэ"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "AdLib emulсtor"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib se pouОэvс pro hudbu v mnoha hrсch"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "V§stup. frekvence:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -645,253 +645,253 @@ msgstr ""
"VyЙЙэ hodnota zpљsobэ lepЙэ kvalitu zvuku, ale nemusэ b§t podporovсna VaЙi "
"zvukovou kartou"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "GM Zaјэzenэ:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Stanovэ v§chozэ zvukovщ zaјэzenэ pro v§stup General MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "NepouОэvat hudbu General MIDI"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "PouОэt prvnэ dostupnщ zaјэzenэ"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont je podporovсn nьkter§mi zvukov§mi kartami, Fluidsynth a Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "SmэЙen§ reОim AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "PouОэt obь zvukovщ generace MIDI a AdLib"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Zesэlenэ MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Zaјэzenэ MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Stanovэ v§chozэ zvukovщ v§stupnэ zaјэzenэ pro Roland MT-32/LAPC1/CM32l/CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Opravdov§ Roland MT-32 (vypne GM emulaci)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
msgstr ""
-"ZaЙkrtnьte, pokud chcete pouОэt pravщ hardwareovщ zaјэzenэ kompatibilnэ s "
+"ZaЙkrtnьte, pokud chcete pouОэt pravщ hardwarovщ zaјэzenэ kompatibilnэ s "
"Roland, pјipojenщ k VaЙemu poшэtaшi"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Opravdov§ Roland MT-32 (Осdnс GM emulace)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Zapnout reОim Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Vypne mapovсnэ General MIDI pro hry s Roland MT-32 zvukov§m doprovodem"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "NepouОэvat hudbu Roland MT-32"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Text a иeш"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "иeш"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Titulky"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Rychlost titulkљ:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Text a иeш:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "иeш"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Titl"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Zobrazit titulky a pјehrсvat јeш"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Rychlost titulkљ"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Hlasitost hudby"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Hlasitost hudby"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Ztlumit VЙe"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Hlasitost zvukљ"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Hlasitost speciсlnэch zvukov§ch efektљ"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Hlasitost zvukљ"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Hlasitost јeшi"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Hlasitost јeшi"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Cesta ke Vzhledu:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Cesta ke Vzhledu:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Stanovэ cestu k dodateшn§m datљm pouОэvanс vЙemi hrami nebo ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Cesta k Pluginљm:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Cesta k Pluginљm:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Rљznщ"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Rљznщ"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Vzhled:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "GUI Vykreslovaш:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autouklсdсnэ:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autouklсdсnэ:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Klсvesy"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Jazyk GUI"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Jazyk GUI ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Pro pouОitэ tьchto nastavenэ musэte restartovat ScummVM"
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Vybrat adresсј pro uloОenщ hry"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
-msgstr "Do zvolenщho adresсјe nelze zapisovat. vyberte, prosэm, jin§."
+msgstr "Do zvolenщho adresсјe nelze zapisovat. Vyberte, prosэm, jin§."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Vyberte adresсј pro vhledy GUI"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Vyberte adresсј pro dodateшnщ soubory"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Vyberte adresсј pro zсsuvnщ moduly"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -954,99 +954,111 @@ msgstr "Standardnэ Vykreslovaш (16bpp)"
#: gui/ThemeEngine.cpp:333
msgid "Standard (16bpp)"
-msgstr "Standarnэ"
+msgstr "Standardnэ (16bpp)"
#: gui/ThemeEngine.cpp:335
msgid "Antialiased Renderer (16bpp)"
-msgstr "Vykreslovaш s vyhlazen§mi hranami(16bpp)"
+msgstr "Vykreslovaш s vyhlazen§mi hranami (16bpp)"
#: gui/ThemeEngine.cpp:335
msgid "Antialiased (16bpp)"
msgstr "S vyhlazen§mi hranami (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Jсdro nepodporuje њroveђ ladьnэ '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Pјeskoшit"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pauza"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Pјeskoшit јсdek"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Chyba pјi spuЙtьnэ hry:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Nelze nalщzt Осdnщ jсdro schopnщ vybranou hru spustit"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Neplatnс Cesta"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Ўсdnс chyba"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Data hry nenalezena"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "Id hry nenэ podporovсno"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Nepodporovan§ barevn§ reОim"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Oprсvnьnэ ke шtenэ zamэtnuto"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Oprсvnьnэ k zсpisu zamэtnuto"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Cesta neexistuje"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Cesta nenэ adresсј"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Cesta nenэ soubor"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Nelze vytvoјit soubor"
-#: common/error.cpp:57
-msgid "Reading failed"
-msgstr "Шtenэ selhalo"
+#: common/error.cpp:65
+msgid "Reading data failed"
+msgstr "Шtenэ dat selhalo"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Zсpis dat selhal"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
-msgstr "Neznсmс Chyba"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Nelze nalщzt vhodn§ zсs. modul jсdra"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "Zсs. modul jсdra nepodporuje uloОenщ stavy"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Argument pјэkazovщ јсdky nebyl zpracovсn"
+
+#: common/error.cpp:79
+msgid "Unknown error"
+msgstr "Neznсmс chyba"
#: common/util.cpp:276
msgid "Hercules Green"
@@ -1114,13 +1126,13 @@ msgstr "UloОit hru:"
msgid "Save"
msgstr "UloОit"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~Z~ruЙit"
@@ -1216,7 +1228,7 @@ msgstr "Zv§Йit / SnэОit rychlost textu"
#: engines/scumm/help.cpp:92
msgid "Simulate left mouse button"
-msgstr "Napodobit levщ tlaшitko myЙi"
+msgstr "Napodobit levщ tlaшэtko myЙi"
#: engines/scumm/help.cpp:93
msgid "Tab"
@@ -1224,7 +1236,7 @@ msgstr "Tab"
#: engines/scumm/help.cpp:93
msgid "Simulate right mouse button"
-msgstr "Napodobit pravщ tlaшitko myЙi"
+msgstr "Napodobit pravщ tlaшэtko myЙi"
#: engines/scumm/help.cpp:96
msgid "Special keyboard commands:"
@@ -1552,7 +1564,7 @@ msgstr "PoloОka vpravo dole"
#: engines/scumm/help.cpp:270
msgid "Middle left item"
-msgstr "PloОka vlevo uprostјed"
+msgstr "PoloОka vlevo uprostјed"
#: engines/scumm/help.cpp:273
msgid "Middle right item"
@@ -1659,7 +1671,7 @@ msgstr "Letьt doprava"
msgid "Fly to lower right"
msgstr "Letьt doprava dolљ"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1670,18 +1682,18 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
"\n"
"%s"
msgstr ""
-"Nahrсni stavu hry selhalo ze souboru:\n"
+"Nahrсnэ stavu hry selhalo ze souboru:\n"
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1692,15 +1704,25 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Normсlnь by teя Maniac Mansion byl spuЙtьn. Ale ScummVM toto zatэm nedьlс. "
+"Abyste toto mohli hrсt, pјejdьte do 'Pјidat Hru' v poшсteшnэm menu ScummVM a "
+"vyberte adresсј 'Maniac' uvnitј hernэho adresсјe Tentacle."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~R~eОim SviЙtьnэ Aktivovсn"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "~P~јechody zapnuty"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~E~fekt Vody Zapnut"
@@ -1720,7 +1742,7 @@ msgstr "MAME OPL Emulсtor"
msgid "DOSBox OPL emulator"
msgstr "DOSBox OPL Emulсtor"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Bez hudby"
@@ -1740,11 +1762,11 @@ msgstr "Apple II GS Emulсtor (NENЭ ZAVEDEN)"
msgid "C64 Audio Emulator"
msgstr "Emulсtor zvuku C64"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "SpouЙtэm MT-32 Emulсtor"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "MT-32 Emulсtor"
@@ -1776,7 +1798,7 @@ msgstr "(Globсlnэ)"
msgid " (Game)"
msgstr "(Hra)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -1862,12 +1884,12 @@ msgstr "Touchpad reОim vypnut"
#: backends/graphics/sdl/sdl-graphics.cpp:47
msgid "Normal (no scaling)"
-msgstr "Normсlnэ (bez zmьny veliosti)"
+msgstr "Normсlnэ (bez zmьny velikosti)"
#: backends/graphics/sdl/sdl-graphics.cpp:66
msgctxt "lowres"
msgid "Normal (no scaling)"
-msgstr "Normсlnэ (bez zmьny veliosti)"
+msgstr "Normсlnэ (bez zmьny velikosti)"
#: backends/graphics/opengl/opengl-graphics.cpp:133
msgid "OpenGL Normal"
@@ -1973,7 +1995,7 @@ msgstr "Horizontсlnэ zmenЙenэ"
#: backends/platform/wii/options.cpp:66
msgid "Vertical underscan:"
-msgstr "Vetikсlnэ zmenЙenэ"
+msgstr "Vertikсlnэ zmenЙenэ"
#: backends/platform/wii/options.cpp:71
msgid "Input"
@@ -2174,7 +2196,7 @@ msgstr "Mapovat шinnost pravщ kliknutэ"
#: backends/platform/wince/wince-sdl.cpp:490
msgid "You must map a key to the 'Right Click' action to play this game"
msgstr ""
-"Musэte namapovat klсvesu pro шinnost 'Pravщ Kliknutэ', abyste tuto hru mohi "
+"Musэte namapovat klсvesu pro шinnost 'Pravщ Kliknutэ', abyste tuto hru mohli "
"hrсt"
#: backends/platform/wince/wince-sdl.cpp:499
@@ -2202,3 +2224,5 @@ msgstr ""
"Nezapomeђte namapovat klсvesu k шinnosti 'Skr§t Panel Nсstrojљ, abyste "
"vidьli cel§ inventсј"
+#~ msgid "Invalid Path"
+#~ msgstr "Neplatnс Cesta"
diff --git a/po/da_DA.po b/po/da_DA.po
index af898b0cd1..8e77f376ac 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-03-22 21:55+0000\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
@@ -43,7 +43,7 @@ msgid "Go up"
msgstr "Gх op"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -64,11 +64,11 @@ msgstr "Luk"
msgid "Mouse click"
msgstr "Muse klik"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Vis tastatur"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Kortlцg taster"
@@ -81,7 +81,7 @@ msgid "Map"
msgstr "Kortlцg"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -156,7 +156,7 @@ msgstr ""
"engelsk"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<standard>"
@@ -174,11 +174,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Platform:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafik"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -191,7 +191,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Overstyr globale grafik indstillinger"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Lyd"
@@ -204,11 +204,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Overstyr globale lyd indstillinger"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Lydstyrke"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Lydstyrke"
@@ -222,7 +222,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Overstyr globale lydstyrke indstillinger"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -235,7 +235,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Overstyr globale MIDI indstillinger"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -248,11 +248,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Overstyr globale MT-32 indstillinger"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Stier"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Stier"
@@ -266,7 +266,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spil sti:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Ekstra sti:"
@@ -274,30 +274,30 @@ msgstr "Ekstra sti:"
msgid "Specifies path to additional data used the game"
msgstr "Angiver sti til ekstra data der bruges i spillet"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Ekstra sti:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Gemme sti:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Angiver hvor dine gemmer bliver lagt"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Gemme sti:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Ingen"
@@ -307,7 +307,7 @@ msgstr "Ingen"
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Vцlg SoundFont"
@@ -414,17 +414,17 @@ msgstr "Sјg i spil liste"
msgid "Search:"
msgstr "Sјg:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Slet vцrdi"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Indlцs spil:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -560,83 +560,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Grafik tilstand:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Rendere tilstand:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Speciel farvereduceringstilstand understјttet a nogle spil"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Fuldskцrms tilstand"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Billedformat korrektion"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korrekt billedformat til 320x200 spil"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "EGA farveforјgelse"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "Aktiver farveforјgelse i EGA spil der understјtter det"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Foretruk. enhed:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Musik enhed:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Angiver foretukket lyd enhed eller lydkort emulator"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Angiver lyd udgangsenhed eller lydkorts emulator"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Foretruk. enh.:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musik enhed:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "AdLib emulator:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib bliver brugt til musik i mange spil"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Udgangsfrekvens:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -644,60 +644,60 @@ msgstr ""
"Hјjere vцrdi angiver bedre lyd kvalitet, men understјttes mхske ikke af dit "
"lydkort"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "GM enhed:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Angiver standard lyd enhed for General MIDI udgang"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Brug ikke General MIDI musik"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Brug fјrste tilgцngelig enhed"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont er understјttet af nogle lydkort, Fluidsynth og Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Blandet AdLib/MIDI tilstand"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Brug bхde MIDI og AdLib lyd generering"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "MIDI lydstyrke:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "MT-32 enhed:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr "Angiver standard lyd enhed for Roland MT-32/LAPC1/CM32I/CM64 udgang"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Цgte Roland MT-32 (undlad GM emulering)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -705,190 +705,190 @@ msgstr ""
"Kontroller om du vil bruge din rigtige hardware Roland-kompatible lyd enhed "
"tilsluttet til din computer"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Цgte Roland MT-32 (ingen GM emulering)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Aktivщr Roland GS tilstand"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Sluk for General MIDI kortlцgning for spil med Roland MT-32 lydspor"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Brug ikke Roland MT-32 musik"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Tekst og tale:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Tale"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Undertekster"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Tekst hastighed:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst og tale:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Tale"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Tekst"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Vis undertekster og afspil tale"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Tekst hastighed:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Musik lydstyrke:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musik lydstyrke:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Mute alle"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "SFX lydstyrke:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Lydstyrke for specielle lydeffekter"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "SFX lydstyrke:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Tale lydstyrke:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Tale lydstyrke:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Tema sti:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Tema sti:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Angiver sti til ekstra data brugt af alle spil eller ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Plugin sti:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugin sti:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Andet"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Andet"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "GUI renderer:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Auto gemme:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Auto gemme:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Taster"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Sprog:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Sprog for brugerfladen i ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Du skal genstarte ScummVM for at цndringer vises."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Vцlg bibliotek til gemmer"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Der kan ikke skrives til det valgte bibliotek. Vцlg venligst et andet."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Vцlg bibliotek for GUI temaer"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Vцlg bibliotek for ekstra filer"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Vцlg bibliotek for plugins"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -961,88 +961,107 @@ msgstr "Antialias renderer (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Antialias (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motor understјtter ikke fejlfindingsniveau '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Spring over"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Spring linje over"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Fejl ved kјrsel af spil:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikke finde nogen motor istand til at afvikle det valgte spil"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Ugyldig sti"
+#: common/error.cpp:42
+msgid "No error"
+msgstr ""
#: common/error.cpp:44
-msgid "Game Data not found"
+#, fuzzy
+msgid "Game data not found"
msgstr "Spil data ikke fundet"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+#, fuzzy
+msgid "Game id not supported"
msgstr "Spil id ikke understјttet"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+#, fuzzy
+msgid "Unsupported color mode"
msgstr "Ikke understјttet farve tilstand"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Lцse rettighed nцgtet"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Skrive rettighed nцgtet"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+#, fuzzy
+msgid "Path does not exist"
msgstr "Sti eksistere ikke"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Sti ikke et bibliotek"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Sti ikke en fil"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Kan ikke oprette fil"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+#, fuzzy
+msgid "Reading data failed"
msgstr "Lцsning fejlet"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Skrivning af data fejlet"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr ""
+
+#: common/error.cpp:72
+#, fuzzy
+msgid "Engine plugin does not support save states"
+msgstr "Motor understјtter ikke fejlfindingsniveau '%s'"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr ""
+
+#: common/error.cpp:79
+#, fuzzy
+msgid "Unknown error"
msgstr "Ukendt fejl"
#: common/util.cpp:276
@@ -1111,13 +1130,13 @@ msgstr "Gemmer:"
msgid "Save"
msgstr "Gem"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~F~ortryd"
@@ -1656,7 +1675,7 @@ msgstr "Flyv til hјjre"
msgid "Fly to lower right"
msgstr "Flyv nederst til hјjre"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1667,7 +1686,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1678,7 +1697,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1689,15 +1708,22 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~Z~ip tilstand aktiveret"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "~O~vergange aktiveret"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~V~andeffekter aktiveret"
@@ -1717,7 +1743,7 @@ msgstr "MAME OPL emulator"
msgid "DOSBox OPL emulator"
msgstr "DOSBox OPL emulator"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Ingen musik"
@@ -1737,11 +1763,11 @@ msgstr "Apple II GS emulator (IKKE IMPLEMENTERET)"
msgid "C64 Audio Emulator"
msgstr "C64 lyd emulator"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Initialisere MT-32 emulator"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "MT-32 emulator"
@@ -1773,7 +1799,7 @@ msgstr " (Global)"
msgid " (Game)"
msgstr " (Spil)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2198,3 +2224,5 @@ msgstr ""
"Glem ikke at tildele en tast til 'Skjul vцrktјjslinje' handling for at se "
"hele oversigten"
+#~ msgid "Invalid Path"
+#~ msgstr "Ugyldig sti"
diff --git a/po/de_DE.po b/po/de_DE.po
index 059fa959d1..f5ded40e59 100644..100755
--- 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-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-11-27 22:15+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
+"PO-Revision-Date: 2011-04-24 12:35+0100\n"
"Last-Translator: Simon Sawatzki <SimSaw@gmx.de>\n"
"Language-Team: Lothar Serra Mari <Lothar@Windowsbase.de> & Simon Sawatzki "
"<SimSaw@gmx.de>\n"
@@ -45,7 +45,7 @@ msgid "Go up"
msgstr "Pfad hoch"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -66,11 +66,11 @@ msgstr "Schlieпen"
msgid "Mouse click"
msgstr "Mausklick"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Tastatur anzeigen"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Tasten neu zuweisen"
@@ -83,7 +83,7 @@ msgid "Map"
msgstr "Zuweisen"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -158,7 +158,7 @@ msgstr ""
"Spiels in eine deutsche verwandeln."
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<Standard>"
@@ -176,11 +176,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Plattform:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafik"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -193,7 +193,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Globale Grafikeinstellungen ќbergehen"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Audio"
@@ -206,11 +206,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Globale Audioeinstellungen ќbergehen"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Lautstфrke"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Lautst."
@@ -224,7 +224,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Globale Lautstфrkeeinstellungen ќbergehen"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -237,7 +237,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Globale MIDI-Einstellungen ќbergehen"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -250,11 +250,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Globale MT-32-Einstellungen ќbergehen"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Pfade"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Pfade"
@@ -268,7 +268,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spielpfad:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Extrapfad:"
@@ -276,30 +276,30 @@ msgstr "Extrapfad:"
msgid "Specifies path to additional data used the game"
msgstr "Legt das Verzeichnis fќr zusфtzliche Spieldateien fest."
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Extrapfad:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Spielstфnde:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Legt fest, wo die Spielstфnde abgelegt werden."
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Speichern:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Keiner"
@@ -309,7 +309,7 @@ msgstr "Keiner"
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "SoundFont auswфhlen"
@@ -418,17 +418,17 @@ msgstr "In Spieleliste suchen"
msgid "Search:"
msgstr "Suchen:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Wert lіschen"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Spiel laden:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -564,85 +564,85 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "-"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Grafikmodus:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Render-Modus:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr ""
"Spezielle Farbmischungsmethoden werden von manchen Spielen unterstќtzt."
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Vollbildmodus"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Seitenverhфltnis korrigieren"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Seitenverhфltnis fќr Spiele mit der Auflіsung 320x200 korrigieren"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
-msgstr ""
+msgstr "Antifehlerdiffusion fќr EGA"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
-msgstr ""
+msgstr "Aktiviert die Aufhebung der Fehlerdiffusion in EGA-Spielen, die dies unterstќtzen."
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Standard-Gerфt:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Musikgerфt:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Legt das bevorzugte Tonwiedergabe-Gerфt oder den Soundkarten-Emulator fest."
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Legt das Musikwiedergabe-Gerфt oder den Soundkarten-Emulator fest."
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Standard-Gerфt:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musikgerфt:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "AdLib-Emulator"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib wird fќr die Musik in vielen Spielen verwendet."
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Ausgabefrequenz:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -650,64 +650,64 @@ msgstr ""
"Hіhere Werte bewirken eine bessere Soundqualitфt, werden aber mіglicherweise "
"nicht von jeder Soundkarte unterstќtzt."
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "GM-Gerфt:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr ""
"Legt das standardmфпige Musikwiedergabe-Gerфt fќr General-MIDI-Ausgabe fest."
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Keine General-MIDI-Musik"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Erstes verfќgbares Gerфt"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont wird von einigen Soundkarten, Fluidsynth und Timidity unterstќtzt."
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "AdLib-/MIDI-Modus"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Benutzt MIDI und AdLib zur Sounderzeugung."
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "MIDI-Lautstфrke:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "MT-32-Gerфt:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Legt das standardmфпige Tonwiedergabe-Gerфt fќr die Ausgabe von Roland MT-32/"
"LAPC1/CM32l/CM64 fest."
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Echte Roland-MT-32-Emulation (GM-Emulation deaktiviert)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -715,196 +715,197 @@ msgstr ""
"Wфhlen Sie dies aus, wenn Sie Ihre echte Hardware, die mit einer Roland-"
"kompatiblen Soundkarte verbunden ist, verwenden mіchten."
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Echte Roland-MT-32-Emulation (kein GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Roland-GS-Modus"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Schaltet die General-MIDI-Zuweisung fќr Spiele mit Roland-MT-32-Audiospur "
"aus."
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Keine Roland-MT-32-Musik"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Sprache und Text:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Sprache"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Untertitel"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Beides"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Untertitel-Tempo:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Sprache + Text:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Spr."
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "TXT"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "S+T"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Untertitel anzeigen und Sprachausgabe aktivieren"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Text-Tempo:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Musiklautstфrke:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musiklautstфrke:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Alles aus"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Effektlautstфrke:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Lautstфrke spezieller Soundeffekte"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Effektlautst.:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Sprachlautstфrke:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Sprachlautst.:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Themenpfad:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Themenpfad:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Legt das Verzeichnis fќr zusфtzliche Spieldateien fќr alle Spiele in ScummVM "
"fest."
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Plugin-Pfad:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugin-Pfad:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Sonstiges"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Andere"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Thema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "GUI-Renderer:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autom. Speichern:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Speich.(auto)"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Tasten"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Sprache:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Sprache der ScummVM-Oberflфche"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Sie mќssen ScummVM neu starten, um die Einstellungen zu ќbernehmen."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Verzeichnis fќr Spielstфnde auswфhlen"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"In das gewфhlte Verzeichnis kann nicht geschrieben werden. Bitte ein anderes "
"auswфhlen."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Verzeichnis fќr Oberflфchen-Themen"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Verzeichnis fќr zusфtzliche Dateien auswфhlen"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Verzeichnis fќr Erweiterungen auswфhlen"
-#: gui/options.cpp:1328
+# Nicht ќbersetzen, da diese Nachricht nur fќr nicht-lateinische Sprachen relevant ist.
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -975,88 +976,100 @@ msgstr "Kantenglфttung (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Kantenglфttung (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Engine unterstќtzt den Debug-Level \"%s\" nicht."
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menќ"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "мberspringen"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Zeile ќberspringen"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Fehler beim Ausfќhren des Spiels:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Konnte keine Spiel-Engine finden, die dieses Spiel starten kann."
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Ungќltiges Verzeichnis"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Kein Fehler"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Spieldaten nicht gefunden"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "Spielkennung nicht unterstќtzt"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Farbmodus nicht unterstќtzt"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Lese-Berechtigung nicht vorhanden"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Schreib-Berechtigung nicht vorhanden"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Verzeichnis existiert nicht."
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Ungќltiges Verzeichnis"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Pfad ist keine Datei."
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Kann Datei nicht erstellen."
-#: common/error.cpp:57
-msgid "Reading failed"
-msgstr "Lesefehler aufgetreten"
+#: common/error.cpp:65
+msgid "Reading data failed"
+msgstr "Daten konnten nicht gelesen werden."
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Daten konnten nicht geschrieben werden."
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Konnte kein passendes Engine-Plugin finden."
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "Engine-Plugin unterstќtzt keine Speicherstфnde."
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Argument in Kommandozeile nicht verarbeitet"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Unbekannter Fehler"
#: common/util.cpp:276
@@ -1125,13 +1138,13 @@ msgstr "Speichern:"
msgid "Save"
msgstr "Speichern"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~A~bbrechen"
@@ -1186,7 +1199,7 @@ msgstr "Spielpause"
#: engines/scumm/help.cpp:102 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Ctrl"
-msgstr ""
+msgstr "Strg"
#: engines/scumm/help.cpp:82
msgid "Load game state 1-10"
@@ -1196,7 +1209,7 @@ msgstr "Spielstand 1-10 laden"
#: engines/scumm/help.cpp:89 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Alt"
-msgstr ""
+msgstr "Alt"
#: engines/scumm/help.cpp:83
msgid "Save game state 1-10"
@@ -1632,7 +1645,7 @@ msgstr "9, 6 und 3 vertauscht."
#: engines/scumm/help.cpp:317
msgid "Biplane controls (numpad):"
-msgstr "Doppeldecker-Steuerung (Ziffernblock):"
+msgstr "Doppeldecker (Ziffernblock):"
#: engines/scumm/help.cpp:318
msgid "Fly to upper left"
@@ -1670,7 +1683,7 @@ msgstr "Nach rechts fliegen"
msgid "Fly to lower right"
msgstr "Nach unten rechts fliegen"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1681,7 +1694,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1692,7 +1705,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1703,15 +1716,22 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 "Normalerweise wќrde jetzt Maniac Mansion starten. ScummVM kann das jedoch noch nicht. Um dieses Spiel zu spielen, klicken Sie auf \"Spiel hinzufќgen\" im Startmenќ von ScummVM und wфhlen das Verzeichnis \"Maniac\" im Verzeichnis dieses Spiels aus."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~Z~ip-Modus aktiviert"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "мber~g~фnge aktiviert"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~W~assereffekt aktiviert"
@@ -1731,7 +1751,7 @@ msgstr "MAME-OPL-Emulator"
msgid "DOSBox OPL emulator"
msgstr "DOSBox-OPL-Emulator"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Keine Musik"
@@ -1751,11 +1771,11 @@ msgstr "Apple-II-GS-Emulator (NICHT INTEGRIERT)"
msgid "C64 Audio Emulator"
msgstr "C64-Audio-Emulator"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "MT-32-Emulator wird gestartet..."
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "MT-32-Emulation"
@@ -1787,7 +1807,7 @@ msgstr " (Global)"
msgid " (Game)"
msgstr " (Spiel)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2213,3 +2233,5 @@ msgstr ""
"Vergessen Sie nicht, der Aktion \"Werkzeugleiste verbergen\" eine Taste "
"zuzuweisen, um das ganze Inventar sehen zu kіnnen."
+#~ msgid "Invalid Path"
+#~ msgstr "Ungќltiges Verzeichnis"
diff --git a/po/es_ES.po b/po/es_ES.po
index 1f9ff77456..837ac60911 100644
--- a/po/es_ES.po
+++ b/po/es_ES.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-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-09-25 17:11+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
+"PO-Revision-Date: 2011-05-08 13:31+0100\n"
"Last-Translator: Tomсs Maidagan\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -23,7 +23,7 @@ msgstr "(compilado el %s)"
#: gui/about.cpp:103
msgid "Features compiled in:"
-msgstr "Caracterэsticas compiladas:"
+msgstr "Caracterэsticas incluidas:"
#: gui/about.cpp:112
msgid "Available engines:"
@@ -43,7 +43,7 @@ msgid "Go up"
msgstr "Arriba"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -64,11 +64,11 @@ msgstr "Cerrar"
msgid "Mouse click"
msgstr "Clic de ratѓn"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Mostrar el teclado"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Asignar teclas"
@@ -81,7 +81,7 @@ msgid "Map"
msgstr "Asignar"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -156,7 +156,7 @@ msgstr ""
"juego"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<por defecto>"
@@ -174,11 +174,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Plat.:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grсficos"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -191,7 +191,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Opciones grсficas especэficas"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Sonido"
@@ -204,11 +204,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Opciones de sonido especэficas"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volumen"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volumen"
@@ -222,7 +222,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Opciones de volumen especэficas"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -235,7 +235,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Opciones de MIDI especэficas"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -248,11 +248,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Opciones de MT-32 especэficas"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Rutas"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Rutas"
@@ -266,7 +266,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Juego:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Adicional:"
@@ -274,30 +274,30 @@ msgstr "Adicional:"
msgid "Specifies path to additional data used the game"
msgstr "Especifica un directorio para datos adicionales del juego"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Adicional:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Partidas:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Especifica dѓnde guardar tus partidas"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Partidas:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Ninguna"
@@ -307,7 +307,7 @@ msgstr "Ninguna"
msgid "Default"
msgstr "Por defecto"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Selecciona un SoundFont"
@@ -414,17 +414,17 @@ msgstr "Buscar en la lista de juegos"
msgid "Search:"
msgstr "Buscar:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Eliminar valor"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Cargar juego:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -560,86 +560,86 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Ninguno"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Modo grсfico:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Renderizado:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Modos especiales de expansiѓn soportados por algunos juegos"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Pantalla completa"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Correcciѓn de aspecto"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corregir relaciѓn de aspecto en juegos 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
-msgstr ""
+msgstr "Difuminado EGA"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
-msgstr ""
+msgstr "Activar difuminado en los juegos EGA compatibles"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Disp. preferido:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Especifica quщ dispositivo de sonido o emulador de tarjeta de sonido "
"prefieres"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr ""
"Especifica el dispositivo de sonido o emulador de tarjeta de sonido de salida"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Disp. preferido:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Emul. de AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib se usa para la mњsica en muchos juegos"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Frec. de salida:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -647,64 +647,64 @@ msgstr ""
"Los valores mсs altos ofrecen mayor calidad, pero puede que tu tarjeta de "
"sonido no sea compatible"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "Dispositivo GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Especifica el dispositivo de salida General MIDI por defecto"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
-msgstr ""
+msgstr "No usar mњsica General MIDI"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
-msgstr ""
+msgstr "Utilizar el primer dispositivo disponible"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont estс soportado por algunas tarjetas de sonido, ademсs de "
"Fluidsynth y Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Modo AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Usar tanto MIDI como AdLib en la generaciѓn de sonido"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Ganancia MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Disp. MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Especifica el dispositivo de sonido para la salida Roland MT-32/LAPC1/CM32l/"
"CM64 por defecto"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 autщntica (desactivar emulaciѓn GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -712,196 +712,197 @@ msgstr ""
"Marcar si se quiere usar un dispositivo de sonido real conectado al "
"ordenador y compatible con Roland"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 real (sin emulaciѓn GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Activar modo Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Desactiva la conversiѓn General MIDI en juegos con sonido Roland MT-32"
-#: gui/options.cpp:799
-#, fuzzy
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
-msgstr "Roland MT-32 real (sin emulaciѓn GM)"
+msgstr "No usar mњsica Roland MT-32"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Texto y voces:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Voces"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Subtэtulos"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Vel. de subtэtulos:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Texto y voces:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Voz"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Subt"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "V&S"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Reproducir voces y subtэtulos"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Vel. de subt.:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Mњsica:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Mњsica:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Silenciar"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Efectos:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Volumen de los efectos de sonido"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Efectos:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Voces:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Voces:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Temas:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Temas:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Especifica el directorio adicional usado por los juegos y ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Otras"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Otras"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Interfaz:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autoguardado:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autoguardado:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Teclas"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Idioma:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Idioma de la interfaz de ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Tienes que reiniciar ScummVM para aplicar los cambios."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Selecciona el directorio de guardado"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"No se puede escribir en el directorio elegido. Por favor, selecciona otro."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Selecciona el directorio de temas"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Selecciona el directorio adicional"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Selecciona el directorio de plugins"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
msgstr ""
+"El tema seleccionado no es compatible con el idioma actual. Si quieres usar "
+"este tema debes cambiar a otro idioma primero."
#: gui/saveload.cpp:61 gui/saveload.cpp:242
msgid "No date saved"
@@ -968,88 +969,100 @@ msgstr "Suavizado (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Suavizado (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "El motor no soporta el nivel de debug '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menњ"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Saltar"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pausar"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Saltar frase"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Error al ejecutar el juego:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "No se ha podido encontrar ningњn motor capaz de ejecutar el juego"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Ruta no vсlida"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Ningњn error"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "No se han encontrado datos de juego"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "ID del juego no soportada"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Modo de color no soportado"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Permiso de lectura denegado"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Permiso de escritura denegado"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "La ruta no existe"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "La ruta no es un directorio"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "La ruta no es un archivo"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Imposible crear el archivo"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+msgid "Reading data failed"
msgstr "Fallo de lectura"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Fallo en la escritura de datos"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "No se ha encontrado un plugin adecuado"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "El plugin del motor no es compatible con partidas guardadas"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Argumento no vсlido de la lэnea de comando"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Error desconocido"
#: common/util.cpp:276
@@ -1118,13 +1131,13 @@ msgstr "Guardar partida"
msgid "Save"
msgstr "Guardar"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~S~э"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -1147,35 +1160,31 @@ msgstr "Cerra~r~"
#: engines/scumm/help.cpp:76
msgid "Common keyboard commands:"
-msgstr ""
+msgstr "Comandos bсsicos de teclado:"
#: engines/scumm/help.cpp:77
msgid "Save / Load dialog"
-msgstr ""
+msgstr "Pantalla de Guardar / Cargar"
#: engines/scumm/help.cpp:79
-#, fuzzy
msgid "Skip line of text"
msgstr "Saltar frase"
#: engines/scumm/help.cpp:80
msgid "Esc"
-msgstr ""
+msgstr "Esc"
#: engines/scumm/help.cpp:80
-#, fuzzy
msgid "Skip cutscene"
-msgstr "Saltar frase"
+msgstr "Saltar escena"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Space"
-msgstr "Voz"
+msgstr "Espacio"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Pause game"
-msgstr "Guardar partida"
+msgstr "Pausar el juego"
#: engines/scumm/help.cpp:82 engines/scumm/help.cpp:87
#: engines/scumm/help.cpp:98 engines/scumm/help.cpp:99
@@ -1183,23 +1192,21 @@ msgstr "Guardar partida"
#: engines/scumm/help.cpp:102 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Ctrl"
-msgstr ""
+msgstr "Ctrl"
#: engines/scumm/help.cpp:82
-#, fuzzy
msgid "Load game state 1-10"
-msgstr "Cargar juego:"
+msgstr "Cargar partida 1-10"
#: engines/scumm/help.cpp:83 engines/scumm/help.cpp:87
#: engines/scumm/help.cpp:89 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Alt"
-msgstr ""
+msgstr "Alt"
#: engines/scumm/help.cpp:83
-#, fuzzy
msgid "Save game state 1-10"
-msgstr "Guardar partida"
+msgstr "Guardar partida 1-10"
#: engines/scumm/help.cpp:85 engines/scumm/help.cpp:87
#: backends/platform/symbian/src/SymbianActions.cpp:55
@@ -1210,480 +1217,466 @@ msgstr "Salir"
#: engines/scumm/help.cpp:89 engines/scumm/help.cpp:92
msgid "Enter"
-msgstr ""
+msgstr "Enter"
#: engines/scumm/help.cpp:89
msgid "Toggle fullscreen"
-msgstr ""
+msgstr "Activar pantalla completa"
#: engines/scumm/help.cpp:90
-#, fuzzy
msgid "Music volume up / down"
-msgstr "Mњsica:"
+msgstr "Subir / Bajar el volumen de la mњsica"
#: engines/scumm/help.cpp:91
msgid "Text speed slower / faster"
-msgstr ""
+msgstr "Aumentar / Disminuir la vel. de texto"
#: engines/scumm/help.cpp:92
msgid "Simulate left mouse button"
-msgstr ""
+msgstr "Simular botѓn izquierdo del ratѓn"
#: engines/scumm/help.cpp:93
msgid "Tab"
-msgstr ""
+msgstr "Tab"
#: engines/scumm/help.cpp:93
msgid "Simulate right mouse button"
-msgstr ""
+msgstr "Simular botѓn derecho del ratѓn"
#: engines/scumm/help.cpp:96
msgid "Special keyboard commands:"
-msgstr ""
+msgstr "Comandos especiales de teclado:"
#: engines/scumm/help.cpp:97
-#, fuzzy
msgid "Show / Hide console"
-msgstr "Mostrar/ocultar cursor"
+msgstr "Mostrar / Ocultar consola"
#: engines/scumm/help.cpp:98
msgid "Start the debugger"
-msgstr ""
+msgstr "Iniciar debugger"
#: engines/scumm/help.cpp:99
msgid "Show memory consumption"
-msgstr ""
+msgstr "Mostrar consumo de memoria"
#: engines/scumm/help.cpp:100
msgid "Run in fast mode (*)"
-msgstr ""
+msgstr "Ejecutar en modo rсpido (*)"
#: engines/scumm/help.cpp:101
msgid "Run in really fast mode (*)"
-msgstr ""
+msgstr "Ejecutar en modo muy rсpido (*)"
#: engines/scumm/help.cpp:102
msgid "Toggle mouse capture"
-msgstr ""
+msgstr "Captura de ratѓn"
#: engines/scumm/help.cpp:103
msgid "Switch between graphics filters"
-msgstr ""
+msgstr "Alternar entre filtros grсficos"
#: engines/scumm/help.cpp:104
msgid "Increase / Decrease scale factor"
-msgstr ""
+msgstr "Aumentar / Disminuir factor de escalado"
#: engines/scumm/help.cpp:105
-#, fuzzy
msgid "Toggle aspect-ratio correction"
msgstr "Correcciѓn de aspecto"
#: engines/scumm/help.cpp:110
msgid "* Note that using ctrl-f and"
-msgstr ""
+msgstr "* No se recomienda utilizar"
#: engines/scumm/help.cpp:111
msgid " ctrl-g are not recommended"
-msgstr ""
+msgstr " ctrl-f y ctrl-g, ya que pueden"
#: engines/scumm/help.cpp:112
msgid " since they may cause crashes"
-msgstr ""
+msgstr " provocar cuelgues o un"
#: engines/scumm/help.cpp:113
msgid " or incorrect game behaviour."
-msgstr ""
+msgstr " funcionamiento incorrecto del juego"
#: engines/scumm/help.cpp:117
msgid "Spinning drafts on the keyboard:"
-msgstr ""
+msgstr "Tejer hechizos con el teclado:"
#: engines/scumm/help.cpp:119
-#, fuzzy
msgid "Main game controls:"
-msgstr "Cambiar opciones de juego"
+msgstr "Controles bсsicos:"
#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
#: engines/scumm/help.cpp:164
-#, fuzzy
msgid "Push"
-msgstr "Pausar"
+msgstr "Empujar"
#: engines/scumm/help.cpp:125 engines/scumm/help.cpp:140
#: engines/scumm/help.cpp:165
msgid "Pull"
-msgstr ""
+msgstr "Tirar"
#: engines/scumm/help.cpp:126 engines/scumm/help.cpp:141
#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:199
#: engines/scumm/help.cpp:209
msgid "Give"
-msgstr ""
+msgstr "Dar"
#: engines/scumm/help.cpp:127 engines/scumm/help.cpp:142
#: engines/scumm/help.cpp:167 engines/scumm/help.cpp:192
#: engines/scumm/help.cpp:210
msgid "Open"
-msgstr ""
+msgstr "Abrir"
#: engines/scumm/help.cpp:129
-#, fuzzy
msgid "Go to"
-msgstr "Arriba"
+msgstr "Ir a"
#: engines/scumm/help.cpp:130
msgid "Get"
-msgstr ""
+msgstr "Coger"
#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:155
#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:200
#: engines/scumm/help.cpp:215 engines/scumm/help.cpp:226
#: engines/scumm/help.cpp:251
msgid "Use"
-msgstr ""
+msgstr "Usar"
#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:144
msgid "Read"
-msgstr ""
+msgstr "Leer"
#: engines/scumm/help.cpp:133 engines/scumm/help.cpp:150
msgid "New kid"
-msgstr ""
+msgstr "Cambiar personaje"
#: engines/scumm/help.cpp:134 engines/scumm/help.cpp:156
#: engines/scumm/help.cpp:174
msgid "Turn on"
-msgstr ""
+msgstr "Encender"
#: engines/scumm/help.cpp:135 engines/scumm/help.cpp:157
#: engines/scumm/help.cpp:175
-#, fuzzy
msgid "Turn off"
-msgstr "Sonido activado/desactivado"
+msgstr "Apagar"
#: engines/scumm/help.cpp:145 engines/scumm/help.cpp:170
#: engines/scumm/help.cpp:196
msgid "Walk to"
-msgstr ""
+msgstr "Ir a"
#: engines/scumm/help.cpp:146 engines/scumm/help.cpp:171
#: engines/scumm/help.cpp:197 engines/scumm/help.cpp:212
#: engines/scumm/help.cpp:229
msgid "Pick up"
-msgstr ""
+msgstr "Recoger"
#: engines/scumm/help.cpp:147 engines/scumm/help.cpp:172
msgid "What is"
-msgstr ""
+msgstr "Quщ es"
#: engines/scumm/help.cpp:149
msgid "Unlock"
-msgstr ""
+msgstr "Abrir con llave"
#: engines/scumm/help.cpp:152
msgid "Put on"
-msgstr ""
+msgstr "Ponerse"
#: engines/scumm/help.cpp:153
msgid "Take off"
-msgstr ""
+msgstr "Quitarse"
#: engines/scumm/help.cpp:159
msgid "Fix"
-msgstr ""
+msgstr "Arreglar"
#: engines/scumm/help.cpp:161
-#, fuzzy
msgid "Switch"
-msgstr "Voz"
+msgstr "Cambiar"
#: engines/scumm/help.cpp:169 engines/scumm/help.cpp:230
msgid "Look"
-msgstr ""
+msgstr "Mirar"
#: engines/scumm/help.cpp:176 engines/scumm/help.cpp:225
msgid "Talk"
-msgstr ""
+msgstr "Hablar"
#: engines/scumm/help.cpp:177
-#, fuzzy
msgid "Travel"
-msgstr "Guardar"
+msgstr "Viajar"
#: engines/scumm/help.cpp:178
msgid "To Henry / To Indy"
-msgstr ""
+msgstr "Henry / Indy"
#: engines/scumm/help.cpp:181
msgid "play C minor on distaff"
-msgstr ""
+msgstr "Tocar C menor con el bastѓn"
#: engines/scumm/help.cpp:182
msgid "play D on distaff"
-msgstr ""
+msgstr "Tocar D con el bastѓn"
#: engines/scumm/help.cpp:183
msgid "play E on distaff"
-msgstr ""
+msgstr "Tocar E con el bastѓn"
#: engines/scumm/help.cpp:184
msgid "play F on distaff"
-msgstr ""
+msgstr "Tocar F con el bastѓn"
#: engines/scumm/help.cpp:185
msgid "play G on distaff"
-msgstr ""
+msgstr "Tocar G con el bastѓn"
#: engines/scumm/help.cpp:186
msgid "play A on distaff"
-msgstr ""
+msgstr "Tocar A con el bastѓn"
#: engines/scumm/help.cpp:187
msgid "play B on distaff"
-msgstr ""
+msgstr "Tocar B con el bastѓn"
#: engines/scumm/help.cpp:188
msgid "play C major on distaff"
-msgstr ""
+msgstr "Tocar C mayor con el bastѓn"
#: engines/scumm/help.cpp:194 engines/scumm/help.cpp:216
msgid "puSh"
-msgstr ""
+msgstr "Empujar"
#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:217
msgid "pull (Yank)"
-msgstr ""
+msgstr "Tirar"
#: engines/scumm/help.cpp:198 engines/scumm/help.cpp:214
#: engines/scumm/help.cpp:249
msgid "Talk to"
-msgstr ""
+msgstr "Hablar con"
#: engines/scumm/help.cpp:201 engines/scumm/help.cpp:213
msgid "Look at"
-msgstr ""
+msgstr "Mirar"
#: engines/scumm/help.cpp:202
msgid "turn oN"
-msgstr ""
+msgstr "Encender"
#: engines/scumm/help.cpp:203
msgid "turn oFf"
-msgstr ""
+msgstr "Apagar"
#: engines/scumm/help.cpp:219
-#, fuzzy
msgid "KeyUp"
-msgstr "Teclas"
+msgstr "Arriba"
#: engines/scumm/help.cpp:219
msgid "Highlight prev dialogue"
-msgstr ""
+msgstr "Seleccionar diсlogo anterior"
#: engines/scumm/help.cpp:220
-#, fuzzy
msgid "KeyDown"
msgstr "Abajo"
#: engines/scumm/help.cpp:220
msgid "Highlight next dialogue"
-msgstr ""
+msgstr "Seleccionar diсlogo siguiente"
#: engines/scumm/help.cpp:224
msgid "Walk"
-msgstr ""
+msgstr "Caminar"
#: engines/scumm/help.cpp:227 engines/scumm/help.cpp:236
#: engines/scumm/help.cpp:243 engines/scumm/help.cpp:250
msgid "Inventory"
-msgstr ""
+msgstr "Inventario"
#: engines/scumm/help.cpp:228
msgid "Object"
-msgstr ""
+msgstr "Objeto"
#: engines/scumm/help.cpp:231
msgid "Black and White / Color"
-msgstr ""
+msgstr "Blanco y negro / Color"
#: engines/scumm/help.cpp:234
msgid "Eyes"
-msgstr ""
+msgstr "Ojos"
#: engines/scumm/help.cpp:235
-#, fuzzy
msgid "Tongue"
-msgstr "Zona"
+msgstr "Lengua"
#: engines/scumm/help.cpp:237
msgid "Punch"
-msgstr ""
+msgstr "Puёetazo"
#: engines/scumm/help.cpp:238
msgid "Kick"
-msgstr ""
+msgstr "Patada"
#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:248
msgid "Examine"
-msgstr ""
+msgstr "Examinar"
#: engines/scumm/help.cpp:242
msgid "Regular cursor"
-msgstr ""
+msgstr "Cursor normal"
#: engines/scumm/help.cpp:244
msgid "Comm"
-msgstr ""
+msgstr "Comm"
#: engines/scumm/help.cpp:247
msgid "Save / Load / Options"
-msgstr ""
+msgstr "Guardar / Cargar / Opciones"
#: engines/scumm/help.cpp:256
-#, fuzzy
msgid "Other game controls:"
-msgstr "Cambiar opciones de juego"
+msgstr "Otros controles:"
#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:268
msgid "Inventory:"
-msgstr ""
+msgstr "Inventario:"
#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
msgid "Scroll list up"
-msgstr ""
+msgstr "Subir"
#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:276
msgid "Scroll list down"
-msgstr ""
+msgstr "Bajar"
#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:269
msgid "Upper left item"
-msgstr ""
+msgstr "Objeto superior izquierdo"
#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
msgid "Lower left item"
-msgstr ""
+msgstr "Objeto inferior izquierdo"
#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:272
msgid "Upper right item"
-msgstr ""
+msgstr "Objeto superior derecho"
#: engines/scumm/help.cpp:264 engines/scumm/help.cpp:274
msgid "Lower right item"
-msgstr ""
+msgstr "Objeto inferior derecho"
#: engines/scumm/help.cpp:270
msgid "Middle left item"
-msgstr ""
+msgstr "Objeto izquierdo del medio"
#: engines/scumm/help.cpp:273
msgid "Middle right item"
-msgstr ""
+msgstr "Objeto derecho del medio"
#: engines/scumm/help.cpp:280 engines/scumm/help.cpp:285
-#, fuzzy
msgid "Switching characters:"
-msgstr "Cambiar personaje"
+msgstr "Cambiar personaje:"
#: engines/scumm/help.cpp:282
msgid "Second kid"
-msgstr ""
+msgstr "Segundo chaval"
#: engines/scumm/help.cpp:283
msgid "Third kid"
-msgstr ""
+msgstr "Tercer chaval"
#: engines/scumm/help.cpp:295
msgid "Fighting controls (numpad):"
-msgstr ""
+msgstr "Controles de lucha (tecl. num.)"
#: engines/scumm/help.cpp:296 engines/scumm/help.cpp:297
#: engines/scumm/help.cpp:298
msgid "Step back"
-msgstr ""
+msgstr "Retroceder"
#: engines/scumm/help.cpp:299
msgid "Block high"
-msgstr ""
+msgstr "Bloqueo alto"
#: engines/scumm/help.cpp:300
msgid "Block middle"
-msgstr ""
+msgstr "Bloqueo medio"
#: engines/scumm/help.cpp:301
msgid "Block low"
-msgstr ""
+msgstr "Bloqueo bajo"
#: engines/scumm/help.cpp:302
msgid "Punch high"
-msgstr ""
+msgstr "Puёetazo alto"
#: engines/scumm/help.cpp:303
msgid "Punch middle"
-msgstr ""
+msgstr "Puёetazo medio"
#: engines/scumm/help.cpp:304
msgid "Punch low"
-msgstr ""
+msgstr "Puёetazo bajo"
#: engines/scumm/help.cpp:307
msgid "These are for Indy on left."
-msgstr ""
+msgstr "Vсlidos cuando Indy estс a la izquierda."
#: engines/scumm/help.cpp:308
msgid "When Indy is on the right,"
-msgstr ""
+msgstr "Cuando Indy estс a la derecha,"
#: engines/scumm/help.cpp:309
msgid "7, 4, and 1 are switched with"
-msgstr ""
+msgstr "7, 4 y 1 se cambian por"
#: engines/scumm/help.cpp:310
msgid "9, 6, and 3, respectively."
-msgstr ""
+msgstr "9, 6 y 3, respectivamente."
#: engines/scumm/help.cpp:317
msgid "Biplane controls (numpad):"
-msgstr ""
+msgstr "Controles del biplano (tecl. num.)"
#: engines/scumm/help.cpp:318
msgid "Fly to upper left"
-msgstr ""
+msgstr "Volar arriba y a la izquierda"
#: engines/scumm/help.cpp:319
msgid "Fly to left"
-msgstr ""
+msgstr "Volar a la izquierda"
#: engines/scumm/help.cpp:320
msgid "Fly to lower left"
-msgstr ""
+msgstr "Volar abajo y a la izquierda"
#: engines/scumm/help.cpp:321
msgid "Fly upwards"
-msgstr ""
+msgstr "Volar arriba"
#: engines/scumm/help.cpp:322
msgid "Fly straight"
-msgstr ""
+msgstr "Volar recto"
#: engines/scumm/help.cpp:323
msgid "Fly down"
-msgstr ""
+msgstr "Volar abajo"
#: engines/scumm/help.cpp:324
msgid "Fly to upper right"
-msgstr ""
+msgstr "Volar arriba y a la derecha"
#: engines/scumm/help.cpp:325
msgid "Fly to right"
-msgstr ""
+msgstr "Volar a la derecha"
#: engines/scumm/help.cpp:326
msgid "Fly to lower right"
-msgstr ""
+msgstr "Volar abajo y a la derecha"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1694,7 +1687,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1705,7 +1698,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1716,15 +1709,25 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+msgid ""
+"Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To "
+"play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' "
+"directory inside the Tentacle game directory."
+msgstr ""
+"Maniac Mansion deberэa arrancar en este momento, pero ScummVM aњn no lo "
+"permite. Para jugar, ve a 'Aёadir juego' en el menњ de inicio de ScummVM y "
+"selecciona el directorio 'Maniac', dentro del directorio de DOTT."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "Modo ~Z~ip activado"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "Tra~n~siciones activadas"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "Efecto ag~u~a activado"
@@ -1744,7 +1747,7 @@ msgstr "Emulador OPL de MAME"
msgid "DOSBox OPL emulator"
msgstr "Emulador OPL de DOSBox"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Sin mњsica"
@@ -1764,11 +1767,11 @@ msgstr "Emulador de Apple II GS (NO IMPLEMENTADO)"
msgid "C64 Audio Emulator"
msgstr "Emulador de C64 Audio"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Iniciando emulador de MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Emulador de MT-32"
@@ -1800,7 +1803,7 @@ msgstr "(General)"
msgid " (Game)"
msgstr "(Juego)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -1846,7 +1849,7 @@ msgstr "Sensibilidad"
#: backends/platform/ds/arm9/source/dsoptions.cpp:102
msgid "Initial top screen scale:"
-msgstr "Escalado de la pantalla inicial superior:"
+msgstr "Escalado inicial de la pantalla superior:"
#: backends/platform/ds/arm9/source/dsoptions.cpp:108
msgid "Main screen scaling:"
@@ -1895,15 +1898,15 @@ msgstr "Normal"
#: backends/graphics/opengl/opengl-graphics.cpp:133
msgid "OpenGL Normal"
-msgstr ""
+msgstr "OpenGL Normal"
#: backends/graphics/opengl/opengl-graphics.cpp:134
msgid "OpenGL Conserve"
-msgstr ""
+msgstr "OpenGL Conservar"
#: backends/graphics/opengl/opengl-graphics.cpp:135
msgid "OpenGL Original"
-msgstr ""
+msgstr "OpenGL Original"
#: backends/platform/symbian/src/SymbianActions.cpp:41
#: backends/platform/wince/CEActionsSmartphone.cpp:42
@@ -2126,7 +2129,7 @@ msgstr "Clic derecho"
#: backends/platform/wince/CEActionsPocket.cpp:53
msgid "Show/Hide Cursor"
-msgstr "Mostrar/ocultar cursor"
+msgstr "Mostrar/Ocultar cursor"
#: backends/platform/wince/CEActionsPocket.cpp:54
msgid "Free look"
@@ -2192,32 +2195,38 @@ msgid "Do you want to perform an automatic scan ?"
msgstr "ПQuieres realizar una bњsqueda automсtica?"
#: backends/platform/wince/wince-sdl.cpp:486
-#, fuzzy
msgid "Map right click action"
-msgstr "Clic derecho"
+msgstr "Asignar acciѓn 'Clic derecho'"
#: backends/platform/wince/wince-sdl.cpp:490
msgid "You must map a key to the 'Right Click' action to play this game"
msgstr ""
+"Debes asignar una tecla a la acciѓn 'Clic derecho' para jugar a este juego"
#: backends/platform/wince/wince-sdl.cpp:499
msgid "Map hide toolbar action"
-msgstr ""
+msgstr "Asignar acciѓn 'Ocultar barra de tareas'"
#: backends/platform/wince/wince-sdl.cpp:503
msgid "You must map a key to the 'Hide toolbar' action to play this game"
msgstr ""
+"Debes asignar una tecla a la acciѓn 'Ocultar barra de tareas' para jugar a "
+"este juego"
#: backends/platform/wince/wince-sdl.cpp:512
msgid "Map Zoom Up action (optional)"
-msgstr ""
+msgstr "Asignar acciѓn 'Zoom' (opcional)"
#: backends/platform/wince/wince-sdl.cpp:515
msgid "Map Zoom Down action (optional)"
-msgstr ""
+msgstr "Asignar acciѓn 'Disminuir zoom' (opcional)"
#: backends/platform/wince/wince-sdl.cpp:523
msgid ""
"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
msgstr ""
+"No olvides asignar una tecla a la acciѓn 'Ocultar barra de tareas' para ver "
+"todo el inventario"
+#~ msgid "Invalid Path"
+#~ msgstr "Ruta no vсlida"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 5465c2a629..e73d2c8345 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-11-23 22:43+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
"MIME-Version: 1.0\n"
@@ -44,7 +44,7 @@ msgid "Go up"
msgstr "Remonter"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -65,11 +65,11 @@ msgstr "Fermer"
msgid "Mouse click"
msgstr "Clic de souris"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Afficher le clavier"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Changer l'affectation des touches"
@@ -82,7 +82,7 @@ msgid "Map"
msgstr "Affecter"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -157,7 +157,7 @@ msgstr ""
"espagnole du jeu."
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<defaut>"
@@ -175,11 +175,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Systшme:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Graphique"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -192,7 +192,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Audio"
@@ -205,11 +205,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volume"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volume"
@@ -223,7 +223,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -236,7 +236,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -249,11 +249,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Rщglages spщcifiques р ce jeux"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Chemins"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Chemins"
@@ -267,7 +267,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Chemin du Jeu:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Extra:"
@@ -275,30 +275,30 @@ msgstr "Extra:"
msgid "Specifies path to additional data used the game"
msgstr "Dщfinie un chemin vers des donnщes suplщmentaires utilisщes par le jeu"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Extra:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Sauvegardes:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Dщfinie l'emplacement oљ les fichiers de sauvegarde sont crщщs"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Sauvegardes:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Aucun"
@@ -308,7 +308,7 @@ msgstr "Aucun"
msgid "Default"
msgstr "Dщfaut"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Choisir une banque de sons"
@@ -416,17 +416,17 @@ msgstr "Recherche dans la liste de jeux"
msgid "Search:"
msgstr "Filtre:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Effacer la valeur"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Charger le jeu:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -562,87 +562,85 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Aucune"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Mode graphique:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Mode de rendu:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Mode spщcial de tramage supportщ par certains jeux"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Plein щcran"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Correction du rapport d'aspect"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corrige le rapport d'aspect pour les jeu 320x200"
-#: gui/options.cpp:668
-#, fuzzy
+#: gui/options.cpp:676
msgid "EGA undithering"
-msgstr "Dщsactiver tramage EGA"
+msgstr "Dщtramage EGA"
-#: gui/options.cpp:668
-#, fuzzy
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
-msgstr "Dщsactive le tramage dans les jeux EGA"
+msgstr "Active le dщtramage dans les jeux EGA qui le supporte"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Sortie Prщfщrщ:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Sortie Audio:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Spщcifie le pщriphщrique de sortie audio ou l'щmulateur de carte audio "
"prщfщrщ"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Spщcifie le pщriphщrique de sortie audio ou l'щmulateur de carte audio"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Sortie Prщfщrщ:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Sortie Audio:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Щmulateur AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib est utilisщ pour la musique dans de nombreux jeux"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Frщquence:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -650,64 +648,64 @@ msgstr ""
"Une valeur plus щlevщe donne une meilleure qualitщ audio mais peut ne pas "
"ъtre supportщ par votre carte son"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "Sortie GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Spщcifie le pщriphщrique audio par dщfaut pour la sortie General MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Ne pas utiliser la musique General MIDI"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Utiliser le premier pщriphщrique disponible"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "Banque de sons:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"La banque de sons (SoundFont) est utilisщe par certaines cartes audio, "
"Fluidsynth et Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Mode mixe AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Utiliser р la fois MIDI et AdLib"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Gain MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Sortie MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Spщcifie le pщriphщrique audio par dщfaut pour la sortie Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 exacte (dщsactive l'щmulation GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -715,195 +713,195 @@ msgstr ""
"Vщrifie si vous voulez utiliser un pщriphщrique audio compatible Roland "
"connectщ р l'ordinateur"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 exacte (pas d'щmu GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Activer le mode Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Dщsactiver la conversion des pistes MT-32 en General MIDI"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Ne pas utiliser la musique Roland MT-32"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Dialogue:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Voix"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Sous-titres"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Les deux"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Vitesse des ST:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Dialogue:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Voix"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Subs"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "V&S"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Affiche les sous-titres et joue les dialogues audio"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Vitesse des ST:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Volume Musique:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musique:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Silence"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Volume Bruitage:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Volume des effets spщciaux sonores"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Bruitage:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Volume Dialogues:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Dialogues:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Thшmes:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Thшmes:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Spщcifie un chemin vers des donnщes supplщmentaires utilisщes par tous les "
"jeux ou ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugins:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Divers"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Divers"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Thшme:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Interface:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Sauvegarde auto:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Sauvegarde:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Touches"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Langue:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Langue de l'interface graphique de ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr ""
"Vous devez relancer ScummVM pour que le changement soit pris en compte."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Sщlectionner le rщpertoire pour les sauvegardes"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"Le rщpertoire sщlectionnщ est vщrouillщ en щcriture. Sщlectionnez un autre "
"rщpertoire."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Sщlectionner le rщpertoire des thшmes d'interface"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Sщlectionner le rщpertoire pour les fichiers suplщmentaires"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Sщlectionner le rщpertoire des plugins"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -976,88 +974,100 @@ msgstr "Rendu Anti-crщnelщ (16 bpp)"
msgid "Antialiased (16bpp)"
msgstr "Anti-crщnelщ (16 bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Le niveau de debug '%s' n'est pas supportщ par ce moteur de jeu"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Passer"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Mettre en pause"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Passer la phrase"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Erreur lors de l'щxщcution du jeu:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Impossible de trouver un moteur pour exщcuter le jeu sщlectionnщ"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Chemin Invalide"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Pas d'erreur"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Fichier de donщes introuvable"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "ID de jeu non supportщ"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Mode de couleurs non supportщ"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Vщroulliщ en lecture"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Verrouillщ en щcriture"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Chemin inexistant"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Chemin n'est pas un rщpertoire"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Chemin n'est pas un fichier"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Impossible de crщer le fichier"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+msgid "Reading data failed"
msgstr "Echec de la lecture"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Echec de l'щcriture des donnщes"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Aucun plugin n'a pu ъtre trouvщ pour ce jeu"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "Ce moteur de jeu ne supporte pas les sauvegardes"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Argument de ligne de commande non traitщ"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Erreur inconnue"
#: common/util.cpp:276
@@ -1126,13 +1136,13 @@ msgstr "Sauvegarde:"
msgid "Save"
msgstr "Sauver"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~A~nnuler"
@@ -1187,7 +1197,7 @@ msgstr "Mettre en pause:"
#: engines/scumm/help.cpp:102 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Ctrl"
-msgstr ""
+msgstr "Ctrl"
#: engines/scumm/help.cpp:82
msgid "Load game state 1-10"
@@ -1197,7 +1207,7 @@ msgstr "Charger sauvegarde 1-10:"
#: engines/scumm/help.cpp:89 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Alt"
-msgstr ""
+msgstr "Alt"
#: engines/scumm/help.cpp:83
msgid "Save game state 1-10"
@@ -1296,7 +1306,7 @@ msgstr " un comportement incorrect du jeu"
#: engines/scumm/help.cpp:117
msgid "Spinning drafts on the keyboard:"
-msgstr ""
+msgstr "Filage au clavier:"
#: engines/scumm/help.cpp:119
msgid "Main game controls:"
@@ -1466,18 +1476,16 @@ msgid "turn oFf"
msgstr "Щteindre"
#: engines/scumm/help.cpp:219
-#, fuzzy
msgid "KeyUp"
-msgstr "Touches"
+msgstr "Touche Haut"
#: engines/scumm/help.cpp:219
msgid "Highlight prev dialogue"
msgstr "Sщlectionner le dialogue prщcщdent"
#: engines/scumm/help.cpp:220
-#, fuzzy
msgid "KeyDown"
-msgstr "Bas"
+msgstr "Touche Bas"
#: engines/scumm/help.cpp:220
msgid "Highlight next dialogue"
@@ -1542,35 +1550,35 @@ msgstr "Inventaires:"
#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
msgid "Scroll list up"
-msgstr ""
+msgstr "Faire dщfiler vers le haut"
#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:276
msgid "Scroll list down"
-msgstr ""
+msgstr "Faire dщfiler vers le bas"
#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:269
msgid "Upper left item"
-msgstr ""
+msgstr "Щlщment en haut р gauche"
#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
msgid "Lower left item"
-msgstr ""
+msgstr "Щlщment en bas р gauche"
#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:272
msgid "Upper right item"
-msgstr ""
+msgstr "Щlщment en haut р droite"
#: engines/scumm/help.cpp:264 engines/scumm/help.cpp:274
msgid "Lower right item"
-msgstr ""
+msgstr "Щlщment en bas р droite"
#: engines/scumm/help.cpp:270
msgid "Middle left item"
-msgstr ""
+msgstr "Щlщment au milieu р gauche"
#: engines/scumm/help.cpp:273
msgid "Middle right item"
-msgstr ""
+msgstr "Щlщment au milieu р droite"
#: engines/scumm/help.cpp:280 engines/scumm/help.cpp:285
msgid "Switching characters:"
@@ -1673,7 +1681,7 @@ msgstr "Voler vers la droite"
msgid "Fly to lower right"
msgstr "Voler vers la bas р droite"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1684,7 +1692,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1695,7 +1703,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1706,15 +1714,26 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Normalement, Maniac Mansion devrait dщmarrer maintenant. Cependant ScummVM "
+"ne supporte pas encore cette fonctionalitщ. Pour jouer р Maniac Mansion, "
+"choisissez 'Ajouter...' dans le Lanceur de ScummVM et sщlectionnez le "
+"rщpertoire 'Maniac Mansion' dans le rщpertoire du jeu Day Of The Tentacle."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "Mode ~Z~ip Activщ"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "T~r~ansitions activщ"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~E~ffets de l'Eau Activщs"
@@ -1734,7 +1753,7 @@ msgstr "Щmulateur MAME OPL"
msgid "DOSBox OPL emulator"
msgstr "Щmulateur DOSBox OPL"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Pas de musique"
@@ -1754,11 +1773,11 @@ msgstr "Щmulateur Apple II GS (PAS IMPLЩMENTЩ)"
msgid "C64 Audio Emulator"
msgstr "Щmulateur C64 Audio"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Initialisation de l'Щmulateur MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Щmulateur MT-32"
@@ -1790,7 +1809,7 @@ msgstr "(Global)"
msgid " (Game)"
msgstr "(Jeu)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "MIDI Windows"
@@ -1885,15 +1904,15 @@ msgstr "Normal"
#: backends/graphics/opengl/opengl-graphics.cpp:133
msgid "OpenGL Normal"
-msgstr ""
+msgstr "OpenGL Normal"
#: backends/graphics/opengl/opengl-graphics.cpp:134
msgid "OpenGL Conserve"
-msgstr ""
+msgstr "OpenGL Prщserve"
#: backends/graphics/opengl/opengl-graphics.cpp:135
msgid "OpenGL Original"
-msgstr ""
+msgstr "OpenGL Originel"
#: backends/platform/symbian/src/SymbianActions.cpp:41
#: backends/platform/wince/CEActionsSmartphone.cpp:42
@@ -2216,3 +2235,5 @@ msgstr ""
"Noubliez pas d'affecter une touche р l'action 'Cacher Bar d'Outils' pour "
"pouvoir voir entiшrement l'inventaire"
+#~ msgid "Invalid Path"
+#~ msgstr "Chemin Invalide"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 4969629a45..2a2256b7a1 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-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-12-01 09:23+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
+"PO-Revision-Date: 2011-04-23 15:38+0100\n"
"Last-Translator: Gruby <grubycza@hotmail.com>\n"
"Language-Team: Hungarian\n"
"MIME-Version: 1.0\n"
@@ -47,7 +47,7 @@ msgid "Go up"
msgstr "Feljebb"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -68,11 +68,11 @@ msgstr "Bezсr"
msgid "Mouse click"
msgstr "Egщrkattintсs"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Billentyћzet beсllэtсsok"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Billentyћk сtсllэtсsa"
@@ -85,7 +85,7 @@ msgid "Map"
msgstr "Kiosztсs"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -158,7 +158,7 @@ msgstr ""
"A jсtщk nyelve. Ne сllэtsd сt a pl. Spanyol nyelvћ jсtщkodat Angolra nyelvre"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<alapщrtelmezett>"
@@ -176,11 +176,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Platform:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafika"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -193,7 +193,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Globсlis grafikai beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Audiѓ"
@@ -206,11 +206,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Globсlis audiѓ beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Hangerѕ"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Hangerѕ"
@@ -224,7 +224,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Globсlis hangerѕbeсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -237,7 +237,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Globсlis MIDI beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -250,11 +250,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Globсlis MT-32 beсllэtсsok felќlbэrсlсsa"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Mappсk"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Mappсk"
@@ -268,7 +268,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Jсtщk Mappa:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Extra Mappa:"
@@ -276,30 +276,30 @@ msgstr "Extra Mappa:"
msgid "Specifies path to additional data used the game"
msgstr "Mappa kivсlasztсs a jсtщkok kiegщszэtѕ fсjljaihoz"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Extra Mappa:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Mentщs Mappa:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Jсtщkmentщsek helyщnek meghatсrozсsa"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Mentщs Mappa:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Nincs"
@@ -309,7 +309,7 @@ msgstr "Nincs"
msgid "Default"
msgstr "Alapщrtelmezett"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "SoundFont kivсlasztсs"
@@ -416,17 +416,17 @@ msgstr "Keresщs a jсtщklistсban"
msgid "Search:"
msgstr "Keresщs:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Щrtщk tіrlщse"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Jсtщk betіltщse:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -562,144 +562,144 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Nincs"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Grafikus mѓd:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Kirajzolсs mѓd:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
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:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Teljeskщpernyѕs mѓd:"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Kщpmщretarсny korrekciѓ"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Helyes oldalarсny a 320x200 jсtщkokhoz"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "EGA szinjavэtсs"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "EGA szэnjavэtсs tсmogatott EGA jсtщkokban"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Elsѕdleges eszkіz:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Zene eszkіz:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Elsѕdleges hangeszkіz vagy hang emulсtor beсllэtсsok"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Hangeszkіz vagy hangkсrtya emulсtor beсllэtсsok"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Elsѕdleges eszk.:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Zene eszkіz:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "AdLib emulсtor:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib meghajtѓt sok jсtщk hasznсlja zenщhez"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Kimeneti rсta:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
msgstr ""
"Nagyobb щrtщkek jobb hangminѕsщget adnak, de nem minden hangkсrtya tсmogatja"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "GM Eszkіz:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Alapщrtelmezett hangeszkіz General MIDI kimenethez"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Ne hasznсlj General MIDI zenщt"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Elsѕ elщrhetѕ eszkіz hasznсlata"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"Nщhсny hangkсrya, Fluidsynth щs Timidyti tсmogatja a SoundFont betіltщsщt"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Vegyes AdLib/MIDI mѓd"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "MIDI щs AdLib hanggenerсtorok hasznсlata"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "MIDI erѕsэtщs:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "MT-32 Eszkіz:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr "Roland MT-32/LAPC1/CM32l/CM64 alapщrtelmezett hangeszkіzіk beсllэtсsa"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 Hardver (GM emulсciѓ tiltva)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -707,190 +707,190 @@ msgstr ""
"Jelіld be, ha hardveres Roland-Kompatibilis hangeszkіz van csatlakoztatva a "
"gщpedhez щs hasznсlni akarod"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 Hardver (GM emulсciѓ nincs)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Roland GS Mѓd engedщlyezve"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "General MIDI lekщpezщs Roland MT-32 zenщs jсtщkokhoz kikapcsolva"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Ne hasznсlj Roland MT-32 zenщt"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Szіveg щs beszщd:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Csak beszщd"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Csak felirat"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Mind"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Felirat sebessщg:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Felirat щs beszщd:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Besz"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Text"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Mind"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Hang щs feliratok megjelenэtщse"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Felirat sebessщg:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Zene hangerѕ:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Zene hangerѕ:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "жsszes nщmэtсsa"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "SFX hangerѕ:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Speciсlis hangeffektusok hangereje"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "SFX hangerѕ:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Beszщd hangerѕ:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Beszщd hangerѕ:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Tщma Mappa:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Tщma Mappa:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Minden jщtщk щs ScummVM kiegщszэtѕ fсjljainak mappсja:"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Plugin Mappa:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Plugin Mappa:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Vegyes"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Vegyes"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tщma:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "GUI Renderelѕ:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Automentщs:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Automentщs:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Billentyћk"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "GUI nyelve:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "A ScummVM GUI nyelve"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Indэtsd њjra a ScummVM-et a vсltozсsok щrvщnyesэtщsщhez."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Vсlassz jсtщkmentщs mappсt"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "A kivсlasztott mappсba nem lehet эrni, vсlassz egy mсsikat"
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "GUI tщma mappa kivсlasztсsa"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Mappa vсlasztсs az extra fсjloknak"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Plugin mappa kivсlasztсsa"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -963,88 +963,100 @@ msgstr "Щlsimэtсsos lekщpezѕ (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Щlsimэtott (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "A motor nem tсmogatja a '%s' debug szintet"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menќ"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Tovсbb"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Szќnet"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Sor сtlщpщse"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Hiba a jсtщk futtatсsakor:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Nem talсlhatѓ olyan jсtщkmotor ami a vсlasztott jсtщkot tсmogatja"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Щrvщnytelen mappa"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Nincs hiba"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Jсtщk adat nem talсlhatѓ"
-#: common/error.cpp:45
-msgid "Game Id not supported"
-msgstr "Jсtщk Id nem tсmogatott"
-
#: common/error.cpp:46
-msgid "Unsupported Color Mode"
-msgstr "Nem tсmogatott szэnmѓd"
+msgid "Game id not supported"
+msgstr "Jсtщk id nem tсmogatott"
#: common/error.cpp:48
+msgid "Unsupported color mode"
+msgstr "Nem tсmogatott szэnmѓd"
+
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Olvasсs hozzсfсrщs megtagadva"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Эrсs hozzсfщrщs megtagadva"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Mappa nem lщtezik"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Mappa nem egy kіnyvtсr"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Mappa nem egy fсjl"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Fсjl nem hozhatѓ lщtre"
-#: common/error.cpp:57
-msgid "Reading failed"
-msgstr "Olvasсsi hiba"
+#: common/error.cpp:65
+msgid "Reading data failed"
+msgstr "A Beolvasott adat hibсs"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Kiэrt adat hibсs"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Nem talсlhatѓ alkalmas motor plugin"
+
+#: common/error.cpp:72
+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:75
+msgid "Command line argument not processed"
+msgstr "Parancssori paramщter nem mћkіdik"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Ismeretlen hiba"
#: common/util.cpp:276
@@ -1113,13 +1125,13 @@ msgstr "Jсtщk mentщse:"
msgid "Save"
msgstr "Mentщs"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "Mщgse"
@@ -1658,7 +1670,7 @@ msgstr "Jobbra repќlщs"
msgid "Fly to lower right"
msgstr "Jobbra le repќlщs"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1669,7 +1681,7 @@ msgstr ""
"\n"
"%s fсjlba nem sikerќlt"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1680,7 +1692,7 @@ msgstr ""
"\n"
"%s fсjlbѓl nem sikerќlt"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1691,15 +1703,25 @@ msgstr ""
"\n"
"%s fсjlba elkщszќlt"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Сltalсban a Maniac Mansion indulna itt. De a ScummVM most nem indэtja el. Ha "
+"jсtszani akarsz vele menj a ScummVM fѕmenќben a 'Jсtщk hozzсadсs' ra щs "
+"vсlaszd a 'Maniac' mappсt a 'Tentacle' kіnyvtсrсban."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~Z~ip Mѓd aktivсlva"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "Сtmenetek engedщlyezve"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "Vэzeffektus engedщlyezve"
@@ -1719,7 +1741,7 @@ msgstr "MAME OPL emulсtor"
msgid "DOSBox OPL emulator"
msgstr "DOSBox OPL emulсtor"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Nincs zene"
@@ -1739,11 +1761,11 @@ msgstr "Apple II GS Emulсtor (NEM TСMOGATOTT)"
msgid "C64 Audio Emulator"
msgstr "C64 Audio Emulсtor"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "MT-32 Emulсtor inicializсlсs"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "MT-32 Emulсtor"
@@ -1775,7 +1797,7 @@ msgstr " (Globсlis)"
msgid " (Game)"
msgstr " (Jсtщk)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2197,3 +2219,5 @@ msgstr ""
"Ne felejts billentyћt tсrsэtani az 'Eszkіztсr rejtщs' mћvelethez, hogy lсsd "
"a teljes listсt"
+#~ msgid "Invalid Path"
+#~ msgstr "Щrvщnytelen mappa"
diff --git a/po/it_IT.po b/po/it_IT.po
index c9e1f89901..c8e9b8dc55 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-09-21 19:33+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
"MIME-Version: 1.0\n"
@@ -43,7 +43,7 @@ msgid "Go up"
msgstr "Su"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -64,11 +64,11 @@ msgstr "Chiudi"
msgid "Mouse click"
msgstr "Clic del mouse"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Mostra tastiera"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Riprogramma tasti"
@@ -81,7 +81,7 @@ msgid "Map"
msgstr "Mappa"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -155,7 +155,7 @@ msgstr ""
"Lingua del gioco. Un gioco inglese non potrр risultare tradotto in italiano"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<predefinito>"
@@ -173,11 +173,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Piattaf.:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafica"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "Grafica"
@@ -190,7 +190,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Ignora le impostazioni grafiche globali"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Audio"
@@ -203,11 +203,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Ignora le impostazioni audio globali"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volume"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volume"
@@ -221,7 +221,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Ignora le impostazioni globali di volume"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -234,7 +234,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Ignora le impostazioni MIDI globali"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -247,11 +247,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Ignora le impostazioni MT-32 globali"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Percorsi"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Perc."
@@ -265,7 +265,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Perc. gioco:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Percorso extra:"
@@ -273,30 +273,30 @@ msgstr "Percorso extra:"
msgid "Specifies path to additional data used the game"
msgstr "Specifica il percorso di ulteriori dati usati dal gioco"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Perc. extra:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Salvataggi:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Specifica dove archiviare i salvataggi"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Salvataggi:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Nessuno"
@@ -306,7 +306,7 @@ msgstr "Nessuno"
msgid "Default"
msgstr "Predefinito"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Seleziona SoundFont"
@@ -413,17 +413,17 @@ msgstr "Cerca nella lista dei giochi"
msgid "Search:"
msgstr "Cerca:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Cancella"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Carica gioco:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -562,85 +562,85 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Nessuno"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Modalitр:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Resa grafica:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Modalitр di resa grafica speciali supportate da alcuni giochi"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Modalitр a schermo intero"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Correzione proporzioni"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Corregge le proporzioni dei giochi 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
-msgstr ""
+msgstr "Undithering EGA"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
-msgstr ""
+msgstr "Attiva undithering nei giochi EGA che lo supportano"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Disp. preferito:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Dispositivo audio:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Specifica il dispositivo audio o l'emulatore della scheda audio preferiti"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr ""
"Specifica il dispositivo di output audio o l'emulatore della scheda audio"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Disp. preferito:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Disposit. audio:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Emulatore AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib ш utilizzato per la musica in molti giochi"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Frequenza:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -648,62 +648,62 @@ msgstr ""
"Valori piљ alti restituiscono un suono di maggior qualitр, ma potrebbero non "
"essere supportati dalla tua scheda audio"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "Dispositivo GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Specifica il dispositivo audio predefinito per l'output General MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
-msgstr ""
+msgstr "Non utilizzare la musica General MIDI"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
-msgstr ""
+msgstr "Utilizza il primo dispositivo disponibile"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont ш supportato da alcune schede audio, Fluidsynth e Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Modalitр mista AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Utilizza generazione di suono sia MIDI che AdLib"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Guadagno MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Disposit. MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Specifica il dispositivo audio predefinito per l'output Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 effettivo (disattiva emulazione GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -711,197 +711,198 @@ msgstr ""
"Seleziona se vuoi usare il dispositivo hardware audio compatibile con Roland "
"che ш connesso al tuo computer"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 effettivo (disat.emul.GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Attiva la modalitр Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Disattiva la mappatura General MIDI per i giochi con colonna sonora Roland "
"MT-32"
-#: gui/options.cpp:799
-#, fuzzy
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
-msgstr "Roland MT-32 effettivo (disat.emul.GM)"
+msgstr "Non utilizzare la musica Roland MT-32"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Testo e voci:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Voci"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Sottotitoli"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Entrambi"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Velocitр testo:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Testo e voci:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Voci"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Sub"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Entr."
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Mostra i sottotitoli e attiva le voci"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Velocitр testo:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Volume musica:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Volume musica:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Disattiva audio"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Volume effetti:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Volume degli effetti sonori"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Volume effetti:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Volume voci:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Volume voci:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Percorso tema:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Perc. tema:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Specifica il percorso di ulteriori dati usati dai giochi o da ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Percorso plugin:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Perc. plugin:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Varie"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Varie"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Renderer GUI:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autosalva:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autosalva:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Tasti"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Lingua GUI:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Lingua dell'interfaccia grafica di ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Devi riavviare ScummVM affinchщ le modifiche abbiano effetto."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Seleziona la cartella per i salvataggi"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "La cartella scelta ш in sola lettura. Si prega di sceglierne un'altra."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Seleziona la cartella dei temi dell'interfaccia"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Seleziona la cartella dei file aggiuntivi"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Seleziona la cartella dei plugin"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
msgstr ""
+"Il tema che hai selezionato non supporta la lingua attuale. Se vuoi "
+"utilizzare questo tema devi prima cambiare la lingua."
#: gui/saveload.cpp:61 gui/saveload.cpp:242
msgid "No date saved"
@@ -968,89 +969,101 @@ msgstr "Renderer con antialiasing (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Con antialiasing (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Il motore non supporta il livello di debug '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Salta"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pausa"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Salta battuta"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Errore nell'esecuzione del gioco:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr ""
"Impossibile trovare un motore in grado di eseguire il gioco selezionato"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Percorso non valido"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Nessun errore"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Dati di gioco non trovati"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "ID di gioco non supportato"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Modalitр colore non supportata"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Autorizzazione di lettura negata"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Autorizzazione di scrittura negata"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Il percorso non esiste"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Il percorso non ш una cartella"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Il percorso non ш un file"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Impossibile creare il file"
-#: common/error.cpp:57
-msgid "Reading failed"
-msgstr "Lettura fallita"
+#: common/error.cpp:65
+msgid "Reading data failed"
+msgstr "Lettura dei dati fallita"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Scrittura dati fallita"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Impossibile trovare un plugin idoneo"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "Il plugin del motore non supporta i salvataggi"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Argomento della linea di comando non eseguito"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Errore sconosciuto"
#: common/util.cpp:276
@@ -1119,13 +1132,13 @@ msgstr "Salva gioco:"
msgid "Save"
msgstr "Salva"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~A~nnulla"
@@ -1148,35 +1161,31 @@ msgstr "~C~hiudi"
#: engines/scumm/help.cpp:76
msgid "Common keyboard commands:"
-msgstr ""
+msgstr "Comandi da tastiera comuni:"
#: engines/scumm/help.cpp:77
msgid "Save / Load dialog"
-msgstr ""
+msgstr "Finestra di salvataggio / caricamento"
#: engines/scumm/help.cpp:79
-#, fuzzy
msgid "Skip line of text"
msgstr "Salta battuta"
#: engines/scumm/help.cpp:80
msgid "Esc"
-msgstr ""
+msgstr "Esc"
#: engines/scumm/help.cpp:80
-#, fuzzy
msgid "Skip cutscene"
-msgstr "Salta battuta"
+msgstr "Salta scena di intermezzo"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Space"
-msgstr "Voci"
+msgstr "Spazio"
#: engines/scumm/help.cpp:81
-#, fuzzy
msgid "Pause game"
-msgstr "Salva gioco:"
+msgstr "Metti in pausa"
#: engines/scumm/help.cpp:82 engines/scumm/help.cpp:87
#: engines/scumm/help.cpp:98 engines/scumm/help.cpp:99
@@ -1184,23 +1193,21 @@ msgstr "Salva gioco:"
#: engines/scumm/help.cpp:102 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Ctrl"
-msgstr ""
+msgstr "Ctrl"
#: engines/scumm/help.cpp:82
-#, fuzzy
msgid "Load game state 1-10"
-msgstr "Carica gioco:"
+msgstr "Carica salvataggio 1-10"
#: engines/scumm/help.cpp:83 engines/scumm/help.cpp:87
#: engines/scumm/help.cpp:89 engines/scumm/help.cpp:103
#: engines/scumm/help.cpp:104 engines/scumm/help.cpp:105
msgid "Alt"
-msgstr ""
+msgstr "Alt"
#: engines/scumm/help.cpp:83
-#, fuzzy
msgid "Save game state 1-10"
-msgstr "Salva gioco:"
+msgstr "Salva nella posizione 1-10"
#: engines/scumm/help.cpp:85 engines/scumm/help.cpp:87
#: backends/platform/symbian/src/SymbianActions.cpp:55
@@ -1211,480 +1218,466 @@ msgstr "Esci"
#: engines/scumm/help.cpp:89 engines/scumm/help.cpp:92
msgid "Enter"
-msgstr ""
+msgstr "Invio"
#: engines/scumm/help.cpp:89
msgid "Toggle fullscreen"
-msgstr ""
+msgstr "Attiva / disattiva schermo intero"
#: engines/scumm/help.cpp:90
-#, fuzzy
msgid "Music volume up / down"
-msgstr "Volume musica:"
+msgstr "Volume musica su / giљ"
#: engines/scumm/help.cpp:91
msgid "Text speed slower / faster"
-msgstr ""
+msgstr "Testo piљ veloce / meno veloce"
#: engines/scumm/help.cpp:92
msgid "Simulate left mouse button"
-msgstr ""
+msgstr "Simula clic sinistro del mouse"
#: engines/scumm/help.cpp:93
msgid "Tab"
-msgstr ""
+msgstr "Tab"
#: engines/scumm/help.cpp:93
msgid "Simulate right mouse button"
-msgstr ""
+msgstr "Simula clic destro del mouse"
#: engines/scumm/help.cpp:96
msgid "Special keyboard commands:"
-msgstr ""
+msgstr "Comandi da tastiera speciali:"
#: engines/scumm/help.cpp:97
-#, fuzzy
msgid "Show / Hide console"
-msgstr "Mostra/nascondi cursore"
+msgstr "Mostra/nascondi console"
#: engines/scumm/help.cpp:98
msgid "Start the debugger"
-msgstr ""
+msgstr "Avvia il debugger"
#: engines/scumm/help.cpp:99
msgid "Show memory consumption"
-msgstr ""
+msgstr "Mostra consumo memoria"
#: engines/scumm/help.cpp:100
msgid "Run in fast mode (*)"
-msgstr ""
+msgstr "Esegui in modalitр veloce (*)"
#: engines/scumm/help.cpp:101
msgid "Run in really fast mode (*)"
-msgstr ""
+msgstr "Esegui in modalitр molto veloce (*)"
#: engines/scumm/help.cpp:102
msgid "Toggle mouse capture"
-msgstr ""
+msgstr "Attiva / disattiva ancoraggio del mouse"
#: engines/scumm/help.cpp:103
msgid "Switch between graphics filters"
-msgstr ""
+msgstr "Cambia filtro grafico"
#: engines/scumm/help.cpp:104
msgid "Increase / Decrease scale factor"
-msgstr ""
+msgstr "Aumenta / diminuisci dimensioni"
#: engines/scumm/help.cpp:105
-#, fuzzy
msgid "Toggle aspect-ratio correction"
-msgstr "Correzione proporzioni"
+msgstr "Cambia correzione proporzioni"
#: engines/scumm/help.cpp:110
msgid "* Note that using ctrl-f and"
-msgstr ""
+msgstr "* Nota che l'utilizzo di ctrl-f e"
#: engines/scumm/help.cpp:111
msgid " ctrl-g are not recommended"
-msgstr ""
+msgstr " ctrl-g non ш consigliato perchщ"
#: engines/scumm/help.cpp:112
msgid " since they may cause crashes"
-msgstr ""
+msgstr " potrebbe causare blocchi o un"
#: engines/scumm/help.cpp:113
msgid " or incorrect game behaviour."
-msgstr ""
+msgstr " comportamento errato del gioco."
#: engines/scumm/help.cpp:117
msgid "Spinning drafts on the keyboard:"
-msgstr ""
+msgstr "Tessere melodie da tastiera:"
#: engines/scumm/help.cpp:119
-#, fuzzy
msgid "Main game controls:"
-msgstr "Modifica le opzioni di gioco"
+msgstr "Controlli principali di gioco:"
#: engines/scumm/help.cpp:124 engines/scumm/help.cpp:139
#: engines/scumm/help.cpp:164
-#, fuzzy
msgid "Push"
-msgstr "Pausa"
+msgstr "Premi"
#: engines/scumm/help.cpp:125 engines/scumm/help.cpp:140
#: engines/scumm/help.cpp:165
msgid "Pull"
-msgstr ""
+msgstr "Tira"
#: engines/scumm/help.cpp:126 engines/scumm/help.cpp:141
#: engines/scumm/help.cpp:166 engines/scumm/help.cpp:199
#: engines/scumm/help.cpp:209
msgid "Give"
-msgstr ""
+msgstr "Dai"
#: engines/scumm/help.cpp:127 engines/scumm/help.cpp:142
#: engines/scumm/help.cpp:167 engines/scumm/help.cpp:192
#: engines/scumm/help.cpp:210
msgid "Open"
-msgstr ""
+msgstr "Apri"
#: engines/scumm/help.cpp:129
-#, fuzzy
msgid "Go to"
-msgstr "Cartella superiore"
+msgstr "Vai verso"
#: engines/scumm/help.cpp:130
msgid "Get"
-msgstr ""
+msgstr "Prendi"
#: engines/scumm/help.cpp:131 engines/scumm/help.cpp:155
#: engines/scumm/help.cpp:173 engines/scumm/help.cpp:200
#: engines/scumm/help.cpp:215 engines/scumm/help.cpp:226
#: engines/scumm/help.cpp:251
msgid "Use"
-msgstr ""
+msgstr "Usa"
#: engines/scumm/help.cpp:132 engines/scumm/help.cpp:144
msgid "Read"
-msgstr ""
+msgstr "Leggi"
#: engines/scumm/help.cpp:133 engines/scumm/help.cpp:150
msgid "New kid"
-msgstr ""
+msgstr "Cambia personaggio"
#: engines/scumm/help.cpp:134 engines/scumm/help.cpp:156
#: engines/scumm/help.cpp:174
msgid "Turn on"
-msgstr ""
+msgstr "Accendi"
#: engines/scumm/help.cpp:135 engines/scumm/help.cpp:157
#: engines/scumm/help.cpp:175
-#, fuzzy
msgid "Turn off"
-msgstr "Suono on/off"
+msgstr "Spegni"
#: engines/scumm/help.cpp:145 engines/scumm/help.cpp:170
#: engines/scumm/help.cpp:196
msgid "Walk to"
-msgstr ""
+msgstr "Cammina verso"
#: engines/scumm/help.cpp:146 engines/scumm/help.cpp:171
#: engines/scumm/help.cpp:197 engines/scumm/help.cpp:212
#: engines/scumm/help.cpp:229
msgid "Pick up"
-msgstr ""
+msgstr "Raccogli"
#: engines/scumm/help.cpp:147 engines/scumm/help.cpp:172
msgid "What is"
-msgstr ""
+msgstr "Che cos'ш"
#: engines/scumm/help.cpp:149
msgid "Unlock"
-msgstr ""
+msgstr "Apri"
#: engines/scumm/help.cpp:152
msgid "Put on"
-msgstr ""
+msgstr "Indossa"
#: engines/scumm/help.cpp:153
msgid "Take off"
-msgstr ""
+msgstr "Togli"
#: engines/scumm/help.cpp:159
msgid "Fix"
-msgstr ""
+msgstr "Ripara"
#: engines/scumm/help.cpp:161
-#, fuzzy
msgid "Switch"
-msgstr "Voci"
+msgstr "Sposta"
#: engines/scumm/help.cpp:169 engines/scumm/help.cpp:230
msgid "Look"
-msgstr ""
+msgstr "Guarda"
#: engines/scumm/help.cpp:176 engines/scumm/help.cpp:225
msgid "Talk"
-msgstr ""
+msgstr "Parla"
#: engines/scumm/help.cpp:177
-#, fuzzy
msgid "Travel"
-msgstr "Salva"
+msgstr "Viaggio"
#: engines/scumm/help.cpp:178
msgid "To Henry / To Indy"
-msgstr ""
+msgstr "A Henry / a Indy"
#: engines/scumm/help.cpp:181
msgid "play C minor on distaff"
-msgstr ""
+msgstr "suona Do (C) minore sul bastone"
#: engines/scumm/help.cpp:182
msgid "play D on distaff"
-msgstr ""
+msgstr "suona Re (D) sul bastone"
#: engines/scumm/help.cpp:183
msgid "play E on distaff"
-msgstr ""
+msgstr "suona Mi (E) sul bastone"
#: engines/scumm/help.cpp:184
msgid "play F on distaff"
-msgstr ""
+msgstr "suona Fa (F) sul bastone"
#: engines/scumm/help.cpp:185
msgid "play G on distaff"
-msgstr ""
+msgstr "suona Sol (G) sul bastone"
#: engines/scumm/help.cpp:186
msgid "play A on distaff"
-msgstr ""
+msgstr "suona La (A) sul bastone"
#: engines/scumm/help.cpp:187
msgid "play B on distaff"
-msgstr ""
+msgstr "suona Si (B) sul bastone"
#: engines/scumm/help.cpp:188
msgid "play C major on distaff"
-msgstr ""
+msgstr "suona Do (C) maggiore sul bastone"
#: engines/scumm/help.cpp:194 engines/scumm/help.cpp:216
msgid "puSh"
-msgstr ""
+msgstr "Premi"
#: engines/scumm/help.cpp:195 engines/scumm/help.cpp:217
msgid "pull (Yank)"
-msgstr ""
+msgstr "Tira"
#: engines/scumm/help.cpp:198 engines/scumm/help.cpp:214
#: engines/scumm/help.cpp:249
msgid "Talk to"
-msgstr ""
+msgstr "Parla con"
#: engines/scumm/help.cpp:201 engines/scumm/help.cpp:213
msgid "Look at"
-msgstr ""
+msgstr "Esamina"
#: engines/scumm/help.cpp:202
msgid "turn oN"
-msgstr ""
+msgstr "Accendi"
#: engines/scumm/help.cpp:203
msgid "turn oFf"
-msgstr ""
+msgstr "Spegni"
#: engines/scumm/help.cpp:219
-#, fuzzy
msgid "KeyUp"
-msgstr "Tasti"
+msgstr "Tasto su"
#: engines/scumm/help.cpp:219
msgid "Highlight prev dialogue"
-msgstr ""
+msgstr "Evidenzia dialogo precedente"
#: engines/scumm/help.cpp:220
-#, fuzzy
msgid "KeyDown"
-msgstr "Giљ"
+msgstr "Tasto giљ"
#: engines/scumm/help.cpp:220
msgid "Highlight next dialogue"
-msgstr ""
+msgstr "Evidenzia dialogo successivo"
#: engines/scumm/help.cpp:224
msgid "Walk"
-msgstr ""
+msgstr "Cammina"
#: engines/scumm/help.cpp:227 engines/scumm/help.cpp:236
#: engines/scumm/help.cpp:243 engines/scumm/help.cpp:250
msgid "Inventory"
-msgstr ""
+msgstr "Inventario"
#: engines/scumm/help.cpp:228
msgid "Object"
-msgstr ""
+msgstr "Oggetto"
#: engines/scumm/help.cpp:231
msgid "Black and White / Color"
-msgstr ""
+msgstr "Bianco e nero / colori"
#: engines/scumm/help.cpp:234
msgid "Eyes"
-msgstr ""
+msgstr "Occhi"
#: engines/scumm/help.cpp:235
-#, fuzzy
msgid "Tongue"
-msgstr "Zona"
+msgstr "Lingua"
#: engines/scumm/help.cpp:237
msgid "Punch"
-msgstr ""
+msgstr "Pugno"
#: engines/scumm/help.cpp:238
msgid "Kick"
-msgstr ""
+msgstr "Calcio"
#: engines/scumm/help.cpp:241 engines/scumm/help.cpp:248
msgid "Examine"
-msgstr ""
+msgstr "Esamina"
#: engines/scumm/help.cpp:242
msgid "Regular cursor"
-msgstr ""
+msgstr "Cursore normale"
#: engines/scumm/help.cpp:244
msgid "Comm"
-msgstr ""
+msgstr "Comm"
#: engines/scumm/help.cpp:247
msgid "Save / Load / Options"
-msgstr ""
+msgstr "Salva / Carica / Opzioni"
#: engines/scumm/help.cpp:256
-#, fuzzy
msgid "Other game controls:"
-msgstr "Modifica le opzioni di gioco"
+msgstr "Altre opzioni di gioco:"
#: engines/scumm/help.cpp:258 engines/scumm/help.cpp:268
msgid "Inventory:"
-msgstr ""
+msgstr "Inventario:"
#: engines/scumm/help.cpp:259 engines/scumm/help.cpp:275
msgid "Scroll list up"
-msgstr ""
+msgstr "Scorri lista verso l'alto"
#: engines/scumm/help.cpp:260 engines/scumm/help.cpp:276
msgid "Scroll list down"
-msgstr ""
+msgstr "Scorri lista verso il basso"
#: engines/scumm/help.cpp:261 engines/scumm/help.cpp:269
msgid "Upper left item"
-msgstr ""
+msgstr "Oggetto in alto a sinistra"
#: engines/scumm/help.cpp:262 engines/scumm/help.cpp:271
msgid "Lower left item"
-msgstr ""
+msgstr "Oggetto in basso a sinistra"
#: engines/scumm/help.cpp:263 engines/scumm/help.cpp:272
msgid "Upper right item"
-msgstr ""
+msgstr "Oggetto in alto a destra"
#: engines/scumm/help.cpp:264 engines/scumm/help.cpp:274
msgid "Lower right item"
-msgstr ""
+msgstr "Oggetto in basso a destra"
#: engines/scumm/help.cpp:270
msgid "Middle left item"
-msgstr ""
+msgstr "Oggetto al centro a sinistra"
#: engines/scumm/help.cpp:273
msgid "Middle right item"
-msgstr ""
+msgstr "Oggetto al centro a destra"
#: engines/scumm/help.cpp:280 engines/scumm/help.cpp:285
-#, fuzzy
msgid "Switching characters:"
-msgstr "Cambia personaggio"
+msgstr "Cambio personaggio:"
#: engines/scumm/help.cpp:282
msgid "Second kid"
-msgstr ""
+msgstr "Secondo ragazzo"
#: engines/scumm/help.cpp:283
msgid "Third kid"
-msgstr ""
+msgstr "Terzo ragazzo"
#: engines/scumm/help.cpp:295
msgid "Fighting controls (numpad):"
-msgstr ""
+msgstr "Controlli di combattimento (tastierino numerico):"
#: engines/scumm/help.cpp:296 engines/scumm/help.cpp:297
#: engines/scumm/help.cpp:298
msgid "Step back"
-msgstr ""
+msgstr "Passo indietro"
#: engines/scumm/help.cpp:299
msgid "Block high"
-msgstr ""
+msgstr "Para in alto"
#: engines/scumm/help.cpp:300
msgid "Block middle"
-msgstr ""
+msgstr "Para al centro"
#: engines/scumm/help.cpp:301
msgid "Block low"
-msgstr ""
+msgstr "Para in basso"
#: engines/scumm/help.cpp:302
msgid "Punch high"
-msgstr ""
+msgstr "Colpisci in alto"
#: engines/scumm/help.cpp:303
msgid "Punch middle"
-msgstr ""
+msgstr "Colpisci al centro"
#: engines/scumm/help.cpp:304
msgid "Punch low"
-msgstr ""
+msgstr "Colpisci in basso"
#: engines/scumm/help.cpp:307
msgid "These are for Indy on left."
-msgstr ""
+msgstr "Questi sono i controlli quando"
#: engines/scumm/help.cpp:308
msgid "When Indy is on the right,"
-msgstr ""
+msgstr "Indy ш sulla sinistra. Quando ш"
#: engines/scumm/help.cpp:309
msgid "7, 4, and 1 are switched with"
-msgstr ""
+msgstr "sulla destra, 7, 4 e 1 sostituiscono"
#: engines/scumm/help.cpp:310
msgid "9, 6, and 3, respectively."
-msgstr ""
+msgstr "rispettivamente 9, 6 e 3."
#: engines/scumm/help.cpp:317
msgid "Biplane controls (numpad):"
-msgstr ""
+msgstr "Controlli biplano (tastierino numerico):"
#: engines/scumm/help.cpp:318
msgid "Fly to upper left"
-msgstr ""
+msgstr "Vola in alto a sinistra"
#: engines/scumm/help.cpp:319
msgid "Fly to left"
-msgstr ""
+msgstr "Vola a sinistra"
#: engines/scumm/help.cpp:320
msgid "Fly to lower left"
-msgstr ""
+msgstr "Vola in basso a sinistra"
#: engines/scumm/help.cpp:321
msgid "Fly upwards"
-msgstr ""
+msgstr "Vola in alto"
#: engines/scumm/help.cpp:322
msgid "Fly straight"
-msgstr ""
+msgstr "Vola diritto"
#: engines/scumm/help.cpp:323
msgid "Fly down"
-msgstr ""
+msgstr "Vola in basso"
#: engines/scumm/help.cpp:324
msgid "Fly to upper right"
-msgstr ""
+msgstr "Vola in alto a destra"
#: engines/scumm/help.cpp:325
msgid "Fly to right"
-msgstr ""
+msgstr "Vola a destra"
#: engines/scumm/help.cpp:326
msgid "Fly to lower right"
-msgstr ""
+msgstr "Vola in basso a destra"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1695,7 +1688,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1706,7 +1699,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1717,15 +1710,26 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Originariamente, a questo punto dovrebbe partire Maniac Mansion. Ma ScummVM "
+"non lo puђ ancora fare. Per giocarci, vai a \"Aggiungi gioco\" nel menu "
+"principale di ScummVM e seleziona la cartella \"Maniac\" all'interno della "
+"cartella di Day Of The Tentacle."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "Modalitр ~Z~ip attivata"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "~T~ransizioni attive"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~E~ffetto acqua attivo"
@@ -1745,7 +1749,7 @@ msgstr "Emulatore OPL MAME"
msgid "DOSBox OPL emulator"
msgstr "Emulatore OPL DOSBox"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Nessuna musica"
@@ -1765,11 +1769,11 @@ msgstr "Emulatore Apple II GS (NON IMPLEMENTATO)"
msgid "C64 Audio Emulator"
msgstr "Emulatore audio C64"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Avvio in corso dell'emulatore MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Emulatore MT-32"
@@ -1801,7 +1805,7 @@ msgstr " (Globale)"
msgid " (Game)"
msgstr " (Gioco)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "MIDI Windows"
@@ -1896,15 +1900,15 @@ msgstr "Normale (no ridim.)"
#: backends/graphics/opengl/opengl-graphics.cpp:133
msgid "OpenGL Normal"
-msgstr ""
+msgstr "OpenGL Normal"
#: backends/graphics/opengl/opengl-graphics.cpp:134
msgid "OpenGL Conserve"
-msgstr ""
+msgstr "OpenGL Conserve"
#: backends/graphics/opengl/opengl-graphics.cpp:135
msgid "OpenGL Original"
-msgstr ""
+msgstr "OpenGL Original"
#: backends/platform/symbian/src/SymbianActions.cpp:41
#: backends/platform/wince/CEActionsSmartphone.cpp:42
@@ -2193,32 +2197,37 @@ msgid "Do you want to perform an automatic scan ?"
msgstr "Vuoi eseguire una scansione automatica?"
#: backends/platform/wince/wince-sdl.cpp:486
-#, fuzzy
msgid "Map right click action"
-msgstr "Clic destro"
+msgstr "Mappa l'azione del tasto destro"
#: backends/platform/wince/wince-sdl.cpp:490
msgid "You must map a key to the 'Right Click' action to play this game"
-msgstr ""
+msgstr "Devi mappare un tasto per l'azione \"Tasto destro\" per giocare"
#: backends/platform/wince/wince-sdl.cpp:499
msgid "Map hide toolbar action"
-msgstr ""
+msgstr "Mappa l'azione nascondi barra degli strumenti"
#: backends/platform/wince/wince-sdl.cpp:503
msgid "You must map a key to the 'Hide toolbar' action to play this game"
msgstr ""
+"Devi mappare un tasto per l'azione \"Nascondi barra degli strumenti\" per "
+"giocare"
#: backends/platform/wince/wince-sdl.cpp:512
msgid "Map Zoom Up action (optional)"
-msgstr ""
+msgstr "Mappa l'azione Zoom Up (opzionale)"
#: backends/platform/wince/wince-sdl.cpp:515
msgid "Map Zoom Down action (optional)"
-msgstr ""
+msgstr "Mappa l'azione Zoom Down (opzionale)"
#: backends/platform/wince/wince-sdl.cpp:523
msgid ""
"Don't forget to map a key to 'Hide Toolbar' action to see the whole inventory"
msgstr ""
+"Non dimenticare di mappare un tasto per l'azione \"Nascondi barra degli "
+"strumenti\" per vedere l'intero inventario"
+#~ msgid "Invalid Path"
+#~ msgstr "Percorso non valido"
diff --git a/po/nb_NO.po b/po/nb_NO.po
index 9fd6038483..a23f0a7d1b 100644
--- a/po/nb_NO.po
+++ b/po/nb_NO.po
@@ -7,9 +7,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-12-22 22:32+0100\n"
-"Last-Translator: Einar Johan T. Sјmхen\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -47,7 +47,7 @@ msgid "Go up"
msgstr "Gх tilbake"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -68,11 +68,11 @@ msgstr "Lukk"
msgid "Mouse click"
msgstr "Musklikk"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Vis tastatur"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Omkoble taster"
@@ -85,7 +85,7 @@ msgid "Map"
msgstr "Koble"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -160,7 +160,7 @@ msgstr ""
"versjon"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<standard>"
@@ -178,11 +178,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Plattform:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafikk"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -195,7 +195,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Overstyr globale grafikkinstillinger"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Lyd"
@@ -208,11 +208,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Overstyr globale lydinstillinger"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volum"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volum"
@@ -226,7 +226,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Overstyr globale voluminstillinger"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -239,7 +239,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Overstyr globale MIDI-instillinger"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -252,11 +252,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Overstyr globale MT-32-instillinger"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Sti"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Sti"
@@ -270,7 +270,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spillsti:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Ekstrasti:"
@@ -278,30 +278,30 @@ msgstr "Ekstrasti:"
msgid "Specifies path to additional data used the game"
msgstr "Bestemmer sti til ytterligere data brukt av spillet"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Ekstrasti:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Bestemmer sti til lagrede spill"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Ingen"
@@ -311,7 +311,7 @@ msgstr "Ingen"
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Velg SoundFont"
@@ -418,17 +418,17 @@ msgstr "Sјk i spilliste"
msgid "Search:"
msgstr "Sјk:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Tјm verdi"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Хpne spill:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -564,83 +564,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Grafikkmodus:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Tegnemodus:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Spesiel dithering-modus stјttet av enkelte spill"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Aspekt-rate korrigering"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korriger aspekt-rate for 320x200-spill"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "EGA av-dithering"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "Slхr av dithering i EGA-spill som stјtter det."
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Foretrukket enhet:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Musikkenhet:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Velger foretrukket lydenhet eller lydkort-emulator"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Velger ut-lydenhet eller lydkortemulator"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Foretrukket enh.:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musikkenhet:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "AdLib-emulator:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib brukes til musikk i mange spill"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Utrate:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -648,60 +648,60 @@ msgstr ""
"Hјyere verdier gir bedre lydkvalitet, men stјttes kanskje ikke av ditt "
"lydkort "
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "GM-enhet:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Velger standard lydenhet for General MIDI-utdata"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Ikke bruk General MIDI-musikk"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Bruk fјrste tilgjengelige enhet"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont stјttes ikke av enkelte lydkort, FluidSynth og Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Mikset AdLib/MIDI-modus"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Bruk bхde MIDI- og AdLib- lydgenerering"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "MIDI gain:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "MT-32 Enhet:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr "Velger standard lydenhet for Roland MT-32/LAPC1/CM32I/CM64-avspilling"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -709,190 +709,190 @@ msgstr ""
"Velg hvis du har et ekte Roland-kompatible lydkort tilkoblet maskinen, og "
"vil bruke dette."
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Aktiver Roland GS-modus"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Slх av General MIDI-kobling for spill som har Roland MT-32-lydspor"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Ikke bruk Roland MT-32-musikk"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Tale"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Undertekster"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Teksthastighet:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Tale"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Tekst"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Vis undertekster, og spill av tale"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Underteksthastighet:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Demp alle"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Volum for spesielle lydeffekter"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "Velger sti for ytterligere data brukt av alle spill eller ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "GUI-tegner:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Taster"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "GUI-sprхk:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Sprхk i ScummVM-GUIet"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Du mх omstarte ScummVM for at endringene skal skje. "
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Velg mappe for lagrede spill"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Den valgte mappen kan ikke skrives til. Vennligst velg en annen."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Velg mappe for GUI-temaer"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Velg mappe for ytterligere filer"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Velg mappe for plugins"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -965,88 +965,100 @@ msgstr "Antialiased Tegner (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Antialiased (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoren stјtter ikke debug-nivх '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Hopp over"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Hopp over linje"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Problem ved kjјring av spill:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikke finne noen motor som kunne kjјre det valgte spillet"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Ugyldig sti"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Ingen feil"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Spilldata ikke funnet"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "Spill-ID ikke stјttet"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Ustјttet fargemodus"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Lesetilgang nektet"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Skrivetilgang nektet"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Stien eksisterer ikke"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Stien er ikke en mappe"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Stien er ikke en fil"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Kan ikke opprette fil"
-#: common/error.cpp:57
-msgid "Reading failed"
-msgstr "Lesing feilet"
+#: common/error.cpp:65
+msgid "Reading data failed"
+msgstr "Lesing av data feilet"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Dataskriving feilet"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Kunne ikke finne en passende engine-plugin"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "Spillmotor-plugin stјtter ikke lagrede tilstander"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Kommandolinjeargument ikke behandlet"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Ukjent feil"
#: common/util.cpp:276
@@ -1115,13 +1127,13 @@ msgstr "Lagret spill:"
msgid "Save"
msgstr "Lagre"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~A~vbryt"
@@ -1660,7 +1672,7 @@ msgstr "Fly til hјyre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјyre"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1671,7 +1683,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1682,7 +1694,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1693,15 +1705,25 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Vanligvis, ville Maniac Mansion ha startet nх. Men ScummVM stјtter ikke det "
+"ennх. Sх, for х spille Maniac Mansion, gх til 'Legg til spill' i ScummVM-"
+"hovedmenyen og velg 'Maniac'-undermappa i Tentacle-mappa."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~Z~ipmodus aktivert"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "~O~verganger aktivert"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~V~anneffekt aktivert"
@@ -1721,7 +1743,7 @@ msgstr "MAME OPL emulator"
msgid "DOSBox OPL emulator"
msgstr "DOSBox OPL emulator"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Ingen musikk"
@@ -1741,11 +1763,11 @@ msgstr "Apple II GS Emulator (IKKE IMPLEMENTERT)"
msgid "C64 Audio Emulator"
msgstr "C64 Lydemulator"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Initialiserer MT-32-Emulator"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "MT-32 Emulator"
@@ -1777,7 +1799,7 @@ msgstr " (Global)"
msgid " (Game)"
msgstr " (Spill)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2203,3 +2225,5 @@ msgstr ""
"Ikke glem х koble en tast til handlingen 'Skjul verktјylinje' for х se hele "
"inventaret"
+#~ msgid "Invalid Path"
+#~ msgstr "Ugyldig sti"
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 536daba496..777c6e0e68 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -7,9 +7,9 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0svn\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-12-23 00:42+0100\n"
-"Last-Translator: Einar Johan T. Sјmхen\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -47,7 +47,7 @@ msgid "Go up"
msgstr "Gх tilbake"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -68,11 +68,11 @@ msgstr "Steng"
msgid "Mouse click"
msgstr "Musklikk"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Syn Tastatur"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Omkople tastar"
@@ -85,7 +85,7 @@ msgid "Map"
msgstr "Kople"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -160,7 +160,7 @@ msgstr ""
"engelsk versjon"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<standard>"
@@ -178,11 +178,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Plattform:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafikk"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -195,7 +195,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Overstyr globale grafikkinstillingar"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Lyd"
@@ -208,11 +208,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Overstyr globale lydinstillingar"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volum"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volum"
@@ -226,7 +226,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Overstyr globale voluminstillingar"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -239,7 +239,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Overstyr globale MIDI-instillingar"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -252,11 +252,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Overstyr globale MT-32-instillingar"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Stiar"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Stiar"
@@ -270,7 +270,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Spelsti:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Ekstrasti:"
@@ -278,30 +278,30 @@ msgstr "Ekstrasti:"
msgid "Specifies path to additional data used the game"
msgstr ""
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Ekstrasti:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr ""
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Lagringssti:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Ingen"
@@ -311,7 +311,7 @@ msgstr "Ingen"
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Vel SoundFont"
@@ -361,7 +361,7 @@ msgstr "~S~tart"
#: gui/launcher.cpp:566
msgid "Start selected game"
-msgstr ""
+msgstr "Start det velde spelet"
#: gui/launcher.cpp:569
msgid "~L~oad..."
@@ -369,7 +369,7 @@ msgstr "~Х~pne..."
#: gui/launcher.cpp:569
msgid "Load savegame for selected game"
-msgstr ""
+msgstr "Хpne eit lagra spel for the velde spelet"
#: gui/launcher.cpp:574
msgid "~A~dd Game..."
@@ -377,7 +377,7 @@ msgstr "~L~egg til spel..."
#: gui/launcher.cpp:574 gui/launcher.cpp:581
msgid "Hold Shift for Mass Add"
-msgstr ""
+msgstr "Hold Shift nede for х legge til fleire"
#: gui/launcher.cpp:576
msgid "~E~dit Game..."
@@ -418,17 +418,17 @@ msgstr "Sјk i spelliste"
msgid "Search:"
msgstr "Sјk:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Tјm verdi"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Хpne spel:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -457,12 +457,10 @@ msgid "No"
msgstr "Nei"
#: gui/launcher.cpp:779
-#, fuzzy
msgid "ScummVM couldn't open the specified directory!"
msgstr "ScummVM kunne ikkje хpne den velde mappa!"
#: gui/launcher.cpp:791
-#, fuzzy
msgid "ScummVM could not find any game in the specified directory!"
msgstr "ScummVM kunne ikkje finne noko spel i den velde mappa!"
@@ -565,83 +563,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Grafikkmodus:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Teiknemodus:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Spesielle dithering-modus som stјttast av nokre spel"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Fullskjermsmodus"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Aspekt-korrigering"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Rett opp aspekt for 320x200 spel"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr ""
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr ""
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
-msgstr ""
+msgstr "Fјretrukken eining:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr ""
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "AdLib emulator:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
-msgstr ""
+msgstr "AdLib nyttast til musikk i mange spel"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr ""
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -649,249 +647,249 @@ msgstr ""
"Hјgare verdier gir betre lydkvalitet, men stјttast kanskje ikkje av "
"lydkortet ditt"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr ""
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr ""
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Ikkje nytt General MIDI musikk"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr ""
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont stјttast av enkelte lydkort, Fluidsynth og Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Blanda AdLib/MIDI-modus"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Nytt bхe MIDI og AdLib lydskaping"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "MIDI gain:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr ""
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Ekte Roland MT-32 (deaktiver GM-emulering)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
msgstr ""
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Ekte Roland MT-32 (ingen GS-emulering)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Aktiver Roland GS-modus"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr "Slхr av General MIDI-kopling for spel med Roland MT-32 lydspor"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Ikkje nytt Roland MT-32 musikk"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Tale"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Teksting"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Begge"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Undertekstfart:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst og Tale:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Tale"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Tekst"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Bхe"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Vis teksting og spel av tale"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Undertekstfart:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musikkvolum:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Demp alle"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr ""
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Lydeffektvolum:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Talevolum:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Temasti:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pluginsti:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Div"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "GUI-teiknar:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autolagre:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Tastar"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "GUI-sprхk:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Sprхk i ScummVM-GUIet"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Du mх omstarte ScummVM for at endringane skal skje."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Vel mappe for lagra spel"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
-msgstr ""
+msgstr "Den velde mappa kan ikkje skrivast til. Vennlegst vel ein annan."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Vel ei mappe for GUI-tema:"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Vel ei mappe for ekstra filer"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Vel ei mappe for plugins"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -964,89 +962,101 @@ msgstr "Antialiased Teiknar (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Antialiased (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motoren stјttar ikkje debug-nivх '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Hopp over"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pause"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Hopp over linje"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Feil under kјyring av spel:"
-#: base/main.cpp:459
-#, fuzzy
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunne ikkje finne nokon motor som kunne kјyre det velde spelet."
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Ugyldig sti"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Ingen feil"
#: common/error.cpp:44
-msgid "Game Data not found"
+#, fuzzy
+msgid "Game data not found"
msgstr "Speldata ikkje funne"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "Spel ID ikkje stјtta"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Ustјtta fargemodus"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Lesetilgang nekta"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Skrivetilgang nekta"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Stien eksisterar ikkje"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Stien er ikkje ei mappe"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Stien er ikkje ei fil"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Kan ikkje lage fil"
-#: common/error.cpp:57
-msgid "Reading failed"
-msgstr "Lesinga feila"
+#: common/error.cpp:65
+msgid "Reading data failed"
+msgstr "Lesing av data feila"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Dataskriving feila"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Kunne ikkje finne ein passande spelmotor-plugin"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "Spelmotor-plugin stјttar ikkje lagra tilstandar."
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr ""
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Ukjend feil"
#: common/util.cpp:276
@@ -1117,20 +1127,19 @@ msgstr "Lagra spel:"
msgid "Save"
msgstr "Lagre"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~A~vbryt"
#: engines/dialogs.cpp:319
-#, fuzzy
msgid "~K~eys"
-msgstr "~T~aster"
+msgstr "~T~astar"
#: engines/scumm/dialogs.cpp:284
msgid "~P~revious"
@@ -1167,7 +1176,7 @@ msgstr "Hopp over cutscene"
#: engines/scumm/help.cpp:81
msgid "Space"
-msgstr ""
+msgstr "Opprom"
#: engines/scumm/help.cpp:81
msgid "Pause game"
@@ -1488,7 +1497,7 @@ msgstr "Objekt"
#: engines/scumm/help.cpp:231
msgid "Black and White / Color"
-msgstr ""
+msgstr "Svart-Kvitt / Fargar"
#: engines/scumm/help.cpp:234
msgid "Eyes"
@@ -1663,7 +1672,7 @@ msgstr "Fly til hјgre"
msgid "Fly to lower right"
msgstr "Fly til nedre hјgre"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1671,7 +1680,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1679,7 +1688,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1687,15 +1696,25 @@ msgid ""
"%s"
msgstr ""
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Opprinneleg, skulle Maniac Mansion ha starta no. Men ScummVM stјttar ikkje "
+"det enno. For х spele Maniac Mansion, gх til 'Legg til spel' i ScummVM-"
+"menyen og vel 'Maniac'-undermappa i 'Tentacle'-mappa."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~Z~ipmodus aktivert"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "~O~vergangar aktivert"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~V~anneffekt aktivert"
@@ -1715,7 +1734,7 @@ msgstr "MAME OPL emulator"
msgid "DOSBox OPL emulator"
msgstr "DOSBox OPL emulator"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Ingen musikk"
@@ -1735,11 +1754,11 @@ msgstr "Apple II GS Emulator (IKKJE IMPLEMENTERT)"
msgid "C64 Audio Emulator"
msgstr "C64 Lydemulator"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Initialiserar MT-32-emulator"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "MT-32 Emulator"
@@ -1771,7 +1790,7 @@ msgstr " (Global)"
msgid " (Game)"
msgstr " (Spel)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -1809,11 +1828,11 @@ msgstr ""
#: backends/platform/ds/arm9/source/dsoptions.cpp:91
msgid "Tap for left click, double tap right click"
-msgstr ""
+msgstr "Tap for venstre-klikk, dobbelt-tap for hјgre-klikk"
#: backends/platform/ds/arm9/source/dsoptions.cpp:93
msgid "Sensitivity"
-msgstr ""
+msgstr "Sensitivitet"
#: backends/platform/ds/arm9/source/dsoptions.cpp:102
msgid "Initial top screen scale:"
@@ -2008,7 +2027,7 @@ msgstr "SMB"
#: backends/platform/wii/options.cpp:106
msgid "Server:"
-msgstr ""
+msgstr "Teinar:"
#: backends/platform/wii/options.cpp:110
msgid "Share:"
@@ -2194,3 +2213,5 @@ msgstr ""
"Ikkje glјym х kople ein tast til 'Skjul verktјylinje' for х se heile "
"inventaret"
+#~ msgid "Invalid Path"
+#~ msgstr "Ugyldig sti"
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 2e645ae03c..d6e5b9b5e8 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: ScummVM 1.2.0\n"
+"Project-Id-Version: ScummVM 1.3.0\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-03-22 21:55+0000\n"
-"PO-Revision-Date: 2011-01-10 19:42+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
+"PO-Revision-Date: 2011-05-02 12:09+0100\n"
"Last-Translator: \n"
"Language-Team: Grajpopolsku.pl <grajpopolsku@gmail.com>\n"
"MIME-Version: 1.0\n"
@@ -47,7 +47,7 @@ msgid "Go up"
msgstr "W gѓrъ"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -68,11 +68,11 @@ msgstr "Zamknij"
msgid "Mouse click"
msgstr "Klikniъcie"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "WyЖwietl klawiaturъ"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Dostosuj klawisze"
@@ -85,7 +85,7 @@ msgid "Map"
msgstr "Przypisz"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -158,7 +158,7 @@ msgid ""
msgstr "Jъzyk gry. Nie zmieni to hiszpaёskiej wersji gry w angielskБ."
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<domyЖlne>"
@@ -176,11 +176,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Platforma:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafika"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "Grafika"
@@ -193,7 +193,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "UПyj wГasnych ustawieё grafiki"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "DМwiъk"
@@ -206,11 +206,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "UПyj wГasnych ustawieё dМwiъku"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "GГoЖnoЖц"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "GГoЖnoЖц"
@@ -224,7 +224,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "UПyj wГasnych ustawieё gГoЖnoЖci"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -237,7 +237,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "UПyj wГasnych ustawieё MIDI"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -250,11 +250,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "UПyj wГasnych ustawieё MT-32"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "ІcieПki"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "ІcieПki"
@@ -268,7 +268,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "ІcieПka gry:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Іc. dodatkѓw:"
@@ -276,30 +276,30 @@ msgstr "Іc. dodatkѓw:"
msgid "Specifies path to additional data used the game"
msgstr "OkreЖla ЖcieПkъ dodatkowych danych gry"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Іc. dodatkѓw:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "ІcieПka zapisѓw:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "OkreЖla gdzie zapisywaц stan gry"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "ІcieПka zapisѓw:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Brak"
@@ -309,7 +309,7 @@ msgstr "Brak"
msgid "Default"
msgstr "DomyЖlnie"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Wybierz SoundFont"
@@ -416,17 +416,17 @@ msgstr "Wyszukaj grъ na liЖcie"
msgid "Search:"
msgstr "Szukaj"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "WyczyЖц"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Wczytaj grъ:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -560,83 +560,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Brak"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Tryb grafiki:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Renderer:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Specjalne tryby ditheringu wspierane przez niektѓre gry"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Tryb peГnoekranowy"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Korekcja formatu obrazu"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korekcja formatu obrazu dla gier 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "anty-dithering EGA"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "WГБcz anty-dithering we wspieranych grach EGA"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Pref. urzБdzenie:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Urz. muzyczne:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "OkreЖla preferowane urzБdzenie dМwiъkowe lub emulator karty dМwiъkowej"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "OkreЖla wyjЖciowe urzБdzenie dМwiъkowe lub emulator karty dМwiъkowej"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Pref. urzБdzenie:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Urz. muzyczne:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Emulator AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib jest uПywany do muzyki w wielu grach"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Czъst. wyj.:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -644,63 +644,63 @@ msgstr ""
"WyПsze wartoЖci dajБ lepszБ jakoЖц dМwiъku, ale mogБ byц nieobsГugiwane "
"przez twojБ kartъ dМwiъkowБ"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "UrzБdzenie GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "OkreЖla domyЖlne urzБdzenie dМwiъkowe dla wyjЖcia General MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Nie uПywaj muzyki General MIDI"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "UПyj pierwszego dostъpnego urzБdzenia"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont jest wspierany przez niektѓre karty dМwiъkowe, Fluidsynth i "
"Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Tryb miksowanego AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "UПywaj obu generatorѓw dМwiъku, MIDI i AdLib, jednoczeЖnie"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Wzm. MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "UrzБdzenie MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"OkreЖla domyЖlne urzБdzenie dМwiъku dla wyjЖcia Roland MT-32/LAPC1/CM32l/CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Prawdziwy Roland MT-32 (wyГБcz emulacjъ GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -708,191 +708,191 @@ msgstr ""
"Zaznacz, jeЖli chcesz uПywaц swojej prawdziwej karty kompatybilnej z Roland "
"podГБczonej do twojego komputera"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Prawdziwy Roland MT-32 (brak emulacji GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "WГБcz tryb Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"WyГБcza mapowanie General MIDI dla gier ze ЖcieПkБ dМwiъkowБ Roland MT-32"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Nie uПywaj muzyki Roland MT-32"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Tekst i mowa:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Mowa"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Napisy"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Prъd. napisѓw:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Tekst i mowa:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Mowa"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Napisy"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Oba"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "WyЖwietlaj napisy i odtwarzaj mowъ"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Prъd. napisѓw:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "GГoЖnoЖц muzyki:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "GГoЖnoЖц muzyki:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Wycisz"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "GГ. efekt. dМw.:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "GГoЖnoЖц efektѓw dМw."
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "GГ. efekt. dМw.:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "GГoЖnoЖц mowy:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "GГoЖnoЖц mowy:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "ІcieПka stylu:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "ІcieПka stylu:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr "OkreЖla ЖcieПkъ dla dodatkowych danych dla wszystkich gier lub ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "ІcieПka wtyczek:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "ІcieПka wtyczek:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "RѓПne"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "RѓПne"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Styl:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Renderer interf.:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autozapis:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autozapis:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Klawisze"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Jъzyk interfejsu:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Jъzyk interfejsu ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Musisz zrestartowaц ScummVM, by zmiany zostaГy uwzglъdnione"
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Wybierz katalog zapisѓw"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Ten katalog jest zabezpieczony przed zapisem. Wybierz inny."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Wybierz katalog dla stylѓw GUI."
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Wybierz katalog dla dodatkowych plikѓw"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Wybierz katalog dla wtyczek"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -965,88 +965,100 @@ msgstr "WygГadzany renderer (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "WygГadzany (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Silnik nie wspiera poziomu debugowania '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Pomiё"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Wstrzymaj"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Pomiё liniъ"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "BГБd podczas uruchamiania gry:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Nie udaГo siъ znaleМц silnika zdolnego do uruchomienia zaznaczonej gry"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "NiewГaЖciwa ЖcieПka"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Brak bГъdu"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Nie znaleziono plikѓw gry"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "Identyfikator gry nie jest wspierany"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Niewspierany tryb kolorѓw"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Brak praw do odczytu"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Brak praw do zapisu"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "ІcieПka nie istnieje"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "ІcieПka nie jest katalogiem"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "ІcieПka nie jest plikiem"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Nie moПna utworzyц pliku"
-#: common/error.cpp:57
-msgid "Reading failed"
-msgstr "Odczyt nieudany"
+#: common/error.cpp:65
+msgid "Reading data failed"
+msgstr "Odczyt danych nieudany"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Zapisywanie danych nie powiodГo siъ"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Nie udaГo siъ znaleМц odpowiedniej wtyczki silnika"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "Silnik nie wspiera zapisu stanu gry"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Argument wiersza poleceё nie zostaГ przetworzony"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Nieznany bГБd"
#: common/util.cpp:276
@@ -1115,13 +1127,13 @@ msgstr "Zapis:"
msgid "Save"
msgstr "Zapisz"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~A~nuluj"
@@ -1660,7 +1672,7 @@ msgstr "Leц w prawo"
msgid "Fly to lower right"
msgstr "Leц w dѓГ, w prawo"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1671,7 +1683,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1682,7 +1694,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1693,15 +1705,25 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Zwykle w tym momencie uruchomiГoby siъ Maniac Mansion, ale ScummVM jeszcze "
+"tego nie obsГuguje. Aby zagraц, uПyj \"Dodaj grъ...\" z menu startowego "
+"ScummVM i wybierz podkatalog \"Maniac\" z katalogu gry Tentacle."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~T~ryb zip aktywny"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "~P~rzejЖcia wГБczone"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~E~fekty wody wГБczone"
@@ -1721,7 +1743,7 @@ msgstr "Emulator OPL MAME"
msgid "DOSBox OPL emulator"
msgstr "Emulator OPL DOSBox"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Brak muzyki"
@@ -1741,11 +1763,11 @@ msgstr "Emulator Apple II GS (NIE ZAIMPLEMENTOWANY)"
msgid "C64 Audio Emulator"
msgstr "Emulator dМwiъku C64"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Inicjalizacja emulatora MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Emulator MT-32"
@@ -1777,7 +1799,7 @@ msgstr " (Globalny)"
msgid " (Game)"
msgstr " (Gra)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2199,3 +2221,5 @@ msgstr ""
"Nie zapomnij przypisaц klawisza 'Ukryj pasek narzъdzi', by widzieц caГy "
"ekwipunek"
+#~ msgid "Invalid Path"
+#~ msgstr "NiewГaЖciwa ЖcieПka"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index fced3d259c..3379123cc4 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.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-03-22 21:55+0000\n"
-"PO-Revision-Date: 2010-12-09 11:11-0300\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
"MIME-Version: 1.0\n"
@@ -47,7 +47,7 @@ msgid "Go up"
msgstr "Acima"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -68,11 +68,11 @@ msgstr "Fechar"
msgid "Mouse click"
msgstr "Clique do mouse"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Mostrar teclado"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Remapear teclas"
@@ -85,7 +85,7 @@ msgid "Map"
msgstr "Mapear"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -158,7 +158,7 @@ msgid ""
msgstr "Idioma do jogo. Isto nуo irс passar seu jogo Inglъs para Portuguъs"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<padrуo>"
@@ -176,11 +176,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Sistema:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grсficos"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -193,7 +193,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Sobrepor configuraчуo global de grсficos"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Сudio"
@@ -206,11 +206,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Sobrepor configuraчуo global de сudio"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volume"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volume"
@@ -224,7 +224,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Sobrepor configuraчуo global de volume"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -237,7 +237,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Sobrepor configuraчуo global de MIDI"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -250,11 +250,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Sobrepor configuraчуo global de MT-32"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Pastas"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Pastas"
@@ -268,7 +268,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Pasta do Jogo:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Pasta de Extras"
@@ -276,30 +276,30 @@ msgstr "Pasta de Extras"
msgid "Specifies path to additional data used the game"
msgstr "Especifique a pasta para dados utilizados no jogo"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Pasta de Extras"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Pasta para Salvar"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Especifique onde guardar seus jogos salvos"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Pasta para Salvar"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Nenhum(a)"
@@ -309,7 +309,7 @@ msgstr "Nenhum(a)"
msgid "Default"
msgstr "Padrуo"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Selecione o SoundFont"
@@ -417,17 +417,17 @@ msgstr "Pesquisar na lista de jogos"
msgid "Search:"
msgstr "Pesquisar:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Limpar valor"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Carregar jogo:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -564,83 +564,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Nenhum(a)"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Modo grсfico:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Renderizaчуo"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Modos especiais de dithering suportados por alguns jogos"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Modo Tela Cheia"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Correчуo de proporчуo"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Correчуo de proporчуo para jogos 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "EGA sem dithering"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "Habilita EGA sem dithering em jogos com suporte"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Dispositivo pref.:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Disp. de mњsica:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Especifica o dispositivo de som preferido ou emulador de placa de som"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Especifica o dispositivo de saэda de som ou emulador de placa de som"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Dispositivo pref.:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Dispositivo de mњsica:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Emulador AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib щ utilizado para mњsica em vсrios jogos"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Taxa de saэda:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -648,62 +648,62 @@ msgstr ""
"Maior valor especifica melhor qualidade de som, mas pode nуo ser suportado "
"por sua placa de som"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "Dispositivo GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Especifique o dispositivo de som padrуo para a saэda General MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Nуo usar mњsica General MIDI"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Usar o primeiro dispositivo disponэvel"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont щ suportado por algumas placas de som, Fluidsynth e Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Mixar AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Usar MIDI e AdLib juntos na geraчуo de som"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Ganho MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Dispositivo MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Especifique o dispositivo de som padrуo para a saэda Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Roland MT-32 real (desligar emulaчуo GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -711,193 +711,193 @@ msgstr ""
"Verifique se vocъ quer usar o seu dispositivo de hardware de som compatэvel "
"com Roland"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Roland MT-32 real (sem emulaчуo GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Ligar modo Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Desliga o mapeamento General MIDI para jogos com trilha sonora Roland MT-32"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Nуo usar mњsica Roland MT-32"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Texto e Voz:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Voz"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Legendas"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Rapidez legendas:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Texto e Voz:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Voz"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Legs"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Ambos"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Mostrar legenda e vozes (dublagem)"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Velocidade das legendas:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Volume da Mњsica:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Volume da Mњsica:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Mudo"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Volume dos Sons:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Volume dos efeitos sonoros especiais"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Volume dos Sons:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Volume da Voz:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Volume da Voz:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Pasta do Tema"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Pasta do Tema"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Especifica a pasta para os dados adicionais usados por todos os jogos ou "
"ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Pasta de Plugins:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Pasta de Plugins:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Outros"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Outros"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Renderizador GUI:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Auto-Salvar:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Auto-Salvar:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Teclas"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Idioma do GUI:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Linguagem do ScummVM GUI"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Vocъ tem que reiniciar o ScummVM para funcionar."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Selecione a pasta para o jogos salvos"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "O diretѓrio escolhido nуo pode ser usado. Por favor, selecione outro."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Selecione a pasta para os temas da Interface de Uso Grсfico"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Selecione a pasta para os arquivos extras"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Selecione a pasta para os plugins"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -970,90 +970,102 @@ msgstr "Renderizador Anti-Serrilhamento (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Anti-Serrilhamento (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Essa engine nуo suporta o nэvel de debug '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Menu"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Pular"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Pausar"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Pula linha"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Erro ao executar o jogo:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr ""
"Nуo foi possэvel encontrar qualquer programa capaz de rodar o jogo "
"selecionado"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Pasta invсlida"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Nenhum erro"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Dados do jogo nуo encontrado"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "ID de jogo nуo suportado"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+msgid "Unsupported color mode"
msgstr "Modo de cores nуo suportado"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Permissуo para \"ler\" negada"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Permissуo para \"gravar\" negada"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Caminho nуo existe"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Caminho nуo щ uma pasta"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Caminho nao щ um arquivo"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Caminho nуo щ um arquivo"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+msgid "Reading data failed"
msgstr "Falha na leitura"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Falha na gravaчуo"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Nуo foi possэvel encontrar engine adequada"
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr "A engine atual nуo suporta salvar o progresso do jogo"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr "Linha de comando nуo processada"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Erro desconhecido"
#: common/util.cpp:276
@@ -1122,13 +1134,13 @@ msgstr "Salvar jogo:"
msgid "Save"
msgstr "Salvar"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "~C~ancelar"
@@ -1667,7 +1679,7 @@ msgstr "Voar para direita"
msgid "Fly to lower right"
msgstr "Voar para direita inferior"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1678,7 +1690,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1689,7 +1701,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1700,15 +1712,26 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"\"Na versуo original, o jogo Maniac Mansion rodaria agora mesmo. Porem a "
+"atual versуo do ScummVM nуo suporta essa aчуo. Para jogar Maniac Mansion, "
+"adicione o jogo normalmente no ScummVM. Ele se encontra em um diretѓrio "
+"dentro da pasta do jogo Day of the Tentacle."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "Modo ~Z~ip ativado"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "Modo ~T~ransiчѕes ativado"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "Modo ~E~feitos de сgua ativado"
@@ -1728,7 +1751,7 @@ msgstr "Emulador MAME OPL"
msgid "DOSBox OPL emulator"
msgstr "Emulador DOSBox OPL"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Sem mњsica"
@@ -1748,11 +1771,11 @@ msgstr "Emulador Apple II GS (NУO IMPLEMENTADO)"
msgid "C64 Audio Emulator"
msgstr "Emulador Som C64"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Inicializando Emulador MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Emulador MT-32"
@@ -1784,7 +1807,7 @@ msgstr "(Global)"
msgid " (Game)"
msgstr "(Jogo)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "MIDI Windows"
@@ -2209,3 +2232,5 @@ msgstr ""
"Nуo se esqueчa de mapear uma tecla para \"Ocultar a barra de ferramentas\" "
"para ver todo o seu inventсrio"
+#~ msgid "Invalid Path"
+#~ msgstr "Pasta invсlida"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index c23e9a69ca..c6adbe9645 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-03-22 21:55+0000\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
"PO-Revision-Date: 2010-06-13 20:55+0300\n"
"Last-Translator: Eugene Sandulenko <sev@scummvm.org>\n"
"Language-Team: Russian\n"
@@ -45,7 +45,7 @@ msgid "Go up"
msgstr "Вверх"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -66,11 +66,11 @@ msgstr "Закрыть"
msgid "Mouse click"
msgstr "Клик мышью"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Показать клавиатуру"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Переназначить клавиши"
@@ -83,7 +83,7 @@ msgid "Map"
msgstr "Назначить"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -158,7 +158,7 @@ msgstr ""
"русскую"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<по умолчанию>"
@@ -176,11 +176,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Платформа:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Графика"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "Грф"
@@ -193,7 +193,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Перекрыть глобальные установки графики"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Аудио"
@@ -206,11 +206,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Перекрыть глобальные установки аудио"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Громкость"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Громк"
@@ -224,7 +224,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Перекрыть глобальные установки громкости"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -237,7 +237,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Перекрыть глобальные установки MIDI"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -250,11 +250,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Перекрыть глобальные установки MT-32"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Пути"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Пути"
@@ -268,7 +268,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Где игра: "
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Доп. путь:"
@@ -276,30 +276,30 @@ msgstr "Доп. путь:"
msgid "Specifies path to additional data used the game"
msgstr "Указывает путь к дополнительным файлам данных для игры"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Доп. путь:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Сохранения игр: "
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Указывает путь к сохранениям игры"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Путь сохр:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Не задан"
@@ -309,7 +309,7 @@ msgstr "Не задан"
msgid "Default"
msgstr "По умолчанию"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Выберите SoundFont"
@@ -416,17 +416,17 @@ msgstr "Поиск в списке игр"
msgid "Search:"
msgstr "Поиск:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Очистить значение"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Загрузить игру:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -561,84 +561,84 @@ msgstr "44 кГц"
msgid "48 kHz"
msgstr "48 кГц"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Не задан"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Граф. режим:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Режим растра:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Специальные режимы рендеринга, поддерживаемые некоторыми играми"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Полноэкранный режим"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Коррекция соотношения сторон"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Корректировать соотношение сторон для игр с разрешением 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr ""
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr ""
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Предпочитаемое:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Звуковое уст-во:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
"Указывает предпочитаемое звуковое устройство или эмулятор звуковой карты"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Указывает выходное звуковое устройство или эмулятор звуковой карты"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Предпочитаемое:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Звуковое уст-во:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Эмулятор AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "Звуковая карта AdLib используется многими играми"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Частота звука:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -646,64 +646,64 @@ msgstr ""
"БОльшие значения задают лучшее качество звука, однако они могут не "
"поддерживаться вашей звуковой картой"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "Устройство GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Указывает выходное звуковое устройство для MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr ""
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr ""
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFontы поддердживаются некоторыми звуковыми картами, Fluidsynth и "
"Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Смешанный режим AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Использовать и MIDI и AdLib для генерации звука"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Усиление MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Устр. MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Указывает звуковое устройство по умолчания для вывода на Roland MT-32/LAPC1/"
"CM32l/CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Настоящий Roland MT-32 (запретить эмуляцию GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -711,194 +711,194 @@ msgstr ""
"Отметьте, если у вас подключено Roland-совместимое звуковое устройство и вы "
"хотите его использовать"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Настоящий Roland MT-32 (запретить GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Включить режим Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Выключает маппинг General MIDI для игр с звуковой дорожкой для Roland MT-32"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
#, fuzzy
msgid "Don't use Roland MT-32 music"
msgstr "Настоящий Roland MT-32 (запретить GM)"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Текст и озвучка:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Озвучка"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Субтитры"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Всё"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Скорость титров:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Текст и озвучка:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Озв"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Суб"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Всё"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Показывать субтитры и воспроизводить речь"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Скорость титров:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Громк. музыки:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Громк. музыки:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Выкл. всё"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Громкость SFX:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Громкость специальных звуковых эффектов"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Громк. SFX:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Громк. озвучки:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Громк. озвучки:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Путь к темам:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Где темы:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Указывает путь к дополнительным файлам данных, используемых всеми играми, "
"либо ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Путь к плагинам:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Путь к плагинам:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Разное"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Разное"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Тема:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Рисовалка GUI:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Автосохранение:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Автосохр.:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Клавиши"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Язык GUI:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Язык графического интерфейса ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Вы должны перезапустить ScummVM чтобы применить изменения."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Выберите директорию для сохранений"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не могу писать в выбранную директорию. Пожалуйста, укажите другую."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Выберите директорию для тем GUI"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Выберите директорию с дополнительными файлами"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Выберите директорию с плагинами"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -971,88 +971,107 @@ msgstr "Растеризатор со сглаживанием (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Растеризатор со сглаживанием (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Движок не поддерживает уровень отладки '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Меню"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Пропустить"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Пауза"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Пропустить строку"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Ошибка запуска игры:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Не могу найти движок для запуска выбранной игры"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Неверный путь"
+#: common/error.cpp:42
+msgid "No error"
+msgstr ""
#: common/error.cpp:44
-msgid "Game Data not found"
+#, fuzzy
+msgid "Game data not found"
msgstr "Нет файлов игры"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+#, fuzzy
+msgid "Game id not supported"
msgstr "Game Id не поддерживается"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+#, fuzzy
+msgid "Unsupported color mode"
msgstr "Неподдерживаемый режим цвета"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Недостаточно прав для чтения"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Недостаточно прав для записи"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+#, fuzzy
+msgid "Path does not exist"
msgstr "Путь не найден"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Путь не является директорией"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Путь не является файлом"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Не могу создать файл"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+#, fuzzy
+msgid "Reading data failed"
msgstr "Ошибка чтения"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Ошибка записи данных"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr ""
+
+#: common/error.cpp:72
+#, fuzzy
+msgid "Engine plugin does not support save states"
+msgstr "Движок не поддерживает уровень отладки '%s'"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr ""
+
+#: common/error.cpp:79
+#, fuzzy
+msgid "Unknown error"
msgstr "Неизвестная ошибка"
#: common/util.cpp:276
@@ -1121,13 +1140,13 @@ msgstr "Сохранить игру: "
msgid "Save"
msgstr "Записать"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "О~т~мена"
@@ -1686,7 +1705,7 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1697,7 +1716,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1708,7 +1727,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1719,15 +1738,22 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "Режим быстрого перехода активирован"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "Переходы активированы"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "Эффекты воды включены"
@@ -1747,7 +1773,7 @@ msgstr "Эмулятор MAME OPL"
msgid "DOSBox OPL emulator"
msgstr "Эмулятор DOSBox OPL"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Без музыки"
@@ -1767,11 +1793,11 @@ msgstr "Эмулятор Apple II GS (отсутствует)"
msgid "C64 Audio Emulator"
msgstr "Эмулятор звука C64"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Настраиваю эмулятор MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Эмулятор MT-32"
@@ -1803,7 +1829,7 @@ msgstr " (Глобальная)"
msgid " (Game)"
msgstr " (Игры)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2225,3 +2251,5 @@ msgstr ""
"Не забудьте назначить клавишу для действия 'Hide Toolbar' чтобы увидеть весь "
"инвентарь в игре"
+#~ msgid "Invalid Path"
+#~ msgstr "Неверный путь"
diff --git a/po/scummvm.pot b/po/scummvm.pot
index 150885fb92..8522a89ede 100644
--- a/po/scummvm.pot
+++ b/po/scummvm.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ScummVM 1.3.0git\n"
"Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n"
-"POT-Creation-Date: 2011-03-22 21:55+0000\n"
+"POT-Creation-Date: 2011-04-22 19:33+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"
@@ -43,7 +43,7 @@ msgid "Go up"
msgstr ""
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -64,11 +64,11 @@ msgstr ""
msgid "Mouse click"
msgstr ""
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr ""
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr ""
@@ -81,7 +81,7 @@ msgid "Map"
msgstr ""
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -152,7 +152,7 @@ msgid ""
msgstr ""
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr ""
@@ -170,11 +170,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr ""
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr ""
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr ""
@@ -187,7 +187,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr ""
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr ""
@@ -200,11 +200,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr ""
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr ""
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr ""
@@ -218,7 +218,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr ""
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr ""
@@ -231,7 +231,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr ""
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr ""
@@ -244,11 +244,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr ""
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr ""
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr ""
@@ -262,7 +262,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr ""
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr ""
@@ -270,30 +270,30 @@ msgstr ""
msgid "Specifies path to additional data used the game"
msgstr ""
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr ""
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr ""
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr ""
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr ""
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr ""
@@ -303,7 +303,7 @@ msgstr ""
msgid "Default"
msgstr ""
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr ""
@@ -410,17 +410,17 @@ msgstr ""
msgid "Search:"
msgstr ""
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr ""
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr ""
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -553,331 +553,331 @@ msgstr ""
msgid "48 kHz"
msgstr ""
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr ""
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr ""
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr ""
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr ""
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr ""
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr ""
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr ""
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr ""
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr ""
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr ""
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr ""
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr ""
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr ""
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr ""
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr ""
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr ""
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
msgstr ""
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr ""
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr ""
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr ""
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr ""
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr ""
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr ""
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr ""
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr ""
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr ""
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr ""
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr ""
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
msgstr ""
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr ""
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr ""
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr ""
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr ""
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr ""
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr ""
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr ""
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr ""
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr ""
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr ""
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr ""
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr ""
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr ""
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr ""
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr ""
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr ""
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr ""
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr ""
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr ""
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr ""
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr ""
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr ""
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr ""
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr ""
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr ""
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr ""
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr ""
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr ""
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr ""
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr ""
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr ""
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr ""
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr ""
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr ""
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr ""
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr ""
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr ""
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr ""
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr ""
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr ""
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -948,88 +948,100 @@ msgstr ""
msgid "Antialiased (16bpp)"
msgstr ""
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr ""
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr ""
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr ""
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr ""
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr ""
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr ""
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr ""
-#: common/error.cpp:43
-msgid "Invalid Path"
+#: common/error.cpp:42
+msgid "No error"
msgstr ""
#: common/error.cpp:44
-msgid "Game Data not found"
-msgstr ""
-
-#: common/error.cpp:45
-msgid "Game Id not supported"
+msgid "Game data not found"
msgstr ""
#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+msgid "Game id not supported"
msgstr ""
#: common/error.cpp:48
+msgid "Unsupported color mode"
+msgstr ""
+
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr ""
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr ""
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr ""
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr ""
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr ""
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr ""
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+msgid "Reading data failed"
msgstr ""
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr ""
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr ""
+
+#: common/error.cpp:72
+msgid "Engine plugin does not support save states"
+msgstr ""
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr ""
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr ""
#: common/util.cpp:276
@@ -1098,13 +1110,13 @@ msgstr ""
msgid "Save"
msgstr ""
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr ""
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr ""
@@ -1643,7 +1655,7 @@ msgstr ""
msgid "Fly to lower right"
msgstr ""
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1651,7 +1663,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1659,7 +1671,7 @@ msgid ""
"%s"
msgstr ""
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1667,15 +1679,22 @@ msgid ""
"%s"
msgstr ""
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr ""
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr ""
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr ""
@@ -1695,7 +1714,7 @@ msgstr ""
msgid "DOSBox OPL emulator"
msgstr ""
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr ""
@@ -1715,11 +1734,11 @@ msgstr ""
msgid "C64 Audio Emulator"
msgstr ""
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr ""
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr ""
@@ -1751,7 +1770,7 @@ msgstr ""
msgid " (Game)"
msgstr ""
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr ""
diff --git a/po/se_SE.po b/po/se_SE.po
index 465a2779bd..0bf6f3ac8b 100644
--- a/po/se_SE.po
+++ b/po/se_SE.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-03-22 21:55+0000\n"
-"PO-Revision-Date: 2011-03-21 13:45+0100\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
+"PO-Revision-Date: 2011-05-02 13:07+0100\n"
"Last-Translator: Hampus Flink <hampus.flink@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -23,15 +23,16 @@ msgstr ""
#: gui/about.cpp:96
#, c-format
msgid "(built on %s)"
-msgstr ""
+msgstr "(byggt pх %s)"
#: gui/about.cpp:103
+#, fuzzy
msgid "Features compiled in:"
-msgstr ""
+msgstr "Funktioner kompilerade i:"
#: gui/about.cpp:112
msgid "Available engines:"
-msgstr ""
+msgstr "Tillgфngliga motorer"
#: gui/browser.cpp:70
msgid "Go up"
@@ -47,7 +48,7 @@ msgid "Go up"
msgstr "Uppхt"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -68,11 +69,11 @@ msgstr "Stфng"
msgid "Mouse click"
msgstr "Musklick"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Visa tangentbord"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Stфll in tangenter"
@@ -85,7 +86,7 @@ msgid "Map"
msgstr "Stфll in"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -160,7 +161,7 @@ msgstr ""
"till en engelsk"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<standard>"
@@ -178,11 +179,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Plattform:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Grafik"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "GFX"
@@ -195,7 +196,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "жverskrid globala grafikinstфllningar"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Ljud"
@@ -208,11 +209,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "жverskrid globala ljudinstфllningar"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Volym"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Volym"
@@ -226,7 +227,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "жverskrid globala volyminstфllningar"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -239,7 +240,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "жverskrid globala MIDI-instфllningar"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -252,11 +253,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "жverskrid globala MT-32 instфllningar"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Sіkvфgar"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Sіkvфgar"
@@ -270,7 +271,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Sіkv. spel:"
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Sіkv. extra:"
@@ -278,30 +279,30 @@ msgstr "Sіkv. extra:"
msgid "Specifies path to additional data used the game"
msgstr "Bestфmmer sіkvфgen till ytterligare data som spelet anvфnder"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Sіkv. extra:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Sіkv. sparat:"
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Bestфmmer var dina spardata lagras"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Sіkv. sparat:"
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Ingen"
@@ -311,7 +312,7 @@ msgstr "Ingen"
msgid "Default"
msgstr "Standard"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Vфlj SoundFont"
@@ -418,17 +419,17 @@ msgstr "Sіk i spellistan"
msgid "Search:"
msgstr "Sіk:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Tіm sіkfфltet"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Ladda spel:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -564,83 +565,83 @@ msgstr "44 kHz"
msgid "48 kHz"
msgstr "48 kHz"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Ingen"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Grafiklфge:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Renderingslфge:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Speciella gitterlфgen stіdda av vissa spel"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Fullskфrmslфge"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Korrektion av bildfіrhхllande"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Korrigerar bildfіrhхllanden fіr 320x200-spel"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "EGA anti-gitter"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "Aktiverar anti-gitter i EGA spel som stіder det"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Fіredragen enhet:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Musikenhet:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Bestфmmer din fіredragna emulator fіr ljudenhet eller ljudkort"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Bestфmmer emulator fіr ljudenhet eller ljudkort"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Fіredr. enhet:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Musikenhet:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "AdLib-emulator:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "AdLib anvфnds fіr musik i mхnga spel"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Ljudfrekvens:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -648,61 +649,61 @@ msgstr ""
"Ett hіgre vфrde betecknar bфttre ljudkvalitet men stіds kanske inte av ditt "
"ljudkort"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "GM-enhet:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Bestфmmer standardenheten fіr General MIDI-uppspelning"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "Anvфnd inte General MIDI-musik"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Anvфnd fіrsta tillgфngliga enhet"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr "SoundFont stіds endast av vissa ljudkort, Fluidsynth och Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Blandat AdLib/MIDI-lфge"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Anvфnd bхde MIDI och AdLib fіr ljudgeneration"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "MIDI gain:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "MT-32 enhet:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Bestфmmer standardenheten fіr Roland MT-32/LAPC1/CM32I/CM64-uppspelning"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Фkta Roland MT-32 (inaktivera GM-emulation)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -710,193 +711,193 @@ msgstr ""
"Aktivera om du vill anvфnda din verkliga Roland-kompatibla och dator-"
"anslutna ljudenhet"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Фkta Roland MT-32 (ingen GM-emulation)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Aktivera Roland GS-lфge"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Stфnger av General MIDI-kartlфggning fіr spel med Roland MT-32 soundtrack"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Anvфnd inte Roland MT-32 musik"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Undertext och tal:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Tal"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Undertexter"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Bхda"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Texthastighet:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Text och tal:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Tal"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Text"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Bхda"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Visa undertexter och spela upp tal"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Texthastighet:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Musikvolym:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Musikvolym:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Ljud av"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "SFX-volym:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Volym fіr specialeffekter"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "SFX-volym:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Talvolym:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Talvolym:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Sіkv. tema:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Sіkv. tema:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Bestфmmer sіkvфg till andra data som anvфnds av alla spel eller ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Sіkv. tillфgg:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Sіkv. tillфgg:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Diverse"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Diverse"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Tema:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "GUI-rendering:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Autospara:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Autospara:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Tangenter"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "GUI-sprхk:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Sprхk fіr ScummVM:s anvфndargrфnssnitt"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Du mхste starta om ScummVM fіr att фndringarna ska fх effekt."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Vфlj katalog fіr spardata"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr ""
"Det gхr inte att skriva till den valda katalogen. Var god vфlj en annan."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Vфlj katalog fіr GUI-teman"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Vфlj katalog fіr extra filer"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Vфlj katalog fіr tillфgg"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -969,88 +970,104 @@ msgstr "Antialiserad rendering (16 bpp)"
msgid "Antialiased (16bpp)"
msgstr "Antialiserad (16 bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Motorn stіder inte debug-nivх '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Meny"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Skippa"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Paus"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Skippa rad"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Fel under kіrning av spel:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Kunde inte hitta en motor kapabel till att kіra det valda spelet"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Ogiltig sіkvфg"
+#: common/error.cpp:42
+msgid "No error"
+msgstr "Inget fel"
#: common/error.cpp:44
-msgid "Game Data not found"
+msgid "Game data not found"
msgstr "Kunde inte hitta speldata"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+msgid "Game id not supported"
msgstr "Spel-ID stіds inte"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+#, fuzzy
+msgid "Unsupported color mode"
msgstr "Ej stіtt fфrglфge"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Lфstillbehіrighet nekad"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Skrivtillbehіrighet nekad"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+msgid "Path does not exist"
msgstr "Sіkvфgen existerar inte"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Sіkvфgen фr inte en katalog"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Sіkvфgen фr inte en fil"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Kan inte skapa fil"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+#, fuzzy
+msgid "Reading data failed"
msgstr "Inlфsning misslyckades"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Skriva data misslyckades"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr "Kunde inte hitta lфmpligt motortillфgg"
+
+#: common/error.cpp:72
+#, fuzzy
+msgid "Engine plugin does not support save states"
+msgstr "Motorn stіder inte debug-nivх '%s'"
+
+#: common/error.cpp:75
+#, fuzzy
+msgid "Command line argument not processed"
+msgstr "Argument i kommandoraden ej verkstфllt"
+
+#: common/error.cpp:79
+msgid "Unknown error"
msgstr "Okфnt fel"
#: common/util.cpp:276
@@ -1119,13 +1136,13 @@ msgstr "Spara spelet:"
msgid "Save"
msgstr "Spara"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "A~v~bryt"
@@ -1664,7 +1681,7 @@ msgstr "Flyg хt hіger"
msgid "Fly to lower right"
msgstr "Flyg хt nedre hіger"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1675,7 +1692,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1686,7 +1703,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1697,15 +1714,25 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+"Vanligtvis hade Maniac Mansion startat nu, men ScummVM kan inte gіra detta "
+"фn. Fіr att spela spelet, gх till \"Lфgg till spel\" i ScummVM:s huvudmeny "
+"och vфlj \"Maniac\"-katalogen inuti \"Tentacle\" katalogen."
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "~Z~iplфge aktiverat"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "жv~e~rgхngar aktiverade"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "~V~atteneffekt aktiverad"
@@ -1725,7 +1752,7 @@ msgstr "MAME OPL-emulator"
msgid "DOSBox OPL emulator"
msgstr "DOSBox OPL-emulator"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Ingen musik"
@@ -1745,11 +1772,11 @@ msgstr "Apple II GS-emulator (INTE IMPLEMENTERAD)"
msgid "C64 Audio Emulator"
msgstr "C64 ljudemulator"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Initialiserar MT-32 emulator"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "MT-32 emulator"
@@ -1781,7 +1808,7 @@ msgstr "(Global)"
msgid " (Game)"
msgstr "(Spel)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2206,3 +2233,5 @@ msgstr ""
"Glіm inte att vфlja en tangent fіr \"Gіm verktygsrad\" fіr att se hela "
"inventariet"
+#~ msgid "Invalid Path"
+#~ msgstr "Ogiltig sіkvфg"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index b901aed055..03822b83d0 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-03-22 21:55+0000\n"
+"POT-Creation-Date: 2011-04-22 19:33+0100\n"
"PO-Revision-Date: 2011-03-26 22:38+0200\n"
"Last-Translator: Lubomyr Lisen\n"
"Language-Team: Ukrainian\n"
@@ -45,7 +45,7 @@ msgid "Go up"
msgstr "Вверх"
#: gui/browser.cpp:73 gui/chooser.cpp:49 gui/KeysDialog.cpp:46
-#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1116
+#: gui/launcher.cpp:319 gui/massadd.cpp:95 gui/options.cpp:1124
#: gui/saveload.cpp:66 gui/saveload.cpp:158 gui/themebrowser.cpp:57
#: backends/platform/wii/options.cpp:48
msgid "Cancel"
@@ -66,11 +66,11 @@ msgstr "Закрити"
msgid "Mouse click"
msgstr "Клік мишкою"
-#: gui/gui-manager.cpp:112 base/main.cpp:286
+#: gui/gui-manager.cpp:112 base/main.cpp:281
msgid "Display keyboard"
msgstr "Показати клавіатуру"
-#: gui/gui-manager.cpp:115 base/main.cpp:289
+#: gui/gui-manager.cpp:115 base/main.cpp:284
msgid "Remap keys"
msgstr "Перепризначити клавіші"
@@ -83,7 +83,7 @@ msgid "Map"
msgstr "Призначити"
#: gui/KeysDialog.cpp:45 gui/launcher.cpp:320 gui/launcher.cpp:945
-#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1117
+#: gui/launcher.cpp:949 gui/massadd.cpp:92 gui/options.cpp:1125
#: backends/platform/wii/options.cpp:47
#: backends/platform/wince/CELauncherDialog.cpp:58
msgid "OK"
@@ -158,7 +158,7 @@ msgstr ""
"українську"
#: gui/launcher.cpp:191 gui/launcher.cpp:205 gui/options.cpp:80
-#: gui/options.cpp:646 gui/options.cpp:656 gui/options.cpp:1087
+#: gui/options.cpp:654 gui/options.cpp:664 gui/options.cpp:1095
#: audio/null.cpp:42
msgid "<default>"
msgstr "<за умовчанням>"
@@ -176,11 +176,11 @@ msgctxt "lowres"
msgid "Platform:"
msgstr "Платформа:"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "Graphics"
msgstr "Графіка"
-#: gui/launcher.cpp:215 gui/options.cpp:956 gui/options.cpp:973
+#: gui/launcher.cpp:215 gui/options.cpp:964 gui/options.cpp:981
msgid "GFX"
msgstr "Грф"
@@ -193,7 +193,7 @@ msgctxt "lowres"
msgid "Override global graphic settings"
msgstr "Перекрити глобальні установки графіки"
-#: gui/launcher.cpp:227 gui/options.cpp:979
+#: gui/launcher.cpp:227 gui/options.cpp:987
msgid "Audio"
msgstr "Аудіо"
@@ -206,11 +206,11 @@ msgctxt "lowres"
msgid "Override global audio settings"
msgstr "Перекрити глобальні установки аудіо"
-#: gui/launcher.cpp:241 gui/options.cpp:984
+#: gui/launcher.cpp:241 gui/options.cpp:992
msgid "Volume"
msgstr "Гучність"
-#: gui/launcher.cpp:243 gui/options.cpp:986
+#: gui/launcher.cpp:243 gui/options.cpp:994
msgctxt "lowres"
msgid "Volume"
msgstr "Гучн-ть"
@@ -224,7 +224,7 @@ msgctxt "lowres"
msgid "Override global volume settings"
msgstr "Перекрити глобальні установки гучності"
-#: gui/launcher.cpp:255 gui/options.cpp:994
+#: gui/launcher.cpp:255 gui/options.cpp:1002
msgid "MIDI"
msgstr "MIDI"
@@ -237,7 +237,7 @@ msgctxt "lowres"
msgid "Override global MIDI settings"
msgstr "Перекрити глобальні установки MIDI"
-#: gui/launcher.cpp:270 gui/options.cpp:1000
+#: gui/launcher.cpp:270 gui/options.cpp:1008
msgid "MT-32"
msgstr "MT-32"
@@ -250,11 +250,11 @@ msgctxt "lowres"
msgid "Override global MT-32 settings"
msgstr "Перекрити глобальні установки MT-32"
-#: gui/launcher.cpp:286 gui/options.cpp:1007
+#: gui/launcher.cpp:286 gui/options.cpp:1015
msgid "Paths"
msgstr "Шляхи"
-#: gui/launcher.cpp:288 gui/options.cpp:1009
+#: gui/launcher.cpp:288 gui/options.cpp:1017
msgctxt "lowres"
msgid "Paths"
msgstr "Шляхи"
@@ -268,7 +268,7 @@ msgctxt "lowres"
msgid "Game Path:"
msgstr "Шлях до гри: "
-#: gui/launcher.cpp:302 gui/options.cpp:1029
+#: gui/launcher.cpp:302 gui/options.cpp:1037
msgid "Extra Path:"
msgstr "Додатк. шлях:"
@@ -276,30 +276,30 @@ msgstr "Додатк. шлях:"
msgid "Specifies path to additional data used the game"
msgstr "Вказує шлях до додаткових файлів даних для гри"
-#: gui/launcher.cpp:304 gui/options.cpp:1031
+#: gui/launcher.cpp:304 gui/options.cpp:1039
msgctxt "lowres"
msgid "Extra Path:"
msgstr "Дод. шлях:"
-#: gui/launcher.cpp:309 gui/options.cpp:1017
+#: gui/launcher.cpp:309 gui/options.cpp:1025
msgid "Save Path:"
msgstr "Шлях збер.: "
#: gui/launcher.cpp:309 gui/launcher.cpp:311 gui/launcher.cpp:312
-#: gui/options.cpp:1017 gui/options.cpp:1019 gui/options.cpp:1020
+#: gui/options.cpp:1025 gui/options.cpp:1027 gui/options.cpp:1028
msgid "Specifies where your savegames are put"
msgstr "Вказує шлях до збережень гри"
-#: gui/launcher.cpp:311 gui/options.cpp:1019
+#: gui/launcher.cpp:311 gui/options.cpp:1027
msgctxt "lowres"
msgid "Save Path:"
msgstr "Шлях збер.: "
#: gui/launcher.cpp:328 gui/launcher.cpp:411 gui/launcher.cpp:460
-#: gui/options.cpp:1026 gui/options.cpp:1032 gui/options.cpp:1039
-#: gui/options.cpp:1140 gui/options.cpp:1146 gui/options.cpp:1152
-#: gui/options.cpp:1160 gui/options.cpp:1184 gui/options.cpp:1188
-#: gui/options.cpp:1194 gui/options.cpp:1201 gui/options.cpp:1300
+#: gui/options.cpp:1034 gui/options.cpp:1040 gui/options.cpp:1047
+#: gui/options.cpp:1148 gui/options.cpp:1154 gui/options.cpp:1160
+#: gui/options.cpp:1168 gui/options.cpp:1192 gui/options.cpp:1196
+#: gui/options.cpp:1202 gui/options.cpp:1209 gui/options.cpp:1308
msgctxt "path"
msgid "None"
msgstr "Не заданий"
@@ -309,7 +309,7 @@ msgstr "Не заданий"
msgid "Default"
msgstr "За умовчанням"
-#: gui/launcher.cpp:453 gui/options.cpp:1294
+#: gui/launcher.cpp:453 gui/options.cpp:1302
msgid "Select SoundFont"
msgstr "Виберіть SoundFont"
@@ -416,17 +416,17 @@ msgstr "Пошук в списку ігор"
msgid "Search:"
msgstr "Пошук:"
-#: gui/launcher.cpp:600 gui/options.cpp:764
+#: gui/launcher.cpp:600 gui/options.cpp:772
msgid "Clear value"
msgstr "Очистити значення"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
msgid "Load game:"
msgstr "Завантажити гру:"
#: gui/launcher.cpp:622 engines/dialogs.cpp:117 engines/mohawk/myst.cpp:255
-#: engines/mohawk/riven.cpp:711 engines/cruise/menu.cpp:218
+#: engines/mohawk/riven.cpp:715 engines/cruise/menu.cpp:218
#: backends/platform/wince/CEActionsPocket.cpp:268
#: backends/platform/wince/CEActionsSmartphone.cpp:231
msgid "Load"
@@ -561,83 +561,83 @@ msgstr "44 кГц"
msgid "48 kHz"
msgstr "48 кГц"
-#: gui/options.cpp:241 gui/options.cpp:406 gui/options.cpp:504
-#: gui/options.cpp:563 gui/options.cpp:763
+#: gui/options.cpp:242 gui/options.cpp:407 gui/options.cpp:505
+#: gui/options.cpp:571 gui/options.cpp:771
msgctxt "soundfont"
msgid "None"
msgstr "Не заданий"
-#: gui/options.cpp:643
+#: gui/options.cpp:651
msgid "Graphics mode:"
msgstr "Графічн. режим:"
-#: gui/options.cpp:654
+#: gui/options.cpp:662
msgid "Render mode:"
msgstr "Режим раструв.:"
-#: gui/options.cpp:654 gui/options.cpp:655
+#: gui/options.cpp:662 gui/options.cpp:663
msgid "Special dithering modes supported by some games"
msgstr "Спеціальні режими рендерингу, які підтримують деякі ігри"
-#: gui/options.cpp:664
+#: gui/options.cpp:672
msgid "Fullscreen mode"
msgstr "Повноекранний режим"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Aspect ratio correction"
msgstr "Корекція співвідношення сторін"
-#: gui/options.cpp:667
+#: gui/options.cpp:675
msgid "Correct aspect ratio for 320x200 games"
msgstr "Коригувати співвідношення сторін для ігор з графікою 320x200"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "EGA undithering"
msgstr "EGA без згладжування"
-#: gui/options.cpp:668
+#: gui/options.cpp:676
msgid "Enable undithering in EGA games that support it"
msgstr "Вімкнути без згладжування в EGA іграх які підтримують це."
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Preferred Device:"
msgstr "Головн. пристрій:"
-#: gui/options.cpp:676
+#: gui/options.cpp:684
msgid "Music Device:"
msgstr "Музич. Пристрій:"
-#: gui/options.cpp:676 gui/options.cpp:678
+#: gui/options.cpp:684 gui/options.cpp:686
msgid "Specifies preferred sound device or sound card emulator"
msgstr "Вказує вихідний звуковий пристрій або емулятор звукової карти"
-#: gui/options.cpp:676 gui/options.cpp:678 gui/options.cpp:679
+#: gui/options.cpp:684 gui/options.cpp:686 gui/options.cpp:687
msgid "Specifies output sound device or sound card emulator"
msgstr "Вказує вихідний звуковий пристрій або емулятор звукової карти"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Preferred Dev.:"
msgstr "Реком. пристрій:"
-#: gui/options.cpp:678
+#: gui/options.cpp:686
msgctxt "lowres"
msgid "Music Device:"
msgstr "Музичний Пристрій:"
-#: gui/options.cpp:704
+#: gui/options.cpp:712
msgid "AdLib emulator:"
msgstr "Емулятор AdLib:"
-#: gui/options.cpp:704 gui/options.cpp:705
+#: gui/options.cpp:712 gui/options.cpp:713
msgid "AdLib is used for music in many games"
msgstr "Звукова карта AdLib використовується багатьма іграми"
-#: gui/options.cpp:715
+#: gui/options.cpp:723
msgid "Output rate:"
msgstr "Вихідна частота:"
-#: gui/options.cpp:715 gui/options.cpp:716
+#: gui/options.cpp:723 gui/options.cpp:724
msgid ""
"Higher value specifies better sound quality but may be not supported by your "
"soundcard"
@@ -645,63 +645,63 @@ msgstr ""
"Великі значення задають кращу якість звуку, проте вони можуть не "
"підтримуватися вашою звуковою картою"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "GM Device:"
msgstr "Пристрій GM:"
-#: gui/options.cpp:726
+#: gui/options.cpp:734
msgid "Specifies default sound device for General MIDI output"
msgstr "Вказує вихідний звуковий пристрій для MIDI"
-#: gui/options.cpp:737
+#: gui/options.cpp:745
msgid "Don't use General MIDI music"
msgstr "не використовувати General MIDI музику"
-#: gui/options.cpp:748 gui/options.cpp:809
+#: gui/options.cpp:756 gui/options.cpp:817
msgid "Use first available device"
msgstr "Використовувати перший наявний пристрій"
-#: gui/options.cpp:760
+#: gui/options.cpp:768
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:760 gui/options.cpp:762 gui/options.cpp:763
+#: gui/options.cpp:768 gui/options.cpp:770 gui/options.cpp:771
msgid "SoundFont is supported by some audio cards, Fluidsynth and Timidity"
msgstr ""
"SoundFont підтримується деякими звуковими картами, Fluidsynth і Timidity"
-#: gui/options.cpp:762
+#: gui/options.cpp:770
msgctxt "lowres"
msgid "SoundFont:"
msgstr "SoundFont:"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Mixed AdLib/MIDI mode"
msgstr "Змішаний режим AdLib/MIDI"
-#: gui/options.cpp:767
+#: gui/options.cpp:775
msgid "Use both MIDI and AdLib sound generation"
msgstr "Використовувати і MIDI і AdLib для генерації звуку"
-#: gui/options.cpp:770
+#: gui/options.cpp:778
msgid "MIDI gain:"
msgstr "Посилення MIDI:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "MT-32 Device:"
msgstr "Пристрій MT-32:"
-#: gui/options.cpp:780
+#: gui/options.cpp:788
msgid "Specifies default sound device for Roland MT-32/LAPC1/CM32l/CM64 output"
msgstr ""
"Вказує звуковий пристрій по умовчанню для виводу на Roland MT-32/LAPC1/CM32l/"
"CM64"
-#: gui/options.cpp:785
+#: gui/options.cpp:793
msgid "True Roland MT-32 (disable GM emulation)"
msgstr "Справжній Roland MT-32 (вимкнути емуляцию GM)"
-#: gui/options.cpp:785 gui/options.cpp:787
+#: gui/options.cpp:793 gui/options.cpp:795
msgid ""
"Check if you want to use your real hardware Roland-compatible sound device "
"connected to your computer"
@@ -709,193 +709,193 @@ msgstr ""
"Відмітьте, якщо у вас підключений Roland-сумісний звуковий пристрій і ви "
"хочете його використати"
-#: gui/options.cpp:787
+#: gui/options.cpp:795
msgctxt "lowres"
msgid "True Roland MT-32 (no GM emulation)"
msgstr "Справжній Roland MT-32 (вимкнути емуляцию GM)"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Enable Roland GS Mode"
msgstr "Увімкнути режим Roland GS"
-#: gui/options.cpp:790
+#: gui/options.cpp:798
msgid "Turns off General MIDI mapping for games with Roland MT-32 soundtrack"
msgstr ""
"Вимикає маппінг General MIDI для ігор із звуковою доріжкою для Roland MT-32"
-#: gui/options.cpp:799
+#: gui/options.cpp:807
msgid "Don't use Roland MT-32 music"
msgstr "Не використовувати Roland MT-32"
-#: gui/options.cpp:826
+#: gui/options.cpp:834
msgid "Text and Speech:"
msgstr "Текст і озвучка:"
-#: gui/options.cpp:830 gui/options.cpp:840
+#: gui/options.cpp:838 gui/options.cpp:848
msgid "Speech"
msgstr "Озвучка"
-#: gui/options.cpp:831 gui/options.cpp:841
+#: gui/options.cpp:839 gui/options.cpp:849
msgid "Subtitles"
msgstr "Субтитри"
-#: gui/options.cpp:832
+#: gui/options.cpp:840
msgid "Both"
msgstr "Все"
-#: gui/options.cpp:834
+#: gui/options.cpp:842
msgid "Subtitle speed:"
msgstr "Швид. субтитрів:"
-#: gui/options.cpp:836
+#: gui/options.cpp:844
msgctxt "lowres"
msgid "Text and Speech:"
msgstr "Текст і озвучка:"
-#: gui/options.cpp:840
+#: gui/options.cpp:848
msgid "Spch"
msgstr "Озв"
-#: gui/options.cpp:841
+#: gui/options.cpp:849
msgid "Subs"
msgstr "Суб"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgctxt "lowres"
msgid "Both"
msgstr "Все"
-#: gui/options.cpp:842
+#: gui/options.cpp:850
msgid "Show subtitles and play speech"
msgstr "Показувати субтитри і відтворювати мову"
-#: gui/options.cpp:844
+#: gui/options.cpp:852
msgctxt "lowres"
msgid "Subtitle speed:"
msgstr "Швид. субтитрів:"
-#: gui/options.cpp:860
+#: gui/options.cpp:868
msgid "Music volume:"
msgstr "Гучність музики:"
-#: gui/options.cpp:862
+#: gui/options.cpp:870
msgctxt "lowres"
msgid "Music volume:"
msgstr "Гучність музики:"
-#: gui/options.cpp:869
+#: gui/options.cpp:877
msgid "Mute All"
msgstr "Вимкнути все"
-#: gui/options.cpp:872
+#: gui/options.cpp:880
msgid "SFX volume:"
msgstr "Гучність ефектів:"
-#: gui/options.cpp:872 gui/options.cpp:874 gui/options.cpp:875
+#: gui/options.cpp:880 gui/options.cpp:882 gui/options.cpp:883
msgid "Special sound effects volume"
msgstr "Гучність спеціальних звукових ефектів"
-#: gui/options.cpp:874
+#: gui/options.cpp:882
msgctxt "lowres"
msgid "SFX volume:"
msgstr "Гучніс. ефектів:"
-#: gui/options.cpp:882
+#: gui/options.cpp:890
msgid "Speech volume:"
msgstr "Гучність озвучки:"
-#: gui/options.cpp:884
+#: gui/options.cpp:892
msgctxt "lowres"
msgid "Speech volume:"
msgstr "Гучніс. озвучки:"
-#: gui/options.cpp:1023
+#: gui/options.cpp:1031
msgid "Theme Path:"
msgstr "Шлях до тем:"
-#: gui/options.cpp:1025
+#: gui/options.cpp:1033
msgctxt "lowres"
msgid "Theme Path:"
msgstr "Шлях до тем:"
-#: gui/options.cpp:1029 gui/options.cpp:1031 gui/options.cpp:1032
+#: gui/options.cpp:1037 gui/options.cpp:1039 gui/options.cpp:1040
msgid "Specifies path to additional data used by all games or ScummVM"
msgstr ""
"Вказує шлях до додаткових файлів даних, використовуваних усіма іграми, або "
"ScummVM"
-#: gui/options.cpp:1036
+#: gui/options.cpp:1044
msgid "Plugins Path:"
msgstr "Шлях до плагінів:"
-#: gui/options.cpp:1038
+#: gui/options.cpp:1046
msgctxt "lowres"
msgid "Plugins Path:"
msgstr "Шлях до плагінів:"
-#: gui/options.cpp:1047
+#: gui/options.cpp:1055
msgid "Misc"
msgstr "Різне"
-#: gui/options.cpp:1049
+#: gui/options.cpp:1057
msgctxt "lowres"
msgid "Misc"
msgstr "Різне"
-#: gui/options.cpp:1051
+#: gui/options.cpp:1059
msgid "Theme:"
msgstr "Тема:"
-#: gui/options.cpp:1055
+#: gui/options.cpp:1063
msgid "GUI Renderer:"
msgstr "Растер. GUI:"
-#: gui/options.cpp:1067
+#: gui/options.cpp:1075
msgid "Autosave:"
msgstr "Автозбереження:"
-#: gui/options.cpp:1069
+#: gui/options.cpp:1077
msgctxt "lowres"
msgid "Autosave:"
msgstr "Автозбереж.:"
-#: gui/options.cpp:1077
+#: gui/options.cpp:1085
msgid "Keys"
msgstr "Клавіші"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "GUI Language:"
msgstr "Мова інтерф.:"
-#: gui/options.cpp:1084
+#: gui/options.cpp:1092
msgid "Language of ScummVM GUI"
msgstr "Мова графічного інтерфейсу ScummVM"
-#: gui/options.cpp:1233
+#: gui/options.cpp:1241
msgid "You have to restart ScummVM to take the effect."
msgstr "Ви повинні перезапустити ScummVM щоб застосувати зміни."
-#: gui/options.cpp:1246
+#: gui/options.cpp:1254
msgid "Select directory for savegames"
msgstr "Виберіть папку для збережень"
-#: gui/options.cpp:1253
+#: gui/options.cpp:1261
msgid "The chosen directory cannot be written to. Please select another one."
msgstr "Не можу писати у вибрану папку. Будь ласка, вкажіть іншу."
-#: gui/options.cpp:1262
+#: gui/options.cpp:1270
msgid "Select directory for GUI themes"
msgstr "Виберіть папку для тем GUI"
-#: gui/options.cpp:1272
+#: gui/options.cpp:1280
msgid "Select directory for extra files"
msgstr "Виберіть папку з додатковими файлами"
-#: gui/options.cpp:1283
+#: gui/options.cpp:1291
msgid "Select directory for plugins"
msgstr "Виберіть папку з плагинами"
-#: gui/options.cpp:1328
+#: gui/options.cpp:1335
msgid ""
"The theme you selected does not support your current language. If you want "
"to use this theme you need to switch to another language first."
@@ -968,88 +968,107 @@ msgstr "Растеризатор зі згладжуванням (16bpp)"
msgid "Antialiased (16bpp)"
msgstr "Растеризатор зі згладжуванням (16bpp)"
-#: base/main.cpp:206
+#: base/main.cpp:201
#, c-format
msgid "Engine does not support debug level '%s'"
msgstr "Движок не підтримує рівень відладки '%s'"
-#: base/main.cpp:274
+#: base/main.cpp:269
msgid "Menu"
msgstr "Меню"
-#: base/main.cpp:277 backends/platform/symbian/src/SymbianActions.cpp:48
+#: base/main.cpp:272 backends/platform/symbian/src/SymbianActions.cpp:48
#: backends/platform/wince/CEActionsPocket.cpp:48
#: backends/platform/wince/CEActionsSmartphone.cpp:49
msgid "Skip"
msgstr "Пропустити"
-#: base/main.cpp:280 backends/platform/symbian/src/SymbianActions.cpp:53
+#: base/main.cpp:275 backends/platform/symbian/src/SymbianActions.cpp:53
#: backends/platform/wince/CEActionsPocket.cpp:45
msgid "Pause"
msgstr "Пауза"
-#: base/main.cpp:283
+#: base/main.cpp:278
msgid "Skip line"
msgstr "Пропустити рядок"
-#: base/main.cpp:435
+#: base/main.cpp:433
msgid "Error running game:"
msgstr "Помилка запуску гри:"
-#: base/main.cpp:459
+#: base/main.cpp:457
msgid "Could not find any engine capable of running the selected game"
msgstr "Не можу знайти движок для запуску вибраної гри"
-#: common/error.cpp:43
-msgid "Invalid Path"
-msgstr "Неправильний шлях"
+#: common/error.cpp:42
+msgid "No error"
+msgstr ""
#: common/error.cpp:44
-msgid "Game Data not found"
+#, fuzzy
+msgid "Game data not found"
msgstr "Немає файлів гри"
-#: common/error.cpp:45
-msgid "Game Id not supported"
+#: common/error.cpp:46
+#, fuzzy
+msgid "Game id not supported"
msgstr "Game Id не підтримується"
-#: common/error.cpp:46
-msgid "Unsupported Color Mode"
+#: common/error.cpp:48
+#, fuzzy
+msgid "Unsupported color mode"
msgstr "Режим Кольору не підтримується"
-#: common/error.cpp:48
+#: common/error.cpp:51
msgid "Read permission denied"
msgstr "Недостатньо прав для читання"
-#: common/error.cpp:49
+#: common/error.cpp:53
msgid "Write permission denied"
msgstr "Недостатньо прав для запису"
-#: common/error.cpp:52
-msgid "Path not exists"
+#: common/error.cpp:56
+#, fuzzy
+msgid "Path does not exist"
msgstr "Шлях не знайдений"
-#: common/error.cpp:53
+#: common/error.cpp:58
msgid "Path not a directory"
msgstr "Шлях не є папкою"
-#: common/error.cpp:54
+#: common/error.cpp:60
msgid "Path not a file"
msgstr "Шлях не є файлом"
-#: common/error.cpp:56
+#: common/error.cpp:63
msgid "Cannot create file"
msgstr "Не можу створити файл"
-#: common/error.cpp:57
-msgid "Reading failed"
+#: common/error.cpp:65
+#, fuzzy
+msgid "Reading data failed"
msgstr "Помилка читання"
-#: common/error.cpp:58
+#: common/error.cpp:67
msgid "Writing data failed"
msgstr "Помилка запису даних"
-#: common/error.cpp:60 common/error.cpp:71
-msgid "Unknown Error"
+#: common/error.cpp:70
+msgid "Could not find suitable engine plugin"
+msgstr ""
+
+#: common/error.cpp:72
+#, fuzzy
+msgid "Engine plugin does not support save states"
+msgstr "Движок не підтримує рівень відладки '%s'"
+
+#: common/error.cpp:75
+msgid "Command line argument not processed"
+msgstr ""
+
+#: common/error.cpp:79
+#, fuzzy
+msgid "Unknown error"
msgstr "Невідома помилка"
#: common/util.cpp:276
@@ -1118,13 +1137,13 @@ msgstr "Зберегти гру: "
msgid "Save"
msgstr "Записати"
-#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:84
-#: engines/mohawk/dialogs.cpp:118
+#: engines/dialogs.cpp:315 engines/mohawk/dialogs.cpp:92
+#: engines/mohawk/dialogs.cpp:130
msgid "~O~K"
msgstr "~O~K"
-#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:85
-#: engines/mohawk/dialogs.cpp:119
+#: engines/dialogs.cpp:316 engines/mohawk/dialogs.cpp:93
+#: engines/mohawk/dialogs.cpp:131
msgid "~C~ancel"
msgstr "Ві~д~міна"
@@ -1663,7 +1682,7 @@ msgstr "Летіти направо"
msgid "Fly to lower right"
msgstr "Летіти нижче вправо"
-#: engines/scumm/scumm.cpp:2256 engines/agos/saveload.cpp:192
+#: engines/scumm/scumm.cpp:2255 engines/agos/saveload.cpp:192
#, c-format
msgid ""
"Failed to save game state to file:\n"
@@ -1674,7 +1693,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2263 engines/agos/saveload.cpp:157
+#: engines/scumm/scumm.cpp:2262 engines/agos/saveload.cpp:157
#, c-format
msgid ""
"Failed to load game state from file:\n"
@@ -1685,7 +1704,7 @@ msgstr ""
"\n"
"%s"
-#: engines/scumm/scumm.cpp:2275 engines/agos/saveload.cpp:200
+#: engines/scumm/scumm.cpp:2274 engines/agos/saveload.cpp:200
#, c-format
msgid ""
"Successfully saved game state in file:\n"
@@ -1696,15 +1715,22 @@ msgstr ""
"\n"
"%s"
-#: engines/mohawk/dialogs.cpp:81 engines/mohawk/dialogs.cpp:115
+#: engines/scumm/scumm.cpp:2497
+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 ""
+
+#: engines/mohawk/dialogs.cpp:89 engines/mohawk/dialogs.cpp:127
msgid "~Z~ip Mode Activated"
msgstr "Режим швидкого переходу активований"
-#: engines/mohawk/dialogs.cpp:82
+#: engines/mohawk/dialogs.cpp:90
msgid "~T~ransitions Enabled"
msgstr "Переходи активовані"
-#: engines/mohawk/dialogs.cpp:116
+#: engines/mohawk/dialogs.cpp:128
msgid "~W~ater Effect Enabled"
msgstr "Ефекти води включені"
@@ -1724,7 +1750,7 @@ msgstr "Емулятор MAME OPL:"
msgid "DOSBox OPL emulator"
msgstr "Емулятор DOSBox OPL"
-#: audio/null.h:45
+#: audio/null.h:46
msgid "No music"
msgstr "Без музики"
@@ -1744,11 +1770,11 @@ msgstr "Apple II GS Емулятор (НЕ РЕАЛІЗОВАНО)"
msgid "C64 Audio Emulator"
msgstr "C64 Аудіо Емулятор"
-#: audio/softsynth/mt32.cpp:327
+#: audio/softsynth/mt32.cpp:326
msgid "Initialising MT-32 Emulator"
msgstr "Настроюю емулятор MT-32"
-#: audio/softsynth/mt32.cpp:541
+#: audio/softsynth/mt32.cpp:540
msgid "MT-32 Emulator"
msgstr "Емулятор MT-32"
@@ -1780,7 +1806,7 @@ msgstr " (Глобальна)"
msgid " (Game)"
msgstr " (Ігри)"
-#: backends/midi/windows.cpp:162
+#: backends/midi/windows.cpp:165
msgid "Windows MIDI"
msgstr "Windows MIDI"
@@ -2203,3 +2229,6 @@ msgid ""
msgstr ""
"Не забудьте перепризначити кнопку для дії 'Сховати Панель інстр.' щоб "
"побачити весь інвентар"
+
+#~ msgid "Invalid Path"
+#~ msgstr "Неправильний шлях"
diff --git a/ports.mk b/ports.mk
index 163070f9ab..958453ab0f 100644
--- a/ports.mk
+++ b/ports.mk
@@ -165,8 +165,8 @@ osxsnap: bundle
# Windows specific
#
-scummvmico.o: $(srcdir)/icons/scummvm.ico
- $(WINDRES) $(WINDRESFLAGS) -I$(srcdir) $(srcdir)/dists/scummvm.rc scummvmico.o
+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 create a win32 snapshot binary
win32dist: $(EXECUTABLE)
@@ -184,7 +184,22 @@ endif
cp $(srcdir)/README $(WIN32PATH)/README.txt
cp /usr/local/README-SDL.txt $(WIN32PATH)
cp /usr/local/bin/SDL.dll $(WIN32PATH)
- u2d $(WIN32PATH)/*.txt
+ cp $(srcdir)/icons/scummvm.ico $(WIN32PATH)
+ cp $(srcdir)/dists/win32/ScummVM.iss $(WIN32PATH)
+ unix2dos $(WIN32PATH)/*.txt
+
+# Special target to create a win32 installer
+# (extensions for text files are removed, as they are read
+# as-is by the setup script and renamed there)
+win32setup: win32dist
+ mv $(WIN32PATH)/AUTHORS.txt $(WIN32PATH)/AUTHORS
+ mv $(WIN32PATH)/COPYING.txt $(WIN32PATH)/COPYING
+ mv $(WIN32PATH)/COPYING.LGPL.txt $(WIN32PATH)/COPYING.LGPL
+ mv $(WIN32PATH)/COPYRIGHT.txt $(WIN32PATH)/COPYRIGHT
+ mv $(WIN32PATH)/NEWS.txt $(WIN32PATH)/NEWS
+ mv $(WIN32PATH)/README.txt $(WIN32PATH)/README
+ mv $(WIN32PATH)/README-SDL.txt $(WIN32PATH)/README-SDL
+ makensis -V2 -Dtop_srcdir="../../$(srcdir)" -Dtext_dir="../../$(WIN32PATH)" -Dbuild_dir="../../$(WIN32PATH)" $(srcdir)/dists/nsis/scummvm.nsi
#
# AmigaOS specific
@@ -204,30 +219,3 @@ endif
# Mark special targets as phony
.PHONY: deb bundle osxsnap win32dist install uninstall
-#
-# ARM specific
-#
-ifdef USE_TREMOLO
-DEFINES += -DUSE_TREMOR -DUSE_VORBIS -DUSE_TREMOLO
-LIBS += -ltremolo
-endif
-
-ifdef USE_ARM_SMUSH_ASM
-DEFINES += -DUSE_ARM_SMUSH_ASM
-endif
-
-ifdef USE_ARM_SOUND_ASM
-DEFINES += -DUSE_ARM_SOUND_ASM
-endif
-
-ifdef USE_ARM_GFX_ASM
-DEFINES += -DUSE_ARM_GFX_ASM
-endif
-
-ifdef USE_ARM_COSTUME_ASM
-DEFINES += -DUSE_ARM_COSTUME_ASM
-endif
-
-ifdef USE_ARM_SCALER_ASM
-DEFINES += -DUSE_ARM_SCALER_ASM
-endif
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 715741f41d..47322c86b7 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -23,10 +23,9 @@
*
*/
-#include "common/endian.h"
-#include "common/file.h"
#include "common/stream.h"
-#include "common/events.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
@@ -407,7 +406,7 @@ Codec *AviDecoder::createCodec() {
case ID_IV32:
return new Indeo3Decoder(_bmInfo.width, _bmInfo.height);
#endif
-#ifdef GRAPHICS_TRUEMOTION1_H
+#ifdef VIDEO_CODECS_TRUEMOTION1_H
case ID_DUCK:
return new TrueMotion1Decoder(_bmInfo.width, _bmInfo.height);
#endif
diff --git a/video/avi_decoder.h b/video/avi_decoder.h
index 33189910c7..0154b57ea6 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -26,13 +26,34 @@
#ifndef VIDEO_AVI_PLAYER_H
#define VIDEO_AVI_PLAYER_H
+#include "common/endian.h"
+#include "common/rational.h"
+#include "common/rect.h"
+#include "common/str.h"
+
#include "video/video_decoder.h"
-#include "video/codecs/codec.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
+namespace Audio {
+class QueuingAudioStream;
+}
+
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Graphics {
+struct PixelFormat;
+}
+
+namespace Graphics {
+struct Surface;
+}
+
namespace Video {
+class Codec;
+
#define UNKNOWN_HEADER(a) error("Unknown header found -- \'%s\'", tag2str(a))
// IDs used throughout the AVI files
diff --git a/video/codecs/cdtoons.cpp b/video/codecs/cdtoons.cpp
index bdca5f9c80..51e3c23eaa 100644
--- a/video/codecs/cdtoons.cpp
+++ b/video/codecs/cdtoons.cpp
@@ -24,9 +24,9 @@
*/
#include "video/codecs/cdtoons.h"
+#include "common/rect.h"
#include "common/stream.h"
-
-#include "common/system.h"
+#include "common/textconsole.h"
namespace Video {
@@ -54,7 +54,7 @@ CDToonsDecoder::CDToonsDecoder(uint16 width, uint16 height) {
debugN(5, "CDToons: width %d, height %d\n", width, height);
_surface = new Graphics::Surface();
- _surface->create(width, height, 1);
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
_currentPaletteId = 0;
memset(_palette, 0, 256 * 3);
@@ -75,7 +75,7 @@ Graphics::Surface *CDToonsDecoder::decodeImage(Common::SeekableReadStream *strea
uint16 blocksValidUntil = stream->readUint16BE();
byte u6 = stream->readByte();
byte backgroundColor = stream->readByte();
- debugN(5, "CDToons frame %d, size %d, unknown %04x (at 0), blocks valid until %d, unknown 6 is %02x, bkg colour is %02x\n",
+ debugN(5, "CDToons frame %d, size %d, unknown %04x (at 0), blocks valid until %d, unknown 6 is %02x, bkg color is %02x\n",
frameId, stream->size(), u0, blocksValidUntil, u6, backgroundColor);
Common::Rect clipRect = readRect(stream);
diff --git a/video/codecs/cinepak.cpp b/video/codecs/cinepak.cpp
index 2f5cb73561..2a782dbafe 100644
--- a/video/codecs/cinepak.cpp
+++ b/video/codecs/cinepak.cpp
@@ -25,7 +25,13 @@
#include "video/codecs/cinepak.h"
+#include "common/debug.h"
+#include "common/stream.h"
#include "common/system.h"
+#include "common/textconsole.h"
+#include "common/util.h"
+
+#include "graphics/surface.h"
// Code here partially based off of ffmpeg ;)
@@ -89,7 +95,7 @@ const Graphics::Surface *CinepakDecoder::decodeImage(Common::SeekableReadStream
if (!_curFrame.surface) {
_curFrame.surface = new Graphics::Surface();
- _curFrame.surface->create(_curFrame.width, _curFrame.height, _pixelFormat.bytesPerPixel);
+ _curFrame.surface->create(_curFrame.width, _curFrame.height, _pixelFormat);
}
// Reset the y variable.
diff --git a/video/codecs/cinepak.h b/video/codecs/cinepak.h
index 8b4c0216a3..34e4fe98eb 100644
--- a/video/codecs/cinepak.h
+++ b/video/codecs/cinepak.h
@@ -27,13 +27,19 @@
#define VIDEO_CODECS_CINEPAK_H
#include "common/scummsys.h"
-#include "common/stream.h"
#include "common/rect.h"
-#include "graphics/surface.h"
#include "graphics/pixelformat.h"
#include "video/codecs/codec.h"
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Graphics {
+struct Surface;
+}
+
namespace Video {
struct CinepakCodebook {
diff --git a/video/codecs/indeo3.cpp b/video/codecs/indeo3.cpp
index e7f470bd3a..b4f6c6ffe3 100644
--- a/video/codecs/indeo3.cpp
+++ b/video/codecs/indeo3.cpp
@@ -35,8 +35,8 @@
#include "common/system.h"
#include "common/endian.h"
-#include "common/frac.h"
-#include "common/file.h"
+#include "common/stream.h"
+#include "common/textconsole.h"
#include "graphics/conversion.h"
@@ -51,7 +51,7 @@ Indeo3Decoder::Indeo3Decoder(uint16 width, uint16 height) : _ModPred(0), _correc
_pixelFormat = g_system->getScreenFormat();
_surface = new Graphics::Surface;
- _surface->create(width, height, _pixelFormat.bytesPerPixel);
+ _surface->create(width, height, _pixelFormat);
buildModPred();
allocFrames();
@@ -322,10 +322,10 @@ const Graphics::Surface *Indeo3Decoder::decodeImage(Common::SeekableReadStream *
const uint32 color = _pixelFormat.RGBToColor(r, g, b);
- for (uint32 sW = 0; sW < scaleWidth; sW++, rowDest += _surface->bytesPerPixel) {
- if (_surface->bytesPerPixel == 1)
+ for (uint32 sW = 0; sW < scaleWidth; sW++, rowDest += _surface->format.bytesPerPixel) {
+ if (_surface->format.bytesPerPixel == 1)
*((uint8 *)rowDest) = (uint8)color;
- else if (_surface->bytesPerPixel == 2)
+ else if (_surface->format.bytesPerPixel == 2)
*((uint16 *)rowDest) = (uint16)color;
}
}
diff --git a/video/codecs/mjpeg.cpp b/video/codecs/mjpeg.cpp
index d6ec391a84..2ef854039b 100644
--- a/video/codecs/mjpeg.cpp
+++ b/video/codecs/mjpeg.cpp
@@ -24,10 +24,16 @@
*/
#include "common/system.h"
-#include "graphics/conversion.h" // For YUV2RGB
+#include "common/textconsole.h"
+#include "graphics/jpeg.h"
+#include "graphics/surface.h"
#include "video/codecs/mjpeg.h"
+namespace Common {
+class SeekableReadStream;
+}
+
namespace Video {
JPEGDecoder::JPEGDecoder() : Codec() {
@@ -53,7 +59,7 @@ const Graphics::Surface *JPEGDecoder::decodeImage(Common::SeekableReadStream* st
if (!_surface) {
_surface = new Graphics::Surface();
- _surface->create(_jpeg->getWidth(), _jpeg->getHeight(), _pixelFormat.bytesPerPixel);
+ _surface->create(_jpeg->getWidth(), _jpeg->getHeight(), _pixelFormat);
}
Graphics::Surface *frame = _jpeg->getSurface(_pixelFormat);
diff --git a/video/codecs/mjpeg.h b/video/codecs/mjpeg.h
index c9f931f091..d1395a8248 100644
--- a/video/codecs/mjpeg.h
+++ b/video/codecs/mjpeg.h
@@ -26,12 +26,18 @@
#ifndef VIDEO_CODECS_MJPEG_H
#define VIDEO_CODECS_MJPEG_H
-#include "common/scummsys.h"
-
#include "video/codecs/codec.h"
-#include "graphics/jpeg.h"
#include "graphics/pixelformat.h"
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Graphics {
+class JPEG;
+struct Surface;
+}
+
namespace Video {
// Motion JPEG Decoder
diff --git a/video/codecs/msrle.cpp b/video/codecs/msrle.cpp
index 46158c49d7..19309bc7aa 100644
--- a/video/codecs/msrle.cpp
+++ b/video/codecs/msrle.cpp
@@ -27,12 +27,13 @@
#include "video/codecs/msrle.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Video {
MSRLEDecoder::MSRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) {
_surface = new Graphics::Surface();
- _surface->create(width, height, 1);
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
_bitsPerPixel = bitsPerPixel;
}
diff --git a/video/codecs/msvideo1.cpp b/video/codecs/msvideo1.cpp
index 2075d7f013..93e9aaae64 100644
--- a/video/codecs/msvideo1.cpp
+++ b/video/codecs/msvideo1.cpp
@@ -27,6 +27,7 @@
#include "video/codecs/msvideo1.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Video {
@@ -38,7 +39,8 @@ namespace Video {
MSVideo1Decoder::MSVideo1Decoder(uint16 width, uint16 height, byte bitsPerPixel) : Codec() {
_surface = new Graphics::Surface();
- _surface->create(width, height, (bitsPerPixel == 8) ? 1 : 2);
+ // TODO: Specify the correct pixel format for 2Bpp mode.
+ _surface->create(width, height, (bitsPerPixel == 8) ? Graphics::PixelFormat::createFormatCLUT8() : Graphics::PixelFormat(2, 0, 0, 0, 0, 0, 0, 0, 0));
_bitsPerPixel = bitsPerPixel;
}
diff --git a/video/codecs/qtrle.cpp b/video/codecs/qtrle.cpp
index 26b2f02ce1..0ae27f6284 100644
--- a/video/codecs/qtrle.cpp
+++ b/video/codecs/qtrle.cpp
@@ -28,9 +28,11 @@
#include "video/codecs/qtrle.h"
+#include "common/debug.h"
#include "common/scummsys.h"
#include "common/stream.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "graphics/colormasks.h"
#include "graphics/surface.h"
@@ -48,7 +50,7 @@ QTRLEDecoder::QTRLEDecoder(uint16 width, uint16 height, byte bitsPerPixel) : Cod
debug(2, "QTRLE corrected width: %d", width);
_surface = new Graphics::Surface();
- _surface->create(width, height, _bitsPerPixel <= 8 ? 1 : _pixelFormat.bytesPerPixel);
+ _surface->create(width, height, _bitsPerPixel <= 8 ? Graphics::PixelFormat::createFormatCLUT8() : _pixelFormat);
}
#define CHECK_STREAM_PTR(n) \
diff --git a/video/codecs/rpza.cpp b/video/codecs/rpza.cpp
index cc9739b673..0c06661c50 100644
--- a/video/codecs/rpza.cpp
+++ b/video/codecs/rpza.cpp
@@ -27,8 +27,10 @@
#include "video/codecs/rpza.h"
+#include "common/debug.h"
#include "common/system.h"
#include "common/stream.h"
+#include "common/textconsole.h"
#include "graphics/colormasks.h"
namespace Video {
@@ -44,7 +46,7 @@ RPZADecoder::RPZADecoder(uint16 width, uint16 height) : Codec() {
debug(2, "RPZA corrected width: %d", width);
_surface = new Graphics::Surface();
- _surface->create(width, height, _pixelFormat.bytesPerPixel);
+ _surface->create(width, height, _pixelFormat);
}
RPZADecoder::~RPZADecoder() {
diff --git a/video/codecs/smc.cpp b/video/codecs/smc.cpp
index d03c60490f..bbd6073497 100644
--- a/video/codecs/smc.cpp
+++ b/video/codecs/smc.cpp
@@ -27,6 +27,7 @@
#include "video/codecs/smc.h"
#include "common/stream.h"
+#include "common/textconsole.h"
namespace Video {
@@ -49,7 +50,7 @@ namespace Video {
SMCDecoder::SMCDecoder(uint16 width, uint16 height) {
_surface = new Graphics::Surface();
- _surface->create(width, height, 1);
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
}
SMCDecoder::~SMCDecoder() {
diff --git a/video/codecs/truemotion1.cpp b/video/codecs/truemotion1.cpp
index a0456869ab..b7d1f406d7 100644
--- a/video/codecs/truemotion1.cpp
+++ b/video/codecs/truemotion1.cpp
@@ -32,6 +32,8 @@
#include "video/codecs/truemotion1data.h"
#include "common/stream.h"
+#include "common/textconsole.h"
+#include "common/util.h"
namespace Video {
@@ -58,12 +60,14 @@ enum {
};
// { valid for metatype }, algorithm, num of deltas, vert res, horiz res
-struct {
+struct CompressionType {
int algorithm;
int blockWidth; // vres
int blockHeight; // hres
int blockType;
-} static const compressionTypes[17] = {
+};
+
+static const CompressionType compressionTypes[17] = {
{ ALGO_NOP, 0, 0, 0 },
{ ALGO_RGB16V, 4, 4, BLOCK_4x4 },
@@ -92,7 +96,7 @@ TrueMotion1Decoder::TrueMotion1Decoder(uint16 width, uint16 height) {
_width = width;
_height = height;
- _surface->create(width, height, 2);
+ _surface->create(width, height, getPixelFormat());
// there is a vertical predictor for each pixel in a line; each vertical
// predictor is 0 to start with
diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp
index 0ab12e91cc..4448c9162e 100644
--- a/video/coktel_decoder.cpp
+++ b/video/coktel_decoder.cpp
@@ -24,6 +24,13 @@
*/
#include "common/scummsys.h"
+#include "common/rect.h"
+#include "common/endian.h"
+#include "common/stream.h"
+#include "common/system.h"
+#include "common/textconsole.h"
+#include "common/types.h"
+#include "common/util.h"
#include "video/coktel_decoder.h"
@@ -92,11 +99,12 @@ void CoktelDecoder::setSurfaceMemory(void *mem, uint16 width, uint16 height, uin
assert(bpp == getPixelFormat().bytesPerPixel);
// Create a surface over this memory
- _surface.w = width;
- _surface.h = height;
- _surface.pitch = width * bpp;
- _surface.pixels = mem;
- _surface.bytesPerPixel = bpp;
+ _surface.w = width;
+ _surface.h = height;
+ _surface.pitch = width * bpp;
+ _surface.pixels = mem;
+ // TODO: Check whether it is fine to assume we want the setup PixelFormat.
+ _surface.format = getPixelFormat();
_ownSurface = false;
}
@@ -127,18 +135,18 @@ void CoktelDecoder::createSurface() {
return;
if ((_width > 0) && (_height > 0))
- _surface.create(_width, _height, getPixelFormat().bytesPerPixel);
+ _surface.create(_width, _height, getPixelFormat());
_ownSurface = true;
}
void CoktelDecoder::freeSurface() {
if (!_ownSurface) {
- _surface.w = 0;
- _surface.h = 0;
- _surface.pitch = 0;
- _surface.pixels = 0;
- _surface.bytesPerPixel = 0;
+ _surface.w = 0;
+ _surface.h = 0;
+ _surface.pitch = 0;
+ _surface.pixels = 0;
+ _surface.format = Graphics::PixelFormat();
} else
_surface.free();
@@ -449,11 +457,11 @@ void CoktelDecoder::renderBlockWhole(Graphics::Surface &dstSurf, const byte *src
rect.clip(dstSurf.w, dstSurf.h);
- byte *dst = (byte *)dstSurf.pixels + (rect.top * dstSurf.pitch) + rect.left * dstSurf.bytesPerPixel;
+ byte *dst = (byte *)dstSurf.pixels + (rect.top * dstSurf.pitch) + rect.left * dstSurf.format.bytesPerPixel;
for (int i = 0; i < rect.height(); i++) {
- memcpy(dst, src, rect.width() * dstSurf.bytesPerPixel);
+ memcpy(dst, src, rect.width() * dstSurf.format.bytesPerPixel);
- src += srcRect.width() * dstSurf.bytesPerPixel;
+ src += srcRect.width() * dstSurf.format.bytesPerPixel;
dst += dstSurf.pitch;
}
}
@@ -1375,12 +1383,12 @@ bool IMDDecoder::renderFrame(Common::Rect &rect) {
if ((type == 2) && (rect.width() == _surface.w) && (_x == 0)) {
// Directly uncompress onto the video surface
- const int offsetX = rect.left * _surface.bytesPerPixel;
+ const int offsetX = rect.left * _surface.format.bytesPerPixel;
const int offsetY = (_y + rect.top) * _surface.pitch;
const int offset = offsetX + offsetY;
if (deLZ77((byte *)_surface.pixels + offset, dataPtr, dataSize,
- _surface.w * _surface.h * _surface.bytesPerPixel - offset))
+ _surface.w * _surface.h * _surface.format.bytesPerPixel - offset))
return true;
}
@@ -1806,11 +1814,11 @@ bool VMDDecoder::assessVideoProperties() {
_videoBuffer[i] = new byte[_videoBufferSize];
memset(_videoBuffer[i], 0, _videoBufferSize);
- _8bppSurface[i].w = _width * _bytesPerPixel;
- _8bppSurface[i].h = _height;
- _8bppSurface[i].pitch = _width * _bytesPerPixel;
- _8bppSurface[i].pixels = _videoBuffer[i];
- _8bppSurface[i].bytesPerPixel = 1;
+ _8bppSurface[i].w = _width * _bytesPerPixel;
+ _8bppSurface[i].h = _height;
+ _8bppSurface[i].pitch = _width * _bytesPerPixel;
+ _8bppSurface[i].pixels = _videoBuffer[i];
+ _8bppSurface[i].format = Graphics::PixelFormat::createFormatCLUT8();
}
}
@@ -2223,12 +2231,12 @@ bool VMDDecoder::renderFrame(Common::Rect &rect) {
if ((type == 2) && (rect.width() == _surface.w) && (_x == 0) && (_blitMode == 0)) {
// Directly uncompress onto the video surface
- const int offsetX = rect.left * _surface.bytesPerPixel;
+ const int offsetX = rect.left * _surface.format.bytesPerPixel;
const int offsetY = (_y + rect.top) * _surface.pitch;
const int offset = offsetX - offsetY;
if (deLZ77((byte *)_surface.pixels + offset, dataPtr, dataSize,
- _surface.w * _surface.h * _surface.bytesPerPixel - offset))
+ _surface.w * _surface.h * _surface.format.bytesPerPixel - offset))
return true;
}
@@ -2338,13 +2346,13 @@ void VMDDecoder::blit16(const Graphics::Surface &srcSurf, Common::Rect &rect) {
const byte *src = (byte *)srcSurf.pixels +
(srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel;
byte *dst = (byte *)_surface.pixels +
- ((_y + rect.top) * _surface.pitch) + (_x + rect.left) * _surface.bytesPerPixel;
+ ((_y + rect.top) * _surface.pitch) + (_x + rect.left) * _surface.format.bytesPerPixel;
for (int i = 0; i < rect.height(); i++) {
const byte *srcRow = src;
byte *dstRow = dst;
- for (int j = 0; j < rect.width(); j++, srcRow += 2, dstRow += _surface.bytesPerPixel) {
+ for (int j = 0; j < rect.width(); j++, srcRow += 2, dstRow += _surface.format.bytesPerPixel) {
uint16 data = READ_LE_UINT16(srcRow);
byte r = ((data & 0x7C00) >> 10) << 3;
@@ -2355,7 +2363,7 @@ void VMDDecoder::blit16(const Graphics::Surface &srcSurf, Common::Rect &rect) {
if ((r == 0) && (g == 0) && (b == 0))
c = 0;
- if (_surface.bytesPerPixel == 2)
+ if (_surface.format.bytesPerPixel == 2)
*((uint16 *)dstRow) = (uint16) c;
}
@@ -2376,13 +2384,13 @@ void VMDDecoder::blit24(const Graphics::Surface &srcSurf, Common::Rect &rect) {
const byte *src = (byte *)srcSurf.pixels +
(srcRect.top * srcSurf.pitch) + srcRect.left * _bytesPerPixel;
byte *dst = (byte *)_surface.pixels +
- ((_y + rect.top) * _surface.pitch) + (_x + rect.left) * _surface.bytesPerPixel;
+ ((_y + rect.top) * _surface.pitch) + (_x + rect.left) * _surface.format.bytesPerPixel;
for (int i = 0; i < rect.height(); i++) {
const byte *srcRow = src;
byte *dstRow = dst;
- for (int j = 0; j < rect.width(); j++, srcRow += 3, dstRow += _surface.bytesPerPixel) {
+ for (int j = 0; j < rect.width(); j++, srcRow += 3, dstRow += _surface.format.bytesPerPixel) {
byte r = srcRow[2];
byte g = srcRow[1];
byte b = srcRow[0];
@@ -2391,7 +2399,7 @@ void VMDDecoder::blit24(const Graphics::Surface &srcSurf, Common::Rect &rect) {
if ((r == 0) && (g == 0) && (b == 0))
c = 0;
- if (_surface.bytesPerPixel == 2)
+ if (_surface.format.bytesPerPixel == 2)
*((uint16 *)dstRow) = (uint16) c;
}
diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h
index e83e1d29ed..46007d55da 100644
--- a/video/coktel_decoder.h
+++ b/video/coktel_decoder.h
@@ -35,14 +35,25 @@
#include "common/list.h"
#include "common/array.h"
-#include "common/rect.h"
+#include "common/rational.h"
+#include "common/str.h"
+
+#include "graphics/surface.h"
#include "video/video_decoder.h"
#include "audio/mixer.h"
+namespace Common {
+struct Rect;
+class SeekableReadStream;
+}
namespace Audio {
- class QueuingAudioStream;
+class QueuingAudioStream;
+}
+
+namespace Graphics {
+struct PixelFormat;
}
namespace Video {
diff --git a/video/dxa_decoder.cpp b/video/dxa_decoder.cpp
index a64b8f6fee..9e3f59705c 100644
--- a/video/dxa_decoder.cpp
+++ b/video/dxa_decoder.cpp
@@ -25,10 +25,11 @@
#include "common/debug.h"
#include "common/endian.h"
-#include "common/archive.h"
#include "common/system.h"
#include "common/stream.h"
-#include "common/util.h"
+#include "common/textconsole.h"
+
+#include "graphics/surface.h"
#include "video/dxa_decoder.h"
@@ -101,7 +102,7 @@ bool DXADecoder::loadStream(Common::SeekableReadStream *stream) {
}
_surface = new Graphics::Surface();
- _surface->bytesPerPixel = 1;
+ _surface->format = Graphics::PixelFormat::createFormatCLUT8();
debug(2, "flags 0x0%x framesCount %d width %d height %d rate %d", flags, getFrameCount(), getWidth(), getHeight(), getFrameRate().toInt());
diff --git a/video/dxa_decoder.h b/video/dxa_decoder.h
index 614cb2d90b..498f4630d4 100644
--- a/video/dxa_decoder.h
+++ b/video/dxa_decoder.h
@@ -26,8 +26,18 @@
#ifndef VIDEO_DXA_DECODER_H
#define VIDEO_DXA_DECODER_H
+#include "common/rational.h"
+#include "graphics/pixelformat.h"
#include "video/video_decoder.h"
+namespace Common {
+class SeekableReadStream;
+}
+
+namespace Graphics {
+struct Surface;
+}
+
namespace Video {
/**
diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp
index 90f7a8e9ac..47a9244a13 100644
--- a/video/flic_decoder.cpp
+++ b/video/flic_decoder.cpp
@@ -24,10 +24,11 @@
*/
#include "video/flic_decoder.h"
-#include "common/archive.h"
-#include "common/stream.h"
#include "common/endian.h"
+#include "common/rect.h"
+#include "common/stream.h"
#include "common/system.h"
+#include "common/textconsole.h"
namespace Video {
@@ -79,7 +80,7 @@ bool FlicDecoder::loadStream(Common::SeekableReadStream *stream) {
_offsetFrame2 = _fileStream->readUint32LE();
_surface = new Graphics::Surface();
- _surface->create(width, height, 1);
+ _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8());
_palette = (byte *)malloc(3 * 256);
memset(_palette, 0, 3 * 256);
_paletteChanged = false;
@@ -226,7 +227,7 @@ const Graphics::Surface *FlicDecoder::decodeNextFrame() {
_surface->free();
delete _surface;
_surface = new Graphics::Surface();
- _surface->create(newWidth, newHeight, 1);
+ _surface->create(newWidth, newHeight, Graphics::PixelFormat::createFormatCLUT8());
}
}
break;
diff --git a/video/flic_decoder.h b/video/flic_decoder.h
index 954fed7bfa..4ca8615de1 100644
--- a/video/flic_decoder.h
+++ b/video/flic_decoder.h
@@ -28,10 +28,13 @@
#include "video/video_decoder.h"
#include "common/list.h"
+#include "common/rational.h"
#include "common/rect.h"
+#include "graphics/pixelformat.h"
+#include "graphics/surface.h"
namespace Common {
- class SeekableReadStream;
+class SeekableReadStream;
}
namespace Video {
diff --git a/video/mpeg_player.h b/video/mpeg_player.h
index 44baff9c2b..dde272a9c6 100644
--- a/video/mpeg_player.h
+++ b/video/mpeg_player.h
@@ -81,7 +81,7 @@ typedef sequence_t mpeg2_sequence_t;
#define BUFFER_SIZE 4096
namespace Common {
- class File;
+class File;
}
class OSystem;
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index 1ed99a701a..d9ad65c9a0 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -33,12 +33,17 @@
#include "video/qt_decoder.h"
+#include "audio/audiostream.h"
+
#include "common/debug.h"
#include "common/endian.h"
#include "common/memstream.h"
+#include "common/system.h"
+#include "common/textconsole.h"
#include "common/util.h"
// Video codecs
+#include "video/codecs/codec.h"
#include "video/codecs/cinepak.h"
#include "video/codecs/mjpeg.h"
#include "video/codecs/qtrle.h"
@@ -46,6 +51,7 @@
#include "video/codecs/smc.h"
#include "video/codecs/cdtoons.h"
+
namespace Video {
////////////////////////////////////////////
@@ -313,7 +319,7 @@ const Graphics::Surface *QuickTimeDecoder::scaleSurface(const Graphics::Surface
for (int32 j = 0; j < _scaledSurface->h; j++)
for (int32 k = 0; k < _scaledSurface->w; k++)
- memcpy(_scaledSurface->getBasePtr(k, j), frame->getBasePtr((k * getScaleFactorX()).toInt() , (j * getScaleFactorY()).toInt()), frame->bytesPerPixel);
+ memcpy(_scaledSurface->getBasePtr(k, j), frame->getBasePtr((k * getScaleFactorX()).toInt() , (j * getScaleFactorY()).toInt()), frame->format.bytesPerPixel);
return _scaledSurface;
}
@@ -386,7 +392,7 @@ void QuickTimeDecoder::init() {
if (getScaleFactorX() != 1 || getScaleFactorY() != 1) {
// We have to initialize the scaled surface
_scaledSurface = new Graphics::Surface();
- _scaledSurface->create(getWidth(), getHeight(), getPixelFormat().bytesPerPixel);
+ _scaledSurface->create(getWidth(), getHeight(), getPixelFormat());
}
}
}
diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index 7167c8b9a2..6f7eb9450c 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -35,20 +35,21 @@
#define VIDEO_QT_DECODER_H
#include "common/scummsys.h"
+#include "common/rational.h"
#include "video/video_decoder.h"
-#include "video/codecs/codec.h"
-#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/quicktime_intern.h"
namespace Common {
- class MacResManager;
+ class Rational;
}
namespace Video {
+class Codec;
+
/**
* Decoder for QuickTime videos.
*
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 760d0045d9..7a95eedf6a 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -29,11 +29,11 @@
#include "video/smk_decoder.h"
-#include "common/archive.h"
#include "common/endian.h"
#include "common/util.h"
#include "common/stream.h"
#include "common/system.h"
+#include "common/textconsole.h"
#include "audio/audiostream.h"
#include "audio/mixer.h"
@@ -483,7 +483,7 @@ bool SmackerDecoder::loadStream(Common::SeekableReadStream *stream) {
_surface = new Graphics::Surface();
// Height needs to be doubled if we have flags (Y-interlaced or Y-doubled)
- _surface->create(width, height * (_header.flags ? 2 : 1), 1);
+ _surface->create(width, height * (_header.flags ? 2 : 1), Graphics::PixelFormat::createFormatCLUT8());
memset(_palette, 0, 3 * 256);
return true;
diff --git a/video/smk_decoder.h b/video/smk_decoder.h
index 2d01909a44..b4eda88203 100644
--- a/video/smk_decoder.h
+++ b/video/smk_decoder.h
@@ -26,11 +26,18 @@
#ifndef VIDEO_SMK_PLAYER_H
#define VIDEO_SMK_PLAYER_H
+#include "common/rational.h"
+#include "graphics/pixelformat.h"
+#include "graphics/surface.h"
#include "video/video_decoder.h"
#include "audio/mixer.h"
namespace Audio {
- class QueuingAudioStream;
+class QueuingAudioStream;
+}
+
+namespace Common {
+class SeekableReadStream;
}
namespace Video {
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index a6317bac8f..dde2c09082 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -25,9 +25,12 @@
#include "video/video_decoder.h"
+#include "common/rational.h"
#include "common/file.h"
#include "common/system.h"
+#include "graphics/palette.h"
+
namespace Video {
VideoDecoder::VideoDecoder() {
diff --git a/video/video_decoder.h b/video/video_decoder.h
index 348b5dc0a3..b5574fd3fc 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -26,18 +26,19 @@
#ifndef VIDEO_DECODER_H
#define VIDEO_DECODER_H
-#include "common/events.h"
-#include "common/list.h"
-#include "common/rational.h"
-
-#include "graphics/surface.h"
-#include "graphics/pixelformat.h"
+#include "common/str.h"
#include "audio/timestamp.h" // TODO: Move this to common/ ?
namespace Common {
- class SeekableReadStream;
+class Rational;
+class SeekableReadStream;
+}
+
+namespace Graphics {
+struct PixelFormat;
+struct Surface;
}
namespace Video {